query
stringlengths
7
33.1k
document
stringlengths
7
335k
metadata
dict
negatives
listlengths
3
101
negative_scores
listlengths
3
101
document_score
stringlengths
3
10
document_rank
stringclasses
102 values
This method sends the initial handshake response
private void sendDeviceHandshake(SelectionKey key, boolean flag) throws IOException { SocketChannel channel = (SocketChannel)key.channel(); byte[] ackData = new byte[1]; if(flag) { ackData[0]=01; }else { ackData[0]=00; } ByteBuffer bSend = ByteBuffer.allocate(ackData.length); bSend.clear(); bSend.put(ackData); bSend.flip(); while (bSend.hasRemaining()) { try { channel.write(bSend); } catch (IOException e) { throw new IOException("Failed to send acknowledgement"); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n protected void prepareHandshakeMessageContents() {\n }", "void handshake() throws SyncConnectionException;", "private void doHandshake()throws Exception {\n\t\tHttpClient httpClient = new HttpClient();\n\t\t// Here set up Jetty's HttpClient, for example:\n\t\t// httpClient.setMaxConnectionsPerDestination(2);\n\t\thttpClient.start();\n\n\t\t// Prepare the transport\n\t\tMap<String, Object> options = new HashMap<String, Object>();\n\t\tClientTransport transport = new LongPollingTransport(options, httpClient);\n\n\t\t// Create the BayeuxClient\n\t\tClientSession client = new BayeuxClient(\"http://localhost:8080/childrenguard-server/cometd\", transport);\n\n\t\tclient.handshake(null,new ClientSessionChannel.MessageListener()\n\t\t{\n\t\t public void onMessage(ClientSessionChannel channel, Message message)\n\t\t {\n\t\t \tSystem.out.println(\"fail to connect to server.\");\n\t\t if (message.isSuccessful())\n\t\t {\n\t\t \tSystem.out.println(message);\n\t\t // Here handshake is successful\n\t\t }\n\t\t }\n\t\t});\n\t\t\n\t\t// Here set up the BayeuxClient, for example:\n\t\t//client.getChannel(Channel.META_CONNECT).addListener(new ClientSessionChannel.MessageListener() { });\n\n\t\t\n\t}", "@Override\n\tpublic void handshakeCompleted(HandshakeCompletedEvent evt) {\n\t\t\n\t}", "private void handshake() {\n Log.d(TAG, \"handshake: called\");\n\n if (takeBertyService()) {\n if (takeBertyCharacteristics()) {\n // Speed up connection\n requestMtu(PeerDevice.MAX_MTU);\n\n // send local PID\n if (!write(getPIDCharacteristic() ,mLocalPID.getBytes(), true)) {\n Log.e(TAG, String.format(\"handshake error: failed to send local PID: device=%s\", getMACAddress()));\n disconnect();\n }\n\n // get remote PID\n if (!read(getPIDCharacteristic())) {\n Log.e(TAG, String.format(\"handshake error: failed to read remote PID: device=%s\", getMACAddress()));\n disconnect();\n }\n\n return ;\n }\n }\n Log.e(TAG, String.format(\"handshake error: failed to find berty service: device=%s\", getMACAddress()));\n disconnect();\n }", "public void sendAuthPackge() throws IOException {\n // 生成认证数据\n byte[] rand1 = RandomUtil.randomBytes(8);\n byte[] rand2 = RandomUtil.randomBytes(12);\n\n // 保存认证数据\n byte[] seed = new byte[rand1.length + rand2.length];\n System.arraycopy(rand1, 0, seed, 0, rand1.length);\n System.arraycopy(rand2, 0, seed, rand1.length, rand2.length);\n this.seed = seed;\n\n // 发送握手数据包\n HandshakePacket hs = new HandshakePacket();\n hs.packetId = 0;\n hs.protocolVersion = Versions.PROTOCOL_VERSION;\n hs.serverVersion = Versions.SERVER_VERSION;\n hs.threadId = id;\n hs.seed = rand1;\n hs.serverCapabilities = getServerCapabilities();\n // hs.serverCharsetIndex = (byte) (charsetIndex & 0xff);\n hs.serverStatus = 2;\n hs.restOfScrambleBuff = rand2;\n hs.write(this);\n\n // asynread response\n // 这里阻塞了不好\n this.asynRead();\n }", "private void handshake() {\n JsonNode helloResponse = this.readNextResponse();\n\n if (!helloResponse.has(\"hello\")) {\n throw new JsiiError(\"Expecting 'hello' message from jsii-runtime\");\n }\n\n String runtimeVersion = helloResponse.get(\"hello\").asText();\n assertVersionCompatible(JSII_RUNTIME_VERSION, runtimeVersion);\n }", "public HandShakeMessage(){\r\n\t\tthis.type = OperationCodeConstants.HANDSHAKE;\r\n\t\tthis.msg = BinaryHelper.shortToByte(type);\r\n\t}", "@Override\n protected void connectionEstablished()\n {\n peer.resetConnectionClosed();\n\n // send our handshake directly as it doesn't fit into peer message\n // and there is always space in send buffer on new connection\n //enqueue(pmCache.handshake(torrent.getTorrentId(), torrent.getClientId()));\n }", "private void shakeHands() throws IOException {\n HttpRequest req = new HttpRequest(inputStream);\n String requestLine = req.get(HttpRequest.REQUEST_LINE);\n handshakeComplete = checkStartsWith(requestLine, \"GET /\")\n && checkContains(requestLine, \"HTTP/\")\n && req.get(\"Host\") != null\n && checkContains(req.get(\"Upgrade\"), \"websocket\")\n && checkContains(req.get(\"Connection\"), \"Upgrade\")\n && \"13\".equals(req.get(\"Sec-WebSocket-Version\"))\n && req.get(\"Sec-WebSocket-Key\") != null;\n String nonce = req.get(\"Sec-WebSocket-Key\");\n if (handshakeComplete) {\n byte[] nonceBytes = BaseEncoding.base64().decode(nonce);\n if (nonceBytes.length != HANDSHAKE_NONCE_LENGTH) {\n handshakeComplete = false;\n }\n }\n // if we have met all the requirements\n if (handshakeComplete) {\n outputPeer.write(asUTF8(\"HTTP/1.1 101 Switching Protocols\\r\\n\"));\n outputPeer.write(asUTF8(\"Upgrade: websocket\\r\\n\"));\n outputPeer.write(asUTF8(\"Connection: upgrade\\r\\n\"));\n outputPeer.write(asUTF8(\"Sec-WebSocket-Accept: \"));\n HashFunction hf = Hashing.sha1();\n HashCode hc = hf.newHasher()\n .putString(nonce, StandardCharsets.UTF_8)\n .putString(WEBSOCKET_ACCEPT_UUID, StandardCharsets.UTF_8)\n .hash();\n String acceptKey = BaseEncoding.base64().encode(hc.asBytes());\n outputPeer.write(asUTF8(acceptKey));\n outputPeer.write(asUTF8(\"\\r\\n\\r\\n\"));\n }\n outputPeer.setHandshakeComplete(handshakeComplete);\n }", "@Override\n public void start() {\n long originalSendNextNumber = sendNextNumber;\n sendNextNumber += 1L;\n\n // Send the first part of the handshake\n currentState = SYN_SENT;\n sendWithResend(createPacket(\n 0, // Data size (byte)\n originalSendNextNumber, // Seq number\n 0, // Ack number\n false, // ACK\n true, // SYN\n false // ECE\n ));\n\n // System.out.println(\"3-WAY HANDSHAKE: 0. Sender sent SYN.\");\n\n // Preserve space as this field will never be used\n this.selectiveAckSet = null;\n\n }", "private void handshake() {\n JsonNode helloResponse = this.readNextResponse();\n\n if (!helloResponse.has(\"hello\")) {\n throw new JsiiException(\"Expecting 'hello' message from jsii-runtime\");\n }\n\n String runtimeVersion = helloResponse.get(\"hello\").asText();\n assertVersionCompatible(JSII_RUNTIME_VERSION, runtimeVersion);\n }", "private void handshakeRes(ClientMessageUnpacker unpacker, ProtocolVersion proposedVer)\n throws IgniteClientConnectionException, IgniteClientAuthenticationException {\n try (unpacker) {\n ProtocolVersion srvVer = new ProtocolVersion(unpacker.unpackShort(), unpacker.unpackShort(),\n unpacker.unpackShort());\n\n var errCode = unpacker.unpackInt();\n\n if (errCode != ClientErrorCode.SUCCESS) {\n var msg = unpacker.unpackString();\n\n if (errCode == ClientErrorCode.AUTH_FAILED)\n throw new IgniteClientAuthenticationException(msg);\n else if (proposedVer.equals(srvVer))\n throw new IgniteClientException(\"Client protocol error: unexpected server response.\");\n else if (!supportedVers.contains(srvVer))\n throw new IgniteClientException(String.format(\n \"Protocol version mismatch: client %s / server %s. Server details: %s\",\n proposedVer,\n srvVer,\n msg\n ));\n else { // Retry with server version.\n handshake(srvVer);\n }\n\n throw new IgniteClientConnectionException(msg);\n }\n\n var featuresLen = unpacker.unpackBinaryHeader();\n unpacker.skipValue(featuresLen);\n\n var extensionsLen = unpacker.unpackMapHeader();\n unpacker.skipValue(extensionsLen);\n\n protocolCtx = protocolContextFromVersion(srvVer);\n }\n }", "boolean onHandshakeResponse(\n HttpMessage httpMessage,\n Socket inSocket,\n @SuppressWarnings(\"deprecation\") ZapGetMethod method);", "public void setHandshake(Handshake handshake)\n {\n this.handshake = handshake;\n }", "public void startResponse()\n\t\t\t{\n\t\t\t\tsend(\"<response>\", false);\n\t\t\t}", "private byte[] createHandshake(String base64Key) {\n StringBuilder builder = new StringBuilder();\n\n String path = uri.getRawPath();\n String query = uri.getRawQuery();\n\n String requestUri;\n if (query == null) {\n requestUri = path;\n } else {\n requestUri = path + \"?\" + query;\n }\n\n builder.append(\"GET \" + requestUri + \" HTTP/1.1\");\n builder.append(\"\\r\\n\");\n\n String host;\n if (uri.getPort() == -1) {\n host = uri.getHost();\n } else {\n host = uri.getHost() + \":\" + uri.getPort();\n }\n\n builder.append(\"Host: \" + host);\n builder.append(\"\\r\\n\");\n\n builder.append(\"Upgrade: websocket\");\n builder.append(\"\\r\\n\");\n\n builder.append(\"Connection: Upgrade\");\n builder.append(\"\\r\\n\");\n\n builder.append(\"Sec-WebSocket-Key: \" + base64Key);\n builder.append(\"\\r\\n\");\n\n builder.append(\"Sec-WebSocket-Version: 13\");\n builder.append(\"\\r\\n\");\n\n for (Map.Entry<String, String> entry : headers.entrySet()) {\n builder.append(entry.getKey() + \": \" + entry.getValue());\n builder.append(\"\\r\\n\");\n }\n\n builder.append(\"\\r\\n\");\n\n String handshake = builder.toString();\n return handshake.getBytes(Charset.forName(\"ASCII\"));\n }", "public Handshake()\n\t{\n\t this(-1);\n\t}", "public HandshakeBuilder onHandshakeRecievedAsServer( WebSocket conn , Draft draft , Handshakedata request ) throws IOException;", "private void startConnection() throws IOException {\n bos = new BufferedOutputStream(socket.getOutputStream(), 65536);\n\n byte[] key = new byte[16];\n Random random = new Random();\n random.nextBytes(key);\n String base64Key = Base64.encodeBase64String(key);\n\n byte[] handshake = createHandshake(base64Key);\n bos.write(handshake);\n bos.flush();\n\n InputStream inputStream = socket.getInputStream();\n verifyServerHandshake(inputStream, base64Key);\n\n writerThread.start();\n\n notifyOnOpen();\n\n bis = new BufferedInputStream(socket.getInputStream(), 65536);\n read();\n }", "private void finishConnection(Map<String, String> headers, SelectionKey clientKey)\r\n {\r\n // Local Variable Declaration\r\n String SWSKey;\r\n byte[] rsp; \r\n SocketChannel sc = null; \r\n \r\n try \r\n {\r\n // Get the socketchannel from the key representing the connecting client \r\n sc = (SocketChannel) clientKey.channel();\r\n \r\n // Get the Sec-WebSocketData-Key\r\n SWSKey = headers.get(\"Sec-WebSocket-Key\");\r\n\r\n // Build response header to send to client to complete handshake\r\n rsp = (this.HND_SHK_HDR\r\n + Base64.getEncoder().encodeToString(MessageDigest\r\n .getInstance(\"SHA-1\").digest((SWSKey + this.magicString)\r\n .getBytes(\"UTF-8\"))) + \"\\r\\n\\r\\n\").getBytes(\"UTF-8\");\r\n\r\n // Write the response header back to the connection client. That's it!\r\n sc.write(ByteBuffer.wrap(rsp));\r\n } \r\n catch (IOException ex) \r\n { \r\n ex.printStackTrace();\r\n } \r\n catch (NoSuchAlgorithmException ex) \r\n {\r\n Logger.getLogger(RecptionRoom.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }", "@Override\n\tpublic void afterHandshake(ServerHttpRequest request, ServerHttpResponse response, WebSocketHandler wsHandler,\n\t\t\tException ex) {\n\t\tSystem.out.println(\"after handshake\");\n\n\t\tHttpServletRequest rq = ((ServletServerHttpRequest) request).getServletRequest();\n\t\tHttpSession session = rq.getSession();\n\t\tsuper.afterHandshake(request, response, wsHandler, ex);\n\n\t}", "private void _initChallengeResponse() throws InvalidKeyException, SecurityFeaturesException, InvalidChallengeException {\n _requestSessionKey();\n }", "@Override\n\tpublic void sendResponse() {\n\t\t\n\t}", "@Override // javax.net.ssl.SSLSocket\n /* Code decompiled incorrectly, please refer to instructions dump. */\n public void startHandshake() {\n /*\n // Method dump skipped, instructions count: 634\n */\n throw new UnsupportedOperationException(\"Method not decompiled: X.C58602mC.startHandshake():void\");\n }", "public final boolean isHandshakeComplete() {\n return handshakeComplete;\n }", "public final HandshakeStatus getHandshakeStatus() {\n/* 209 */ return this.handshakeStatus;\n/* */ }", "@Override\r\n\tpublic void run() {\r\n\t\ttry {\r\n\t\t\tthis.inputStream = socket.getInputStream();\r\n\t\t\tthis.outputStream = socket.getOutputStream();\r\n\t\t\t// Get the peer that is asking me for fragments.\r\n\t\t\tpeerState = torrentClient.getPeerStateList().getByAddress(\r\n\t\t\t\t\tsocket.getInetAddress().getHostAddress(), socket.getPort());\r\n\t\t\t// read handhake\r\n\t\t\tbyte[] received = new byte[68];\r\n\t\t\tinputStream.read(received);\r\n\t\t\t//Parse the handshake received\r\n\t\t\tHandsake handshakeMessage = Handsake\r\n\t\t\t\t\t.parseStringToHandsake(new String(received));\r\n\t\t\t// validate hash\r\n\t\t\tString torrentHash = new String(torrentClient.getMetainf()\r\n\t\t\t\t\t.getInfo().getInfoHash());\r\n\t\t\t//if the received handshake is correct send my handshake\r\n\t\t\tif (Handsake.isValidHandsakeForBitTorrentProtocol(handshakeMessage,\r\n\t\t\t\t\ttorrentHash)) {\r\n\t\t\t\t// send handshake\r\n\t\t\t\tHandsake handShakeToSend = new Handsake(torrentHash,\r\n\t\t\t\t\t\tthis.torrentClient.getPeerId());\r\n\t\t\t\tthis.outputStream.write(handShakeToSend.getBytes());\r\n\t\t\t\t// enviar bitfield\r\n\t\t\t\ttry {\r\n\t\t\t\t\tthis.sendBitfield();\r\n\t\t\t\t\t// leer\r\n\t\t\t\t\tPeerProtocolMessage message = this.readNormalMessage();\r\n\t\t\t\t\t// Check if I have received an interested message\r\n\t\t\t\t\tif (message.getType().equals(\r\n\t\t\t\t\t\t\tPeerProtocolMessage.Type.INTERESTED)) {\r\n\t\t\t\t\t\tif (this.peerState != null) {\r\n\t\t\t\t\t\t\tpeerState = torrentClient.getPeerStateList()\r\n\t\t\t\t\t\t\t\t\t.getByAddress(\r\n\t\t\t\t\t\t\t\t\t\t\tsocket.getInetAddress()\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t.getHostAddress(),\r\n\t\t\t\t\t\t\t\t\t\t\tsocket.getPort());\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t//Set the peer status\r\n\t\t\t\t\t\tif (this.peerState != null) {\r\n\t\t\t\t\t\t\tthis.peerState.setPeer_interested(true);\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t// send unchoke to the peer\r\n\t\t\t\t\t\tthis.outputStream.write(new UnChokeMsg().getBytes());\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t//set the peer status\r\n\t\t\t\t\t\tif (this.peerState != null) {\r\n\t\t\t\t\t\t\tthis.peerState.setAm_choking(false);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t//Continue receiveing messages if the message type is Keep_alive, Request or Have.\r\n\t\t\t\t\t\tboolean continueReading = true;\r\n\t\t\t\t\t\twhile (continueReading) {\r\n\t\t\t\t\t\t\tmessage = this.readNormalMessage();\r\n\t\t\t\t\t\t\tcontinueReading = processMessage(message);\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t// if I have not received interested send unchoke\r\n\t\t\t\t\t\tthis.outputStream.write(new ChokeMsg().getBytes());\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t} catch (IOException ioe) {\r\n\t\t\t\t\tioe.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t// close connection\r\n\t\t\tthis.inputStream.close();\r\n\t\t\tthis.outputStream.close();\r\n\t\t\tsocket.close();\r\n\r\n\t\t} catch (IOException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\tSystem.out.println(\"Sending thread closed\");\r\n\t\t\te.printStackTrace();\r\n\t\t\ttry {\r\n\t\t\t\tthis.inputStream.close();\r\n\t\t\t\tthis.outputStream.close();\r\n\t\t\t\tsocket.close();\r\n\t\t\t} catch (IOException e1) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\te1.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private void respAuth() throws Exception {\n DataOutputStream dos = new DataOutputStream(os);\n dos.writeInt(1);\n dos.writeByte(Message.MSG_RESP_AUTH);\n if (haslogin) {\n dos.writeByte(Message.SUCCESS_AUTH);\n } else {\n dos.writeByte(Message.FAILED_AUTH);\n }\n }", "public void handshakeCompleted(ShellLaunchEvent ev);", "@Test\n public void serverFinishesStreamWithHeaders() throws Exception {\n peer.sendFrame().settings(new Settings());\n peer.acceptFrame();// ACK\n\n peer.acceptFrame();// SYN_STREAM\n\n peer.acceptFrame();// PING\n\n peer.sendFrame().headers(true, 3, TestUtil.headerEntries(\"headers\", \"bam\"));\n peer.sendFrame().ping(true, 1, 0);// PONG\n\n peer.play();\n // play it back\n Http2Connection connection = connect(peer);\n Http2Stream stream = connection.newStream(TestUtil.headerEntries(\"a\", \"artichaut\"), false);\n connection.writePingAndAwaitPong();\n Assert.assertEquals(Headers.of(\"headers\", \"bam\"), stream.takeHeaders());\n Assert.assertEquals(Util.EMPTY_HEADERS, stream.trailers());\n Assert.assertEquals(0, connection.openStreamCount());\n // verify the peer received what was expected\n MockHttp2Peer.InFrame synStream = peer.takeFrame();\n Assert.assertEquals(TYPE_HEADERS, synStream.type);\n Assert.assertFalse(synStream.outFinished);\n Assert.assertEquals(3, synStream.streamId);\n Assert.assertEquals((-1), synStream.associatedStreamId);\n Assert.assertEquals(TestUtil.headerEntries(\"a\", \"artichaut\"), synStream.headerBlock);\n }", "public String getServerHandshakeMessage(int identifier) {\n JSONObject model = new JSONObject();\n model.put(\"Type\", \"Handshake\");\n model.put(\"Identifier\", Integer.toString(identifier));\n return model.toString();\n }", "@Override\n\tpublic void sendResponse() {\n\n\t}", "@Test\n public void clientCreatesStreamAndServerRepliesWithFin() throws Exception {\n peer.sendFrame().settings(new Settings());\n peer.acceptFrame();// ACK\n\n peer.acceptFrame();// SYN_STREAM\n\n peer.acceptFrame();// PING\n\n peer.sendFrame().headers(true, 3, TestUtil.headerEntries(\"a\", \"android\"));\n peer.sendFrame().ping(true, 1, 0);\n peer.play();\n // play it back\n Http2Connection connection = connect(peer);\n connection.newStream(TestUtil.headerEntries(\"b\", \"banana\"), false);\n Assert.assertEquals(1, connection.openStreamCount());\n connection.writePingAndAwaitPong();// Ensure that the SYN_REPLY has been received.\n\n Assert.assertEquals(0, connection.openStreamCount());\n // verify the peer received what was expected\n MockHttp2Peer.InFrame synStream = peer.takeFrame();\n Assert.assertEquals(TYPE_HEADERS, synStream.type);\n MockHttp2Peer.InFrame ping = peer.takeFrame();\n Assert.assertEquals(TYPE_PING, ping.type);\n }", "private void verifyServerHandshake(InputStream inputStream, String secWebSocketKey) throws IOException {\n try {\n SessionInputBufferImpl sessionInputBuffer = new SessionInputBufferImpl(new HttpTransportMetricsImpl(),\n 8192);\n sessionInputBuffer.bind(inputStream);\n HttpMessageParser<HttpResponse> parser = new DefaultHttpResponseParser(sessionInputBuffer);\n HttpResponse response = parser.parse();\n\n StatusLine statusLine = response.getStatusLine();\n if (statusLine == null) {\n throw new InvalidServerHandshakeException(\"There is no status line\");\n }\n\n int statusCode = statusLine.getStatusCode();\n if (statusCode != 101) {\n throw new InvalidServerHandshakeException(\n \"Invalid status code. Expected 101, received: \" + statusCode);\n }\n\n Header[] upgradeHeader = response.getHeaders(\"Upgrade\");\n if (upgradeHeader.length == 0) {\n throw new InvalidServerHandshakeException(\"There is no header named Upgrade\");\n }\n String upgradeValue = upgradeHeader[0].getValue();\n if (upgradeValue == null) {\n throw new InvalidServerHandshakeException(\"There is no value for header Upgrade\");\n }\n upgradeValue = upgradeValue.toLowerCase();\n if (!upgradeValue.equals(\"websocket\")) {\n throw new InvalidServerHandshakeException(\n \"Invalid value for header Upgrade. Expected: websocket, received: \" + upgradeValue);\n }\n\n Header[] connectionHeader = response.getHeaders(\"Connection\");\n if (connectionHeader.length == 0) {\n throw new InvalidServerHandshakeException(\"There is no header named Connection\");\n }\n String connectionValue = connectionHeader[0].getValue();\n if (connectionValue == null) {\n throw new InvalidServerHandshakeException(\"There is no value for header Connection\");\n }\n connectionValue = connectionValue.toLowerCase();\n if (!connectionValue.equals(\"upgrade\")) {\n throw new InvalidServerHandshakeException(\n \"Invalid value for header Connection. Expected: upgrade, received: \" + connectionValue);\n }\n\n// Header[] secWebSocketAcceptHeader = response.getHeaders(\"Sec-WebSocket-Accept\");\n// if (secWebSocketAcceptHeader.length == 0) {\n// throw new InvalidServerHandshakeException(\"There is no header named Sec-WebSocket-Accept\");\n// }\n// String secWebSocketAcceptValue = secWebSocketAcceptHeader[0].getValue();\n// if (secWebSocketAcceptValue == null) {\n// throw new InvalidServerHandshakeException(\"There is no value for header Sec-WebSocket-Accept\");\n// }\n\n// String keyConcatenation = secWebSocketKey + GUID;\n// byte[] sha1 = DigestUtils.sha1(keyConcatenation);\n// String secWebSocketAccept = Base64.encodeBase64String(sha1);\n// if (!secWebSocketAcceptValue.equals(secWebSocketAccept)) {\n// throw new InvalidServerHandshakeException(\n// \"Invalid value for header Sec-WebSocket-Accept. Expected: \" + secWebSocketAccept\n// + \", received: \" + secWebSocketAcceptValue);\n// }\n } catch (HttpException e) {\n throw new InvalidServerHandshakeException(e.getMessage());\n }\n }", "void doClientSide() throws Exception {\n\n\t\tSSLSocketFactory sslsf = (SSLSocketFactory) SSLSocketFactory\n\t\t\t\t.getDefault();\n\t\tSSLSocket sslSocket = (SSLSocket) sslsf.createSocket(theServerName,\n\t\t\t\t12345);\n\t\t\n\t\tOutputStream sslOS = sslSocket.getOutputStream();\n\t\tsslOS.write(\"Hello SSL Server\".getBytes()); // Write to the Server\n\t\tsslOS.flush();\n\t\tsslSocket.close();\n\t}", "@Override\n\tpublic boolean beforeHandshake(ServerHttpRequest request, ServerHttpResponse response, WebSocketHandler wsHandler,\n\t\t\tMap<String, Object> attributes) throws Exception {\n\t\tSystem.out.println(\"before handshake\");\n\t\treturn super.beforeHandshake(request, response, wsHandler, attributes);\n\n\t}", "@Test\n public void remoteSendsDataAfterInFinished() throws Exception {\n peer.sendFrame().settings(new Settings());\n peer.acceptFrame();// ACK\n\n peer.acceptFrame();// SYN_STREAM\n\n peer.sendFrame().headers(false, 3, TestUtil.headerEntries(\"a\", \"android\"));\n peer.sendFrame().data(true, 3, new Buffer().writeUtf8(\"robot\"), 5);\n peer.sendFrame().data(true, 3, new Buffer().writeUtf8(\"c3po\"), 4);\n peer.acceptFrame();// RST_STREAM\n\n peer.sendFrame().ping(false, 2, 0);// Ping just to make sure the stream was fastforwarded.\n\n peer.acceptFrame();// PING\n\n peer.play();\n // play it back\n Http2Connection connection = connect(peer);\n Http2Stream stream = connection.newStream(TestUtil.headerEntries(\"b\", \"banana\"), false);\n Assert.assertEquals(Headers.of(\"a\", \"android\"), stream.takeHeaders());\n assertStreamData(\"robot\", stream.getSource());\n // verify the peer received what was expected\n MockHttp2Peer.InFrame synStream = peer.takeFrame();\n Assert.assertEquals(TYPE_HEADERS, synStream.type);\n MockHttp2Peer.InFrame rstStream = peer.takeFrame();\n Assert.assertEquals(TYPE_RST_STREAM, rstStream.type);\n Assert.assertEquals(3, rstStream.streamId);\n MockHttp2Peer.InFrame ping = peer.takeFrame();\n Assert.assertEquals(TYPE_PING, ping.type);\n Assert.assertEquals(2, ping.payload1);\n }", "@Override\n\tpublic void onOpen( ServerHandshake handshakedata ) {\n\t\tlog.info(\"opened connection\");\n\t\t// if you plan to refuse connection based on ip or httpfields overload: onWebsocketHandshakeReceivedAsClient\n\t}", "@Override\n protected void handshakeCompleted()\n {\n if (0 < torrent.pieces.cardinality()) {\n enqueue(pmCache.bitfield((int)torrent.metainfo.pieces, torrent.pieces));\n }\n\n /*\n todo\n if (client.node != null) {\n pc.enqueue(StdPeerMessage.port(client.node.port));\n }\n */\n }", "public void test() throws IOException {\n SocketChannel socketChannel = SocketChannel.open();\n socketChannel.configureBlocking(false);\n socketChannel.connect(new InetSocketAddress(BuildConfig.API_URL, ServerIP.PORT));\n\n// Complete connection\n while (!socketChannel.finishConnect()) {\n // do something until connect completed\n }\n\n// Create byte buffers to use for holding application and encoded data\n SSLSession session = sslEngine.getSession();\n ByteBuffer myAppData = ByteBuffer.allocate(session.getApplicationBufferSize());\n ByteBuffer myNetData = ByteBuffer.allocate(session.getPacketBufferSize());\n ByteBuffer peerAppData = ByteBuffer.allocate(session.getApplicationBufferSize());\n ByteBuffer peerNetData = ByteBuffer.allocate(session.getPacketBufferSize());\n\n// Do initial handshake\n// doHandshake(socketChannel, sslEngine, myNetData, peerNetData);\n\n myAppData.put(\"hello\".getBytes());\n myAppData.flip();\n\n while (myAppData.hasRemaining()) {\n // Generate SSL/TLS encoded data (handshake or application data)\n SSLEngineResult res = sslEngine.wrap(myAppData, myNetData);\n\n // Process status of call\n if (res.getStatus() == SSLEngineResult.Status.OK) {\n myAppData.compact();\n\n // Send SSL/TLS encoded data to peer\n while(myNetData.hasRemaining()) {\n int num = socketChannel.write(myNetData);\n if (num == 0) {\n // no bytes written; try again later\n }\n }\n }\n\n // Handle other status: BUFFER_OVERFLOW, CLOSED\n }\n\n // Read SSL/TLS encoded data from peer\n int num = socketChannel.read(peerNetData);\n if (num == -1) {\n // The channel has reached end-of-stream\n } else if (num == 0) {\n // No bytes read; try again ...\n } else {\n // Process incoming data\n peerNetData.flip();\n SSLEngineResult res = sslEngine.unwrap(peerNetData, peerAppData);\n\n if (res.getStatus() == SSLEngineResult.Status.OK) {\n peerNetData.compact();\n\n if (peerAppData.hasRemaining()) {\n // Use peerAppData\n }\n }\n // Handle other status: BUFFER_OVERFLOW, BUFFER_UNDERFLOW, CLOSED\n }\n }", "public void logon() throws IOException, GeneralSecurityException {\n String line;\n char response;\n\n if (state != State.CONNECTED) {\n connect();\n }\n\n socketOut.write('0');\n socketOut.flush();\n socketOut.write(VERSION.getBytes());\n socketOut.write('\\n');\n socketOut.write(GETCOMMAND.getBytes());\n socketOut.write('\\n');\n socketOut.write(USERNAME.getBytes());\n socketOut.write(username.getBytes());\n socketOut.write('\\n');\n socketOut.write(PASSPHRASE.getBytes());\n socketOut.write(new String(passphrase).getBytes());\n socketOut.write('\\n');\n socketOut.write(LIFETIME.getBytes());\n socketOut.write(Integer.toString(lifetime).getBytes());\n socketOut.write('\\n');\n if (credname != null) {\n socketOut.write(CREDNAME.getBytes());\n socketOut.write(credname.getBytes());\n socketOut.write('\\n');\n }\n socketOut.flush();\n\n line = readLine(socketIn);\n if (line == null) {\n throw new EOFException();\n }\n if (!line.equals(VERSION)) {\n throw new ProtocolException(\"bad MyProxy protocol VERSION string: \"\n + line);\n }\n line = readLine(socketIn);\n if (line == null) {\n throw new EOFException();\n }\n if (!line.startsWith(RESPONSE)\n || line.length() != RESPONSE.length() + 1) {\n throw new ProtocolException(\n \"bad MyProxy protocol RESPONSE string: \" + line);\n }\n response = line.charAt(RESPONSE.length());\n if (response == '1') {\n StringBuffer errString;\n\n errString = new StringBuffer(\"MyProxy logon failed\");\n while ((line = readLine(socketIn)) != null) {\n if (line.startsWith(ERROR)) {\n errString.append('\\n');\n errString.append(line.substring(ERROR.length()));\n }\n }\n throw new FailedLoginException(errString.toString());\n } else if (response == '2') {\n throw new ProtocolException(\n \"MyProxy authorization RESPONSE not implemented\");\n } else if (response != '0') {\n throw new ProtocolException(\n \"unknown MyProxy protocol RESPONSE string: \" + line);\n }\n while ((line = readLine(socketIn)) != null) {\n if (line.startsWith(TRUSTROOTS)) {\n String filenameList = line.substring(TRUSTROOTS.length());\n trustrootFilenames = filenameList.split(\",\");\n trustrootData = new String[trustrootFilenames.length];\n for (int i = 0; i < trustrootFilenames.length; i++) {\n String lineStart = \"FILEDATA_\" + trustrootFilenames[i]\n + \"=\";\n line = readLine(socketIn);\n if (line == null) {\n throw new EOFException();\n }\n if (!line.startsWith(lineStart)) {\n throw new ProtocolException(\n \"bad MyProxy protocol RESPONSE: expecting \"\n + lineStart + \" but received \" + line);\n }\n trustrootData[i] = new String(Base64.decode(line\n .substring(lineStart.length())));\n }\n }\n }\n state = State.LOGGEDON;\n }", "public Response send() {\n setupAndConnect();\n setRequestMethod();\n setRequestBody();\n setRequestHeaders();\n writeRequestBody();\n getResponse();\n connection.disconnect();\n return response;\n }", "@Test\n public void clientCreatesStreamAndServerReplies() throws Exception {\n peer.sendFrame().settings(new Settings());\n peer.acceptFrame();// ACK\n\n peer.acceptFrame();// SYN_STREAM\n\n peer.acceptFrame();// DATA\n\n peer.sendFrame().headers(false, 3, TestUtil.headerEntries(\"a\", \"android\"));\n peer.sendFrame().data(true, 3, new Buffer().writeUtf8(\"robot\"), 5);\n peer.acceptFrame();// PING\n\n peer.sendFrame().ping(true, 1, 0);// PING\n\n peer.play();\n // play it back\n Http2Connection connection = connect(peer);\n Http2Stream stream = connection.newStream(TestUtil.headerEntries(\"b\", \"banana\"), true);\n BufferedSink out = Okio.buffer(stream.getSink());\n out.writeUtf8(\"c3po\");\n out.close();\n Assert.assertEquals(Headers.of(\"a\", \"android\"), stream.takeHeaders());\n assertStreamData(\"robot\", stream.getSource());\n connection.writePingAndAwaitPong();\n Assert.assertEquals(0, connection.openStreamCount());\n // verify the peer received what was expected\n MockHttp2Peer.InFrame synStream = peer.takeFrame();\n Assert.assertEquals(TYPE_HEADERS, synStream.type);\n Assert.assertFalse(synStream.outFinished);\n Assert.assertEquals(3, synStream.streamId);\n Assert.assertEquals((-1), synStream.associatedStreamId);\n Assert.assertEquals(TestUtil.headerEntries(\"b\", \"banana\"), synStream.headerBlock);\n MockHttp2Peer.InFrame requestData = peer.takeFrame();\n Assert.assertArrayEquals(\"c3po\".getBytes(StandardCharsets.UTF_8), requestData.data);\n }", "public String getClientHandshakeMessage(int identifier) {\n JSONObject model = new JSONObject();\n model.put(\"Type\", \"Handshake\");\n model.put(\"Identifier\", Integer.toString(identifier));\n //model.put(\"TcpSendBuffer\", Integer.toString(tcpSendBuffer));\n //model.put(\"TcpReceiveBuffer\", Integer.toString(tcpReceiveBuffer));\n //model.put (\"idAck\" , Integer.toString(lastReceivedMessage));\n return model.toString();\n }", "private static void sendWebsocketResponse(ChannelHandlerContext ctx, String content){\n ctx.channel().write(new TextWebSocketFrame(content));\n }", "public synchronized void sendOk() {\r\n\t\tbeginMessage();\r\n\t\tsend(ServerConst.ANS + ServerConst.ANS_YES);\r\n\t\tendMessage();\r\n\t}", "public LWTRTPdu connectRsp() throws IncorrectTransitionException;", "public String receiveResponse()\n\t{\n\t\t\n\t}", "void responseSent( C conn ) ;", "public interface Handshaker {\n /**\n * Performs handshake. This method is blocking. After it has successfully finished, input/output\n * should be ready for normal message-based communication. In case method fails with IOException,\n * input and output are returned in undefined state.\n * @throws IOException if handshake process failed physically (input or output has unexpectedly\n * closed) or logically (if unexpected message came from remote).\n */\n void perform(LineReader input, OutputStream output) throws IOException;\n}", "public MSSHandshakeResp send(final MSSHandshakeReq req) throws IOException {\n return this.send(req, null);\n }", "@Override\r\n public synchronized void connect(SelectionKey clientKey)\r\n { \r\n // Local Variable Declaration \r\n Map<String, String> headers = new HashMap<>(); \r\n String headerString = \"\", rqsMethod = \"\", socKey = \"\";\r\n float rqsVersion = 0;\r\n \r\n // Read headers from socket client\r\n headerString = receiveHeaders(clientKey);\r\n \r\n // Parse and validate the headers if the headerString could be read\r\n if(!headerString.equals(null))\r\n {\r\n headers = parseAndValidateHeaders(headerString);\r\n \r\n // Extract the HTTP method and version used in this connection request\r\n rqsMethod = headers.get(RQS_METHOD);\r\n rqsVersion = Float.parseFloat(headers.get(RQS_VERSION));\r\n socKey = headers.get(\"Sec-WebSocket-Key\");\r\n }\r\n \r\n /* Make sure the header contained the GET method has a version higher \r\n * 1.1 and that the socket key exists */ \r\n if (!headerString.equals(null) && rqsMethod.equals(new String(\"GET\")) && \r\n rqsVersion >= 1.1 && socKey != null)\r\n {\r\n // Complete handshake, by sending response header confirming connection terms\r\n finishConnection(headers, clientKey);\r\n \r\n // Add the socket to the map of sockets by the name passed \r\n this.sockets.put(clientKey, new WebSocketData()); \r\n }\r\n else\r\n {\r\n // Send a Bad Request HTTP response \r\n SocketChannel sc = (SocketChannel) clientKey.channel();\r\n \r\n try \r\n {\r\n // Build a response header for the error \r\n byte rsp[] = (this.BAD_RQST_HDR \r\n + \"Malformed request. The connection request must \"\r\n + \"use a 'GET' method, must have a version greater \"\r\n + \"than 1.1 and have 'Sec-WebSocket-Key'. Please\"\r\n + \"check your headers\"\r\n + \"\\\\r\\\\n\").getBytes(\"UTF-8\");\r\n \r\n // Send the response error header to the client\r\n sc.write(ByteBuffer.wrap(rsp));\r\n } \r\n catch (IOException ex) \r\n {\r\n Logger.getLogger(RecptionRoom.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n }", "@Override\n protected void onAuthenticationResponse(SAPeerAgent peerAgent, SAAuthenticationToken authToken, int error) {\n }", "public void run() {\n // Initial connect request comes in\n Request request = getRequest();\n\n if (request == null) {\n closeConnection();\n return;\n }\n\n if (request.getConnectRequest() == null) {\n closeConnection();\n System.err.println(\"Received invalid initial request from Remote Client.\");\n return;\n }\n\n ObjectFactory objectFactory = new ObjectFactory();\n Response responseWrapper = objectFactory.createResponse();\n responseWrapper.setId(request.getId());\n responseWrapper.setSuccess(true);\n responseWrapper.setConnectResponse(objectFactory.createConnectResponse());\n responseWrapper.getConnectResponse().setId(id);\n\n // Return connect response with our (statistically) unique ID.\n if (!sendMessage(responseWrapper)) {\n closeConnection();\n System.err.println(\"Unable to respond to connect Request from remote Client.\");\n return;\n }\n\n // register our thread with the server\n Server.register(id, this);\n\n // have handler manage the protocol until it decides it is done.\n while ((request = getRequest()) != null) {\n\n Response response = handler.process(this, request);\n\n if (response == null) {\n continue;\n }\n\n if (!sendMessage(response)) {\n break;\n }\n }\n\n // client is done so thread can be de-registered\n if (handler instanceof IShutdownHandler) {\n ((IShutdownHandler) handler).logout(Server.getState(id));\n }\n Server.unregister(id);\n\n // close communication to client.\n closeConnection();\n }", "byte[] clientVerifyHash(String HashType, byte[] mastersecret, byte[] handshakemessages) throws NoSuchAlgorithmException, IOException{\n MessageDigest hasher = MessageDigest.getInstance(HashType);\r\n \r\n int padsize = 1;\r\n \r\n switch(HashType){\r\n case \"MD5\": \r\n padsize = 48;\r\n break;\r\n case \"SHA-1\":\r\n padsize = 40;\r\n break;\r\n }\r\n \r\n byte[] pad1 = new byte[padsize];\r\n byte[] pad2 = new byte[padsize];\r\n \r\n for (int i = 0; i < padsize; i++){\r\n pad1[i] = (0x36);\r\n pad2[i] = (0x5C);\r\n }\r\n \r\n baos.write(handshakemessages);\r\n baos.write(mastersecret);\r\n baos.write(pad1);\r\n \r\n byte[] before_HSM = baos.toByteArray();\r\n byte[] hashedHSM = hasher.digest(before_HSM);\r\n \r\n baos.reset();\r\n \r\n baos.write(mastersecret);\r\n baos.write(pad2);\r\n baos.write(hashedHSM);\r\n \r\n byte[] before_complete = baos.toByteArray();\r\n byte[] whole_hash = hasher.digest(before_complete);\r\n \r\n baos.reset();\r\n \r\n System.out.println(\"This is the client certificate verification: \" + Base64.getEncoder().encodeToString(whole_hash));\r\n \r\n return whole_hash;\r\n }", "private void doTunnelHandshake(Socket tunnel, String host, int port) throws IOException {\n OutputStream out = tunnel.getOutputStream();\n String msg = \"CONNECT \" + host + \":\" + port + \" HTTP/1.0\\n\"\n + \"\\r\\n\\r\\n\";\n out.write(msg.getBytes(StandardCharsets.UTF_8));\n out.flush();\n\n\n BufferedReader reader = new BufferedReader(new InputStreamReader(\n tunnel.getInputStream(), encoding.name()));\n List<String> headers = getHeaderLines(reader);\n\n // verify successful connection\n if (!headers.get(0).contains(\"200 OK\")) {\n throw new IOException(\"Unable to connect to proxy, error message: \" + headers.get(0));\n }\n }", "@Override\r\n protected void onAuthenticationResponse(SAPeerAgent peerAgent, SAAuthenticationToken authToken, int error) {\r\n }", "@Override\n public final int read() throws IOException {\n if (isClosed() || isFailed()) {\n return EOF;\n }\n if (!handshakeComplete) {\n shakeHands();\n if (!handshakeComplete) {\n failTheWebSocketConnection();\n return EOF;\n }\n }\n return nextWebSocketByte();\n }", "public synchronized void sendResponseIfReady() throws IOException {\n getConnection().channel.write(response).addListener(new CallWriteListener(this));\n }", "protected void reply_ok() throws java.io.IOException {\n byte[] ok = PushCacheProtocol.instance().okPacket();\n _socket.getOutputStream().write(ok, 0, ok.length);\n }", "public Http11Response() {\n\t\tsuper();\n\t\tsetVersion(\"HTTP/1.1\");\n\t\taddHeader(\"Server\", \"Shreejit's server/1.2\");\n\t\taddHeader(\"Connection\", \"Close\");\n\n\t\tTimeZone timeZone = TimeZone.getTimeZone(\"GMT\");\n\t\tCalendar cal = Calendar.getInstance(timeZone);\n\t\taddHeader(\"Date\", Parser.formatDate(cal.getTime()));\n\t}", "public void serverSideOk();", "public void sendResponse(ChannelHandlerContext ctx, CorfuMsg inMsg, CorfuMsg outMsg) {\n outMsg.copyBaseFields(inMsg);\n ctx.writeAndFlush(outMsg);\n log.trace(\"Sent response: {}\", outMsg);\n }", "public void announcePeer() throws Exception{\n \n Socket socket = new Socket(connect, inPort);\n\n BufferedReader br = new BufferedReader(new InputStreamReader(socket.getInputStream()));\n PrintWriter pw = new PrintWriter(new BufferedWriter(new OutputStreamWriter(socket.getOutputStream())),true);\n //System.out.println(\"Sending \" + cmd); \n // Tells another peer what is given in cmd\n pw.println(cmd);\n //System.out.println(\"Command sent\");\n String answer = br.readLine();\n System.out.println(answer);\n PeerConfig.writeInLogs(answer);\n\n pw.close();\n //br.close();\n socket.close();\n\n return ;\n }", "private void clientResponse(String msg) {\n JSONObject j = new JSONObject();\n j.put(\"statuscode\", 200);\n j.put(\"sequence\", ++sequence);\n j.put(\"response\", new JSONArray().add(msg));\n output.println(j);\n output.flush();\n }", "@Test\n public void serverClosesClientOutputStream() throws Exception {\n peer.sendFrame().settings(new Settings());\n peer.acceptFrame();// ACK\n\n peer.acceptFrame();// SYN_STREAM\n\n peer.sendFrame().rstStream(3, CANCEL);\n peer.acceptFrame();// PING\n\n peer.sendFrame().ping(true, 1, 0);\n peer.play();\n // play it back\n Http2Connection connection = connect(peer);\n Http2Stream stream = connection.newStream(TestUtil.headerEntries(\"a\", \"android\"), true);\n BufferedSink out = Okio.buffer(stream.getSink());\n connection.writePingAndAwaitPong();// Ensure that the RST_CANCEL has been received.\n\n try {\n out.writeUtf8(\"square\");\n out.flush();\n Assert.fail();\n } catch (IOException expected) {\n Assert.assertEquals(\"stream was reset: CANCEL\", expected.getMessage());\n }\n try {\n out.close();\n Assert.fail();\n } catch (IOException expected) {\n // Close throws because buffered data wasn't flushed.\n }\n Assert.assertEquals(0, connection.openStreamCount());\n // verify the peer received what was expected\n MockHttp2Peer.InFrame synStream = peer.takeFrame();\n Assert.assertEquals(TYPE_HEADERS, synStream.type);\n Assert.assertFalse(synStream.inFinished);\n Assert.assertFalse(synStream.outFinished);\n MockHttp2Peer.InFrame ping = peer.takeFrame();\n Assert.assertEquals(TYPE_PING, ping.type);\n }", "public synchronized boolean start(){\n \n\t\t/**\n\t\t * CONNECT TO SERVER\n\t\t */\n\t\tboolean connection = connectToServer(oml_server);\n \n\t\t/**\n\t\t * CREATE THE HEADER\n\t\t */\n\t\tcreate_head();\n \n\t\t/**\n\t\t * SEND THE HEADER\n\t\t */\n\t\tboolean injection = inject_head();\n\t\t\n\t\tif( connection && injection ){\n\t\t\treturn true;\n\t\t}else{\n\t\t\treturn false;\n\t\t}\n\t}", "private void getAUTH_REQUEST() throws Exception {\n\t\t\n\t\tboolean status = true;\n\t\tboolean status2 = false;\n\t\tString msg = \"\";\n\t\t\n\t\t//File filePK = new File(\"identity\");\n\t\n\t\ttry {\n\t\t\t\n\t\t\tmsg = br.readLine();\n\t\t\tGetTimestamp(\"Received Authorization Request from Client: \" + msg);\n\t\t\t\n\t\t\tJSONObject REQUEST = (JSONObject) parser.parse(msg);\n\t String identity = REQUEST.get(\"identity\").toString();\n\t\t\t\n\t\t\t\n\t if((identity.contains(\"aaron@krusty\"))) {\n\n\t \tGetTimestamp(\"Authorization Request from Client is approved: \");\n\n\t \tGetTimestamp(\"Client Publickey is stored: \" ) ;\n\n\t \tString tosend = encrypt1(getSharedKey(), getClientPublicKey());\n\n\t \tGetTimestamp(\"Server sharedkey is being encrypted with Client's publickey to be sent: \") ;\n\n\t \tJSONObject RESPONSE = new JSONObject();\n\t \tRESPONSE.put(\"command\",\"AUTH_RESPONSE\");\n\t \tRESPONSE.put(\"AES128\", tosend);\n\t \tRESPONSE.put(\"status\", status);\n\t \tRESPONSE.put(\"message\", \"public key found\");\n\n\t \tStringWriter out = new StringWriter();\n\t \tRESPONSE.writeJSONString(out);\n\n\t \tString AUTH_RESPONSE = out.toString();\n\t \tSystem.out.println(AUTH_RESPONSE);\n\n\t \tGetTimestamp(\"Sending Authorization Response to Client: \");\n\n\t \tpw.println(AUTH_RESPONSE);\n\t \tpw.flush();\n\n\n\n\t }\n\t else {\n\n\t \tSystem.out.println(\"Client \" + REQUEST.get(\"identity\") + \" has been rejected\");\n\n\t \tJSONObject RESPONSE = new JSONObject();\n\t \tRESPONSE.put(\"command\",\"AUTH_RESPONSE\");\n\t \tRESPONSE.put(\"status\", status2);\n\t \tRESPONSE.put(\"message\", \"public key not found\");\n\n\t \tStringWriter out = new StringWriter();\n\t \tRESPONSE.writeJSONString(out);\n\n\t \tString AUTH_RESPONSE = out.toString();\n\t \tSystem.out.println(AUTH_RESPONSE);\n\n\t \tpw.println(AUTH_RESPONSE);\n\t \tpw.flush();\n\n\t \tcloseConnection();\n\t }\n\t\t\t\t\n\t\t\t\n\t\t} catch (IOException ex) {\n\t\t\tLogger.getLogger(ServerTCP.class.getName()).log(Level.SEVERE, null, ex);\n\t\t}\n\t\tif (msg.equalsIgnoreCase(\"bye\")) {\n\t\t\tSystem.out.println(\"Client has signed out!\");\n\t\t\tcloseConnection();\n\n\t\t} else {\t\n\t\t\tgetMessage();\n\t\t}\n\t}", "public void receivedOkayMessage();", "public void printSuccess() {\n LOGGER.info(\"PACKMAN: Client connection success\");\n }", "public void send_setup()\n {\n out.println(\"chain_setup\");\n }", "public void run() {\n startTime = new Date();\n while(thread != null) {\n if(!isSetupCompleted) {\n setup();\n //out(\"[\" + comport.getName() + \"] setup completed, sending handshake.\");\n write(\"y\", false);\n isSetupCompleted = true;\n }\n }\n }", "@Override\n\tpublic void connectionSucceeded(String message) {\n\t}", "public void run() {\n // variables to store key HTTP(S) request information\n String sReadLine;\n boolean bNewHTTPHeader = true;\n String sHTTPMethod = \"\";\n String sHTTPRequest = \"\";\n boolean bPersistentConnection = true;\n\n // print the client IP:port\n System.out.println(\"client \" + connectedClient.getInetAddress() + \":\"\n + connectedClient.getPort() + \" is connected\");\n System.out.println();\n\n // create BufferedReader to read in from socket & DataOutputStream to send out to socket\n try {\n inFromClient = new BufferedReader(new InputStreamReader(connectedClient.getInputStream()));\n outToClient = new DataOutputStream(connectedClient.getOutputStream());\n\n } catch (IOException e) {\n System.out.println(\"There was an error setting up the buffered reader, \" +\n \"data stream, or reading from the client:\");\n System.out.println(\" \" + e);\n }\n\n // process the HTTP(S) request\n try {\n // break apart the input to read the http method and request\n while ((sReadLine = inFromClient.readLine()) != null) {\n // create a tokenizer to parse the string\n StringTokenizer tokenizer = new StringTokenizer(sReadLine);\n\n // if new HTTP header, then pull out the Method and Request (first line)\n if (bNewHTTPHeader) {\n sHTTPMethod = tokenizer.nextToken().toUpperCase(); // HTTP method: GET, HEAD\n sHTTPRequest = tokenizer.nextToken().toLowerCase(); // HTTP query: file path\n bNewHTTPHeader = false; // next lines are not part of a new HTTP header\n\n // print to console\n System.out.println(\"New HTTP Header:\");\n System.out.println(\" HTTP Method: \" + sHTTPMethod);\n System.out.println(\" HTTP Request: \" + sHTTPRequest);\n\n // not a new HTTP header: check for key params Connection or empty line\n } else if (sReadLine.length() > 0) {\n // get the next token in the input line\n String sParam = tokenizer.nextToken();\n\n // check to update connection status\n if (sParam.equalsIgnoreCase(\"Connection:\")) {\n String sConnectionRequest = tokenizer.nextToken();\n bPersistentConnection = (sConnectionRequest.equalsIgnoreCase(\"keep-alive\"));\n // print param to console\n System.out.println(\" param: \" + sParam + \" \" + sConnectionRequest);\n } else {\n // otherwise just print param to console\n System.out.println(\" param: \" + sParam);\n }\n\n // no more lines to header: header is over\n } else {\n //print to console\n System.out.println(\"End of Header\");\n System.out.println();\n\n // get the status code & response, then send back to client\n int iStatusCode = getStatusCode(sHTTPMethod, sHTTPRequest);\n String sResponse = getResponse(sHTTPMethod, sHTTPRequest, iStatusCode);\n sendResponse(sHTTPMethod, sHTTPRequest, iStatusCode, sResponse, bPersistentConnection);\n\n // next line is part of a new HTTP header\n bNewHTTPHeader = true;\n }\n }\n\n // loop has ended: client input is null (client must want to disconnect)\n this.connectedClient.close();\n System.out.println(\"input from client \" + connectedClient.getInetAddress() +\n + connectedClient.getPort() + \" is null. This socket closed.\");\n } catch (IOException e) {\n System.out.println(\"There was an error reading the HTTP request:\");\n System.out.println(\" \" + e);\n }\n }", "public void handle(HttpExchange h) throws IOException {\n String message = \"The server is running without any problem\"; //Message to be shown to client\n h.sendResponseHeaders(200, message.length());//response code and the length of message to be sent\n \n /*writes in the output stream, converts the message into array of bytes and closes the stream.*/\n OutputStream out = h.getResponseBody();\n out.write(message.getBytes());\n out.close();\n }", "public void getServerResponse() {\n\t\twhile (true) {\n\t\t\ttheMessage = readObject.readMessage();\n\t\t\tif (theMessage != null) {\n\t\t\t\tSystem.out.println(\"Server response is: \" + theMessage.getChoice());\n\t\t\t\tswitchBoard(theMessage.getChoice(), theMessage);\n\t\t\t}\n\t\t}\n\t}", "public void start() throws LoginFailedException {\n\t\ttry {\n\t\t\tServerSocket socket = new ServerSocket(0, 0, InetAddress.getByName(\"192.168.1.122\"));\n\t\t\tInetAddress address = socket.getInetAddress();\n\t\t\tint port = socket.getLocalPort();\n\n\t\t\t/* ServerSocket opened just to get free port */\n\t\t\tsocket.close();\n\n\t\t\tBindings bindings = new Bindings().addAddress(address);\n\t\t\tpeer = new PeerBuilderDHT(new PeerBuilder(new Number160(random)).bindings(bindings).ports(port).start()).start();\n\t\t\tSystem.out.println(\"Created peer with ID: \" + peer.peerID().toString());\n\n\t\t\t/* Specifies what to do when message is received */\n\t\t\tpeer.peer().objectDataReply(new ObjectDataReply() {\n\n\t\t\t\t@Override\n\t\t\t\tpublic Object reply(PeerAddress sender, Object request) throws Exception {\n\t\t\t\t\tif (request instanceof String) {\n\t\t\t\t\t\tString payload = (String) request;\n\t\t\t\t\t\tint notaryAndIDSeparatorIndex = payload.indexOf(\"_\");\n\t\t\t\t\t\tint idAndUsernameSeparatorIndex = payload.indexOf(\"_\", notaryAndIDSeparatorIndex+1);\n\t\t\t\t\t\tint usernameAndMessageSeparatorIndex = payload.lastIndexOf(\"_\");\n\t\t\t\t\t\tif (notaryAndIDSeparatorIndex > 0 && idAndUsernameSeparatorIndex > 0 && usernameAndMessageSeparatorIndex > 0) {\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tString notary = payload.substring(0, notaryAndIDSeparatorIndex);\n\t\t\t\t\t\t\t\tboolean isSigned = false;\n\t\t\t\t\t\t\t\tif(notary.compareTo(\"0\") == 0) {\n\t\t\t\t\t\t\t\t\tisSigned = false;\n\t\t\t\t\t\t\t\t} else if (notary.compareTo(\"1\") == 0) {\n\t\t\t\t\t\t\t\t\tisSigned = true;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tif(delegate != null) {\n\t\t\t\t\t\t\t\t\t\tdelegate.didReceiveMessage(null, null, null, P2PReceiveMessageError.INVALID_MESSAGE_FORMAT);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tString messageIDStr = payload.substring(notaryAndIDSeparatorIndex + 1, idAndUsernameSeparatorIndex);\n\t\t\t\t\t\t\t\tlong messageID = Long.parseLong(messageIDStr);\n\t\t\t\t\t\t\t\tString username = payload.substring(idAndUsernameSeparatorIndex+1, usernameAndMessageSeparatorIndex);\n\t\t\t\t\t\t\t\tString message = payload.substring(usernameAndMessageSeparatorIndex+1, payload.length());\n\n\t\t\t\t\t\t\t\tMessage messageObj = new Message();\n\t\t\t\t\t\t\t\tmessageObj.setMessage(message);\n\t\t\t\t\t\t\t\tmessageObj.setNotary(isSigned);\n\t\t\t\t\t\t\t\tContact contact = new Contact(username);\n\t\t\t\t\t\t\t\tMessageResult result = new MessageResult(messageID);\n\n\t\t\t\t\t\t\t\tFutureDirect ackMessage = peer.peer().sendDirect(sender).object(\"ack_\" + messageID).start();\n\t\t\t\t\t\t\t\tackMessage.addListener(new BaseFutureAdapter<FutureDirect>() {\n\n\t\t\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\t\t\tpublic void operationComplete(FutureDirect future) throws Exception {\n\t\t\t\t\t\t\t\t\t\tif (future.isSuccess()) {\n\t\t\t\t\t\t\t\t\t\t\tSystem.out.println(\"Successfully acknowledged incoming message!\");\n\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\tSystem.err.println(\"Failed to acknowledge incoming message!\");\n\t\t\t\t\t\t\t\t\t\t\tSystem.err.println(\"Reason is: \" + future.failedReason());\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\t\tif (delegate != null) {\n\t\t\t\t\t\t\t\t\tdelegate.didReceiveMessage(messageObj, contact, result, null);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} catch (NumberFormatException nfe) {\n\t\t\t\t\t\t\t\tSystem.err.println(\"Failed casting message ID to long!\");\n\t\t\t\t\t\t\t\tnfe.printStackTrace();\n\n\t\t\t\t\t\t\t\tif (delegate != null) {\n\t\t\t\t\t\t\t\t\tdelegate.didReceiveMessage(null, null, null, P2PReceiveMessageError.INVALID_MESSAGE_FORMAT);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else if (payload.startsWith(\"ack\") && payload.indexOf(\"_\") > 0) {\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tString messageIDStr = payload.substring(payload.indexOf(\"_\")+1, payload.length());\n\t\t\t\t\t\t\t\tlong messageID = Long.parseLong(messageIDStr);\n\t\t\t\t\t\t\t\tMessageResult result = new MessageResult(messageID);\n\t\t\t\t\t\t\t\tif (delegate != null) {\n\t\t\t\t\t\t\t\t\tdelegate.didReceiveAck(result, null);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} catch (NumberFormatException nfe) {\n\t\t\t\t\t\t\t\tSystem.err.println(\"Failed casting message ID to long!\");\n\t\t\t\t\t\t\t\tnfe.printStackTrace();\n\n\t\t\t\t\t\t\t\tif (delegate != null) {\n\t\t\t\t\t\t\t\t\tdelegate.didReceiveAck(null, P2PReceiveMessageError.INVALID_MESSAGE_FORMAT);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else if(payload.compareTo(\"ping\") == 0) {\n\t\t\t\t\t\t\tFutureDirect pingACKMessage = peer.peer().sendDirect(sender).object(\"pingACK_\" + peerInfo.getUsername()).start();\n\t\t\t\t\t\t\tpingACKMessage.addListener(new BaseFutureAdapter<FutureDirect>() {\n\n\t\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\t\tpublic void operationComplete(FutureDirect future) throws Exception {\n\t\t\t\t\t\t\t\t\tif (future.isFailed()) {\n\t\t\t\t\t\t\t\t\t\tSystem.err.println(\"Failed to send ping ACK!\");\n\t\t\t\t\t\t\t\t\t\tSystem.err.println(\"Reason is: \" + future.failedReason());\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\tSystem.out.println(\"Successfully sent ping ACK message!\");\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t} else if(payload.startsWith(\"pingACK_\")) {\n\t\t\t\t\t\t\tString username = payload.substring(payload.indexOf(\"_\") + 1, payload.length());\n\t\t\t\t\t\t\tContact contact = new Contact(username);\n\t\t\t\t\t\t\tif (delegate != null) {\n\t\t\t\t\t\t\t\tdelegate.didUpdateOnlineStatus(contact, true, null);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tif (delegate != null) {\n\t\t\t\t\t\t\t\tdelegate.didReceiveMessage(null, null, null, P2PReceiveMessageError.INVALID_MESSAGE_FORMAT);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (delegate != null) {\n\t\t\t\t\t\t\t delegate.didReceiveMessage(null, null, null, P2PReceiveMessageError.INVALID_MESSAGE_FORMAT);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tpeerInfo.setInetAddress(address);\n\t\t\tpeerInfo.setPort(port);\n\t\t\tpeerInfo.setPeerAddress(peer.peerAddress());\n\n\t\t\tSystem.out.println(\"Client peer started on IP \" + address + \" on port \" + port);\n\t\t\tSystem.out.println(\"Bootstrapping peer...\");\n\t\t\tbootstrap();\n\t\t} catch (IOException ie) {\n\t\t\tie.printStackTrace();\n\n\t\t\tif (delegate != null) {\n\t\t\t\tdelegate.didLogin(null, P2PLoginError.SOCKET_OPEN_ERROR);\n\t\t\t}\n\t\t}\n\t}", "private byte[] sendServerCoded(byte[] message) { \n\t\tbyte[] toPayload = SecureMethods.preparePayload(username.getBytes(), message, counter, sessionKey, simMode);\n\t\tbyte[] fromPayload = sendServer(toPayload, false);\n\n\t\tbyte[] response = new byte[0];\n\t\tif (checkError(fromPayload)) {\n\t\t\tresponse = \"error\".getBytes();\n\t\t} else {\n\t\t\tresponse = SecureMethods.processPayload(\"SecretServer\".getBytes(), fromPayload, counter+1, sessionKey, simMode);\n\t\t}\n\t\tcounter = counter + 2;\n\t\treturn response;\n\t}", "@Override\r\n public void connectSuccess() {\n super.connectSuccess();\r\n }", "@Override\n\tpublic void run() {\n\t\tPrintWriter out;\n\t\ttry {\n\t\t\tout = new PrintWriter(s.getOutputStream());\n\t\t\tout.print(\"HTTP/1.1 200 Ok\\n\\r\"+ \n\"Server: nginx/1.8.0\\n\\r\"+\n\"Date: Mon, 07 Dec 2015 09:11:39 GMT\\n\\r\"+ \n\"Content-Type: text/html\\n\\r\"+\n\"Connection: close\\n\\r\\n\\r\"+\n\"<html>\"+ \n\"<head><title>Test ok</title></head>\"+\n\"<body bgcolor=\\\"white\\\"> \"+\n\"<center><h1>HELLO</h1></center>\"+ \n\"</body>\"+\n\"</html>\"); \n\t\t\tout.close();\n\t\t\ts.close();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\n\n\t\n\t\t\n\t}", "private void establishedHandle(FullExtTcpPacket packet) {\n if (packet.isSYN()) {\n // Re-receive the ACK+SYN, means that the receiver has not received the final ACK\n // So we re-send the ACK of the three-way handshake\n handleDataPacket(packet);\n } else if (packet.isACK()) {\n handleAcknowledgment(packet);\n } else {\n handleDataPacket(packet);\n }\n }", "@Test\n public void serverPingsClientHttp2() throws Exception {\n peer.sendFrame().settings(new Settings());\n peer.acceptFrame();// ACK\n\n peer.sendFrame().ping(false, 2, 3);\n peer.acceptFrame();// PING\n\n peer.play();\n // play it back\n connect(peer);\n // verify the peer received what was expected\n MockHttp2Peer.InFrame ping = peer.takeFrame();\n Assert.assertEquals(TYPE_PING, ping.type);\n Assert.assertEquals(0, ping.streamId);\n Assert.assertEquals(2, ping.payload1);\n Assert.assertEquals(3, ping.payload2);\n Assert.assertTrue(ping.ack);\n }", "@Override\n public List<ByteBuffer> readBuffers() throws IOException {\n HandshakeResponse response = new HandshakeResponse();\n response.match = HandshakeMatch.BOTH;\n ByteBufferOutputStream bbo = new ByteBufferOutputStream();\n Encoder out = new BinaryEncoder(bbo);\n SpecificDatumWriter<HandshakeResponse> handshakeWriter =\n new SpecificDatumWriter<HandshakeResponse>(HandshakeResponse.class);\n handshakeWriter.write(response, out);\n META_WRITER.write(new HashMap<Utf8, ByteBuffer>(), out);\n out.writeBoolean(false);\n return bbo.getBufferList();\n }", "public MSSHandshakeResp send(final MSSHandshakeReq req, final LavercaContext context) throws IOException {\n if (req == null) throw new IllegalArgumentException (\"Unable to send null HandshakeReq\");\n return (MSSHandshakeResp)this.sendMat(req, context);\n }", "@Override\n public void afterConnectionEstablished(WebSocketSession session) throws Exception {\n sessionMap.put(session.getId(), session);\n // Let's send the first message\n session.sendMessage(new TextMessage(\"You are now connected to the server. This is the first message.\"));\n }", "private void runSmpl() throws GeneralSecurityException, IOException {\n WpcCrtChn chn = getChn(); // Request the WPC Certificate Chain\n ByteBuffer msg = getAth(); // Create CHALLENGE request\n byte[] res = sndAth(msg); // Send the CHALLENGE Request message\n byte[] dig = WpcAthRsp.getSigDig(chn.getDig(), msg.array(), res); // Get the Digest for the challenge\n byte[] sig = Arrays.copyOfRange(res, WpcAthRsp.LEN_ATH, res.length); // Get the signature from the CHALLENGE_AUTH Response\n verify(dig, sig, chn.getPu()); // Verify the signature\n }", "public void sendResponse(){\n\n //DropItPacket dropPkt = new DropItPacket(Constants.PONG.toString());\n // Send out a dropit Packet\n Channel channel = e.getChannel();\n ChannelFuture channelFuture = Channels.future(e.getChannel());\n ChannelEvent responseEvent = new DownstreamMessageEvent(channel, channelFuture, packet, channel.getRemoteAddress());\n// System.out.println(\"===== sending to\" + channel.getRemoteAddress().toString());\n try{\n ctx.sendDownstream(responseEvent);\n }catch (Exception ex){\n System.out.println(\"Node: \" + fileServer.getNode().getPort() + \" sending to\"+\n channel.getRemoteAddress().toString() +\"failed! \" + ex.toString());\n }\n }", "@Test\n public void close() throws Exception {\n peer.sendFrame().settings(new Settings());\n peer.acceptFrame();// ACK\n\n peer.acceptFrame();// SYN_STREAM\n\n peer.acceptFrame();// GOAWAY\n\n peer.acceptFrame();// RST_STREAM\n\n peer.play();\n // play it back\n Http2Connection connection = connect(peer);\n Http2Stream stream = connection.newStream(TestUtil.headerEntries(\"a\", \"android\"), false);\n Assert.assertEquals(1, connection.openStreamCount());\n connection.close();\n Assert.assertEquals(0, connection.openStreamCount());\n try {\n connection.newStream(TestUtil.headerEntries(\"b\", \"banana\"), false);\n Assert.fail();\n } catch (ConnectionShutdownException expected) {\n }\n BufferedSink sink = Okio.buffer(stream.getSink());\n try {\n sink.writeByte(0);\n sink.flush();\n Assert.fail();\n } catch (IOException expected) {\n Assert.assertEquals(\"stream finished\", expected.getMessage());\n }\n try {\n stream.getSource().read(new Buffer(), 1);\n Assert.fail();\n } catch (IOException expected) {\n Assert.assertEquals(\"stream was reset: CANCEL\", expected.getMessage());\n }\n // verify the peer received what was expected\n MockHttp2Peer.InFrame synStream = peer.takeFrame();\n Assert.assertEquals(TYPE_HEADERS, synStream.type);\n MockHttp2Peer.InFrame goaway = peer.takeFrame();\n Assert.assertEquals(TYPE_GOAWAY, goaway.type);\n MockHttp2Peer.InFrame rstStream = peer.takeFrame();\n Assert.assertEquals(TYPE_RST_STREAM, rstStream.type);\n Assert.assertEquals(3, rstStream.streamId);\n }", "public void send() {\n try {\n String message = _gson.toJson(this);\n byte[] bytes = message.getBytes(\"UTF-8\");\n int length = bytes.length;\n\n _out.writeInt(length);\n _out.write(bytes);\n \n } catch (IOException ex) {\n Logger.getLogger(ResponseMessage.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "@Test\n public void serverPingsClient() throws Exception {\n peer.sendFrame().settings(new Settings());\n peer.acceptFrame();// ACK\n\n peer.sendFrame().ping(false, 2, 0);\n peer.acceptFrame();// PING\n\n peer.play();\n // play it back\n connect(peer);\n // verify the peer received what was expected\n MockHttp2Peer.InFrame ping = peer.takeFrame();\n Assert.assertEquals(0, ping.streamId);\n Assert.assertEquals(2, ping.payload1);\n Assert.assertEquals(0, ping.payload2);\n Assert.assertTrue(ping.ack);\n }", "@Test\n public void getResponseHeadersTimesOut() throws Exception {\n peer.sendFrame().settings(new Settings());\n peer.acceptFrame();// ACK\n\n peer.acceptFrame();// SYN_STREAM\n\n peer.acceptFrame();// RST_STREAM\n\n peer.play();\n // play it back\n Http2Connection connection = connect(peer);\n Http2Stream stream = connection.newStream(TestUtil.headerEntries(\"b\", \"banana\"), false);\n stream.readTimeout().timeout(500, TimeUnit.MILLISECONDS);\n long startNanos = System.nanoTime();\n try {\n stream.takeHeaders();\n Assert.fail();\n } catch (InterruptedIOException expected) {\n }\n long elapsedNanos = (System.nanoTime()) - startNanos;\n awaitWatchdogIdle();\n /* 200ms delta */\n Assert.assertEquals(500.0, TimeUnit.NANOSECONDS.toMillis(elapsedNanos), 200.0);\n Assert.assertEquals(0, connection.openStreamCount());\n // verify the peer received what was expected\n Assert.assertEquals(TYPE_HEADERS, peer.takeFrame().type);\n Assert.assertEquals(TYPE_RST_STREAM, peer.takeFrame().type);\n }", "public void initialize(Properties requestHeaders, HandshakeResponder responder, int timeout) throws IOException, NoGnutellaOkException,\n BadHandshakeException {\n if (isOutgoing()) {\n setSocket(socketsManager.connect(new InetSocketAddress(getAddress(), getPort()), timeout, getConnectType()));\n }\n \n initializeHandshake();\n \n Handshaker shaker = createHandshaker(requestHeaders, responder);\n try {\n shaker.shake();\n } catch (NoGnutellaOkException e) {\n setHeaders(shaker.getReadHeaders(), shaker.getWrittenHeaders());\n close();\n throw e;\n } catch (IOException e) {\n setHeaders(shaker.getReadHeaders(), shaker.getWrittenHeaders());\n close();\n throw new BadHandshakeException(e);\n }\n\n handshakeInitialized(shaker);\n\n // wrap the streams with inflater/deflater\n // These calls must be delayed until absolutely necessary (here)\n // because the native construction for Deflater & Inflater\n // allocate buffers outside of Java's memory heap, preventing\n // Java from fully knowing when/how to GC. The call to end()\n // (done explicitly in the close() method of this class, and\n // implicitly in the finalization of the Deflater & Inflater)\n // releases these buffers.\n if (isWriteDeflated()) {\n _deflater = new Deflater();\n _out = new CompressingOutputStream(_out, _deflater);\n }\n\n if (isReadDeflated()) {\n _inflater = new Inflater();\n _in = new UncompressingInputStream(_in, _inflater);\n }\n \n getConnectionBandwidthStatistics().setCompressionOption(isWriteDeflated(), isReadDeflated(), new CompressionBandwidthTrackerImpl(_inflater, _deflater));\n }", "@Override\n public void channelConnected(ChannelHandlerContext ctx, ChannelStateEvent e) {\n final Channel ch = e.getChannel();\n ChannelBuffer headerBuffer = ChannelBuffers.buffer(header.length());\n headerBuffer.writeBytes(header.getBytes());\n ChannelFuture f = ch.write(headerBuffer);\n f.addListener(ChannelFutureListener.CLOSE_ON_FAILURE);\n channelAtomicReference.set(ch);\n log.info(\"Input Stream {} : Channel Connected. Sent Header : {}\", name, header);\n }", "@Test\n public void remoteDoubleSynReply() throws Exception {\n peer.sendFrame().settings(new Settings());\n peer.acceptFrame();// ACK\n\n peer.acceptFrame();// SYN_STREAM\n\n peer.sendFrame().headers(false, 3, TestUtil.headerEntries(\"a\", \"android\"));\n peer.acceptFrame();// PING\n\n peer.sendFrame().headers(false, 3, TestUtil.headerEntries(\"b\", \"banana\"));\n peer.sendFrame().ping(true, 1, 0);\n peer.play();\n // play it back\n Http2Connection connection = connect(peer);\n Http2Stream stream = connection.newStream(TestUtil.headerEntries(\"c\", \"cola\"), false);\n Assert.assertEquals(Headers.of(\"a\", \"android\"), stream.takeHeaders());\n connection.writePingAndAwaitPong();// Ensure that the 2nd SYN REPLY has been received.\n\n // verify the peer received what was expected\n MockHttp2Peer.InFrame synStream = peer.takeFrame();\n Assert.assertEquals(TYPE_HEADERS, synStream.type);\n MockHttp2Peer.InFrame ping = peer.takeFrame();\n Assert.assertEquals(TYPE_PING, ping.type);\n }", "public void run() {\n req.response().end(\"0\"); // Default response = 0\n }", "private void startPlaintextUpgrade(final Http2Codec http2Codec) {\n // Register the plaintext upgrader\n Http2ClientUpgradeCodec upgradeCodec = new Http2ClientUpgradeCodec(http2Codec);\n HttpClientCodec httpClientCodec = new HttpClientCodec();\n final HttpClientUpgradeHandler upgrader = new HttpClientUpgradeHandler(httpClientCodec,\n upgradeCodec, 1000);\n final UpgradeCompletionHandler completionHandler = new UpgradeCompletionHandler();\n\n Channel channel = connect(new ChannelInitializer<SocketChannel>() {\n @Override\n public void initChannel(SocketChannel ch) throws Exception {\n ch.pipeline().addLast(upgrader);\n ch.pipeline().addLast(completionHandler);\n }\n });\n\n try {\n // Trigger the HTTP/1.1 plaintext upgrade protocol by issuing an HTTP request\n // which causes the upgrade headers to be added\n Promise<Void> upgradePromise = completionHandler.getUpgradePromise();\n DefaultHttpRequest upgradeTrigger =\n new DefaultHttpRequest(HttpVersion.HTTP_1_1, HttpMethod.GET, \"/\");\n channel.writeAndFlush(upgradeTrigger);\n // Wait for the upgrade to complete\n upgradePromise.get(5, TimeUnit.SECONDS);\n } catch (Exception e) {\n // Attempt to close the channel before propagating the error\n channel.close();\n throw new IllegalStateException(\"Error waiting for plaintext protocol upgrade\", e);\n }\n }", "public FutureResult sendToServer(String onTheWireFormat) throws IOException;", "@Test\n public void clientPingsServer() throws Exception {\n peer.sendFrame().settings(new Settings());\n peer.acceptFrame();// ACK\n\n peer.acceptFrame();// PING\n\n peer.sendFrame().ping(true, 1, 5);\n peer.play();\n // play it back\n Http2Connection connection = connect(peer);\n long pingAtNanos = System.nanoTime();\n connection.writePingAndAwaitPong();\n long elapsedNanos = (System.nanoTime()) - pingAtNanos;\n Assert.assertTrue((elapsedNanos > 0));\n Assert.assertTrue((elapsedNanos < (TimeUnit.SECONDS.toNanos(1))));\n // verify the peer received what was expected\n MockHttp2Peer.InFrame pingFrame = peer.takeFrame();\n Assert.assertEquals(TYPE_PING, pingFrame.type);\n Assert.assertEquals(0, pingFrame.streamId);\n Assert.assertEquals(1330343787, pingFrame.payload1);// OkOk\n\n Assert.assertEquals(-257978967, pingFrame.payload2);// donut\n\n Assert.assertFalse(pingFrame.ack);\n }", "public void OnConnectSuccess();" ]
[ "0.703378", "0.7028544", "0.6812075", "0.67717236", "0.66614294", "0.6559981", "0.64989734", "0.64860797", "0.64849865", "0.64720577", "0.64223045", "0.63884944", "0.6213776", "0.61869043", "0.61115134", "0.60917276", "0.6084625", "0.60642415", "0.605083", "0.5983558", "0.5965821", "0.59329116", "0.5918262", "0.5859275", "0.5850405", "0.5847064", "0.5806644", "0.5734965", "0.57331055", "0.5723903", "0.571697", "0.57161194", "0.57054514", "0.5676278", "0.5629666", "0.56081545", "0.55699956", "0.5568846", "0.5559444", "0.5549078", "0.55287546", "0.55077296", "0.54888976", "0.5480168", "0.5463909", "0.54597414", "0.5433807", "0.5431148", "0.54066074", "0.5405318", "0.54026437", "0.53795713", "0.5366014", "0.5356582", "0.535123", "0.5322157", "0.5317143", "0.53095406", "0.5304679", "0.5272759", "0.5257589", "0.5256433", "0.52393925", "0.5236442", "0.5210603", "0.5209126", "0.52081907", "0.5192517", "0.5187981", "0.5180062", "0.51592445", "0.51567584", "0.514661", "0.51258177", "0.51189566", "0.5106721", "0.5086021", "0.5078682", "0.50770825", "0.5076533", "0.5074567", "0.50683314", "0.50553536", "0.5054616", "0.50526524", "0.50512975", "0.50492877", "0.50408643", "0.50404406", "0.5039082", "0.50368196", "0.5031428", "0.50308204", "0.5030466", "0.5029843", "0.5018092", "0.50150853", "0.5007879", "0.5005836", "0.5003796" ]
0.5630193
34
This method sends the data reception complete message
private void sendDataReceptionCompleteMessage(SelectionKey key, byte[] data) throws IOException { SocketChannel channel = (SocketChannel)key.channel(); byte[] ackData = new byte[4]; ackData[0]=00; ackData[1]=00; ackData[2]=00; ackData[3]=data[9]; //bPacketRec[0]; ByteBuffer bSend = ByteBuffer.allocate(ackData.length); bSend.clear(); bSend.put(ackData); bSend.flip(); while (bSend.hasRemaining()) { try { channel.write(bSend); } catch (IOException e) { throw new IOException("Could not send Data Reception Acknowledgement"); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void sendRemainData();", "public void onDataReceived( final List<Byte> data) {\r\n\r\n /* accumulate chars in partial string, until sequence 0xFF-0xFF is found */\r\n for (int i = 0; i < data.size(); i++) {\r\n _partialMessage.add( data.get(i));\r\n\r\n if (data.get(i) == Protocol.TERMINATOR) {\r\n ++ _terminatorCounter;\r\n } else {\r\n _terminatorCounter = 0;\r\n }\r\n\r\n if (_terminatorCounter == Protocol.TERMINATOR_SEQUENCE_SIZE) {\r\n parseCompleteReqMessage();\r\n\r\n _partialMessage.clear();\r\n _terminatorCounter = 0;\r\n }\r\n }\r\n\r\n }", "private void sendReceiveRes(){\n\t}", "@Override\n public void onCompleted() {\n System.out.println(\"Server has completed sending us response\");\n // on completed will be called right after onNext\n // Whenever server is done sending data latch is going down by 1\n latch.countDown();\n }", "public void startData()\n\t\t\t{\n\t\t\t\tsend(\"<data>\", false);\n\t\t\t}", "public void completeData();", "@Override\n public void doDataReceived(ResourceDataMessage dataMessage) {\n if(outputStream == null) return;\n if(startTime == 0) startTime = System.nanoTime();\n if (this.getTunnel() == null)\n this.setTunnel(dataMessage.getNetworkMessage().getTunnel());\n\n EventManager.callEvent(new ResourceTransferDataReceivedEvent(this, dataMessage));\n\n try {\n if (dataMessage.getResourceData().length != 0) {\n //Saving received chunks\n byte[] chunk = dataMessage.getResourceData();\n written += chunk.length;\n double speedInMBps = NANOS_PER_SECOND / BYTES_PER_MIB * written / (System.nanoTime() - startTime + 1);\n System.out.println();\n logger.info(\"Receiving file: {} | {}% ({}MB/s)\", this.getResource().attributes.get(1), ((float) written / (float) fileLength) * 100f, speedInMBps);\n\n //add to 4mb buffer\n System.arraycopy(chunk, 0, buffer, saved, chunk.length);\n saved += chunk.length;\n if (buffer.length - saved < BUFFER_SIZE || written >= fileLength) {\n //save and clear buffer\n outputStream.write(buffer, 0, saved);\n saved = 0;\n }\n\n\n if (written >= fileLength) {\n this.close();\n }\n } else {\n //Empty chunk, ending the transfer and closing the file.\n logger.info(\"Empty chunk received for: {}, ending the transfer...\", this.getResource().attributes.get(1));\n\n //File fully received.\n this.close();\n }\n } catch (Exception e) {\n callError(e);\n }\n }", "@Override\n public void onReceivedData(byte[] arg0) {\n try {\n ultimoDadoRecebido = ultimoDadoRecebido + new String(arg0, \"UTF-8\");\n } catch (UnsupportedEncodingException e) {\n e.printStackTrace();\n }\n }", "private void receive() {\n\t\t\ttry{\n\t\t\t\twhile(true){\n\t\t\t\t\tsuper.store(generateSimulateData());\n\t\t\t\t\tSystem.out.println(\"模拟接收数据\");\n\t\t\t\t\tThread.sleep(10000);\n\t\t\t\t}\n\t\t\t}catch(Exception ex){\n\t\t\t\tex.printStackTrace();\n\t\t\t}\n\t }", "private void updateReceivedData(byte[] data) {\n }", "private void sendData() {\n\n Thread update = new Thread() {\n public void run() {\n while (opModeIsActive() && (tfod != null)) {\n path.updateTFODData(recognize());\n path.updateHeading();\n try {\n Thread.sleep(500);\n } catch (Exception e) {\n }\n if (isStopRequested() && tfod != null)\n tfod.shutdown();\n }\n }\n };\n update.start();\n }", "public void onDataRecieved(byte data[]);", "public void receiveData() throws IOException;", "public void endData()\n\t\t\t{\n\t\t\t\tsend(\"</data>\", false);\n\t\t\t}", "public void onDataReceived(byte[] data, String message) {\n }", "public void sendDone()\n\t{\n\t\tmSendBusy = false;\n\t\tStatistics.numPacketsSent++;\n\t\tmWriteHandler.call(mHandlerArg);\n\t}", "@Override\r\n\tpublic void newLineRecieved() {\n\t\tString response = grblPort.readNextLine();\r\n\t\tresponse.trim();\r\n\t\tSystem.out.println(\"Recieve: \" + response);\r\n\t\t//System.out.println(\"HAHAHAH\");\r\n\t\tif (response.contains(\"ok\") && grblPort.ok == false){\t\t\t\r\n\t\t\tgrblPort.ok = true;\t\t\r\n\t\t\tSystem.out.println(\"Got ACK\");\r\n\t\t\tif (!sendLines.isEmpty()){//If there is more stuff in the buffer, keep on sending it.\r\n\t\t\t\tsendLines.remove(0);\r\n\t\t\t\tgrblPort.sendDataLine(sendLines.get(0)); \t\t\r\n\t \t}\r\n\t\t}\r\n\t\tif (response.contains(\"error\")){\r\n\t\t\tSystem.out.println(\"ERROR...ERROR...ERROR...ERROR...ERROR...ERROR...ERROR...ERROR...ERROR\");\r\n\t\t\tgrblPort.sendDataLine(sendLines.get(0)); \r\n\t\t}\r\n\t\tif (response.contains(\"<\")&&response.contains(\">\")){\r\n\t\t\tif (!sendLines.isEmpty()){//If there is more stuff in the buffer, keep on sending it.\r\n\t\t\t//\tgrblPort.sendDataLine(sendLines.remove(0)); \t\t\r\n\t \t}\r\n\t\t\tresponse = response.replaceAll(\"<\", \"\");\r\n\t\t\tresponse = response.replaceAll(\">\", \"\");\r\n\t\t\tString data[] = response.split(\",\");\r\n\t\t\tfor (String string : data) {\r\n\t\t\t\tstring = string.toUpperCase();\r\n\t\t\t}\r\n\t\t\tSystem.out.println(\"************************************* \"+data[0]);\r\n\t\t\tswitch (data[0].toUpperCase()) {\r\n\t\t\tcase \"IDLE\":\r\n\t\t\t\tmachineState = MachineState.IDLE;\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"RUN\":\r\n\t\t\t\tmachineState = MachineState.RUNNING;\r\n\t\t\t\treturn;\r\n\t\t\t\t//break;\r\n\t\t\tcase \"QUEUE\":\r\n\t\t\t\tmachineState = MachineState.QUEUE;\r\n\t\t\t\treturn;\r\n\t\t\tdefault:\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t}", "void sendFinishMessage();", "@Override\r\n public void onReceivedData(byte[] arg0) {\r\n dataManager.onReceivedData(arg0);\r\n }", "private void recieveData() throws IOException, InterruptedException {\n String senderIP= JOptionPane.showInputDialog(WED_ZERO.lang.getInstruct().get(1)[17]);\n if(senderIP==null) {\n ERROR.ERROR_359(Launch.frame);\n return;\n }\n JOptionPane.showMessageDialog(Launch.frame, WED_ZERO.lang.getInstruct().get(1)[18]);\n Networking net=new Networking(true);\n net.setIPAddress(senderIP);\n String to=net.initClient();\n int res = JOptionPane.showConfirmDialog(null, WED_ZERO.lang.getInstruct().get(1)[19]+\" \"\n +to+\".\", WED_ZERO.lang.getInstruct().get(1)[12],\n JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE); \n if(res==JOptionPane.NO_OPTION||res==JOptionPane.CANCEL_OPTION) {\n return;\n }\n Map<Integer, ArrayList<String>> data=new HashMap<Integer, ArrayList<String>>();\n ArrayList<String> folderName=new ArrayList();\n net.transferData_RECIEVE(folderName, data);\n this.processNewData(data, folderName);\n \n }", "private static void sendDataMessage() {\r\n\t\tSystem.out.println(\"CLIENT: \" + \" \" + \"DataMessage sent.\");\r\n\t\t\r\n\t\tbyte[] blockNumberAsByteArray = helper.intToByteArray(blockNumberSending);\r\n\t\tsplitUserInput = helper.divideArray(userInputByteArray);\r\n\r\n\t\tsendData = message.dataMessage(blockNumberAsByteArray, splitUserInput[sendingPackageNumber]);\r\n\t\tsendingPackageNumber++;\r\n\t\tblockNumberSending++; // blocknumber that is given to the next message to be transmitted\r\n\r\n\t\t// trims the message (removes empty bytes), so the last message can be detected\r\n\t\ttrimmedSendData = helper.trim(sendData);\r\n\r\n\t\tsendDataMessage = new DatagramPacket(trimmedSendData, trimmedSendData.length, ipAddress, SERVER_PORT);\r\n\t\ttry {\r\n\t\t\tclientSocket.send(sendDataMessage);\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\r\n\t\tackNeeded = true;\r\n\r\n\t\tif (trimmedSendData.length < 516) {\r\n\t\t\tlastPackage = true;\r\n\t\t}\r\n\t}", "void sendData(String msg) throws IOException\n {\n if ( msg.length() == 0 ) return;\n//\n msg += \"\\n\";\n// Log.d(msg, msg);\n if (outputStream != null)\n outputStream.write(msg.getBytes());\n// myLabel.setText(\"Data Sent\");\n// myTextbox.setText(\" \");\n }", "@Override\n public void run() {\n transmit_set();\n }", "public void afterReceive() {\n\t}", "@Override\n public void payload(byte[] data) {\n \tmLastMessage.append(new String(data));\n Log.d(TAG, \"Payload received: \" + data);\n }", "@Override\n\tpublic void complete(ReceiveResponseBean receiveResponseBean) {\n\n\t}", "public void send() {\n try {\n String message = _gson.toJson(this);\n byte[] bytes = message.getBytes(\"UTF-8\");\n int length = bytes.length;\n\n _out.writeInt(length);\n _out.write(bytes);\n \n } catch (IOException ex) {\n Logger.getLogger(ResponseMessage.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "private void sendData() throws DataProcessingException, IOException {\n Data cepstrum = null;\n do {\n cepstrum = frontend.getData();\n if (cepstrum != null) {\n if (!inUtterance) {\n if (cepstrum instanceof DataStartSignal) {\n inUtterance = true;\n dataWriter.writeDouble(Double.MAX_VALUE);\n dataWriter.flush();\n } else {\n throw new IllegalStateException\n (\"No DataStartSignal read\");\n }\n } else {\n if (cepstrum instanceof DoubleData) {\n // send the cepstrum data\n double[] data = ((DoubleData) cepstrum).getValues();\n for (double val : data) {\n dataWriter.writeDouble(val);\n }\n } else if (cepstrum instanceof DataEndSignal) {\n // send a DataEndSignal\n dataWriter.writeDouble(Double.MIN_VALUE);\n inUtterance = false;\n } else if (cepstrum instanceof DataStartSignal) {\n throw new IllegalStateException\n (\"Too many DataStartSignals.\");\n }\n dataWriter.flush();\n }\n }\n } while (cepstrum != null);\n }", "public void waitForData() {\n waitForData(1);\n }", "@Override\n\tpublic void sendData(CharSequence data) {\n\t\t\n\t}", "private void sendData() {\n final ByteBuf data = Unpooled.buffer();\n data.writeShort(input);\n data.writeShort(output);\n getCasing().sendData(getFace(), data, DATA_TYPE_UPDATE);\n }", "@Override\n public void onReceivedData(byte[] arg0) {\n String data = null;\n try {\n data = new String(arg0, \"UTF-8\");\n createMsg(data.trim());\n tvAppend(txtResponse, data);\n } catch (UnsupportedEncodingException e) {\n e.printStackTrace();\n }\n }", "@Override\n\tpublic void run() {\n\t\tdispBlocks();\n\t\tsendData();\n\t}", "@Override\n public void run() {\n byte[] buffer = new byte[1024];\n int bytes;\n while (true) {\n try {\n\n bytes = inputStream.read(buffer);\n String data = new String(buffer, 0, bytes);\n handler.obtainMessage(MainActivityFreeEX.DATA_RECEIVED, data).sendToTarget();\n\n Log.i(this.toString(), \"en el run de Connection: \" + handler.obtainMessage(MainActivityFreeEX.DATA_RECEIVED, data).toString());\n\n\n } catch (IOException e) {\n break;\n }\n }\n }", "@Override\n\tpublic void SendAndReceiveData() throws APIException \n\t{\n\t\tfor (Listener listen : listeners1)\n\t\t\tlisten.beforeSendAndReceiveData();\n\t\ttry\n\t\t{\n\t\t\tapi.SendAndReceiveData();\n\t\t}\n\t\tcatch(APIException e)\n\t\t{\n\t\t\tfor (Listener listen : listeners1)\n\t\t\t\tlisten.onError(e);\n\t\t\tthrow new APIException(e);\n\t\t}\n\t\tfor (Listener listen : listeners1)\n\t\t\tlisten.afterSendAndReceiveData();\n\t}", "@Override\n public void dataAvailable(byte[] data, Connection ignoreMe) {\n // Now get the data, and send it back to the listener.\n try {\n disconnect(ignoreMe);\n Message message = NonblockingResolver.parseMessage(data);\n\n if (message != null && LOG.isTraceEnabled()) {\n LOG.trace(\"dataAvailable(\" + data.length + \" bytes)\");\n LOG.trace(message);\n }\n\n NonblockingResolver.verifyTSIG(query, message, data, tsig);\n // Now check that we got the whole message, if we're asked to do so\n if (!tcp && !ignoreTruncation\n && message.getHeader().getFlag(Flags.TC)) {\n // Redo the query, but use tcp this time.\n tcp = true;\n // Now start again with a TCP connection\n startConnect();\n return;\n }\n if (query.getHeader().getID() != message.getHeader().getID()) {\n// System.out.println(\"Query wrong id! Expected \" + query.getHeader().getID() + \" but got \" + message.getHeader().getID());\n return;\n }\n returnResponse(message);\n } catch (IOException e) {\n returnException(e, null);\n }\n }", "private void data(Messenger replyTo, int encoderId, Bundle data) {\n\n // obtain new message\n Message message = obtainMessage(Geotracer.MESSAGE_TYPE_DATA, encoderId, 0);\n message.setData(data);\n\n // send response\n send(replyTo, message);\n }", "@Override\n public void onCompleted() {\n builder.setMessage(\"All request data received completely!\");\n responseObserver.onNext(builder.build());\n responseObserver.onCompleted();\n }", "@Override\n\tpublic void onSendChatDone(byte arg0) {\n\t\t\n\t}", "public void endTransmission()\n\t\t\t{\n\t\t\t\t//Send close of transmission\n\t\t\t\tsend(\"</transmission>\", false);\n\t\t\t\t\n\t\t\t\t//Set connected to false so that server does not keep listening on this conn\n\t\t\t\tconnected = false;\n\t\t\t\ttry {\n\t\t\t\t\toutput.flush();\n\t\t\t\t\toutput.close();\n\t\t\t\t\tinput.close();\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t\t/**\n\t\t\t\ttry {\n\t\t\t\t\tinput.close();\n\t\t\t\t\toutput.close();\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t} */\n\t\t\t\t\n\t\t\t}", "@Override\n\tpublic void dataArrived() {\n\t\tnewSkillGetHandler.sendEmptyMessage(0);\n\t\tprogressDialog.dismiss();\n\t}", "void beginSendData(){\n stopSendThread = false;\n final Thread thread = new Thread(new Runnable() {\n\n public void run() {\n while(!Thread.currentThread().isInterrupted() && !stopSendThread){\n try{\n try {\n Thread.currentThread().sleep(100);\n\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n String string = \":1\" + (char)speedLeft + (char)speedRight + \"@\";\n try {\n os.write(string.getBytes());\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n } catch (Exception e){\n e.printStackTrace();\n stopSendThread = true;\n }\n\n\n }\n\n }\n });\n thread.start();\n System.out.println(\"koniec funkcji startsend\");\n }", "public synchronized void bufferMessage() throws Exception\r\n {\r\n\r\n System.out.println(\"BUFFER: Message from future round received. Buffering message.\");\r\n // Wait until node moves to next round.\r\n wait();\r\n\r\n }", "void sendData() throws IOException\n\t{\n\t}", "public void sendData(String data) {// send data\n\t\tthis.data = data;\n\t\tthis.start();// spin up a new thread to send data\n\t}", "private void reportData() {\n getSender().tell(new GameRoomDataMessage(gameRoomName, capacity, players), this.getSelf());\n }", "private void sendPendingData() {\n assert(sendNextNumber >= sendUnackNumber);\n\n // Calculate congestion window difference\n long lastUnackNumber = sendUnackNumber + (long) Math.min(congestionWindow, MAX_WINDOW_SIZE);\n long difference = lastUnackNumber - sendNextNumber; // Available window\n\n // Send packets until either the congestion window is full\n // or there is no longer any flow to send\n long amountToSendByte = getFlowSizeByte(sendNextNumber);\n while (difference >= amountToSendByte && amountToSendByte > 0) {\n\n // If it has not yet been confirmed,actually send out the packet\n if (!acknowledgedSegStartSeqNumbers.contains(sendNextNumber)) {\n sendOutDataPacket(sendNextNumber, amountToSendByte);\n\n // If it has already been confirmed by selective acknowledgments, just move along\n } else {\n sendNextNumber += amountToSendByte;\n }\n\n // Determine next amount to send\n difference -= amountToSendByte;\n amountToSendByte = getFlowSizeByte(sendNextNumber);\n\n }\n\n }", "public int onEnd() {\n\t\t\t\tflushMessageQueue();\n\t\t\t\treturn 0;\n\t\t\t}", "public void sendWaitingDatas()\n\t{\n\t\tProcessExecuterModule processExecuterModule = new ProcessExecuterModule();\n\t\t\n\t\tString sendResultByEmail = (settings.getBoolean(\"sendResultByEmail\", false)) ? \"0\" : \"1\";\n\t\t\n\t\tint numberOfWaitingDatas = settings.getInt(\"numberOfWaitingDatas\", 0);\n\t\t\n\t\twhile (numberOfWaitingDatas > 0)\n\t\t{\n\t\t\tprocessExecuterModule.runSendTestData(MainActivity.this,settings.getString(\"fileTitle\"+numberOfWaitingDatas, \"\"),\n\t\t\t\t\tsettings.getString(\"testData\"+numberOfWaitingDatas, \"\"),sendResultByEmail,\n\t\t\t\t\tsettings.getString(\"fileTitle2\"+numberOfWaitingDatas, \"\"), settings.getString(\"xmlResults\"+numberOfWaitingDatas, \"\"));\n\t\t\t\n\t\t\tnumberOfWaitingDatas--; \n\t\t}\n\t\t\n\t\teditor.putInt(\"numberOfWaitingDatas\", 0);\n\t\teditor.putBoolean(\"dataToSend\", false);\n\t\t\n\t\teditor.commit(); \n\t}", "public void onCompletion(RecordSend send);", "private void deliverData(byte[]data, int off, int length) {\r\n\t\ttry {\r\n\t\t\tif(firstPkt) {\r\n\t\t\t\tStartTime = System.currentTimeMillis();\r\n\r\n\t\t\t\tfirstPkt= false;\r\n\r\n\t\t\t\tnumberOfpkts = ByteBuffer.wrap(data).getInt(12);\t\t\t\t\t\t\t\t\t\t// Number of Packets until terminating\r\n\t\t\t\tSystem.out.println(\" >> Header of 1st pkt: [Number of Pkts]: \" + numberOfpkts);\r\n\t\t\t\toff = off+4;\r\n\t\t\t\tlength = length -4;\r\n\r\n\t\t\t\tint lengthName = ByteBuffer.wrap(data).getInt(16);\t\t\t\t\t\t\t\t\t\t// Number of Bytes for the transferd FileName\r\n\t\t\t\tSystem.out.println(lengthName);\r\n\r\n\t\t\t\toff = off + 4;\r\n\t\t\t\tlength = length - 4;\r\n\r\n\t\t\t\tString s = new String (Arrays.copyOfRange(data,20,20+lengthName));\r\n\t\t\t\tSystem.out.println(s);\r\n\r\n\t\t\t\tFiles.createDirectories(Paths.get(\"rcv\"));\r\n\t\t\t\tfile = new FileOutputStream(\"rcv/\"+s);\r\n\r\n\t\t\t\toff = off + lengthName;\r\n\t\t\t\tlength = length - lengthName;\r\n\t\t\t}\r\n\r\n\t\t\tbyteCount = byteCount + data.length - off;\r\n\r\n\t\t\tfile.write(data,off,length);\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "@Override\n\tpublic void completed(Void arg0, Void arg1) {\n\t\tif(this.count < max){\n\t\t\tthis.count += 1;\n\t\t\tString msg = \"[\"+client.name+\"] hello this my \"+count+\"rd mssage-\"+System.currentTimeMillis();\n\t\t\tclient.writeProtocolMessage(msg,this);\n\t\t}\n\t}", "@Override\n public void completed(Integer result, AsynchronousSocketChannel channel ) {\n\n //ipaddress\n String ipAdr = \"\";\n try{\n\n //Print IPAdress\n ipAdr = channel.getRemoteAddress().toString();\n System.out.println(ipAdr);\n }catch(IOException e) {\n e.printStackTrace();\n }\n\n //if client is close ,return\n buf.flip();\n if (buf.limit() == 0) return;\n\n //Print Message\n String msg = getString(buf);\n\n //time\n SimpleDateFormat sdf = new SimpleDateFormat(\"yyyy/MM/dd HH:mm:ss.SSS\");\n sdf.setTimeZone(TimeZone.getTimeZone(\"Asia/Taipei\"));\n System.out.println(sdf.format(new Date()) + \" \" + buf.limit() + \" client: \"+ ipAdr + \" \" + msg);\n\n //\n order ord = null;\n try{\n ord = ParseOrder(sdf.format(new Date()), msg, ipAdr);\n }catch(Exception ex){\n startRead( channel );\n return;\n }\n //2021/05/23 15:55:14.763,TXF,B,10000.0,1,127.0.0.1\n //2021/05/23 15:55:14.763,TXF,S,10000.0,1,127.0.0.1\n\n if (ord.BS.equals(\"B\")) {\n limit(ord, bid);\n }\n if (ord.BS.equals(\"S\")) {\n limit(ord, ask);\n }\n if (trade(bid, ask, match) == true){\n startWrite(clientChannel, \"Mat:\" + match.get(match.size()-1).sysTime + \",\" + match.get(match.size()-1).stockNo+\",\"+\n match.get(match.size()-1).BS+\",\"+match.get(match.size()-1).qty+\",\"+match.get(match.size()-1).price+\"\\n\");\n }\n\n //send to all \n startWrite(clientChannel, \"Ord:\" + getAllOrder(bid, ask)+\"\\n\");\n \n //bid size and ask size\n System.out.println(\"Blist:\" + bid.size() + \" Alist:\" + ask.size());\n\n // echo the message\n//------------------> //startWrite( channel, buf );\n \n //start to read next message again\n startRead( channel );\n }", "public void postData()\n\t{\n\t\tnew NetworkingTask().execute(message);\n\t}", "private void grabdata(){\n boolean bStop = false; //stop clause\r\n if (btSocket!=null){ //making sure its connected\r\n try {\r\n btSocket.getOutputStream().write(\"2\".toString().getBytes()); //sending the number 2 to the arduino\r\n try{\r\n InputStream input = collect_Data.this.btSocket.getInputStream(); //collecting what the arduino sent back\r\n while(!bStop){ //using the stop clause to make sure we don't go out of bounds\r\n byte[] buffer = new byte[256];\r\n if(input.available() > 0){\r\n input.read(buffer);\r\n int i =0;\r\n while(i < buffer.length && buffer[i] != 0){\r\n i++;\r\n }\r\n final String strinput = new String(buffer,0,i); //this is the compiled output from the arduino\r\n // System.out.println(strinput); **CONSOLE print to check if data is correct**\r\n bStop = true; //everything is done so change stop clause to true\r\n changeText(strinput); //call the function to change the text.\r\n }\r\n }\r\n }\r\n catch (IOException e){ //catching exceptions\r\n e.printStackTrace();\r\n }\r\n }\r\n catch (IOException e){ //catching exceptions\r\n }\r\n }\r\n }", "synchronized void \n receivedLast() \n {\n closedByWriter = true;\n notifyAll();\n }", "private void onDataSendBegin() {\n Observable<Location> observable = ObservableFactory.from(SmartLocation.with(this).location().oneFix());\n observable.timeout(8, TimeUnit.SECONDS)\n .subscribeOn(Schedulers.newThread())\n .observeOn(AndroidSchedulers.mainThread())\n .subscribe(new Observer<Location>() {\n @Override\n public void onSubscribe(Disposable d) {\n currentLocation = null;\n }\n\n @Override\n public void onNext(Location loc) {\n currentLocation = loc;\n }\n\n @Override\n public void onError(Throwable e) {\n Log.e(\"onDataSendBegin\", \"onError: yes\", e);\n Toast.makeText(PanelActivity.this, \"Unable to fetch precise location, try in another way.\", Toast.LENGTH_SHORT).show();\n currentLocation = locationUtils.getLocation();\n if (currentLocation == null) {\n Log.e(\"TAG\", \"无法获取设备定位信息(包括最近一次成功定位)!\");\n }\n sendLocation();\n }\n\n @Override\n public void onComplete() {\n sendLocation();\n }\n });\n }", "@Override\r\n public void onResult(byte[] data)\r\n {\n StringBuffer sb = new StringBuffer();\r\n sb.append(getString(R.string.external_device_recv_data)).append(\"\\n\");\r\n sb.append(new String(data)).append(\"\\n\");\r\n \r\n McRecvOnBoard = sb.toString();\r\n \r\n MainControllerDemoActivity.this.runOnUiThread(new Runnable(){\r\n\r\n @Override\r\n public void run() \r\n { \r\n mRecvTextView.setText(McRecvOnBoard);\r\n }\r\n });\r\n }", "public void sendFinished(LinkLayerMessage message) {\n\t\t\n\t}", "public void receiveData(){\n try {\n // setting up input stream and output stream for the data being sent\n fromClient = new BufferedReader(new InputStreamReader(socket.getInputStream()));\n fileCount++;\n outputFile = new FileOutputStream(\"java_20/server/receivedFiles/receivedFile\"+fileCount+\".txt\");\n char[] receivedData = new char[2048];\n String section = null;\n\n //read first chuck of data and start timer\n int dataRead = fromClient.read(receivedData,0,2048);\n startTimer();\n\n //Read the rest of the files worth of data\n while ( dataRead != -1){\n section = new String(receivedData, 0, dataRead);\n outputFile.write(section.getBytes());\n\n dataRead = fromClient.read(receivedData, 0, 2048);\n }\n\n //stop timers\n endTimer();\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n }", "public void send() {\n\t}", "private void sendData(String data) {\n\t\t\ttry {\n\t\t\t\tSystem.out.println(\"Sending data: '\" + data + \"'\");\n\n\t\t\t\t// open the streams and send the \"y\" character\n\t\t\t\toutput = serialPort.getOutputStream();\n\t\t\t\toutput.write(data.getBytes());\n\t\t\t} catch (Exception e) {\n\t\t\t\tSystem.err.println(e.toString());\n\t\t\t\tSystem.exit(0);\n\t\t\t}\n\n\t\t}", "@Override\n public void onReceivedData(byte[] bytes) {\n String s = new String(bytes);\n\n if (bytes[bytes.length - 1] != 0x0a) {\n dataTemp = dataTemp + s;\n }\n else {\n dataTemp = dataTemp + s;\n String dataReceived = dataTemp;\n dataTemp = \"\";\n Log.d(TAG, dataReceived);\n }\n }", "@Override\n public void deliveryComplete(IMqttDeliveryToken imdt) {\n //System.out.println(\"Pub complete\" + new String(token.getMessage().getPayload()));\n }", "@Override\n public void finishMessageSending() {\n for (int i = 0; i < fragNum; ++i) {\n long bytesWriten = cacheOut[i].bytesWriten();\n cacheOut[i].finishSetting();\n cacheOut[i].writeLong(0, bytesWriten - SIZE_OF_LONG);\n\n if (bytesWriten == SIZE_OF_LONG) {\n logger.debug(\n \"[Finish msg] sending skip msg from {} -> {}, since msg size: {}\",\n fragId,\n i,\n bytesWriten);\n continue;\n }\n if (i == fragId) {\n nextIncomingMessageStore.digest(cacheOut[i].getVector());\n logger.info(\n \"In final step, Frag [{}] digest msg to self of size: {}\",\n fragId,\n bytesWriten);\n } else {\n grapeMessager.sendToFragment(i, cacheOut[i].getVector());\n logger.info(\n \"In final step, Frag [{}] send msg to [{}] of size: {}\",\n fragId,\n i,\n bytesWriten);\n }\n }\n // if (maxSuperStep > 0) {\n // grapeMessager.ForceContinue();\n // maxSuperStep -= 1;\n // }\n\n // logger.debug(\"[Unused res] {}\", unused);\n // logger.debug(\"adaptor hasNext {}, grape hasNext{}\", adaptorHasNext, grapeHasNext);\n // logger.debug(\"adaptor next {}, grape next {}\", adaptorNext, grapeNext);\n // logger.debug(\"adaptor neighbor {}, grape neighbor {}\", adaptorNeighbor,\n // grapeNeighbor);\n }", "private void writeData(String data) {\n try {\n outStream = btSocket.getOutputStream();\n } catch (IOException e) {\n }\n\n String message = data;\n byte[] msgBuffer = message.getBytes();\n\n try {\n outStream.write(msgBuffer);\n } catch (IOException e) {\n }\n }", "protected void sendResultMessage(Object data) {\n EventBus.getDefault().post(data);\n }", "void onSendMessageComplete(String message);", "void onCloseBleComplete();", "public void onlinerequest() {\r\n int size = Server.getUsers().size();\r\n \r\n try {\r\n this.output.flush();\r\n this.output.writeUTF(\"ONLINE\");\r\n this.output.flush();\r\n this.output.writeUTF(Integer.toString(size));\r\n this.output.flush();\r\n// Log.print(\"Sending the data\");\r\n for(int x = 0; x < Server.getUsers().size(); x++){\r\n if(Server.getUsers().get(x).getName().equals(this.name)){\r\n this.output.writeUTF(Server.getUsers().get(x).getName() + \" (You)\");\r\n }\r\n else{\r\n this.output.writeUTF(Server.getUsers().get(x).getName());\r\n this.output.flush();\r\n }\r\n \r\n \r\n }\r\n// Log.print(\"Successfully sent\");\r\n } catch (IOException ex) {\r\n Log.error(ex.getMessage());\r\n }\r\n }", "public String receiveResponse()\n\t{\n\t\t\n\t}", "public void readResponse()\n\t{\n\t\tDataObject rec = null;\n\t\tsynchronized(receive)\n\t\t{\n\t\t\trec = receive.get();\n\t\t}\n\t\tAssertArgument.assertNotNull(rec, \"Received packet\");\n\t\tpublishResponse(rec);\n\t}", "@Override\n\t\tpublic void run() {\n\t\t\tsuper.run();\n\t\t\twhile(runFlg){\n\t\t\t\ttry{\n\t\t\t\t\t\n\t\t\t\t\twhile(mQueue.getSize() >0 ){\n\t\t\t\t\t\tbyte[] data = getData();\n\t\t\t\t\t\tmOut.write(data);\n\t\t\t\t\t}\n\t\t\t\t}catch (Exception e) {\n\t\t\t\t\t// TODO: handle exception\n\t\t\t\t\tLog.e(TAG,e.getMessage());\n\t\t\t\t}\n\t\t\t}\n\t\t}", "protected void sendDataToRobot(byte[] data) {\n\t\thandler.sendData(data);\n\t}", "@Override\n public boolean messagePending() {\n return commReceiver.messagePending();\n }", "@Override\n public void stream(T data) {\n channel.write(new DataMessage<>(data));\n }", "public void endMessage()\n\t{\n\t}", "public boolean send(NetData data)\n {\n writer.println(data.toString());\n xMessenger.miniMessege(\">>>\"+ data.toString());\n return true;\n }", "void assignDataReceived(Serializable dataReceived);", "public void serialEvent(SerialPortEvent e)\n {\n System.out.println(\"+++SERIAL EVENT TYPE ++++++++++++++++ : \"+e.getEventType());\n ezlink.info(\"serialEvent() received in \" + SerialConnection.class.getName());\n \t// Create a StringBuffer and int to receive input data.\n\tStringBuffer inputBuffer = new StringBuffer();\n\tint newData = 0;\n\n\t// Determine type of event.\n\tswitch (e.getEventType())\n\t{\n\n\t // Read data until -1 is returned. If \\r is received substitute\n\t // \\n for correct newline handling.\n\t case SerialPortEvent.DATA_AVAILABLE:\n\t byte[] readBuffer = new byte[500];\n\t\tint numBytes = 0;\n\t\tinputdata = null;\n\n\t\ttry {\n\t\t\t\tSystem.out.println(\"Data Received from com Port=\"+is.available());\n ezlink.info(\"Data Received from com Port= \" +is.available() );\n\n\t\t\t\twhile (is.available() > 0)\n\t\t\t\t{\n\t\t\t\t\tnumBytes = is.read(readBuffer);\n\t\t\t\t\tdataHandler.addISOPart(ISOUtil.hexString(readBuffer,0,numBytes));\n\n\t\t\t\t}\n\n\n\t\t\t\tString strResponse=null;\n\t\t\t\tif((strResponse = dataHandler.getNextISO(1)) !=null)\n\t\t\t\t{\n\t\t\t\t\tSystem.out.println(\"Response=\"+strResponse);\n ezlink.info(\"Response= : \" +strResponse );\n\t\t\t\t\tinputdata = strResponse;\n\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tSystem.out.println(\"Full data not received from terminal\");\n ezlink.info(\"ull data not received from terminal!! \" );\n\t\t\t\t}\n\n\t\t\t\tdataRec =true;\n\n\t\t} catch (IOException exp) {\n System.out.println(\"serialEvent Exception(): \");\n exp.printStackTrace();\n System.out.println(\"serialEvent Exception(): \");\n ezlink.info(\"serialEvent Exception(): \");\n ezlink.error(new Object(), exp);\n }\n\n\t\tbreak;\n\n\t // If break event append BREAK RECEIVED message.\n\t case SerialPortEvent.BI:\n\t\tSystem.out.println(\"\\n--- BREAK RECEIVED ---\\n\");\n ezlink.info(\"\\n--- BREAK RECEIVED ---\\n \" );\n\t}\n\n }", "public void sendDataToAMQ(){\n\t\t\r\n\t\tList<String> msg = new ArrayList<>();\r\n\t\tif(offsetfollower < (prototype.followerDrivingInfo.meetingLocation - 500)) {\r\n\t\t\toffsetleader += prototype.leaderDrivingInfo.speed;\r\n\t\t\toffsetfollower += prototype.followerDrivingInfo.speed;\r\n\t\t\tmsg.add(\"<carName TestCar carName> <segmentPosX -4 segmentPosX> <segmentPosY \"+ (+offsetleader) +\" segmentPosY> <carSpeed \" + (prototype.leaderDrivingInfo.speed)+\" carSpeed>\");\r\n\t\t\tmsg.add(\"<carName Camcar carName> <segmentPosX -4 segmentPosX> <segmentPosY \"+ (offsetfollower) +\" segmentPosY> <carSpeed \" + (prototype.followerDrivingInfo.speed)+\" carSpeed>\");\t\r\n\r\n\t\t}\r\n\t\telse {\r\n\t\t\toffsetleader += prototype.leaderDrivingInfo.speed;\r\n\t\t\toffsetfollower += prototype.leaderDrivingInfo.speed ;\r\n\t\t\tmsg.add(\"<carName TestCar carName> <segmentPosX -4 segmentPosX> <segmentPosY \"+ (+offsetleader) +\" segmentPosY> <carSpeed \" + (prototype.leaderDrivingInfo.speed)+\" carSpeed>\");\t\r\n\t\t\tmsg.add(\"<carName Camcar carName> <segmentPosX -4 segmentPosX> <segmentPosY \"+ (offsetfollower) +\" segmentPosY> <carSpeed \" + (prototype.leaderDrivingInfo.speed)+\" carSpeed>\");\r\n\r\n\t\t}\r\n for(int i = 0; i < msg.size();i++)\r\n {\r\n \tamqp.sendMessage(msg.get(i));\r\n }\r\n// \t}\r\n }", "private void sendData(String message) {\n\t\t\ttry {\n\t\t\t\toutput.writeObject(message);\n\t\t\t\toutput.flush(); // flush output to client\n\t\t\t} catch (IOException ioException) {\n\t\t\t\tSystem.out.println(\"\\nError writing object\");\n\t\t\t}\n\t\t}", "protected void aOutput(Message message)\r\n {\r\n \t//rdt_send(data)\r\n \tcount_original_packets_transmitted_by_A++;\r\n \tSystem.out.println(\"|aOutput| : message received from above.\");\r\n \tmessageCongestionBuffer.add(message);\r\n \tSystem.out.println(\"|aOutput| : messageCongestionBuffer add new message, buffer size now is: \"+Integer.toString(messageCongestionBuffer.size()));\r\n \tif(next_seq_num<window_base+WindowSize)\r\n \t{\r\n \t\t/*\r\n \t\tif(messageCongestionBuffer.size()>0) //something has already been in the buffer\r\n \t\t{\r\n \t\t\tSystem.out.println(\"something has already been in the buffer\");\r\n \t\t\tmessageCongestionBuffer.add(message);\r\n \t\t\tmessage = messageCongestionBuffer.get(0);\r\n \t\t\tmessageCongestionBuffer.remove(0);\r\n \t\t}\r\n \t\t*/\r\n \t\tString data = messageCongestionBuffer.get(0).getData();\r\n \t\tmessageCongestionBuffer.remove(0);\r\n \t\t\r\n \t\t//public Packet(int seq, int ack, int check, String newPayload)\r\n \t\t\r\n \t\tint seq = next_seq_num % LimitSeqNo;\r\n \t\tint ack = ACK_NOT_USED;\r\n \t\tint check = makeCheckSum(seq,ack,data);\r\n \t\tpacketBufferAry[next_seq_num % LimitSeqNo] = new Packet(seq,ack,check,data);\r\n \t\tSystem.out.println(\"|aOutput| : packet with seq number:\"+Integer.toString(next_seq_num)+\" is made\");\r\n \t\ttoLayer3(0,packetBufferAry[next_seq_num % LimitSeqNo]); //udt_send\r\n \t\tSystem.out.println(\"|aOutput| : packet with seq number:\"+Integer.toString(next_seq_num)+\" is sent\");\r\n \t\t\r\n \t\tif(next_seq_num==window_base) \r\n \t\t{\r\n \t\t\tstartTimer(0,RxmtInterval);\r\n \t\t\tSystem.out.println(\"|aOutput| : timer is started\");\r\n \t\t}\r\n \t\t\r\n \t\t\r\n \t\tnext_seq_num = (next_seq_num+1) % LimitSeqNo;\t\r\n \t\tSystem.out.println(\"|aOutput| : next_seq_num now becomes: \"+next_seq_num+\".\");\r\n \t\t\r\n \t}\r\n \telse\r\n \t{\r\n \t\tSystem.out.println(\"|aOutput| : windows is full, it is saved in a buffer.\");\r\n \t\tSystem.out.println(\"|aOutput| : messageCongestionBuffer size now is: \"+Integer.toString(messageCongestionBuffer.size()));\r\n\r\n \t}\r\n \t\r\n //\tpublic Packet(int seq, int ack, int check,int[] sackAry)\r\n \t/*\r\n \t\tif(state_sender == STATE_WAIT_FOR_CALL_0_FROM_ABOVE)\r\n \t\t{\r\n \t\t\t\r\n \t\t\tint seq = 0; //seq = 0\r\n \t\t\tint ack = ACK_NOT_USED; //0 for not using\r\n \t\t\tString dataStr = message.getData();\r\n \t\t\tint check;\r\n \t\t\tcheck = makeCheckSum(seq,ack,dataStr); //checksum\r\n \t\t\tPacket p = new Packet(seq,ack,check,message.getData()); //make_pkt\r\n \t\t\t\r\n \t\t\tpacketBuffer = p; //save packets for resend\r\n \t\t\t\r\n \t\t\ttoLayer3(0,p); //udt_send\r\n \t\t\tstate_sender = STATE_WAIT_FOR_ACK_OR_NAK_0;\r\n \t\t\tSystem.out.println(\"aOutput: packet0 successfully send.\");\r\n \t\t\t\r\n \t\t\tstartTimer(0,RxmtInterval);\r\n \t\t\tSystem.out.println(\"aOutput: start timer\");\r\n \t\t\t\r\n \t\t\t\r\n \t\t\t\r\n \t\t}\r\n \t\telse if (state_sender == STATE_WAIT_FOR_CALL_1_FROM_ABOVE)\r\n \t\t{\r\n \t\t\tint seq = 1; //seq = 0\r\n \t\t\tint ack = ACK_NOT_USED; //0 for not using\r\n \t\t\tString dataStr = message.getData();\r\n \t\t\tint check;\r\n \t\t\tcheck = makeCheckSum(seq,ack,dataStr); //checksum\r\n \t\t\tPacket p = new Packet(seq,ack,check,message.getData()); //make_pkt\r\n \t\t\t\r\n \t\t\tpacketBuffer = p; //save packets for resend\r\n \t\t\t\r\n \t\t\ttoLayer3(0,p); //udt_send\r\n \t\t\tstate_sender = STATE_WAIT_FOR_ACK_OR_NAK_1;\r\n \t\t\tSystem.out.println(\"aOutput: packet1 successfully send.\");\t\r\n \t\t\tstartTimer(0,RxmtInterval);\r\n \t\t\tSystem.out.println(\"aOutput: start sender timer\");\r\n \t\t}\r\n \t\t*/\r\n }", "public void receive(byte[] data, Connection from){\r\n System.out.println(\"Received message: \"+ new String(data));\r\n }", "@Override\n\tpublic void EmergencySend(byte[] data) {\n\t\t\n\t}", "public void dataSent(LLRPDataSentEvent event);", "@Override\n public void run() {\n\n queryForRoutingManager();\n File f = IMbuffer.fetchFromIMInputBuffer();\n if (f.getName().startsWith(\"Responseto\")) {\n transfertopurge(f);\n }\n }", "@Override\n public void run() {\n send();\n }", "GasData receiveGasData();", "void receiveAcknowledgement() {\n byte[] receiveBuffer = new byte[2048];\n DatagramPacket receivePacket = new DatagramPacket(receiveBuffer, receiveBuffer.length);\n try {\n recSocket.receive(receivePacket);\n String dataReceived = new String(receivePacket.getData()).trim();\n System.out.println(\"\\n\" + dataReceived);\n\n } catch (IOException e) {\n System.out.println(\"\\nAcknowledgement not received!\");\n }\n }", "public void sendData() {\r\n\t\t// HoverBot specific implementation of sendData method\r\n\t\tSystem.out.println(\"Sending location information...\");\r\n\t}", "public void sendData(String data, int numCapteur);", "void onOTPSendSuccess(ConformationRes data);", "void onMessageRead(byte[] data);", "public void run() {\n\t\t\twhile (running || !messages_to_send.isEmpty()) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tsend();\r\n\t\t\t\t\tread();\r\n\t\t\t\t\tThread.sleep(100);\r\n\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\tbluetooth_show_message(\"Error! Sending or Reading failed. Reason: \" + e);\r\n\t\t\t\t\tcancel();\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\ttry {\r\n\t\t\t\tsocket.close();\r\n\t\t\t} catch(IOException e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}", "@Override\n\tpublic void sendData(int type, byte[] data) {\n\t\t\n\t}", "@Override\n\tpublic void completed(Void arg0, Void arg1) {\n\t\tif(this.count < max){\n\t\t\tthis.count += 1;\n\t\t\tString msg = \"[\"+client.name+\"] hello this my \"+count+\"rd mssage\";\n\t\t\tclient.writeMessage(msg,this);\n\t\t}\n\t}", "protected void onChannelData(SshMsgChannelData msg) throws IOException {\r\n if(firstPacket) {\r\n\t if(dataSoFar==null) {\r\n\t dataSoFar = msg.getChannelData();\r\n\t } else {\r\n\t byte newData[] = msg.getChannelData();\r\n\t byte data[] = new byte[dataSoFar.length+newData.length];\r\n\t System.arraycopy(dataSoFar, 0, data, 0, dataSoFar.length);\r\n\t System.arraycopy(newData, 0, data, dataSoFar.length, newData.length);\r\n\t dataSoFar = data;\r\n\t }\r\n\t if(allDataCheckSubst()) {\r\n\t firstPacket = false;\r\n\t socket.getOutputStream().write(dataSoFar);\r\n\t }\r\n } else {\r\n\t try {\r\n\t socket.getOutputStream().write(msg.getChannelData());\r\n\t }\r\n\t catch (IOException ex) {\r\n\t }\r\n }\r\n }", "@Override\n\t\t\t\tpublic void deliveryComplete(MqttDeliveryToken arg0) {\n\t\t\t\t\tSystem.out.println(\"deliveryComplete---------\"\n\t\t\t\t\t\t\t+ arg0.isComplete());\n\t\t\t\t}", "@Override\n\t\t\t\tpublic void run() {\n//\t\t\t\t\t\n//\t\t\t\t\tSystem.out.printf(\"Ausgangs-Puffer: \");\n//\t\t\t\t\tfor(int i=0; i<Message.length; i++)\tSystem.out.printf(\"0x%02X \", eeipClient.O_T_IOData[i]);\n//\t\t\t\t\tSystem.out.printf(\"\\n\\n\");\n\t\t\t\t\tk++;\n\t\t\t\t\t\n\t\t\t\t\tif(k>=10) {\n\t\t\t\t\t\t\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\teeipClient.ForwardClose();\n\t\t\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t\t}\n\t\n\t\t\t\t\t\ttimerflag1=false;\n\t\t\t\t\t\tstatus_write=true;\n\t\t\t\t\t\tstate=3;\n\t\t\t\t\t\tk=0;\n\t\t\t\t\t\tthis.cancel();\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}" ]
[ "0.7209731", "0.6772382", "0.67704034", "0.6643094", "0.65830904", "0.6500751", "0.6449824", "0.6447455", "0.6389074", "0.6350146", "0.63398975", "0.6332133", "0.6331343", "0.6330276", "0.6320365", "0.6282768", "0.62606007", "0.6244067", "0.6185331", "0.61797947", "0.6167523", "0.6110311", "0.61081225", "0.6107416", "0.6092297", "0.60875106", "0.6076161", "0.6075473", "0.6071312", "0.60650086", "0.6059157", "0.6046954", "0.6046474", "0.6027657", "0.6022127", "0.6011707", "0.5995524", "0.59951067", "0.5993", "0.5987388", "0.5983339", "0.5977273", "0.5974211", "0.59571403", "0.5952219", "0.59413755", "0.59365195", "0.5907238", "0.58982825", "0.58881956", "0.5876234", "0.5875802", "0.5866934", "0.5860651", "0.5854351", "0.5840709", "0.58402556", "0.5834506", "0.5828374", "0.58157897", "0.5813552", "0.58109957", "0.5810191", "0.58072513", "0.58054274", "0.58052015", "0.5793486", "0.57917184", "0.5787113", "0.5784355", "0.57711256", "0.5766306", "0.5757537", "0.57523507", "0.5744798", "0.57391083", "0.5737723", "0.57338053", "0.57336587", "0.5729573", "0.5722625", "0.57102287", "0.5709012", "0.5708555", "0.57083994", "0.5705166", "0.57010895", "0.56913346", "0.5690191", "0.5688309", "0.56855035", "0.56713194", "0.5662963", "0.56512827", "0.56494695", "0.5644849", "0.56425977", "0.56411195", "0.5630107", "0.56257945" ]
0.7445858
0
This generic method is called to process the device input
private void processDeviceStream(SelectionKey key, byte[] data) throws IOException{ SocketChannel channel = (SocketChannel)key.channel(); String sDeviceID = ""; // Initial call where the device sends it's IMEI# - Sarat if ((data.length >= 10) && (data.length <= 17)) { int ii = 0; for (byte b : data) { if (ii > 1) { // skipping first 2 bytes that defines the IMEI length. - Sarat char c = (char)b; sDeviceID = sDeviceID + c; } ii++; } // printing the IMEI #. - Sarat System.out.println("IMEI#: "+sDeviceID); LinkedList<String> lstDevice = new LinkedList<String>(); lstDevice.add(sDeviceID); dataTracking.put(channel, lstDevice); // send message to module that handshake is successful - Sarat try { sendDeviceHandshake(key, true); } catch (IOException e) { e.printStackTrace(); } // second call post handshake where the device sends the actual data. - Sarat }else if(data.length > 17){ mClientStatus.put(channel, System.currentTimeMillis()); List<?> lst = (List<?>)dataTracking.get(channel); if (lst.size() > 0) { //Saving data to database sDeviceID = lst.get(0).toString(); DeviceState.put(channel, sDeviceID); //String sData = org.bson.internal.Base64.encode(data); // printing the data after it has been received - Sarat StringBuilder deviceData = byteToStringBuilder(data); System.out.println(" Data received from device : "+deviceData); try { //publish device IMEI and packet data to Nats Server natsPublisher.publishMessage(sDeviceID, deviceData); } catch(Exception nexp) { nexp.printStackTrace(); } //sending response to device after processing the AVL data. - Sarat try { sendDataReceptionCompleteMessage(key, data); } catch (IOException e) { e.printStackTrace(); } //storing late timestamp of device DeviceLastTimeStamp.put(sDeviceID, System.currentTimeMillis()); }else{ // data not good. try { sendDeviceHandshake(key, false); } catch (IOException e) { throw new IOException("Bad data received"); } } }else{ // data not good. try { sendDeviceHandshake(key, false); } catch (IOException e) { throw new IOException("Bad data received"); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tprotected void processInput() {\n\t}", "public void processInput() {\n\n\t}", "private void processInput() {\r\n\t\ttry {\r\n\t\t\thandleInput(readLine());\r\n\t\t} catch (WrongFormatException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "protected abstract void getInput();", "protected void processInputs() {\n\t\twhile (InputInfo.size() > 0) {\n\t\t\tInputInfo info = InputInfo.get();\n\n\t\t\tif (info.kind == 'k' && (info.action == GLFW_PRESS\n\t\t\t\t\t|| info.action == GLFW_REPEAT)) {\n\t\t\t\tint code = info.code;\n\n\t\t\t}// input event is a key\n\t\t\telse if (info.kind == 'm') {// mouse moved\n\t\t\t\t// System.out.println( info );\n\t\t\t} else if (info.kind == 'b') {// button action\n\t\t\t\t// System.out.println( info );\n\t\t\t}\n\n\t\t}// loop to process all input events\n\n\t}", "public abstract void handleInput();", "private void processInputData() throws IOException {\n\t\tout.write(Protocol.PC_READY.value);\n\t\tout.flush();\n\t\tInputBuffer buffer = InputBuffer.readFrom(in);\n\t\tdispatcher.dispatch(buffer.entries);\n\t}", "@Override\n\tpublic void handleInput() {\n\t\t\n\t}", "public boolean handleDeviceData(Device device, DeviceCommandRequest request) throws IOException;", "public void processStreamInput() {\n }", "public abstract void onInput();", "public abstract void input();", "@Override\n\tpublic void input() {\n\t\t\n\t}", "@Override\n\tpublic void processData() {\n\t\t\n\t}", "protected abstract void registerInput();", "protected void handleInput(String input) {}", "@Override\n\tpublic void inputStarted() {\n\t\t\n\t}", "public void run() {\n\t\tGenRandomString generator = new GenRandomString();\n\t\tStringToInt converter = new StringToInt();\n\t\t\n\t\tint rawData;\n\t\t\n\t\twhile(true) {\n\t\t\t\n\t\t\trawData = converter.convert(generator.generate());\n\t\t\t\n\t\t\t//synchronization to make sure that queue is filled up in the correct order.\n\t\t\tsynchronized(GlobalInfo.enqueueLock){\n\t\t\t\tSystem.out.format(\"%d got the lock.\\n\",deviceNumber);\n\t\t\t\tGlobalInfo.inputs[deviceNumber] = rawData;\n\t\t\t\tGlobalInfo.pipeLine.add(GlobalInfo.inputs);\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\ttry {\n\t\t\t\tThread.sleep(10000);\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\t\n\t\t}\n\t}", "@Override\n\tpublic void inputStarted() {\n\n\t}", "public void input(){\n\t\tboolean[] inputKeyArray = inputHandler.processKeys();\n\t\tint[] inputMouseArray = inputHandler.processMouse();\n\t\tcurrentLevel.userInput(inputKeyArray, inputMouseArray);\n\t}", "void requestInput();", "@Override\n public void processData(ProgramInput input)\n throws IOException, InterruptedException, RESTClientException {\n AirlyAPIClient AirlyAPI = new AirlyAPIClient(input.getAPIKey());\n MapPoint data;\n if(input.getSensorId() == null)\n data = AirlyAPI.getMeasurementsForMapPoint(input.getLatitude(), input.getLongitude());\n else\n data = AirlyAPI.getMeasurementsFromSpecificSensor(input.getSensorId());\n if(isObjectEmpty(data)) notifyViews(\"EmptyObject\", Boolean.TRUE);\n else notifyViews(\"EmptyObject\", Boolean.FALSE);\n notifyViews(\"SensorData\", data);\n if(input.isHistory()) notifyViews(\"HistoryMode\", true);\n else notifyViews(\"HistoryMode\", false);\n }", "public abstract Object getInput ();", "private void inputHandler(String input) throws Exception{\n\n switch (input) {\n\n case \"/quit\":\n done = true;\n break;\n\n default:\n PduMess mess = new PduMess(input);\n outStream.writeToServer(mess.getByteArray());\n break;\n }\n }", "@Override \n public <T extends Frame> int onPush(InputPort<T> self, Frame frame) throws CSenseException {\n\tif (Options.CHECK_CURRENT_THREAD) {\n\t if (Thread.currentThread() != getScheduler().getThread()) {\n\t\tthrow new CSenseException(CSenseError.SYNCHRONIZATION_ERROR);\n\t }\n\t}\n\n\t// check if all the puts have data to process\t\t\n\tfor (int i = 0; i < _inPortSize; i++) {\n\t InputPort<? extends Frame> port = _inPortList.get(i);\t \t \n\t if (port.hasFrame() == false) {\n\t\tif (port.getSupportsPoll()) {\n\t\t int r = port.poll();\n\t\t if (r == Constants.POLL_FAILED) return Constants.PUSH_COMPONENT_NOT_READY;\n\t\t} else {\n\t\t return Constants.PUSH_COMPONENT_NOT_READY;\n\t\t}\n\t } \n\t}\n\n\tif (transition(IState.STATE_READY, IState.STATE_RUNNING) == true) {\n\t // call the doInput method \t \n\t for (int i = 0; i < multiplier; i++) {\n\t\tonInput();\n\t }\n\n\t // clear the input ports\n\t for (int i = 0; i < _inPortSize; i++) {\n\t\tInputPort<? extends Frame> port = _inPortList.get(i);\n\t\tport.clear();\n\t\ttransitionTo(IState.STATE_READY);\n\t }\n\n\t return Constants.PUSH_SUCCESS;\n\t} else {\n\t throw new CSenseException(CSenseError.SYNCHRONIZATION_ERROR, \"This should not happen\");\n\t}\n }", "public abstract int process(Buffer input, Buffer output);", "private void processInput(Protocol protocol) throws IOException {\n\t\tlogger.debug(protocol);\n\t\tswitch (protocol) {\n\t\tcase TIME_POLL:\n\t\t\tsendStatus();\n\t\t\tbreak;\n\t\tcase DATA_POLL:\n\t\t\tprocessInputData();\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tlogger.warn(\"Ignoring {}\", protocol.name());\n\t\t}\n\t}", "@Override\n public void processInput() throws IllegalArgumentException, InputMismatchException,\n FileNotFoundException {\n Scanner scanner = new Scanner(this.in);\n while (scanner.hasNext()) {\n String input = scanner.next();\n switch (input) {\n case \"q\":\n return;\n case \"load:\":\n File imageFile = new File(scanner.next());\n if (imageFile.exists()) {\n this.model = this.model.fromImage(load(imageFile));\n } else {\n throw new FileNotFoundException(\"File does not exist\");\n }\n break;\n case \"save:\":\n String path = scanner.next();\n this.save(this.model.getModelImage(), getImageFormat(path), path);\n break;\n default:\n Function<Scanner, EnhancedImageModel> getCommand = knownCommands.getOrDefault(\n input, null);\n if (getCommand == null) {\n throw new IllegalArgumentException(\"command not defined.\");\n } else {\n this.model = getCommand.apply(scanner);\n }\n break;\n }\n }\n\n }", "@Override\n\tvoid input() {\n\t}", "public void pollAndProcessInput() {\n\tlong time ;\n int index ;\n\n\t// Set button values. In the Trackd implementation there is only one\n\t// set of buttons for all sensors and valuators.\n for (int i = 0 ; i < buttons.length ; i++) {\n buttons[i] = getButton(i) ;\n }\n\n\t// Set 6DOF sensor values.\n for (index = 0 ; index < trackerCount ; index++) {\n getMatrix(trackerMatrix, index) ;\n t3d[index].set(trackerMatrix) ;\n\t time = System.currentTimeMillis() ;\n sensors[index].setNextSensorRead(time, t3d[index], buttons) ;\n }\n\n\t// Set 2D/3D sensor values from available valuators.\n\tif (valuatorCount > 0) {\n\t for (int i = 0 ; i < valuatorCount && i < 3 ; i++) {\n\t\t// Put values in matrix translational components.\n\t\tvaluatorMatrix[(i*4) + 3] = getValuator(i) ;\n\t }\n\n t3d[index].set(valuatorMatrix) ;\n\t time = System.currentTimeMillis() ;\n sensors[index].setNextSensorRead(time, t3d[index], buttons) ;\n }\n }", "protected void inputListener(){\n }", "@Override\n\t\t\t\tpublic void execute(Object data) {\n\n\t\t\t\t\tif (toInputProcessor == null) {\n\t\t\t\t\t\tGdx.input.setInputProcessor(preProcessor);\n\t\t\t\t\t\tSystem.out.println(\"quay tro ve man hinh chinh\");\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\tSystem.out.println(\"quay tro ve man hinh khac\");\n\t\t\t\t\t}\n\t\t\t\t}", "public void processInput(CommandLineInput commandLineInput) {\n\t\t\n\t}", "@Override final protected Class<?>[] getInputTypes() { return this.InputTypes; }", "public abstract void process(int input);", "private void handleExternalDevice(final String name, final int type, final int state, final String extra){\n\n mThreadExecutor.execute(new Runnable() {\n\n @Override\n public void run() {\n ArrayList<String> mAudioOutputChannels = mAudioManagerEx.getAudioDevices(AudioManagerEx.AUDIO_OUTPUT_TYPE);\n ArrayList<String> mAudioInputChannels = mAudioManagerEx.getAudioDevices(AudioManagerEx.AUDIO_INPUT_TYPE);\n\n String title = null;\n String message = null;\n\n switch(state){\n case AudioDeviceManagerObserver.PLUG_IN:\n switch(type){\n case AudioDeviceManagerObserver.AUDIO_INPUT_TYPE:\n //auto change to this audio-in channel\n Log.d(TAG, \"audio input plug in\");\n ArrayList<String> audio_in = new ArrayList<String>();\n audio_in.add(name);\n mAudioManagerEx.setAudioDeviceActive(audio_in, AudioManagerEx.AUDIO_INPUT_ACTIVE);\n\n title = mCtx.getResources().getString(R.string.usb_audio_in_plug_in_title);\n //message = mCtx.getResources().getString(R.string.usb_audio_plug_in_message);\n toastPlugInNotification(title, AUDIO_IN_NOTIFY);\n break;\n case AudioDeviceManagerObserver.AUDIO_OUTPUT_TYPE:\n Log.d(TAG, \"audio output plug in\");\n //update devices state\n if(extra != null && extra.equals(AudioDeviceManagerObserver.H2W_DEV)){\n headPhoneConnected = true;\n }\n\n //switch audio output\n final ArrayList<String> audio_out = new ArrayList<String>();\n if(extra != null && extra.equals(AudioDeviceManagerObserver.H2W_DEV)){\n audio_out.add(name);\n mAudioManagerEx.setAudioDeviceActive(audio_out, AudioManagerEx.AUDIO_OUTPUT_ACTIVE);\n title = mCtx.getResources().getString(R.string.headphone_plug_in_title);\n message = mCtx.getResources().getString(R.string.headphone_plug_in_message);\n }else if(name.contains(\"USB\")){\n audio_out.add(name);\n mHandler.post(new java.lang.Runnable() {\n @Override\n public void run() {\n // TODO Auto-generated method stub\n chooseUsbAudioDeviceDialog(audio_out);\n }\n });\n //title = mCtx.getResources().getString(R.string.usb_audio_out_plug_in_title);\n }\n break;\n }\n break;\n case AudioDeviceManagerObserver.PLUG_OUT:\n switch(type){\n case AudioDeviceManagerObserver.AUDIO_INPUT_TYPE:\n Log.d(TAG, \"audio input plug out\");\n title = mCtx.getResources().getString(R.string.usb_audio_in_plug_out_title);\n message = mCtx.getResources().getString(R.string.usb_audio_plug_out_message);\n ArrayList<String> actived = mAudioManagerEx.getActiveAudioDevices(AudioManagerEx.AUDIO_INPUT_ACTIVE);\n if(actived == null || actived.size() == 0 || actived.contains(name)){\n ArrayList<String> ilist = new ArrayList<String>();\n for(String dev:mAudioInputChannels){\n if(dev.contains(\"USB\")){\n ilist.add(dev);\n break;\n }\n }\n if(ilist.size() == 0){\n ilist.add(AudioManagerEx.AUDIO_NAME_CODEC);\n }\n mAudioManagerEx.setAudioDeviceActive(ilist, AudioManagerEx.AUDIO_INPUT_ACTIVE);\n toastPlugOutNotification(title, message, AUDIO_IN_NOTIFY);\n }\n else if(!actived.contains(\"USB\")){\n ArrayList<String> ilist = new ArrayList<String>();\n ilist.add(AudioManagerEx.AUDIO_NAME_CODEC);\n mAudioManagerEx.setAudioDeviceActive(ilist, AudioManagerEx.AUDIO_INPUT_ACTIVE);\n }\n break;\n case AudioDeviceManagerObserver.AUDIO_OUTPUT_TYPE:\n ArrayList<String> olist = new ArrayList<String>();\n Log.d(TAG, \"audio output plug out\");\n if(extra != null && extra.equals(AudioDeviceManagerObserver.H2W_DEV)){\n headPhoneConnected = false;\n for(String dev:mAudioOutputChannels){\n if(dev.contains(\"USB\")){\n olist.add(dev);\n mAudioManagerEx.setAudioDeviceActive(olist,AudioManagerEx.AUDIO_OUTPUT_ACTIVE);\n break;\n }\n }\n if(olist.size() == 0){\n switchAudioDevice(mDisplayOutputManager.getDisplayOutputType(0),false,false);\n }\n title = mCtx.getResources().getString(R.string.headphone_plug_out_title);\n message = mCtx.getResources().getString(R.string.headphone_plug_out_message);\n }else{\n if(headPhoneConnected){\n olist.add(AudioManagerEx.AUDIO_NAME_CODEC);\n }else{\n if(name.contains(\"USB\")){\n Log.d(TAG,\"switchAudioDevice, remove USB Audio device!\");\n if (alertDialog != null && alertDialog.isShowing()) {\n alertDialog.dismiss();\n alertDialog = null;\n }\n switchAudioDevice(mDisplayOutputManager.getDisplayOutputType(0),true,false);\n }else{\n Log.d(TAG,\"switchAudioDevice, NO USB Audio device is connected!\");\n switchAudioDevice(mDisplayOutputManager.getDisplayOutputType(0),false,false);\n }\n }\n title = mCtx.getResources().getString(R.string.usb_audio_out_plug_out_title);\n message = mCtx.getResources().getString(R.string.usb_audio_plug_out_message);\n }\n toastPlugOutNotification(title, message, AUDIO_OUT_NOTIFY);\n break;\n }\n break;\n }\n }\n });\n\n }", "public InputDataHandler() {}", "protected void aInput(Packet packet)\r\n {\r\n \t\tif(!isCorrupted(packet))\r\n \t\t\t{\r\n \t\t\t\tSystem.out.println(\"|aInput| : packet\"+ packet.getSeqnum()+\"is received without corruption.\");\r\n \t\t\t\tint offset = ((packet.getSeqnum()+1) % LimitSeqNo - window_base);\r\n \t\t\t\tif(offset>1)\r\n \t\t\t\t{\r\n \t\t\t\t\tSystem.out.println(\"|aInput| : window_base: \"+window_base);\r\n \t\t\t\t\tSystem.out.println(\"|aInput| : next sequence number: \"+ Integer.toString((packet.getSeqnum()+1) % LimitSeqNo));\r\n \t\t\t\t\tSystem.out.println(\"|aInput| : offset: \"+offset);\r\n \t\t\t\t}\r\n \t\t\t\twindow_base = (packet.getSeqnum()+1) % LimitSeqNo;;\r\n \t\t\t\t\r\n \t\t\t\tif(messageCongestionBuffer.size()>0)\r\n \t\t\t\t{\r\n \t\t\t\t\tString data = messageCongestionBuffer.get(0).getData();\r\n \t\t \t\t\tmessageCongestionBuffer.remove(0);\r\n \t\t \t\t\r\n \t\t \t\t//public Packet(int seq, int ack, int check, String newPayload)\r\n \t\t \t\t\r\n \t\t \t\t\tint seq = next_seq_num % LimitSeqNo;\r\n \t\t \t\t\tint ack = ACK_NOT_USED;\r\n \t\t \t\t\tint check = makeCheckSum(seq,ack,data);\r\n \t\t \t\t\tpacketBufferAry[next_seq_num % LimitSeqNo] = new Packet(seq,ack,check,data);\r\n \t\t \t\t\tSystem.out.println(\"|aInput| : packet with seq number:\"+Integer.toString(next_seq_num)+\" is made\");\r\n \t\t \t\t\ttoLayer3(0,packetBufferAry[next_seq_num % LimitSeqNo]); //udt_send\r\n \t\t \t\t\tSystem.out.println(\"|aInput| : packet with seq number:\"+Integer.toString(next_seq_num)+\" is sent\");\r\n \t\t \t\t\t\r\n \t\t \t\t\tnext_seq_num = (next_seq_num+1)% LimitSeqNo;\t\r\n \t\t \t\tSystem.out.println(\"|aInput| : next_seq_num now becomes: \"+next_seq_num+\".\");\r\n \t\t\t\t}\r\n \t\t\t\t\r\n \t\t\t\tSystem.out.println(\"|aInput| : window_base becomes: \"+ window_base+\".\");\r\n \t\t\t\t\r\n \t\t\t\tif(window_base == next_seq_num)\r\n \t\t\t\t\t{\r\n \t\t\t\t\t\t\r\n \t\t\t\t\t\tSystem.out.println(\"|aInput| : timer is stopped\");\r\n \t\t\t\t\t\tstopTimer(0);\r\n \t\t\t\t\t}\r\n \t\t\t\telse\r\n \t\t\t\t\t{\r\n \t\t\t\t\t\tSystem.out.println(\"|aInput| : timer is restarted\");\r\n \t\t\t\t\t\tstopTimer(0);\r\n \t\t\t\t\t\tstartTimer(0,RxmtInterval);\r\n \t\t\t\t\t}\r\n \t\t\t}\r\n \t\r\n \t/*\r\n \t\tif(state_sender==STATE_WAIT_FOR_ACK_OR_NAK_0)\r\n \t\t{\r\n \t\t\t\r\n \t\t\tif(isCorrupted(packet)) //corrupted \r\n \t\t\t{\r\n \t\t\t\tSystem.out.println(\"aInput: received packet 0 is corrupted\");\r\n \t\t\t\t//resendPacket(packetBuffer);\r\n \t\t\t}\r\n \t\t\telse if(packet.getAcknum()== ACK_ACKed_1) \r\n \t\t\t{\r\n \t\t\t\tSystem.out.println(\"aInput: ACKed 1 is received\");\r\n \t\t\t\t//resendPacket(packetBuffer);\r\n \t\t\t}\r\n \t\t\telse //Ack = 1 or bigger mean ACK\r\n \t\t\t{\r\n \t\t\t\tSystem.out.println(\"aInput: ACKed 0 is received\");\r\n \t\t\t\t\r\n \t\t\t\tstate_sender = STATE_WAIT_FOR_CALL_1_FROM_ABOVE;\r\n \t\t\t\tSystem.out.println(\"aInput: sender timer is stopped\");\r\n \t\t\t\tstopTimer(0); \r\n \t\t\t}\r\n \t\t\t\r\n \t\t}\r\n \t\telse if(state_sender==STATE_WAIT_FOR_ACK_OR_NAK_1)\r\n \t\t{\r\n \t\t\tif(isCorrupted(packet)) //corrupted\r\n \t\t\t{\r\n \t\t\t\tSystem.out.println(\"aInput: received packet 1 is corrupted\");\r\n \t\t\t\t//esendPacket(packetBuffer);\r\n \t\t\t}\r\n \t\t\telse if(packet.getAcknum()==ACK_ACKed_0)//Ack = -1 means NAK\r\n \t\t\t{\r\n \t\t\t\tSystem.out.println(\"aInput: ACKed 0 is received\");\r\n \t\t\t\t//resendPacket(packetBuffer);\r\n \t\t\t}\r\n \t\t\telse //Ack = 1 or bigger mean ACK\r\n \t\t\t{\r\n \t\t\t\tSystem.out.println(\"aInput: ACKed 1 is received\");\r\n \t\t\t\tstate_sender = STATE_WAIT_FOR_CALL_0_FROM_ABOVE;\r\n \t\t\t\tSystem.out.println(\"aInput: sender timer is stopped\");\r\n \t\t\t\tstopTimer(0); \r\n \t\t\t}\r\n \t\t}\r\n \t\t*/\r\n \t\t\r\n\r\n }", "com.indosat.eai.catalist.standardInputOutput.DummyInputType getInput();", "@Override\r\n \tpublic void process() {\n \t\t\r\n \t}", "default void process(Input input, Output response) { }", "public void serialEvent(SerialPortEvent oEvent) {\n\t\tif (oEvent.getEventType() == SerialPortEvent.DATA_AVAILABLE) {\n\t\t\ttry {\n\t\t\t\tString rawInput = inputLeftover;\n\t\t\t\twhile(input.ready())\n\t\t\t\t\trawInput += (char)input.read();\n\t\t\t\t//System.out.println(\"input:\"+rawInput);\n\t\t\t\tString[] inputLines = rawInput.split(\"\\n\");\n\t\t\t\tfor(int c=0; c<inputLines.length-1; c++){\n\t\t\t\t\tString[] inputBlocks = inputLines[c].split(\"\\t\");\n\t\t\t\t\tfor(String inputBlock : inputBlocks){\n\t\t\t\t\t\tif(inputBlock.length() == 0)\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t/*for(char ch : inputBlock.toCharArray()){\n\t\t\t\t\t\t\tSystem.out.println((int)ch);\n\t\t\t\t\t\t}*/\n\t\t\t\t\t\tinputBlockBuffer.add(new Block(inputBlock, GLFW.glfwGetTime()));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tinputLeftover = inputLines[inputLines.length-1];\n\t\t\t\t\n\t\t\t} catch (Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\t// Ignore all the other eventTypes, but you should consider the other ones.\n\t}", "protected abstract void execute(INPUT input);", "@Override\n public void onInputBufferAvailable(@NonNull MediaCodec codec, int index) {\n\n synchronized (mAvailableInputs) {\n mAvailableInputs.add(index);\n mAvailableInputs.notifyAll();\n }\n }", "public synchronized void mProcessSerial(){ //170927 Returns array of data received from serial RX they are also put on receive buffer\n for (int loop=0;loop<oTXFIFO.nBytesAvail;loop++){\n if (oTXFIFO.mCanPop(1)==false) break; //Send FIFO data to serial output stream\n int byB=oTXFIFO.mFIFOpop();\n mWriteByte(oOutput, (byte) byB);\n }\n byte[] aBytes = mReadBytes(oInput);\n if (aBytes==null) return ;\n for (int i=0;i<aBytes.length;i++){ //Loop through buffer and transfer from input stream to FIFO buffer //+170601 revised from while loop to avoid endless loop\n if (oRXFIFO.mCanPush()){\n oRXFIFO.mFIFOpush(aBytes[i]); //Put the data on the fifo\n }\n else\n {\n mStateSet(cKonst.eSerial.kOverflow);\n nDataRcvd=-1;\n }\n }\n }", "public void handleInput(InputDecoder.Input input) {\n this.state.handleInput(this, input);\n }", "@Override\r\n public void handle(Buffer inBuffer) {\n \tlogger.debug(name_log + \"----------------------------------------------------------------------------\");\r\n \t//logger.debug(name_log + \"incoming data: \" + inBuffer.length());\r\n String recvPacket = inBuffer.getString(0, inBuffer.length());\r\n \t\r\n //logger.debug(name_log + \"read data: \" + recvPacket);\r\n logger.info(name_log + \"RECV[\" + recvPacket.length() + \"]> \\n\" + recvPacket + \"\\n\");\r\n \r\n \r\n // -- Packet Analyze ----------------------------------------------------------------\r\n // Writing received message to event bus\r\n\t\t\t\t\r\n JsonObject jo = new JsonObject();\r\n \r\n jo.put(\"recvPacket\", recvPacket);\r\n \r\n eb.send(\"PD_Trap\" + remoteAddr, jo);\r\n\r\n // -- RESPONSE, Send Packet to Target -----------------------------------------------\r\n eb.consumer(remoteAddr + \"Trap_ACK\", message -> {\r\n \twriteToTarget(message.body().toString(), \"Trap_ACK\");\r\n });\r\n \r\n eb.consumer(remoteAddr + \"Trap_NACK\", message -> {\r\n \twriteToTarget(message.body().toString(), \"Trap_NACK\");\r\n });\r\n \r\n }", "@Override\n\tpublic void inputData() {\n\t\tSystem.out.println(\"通过滑动向计算机输入物理位置!\");\n\t}", "@Override\r\n\tpublic void onUpdateIO(int device, int type, int code, int value,\r\n\t\t\tint timestamp) {\n\t\t\r\n\t}", "@Override\n\tpublic void process() {\n\t\tInterface2.super.process();\n\t}", "private void processInputs() {\n if (controller.escape) { parent.changeScreen(parent.PAUSE, parent.GAME_PLAY); }\r\n\r\n // Ask the controller if the left paddle has been told to do anything\r\n if (controller.leftUp) { leftPaddle.moveUp(); }\r\n else if (controller.leftDown) { leftPaddle.moveDown(); }\r\n else { leftPaddle.stayPut(); }\r\n // same for the right\r\n if (controller.rightUp) { rightPaddle.moveUp(); }\r\n else if (controller.rightDown) { rightPaddle.moveDown(); }\r\n else { rightPaddle.stayPut(); }\r\n\r\n }", "@Override\n\tpublic void inputEnded() {\n\n\t}", "public void beginInput() {\n this.currentState = states.INPUT;\n this.currentIndex = 1;\n this.currentUnit = getUnit(this.currentIndex);\n this.currentChName = this.currentUnit.chName;\n }", "@Override\r\n\tpublic void processEvent() {\n\t\tint VolumeButtonEvent = (Integer) pdu.getRawPayload()[0];\r\n\t\t//System.out.println(\"number of objects \" + numObjects);\r\n\t}", "public interface ObjectInput extends DataInput {\n /**\n * Indicates the number of bytes of primitive data that can be read without\n * blocking.\n *\n * @return the number of bytes available.\n * @throws IOException\n * if an I/O error occurs.\n */\n public int available() throws IOException;\n\n /**\n * Closes this stream. Implementations of this method should free any\n * resources used by the stream.\n *\n * @throws IOException\n * if an I/O error occurs while closing the input stream.\n */\n public void close() throws IOException;\n\n /**\n * Reads a single byte from this stream and returns it as an integer in the\n * range from 0 to 255. Returns -1 if the end of this stream has been\n * reached. Blocks if no input is available.\n *\n * @return the byte read or -1 if the end of this stream has been reached.\n * @throws IOException\n * if this stream is closed or another I/O error occurs.\n */\n public int read() throws IOException;\n\n /**\n * Reads bytes from this stream into the byte array {@code buffer}. Blocks\n * while waiting for input.\n *\n * @param buffer\n * the array in which to store the bytes read.\n * @return the number of bytes read or -1 if the end of this stream has been\n * reached.\n * @throws IOException\n * if this stream is closed or another I/O error occurs.\n */\n public int read(byte[] buffer) throws IOException;\n\n /**\n * Reads at most {@code count} bytes from this stream and stores them in\n * byte array {@code buffer} starting at offset {@code count}. Blocks while\n * waiting for input.\n *\n * @param buffer\n * the array in which to store the bytes read.\n * @param offset\n * the initial position in {@code buffer} to store the bytes read\n * from this stream.\n * @param count\n * the maximum number of bytes to store in {@code buffer}.\n * @return the number of bytes read or -1 if the end of this stream has been\n * reached.\n * @throws IOException\n * if this stream is closed or another I/O error occurs.\n */\n public int read(byte[] buffer, int offset, int count) throws IOException;\n\n /**\n * Reads the next object from this stream.\n *\n * @return the object read.\n *\n * @throws ClassNotFoundException\n * if the object's class cannot be found.\n * @throws IOException\n * if this stream is closed or another I/O error occurs.\n */\n public Object readObject() throws ClassNotFoundException, IOException;\n\n /**\n * Skips {@code toSkip} bytes on this stream. Less than {@code toSkip} byte are\n * skipped if the end of this stream is reached before the operation\n * completes.\n *\n * @param toSkip\n * the number of bytes to skip.\n * @return the number of bytes actually skipped.\n *\n * @throws IOException\n * if this stream is closed or another I/O error occurs.\n */\n public long skip(long toSkip) throws IOException;\n}", "private void processInput(String command) {\r\n\r\n if (command.equals(\"1\")) {\r\n displayListings();\r\n } else if (command.equals(\"2\")) {\r\n listYourCar();\r\n } else if (command.equals(\"3\")) {\r\n removeYourCar(user);\r\n } else if (command.equals(\"4\")) {\r\n checkIfWon();\r\n } else if (command.equals(\"5\")) {\r\n saveCarListings();\r\n } else if (command.equals(\"6\")) {\r\n exitApp = true;\r\n } else {\r\n System.out.println(\"Invalid selection\");\r\n }\r\n }", "public void handleInput(InputEvent e);", "public void handleUserInput() {\n mouseProcessor.handleUserInput();\n }", "public void processInput(InputHandler inputHandler) {\n\n if (inputHandler.p == null) {\n return;\n } else {\n projection.convertFromPixels(inputHandler.p);\n }\n\n if (inputHandler.eventID == 1) {\n // First down touch\n currentLine = new Line(this.targetGenerator.getDirection(), isLandscape);\n currentLine.add(inputHandler.p);\n if (this.startPoint.hitCheck(inputHandler.p)) {\n isValidLine = true;\n soundManager.playStartLineSound();\n }\n } else if (inputHandler.eventID == 2 && currentLine != null) {\n // Move\n currentLine.add(inputHandler.p);\n if (isValidLine) {\n // Check for hitting pickups\n for (PickUpGameObject pickup : pickups) {\n if (pickup.hitCheck(inputHandler.p)) {\n currentPickup = pickup;\n Log.d(\"Simulation\", pickup.getClass().getSimpleName() + \" bound as current pickup\");\n gameListeners.touchedPickup(pickup);\n currentLine.isResearchable = false;\n }\n }\n pickups.remove(currentPickup);\n\n // Check for hitting obstacles\n for (ObstacleGameObject obstacle : obstacles) {\n if (obstacle.hitCheck(inputHandler.p)) {\n isValidLine = false;\n gameListeners.touchedObstacle(obstacle);\n currentLine.isResearchable = false;\n }\n }\n }\n } else if (inputHandler.eventID == 3 && currentLine != null) {\n // Action Up\n if (!this.targetPoint.hitCheck(inputHandler.p)) {\n isValidLine = false;\n }\n\n if (isValidLine) {\n currentLine.add(inputHandler.p);\n currentLine.isResearchable = true;\n addCurrentLine();\n setNewTarget();\n isValidLine = false;\n this.soundManager.playFinishedLineSound();\n } else {\n currentLine.clear();\n this.soundManager.playMissedTargetSound();\n }\n }\n inputHandler.reset();\n }", "public void processInput(String text);", "private void readInput() {\n byte[] byteForStream = new byte[2048];\n mListener.onCarRunning();\n\n String message = \"\";\n\n int bytes;\n\n while (true) {\n try {\n bytes = mInputStream.read(byteForStream);\n\n message += new String(byteForStream, 0, bytes);\n Log.d(TAG, \" Read from inputstream \" + message);\n System.out.println(\"Message is\" + message);\n\n if (message.equals(\"Done\")){\n mListener.onCarNotRunning();\n\n }\n if (message.equals(\"Obstacle\")){\n mListener.onCarNotRunning();\n\n\n }\n if (message.equals(\"Continue\")){\n mListener.onCarRunning();\n\n }\n if(message.contains(\"*\")){\n GPSTracker.getInstance(myContext).setGPSstring(message);\n Log.d(TAG, \"Setting GPSString to \" + message);\n }\n\n\n\n } catch (Exception e) {\n Log.e(TAG, \" error reading from inputstream \" + e.getMessage());\n break;\n }\n }\n message = \"\";\n\n }", "public void process(){\n\n for(int i = 0; i < STEP_SIZE; i++){\n String tmp = \"\" + accData[i][0] + \",\" + accData[i][1] + \",\"+accData[i][2] +\n \",\" + gyData[i][0] + \",\" + gyData[i][1] + \",\" + gyData[i][2] + \"\\n\";\n try{\n stream.write(tmp.getBytes());\n }catch(Exception e){\n //Log.d(TAG,\"!!!\");\n }\n\n }\n\n /**\n * currently we don't apply zero-mean, unit-variance operation\n * to the data\n */\n // only accelerator's data is using, currently 200 * 3 floats\n // parse the 1D-array to 2D\n\n if(recognizer.isInRecognitionState() &&\n recognizer.getGlobalRecognitionTimes() >= Constants.MAX_GLOBAL_RECOGNITIOME_TIMES){\n recognizer.resetRecognitionState();\n }\n if(recognizer.isInRecognitionState()){\n recognizer.removeOutliers(accData);\n recognizer.removeOutliers(gyData);\n\n double [] feature = new double [FEATURE_SIZE];\n recognizer.extractFeatures(feature, accData, gyData);\n\n int result = recognizer.runModel(feature);\n String ret = \"@@@\";\n if(result != Constants.UNDEF_RET){\n if(result == Constants.FINISH_RET){\n mUserWarningService.playSpeech(\"Step\" + Integer.toString(recognizer.getLastGesture()) + Constants.RIGHT_GESTURE_INFO);\n waitForPlayout(2000);\n mUserWarningService.playSpeech(Constants.FINISH_INFO);\n waitForPlayout(1);\n recognizer.resetLastGesutre();\n recognizer.resetRecognitionState();\n ret += \"1\";\n }else if(result == Constants.RIGHT_RET){\n mUserWarningService.playSpeech(\"Step\" + Integer.toString(recognizer.getLastGesture()) + Constants.RIGHT_GESTURE_INFO);\n waitForPlayout(2000);\n mUserWarningService.playSpeech(\"Now please do Step \" + Integer.toString(recognizer.getExpectedGesture()));\n waitForPlayout(1);\n ret += \"1\";\n }else if(result == Constants.ERROR_RET){\n mUserWarningService.playSpeech(Constants.WRONG_GESTURE_WARNING + recognizer.getExpectedGesture());\n waitForPlayout(1);\n ret += \"0\";\n }else if(result == Constants.ERROR_AND_FORWARD_RET){\n mUserWarningService.playSpeech(Constants.WRONG_GESTURE_WARNING + recognizer.getLastGesture());\n waitForPlayout(1);\n if(recognizer.getExpectedGesture() <= Constants.STATE_SPACE){\n mUserWarningService.playSpeech(\n \"Step \" + recognizer.getLastGesture() + \"missing \" +\n \". Now please do Step\" + Integer.toString(recognizer.getExpectedGesture()));\n waitForPlayout(1);\n }else{\n recognizer.resetRecognitionState();\n mUserWarningService.playSpeech(\"Recognition finished.\");\n waitForPlayout(1);\n }\n\n\n ret += \"0\";\n }\n ret += \",\" + Integer.toString(result) + \"@@@\";\n\n Log.d(TAG, ret);\n Message msg = new Message();\n msg.obj = ret;\n mWriteThread.writeHandler.sendMessage(msg);\n }\n }\n\n }", "protected abstract void updateFaxJobFromInputDataImpl(T inputData,FaxJob faxJob);", "public interface PidInput\n {\n /**\n * This method is called by the PID controller to get input data from the feedback device. The feedback\n * device can be motor encoders, gyro, ultrasonic sensor, light sensor etc.\n *\n * @return input value of the feedback device.\n */\n double get();\n\n }", "@Override\r\n\tpublic boolean handleInput( Input input, HudRenderer renderer, float deltaTime )\r\n\t{\n\t\tList< TouchEvent > events = input.getTouchEvents();\r\n\t\tint eventsCount = events.size();\r\n\t\tTouchEvent event;\r\n\t\tfor ( int i = 0; i < eventsCount; ++i )\r\n\t\t{\r\n\t\t\tevent = events.get( i );\t\r\n\t\t\trenderer.getTouchPos( event.x, event.y, m_tmpTouchPos );\r\n\t\t\t\r\n\t\t\tif ( m_bb.doesOverlap( m_tmpTouchPos, null ) && ( event.type == Input.TouchEvent.TOUCH_DOWN || event.type == Input.TouchEvent.TOUCH_DOUBLE_TAP ) )\r\n\t\t\t{\t\t\t\t\t\r\n\t\t\t\t// notify listeners about it\r\n\t\t\t\tif ( m_msgSink != null )\r\n\t\t\t\t{\r\n\t\t\t\t\tm_msgSink.onButtonPressed( m_template.m_id );\r\n\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn false;\r\n\t}", "@Override\r\n public void onStart(ConnectedNode connectedNode) {\n Subscriber<diagnostic_msgs.DiagnosticStatus> inputSubscriber =\r\n connectedNode.newSubscriber(\"ftl_hardware_inputs\", diagnostic_msgs.DiagnosticStatus._TYPE);\r\n\r\n inputSubscriber.addMessageListener(new MessageListener<diagnostic_msgs.DiagnosticStatus>(){\r\n\r\n @Override\r\n public void onNewMessage(diagnostic_msgs.DiagnosticStatus msg) {\r\n // digitalIn, analogIn\r\n if (msg.getName() == \"digitalIn\") {\r\n // Handle Digital messages\r\n Map<Integer, Boolean> dInMap = new HashMap<>();\r\n for (diagnostic_msgs.KeyValue kvPair : msg.getValues()) {\r\n int port = Integer.parseInt(kvPair.getKey());\r\n boolean val = (kvPair.getValue() == \"true\" || kvPair.getValue() == \"1\");\r\n dInMap.put(port, val);\r\n }\r\n\r\n for (IHardwareListener listener: mListeners) {\r\n listener.onDigitalInputChanged(dInMap);\r\n }\r\n }\r\n else if (msg.getName() == \"analogIn\") {\r\n // Handle Analog messages\r\n Map<Integer, Double> aInMap = new HashMap<>();\r\n for (diagnostic_msgs.KeyValue kvPair : msg.getValues()) {\r\n int port = Integer.parseInt(kvPair.getKey());\r\n double val = Double.parseDouble(kvPair.getValue());\r\n aInMap.put(port, val);\r\n }\r\n\r\n for (IHardwareListener listener: mListeners) {\r\n listener.onAnalogInputChanged(aInMap);\r\n }\r\n }\r\n }\r\n });\r\n\r\n // Also set up the publisher\r\n Publisher<diagnostic_msgs.DiagnosticStatus> outputPublisher =\r\n connectedNode.newPublisher(\"ftl_hardware_outputs\", diagnostic_msgs.DiagnosticStatus._TYPE);\r\n\r\n // Set up the loop\r\n connectedNode.executeCancellableLoop(new CancellableLoop(){\r\n\r\n @Override\r\n protected void loop() throws InterruptedException {\r\n // Check to see if we have any new updates to send out\r\n if (mNewDigitalOutData) {\r\n // Make a local copy\r\n Map<Integer, Boolean> digitalOutCopy;\r\n\r\n synchronized(mDigitalOutLock) {\r\n digitalOutCopy = new HashMap<>();\r\n digitalOutCopy.putAll(mDigitalOutValues);\r\n mDigitalOutValues.clear();\r\n mNewDigitalOutData = false;\r\n }\r\n\r\n // Send it out\r\n if (digitalOutCopy != null) {\r\n diagnostic_msgs.DiagnosticStatus digitalMsg = outputPublisher.newMessage();\r\n digitalMsg.setName(\"digitalOut\");\r\n List<diagnostic_msgs.KeyValue> digitalOutKVs = new ArrayList<>();\r\n for (Entry<Integer, Boolean> valueEntry : digitalOutCopy.entrySet()) {\r\n String k = valueEntry.getKey().toString();\r\n String v = valueEntry.getValue() ? \"1\" : \"0\";\r\n diagnostic_msgs.KeyValue newKV =\r\n connectedNode.getTopicMessageFactory()\r\n .newFromType(diagnostic_msgs.KeyValue._TYPE);\r\n newKV.setKey(k);\r\n newKV.setValue(v);\r\n digitalOutKVs.add(newKV);\r\n }\r\n digitalMsg.setValues(digitalOutKVs);\r\n\r\n outputPublisher.publish(digitalMsg);\r\n }\r\n }\r\n\r\n if (mNewPWMOutData) {\r\n // Make a local copy\r\n Map<Integer, Double> pwmOutCopy;\r\n\r\n synchronized(mPWMOutLock) {\r\n pwmOutCopy = new HashMap<>();\r\n pwmOutCopy.putAll(mPWMOutValues);\r\n mPWMOutValues.clear();\r\n mNewPWMOutData = false;\r\n }\r\n\r\n // Send it out\r\n if (pwmOutCopy != null) {\r\n diagnostic_msgs.DiagnosticStatus pwmMsg = outputPublisher.newMessage();\r\n pwmMsg.setName(\"pwmOut\");\r\n List<diagnostic_msgs.KeyValue> pwmOutKVs = new ArrayList<>();\r\n for (Entry<Integer, Double> valueEntry : pwmOutCopy.entrySet()) {\r\n String k = valueEntry.getKey().toString();\r\n String v = valueEntry.getValue().toString();\r\n diagnostic_msgs.KeyValue newKV =\r\n connectedNode.getTopicMessageFactory()\r\n .newFromType(diagnostic_msgs.KeyValue._TYPE);\r\n newKV.setKey(k);\r\n newKV.setValue(v);\r\n pwmOutKVs.add(newKV);\r\n }\r\n pwmMsg.setValues(pwmOutKVs);\r\n\r\n outputPublisher.publish(pwmMsg);\r\n }\r\n }\r\n\r\n Thread.sleep(10);\r\n }\r\n });\r\n }", "@Override\n public void serialEvent(SerialPortEvent oEvent)\n {\n if (oEvent.getEventType() == SerialPortEvent.DATA_AVAILABLE) {\n try{\n String strIn = br.readLine();\n String[] strPara = strIn.split(\",\");\n if(strPara.length != 2){\n System.out.println(\"[Serial error]: \" + strIn);\n return;\n }\n\n // Check data validaty\n try{\n for(int i=0 ; i<strPara.length ; i++)\n Double.valueOf(strPara[i]);\n }\n catch(Exception e){\n System.out.println(\"[Serial error]: \" + strIn);\n return;\n }\n \n // Update data to window interface\n parent.setEMGData_From_SerialPort(strPara[0], strPara[1]);\n } \n catch (Exception e) {\n e.printStackTrace();\n }\n }\n // Ignore all the other eventTypes, but you should consider the other ones.\n\t}", "@Override\n\tpublic Object process(Object input) {\n\t\treturn filter.process((Waveform2)input);\n\t}", "private void TestSerialInput() {\r\n int now = GetMills(), nby = now - PrioSeriTime;\r\n SerialPortSwapper myPort = surrealPort;\r\n if (myPort == null) return; // otherwise test for input, fwd to listener..\r\n PrioSeriTime = now;\r\n if (SpeakEasy) if (nby > 222) // should be every ms, but seems not..\r\n System.out.println(FormatMillis(\" (LATE TSI) +\", nby)\r\n + FormatMillis(\" @ \", now));\r\n if (CountingPulses > 0) { // once each second, ask for current count..\r\n PCtime = PCtime + nby; // count actual elapsed time\r\n if (PCtime >= CountingPulses) { // always logs..\r\n Send3bytes(REPORT_PULSECOUNT, 0, 0); // pin + is ignored\r\n PCtime = PCtime - CountingPulses;\r\n }\r\n } //~if\r\n try {\r\n nby = surrealPort.getInputBufferBytesCount();\r\n if (nby <= 0) return;\r\n if (OneSerEvt == null) // ProcInp only looks at type, so keep this one..\r\n OneSerEvt = new SerialPortEvent(\r\n CommPortNo, SerialPort.MASK_RXCHAR, nby);\r\n ProcessInput(OneSerEvt);\r\n } catch (Exception ex) {\r\n System.out.println(ex);\r\n }\r\n }", "public abstract void read(DataInput input) throws IOException;", "@Override\n\tpublic void inputEnded() {\n\t\t\n\t}", "private void processInput(byte b) throws IOException {\n\t\ttry {\n\t\t\tProtocol protocol = Protocol.fromValue(b);\n\t\t\tprocessInput(protocol);\n\t\t} catch (IllegalArgumentException e) {\n\t\t\tlogger.catching(e);\n\t\t}\n\t}", "@Override\n\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\ttry{\n\t\t\t\t\t\t Instrumentation inst = new Instrumentation();\n\t\t\t\t\t\t Log.d(\"lly\", \"press Input key\");\n\t\t\t\t\t\t inst.sendKeyDownUpSync( tEvent1.getKeyCode());\n\t\t\t\t\t\t \n\t\t\t\t\t\t}catch(Exception e ){\n\t\t\t\t\t\t Log.e(\"TAG\",\"Exception when sendKeyDownUpSync : \" + e.toString() );\n\t\t\t\t\t\t}\n\t\t\t\t\t}", "@Override\r\n public void ProcessControlPIN(PinDataControl ControlData) {\n }", "@Override\n public DataAttributes process(InputStream input) throws Ex {\n return null;\n }", "private void processCommand()\n {\n String vInput = this.aEntryField.getText();\n this.aEntryField.setText(\"\");\n\n this.aEngine.interpretCommand( vInput );\n }", "protected void readData(DataInput input) throws IOException {\n try {\n operationStatus = input.readByte();\n\n if (operationStatus != ProtocolOpcode.OPERATION_OK) {\n exception = input.readByte();\n } else {\n // We have already readed operation for the manual reflection\n int length = input.readInt();\n \n byte[] data = new byte[length];\n input.readFully(data);\n\n ByteArrayInputStream bin = new ByteArrayInputStream(data);\n ObjectInputStream oin = new ObjectInputStream(bin);\n returnValue = (KSNSerializableInterface) oin.readObject();\n }\n } catch (Exception ex) {\n ex.printStackTrace();\n }\n }", "private void stepInput(final Port port) {\n // Continuously read from all ports, set output to last received value.\n final Pipe receivingPipe = getCasing().getReceivingPipe(getFace(), port);\n if (!receivingPipe.isReading()) {\n receivingPipe.beginRead();\n }\n if (receivingPipe.canTransfer()) {\n setRedstoneOutput(receivingPipe.read());\n }\n }", "@Override\n\t\tpublic void serialEvent(SerialPortEvent evt) {\n\t\t\ttry {\n\t\t\t\tswitch (evt.getEventType()) {\n\t\t\t\tcase SerialPortEvent.DATA_AVAILABLE:\n\t\t\t\t\tif (input == null) {\n\t\t\t\t\t\tinput = new BufferedReader(new InputStreamReader(\n\t\t\t\t\t\t\t\tserialPort.getInputStream()));\n\t\t\t\t\t}\n\t\t\t\t\tString inputLine = input.readLine();\n\t\t\t\t\tSystem.out.println(inputLine);\n\t\t\t\t\tserialReturn = inputLine;\n\t\t\t\t\tbreak;\n\n\t\t\t\tdefault:\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} catch (Exception e) {\n\t\t\t\tSystem.err.println(e.toString());\n\t\t\t}\n\n\t\t}", "@Override\n public Word input(){ \n System.out.println(\"[IO]: Error - Tried to receive from printer.\");\n return null;\n }", "@Override\r\n\tpublic synchronized void serialEvent(SerialPortEvent oEvent) {\r\n\t\tif (oEvent.getEventType() == SerialPortEvent.DATA_AVAILABLE) {\r\n\t\t\ttry {\r\n\t\t\t\tint available = input.available();\r\n\t\t\t\tbyte chunk[] = new byte[available];\r\n\t\t\t\tinput.read(chunk, 0, available);\r\n\r\n\t\t\t\t// Displayed results are codepage dependent\r\n\r\n\t\t\t\tfor (int c = 0; c < chunk.length; c++) {\r\n\r\n\t\t\t\t\tSystem.out.println(\"recieve:\" + (chunk[c] + 512) % 256);\r\n\t\t\t\t}\r\n\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\tSystem.out.println(\"here atleastttttttt\");\r\n\t\t\t\tSystem.err.println(e.toString());\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void handleSensorEvents(){\n\t}", "void setInput(com.indosat.eai.catalist.standardInputOutput.DummyInputType input);", "private void process() {\n Machine newEnigma = readConfig();\n String configLine = _input.nextLine();\n\n if (configLine.charAt(0) != '*') {\n throw error(\"wrong input format, missing *\");\n }\n\n while (_input.hasNextLine()) {\n setUp(newEnigma, configLine);\n String inputLine = _input.nextLine();\n while (!inputLine.contains(\"*\")) {\n if (inputLine.isEmpty()) {\n _output.println();\n }\n if (_input.hasNextLine()) {\n String inputMessage = inputLine.replaceAll(\"\\\\s+\", \"\")\n .toUpperCase();\n printMessageLine(newEnigma.convert(inputMessage));\n inputLine = _input.nextLine();\n } else {\n String inputMessage = inputLine.replaceAll(\"\\\\s+\", \"\")\n .toUpperCase();\n printMessageLine(newEnigma.convert(inputMessage));\n break;\n }\n }\n }\n }", "@Override\r\n\tprotected void processInWifiEvent(InWifiEvent arg0) {\n\t\t\r\n\t}", "@Override\r\n public void getInput() { \r\n \r\n String command;\r\n Scanner inFile = new Scanner(System.in);\r\n \r\n do {\r\n \r\n this.display();\r\n \r\n command = inFile.nextLine();\r\n command = command.trim().toUpperCase();\r\n \r\n switch (command) {\r\n case \"B\":\r\n this.helpMenuControl.displayBoardHelp();\r\n break;\r\n case \"C\":\r\n this.helpMenuControl.displayComputerPlayerHelp();\r\n break;\r\n case \"G\":\r\n this.helpMenuControl.displayGameHelp();\r\n break; \r\n case \"Q\": \r\n break;\r\n default: \r\n new Connect4Error().displayError(\"Invalid command. Please enter a valid command.\");\r\n }\r\n } while (!command.equals(\"Q\")); \r\n }", "@Override\n public void handleMessage(Message msg){\n switch (msg.what) {\n case PSensor.MESSAGE_STATE_CHANGE:\n break;\n case PSensor.MESSAGE_WRITE:\n break;\n case PSensor.MESSAGE_READ:\n PSensor.sensorData.parseInput((byte[])msg.obj);//parseInput((byte[])msg.obj);\n multiGauge.handleSensor(PSensor.sensorData.boost);\n multiGaugeVolts.handleSensor(PSensor.sensorData.batVolt);\n break;\n case PSensor.MESSAGE_DEVICE_NAME:\n break;\n case PSensor.MESSAGE_TOAST:\n break;\n default:\n break;\n }\n }", "public void serialEvent(SerialPortEvent e)\n {\n System.out.println(\"+++SERIAL EVENT TYPE ++++++++++++++++ : \"+e.getEventType());\n ezlink.info(\"serialEvent() received in \" + SerialConnection.class.getName());\n \t// Create a StringBuffer and int to receive input data.\n\tStringBuffer inputBuffer = new StringBuffer();\n\tint newData = 0;\n\n\t// Determine type of event.\n\tswitch (e.getEventType())\n\t{\n\n\t // Read data until -1 is returned. If \\r is received substitute\n\t // \\n for correct newline handling.\n\t case SerialPortEvent.DATA_AVAILABLE:\n\t byte[] readBuffer = new byte[500];\n\t\tint numBytes = 0;\n\t\tinputdata = null;\n\n\t\ttry {\n\t\t\t\tSystem.out.println(\"Data Received from com Port=\"+is.available());\n ezlink.info(\"Data Received from com Port= \" +is.available() );\n\n\t\t\t\twhile (is.available() > 0)\n\t\t\t\t{\n\t\t\t\t\tnumBytes = is.read(readBuffer);\n\t\t\t\t\tdataHandler.addISOPart(ISOUtil.hexString(readBuffer,0,numBytes));\n\n\t\t\t\t}\n\n\n\t\t\t\tString strResponse=null;\n\t\t\t\tif((strResponse = dataHandler.getNextISO(1)) !=null)\n\t\t\t\t{\n\t\t\t\t\tSystem.out.println(\"Response=\"+strResponse);\n ezlink.info(\"Response= : \" +strResponse );\n\t\t\t\t\tinputdata = strResponse;\n\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tSystem.out.println(\"Full data not received from terminal\");\n ezlink.info(\"ull data not received from terminal!! \" );\n\t\t\t\t}\n\n\t\t\t\tdataRec =true;\n\n\t\t} catch (IOException exp) {\n System.out.println(\"serialEvent Exception(): \");\n exp.printStackTrace();\n System.out.println(\"serialEvent Exception(): \");\n ezlink.info(\"serialEvent Exception(): \");\n ezlink.error(new Object(), exp);\n }\n\n\t\tbreak;\n\n\t // If break event append BREAK RECEIVED message.\n\t case SerialPortEvent.BI:\n\t\tSystem.out.println(\"\\n--- BREAK RECEIVED ---\\n\");\n ezlink.info(\"\\n--- BREAK RECEIVED ---\\n \" );\n\t}\n\n }", "@Override\n public DataAttributes process(InputStream input,\n DataAttributes dataAttributes) throws Ex {\n return null;\n }", "@Override\n\tpublic void readData(DataInputStream input) throws IOException {\n\t\t\n\t}", "public void configurableDataInput() {\n }", "public T process(T input, ScopeInformation scopeInfo);", "public boolean handleDeviceData(Device device, String group, String set, String deviceData) throws IOException;", "@Override\n\t\tpublic void onEvent(Event event) throws Exception {\n\t\t\tInputEvent inputEvent = (InputEvent) event;\n\t\t\tString input = inputEvent.getValue();\n\t\t\tloadData(input);\n\t\t}", "private void handleInput() {\n\n // Get the input string and check if its not empty\n String text = textInput.getText().toString();\n if (text.equals(\"\\n\")) {\n textInput.setText(\"\");\n return;\n }\n // remove empty line\n if (text.length() >= 2 && text.endsWith(\"\\n\")) text = text.substring(0, text.length() - 1);\n\n if (TextUtils.isEmpty(text)) return;\n textInput.setText(\"\");\n\n myGame.onInputString(text);\n }", "private void consumeInputWire(final NHttpClientEventHandler handler) {\n if (getContext() == null) {\n return;\n }\n SynapseWireLogHolder logHolder = null;\n if (getContext().getAttribute(SynapseDebugInfoHolder.SYNAPSE_WIRE_LOG_HOLDER_PROPERTY) != null) {\n logHolder = (SynapseWireLogHolder) getContext().getAttribute(SynapseDebugInfoHolder.SYNAPSE_WIRE_LOG_HOLDER_PROPERTY);\n } else {\n logHolder = new SynapseWireLogHolder();\n }\n synchronized (logHolder) {\n logHolder.setPhase(SynapseWireLogHolder.PHASE.TARGET_RESPONSE_READY);\n getContext().setAttribute(SynapseDebugInfoHolder.SYNAPSE_WIRE_LOG_HOLDER_PROPERTY, logHolder);\n if (this.status != ACTIVE) {\n this.session.clearEvent(EventMask.READ);\n return;\n }\n try {\n if (this.response == null) {\n int bytesRead;\n do {\n bytesRead = this.responseParser.fillBuffer(this.session.channel());\n if (bytesRead > 0) {\n this.inTransportMetrics.incrementBytesTransferred(bytesRead);\n }\n this.response = this.responseParser.parse();\n } while (bytesRead > 0 && this.response == null);\n if (this.response != null) {\n if (this.response.getStatusLine().getStatusCode() >= 200) {\n final HttpEntity entity = prepareDecoder(this.response);\n this.response.setEntity(entity);\n this.connMetrics.incrementResponseCount();\n }\n this.hasBufferedInput = this.inbuf.hasData();\n onResponseReceived(this.response);\n handler.responseReceived(this);\n if (this.contentDecoder == null) {\n resetInput();\n }\n }\n if (bytesRead == -1 && !this.inbuf.hasData()) {\n handler.endOfInput(this);\n }\n }\n if (this.contentDecoder != null && (this.session.getEventMask() & SelectionKey.OP_READ) > 0) {\n handler.inputReady(this, this.contentDecoder);\n if (this.contentDecoder.isCompleted()) {\n //This is the place where it finishes the response read from back-ends\n if (getContext().getAttribute(SynapseDebugInfoHolder.SYNAPSE_WIRE_LOG_HOLDER_PROPERTY) != null) {\n logHolder = (SynapseWireLogHolder) getContext().getAttribute(SynapseDebugInfoHolder.SYNAPSE_WIRE_LOG_HOLDER_PROPERTY);\n logHolder.setPhase(SynapseWireLogHolder.PHASE.TARGET_RESPONSE_DONE);\n getContext().setAttribute(SynapseDebugInfoHolder.SYNAPSE_WIRE_LOG_HOLDER_PROPERTY, logHolder);\n }\n // Response entity received\n // Ready to receive a new response\n resetInput();\n }\n }\n } catch (final HttpException ex) {\n resetInput();\n handler.exception(this, ex);\n } catch (final Exception ex) {\n handler.exception(this, ex);\n } finally {\n if (getContext().getAttribute(SynapseDebugInfoHolder.SYNAPSE_WIRE_LOG_HOLDER_PROPERTY) != null) {\n logHolder = (SynapseWireLogHolder) getContext().getAttribute(SynapseDebugInfoHolder.SYNAPSE_WIRE_LOG_HOLDER_PROPERTY);\n logHolder.setPhase(SynapseWireLogHolder.PHASE.TARGET_RESPONSE_DONE);\n getContext().setAttribute(SynapseDebugInfoHolder.SYNAPSE_WIRE_LOG_HOLDER_PROPERTY, logHolder);\n }\n // Finally set buffered input flag\n this.hasBufferedInput = this.inbuf.hasData();\n }\n }\n }", "private void getUserInput() {\n getUserTextInput();\n getUserPhotoChoice();\n getUserRoomChoice();\n getUserBedroomsChoice();\n getUserBathroomsChoice();\n getUserCoownerChoice();\n getUserIsSoldChoice();\n getUserTypeChoice();\n mAmenitiesInput = Utils.getUserAmenitiesChoice(mBinding.chipGroupAmenities.chipSchool,\n mBinding.chipGroupAmenities.chipShop, mBinding.chipGroupAmenities.chipTransport,\n mBinding.chipGroupAmenities.chipGarden);\n }", "private void executeSimpleProcess(T input) {\n\t\ttry {\n\t\t\tprocess.accept(input, 0);\n\t\t\tdone(false);\n\t\t} catch (RuntimeException ex) {\n\t\t\tlog.error(ex.getMessage(), ex);\n\t\t\t// exception during size estimation\n\t\t\tshowNotification(ex.getMessage());\n\t\t\tsignalDone(true);\n\t\t}\n\t}", "public void read() {\n try {\n pw = new PrintWriter(System.out, true);\n br = new BufferedReader(new InputStreamReader(System.in));\n input = br.readLine();\n while (input != null) {\n CM.processCommand(input, pw, true);\n input = br.readLine();\n }\n } catch (IOException ioe) {\n pw.println(\"ERROR: Problem with reading user input.\");\n } finally {\n try {\n br.close();\n } catch (IOException ioe) {\n pw.println(\"ERROR: Buffer DNE\");\n }\n }\n }", "public interface AudioInputLine extends AbstractLine {\n\n /**\n * Fill given buffer with mic captured data\n *\n * @param buffer where to put data\n * @param offset start position\n * @param length amount of byte to put\n * @return actual amount of reade bytes\n */\n\n int readNonBlocking(byte[] buffer, int offset, int length);\n\n /**\n * Short cut for read\n *\n * @param buffer to fill with data\n * @return actual amount of reade bytes\n */\n\n default int readNonBlocking(byte[] buffer) {\n return readNonBlocking(buffer, 0, buffer.length);\n }\n\n /**\n * Blocking read\n *\n * @param buffer to fill\n * @param offset buffer start position\n * @param length amount of bytes to read\n * @return actual number of read bytes from underlying device buffer\n */\n\n int readBlocking(byte[] buffer, int offset, int length);\n\n /**\n * Blocking read for full buffer\n *\n * @param buffer to fill\n * @return actual number of read bytes from underlying device buffer\n */\n\n default int readBlocking(byte[] buffer) {\n return readBlocking(buffer, 0, buffer.length);\n }\n}" ]
[ "0.7214011", "0.7151976", "0.65762067", "0.65731657", "0.65726626", "0.6507743", "0.6500181", "0.6392133", "0.6388394", "0.63386554", "0.6266778", "0.6225161", "0.6202829", "0.610575", "0.60833144", "0.6043853", "0.6004619", "0.5993477", "0.5990771", "0.5968786", "0.59640336", "0.59297043", "0.59236133", "0.5887108", "0.58663994", "0.5847558", "0.58462816", "0.58460337", "0.5839698", "0.5838859", "0.5764322", "0.5747065", "0.57406706", "0.57194173", "0.5713994", "0.56858814", "0.56817454", "0.5655167", "0.56540835", "0.5650774", "0.56470937", "0.5613952", "0.5601647", "0.55693346", "0.5539538", "0.55358976", "0.5535384", "0.55311203", "0.54915136", "0.5484856", "0.548043", "0.5456182", "0.5440097", "0.54381657", "0.5435573", "0.5432955", "0.5432461", "0.54300505", "0.54216576", "0.5417408", "0.54166996", "0.5412211", "0.54062504", "0.54044074", "0.53998107", "0.5389769", "0.53892434", "0.5387361", "0.5378757", "0.5376413", "0.53743565", "0.5373272", "0.53709596", "0.5355635", "0.53522754", "0.5348786", "0.53484726", "0.5342138", "0.534", "0.5337475", "0.5334125", "0.53338426", "0.531987", "0.5316515", "0.5315216", "0.53134173", "0.53105646", "0.53099614", "0.52943945", "0.52818805", "0.5279815", "0.5273407", "0.5273115", "0.5271278", "0.52648574", "0.5264354", "0.5260906", "0.5256345", "0.5249101", "0.5243318" ]
0.5786151
30
DB2 Multidatabase JDBC Connection constructor.
public DB2MultiDbJDBCConnection(Connection dbConnection, boolean readOnly, JDBCDataContainerConfig containerConfig) throws SQLException { super(dbConnection, readOnly, containerConfig); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public DataBaseConnector()\n {\n dataSource = new SQLServerDataSource();\n dataSource.setServerName(\"EASV-DB2\");\n dataSource.setPortNumber(1433);\n dataSource.setDatabaseName(\"AutistMovies\");\n dataSource.setUser(\"CS2017A_15\");\n dataSource.setPassword(\"Bjoernhart1234\");\n }", "private Connection getConnection() throws SQLException{\n return DriverManager.getConnection(\"jdbc:h2:file:./target/db/testdb;MODE=MYSQL\", \"anonymous\", \"\");\n }", "public DBConn(){\n\t\t//Create a variable for the connection string.\n\t\tthis.connectionUrl = \"jdbc:sqlserver://localhost:1433;\" +\n\t\t \"databaseName=CSE132B; username=sa; password=cse132b\";\t\t//Daniel: integratedSecurity=true;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//Kalvin: username=sa; password=cse132b\n\n\t\t// Declare the JDBC objects.\n\t\tthis.conn = null;\n\t\tthis.stmt = null;\n\t\tthis.rs = null;\n\t}", "public DatabaseConnector() {\n String dbname = \"jdbc/jobs\";\n\n try {\n ds = (DataSource) new InitialContext().lookup(\"java:comp/env/\" + dbname);\n } catch (NamingException e) {\n System.err.println(dbname + \" is missing: \" + e.toString());\n }\n }", "Connection getConnection() throws SQLException;", "Connection getConnection() throws SQLException;", "Connection getConnection(String database, String schema, String jdbcURL, String jdbcURLParameters, String user, String password, boolean createDB, boolean createSchema, boolean dropDBIfExist) throws Exception;", "private Connection connect_db() {\n MysqlDataSource dataSource = new MysqlDataSource();\n dataSource.setUser(db_user);\n dataSource.setPassword(db_pass);\n dataSource.setServerName(db_url);\n dataSource.setDatabaseName(db_database);\n\n Connection conn = null;\n try {\n conn = dataSource.getConnection();\n conn.setAutoCommit(false);\n } catch (SQLException e) {\n System.out.println(e.getMessage());\n }\n return conn;\n }", "public final DBI getConnect() {\n try {\n Class.forName(\"com.mysql.cj.jdbc.Driver\");\n // String dbc = System.getenv(\"DB_CONNECTION\");\n // if (dbc == null || dbc.equals(\"\")) {\n // dbc = \"localhost:3306\";\n // }\n // DBI dbi = new DBI(\"jdbc:mysql://\" + dbc + \"/MLPXX?allowPublicKeyRetrieval=true&useSSL=false\", \"MLPXX\", \"MLPXX\");\n DBI dbi = new DBI(\"jdbc:mysql://localhost:3306/MLPXX?allowPublicKeyRetrieval=true&useSSL=false\", \"MLPXX\", \"MLPXX\");\n\n //DBI dbi = new DBI(\"jdbc:mysql://\" + dbc + \"/MLPXX?useSSL=false\", \"MLPXX\", \"MLPXX\");\n // dbi.setSQLLog(new PrintStreamLog());\n return dbi;\n } catch (ClassNotFoundException e) {\n //return null;\n throw new RuntimeException(e);\n }\n }", "@Override\n public Connection getConnection() throws SQLException {\n final Props info = new Props();\n if (this.user != null) {\n info.setProperty(\"user\", this.user);\n }\n if (this.pass != null) {\n info.setProperty(\"password\", this.pass);\n }\n\n // 其它参数\n final Properties connProps = this.connProps;\n if (MapUtil.isNotEmpty(connProps)) {\n info.putAll(connProps);\n }\n\n return DriverManager.getConnection(this.url, info);\n }", "public static Connection getConnection(String host) throws DBException {\n Connection con = null;\n StringBuilder url = new StringBuilder(\"jdbc:db2://\");\n try {\n Class.forName(\"com.mysql.jdbc.Driver\");\n url.append(host);\n con = DriverManager.getConnection(url.toString());\n } catch (ClassNotFoundException e) {\n throw new DBException(\"ClassNotFoundException: driver not found! (com.mysql.jdbc.Driver)\", e);\n } catch (SQLException e) {\n throw new DBException(\"SQLException: \" + e.getMessage(), e);\n }\n return con;\n }", "private Database() throws SQLException {\n con = DriverManager.getConnection(\"jdbc:oracle:thin:@localhost:1521:MusicAlbums\", \"c##dba\", \"sql\");\n }", "public DataConnection() {\n\t\ttry {\n\t\t\tString dbClass = \"com.mysql.jdbc.Driver\";\n\t\t\tClass.forName(dbClass).newInstance();\n\t\t\tConnection con = DriverManager.getConnection(DIR_DB, USER_DB, PASS_DB);\n\t\t\tstatement = con.createStatement();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "private DatabaseManager(String database, String user, String password) throws SQLException, ClassNotFoundException {\n\t\tthis.conn = DriverManager.getConnection(database, user, password);\t\n\t}", "public DbConnection() throws SQLException, ClassNotFoundException {\r\n\t\tClass.forName (DRIVER);\r\n\t\tconn = DriverManager.getConnection(CONNECTION, \"JavaDev\", \"password\");\r\n\t\tstmt = conn.createStatement();\r\n\t}", "public static Connection getConnectionToDB() {\n\t\tProperties properties = getProperties();\n\n\t\ttry {\n\t\t\tmyConnection = DriverManager.getConnection(JDBC_URL, properties);\n\t\t\treturn myConnection;\n\t\t} catch (Exception ex) {\n\t\t\tex.printStackTrace();\n\t\t\treturn null;\n\t\t}\n\t}", "private static Connection getConnection() throws SQLException {\n return DriverManager.getConnection(\"jdbc:derby:derbyDB\");\n }", "private Connection getConnection() throws ClassNotFoundException, SQLException {\n\n log.info(\"Get DB connection\");\n\n String url = AppConfig.getInstance().getProperty(\"db.URL\") +\n AppConfig.getInstance().getProperty(\"db.schema\") +\n AppConfig.getInstance().getProperty(\"db.options\");\n String sDBUser = AppConfig.getInstance().getProperty(\"db.user\");\n String sDBPassword = AppConfig.getInstance().getProperty(\"db.password\");\n\n if (sDBUser != null && sDBPassword != null && sDBPassword.startsWith(\"crypt:\")) {\n AltEncrypter cypher = new AltEncrypter(\"cypherkey\" + sDBUser);\n sDBPassword = cypher.decrypt(sDBPassword.substring(6));\n }\n\n return DriverManager.getConnection(url, sDBUser, sDBPassword);\n }", "public DatabaseInterface(String url) throws SQLException {\n sql = DriverManager.getConnection(url);\n }", "private Connection getConnection() throws SQLException { //gets and returns a connection to the database at the file path specified when the object was instantiated\n return DriverManager.getConnection(\"jdbc:sqlite:\" + databasePath); //returns the connection to the specified database\n }", "abstract Connection getConnection() throws SQLException;", "private static Connection newConnection() throws SQLException {\n\t\tOracleDataSource ods = new OracleDataSource();\n\t\tods.setURL(dburl);\n\t\tConnection conn = ods.getConnection();\n\t\treturn conn;\n\t}", "public abstract Connection getConnection(String user, String password) throws SQLException;", "@Override\n\tpublic Connection getConnection() throws SQLException {\n\t\tConnection conn;\n\t\tconn = ConnectionFactory.getInstance().getConnection();\n\t\treturn conn;\n\t}", "public DataBase(String jdbc,String type,String link,String port,String db,String username, String password) throws SQLException{\r\n\t\tcon = null;\r\n\t\ttry {\r\n\t\t\tClass.forName(\"org.postgresql.Driver\");\r\n\t\t\tcon = DriverManager.getConnection(jdbc+\":\"+type+\"://\"+link+\":\"+port+\"/\"+db,username, password);\r\n\t\t\tcon.setAutoCommit(false);\r\n\t\t\tSystem.out.println(\"Opened database successfully\");\r\n\t\t} catch (ClassNotFoundException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\t\t\r\n\t}", "public static Connection getInstance (){\n\tString url =\"jdbc:informix-sqli://192.168.10.18:4526/teun0020:informixserver=aix2;DB_LOCALE=zh_tw.utf8;CLIENT_LOCALE=zh_tw.utf8;GL_USEGLU=1\";\r\n\tString username = \"srismapp\";\r\n\tString password =\"ris31123\";\r\n\tString driver = \"com.informix.jdbc.IfxDriver\";\t\r\n\tConnection conn=null;\r\n\ttry {\r\n\t Class.forName(driver);\r\n\t conn = DriverManager.getConnection(url, username, password);\r\n\t} catch (SQLException e) {\r\n\t e.printStackTrace();\r\n\t} catch (ClassNotFoundException e) {\r\n\t e.printStackTrace();\r\n\t}\r\n\treturn conn;\r\n }", "private Connection dbConnection() {\n\t\t\n\t\t///\n\t\t/// declare local variables\n\t\t///\n\t\t\n\t\tConnection result = null;\t// holds the resulting connection\n\t\t\n\t\t// try to make the connection\n\t\ttry {\n\t\t\tClass.forName(\"org.sqlite.JDBC\");\n\t\t\tresult = DriverManager.getConnection(CONNECTION_STRING);\n\t\t} catch (Exception ex) {\n\t\t\tSystem.out.println(ex.getMessage());\n\t\t}\n\t\t\n\t\t// return the resulting connection\n\t\treturn result;\n\t\t\n\t}", "public GcJdbcConnectionBean connectionBean() throws SQLException;", "public DatabaseConnection newConnection();", "public static Connection getConnection(String host, String username, String password) throws DBException {\n Connection con = null;\n StringBuilder url = new StringBuilder(\"jdbc:db2://\");\n try {\n Class.forName(\"com.mysql.jdbc.Driver\");\n url.append(host);\n con = DriverManager.getConnection(url.toString(), username, password);\n } catch (ClassNotFoundException e) {\n throw new DBException(\"ClassNotFoundException: driver not found! (com.mysql.jdbc.Driver)\", e);\n } catch (SQLException e) {\n throw new DBException(\"SQLException: \" + e.getMessage(), e);\n }\n return con;\n }", "public CoreDatabase(String dbName) throws SQLException {\n\n this.conn = DriverManager.getConnection(\n SQLITE_URL + dbName + EXTENSION\n );\n\n }", "public DBMySQL(String user, String password, String JDBC)\n {\n super(user, password, JDBC);\n }", "public static Connection createConnection() throws SQLException, NamingException {\n DATA_SOURCE.init();\n return DATA_SOURCE.getConnection();\n }", "public Connection connect(String filename) throws SQLException {\n //System.out.printf(\"Connecting to the database %s.%n\", filename);\n /* \n * Connect to the database (file). If the file does not exist, create it.\n */\n Connection db_connection = DriverManager.getConnection(SQLITEDBPATH + filename);\n //System.out.printf(\"Connection to the database has been established.%n\");\n /* \n * Get the database metadata.\n */\n DatabaseMetaData meta = db_connection.getMetaData();\n //System.out.printf(\"The driver name is %s.%n\", meta.getDriverName());\n \n return db_connection;\n }", "public DBConnection() {\n this(DB_USER, DB_PASSWORD, DB_NAME, DB_HOST, DB_PORT);\n }", "public Connection getDBConnection()\r\n {\r\n Connection conn = null;\r\n try\r\n {\r\n // Quitamos los drivers\r\n Enumeration e = DriverManager.getDrivers();\r\n while (e.hasMoreElements())\r\n {\r\n DriverManager.deregisterDriver((Driver) e.nextElement());\r\n }\r\n DriverManager.registerDriver(new com.geopista.sql.GEOPISTADriver());\r\n String sConn = aplicacion.getString(UserPreferenceConstants.LOCALGIS_DATABASE_URL);\r\n conn = DriverManager.getConnection(sConn);\r\n AppContext app = (AppContext) AppContext.getApplicationContext();\r\n conn = app.getConnection();\r\n conn.setAutoCommit(false);\r\n } catch (Exception e)\r\n {\r\n return null;\r\n }\r\n return conn;\r\n }", "public void initConnection() throws DatabaseConnectionException, SQLException {\n\t\t\tString connectionString = DBMS+\"://\" + SERVER + \":\" + PORT + \"/\" + DATABASE;\n\t\t\ttry{\n\t\t\t\tClass.forName(DRIVER_CLASS_NAME).newInstance();\n\t\t\t}catch(Exception e){\n\t\t\t\tSystem.err.println(\"IMPOSSIBILE TROVARE DRIVER\");\n\t\t\t\n\t\t\t}\n\t\t\ttry{\n\t\t\t\tconn=DriverManager.getConnection(connectionString, USER_ID, PASSWORD);\n\t\t\t\t\n\t\t\t}catch(SQLException e){\n\t\t\t\tSystem.err.println(\"IMPOSSIBILE STABILIRE CONNESSIONE DATABASE\");\n\t\t\t\t\n\t\t\t}\n\t\t}", "public static Connection fetchDBConnection() throws ClassNotFoundException,SQLException\n\t{\n\t//load type IV MySql supplies JDBC driver class, under method area(meta space)\n\t\tClass.forName(\"com.mysql.cj.jdbc.Driver\");\n\t\t//get the fix connection to DB\n\t\tString url=\"jdbc:mysql://localhost:3306/acts?useSSl=false\";\n\t\treturn DriverManager.getConnection(url, \"root\", \"manoj1997\");\n\t}", "private Connection getConnection()\n/* */ throws Exception\n/* */ {\n/* 1371 */ DBParamsParser dbparamsparser = null;\n/* */ try {\n/* 1373 */ Thread.sleep(3000L);\n/* 1374 */ dbparamsparser = DBParamsParser.getInstance(new File(\".\" + File.separator + \"conf\" + File.separator + \"database_params.conf\"));\n/* */ }\n/* */ catch (Exception exception) {\n/* 1377 */ exception.printStackTrace();\n/* 1378 */ return null;\n/* */ }\n/* 1380 */ String s = dbparamsparser.getURL();\n/* 1381 */ Object obj = null;\n/* 1382 */ Object obj1 = null;\n/* */ try {\n/* 1384 */ Driver driver = (Driver)Class.forName(dbparamsparser.getDriverName()).newInstance();\n/* 1385 */ Properties properties = new Properties();\n/* 1386 */ properties.put(\"user\", dbparamsparser.getUserName());\n/* 1387 */ if (dbparamsparser.getPassword() != null)\n/* */ {\n/* 1389 */ properties.put(\"password\", dbparamsparser.getPassword());\n/* */ }\n/* 1391 */ return driver.connect(s, properties);\n/* */ }\n/* */ catch (Exception exception1) {}\n/* */ \n/* 1395 */ return null;\n/* */ }", "public static Connection connectDB(){\n Connection conn = null; //initialize the connection\n try {\n //STEP 2: Register JDBC driver\n Class.forName(\"org.apache.derby.jdbc.ClientDriver\");\n\n //STEP 3: Open a connection\n System.out.println(\"Connecting to database...\");\n conn = DriverManager.getConnection(DB_URL);\n } catch (SQLException se) {\n //Handle errors for JDBC\n se.printStackTrace();\n } catch (Exception e) {\n //Handle errors for Class.forName\n e.printStackTrace();\n }\n return conn;\n }", "public Connection getConnection() throws SQLException {\n String connectionUrl = \"jdbc:postgresql://\" + url + \":\" + port + \"/\" + database;\n return DriverManager.getConnection(connectionUrl, SISOBProperties.getDataBackendUsername(), SISOBProperties.getDataBackendPassword());\n }", "public static Connection getDbConnection() throws SQLException {\n return getDbConnection(FxContext.get().getDivisionId());\n }", "public Connection getConnection() throws ClassNotFoundException, SQLException {\n logger.info(\"Create DB connection\");\n Class.forName(\"com.mysql.cj.jdbc.Driver\");\n return DriverManager.getConnection(\n \"jdbc:mysql://localhost:3306/prod\",\"root\",\"rootroot\");\n }", "public DatabaseManager() {\n try {\n con = DriverManager.getConnection(DB_URL, \"root\", \"marko\");\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }", "public Database() throws SQLException {\n conn = DriverManager.getConnection(dbURL, username, password);\n }", "private Connection getConnection() throws SQLException{\n return ds.getConnection();\n }", "protected Connection createConnection() throws SQLException {\n return this.dataSourceUtils.getConnection();\n }", "public static String getConnectionDB(){\n return \"jdbc:mysql://\" + hostname +\":\"+ port+\"/\" + database;\n }", "public static Connection createConnection() throws SQLException {\n\t\t// DriverManager.setLogStream( System.out );\n\t\ttry {\n\t\t\tClass.forName(\"smallsql.jdbc.SSDriver\");\n\t\t} catch (ClassNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn DriverManager.getConnection(JDBC_URL + \"?create=true;locale=en\");\n\t}", "public StudentDAO() throws SQLException {\n studentConn = DriverManager.getConnection(jdbcURL, jdbcUsername, jdbcPassword);\n }", "public DbConnection(String db_file_name_prefix) throws Exception { // note more general exception\n\n\t\tClass.forName(\"org.hsqldb.jdbcDriver\");\n\n\t\tconn = DriverManager.getConnection(\"jdbc:hsqldb:\"\n\t\t\t\t+ db_file_name_prefix, // filenames\n\t\t\t\t\"sa\", // username\n\t\t\"\"); // password\n\t}", "public DBConnections(Context context) {\n super(context, DbName, null, 1);\n\n }", "public Connection connectToDB() throws SQLException {\n\n\t if (conn == null) try {\n\n\t Class.forName(DRIVERCLASS);\n\t \n\t //system.out.println(\"驱动加载成功\");\n\t \n\t //system.out.println(\"数据库连接建立成功\");\n\t \n\t conn = DriverManager.getConnection(URL, USERNAME, PASSWORD);\n\n\t connset.add(conn);\n\n\t } \n\n\t catch (ClassNotFoundException ex) {\n\t \t\n\t //system.out.println(\"加载数据库驱动程序异常\");\n\t \n\t ex.printStackTrace();\n\n\t }\n\n\t return conn;\n\n\t }", "BSQL2Java2 createBSQL2Java2();", "public DBManager(){\r\n connect(DBConstant.driver,DBConstant.connetionstring);\r\n }", "public static Connection getConnection() throws SQLException {\n\t\t// Create a connection reference var\n\t\tConnection con = null;\n\n\t\t// Int. driver obj from our dependency, connect w/ JDBC\n\t\tDriver postgresDriver = new Driver();\n\t\tDriverManager.registerDriver(postgresDriver);\n\n\t\t// Get database location/credentials from environmental variables\n\t\tString url = System.getenv(\"db_url\");\n\t\tString username = System.getenv(\"db_username\");\n\t\tString password = System.getenv(\"db_password\");\n\t\t\n\t\t// Connect to db and assign to con var.\n\t\tcon = DriverManager.getConnection(url, username, password);\n\n\t\t// Return con, allowing calling class/method etc to use the connection\n\t\treturn con;\n\t}", "public static DataSource MySqlConn() throws SQLException {\n\t\t\n\t\t/**\n\t\t * check if the database object is already defined\n\t\t * if it is, return the connection, \n\t\t * no need to look it up again\n\t\t */\n\t\tif (MySql_DataSource != null){\n\t\t\treturn MySql_DataSource;\n\t\t}\n\t\t\n\t\ttry {\n\t\t\t/**\n\t\t\t * This only needs to run one time to get the database object\n\t\t\t * context is used to lookup the database object in MySql\n\t\t\t * MySql_Utils will hold the database object\n\t\t\t */\n\t\t\tif (context == null) {\n\t\t\t\tcontext = new InitialContext();\n\t\t\t}\n\t\t\tContext envContext = (Context)context.lookup(\"java:/comp/env\");\n\t\t\tMySql_DataSource = (DataSource)envContext.lookup(\"jdbc/customers\");\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t return MySql_DataSource;\n\t}", "public static Connection initializeDatabase()\n throws SQLException, ClassNotFoundException\n {\n \t\n \tString dbDriver = \"com.mysql.cj.jdbc.Driver\";\n String dbURL = \"jdbc:mysql://localhost:3306/\";\n // Database name, database user and password to access\n String dbName = \"jaltantra_db\";\n String dbUsername = \"root\";\n String dbPassword = \"jaldb@2050\";\n \n Class.forName(dbDriver);\n Connection conn = DriverManager.getConnection(dbURL + dbName ,dbUsername, dbPassword);\n return conn;\n }", "public Connection getConnection() throws DBAccessException;", "public DBConnection(String db_user, String db_password, String db_name) {\n this(db_user, db_password, db_name, DB_HOST, DB_PORT);\n }", "@Nonnull\n Connection getConnection() throws SQLException;", "@Override\n public Connection getConnection() throws SQLException\n {\n return connection;\n }", "public void initConnection() throws SQLException{\n\t\tuserCon = new UserDBHandler(\"jdbc:mysql://127.0.0.1:3306/users\", \"admin\", \"admin\");\n\t\tproductCon = new ProductDBHandler(\"jdbc:mysql://127.0.0.1:3306/products\", \"admin\", \"admin\");\n\t}", "public synchronized Connection getConnection() throws SQLException {\n/* 158 */ return getConnection(true, false);\n/* */ }", "private static Connection getConnection() throws SQLException {\n return DriverManager.getConnection(\n Config.getProperty(Config.DB_URL),\n Config.getProperty(Config.DB_LOGIN),\n Config.getProperty(Config.DB_PASSWORD)\n );\n }", "public Connection getConnection() throws SQLException{\n return ds.getConnection();\n }", "public Connection getConnection() throws ClassNotFoundException, SQLException\n\t{\n\t /* Class.forName(\"org.postgresql.Driver\");*/\n\t\tcon=dataSource.getConnection();\n\t\treturn con;\t\n\t}", "private Connection connect() throws SQLException {\n\n\n\t\t\t//Connection conn = DriverManager.getConnection(\"jdbc:derby:C:/Users/Duncan/Desktop/TBAG.db;create=true\");\t\n\t\t\tConnection conn = DriverManager.getConnection(\"jdbc:derby:/Users/adoyle/Desktop/TBAG.db;create=true\");\n\t\t\t//Connection conn = DriverManager.getConnection(\"jdbc:derby:C:/Users/kille/Desktop/TBAG.db;create=true\");\t\t\n\t\t\t//Connection conn = DriverManager.getConnection(\"jdbc:derby:C:/Users/jlrhi/Desktop/TBAG.db;create=true\");\n\n\t\t\t\n\t\t\t// Set autocommit() to false to allow the execution of\n\t\t\t// multiple queries/statements as part of the same transaction.\n\t\t\tconn.setAutoCommit(false);\n\t\t\t\n\t\t\treturn conn;\n\t\t}", "private static Connection connectToDB() {\n\t\t\tConnection con = null;\n\t\t\ttry {\n\t\t\t\t// Carichiamo un driver di tipo 1 (bridge jdbc-odbc).\n\t\t\t\t//String driver = \"sun.jdbc.odbc.JdbcOdbcDriver\";\n\t\t\t\tClass.forName(DRIVER);\n\t\t\t\t// Creiamo la stringa di connessione.\n\t\t\t\t// Otteniamo una connessione con username e password.\n\t\t\t\tcon = DriverManager.getConnection (URL, USER, PSW);\n\t\t\t\t\n\t\t\t\t\n\t\t\t} catch (SQLException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t} catch (ClassNotFoundException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\treturn con;\n\t\t}", "private Connection getConnection() throws SQLException {\n OracleDataSource ods = new OracleDataSource();\n ods.setURL(url);\n ods.setUser(user);\n ods.setPassword(password);\n\n // Creates a physical connection to the database.\n return ods.getConnection();\n }", "public static Connection getConnection() {\n Connection conn = null;\n try {\n Class.forName(\"org.hsqldb.jdbcDriver\");\n //conn = DriverManager.getConnection(\"jdbc:hsqldb:hsql://localhost/bancodb\", \"sa\", \"\");\n conn = DriverManager.getConnection(\"jdbc:hsqldb:hsql://localhost/paciente2db\", \"sa\", \"\");\n } catch (SQLException e) {\n System.out.println(\"Problemas ao conectar no banco de dados\");\n } catch (ClassNotFoundException e) {\n System.out.println(\"O driver não foi configurado corretamente\");\n }\n\n return conn;\n }", "public Connection connection()\n {\n String host = main.getConfig().getString(\"db.host\");\n int port = main.getConfig().getInt(\"db.port\");\n String user = main.getConfig().getString(\"db.user\");\n String password = main.getConfig().getString(\"db.password\");\n String db = main.getConfig().getString(\"db.db\");\n\n MysqlDataSource dataSource = new MysqlDataSource();\n dataSource.setServerName(host);\n dataSource.setPort(port);\n dataSource.setUser(user);\n if (password != null ) dataSource.setPassword(password);\n dataSource.setDatabaseName(db);\n Connection connection = null;\n try\n {\n connection = dataSource.getConnection();\n }\n catch (SQLException sqlException)\n {\n sqlException.printStackTrace();\n }\n return connection;\n }", "private synchronized Connection getConnection() throws SQLException {\n return datasource.getConnection();\r\n }", "public DBMySQL(String user, String password, String host, String DBName, int port, boolean sslmode)\n {\n super(user, password, host, DBName, DBType.MYSQL, port, sslmode);\n JDBC = \"jdbc:mysql://\" + host + \"/\" + this.DBName;\n\n // If SSL is required JDBC will be updated.\n if(sslmode)\n JDBC += \"?verifyServerCertificate=true&useSSL=true&requireSSL=true\";\n }", "private static Connection getConnection() throws SQLException, IOException {\n Properties properties = new Properties();\n properties.setProperty(\"user\", \"root\");\n properties.setProperty(\"password\", \"bulgariavarna\");\n\n return DriverManager.getConnection(CONNECTION_STRING + \"minions_db\", properties);\n }", "protected Connection createConnection() {\n Properties connectionProperties = new Properties();\n JdbcPropertyAdapter adapter = getPropertyAdapter(dbType, properties);\n adapter.getExtraProperties(connectionProperties);\n\n String url = translator.getUrl(properties);\n logger.info(\"Opening connection to: \" + url);\n Connection connection;\n try {\n connection = DriverManager.getConnection(url, connectionProperties);\n connection.setAutoCommit(false);\n } catch (SQLException x) {\n throw translator.translate(x);\n }\n return connection;\n }", "public Connection openDBConnection() {\n try {\n // Load driver and link to driver manager\n Class.forName(\"oracle.jdbc.OracleDriver\");\n // Create a connection to the specified database\n Connection myConnection = DriverManager.getConnection(\"jdbc:oracle:thin:@//cscioraclesrv.ad.csbsju.edu:1521/\" +\n \"csci.cscioraclesrv.ad.csbsju.edu\",\"TEAM5\", \"mnz\");\n return myConnection;\n } catch (Exception E) {\n E.printStackTrace();\n }\n return null;\n }", "public Connection openDBConnection() {\n\t\ttry {\n\t\t\tClass.forName(\"oracle.jdbc.OracleDriver\");\n\t\t\tConnection myConnection = DriverManager.getConnection(\n\t\t\t\t\t\"jdbc:oracle:thin:@//cscioraclesrv.ad.csbsju.edu:1521/\" + \"csci.cscioraclesrv.ad.csbsju.edu\",\n\t\t\t\t\t\"team1\", \"Boh3P\");\n\t\t\treturn myConnection;\n\t\t} catch (Exception E) {\n\t\t\tE.printStackTrace();\n\t\t}\n\t\treturn null;\n\t}", "public DatabaseConnector() {\n HikariConfig config = new HikariConfig();\n config.setJdbcUrl(\"jdbc:postgresql://localhost:5547/go_it_homework\");\n config.setUsername(\"postgres\");\n config.setPassword(\"Sam@64hd!+4\");\n this.ds = new HikariDataSource(config);\n ds.setMaximumPoolSize(5);\n }", "public DBConnection(String db_user, String db_password, String db_name, String db_host, String db_port) {\n // Create connection to Database\n this.DB_HOST = db_host;\n this.DB_PORT = db_port;\n this.DB_USER = db_user;\n this.DB_PASSWORD = db_password;\n this.DB_NAME = db_name;\n connect();\n }", "public static Connection getConnection() {\n Connection con = null;\n try {\n Class.forName(\"org.hsqldb.jdbcDriver\");\n con = DriverManager.getConnection(\n \"jdbc:hsqldb:mem:avdosdb\", \"sa\", \"\");\n } catch(Exception e) {\n e.printStackTrace();\n }\n return con;\n }", "public Connection getConnection() throws SQLException {\n\t\tConnection conn = null;\n\t\tProperties connectionProps = new Properties();\n\t\tconnectionProps.put(\"user\", this.userName);\n\t\tconnectionProps.put(\"password\", this.password);\n\n\t\tconn = DriverManager.getConnection(\n\t\t\t\t\"jdbc:mysql://\" + this.serverName + \":\" + this.portNumber + \"/\" + this.dbName, connectionProps);\n\n\t\treturn conn;\n\t}", "private Database() throws SQLException, ClassNotFoundException {\r\n Class.forName(\"org.postgresql.Driver\");\r\n con = DriverManager.getConnection(\"jdbc:postgresql://localhost:5432/postgres\", \"postgres\", \"kuka\");\r\n }", "public Connection getConnection() throws SQLException {\n\t\tif (connection == null) {\n\t\t\tconnection = ConnectBDD.jdbcConnexion();\n\t\t}\n\t\treturn connection;\n\t}", "public Connection DbConnection() throws Exception {\n Class.forName(\"com.mysql.jdbc.Driver\");\n\n // Creating a new connection\n // String myDB = \"jdbc:sqlite:C:\\\\Users\\\\kapersky\\\\Documents\\\\NetBeansProjects\\\\Library Management System\\\\src\\\\librarydb.db\";\n String myDB = \"jdbc:mysql://localhost:3306/librarydb\";\n con = DriverManager.getConnection(myDB, \"root\", \"\");\n return con;\n\n }", "@Override\n\tpublic void connect() throws SQLException {\n if (jdbcConnection == null || jdbcConnection.isClosed()) {\n try {\n Class.forName(\"com.mysql.cj.jdbc.Driver\");\n } catch (ClassNotFoundException e) {\n throw new SQLException(e);\n }\n jdbcConnection = DriverManager.getConnection(\n jdbcURL, jdbcUsername, jdbcPassword);\n }\t\t \n\t\t\n\t}", "public DataHandlerDBMS() {\n\t\ttry {\n\t\t\tClass.forName(\"com.mysql.jdbc.Driver\");\n\t\t\tDBMS = DriverManager.getConnection(url);\n\t\t\tSystem.out.println(\"DBSM inizializzato\");\n\t\t} catch (SQLException e) {\n\t\t\tSystem.out.println(\"Errore apertura DBMS\");\n\t\t\te.printStackTrace();\n\t\t} catch (ClassNotFoundException e) {\n\t\t\tSystem.out.println(\"Assenza driver mySQL\");\n\t\t}\n\t}", "public MyBudgetDatabase(String databaseName) throws SQLException {\n this.dbName = databaseName;\n }", "private Connection getConnection() {\n if (_connection != null) return _connection;\n\n Element ncElement = getNetcdfElement();\n \n //See if we can get the database connection from a JNDI resource.\n String jndi = ncElement.getAttributeValue(\"jndi\");\n if (jndi != null) {\n try {\n Context initCtx = new InitialContext();\n Context envCtx = (Context) initCtx.lookup(\"java:comp/env\");\n DataSource ds = (DataSource) envCtx.lookup(jndi);\n _connection = ds.getConnection();\n } catch (Exception e) {\n String msg = \"Failed to get database connection from JNDI: \" + jndi;\n _logger.error(msg, e);\n throw new TSSException(msg, e);\n }\n return _connection;\n }\n\n //Make the connection ourselves.\n String connectionString = ncElement.getAttributeValue(\"connectionString\");\n String dbUser = ncElement.getAttributeValue(\"dbUser\");\n String dbPassword = ncElement.getAttributeValue(\"dbPassword\");\n String jdbcDriver = ncElement.getAttributeValue(\"jdbcDriver\");\n \n try {\n Class.forName(jdbcDriver);\n _connection = DriverManager.getConnection(connectionString, dbUser, dbPassword);\n } catch (Exception e) {\n String msg = \"Failed to get database connection: \" + connectionString;\n _logger.error(msg, e);\n throw new TSSException(msg, e);\n } \n \n return _connection;\n }", "private Connection openConnection() throws SQLException {\r\n\t\tConnection dbConnection = DriverManager.getConnection(databaseURL, username, password);\r\n\t\treturn dbConnection;\r\n\t}", "private Connection getConnection() throws SQLException {\n return DriverManager.getConnection(\"jdbc:hsqldb:file:\" + this.path + \";shutdown=true\", \"SA\", \"\");\n }", "private DBConnection() \n {\n initConnection();\n }", "public ConnexionBD() throws ClassNotFoundException, SQLException {\n\t\tClass.forName(\"com.mysql.jdbc.Driver\") ;\n\t\tconnexion = DriverManager.getConnection(dbURL,user,password) ;\n\t}", "public synchronized Connection getConnection() throws DBException {\n Connection con = null;\n try{\n if (s_ds != null) {\n try {\n con = s_ds.getConnection();\n } catch (Exception e) {\n SystemLog.getInstance().getErrorLog().error(\"ERR,HSQLDBTomCTRL,getCon-JNDI,\" + e\n , e);\n }\n } \n // If null try another method\n \n\t\t\tif ( con == null ){\n\t DriverManager.setLoginTimeout(5);\n\t\t\t\tcon = DriverManager.getConnection(m_dbURL , m_userName , m_password);\n\t\t\t\tSystem.out.println(\"HSQLDB-DBCON:user=\"+m_userName+\":Connection !!\");\n\t\t\t}\n\n return con;\n }catch(SQLException e) {\n System.err.println( \"DBCON:ERROR: user=\"+m_userName+\":Get Connection from pool-HSQLDB\");\n\t\t\tthrow new DBException(\"DBCON:ERROR: user=\"+m_userName+\":Get Connection HSQLDB:\" + e.getMessage()); \n }\n }", "public Connection getConnection() {\n\t// register the JDBC driver\n\ttry {\n\t Class.forName(super.driver);\n\t} catch (ClassNotFoundException e) {\n\t e.printStackTrace();\n\t}\n \n\t// create a connection\n\tConnection connection = null;\n\ttry {\n\t connection = DriverManager.getConnection (super.jdbc_url,super.getu(), super.getp());\n\t} catch (SQLException e) {\n\t e.printStackTrace();\n\t}\n\treturn connection;\n }", "public Connection getConnection() throws SQLException {\n return null;\r\n }", "private Connection getConnection() throws SQLException, ClassNotFoundException {\n return connectionBuilder.getConnection();\n }", "private Connection getConnection() throws Exception {\n\n\t\tContext initCtx = new InitialContext();\n\t\tContext envCtx = (Context) initCtx.lookup(\"java:comp/env\");\n\t\tDataSource ds = (DataSource) envCtx.lookup(\"jdbc/TestDB\");\n\n\t\treturn ds.getConnection();\n\t}", "private Connection connect() throws SQLException {\n\t\treturn DriverManager.getConnection(\"jdbc:sqlite:database/scddata.db\");\n\t}", "public Connection getConnection() throws SQLException\n {\n Connection con = dataSource.getConnection();\n con.setAutoCommit(false);\n return con;\n }" ]
[ "0.69835603", "0.6831441", "0.6703251", "0.65923184", "0.65354335", "0.65354335", "0.65277547", "0.652307", "0.64883286", "0.64539135", "0.64385813", "0.6411571", "0.6398667", "0.63774306", "0.63750494", "0.6372551", "0.6352459", "0.63467646", "0.6343081", "0.6338285", "0.63326573", "0.63024545", "0.6289686", "0.62809086", "0.62755764", "0.6273233", "0.6264952", "0.62616", "0.62554574", "0.6232764", "0.6229112", "0.62263703", "0.6223936", "0.62183857", "0.6215365", "0.6210296", "0.6208855", "0.6191354", "0.6188425", "0.61802155", "0.6179103", "0.61773413", "0.61738497", "0.61724126", "0.6171015", "0.61665076", "0.6164002", "0.6160825", "0.6153241", "0.61470145", "0.61278874", "0.61254925", "0.6125017", "0.6124065", "0.6119983", "0.61098033", "0.60938185", "0.6083922", "0.60806936", "0.6078338", "0.6078044", "0.60749394", "0.60742944", "0.6063209", "0.60591733", "0.60561436", "0.60557777", "0.6049427", "0.6040197", "0.60296416", "0.6023146", "0.6020356", "0.6020208", "0.6018407", "0.6015521", "0.6014686", "0.6014286", "0.60113084", "0.60104716", "0.5983237", "0.5977543", "0.5977079", "0.5970452", "0.596984", "0.59677464", "0.596716", "0.5966432", "0.5962703", "0.5954605", "0.5952549", "0.5944018", "0.5939885", "0.59390944", "0.5937319", "0.59369653", "0.5936639", "0.59357685", "0.5935098", "0.5932776", "0.59264725" ]
0.66513157
3
Initialize the list for numbers Implement the random number generation here the method containsNumber is probably useful
public void randomizeNumbers() { this.numbers = new ArrayList<>(); Random randy = new Random(); //starts a random obkject int number = 1; //starts the first lottery number index while (number <= 7){ //repeats the same process 7 times to get a set of lottery numbers int randomNumber = randy.nextInt(40) + 1; //generates a random int betweeen 1-40(inclusive) //if this number already exists in the list, it ignores it and repeats until a unique number is thrown if(containsNumber(randomNumber)){ continue; } //once we have a new unique number, it's added to our arraylsit this.numbers.add(randomNumber); number++; //and we move on to the next number } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected static ArrayList<String> GenNumber() {\n\n ArrayList<String> initialList = new ArrayList<>();\n\n initialList.add(\"1\"); //Add element\n initialList.add(\"2\");\n initialList.add(\"3\");\n initialList.add(\"4\");\n initialList.add(\"5\");\n initialList.add(\"6\");\n initialList.add(\"7\");\n initialList.add(\"8\");\n initialList.add(\"9\");\n\n Collections.shuffle(initialList); //Random the position\n\n return initialList;\n }", "private void randomizeNum() {\n randomNums.clear();\n for (int i = 0; i < 4; i++) {\n Integer rndNum = rnd.nextInt(10);\n randomNums.add(rndNum);\n }\n }", "public void placeRandomNumbers() {\n\t\t\n\t\tArrayList<HexLocation> locations = getShuffledLocations();\n\t\tint[] possibleNumbers = new int[] {2, 3, 3, 4, 4, 5, 5, 6, 6, 8, 8, 9, 9, 10, 10, 11, 11, 12};\n\t\t\n\t\tfor (int i = 0; i < possibleNumbers.length; i++)\n\t\t\tnumbers.get(possibleNumbers[i]).add(locations.get(i));\n\t}", "public void generaNumeros() {\n\n\n int number =0;\n int numeroSeleccionado=gameMemoriaUno.getNumberaleatorio();\n //se agrega numero a las lista de numeros\n\n if(numeroSeleccionado == -1){\n llamaResultado(super.getActividad(), tFinal, tInicio, Num3_5_1Activity.class,gameMemoriaUno.getNumeros(),gameMemoriaUno.getAciertosTotales(),gameMemoriaUno.getFallosTotales(),gameMemoriaUno.getNumEcxluidosList(),gameMemoriaUno.getNumeroPregunta());\n\n }else {\n\n\n gameMemoriaUno.addNumerosSet(numeroSeleccionado);\n for (int i = 1; i < 6; i++) {\n //obtiene numeros del costalito menos el numero seleccionado\n number = gameMemoriaUno.getNumeroArreglo();\n //agrego numeros\n gameMemoriaUno.addNumerosSet(number);\n }\n\n Iterator<Integer> iter = gameMemoriaUno.getNumerosSet().iterator();\n\n int contadorNumeros=0;\n while (iter.hasNext()) {\n int valor=iter.next().intValue();\n lista.add(valor);\n if(gameMemoriaUno.getDificultad()==contadorNumeros){\n gameMemoriaUno.setNumerosElejidos(new int[valor]);\n }\n\n contadorNumeros+=1;\n }\n Collections.shuffle(lista, new Random());\n Collections.shuffle(lista, new Random());\n\n\n\n }\n\n\n }", "private void getRandomNumber() {\n\t\tRandom random = new Random();\n\t\tint randomCount = 255;\n\t\tint randNum = 0; \n\t\tfor(int i = 0; i < numberAmt; i++) {\n\t\t\trandNum = random.nextInt(randomCount);\n\t\t\tswitch (numberType) {\n\t\t\tcase 1:\n\t\t\t\trandomNumbers.add(Integer.toString(randNum));\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\tif(randNum > 15)\n\t\t\t\t\trandomNumbers.add(String.format(\"%8s\", Integer.toBinaryString(randNum)).replace(\" \", \"0\"));\n\t\t\t\telse\n\t\t\t\t\trandomNumbers.add(String.format(\"%4s\", Integer.toBinaryString(randNum)).replace(\" \", \"0\"));\n\t\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t\trandomNumbers.add(Integer.toHexString(randNum));\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}", "private void initialiseNumbers() {\r\n double choice = Math.random();\r\n sourceNumbers = new int[6];\r\n if(choice<0.8) {\r\n //one big number, 5 small.\r\n sourceNumbers[0] = (Integer) bigPool.remove(0);\r\n for( int i=1; i<6; i++) {\r\n sourceNumbers[i] = (Integer) smallPool.remove(0);\r\n }\r\n } else {\r\n //two big numbers, 5 small\r\n sourceNumbers[0] = (Integer) bigPool.remove(0);\r\n sourceNumbers[1] = (Integer) bigPool.remove(0);\r\n for( int i=2; i<6; i++) {\r\n sourceNumbers[i] = (Integer) smallPool.remove(0);\r\n }\r\n }\r\n\r\n //for target all numbers from 101 to 999 are equally likely\r\n targetNumber = 101 + (int) (899 * Math.random());\r\n }", "public static void populate() {\n for (int i = 1; i <= 15; i++) {\n B.add(i);\n Collections.shuffle(B);\n\n }\n for (int i = 16; i <= 30; i++) {\n I.add(i);\n Collections.shuffle(I);\n }\n for (int n = 31; n <= 45; n++) {\n N.add(n);\n Collections.shuffle(N);\n }\n for (int g = 46; g <= 60; g++) {\n G.add(g);\n Collections.shuffle(G);\n }\n for (int o = 61; o <= 75; o++) {\n O.add(o);\n Collections.shuffle(O);\n }\n\n for (int i = 1; i <= 75; i++) {\n roll.add(i); // adds the numbers in the check list\n }\n }", "public void set_random_choice()\r\n\t{\r\n\t\tfor (int i=0 ; i<size ; i++)\r\n\t\t{\r\n\t\t\tnumbers.add(get_not_selected_random_digit());\r\n\t\t}\r\n\t}", "public void init()\n {\n list = new int[k];\n\n // Initialise my list of integers\n for (int i = 0; i < k; i++) {\n int b = 1;\n while (CommonState.r.nextBoolean())\n b++;\n list[i] = b;\n }\n }", "private static void initNumberTypeList()\n\t{\n\t\tfor(String numberType : NUMBER_TYPE_ARRAY)\n\t\t{\n\t\t\tnumberTypeList.add(numberType);\n\t\t}\n\t\tlogger.info(\" --|*|-- Number types are initialized! --|*|--\");\n\t}", "public RandomizedCollection() {\n nums = new ArrayList<>();\n num2Index = new HashMap<>();\n rand = new Random();\n }", "private static List<Integer> initLista(int tamanho) {\r\n\t\tList<Integer> lista = new ArrayList<Integer>();\r\n\t\tRandom rand = new Random();\r\n\r\n\t\tfor (int i = 0; i < tamanho; i++) {\r\n\t\t\tlista.add(rand.nextInt(tamanho - (tamanho / 10) + 1)\r\n\t\t\t\t\t+ (tamanho / 10));\r\n\t\t}\r\n\t\treturn lista;\r\n\t}", "public NumberedList()\n {\n _init=1;\n }", "public Set<Integer> generateLotteryNumbers ()\r\n {\r\n return null;\r\n }", "public void init() throws ServletException {\n modTime = System.currentTimeMillis()/1000*1000;\r\n for(int i=0; i<numbers.length; i++) {\r\n numbers[i] = randomNum();\r\n }\r\n }", "public Happy_Number()\r\n\t{\r\n\t\tnumberHolder = new int[20];\r\n\t\tfor(int ii = 0; ii < numberHolder.length; ii++)\r\n\t\t{\r\n\t\t\tnumberHolder[ii] = 0;\r\n\t\t}\r\n\t}", "public Generator() {\n identificationNumbers = new int[100][31];\n }", "public void generateRandomQuestions(){\r\n numberHolder = new ArrayList<>(NUMBER_OF_QUESTIONS);\r\n for (int i = 0; i < NUMBER_OF_QUESTIONS; i++)\r\n numberHolder.add(i);\r\n\r\n Collections.shuffle(numberHolder);\r\n System.out.println(numberHolder);\r\n\r\n }", "private MyIntegerList generatedPopulatedList() {\n final MyIntegerList mil = new MyIntegerList();\n\n mil.push(1);\n mil.push(2);\n mil.push(1);\n mil.push(6);\n mil.push(6);\n mil.push(7);\n mil.push(2);\n mil.push(2);\n mil.push(0);\n mil.push(5);\n\n return mil;\n }", "public void randomize()\n {\n for (int i=0; i<list.length; i++)\n list[i] = (int)(Math.random() * 100) + 1;\n }", "public static void storeRandomNumbers(int [] num){\n\t\tRandom rand = new Random();\n\t\tfor(int i=0; i<num.length; i++){\n\t\t\tnum[i] = rand.nextInt(1000000);\n\t\t}\n\t}", "public Set<Integer> generateLotteryNumbers ()\n {\n\t Set<Integer> randomGenerator = new HashSet<Integer>(6); \n\t Random randomnum = new Random();\n\t \n\t\n\n\t \n\t for (Integer i=0; i<6;i++) \n\t {\n\t\t //keep looping until able to add a add number into a set that does not not exist and is between 1 and49\n\t\t \n\t\t while (randomGenerator.add(1+randomnum.nextInt(49)) == false) {\n\t\t\t \n\t\t\t\n\t\t }\n\t\t \n\n\t }\n\t \n\t \n\t \n return randomGenerator;\n \n }", "private int[] makeRandomList(){\n\t\t\n\t\t//Create array and variables to track the index and whether it repeats\n\t\tint[] list = new int[ 9 ];\n\t\tint x = 0;\n\t\tboolean rep = false;\n\t\t\n\t\t//Until the last element is initialized and not a repeat...\n\t\twhile( list[ 8 ] == 0 || rep)\n\t\t{\n\t\t\t//Generate a random number between 1 and 9\n\t\t\tlist[ x ]= (int)(Math.random()*9) + 1;\n\t\t\trep = false;\n\t\t\t\n\t\t\t//Check prior values to check for repetition\n\t\t\tfor(int y = 0; y < x; y++)\n\t\t\tif( list[x] == list[y] ) rep = true;\n\t\t\t\n\t\t\t//Move on to the next element if there is no repeat\n\t\t\tif( !rep ) x++;\n\t\t}\n\t\t\n\t\t//return the array\n\t\treturn list;\n\t}", "public void randomize()\n {\n int max = list.length;\n for (int i=0; i<list.length; i++)\n list[i] = (int)(Math.random() * max) + 1;\n }", "public Numbers(int number) {\r\n\t\tthis.number = number;\r\n\t}", "public static void main(String[] args) {\n\n Random rand = new Random();\n ArrayList<Integer> listNumbers = new ArrayList<Integer>();\n\n int i = 0;\n while (i < 10) {\n int num = rand.nextInt(50) + 1;\n listNumbers.add(num);\n i++;\n }\n\n System.out.println(listNumbers);\n\n Scanner scan = new Scanner(System.in);\n System.out.print(\"Value to find: \");\n int num = scan.nextInt();\n\n for (Integer number : listNumbers) {\n if (num == number) {\n System.out.println(num + \" is in the array list.\");\n }\n }\n }", "@Override\r\n\tpublic void initialize() {\n\t\tRandom randomGenerator = new Random();\r\n\t\tthis.size = Helper.getRandomInRange(1, 9, randomGenerator);\r\n\t\tif (this.size % 2 == 0)\r\n\t\t\tthis.size--;\r\n\t}", "private int getRandNumber() {\n int randNum = 0;\n Random generator = new Random();\n randNum = generator.nextInt(LIST.length()-1);\n return randNum;\n }", "private Numbers() {\n\t}", "private void getRandomNumber() {\n\t\tRandom generator = new Random();\n\t\trandomNumber = generator.nextInt(POSSIBLE_CHOICE.length);\n\t}", "public int randNums() {\n //Create a random number between 0-16\n int randNum = (int)(Math.random() * 16);\n\n //Go to the random number's index in the number array. Pull the random number\n //and set the index value to zero. Return the random number\n if(numsArray[randNum] != 0){\n numsArray[randNum] = 0;\n return randNum + 1;\n }\n\n //If the index value is zero then it was already chosen. Recursively try again\n else{\n return randNum = randNums();\n }\n }", "public void random_init()\r\n\t{\r\n\t\tRandom random_generator = new Random();\r\n\t\t\r\n\t\tfor(int i=0;i<chromosome_size;i++)\r\n\t\t{\r\n\t\t\tchromosome[i] = random_generator.nextInt(num_colors)+1;\r\n\t\t}\r\n\t}", "private void generateLists()\n {\n\tgenerateLists(num1, number);\n\tgenerateLists(num2, otherNumber);\n }", "private int getRandomNumber() {\n int randomInt = 0;\n Random randomGenerator = new Random();\n randomInt = randomGenerator.nextInt(NUM_LIST.length());\n if (randomInt - 1 == -1) {\n return randomInt;\n } else {\n return randomInt - 1;\n }\n }", "public static List<Integer> makeList(int size) {\r\n List<Integer> result = new ArrayList<>();\r\n /** \r\n * taking input from the user \r\n * by using Random class. \r\n * \r\n */\r\n for (int i = 0; i < size; i++) {\r\n int n = 10 + rng.nextInt(90);\r\n result.add(n);\r\n } // for\r\n\r\n return result;\r\n /**\r\n * @return result \r\n */\r\n }", "void setRandomNumbersUp() {\n\t\tInteger[] numbers = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9};\n\t\tInteger[] numbers2 = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9};\n\t\tList<Integer> numsList = Arrays.asList(numbers);\n\t\tCollections.shuffle(numsList);\n\t\tList<Integer> numsList2 = Arrays.asList(numbers2);\n\t\tCollections.shuffle(numsList2);\n\t\tList<Integer> combinedList = Stream.of(numsList, numsList2).flatMap(Collection::stream).collect(Collectors.toList());\n\t\t\n\t\t\n\t\tint counter = 0;\n\t\tfor (Node node : SquaresBoard.getChildren()) {\n\t\t\n\t\t\tif (node instanceof Label) {\n\t\t\t\t((Label) node).setText(combinedList.get(counter).toString());\n\t\t\t}\n\t\t\tcounter++;\n\t\t}\n\t\t\n\t}", "private Set<Integer> generateWinningNumbers()\r\n\t{\r\n\t\tSet<Integer> winningNumbers = new HashSet<Integer>();\r\n\t\t\r\n\t\tint i=0;\r\n\t\twhile(i<6)\r\n\t\t{\r\n\t\t\tboolean added = winningNumbers.add(random.nextInt(lotteryMax + 1));\r\n\t\t\tif(added) i++;\r\n\t\t}\r\n\t\treturn winningNumbers;\r\n\t}", "public RandomizedSet() {\n nums = new ArrayList<Integer>();\n location = new HashMap<Integer, Integer>();\n }", "private static List<Integer> nextInt() {\n\t\tRandom rnd = new Random();\n\t\tList<Integer> l = new ArrayList<Integer>();\n\t\tfor (;;) {\n\t\t\tfinal int r = rnd.nextInt(5);\n\t\t\tif (!l.contains(r)) {\n\t\t\t\tl.add(r);\n\t\t\t}\n\t\t\tif (l.size() == 5)\n\t\t\t\treturn l;\n\t\t}\n\t}", "public ArrayList<Integer> generateWinner() {\n if (winner.size() == 7) {\n if (!sorted) {\n Collections.sort(winner);\n sorted = true;\n }\n return winner;\n }\n if (numbers.size() == 32 || winner.size() != 0) {\n init();\n }\n\n for (int i = 0; i < 7; i++) {\n winner.add(numbers.get(random.nextInt(numbers.size())));\n numbers.remove(winner.get(i));\n }\n Collections.sort(winner);\n return winner;\n }", "public static void main(String[] args) {\n\n System.out.println(\"How many sets of numbers do you want?: \"); // Prompt displayed for user.\n Scanner input = new Scanner(System.in); // User input as to how many sets the user desires.\n\n\n // assigns the user input number to integer variable number\n int number = input.nextInt();\n\n // Input validation w/ while loop to ask user for number until they give number greater than 0\n if(number<1 ) {\n\n number = 0;\n while(number<1) {\n System.out.print(\"That was not a valid number please give a number greater than zero: \");\n Scanner input2 = new Scanner(System.in);\n number = input2.nextInt();\n }\n }\n\n\n // Java Library will create the a list of Integers.\n ArrayList<Integer> list = new ArrayList<Integer>();\n\n // Uses the Random class\n Random rand = new Random();\n // A variable that helps us get a random int between 1-49\n final int RANGE = 49;\n // j indicates the user input of sets desired\n for(int j = 0; j<number; j++) {\n\n // for loop used to place 6 randomly generated numbers in sets defined by user.\n for(int i = 0; i<6; i++) {\n int num = (int) ( RANGE * Math.random() ) + 1;\n //while loop ensures no repeated numbers\n //using the contains method from the ArrayList class\n while(list.contains(num)) {\n\n num = rand.nextInt(50);\n }\n\n // adds number to list using add method from ArrayList Class\n list.add(num);\n\n }\n\n // Calling the sort method through the Collections class to sort the list from low to high\n Collections.sort(list);\n\n //Prints out the list once all integers are added\n System.out.println(list);\n\n //clears the list in order to populate it if more sets are asked for\n list.clear();\n\n }\n\n }", "public void init() {\n l0 = new EmptyList();\n l1 = FListInteger.add(l0, new Integer(5));\n l2 = FListInteger.add(l1, new Integer(4));\n l3 = FListInteger.add(l2, new Integer(7));\n l4 = new EmptyList();\n l5 = FListInteger.add(l2, new Integer(7));\n }", "@BeforeEach\n public void createList() {\n myListOfInts = new ArrayListDIY<>(LIST_SIZE);\n listOfInts = new ArrayList<>(LIST_SIZE);\n\n getRandomIntStream(0,10).limit(LIST_SIZE)\n .forEach(elem -> {\n listOfInts.add(elem);\n myListOfInts.add(elem);\n });\n }", "public void generateIDs() {\n Random randomGenerator = new Random();\n for(int i = 0; i < identificationNumbers.length; i++) {\n for(int j = 0; j < identificationNumbers[i].length; j++)\n identificationNumbers[i][j] = randomGenerator.nextInt(2);\n }\n }", "public static List<Integer> numRandom(Integer numInicial, Integer numFinal, Integer qtdNumero) {\r\n List<Integer> numA = new ArrayList<>();\r\n Random r = new Random();\r\n for (int i = 0; i < qtdNumero; i++) {\r\n numA.add(r.nextInt((numFinal + 1) - numInicial) + numInicial);\r\n\r\n }\r\n return numA;\r\n\r\n }", "public void fillNumbers() {\n this.numbers = new String[8];\n this.numbers[0] = \"seven\";\n this.numbers[1] = \"eight\";\n this.numbers[2] = \"nine\";\n this.numbers[3] = \"ten\";\n this.numbers[4] = \"jack\";\n this.numbers[5] = \"queen\";\n this.numbers[6] = \"king\";\n this.numbers[7] = \"ass\";\n }", "public static int getRandomNumbers(ArrayList simList) {\r\n return r.nextInt(simList.size());\r\n }", "public static void problem3() {\n\t\tArrayList<Integer> myNums = new ArrayList<Integer>();\n\t\t\n\t\tRandom rand = new Random();\n\t\tint number = rand.nextInt(100) + 1;\n\t\tSystem.out.println(number);\n\t\tfor(int i = 0; i < 10; i++) {\n\t\t\tmyNums.add(number);\n\t\t\tnumber = rand.nextInt(100) + 1;\n\t\t}\n\t\tSystem.out.println(myNums);\n\t\t\n\t\tInteger[] myNumArray = new Integer[10];\n\t\tint counter = 0;\n\t\tfor(int num : myNums ) {\n\t\t\tmyNumArray[counter] = num;\n\t\t\tSystem.out.println(myNumArray[counter]);\n\t\t\t///the firs go around we're looking at myNumArray[0]\n\t\t\t//the second time we're looking at myNumArray[1]\n\t\t\tcounter++;\n\t\t}\n\t\tSystem.out.println(counter);\n\t\tSystem.out.println(myNumArray[counter - 1]);\n\t}", "private List<Integer> loadTestNumbers(ArrayList<Integer> arrayList) {\n for (int i = 1; i <= timetablepro.TimetablePro.MAX_TIMETABLE; i++) {\n arrayList.add(i);\n }\n return arrayList;\n }", "public void randomNumberTest() {\n //Generating streams of random numbers\n Random random = new Random();\n random.ints(5)//(long streamSize, double randomNumberOrigin, double randomNumberBound)\n .sorted()\n .forEach(System.out::println);\n /*\n -1622707470\n -452508309\n 1346762415\n 1456878623\n 1783692417\n */\n }", "private int grabANewNumberForTest() {\n clockPanel.updateTestClock(testNumbersList);\n if (testNumbersList.size() == 0) {\n testOver();\n }\n return testNumbersList.remove((int)(Math.random()*testNumbersList.size()));\n }", "@Override\n public void run() {\n list.add(new Random().nextInt(11)+ 6);\n }", "public static void createArrays() {\r\n\t\tRandom rand = new Random();\r\n\t\tfor (int i = 0; i < N; i++) {\r\n\t\t\tint size = rand.nextInt(5) + 5;\r\n\t\t\tTOTAL += size;\r\n\t\t\tArrayList<Integer> numList = new ArrayList<>();\r\n\t\t\tfor (int j = 0; j < size; j++) {\r\n\t\t\t\tint value = rand.nextInt(1000) + 1;\r\n\t\t\t\tnumList.add(value);\r\n\t\t\t}\r\n\t\t\tCollections.sort(numList);\r\n\t\t\tarrayMap.put(i + 1, numList);\r\n\t\t}\r\n\t}", "public static void main(String [] args){\n\t\tArrayList<Integer> allNums = new ArrayList<>();\n\t\tfor(int i = 0; i < 10; i++){\n\t\t\tallNums.add(i);\n\t\t}\n\t\t//Make into one big number\n\t\t//Proceed to divide it to knock bits off the right hand side\n\t\tboolean miracleFound = false;\n\t\tString tempNum;\n\t\tlong miracleNum = 0;\n\t\twhile(!miracleFound){\n\t\t\t//Make A String from the List And analyse it\n\t\t\ttempNum = \"\";\n\t\t\tfor(int i = 0; i < allNums.size(); i++){\n\t\t\t\ttempNum = tempNum + allNums.get(i);\n\t\t\t\t//System.out.println(\"Tempnum is \" + tempNum + \" and i is \" + i);\n\t\t\t\tif(i > 0){\n\t\t\t\t\tmiracleNum = Long.valueOf(tempNum).longValue();\n\t\t\t\t\tif(miracleNum % (i+1) == 0){ //If it is divisible without remainders\n\t\t\t\t\t\tif((i+1) == 10){\n\t\t\t\t\t\t\tmiracleFound = true;\n\t\t\t\t\t\t\tSystem.out.println(\"Number \" + miracleNum + \" was a miracle number.\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t\tSystem.out.println(miracleNum + \" % \" + (i+1) + \" is 0.\");\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tCollections.shuffle(allNums);\n\t\t\t\t\t\ti = allNums.size();\n\t\t\t\t\t\tSystem.out.println(\"Number \" + miracleNum + \" was not a miracle number.\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "private ArrayList _getRandomList(int num, int min, int max) {\n ArrayList list = new ArrayList();\n ArrayList tmp = new ArrayList();\n for (int i = min; i <= max; i++) {\n tmp.add(new Integer(i));\n }\n \n for (int i = 0; i < num; i++) {\n \tif(tmp.size() > 1){\n\t int pos = _getRandomFromRange(0, tmp.size() - 1);\n\t list.add( (Integer) tmp.get(pos));\n\t tmp.remove(pos);\n \t}\n }\n\n return list;\n }", "void createArray(int n) {\n numbers = new int[n];\n for ( int i = 0; i < n; i++){\n numbers[i] = random.nextInt(1000);\n }\n }", "public List<Integer> getRandomElement(List<Integer> list) {\n\t\t//Random rand = new Random(); \n\t\tList<Integer> newList = new ArrayList<>();\n\t\t//newList.add(10);\n\n//\t\tfor(int i=0;i<5;i++) {\n//\t\tif(newList.size()<4) {\n//\t\t\tint n=Random(list);\n//\t\t\tif(newList.contains(n)) {\n//\t\t\t\t\n//\t\t\t}else {\n//\t\t\t\tnewList.add(n);\n//\t\t\t}\n//\t\t}\n//\t\t}\n\t\twhile(newList.size()<=2) {\n\t\t\tint n=Random(list);\n\t\t\tif(newList.contains(n)) {\n\t\t\t\t\n\t\t\t}else {\n\t\t\t\tnewList.add(n);\n\t\t\t}\n\t\t}\t\n\t\t\n\t\t\n\t\treturn newList;\n\t}", "public static int[] generateSuperLottoNumbers() \n\t{\n\t\t// create an array that allocates only 6 integer slots.\n\t\tint[] ticketNumbers = new int[6];\n\t\t\n\t\t//generateSuperLottoNumbers() as an argument [1 pts]\n\t\t// Hint: numbers[i] = (int) (10 * Math.random()) + 1; // will assign your array element to a random number from 1 to 10\n\t\t// The first 5 numbers must be from the range 1 to 47 [1 pt]\n\t\t//we want to run the iteration 5 times so we use for loop knowing how many iterations are needed.\n\t\tfor (int i = 0; i < 5; i++) \n\t\t{\n\t\t\tticketNumbers[i] = (int) (47 * Math.random()) + 1; // random method in the Math class will only give number between 0 and 1 not including 1 (0-.99) \t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// so we add plus 1 to avoid the error we have to account for 0 and 47.\n\t\t}\n\t\t\n\t\t// The 6th number (the MEGA) must be from 1 to 27. [1 pt]\n\t\tticketNumbers[5] = (int) (27 * Math.random()) + 1;\n\n\t\treturn ticketNumbers;\n\t}", "void setRandomNo() {\n\t\tno = 10000000 + (int) (Math.random() * 90000000);\n\t}", "public static ArrayList<String> generateNumberArray(int min, int max) {\n int[] ran = new int[]{-20, -10, 10, 20};\n ArrayList<Integer> integerArrayList;\n HashSet<Integer> set = new HashSet<>();\n\n int diff = min / 5;\n\n int target = randInt(min + diff, max - diff);\n set.add(target);\n while (set.size() != 4) {\n int badChoice = target + NumberGenerator.randInt(-diff, diff);\n set.add(badChoice);\n }\n set.remove(target);\n integerArrayList = new ArrayList<>(set);\n\n integerArrayList.add(0, target);\n\n ArrayList<String> integers = new ArrayList<>();\n for (Integer myInt : integerArrayList) {\n integers.add(String.valueOf(myInt));\n }\n\n //add a number which has the same last number as target\n while (true) {\n int insertPos = NumberGenerator.randInt(1, 4);\n int subIndex = NumberGenerator.randInt(0, 3);\n int badChoice = target + ran[subIndex];\n\n if (!set.contains(badChoice) && target!= badChoice && badChoice >= min && badChoice <= max) {\n integers.add(insertPos, String.valueOf(badChoice));\n break;\n }\n }\n return integers;\n }", "BusinessLogic(int size)\r\n\t{\r\n\t\tthis.size = size;\r\n\t\tgenerator = new Random();\r\n\t\tnumbers = new ArrayList<Integer>();\r\n\t}", "public static void arrayListMethod(int numberOfIntegers) {\n\t\tArrayList<Integer> list = new ArrayList<Integer>();\n\t\tRandom rand = new Random();\n\n\t\tfor (int i = 0; i < numberOfIntegers; i++) {\n\t\t\tlist.add(rand.nextInt(numberOfIntegers));\n\t\t}\n\n\t\tfor (int i = 0; i < numberOfIntegers; i++) {\n\t\t\tlist.remove(0);\n\t\t}\n\t}", "private int generateRandomNumber() {\n\t\treturn new SplittableRandom().nextInt(0, 3);\n\t}", "private static void InitRandBag()\n {\n int k=(int)Math.floor(Math.random()*50);\n R[0]=k;\n\n //Generate the rest of the numbers\n for(int i=1;i<950;i++)\n {\n k=k+(int)Math.floor(Math.random()*50);\n R[i]=k;\n }\n\n //Shuffle the list\n for(int i=0;i<950;i++)\n {\n int temp = R[i];\n k = (int)Math.floor(Math.random()*950);\n R[i]=R[k];\n R[k]=temp;\n }\n }", "public static void linkedListMethod(int numberOfIntegers) {\n\t\tLinkedList<Integer> list = new LinkedList<Integer>();\n\t\tRandom rand = new Random();\n\n\t\tfor (int i = 0; i < numberOfIntegers; i++) {\n\t\t\tlist.add(rand.nextInt(numberOfIntegers));\n\t\t}\n\n\t\tfor (int i = 0; i < numberOfIntegers; i++) {\n\t\t\tlist.remove(0);\n\t\t}\n\n\t}", "private List<Integer> generateRandom() {\n Integer[] randArr = new Integer[numCols*numRows];\n\n int start = 0;\n int end;\n for(int i = 0; i < myStateMap.size(); i++) {\n int amt = myStateMap.get(i).getAmount();\n end = amt + start;\n for(int j = start; j < end; j++) {\n if(end > randArr.length) {\n break;\n }\n randArr[j] = myStateMap.get(i).getType();\n }\n start = end;\n }\n\n List<Integer> arr = new ArrayList<>(Arrays.asList(randArr));\n Collections.shuffle(arr);\n return arr;\n }", "private int randomNum() {\r\n\t return((int)(Math.random() * 100));\r\n\t }", "public IntList() { // doesn't HAVE to be declared public, but doesn't hurt\n theList = new int[STARTING_SIZE];\n size = 0;\n }", "private void randomNumbers(){\n ranA = n.nextInt(9) + 1;\n\n //second digit\n do {\n ranB=n.nextInt(9)+1;\n }while(ranB == ranA);\n\n //third digit\n do {\n ranC=n.nextInt(9)+1;\n }while(ranC == ranA || ranC==ranB);\n\n //fourth digit\n do {\n ranD=n.nextInt(9)+1;\n }while(ranD == ranA || ranD == ranB || ranD == ranC);\n }", "public void generateNumbers() {\n number1 = (int) (Math.random() * 10) + 1;\n number2 = (int) (Math.random() * 10) + 1;\n operator = (int) (Math.random() * 4) + 1;\n //50% chance whether the displayed answer will be right or wrong\n rightOrWrong = (int) (Math.random() * 2) + 1;\n //calculate the offset of displayed answer for a wrong equation (Error)\n error = (int) (Math.random() * 4) + 1;\n generateEquation();\n }", "public void newGame() {\n\t\ttheNumber = (int)(Math.random()* 100 + 1);\r\n\t\t\r\n\t}", "private void createRandomGame() {\n ArrayList<int[]> usedCoordinates = new ArrayList<>();\n\n // make sure the board is empty\n emptyBoard();\n\n //find different coordinates\n while (usedCoordinates.size() < 25) {\n int[] temp = new int[]{randomNumberGenerator.generateInteger(size), randomNumberGenerator.generateInteger(size)};\n\n // default contains(arraylist) doesn't work because it compares hashcodes\n if (! contains(usedCoordinates, temp)) {\n usedCoordinates.add(temp);\n }\n }\n\n for (int[] usedCoordinate : usedCoordinates) {\n board.setSquare(usedCoordinate[0], usedCoordinate[1], randomNumberGenerator.generateInteger(size) + 1);\n }\n\n //save start locations\n startLocations = usedCoordinates;\n }", "public static int[] generateSuperLottoNoDupes()\n\t\t{\n\t\t\t// create an array that allocates only 6 integer slots.\n\t\t\tint[] ticketNumbers = new int[6];\n\t\t\t\n\t\t\t//generateSuperLottoNumbers() as an argument [1 pts]\n\t\t\t// Hint: numbers[i] = (int) (10 * Math.random()) + 1; // will assign your array element to a random number from 1 to 10\n\t\t\t// The first 5 numbers must be from the range 1 to 47 [1 pt]\n\t\t\t//we want to run the iteration 5 times so we use for loop knowing how many iterations are needed.\n\t\t\tfor (int i = 0; i < 5; i++) \n\t\t\t{\n\t\t\t\tticketNumbers[i] = (int) (47 * Math.random()) + 1; // random method in the Math class will only give number between 0 and 1 not including 1 (0-.99) \t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// so we add plus 1 to avoid the error we have to account for 0 and 47.\n\t\t\t\tfor (int j = 0; j < i; j++)\t\t\t\t\t\t\t\t\t\t\t\t// After first iteration of number 0-47, check if the current ticketNumbers is a duplicate of the preceding iterations.\n\t\t\t\t{\n\t\t\t\t\tif (ticketNumbers[i] == ticketNumbers[j]) \t\t\n\t\t\t\t\t\ti--;\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// If it is a duplicate then decrease the tickerNumber index by one and rerun the fo loop go generate a new random number.\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// The 6th number (the MEGA) must be from 1 to 27. [1 pt]\n\t\t\tticketNumbers[5] = (int) (27 * Math.random()) + 1;\n\n\t\t\treturn ticketNumbers;\n\t\t}", "public static List<Integer> prepareRandomIntegeArrayList(int size) {\n\t\tList<Integer> arrayList = new ArrayList<>(size);\n\t\tfor (int j = 0; j < size; j++) {\n\t\t\tarrayList.add(j, (int) ((Math.random() * 1000000)));\n\t\t}\n\t\treturn arrayList;\n\t}", "public RandomizedSet() {\n\n\n sub =new ArrayList<Integer>();\n hm=new HashMap<Integer,Integer>();\n rand =new Random();\n\n }", "List() {\n final int ten = 10;\n list = new int[ten];\n size = 0;\n }", "private static void createPlayfulSet() {\n\n\t\trandomKeys = new ArrayList<>();\n\n\t\trandomKeys.add(GuessRevealerConstants.RANDOM_TEXT1);\n\t\trandomKeys.add(GuessRevealerConstants.RANDOM_TEXT2);\n\t\trandomKeys.add(GuessRevealerConstants.RANDOM_TEXT3);\n\t\trandomKeys.add(GuessRevealerConstants.RANDOM_TEXT4);\n\t\trandomKeys.add(GuessRevealerConstants.RANDOM_TEXT5);\n\t\trandomKeys.add(GuessRevealerConstants.RANDOM_TEXT6);\n\t\trandomKeys.add(GuessRevealerConstants.RANDOM_TEXT7);\n\t\trandomKeys.add(GuessRevealerConstants.END);\n\n\t\trandomCount = randomKeys.size();\n\n\t}", "static void initializeArray(boolean firstTime) {\n\t\tint count = 0;\n\t\tfor (int i = 0; i < m; i++) {\n\t\t\tRandom r = new Random();\n\t\t\tint val = r.nextInt(m);\n\t\t\tint mod = val % m;\n\t\t\tif (array[mod] == -1) {\n\t\t\t\tarray[mod] = val;\n\t\t\t\tresult[1]++;\n\t\t\t\tcount++;\n\t\t\t} else if (firstTime) {\n\t\t\t\tresult[0] = count;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}", "public static ArrayList<Integer> createRandomList(int n) {\n\n\t\tArrayList<Integer> list = new ArrayList<>();\n\t\tRandom rand = new Random();\n\n\t\tint max = 1000000;\n\t\tint min = -1000000;\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tint value = (int) ((Math.random() * (max - min)) + min);\n\t\t\tlist.add(value);\n\t\t}\n\t\treturn list;\n\t}", "private void fillRandomList()\n\t{\n\t\trandomList.add(\"I like cheese.\");\n\t\trandomList.add(\"Tortoise can move faster than slow rodent.\");\n\t\trandomList.add(\"I enjoy sitting on the ground.\");\n\t\trandomList.add(\"I like cereal.\");\n\t\trandomList.add(\"This is random.\");\n\t\trandomList.add(\"I like typing\");\n\t\trandomList.add(\"FLdlsjejf is my favorite word.\");\n\t\trandomList.add(\"I have two left toes.\");\n\t\trandomList.add(\"Sqrt(2) = 1.414213562 ...\");\n\t\trandomList.add(\"Hi mom.\");\n\t}", "public static void ResetPickedNumbers () {\n picked = new boolean[10];\r\n }", "private static int[] buildArray(int num) {\n\t\t// TODO build an array with num elements\n\t\tif(num ==0) return null;\n\t\t\n\t\tint[] array = new int[num];\n\t\tfor(int i=0; i<num; i++){\n\t\t\t\n\t\t\tarray[i] = (int)(Math.random()*15);\n\t\t}\n\t\t\n\t\treturn array;\n\t}", "public List<Integer> generateLine() {\r\n\t\tList<Integer> tempLine = new ArrayList<Integer>();\r\n\t\tfor (int j=0; j <3; j++) {\r\n\t\t\tint randomNum = ThreadLocalRandom.current().nextInt(0,3);\r\n\t\t\ttempLine.add(randomNum);\r\n\t\t}\r\n\t\treturn tempLine;\r\n\t}", "private static void AskNumbers() {\r\n for (int i = 0; i < userLotto.length; i++) {\r\n\r\n }\r\n for (int i = 0; i < userLotto.length; i++) {\r\n int tmp = MyConsole.readInt(1, ArrayMax, \"Please give number\", \"Please give unique number between [1, 40]\");\r\n\r\n if (!Arrays.contains(tmp, userLotto)) {\r\n userLotto[i] = tmp;\r\n } else {\r\n System.out.println(\"Not unique number!\");\r\n i--;\r\n }\r\n }\r\n }", "public static ArrayList<Integer> genRandomArray(int s) {\n\t\t// TODO Auto-generated method stub\n\t\tArrayList<Integer> R = new ArrayList<Integer>();\n\t\tint i = 0;\n\t\tRandom randNum = new Random();\n\t\tfor (i = 0; i < s; i++) {\n\t\t\tint randNumber = MurmurHash.hashLong(i);\n\t\t\tR.add(randNumber);\n\n\t\t}\n\n\t\treturn R;\n\t}", "public static List<Integer> getIntegerList(){\n List<Integer> nums = new ArrayList<>();//ArrayList<Integer> list = new ArrayList<>();\n for(int i=0;i<=1_000_000;i++) {\n nums.add(i);\n }\n return nums;\n }", "private List<Integer> createListCombinInSlot(List<Integer> tempListForSize) {\n List<Integer> list = new ArrayList<>();\n count++;//slot counter\n if (tempListForSize.size() == 0) {// if the first time run\n for (int i = 0; i < SIZE; i++) {\n int idImageCombination = createListShowCombin(i);\n list.add(idImageCombination);// add the random id of the picture\n }\n } else {// if not the first time run\n switch (count) {\n case 1:\n items.clear();\n list.addAll(tempList);\n tempList.clear();\n break;\n case 2:\n items2.clear();\n list.addAll(tempList2);\n tempList2.clear();\n break;\n case 3:\n items3.clear();\n list.addAll(tempList3);\n tempList3.clear();\n break;\n }//switch\n for (int i = 3; i < SIZE; i++) {\n\n int idImageCombination = createListShowCombin(i);\n switch (count) {\n case 1:\n list.add(idImageCombination);// add the random id of the picture\n break;\n case 2:\n list.add(idImageCombination);// add the random id of the picture\n break;\n case 3:\n list.add(idImageCombination);// add the random id of the picture\n break;\n }//switch\n }//for\n }//if\n flag = false;\n return list;\n }", "private ArrayList<Integer> fillDomain() {\n ArrayList<Integer> elements = new ArrayList<>();\n\n for (int i = 1; i <= 10; i++) {\n elements.add(i);\n }\n\n return elements;\n }", "public void setGivenNumbers(int numbers) {\r\n\t\tthis.givenNumbers= numbers;\r\n\t}", "public static void roll() {\n int random = (int) (Math.random() * (roll.size() - 1) + 0); // numbers are indexes not the actual number you will be genrating\n // thoes numbers are in the list.\n // System.out.println(random); // but you want the number NOT THE INDEX!!!\n int number = roll.get(random);\n System.out.println(\"The number generated is: \" + number);\n roll.remove(random);\n called.add(random); // so I can display the number I called\n for (int i = 0; i < card.length; i++) { // rows\n for (int j = 0; j < card[i].length; j++) { //coloums\n if (card[i][j] == number) {\n card[i][j] = 0;\n }\n\n }\n\n }\n }", "static void initializeArray2() {\n\t\tfor (int i = 0; i < m; i++) {\n\t\t\tRandom r = new Random();\n\t\t\tint val = r.nextInt(m);\n\t\t\t// Hash implementation\n\t\t\tint mod = val % m;\n\t\t\tarray[mod] = val;\n\t\t\tresult[1]++;\n\t\t}\n\t}", "private void collectRandomRIDs(){\n\t\tint numRIDs = iterations + 1;\n\t\trandomRID_list = new String[numRIDs];\n\t\tString randomClusterName;\n\t\tint clusterID, randomPosition;\n\t\t\n\t\t// Collect #iterations of random RID's\n\t\tfor(int i=0; i < numRIDs; i++){\n\t\t\trandomClusterName = env.VERTEX_PREFIX + (int) (Math.random() * env.NUM_VERTEX_TYPE);\n\t\t\tclusterID = db.getClusterIdByName(randomClusterName); \n\t\t\tOClusterPosition [] range = db.getStorage().getClusterDataRange(clusterID);\n\t\t\t\n\t\t\trandomPosition = (int) (Math.random() * range[1].intValue()) + range[0].intValue();\n\t\t\trandomRID_list[i] = \"#\" + clusterID + \":\" + randomPosition;\n\t\t}\n\t\t\n\t}", "private void setRand(){\n rand = generator.nextInt(9) + 1;\n }", "private int[] generateRandomNumbers(int max) {\n\t\tRandom random = new Random();\n\t\tint[] rand_array = new int[max];\n\t\tint cntr = 0;\n\t\t\n\t\t//fill array with a number not coming in random numbers range.\n\t\tfor( int i=0; i<max; i++ )\n\t\t\trand_array[i] = 1111111111;\n\t\t\n\t\twhile( cntr < max ){\n\t\t\tint rand_index = random.nextInt(max);\n\n\t\t\tif(!( in_array(rand_array, rand_index ))){\n\t\t\t\trand_array[cntr] = rand_index;\n\t\t\t\tSystem.out.println(cntr+\" : \"+rand_index);\n\t\t\t\tcntr++;\n\t\t\t}\n\t\t}\n\t\treturn rand_array;\n\t}", "@Test\n public void testGetUniqueInt() {\n UniqueRandomGenerator instance = new UniqueRandomGenerator();\n \n List<Integer> extracted = new ArrayList<>();\n \n for (int i = 0; i < 1000; i++)\n {\n int extr = instance.getUniqueInt(0, 1000);\n \n if (extracted.contains(extr))\n fail();\n else\n extracted.add(extr);\n }\n }", "private void initList() {\n\n }", "private static ListNode initializeListNode() {\n\n\t\tRandom rand = new Random();\n\t\tListNode result = new ListNode(rand.nextInt(10)+1);\n\t\t\n\t\tresult.next = new ListNode(rand.nextInt(10)+1);\n\t\tresult.next.next = new ListNode(rand.nextInt(10)+1);\n\t\tresult.next.next.next = new ListNode(rand.nextInt(10)+1);\n\t\tresult.next.next.next.next = new ListNode(rand.nextInt(10)+1);\n\t\t\n\t\treturn result;\n\t}", "public ProcessGenerator(int numProcesses, int RandomSeed) {\n // initialise instance variables\n this.numProcesses = numProcesses;\n processArrayList = new ArrayList<>();\n this.RandomSeed = RandomSeed;\n\n }", "static void initValues()\n\t // Initializes the values array with random integers from 0 to 99.\n\t {\n\t Random rand = new Random();\n\t for (int index = 0; index < SIZE; index++)\n\t values[index] = Math.abs(rand.nextInt(100001));\n\t for (int i = 0; i < RANDSAMP; i++)\n\t \tvalues2[i] = values[Math.abs(rand.nextInt(SIZE+1))]; \n\t }", "private Countable[] generateArray(int rank){\n var numbers = new Countable[rank];\n for (int i = 0; i < rank; i++) {\n numbers[i] = getRandomCountable();\n }\n return numbers;\n }" ]
[ "0.7447287", "0.71823865", "0.70710635", "0.68596494", "0.67494535", "0.67251444", "0.67055976", "0.666577", "0.661219", "0.6577882", "0.65170115", "0.64895946", "0.6489008", "0.64655644", "0.64431685", "0.641129", "0.63768685", "0.63376707", "0.63328075", "0.63103294", "0.6277871", "0.6259919", "0.621402", "0.61997926", "0.6184898", "0.61791533", "0.6114462", "0.6091808", "0.6078311", "0.60623646", "0.60488105", "0.60424924", "0.6020062", "0.5972733", "0.5971831", "0.59698176", "0.5961614", "0.59495413", "0.5948456", "0.59409875", "0.5929429", "0.590462", "0.5899891", "0.5895608", "0.58873284", "0.588177", "0.5881654", "0.5880879", "0.587773", "0.5855713", "0.5852273", "0.58521307", "0.5844001", "0.5833598", "0.5833313", "0.58256036", "0.58194387", "0.57638276", "0.57635826", "0.5744445", "0.5738223", "0.5704632", "0.56868845", "0.5677474", "0.5672551", "0.56689686", "0.5648541", "0.56469715", "0.5627175", "0.56223893", "0.56216276", "0.5596403", "0.55838233", "0.55729705", "0.55726266", "0.5570938", "0.5561437", "0.5553986", "0.5542779", "0.55382323", "0.553458", "0.5530614", "0.5530422", "0.5530088", "0.55147624", "0.55117834", "0.5510996", "0.5510598", "0.55013967", "0.5498593", "0.54984087", "0.5492576", "0.5490426", "0.54847836", "0.548118", "0.5476601", "0.54739743", "0.547388", "0.54729223", "0.54699385" ]
0.7714357
0
Check here whether the number is among the drawn numbers
public boolean containsNumber(int number) { return this.numbers.contains(number); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean checkForNum(int checkFor, int[] lottoDraw) {\n \n boolean repeat = false;\n // for loop that goes thru length of array\n for (int counter = 0; counter < lottoDraw.length; counter++) {\n // if potential num is in array, break loop and return True\n if (checkFor == lottoDraw[counter]) {\n repeat = true;\n // break loop\n break;\n }\n \n }\n \n return repeat;\n }", "public static boolean isUsedNumber(int num) {\n for (int row = 0; row < SIZE_ROW; row++) {\n for (int col = 0; col < SIZE_COL; col++) {\n if (board[row][col] == num) {\n return true;\n }\n }\n }\n return false;\n }", "public Boolean haveGolden(int[] numbers, int goldenNo){\n\n Set<Integer> setOfNumbers = new HashSet<Integer>();\n\n for (int number:numbers) {\n if (setOfNumbers.contains(goldenNo-number)) //we are assuming goldenNo is > all no\n return true;\n setOfNumbers.add(number);\n }\n return false;\n }", "private boolean determineValid(){\n for(Integer val : group){\n if(!racers.containsKey(val)){\n WrongNumber = val;\n return false;\n }\n }\n return true;\n }", "public boolean blockedGame() {\r\n int pointsperplayer = 0;\r\n if (playedDominoes.size() > 9) {\r\n if (end[0] == end[1]) {\r\n List<Domino> aux = new ArrayList();\r\n for (Domino d : playedDominoes) {\r\n if (d.getBothNumbers().contains(end[0])) {\r\n System.out.println(\"Adding domino\" + d.toString());\r\n aux.add(d);\r\n }\r\n }\r\n return aux.size() == 7;\r\n }\r\n }\r\n return false;\r\n }", "private boolean numbersCorrect( int[] num ) {\n ArrayList<Integer> sourceNumList = new ArrayList<Integer>();\r\n for (int sourceNumber : sourceNumbers) {\r\n sourceNumList.add(sourceNumber);\r\n }\r\n for (int aNum : num) {\r\n boolean removed = sourceNumList.remove(new Integer(aNum));\r\n if (!removed)\r\n return false;\r\n }\r\n return true;\r\n }", "boolean UsedInBox(int grid[][], int boxStartRow, int boxStartCol, int num)\n{\n for (int row = 0; row < 3; row++)\n for (int col = 0; col < 3; col++)\n if (grid[row+boxStartRow][col+boxStartCol] == num)\n return true;\n return false;\n}", "private boolean rowCheck(Point point, int num) {\n return Search.getCellsFromRow(point).stream().allMatch(cell -> cell.getNumber() != num);\n }", "public Boolean insideStraightDraw(Integer[] cardRanks, Integer minNum) {\n\t\tBoolean retVal = false;\n\t\tArrays.sort(cardRanks);\n\t\tSet<Integer> uniqCards = new TreeSet<Integer>();\n\t\tuniqCards.addAll(Arrays.asList(cardRanks));\n\t\tif (uniqCards.contains(1)) uniqCards.add(14); // put an ace at top and bottom of rank order\n\t\tInteger[] uniqRanks = uniqCards.toArray(new Integer[uniqCards.size()]);\n\t\tfor (int i = minNum-1; i < uniqRanks.length; i++) {\n\t\t\tif(uniqRanks[i-minNum+1] == uniqRanks[i] - minNum) {\n\t\t\t\tretVal = true;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t}\n\t\treturn retVal;\n\t}", "public boolean isNumberSet(int number) {\n int[] pos = boardMapper.get(number);\n String c = boardArray[pos[0]][pos[1]];\n return c.equalsIgnoreCase(\"X\") || c.equalsIgnoreCase(\"O\");\n }", "private boolean isInBlock(int number, int row, int col) {\n\t\trow = row - (row % 3);\n\t\tcol = col - (col % 3);\n\n\t\tfor (int i = row; i < row + 3; i++) {\n\t\t\tfor (int j = col; j < col + 3; j++) {\n\t\t\t\tif (getNumber(i, j) == number) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "public boolean checkMarksNumber(Player shooter, int marks){\n int count=0;\n for(int i=0;i<this.marks.size();i++){\n if(this.marks.get(i)==shooter.getColor())\n count++;\n }\n\n return marks+count<=MARKS_PER_ENEMY;\n }", "boolean checkWin() {\n Iterator<Integer> seq = sequence.iterator();\n Iterator<Integer> in = input.iterator();\n\n while (seq.hasNext() && in.hasNext()) {\n seq.next();\n in.next();\n if (!seq.hasNext() && !in.hasNext()) {\n return true;\n }\n }\n return false;\n }", "public boolean isFourOfAKind(){\n ArrayList<Integer> numbers = new ArrayList<>();\n for (int i = 0; i < dice.length; i++){\n numbers.add(dice[i].getFaceValue());\n }\n\n for(int i = 0; i < numbers.size(); i++){\n int numSame = 0;\n for(int j = 0; j < numbers.size(); j++){\n if(numbers.get(i).equals(numbers.get(j))){\n numSame++;\n }\n }\n if (numSame == 4){\n return true;\n }\n }\n return false;\n }", "boolean questionsAlreadyDisplayed (int randomValue0to29){\n\t\t for (int i = 0 ; i < 10 ; i++){\n\t\t\t if (anArray2 [i] == randomValue0to29){\n\t\t\t\t return true;\t//question already displayed\n\t\t\t }\n\t\t\t\n\t\t }\n\t\t anArray2 [numberOfQuestionsDisplayedCounter] = randomValue0to29; // questionId added to array of displayed questions\n\t\t return false;\t//random number can be used as it has been used already\n\t }", "private boolean checkDraw()\n {\n \tboolean IsDraw = true;\n \tfor(int i =0;i<movesPlayed.length;i++)\n \t{\n \t\t//\"O\" or \"X\"\n \t\tif (!\"X\".equals(movesPlayed[i]) || !\"O\".equals(movesPlayed[i]))\n \t\t//if(movesPlayed[i] != 'X' || movesPlayed[i] != 'O')\n \t\t{\n \t\t\t//System.out.println(movesPlayed[i]);\n \t\t\t//System.out.println(\"False condition \");\n \t\t\tIsDraw = false;\n \t\t\treturn IsDraw;\n \t\t}\n \t}\n \t//System.out.println(\"true condition \");\n \t\n \treturn IsDraw;\n }", "public boolean isFiveOfAKind(){\n ArrayList<Integer> numbers = new ArrayList<>();\n for (int i = 0; i < dice.length; i++){\n numbers.add(dice[i].getFaceValue());\n }\n\n for(int i = 0; i < numbers.size(); i++){\n int numSame = 0;\n for(int j = 0; j < numbers.size(); j++){\n if(numbers.get(i).equals(numbers.get(j))){\n numSame++;\n }\n }\n if (numSame == 5){\n return true;\n }\n }\n return false;\n }", "boolean hasNum();", "boolean hasNum();", "boolean hasNum();", "private boolean checkNumbers(int x, ReturnValue returnValue) {\n\t\tint localCheck = 0;\n\t\tint localPoints = 0;\n\t\tboolean localBool = false;\n\t\tfor (Integer i : intList) {\n\t\t\tif (i == x) {\n\t\t\t\tlocalCheck++;\n\t\t\t}\n\t\t}\n\t\tif (localCheck > 0) {\n\t\t\tlocalBool = true;\n\t\t\tlocalPoints = localCheck * x;\n\t\t}\n\t\treturnValue.setValue(localBool, localPoints, findBox(x));\n\t\treturn true;\n\t}", "boolean hasNum1();", "boolean hasNum2();", "private boolean checkBoxSituation(int secondI, int secondJ) {\n int max = 0;\n if (secondI + 1 < 8) {\n if (checkBlueBox(secondI + 1, secondJ)) {\n max++;\n }\n }\n if (secondI - 1 > -1) {\n if (checkBlueBox(secondI - 1, secondJ)) {\n max++;\n }\n }\n if (secondJ + 1 < 8) {\n if (checkBlueBox(secondI, secondJ + 1)) {\n max++;\n }\n }\n if (secondJ - 1 > -1) {\n if (checkBlueBox(secondI, secondJ - 1)) {\n max++;\n }\n }\n if (max >= 3) {\n return true;\n }\n return false;\n }", "public boolean isWin() {\n int counter = 0;\n\n for (int num : maskResultArray) {\n if (num == 1) counter++;\n }\n\n if (counter == 4) return true;\n return false;\n }", "boolean repeatedPosition() {\r\n if (_repeated && _winner == BLACK) {\r\n System.out.println(\"* Black wins\");\r\n } else if (_repeated && _winner == WHITE) {\r\n System.out.println(\"* White wins\");\r\n }\r\n return _repeated;\r\n }", "private boolean hasValidNumber(String[] coord, int numShip) {\n int[] indices = getIndexFromCoord(coord);\n int x0 = indices[0];\n int y0 = indices[1];\n int x1 = indices[2];\n int y1 = indices[3];\n\n if (x0 == x1) {\n // horizontal ships\n if (Math.abs(y0 - y1) + 1 != numShip) {\n System.out.println(\"Error! Wrong length of the Submarine! Try again:\");\n return false;\n }\n return true;\n } else {\n // vertical ships\n if (Math.abs(x0 - x1) + 1 != numShip) {\n System.out.println(\"Error! Wrong length of the Submarine! Try again:\");\n return false;\n }\n return true;\n }\n }", "public boolean checkDuplicates() {\n\t\tboolean[] vals = new boolean[9];\n\t\tfor(int i = 0; i < 3; i++) {\n\t\t\tfor(int k = 0; k < 3; k++) {\n\t\t\t\tint num = this.getCellNum(i, k);\n\t\t\t\tif(num != 0) {\n\t\t\t\t\tif(!vals[num-1]) {\n\t\t\t\t\t\t//The number hasn't already been found\n\t\t\t\t\t\tvals[num-1] = true;\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\t//A duplicate number was found\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "public boolean hasNumber(){\n return (alg.hasNumber(input.getText().toString()));\n }", "boolean comprovaNumerosQuadrant(int rowStart, int colStart, int num) {\r\n //System.out.println(\"Comprovanumerosquadrant\"+rowStart+colStart);\r\n for (int i = 0; i < SRN; i++) {\r\n for (int j = 0; j < SRN; j++) {\r\n if (mat[rowStart + i][colStart + j] == num) {\r\n \r\n return false;\r\n }\r\n }\r\n }\r\n\r\n return true;\r\n }", "public boolean win(){\n\t\tint num=0;//number of the boxes are in the areas\n\t\tfor(int i=0;i<boxes.size();i++){\n\t\t\tbox a =boxes.get(i);\n\t\t\tfor(int j=0;j<areas.size();j++){\n\t\t\t\tarea b = areas.get(j);\n\t\t\t\tif(a.getX()==b.getX()&&a.getY()==b.getY()){//check whether all the boxes have been in the certain areas\n\t\t\t\t\t//System.out.println(j);\n\t\t\t\t\t//System.out.println(\"area: \"+j);\n\t\t\t\t\tb.emptyImage();//clear the original image of boxes\n\t\t\t\t a.setImage();//change to the colorful one\n\t\t\t\t\tnum++;\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t//\t b.setImage(); \t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(num==areas.size()){//whether their number are same \n\t\t\tnum=0;\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public static boolean vcheck() {\n for (int i = 0; i < card.length; i++) { // rows\n int sum = 0;\n for (int j = 0; j < card.length; j++) { // what coloum\n sum = sum + card[i][j]; // last sum plus the number in the cordinate\n }\n if (sum == 0) {\n System.out.println(\"BINGO\");\n System.out.println(\"The numbers called is \" + called);\n return true;\n\n }\n\n }\n return false;\n\n }", "public boolean checkAcross() {\r\n\t\tif (p1[0] + p1[1] + p1[2] == 15)\r\n\t\t\treturn true;\r\n\t\telse if (p1[3] + p1[4] + p1[5] == 15)\r\n\t\t\treturn true;\r\n\t\telse if (p1[6] + p1[7] + p1[8] == 15)\r\n\t\t\treturn true;\r\n\t\telse if (p2[0] + p2[1] + p2[2] == 15)\r\n\t\t\treturn true;\r\n\t\telse if (p2[3] + p2[4] + p2[5] == 15)\r\n\t\t\treturn true;\r\n\t\telse if (p2[6] + p2[7] + p2[8] == 15)\r\n\t\t\treturn true;\r\n\r\n\t\treturn false;\r\n\t}", "public static boolean hasDups(int[] num) {\n \n //create an int called control\n int control = 1;\n\n //check to see if there are any duplicates in num []\n for (int i = 0; i < num.length; i++) {\n\n for (int j = control; j < num.length; j++) {\n\n if (num[i] == num[j]) {\n return true;\n\n } //end of if statement\n\n } //end of for loop\n\n for (int j = 0; j < i; j++) {\n\n if (num[i] == num[j]) {\n return true;\n\n } //end of if statement\n\n } //end of for loop\n \n control++;\n \n } //end of for loop\n\n return false;\n\n }", "private static void AskNumbers() {\r\n for (int i = 0; i < userLotto.length; i++) {\r\n\r\n }\r\n for (int i = 0; i < userLotto.length; i++) {\r\n int tmp = MyConsole.readInt(1, ArrayMax, \"Please give number\", \"Please give unique number between [1, 40]\");\r\n\r\n if (!Arrays.contains(tmp, userLotto)) {\r\n userLotto[i] = tmp;\r\n } else {\r\n System.out.println(\"Not unique number!\");\r\n i--;\r\n }\r\n }\r\n }", "public boolean contains(int num) {\r\n\t\t\r\n\t\tfor (int i = 0; i < groupList.size();i++)\r\n\t\t\tif (groupList.get(i).contains(num))\r\n\t\t\t\treturn true;\r\n\r\n\t\treturn false;\r\n\t\t\r\n\t}", "boolean isLegalBox (int row, int col, int num) {\n\t\tint x = (row / 3) * 3 ;\n\t\tint y = (col / 3) * 3 ;\n\t\tfor( int r = 0; r < 3; r++ ) {\n\t\t\tfor( int c = 0; c < 3; c++ ) {\n\t\t\t\tif(r != row && c != col) {\n\t\t\t\t\tif( boardArray[y+c][x+r] == num ) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "boolean isSafe(int grid[][], int row, int col, int num)\n{\n /* Check if 'num' is not already placed in current row,\n current column and current 3x3 box */\n return !UsedInRow(grid, row, num) &&\n !UsedInCol(grid, col, num) &&\n !UsedInBox(grid, row - row%3 , col - col%3, num);\n}", "public boolean checkWin() {\n for (int i = 0; i <= 7; i++) {\n for (int j = 0; j <= 4; j++) {\n if (grid[i][j].equals(\"X\") && grid[i][j + 1].equals(\"X\") && grid[i][j + 2].equals(\"X\") && grid[i][j + 3].equals(\"X\")) {\n return true;\n }\n\n\n }\n\n }\n return false;\n }", "boolean hasNumber();", "public boolean checkForVictory() {\n // keep track of whether we have seen any pieces of either color.\n boolean anyWhitePieces = false;\n boolean anyRedPieces = false;\n // iterate through each row\n for (Row row : this.redBoard) {\n // whether we iterate through the red or white board does not matter; they contain the same pieces, just\n // in a different layout\n // iterate through each space in a row\n for (Space space : row) {\n // if there is a piece on this space\n if (space.getPiece() != null) {\n if (space.getPiece().getColor() == Piece.COLOR.RED) {\n // and if it's red, we have now seen at least one red piece\n anyRedPieces = true;\n } else if (space.getPiece().getColor() == Piece.COLOR.WHITE) {\n // and if it's white, we have now seen at least one white piece\n anyWhitePieces = true;\n }\n }\n }\n }\n // if we haven't seen any pieces of a color, then the other player has won\n if (!anyRedPieces) {\n // white player has won\n markGameAsDone(getWhitePlayer().getName() + \" has captured all the pieces.\");\n return true;\n } else if (!anyWhitePieces) {\n // red player has won\n markGameAsDone(getRedPlayer().getName() + \" has captured all the pieces.\");\n return true;\n }\n return false;\n }", "public boolean checkGrid(Set<Integer> numeros, Set<Integer> n_chances) {\n\t\t\n\t\t// The set structure assures there are no doublons\n\t\t\n\t\t// Checks the allowed combinaisons\n\t\tInteger nb_numeros = numeros.size();\n\t\tInteger nb_chances = n_chances.size();\n\t\t\n\t\tif ((nb_numeros > 9) || (nb_numeros < 5)) {\n\t\t\treturn false;\n\t\t}\n\t\telse if ((nb_chances > 10) || (nb_chances < 1)) {\n\t\t\treturn false;\n\t\t}\n\t\telse if (nb_numeros == 9) {\n\t\t\tif (nb_chances > 1) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\telse if (nb_numeros == 8) {\n\t\t\tif (nb_chances > 3) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\telse if (nb_numeros == 7) {\n\t\t\tif (nb_chances > 8) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\t\n\t\t//Checks if numeros are between 1 and 49 and n_chances are between 1 and 10\n\t\tIterator<Integer> iterator1 = numeros.iterator();\n\t\tIterator<Integer> iterator2 = n_chances.iterator();\n\t\t\n\t\tInteger setElement = null;\n\t\twhile(iterator1.hasNext()) {\n\t \tsetElement = iterator1.next();\n\t \tif((setElement < 1) || (setElement > 49)) {\n\t \t\treturn false;\n\t \t}\n\t }\n\t\t\n\t\tsetElement = null;\n\t while(iterator2.hasNext()) {\n\t \tsetElement = iterator2.next();\n\t \tif((setElement < 1) || (setElement > 10)) {\n\t \t\treturn false;\n\t \t}\n\t }\n\t\t\n\t\treturn true;\n\t}", "public boolean duplicatedigitInNumberRange(int num)\r\n\t\r\n\t{\r\n\r\n\t\tMap<Character,Integer> map = new HashMap<Character, Integer>();\r\n\t\tchar[] char1= String.valueOf(num).toCharArray();\r\n\t//\tint count=1;\r\n\t\tboolean f=true;\r\n\tfor(char c:char1)\r\n\t{\r\n\t\tif(f=true)\r\n\t\t{\r\n\t\tif(map.containsKey(c))\r\n\t\t{\r\n\t\t\tf=false;\r\n\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\telse\r\n\t\t{\r\n\t\t\tmap.put(c,1);\r\n\t\t\t\r\n\t\t}\r\n\t\t}\r\n\t\t\r\n\t}\r\n\treturn f;\r\n\t\r\n\t}", "public static boolean hcheck() {\n for (int j = 0; j < card.length; j++) {\n int sum = 0;\n for (int i = 0; i < card.length; i++) { // rows\n sum = sum + card[j][i]; // last sum plus the number in the cordinate\n }\n if (sum == 0) {\n System.out.println(\"BINGO\");\n System.out.println(\"The numbers called is \" + called);\n return true;\n }\n\n }\n return false;\n\n }", "public void checkMarkers(int num) {\n\t\t\n\t}", "public boolean checkForNumber(int m, int n){\r\n\t\tif ( count[m][n] > 0 & count[m][n] < 9 & !bombs[m][n])\r\n\t\t\treturn true ;\r\n\t\treturn false;\r\n\t}", "boolean checkTie(){\n for (int aGameBoard : gameBoard){\n if (aGameBoard == 0)\n return false;\n }\n return true;\n }", "public boolean find(int value) {\n for (int key : numbers.keySet()) {\n int pair = value - key;\n if (numbers.containsKey(pair) && (key != pair || numbers.get(key) > 1)) {\n return true;\n }\n }\n return false;\n }", "public boolean checkColorValue(String valueCombo) {\r\n\t\tString Storedvalue = valueCombo.substring(0,1);\r\n\t\tint storeValueInt = Integer.parseInt(Storedvalue);\r\n\t\tint[] colorValues = getScreenColor(lifeGlobe.getPosition().get(9 - storeValueInt).get(1), \r\n\t\t\t\tlifeGlobe.getPosition().get(9 - storeValueInt).get(0));\r\n\t\tdouble dist = calcDist(colorValues);\r\n\r\n\t\t\r\n\t\t// I might wanna rework this because it dont work 100% of the times\r\n\t\tif(dist < 40){\r\n\t\t\tfc.playSound();\r\n\t\t}\r\n\t\t\r\n\t\r\n\t\treturn false;\r\n\t\r\n\t\t/*\r\n\t\tif(colorValues[0] != 186.0 && colorValues[0] != 91.0){\r\n\t\t\tif(colorValues[1] != 149.0 && colorValues[1] != 70.0){\r\n\t\t\t\tif(colorValues[1] != 107.0 && colorValues[1] != 45.0){\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\r\n\t\t\r\n\t\t}\r\n\t\t*/\r\n\t}", "public final boolean checkForDraw() {\r\n boolean result = false;\r\n String player = \"\";\r\n \r\n for (Rail rail : rails) {\r\n if (rail.isWinner()) {\r\n return false;\r\n }\r\n }\r\n \r\n if (tilesPlayed == 9) {\r\n draws++;\r\n // window.getStatusMsg().setText(DRAW_MSG); \r\n result = true;\r\n }\r\n \r\n return result;\r\n }", "private boolean isSquareQuantityValid() {\n int blueSquares = 0;\n int yellowSquares = 0;\n int greenSquares = 0;\n int whiteSquares = 0;\n int orangeSquares = 0;\n int redSquares = 0;\n\n for (RubiksFace face : rubiksFaceList) {\n for (RubiksColor color : face.getRubiksColors()) {\n switch(color) {\n case RED:\n redSquares++;\n break;\n case GREEN:\n greenSquares++;\n break;\n case BLUE:\n blueSquares++;\n break;\n case YELLOW:\n yellowSquares++;\n break;\n case ORANGE:\n orangeSquares++;\n break;\n case WHITE:\n whiteSquares++;\n break;\n }\n }\n }\n\n System.out.println(\"BLUE: \" + blueSquares);\n System.out.println(\"YELLOW: \" + yellowSquares);\n System.out.println(\"GREEN: \" + greenSquares);\n System.out.println(\"WHITE: \" + whiteSquares);\n System.out.println(\"ORANGE: \" + orangeSquares);\n System.out.println(\"RED: \" + redSquares);\n\n return (blueSquares == 9 && yellowSquares == 9 && greenSquares == 9 && whiteSquares == 9 && orangeSquares == 9 && redSquares == 9);\n }", "while (!found && index < valid.length)\n {\n if (valid[index] == number)\n found = true;\n else\n index++;\n }", "boolean isWinningCombination(Ticket ticket);", "private LotteryResults drawOnce(Set<Integer> winningNumbers)\r\n\t{\r\n\t\tLotteryResults results = new LotteryResults();\r\n\t\tfor(LotteryTicket ticket : lotteryTickets)\r\n\t\t{\t\r\n\t\t\tint matchingNumberCount = getIntersection(ticket.getNumbers(), winningNumbers).size();\r\n\t\t\tresults.addResult(ticket.getOwnerName(), getPrize(matchingNumberCount));\r\n\t\t}\r\n\t\treturn results;\r\n\t}", "boolean hasBlockNumber();", "boolean hasBlockNumber();", "private boolean checkRow(int num, int row) {\n for(int col = 0; col < 5; col++){\n if(numberGrid[row][col] == num){\n return false;\n }\n }\n return true;\n }", "private static boolean areAdjoining(List<Integer> list) {\r\n if (list.isEmpty()) {\r\n return false;\r\n }\r\n int check = list.get(0);\r\n for (int value : list) { // (use iterator for efficiency)\r\n if (value != check) {\r\n return false;\r\n }\r\n check += 1;\r\n }\r\n return true;\r\n }", "private boolean is_valid(int x, int y, int proposed_color) {\n\t\tfor (int x1 = 1; x1 <= x; x1++) {\n\t\t\tif (color[x1 - 1][y - 1] == proposed_color)\n\t\t\t\treturn false;\n\t\t}\n\t\tfor (int y1 = 1; y1 <= y; y1++) {\n\t\t\tif (color[x - 1][y1 - 1] == proposed_color)\n\t\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "public boolean isDraw(){\n String config = gameBoardToString();\n\n // Checks to see if there any more empty squares in the gameBoard. Returns -1 if 'g' not found in String config,\n // meaning there are no more empty squares in the gameBoard\n int val = config.indexOf('g');\n\n // Return true if no more empty squares. Otherwise, false.\n if (val == -1){\n return true;\n }\n else {\n return false;\n }\n }", "private boolean isFound(int remaingingMarbles) {\n\n return (Math.log(remaingingMarbles) / Math.log(2)) % 1 == 0 ;\n\n }", "public boolean checkColoring(int[] ccolor){\n // \tfor(int i = 0; i < ccolor.length; i++){\n //\t System.out.println(Arrays.toString(ccolor));\n \t//}\n for(int i = 0; i < ccolor.length; i++){\n for(int w = 0; w < ccolor.length; w++){\n \t//System.out.println(i + \",\" + w);\n if(hasEdge(i,w) && (ccolor[i] == ccolor[w])){\n \t//System.out.println(i + \",false\" + w);\n return false;\n }\n }\n }\n return true;\n }", "static boolean isInside(int x, int y, int N) {\n if (x >= 1 && x <= N && y >= 1 && y <= N) {\n return true;\n }\n return false;\n }", "public String checkNumber(String num)\n {\n String[] numbers=num.split(\",\");\n int[] number=new int[numbers.length];\n\n //convert string elements into integer and store in array\n for(int i=0;i<numbers.length;i++)\n {\n number[i]=Integer.parseInt(numbers[i]);\n }\n int flag=0;\n\n //check if the numbers in the array are consecutive\n for(int i=0;i<number.length-1;i++)\n {\n if(number[i+1]==(number[i]-1))\n {\n flag=1;\n }\n else {\n flag=0;\n break;\n }\n }\n if(flag==1)\n {\n return \"Consecutive numbers\";\n }\n else{\n return \"Non consecutive numbers\";\n }\n }", "boolean hasXYPairs();", "public boolean isMine(int x, int y);", "public static boolean dcheck() {\n if ((card[0][0] == 0 && card[1][1] == 0 && card[2][2] == 0 && card[3][3] == 0 && card[4][4] == 0) || (card[0][4] == 0 && card[1][3] == 0 && card[2][2] == 0 && card[3][1] == 0 && card[4][0] == 0)) {\n System.out.println(\"BINGO\");\n System.out.println(\"The numbers called is \" + called);\n return true;\n } else {\n return false;\n }\n }", "public static boolean checkNum(int[][] puzzle){\n for(int i = 0; i < 9; i++){\n for(int j = 0; j < 9; j++){\n if(puzzle[i][j] != 0){\n if(!checkNumH(i, j, puzzle)){\n return false;\n }\n }\n }\n }\n return true;\n }", "private boolean isWinning(Piece[] arr) {\n if (arr[0] == X) {\n for (Piece piece : arr) {\n if (piece != X) {\n return false;\n }\n }\n }\n else {\n for (Piece piece : arr) {\n if (piece != O) {\n return false;\n }\n }\n }\n return true;\n }", "private boolean obligatoryEats(Color pColor){\r\n Point pos = new Point();\r\n for (int i = 0; i < 8; i++){\r\n pos.setFirst(i);\r\n for (int j = 0; j < 8; j++){\r\n pos.setSecond(j);\r\n if(isBlack(pColor) && !isEmpty(pos) && isBlack(pos) && canEats(pos))\r\n return true;\r\n if(isRed(pColor) && !isEmpty(pos) && isRed(pos) && canEats(pos))\r\n return true;\r\n }\r\n }\r\n return false;\r\n }", "private boolean isRun(CribbageRank[] combo) {\n for (int i = 1; i < combo.length; i++) {\n if (!combo[i - 1].nextHigher().equals(combo[i])) {\n return false;\n }\n }\n return true;\n }", "private boolean colCheck(Point point, int num) {\n return Search.getCellsFromCol(point).stream().allMatch(cell -> cell.getNumber() != num);\n }", "public boolean meWin(){\n return whitePieces.size() > blackPieces.size() && isWhitePlayer;\n }", "private boolean m(){\r\n int m = countColors - maxSat;\r\n if (m <= TH){\r\n return true;\r\n }else{\r\n return false;\r\n }\r\n }", "@Override\n public boolean contain(int x, int y) {\n return(x>=this.x && y>=this.y && x<=this.x+(int)a && y<=this.y+(int)b);\n }", "private boolean subGridCheck() {\n\t\tint sqRt = (int)Math.sqrt(dimension);\n\t\tfor(int i = 0; i < sqRt; i++) {\n\t\t\tint increment = i * sqRt;\n\t\t\tfor(int val = 1; val <= dimension; val++) {\n\t\t\t\tint valCounter = 0;\n\t\t\t\tfor(int row = 0 + increment; row < sqRt + increment; row++) {\n\t\t\t\t\tfor(int col = 0 + increment; col < sqRt + increment; col++) {\n\t\t\t\t\t\tif(puzzle[row][col] == val)\n\t\t\t\t\t\t\tvalCounter++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(valCounter >= 2)\n\t\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "private boolean arePointsRepeated(Point[] points) {\n for (int i = 0; i < points.length; i++) {\r\n for (int j = i + 1; j < points.length; j++) {\r\n if (points[i].compareTo(points[j]) == 0)\r\n return true;\r\n }\r\n }\r\n return false;\r\n }", "boolean gameOver() {\n return piecesContiguous(BLACK) || piecesContiguous(WHITE);\n }", "public boolean isOver() {\n for (int i = 0; i < n; i++) {\n for (int j = 0; j < n; j++) {\n if (!matrix[i][j].isClicked()) {\n return false;\n }\n }\n }\n return true;\n }", "private void drawWinner() {\n boolean allowMultiWinnings = ApplicationDomain.getInstance().getActiveLottery().isTicketMultiWinEnabled();\n\n // Get all lottery numbers without a prize\n ArrayList<LotteryNumber> numbersEligibleForWin = new ArrayList<>();\n TreeMap<Object, Ticket> tickets = ApplicationDomain.getInstance().getActiveLottery().getTickets();\n for (Object ticketId : tickets.keySet()) {\n Ticket ticket = tickets.get(ticketId);\n\n ArrayList<LotteryNumber> availableFromTicket = new ArrayList<>();\n for (LotteryNumber number : ticket.getLotteryNumbers()) {\n if (number.getWinningPrize() == null) {\n availableFromTicket.add(number);\n } else {\n if (!allowMultiWinnings) {\n // Stop looking through the ticket since it already has a winner and\n // multiply winnings are disallowed. And prevent the already-looked-through\n // numbers of the ticket to be added.\n availableFromTicket.clear();\n break;\n }\n }\n }\n numbersEligibleForWin.addAll(availableFromTicket);\n }\n\n // Check for all numbers having won\n if (numbersEligibleForWin.isEmpty()) {\n Toast.makeText(getContext(), R.string.no_winless_numbers, Toast.LENGTH_LONG).show();\n return;\n }\n\n // Draw random number and save the ID in the prize\n int numberSelector = (int) (Math.random() * numbersEligibleForWin.size());\n Prize prizeToBeWon = ApplicationDomain.getInstance().getPrizeToBeWon();\n prizeToBeWon.setNumberId(numbersEligibleForWin.get(numberSelector).getId());\n\n ApplicationDomain.getInstance().prizeRepository.savePrize(prizeToBeWon);\n ApplicationDomain.getInstance().setPrizeToBeWon(null);\n }", "private void computeWinLose() {\n\n if (!id11.getText().isEmpty()) {\n if ((id11.getText().equals(id00.getText()) && id11.getText().equals(id22.getText())) ||\n (id11.getText().equals(id02.getText()) && id11.getText().equals(id20.getText())) ||\n (id11.getText().equals(id10.getText()) && id11.getText().equals(id12.getText())) ||\n (id11.getText().equals(id01.getText()) && id11.getText().equals(id21.getText()))) {\n winner = id11.getText();\n }\n }\n\n if (!id00.getText().isEmpty()) {\n if ((id00.getText().equals(id01.getText()) && id00.getText().equals(id02.getText())) ||\n id00.getText().equals(id10.getText()) && id00.getText().equals(id20.getText())) {\n winner = id00.getText();\n }\n }\n\n if (!id22.getText().isEmpty()) {\n if ((id22.getText().equals(id21.getText()) && id22.getText().equals(id20.getText())) ||\n id22.getText().equals(id12.getText()) && id22.getText().equals(id02.getText())) {\n winner = id22.getText();\n }\n }\n\n // If all the grid entries are filled, it is a draw\n if (!id00.getText().isEmpty() && !id01.getText().isEmpty() && !id02.getText().isEmpty() && !id10.getText().isEmpty() && !id11.getText().isEmpty() && !id12.getText().isEmpty() && !id20.getText().isEmpty() && !id21.getText().isEmpty() && !id22.getText().isEmpty()) {\n winner = \"Draw\";\n }\n\n if (winner != null) {\n if (\"X\".equals(winner)) {\n winner = playerX;\n } else if (\"O\".equals(winner)) {\n winner = playerO;\n } else {\n winner = \"Draw\";\n }\n showWindow(winner);\n }\n }", "public boolean find(int value) {\n for(int num1 : list){\n int num2 = value - num1;\n if((num1 == num2) && map.get(num1) > 1 || (num1 != num2) && map.containsKey(num2)) return true;\n }\n return false;\n }", "boolean canPickup(int x, int y) {\n return ((posX == x) && (posY == y));\n }", "private int inRange(int x, int y) {\n\t\tif (x > 3 && y > 3 && x < max_x - 3 && y < max_y - 3) {\n\t\t\treturn 1;\n\t\t} else {\n\t\t\treturn 0;\n\t\t}\n\t}", "public boolean isLegal(int x_pos, int y_pos){\n //TODO\n //if the color is black,\n if(color==\"black\" || color.equals(\"black\")){\n for(int i=1; i<8; i++){\n if(this.x_pos-i==x_pos && y_pos==this.y_pos) return true;\n if(this.x_pos==x_pos && this.y_pos-i==y_pos) return true;\n }\n }\n //if the color is white, then its going up the board (you add the position)\n else{\n for(int i=1; i<8; i++){\n if(this.x_pos+i==x_pos && y_pos==this.y_pos) return true;\n if(this.x_pos==x_pos && this.y_pos+i==y_pos) return true;\n }\n }\n return false;\n }", "boolean numberIsLegal (int row, int col, int num) {\n\t\tif (isLegalRow(row, col, num)&&isLegalCol(col, row, num)&&isLegalBox(row,col,num)) {\n\t\t\treturn true;\n\t\t} else if (num == 0) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "private static boolean isValid(int x, int y)\n\t {\n\t if (x < M && y < N && x >= 0 && y >= 0) {\n\t return true;\n\t }\n\t \n\t return false;\n\t }", "public static boolean hasStraight(Card [] cards) {\n\t\tint smallNum = 14;\n\t\tint counter = 0;\n\t\tfor (int i = 0; i<cards.length; i++){\n\t\t\tif (cards[i].getValue() < smallNum){\n\t\t\t\tsmallNum = cards[i].getValue(); \n\t\t\t}\n\t\t}\n\t\tfor (int i = 0; i<cards.length; i++){\n\t\t\tif (cards[i].getValue() == smallNum+1){\n\t\t\t\tcounter++;\n\t\t\t}\n\t\t}\n\t\tif (counter == 0 && smallNum == 1){\n\t\t\tsmallNum = 10;\n\t\t}\n\t\tfor (int x = 0; x<cards.length; x++){\n\t\t\tif (cards[x].getValue() == smallNum){\n\t\t\t\tcounter++;\n\t\t\t}\n\t\t}\n\t\tif(counter!=0){\n\t\t\tcounter = 1;\n\t\t\tfor (int x = 0; x<cards.length; x++){\n\t\t\t\tif (cards[x].getValue() == smallNum+1){\n\t\t\t\t\tcounter++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(counter!=1){\n\t\t\t\tcounter = 2;\n\t\t\t\tfor (int x = 0; x<cards.length; x++){\n\t\t\t\t\tif (cards[x].getValue() == (smallNum+2)){\n\t\t\t\t\t\tcounter++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(counter!=2){\n\t\t\t\t\tcounter = 3;\n\n\t\t\t\t\tfor (int x = 0; x<cards.length; x++){\n\t\t\t\t\t\tif (cards[x].getValue() == smallNum+3){\n\t\t\t\t\t\t\tcounter++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif(counter!=3){\n\t\t\t\t\t\tcounter = 4;\n\n\t\t\t\t\t\tif((smallNum+4) == 14){\n\t\t\t\t\t\t\tsmallNum = 1;\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\tsmallNum = smallNum+4;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfor (int x = 0; x<cards.length; x++){\n\t\t\t\t\t\t\tif (cards[x].getValue() == smallNum){\n\t\t\t\t\t\t\t\tcounter++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(counter!=4){\n\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t}\n\t\t\t\t\t}else{\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}else{\n\t\t\treturn false;\n\t\t}\n\t}", "private boolean checkVictory(){\r\n boolean wins = true;\r\n for (int i = 0; i < hidden.length; i++){\r\n if (hidden[i] == '_'){\r\n wins = false;\r\n }\r\n }\r\n return wins;\r\n }", "public boolean isInRange(Point testPt){\n\t\tfor(int i = 0; i < display.size();i++){\n\t\t\tif(testPt.x >= display.get(i).x && testPt.y >= display.get(i).y && testPt.x <= (display.get(i).x + display.get(i).width()) && testPt.y <= (display.get(i).y + display.get(i).height())){\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "public boolean isGameOver() throws IllegalStateException {\n if (!isGameStarted) {\n throw new IllegalStateException(\"Game has not yet started!\");\n }\n List<Card> visibleCards = new ArrayList<>();\n for (int rowCount = 0; rowCount < pyramidOfCards.size(); rowCount++) {\n for (int cardCount = 0; cardCount < pyramidOfCards.get(rowCount).size(); cardCount++) {\n Card card = pyramidOfCards.get(rowCount).get(cardCount);\n if (card != null && (isVisibleRelaxed(rowCount, cardCount, rowCount + 1, cardCount)\n || isVisibleRelaxed(rowCount, cardCount, rowCount + 1, cardCount + 1))) {\n visibleCards.add(card);\n }\n }\n }\n if (visibleCards.size() == 0) {\n return true;\n } else {\n // checking for pairsum =13 in visible cards\n HashSet<Integer> hm = new HashSet<>();\n for (Card card : visibleCards) {\n int val = getIntValue(card.getFaceValue());\n if (hm.contains(13 - val) || val == 13) {\n return false;\n } else {\n hm.add(val);\n }\n }\n if (getNumDraw() != 0) {\n return false;\n }\n\n }\n return true;\n }", "private boolean noConflictInRow(int rowIndex, int number) {\n for (int i = 0; i < 9; i++) {\n if (grid[rowIndex][i] == number) {\n return false;\n }\n }\n return true;\n }", "private boolean identify(BaseNumber randomDoubleNumber, BaseNumber userDoubleNumber) {\n\n int compare = randomDoubleNumber.compareTo(userDoubleNumber);\n\n switch (compare) {\n case -1:\n System.out.println(\"Your number is to high.\");\n return false;\n case 0:\n System.out.println(\"Winner\");\n return true;\n default:\n System.out.println(\"to small\");\n return false;\n }\n }", "public void infection() {\n\r\n chance = r.nextInt(100); //Random Integer\r\n found = false; // Boolean Value\r\n for (int i = 0; i < storage.size(); i++) {\r\n if (chance == storage.get(i)) { //if random int is equal to any element in List\r\n found = true; // Set boolean value \r\n break;\r\n\r\n } else {\r\n found = false;\r\n numhealthy.setText(\"\" + (100 - count));\r\n numinfected.setText(\"\" + count);\r\n\r\n }\r\n }\r\n\r\n if (found == false) {\r\n storage.add(chance);\r\n pixellist.get(chance).setBackground(new Color(216, 19, 55));\r\n count++;\r\n numhealthy.setText(\"\" + (100 - count));\r\n numinfected.setText(\"\" + count);\r\n }\r\n\r\n }", "private boolean canIGenerateNextRound() {\n\t\tint totalRounds = mTournament.getTotalRounds();\n\t\tint currentRouns = mTournament.getRounds().size();\n\n\t\tList<Integer> roundNumbers = new ArrayList<>();\n\t\tfor (ChesspairingRound round : mTournament.getRounds()) {\n\t\t\tif (roundNumbers.contains(round.getRoundNumber())) {\n\t\t\t\t// you have 2 rounds with the same id\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\troundNumbers.add(round.getRoundNumber());\n\t\t}\n\n\t\tif (currentRouns < totalRounds) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "private boolean player1Wins() {\n\n boolean p1inTriangle = false;\n int target[] = new int[]{53, 61, 62, 69, 70, 71, 77, 78, 79, 80};\n for (int i : target) { \n if (board[i] == 0)\n return false;\n if (board[i] == 1)\n p1inTriangle = true;\n }\n\n return p1inTriangle;\n }", "public boolean checkForCodek(){\n int size = pile.size();\n if(size >= 4){\n for(int i = size-1; i >= size-3; i--)\n if(pile.get(i).getVal() != pile.get(i-1).getVal())\n return false;\n return true;\n }\n else return false;\n }", "boolean hasGrid();", "public boolean contains(int num) {\n for (int i = 0; i < count; i++) {\n if (list[i] == num) {\n return true;\n } \n }\n \n return false;\n }", "public static boolean answer(String[] proposition, String[] colors) {\n\t\t//System.out.println(colors[0]+ \" \" + colors[1]+ \" \" + colors[2]+ \" \" + colors[3]);\n\t\t//System.out.println(proposition[0]+ \" \" + proposition[1]+ \" \" + proposition[2]+ \" \" + proposition[3]);\n\t\t\n\t\tint placed = 0, misplaced = 0;\n\t\tList<Integer> verified = new ArrayList<Integer>();\n\t\tList<Integer> notverified = new ArrayList<Integer>();\n\t\tint i = 0, j = 0;\n\n\t\t// Check placed ones\n\t\twhile (i < colors.length) {\n\t\t\tif (proposition[i].equals(colors[i])) {\n\t\t\t\tverified.add(i);\n\t\t\t\tplaced++;\n\n\t\t\t} else\n\t\t\t\tnotverified.add(i);\n\t\t\ti++;\n\t\t}\n\n\t\t// Check misplaced\n\t\twhile (j < notverified.size()) {\n\t\t\tfor (int l = 0; l < notverified.size(); l++) {\n\t\t\t\tif (colors[notverified.get(j)].equals(proposition[notverified.get(l)])) {\n\t\t\t\t\tmisplaced++;\n\t\t\t\t\tnotverified.remove(l);\n\t\t\t\t}\n\t\t\t}\n\t\t\tj++;\n\t\t}\n\n\t\t// Final print\n\t\tif ((placed == 4 && rounds == 1) || (placed == 4 && victory)) {\n\t\t\tSystem.out.println(\"Victory!\" + \"\\nThe answer was: [\" + proposition[0] + \", \" + proposition[1] + \", \" + proposition[2]\n\t\t\t\t\t+ \", \" + proposition[3] + \"]\" );\n\t\t\treturn true;\n\t\t}\n\t\tif (placed == 4) {\n\t\t\tvictory = true;\n\t\t\treturn true;\n\t\t} \n\t\telse if (not_twice){\n\t\t\tSystem.out.println(misplaced + \" misplaced and \" + placed + \" placed\" + \"\\nTry again\");\n\t\t\tnot_twice = false;\n\t\t\treturn false;\n\t\t}\n\t\telse {\n\t\t\tnot_twice = true;\n\t\t\treturn false;\n\t\t}\n\t}", "private boolean checkLines(){\n\n for (int[] line : TwoPlayersActivity.lines) {\n\n if (field.get(line[0]).equals(field.get(line[1])) &&\n field.get(line[0]).equals(field.get(line[2])) &&\n !field.get(line[0]).getValue().equals(Cell.Value.NONE)){\n for (int index: line) {\n imageList.get(index).setBackgroundColor(Color\n .parseColor(TwoPlayersActivity.CELL_WIN_COLOR));\n }\n return true;\n }\n }\n return false;\n }" ]
[ "0.6573296", "0.6456888", "0.62303436", "0.62057245", "0.6172467", "0.6056295", "0.6031591", "0.60103613", "0.600855", "0.59944314", "0.5944256", "0.5930615", "0.5930098", "0.59102035", "0.589565", "0.58888805", "0.5835974", "0.58206487", "0.58206487", "0.58206487", "0.5820378", "0.58120805", "0.5809607", "0.5801805", "0.5795478", "0.57788754", "0.57690346", "0.57596415", "0.5739826", "0.57359594", "0.5732048", "0.5721406", "0.57102513", "0.57027864", "0.57027495", "0.5697558", "0.56835675", "0.56735617", "0.5672965", "0.56572187", "0.5654105", "0.5643251", "0.56352973", "0.5629514", "0.5627773", "0.5617826", "0.5608308", "0.5600515", "0.55882764", "0.5577947", "0.5576572", "0.5576393", "0.5572836", "0.55692655", "0.55675006", "0.55675006", "0.5567144", "0.55619556", "0.55574197", "0.55570513", "0.55544126", "0.5545264", "0.5544679", "0.5541784", "0.55376184", "0.55287397", "0.5526448", "0.55250585", "0.5523451", "0.5522594", "0.55172056", "0.551467", "0.5512881", "0.551154", "0.55017674", "0.5500168", "0.54966974", "0.5486053", "0.54801345", "0.54787624", "0.5478752", "0.54706", "0.5466705", "0.54663855", "0.54655546", "0.5457259", "0.5456545", "0.54519385", "0.54447424", "0.54185826", "0.5418355", "0.54122496", "0.5404103", "0.5403973", "0.540277", "0.5400325", "0.5399549", "0.53955746", "0.5394992", "0.5387301", "0.53872836" ]
0.0
-1
LATER It's not ideal that currently the web response needs to be parsed twice, once for the search results and once for the completion of the indexer search result. Will need to check how much that impacts performance
@Override protected void completeIndexerSearchResult(String response, IndexerSearchResult indexerSearchResult, AcceptorResult acceptorResult, SearchRequest searchRequest, int offset, Integer limit) { Document doc = Jsoup.parse(response); if (doc.select("table.xMenuT").size() > 0) { Element navigationTable = doc.select("table.xMenuT").get(1); Elements pageLinks = navigationTable.select("a"); boolean hasMore = !pageLinks.isEmpty() && pageLinks.last().text().equals(">"); boolean totalKnown = false; indexerSearchResult.setOffset(searchRequest.getOffset()); int total = searchRequest.getOffset() + 100; //Must be at least as many as already loaded if (!hasMore) { //Parsed page contains all the available results total = searchRequest.getOffset() + indexerSearchResult.getSearchResultItems().size(); totalKnown = true; } indexerSearchResult.setHasMoreResults(hasMore); indexerSearchResult.setTotalResults(total); indexerSearchResult.setTotalResultsKnown(totalKnown); } else { indexerSearchResult.setHasMoreResults(false); indexerSearchResult.setTotalResults(0); indexerSearchResult.setTotalResultsKnown(true); } indexerSearchResult.setPageSize(100); indexerSearchResult.setOffset(offset); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void parseData(String url, String response) {\n\n if (response.isEmpty()) {\n if (!mErrorMessage.isEmpty()) {\n alertParseErrorAndFinish(mErrorMessage);\n } else {\n renderData();\n }\n } else {\n if (mItemTotal == 0) {\n //---------------------------------------------------------------------------------\n // 목록 파싱하기 - 아메바 블로그의 HTML 코드가 변경됨. 파서 다시 만들어야 함. 2016-09-10\n //---------------------------------------------------------------------------------\n switch (mSiteData.getId()) {\n case Config.BLOG_ID_AKB48_TEAM8:\n Akb48Parser akb48Parser = new Akb48Parser();\n akb48Parser.parseTeam8ReportList(response, mNewDataList);\n break;\n case Config.BLOG_ID_SKE48_SELECTED:\n case Config.BLOG_ID_NMB48_OFFICIAL:\n BaseParser parser = new BaseParser();\n parser.parseAmebaList(response, mNewDataList);\n mItemTotal = mNewDataList.size();\n break;\n case Config.BLOG_ID_NGT48_MANAGER:\n Ngt48Parser ngt48manager = new Ngt48Parser();\n ngt48manager.parseLineBlogList(response, mNewDataList);\n //Collections.sort(mNewDataList);\n //Collections.sort(mNewDataList, Collections.reverseOrder());\n break;\n case Config.BLOG_ID_NGT48_PHOTOLOG:\n Ngt48Parser ngt48photo = new Ngt48Parser();\n ngt48photo.parseMemberBlogList(response, mNewDataList);\n //Collections.sort(mNewDataList);\n Collections.sort(mNewDataList, Collections.reverseOrder());\n break;\n }\n }\n\n //-------------------------------\n // 항목별 사진 파싱하기\n //-------------------------------\n if (mItemTotal > 0) { // && mItemTotal >= mItemCount) {\n if (mItemCount > 0) {\n BaseParser parser = new BaseParser();\n String[] array = parser.parseAmebaArticle(response);\n\n WebData webData = mNewDataList.get(mItemCount - 1);\n webData.setContent(array[0]);\n webData.setImageUrl(array[1]);\n }\n\n if (mItemCount < mItemTotal) {\n WebData webData = mNewDataList.get(mItemCount);\n String reqUrl = webData.getUrl();\n String reqAgent = Config.USER_AGENT_MOBILE;\n\n requestData(reqUrl, reqAgent);\n updateProgress();\n\n mItemCount++;\n } else {\n mItemTotal = 0;\n mItemCount = 0;\n mPbLoadingHorizontalMore.setProgress(0);\n }\n }\n\n if (mItemTotal == 0) {\n renderData();\n }\n }\n }", "private void fetchNextBlock() {\n try {\n \tSearchClient _client = new SearchClient(\"cubansea-instance\");\n \tWebSearchResults _results = _client.webSearch(createNextRequest());\n \t\tfor(WebSearchResult _result: _results.listResults()) {\n \t\t\tresults.add(new YahooSearchResult(_result, cacheStatus+1));\n \t\t\tcacheStatus++;\n \t\t}\n \t\tif(resultCount == -1) resultCount = _results.getTotalResultsAvailable().intValue();\n } catch (IOException e) {\n\t\t\tthrow new TechnicalError(e);\n\t\t} catch (SearchException e) {\n\t\t\tthrow new TechnicalError(e);\n\t\t}\n\t}", "private void search(int i) throws UnsupportedEncodingException{\n //assemble the esearch URL\n String base = \"https://eutils.ncbi.nlm.nih.gov/entrez/eutils/\";\n String url = base + \"esearch.fcgi?db=\" + db;\n \n // Log printing\n if(debugMode) {\n System.out.println(\" \" + new Date().toString() + \" \" + db + \" Search > URL :\" + url);\n } \n\n // send POST request\n RequestConfig globalConfig = RequestConfig.custom().setCookieSpec(CookieSpecs.IGNORE_COOKIES).build();\n CloseableHttpClient client = HttpClients.custom().setDefaultRequestConfig(globalConfig).build();\n \n HttpPost request = new HttpPost (url);\n List <NameValuePair> nvps = new ArrayList <>();\n nvps.add(new BasicNameValuePair(\"term\", queries.get(i)));\n nvps.add(new BasicNameValuePair(\"usehistory\", \"y\"));\n request.setEntity(new UrlEncodedFormEntity(nvps));\n\n // Log printing\n if(debugMode) {\n System.out.println(\" \" + new Date().toString() + \" \" + db + \" Search > query : \" + queries.get(i));\n } \n \n CloseableHttpResponse response;\n try {\n response = client.execute(request);\n BufferedReader rd = new BufferedReader( new InputStreamReader(response.getEntity().getContent()));\n StringBuffer result = new StringBuffer();\n String line = \"\";\n\n Matcher matcher = null;\n while ((line = rd.readLine()) != null) {\n //parse WebEnv, QueryKey and Count (# records retrieved)\n if(line.startsWith(\"<eSearchResult>\")){\n// System.out.println(line);\n //Get webEnv\n matcher = webEnvPattern.matcher(line);\n if (matcher.find())\n {\n webEnvs.add(i,matcher.group(1));\n } else {\n System.out.println(\"No WebEnv found in \" + line);\n }\n // get QueryKey\n matcher = queryKeyPattern.matcher(line);\n if (matcher.find())\n {\n queryKeys.add(i,matcher.group(1));\n } else {\n System.out.println(\"No QueryKey found in \" + line);\n }\n // get Count\n matcher = countPattern.matcher(line);\n if (matcher.find())\n {\n counts.add(i,matcher.group(1));\n } else {\n System.out.println(\"No Count found in \" + line);\n }\n } else if (line.startsWith(\"<ERROR>\")){\n System.out.println(\" \" + new Date().toString() + \" \" + db + \" Search > ERROR :\" + line);\n System.out.println(line);\n }\n// just for testing\n// result.append(line);\n// if(debugMode) {\n// System.out.println(\" \\t\\t\" + line );\n// }\n }\n response.close();\n \n // Log printing\n if(debugMode) {\n if(counts.size() > 0 && queryKeys.size() > 0 && webEnvs.size() > 0 ){\n System.out.println(\" \" + new Date().toString() + \" \" + db + \" Search > Search data :\" \n + \"\\t count > \" + counts.get(i)\n + \",\\t queryKey > \" + queryKeys.get(i)\n + \",\\t WebEnv > \" + webEnvs.get(i));\n } else {\n System.out.println(\" \" + new Date().toString() + \" \" + db + \" Search > Search data : No count and/or queryKey and/or WebEnv found \" );\n }\n } \n } catch (IOException ex) {\n // Log printing\n if(debugMode) {\n System.out.println(\" \" + new Date().toString() + \" \" + db + \" Search > Exception :\" + ex.getMessage());\n } \n } \n }", "private void process(HttpServletRequest req, HttpServletResponse resp)\n\t\t\tthrows ServletException, IOException {\n\n\t\tresp.setHeader(\"Cache-Control\", \"no-store, no-cache, must-revalidate\"); //$NON-NLS-1$ //$NON-NLS-2$\n\t\tresp.setCharacterEncoding(\"UTF-8\"); //$NON-NLS-1$\n\n\t\tint indexCompletion = 0;\n\t\tString locale = UrlUtil.getLocale(req, resp);\n\t\tSearchProgressMonitor pm = SearchProgressMonitor\n\t\t\t\t.getProgressMonitor(locale);\n\t\tif (pm.isDone()) {\n\t\t\tindexCompletion = 100;\n\t\t} else {\n\t\t\tindexCompletion = pm.getPercentage();\n\t\t\tif (indexCompletion >= 100) {\n\t\t\t\t// 38573 We do not have results, so index cannot be 100\n\t\t\t\tindexCompletion = 100 - 1;\n\t\t\t}\n\t\t}\n\n\t\tString returnType = req.getParameter(Utils.RETURN_TYPE);\n\t\tboolean isXML = Utils.XML.equalsIgnoreCase(returnType);\n\t\tif (isXML) {\n\t\t\tresp.setContentType(\"application/xml\"); //$NON-NLS-1$\n\t\t\tresp.getWriter().write(toXML(indexCompletion));\n\t\t} else {\n\t\t\tresp.setContentType(\"text/plain\"); //$NON-NLS-1$\n\t\t\tresp.getWriter().write(toString(indexCompletion));\n\t\t}\n\t\tresp.getWriter().flush();\n\t}", "@Test\n public void ebayTestSearchResults() throws Exception {\n driver.findElement(By.id(\"gh-ac\")).sendKeys(\"java book\");\n driver.findElement(By.id(\"gh-btn\")).click();\n\n Thread.sleep(4000);\n\n WebElement searchResults = driver.findElement(By.tagName(\"h1\"));\n //21,761 results for java book\n String resultActual = searchResults.getText();\n System.out.println(resultActual);\n }", "Map<String, Integer> getSearchResults(String searchTerm) {\n\n Map<String, Integer> libCount = new ConcurrentHashMap<>();\n\n try {\n Document document = Jsoup.connect(google + URLEncoder.encode(searchTerm, charset))\n .userAgent(userAgent)\n .referrer(\"http://www.google.com\")\n .get();\n\n Elements links = document.select(\"a[href]\");\n Set<String> urls = new HashSet<>();\n for (Element link: links) {\n if (link.attr(\"href\") != null && link.attr(\"href\").contains(\"=\")) {\n String url = link.attr(\"href\").split(\"=\")[1];\n if (url.contains(\"http\")) {\n urls.add(getDomainName(url));\n }\n }\n }\n\n CountDownLatch latch = new CountDownLatch(urls.size());\n\n for (String url: urls) {\n AnalysePage analysePage = new AnalysePage(url);\n completionService.submit(analysePage);\n }\n\n int completed = 0;\n\n while(completed < urls.size()) {\n try {\n Future<Set<String>> resultFuture = completionService.take();\n Set<String> strings = resultFuture.get();\n for (String lib : strings) {\n Integer count = libCount.get(lib);\n if (count == null) {\n libCount.put(lib, 1);\n } else {\n libCount.put(lib, ++count);\n }\n }\n completed++;\n latch.countDown();\n } catch (InterruptedException | ExecutionException e) {\n e.printStackTrace();\n }\n }\n try {\n latch.await();\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n\n } catch (MalformedURLException e) {\n System.out.println(\"The URL is Malformed\");\n } catch (UnsupportedEncodingException e) {\n System.out.println(\"Incorrect URL encoding\");\n } catch (IOException e) {\n System.out.println(\"Unable to read from google\");\n e.printStackTrace();\n }\n executor.shutdown();\n return libCount;\n }", "private void scrapResultsInCurrentResultPage() {\n List<WebElement> searchResults = getSearchResults();\n\n for (int i = 0; i < searchResults.size(); i++) {\n WebElement result = searchResults.get(i);\n WebElement quoteButton = result.findElement(By.xpath(\".//a[@class='gs_or_cit gs_nph']\"));\n quoteButton.click();\n\n waitForMillis(500);\n\n WebElement bibtexLink = driver.findElement(By.xpath(\"//div[@id='gs_citi']/a[1]\"));\n waitUntilClickable(bibtexLink);\n bibtexLink.click();\n\n WebElement publicationCitationInBibtex = driver.findElement(By.xpath(\"/html/body/pre\"));\n searchResultsAsBibtex.add(publicationCitationInBibtex.getText());\n\n driver.navigate().back();\n\n WebElement quoteDialogCancelButton = driver.findElement(By.xpath(\"//*[@id=\\\"gs_cit-x\\\"]\"));\n waitUntilClickable(quoteDialogCancelButton);\n quoteDialogCancelButton.click();\n\n // Reload the reference to the DOM elements: the search results.\n searchResults = getSearchResults();\n }\n }", "@Override\n\tprotected void parseResult() {\n\t\t\n\t}", "public void parseResponse();", "public interface SearchResult {\n\n\t/**\n\t * Gets the rank of the result fetched.\n\t * \n\t * @return The rank of the result (starting with 1).\n\t */\n\tpublic int getRank(); \n\n /**\n * Gets the title of the result fetched.\n * \n * @return The title of result.\n */\n public String getTitle();\n \n /**\n * Gets the URL that can be used for accessing the document. The URL is specifically required\n * when fetching the content.\n * \n * @return The URL of the result.\n * @throws SearchResultException The URL might be malformed.\n */\n public URL getURL() throws SearchResultException; \n \n /**\n * Get a short summary of the document. This summary is usually provided by the SearchEngine\n * and should therefore not resolve in an exception.\n * \n * @return The summary of the result.\n */\n public String getSummary();\n \n /**\n * Retrieves the HTML content of a result. For this, a HTTP connection has to be created that\n * can result in connection exceptions. These exceptions are packed in abstract \n * \"SearchResultException\". The content will be plain text.\n * \n * @return The content document related to a result\n * @throws SearchResultException The retrieval of the document might fail.\n */\n public String getContent() throws SearchResultException;\n \n /**\n * Retrieves all links of a result document. For this the content document is searched for all\n * links and forms. Their URLs are extracted, cleaned, and returned as a list. \n * \n * @return List of URLs of documents linked to by this document\n * @throws SearchResultException The document might not be available and retrieval might fail.\n */\n public Set<String> getLinks() throws SearchResultException;\n}", "@Override\n\tpublic Map<String, String> parseIndex(String xhtml) throws BatchException {\n\t\treturn null;\n\t}", "public interface ResponseParser {\r\n\t\r\n\tList<Place> parseSearchResponse(String rawJson) throws Exception;\r\n\t\r\n\tList<Place> parseFilteredSearchResponse(String rawJson) throws Exception;\r\n\r\n}", "private void searchNext(CrawlingSession executor, Link link) {\n HTMLLinkExtractor htmlLinkExtractor = HTMLLinkExtractor.getInstance();\n// htmlLinkExtractor.setWorking(link);\n \n Source source = CrawlingSources.getInstance().getSource(link.getSourceFullName());\n if(source == null) return;\n \n SessionStore store = SessionStores.getStore(source.getCodeName());\n if(store == null) return;\n\n List<Link> collection = htmlLinkExtractor.getLinks(link, /*link.getSource(),*/ pagePaths);\n// List<Link> collection = htmlLinkExtractor.getLinks(srResource);\n List<Link> nextLinks = createNextLink(link, collection);\n if(nextLinks.size() < 1) return;\n if(userPaths == null && contentPaths == null) {\n executor.addElement(nextLinks, link.getSourceFullName());\n return;\n }\n \n \n if(nextLinks.size() < 2) {\n executor.addElement(nextLinks, link.getSourceFullName());\n }\n \n// long start = System.currentTimeMillis();\n \n int [] posts = new int[nextLinks.size()];\n for(int i = 0; i < nextLinks.size(); i++) {\n try {\n posts[i] = PageDownloadedTracker.searchCode(nextLinks.get(i), true);\n } catch (Throwable e) {\n posts[i] = -1;\n LogService.getInstance().setThrowable(link.getSourceFullName(), e);\n// executor.abortSession();\n// return;\n }\n }\n \n int max = 1;\n for(int i = 0; i < posts.length; i++) {\n if(posts[i] > max) max = posts[i];\n }\n \n// System.out.println(\" thay max post la \"+ max);\n \n List<Link> updateLinks = new ArrayList<Link>();\n for(int i = 0; i < posts.length; i++) {\n if(posts[i] >= max) continue;\n updateLinks.add(nextLinks.get(i));\n }\n \n// long end = System.currentTimeMillis();\n// System.out.println(\"step. 4 \"+ link.getUrl()+ \" xu ly cai ni mat \" + (end - start));\n \n executor.addElement(updateLinks, link.getSourceFullName());\n \n /*int minPost = -1;\n Link minLink = null;\n List<Link> updateLinks = new ArrayList<Link>();\n for(int i = 0; i < nextLinks.size(); i++) {\n Link ele = nextLinks.get(i);\n int post = 0;\n try {\n post = PostForumTrackerService2.getInstance().read(ele.getAddressCode());\n } catch (Exception e) {\n LogService.getInstance().setThrowable(link.getSource(), e);\n }\n if(post < 1) {\n updateLinks.add(ele);\n continue;\n } \n\n if(minPost < 0 || post < minPost){\n minLink = ele;\n minPost = post; \n } \n }\n\n if(minLink != null) updateLinks.add(minLink);\n executor.addElement(updateLinks, link.getSource());*/\n }", "public void search(Indexer indexer, CityIndexer cityIndexer, Ranker ranker, String query, boolean withSemantic, ArrayList<String> chosenCities, ObservableList<String> citiesByTag, boolean withStemming, String saveInPath, String queryId, String queryDescription) {\n String[] originalQueryTerms = query.split(\" \");\n String originQuery = query;\n docsResults = new HashMap<>();\n parser = new Parse(withStemming, saveInPath, saveInPath);\n HashSet<String> docsOfChosenCities = new HashSet<>();\n query = \"\" + query + queryDescription;\n HashMap<String, Integer> queryTerms = parser.parseQuery(query);\n HashMap<String, ArrayList<Integer>> dictionary = indexer.getDictionary();\n if (!withStemming){\n setDocsInfo(saveInPath + \"\\\\docsInformation.txt\");\n }\n else{\n setDocsInfo(saveInPath + \"\\\\docsInformation_stemming.txt\");\n }\n\n\n //add semantic words of each term in query to 'queryTerms'\n if(withSemantic) {\n HashMap<String,ArrayList<String>> semanticWords = ws.connectToApi(originQuery);\n }\n\n //give an ID to query if it's a regular query (not queries file)\n if(queryId.equals(\"\")){\n queryId = \"\" + Searcher.queryID;\n Searcher.queryID++;\n }\n\n String postingDir;\n if (!withStemming) {\n postingDir = \"\\\\indexResults\\\\postingFiles\";\n } else {\n postingDir = \"\\\\indexResults\\\\postingFiles_Stemming\";\n }\n int pointer = 0;\n\n //find docs that contain the terms in the query in their text\n HashMap<String, Integer> queryTermsIgnoreCase = new HashMap<>();\n for (String term : queryTerms.keySet()) {\n String originTerm = term;\n if (!dictionary.containsKey(term.toUpperCase()) && !dictionary.containsKey(term.toLowerCase())) {\n continue;\n }\n if(dictionary.containsKey(term.toLowerCase())){\n term = term.toLowerCase();\n }\n else {\n term = term.toUpperCase();\n }\n queryTermsIgnoreCase.put(term,queryTerms.get(originTerm));\n pointer = dictionary.get(term).get(2);\n String chunk = (\"\" + term.charAt(0)).toUpperCase();\n\n //get the relevant line from posting file\n BufferedReader br = null;\n try {\n br = new BufferedReader(new FileReader(new File(saveInPath + postingDir + \"\\\\posting_\" + chunk + \".txt\")));\n String line = \"\";\n int i = 1;\n while ((line = (br.readLine())) != null) {\n if (i == pointer) {\n break;\n }\n i++;\n }\n br.close();\n\n //get docs from posting line and add them to the data structure 'docsResults'\n if(line != null) {\n findDocsFromLine(line, term);\n }\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n\n //find docs that contain the chosen cities in their text\n for (String cityTerm : chosenCities) {\n if (!dictionary.containsKey(cityTerm) && !dictionary.containsKey(cityTerm.toLowerCase())) {\n continue;\n }\n if(dictionary.containsKey(cityTerm.toLowerCase())){\n cityTerm = cityTerm.toLowerCase();\n }\n pointer = dictionary.get(cityTerm).get(2);\n // char chunk = indexer.classifyToPosting(term).charAt(0);\n String chunk = (\"\" + cityTerm.charAt(0)).toUpperCase();\n\n //get the relevant line from posting file\n BufferedReader br = null;\n try {\n br = new BufferedReader(new FileReader(new File(saveInPath + postingDir + \"\\\\posting_\" + chunk + \".txt\")));\n String line = \"\";\n int i = 1;\n while ((line = (br.readLine())) != null) {\n if (i == pointer) {\n break;\n }\n i++;\n }\n br.close();\n\n //get docs from posting line and add them to the data structure 'docsOfChosenCities'\n String docs = line.substring(0, line.indexOf(\"[\") - 1); //get 'docsListStr'\n String[] docsArr = docs.split(\";\");\n for (String docInfo : docsArr) {\n String doc = docInfo.substring(0, docInfo.indexOf(\": \"));\n while(doc.charAt(0) == ' '){\n doc = doc.substring(1);\n }\n docsOfChosenCities.add(doc);\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n\n //find docs that contain the chosen cities in their city tag\n if(!chosenCities.isEmpty()){\n for (String cityDicRec: chosenCities) {\n //get pointer to posting from cityDictionary\n try {\n pointer = cityIndexer.getCitiesDictionary().get(cityDicRec);\n } catch (NumberFormatException e) {\n e.printStackTrace();\n }\n //get the relevant line from posting file\n BufferedReader br = null;\n try {\n br = new BufferedReader(new FileReader(new File(saveInPath + \"\\\\cityIndexResults\" + \"\\\\posting_city\" + \".txt\")));\n String line = \"\";\n int i = 1;\n while ((line = (br.readLine())) != null) {\n if (i == pointer) {\n break;\n }\n i++;\n }\n br.close();\n\n //get docs from posting line and add them to the data structure 'docsOfChosenCities'\n String docs = line.substring(line.indexOf(\"[\") + 1, line.indexOf(\"]\")); //get 'docsListStr'\n String[] docsArr = docs.split(\"; \");\n for (String doc : docsArr) {\n docsOfChosenCities.add(doc);\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }\n\n\n ranker.rank(docsResults, docsOfChosenCities, queryTermsIgnoreCase, dictionary, docsInfo,entities, queryId);\n }", "com.google.search.now.wire.feed.ResponseProto.Response getResponse();", "com.google.search.now.wire.feed.ResponseProto.Response getResponse();", "SearchResult(byte[] xml) throws SAXException {\n\n\t\tDocumentBuilder builder;\n\t\tDocument response;\n\n\t\ttry {\n\t\t\tbuilder = DocumentBuilderFactory.newInstance().newDocumentBuilder();\n\t\t\tresponse = builder.parse(new ByteArrayInputStream(xml));\n\n\t\t\tElement result = (Element) response.getElementsByTagName(RESULT_TAG).item(0);\n\t\t\tNodeList items = result.getElementsByTagName(CLICS_TAG).item(0).getChildNodes();\n\n\t\t\t// clics\n\t\t\tresults = new ClicMetaData[items.getLength()];\n\n\t\t\tfor (int i = 0; i < results.length; i++) {\n\t\t\t\tresults[i] = new ClicMetaData((Element) items.item(i));\n\t\t\t}\n\n\t\t\t// pagination related stuff\n\t\t\tElement paginationNode = (Element) result.getElementsByTagName(PAGINATION_TAG).item(0);\n\t\t\ttotalResults = Integer.parseInt(paginationNode.getElementsByTagName(TOTAL_RESULTS_TAG).item(0)\n\t\t\t\t\t.getFirstChild().getNodeValue());\n\t\t\tElement pagesNode = ((Element) paginationNode.getElementsByTagName(PAGES_TAG).item(0));\n\t\t\ttotalPages = Integer.parseInt(pagesNode.getElementsByTagName(TOTAL_PAGES_TAG).item(0).getFirstChild()\n\t\t\t\t\t.getNodeValue());\n\t\t\tcurrentPage = Integer.parseInt(pagesNode.getElementsByTagName(CURRENT_PAGE_TAG).item(0).getFirstChild()\n\t\t\t\t\t.getNodeValue());\n\n\t\t} catch (SAXException e) {\n\t\t\tthrow new SAXException(MALFORMED_RESPONSE);\n\t\t} catch (IOException e) {\n\t\t\tthrow new SAXException(MALFORMED_RESPONSE);\n\t\t} catch (ParserConfigurationException e) {\n\t\t\tthrow new SAXException(MALFORMED_RESPONSE);\n\t\t} catch (NegativeArraySizeException e) {\n\t\t\tthrow new IllegalArgumentException(EMPTY_PAGE);\n\t\t}\n\t}", "private static StringBuilder searchNextPage(String nextToken){\r\n\t\tHttpURLConnection conn = null;\r\n\t\tStringBuilder jsonResults = new StringBuilder();\r\n\t\ttry{\r\n\t\t\tStringBuilder request = new StringBuilder(PLACES_API_SOURCE);\r\n\t\t\trequest.append(typeSearch);\r\n\t\t\trequest.append(JSON_OUT);\r\n\t\t\trequest.append(\"?pagetoken=\");\r\n\t\t\trequest.append(nextToken);\r\n\t\t\trequest.append(\"&key=\");\r\n\t\t\trequest.append(KEY);\r\n\r\n\t\t\tURL url = new URL(request.toString());\r\n\t\t\tconn = (HttpURLConnection) url.openConnection();\r\n\t\t\tBufferedReader br = new BufferedReader(new InputStreamReader(conn.getInputStream(), \"UTF-8\"));\r\n\t\t\tString line = \"\";\r\n\t\t\twhile ((line = br.readLine()) != null) {\r\n\t\t\t\tjsonResults.append(line);\r\n\t\t\t}\r\n\t\t}catch(MalformedURLException e){\r\n\t\t\tSystem.out.println(\"URL ERROR [search] \");\r\n\t\t}catch(IOException e){\r\n\t\t\tSystem.out.println(\"CONNECTION ERROR [search] \"+ e);\r\n\t\t}finally{\r\n\t\t\tif(conn!=null)\r\n\t\t\t\tconn.disconnect();\r\n\t\t}\r\n\t\treturn jsonResults;\r\n\t}", "public static AccSearchResponse parse(\r\n javax.xml.stream.XMLStreamReader reader)\r\n throws java.lang.Exception {\r\n AccSearchResponse object = new AccSearchResponse();\r\n\r\n int event;\r\n javax.xml.namespace.QName currentQName = null;\r\n java.lang.String nillableValue = null;\r\n java.lang.String prefix = \"\";\r\n java.lang.String namespaceuri = \"\";\r\n\r\n try {\r\n while (!reader.isStartElement() && !reader.isEndElement())\r\n reader.next();\r\n\r\n currentQName = reader.getName();\r\n\r\n if (reader.getAttributeValue(\r\n \"http://www.w3.org/2001/XMLSchema-instance\",\r\n \"type\") != null) {\r\n java.lang.String fullTypeName = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\r\n \"type\");\r\n\r\n if (fullTypeName != null) {\r\n java.lang.String nsPrefix = null;\r\n\r\n if (fullTypeName.indexOf(\":\") > -1) {\r\n nsPrefix = fullTypeName.substring(0,\r\n fullTypeName.indexOf(\":\"));\r\n }\r\n\r\n nsPrefix = (nsPrefix == null) ? \"\" : nsPrefix;\r\n\r\n java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(\r\n \":\") + 1);\r\n\r\n if (!\"AccSearchResponse\".equals(type)) {\r\n //find namespace for the prefix\r\n java.lang.String nsUri = reader.getNamespaceContext()\r\n .getNamespaceURI(nsPrefix);\r\n\r\n return (AccSearchResponse) ExtensionMapper.getTypeObject(nsUri,\r\n type, reader);\r\n }\r\n }\r\n }\r\n\r\n // Note all attributes that were handled. Used to differ normal attributes\r\n // from anyAttributes.\r\n java.util.Vector handledAttributes = new java.util.Vector();\r\n\r\n reader.next();\r\n\r\n while (!reader.isStartElement() && !reader.isEndElement())\r\n reader.next();\r\n\r\n if ((reader.isStartElement() &&\r\n new javax.xml.namespace.QName(\r\n \"http://tempuri.org/\", \"AccSearchResult\").equals(\r\n reader.getName())) ||\r\n new javax.xml.namespace.QName(\"\", \"AccSearchResult\").equals(\r\n reader.getName())) {\r\n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\r\n \"nil\");\r\n\r\n if (\"true\".equals(nillableValue) ||\r\n \"1\".equals(nillableValue)) {\r\n throw new org.apache.axis2.databinding.ADBException(\r\n \"The element: \" + \"AccSearchResult\" +\r\n \" cannot be null\");\r\n }\r\n\r\n java.lang.String content = reader.getElementText();\r\n\r\n object.setAccSearchResult(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(\r\n content));\r\n\r\n reader.next();\r\n } // End of if for expected property start element\r\n\r\n else {\r\n }\r\n\r\n while (!reader.isStartElement() && !reader.isEndElement())\r\n reader.next();\r\n\r\n if (reader.isStartElement()) {\r\n // 2 - A start element we are not expecting indicates a trailing invalid property\r\n throw new org.apache.axis2.databinding.ADBException(\r\n \"Unexpected subelement \" + reader.getName());\r\n }\r\n } catch (javax.xml.stream.XMLStreamException e) {\r\n throw new java.lang.Exception(e);\r\n }\r\n\r\n return object;\r\n }", "private void parseIndex() throws IOException {\n\t\tDocument doc = Jsoup.connect(WOLFF + \"/bioscopen/cinestar/\").get();\n\t\tElements movies = doc.select(\".table_agenda td[width=245] a\");\n\t\t\n\t\tSet<String> urls = new HashSet<String>();\n\t\tfor(Element movie : movies) {\n\t\t\turls.add(movie.attr(\"href\"));\n\t\t}\n\t\t\n\t\tfor(String url: urls) {\n\t\t\tparseMovie(url);\n\t\t}\n\t}", "@Override\n\t\t\t\t\t\tpublic void onResponse(String response) {\n\t\t\t\t\t\t\tparseRespense(response);\n\t\t\t\t\t\t}", "public static String getValue( String str , Response [] previousJsonResponse){\n\t\tString temp = \"\";\n\t\tString ret_value = \"\";\nint ret_value_int = 0;\nint temp2 = 0 ;\n\t\tif(str.contains(Keywords.PREV_COOKIE)){\n\t\t\tString[] params = (str.split(\":\"));\n\t\t\tString result = params[0].substring((params[0].indexOf(\"[\")) + 1, (params[0].indexOf(\"]\")));\n\t\t\tint index = Integer.parseInt(result);\n\t\t\ttemp = (previousJsonResponse[(index-1)]).getCookie(params[1]);\n\t\t\tif(str.startsWith(\" \")) ret_value = \" \" + temp;\n\t\t\telse ret_value = temp;\n\t\t\tif(str.endsWith(\" \")) ret_value += \" \";\n\t\t}else if(str.contains(Keywords.PREV_HEADER)){\n\t\t\tString[] params = (str.split(\":\"));\n\t\t\tString result = params[0].substring((params[0].indexOf(\"[\")) + 1, (params[0].indexOf(\"]\")));\n\t\t\tint index = Integer.parseInt(result);\n\t\t\ttemp = (previousJsonResponse[(index-1)]).header(params[1]);\n\t\t\tif(str.startsWith(\" \")) ret_value = \" \" + temp;\n\t\t\telse ret_value = temp;\n\t\t\tif(str.endsWith(\" \")) ret_value += \" \";\n\t\t}else if(str.contains(Keywords.PREV_BODY)){\n\t\t\tString[] params = (str.split(\":\"));\n\t\t\tString result = params[0].substring((params[0].indexOf(\"[\")) + 1, (params[0].indexOf(\"]\")));\n\t\t\tint index = Integer.parseInt(result);\n\t\t\ttemp = (previousJsonResponse[(index-1)]).path(params[1]);\n\t\t\tif(str.startsWith(\" \")) ret_value = \" \" + temp;\n\t\t\telse ret_value = temp;\n\t\t\tif(str.endsWith(\" \")) ret_value += \" \";\n\t\t}\n\t\telse if(str.contains(Keywords.PREV_BODY_integer)){\n\t\t\tString[] params = (str.split(\":\"));\n\t\t\tString result = params[0].substring((params[0].indexOf(\"[\")) + 1, (params[0].indexOf(\"]\")));\n\t\t\tint index = Integer.parseInt(result);\n\t\t\ttemp2 = (previousJsonResponse[(index-1)]).path(params[1]);\n\t\t\tif(str.startsWith(\" \")) ret_value_int = temp2;\n\t\t\telse ret_value_int = temp2;\n\t\t\tret_value = Integer.toString(ret_value_int);\n\t\t\tif(str.endsWith(\" \")) ret_value += \" \";\n\t\t}\n\n\t\telse ret_value = str;\n\t\treturn ret_value;\n\t}", "private WebResponse() {\n initFields();\n }", "private void search() {\n String result = \"<body bgcolor=\\\"black\\\"> \" +\n \"<font color=\\\"#009933\\\"\";\n gs.setQueryString(txtQueury.getText());\n try {\n gsr = gs.doSearch();\n txtCountRes.setText(\"\" + gsr.getEstimatedTotalResultsCount());\n gsre = gsr.getResultElements();\n\n for (int i = 0; i < gsre.length; i++) {\n if (googleTitle.isSelected()) {\n result +=\n \"<font color=\\\"red\\\"><u><b>Title: </u></b><a href=\\\"\" +\n gsre[i].getURL() + \"\\\">\"\n + gsre[i].getTitle() + \"</a><br>\" +\n \"<br><b>URL: \" +\n gsre[i].getHostName() + gsre[i].getURL() +\n \"</b></font><br>\";\n }\n if (googleSummary.isSelected()) {\n result += \"<u><b>Summary: </u></b>\" +\n gsre[i].getSummary() +\n \"<br>\";\n }\n if (googleSnippet.isSelected()) {\n result += \"<u><b>Snippet: </u></b>\" +\n gsre[i].getSnippet() +\n \"<br>\";\n }\n if (googleHostName.isSelected()) {\n result += \"<u><b>Host: </u></b>\" + gsre[i].getHostName() +\n \"<br>\";\n }\n if (googleDirectoryTitle.isSelected()) {\n result += \"<u><b>Directory Title: </u></b>\" +\n gsre[i].getDirectoryTitle() + \"<br>\";\n }\n if (googleCachedSize.isSelected()) {\n result += \"<u><>Cached Size: </u></b>\" +\n gsre[i].getCachedSize() + \"<br>\";\n }\n result += \"<br>\";\n }\n } catch (GoogleSearchFault e) {\n msg(\"Erreur d'exécution \" + e.getMessage(), \"Error\",\n JOptionPane.ERROR_MESSAGE);\n }\n\n //affichage de la recherche\n editor.setText(result);\n }", "entities.Torrent.SearchResponse getSearchResponse();", "public interface QueryResponseParser {\n Documents<IdolSearchResult> parseQueryResults(AciSearchRequest<String> searchRequest, AciParameters aciParameters, QueryResponseData responseData, IdolDocumentService.QueryExecutor queryExecutor);\n\n List<IdolSearchResult> parseQueryHits(Collection<Hit> hits);\n}", "public interface FrequentlyRelatedItemHttpResponseParser {\n public FrequentlyRelatedItemSearchResponse[] parse(String json);\n}", "public void run() {\n\t\t\tString html = \"\";\n\t\t\ttry {\n\t\t\t\thtml = HTTPFetcher.fetchHTML(this.url);\n\t\t\t} catch (UnknownHostException e) {\n\t\t\t\tSystem.out.println(\"Unknown host\");\n\t\t\t} catch (MalformedURLException e) {\n\t\t\t\tSystem.out.println(\"MalformedURL\");\n\t\t\t} catch (IOException e) {\n\t\t\t\tSystem.out.println(\"IOException\");\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tif(html != null) {\n\t\t\t\t\tthis.newLinks = LinkParser.listLinks(new URL(this.url), html);\n\t\t\t\t}\n\t\t\t} catch (MalformedURLException e) {\n\t\t\t\tSystem.out.println(\"MalformedURL\");\n\t\t\t}\n\t\t\tif(newLinks != null) {\n\t\t\t\tfor(URL theURL : newLinks) {\n\t\t\t\t\tif(!(urls.contains(theURL))) {\n\t\t\t\t\t\tsynchronized(urls) {\n\t\t\t\t\t\t\turls.add(theURL);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tinnerCrawl(theURL, limit);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tInvertedIndex local = new InvertedIndex();\n\t\t\t\tString no_html = HTMLCleaner.stripHTML(html.toString());\n\t\t\t\tString[] the_words = WordParser.parseWords(no_html);\n\t\t\t\tlocal.addAll(the_words, this.url);\n\t\t\t\tindex.addAll(local);\n\t\t\t}\n\t\t}", "@Override\n public void onReceivedError(WebView view, WebResourceRequest request, WebResourceError error) {\n Log.v(\"WVClient.onReceiveError\", \" receieved an error\" + error);\n\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n onSendUpdate(\"WVClient has received an error!\");\n }\n });\n\n //do what would be done in processHTML but avoid anything to do with scraping, move onto next page\n crawlComplete = false;\n\n if (masterEmailSet.size() > 20){\n //if more than twenty emails have been discovered, the crawl is done\n crawlComplete = true;\n }\n\n if (masterEmailSet.size() > 0 && !searchTerm.equals(\"\")){\n //if at least one email with the search term has been found, crawl is done\n crawlComplete = true;\n }\n\n\n if (collectedLinks.iterator().hasNext() && !crawlComplete){\n //if there's another link and crawl isn't deemed complete, hit next URL\n browser.post(new Runnable() {\n @Override\n public void run() {\n Log.v(\"processHTML\", \" loading page on browser:\" + collectedLinks.iterator().next());\n visitedLinks.add(collectedLinks.iterator().next());\n browser.loadUrl(collectedLinks.iterator().next());\n }\n });\n }\n }", "@Override\n protected String doInBackground(URL... params) {\n URL searchUrl = params[0];\n String talk2meSearchResults = null;\n try {\n talk2meSearchResults = NetworkUtils.getResponseFromHttpUrl(searchUrl);\n Log.d(TAG, \"talk2meSearchResults is : \" + talk2meSearchResults.toString());\n } catch (IOException e) {\n e.printStackTrace();\n }\n return talk2meSearchResults;\n }", "@SuppressWarnings(\"unchecked\")\n\tprivate void parseMetadata(String resp, String downloadUUID) throws DocumentException{\n\t\tSAXReader reader = new SAXReader();\n\t\treader.setStripWhitespaceText(true);\n\t\treader.setMergeAdjacentText(true);\n\t\tDocument document = reader.read(new StringReader(resp));\n\t\t\n\t\tMap<String, String> namespaceURIs=null;\n\t\ttry {\n\t\t\tnamespaceURIs = Namespaces.getNamespaces(resp);\n\t\t} catch (Exception e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te1.printStackTrace();\n\t\t}\n\t\t \n\t\tlog.info(\"Parsing Metadata\");\n\t\t\n\t\tServiceElements serviceElements = new ServiceElements();\n\t\tList<DatasetElements> dataSetList=new ArrayList<DatasetElements>();\n\n\t\tserviceElements.setTitle(getElement(ServiceXPaths.getXPath(ServiceXPaths.TITEL,namespaceURIs), namespaceURIs, document));\n\t\tserviceElements.setDesc(getElement(ServiceXPaths.getXPath(ServiceXPaths.DESC,namespaceURIs), namespaceURIs, document));\n\t\tserviceElements.setDateStamp(getElement(ServiceXPaths.getXPath(ServiceXPaths.DATE_STAMP,namespaceURIs), namespaceURIs, document));\n\t\tserviceElements.setRights(getElement(ServiceXPaths.getXPath(ServiceXPaths.RIGHTS,namespaceURIs), namespaceURIs, document));\n\t\tserviceElements.setLanguage(getElement(ServiceXPaths.getXPath(ServiceXPaths.LANGUAGE,namespaceURIs), namespaceURIs, document));\n\t\tserviceElements.setAuthorName(getElement(ServiceXPaths.getXPath(ServiceXPaths.AUTHOR_NAME,namespaceURIs), namespaceURIs, document));\n\t\tserviceElements.setAuthorMail(getElement(ServiceXPaths.getXPath(ServiceXPaths.AUTHOR_MAIL,namespaceURIs), namespaceURIs, document));\n\t\tserviceElements.setOrgName(getElement(ServiceXPaths.getXPath(ServiceXPaths.ORG_NAME,namespaceURIs), namespaceURIs, document));\n\t\tserviceElements.setBrowseGraphic(getElement(ServiceXPaths.getXPath(ServiceXPaths.BROWSE_GRAPHIC,namespaceURIs), namespaceURIs, document));\n\n\t\t XPath xPathKW = DocumentHelper.createXPath(ServiceXPaths.getXPath(ServiceXPaths.KEYWORDS,namespaceURIs));\n\t\t xPathKW.setNamespaceURIs(namespaceURIs);\n\t\t List<Node> asResultsNodesKW = xPathKW.selectNodes(document.getRootElement());\n\t\t List<String> keywords =new ArrayList<String>();\n\t\t for(int j=0;j<asResultsNodesKW.size();j++){\n\t\t\t keywords.add(asResultsNodesKW.get(j).getStringValue().replace(\"&\", \"&amp;\"));\n\t\t }\n\t\t serviceElements.setKeywords(keywords);\t\n\t\t \n\t\t XPath xPath2 = DocumentHelper.createXPath(ServiceXPaths.getXPath(ServiceXPaths.OPERATES_ON,namespaceURIs));\n\t\t xPath2.setNamespaceURIs(namespaceURIs);\n\n\t\t List<Node> asResultsNodes2 = xPath2.selectNodes(document.getRootElement());\t\t\n\n\t\t for(int i=0;i<asResultsNodes2.size();i++){\n\t\t\t \n\t\t\t DatasetElements dataSet=new DatasetElements();\n\t\t\t \t\t \n\t\t\t String respDS=CSWUtil.executeRequest(cswURL, asResultsNodes2.get(i).getText(), proxyHost, proxyPort);\n\t\t\t Document document2 = reader.read(new StringReader(respDS));\n\t\t\t namespaceURIs = Namespaces.getNamespaces(respDS);\n\t\t\t dataSet.setCodeUUID(getElement(DatasetXPaths.getXPath(DatasetXPaths.UUID,namespaceURIs), namespaceURIs, document2));\n\t\t\t dataSet.setId(getElement(DatasetXPaths.getXPath(DatasetXPaths.FILE_ID,namespaceURIs), namespaceURIs, document2));\n\t\t\t dataSet.setTitle(getElement(DatasetXPaths.getXPath(DatasetXPaths.TITLE,namespaceURIs), namespaceURIs, document2));\n\t\t\t dataSet.setDesc(getElement(DatasetXPaths.getXPath(DatasetXPaths.DESC,namespaceURIs), namespaceURIs, document2));\n\t\t\t dataSet.setDateStamp(getElement(DatasetXPaths.getXPath(DatasetXPaths.DATE_STAMP,namespaceURIs), namespaceURIs, document2));\n\t\t\t dataSet.setRights(getElement(DatasetXPaths.getXPath(DatasetXPaths.RIGHTS,namespaceURIs), namespaceURIs, document2));\n\t\t\t dataSet.setAuthorName(getElement(DatasetXPaths.getXPath(DatasetXPaths.AUTHOR_NAME,namespaceURIs), namespaceURIs, document2));\n\t\t\t dataSet.setAuthorMail(getElement(DatasetXPaths.getXPath(DatasetXPaths.AUTHOR_MAIL,namespaceURIs), namespaceURIs, document2));\n\t\t\t dataSet.setOrganisationName(getElement(DatasetXPaths.getXPath(DatasetXPaths.ORG_NAME,namespaceURIs), namespaceURIs, document2)); \n\t\t\t dataSet.setBBOXwest(getElement(DatasetXPaths.getXPath(DatasetXPaths.BBOX_WEST,namespaceURIs), namespaceURIs, document2));\n\t\t\t dataSet.setBBOXeast(getElement(DatasetXPaths.getXPath(DatasetXPaths.BBOX_EAST,namespaceURIs), namespaceURIs, document2));\n\t\t\t dataSet.setBBOXsouth(getElement(DatasetXPaths.getXPath(DatasetXPaths.BBOX_SOUTH,namespaceURIs), namespaceURIs, document2));\n\t\t\t dataSet.setBBOXnorth(getElement(DatasetXPaths.getXPath(DatasetXPaths.BBOX_NORTH,namespaceURIs), namespaceURIs, document2));\n\t\t\t dataSet.setType(getElement(DatasetXPaths.getXPath(DatasetXPaths.TYPE,namespaceURIs), namespaceURIs, document2));\n\t\t\t dataSet.setLanguage(getElement(DatasetXPaths.getXPath(DatasetXPaths.LANGUAGE,namespaceURIs), namespaceURIs, document2));\n\t\t\t dataSet.setBrowseGraphic(getElement(DatasetXPaths.getXPath(DatasetXPaths.BROWSE_GRAPHIC,namespaceURIs), namespaceURIs, document2));\n\t\t\t \n\t\t\t List<String> dsURLList=new ArrayList<String>();\n\t\t\t List<String> dsDescriptionList=new ArrayList<String>();\n\t\t\t List<String> dsCodeListValueList=new ArrayList<String>();\n\t\t\t List<String> dsNameValueList=new ArrayList<String>();\n\t\t\t List<String> dsAppProfileValueList=new ArrayList<String>();\n\t\t\t \n\t\t\t \n\t\t\t XPath xPath8 = DocumentHelper.createXPath(DatasetXPaths.getXPath(DatasetXPaths.ONLINE_RESSOURCE,namespaceURIs));\n\t\t\t xPath8.setNamespaceURIs(namespaceURIs);\n\t\t\t List<Node> asResultsNodes8 = xPath8.selectNodes(document2.getRootElement());\n\t\t\t for(int j=0;j<asResultsNodes8.size();j++){\n\t\t\t\t XPath xPath9 = DocumentHelper.createXPath(DatasetXPaths.getXPath(DatasetXPaths.ONLINE_RESSOURCE_DESC_SUB,namespaceURIs));\n\t\t\t\t XPath xPath10 = DocumentHelper.createXPath(DatasetXPaths.getXPath(DatasetXPaths.ONLINE_RESSOURCE_URL_SUB,namespaceURIs));\n\t\t\t\t XPath xPath11 = DocumentHelper.createXPath(DatasetXPaths.getXPath(DatasetXPaths.ONLINE_RESSOURCE_CODE_SUB,namespaceURIs));\n\t\t\t\t //XPath xPath12 = DocumentHelper.createXPath(DatasetXLinks.getXPath(DatasetXPaths.ONLINE_RESSOURCE_PROTOCOL_SUB,namespaceURIs));\n\t\t\t\t XPath xPath13 = DocumentHelper.createXPath(DatasetXPaths.getXPath(DatasetXPaths.ONLINE_RESSOURCE_PROFILE_SUB,namespaceURIs));\n\t\t\t\t XPath xPath14 = DocumentHelper.createXPath(DatasetXPaths.getXPath(DatasetXPaths.ONLINE_RESSOURCE_NAME_SUB,namespaceURIs));\t\t\t\t\t\t \n\t\t\t\t \n\t\t\t\t xPath9.setNamespaceURIs(namespaceURIs);\n\t\t\t\t xPath10.setNamespaceURIs(namespaceURIs);\n\t\t\t\t xPath11.setNamespaceURIs(namespaceURIs);\n\t\t\t\t //xPath12.setNamespaceURIs(namespaceURIs);\n\t\t\t\t xPath13.setNamespaceURIs(namespaceURIs);\n\t\t\t\t xPath14.setNamespaceURIs(namespaceURIs);\n\t\t\t\t \n\t\t\t\t List<Node> asResultsNodes9 = xPath9.selectNodes(asResultsNodes8.get(j));\n\t\t\t\t List<Node> asResultsNodes10 = xPath10.selectNodes(asResultsNodes8.get(j));\n\t\t\t\t List<Node> asResultsNodes11 = xPath11.selectNodes(asResultsNodes8.get(j));\n\t\t\t\t //List<Node> asResultsNodes12 = xPath12.selectNodes(asResultsNodes8.get(j));\n\t\t\t\t List<Node> asResultsNodes13 = xPath13.selectNodes(asResultsNodes8.get(j));\n\t\t\t\t List<Node> asResultsNodes14 = xPath14.selectNodes(asResultsNodes8.get(j));\n\t\t\t\t \n\t\t\t\t String desc = \"\";\n\t\t\t\t String url =\"\";\n\t\t\t\t String code = \"\";\n\t\t\t\t //String protocol = \"\";\n\t\t\t\t String appProfile = \"\";\n\t\t\t\t String name = \"\";\n\t\t\t\t \n\t\t\t\t if(asResultsNodes9.size() > 0){\n\t\t\t\t\t desc =asResultsNodes9.get(0).getStringValue();\n\t\t\t\t }\n\t\t\t\t if(asResultsNodes10.size() > 0){\n\t\t\t\t\t url = asResultsNodes10.get(0).getStringValue();\n\t\t\t\t }\n\t\t\t\t if(asResultsNodes11.size() > 0){\n\t\t\t\t\t code =asResultsNodes11.get(0).getStringValue();\n\t\t\t\t }\n//\t\t\t\t\t if(asResultsNodes12.size() > 0l){\n//\t\t\t\t\t\t protocol =asResultsNodes12.get(0).getStringValue();\n//\t\t\t\t\t }\n\t\t\t\t if(asResultsNodes13.size() > 0){\n\t\t\t\t\t appProfile =asResultsNodes13.get(0).getStringValue();\n\t\t\t\t }\n\t\t\t\t if(asResultsNodes14.size() > 0){\n\t\t\t\t\t name =asResultsNodes14.get(0).getStringValue();\n\t\t\t\t }\n\t\t\t\t \t\t\t\t\t\t\t\t \n\t\t\t\t dsURLList.add(url.replaceAll(\"&\", \"&amp;\"));\n\t\t\t\t dsDescriptionList.add(desc.replaceAll(\"&\", \"&amp;\"));\n\t\t\t\t dsCodeListValueList.add(code.replaceAll(\"&\", \"&amp;\"));\n\t\t\t\t dsNameValueList.add(name.replaceAll(\"&\", \"&amp;\"));\n\t\t\t\t dsAppProfileValueList.add(appProfile.replaceAll(\"&\", \"&amp;\"));\n\n\t\t\t }\n\t\t\t dataSet.setURLList(dsURLList);\n\t\t\t dataSet.setDescriptionList(dsDescriptionList);\n\t\t\t dataSet.setCodeListValueList(dsCodeListValueList);\n\t\t\t dataSet.setNameList(dsNameValueList);\n\t\t\t dataSet.setAppProfileList(dsAppProfileValueList);\n\t\t\t \n\t\t\t dataSetList.add(dataSet);\n\t\t }\n\t\t \n\t\t writeFeed(serviceElements, dataSetList, downloadUUID);\n\t}", "@Override\n public void onSuccess(@NonNull SearchAheadResponse searchAheadResponse) {\n List<SearchAheadResult> searchAheadResults = searchAheadResponse.getResults();\n\n //if we have requests\n if (searchAheadResults.size() > 0) {\n\n //clear the current data to display\n searchResultsData.clear();\n\n try {\n\n int size = (searchAheadResults.size() < 5) ? searchAheadResults.size() : 5;\n\n for (int i = size - 1; i >= 0; i--) {\n // create a hashmap\n HashMap<String, String> hashMap = new HashMap<>();\n\n AddressProperties addressProperties = searchAheadResults.get(i).getPlace().getAddressProperties();\n\n // convert image int to a string and place it into the hashmap with an images key\n hashMap.put(\"address\", searchAheadResults.get(i).getName());\n hashMap.put(\"city\", addressProperties.getCity() + \", \" + addressProperties.getStateCode());\n hashMap.put(\"lat\", String.valueOf(searchAheadResults.get(i).getPlace().getLatLng().getLatitude()));\n hashMap.put(\"long\", String.valueOf(searchAheadResults.get(i).getPlace().getLatLng().getLongitude()));\n\n\n // add this hashmap to the list\n searchResultsData.add(hashMap);\n }\n\n //handle null pointer exception on address properties\n } catch (NullPointerException e) {\n e.printStackTrace();\n }\n\n //adapter inputs\n String[] from = {\n \"address\",\n \"city\",\n \"lat\",\n \"long\"\n };\n\n int[] to = {R.id.text_result_address, R.id.text_result_city, R.id.hidden_location_lat, R.id.hidden_location_long};\n\n searchAdapter = new SimpleAdapter(getApplicationContext(), searchResultsData, R.layout.item_search_result, from, to);\n mListViewSearch.setAdapter(searchAdapter);\n mListViewSearch.setVisibility(View.VISIBLE);\n } else {\n resetSearchAheadList();\n }\n }", "private void searchItem(HttpServletRequest request, HttpServletResponse response) {\n\t\t\n\t}", "private void parseResponse(String response, List<NewsDetailItem> items) {\n\n Pattern pText = Pattern.compile(ITEM_TEXT_PREF + \".*?\" + ITEM_TEXT_POSTF);\n Pattern pTitle = Pattern.compile(TITLE_PREF + \".*?\" + TITLE_POSTF);\n Pattern pDate = Pattern.compile(\"class=\\\"metadata\\\">.*?</a>\");\n Pattern pDate2 = Pattern.compile(\"</strong>.*?<\");\n\n Pattern pImage2 = Pattern.compile(IMG_PREF + \".*?\" + IMG_POSTF);\n\n Pattern pVideo = Pattern.compile(VIDEO_PREF + \".*?\" + VIDEO_POSTF);\n\n Pattern pImageUrl = Pattern.compile(IMG_URL_PREF + \".*?\" + IMG_URL_POSTF);\n\n Pattern pComment = Pattern.compile(\"li class=\\\" item\\\" id=\\\"comment.*?</li>\");\n Pattern pAuthor = Pattern.compile(\"class=\\\"commentauthor\\\".*?</span>\");\n\n Pattern pAuthorName1 = Pattern.compile(\"'>.*?</span>\");\n Pattern pAuthorName2 = Pattern.compile(\"/>.*?</span>\");\n Pattern pAuthorImage = Pattern.compile(AUTHOR_IMAGE_PREF + \".*?\" + AUTHOR_IMAGE_POSTF);\n\n Pattern pCommentText = Pattern.compile(\"<span id=\\\"co_.*?</li>\");\n Pattern pCommentId = Pattern.compile(COMMENT_ID_PREFIX + \".*?\" + COMMENT_ID_POSTFIX);\n\n Pattern pCommentTex2t = Pattern.compile(\"dislike-counter.*?comment-toolbar\"); //Pattern.compile(COMMENT_PREFIX + \".*?\" + COMMENT_POSTFIX);\n Pattern pCommentText3 = Pattern.compile(COMMENT_PREFIX + \".*?\" + COMMENT_POSTFIX);\n Pattern pThumbsDown = Pattern.compile(\"dislike-counter-comment.*?</span>\");\n Pattern pThumbsUp = Pattern.compile(\"like-counter-comment.*?</span>\");\n Pattern pThumb2 = Pattern.compile(THUMB_PREF + \".*?\" + THUMB_POSTF);\n\n Pattern pCommentDate = Pattern.compile(COMMENTDATE_PREF + \".*?\" + COMMENTDATE_POSTF);\n Pattern pWidth = Pattern.compile(WIDTH_PREF + \".*?\" + WIDTH_POSTF);\n Pattern pHeight = Pattern.compile(HEIGHT_PREF + \".*?\" + HEIGHT_POSTF);\n\n Pattern pAkismet = Pattern.compile(\"vortex_ajax_comment\"+\".*?\"+\";\");\n\n Pattern pAkismet2 = Pattern\n .compile(\"\\\"nonce\\\":\\\".*?\"+\"\\\"\");\n\n Pattern pValue = Pattern.compile(\"value=\\\".*?\\\"\");\n\n Pattern pAk_js = Pattern\n .compile(\"id=\\\"ak_js\\\".*?/>\");\n\n\n String akismet = \"\";\n String ak_js = \"\";\n String postId = \"\";\n Matcher makismet_comment = pAkismet.matcher(response);\n if (makismet_comment.find()) {\n Matcher mvalue = pAkismet2.matcher(makismet_comment.group());\n if (mvalue.find()) {\n akismet = mvalue.group();\n akismet = akismet.replace(\"\\\"\", \"\");\n akismet = akismet.replace(\"nonce:\", \"\");\n }\n }\n\n Matcher mak_js = pAk_js.matcher(response);\n if (mak_js.find()) {\n Matcher mvalue = pValue.matcher(mak_js.group());\n if (mvalue.find()) {\n ak_js = mvalue.group();\n ak_js = ak_js.replace(\"\\\"\", \"\");\n ak_js = ak_js.replace(\"value=\", \"\");\n }\n }\n\n\n Pattern ppost_id = Pattern.compile(\"name=\\\"comment_post_ID\\\".*?/>\");\n Matcher mpost_id = ppost_id.matcher(response);\n if (mpost_id.find()) {\n Matcher mvalue = pValue.matcher(mpost_id.group());\n if (mvalue.find()) {\n postId = mvalue.group();\n postId = postId.replace(\"\\\"\", \"\");\n postId = postId.replace(\"value=\", \"\");\n }\n }\n\n Matcher itemMatcher;\n itemMatcher = pDate.matcher(response);\n String date = \"\";\n if (itemMatcher.find()) {\n itemMatcher = pDate2.matcher(itemMatcher.group());\n if (itemMatcher.find()) {\n date = itemMatcher.group().substring(10);\n date = date.substring(0, date.length() - 2);\n }\n }\n\n Matcher mTitle = pTitle.matcher(response);\n if (mTitle.find()) {\n String itemText = mTitle.group().substring(TITLE_PREF.length()); //(\" dc:title=\\\"\".length()).replace(\"\\\"\", \"\");\n itemText = itemText.substring(0, itemText.length() - TITLE_POSTF.length());\n NewsDetailItem item = new NewsDetailItem();\n item.setText(itemText);\n item.setDate(date);\n item.setContentType(NewsDetailDBHelper.NewsItemType.TITLE.ordinal());\n item.setPostUrl(mUrl);\n item.setCommentId(postId);\n item.setAkismet(akismet);\n item.setAk_js(ak_js);\n items.add(item);\n }\n\n Matcher mText = pText.matcher(response);\n int imageEnd = 0;\n int textStart;\n\n if (mText.find()) {\n String text = mText.group().substring(ITEM_TEXT_PREF.length());\n text = text.substring(0, text.length() - ITEM_TEXT_POSTF.length());\n Matcher mImage = pImage2.matcher(text);\n while (mImage.find()) {\n int textEnd = mImage.start();\n textStart = imageEnd;\n imageEnd = mImage.end();\n String itemText = text.substring(textStart, textEnd);\n addTextItem(items, itemText);\n processImageItem(items, mImage.group(), pImageUrl, pWidth, pHeight);\n }\n\n Matcher mVideo = pVideo.matcher(text);\n while (mVideo.find()) {\n int textEnd = mVideo.start();\n textStart = imageEnd;\n imageEnd = mVideo.end();\n String itemText = \"\";\n if (textEnd >= textStart) {\n itemText = text.substring(textStart, textEnd);\n }\n addTextItem(items, itemText);\n processVideoItem(items, mVideo.group(), pImageUrl, pWidth, pHeight);\n }\n\n text = text.substring(imageEnd);\n addTextItem(items, text);\n }\n\n\n NewsDetailItem item = new NewsDetailItem();\n item.setContentType(NewsDetailDBHelper.NewsItemType.REPLY_HEADER.ordinal());\n item.setPostUrl(mUrl);\n items.add(item);\n\n Matcher mComment = pComment.matcher(response);\n while (mComment.find()) {\n item = new NewsDetailItem();\n item.setContentType(NewsDetailDBHelper.NewsItemType.REPLY.ordinal());\n item.setPostUrl(mUrl);\n items.add(item);\n item.setAkismet(akismet);\n String comment = mComment.group();\n\n // if (comment.contains(CAN_CHANGE_KARMA_PREFIX)) {\n item.setCanChangeKarma(1);\n // } else {\n // item.setCanChangeKarma(0);\n // }\n\n Matcher mAuthor = pAuthor.matcher(comment);\n if (mAuthor.find()) {\n String authorText = mAuthor.group();\n item.setAuthorImage(getAuthorImgage(authorText, pAuthorImage));\n item.setAuthor(getAuthorName(authorText, pAuthorName1, pAuthorName2));\n }\n Matcher mCommentText = pCommentText.matcher(comment);\n if (mCommentText.find()) {\n String s = mCommentText.group();\n mCommentText = pCommentTex2t.matcher(s);\n if (mCommentText.find()) {\n mCommentText = pCommentText3.matcher(mCommentText.group());\n if (mCommentText.find()) {\n String commentText = mCommentText.group().substring(COMMENT_PREFIX.length());\n commentText = commentText.substring(0, commentText.length() - COMMENT_POSTFIX.length());\n commentText = commentText.replace(\"<p>\", \"\");\n commentText = commentText.replace(\"</p>\", \"\");\n item.setText(commentText);\n }\n }\n }\n Matcher mCommentId = pCommentId.matcher(comment);\n if (mCommentId.find()) {\n String commentId = mCommentId.group().substring(COMMENTDATE_PREF.length());\n commentId = commentId.substring(0, commentId.length() - COMMENT_ID_POSTFIX.length());\n item.setCommentId(commentId);\n }\n Matcher mCommentDate = pCommentDate.matcher(comment);\n if (mCommentDate.find()) {\n String commentDate = mCommentDate.group().substring(COMMENTDATE_PREF.length());\n commentDate = commentDate.substring(0, commentDate.length() - COMMENTDATE_POSTF.length());\n item.setDate(commentDate);\n }\n item.setKarmaUp(getKarma(comment, pThumbsUp, pThumb2));\n item.setkarmaDown(getKarma(comment, pThumbsDown, pThumb2));\n }\n }", "private WebSearchRequest createNextRequest() {\n\t\tWebSearchRequest _request = new WebSearchRequest(query);\n\t\t_request.setStart(BigInteger.valueOf(cacheStatus+1));\t\t\t\t\t//Yahoo API starts index with 1, not with 0\n\t\t_request.setResults(getFetchBlockSize());\n\t\treturn _request;\n\t}", "OptimizeResponse() {\n\n\t}", "private RequestResponse handleSearchRequest(Request request, Response response) throws ServiceException {\n response.type(\"application/json\");\n\n String core = request.params(\":core\");\n if (StringUtils.isEmpty(core)) {\n throw new ServiceException(\"Failed to provide an index core for the document\");\n }\n\n SearchParameters searchParameters = new RequestToSearchParameters().convert(request);\n return this.searchService.query(core, searchParameters);\n }", "public void process(Manager manager, SearchRequest q)\n\t{\n\t\tResultSet rs = q.getResultSet();\n\t\tnew_query(manager, q, rs);\n\t\tint docids[] = rs.getDocids();\n\t\tint resultsetsize = docids.length;\n\t\tif (show_url_early && show_url)\n\t\t{\n\t\t\tString[] urls = new String[resultsetsize];\n\t\t\tString[] metadata = null;\n\t\t\tlogger.debug(\"early url decoration\");\n\t\t\tsynchronized(metaCache) {\n\t\t\t\ttry {\n\t\t\t\t\tfor(int i=0;i<resultsetsize;i++) {\n\t\t\t\t\t\tInteger DocNoObject = new Integer(docids[i]);\n\t\t\t\t\t\tif (metaCache.containsKey(DocNoObject))\n\t\t\t\t\t\t\t\tmetadata = (String[]) metaCache.get(DocNoObject);\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tmetadata = metaIndex.getItems(keys, docids[i]);\n\t\t\t\t\t\t\tmetaCache.put(DocNoObject,metadata);\n\t\t\t\t\t\t}\n\t\t\t\t\t\turls[i] = metadata[0];\n\t\t\t\t\t}\n\t\t\t\t\trs.addMetaItems(\"url\", urls);\n\t\t\t\t\n\t\t\t\t}catch(IOException ioe) {}\n\t\t\t} \n\t\t\t\n\n\t\t}\n\n\t\tif (show_docid_early && show_docid)\n\t\t{\n\t\t\tString[] documentids = new String[resultsetsize];\n\t\t\tfor(int i=0;i<resultsetsize;i++)\n\t\t\t{\n\t\t\t\tdocumentids[i] = docIndex.getDocumentNumber(docids[i]);\n\t\t\t}\n\n\t\t\tSystem.err.println(\"Decorating with docnos for \"+documentids.length + \"result\");\n\t\t\tif (documentids.length > 0)\n\t\t\t\tSystem.err.println(\"\\tFirst docno is \"+documentids[0]);\n\t\t\trs.addMetaItems(\"docid\", documentids);\n\t\t}\n\t}", "@Override\n public Object parseNetworkResponse(Response response, int i) throws Exception {\n return response.body().string();\n }", "private HashMap<String, JSONObject> search (String city, String state, String zip, String specialty) {\r\n\r\n //results are put in a hashmap with doctors' names as keys and their information as values\r\n HashMap<String,JSONObject> results = new HashMap<>();\r\n Timestamp timestamp = null;\r\n int number = 0;\r\n int code = 0;\r\n try {\r\n //timestamp of when the request is sent\r\n timestamp = new Timestamp(System.currentTimeMillis());\r\n //replace space in strings with +\r\n specialty = specialty.replaceAll(\" \", \"+\");\r\n city = city.replaceAll(\" \", \"+\");\r\n // Make call to a particular server URL\r\n URL url = new URL(\"https://chi-ngo-coolio-task2.herokuapp.com/?city=\" + city + \"&state=\" + state\r\n + \"&zip=\" + zip + \"&specialty=\" + specialty);\r\n //use this URL if task 2 fails\r\n //URL url = new URL(\"https:chi-ngo-coolio.herokuapp.com/?city=\" + city + \"&state=\" + state + \"&zip=\" + zip + \"&specialty=\" + specialty);\r\n /*\r\n * Create an HttpURLConnection. This is useful for setting headers\r\n * and for getting the path of the resource that is returned (which\r\n * may be different than the URL above if redirected).\r\n * HttpsURLConnection (with an \"s\") can be used if required by the site.\r\n */\r\n HttpURLConnection conn = (HttpURLConnection) url.openConnection();\r\n conn.setRequestMethod(\"GET\");\r\n code = conn.getResponseCode();\r\n //if the connection was successful\r\n if (code == 200) {\r\n //read all the response\r\n BufferedReader in = new BufferedReader(new InputStreamReader(conn.getInputStream()));\r\n String str;\r\n StringBuffer content = new StringBuffer();\r\n while ((str = in.readLine()) != null) {\r\n content.append(str);\r\n }\r\n in.close();\r\n //make a new parser to parse the response string into a JSONObject\r\n JSONParser p = new JSONParser();\r\n JSONObject response = (JSONObject) p.parse(content.toString());\r\n System.out.println(response.toJSONString());\r\n JSONArray doctors = (JSONArray) response.get(\"doctors\");\r\n //add each doctor and their information to the hashmap with their full names as keys\r\n for (int i = 0; i < doctors.size(); i++) {\r\n JSONObject info = (JSONObject) doctors.get(i);\r\n results.put((String) info.get(\"full_name\"),info);\r\n }\r\n //get the number of doctors found\r\n number = doctors.size();\r\n }\r\n //close the connection\r\n conn.disconnect();\r\n }\r\n // handle exceptions\r\n catch (MalformedURLException e) {\r\n e.printStackTrace();\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n } catch (ParseException e) {\r\n e.printStackTrace();\r\n }\r\n //send a POST request for logging data\r\n try {\r\n //convert the timestamp object to a string\r\n String time = timestamp.toString();\r\n //replace all spaces with +\r\n time = time.replaceAll(\" \", \"+\");\r\n /*\r\n * Create an HttpURLConnection. This is useful for setting headers\r\n * and for getting the path of the resource that is returned (which\r\n * may be different than the URL above if redirected).\r\n * HttpsURLConnection (with an \"s\") can be used if required by the site.\r\n */\r\n //connect to the server URL with a POST request for data logging to MongoDB\r\n URL url2 = new URL(\"https://chi-ngo-coolio-task2.herokuapp.com/?city=\" + city + \"&state=\" + state + \"&zip=\"\r\n + zip + \"&specialty=\" + specialty + \"&timestamp=\" + time + \"&number=\" + number + \"&code=\" + code);\r\n HttpURLConnection connection = (HttpURLConnection) url2.openConnection();\r\n connection.setRequestMethod(\"POST\");\r\n connection.setRequestProperty(\"Accept\", \"text/plain\");\r\n connection.getResponseCode();\r\n //close the connection\r\n connection.disconnect();\r\n } catch (MalformedURLException e) {\r\n e.printStackTrace();\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n //return the result hashmap\r\n return results;\r\n }", "@Override\n public void onResponse(String response) {\n parseData(url, response);\n }", "public java.util.List<SearchRecord> generateSearchResults(String domain, String queryText, JSONObject configuration, int numberOfResults, JSONObject advConfig) {\n\t\tif (advConfig.length() > 0) {\n\t\t\tconfiguration = advConfig;\n\t\t}\n\t\t\n\t\tJSONObject googleScholarConfiguration = configuration.optJSONObject(\"googlescholar\");\n\t\tif (googleScholarConfiguration == null) { googleScholarConfiguration = new JSONObject(); }\n\t\n\t\tjava.util.List<SearchRecord> result = new java.util.ArrayList<SearchRecord>();\n\n\n\t\tint position = 0;\n\t\tnumberOfResults = Math.min(MAX_NUMBER_OF_RESULTS, numberOfResults); \n\t\tString userAgent = SourceHandlerInterface.getNextUserAgent(domain);\n\t\t\n\t\ttry (CloseableHttpClient httpclient = HttpClients.custom().setUserAgent(userAgent).build()) {\n\t\t\tString uri = this.createURIString(queryText, numberOfResults, googleScholarConfiguration);\n\t\t\tsrcLogger.log(Level.INFO, \"googlescholar URI: \" + uri);\n\t\t\t\n\t\t\twhile (result.size() < numberOfResults && uri != null) {\n\t\t\t\ttry (CloseableHttpResponse response = httpclient.execute(new HttpGet(uri))) {\n\t\n\t\t\t\t\tint code = response.getStatusLine().getStatusCode();\n\t\t\t\t\tif (code != HttpStatus.SC_OK) {\n\t\t\t\t\t\tsrcLogger.log(Level.SEVERE, \"googlescholar HTTP Response code: \" + code);\n\t\t\t\t\t\tsrcLogger.log(Level.SEVERE, \" status line: \" + response.getStatusLine());\n\t\t\t\t\t\treturn null;\n\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\tString content = FileUtilities.read(response.getEntity().getContent());\n\t\t\t\t\torg.jsoup.nodes.Document doc = Jsoup.parse(content, uri);\n\n\t\t\t\t\t/*\n\t\t\t\t\t \n\t\t\t'title': '.gs_rt a *::text',\n 'url': '.gs_rt a::attr(href)',\n 'related-text': '.gs_ggsS::text',\n 'related-type': '.gs_ggsS .gs_ctg2::text',\n 'related-url': '.gs_ggs a::attr(href)',\n 'citation-text': '.gs_fl > a:nth-child(1)::text',\n 'citation-url': '.gs_fl > a:nth-child(1)::attr(href)',\n 'authors': '.gs_a a::text',\n 'description': '.gs_rs *::text',\n 'journal-year-src': '.gs_a::text',\n\t\t\t\t\t \n\t\t\t\t\t */\n\t\t\t\t\t\n\t\t\t\t\tElements items = doc.select(\"div.gs_r\");\n\t\t\t\t\tfor (org.jsoup.nodes.Element e: items) {\n\t\t\t\t\t\tString url = null;\n\t\t\t\t\t\t// First, check to see if a full text document is available. If so, use that as the url.\n\t\t\t\t\t\tElements links = e.select(\"div.gs_ggsd a\");\n\t\t\t\t\t\tfor (Element linkElement: links) {\n\t\t\t\t\t\t\tif (linkElement.text().contains(\"Find Text @ NCSU\") == false) {\n\t\t\t\t\t\t\t\turl = linkElement.attr(\"href\");\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tElement link = e.select(\"h3.gs_rt a\").first();\n\t\t\t\t\t\tif (link == null) { continue; }\n\t\t\t\t\t\tString title = link.text(); \n\t\t\t\t\t\tif (url == null) { url = link.attr(\"href\"); }\n\t\t\t\t\t\tString description = null; \n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tdescription = e.select(\".gs_rs\").first().text();\n\t\t\t\t\t\t} catch (NullPointerException npe) {\n\t\t\t\t\t\t\tsrcLogger.log(Level.WARNING,\"No description fround in google scholar handler, null pointer exception\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (title != null || url != null || description !=null)\t{\n\t\t\t\t\t\t\tposition++;\n\t\t\t\t\t\t\tSearchRecord r = new SearchRecord(title,url,description,position,SOURCE_HANDLER_NAME);\n\t\t\t\t\t\t\tresult.add(r);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// Next, let's get the next page ...\n\t\t\t\t\ttry {\n\t\t\t\t\t\tElement nextLink = doc.select(\"a:contains(Next):has(span.gs_ico_nav_next)\").first();\n\t\t\t\t\t\turi = nextLink.attr(\"href\");\n\t\t\t\t\t\tif (uri.startsWith(\"http\") == false) {\n\t\t\t\t\t\t\turi = \"https://scholar.google.com\" + uri;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t//System.out.println(uri);\t\n\t\t\t\t\t}\n\t\t\t\t\tcatch (Exception e) {\n\t\t\t\t\t\turi = null; // link not found\n\t\t\t\t\t}\n\t\t\t\t} \n\t\t\t\tcatch (Exception e) {\n\t\t\t\t\tsrcLogger.log(Level.SEVERE, \"googlescholar exception: \",e);\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tcatch (Exception ioe) {\n\t\t\tsrcLogger.log(Level.SEVERE, \"httpclient exception: \" + ioe.toString());\n\t\t\treturn null;\t\t\t\n\t\t}\n\t\t\n\t\t//result.stream().forEach(System.out::println);\n\t\t\n\t\treturn result;\n\t}", "@Override\n\t\t\t\t\tpublic void handleResponse(String jsonResult, EHttpError error) {\n\t\t\t\t\t\tif(jsonResult!=null&&error == EHttpError.KErrorNone){\n\t\t\t\t\t\t\tGson gson = new Gson();\n\t\t\t\t\t\t\tType type = new TypeToken<Map<String, Object>>() {\n\t\t\t\t\t\t\t}.getType();\n\t\t\t\t\t\t\tbooks = gson.fromJson(jsonResult, type);\n\t\t\t\t\t\t\tList<Map<String, Object>>list = (List<Map<String, Object>>) books.get(\"books\");\n\t\t\t\t\t\t\tSystem.out.println(\"搜索到的书\"+list);\n\t\t\t\t\t\t\tthis.completeListener.onQueryComplete(new QueryId(), list, error);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tthis.completeListener.onQueryComplete(new QueryId(), null, error);\n\t\t\t\t\t\t}\n\t\t\t\t\t}", "@SuppressWarnings(\"unchecked\")\n\tpublic Indexer crawl (int limit) \n\t{\n\t\n\t\t////////////////////////////////////////////////////////////////////\n\t // Write your Code here as part of Priority Based Spider assignment\n\t // \n\t ///////////////////////////////////////////////////////////////////\n\t\tPQueue q=new PQueue();\n \t\n\t\ttry\n \t{\n\t\t\t final String authUser = \"iiit-63\";\n\t\t\t\tfinal String authPassword = \"MSIT123\";\n\n\t\t\t\tSystem.setProperty(\"http.proxyHost\", \"proxy.iiit.ac.in\");\n\t\t\t\tSystem.setProperty(\"http.proxyPort\", \"8080\");\n\t\t\t\tSystem.setProperty(\"http.proxyUser\", authUser);\n\t\t\t\tSystem.setProperty(\"http.proxyPassword\", authPassword);\n\n\t\t\t\tAuthenticator.setDefault(\n\t\t\t\t new Authenticator() \n\t\t\t\t {\n\t\t\t\t public PasswordAuthentication getPasswordAuthentication()\n\t\t\t\t {\n\t\t\t\t return new PasswordAuthentication(authUser, authPassword.toCharArray());\n\t\t\t\t }\n\t\t\t\t }\n\t\t\t\t);\n\n\t\t\t\tSystem.setProperty(\"http.proxyUser\", authUser);\n\t\t\t\tSystem.setProperty(\"http.proxyPassword\", authPassword);\n \t\tURLTextReader in = new URLTextReader(u);\n \t\t// Parse the page into its elements\n \t\tPageLexer elts = new PageLexer(in, u);\t\t\n \t\tint count1=0;\n \t\t// Print out the tokens\n \t\tint count = 0;\n \t\t\n \t\twhile (elts.hasNext()) \n \t\t{\n \t\t\tcount++;\n \t\t\tPageElementInterface elt = (PageElementInterface)elts.next();\t\t\t \n \t\t\tif (elt instanceof PageHref)\n \t\t\tif(count1<limit)\n \t\t\t{\n \t\t\t\tif(q.isempty())\n \t\t\t\t{\n \t\t\t\t\tq.enqueue(elt.toString(),count);\n\t\t\t\t\t}\n \t\t\t\telse\n \t\t\t\t{\n \t\t\t\t\tif(q.search(elt.toString(),count))\n \t\t\t\t\t{\n \t\t\t\t\t\tq.enqueue(elt.toString(),count);\n \t\t\t\t\t}\n \t\t\t\t}\n \t\t\t\tcount1++;\n \t\t\t\tSystem.out.println(\"link: \"+elt);\n \t\t\t\t\n \t\t\t}\n \t\t}\n \t\tSystem.out.println(\"links retrieved: \"+count1);\n \t\tq.display();\n \t\twhile(limit !=0)\n \t\t{\n \t\t\tObject elt=q.dequeue();\n \t\t\tURL u1=new URL(elt.toString());\n \t\t\tURLTextReader in1= new URLTextReader(u1);\n \t\t\t// Parse the page into its elements\n \t\t\tPageLexer elt1 = new PageLexer(in1, u1);\n \t\t\twhile (elt1.hasNext()) \n \t\t\t{\n \t\t\t\tPageElementInterface elts2= (PageElementInterface)elt1.next();\n \t\t\t\tif (elts2 instanceof PageWord)\n \t\t\t\t{\n \t\t\t\t\tv.add(elts2);\n \t\t\t\t}\n \t\t\t\tSystem.out.println(\"words:\"+elts2);\n \t\t\t} \t\t\t\n\t\t\t\tObjectIterator OI=new ObjectIterator(v);\n\t\t\t\ti.addPage(u1,OI);\n\t\t\t\tfor(int j=0;j<v.size();j++);\n\t\t\t\t{\n\t\t\t\t\tSystem.out.println(\"hello\"+v.get(count));\n\t\t\t\t}\n\t\t\t\tlimit--;\n \t\t}\n \t\t\n \t}\n \tcatch (Exception e)\n \t{\n \t\tSystem.out.println(\"Bad file or URL specification\");\n \t}\n return i;\n\t}", "public void findBookDetails(AnnotateImageResponse imageResponse) throws IOException {\n\n String google = \"http://ajax.googleapis.com/ajax/services/search/web?v=1.0&q=\";\n String search = \"searchString\";\n String charset = \"UTF-8\";\n\n URL url = new URL(google + URLEncoder.encode(search, charset));\n Reader reader = new InputStreamReader(url.openStream(), charset);\n GoogleResults results = new Gson().fromJson(reader, GoogleResults.class);\n\n // Show title and URL of 1st result.\n System.out.println(results.getResponseData().getResults().get(0).getTitle());\n System.out.println(results.getResponseData().getResults().get(0).getUrl());\n }", "private void parseJSON(String response)\n {\n try\n {\n // Using orj.json, get the file string and convert it to an object\n JSONObject object = (JSONObject) new JSONTokener(response).nextValue();\n\n // The Winnipeg Transit JSON results usually have nested values\n // We can identify the request by the first key of the first level\n\n // The method names() will retrieve an JSONArray with the key names\n JSONArray objectNames = object.names();\n\n // Retrieve the first key of the first level\n String firstKey = objectNames.getString(0);\n\n if (firstKey.equals(\"status\"))\n {\n parseStatus(object.getJSONObject(firstKey));\n }\n else if (firstKey.equals(\"stop-schedule\"))\n {\n parseStopSchedule(object.getJSONObject(firstKey));\n }\n }\n catch (JSONException e)\n {\n e.printStackTrace();\n }\n }", "interface Result {\n\n /** The page which contains matches. */\n @NotNull\n Resource getTarget();\n\n /** The content child of the page which contains matches. */\n @NotNull\n Resource getTargetContent();\n\n /** A link that shows the target, including search terms with {@link #PARAMETER_SEARCHTERM} */\n @NotNull\n String getTargetUrl();\n\n /** The title of the search result. */\n @NotNull\n String getTitle();\n\n /** The score of the search result. */\n Float getScore();\n\n /**\n * One or more descendants of {@link #getTarget()} that potentially match the search expression. Mostly useful\n * for generating excerpts; can contain false positives in some search algorithms.\n */\n @NotNull\n List<Resource> getMatches();\n\n /** The fulltext search expression for which this result was found. */\n @NotNull\n String getSearchExpression();\n\n /**\n * A basic excerpt from the matches that demonstrates the occurrences of the terms from {@link\n * #getSearchExpression()} in this result. Might be empty if not applicable (e.g. if the search terms were found\n * in meta information). If there are several matches, we just give one excerpt. You might want to provide your\n * own implementation for that to accommodate for specific requirements.\n *\n * @return a text with the occurrences of the words marked with HTML tag em .\n */\n @NotNull\n String getExcerpt() throws SearchTermParseException;\n }", "public static void getFlightSearchData() {\n\t HttpClient httpclient =HttpClientBuilder.create().build();\r\n//\t String url = \"http://finance.yahoo.com/q/hp?s=005930.KS+Historical+Prices\";\r\n\t String url =\"https://www.rome2rio.com/api/json/GetFlightPricesAsyncProgress?id=http%3A%2F%2Fpartners.api.skyscanner.net%2Fapiservices%2Fpricing%2Fuk1%2Fv1.0%2Feca848208a19428887cb0f9acd45798f_ecilpojl_5390203AB08027B40F6AC23E253711B9%20ICN%20OKA%2CICN%2COKA%2CSkyScanner%2Chttp%3A%2F%2Fwww.skyscanner.com%2F&version=201605050453&\";\r\n//\t String url =\"https://www.rome2rio.com/api/json/GetFlightPricesAsyncStart?origins=ICN&destinations=OKA&outDate=5-12-2016&retDate=5-19-2016&adults=1&children=0&infants=0&cabin=e&currency=KRW&version=201605050453&\";\r\n\t try\r\n\t { \r\n\t \tHttpGet request = new HttpGet(url);\r\n\t\t\tHttpResponse res = httpclient.execute(request);\r\n/*\t \t// Specify values for path parameters (shown as {...}) \r\n\t URIBuilder builder = new URIBuilder(\"http://evaluate.rome2rio.com/api/1.2/json/Search/\");\r\n\t \r\n\t // Specify your developer key \r\n\t builder.setParameter(\"key\", \"Z2CA71LM\"); \r\n\t // Specify values for the following required parameters \r\n\t builder.setParameter(\"oName\", \"ICN\"); \r\n\t builder.setParameter(\"dName\", \"LAX\");\r\n//\t builder.setParameter(\"oPos\", \"New York Kennedy\");\r\n//\t builder.setParameter(\"dPos\", \"40.64441,-73.78275\");\r\n//\t builder.setParameter(\"flags\", \"0x000FFFF0\");\r\n//\t builder.setParameter(\"flags\", \"0x000FFFFE\");\r\n\t builder.setParameter(\"flags\", \"0x000FFFFC\");\r\n\t \r\n//\t URI uri = builder.build(); \r\n\t HttpGet request = new HttpGet(uri); \r\n\t HttpResponse response = httpclient.execute(request); \r\n*/\t \r\n\t\t\tHttpEntity entity = res.getEntity();\r\n\t if (entity != null) { \r\n\t System.out.println(\"EntityUtil:\" + EntityUtils.toString(entity)); \r\n\t }\r\n//\t return EntityUtils.toString(entity);\r\n\t\t\tlogger.info(\"aaa: {}\", entity.toString());\r\n\t }\r\n\t catch(Exception e) \r\n\t { \r\n\t System.out.println(e.getMessage()); \r\n//\t return null;\r\n\t } \r\n\t \r\n\t}", "@Override\n public void crawl() {\n Document doc;\n try {\n\n\n doc = Jsoup.connect(rootURL).userAgent(\"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_3) AppleWebKit/537.75.14 (KHTML, like Gecko) Version/7.0.3 Safari/7046A194A\").get();\n\n Elements articles = doc.select(\"section.list article\");\n\n System.out.println(\"Number of articles found:\"+articles.size());\n //list of links found\n for(Element article: articles){\n\n Element titleLink = article.select(\"a\").first();\n System.out.println(titleLink.attr(\"abs:href\"));\n\n //if the url found is in the cache, do not retrieve the url.\n if(urlCache.contains(titleLink.attr(\"abs:href\"))) {\n System.out.println(\"Doucment found in cache, ignoring document\");\n continue;\n }\n\n storeDocument(Jsoup.connect(titleLink.attr(\"abs:href\")).get());\n\n //add the URL to the cache so that we don't retrieve it again.\n urlCache.add(titleLink.attr(\"abs:href\"));\n }\n\n\n } catch (Exception e){\n logger.log(Level.SEVERE, \"Error Retrieving from URL\", e);\n e.printStackTrace();\n }\n }", "public void getNextPage(String url) {\n String kw = \"flag\";\n client = new OkHttpClient();\n final Request request = new Request.Builder()\n .url(url)\n .build();\n Call call = client.newCall(request);\n call.enqueue(new Callback() {\n @Override\n public void onFailure(Call call, IOException e) {\n System.out.println(e);\n }\n\n @Override\n public void onResponse(Call call, Response response) throws IOException {\n String htmlStr = response.body().string();\n //Type listTpye = new TypeToken<LinkedList<QueryRes>>(){}.getType();\n //System.out.println(htmlStr.toString());\n\n try {\n json = new JSONObject(htmlStr);\n //parsePageJson(json);\n System.out.println(json);\n } catch (Exception e) {\n System.out.println(\"error again\");\n }\n //parseJson(json);\n Message msg = handler.obtainMessage();\n msg.what = 1;\n handler.sendMessage(msg);\n //parsePageJson(page_json);\n }\n });\n }", "entities.Torrent.LocalSearchResponse getLocalSearchResponse();", "@Override\n protected Response<JSONArray> parseNetworkResponse (NetworkResponse response){\n// This thread is on background thread\n// Handle parsing logic here?\n try {\n String jsonString =\n new String(\n response.data,\n HttpHeaderParser.parseCharset(response.headers, PROTOCOL_CHARSET));\n JSONArray jsonArray = new JSONArray(jsonString);\n\n// Parse on background thread\n parseResponse(jsonArray);\n\n return Response.success(jsonArray, HttpHeaderParser.parseCacheHeaders(response));\n } catch (UnsupportedEncodingException | JSONException e) {\n return Response.error(new ParseError(e));\n }\n }", "@Override\n protected WebResourceResponse parseResponse(@NonNull String urlStr, @Nullable Map<String, String> requestHeaders, boolean analyzeForDownload, boolean quickDownload) {\n if (analyzeForDownload || quickDownload) {\n activity.onGalleryPageStarted();\n\n if (BuildConfig.DEBUG) Timber.v(\"WebView : parseResponse Pixiv %s\", urlStr);\n\n ContentParser contentParser = new PixivContent();\n compositeDisposable.add(Single.fromCallable(() -> contentParser.toContent(urlStr))\n .subscribeOn(Schedulers.io())\n .observeOn(Schedulers.computation())\n .map(content -> super.processContent(content, content.getGalleryUrl(), quickDownload))\n .observeOn(AndroidSchedulers.mainThread())\n .subscribe(\n content2 -> activity.onResultReady(content2, quickDownload),\n Timber::e\n )\n );\n }\n return null;\n }", "public static void main(String[] args) throws IOException {\n\t\t\n\t String google = \"http://ajax.googleapis.com/ajax/services/search/web?v=1.0&q=\";\n\t String search = \"Bill Gates\";\n\t String charset = \"UTF-8\";\n\n\t URL url = new URL(google + URLEncoder.encode(search, charset));\n\t Reader reader = new InputStreamReader(url.openStream(), charset);\n\t GoogleResults results = new Gson().fromJson(reader, GoogleResults.class);\t \n\t \n\t \n\t System.out.println(\"Search size: \" + results.getResponseData().getResults().size());\n\t \n\t int i = 0;\n\t while (i < results.getResponseData().getResults().size())\n\t {\n\t \t\n\t\t System.out.println(results.getResponseData().getResults().get(i).getTitle());\n\t\t System.out.println(results.getResponseData().getResults().get(i).getUrl());\n\t\t System.out.println(\"---------------------------------------------------------\");\n\t\t System.out.println(\" \");\n\t\t System.out.println(\" \");\n\t\t \n\t\t i++;\n\t\t \n\t\t if(i == 10) \n\t\t \tbreak;\n\t \t\n\t }\n\t \n\t\n\t \n\t \n\t \n\t \n\n\t}", "private static String parseResponse(HttpResponse response) throws Exception {\r\n \t\tString result = null;\r\n \t\tBufferedReader reader = null;\r\n \t\ttry {\r\n \t\t\tHeader contentEncoding = response\r\n \t\t\t\t\t.getFirstHeader(\"Content-Encoding\");\r\n \t\t\tif (contentEncoding != null\r\n \t\t\t\t\t&& contentEncoding.getValue().equalsIgnoreCase(\"gzip\")) {\r\n \t\t\t\treader = new BufferedReader(new InputStreamReader(\r\n \t\t\t\t\t\tnew GZIPInputStream(response.getEntity().getContent())));\r\n \t\t\t} else {\r\n \t\t\t\treader = new BufferedReader(new InputStreamReader(response\r\n \t\t\t\t\t\t.getEntity().getContent()));\r\n \t\t\t}\r\n \t\t\tStringBuilder sb = new StringBuilder();\r\n \t\t\tString line = null;\r\n \r\n \t\t\twhile ((line = reader.readLine()) != null) {\r\n \t\t\t\tsb.append(line + \"\\n\");\r\n \t\t\t}\r\n \t\t\tresult = sb.toString();\r\n \t\t} finally {\r\n \t\t\tif (reader != null) {\r\n \t\t\t\treader.close();\r\n \t\t\t}\r\n \t\t}\r\n \t\treturn result;\r\n \t}", "private void searchWeb()\n {\n searchWeb = true;\n search();\n }", "public ArrayList<String> webCrawling(){\n\t\t\tfor(i=780100; i<790000; i++){\r\n\t\t\t\ttry{\r\n\t\t\t\tdoc = insertPage(i);\r\n\t\t\t\t//Thread.sleep(1000);\r\n\t\t\t\t}catch (Exception e) {\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t\tif(doc != null){\r\n\t\t\t\t\tElement ele = doc.select(\"div.more_comment a\").first();\r\n\t\t\t\t\t//System.out.println(ele.attr(\"href\"));\r\n\t\t\t\t\tcommentCrawling(ele.attr(\"href\"));//��۸�� ���� ��ũ\r\n\t\t\t\t\tcommentCrawlingList(commentURList);\r\n\t\t\t\t\tcommentURList = new ArrayList<String>();//��ũ ����� �ߺ��ǰ� ���̴� �� �����ϱ� ���� �ʱ�ȭ �۾�\r\n\t\t\t\t\tSystem.out.println(i+\"��° ������\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn replyComment;\r\n\t\t//return urlList.get(0);\r\n\t}", "private void volleySearchRequest(String to_search) {\n RequestQueue requestQueue = VolleySingleton.getInstance().getRequestQueue();\n\n Log.e(TAG, \"SEARCH WORD LENGTH :: \" + to_search.length());\n Log.e(TAG, \"SEARCH URL :: \" + WebServices.SEARCH_URL(to_search, 2));\n\n Log.e(TAG, \"TO_SEARCH :: \" + to_search);\n Log.e(TAG, \"MENU ID TO SEARCH :: \" + menu_id_to_search);\n\n JsonArrayRequest jsonArrayRequest = new JsonArrayRequest(\n WebServices.SEARCH_URL(to_search, menu_id_to_search),\n new Response.Listener<JSONArray>() {\n @Override\n public void onResponse(JSONArray response) {\n Log.e(TAG, \"SEARCH RESPONSE :: \" + response);\n\n if (searchIntellisenseList.isEmpty()) {\n Log.e(TAG, \"List is empty\");\n } else {\n Log.e(TAG, \"List is containing items\");\n searchIntellisenseList.clear();\n adapter.notifyDataSetChanged();\n }\n\n SearchIntellisense searchIntellisense;\n try {\n JSONArray jsonArray = response.getJSONArray(0);\n for (int i = 0; i < jsonArray.length(); i++) {\n\n searchIntellisense = new SearchIntellisense();\n JSONObject jsonobject = jsonArray.getJSONObject(i);\n\n searchIntellisense.setId(jsonobject.getInt(\"id\"));\n searchIntellisense.setMenu(jsonobject.getString(\"menu\"));\n searchIntellisense.setName(jsonobject.getString(\"name\"));\n\n searchIntellisenseList.add(searchIntellisense);\n }\n\n //this is for removing duplicate items from arraylist starts\n// firstly confirm from misha, and them implement this code\n// Set<String> hs = new HashSet<>();\n// hs.addAll(search_results_list);\n// search_results_list.clear();\n// search_results_list.addAll(hs);\n //this is for removing duplicate items from arraylist ends\n\n\n } catch (JSONException e) {\n Log.e(TAG, \"JSONException while parsing categories :: \" + e);\n }\n\n try {\n JSONArray jsonArray = response.getJSONArray(1);\n Log.e(TAG, \"jsonObject of searches :: \" + jsonArray);\n for (int i = 0; i < jsonArray.length(); i++) {\n\n searchIntellisense = new SearchIntellisense();\n JSONObject jsonobject = jsonArray.getJSONObject(i);\n\n searchIntellisense.setId(jsonobject.getInt(\"id\"));\n searchIntellisense.setType(jsonobject.getInt(\"type\"));\n searchIntellisense.setName(jsonobject.getString(\"name\"));\n searchIntellisense.setRate(jsonobject.getDouble(\"rate\"));\n searchIntellisense.setRate_curid(jsonobject.getInt(\"rate_curid\"));\n searchIntellisense.setPrice_from(jsonobject.getString(\"price_from\"));\n searchIntellisense.setUnit_label(jsonobject.getString(\"unit_label\"));\n searchIntellisense.setMark(jsonobject.getString(\"mark\"));\n searchIntellisense.setFilename(jsonobject.getString(\"filename\"));\n\n searchIntellisenseList.add(searchIntellisense);\n }\n } catch (JSONException e) {\n Log.e(TAG, \"JSONException :: \" + e);\n }\n\n adapter = new SearchResultAdapter(searchIntellisenseList, SearchActivity.this, SearchActivity.this);//last param is for clicklistener\n rv_search_results.setAdapter(adapter);\n\n if (rv_search_results.getVisibility() == View.GONE) {\n rv_search_results.setVisibility(View.VISIBLE);\n }\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n Log.e(TAG, \"ERROR :: \" + error);\n if (error.toString().equals(\"com.android.volley.TimeoutError\")) {\n Log.e(TAG, \"Due to timeout, making call again.\");\n volleySearchRequest(et_search.getText().toString());\n }\n }\n }) {\n @Override\n public Map<String, String> getHeaders() throws AuthFailureError {\n Map headers = new HashMap();\n headers.put(\"X-ESM-LID\", AppController.APP_LANGUAGE);\n headers.put(\"X-ESM-KEY\", Constants.API_KEY);\n return headers;\n }\n };\n requestQueue.add(jsonArrayRequest);\n }", "@Override\n\t\t\t\t\tpublic void handleResponse(String jsonResult, EHttpError error) {\n\t\t\t\t\t\tMap<String, Object>books;\n\t\t\t\t\t\tif(jsonResult!=null&&error == EHttpError.KErrorNone){\n\t\t\t\t\t\t\tGson gson = new Gson();\n\t\t\t\t\t\t\tType type = new TypeToken<Map<String, Object>>() {\n\t\t\t\t\t\t\t}.getType();\n\t\t\t\t\t\t\tbooks = gson.fromJson(jsonResult, type);\n\t\t\t\t\t\t\tList<String>list = (List<String>) books.get(\"booknames\");\n\t\t\t\t\t\t\tSystem.out.println(\"搜索到的书\"+list);\n\t\t\t\t\t\t\tthis.completeListener.onQueryComplete(AUTOCOMPLETE, list, error);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tthis.completeListener.onQueryComplete(AUTOCOMPLETE, null, error);\n\t\t\t\t\t\t}\n\t\t\t\t\t}", "private static SearchResponse createSearchResponse() {\n long tookInMillis = randomNonNegativeLong();\n int totalShards = randomIntBetween(1, Integer.MAX_VALUE);\n int successfulShards = randomIntBetween(0, totalShards);\n int skippedShards = randomIntBetween(0, totalShards);\n InternalSearchResponse internalSearchResponse = InternalSearchResponse.empty();\n\n return new SearchResponse(\n internalSearchResponse,\n null,\n totalShards,\n successfulShards,\n skippedShards,\n tookInMillis,\n ShardSearchFailure.EMPTY_ARRAY,\n SearchResponse.Clusters.EMPTY\n );\n }", "@Override\n protected JSONObject doInBackground(String... strings) {\n try {\n String query = strings[0];\n URL url = new URL(query);\n Scanner scanner = new Scanner(url.openConnection().getInputStream());\n StringBuilder responseBuilder = new StringBuilder();\n while(scanner.hasNextLine()) {\n responseBuilder.append(scanner.nextLine());\n }\n String response = responseBuilder.toString();\n JSONTokener tokener = new JSONTokener(response);\n JSONObject json = new JSONObject(tokener);\n return json;\n }\n catch (Exception e) {\n e.printStackTrace();\n return null;\n }\n }", "private void fetchPart(int i,int start, int step){\n //Commented for Server compile \n String currentFile = this.XmlFolderPath + \"\\\\\" + db + (fileCount++) + \".\" + this.retFormat;\n //Uncommented for Server compile \n // String currentFile = this.XmlFolderPath + \"/\" + db + (fileCount++) + \".xml\";\n\n // Log printing\n if(debugMode) {\n System.out.println(\" \" + new Date().toString() + \" \" + db + \" Fetch > Fetching articles \" \n + start + \" to \" + ( start + step )\n + \" \\n\\t writing to : \" + currentFile);\n }\n try {\n //write here response from Pubmed\n writer = new BufferedWriter(new FileWriter(currentFile));\n \n //assemble the esearch URL\n String base = \"https://eutils.ncbi.nlm.nih.gov/entrez/eutils/\";\n\n String url = base + \"efetch.fcgi?db=\"+db+\"&query_key=\" + queryKeys.get(i)\n + \"&WebEnv=\" + webEnvs.get(i) + \"&usehistory=y&rettype=\" + retFormat + \"&retmode=\" + retFormat\n + \"&retstart=\" + start + \"&retmax=\" + step;\n // Log printing\n if(debugMode) {\n System.out.println(\" \" + db + \" Search > Fetch url : \" + url);\n }\n \n // send GET request\n RequestConfig globalConfig = RequestConfig.custom().setCookieSpec(CookieSpecs.IGNORE_COOKIES).build();\n CloseableHttpClient client = HttpClients.custom().setDefaultRequestConfig(globalConfig).build();\n\n HttpGet request = new HttpGet(url);\n request.addHeader(base, base);\n\n HttpResponse response;\n response = client.execute(request);\n BufferedReader rd = new BufferedReader( new InputStreamReader(response.getEntity().getContent()));\n StringBuffer result = new StringBuffer();\n String line = \"\";\n\n while ((line = rd.readLine()) != null) {\n writer.append(line);\n writer.newLine();\n }\n \n writer.flush();\n writer.close(); \n } catch (IOException ex) {\n // Log printing\n if(debugMode) {\n System.out.println(\" \" + new Date().toString() + \" \" + db + \" Fetch > IO Exception \" + ex.getMessage());\n }\n } \n }", "boolean hasSearchResponse();", "@Override\n public String doSearchResult() {\n return null;\n }", "@Test\n public void resultNumberTest() throws InterruptedException, ParseException {\n HomePageNavigation.gotoHomePage();\n Thread.sleep(2000);\n SearchNavigation.gotoSearchResultsPage(index,\"\");\n assertTrue(\"Message does not exist\", CommonUtils.extractTotalResults() >= 1);\n }", "protected String fetchItem( String str_url ) {\n try {\n // assemble the string and the search request\n StringBuilder response = new StringBuilder();\n URL url = new URL(str_url);\n\n // make the connection\n HttpURLConnection httpconn = (HttpURLConnection) url.openConnection();\n\n // did it do ok?\n if ( httpconn.getResponseCode() == HttpURLConnection.HTTP_OK ) {\n BufferedReader input = new BufferedReader(\n new InputStreamReader(httpconn.getInputStream()), 8192);\n String strLine = null;\n while ((strLine = input.readLine()) != null) {\n // have more data\n response.append(strLine);\n response.append(\"\\n\");\n }\n input.close();\n return response.toString();\n }\n } catch ( IOException e ) {\n return e.getMessage();\n }\n return \"\";\n }", "@Override\n public ArrayList<String> fetchData(String html) {\n ArrayList<String> data = new ArrayList<>();\n// Document document = Jsoup.parse(html);\n// Element content = document.selectFirst(\"div\").child(1).child(1).child(2);\n// data.add(content.selectFirst(\"h3\").text());\n// data.add(content.selectFirst(\"em\").text());\n// data.add(content.selectFirst(\"h4\").nextElementSibling().nextElementSibling().text());\n// try {\n// data.add(content.select(\"h4\").get(1).nextElementSibling().nextElementSibling().text());\n// }\n// catch (Exception ex) {}\n return data;\n }", "@Override\n\tpublic void process(Page page) {\n\t\tDocument doc = Jsoup.parse(page.getHtml().getFirstSourceText());\n\n\t\tif (isFirst) {\n\t\t\tSystem.out.println(\"添加所有列表链接\");\n\t\t\tArrayList<String> urls = new ArrayList<String>();\n\t\t\t// 33\n\t\t\tfor (int i = 2; i < 30; i++) {\n\t\t\t\turls.add(\"http://zyjy.jiangmen.gov.cn//szqjszbgg/index_\" + i + \".htm\");\n\t\t\t}\n\t\t\tpage.addTargetRequests(urls);\n\t\t\tSystem.out.println(\"这一页一共有 \" + urls.size() + \" 条数据\");\n\n\t\t\tisFirst = false;\n\t\t}\n\n\t\tif (page.getUrl().regex(URL_LIST).match() || page.getUrl().toString().trim().equals(url)) {\n\t\t\tSystem.out.println(\"获取列表数据\");\n\n\t\t\tElements uls = doc.getElementsByAttributeValue(\"class\", \"c1-bline\");\n\t\t\tfor (Element ul : uls) {\n\t\t\t\tString url = ul.getElementsByAttributeValue(\"class\", \"f-left\").get(0).select(\"a\").attr(\"href\").trim();\n\t\t\t\tString title = ul.getElementsByAttributeValue(\"class\", \"f-left\").get(0).text();\n\t\t\t\tString data = ul.getElementsByAttributeValue(\"class\", \"f-right\").get(0).text();\n\t\t\t\tCacheHashMap.cache.put(url, title + \"###\" + data);\n\t\t\t\tMyUtils.addRequestToPage(page, url);\n\t\t\t\tSystem.out.println(url + \" \" + CacheHashMap.cache.get(url));\n\t\t\t}\n\n\t\t}\n\t\tif (page.getUrl().regex(URL_DETAILS).match()) {\n\n\t\t\tProject project = new Project();\n\t\t\tStringBuffer project_article = new StringBuffer();\n\n\t\t\tString urldetails = CacheHashMap.cache.get(page.getUrl().toString().trim());\n\t\t\tSystem.out.println(\"url\" + page.getUrl().toString().trim());\n\t\t\tSystem.out.println(\"urldetails \" + urldetails);\n\n\t\t\tString[] value = urldetails.split(\"###\");\n\t\t\tif (value != null && value.length > 1) {\n\t\t\t\tproject.setProjectName(value[0]);\n\t\t\t\tproject.setPublicStart(value[1]);\n\t\t\t}\n\n\t\t\tElements divs = doc.getElementsByAttributeValue(\"class\", \"contlist minheight\");\n\t\t\tfor (Element div : divs.get(0).children()) {\n\t\t\t\tif (div.nodeName().equals(\"table\")) {\n\t\t\t\t\tElements trs = divs.select(\"tbody\").select(\"tr\");\n\t\t\t\t\tfor (Element tr : trs) {\n\t\t\t\t\t\tproject_article.append(tr.text()).append(\"\\n\");\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tproject_article.append(div.text()).append(\"\\n\");\n\n\t\t\t\t}\n\t\t\t}\n\t\t\tproject.setUrl(page.getUrl().toString().trim());\n\t\t\tproject.setState(0);\n\t\t\tproject.setWebsiteType(\"江门市\");\n\t\t\tproject.setTime(MyUtils.getcurentTime());\n\t\t\tproject.setRawHtml(divs.toString());\n\n\t\t\tproject.setArticle(project_article.toString());\n\t\t\tSystem.out.println(project);\n\n\t\t\tHibernateUtil.save2Hibernate(project);\n\n\t\t}\n\n\t}", "public static GetRoadwayPageResponse parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{\n GetRoadwayPageResponse object =\n new GetRoadwayPageResponse();\n\n int event;\n java.lang.String nillableValue = null;\n java.lang.String prefix =\"\";\n java.lang.String namespaceuri =\"\";\n try {\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n\n \n if (reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"type\")!=null){\n java.lang.String fullTypeName = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\n \"type\");\n if (fullTypeName!=null){\n java.lang.String nsPrefix = null;\n if (fullTypeName.indexOf(\":\") > -1){\n nsPrefix = fullTypeName.substring(0,fullTypeName.indexOf(\":\"));\n }\n nsPrefix = nsPrefix==null?\"\":nsPrefix;\n\n java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(\":\")+1);\n \n if (!\"getRoadwayPageResponse\".equals(type)){\n //find namespace for the prefix\n java.lang.String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix);\n return (GetRoadwayPageResponse)ExtensionMapper.getTypeObject(\n nsUri,type,reader);\n }\n \n\n }\n \n\n }\n\n \n\n \n // Note all attributes that were handled. Used to differ normal attributes\n // from anyAttributes.\n java.util.Vector handledAttributes = new java.util.Vector();\n \n\n \n \n reader.next();\n \n \n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\n \n if (reader.isStartElement() && new javax.xml.namespace.QName(\"http://impl.thirdsdk.api.pms.cms.hikvision.com\",\"return\").equals(reader.getName())){\n \n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"nil\");\n if (\"true\".equals(nillableValue) || \"1\".equals(nillableValue)){\n object.set_return(null);\n reader.next();\n \n reader.next();\n \n }else{\n \n object.set_return(WsPmsResult.Factory.parse(reader));\n \n reader.next();\n }\n } // End of if for expected property start element\n \n else {\n \n }\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n \n if (reader.isStartElement())\n // A start element we are not expecting indicates a trailing invalid property\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getLocalName());\n \n\n\n\n } catch (javax.xml.stream.XMLStreamException e) {\n throw new java.lang.Exception(e);\n }\n\n return object;\n }", "com.google.search.now.wire.feed.ResponseProto.Response getInitialResponse();", "private int getHitsAndArticlesByURL(Category node, String url)\r\n\t{\r\n\t\tDocumentBuilderFactory domfac = DocumentBuilderFactory.newInstance();\r\n\t\tint NumRes = 0;\r\n\t\tString totalHits;\r\n\t\ttry{\r\n\t\t\tURL queryurl = new URL(url);\r\n\t\t\tURLConnection connection = queryurl.openConnection();\r\n\t\t\tconnection.setDoInput(true);\r\n\t\t\tInputStream inStream = connection.getInputStream();\r\n\t\t\tDocumentBuilder dombuilder = domfac.newDocumentBuilder();\r\n\t\t\tDocument doc = dombuilder.parse(inStream);\r\n\t\t\tElement root = doc.getDocumentElement();\r\n\t\t\tNodeList resultset_web = root.getElementsByTagName(\"resultset_web\");\r\n\t\t\tNode resultset = resultset_web.item(0);\r\n\t\t\t\r\n\t\t\ttotalHits = resultset.getAttributes().getNamedItem(\"totalhits\").getNodeValue();\r\n\t\t\tNumRes = Integer.parseInt(totalHits);\r\n\t\t\t\r\n\t\t\tint count = 0;\r\n\t\t\tNodeList results = resultset.getChildNodes(); \r\n\t\t\tif(results != null)\r\n\t\t\t{\t\t\t\r\n\t\t\t\tfor(int i = 0 ; i < results.getLength(); i++){\r\n\t\t\t\t\tNode result = results.item(i);\t\t\t\t\t\t\t\t\r\n\t\t\t\t\tArticle newArticle = new Article();\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(result.getNodeType()==Node.ELEMENT_NODE){\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tfor(Node node1 = result.getFirstChild(); node1 != null; node1 = node1.getNextSibling()){\r\n\t\t\t\t\t\t\tif(node1.getNodeType()==Node.ELEMENT_NODE){\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tif(node1.getNodeName().equals(\"url\") && node1.getFirstChild() != null && count < 4){\r\n\t\t\t\t\t\t\t\t\tcount++;\r\n\t\t\t\t\t\t\t\t\tString pageUrl = node1.getFirstChild().getNodeValue();\r\n\t\t\t\t\t\t\t\t\tArticle article = new Article();\r\n\t\t\t\t\t\t\t\t\tarticle.URL = pageUrl;\r\n\t\t\t\t\t\t\t\t\tarticle.words = getWordsLynx.runLynx(pageUrl);\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\tnode.articles.add(article);\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\t\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}catch(ParserConfigurationException e){\r\n\t\t\te.printStackTrace();\r\n\t\t\treturn -1;\r\n\t\t}catch(SAXException e){\r\n\t\t\te.printStackTrace();\r\n\t\t\treturn -1;\r\n\t\t}catch(IOException e){\r\n\t\t\te.printStackTrace();\r\n\t\t\treturn -1;\r\n\t\t}\r\n\r\n\t\treturn NumRes;\r\n\t}", "public void parsePage() {\n seen = true;\n int first = id.indexOf('_', 0);\n int second = id.indexOf('_', first + 1);\n String firstDir = \"result_\" + id.substring(0, first);\n String secondDir = id.substring(0, second);\n String fileName = id + \".page\";\n String wholePath = pagePath + firstDir + File.separator + secondDir\n + File.separator + fileName;\n try {\n BufferedReader reader = new BufferedReader(new FileReader(wholePath));\n String line = null;\n while((line = reader.readLine()) != null) {\n if (line.equals(\"#ThisURL#\")) {\n url = reader.readLine();\n }\n// else if (line.equals(\"#Length#\")) {\n// length = Integer.parseInt(reader.readLine());\n// }\n else if (line.equals(\"#Title#\")) {\n title = reader.readLine();\n }\n else if (line.equals(\"#Content#\")) {\n content = reader.readLine();\n lowerContent = content.toLowerCase();\n break;\n }\n }\n reader.close();\n if (content == null) {\n return;\n }\n valid = true;\n } catch (IOException e) {\n// System.out.println(\"Parse page \" + id + \" not successful\");\n }\n }", "private void loadSearchResults(SearchRequest request) {\n showProgress(null, \"Loading search results...\");\n\n String authToken = ShPrefManager.with(getActivity()).getToken();\n RestClient.getAPI().search(authToken, request, new RestCallback<SearchResponse>() {\n @Override\n public void failure(RestError restError) {\n hideProgress();\n OpenHomeUtils.showToast(getActivity().getApplicationContext(), restError.getErrorMessage(), Toast.LENGTH_LONG);\n }\n\n @Override\n public void success(SearchResponse searchResponse, Response response) {\n hideProgress();\n if (searchResponse.getMessage().size() > 0) {\n propertyList = searchResponse.getMessage();\n String userId = ShPrefManager.with(getActivity()).getUserId();\n searchAdapter = new SearchAdapter(getActivity(), propertyList, userId, 'S');\n mRecyclerView.setAdapter(searchAdapter);\n currentAdapter = \"S\";\n //displayingNowTextView.setText(\"Searching \\\"\" + searchText + \"\\\"\");\n searchBack.setVisibility(View.VISIBLE);\n InputMethodManager imm = (InputMethodManager) getActivity().getSystemService(Context.INPUT_METHOD_SERVICE);\n imm.hideSoftInputFromWindow(getActivity().getWindow().getCurrentFocus().getWindowToken(), 0);\n locationLayout.setVisibility(View.VISIBLE);\n refineLayout.setVisibility(View.GONE);\n } else {\n String message = \"No results to display. Please modify the search criteria and try again.\";\n CustomDialogFragment regSuccessDialogFragment = CustomDialogFragment.newInstance(R.string.try_again,\n message, ApplicationConstants.BUTTON_OK, 0);\n regSuccessDialogFragment.show(getActivity().getFragmentManager(), \"SearchResultsFragment\");\n }\n }\n });\n }", "@Test\n public void testCombinePageRankTfIdf() {\n\n Iterator<Pair<Document, Double>> resultIterator = icsSearchEngine.searchQuery(\n Arrays.asList(\"ISG\", \"Bren\", \"School\", \"UCI\"),\n 100, 100.0);\n ImmutableList<Pair<Document, Double>> resultList = ImmutableList.copyOf(resultIterator);\n\n // first result should be \"isg.ics.uci.edu\"\n Assert.assertEquals(\"isg.ics.uci.edu\", getDocumentUrl(resultList.get(0).getLeft().getText()));\n\n // top 10 should have URLs starting \"hobbes.ics.uci.edu\"\n Assert.assertTrue(resultList.stream().limit(10).map(p -> getDocumentUrl(p.getLeft().getText()))\n .anyMatch(p -> p.contains(\"hobbes.ics.uci.edu\")));\n\n // top 50 should have URL \"ipubmed2.ics.uci.edu\"\n Assert.assertTrue(resultList.stream().limit(50).map(p -> getDocumentUrl(p.getLeft().getText()))\n .anyMatch(p -> p.equals(\"ipubmed2.ics.uci.edu\")));\n\n }", "WebCrawlerData retrieve(String url);", "public static void main(String[] args) throws IOException{\n \n List<List<String>> results;\n String query = \"ADD QUERY OR CATEGORY FOR SEARCH\";\n \n //ADD USER ID WHO SEARCHES\n Long userId = 1;\n PersonalizedSearch searchObj = new PersonalizedSearch();\n \n final CredentialsProvider credsProvider = new BasicCredentialsProvider();\n credsProvider.setCredentials(AuthScope.ANY, new UsernamePasswordCredentials(\"elastic\",\"elastic\"));\n \n \n RestHighLevelClient client = new RestHighLevelClient(\n RestClient.builder(\n new HttpHost(\"localhost\",9200),\n new HttpHost(\"localhost\",9201))\n .setHttpClientConfigCallback(new RestClientBuilder.HttpClientConfigCallback() {\n @Override\n public HttpAsyncClientBuilder customizeHttpClient(HttpAsyncClientBuilder hacb) {\n return hacb.setDefaultCredentialsProvider(credsProvider);\n }\n }));\n \n /**\n * ---------COMMENT OUT ONE OF THE FOLLOWING TO DO A PERSONALIZED SEARCH FOR A SIGNED IN OR/AND AN ANONYMOUS USER--------\n */\n\n System.out.println(\"Starting collecting queryless/queryfull submissions...\");\n System.out.println(\"\");\n// searchObj.performQuerylessSearchWithPersonalization(client);\n// searchObj.performQueryfullSearchWithPersonalization(client);\n// results = searchObj.performPharm24PersonalizedQueryfullSearch(client, userId, query);\n// results = searchObj.performPharm24PersonalizedQuerylessSearch(client, userId, query);\n \n for(int i=0; i<results.size(); i++){\n for(int j = 0; j<results.get(i).size();j++){\n System.out.println(results.get(i).get(j));\n }\n System.out.println(\"-------RERANKED---------\");\n }\n\n System.out.println(\"\");\n System.out.println(\"I\\'m done!\");\n \n \n }", "public DocFile[] searchResponse(ScoreDoc[] results, Query query) {\n\n DocFile[] result = new DocFile[results.length];\n FastVectorHighlighter highlighter = new FastVectorHighlighter(true,true);\n FieldQuery highlightQuery = highlighter.getFieldQuery(query); \n\n try {\n IndexReader reader = DirectoryReader.open(indexDir);\n IndexSearcher searcher = new IndexSearcher(reader);\n\n for (int i = 0; i < results.length; i++) {\n int docId = results[i].doc;\n Document document = searcher.doc(docId);\n \n //Highlight the best Content context from each Doc\n String contextString = highlighter.getBestFragment(highlightQuery, \n searcher.getIndexReader(), results[i].doc,Constants.INDEX_KEY_CONTENT,140);\n \n DocFile toAdd = new DocFile(\n document.get(Constants.INDEX_KEY_FILENAME),\n document.get(Constants.INDEX_KEY_TITLE),\n document.get(Constants.INDEX_KEY_OWNER),\n document.get(Constants.INDEX_KEY_PATH),\n document.get(Constants.INDEX_KEY_STATUS).equalsIgnoreCase(\"true\"));\n \n if (contextString != null) {\n toAdd.setContextString(contextString);\n }\n \n toAdd.setId(document.get(Constants.INDEX_KEY_ID));\n toAdd.setPermissions(Integer.parseInt(document.get(Constants.INDEX_KEY_PERMISSION)));\n toAdd.setCourseCode(document.get(Constants.INDEX_KEY_COURSE));\n result[i] = toAdd;\n\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n return result;\n }", "public static GetDictionaryPageResponse parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{\n GetDictionaryPageResponse object =\n new GetDictionaryPageResponse();\n\n int event;\n java.lang.String nillableValue = null;\n java.lang.String prefix =\"\";\n java.lang.String namespaceuri =\"\";\n try {\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n\n \n if (reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"type\")!=null){\n java.lang.String fullTypeName = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\n \"type\");\n if (fullTypeName!=null){\n java.lang.String nsPrefix = null;\n if (fullTypeName.indexOf(\":\") > -1){\n nsPrefix = fullTypeName.substring(0,fullTypeName.indexOf(\":\"));\n }\n nsPrefix = nsPrefix==null?\"\":nsPrefix;\n\n java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(\":\")+1);\n \n if (!\"getDictionaryPageResponse\".equals(type)){\n //find namespace for the prefix\n java.lang.String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix);\n return (GetDictionaryPageResponse)ExtensionMapper.getTypeObject(\n nsUri,type,reader);\n }\n \n\n }\n \n\n }\n\n \n\n \n // Note all attributes that were handled. Used to differ normal attributes\n // from anyAttributes.\n java.util.Vector handledAttributes = new java.util.Vector();\n \n\n \n \n reader.next();\n \n \n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\n \n if (reader.isStartElement() && new javax.xml.namespace.QName(\"http://impl.thirdsdk.api.pms.cms.hikvision.com\",\"return\").equals(reader.getName())){\n \n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"nil\");\n if (\"true\".equals(nillableValue) || \"1\".equals(nillableValue)){\n object.set_return(null);\n reader.next();\n \n reader.next();\n \n }else{\n \n object.set_return(WsPmsResult.Factory.parse(reader));\n \n reader.next();\n }\n } // End of if for expected property start element\n \n else {\n \n }\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n \n if (reader.isStartElement())\n // A start element we are not expecting indicates a trailing invalid property\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getLocalName());\n \n\n\n\n } catch (javax.xml.stream.XMLStreamException e) {\n throw new java.lang.Exception(e);\n }\n\n return object;\n }", "@Test\n public void getResultTest() throws IOException {\n System.setProperty(\"REPO_HG_19_PATH\", REPO_PATH_RANGES);\n System.setProperty(\"REPO_HG_38_PATH\", REPO_PATH_RANGES);\n System.setProperty(\"MAX_RANGE_RECORDS_IN_RESULT\", \"10\");\n\n // test common valid flow\n Response response = new Main().getResult19(\"X:77633124\");\n Assert.assertEquals(OK.getStatusCode(), response.getStatus());\n System.out.println(response.getEntity());\n Assert.assertNotNull(response.getEntity());\n JsonNode result = ((ArrayNode) new ObjectMapper().readTree((String)response.getEntity()).get(\"entries\")).get(0);\n Assert.assertEquals(\"G\", result.get(\"ref\").asText());\n Assert.assertEquals(\"A\", result.get(\"alt\").asText());\n ArrayNode homArray = (ArrayNode) result.get(\"hom\");\n Assert.assertEquals(1, homArray.size());\n Assert.assertEquals(\"SRR14860530\", homArray.get(0).asText());\n ArrayNode hetArray = (ArrayNode) result.get(\"het\");\n Assert.assertEquals(1, hetArray.size());\n Assert.assertEquals(\"SRR14860527\", hetArray.get(0).asText());\n\n // test lower case\n response = new Main().getResult(\"x:77633124\", REPO_PATH_RANGES, 10);\n Assert.assertEquals(OK.getStatusCode(), response.getStatus());\n System.out.println(response.getEntity());\n Assert.assertNotNull(response.getEntity());\n result = ((ArrayNode) new ObjectMapper().readTree((String)response.getEntity()).get(\"entries\")).get(0);\n Assert.assertEquals(\"G\", result.get(\"ref\").asText());\n Assert.assertEquals(\"A\", result.get(\"alt\").asText());\n homArray = (ArrayNode) result.get(\"hom\");\n Assert.assertEquals(1, homArray.size());\n Assert.assertEquals(\"SRR14860530\", homArray.get(0).asText());\n hetArray = (ArrayNode) result.get(\"het\");\n Assert.assertEquals(1, hetArray.size());\n Assert.assertEquals(\"SRR14860527\", hetArray.get(0).asText());\n\n //test range query\n response = new Main().getResult(\"2:25234482-26501857\", REPO_PATH_RANGES, 10);\n Assert.assertEquals(OK.getStatusCode(), response.getStatus());\n System.out.println(response.getEntity());\n\n JsonNode jsonResult = new ObjectMapper().readTree((String)response.getEntity());\n Assert.assertEquals(11, jsonResult.get(\"count\").asInt());\n\n ArrayNode dataArray = (ArrayNode)jsonResult.get(\"data\");\n Assert.assertEquals(10, dataArray.size());\n\n JsonNode first = dataArray.get(0);\n Assert.assertEquals(25234482, first.get(\"pos\").asInt());\n Assert.assertEquals(\"C\", ((ArrayNode)first.get(\"entries\")).get(0).get(\"ref\").asText());\n Assert.assertEquals(\"T\", ((ArrayNode)first.get(\"entries\")).get(0).get(\"alt\").asText());\n\n JsonNode last = dataArray.get(9);\n Assert.assertEquals(25313958, last.get(\"pos\").asInt());\n Assert.assertEquals(\"G\", ((ArrayNode)last.get(\"entries\")).get(0).get(\"ref\").asText());\n Assert.assertEquals(\"A\", ((ArrayNode)last.get(\"entries\")).get(0).get(\"alt\").asText());\n\n // test empty case\n response = new Main().getResult(\"x:15000112\", REPO_PATH_RANGES, 10);\n Assert.assertEquals(OK.getStatusCode(), response.getStatus());\n System.out.println(response.getEntity());\n Assert.assertNotNull(response.getEntity());\n Assert.assertEquals(EMPTY_RESULT, response.getEntity());\n\n // test bad input 1\n response = new Main().getResult(\"adkwjfh\", REPO_PATH_RANGES, 10);\n Assert.assertEquals(BAD_REQUEST.getStatusCode(), response.getStatus());\n\n // test bad input 2\n response = new Main().getResult(\"s:sss\", REPO_PATH_RANGES, 10);\n Assert.assertEquals(BAD_REQUEST.getStatusCode(), response.getStatus());\n\n // test bad input 3\n response = new Main().getResult(\"s:12345\", REPO_PATH_RANGES, 10);\n Assert.assertEquals(BAD_REQUEST.getStatusCode(), response.getStatus());\n\n // test bad input 4\n response = new Main().getResult(\"x:500000000\", REPO_PATH_RANGES, 10);\n Assert.assertEquals(BAD_REQUEST.getStatusCode(), response.getStatus());\n }", "protected abstract List<List<SearchResults>> processStream();", "@Override\n protected String doInBackground(String... strings) {\n String ret = null;\n String queryURL = \"http://www.songsterr.com/a/ra/songs.json?pattern=\"+searchText;\n SongsterrObject tempObj;\n int progress = 0;\n\n try {\n publishProgress(progress);\n\n URL url = new URL(queryURL);\n HttpURLConnection urlConnection = (HttpURLConnection) url.openConnection();\n InputStream inStream = urlConnection.getInputStream();\n\n BufferedReader reader = new BufferedReader(new InputStreamReader(inStream, \"UTF-8\"), 8);\n StringBuilder sb = new StringBuilder();\n\n String line = null;\n while ((line = reader.readLine()) != null)\n {\n sb.append(line).append(\"\\n\");\n }\n String result = sb.toString();\n\n progress+=50;\n publishProgress(progress);\n\n JSONArray songsterArray = new JSONArray(result);\n for(int i = 0; i < songsterArray.length(); i++){\n progress+=5;\n publishProgress(progress);\n JSONObject songsterObj = songsterArray.getJSONObject(i);\n\n songName = songsterObj.getString(\"title\");\n songId = songsterObj.getString(\"id\");\n\n String artist = songsterObj.getString(\"artist\");\n JSONObject artistObj = new JSONObject(artist);\n artistID = artistObj.getString(\"id\");\n\n Boolean isUseThePrefix = artistObj.getBoolean(\"useThePrefix\");\n\n if(isUseThePrefix){\n artistName = artistObj.getString(\"name\");\n }else{\n artistName = artistObj.getString(\"nameWithoutThePrefix\");\n }\n\n tempObj = new SongsterrObject(songName, songId, artistName, artistID);\n search.add(tempObj);\n }\n publishProgress(100);\n }\n catch(MalformedURLException mfe){ ret = \"Malformed URL exception\"; }\n catch(IOException ioe) { ret = \"IO Exception. Is the Wifi connected?\";}\n catch(JSONException e) { ret = \"Broken JSON\";\n Log.e(\"Broken Json\", e.getMessage()); }\n\n return ret;\n }", "private void initData() {\r\n allElements = new Vector<PageElement>();\r\n\r\n String className = Utility.getDisplayName(queryResult.getOutputEntity());\r\n List<AttributeInterface> attributes = Utility.getAttributeList(queryResult);\r\n int attributeSize = attributes.size();\r\n //int attributeLimitInDescStr = (attributeSize < 10) ? attributeSize : 10;\r\n\r\n Map<String, List<IRecord>> allRecords = queryResult.getRecords();\r\n serviceURLComboContents.add(\" All service URLs \");\r\n for (String url : allRecords.keySet()) {\r\n\r\n List<IRecord> recordList = allRecords.get(url);\r\n \r\n StringBuilder urlNameSize = new StringBuilder( url );\r\n urlNameSize = new StringBuilder( urlNameSize.substring(urlNameSize.indexOf(\"//\")+2));\r\n urlNameSize = new StringBuilder(urlNameSize.substring(0,urlNameSize.indexOf(\"/\")));\r\n urlNameSize.append(\" ( \" + recordList.size() + \" )\");\r\n serviceURLComboContents.add(urlNameSize.toString());\r\n Vector<PageElement> elements = new Vector<PageElement>();\r\n for (IRecord record : recordList) {\r\n StringBuffer descBuffer = new StringBuffer();\r\n for (int i = 0; i < attributeSize; i++) {\r\n Object value = record.getValueForAttribute(attributes.get(i));\r\n if (value != null) {\r\n if (i != 0) {\r\n descBuffer.append(',');\r\n }\r\n descBuffer.append(value);\r\n }\r\n }\r\n String description = descBuffer.toString();\r\n // if (description.length() > 150) {\r\n // //150 is allowable chars at 1024 resolution\r\n // description = description.substring(0, 150);\r\n // //To avoid clipping of attribute value in-between\r\n // int index = description.lastIndexOf(\",\");\r\n // description = description.substring(0, index);\r\n // }\r\n PageElement element = new PageElementImpl();\r\n element.setDisplayName(className + \"_\" + record.getRecordId().getId());\r\n element.setDescription(description);\r\n\r\n DataRow dataRow = new DataRow(record, queryResult.getOutputEntity());\r\n dataRow.setParent(parentDataRow);\r\n dataRow.setAssociation(queryAssociation);\r\n\r\n Vector recordListUserObject = new Vector();\r\n recordListUserObject.add(dataRow);\r\n recordListUserObject.add(record);\r\n\r\n element.setUserObject(recordListUserObject);\r\n\r\n allElements.add(element);\r\n elements.add(element);\r\n }\r\n URLSToResultRowMap.put(urlNameSize.toString(), elements);\r\n }\r\n }", "public void crawlAndIndex(String url) throws Exception {\r\n\t\t// TODO : Add code here\r\n\t\tQueue<String> queue=new LinkedList<>();\r\n\t\tqueue.add(url);\r\n\t\twhile (!queue.isEmpty()){\r\n\t\t\tString currentUrl=queue.poll();\r\n\t\t\tif(internet.getVisited(currentUrl)){\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\tArrayList<String> urls = parser.getLinks(currentUrl);\r\n\t\t\tArrayList<String> contents = parser.getContent(currentUrl);\r\n\t\t\tupdateWordIndex(contents,currentUrl);\r\n\t\t\tinternet.addVertex(currentUrl);\r\n\t\t\tinternet.setVisited(currentUrl,true);\r\n\t\t\tfor(String u:urls){\r\n\t\t\t\tinternet.addVertex(u);\r\n\t\t\t\tinternet.addEdge(currentUrl,u);\r\n\t\t\t\tqueue.add(u);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}", "@Override\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n try {\n DigitalDAO digitalDAO = new DigitalDAOImpl();\n //get the top of the latest digitals\n List<Digital> top6RecentDigitals = digitalDAO.getTopDigital(6);\n\n //begin of get txtSearch and pageRow\n String txtSearch = request.getParameter(\"txtSearch\").trim();\n String indexPageFromRequest = request.getParameter(\"txtPage\");\n request.setAttribute(\"textSearch\", txtSearch);\n indexPageFromRequest = (indexPageFromRequest == null)\n ? \"1\" : indexPageFromRequest;\n int pageIndex = 0;\n //case control when index page is not numeric\n try {\n pageIndex = Integer.parseInt(indexPageFromRequest);\n } catch (Exception e) {\n pageIndex = -1;\n }\n //end of get txtSearch and pageRow\n\n //number of digital on a page\n int pageSize = 3;\n //number of result search\n int numberOfSearchResult = digitalDAO.getNumberOfSearchResult(txtSearch);\n //maximum of page index\n int maxPage = numberOfSearchResult / pageSize\n + (numberOfSearchResult % pageSize > 0 ? 1 : 0);\n //page index existed then get corresponding degital else return massage\n if (pageIndex <= maxPage && pageIndex != -1) {\n List<Digital> listResultSearch = digitalDAO.\n searchByTitleAndPagging(pageIndex, pageSize, txtSearch);\n for (Digital digital : listResultSearch) {\n String title = digital.getTitle().toUpperCase();\n String titleRoot = digital.getTitle();\n String result = digital.getTitle();\n List<String> listTxtSearch = new ArrayList<>();\n while (title.contains(txtSearch.toUpperCase())) {\n int indexStart = title.indexOf(txtSearch.toUpperCase());\n int indexEnd = indexStart + txtSearch.length();\n String convertText = titleRoot.substring(indexStart, indexEnd);\n if(!listTxtSearch.contains(convertText)){\n listTxtSearch.add(convertText);\n }\n title = title.substring(indexEnd);\n titleRoot = titleRoot.substring(indexEnd);\n }\n for (String string : listTxtSearch) {\n result = result.replaceAll(string, \"<span class='highlightText'>\" + string + \"</span>\");\n }\n\n digital.setTitle(result);\n }\n request.setAttribute(\"listResultSearch\", listResultSearch);\n request.setAttribute(\"maxPage\", maxPage);\n } else {\n request.setAttribute(\"message\", \"This page not found\");\n }\n\n request.setAttribute(\"pageIndex\", pageIndex);\n request.setAttribute(\"shortDes\", top6RecentDigitals.get(0)\n .getShortDes());\n //store text search\n request.setAttribute(\"txtSearch\", txtSearch);\n //get the most recent digital\n request.setAttribute(\"mostRecentNew\", top6RecentDigitals.get(0));\n //store number of results search\n request.setAttribute(\"numberOfResult\", numberOfSearchResult);\n //get top5 next news have time post is most recent\n top6RecentDigitals.remove(0);\n request.setAttribute(\"top5MostRecentNew\", top6RecentDigitals);\n //send data for search page\n request.getRequestDispatcher(\"SearchResultPage.jsp\").forward(request, response);\n\n } catch (Exception ex) {\n request.setAttribute(\"exceptionMessage\", \"An error occurred while searching \");\n request.getRequestDispatcher(\"Error.jsp\").forward(request, response);\n }\n }", "@Test\n public void test002() {\n int total = response.extract().path(\"total\");\n\n\n System.out.println(\"------------------StartingTest---------------------------\");\n System.out.println(\"The search query is: \" + total);\n System.out.println(\"------------------End of Test---------------------------\");\n\n }", "@Override\n public void onResponse(String response) {\n Gson gson = new Gson();\n\n try {\n JSONObject jsonObject = new JSONObject(response);\n String result = jsonObject.getJSONArray(\"results\").toString();\n\n Type listType = new TypeToken<List<Pokemon>>() {\n }.getType(); //Setting up the type for the conversion\n\n pokemonList = gson.fromJson(result, listType);\n pokemonList = pokemonList.subList(0, POKEDEX_LENGTH);\n\n for (int i = 0; i < pokemonList.size(); i++) {\n pokemonList.get(i).setIdFromUrl();\n }\n\n getPokemonListWithTypes();\n } catch (JSONException exception) {\n exception.printStackTrace();\n }\n }", "public interface SearchResult\n{\n /**\n * Title of search result item.\n * \n * @return String title\n */\n String getTitle();\n /**\n * Name of search result item.\n * \n * @return String title\n */\n String getName();\n /**\n * Select the link of the search result item.\n * \n * @return true if link found and selected\n */\n HtmlPage clickLink();\n /**\n * Verify if folder or not, true if search row represent\n * a folder.\n * \n * @return boolean true if search result is of folder\n */\n boolean isFolder();\n \n /**\n * Date of search result item.\n * \n * @return String Date\n */\n \n String getDate();\n \n /**\n * Site of search result item.\n * \n * @return String Site\n */\n \n String getSite();\n \n /**\n * Select the site link of the search result item.\n * \n * @return true if link found and selected\n */\n HtmlPage clickSiteLink();\n \n /**\n * Select the Date link of the search result item.\n * \n * @return true if link found and selected\n */\n \n\t HtmlPage clickDateLink();\n\t \n\t /**\n * Actions of search result item.\n * \n * @return enum ActionSet\n */\n\t ActionsSet getActions();\n\n /**\n * Method to click on content path in the details section\n *\n * @return SharePage\n */\n public HtmlPage clickContentPath();\n\n /**\n * Method to get thumbnail url\n *\n * @return String\n */\n public String getThumbnailUrl();\n\n /**\n * Method to get preview url\n *\n * @return String\n */\n public String getPreViewUrl();\n\n /**\n * Method to get thumbnail of element\n *\n * @return String\n */\n public String getThumbnail();\n\n /**\n * Method to click on Download icon for the element\n */\n public void clickOnDownloadIcon();\n\n /**\n * Select the site link of the search result item.\n *\n * @return true if link found and selected\n */\n HtmlPage clickSiteName();\n\t \n\t/**\n * Select the Image link of the search result item.\n * \n * @return PreViewPopUpPage if link found and selected\n */\n\tPreViewPopUpPage clickImageLink();\n\n\tHtmlPage selectItemCheckBox();\n\n\tboolean isItemCheckBoxSelected();\n\t\n}", "@Override\n public void onResponse(Call call, Response response) throws IOException {\n String html = null;\n try {\n JSONObject jsonObject = new JSONObject(response.body().string()).getJSONObject(\"data\");\n// Log.d(TAG, \"onResponse: \" + jsonObject);\n// OneData.contentData = new Gson().fromJson(jsonObject.toString(), OneContentData.class);\n html = jsonObject.getString(\"html_content\");\n // Todo: Jsoup解析一下\n Log.d(TAG, \"onResponse: \" + html.substring(html.indexOf(\"body\", 0), html.length()));\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }", "private RequestResponse handleIndexRequest(Request request, Response response) throws ServiceException {\n response.type(\"application/json\");\n\n String core = request.params(\":core\");\n if (StringUtils.isEmpty(core)) {\n throw new ServiceException(\"Failed to provide an index core for the document\");\n }\n\n ContentDocument contentDocument = new RequestToContentDocument().convert(request);\n return this.searchService.index(core, contentDocument);\n }", "private JsonObject search(JsonObject request) {\n\t\t\tJsonObject result = new JsonObject();\n\t\t\tJsonArray artists = new JsonArray();\n\t\t\tJsonArray titles = new JsonArray();\n\t\t\tJsonArray tags = new JsonArray();\n\t\t\tJsonArray arSimilars = new JsonArray();\n\t\t\tJsonArray tiSimilars = new JsonArray();\n\t\t\tJsonArray taSimilars = new JsonArray();\n\t\t\t//Individually search by artist, by title and by tag. \n\t\t\tartists = request.getAsJsonArray(\"searchByArtist\");\n\t\t\ttitles = request.getAsJsonArray(\"searchByTitle\");\n\t\t\ttags = request.getAsJsonArray(\"searchByTag\");\n\t\t\t//If the request contains \"artist\", we search each artist's similar song, and add it to a JsonArray.\n\t\t\tif(artists != null && artists.size() >= 1) {\n\t\t\t\tfor(JsonElement artist: artists) {\n\t\t\t\t\tarSimilars.add(this.sl.searchByArtist(artist.getAsString()));\t\n\t\t\t\t}\n\t\t\t\t//We add the JsonArray to result, associated with \"searchByArtist\".\n\t\t\t\tresult.add(\"searchByArtist\", arSimilars);\n\t\t\t}\n\t\t\t//If the request contains \"tag\", we search each tag's similar song, and add it to a JsonArray.\n\t\t\tif(tags != null && tags.size() >= 1) {\n\t\t\t\tfor(JsonElement tag: tags) {\t\t\t\t\n\t\t\t\t\ttaSimilars.add(this.sl.searchByTag(tag.getAsString()));\t\t\t\t\n\t\t\t\t}\n\t\t\t\t//We add the JsonArray to result, associated with \"searchByTag\".\n\t\t\t\tresult.add(\"searchByTag\", taSimilars);\n\t\t\t}\t\t\n\t\t\t//If the request contains title, we search each title's similar song, and add it to a JsonArray\n\t\t\tif(titles != null && titles.size() >= 1) {\t\t\t\n\t\t\t\tfor(JsonElement title: titles) {\n\t\t\t\t\ttiSimilars.add(this.sl.searchByTitle(title.getAsString()));\n\t\t\t\t}\n\t\t\t\t//We add the JsonArray to result, associated with \"searchByTiltle\".\n\t\t\t\tresult.add(\"searchByTitle\", tiSimilars);\n\t\t\t}\n\t\t\treturn result;\n\t\t}", "private ArrayList<TweetData> query(QueryTargetInfo info) {\n String url;\n ArrayList<TweetData> tweets = new ArrayList<TweetData>();\n InputStream is = null;\n\n // lastSeenId should have been set earlier.\n // However, if it is still null, just use \"0\".\n if (info.lastSeenId == null) {\n url = String.format(\"%s?q=%s&count=%d&result_type=recent&since_id=0\",\n URL_BASE, info.query, RPP);\n } else if (info.smallestId == null) {\n url = String.format(\"%s?q=%s&count=%d&result_type=recent&since_id=%s\",\n URL_BASE, info.query, RPP, info.lastSeenId);\n } else {\n url = String.format(\"%s?q=%s&count=%d&result_type=recent&since_id=%s&max_id=%s\",\n URL_BASE, info.query, RPP, info.lastSeenId, info.smallestId);\n }\n\n try {\n do {\n URL searchURL = new URL(url);\n HttpsURLConnection searchConnection = (HttpsURLConnection)searchURL.openConnection();\n\n searchConnection.setRequestProperty(\"Host\", \"api.twitter.com\");\n searchConnection.setRequestProperty(\"User-Agent\", \"BirdCatcher\");\n searchConnection.setRequestProperty(\"Authorization\", \"Bearer \" + kBearerToken);\n\n is = searchConnection.getInputStream();\n\n JSONTokener jsonTokener = new JSONTokener(is);\n\n JSONObject json = new JSONObject(jsonTokener);\n\n is.close();\n\n url = getNextLink(json, url, info);\n\n tweets.addAll(getTweets(json, info));\n\n Thread.sleep(1000);\n\n is = null;\n } while (url != null);\n } catch (Exception e) {\n Logger.logError(\"Error performing query\", e);\n\n if (is != null) {\n try {\n java.io.BufferedReader in =\n new java.io.BufferedReader(new java.io.InputStreamReader(is));\n\n String response = \"Response from Twitter:\\n\";\n String temp;\n\n while ((temp = in.readLine()) != null) {\n response += (temp + \"\\n\");\n }\n\n Logger.logDebug(response);\n\n response = null;\n temp = null;\n } catch (Exception ex) {\n }\n }\n\n return tweets;\n }\n\n return tweets;\n }", "private void parseResponse(String body) {\n Gson gson = new Gson();\n try {\n FactDataList factDataList = gson.fromJson(body, FactDataList.class);\n if (!factDataList.title.isEmpty() || (factDataList.factDataArrayList != null && factDataList.factDataArrayList.size() > 0)) {\n factDataView.UpdateListView(factDataList);\n } else {\n factDataView.displayMessage(context.getString(R.string.nodata), false);\n }\n } catch (Exception e) {\n e.printStackTrace();\n factDataView.displayMessage(context.getString(R.string.nodata), false);\n }\n }", "public Indexer crawl() \n\t{\n\t\t// This redirection may effect performance, but its OK !!\n\t\tSystem.out.println(\"Crawling: \"+u.toString());\n\t\treturn crawl(crawlLimitDefault);\n\t}", "public ArrayList<String> soupThatSite(String url) throws IOException {\n\n ArrayList<String> parsedDoc = new ArrayList<>();\n Document doc = Jsoup.connect(url).get();\n\n if (url.contains(\"cnn.com\")) {\n\n doc.select(\"h1\").stream().filter(Element::hasText).forEach(element1 -> {\n String str = element1.text();\n String clean = Jsoup.clean(str, Whitelist.basic());\n parsedDoc.add(clean);\n });\n\n doc.select(\".zn-body__paragraph\").stream().filter(Element::hasText).forEach(element1 -> {\n String str = element1.text();\n String clean = Jsoup.clean(str, Whitelist.basic());\n parsedDoc.add(clean);\n });\n\n } else {\n\n doc.select(\"h1\").stream().filter(Element::hasText).forEach(element1 -> {\n String str = element1.text();\n String clean = Jsoup.clean(str, Whitelist.basic());\n parsedDoc.add(clean);\n });\n\n doc.select(\"p\").stream().filter(Element::hasText).forEach(element -> {\n String str = element.text();\n String clean = Jsoup.clean(str, Whitelist.basic());\n parsedDoc.add(clean);\n });\n }\n\n return parsedDoc;\n }", "public static int doGetList(Result r) {\n // Make an HTTP GET passing the name on the URL line\n r.setValue(\"\");\n String response = \"\";\n HttpURLConnection conn;\n int status = 0;\n try {\n \n URL url = new URL(\"https://intense-lake-93564.herokuapp.com/menusection/\");\n conn = (HttpURLConnection) url.openConnection();\n conn.setRequestMethod(\"GET\");\n // tell the server what format we want back\n conn.setRequestProperty(\"Accept\", \"text/plain\");\n // wait for response\n status = conn.getResponseCode();\n // If things went poorly, don't try to read any response, just return.\n if (status != 200) {\n // not using msg\n String msg = conn.getResponseMessage();\n return conn.getResponseCode();\n }\n String output = \"\";\n // things went well so let's read the response\n BufferedReader br = new BufferedReader(new InputStreamReader(\n (conn.getInputStream()))); \n while ((output = br.readLine()) != null) {\n response += output; \n } \n conn.disconnect();\n \n }\n catch (MalformedURLException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n } \n // return value from server\n // set the response object\n r.setValue(response);\n // return HTTP status to caller\n return status;\n }", "public Crawler crawl() throws ParseException, IOException {\n\t\tlong start = System.currentTimeMillis();\n\n\t\tCrawler c = new Crawler(\"https://cs.purdue.edu\", 250);\n\t\tc.crawl();\n\n \tlong end = System.currentTimeMillis();\n \tSystem.out.println(\"Stats: \");\n \tSystem.out.println(\"Number of parsed pages: \" + c.getParsed().size());\n \tSystem.out.println(\"Number of words: \" + c.getWords().size());\n \t\n \tSystem.out.println(\"Total time: \" + (end - start) + \"ms.\");\n\n \treturn c;\n\t}", "protected com.android.volley.Response<T> parseNetworkResponse(com.android.volley.NetworkResponse r7) {\n /*\n r6 = this;\n r5 = 1;\n r0 = new java.lang.StringBuilder;\n r0.<init>();\n r1 = \"StatusCode=\";\n r0 = r0.append(r1);\n r1 = r7.statusCode;\n r0 = r0.append(r1);\n r0 = r0.toString();\n com.jd.fridge.util.k.a(r0);\n r0 = \"infoss\";\n r1 = new java.lang.StringBuilder;\n r1.<init>();\n r2 = \"code==\";\n r1 = r1.append(r2);\n r2 = r7.statusCode;\n r1 = r1.append(r2);\n r1 = r1.toString();\n com.jd.fridge.util.r.c(r0, r1);\n r2 = \"\";\n r0 = r7.statusCode;\n r1 = 200; // 0xc8 float:2.8E-43 double:9.9E-322;\n if (r0 != r1) goto L_0x013e;\n L_0x003b:\n r0 = org.greenrobot.eventbus.c.a();\n r1 = 3;\n r3 = 0;\n r1 = com.jd.fridge.bean.Event.newEvent(r1, r3);\n r0.c(r1);\n r1 = new java.lang.String;\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x00f0, Exception -> 0x0114 }\n r0 = r7.data;\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x00f0, Exception -> 0x0114 }\n r3 = r7.headers;\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x00f0, Exception -> 0x0114 }\n r3 = com.android.volley.toolbox.HttpHeaderParser.parseCharset(r3);\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x00f0, Exception -> 0x0114 }\n r1.<init>(r0, r3);\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x00f0, Exception -> 0x0114 }\n r0 = r6.m;\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x0187, Exception -> 0x0114 }\n if (r0 == 0) goto L_0x005e;\n L_0x0059:\n r0 = r6.m;\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x0187, Exception -> 0x0114 }\n r0.a(r1);\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x0187, Exception -> 0x0114 }\n L_0x005e:\n r0 = new java.lang.StringBuilder;\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x0187, Exception -> 0x0114 }\n r0.<init>();\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x0187, Exception -> 0x0114 }\n r2 = \"jsonStr===\";\n r0 = r0.append(r2);\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x0187, Exception -> 0x0114 }\n r0 = r0.append(r1);\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x0187, Exception -> 0x0114 }\n r0 = r0.toString();\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x0187, Exception -> 0x0114 }\n com.jd.fridge.util.k.a(r0);\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x0187, Exception -> 0x0114 }\n r0 = \"infoss\";\n r2 = new java.lang.StringBuilder;\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x0187, Exception -> 0x0114 }\n r2.<init>();\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x0187, Exception -> 0x0114 }\n r3 = \"jsonStr==\";\n r2 = r2.append(r3);\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x0187, Exception -> 0x0114 }\n r2 = r2.append(r1);\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x0187, Exception -> 0x0114 }\n r2 = r2.toString();\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x0187, Exception -> 0x0114 }\n com.jd.fridge.util.r.c(r0, r2);\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x0187, Exception -> 0x0114 }\n r0 = \"infoss\";\n r2 = new java.lang.StringBuilder;\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x0187, Exception -> 0x0114 }\n r2.<init>();\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x0187, Exception -> 0x0114 }\n r3 = \"gson==\";\n r2 = r2.append(r3);\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x0187, Exception -> 0x0114 }\n r3 = r6.d;\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x0187, Exception -> 0x0114 }\n r4 = r6.e;\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x0187, Exception -> 0x0114 }\n r3 = r3.fromJson(r1, r4);\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x0187, Exception -> 0x0114 }\n r2 = r2.append(r3);\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x0187, Exception -> 0x0114 }\n r2 = r2.toString();\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x0187, Exception -> 0x0114 }\n com.jd.fridge.util.r.c(r0, r2);\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x0187, Exception -> 0x0114 }\n r0 = r6.d;\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x0187, Exception -> 0x0114 }\n r2 = r6.e;\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x0187, Exception -> 0x0114 }\n r0 = r0.fromJson(r1, r2);\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x0187, Exception -> 0x0114 }\n r2 = com.android.volley.toolbox.HttpHeaderParser.parseCacheHeaders(r7);\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x0187, Exception -> 0x0114 }\n r0 = com.android.volley.Response.success(r0, r2);\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x0187, Exception -> 0x0114 }\n L_0x00bc:\n return r0;\n L_0x00bd:\n r0 = move-exception;\n r0.printStackTrace();\n r1 = r6.f;\n r1.a(r5);\n r1 = new com.jd.fridge.util.a.c;\n r1.<init>(r0);\n com.android.volley.Response.error(r1);\n r1 = \"infoss\";\n r2 = new java.lang.StringBuilder;\n r2.<init>();\n r3 = \"jsonStr=1111111=\";\n r2 = r2.append(r3);\n r0 = r2.append(r0);\n r0 = r0.toString();\n com.jd.fridge.util.r.c(r1, r0);\n L_0x00e6:\n r0 = new com.jd.fridge.util.a.c;\n r0.<init>(r7);\n r0 = com.android.volley.Response.error(r0);\n goto L_0x00bc;\n L_0x00f0:\n r0 = move-exception;\n r1 = r2;\n L_0x00f2:\n r2 = r6.c;\n if (r2 == 0) goto L_0x00fb;\n L_0x00f6:\n r2 = r6.c;\n r2.a(r1);\n L_0x00fb:\n r1 = \"infoss\";\n r2 = new java.lang.StringBuilder;\n r2.<init>();\n r3 = \"JsonSyntaxException=222=\";\n r2 = r2.append(r3);\n r0 = r2.append(r0);\n r0 = r0.toString();\n com.jd.fridge.util.r.c(r1, r0);\n goto L_0x00e6;\n L_0x0114:\n r0 = move-exception;\n r0.printStackTrace();\n r1 = r6.f;\n r1.a(r5);\n r1 = new com.jd.fridge.util.a.c;\n r1.<init>(r0);\n com.android.volley.Response.error(r1);\n r1 = \"infoss\";\n r2 = new java.lang.StringBuilder;\n r2.<init>();\n r3 = \"jsonStr=333=\";\n r2 = r2.append(r3);\n r0 = r2.append(r0);\n r0 = r0.toString();\n com.jd.fridge.util.r.c(r1, r0);\n goto L_0x00e6;\n L_0x013e:\n r0 = \"infos\";\n r1 = new java.lang.StringBuilder;\n r1.<init>();\n r2 = \"response fail: \";\n r1 = r1.append(r2);\n r2 = r7.data;\n r2 = r2.toString();\n r1 = r1.append(r2);\n r1 = r1.toString();\n com.jd.fridge.util.r.c(r0, r1);\n r0 = new java.lang.StringBuilder;\n r0.<init>();\n r1 = \"result=\";\n r0 = r0.append(r1);\n r1 = r7.data;\n r1 = r1.toString();\n r0 = r0.append(r1);\n r0 = r0.toString();\n com.jd.fridge.util.k.a(r0);\n r0 = r6.f;\n r0.a(r5);\n r0 = new com.jd.fridge.util.a.c;\n r0.<init>(r7);\n com.android.volley.Response.error(r0);\n goto L_0x00e6;\n L_0x0187:\n r0 = move-exception;\n goto L_0x00f2;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.jd.fridge.util.a.d.parseNetworkResponse(com.android.volley.NetworkResponse):com.android.volley.Response<T>\");\n }", "private static void responseHandler(StringBuilder sb)\n\t{\n\t\tString s = sb.toString();\t\t\n\t\tString[] lines = s.split(\"\\n\");\t\t\n\t\tString firstLine = \"\";\n\t\t\n\t\t// Only search through the first five lines. If it isn't \n\t\t// in the first five lines it probably isn't there.\n\t\tfor(int i = 0; i < 5; i++)\n\t\t{\n\t\t\tif(lines[i].contains(\"HTTP/1\"))\n\t\t\t{\n\t\t\t\tfirstLine = lines[i];\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Error and quit if it is still empty.\n\t\tif(firstLine.equals(\"\"))\n\t\t{\n\t\t\terrorQuit(\"Whoops something went wrong.\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif(firstLine.contains(\"200\"))\n\t\t\t{\n\t\t\t\tSystem.out.print(s);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tSystem.out.println(firstLine);\n\t\t\t}\n\t\t}\n\t}", "private void searchResult(HttpServletRequest request,\n\t\t\tHttpServletResponse response) throws ServletException, IOException {\n\t\ttry {\n\t\t\trequest.setCharacterEncoding(\"UTF-8\");\n\t\t\tresponse.setContentType(\"text/html;charset=UTF-8\");\n\t\t\tString page = request.getParameter(\"page\"); // 当前页数\n\t\t\tString rows = request.getParameter(\"rows\"); // 每页显示行数\n\t\t\tString dealNo = request.getParameter(\"dealNo\");\n\t\t\tString msg = null;\n\t\t\tif (dealNo != null && dealNo.trim().length() > 0 && page != null\n\t\t\t\t\t&& page.trim().length() > 0 && rows != null\n\t\t\t\t\t&& rows.trim().length() > 0) {\n\t\t\t\tGZHQueryService gzhQueryService = new GZHQueryService();\n\t\t\t\tList<MoneyDataInfo> moneyDataList = gzhQueryService\n\t\t\t\t\t\t.getMoneyDataListPage(page, rows, dealNo);\n\t\t\t\tint total = gzhQueryService.getResultCount(dealNo);\n\t\t\t\tPagination pagination = new Pagination();\n\t\t\t\t// pagination.setRows(moneyDataList);\n\t\t\t\tpagination.setTotal(total);\n\t\t\t\tGson gson = new Gson();\n\t\t\t\tmsg = gson.toJson(pagination);\n\t\t\t} else {\n\t\t\t\tmsg = \"notfount\";\n\t\t\t}\n\t\t\tresponse.getWriter().write(msg);\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "entities.Torrent.NodeSearchResult getResults(int index);" ]
[ "0.6171221", "0.5971142", "0.59153795", "0.58608705", "0.58484775", "0.58219683", "0.57913005", "0.5773178", "0.57220274", "0.5654181", "0.56377137", "0.55997694", "0.5598473", "0.5585544", "0.55563223", "0.55563223", "0.5540636", "0.55395335", "0.5488023", "0.54597473", "0.544343", "0.5439571", "0.54390794", "0.54307956", "0.54188585", "0.54075634", "0.539961", "0.5390225", "0.5382973", "0.5373469", "0.5365101", "0.5356739", "0.53515947", "0.53414965", "0.53287256", "0.5298226", "0.52908874", "0.5286049", "0.5274625", "0.5265938", "0.5263662", "0.5257204", "0.52571946", "0.5248952", "0.5246618", "0.5243107", "0.52429336", "0.5236202", "0.521479", "0.5212973", "0.5208449", "0.52021295", "0.52007014", "0.51976687", "0.51863897", "0.51808393", "0.51808226", "0.51684827", "0.5166801", "0.51552147", "0.51463985", "0.5140065", "0.51389617", "0.5136802", "0.512789", "0.5123916", "0.5111061", "0.5100085", "0.5091422", "0.5090319", "0.5086168", "0.50851244", "0.5084082", "0.50838685", "0.5078999", "0.50677574", "0.5065195", "0.506335", "0.5061862", "0.505703", "0.50569797", "0.5056227", "0.5055372", "0.5036885", "0.5035711", "0.5023955", "0.50217015", "0.501901", "0.5017661", "0.50173664", "0.50165886", "0.50161237", "0.5010238", "0.5003507", "0.49944112", "0.49907923", "0.49890888", "0.4988159", "0.4980468", "0.49768588" ]
0.69433373
0
lets constructor of HomeworkXX() make all magic :P
public static void main(String[] args) throws IOException { // new Homework01(); new Homework02(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Homework(int initialcode, String initialtitle, String initialdescription, String initialcreationDate,\n\t\t\tint initialstate , String initialdeadline) throws ParseException {\n\t\tsuper(initialcode , initialtitle , initialdescription , initialcreationDate,initialstate);\n\t\tthis.deadline = initialdeadline ;\n\t}", "public Pitonyak_09_02() {\r\n }", "public Professor()\n\t{\n\t\t//stuff\n\t}", "public void init(){\n\t\tEmployee first = new Employee(\"Diego\", \"Gerente\", \"[email protected]\");\n\t\tHighSchool toAdd = new HighSchool(\"Santiago Apostol\", \"4656465\", \"cra 33a #44-56\", \"3145689879\", 30, 5000, \"Jose\", new Date(1, 3, 2001), 3, \"Servicios educativos\", \"451616\", 15, \"Piedrahita\", 45, 1200, 500);\n\t\ttoAdd.addEmployee(first);\n\t\tProduct pilot = new Product(\"jet\", \"A00358994\", 1.5, 5000);\n\t\tFood firstFood = new Food(\"Colombina\", \"454161\", \"cra 18\", \"454611313\", 565, 60000, \"Alberto\", new Date(1, 8, 2015), 6, \"Manufactura\", 4);\n\t\tfirstFood.addProduct(pilot);\n\t\ttheHolding = new Holding(\"Hertz\", \"15545\", \"cra 39a #30a-55\", \"3147886693\", 80, 500000, \"Daniel\", new Date(1, 2, 2015), 5);\n\t\ttheHolding.addSubordinate(toAdd);\n\t\ttheHolding.addSubordinate(firstFood);\n\t}", "public Hacker() {\r\n \r\n }", "private Solution() { }", "private Solution() { }", "public ExamMB() {\n }", "Constructor() {\r\n\t\t \r\n\t }", "public StudentExamination() {\n initComponents();\n readExamSlip();\n readExamResult();\n }", "public ProgramWilmaa()\n\t{\n\t}", "private Solution() {\n }", "private Solution() {\n //constructor\n }", "Programming(){\n\t}", "protected TestBench() {}", "public AllLaboTest() {\n }", "private Solution() {\n\n }", "public static void main(String[] args) {\n homework ();\n }", "public Excellon ()\n {}", "public Tester()\n {\n // initialise instance variables\n x = 0;\n }", "public Student() {\n//\t\tname = \"\";\n//\t\tage = 0;\n\t\t\n\t\t\n\t\t//call constructors inside of other constructors\n\t\tthis(999,0);\n\t}", "public helptest()\n {\n // initialise instance variables\n x = 0;\n }", "public BNHaystackLearnStructureJob() {}", "Employees() { \r\n\t\t this(100,\"Hari\",\"TestLeaf\");\r\n\t\t System.out.println(\"default Constructor\"); \r\n\t }", "public home() {\n initComponents();\n int xx;\n int xy;\n }", "public ClassTester()\n { \n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\n super(600, 400, 1);\n addObject(new NonScrollingBackground(\"Stage - 0.jpg\"),300,131);\n addObject(playerMage,35,170);\n addObject(new AbilityDisplayer(playerMage),125,268);\n }", "public Training() {\n }", "public Simulation() {\n ecosystem = new Ecosystem();\n weeksElapsed = 0;\n }", "public BoardMember(int yearsWorked)\r\n\t{\r\n\t\tsuper(yearsWorked);\r\n\t}", "private TMCourse() {\n\t}", "Employee() {\n\t}", "public EmployeeMain() {\n employeeSalary_2015 = new ArrayList<Employee>();\n employeeSalary_2014 = new ArrayList<Employee>();\n }", "public TestPrelab2()\n {\n }", "public FullTimeStaffHire(int vacancyNumber, String designation, String jobType, int salary, int workingHour) {\n //Super class constructor is invoked.\n super (vacancyNumber, designation, jobType);\n this.salary = salary;\n this.workingHour = workingHour;\n this.staffName = \"\";\n this.joiningDate = \"\";\n this.qualification = \"\";\n this.appointedBy = \"\";\n this.joined = false;\n }", "public School() {\r\n }", "@Override\r\n\tpublic void upHomework() {\n\t\t\r\n\t}", "public Problem38() {\n System.out.println(\"Problem38: \");\n }", "public Course()\n\t{\n\t\tstudents = new Student[30];\n\t\tnumStudents = 0;\n\t}", "public HW6() \r\n\t{\r\n\t\tfirst=last=null;//initialized to null\r\n\t}", "public OOP_207(){\n\n }", "public HourlyWorker () {\r\n super ();\r\n hours = -1;\r\n hourlyRate = -1;\r\n salary = -1;\r\n }", "public p7p2() {\n }", "public Main() {\r\n\t\tsuper();\r\n\t\tinitialize();\r\n\r\n\t}", "protected Problem() {/* intentionally empty block */}", "public Constructor(){\n\t\t\n\t}", "public Training() {\n\n }", "public Main() {\r\n\t}", "public TennisCoach () {\n\t\tSystem.out.println(\">> inside default constructor.\");\n\t}", "public Student (String first, String last)\n {\n firstName = first;\n lastName = last;\n testScore1 = 0;\n testScore2 = 0;\n testScore3 = 0;\n }", "public static void main(String[] args) {\r\n\t\t\r\n\t\t// Creation of the constructor nqMarkScheme with parameters 198 and 6 of the class NumericalQuestion.\r\n\t\tNumericalQuestion nqMarkScheme = new NumericalQuestion(198, 6);\r\n\t\t\r\n\t\t// Creation of the constructor bqMarkScheme with parameters true and 1 of the class BooleanQuestion.\r\n\t\tBooleanQuestion bqMarkScheme = new BooleanQuestion(true, 1);\r\n\t\t\r\n\t\t// Creation of the constructor mcpMarkScheme with parameters false, false, false and 3 of the class MultipleChoiceQuestion.\r\n\t\tMultipleChoiceQuestion mcpMarkScheme = new MultipleChoiceQuestion(false, false, false, 3);\r\n\t\t\r\n\t\t// Creation of the constructor markScheme with parameters nqMarkScheme, bqMarkScheme and mcpMarkScheme of the class Exam.\r\n\t\tExam markScheme = new Exam(nqMarkScheme, bqMarkScheme, mcpMarkScheme);\r\n\t\t\r\n\t\t// Creation of the constructor nqAttempt with parameters 196 and 0 of the class NumericalQuestion.\r\n\t\tNumericalQuestion nqAttempt = new NumericalQuestion(196, 0);\r\n\t\t\r\n\t\t// Creation of the constructor bqAttempt with parameters true and 0 of the class BooleanQuestion.\r\n\t\tBooleanQuestion bqAttempt = new BooleanQuestion(true, 0);\r\n\t\t\r\n\t\t// Creation of the constructor mcpAttempt with parameters false, false, false and 0 of the class MultipleChoiceQuestion.\r\n\t\tMultipleChoiceQuestion mcpAttempt = new MultipleChoiceQuestion(false, false, false, 0);\r\n\t\t\r\n\t\t// Creation of the constructor examAttempt with parameters nqAttempt, bqAttept and mcpAttempt of the class Exam.\r\n\t\tExam examAttempt = new Exam(nqAttempt, bqAttempt, mcpAttempt);\r\n\t\t\r\n\t\t// Creation of the object examMarker of the class Marker.\r\n\t\tMarker examMarker = new Marker();\r\n\t\t\r\n\t\t// Calling the method markAttempt using the object examMarker and passing examAttempt and markScheme as parameters. \r\n\t\texamMarker.markAttempt(examAttempt, markScheme);\r\n\t\t\r\n\t\t// Declaration and calculation of the variable mark, by adding together the mark of each of the three questions.\r\n\t\tint mark = examAttempt.getTotalMark();\r\n\t\t\r\n\t\t// Outputs the marks that the student has taken, out of the maximum available marks of the first question.\r\n\t\tSystem.out.println(\"Question1: \" + examMarker.getQuestion1Mark() + \" out of \" + nqMarkScheme.getMark());\r\n\t\t// Outputs the marks that the student has taken, out of the maximum available marks of the second question.\r\n\t\tSystem.out.println(\"Question2: \" + examMarker.getQuestion2Mark() + \" out of \" + bqMarkScheme.getMark());\r\n\t\t// Outputs the marks that the student has taken, out of the maximum available marks of the third question.\r\n\t\tSystem.out.println(\"Question3: \" + examMarker.getQuestion3Mark() + \" out of \" + mcpMarkScheme.getMark());\r\n\t\t\r\n\t\t// Output the total marks the student has taken.\r\n\t\tSystem.out.println(\"Total Mark awarded: \" + mark);\r\n\t\t\r\n\t\t// Calculates and prints the classification of the student based on their total mark.\r\n\t\tSystem.out.println(\"Classification: \" + examMarker.convertMarksToClassification(mark, 9, 7, 6));\r\n\t\r\n\t\t\r\n\t}", "public DomainKnowledge() {\r\n\t\tthis.construct(3);\r\n\t}", "public TutorialStep1() {\n\n }", "public Student(int level, String first, String last, long gnum, String major, \n String degree) {\n // TODO initialize the instance variables\n // Also use the parameter variable \"level\" as follows\n // 1) use its value to initialized the PROGRAM constant\n // 2) create the transcripts array to be of size [50] if is level 0, \n // or to be of size [15] if level is 1. \n // note that level refers to the student type and we use a value of 0 for \n // an undergrad and a value of 1 for a grad\n PROGRAM = level;\n this.first = first;\n this.last = last;\n this.gnum = gnum;\n this.major = major;\n this.degree = degree;\n if (PROGRAM == 0){\n transcripts = new TranscriptEntry[50];\n }\n else{\n transcripts = new TranscriptEntry[15];\n }\n }", "public GPProblem() {\n\n }", "public AutomaticJob() {\r\n \r\n }", "private AlgorithmTools() {}", "public WorkClass() throws Exception {\n index = -1;\n }", "public Program3 (String empName) {\r\n\t\tname = empName;\r\n\t}", "public BookcaseTest () {\n }", "public RedPuzzle() {\n }", "public EnsembleLettre() {\n\t\t\n\t}", "public StudentChoresAMImpl() {\n }", "public Main()\n { \n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\n super(600, 600, 1); \n\n prepare();\n }", "public static void main(String[] args) {\n\t\tthisconstructor rv = new thisconstructor();\n\t\n\t\n\t}", "public StudentDemo(){\r\n \r\n \r\n \r\n }", "public Test05() {\n this(0);\n n2 = \"n2\";\n n4 = \"n4\";\n }", "public ExperimentInfo() { }", "public MrnWoatlas5() {\n clearVars();\n if (dbg) System.out.println (\"<br>in MrnWoatlas5 constructor 1\"); // debug\n }", "public QaStep() {\n\t}", "private Rekenhulp()\n\t{\n\t}", "public static void main(String[] args) {\n\n Student alex = new Student(\"Alex\", \"Kane\", 21);\n alex.setCourse(\"Math\");\n System.out.println(alex);\n\n Student mary = new Student(\"Mary\", \"Jane\", 19);\n mary.setCourse(\"Art\");\n System.out.println(mary);\n\n /* Initialize a few teachers. Set values for wage and total hours worked. Print their first name,\n last name, age and salary that each of them earns.\n */\n Teacher john = new Teacher(\"John\", \"Tob\", 45);\n john.setDepartment(\"Computer science\");\n john.setWage(20);\n john.setTotalHoursWorked(120);\n System.out.println(john);\n\n Teacher lizy = new Teacher(\"Lizy\", \"Simpson\", 45);\n lizy.setDepartment(\"Philosophy\");\n lizy.setWage(34);\n lizy.setTotalHoursWorked(12);\n System.out.println(lizy);\n\n }", "public static void main(String[] args) {\n new HW02();\n }", "public FirstRun( ) {\n\t\t// TODO Auto-generated constructor stub\n\t\t\n\t}", "public BasicSpecies() {\r\n\r\n\t}", "public TestDriverProgram(){\n iTestList = new SortableArray(iSize); // tests if parameterized constructor works\n iTestFileList = new SortableArray(); // tests if default constructor works\n runAllTests(); // run all of the tests\n }", "public Logic() {\n\t\tarr = new int [8][8];\n\t\tcreateNewGame();\n\t}", "public void setUp()\n {\n empl = new SalariedEmployee(\"romeo\", 25.0);\n }", "public Assignment() {\n initComponents();\n }", "public Student(String in_name, double in_gpa)\n {\n name = in_name;\n gpa = in_gpa;\n getQuizzes();\n }", "public Laboratorio() {}", "public Main() {\n \n \n }", "public DemonstrationApp()\n {\n // Create Customers of all 3 types\n s = new Senior(\"alice\", \"123 road\", 65, \"555-5555\", 1);\n a = new Adult(\"stacy\", \"123 lane\", 65, \"555-1111\", 2);\n u = new Student(\"bob\", \"123 street\", 65, \"555-3333\", 3);\n \n //Create an account for each customer \n ca = new CheckingAccount(s,1,0);\n sa = new SavingsAccount(a,2,100);\n sav = new SavingsAccount(u,3,1000);\n \n //Create a bank\n b = new Bank();\n \n //Create a date object\n date = new Date(2019, 02, 12);\n }", "public Janela01() {\n initComponents();\n }", "public Juego() {\n init(); // Llama al metodo init para inicializar todas las variables\n start(); // Llama al metodo start para crear el hilo\n }", "public abstract SolutionPartielle solutionInitiale();", "public Student()\n {\n lname = \"Tantiviramanond\";\n fname = \"Anchalee\";\n grade = 12;\n studentNumber = 2185;\n }", "public static void main(String[] args) {\n\t\tSchool algory=new School();\r\n\t\talgory.name();\r\n\t\tSchool.Library lib=algory.new Library();\r\n\t\tlib.book();\r\n\t}", "public Scoreboard() {\n\t}", "ConstructorPractice () {\n\t\tSystem.out.println(\"Default Constructor\");\n\t}", "public Main() {\n\t\tsuper();\n\t}", "@Test\n\tpublic void testAddHomework() {\n\t\tthis.admin.createClass(\"Class1\", 2017, \"Instructor1\", 20);\n\t\tthis.instructor.addHomework(\"Instructor1\", \"Class1\", 2017, \"HW1\");\n\t\tassertTrue(this.instructor.homeworkExists(\"Class1\", 2017, \"HW1\"));\n\t}", "public MonteCarloVSmp()\r\n\t{\r\n\t}", "public RptPotonganGaji() {\n }", "public Zeffit()\n {\n // TODO: initialize instance variable(s)\n }", "public MyPractice()\n\t{\n\t\t//Unless we specify values all data members\n\t\t//are a zero, false, or null\n\t}", "student(){\r\n \r\n //constructor\r\n //always same as class name\r\n //we can also have code here\r\n //this will be the first method to be intialised\r\n //can never return a value\r\n number++;// default initialisation\r\n }", "public SwerveAutoTest() {\n // Initialize base classes.\n // All via self-construction.\n\n // Initialize class members.\n // All via self-construction.\n }", "public Employee() {\t}", "public PthTestContentsInfo() {\n }", "private CheckingTools() {\r\n super();\r\n }" ]
[ "0.66186625", "0.64329976", "0.64039284", "0.63705575", "0.6256434", "0.62451714", "0.62451714", "0.6234528", "0.62239116", "0.620448", "0.619248", "0.6162416", "0.6148563", "0.6137634", "0.61233735", "0.61194617", "0.6105087", "0.6101307", "0.60944194", "0.60726875", "0.60705817", "0.60488385", "0.60459113", "0.60357416", "0.60347044", "0.60340595", "0.6026722", "0.6023558", "0.60180074", "0.6012431", "0.60105103", "0.6003248", "0.6000321", "0.5972846", "0.5970956", "0.5965611", "0.59654", "0.596303", "0.59330314", "0.59228075", "0.59219277", "0.59211713", "0.59139234", "0.59087855", "0.5907468", "0.59069294", "0.5904367", "0.59039855", "0.5903014", "0.589561", "0.5883354", "0.58768624", "0.58663434", "0.5866228", "0.5861815", "0.5852298", "0.58508295", "0.58464044", "0.5843465", "0.58399665", "0.5839544", "0.5837096", "0.5824755", "0.5818904", "0.58147115", "0.5806139", "0.58061254", "0.5805492", "0.58054876", "0.5804058", "0.5799334", "0.57981455", "0.57947373", "0.5792036", "0.5790662", "0.5789621", "0.5786251", "0.57833284", "0.5780608", "0.5780548", "0.57780945", "0.5776874", "0.5776543", "0.5772105", "0.5771878", "0.5766885", "0.5764975", "0.5759551", "0.57550335", "0.5754171", "0.5754125", "0.57512677", "0.5750762", "0.57501835", "0.57489616", "0.5746809", "0.57467127", "0.5745607", "0.5738776", "0.57386494" ]
0.66547364
0
/ Using an ArrayList in a ListView we (hopefully) will be able to display a list of games previously played and who won them.
@Override protected void onCreate(Bundle savedInstanceState) { ArrayList<User> testUser = new ArrayList<>(); testUser.add(new User("Erlend", "950")); testUser.add(new User("Klister", "12")); super.onCreate(savedInstanceState); setContentView(R.layout.activity_score); scoreScreen = (ListView) findViewById(R.id.score_view); UserAdapter userAdapter = new UserAdapter(this, testUser); scoreScreen.setAdapter(userAdapter); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void listMostPlayed(View view) \n\t{\n\t\tIntent intent = new Intent(this, PlayerRatingPlayerListView.class);\n\t\tintent.putExtra(MainActivity.EXTRA_STATS_TYPE, new MostPlayedListViewAdapter() );\n\t\tthis.startActivity(intent);\n\t}", "private void updateView(ArrayList<BasketballGame> gamesArray) {\n mGamesArray.clear();\n\n ArrayList<HashMap<String, String>> games = new ArrayList<>();\n\n\n for(BasketballGame game : gamesArray){\n\n HashMap<String, String> map = new HashMap<String, String>();\n map.put(KEY_ID, \"\"+game.getUserId()); //Stores user ID as string...\n\n// String capUserName = game.getUsername().substring(0,1).toUpperCase()\n// + game.getUsername().substring(1, game.getUsername().length());\n\n map.put(KEY_USERNAME, game.getUsername());\n map.put(KEY_TITLE, game.toStringForNewsFeed());\n map.put(KEY_ASSISTS, \" \"+game.getAssists()+\" \");\n map.put(KEY_TWOS, \" \"+game.getTwoPoints()+\" \");\n map.put(KEY_THREES, \" \"+game.getThreePoints()+\" \");\n map.put(KEY_THUMB_URL, \"\"+game.getmImageIdentifier());\n\n Log.d(TAG, \"CCC: nFFinal: \"+game.getmImageIdentifier());\n\n mGamesArray.add(map);\n }\n\n mAdapter = new LazyAdapter(this.getActivity(), mGamesArray, true, false, getActivity());\n\n //defAdapter = new ArrayAdapter<BasketballGame>(this.getActivity(), R.layout.plain_textview, gamesArray);\n setListAdapter(mAdapter);\n }", "private void setAvailableGames() {\n try {\n listView.getItems().clear();\n DataOutputStream dataOutputStream = new DataOutputStream(socket.getOutputStream());\n dataOutputStream.writeUTF(\"GLst\");\n ObjectInputStream objectInputStream = new ObjectInputStream(socket.getInputStream());\n HashMap<String, String> list = (HashMap<String, String>) objectInputStream.readObject();\n for (String roomCode : list.keySet()) {\n HBox hboxList = new HBox();\n hboxList.setSpacing(8);\n Button buttonJoin = new Button(\"Join\");\n buttonJoin.setOnAction(event -> joinGameRoom(roomCode));\n Separator separator = new Separator();\n separator.setOrientation(Orientation.VERTICAL);\n Label roomName = new Label(list.get(roomCode));\n roomName.setFont(Font.font(\"Arial\", 20));\n hboxList.getChildren().add(buttonJoin);\n hboxList.getChildren().add(separator);\n hboxList.getChildren().add(roomName);\n listView.getItems().add(hboxList);\n }\n } catch (IOException | ClassNotFoundException e) {\n e.printStackTrace();\n }\n }", "public void refreshGameSearchList() {\n gamesSearchListModel.clear();\n List<String> games = dbMgr.getAllGameTitles(username);\n List<String> gamesOwned = dbMgr.getGameTitles(username);\n\n // fill list with games user does not own\n for (int i = 0; i < games.size(); i++) {\n if(!gamesOwned.contains(games.get(i)))\n gamesSearchListModel.addElement(games.get(i)); \n }\n\n gamesSearchList.setModel(gamesSearchListModel);\n\n }", "public void refreshGameList() {\n gamesListModel.clear();\n List<String> userGames = dbMgr.getGameTitles(username);\n\n // fill list with user games\n for (int i = 0; i < userGames.size(); i++) {\n gamesListModel.addElement(userGames.get(i)); \n }\n\n gamesList.setModel(gamesListModel);\n }", "@Override\n\tpublic void listBestRatings(View view)\n\t{\n\t\tIntent intent = new Intent(this, PlayerRatingGameListView.class);\n\t\tintent.putExtra(MainActivity.EXTRA_STATS_TYPE, new BestGameRatingListViewAdapter() );\n\t\tthis.startActivity(intent);\t\n\t}", "@SuppressWarnings(\"ResultOfObjectAllocationIgnored\")\n private String getWinnerList() {\n String list = \"\";\n\n ArrayList<IPlayer> arrlist = sortPlayerAfterPoints();\n\n for (IPlayer i : arrlist) {\n try {\n list += i.getName();\n list += \": \" + i.getPoints() + \"\\n\";\n } catch (RemoteException e) {\n e.printStackTrace();\n }\n }\n\n try {\n if (dialog.getSoundBox().isSelected()) {\n if (iPlayerList.size() > 0) {\n if (playersAgentsMap.get(arrlist.get(0).getName()).get(0).getColor().equals(Color.decode(AgentUtils.ROT))) {\n new SoundClip(\"red_team_is_the_winner\");\n } else if (playersAgentsMap.get(arrlist.get(0).getName()).get(0).getColor().equals(Color.decode(AgentUtils.BLAU))) {\n new SoundClip(\"blue_team_is_the_winner\");\n } else {\n new SoundClip(\"Flawless_victory\");\n }\n } else {\n new SoundClip(\"players_left\");\n }\n }\n } catch (NumberFormatException | RemoteException e) {\n e.printStackTrace();\n }\n\n return list;\n }", "public static ArrayList<Player> getWinners(){return winners;}", "public void populateListView() {\n Cursor scores = myDb.getAllData();\n\n String[] columns = new String[]{\n myDb.COL_2,\n myDb.COL_3,\n myDb.COL_4,\n myDb.COL_5\n };\n\n int[] boundTo = new int[]{\n R.id.topScore,\n R.id.topCount,\n R.id.bottomScore,\n R.id.bottomCount\n };\n\n simpleCursorAdapter = new SimpleCursorAdapter(this,\n R.layout.history_list,\n scores,\n columns,\n boundTo,\n 0);\n scoreHistory.setAdapter(simpleCursorAdapter);\n\n// topScore.setTypeface(numberFont);\n// topCount.setTypeface(numberFont);\n// bottomScore.setTypeface(numberFont);\n// bottomCount.setTypeface(numberFont);\n\n\n }", "public void showListLessonResult(){\n\n //create an ArrayAdapter\n ArrayAdapter<LessonItem> adapter = new ArrayAdapter<LessonItem>(getApplicationContext(),\n R.layout.listview_lesson_item, queryResults){\n @Override\n public View getView(int position, View convertView, ViewGroup parent){\n\n if(convertView == null){\n convertView = getLayoutInflater().inflate(R.layout.listview_lesson_item, parent, false);\n }\n\n tvLesson = (TextView)convertView.findViewById(R.id.tv_lessonName);\n\n LessonItem lesson = queryResults.get(position);\n\n String lessonName = \"Lesson \" + String.valueOf(position + 1) + \": \" + lesson.getLessonName();\n tvLesson.setText(lessonName);\n tvCourseName.setText(\"Software Testing\");\n\n return convertView;\n }\n };\n\n //Assign adapter to ListView\n lvLesson.setAdapter(adapter);\n\n }", "@Override\n\tpublic void listMinutesPerGame(View view) \n\t{\n\t\tIntent intent = new Intent(this, PlayerRatingPlayerListView.class);\n\t\tintent.putExtra(MainActivity.EXTRA_STATS_TYPE, new MinutesPerGameListViewAdapter() );\n\t\tthis.startActivity(intent);\n\t}", "private void listGames(){\n\n }", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_leader_board);\n\n listOfLeaders = PuzzleBoardView.listOfPlayers; //Gets the list created from the PuzzleBoardView class\n leaderList = new ArrayList<>(); //Creates a new list\n\n listView = (ListView) findViewById(android.R.id.list);\n\n //Turns all players to strings of their name and number of moves\n for(Player p : listOfLeaders) {\n leaderList.add(p.getUserName() + \"\\t\\t\\t\\t\\t\" + p.getMoves());\n }\n\n ArrayAdapter adapter = new ArrayAdapter(this, R.layout.list_item, leaderList);\n listView.setAdapter(adapter);\n }", "public void setGameDisplay(GameList gameList){\n String[][] m_data = new String[gameList.getLength()][3];\n int m_counter = 0;\n //iterates through the game list and sets the information at each column to the current games information\n for (Game g : (Iterable<Game>)gameList) {\n m_data[m_counter][0] = g.getTitle();\n m_data[m_counter][1] = g.getGenre();\n m_data[m_counter++][2] = g.getPublisher();\n\n Game m_tmpGame = new Game();\n m_tmpGame = g;\n m_searchResult.addGame(g); // adds the game to the searchResults List\n }\n //sets the table with basic information\n m_gameTable.setModel( new DefaultTableModel(\n m_data,\n new String[]{\"Title\", \"Genre\", \"Publisher\"}\n ));\n TableColumnModel columns = m_gameTable.getColumnModel();\n columns.getColumn(0).setMinWidth(0);\n m_gameTable.setAutoCreateRowSorter(true);\n }", "private void populateListView() {\n\t\tappList = getPackages();\n\t\tListView lv = (ListView) findViewById(R.id.TheListView);\n\t\tList<String> appNames = new ArrayList<String>();\n\t\tList<Drawable> appIcons = new ArrayList<Drawable>();\n\t\tfor(PInfo pi : appList){\n\t\t\tappNames.add(pi.getAppname());\n\t\t\tappIcons.add(pi.getIcon());\n\t\t}\n\t\tCustomListViewAdapter adapter = new CustomListViewAdapter(this, R.layout.app_name_icon, appNames.toArray(new String[appNames.size()]),appIcons.toArray(new Drawable[appIcons.size()]));\n\t\tlv.setAdapter(adapter);\n\t\tlv.setOnItemClickListener(new OnItemClickListener() {\n\n\t\t\t@Override\n\t\t\tpublic void onItemClick(AdapterView<?> arg0, View view, int position,\n\t\t\t\t\tlong id) {\n\t\t\t\tToast.makeText(GetAppActivity.this, \"You Chose\"+appList.get(position).appname, Toast.LENGTH_SHORT).show();\n\t\t\t\tif(appList.get(position).toOpen!=null){\n\t\t\t\tgridModel.addIntent(appList.get(position).toOpen);\n\t\t\t\tstartActivity(appList.get(position).toOpen);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t});\n\t}", "private void populatePlayList()\r\n {\r\n \tCursor songs = playlist.getSongs();\r\n \tcurAdapter = new SimpleCursorAdapter(this, R.layout.song_item, songs, new String[]{Library.KEY_ROWID}, new int[] {R.id.SongText});\r\n \tcurAdapter.setViewBinder(songViewBinder);\r\n \tsetListAdapter(curAdapter);\r\n }", "public void updateListView(ArrayList<itemInfo> playerCards){\n final ListView itemListView = findViewById(R.id.itemListView);\n\n // Standard list view adapter\n /*\n final listViewAdapter listAdapter = new listViewAdapter(this,R.layout.itemlistlayout);\n itemListView.setAdapter(listAdapter);\n */\n\n //Array list adapter\n cardArrayAdapter myArrayAdapter = new cardArrayAdapter(this,playerCards);\n itemListView.setAdapter(myArrayAdapter);\n\n //Refresh the adapter data from the arraylist\n myArrayAdapter.notifyDataSetChanged();\n\n //playerCard = playerCards.get(cardCounter);\n\n //listAdapter.add(playerCard);\n\n listCount = itemListView.getAdapter().getCount();\n\n //cardCounter = cardCounter + 1;\n\n }", "public void lokaleLijst(){\n // haal boodschappenlijst op uit Shared Preferences en voeg toe aan shoppingList\n shoppingList = getArrayVal(getApplicationContext());\n // sorteer de lijst en set de adapter en view\n Collections.sort(shoppingList);\n adapter = new ArrayAdapter(this, android.R.layout.simple_list_item_1, shoppingList);\n lv = (ListView) findViewById(R.id.listView);\n lv.setAdapter(adapter);\n\n // set variable tedoen gelijk aan totaal aantal producten in de lijst\n tedoen = shoppingList.size();\n\n // set klik listener op items in de lijst\n lv.setOnItemClickListener(new AdapterView.OnItemClickListener() {\n public void onItemClick(AdapterView parent, View view, int position, long id) {\n String selectedItem = ((TextView) view).getText().toString();\n // vink het aangeklikte product af of zet het terug\n switchElement(selectedItem, position);\n }\n });\n }", "private void displayListView() {\n ArrayList<UserData> countryList = new ArrayList<UserData>();\n UserData country = new UserData(\"User1\",false);\n countryList.add(country);\n country = new UserData(\"User2\",false);\n countryList.add(country);\n country = new UserData(\"User3\",false);\n countryList.add(country);\n country = new UserData(\"User5\",false);\n countryList.add(country);\n country = new UserData(\"User6\",false);\n countryList.add(country);\n country = new UserData(\"User7\",false);\n countryList.add(country);\n country = new UserData(\"User8\",false);\n countryList.add(country);\n\n //create an ArrayAdaptar from the String Array\n dataAdapter = new MyCustomAdapter(getActivity(),\n R.layout.user_list_item, countryList);\n\n // Assign adapter to ListView\n listView.setAdapter(dataAdapter);\n\n\n listView.setOnItemClickListener(new AdapterView.OnItemClickListener() {\n public void onItemClick(AdapterView<?> parent, View view,\n int position, long id) {\n // When clicked, show a toast with the TextView text\n UserData country = (UserData) parent.getItemAtPosition(position);\n // Toast.makeText(getActivity(),\n // \"Clicked on Row: \" + country.getName(),\n // Toast.LENGTH_LONG).show();\n }\n });\n\n }", "private void setupFavoritesListView() {\n ListView listFavorites = (ListView) findViewById(R.id.list_favorites);\n try{\n PlayerDatabaseHelper PlayerDatabaseHelper = new PlayerDatabaseHelper(this);\n db = PlayerDatabaseHelper.getReadableDatabase();\n\n favoritesCursor = db.rawQuery(\"WITH sel_Players(P_id) As (Select player_id FROM SELECTION, USER WHERE NAME = ? AND _id = user_id) SELECT _id, NAME FROM PLAYER, sel_Players WHERE P_id = _id\", new String[] {User.getUName()});\n\n CursorAdapter favoriteAdapter =\n new SimpleCursorAdapter(TopLevelActivity.this,\n android.R.layout.simple_list_item_1,\n favoritesCursor,\n new String[]{\"NAME\"},\n new int[]{android.R.id.text1}, 0);\n listFavorites.setAdapter(favoriteAdapter);\n db.close();\n } catch(SQLiteException e) {\n Toast toast = Toast.makeText(this, \"Database unavailable\", Toast.LENGTH_SHORT);\n toast.show();\n }\n\n listFavorites.setOnItemClickListener(new AdapterView.OnItemClickListener() {\n @Override\n public void onItemClick(AdapterView<?> listView, View v, int position, long id) {\n Intent intent = new Intent(TopLevelActivity.this, forward.class);\n intent.putExtra(forward.EXTRA_PLAYERID, (int)id);\n startActivity(intent);\n }\n });\n }", "@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\trequestWindowFeature(Window.FEATURE_NO_TITLE);\n\t\tgetWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,\n\t\t\t\tWindowManager.LayoutParams.FLAG_FULLSCREEN);\n\t\tsetContentView(R.layout.league);\n\t\tprefs = getSharedPreferences(\"MyPrefs\", 0);\n\t\teditor=prefs.edit();\n\t\t\n\t\timageId[0]=prefs.getInt(\"customId\", R.drawable.barca);\n\t\tmanager=new ManagerDatabase(this);\n\t\tmanager.open();\n\t\tmanager.deletetAll();\n\t\tmainHandler=new Handler();\n\t\tb=(Button)findViewById(R.id.bSimulate);\n\t\tiv1=(ImageView)findViewById(R.id.ivLeagueTeam1);\n\t\tiv2=(ImageView)findViewById(R.id.ivLeagueTeam2);\n\t\ttv=(TextView)findViewById(R.id.tvOtherMatchScore);\n\t\ttvNextMatch=(TextView)findViewById(R.id.tvNextMatch);\n\t\tlv=(ListView)findViewById(R.id.lvStandings);\n\t\tb.setOnClickListener(this);\n\t\tb.setVisibility(View.INVISIBLE);\n\t\tfor(int i=0;i<teams.length;i++){\n\t\t\tt[i]=new Team(teams[i],imageId[i]);\t\t\t\n\t\t}\n\t\tfor(int x=0;x<teams.length;x++){\n\t\t\tinfo[x]=new PlayerDatabase(League.this);\n\t\t\tinfo[x].DATABASE_TABLE=teams[x];\n\t\t\tinfo[x].open();\n\t\t\tt[x].ovr=info[x].getAvg();\n\t\t\tLog.d(\"Intial\",t[x].ovr+\" \"+info[x].getAvg());\n\t\t\tt[x].setMax();\n\t\t\tinfo[x].close();\n\t\t}\n\t\t//t[0]=new Team(teams[0]);\n\t\t//tv.setText(t[0].gamesPlayed());\n\t\tRunnable runnable=new Runnable() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tfor(i=0;i<teams.length;i++)\n\t\t\t\t{\n\t\t\t\t\tfor(j=0;j<teams.length;j++)\n\t\t\t\t\t{\n\t\t\t\t\t\tsynchronized (obj) {\n\t\t\t\t\t\t\twhile(mPaused){\n\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\tLog.d(\"Waiting\",\"wait()\");\n\t\t\t\t\t\t\t\t\tobj.wait();\n\t\t\t\t\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tmainHandler.post(new Runnable() {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tif(i!=j)\n\t\t\t\t\t\t\t\t{\t\n\t\t\t\t\t\t\t\t\tLog.d(\"Thread\", String.valueOf(i)+\"&&\"+String.valueOf(j));\n\t\t\t\t\t\t\t\t\ttvNextMatch.setText(\"\\tMatch Result\\n\"+teams[i]+\" vs \"+teams[j]);\n\t\t\t\t\t\t\t\t\tid1=t[i].getImageId();\n\t\t\t\t\t\t\t\t\tid2=t[j].getImageId();\n\t\t\t\t\t\t\t\t\tiv1.setBackgroundResource(id1);\n\t\t\t\t\t\t\t\t\tiv2.setBackgroundResource(id2);\n\t\t\t\t\t\t\t\t\tt1=t[i].getMax(r.nextInt(10));\n\t\t\t\t\t\t\t\t\tt2=t[j].getMax(r.nextInt(10));\n\t\t\t\t\t\t\t\t\ttv.setText(t1+\" : \"+t2);\n\t\t\t\t\t\t\t\t\t//Log.d(\"Score\",t[i].getMax()+\" \"+t[i].ovr+\" \"+t[j].getMax()+\" \"+t[j].ovr);\n\t\t\t\t\t\t\t\t\tif(t1>t2){\n\t\t\t\t\t\t\t\t\t\tt[i].incGamesWon();\n\t\t\t\t\t\t\t\t\t\tt[i].incPoints(3);\n\t\t\t\t\t\t\t\t\t\tt[j].incGamesLost();\n\t\t\t\t\t\t\t\t\t}else if(t1<t2){\n\t\t\t\t\t\t\t\t\t\tt[j].incPoints(3);\n\t\t\t\t\t\t\t\t\t\tt[j].incGamesWon();\n\t\t\t\t\t\t\t\t\t\tt[i].incGamesLost();\n\t\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\t\tt[i].incPoints(1);\n\t\t\t\t\t\t\t\t\t\tt[j].incPoints(1);\n\t\t\t\t\t\t\t\t\t\tt[j].incGamesDrawn();\n\t\t\t\t\t\t\t\t\t\tt[i].incGamesDrawn();\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tt[i].setGoalsScored(t1);\n\t\t\t\t\t\t\t\t\tt[i].setGoalsAgainst(t2);\n\t\t\t\t\t\t\t\t\tt[j].setGoalsScored(t2);\n\t\t\t\t\t\t\t\t\tt[i].setGoalsAgainst(t1);\n\t\t\t\t\t\t\t\t\tt[i].incGamesPlayed();\n\t\t\t\t\t\t\t\t\tt[j].incGamesPlayed();\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tif(i==0 || j==0){\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\ttvNextMatch.setText(\"\\tComing Up\\n\"+teams[i]+\" vs \"+teams[j]);\n\t\t\t\t\t\t\t\t\t\ttv.setText(\"\");\n\t\t\t\t\t\t\t\t\t\tb.setVisibility(View.VISIBLE);\n\t\t\t\t\t\t\t\t\t\tmPaused=true;\n\t\t\t\t\t\t\t\t\t\tteam1=teams[i];\n\t\t\t\t\t\t\t\t\t\tteam2=teams[j];\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\t\t\tb.setVisibility(View.INVISIBLE);\n\t\t\t\t\t\t\t\t\t\t//Display match result using tv\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tif(i==5&&j==4){\n\t\t\t\t\t\t\t\t\t\tTeam temp;\n\t\t\t\t\t\t\t\t\t\tiv1.setBackgroundResource(R.drawable.tile);\n\t\t\t\t\t\t\t\t\t\tbalance=t[0].win*3+t[0].draw;\n\t\t\t\t\t\t\t\t\t\tmanager.insertData(\"Harish\",balance , t[0].win, t[0].loss, t[0].draw);\n\t\t\t\t\t\t\t\t\t\tToast.makeText(League.this, manager.getData(), Toast.LENGTH_LONG).show();\n\t\t\t\t\t\t\t\t\t\tbalance=Integer.parseInt(manager.getBal(\"Harish\"));\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tmanager.close();\n\t\t\t\t\t\t\t\t\t\ttv.setText(\"\");\n\t\t\t\t\t\t\t\t\t\ttvNextMatch.setText(\"CHAMPIONS!!!\");\n\t\t\t\t\t\t\t\t\t\ttvNextMatch.setTextSize(20);\n\t\t\t\t\t\t\t\t\t\tfor(int p=0;p<teams.length-1;p++){\n\t\t\t\t\t\t\t\t\t\t\tfor(int x=0;x<teams.length-1;x++){\n\t\t\t\t\t\t\t\t\t\t\t\tif(t[x].pts<t[x+1].pts){\n\t\t\t\t\t\t\t\t\t\t\t\t\ttemp = t[x];\n\t\t\t\t\t\t\t\t\t\t\t\t\tt[x]=t[x+1];\n\t\t\t\t\t\t\t\t\t\t\t\t\tt[x+1]=temp;\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t}\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tfor(int k=0;k<teams.length;k++)\n\t\t\t\t\t\t\t\t\t\t\tt[k].pos=k+1;\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tstandings[0]=\"TEAM\\t\\t\\t\\t\\tP W L D PTS\";\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tfor(int s=1;s<=teams.length;s++)\n\t\t\t\t\t\t\t\t\t\t\tstandings[s]=t[s-1].getData();\n\t\t\t\t\t\t\t\t\t\tb.setVisibility(View.VISIBLE);\n\t\t\t\t\t\t\t\t\t\tb.setText(\"Start Next Season\");\n\t\t\t\t\t\t\t\t\t\tnewSeason=true;\n\t\t\t\t\t\t\t\t\t\tiv1.setBackgroundResource(R.drawable.sport_soccer);\n\t\t\t\t\t\t\t\t\t\tiv2.setBackgroundResource(t[0].getImageId());\n\t\t\t\t\t\t\t\t\t\t// Get the background, which has been compiled to an AnimationDrawable object.\n\t\t\t\t\t\t\t\t\t\tframeAnimation = (AnimationDrawable) iv1.getBackground();\n\t\t\t\t\t\t\t\t\t\t // Start the animation (looped playback by default).\n\t\t\t\t\t\t\t\t\t\t frameAnimation.start();\n\t\t\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t\t\tArrayAdapter<String> adp=new ArrayAdapter<String>(League.this, R.layout.single_standings, R.id.tvSingleStandings, standings);\n\t\t\t\t\t\t\t\t\t\t//TextView tvFirst=(TextView)findViewById(R.id.tvSingleStandings);\n\t\t\t\t\t\t\t\t\t\t//tvFirst.setBackgroundResource(R.drawable.tile_selected);\n\t\t\t\t\t\t\t\t\t\tlv.setAdapter(adp);\n\t\t\t\t\t\t\t\t\t\t//Log.d(\"kmk\",lv.getItemIdAtPosition(0)+\"\");\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\t\t\t\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\t\t\t\t\tdelay();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\t\t\t\n\t\t};\n\t\t\n\t\tThread th = new Thread(runnable);\n\t\tth.start();\t\t\n\t\t\t\n\t\t\n\t\t//String str=\"\";\n\t\t//Toast.makeText(this,t[3].getData() , Toast.LENGTH_LONG).show();\n\t\t\n\t\t\n\t}", "@Override\n\tpublic void listTopScorer(View view) \n\t{\n\t\tIntent intent = new Intent(this, PlayerRatingPlayerListView.class);\n\t\tintent.putExtra(MainActivity.EXTRA_STATS_TYPE, new TopScorerListViewAdapter() );\n\t\tthis.startActivity(intent);\n\t}", "private void loadListView(){\n try {\n MyDBHandler dbHandler = new MyDBHandler(this);\n availabilities.clear();//Clear the array list\n ArrayList<String> myAvailabilities = new ArrayList<String>();\n\n availabilities.addAll(dbHandler.getAllAvailabilitiesFromSP(companyID));\n\n //Concatenate the availability\n for(Availability availability: availabilities)\n myAvailabilities.add(getDayName(availability.getDayID()) + \" at \" +\n availability.getStartDate() + \" to \" +\n availability.getEndDate());\n\n if(myAvailabilities.size()==0) {\n myAvailabilities.add(EMPTY_TEXT_LV1);\n }\n ArrayAdapter<String> data = new ArrayAdapter<String>(this, android.R.layout.simple_list_item_1, myAvailabilities);\n lv_availability.setAdapter(data);\n\n }catch(Exception ex){\n Toast.makeText(this,ex.getMessage(),Toast.LENGTH_LONG).show();\n }\n }", "private void populateListView() {\n ((MovieAdapter)((HeaderViewListAdapter)myListView.getAdapter()).getWrappedAdapter()).notifyDataSetChanged();\n\n // Check if the user selected a specific movie and start a new activity with only that movie's information.\n myListView.setOnItemClickListener(new AdapterView.OnItemClickListener() {\n @Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n Movie selectedMovie = movies.get(position);\n\n Intent intent = new Intent(MovieListActivity.this, MovieOverviewActivity.class);\n intent.putExtra(TITLE_KEY, selectedMovie.getTitle());\n intent.putExtra(RELEASE_DATE_KEY, selectedMovie.getReleaseDate());\n intent.putExtra(RATING_KEY, selectedMovie.getRating());\n intent.putExtra(OVERVIEW_KEY, selectedMovie.getOverview());\n intent.putExtra(POSTER_PATH_KEY, selectedMovie.getPosterURL());\n startActivity(intent);\n }\n });\n }", "@Override\n\tpublic void listMVP(View view) \n\t{\n\t\tIntent intent = new Intent(this, PlayerRatingPlayerListView.class);\n\t\tintent.putExtra(MainActivity.EXTRA_STATS_TYPE, new MVPListViewAdapter() );\n\t\tthis.startActivity(intent);\n\t}", "public void onItemClick(AdapterView<?> parent, View v,\n int position, long id) {\n Intent intent = new Intent(TwitchGames.this, TwitchStreams.class);\n //pass the name of the game to the new intent\n intent.putExtra(\"gameName\", gameList.get(position));\n intent.putExtra(\"gameViewers\", channelViewersList.get(position));\n startActivity(intent);\n }", "public ArrayList<GamesItemHome> getVirtualGamesData() {\n\n ArrayList<GamesItemHome> data = new ArrayList<>();\n SQLiteDatabase db = this.getWritableDatabase();\n Cursor cursor = db.rawQuery(\"select * from \" + DATABASE_TABLE_VIRTUAL_GAMES + \" ;\", null);\n StringBuffer stringBuffer = new StringBuffer();\n GamesItemHome gamesItem = null;\n while (cursor.moveToNext()) {\n gamesItem = new GamesItemHome();\n String id = cursor.getString(cursor.getColumnIndexOrThrow(\"_id\"));\n String title = cursor.getString(cursor.getColumnIndexOrThrow(\"title\"));\n String category = cursor.getString(cursor.getColumnIndexOrThrow(\"category\"));\n String image = cursor.getString(cursor.getColumnIndexOrThrow(\"image\"));\n gamesItem.setTitle(title);\n gamesItem.setCategory(category);\n gamesItem.setImage(image);\n gamesItem.setID(id);\n\n stringBuffer.append(gamesItem);\n data.add(gamesItem);\n }\n\n\n return data;\n }", "public void update(){\n\t\tArrayList<HashMap<String, String>> application_list = new ArrayList<HashMap<String, String>>();\n\t\t\n\t\t//This adds elements from the database to the listview\n\t\tSave save = new Save(this.view.getContext());\n\n\t\t//Get the preference for hide_incompatible\n\t\tSharedPreferences sharedPrefs = PreferenceManager.getDefaultSharedPreferences(view.getContext());\n\t\tboolean hideIncompatible = sharedPrefs.getBoolean(\"hide_incompatible\", false);\n\n\t\t//Iterate over all the apps from the local database\n\t\tfor(App app : save.getAllApps()){\n\n\t\t\t//Check if apps with category games shall be listed\n\t\t\tif(app.getCategory().equals(\"Games\") \n\t\t\t\t\t&& MainFragmentActivity.pagerAdapter.page1 == Page.GAMES_ALL \n\t\t\t\t\t|| MainFragmentActivity.pagerAdapter.page1 == Page.ALL){\n\n\t\t\t\t//The app should not be shown if the user has hide_incompatible = true and the app is not compatible\n\t\t\t\tif(save.getRequirementsByID(app.getRequirementID()).isCompatible()||!hideIncompatible){\n\n\t\t\t\t\t//Put the app in a HashMap that will be used in ListAdapter\n\t\t\t\t\tHashMap<String, String >map = new HashMap<String, String>();\n\t\t\t\t\tmap.put(ListAdapter.KEY_ID, String.valueOf(app.getID()));\n\t\t\t\t\tmap.put(ListAdapter.APP_NAME, app.getName());\n\t\t\t\t\tmap.put(ListAdapter.DISTRIBUTOR, save.getDeveloperByID(app.getDeveloperID()).getName());\n\t\t\t\t\tmap.put(ListAdapter.RATING, String.valueOf(app.getRating()));\n\t\t\t\t\tmap.put(ListAdapter.CATEGORY, app.getCategory());\n\t\t\t\t\tapplication_list.add(map);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t//Check if apps with category Medical shall be listed\n\t\t\telse if(app.getCategory().equals(\"Medical\") \n\t\t\t\t\t&& MainFragmentActivity.pagerAdapter.page1 == Page.MEDICAL_ALL \n\t\t\t\t\t|| MainFragmentActivity.pagerAdapter.page1 == Page.ALL){\n\n\t\t\t\t//The app should not be shown if the user has hide_incompatible = true and the app is not compatible\n\t\t\t\tif(save.getRequirementsByID(app.getRequirementID()).isCompatible() || !hideIncompatible){\n\n\t\t\t\t\t//Put the app in a HashMap that will be used in ListAdapter\n\t\t\t\t\tHashMap<String, String >map = new HashMap<String, String>();\n\t\t\t\t\tmap.put(ListAdapter.KEY_ID, String.valueOf(app.getID()));\n\t\t\t\t\tmap.put(ListAdapter.APP_NAME, app.getName());\n\t\t\t\t\tmap.put(ListAdapter.DISTRIBUTOR, save.getDeveloperByID(app.getDeveloperID()).getName());\n\t\t\t\t\tmap.put(ListAdapter.RATING, String.valueOf(app.getRating()));\n\t\t\t\t\tmap.put(ListAdapter.CATEGORY, app.getCategory());\n\n\t\t\t\t\tapplication_list.add(map);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t//Check if apps with category Tools shall be listed\n\t\t\telse if(app.getCategory().equals(\"Tools\") \n\t\t\t\t\t&& MainFragmentActivity.pagerAdapter.page1 == Page.TOOLS_ALL \n\t\t\t\t\t|| MainFragmentActivity.pagerAdapter.page1 == Page.ALL){\n\n\t\t\t\t//The app should not be shown if the user has hide_incompatible = true and the app is not compatible\n\t\t\t\tif(save.getRequirementsByID(app.getRequirementID()).isCompatible() || !hideIncompatible){\n\n\t\t\t\t\t//Put the app in a HashMap that will be used in ListAdapter\n\t\t\t\t\tHashMap<String, String >map = new HashMap<String, String>();\n\t\t\t\t\tmap.put(ListAdapter.KEY_ID, String.valueOf(app.getID()));\n\t\t\t\t\tmap.put(ListAdapter.APP_NAME, app.getName());\n\t\t\t\t\tmap.put(ListAdapter.DISTRIBUTOR, save.getDeveloperByID(app.getDeveloperID()).getName());\n\t\t\t\t\tmap.put(ListAdapter.RATING, String.valueOf(app.getRating()));\n\t\t\t\t\tmap.put(ListAdapter.CATEGORY, app.getCategory());\n\n\t\t\t\t\tapplication_list.add(map);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t//Check if apps with category Media shall be listed\n\t\t\telse if(app.getCategory().equals(\"Media\") \n\t\t\t\t\t&& MainFragmentActivity.pagerAdapter.page1 == Page.MEDIA_ALL \n\t\t\t\t\t|| MainFragmentActivity.pagerAdapter.page1 == Page.ALL){\n\n\t\t\t\t//The app should not be shown if the user has hide_incompatible = true and the app is not compatible\n\t\t\t\tif(save.getRequirementsByID(app.getRequirementID()).isCompatible() || !hideIncompatible){\n\n\t\t\t\t\t//Put the app in a HashMap that will be used in ListAdapter\n\t\t\t\t\tHashMap<String, String >map = new HashMap<String, String>();\n\t\t\t\t\tmap.put(ListAdapter.KEY_ID, String.valueOf(app.getID()));\n\t\t\t\t\tmap.put(ListAdapter.APP_NAME, app.getName());\n\t\t\t\t\tmap.put(ListAdapter.DISTRIBUTOR, save.getDeveloperByID(app.getDeveloperID()).getName());\n\t\t\t\t\tmap.put(ListAdapter.RATING, String.valueOf(app.getRating()));\n\t\t\t\t\tmap.put(ListAdapter.CATEGORY, app.getCategory());\n\n\t\t\t\t\tapplication_list.add(map);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tlist = (ListView)this.view.findViewById(R.id.list);\n\n\t\t// Getting adapter by passing xml data ArrayList\n\t\tadapter = new ListAdapter(this.view.getContext(), application_list); \n\t\tlist.setAdapter(adapter);\n\n\t\t// Click event for single list row\n\t\tlist.setOnItemClickListener(new OnItemClickListener() {\n\n\t\t\t@Override\n\t\t\tpublic void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n\n\t\t\t\t//Create a new intent for the application view\n\t\t\t\tIntent intent = new Intent(view.getContext(), AppView.class);\n\n\t\t\t\t//Fetch the application ID\n\t\t\t\tint appID = Integer.parseInt(adapter.getID(position));\n\n\t\t\t\t//Give the intent a message (which application to retreive from the db)\n\t\t\t\tintent.putExtra(\"app\", appID);\n\n\t\t\t\t//Start the activity\n\t\t\t\tstartActivity(intent);\n\t\t\t}\n\t\t});\t\n\t}", "List<Player> getViewers();", "public void addValueGames(){\n\n ModelListGames modelListGames = new ModelListGames(R.drawable.assassinscreedodyssey, R.drawable.assassinscreedodysseyfull, \"Assassin's Creed Odyssey\",\"Assassin's Creed Odyssey é um jogo eletrônico de RPG de ação produzido pela Ubisoft Quebec e publicado pela Ubisoft. É o décimo primeiro título principal da série Assassin's Creed e foi lançado em 5 de Outubro de 2018, para Microsoft Windows, PlayStation 4, Xbox One e Nintendo Switch. (Plataformas PS4, Xbox One, Computador e Switch)\" );\n this.gamesListAll.add(modelListGames);\n\n modelListGames = new ModelListGames(R.drawable.battlefield, R.drawable.battlefieldfull, \"Battlefield 1\", \"Battlefield 1 é um jogo eletrônico de tiro em primeira pessoa ambientado na Primeira Guerra Mundial, desenvolvido pela EA DICE e publicada pela Electronic Arts. É o décimo quarto jogo da franquia Battlefield. Foi lançado em outubro de 2016 para Microsoft Windows, PlayStation 4 e Xbox One.(Plataformas PS4, Xbox One, Computador e Switch)\");\n this.gamesListAll.add(modelListGames);\n\n modelListGames = new ModelListGames(R.drawable.daysgone, R.drawable.daysgonefull, \"Days Gone\", \"Days Gone é um jogo eletrônico de ação-aventura e sobrevivência desenvolvido pela SIE Bend Studio e publicado pela Sony Interactive Entertainment, sendo lançado exclusivamente para PlayStation 4 em 26 de abril de 2019.\");\n this.gamesListAll.add(modelListGames);\n\n modelListGames = new ModelListGames(R.drawable.fifa, R.drawable.fifafull, \"FIFA 20\", \"FIFA 20 é um jogo eletrônico de futebol desenvolvido e publicado pela EA Sports, lançado mundialmente em 27 de setembro de 2019. Este é o vigésimo sétimo título da série FIFA e o quarto a usar o mecanismo de jogo da Frostbite para Xbox One, PS4 e PC.\");\n this.gamesListAll.add(modelListGames);\n\n modelListGames = new ModelListGames(R.drawable.godofwar, R.drawable.godofwarfull, \"God of War III\", \"God of War III é um jogo eletrônico de ação-aventura e hack and slash desenvolvido pela Santa Monica Studio e publicado pela Sony Computer Entertainment. Foi lançado em 16 de março de 2010 para PlayStation 3.\");\n this.gamesListAll.add(modelListGames);\n\n modelListGames = new ModelListGames(R.drawable.granturismo, R.drawable.granturismofull, \"Gran Turismo Sport\", \"Gran Turismo Sport é um jogo eletrônico simulador de corrida desenvolvido pela Polyphony Digital e publicado pela Sony Interactive Entertainment. É o sétimo título principal da série Gran Turismo e foi lançado exclusivamente para PlayStation 4 em outubro de 2017.\");\n this.gamesListAll.add(modelListGames);\n\n modelListGames = new ModelListGames(R.drawable.homefront, R.drawable.homefrontfull, \"Homefront: The Revolution\", \"Homefront: The Revolution é um videogame de tiro em primeira pessoa desenvolvido pela Dambuster Studios e publicado pela Deep Silver para Microsoft Windows, PlayStation 4 e Xbox One. É a reinicialização / sequela do Homefront lançando em 17 de maio de 2016.\");\n this.gamesListAll.add(modelListGames);\n\n modelListGames = new ModelListGames(R.drawable.horizonzerodawn, R.drawable.horizonzerodawnfull, \"Horizon Zero Dawn\", \"Horizon Zero Dawn é um jogo eletrônico RPG de ação desenvolvido pela Guerrilla Games e publicado pela Sony Interactive Entertainment lançado em 28 de fevereiro de 2017.\");\n this.gamesListAll.add(modelListGames);\n\n modelListGames = new ModelListGames(R.drawable.infamous, R.drawable.infamousfull, \"Infamous: Second Son\", \"Infamous Second Son é um jogo eletrônico de ação-aventura produzido pela Sucker Punch Productions e publicado pela Sony Computer Entertainment em exclusivo para a PlayStation 4 em 21 de Março de 2014. \");\n this.gamesListAll.add(modelListGames);\n\n modelListGames = new ModelListGames(R.drawable.nioh, R.drawable.niohfull, \"Nioh 2\", \"Nioh 2 é um jogo eletrônico de RPG de ação desenvolvido pela Team Ninja e publicado pela Koei Tecmo no Japão e pela Sony Interactive Entertainment internacionalmente. É uma pré-sequência de Nioh e foi lançado em 13 de março de 2020 para PlayStation 4.\");\n this.gamesListAll.add(modelListGames);\n\n modelListGames = new ModelListGames(R.drawable.playerunknownsbattlegrounds, R.drawable.playerunknownsbattlegroundsfull, \"PlayerUnknown's Battlegrounds\", \"PlayerUnknown's Battlegrounds é um jogo eletrônico multiplayer desenvolvido pela PUBG Corp., subsidiária da produtora coreana Bluehole, utilizando o motor de jogo Unreal Engine 4 foi lançado em 30 de julho de 2016.\");\n this.gamesListAll.add(modelListGames);\n\n modelListGames = new ModelListGames(R.drawable.residentevil, R.drawable.residentevilfull, \"Resident Evil 2\", \"Resident Evil 2, chamado no Japão de Biohazard RE:2, é um jogo eletrônico de survival horror desenvolvido e publicado pela Capcom, sendo um remake do jogo original de 1998. Os jogadores controlam o policial novato Leon foi lançado em 25 de janeiro de 2019.\");\n this.gamesListAll.add(modelListGames);\n\n modelListGames = new ModelListGames(R.drawable.spiderman, R.drawable.spidermanfull, \"Spider-Man\", \"Spider-Man é um jogo eletrônico de ação-aventura desenvolvido pela Insomniac Games e publicado pela Sony Interactive Entertainment lançado em 7 de setembro de 2018.\");\n this.gamesListAll.add(modelListGames);\n\n modelListGames = new ModelListGames(R.drawable.starwarsjedi, R.drawable.starwarsjedifull, \"Star Wars Jedi: Fallen Order\", \"Star Wars Jedi: Fallen Order é um jogo eletrônico de ação-aventura desenvolvido pela Respawn Entertainment e publicado pela Electronic Arts foi lançado em 15 de novembro de 2019.\");\n this.gamesListAll.add(modelListGames);\n\n modelListGames = new ModelListGames(R.drawable.theevilwithin, R.drawable.theevilwithinfull, \"The Evil Within\", \"The Evil Within, chamado no Japão de PsychoBreak, é um jogo eletrônico de terror de sobrevivência desenvolvido pela Tango Gameworks e publicado pela Bethesda Softworks. Foi lançado mundialmente em outubro de 2014 para Microsoft Windows, PlayStation 3, PlayStation 4, Xbox 360 e Xbox One.\");\n this.gamesListAll.add(modelListGames);\n\n }", "private void populateListView(String [] likeNames){\n String[] entList = likeNames; // get from Client Model\n\n // Build Adapter\n ArrayAdapter<String> adapter = new ArrayAdapter<String>(\n this,\n com.example.abreezy.quickpitchproject.R.layout.items,\n entList\n );\n\n //Configure the list view\n ListView list = (ListView)findViewById(com.example.abreezy.quickpitchproject.R.id.listView);\n list.setAdapter(adapter);\n\n list.setOnItemClickListener(new AdapterView.OnItemClickListener() {\n @Override\n public void onItemClick(AdapterView<?> parent, View view, int position,\n long id) {\n\n String item = ((TextView)view).getText().toString();\n Intent intent = new Intent(InvLikesActivity.this, InvLikesProfilesActivity.class);\n intent.putExtra(\"index\", String.format(\"%d\", position));// pass the index to the next activity\n startActivity(intent);\n\n //Toast.makeText(getBaseContext(), item, Toast.LENGTH_LONG).show();\n\n //pass string into method for investorProfile\n // InvProfileActivity.setEntrepreneur(\"product name\", \"company name\");\n }\n });\n\n }", "private void populateUserPlaylitstsSection() {\n \tPlaylist dumyPlaylist = new Playlist();\n \tMap<Long, Playlist> playlistsMap = mDataManager.getStoredPlaylists();\n \tList<Playlist> playlists = new ArrayList<Playlist>();\n \t\n \t// Convert from Map<Long, Playlist> to List<Itemable> \n \tif (playlistsMap != null && playlistsMap.size() > 0) {\n \t\tfor(Map.Entry<Long, Playlist> p : playlistsMap.entrySet()){\n \t\t\tplaylists.add(p.getValue());\n \t\t}\n \t}\n\t\t\n \t// populates the favorite playlists.\n \tif (!Utils.isListEmpty(playlists)) {\n \t\tmContainerMyPlaylists.setVisibility(View.VISIBLE);\n \t\t// shows any internal component except the empty text.\n \t\tmTextMyPlaylist1Name.setVisibility(View.VISIBLE);\n \t\tmTextMyPlaylist2Name.setVisibility(View.VISIBLE);\n \t\tmTextMyPlaylist3Name.setVisibility(View.VISIBLE);\n \t\tmImageMoreIndicator.setVisibility(View.VISIBLE);\n \t\tmTextMyPlaylistEmpty.setVisibility(View.GONE);\n \t\t\n \t\tmTextMyPlaylistsValue.setText(Integer.toString(playlists.size()));\n \t\t\n \t\tStack<TextView> playlistsNames = new Stack<TextView>();\n \t\tplaylistsNames.add(mTextMyPlaylist3Name);\n \t\tplaylistsNames.add(mTextMyPlaylist2Name);\n \t\tplaylistsNames.add(mTextMyPlaylist1Name);\n\n \t\tTextView songName = null;\n \t\t\n \t\tfor (Playlist playlist : playlists) {\n \t\t\tif (playlistsNames.isEmpty())\n \t\t\t\tbreak;\n \t\t\t\n \t\t\tsongName = playlistsNames.pop();\n \t\t\tsongName.setText(playlist.getName());\n\t\t\t}\n \t\t\n \t} else {\n \t\tmContainerMyPlaylists.setVisibility(View.GONE);\n \t}\n\t}", "void DisplayMusic(){\n\n listView=(ListView)findViewById(R.id.allsongs_list_View);\n MusicLocation musicLocation=new MusicLocation();\n arrayList = musicLocation.getAllMusic(this,0);\n adapter=new ArrayAdapter<String>(this,android.R.layout.simple_list_item_1,arrayList);\n listView.setAdapter(adapter);\n\n\n\n listView.setOnItemClickListener(new AdapterView.OnItemClickListener() {\n @Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n\n //slice the song name\n String data=listView.getItemAtPosition(position).toString();\n String buffer[]=data.split(\":\");\n String buffer2[]=buffer[1].split(\"\\n\");\n String songName=buffer2[0];\n\n Toast.makeText(view.getContext(),songName,Toast.LENGTH_LONG).show();\n\n //send the song name to music actvity\n Intent intent=new Intent(view.getContext(),Play.class);\n intent.putExtra(\"SongName\",songName);\n startActivity(intent);\n }\n });\n\n\n }", "public void onlineLijst(){\n // maak de array shoppingList aan\n shoppingList = new ArrayList<>();\n // set de adapter en view van de lijst\n adapter = new ArrayAdapter(this, android.R.layout.simple_list_item_1, shoppingList);\n lv = (ListView) findViewById(R.id.listView);\n\n // lees de data uit de database aan de hand van de lijstId\n databaseShopping.addValueEventListener(new ValueEventListener() {\n @Override\n public void onDataChange(@NonNull DataSnapshot dataSnapshot) {\n // clear shoppingList\n shoppingList.clear();\n for (DataSnapshot productsSnapshot : dataSnapshot.child(lijstId).child(\"lijstProducts\").getChildren()) {\n String product = productsSnapshot.getValue(String.class);\n // add alle gevonden producten één voor één in de shoppingList\n shoppingList.add(product);\n }\n // sorteer de lijst\n Collections.sort(shoppingList);\n lv.setAdapter(adapter);\n\n // set variable tedoen gelijk aan totaal aantal producten in de lijst\n tedoen = shoppingList.size();\n }\n\n @Override\n public void onCancelled(@NonNull DatabaseError databaseError) {\n // failed to read value\n Snackbar.make(findViewById(R.id.actie_add), \"Database kan niet gelezen worden\", Snackbar.LENGTH_LONG)\n .setAction(\"Action\", null).show();\n }\n });\n\n // set klik listener op items in de lijst\n lv.setOnItemClickListener(new AdapterView.OnItemClickListener() {\n public void onItemClick(AdapterView parent, View view, int position, long id) {\n String selectedItem = ((TextView) view).getText().toString();\n // vink het aangeklikte product af of zet het terug\n switchElement(selectedItem, position);\n }\n });\n }", "@Override\n public void onClick(View view) {\n for (int m = 0; m < itemsOnlyList.length; m++){\n\n if(searchBar.getText().toString().equals(itemArray[m].getCardName().intern())){\n //Add the new card to the player hand array??\n playerCards.add(itemArray[m]);\n\n //Add the one card in question to this variable.\n playerCard = itemArray[m];\n\n //Leave the loop if a match is found\n break;\n }\n }\n\n updateListView(playerCards);\n }", "@Override\n public View getView(int position, View convertView, ViewGroup parent) {\n Game game = getItem(position);\n // Check if an existing view is being reused, otherwise inflate the view\n if (convertView == null) {\n convertView = LayoutInflater.from(getContext()).inflate(R.layout.row_game, parent, false);\n }\n // Lookup view for data population\n TextView gameName = (TextView) convertView.findViewById(R.id.gameName);\n TextView gameId = (TextView) convertView.findViewById(R.id.gameId);\n // Populate the data into the template view using the data object\n gameName.setText(game.name);\n gameId.setText(game.ID);\n // Return the completed view to render on screen\n return convertView;\n }", "public UsersListAdapter(Context context, ArrayList<Player> players) {\n super(context, R.layout.listview_row_highscore, players);\n this.usersArrayList = players;\n realm = Realm.getDefaultInstance();\n }", "public String showPlayList(){\n String dataPlayList = \"\";\n for(int i = 0; i<MAX_PLAYLIST; i++){\n if(thePlayLists[i] != null){\n thePlayLists[i].uptadeDurationFormat(thePlayLists[i].uptadeDuration());\n thePlayLists[i].changeGender(thePlayLists[i].uptadeGender());\n dataPlayList += thePlayLists[i].showDatePlayList();\n }\n }\n return dataPlayList;\n }", "@Override\n public void run() {\n PlayByPlay playByPlay = new PlayByPlay();\n gameleaderboardList.setAdapter(new GameScreenLeaderBoardList(GameScreenActivity.this, playersListtemp));\n gameleaderboardList.setDividerHeight(1);\n currentPlayerName.setText(Utility.user.getUserName());\n currentPlayerPoints.setText(getGamePoints());\n playerListSize.setText(\"(\" + playersList.size() + \")\");\n gsUserRank.setText(\"#\" + userObject.getUserRank());\n\n noOfPlaysInHeader.setText(getUserNoOfPlays() + \"\");\n noOfPlaysInAddPlays.setText(\"Balance: \" + getUserNoOfPlays() + \" plays\");\n\n }", "private void createListView()\n {\n itens = new ArrayList<ItemListViewCarrossel>();\n ItemListViewCarrossel item1 = new ItemListViewCarrossel(\"Guilherme Biff\");\n ItemListViewCarrossel item2 = new ItemListViewCarrossel(\"Lucas Volgarini\");\n ItemListViewCarrossel item3 = new ItemListViewCarrossel(\"Eduardo Ricoldi\");\n\n\n ItemListViewCarrossel item4 = new ItemListViewCarrossel(\"Guilh\");\n ItemListViewCarrossel item5 = new ItemListViewCarrossel(\"Luc\");\n ItemListViewCarrossel item6 = new ItemListViewCarrossel(\"Edu\");\n ItemListViewCarrossel item7 = new ItemListViewCarrossel(\"Fe\");\n\n ItemListViewCarrossel item8 = new ItemListViewCarrossel(\"iff\");\n ItemListViewCarrossel item9 = new ItemListViewCarrossel(\"Lucini\");\n ItemListViewCarrossel item10 = new ItemListViewCarrossel(\"Educoldi\");\n ItemListViewCarrossel item11 = new ItemListViewCarrossel(\"Felgo\");\n\n itens.add(item1);\n itens.add(item2);\n itens.add(item3);\n itens.add(item4);\n\n itens.add(item5);\n itens.add(item6);\n itens.add(item7);\n itens.add(item8);\n\n itens.add(item9);\n itens.add(item10);\n itens.add(item11);\n\n //Cria o adapter\n adapterListView = new AdapterLsitView(this, itens);\n\n //Define o Adapter\n listView.setAdapter(adapterListView);\n //Cor quando a lista é selecionada para ralagem.\n listView.setCacheColorHint(Color.TRANSPARENT);\n }", "private void setupListView() {\n potList = loadPotList();\n arrayofpots = potList.getPotDescriptions();\n refresher(arrayofpots);\n }", "private void showApps() {\n\n gridView = (GridView) findViewById(R.id.gridView1);\n\n ArrayAdapter<App> adapter = new ArrayAdapter<App>(this, R.layout.grid_item, appList) {\n @Override\n public View getView(int position, View convertView, ViewGroup parent) {\n if (convertView == null) {\n convertView = getLayoutInflater().inflate(R.layout.grid_item, null);\n }\n\n ImageView appIcon = (ImageView) convertView\n .findViewById(R.id.imageView1);\n appIcon.setImageDrawable(appList.get(position).icon);\n\n TextView appName = (TextView) convertView\n .findViewById(R.id.textView1);\n appName.setText(appList.get(position).appName);\n\n return convertView;\n }\n };\n\n gridView.setAdapter(adapter);\n }", "private void populateTimes() {\n\n int trackID = preferences.getInt(\"Track\", -1);\n int reverse = preferences.getInt(\"Reverse\", -1);\n Cursor topTimes = DBQueries.getTopTimes(trackID, reverse, \"liststring\", 3, database);\n Cursor latestTimes = DBQueries.getLatestTimes(trackID, reverse, \"liststring\", 3, database);\n\n ListView latestTimeList = (ListView) findViewById(R.id.latestTimes);\n ListView topTimesList = (ListView) findViewById(R.id.topTimes);\n\n ListAdapter topTimesAdapter = new SimpleCursorAdapter(\n this,\n R.layout.custom_listview_item,\n topTimes,\n new String[]{topTimes.getColumnName(topTimes.getColumnIndex(\"liststring\"))},\n new int[]{android.R.id.text1},\n 0);\n ListAdapter latestTimesAdapter = new SimpleCursorAdapter(\n this,\n R.layout.custom_listview_item,\n latestTimes,\n new String[]{latestTimes.getColumnName(latestTimes.getColumnIndex(\"liststring\"))},\n new int[]{android.R.id.text1},\n 0);\n\n topTimesList.setAdapter(topTimesAdapter);\n latestTimeList.setAdapter(latestTimesAdapter);\n\n Utilities.setListViewHeightFromContent(topTimesList);\n Utilities.setListViewHeightFromContent(latestTimeList);\n }", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.score);\n\t\tListView listview_diary = (ListView)findViewById(R.id.listview_score);\n\n\t\tDatabaseHelper dbHelper = new DatabaseHelper(this);\n\t\tSQLiteDatabase db = dbHelper.getWritableDatabase();\n\t\tScoreDao scoreDao = new ScoreDao(db);\n\t\tList<Score> scoreList = scoreDao.findAll();\n\t\tdb.close();\n\t\t\n\t\tArrayList<String> strList = new ArrayList<String>();\n\t\tfor (Score score2 : scoreList) {\n\t\t\tstrList.add(String.format(\"id: %d, score1: %d, score2: %d\", \n\t\t\t\t\tscore2.getRowid(), score2.getScore_team1(),score2.getScore_team2()));\n\t\t}\n\t\tString[] strArray = new String[strList.size()];\n\t\tString[] values = strList.toArray(strArray);\n\t\t\n\t\tArrayAdapter<String> adapter = new ArrayAdapter<String>(this, R.layout.text, values){\n\t\t\t@Override\n\t\t\tpublic View getView(int position, View convertView, ViewGroup parent) {\n\t\t\t\tView view = super.getView(position, convertView, parent);\n\t\t\t\treturn view;\n\t\t\t}\n\t\t};\n }", "private void showVenuesOnListview() {\n if(venues == null || venues.isEmpty()) return;\n\n // Get the view\n View view = getView();\n venueListView = view.findViewById(R.id.venue_listView);\n\n // connecting the adapter to recyclerview\n VenueListAdapter venueListAdapter = new VenueListAdapter(getActivity(), R.layout.item_venue_list, venues);\n\n // Initialize ItemAnimator, LayoutManager and ItemDecorators\n RecyclerView.LayoutManager layoutManager = new LinearLayoutManager(getContext());\n\n int verticalSpacing = 5;\n VerticalSpaceItemDecorator itemDecorator = new VerticalSpaceItemDecorator(verticalSpacing);\n\n // Set the LayoutManager\n venueListView.setLayoutManager(layoutManager);\n\n // Set the ItemDecorators\n venueListView.addItemDecoration(itemDecorator);\n venueListView.setAdapter(venueListAdapter);\n venueListView.setHasFixedSize(true);\n }", "public void displayUsers(){\n //go through the userName arraylist and add them to the listView\n for(String val:this.userNames){\n this.userListView.getItems().add(val);\n }\n }", "private void updateListView(ArrayList<MovieAPI> allmovies_list){\n\n moviesAPI_list = allmovies_list;\n\n mtitles_array = new String[allmovies_list.size()];\n\n for(int m=0; m<allmovies_list.size();m++){\n\n mtitles_array[m]=allmovies_list.get(m).getTitle();\n\n }\n\n\n final ArrayAdapter<String> adapter = new ArrayAdapter<String>(this, android.R.layout.simple_list_item_1, android.R.id.text1, mtitles_array);\n\n\n runOnUiThread(new Runnable() {\n public void run() {\n apiMoviesListview_m.setAdapter(adapter);\n }\n });\n\n\n apiMoviesListview_m.setOnItemClickListener(new AdapterView.OnItemClickListener() {\n @Override\n public void onItemClick(AdapterView<?> adapterView, View view, int position, long l) {\n // TODO Auto-generated method stub\n\n String value = adapter.getItem(position);\n\n switchToSingleRatingActivity(position);\n\n }\n });\n\n }", "@Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n String numReady = dataSnapshot.child(\"numReady\").getValue().toString();\n int numPlayers = Integer.parseInt(dataSnapshot.child(\"numPlayers\").getValue().toString());\n TextView playersReadyTextView = (TextView) findViewById(R.id.playersReadyTextView);\n playersReadyTextView.setText(numReady + \" / \" + String.valueOf(numPlayers));\n\n\n\n String status = dataSnapshot.child(\"players/\" + id + \"/status\").getValue().toString();\n RelativeLayout yourTargetLayout = (RelativeLayout) findViewById(R.id.yourTargetLayout);\n\n switch (status){\n case \"0\": // Waiting\n readyBar.setVisibility(View.VISIBLE);\n playersReadyView.setVisibility(View.VISIBLE);\n break;\n case \"1\": // Ready\n break;\n case \"3\": // Dead\n yourTargetLayout.setVisibility(View.GONE);\n break;\n default: // Alive\n targetID = dataSnapshot.child(\"players/\" + id + \"/target\").getValue().toString();\n String targetName = dataSnapshot.child(\"players/\" + targetID + \"/name\").getValue().toString();\n\n // If you are your own target, you've won the game.\n if (!id.equals(targetID)) {\n yourTargetLayout.setVisibility(View.VISIBLE);\n targetTextView.setText(targetName);\n }\n\n\n int numDead = Integer.parseInt(dataSnapshot.child(\"numDead\").getValue().toString());\n String numAlive = String.valueOf(numPlayers - numDead);\n\n playersInGameTextView.setText(numAlive + \" / \" + String.valueOf(numPlayers));\n }\n\n // Get every player in game\n final List<String> playerList = new ArrayList<String>();\n final List<Integer> playerStatusList = new ArrayList<Integer>();\n\n for (DataSnapshot child : dataSnapshot.child(\"players\").getChildren()) {\n playerList.add(String.valueOf(child.child(\"name\").getValue()));\n playerStatusList.add(Integer.parseInt(child.child(\"status\").getValue().toString()));\n }\n\n ListView playerListView = (ListView) findViewById(R.id.list_players);\n\n ArrayAdapter<String> adapter = new ArrayAdapter<String>(\n context,\n R.layout.list_item_players,\n android.R.id.text1,\n playerList\n ) {\n @Override\n public View getView(int position, View convertView, ViewGroup parent) {\n View view = super.getView(position, convertView, parent);\n\n TextView text1 = (TextView) view.findViewById(android.R.id.text1);\n TextView text2 = (TextView) view.findViewById(android.R.id.text2);\n\n text1.setText(playerList.get(position));\n switch (playerStatusList.get(position)) { // set status text and color\n case 0: // waiting\n text2.setText(\"waiting\");\n break;\n case 1: // ready\n text2.setText(\"ready\");\n text2.setTextColor(Color.BLUE);\n break;\n case 2: // alive\n text2.setText(\"alive\");\n text2.setTextColor(Color.GREEN);\n break;\n case 3: // dead\n text2.setText(\"dead\");\n text2.setTextColor(Color.RED);\n break;\n case 4: // winner\n text2.setText(\"winner\");\n text2.setTextColor(Color.GREEN);\n break;\n }\n return view;\n }\n };\n\n playerListView.setAdapter(adapter);\n }", "public String GetGamesList()\n\t{\n\t\tString gameslist = \"\";\n\t\tfor (int i = 0; i < gametype.length; i++)\n\t\t{\n\t\t\tgameslist += \"Game Number \" + i + \"\\t\" + gametype[i].GetName() + \"\\n\";\n\t\t\tif (gametype[i].Game_Status())\n\t\t\t{\n\t\t\t\tgameslist += \"There is currently a game in progress\\n\";\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tgameslist += \"No game is being played at the moment\\n\";\n\t\t\t}\n\n\t\t\tif (gametype[i].SizeofQueue() >= 2)\n\t\t\t{\n\t\t\t\tgameslist += \"Number of players in queue:\\t\" + gametype[i].SizeofQueue() + \"\\n\\n\";\n\t\t\t}\n\t\t\telse if (gametype[i].SizeofQueue() == 1)\n\t\t\t{\n\t\t\t\tgameslist += \"There is currently one player waiting to play a game\\n\\n\";\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tgameslist += \"There is currently nobody waiting to play a game\\n\\n\";\n\t\t\t}\n\t\t}\n\t\treturn gameslist;\n\t}", "private void generateDataList(List<Game> gameList) {\n recyclerView = findViewById(R.id.customRecyclerView);\n adapter = new CustomAdapter(this, gameList);\n RecyclerView.LayoutManager layoutManager = new LinearLayoutManager(MainActivity.this);\n recyclerView.setLayoutManager(layoutManager);\n recyclerView.setAdapter(adapter);\n }", "private void listTeams(String response) {\n //System.out.println(response);\n teamList = findViewById(R.id.teamList);\n JsonParser parser = new JsonParser();\n JsonElement tList = parser.parse(response);\n JsonArray tArray = tList.getAsJsonArray();\n for(JsonElement tElement: tArray) {\n View messageChunk = getLayoutInflater().inflate(R.layout.team_chunk,\n teamList, false);\n //populate chunk\n JsonObject tObject = tElement.getAsJsonObject();\n String key = tObject.get(\"key\").getAsString();\n Team t = new Team(tObject.get(\"team_number\").getAsString(), tObject.get(\"nickname\").getAsString(), key);\n //TextView teamName = messageChunk.findViewById(R.id.teamName);\n //TextView teamNumber = messageChunk.findViewById(R.id.teamNumber);\n //teamName.setText(t.getName());\n //teamNumber.setText(t.getNumber());\n teamKeys.put(key, t);\n //if (teamKeys.get(key).getThumbnail() != null) {\n // ImageView i = messageChunk.findViewById(R.id.teamImageThumb);\n // i.setImageBitmap(teamKeys.get(key).getThumbnail());\n\n //}\n\n //chunk onClicklistener\n //Intent selectedTeam = new Intent(this, TeamInfo.class);\n //selectedTeam.putExtra(\"key\", key);\n //messageChunk.setOnClickListener(unused -> startActivity(selectedTeam));\n //teamList.addView(messageChunk);\n }\n drawUI();\n }", "private void showListView() {\n Cursor data = mVehicleTypeDao.getData();\n // ArrayList<String> listData = new ArrayList<>();\n ArrayList<String> alVT_ID = new ArrayList<>();\n ArrayList<String> alVT_TYPE = new ArrayList<>();\n\n while (data.moveToNext()) {\n //get the value from the database in column 1\n //then add it to the ArrayList\n // listData.add(data.getString(6) + \" - \" + data.getString(1));\n alVT_ID.add(data.getString(0));\n alVT_TYPE.add(data.getString(1));\n\n\n }\n\n mListView = findViewById(R.id.listView);\n mListView.setAdapter(new ListVehicleTypeAdapter(this, alVT_ID, alVT_TYPE));\n\n //set an onItemClickListener to the ListView\n\n }", "@Override\n\tpublic void listMinutesPerGoal(View view) \n\t{\n\t\tIntent intent = new Intent(this, PlayerRatingPlayerListView.class);\n\t\tintent.putExtra(MainActivity.EXTRA_STATS_TYPE, new MinutesPerGoalListViewAdapter() );\n\t\tthis.startActivity(intent);\n\t}", "@Override\n\tpublic int getCount() {\n\t\treturn al_myplaylist.size();\n\t}", "@Override\n\tpublic int getCount() {\n\n\t\treturn m.getAl_homeplaylist().size();\n\t}", "@Override\n public void onStart() {\n super.onStart();\n\n getListView().setOnItemClickListener(new AdapterView.OnItemClickListener() {\n\n @Override\n public void onItemClick(AdapterView<?> av, View v, int pos,\n long id) {\n // TODO Auto-generated method stub\n\n Toast.makeText(getActivity(), data.get(pos).get(\"Player\"), Toast.LENGTH_SHORT).show();\n\n }\n });\n\n\n }", "@Override\n public void run() {\n gameleaderboardList.setAdapter(new PlayByPlayAdapter(GameScreenActivity.this, playByPlayArrayList, pointsSharedPreference.getString(Utility.game.getId() + \"\", \"0\")));\n gameleaderboardList.setDividerHeight(1);\n try {\n\n lastPlayPostionValueTextView.setText(playByPlayArrayList.get(0).getPlaybyPlayComments());\n resultViewHitRegion.setText(playByPlayArrayList.get(0).getPlaybyPlayComments());\n\n } catch (Exception e) {\n lastPlayPostionValueTextView.setText(\"err +NA\");\n }\n\n }", "@Override\n\tpublic void onActivityCreated(Bundle savedInstanceState){\n\t\tsuper.onActivityCreated(savedInstanceState);\n\t\t\n\t/* \n\t * This part does two things\n\t * First - It counts the number of items and displays them\n\t * Second - It displays the text in the \"\" which is a brief description of that item\n\t * Removing any of these will remove that item but be sure to edit ALL the cases below or your list\n\t * won't line up properly\n\t */\n\t\t\n\t\t/**\n\t\t ** NOTE: in order to have different views on tablet vs phones, I added an if/else statement to this\n\t\t ** section. Be sure to remove BOTH parts to remove it from phones and tablets. Failure to remove both\n\t\t ** parts will result in the app functioning differently on phones and tablets.\n\t\t **/\n\n\t\t/* \n\t\t * Sets the Title and description text for each GridView item\n\t\t * Check res/values/strings.xml to change text to whatever you want each GridView to say\n\t\t */\n\t\tboolean tabletSize = getResources().getBoolean(R.bool.isTablet);\n\t\tif (tabletSize) {\n\t\t\tgridView = (ScrollGridView)getView().findViewById(R.id.grid);\n\t\t\tlistOfStuff.add(new AdapterItem(getResources().getString (R.string.title_apply), \n\t\t\t\t\tgetResources().getString (R.string.desc_apply), 0));\n\t\t\tlistOfStuff.add(new AdapterItem(getResources().getString (R.string.title_walls), \n\t\t\t\t\tgetResources().getString (R.string.desc_walls), 1));\n\t\t\tlistOfStuff.add(new AdapterItem(getResources().getString (R.string.title_request), \n\t\t\t\t\tgetResources().getString (R.string.desc_request), 2));\n\t\t\tlistOfStuff.remove(new AdapterItem(getResources().getString (R.string.title_info), \n\t\t\t\t\tgetResources().getString (R.string.desc_info), 3));\n\n\t\t\t\n\t\t} else {\n\t\t\tgridView = (ScrollGridView)getView().findViewById(R.id.grid);\n\t\t\tlistOfStuff.add(new AdapterItem(getResources().getString (R.string.title_apply), \n\t\t\t\t\tgetResources().getString (R.string.desc_apply), 0));\n\t\t\tlistOfStuff.add(new AdapterItem(getResources().getString (R.string.title_walls), \n\t\t\t\t\tgetResources().getString (R.string.desc_walls), 1));\n\t\t\tlistOfStuff.add(new AdapterItem(getResources().getString (R.string.title_request), \n\t\t\t\t\tgetResources().getString (R.string.desc_request), 2));\n\t\t\tlistOfStuff.add(new AdapterItem(getResources().getString (R.string.title_info), \n\t\t\t\t\tgetResources().getString (R.string.desc_info), 3));\n\t\t}\n\n\t\t/**\n\t\t ** NOTE: in order to have different views on tablet vs phones, I added an if/else statement to this\n\t\t ** section. Be sure to remove both parts to remove it from phones and tablets. Failure to remove both\n\t\t ** parts will result in the app functioning differently on phones and tablets.\n\t\t **/\n\t\t\tMainAdapter adapter = new MainAdapter(getActivity(), listOfStuff);\n\t\n\t\t\tgridView.setAdapter(adapter);\n\t\t\tgridView.setExpanded(true);\n\t\t\tgridView.setOnItemClickListener(new OnItemClickListener() {\n\t\t\t\tpublic void onItemClick(AdapterView<?> parent, View v, int position, long id) {\n\t\t\t\t\t\n\t\t\t\t\t@SuppressWarnings(\"unused\")\n\t\t\t\t\tMainFragment gridContentT = null;\n\t\t\t\t\t\n\t\t\t\t\tboolean tabletSize = getResources().getBoolean(R.bool.isTablet);\n\t\t\t\t\tif (tabletSize) { // For TABLETS\n\t\t\t\t\t\t\n\t\t\t\t\t\tswitch (position) {\n\t\t\t\t\tcase APPLY:\n\t\t\t\t\t\tIntent launcher = new Intent(getSherlockActivity(), ApplyLauncherMain.class);\n\t\t\t\t\t\tstartActivity(launcher);\n\t\t\t \tbreak;\n\t\t\t\t\tcase WALLPAPER:\n\t\t\t\t\t\tIntent wall = new Intent(getSherlockActivity(), Wallpaper.class);\n\t\t\t\t\t\tstartActivity(wall);\n\t\t\t \tbreak;\n\t\t\t\t\tcase REQUEST:\n\t\t\t\t\t\tIntent request = new Intent(getSherlockActivity(), RequestActivity.class);\n\t\t\t\t\t\tstartActivity(request);\n\t\t\t \tbreak;\n\t\t\t\t\t\t}\t\n\t\t\t\t} else {\t// For PHONES\n\t\t\t\t\tswitch (position) {\n\t\t\t\t\tcase APPLY:\n\t\t\t\t\t\tIntent launcher = new Intent(getSherlockActivity(), ApplyLauncherMain.class);\n\t\t\t\t\t\tstartActivity(launcher);\n\t\t \t\tbreak;\n\t\t\t\t\tcase WALLPAPER:\n\t\t\t\t\t\tIntent wall = new Intent(getSherlockActivity(), Wallpaper.class);\n\t\t\t\t\t\tstartActivity(wall);\n\t\t \t\tbreak;\n\t\t\t\t\tcase REQUEST:\n\t\t\t\t\t\tIntent request = new Intent(getSherlockActivity(), RequestActivity.class);\n\t\t\t\t\t\tstartActivity(request);\n\t\t \t\tbreak;\n\t\t\t\t\tcase THEMEINFO:\n\t\t\t\t\t\tIntent aboutTheme = new Intent(getSherlockActivity(), AboutThemeActivity.class);\n\t\t\t\t\t\tstartActivity(aboutTheme);\n\t\t \t\tbreak;\n\t\t \t\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t}\t\n\t\t\t});\n\t\t\t\n\t}", "public static void onListClickHandle(final ListView lv,\n final Dialog dialog,\n final Context context,\n final Game game,\n final DatabaseHandlerInternal dbi,\n final DatabaseHandlerResort dbr,\n final List<Player> players) {\n\n lv.setOnItemClickListener(new AdapterView.OnItemClickListener() {\n\n @Override\n public void onItemClick(AdapterView<?> arg0, android.view.View arg1, int arg2, long arg3) {\n\n /** Nastaveni aktualne zvoleneho hrace **/\n ((CurrentScore)context).setPlayer(players.get(arg2));\n\n /** Vypocet noveho score **/\n ((CurrentScore)context)\n .displayScore(ScoreCardCounting.countScorecard(game, players.get(arg2), dbi, dbr,context));\n\n dialog.hide();\n }\n });\n\n }", "@Override\n public int getItemCount() {\n return players.size();\n }", "public void displayItems(){\n\n //Prepare Item ArrayList\n ArrayList<Item> itemList = new ArrayList<Item>();\n\n Cursor results = items_db_helper.getRecords();\n\n while(results.moveToNext()){\n int _id = results.getInt(results.getColumnIndex(DatabaseTables.InventoryItems.ITEM_ID));\n String item_title = results.getString(results.getColumnIndex(DatabaseTables.InventoryItems.ITEM_TITLE));\n int quantity_in_stock = results.getInt(results.getColumnIndex(DatabaseTables.InventoryItems.QUANTITY_IN_STOCK));\n double item_price = results.getDouble(results.getColumnIndex(DatabaseTables.InventoryItems.ITEM_PRICE));\n byte[] item_thumbnail_byte = results.getBlob(results.getColumnIndex(DatabaseTables.InventoryItems.ITEM_THUMBNAIL));\n Bitmap item_thumbnail = BitmapFactory.decodeByteArray(item_thumbnail_byte, 0, item_thumbnail_byte.length);\n\n //Create an Item object and store these data here (at this moment we will only extract data relevant to list item\n Item item = new Item();\n item.setItemId(_id);\n item.setItemTitle(item_title);\n item.setItemPrice(item_price);\n item.setItemThumbnail(item_thumbnail);\n item.setQuantityInStock(quantity_in_stock);\n\n itemList.add(item);\n }\n\n final ListView listView = (ListView) findViewById(R.id.item_list);\n listView.setItemsCanFocus(false);\n listView.setEmptyView(findViewById(R.id.empty_list_text));\n ItemAdapter itemAdapter = new ItemAdapter(MainActivity.this, itemList);\n listView.setAdapter(itemAdapter);\n listView.setOnItemClickListener(new AdapterView.OnItemClickListener() {\n @Override\n public void onItemClick(AdapterView<?> adapterView, View view, int i, long l) {\n Item curr_item = (Item) listView.getItemAtPosition(i);\n Intent details_intent = new Intent(MainActivity.this, DetailsActivity.class);\n details_intent.putExtra(\"item_id\", curr_item.getItemId());\n startActivity(details_intent);\n }\n });\n\n }", "private void updateTableView(List<Game> loadedGames) {\n\n if (loadedGames != null) {\n tableViewList = FXCollections.observableArrayList(loadedGames);\n }\n\n // apply filters\n FilteredList<Game> filteredData = new FilteredList<>(tableViewList, p -> true);\n\n // Filter on already set checkbox && text\n filteredData.setPredicate(p -> predicateCheck(p));\n\n // Listener for filter text change\n txtFilter.textProperty().addListener((observable, oldValue, newValue) -> {\n filteredData.setPredicate(game -> {\n return predicateCheck(game);\n });\n });\n\n // Filter for cb change\n cbFilterNonAchievement.selectedProperty().addListener((observable, oldValue, newValue) -> {\n filteredData.setPredicate(game -> {\n return predicateCheck(game);\n });\n });\n\n // Update label on change\n filteredData.addListener((Change<? extends Game> c) -> {\n updateInfoLabel();\n });\n\n SortedList<Game> sortedData = new SortedList<>(filteredData);\n sortedData.comparatorProperty().bind(tableView.comparatorProperty());\n\n tableView.setItems(sortedData);\n tableView.refresh();\n\n updateInfoLabel();\n\n }", "private void initEnrolledUsersListView() {\n\n\t\tSet<EnrolledUser> users = controller.getActualCourse().getEnrolledUsers();\n\n\t\tObservableList<EnrolledUser> observableUsers = FXCollections.observableArrayList(users);\n\t\tobservableUsers.sort(EnrolledUser.NAME_COMPARATOR);\n\t\tfilteredEnrolledList = new FilteredList<>(observableUsers);\n\t\tfilteredEnrolledList.predicateProperty().addListener(p -> updatePredicadeEnrolledList());\n\t\t// Activamos la selección múltiple en la lista de participantes\n\t\tlistParticipants.getSelectionModel().setSelectionMode(SelectionMode.MULTIPLE);\n\n\t\tlistParticipants.getSelectionModel().getSelectedItems()\n\t\t\t\t.addListener((Change<? extends EnrolledUser> usersSelected) -> updateListViewEnrolledUser());\n\n\t\t/// Mostramos la lista de participantes\n\t\tlistParticipants.setItems(filteredEnrolledList);\n\n\t\tlistParticipants.setCellFactory(callback -> new ListCell<EnrolledUser>() {\n\t\t\t@Override\n\t\t\tpublic void updateItem(EnrolledUser user, boolean empty) {\n\t\t\t\tsuper.updateItem(user, empty);\n\t\t\t\tif (empty || user == null) {\n\t\t\t\t\tsetText(null);\n\t\t\t\t\tsetGraphic(null);\n\t\t\t\t} else {\n\t\t\t\t\tInstant lastCourseAccess = user.getLastcourseaccess();\n\t\t\t\t\tInstant lastAccess = user.getLastaccess();\n\t\t\t\t\tInstant lastLogInstant = controller.getActualCourse().getLogs().getLastDatetime().toInstant();\n\t\t\t\t\tsetText(user + \"\\n\" + I18n.get(\"label.course\")\n\t\t\t\t\t\t\t+ UtilMethods.formatDates(lastCourseAccess, lastLogInstant) + \" | \"\n\t\t\t\t\t\t\t+ I18n.get(\"text.moodle\") + UtilMethods.formatDates(lastAccess, lastLogInstant));\n\n\t\t\t\t\tsetTextFill(LastActivityFactory.getColorActivity(lastCourseAccess, lastLogInstant));\n\n\t\t\t\t\ttry {\n\t\t\t\t\t\tImage image = new Image(new ByteArrayInputStream(user.getImageBytes()), 50, 50, false, false);\n\t\t\t\t\t\tsetGraphic(new ImageView(image));\n\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\tLOGGER.error(\"No se ha podido cargar la imagen de: {}\", user);\n\t\t\t\t\t\tsetGraphic(new ImageView(new Image(\"/img/default_user.png\")));\n\t\t\t\t\t}\n\t\t\t\t\tContextMenu menu = new ContextMenu();\n\t\t\t\t\tMenuItem seeUser = new MenuItem(I18n.get(\"text.see\") + user);\n\t\t\t\t\tseeUser.setOnAction(e -> userInfo(user));\n\t\t\t\t\tmenu.getItems().addAll(seeUser);\n\t\t\t\t\tsetContextMenu(menu);\n\t\t\t\t}\n\t\t\t}\n\n\t\t});\n\t}", "@Override\n\tpublic List<Games> allGamesView() {\n\t\treturn gameDAO.viewAllGame();\n\t}", "public void loadListView(ArrayList<LonelyPicture> picList){\n \t\n\t\t\t\t\n\n\t\t adapter = new ArrayAdapter<LonelyPicture>(getActivity().getApplicationContext(),\n\t\t android.R.layout.simple_list_item_multiple_choice, android.R.id.text1, picList);\n\t\t \n\n\t\t picListView.setChoiceMode(ListView.CHOICE_MODE_SINGLE);\n\t\t picListView.setAdapter(adapter);\n\t\t\n\t\t \n\t\t //picListView = (ListView) findViewById(R.id.picListView);\n\t\t//will this really work?\n\t\t\n\t\t\t picListView = (ListView) getActivity().findViewById(R.id.picListView);\n\t\t\t picListView.setOnItemClickListener(new OnItemClickListener() {\n\t\t\t\t\t\n\t\t\t\t public void onItemClick(AdapterView<?> a, View v, int i, long l){\n\t\t\t\t\t MainActivity.fetch = (LonelyPicture) picListView.getItemAtPosition(i);\n\t\t\t\t\tMainActivity.printList.add((LonelyPicture) picListView.getItemAtPosition(i));\n\t\t\t\t\tButton right = (Button) getActivity().findViewById(R.id.show_and_back_button);\n\t\t\t\t\tright.setEnabled(true);\n\t\t\t\t\tLog.e(\"From picListFragment--guid\", MainActivity.fetch.getGUID());\n\t\t\t\t\t\n\t\t\t\t }});\n\t\t \n }", "private void populateList(){\n //Build name list\n this.names = new String[] {\"Guy1\",\"Guy2\",\"Guy3\",\"Guy4\",\"Guy5\",\"Guy6\"};\n //Get adapter\n //ArrayAdapter<String>(Context, Layout to be used, Items to be placed)\n ArrayAdapter<String> adapter = new ArrayAdapter<String>(this, R.layout.list_items, names);\n //Filling the list view\n ListView list = findViewById(R.id.transaction_list);\n list.setAdapter(adapter);\n }", "public void displayPlayerWinnings()\n {\n for(int card = 0; card < playerCardsWon; card++)\n {\n System.out.println(playerWinnings[card].toString());\n }\n }", "private void populateUsersList() {\n ArrayList<User> arrayOfUsers = User.getUsers();\n // Create the adapter to convert the array to views\n CustomListAdapter adapter = new CustomListAdapter(this, arrayOfUsers);\n // Attach the adapter to a ListView\n ListView listView = (ListView) findViewById(R.id.lvUsers);\n listView.setAdapter(adapter);\n\n listView.setOnItemClickListener(new AdapterView.OnItemClickListener() {\n @Override\n public void onItemClick(AdapterView<?> adapterView, View view, int i, long l) {\n Toast.makeText(getApplicationContext(),\n \"possition \" + i, Toast.LENGTH_LONG).show();\n if (i == 0) {\n Intent creditCardReader = new Intent(MainActivity.this, PassportReader.class);\n startActivity(creditCardReader);\n } else if (i == 1) {\n Intent creditCardReader = new Intent(MainActivity.this, CreditCardReader.class);\n startActivity(creditCardReader);\n }\n }\n });\n }", "@Override\r\n\tpublic int getCount() {\n\t\treturn m_ScoreList.size();\r\n\t}", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_playlist);\n\n ImageButton exit = (ImageButton) findViewById(R.id.imageButton);\n exit.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n finish();\n }\n\n });\n\n Intent intent = getIntent();\n final String UserID = intent.getStringExtra(MainActivity.EXTRA);\n\n ArrayList<String> lp = getPlaylistRefs(UserID); //Returns an empty list\n Log.e(\"Tag\", \"onCreate: \"+lp);\n try {\n ArrayList<Playlist> pl = getUserAccessPlaylist(lp); //Retuns an empy list\n ListView lv=(ListView) findViewById(R.id.listview);\n PlaylistAdapter adapter = new PlaylistAdapter(getBaseContext(), getParent(), pl);\n lv.setAdapter(adapter);\n }catch (Exception e){}\n }", "private void setPlayList() {\n int[] rawValues = {\n R.raw.bensoundbrazilsamba,\n R.raw.bensoundcountryboy,\n R.raw.bensoundindia,\n R.raw.bensoundlittleplanet,\n R.raw.bensoundpsychedelic,\n R.raw.bensoundrelaxing,\n R.raw.bensoundtheelevatorbossanova\n };\n String[] countryList = {\n \"Brazil\",\n \"USA\",\n \"India\",\n \"Iceland\",\n \"South Korea\",\n \"Indonesia\",\n \"Brazil\"\n };\n String [] descriptions = {\n \"Samba is a Brazilian musical genre and dance style, with its roots in Africa via the West African slave trade religious particularly of Angola and African traditions.\",\n \"Country music is a genre of American popular originated Southern States in the 1920s music that in the United\",\n \"The music of India includes multiple varieties of folk music, pop, and Indian classical music. India's classical music tradition, including Hindustani music and Carnatic, has a history spanning millennia and developed over several eras\",\n \"The music of Iceland includes vibrant folk and pop traditions. Well-known artists from Iceland include medieval music group Voces Thules, alternative rock band The Sugarcubes, singers Björk and Emiliana Torrini, post- rock band Sigur Rós and indie folk/indie pop band Of Monsters and Men\",\n \"The Music of South Korea has evolved over the course of the decades since the end of the Korean War, and has its roots in the music of the Korean people, who have inhabited the Korean peninsula for over a millennium. Contemporary South Korean music can be divided into three different categories: Traditional Korean folk music, popular music, or K- pop, and Western- influenced non-popular music\",\n \"The music of Indonesia demonstrates its cultural diversity, the local musical creativity, as well as subsequent foreign musical influences that shaped contemporary music scenes of Indonesia. Nearly thousands Indonesian having its own cultural and artistic history and character Nearly of islands\",\n \"Samba is a Brazilian musical genre and dance style, with its roots in Africa via the West African slave trade religious particularly of Angola\"\n };\n\n for (int i = 0; i < rawValues.length; i++) {\n this.mPlayList.add(rawValues[i]);\n this.mTrackList.add(new Track(this.getResources().getResourceEntryName(rawValues[i]),\n countryList[i],descriptions[i],rawValues[i]));\n }\n }", "@Override\n\tpublic int getCount() {\n\t\treturn ArrayList.size();\n\t}", "private void setupListView() {\n viewModel.getPeriodString().observe(this, (string) -> {\n if(string != null) {\n TextView periodTextView = findViewById(R.id.tvTimeFrame);\n periodTextView.setText(string);\n }\n });\n SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this);\n int size = prefs.getInt(\"hourSize\", getResources().getInteger(R.integer.hourSizeDefault));\n viewModel.getAppointments().observe(this, (appointments) -> {\n if(appointments != null) {\n for(int day = 0; day < appointments.size(); day++) {\n AppointmentAdapter adapter = new AppointmentAdapter(this, size, popup, viewModel);\n adapter.setList(appointments.get(day));\n listViews.get(day).setAdapter(adapter);\n }\n }\n });\n HourAdapter adapter = new HourAdapter(this, this, size);\n viewModel.getTimeSlots().observe(this, adapter::setList);\n timeSlotView.setAdapter(adapter);\n final Handler handler = new Handler();\n handler.postDelayed(new Runnable() {\n @Override\n public void run() {\n adapter.notifyDataSetChanged();\n handler.postDelayed(this, 60*1000);\n }\n }, 60*1000);\n }", "private void populateListView() {\n ArrayAdapter<Representative> adapter = new MyListAdapter();\n ListView list = (ListView) findViewById(R.id.repListView);\n list.setAdapter(adapter);\n }", "@Override\n public View getView ( int position, View convertView, ViewGroup parent ) {\n convertView = (LinearLayout) inflater.inflate( resource, null );\n\n /* Extract the SWMovie object to show. getItem() comes from ArrayAdapter class */\n Lesson lesson = getItem(position);\n\n\n /* set SWMovie movie in movie TextView. getMovie is from our SWMovie class */\n TextView txtLesson = (TextView) convertView.findViewById(R.id.lesson);\n txtLesson.setText(lesson.getName());\n\n /* set SWMovie episode in episode TextView */\n TextView txtTurn = (TextView) convertView.findViewById(R.id.turn);\n txtTurn.setText(lesson.getTurn());\n\n TextView txtId = (TextView) convertView.findViewById(R.id.lesson_id);\n txtId.setText(\"\"+lesson.getId());\n\n return convertView;\n }", "private void LoadList() {\n try {\n //get the list\n ListView termListAdpt = findViewById(R.id.assessmentListView);\n //set the adapter for term list\n AssessmentAdapter = new ArrayAdapter<String>(AssessmentActivity.this, android.R.layout.simple_list_item_1, AssessmentData.getAssessmentsbyNames());\n termListAdpt.setAdapter(AssessmentAdapter);\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n }", "public ArrayList<GamesItemHome> getTopAppsData() {\n\n ArrayList<GamesItemHome> data = new ArrayList<>();\n SQLiteDatabase db = this.getWritableDatabase();\n Cursor cursor = db.rawQuery(\"select * from \" + DATABASE_TABLE_TOP_APPS + \" ;\", null);\n StringBuffer stringBuffer = new StringBuffer();\n GamesItemHome gamesItem = null;\n while (cursor.moveToNext()) {\n gamesItem = new GamesItemHome();\n String id =cursor.getString(cursor.getColumnIndexOrThrow(\"_id\"));\n String title = cursor.getString(cursor.getColumnIndexOrThrow(\"title\"));\n String category = cursor.getString(cursor.getColumnIndexOrThrow(\"category\"));\n String image = cursor.getString(cursor.getColumnIndexOrThrow(\"image\"));\n String featured_image= cursor.getString(cursor.getColumnIndexOrThrow(\"featured_image\"));\n\n gamesItem.setID(id);\n gamesItem.setTitle(title);\n gamesItem.setCategory(category);\n gamesItem.setImage(image);\n gamesItem.setFeautred_image(featured_image);\n\n stringBuffer.append(gamesItem);\n data.add(gamesItem);\n }\n\n\n return data;\n }", "private void populateListView() {\n List<String> groupNames = new ArrayList<String>();\n for (Pair<String, Group> pair : savedGroups) {\n groupNames.add(pair.first);\n }\n if (groupsListAdapter != null) {\n groupsListAdapter.clear();\n groupsListAdapter.addAll(groupNames);\n groupsListAdapter.notifyDataSetChanged();\n }\n }", "private void getExamsList() {\r\n\r\n\t// if(!ApplicationData.isFileExists(appData.getExamsListFile())){\r\n\r\n\t// downloadExamsList();\r\n\r\n\t// return;\r\n\t// }\r\n\ttry{\r\n\t final String content = ApplicationData.readFile(appData\r\n\t\t .getExamsListFile());\r\n\t Logger.warn(tag, \"Exams list json is:\" + content);\r\n\t examsArrayList = JSONParser.getExamsList(ApplicationData\r\n\t\t .readFile(appData.getExamsListFile()));\t\t\t\r\n\t} catch (final Exception e) {\r\n\t Logger.error(tag, e);\r\n\t ToastMessageForExceptions(R.string.JSON_PARSING_EXCEPTION);\r\n\t backToDashboard();\r\n\t}\r\n\tif (examsArrayList.size() == 0) {\r\n\t emptystatus.bringToFront();\r\n\t emptystatus.setText(R.string.empty_status);\r\n\t examsList.setVisibility(View.GONE);\r\n\t ll.setVisibility(View.GONE);\r\n\t} else {\r\n\t emptystatus.setVisibility(View.GONE);\r\n\t examsList.bringToFront();\r\n\t}\r\n\r\n\tfinal ExamslistArrayAdapter examAdapter = new ExamslistArrayAdapter(\r\n\t\tactivityContext, R.layout.examlist_row, examsArrayList);\r\n\r\n\texamAdapter.sort(new Comparator<ExamDetails>() {\r\n\r\n\t @Override\r\n\t public int compare(ExamDetails lhs, ExamDetails rhs) {\r\n\t\tfinal Date startDate = new Date(lhs.getStartDate());\r\n\t\tfinal Date endDate = new Date(rhs.getStartDate());\r\n\t\treturn startDate.compareTo(endDate);\r\n\t }\r\n\t});\r\n\r\n\texamsList.setAdapter(examAdapter);\r\n\texamAdapter.notifyDataSetChanged();\r\n\t/*\r\n\t * examsList.setAdapter(new ExamslistArrayAdapter(activityContext,\r\n\t * R.layout.examlist_row, examsArrayList));\r\n\t */\r\n }", "@Override\n\tpublic int getCount() {\n\t\treturn upcomingList.size();\n\t}", "public void updateListView(){\n mAdapter = new ListViewAdapter(getActivity(),((MainActivity)getActivity()).getRockstarsList());\n mRockstarsListView.setAdapter(mAdapter);\n }", "@SuppressLint(\"SetTextI18n\")\n @Override\n public View getView(int position, View view, ViewGroup viewGroup) {\n ViewHolder holder;\n if (view == null) {\n view = inflater.inflate(R.layout.scoreboard_layout, viewGroup, false);\n holder = new ViewHolder();\n\n holder.rank = view.findViewById(R.id.rank);\n holder.playerName = view.findViewById(R.id.playerName);\n holder.pokemonNum = view.findViewById(R.id.pokemonNum);\n holder.pokemonLV = view.findViewById(R.id.pokemonLV);\n\n view.setTag(holder);\n } else holder = (ViewHolder) view.getTag();\n\n Player player = playerList.get(position);\n holder.rank.setText(position + 1 + \". \");\n holder.playerName.setText(player.getName() + \" (\" + player.getGender() + \")\");\n holder.pokemonNum.setText(player.getPokemonList().size() + \"\");\n holder.pokemonLV.setText(player.getPlayerPokemonMaxLV() + \"\");\n\n return view;\n }", "private void showListView()\n {\n SimpleCursorAdapter adapter = new SimpleCursorAdapter(\n this,\n R.layout.dataview,\n soldierDataSource.getCursorALL(), //\n _allColumns,\n new int[]{ R.id.soldierid, R.id.username, R.id.insertedphone, R.id.password},\n 0);\n\n table.setAdapter(adapter);\n }", "private void updateListView() {\n ArrayAdapter<String> adapter = new ArrayAdapter<String>(this, R.layout.textview, geofences);\n ListView list = (ListView) findViewById(R.id.listView);\n list.setAdapter(adapter);\n }", "private void initializeView(View view){\n String[] masterList = Friends.masterListFriends;\n int arrLength = masterList.length;\n\n final ListView lv = (ListView) view.findViewById(R.id.new_friend_listView);\n\n // This is the array adapter, it takes the context of the activity as a\n // first parameter, the type of list view as a second parameter and your\n // array as a third parameter.\n ArrayAdapter<String> arrayAdapter = new ArrayAdapter<String>(\n view.getContext(),\n android.R.layout.simple_list_item_1,\n masterList );\n\n lv.setAdapter(arrayAdapter);\n\n lv.setOnItemClickListener(new AdapterView.OnItemClickListener() {\n\n @Override\n public void onItemClick(AdapterView<?> arg0, View arg1, int position, long arg3) {\n String passedName = (String) lv.getItemAtPosition(position);\n //set intent with the name\n Intent intent = new Intent(getActivity(),SpecificPersonInfo.class);\n intent.setType(\"text/plain\");\n intent.putExtra(\"name\",passedName);\n startActivity(intent);\n\n }\n });\n\n }", "@Override\n public void onResponse(Call call, final Response response) throws IOException {\n if (!response.isSuccessful()) {\n throw new IOException(\"Unexpected code \" + response);\n }\n\n\n final Gson gson = new Gson();\n final String responseData = response.body().string();\n\n Type type = new TypeToken<ArrayList<Game>>() {\n }.getType();\n final List<Game> gameList = gson.fromJson(responseData, type);\n// Log.i(\"mains\", \"2sendCloth\" + gameList.size() + \"\");\n\n MainActivity.this.runOnUiThread(new Runnable() {\n @Override\n public void run() {\n try {\n int pos = mGameList.size();\n mGameList.addAll(pos, gameList);\n adapter.notifyItemRangeInserted(pos, gameList.size());\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n });\n }", "public void populateListView() {\n\n\n }", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_list_games);\n }", "public void refreshListClicked(View view){\n\n mPetList = ((ListView) findViewById(R.id.pet_list_view));\n\n final ArrayAdapter<String> adapter = new ArrayAdapter<String>(this, android.R.layout.simple_expandable_list_item_1, petList);\n mPetList.setAdapter(adapter);\n }", "private void loadList(int number)\n {\n ArrayList<Movie> sort = new ArrayList<>();\n title.setText(\"Page \"+(number+1)+\" of \"+pageCount);\n\n int start = number * NUM_ITEMS_PAGE;\n for(int i=start;i<(start)+NUM_ITEMS_PAGE;i++)\n {\n if(i < movieList.size())\n {\n sort.add(movieList.get(i));\n }\n else\n {\n break;\n }\n }\n\n adapter = new MovieListViewAdapter(sort, this);\n listView.setAdapter(adapter);\n\n listView.setOnItemClickListener(new AdapterView.OnItemClickListener() {\n @Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n //Person person = people.get(position);\n //String message = String.format(\"Clicked on position: %d, name: %s, %d\", position, person.getName(), person.getBirthYear());\n //Toast.makeText(getApplicationContext(), message, Toast.LENGTH_SHORT).show();\n Movie single_movie = movieList.get(position);\n goToSingleMovie(single_movie);\n\n }\n });\n\n }", "@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\tIntent intent = getIntent();\n\t\tBundle bundle = intent.getExtras();\n\t\t\n\t\tString[] matches = bundle.getStringArray(\"matches\");\n\t\tLog.d(\"Testing sending array between activities\", matches[0]);\n\t\t\n\t\tsetContentView(R.layout.activity_speechcraft);\n\n\t\t // ArrayAdapters convert an array into a set of views that can be loaded into a listview\n\t\t// Update wordList with strings within matches array\n\t\t ArrayAdapter<String> wordAdapter = new ArrayAdapter<String>(this, android.R.layout.simple_list_item_1, matches);\n\t\t wordsList = (ListView) findViewById(R.id.speechmatches);\n\t\t wordsList.setChoiceMode(ListView.CHOICE_MODE_SINGLE);\n\t\t wordsList.setAdapter(wordAdapter);\n\t\t \n\t\t // Tapping an item sets it bg color to pink and sets foodName to it\n\t\t wordsList.setOnItemClickListener(new OnItemClickListener() {\n\t\t\t public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n\t\t\t\t resetListStyles();\n\t\t\t\t TextView tappedItem = ((TextView)view);\n\t\t\t\t int pink = Color.parseColor(\"#D75A5D\");\n\t\t\t\t tappedItem.setBackgroundColor(pink);\n\t\t\t\t String item = tappedItem.getText().toString();\n\t\t\t\t foodName = item;\n\t\t }\n\t\t\t \n\t\t\t // Clear the style of any other list items first\n\t\t\t public void resetListStyles() {\n\t\t\t\t for (int i=0; i<wordsList.getChildCount(); i++) {\n\t\t\t\t\t View child = wordsList.getChildAt(i);\n\t\t\t\t\t child.setBackgroundColor(Color.TRANSPARENT);\n\t\t\t\t }\n\t\t\t }\n\t\t });\n\t}", "@Override\n public View getView(int position, View convertView, ViewGroup parent) {\n View listItemView = convertView;\n if(listItemView == null) {\n listItemView = LayoutInflater.from(getContext()).inflate(\n R.layout.list_item, parent, false);\n }\n\n\n Word currentWord = getItem(position);\n\n TextView songTextView = (TextView) listItemView.findViewById(R.id.song_name);\n\n songTextView.setText(currentWord.getDefualtSong());\n\n\n\n TextView albumTextView = (TextView) listItemView.findViewById(R.id.album_name);\n\n albumTextView.setText(currentWord.getDefualtAlbum());\n\n TextView artistTextView = (TextView) listItemView.findViewById(R.id.artist_name);\n\n artistTextView.setText(currentWord.getDefualtArtist());\n\n\n\n\n\n return listItemView;\n }", "@Override\r\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\r\n\r\n\t\tString im_records;\r\n\t\tString peerId = getIntent().getExtras().getString(\"peer_row_id\");\r\n\t\tListView lv = (ListView) this.getListView();\r\n\t\tlv.setBackgroundResource(R.drawable.cyan_background);\r\n\t\tall_data = new ArrayList<ArrayList>();\r\n\r\n\t\tString id, message, source, destination, time, length;\r\n\t\tHistoryLog query = new HistoryLog(this);\r\n\t\tquery.open();\r\n\r\n\t\tim_records = query.getImData(peerId);\r\n\t\tStringTokenizer stok = new StringTokenizer(im_records, \"|\");\r\n\r\n\t\twhile (stok.hasMoreTokens()) {\r\n\t\t\tid = stok.nextToken().trim();\r\n\t\t\tif (!id.equals(\"\")) {\r\n\t\t\t\tmessage = stok.nextToken().trim();\r\n\t\t\t\tsource = stok.nextToken();\r\n\t\t\t\tdestination = stok.nextToken();\r\n\t\t\t\ttime = stok.nextToken();\r\n\t\t\t\tlength = stok.nextToken();\r\n\r\n\t\t\t\tmyList = new ArrayList<String>();\r\n\r\n\t\t\t\tmyList.add(id);\r\n\t\t\t\tmyList.add(message);\r\n\t\t\t\tmyList.add(source);\r\n\t\t\t\tmyList.add(destination);\r\n\t\t\t\tmyList.add(time);\r\n\t\t\t\tmyList.add(length);\r\n\r\n\t\t\t\tall_data.add(myList);\r\n\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tarrayAdapter = new ArrayAdapter<String>(this,\r\n\t\t\t\tandroid.R.layout.simple_list_item_1);\r\n\t\tsetListAdapter(arrayAdapter);\r\n\r\n\t\tfor (int i = 0; i < all_data.size(); i++) {\r\n\t\t\tString list_item = (String) all_data.get(i).get(0) + \": \"\r\n\t\t\t\t\t+ (String) all_data.get(i).get(1);\r\n\t\t\tarrayAdapter.add(list_item);\r\n\t\t}\r\n\r\n\t\tarrayAdapter.notifyDataSetChanged();\r\n\t\tquery.close();\r\n\r\n\t\tlv.setOnItemClickListener(new AdapterView.OnItemClickListener() {\r\n\t\t\tpublic void onItemClick(AdapterView<?> parentView, View childView,\r\n\t\t\t\t\tint position, long id) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\tString itemSelected = (((TextView) childView).getText())\r\n\t\t\t\t\t\t.toString();\r\n\t\t\t\tString info1, info2, info3, info4, info5, info6;\r\n\r\n\t\t\t\tArrayList<String> listo = all_data.get(position);\r\n\t\t\t\tinfo1 = listo.get(0);\r\n\t\t\t\tinfo2 = listo.get(1);\r\n\t\t\t\tinfo3 = listo.get(2);\r\n\t\t\t\tinfo4 = listo.get(3);\r\n\t\t\t\tinfo5 = listo.get(4);\r\n\t\t\t\tinfo5 = info5.replace(\"Current Time : \", \"\");\r\n\t\t\t\tinfo6 = listo.get(5);\r\n\r\n\t\t\t\tfinal String items[] = { \"Log #: \" + info1,\r\n\t\t\t\t\t\t\"Message: \" + info2, \"Source: \" + info3,\r\n\t\t\t\t\t\t\"Destination: \" + info4, \"Time: \" + info5,\r\n\t\t\t\t\t\t\"Message Length: \" + info6 };\r\n\r\n\t\t\t\tAlertDialog.Builder ab = new AlertDialog.Builder(\r\n\t\t\t\t\t\tImPeerHistoryList.this);\r\n\t\t\t\tab.setTitle(\"Message Details\");\r\n\t\t\t\tab.setItems(items, null);\r\n\t\t\t\tab.show();\r\n\t\t\t\t\r\n\t\t\t}\r\n\r\n\t\t});\r\n\r\n\t}", "public List_Result listGames() throws ClientException {\n\t\t// START -- DUMMY INFORMATION\n\t\tGameInfo[] games = getCurrentGames();\n\n\t\t// END -- DUMMY INFORMATION\n\t\tList_Result result = new List_Result(games);\n\t\treturn result;\n\t}", "@Override\n public void onActivityCreated(Bundle savedInstanceState) {\n\n super.onActivityCreated(savedInstanceState);\n\n\n List<String> compositionNames = new ArrayList<String>();\n\n // Loop through the Stave instances, adding their names to the list (if present...)\n for (Stave composition : compositions) {\n String name = composition.getName();\n\n if (name == null) {\n // Untitled, use fallback to prevent obvious crash.\n name = \"Untitled Composition\";\n }\n\n compositionNames.add(name);\n\n }\n\n\n // Convert from list to array as per solution from https://stackoverflow.com/questions/9572795/convert-list-to-array-in-java\n String[] namesArray = new String[compositionNames.size()];\n compositionNames.toArray(namesArray);\n\n ArrayAdapter<String> adapter = new ArrayAdapter<String>(getActivity(),\n android.R.layout.simple_list_item_1, namesArray);\n\n\n compositionSelectionList.setAdapter(adapter);\n\n compositionSelectionList.setOnItemClickListener(this);\n compositionSelectionList.setOnItemLongClickListener(this);\n\n }", "@Override\n public int getItemCount() {\n return mGameData.size();\n }", "@Override\n public View getView(int position, View convertView, ViewGroup parent) {\n View view = super.getView(position, convertView, parent);\n\n // If you look at the android.R.layout.simple_list_item_2 source, you'll see\n // it's a TwoLineListItem with 2 TextViews - text1 and text2.\n //TwoLineListItem listItem = (TwoLineListItem) view;\n String[] entry = roomList.get(position);\n TextView text1 = (TextView) view.findViewById(android.R.id.text1);\n TextView text2 = (TextView) view.findViewById(android.R.id.text2);\n text1.setText(entry[0]);\n text2.setText(getString(R.string.joined) + entry[1]);\n return view;\n }", "private void showList() {\n select();\n //create adapter\n adapter = new ArrayAdapter<>(this, android.R.layout.simple_list_item_1, studentInfo);\n //show data list\n listView.setAdapter(adapter);\n }", "private void showArrayAdaptView() {\n\t\tPersonAdapt personAdapt = new PersonAdapt(this, persons, R.layout.listview_item);\n\t\tlistView.setAdapter(personAdapt);\n\t}", "@Override\n public int getCount() {\n return songsList.size();\n }" ]
[ "0.6611208", "0.64983827", "0.63140696", "0.62719786", "0.6241992", "0.6207081", "0.6152852", "0.61374766", "0.61275125", "0.6113669", "0.6081718", "0.6053426", "0.6020433", "0.5987665", "0.59855926", "0.5933916", "0.5912157", "0.59057724", "0.5899791", "0.5879798", "0.587321", "0.5821293", "0.5785946", "0.5766029", "0.5740349", "0.57312036", "0.5730291", "0.57240754", "0.5712189", "0.5712049", "0.56879944", "0.56807613", "0.5671758", "0.56656826", "0.5664213", "0.56603736", "0.56593406", "0.5658982", "0.5632382", "0.56315666", "0.5628351", "0.56192523", "0.56183326", "0.561144", "0.55972433", "0.5595882", "0.55877304", "0.5584541", "0.55769813", "0.55721474", "0.55710685", "0.55694187", "0.5561387", "0.5559902", "0.55447984", "0.5544434", "0.55424684", "0.5537873", "0.5530301", "0.5519814", "0.5518897", "0.5516675", "0.55128103", "0.5511089", "0.55040336", "0.549811", "0.54944575", "0.54942095", "0.54915255", "0.54859835", "0.5477636", "0.5477452", "0.54767054", "0.54686457", "0.54608816", "0.5453125", "0.54529566", "0.54483896", "0.54425627", "0.54367536", "0.542838", "0.5412288", "0.54011023", "0.5398811", "0.5397982", "0.53954154", "0.53944874", "0.53926635", "0.53918797", "0.5387444", "0.5385689", "0.5376922", "0.5374593", "0.5370102", "0.5364044", "0.5361546", "0.53573644", "0.5355883", "0.53543633", "0.5350338" ]
0.54584867
75
Reads a property list from the specified properties file.
void loadProperties(File propertiesFile) throws IOException { // Load the properties. LOGGER.info("Loading properties from \"{}\" file...", propertiesFile); try (InputStreamReader inputStreamReader = new InputStreamReader(new FileInputStream(propertiesFile), "UTF-8")) { properties.load(inputStreamReader); } // Log all properties except for password. StringBuilder propertiesStringBuilder = new StringBuilder(); for (Object key : properties.keySet()) { String propertyName = key.toString(); propertiesStringBuilder.append(propertyName).append('=') .append(HERD_PASSWORD_PROPERTY.equalsIgnoreCase(propertyName) ? "***" : properties.getProperty(propertyName)).append('\n'); } LOGGER.info("Successfully loaded properties:%n{}", propertiesStringBuilder.toString()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public ArrayList<Property> getProperties() {\r\n\t\ttry {\r\n\t\t\tproperties.clear();\r\n\t\t\tFileInputStream fis = new FileInputStream(PROPERTY_FILEPATH);\r\n \tObjectInputStream ois = new ObjectInputStream(fis);\r\n \t\r\n \tProperty obj = null;\r\n \twhile ((obj=(Property)ois.readObject())!=null) {\r\n \t\tproperties.add(obj);\r\n \t}\r\n \tois.close();\r\n }\r\n\t\tcatch (EOFException e) {\r\n\t\t\tSystem.out.println(\"End of file reached.\");\r\n }\r\n catch (ClassNotFoundException e) {\r\n \te.printStackTrace();\r\n }\r\n catch (IOException e) {\r\n \te.printStackTrace();\r\n }\r\n\t\treturn properties;\r\n\t}", "public Properties getProperties(Properties getList);", "public static Properties loadProperties(String filePath)\n {\n \tProperties listProperties = new Properties();\n\t\t//System.out.println(filePath);\n\n\t\tFileInputStream file = null;\n\t\ttry \n\t\t{\n\t\t\tfile = new FileInputStream(filePath);\n\t\t\t\n\t\t} \n\t\tcatch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\ttry \n\t\t{\n\t\t\t listProperties.load(file);\n\t\t} \n\t\tcatch (IOException e) \n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn listProperties;\n }", "public ReadProperties(String filename) {\n\n\t\ttry {\n\t\t\tInputStream in = new FileInputStream(filename);\n\n\t\t\tprop = new Properties();\n\n\t\t\tprop.load(in);\n\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public ReadPropertyFile()\n\t{\n\t prob = new Properties(); \n\t \n\t try\n\t {\n\t FileInputStream fis = new FileInputStream(\".//config.properties\");\n\t prob.load(fis);\n\t }\n\t catch(FileNotFoundException e)\n\t {\n\t\t System.out.println(e.getMessage());\n\t }\n catch(IOException e)\n\t {\n \t System.out.println(e.getMessage());\n\t }\n\t}", "private void loadPropertiesFile(String propertiesFile) {\n\n\t\t//open the properties file.\n\t\t_props = new Properties();\n\n\t\t//sanity check the properties file\n\t\tFile f = new File(propertiesFile);\n\t\tif (!f.canRead()) {\n\t\t\t//print an error - can't read the props file.\n\t\t\tSystem.err.println(\"Properties file \" + propertiesFile + \" cannot be read.\");\n\t\t}\n\n\t\ttry {\n\t\t\t_props.load(new FileInputStream(f));\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "void readProperties(java.util.Properties p) {\n }", "public HashMap<String, String> readPropertyFile(String propertyFilePath) throws Exception {\n File propertyFile = null;\n InputStream inputStream = null;\n Properties properties = null;\n HashMap<String, String> propertyMap = new HashMap<String, String>();\n try {\n\n //creating file object\n propertyFile = new File(propertyFilePath);\n\n //check if property file exists on hard drive\n if (propertyFile.exists()) {\n inputStream = new FileInputStream(propertyFile);\n // check if the file exists in web environment or relative to class path\n } else {\n inputStream = getClass().getClassLoader().getResourceAsStream(propertyFilePath);\n }\n\n if (inputStream == null) {\n throw new Exception(\"FILE NOT FOUND : inputStream = null : \" + propertyFilePath);\n }\n\n properties = new Properties();\n properties.load(inputStream);\n Enumeration enuKeys = properties.keys();\n while (enuKeys.hasMoreElements()) {\n\n String key = (String) enuKeys.nextElement();\n String value = properties.getProperty(key);\n\n //System.out.print(\"key = \"+key + \" : value = \"+value);\n propertyMap.put(key, value);\n }\n if (propertyMap == null) {\n throw new Exception(\"readPropertyFile : propertyMap = null\");\n }\n\n return propertyMap;\n } catch (Exception e) {\n throw new Exception(\"readPropertyFile : \" + e.toString());\n } finally {\n try {\n inputStream.close();\n } catch (Exception e) {\n }\n try {\n properties = null;\n } catch (Exception e) {\n }\n }\n }", "public void loadPropertyFile(String filename) {\n try (InputStream is = new FileInputStream(filename)) {\n properties.load(is);\n } catch (IOException x) {\n throw new IllegalArgumentException(x);\n }\n }", "public static Properties getProperties(String filename)\r\n/* 13: */ {\r\n/* 14:26 */ Properties properties = new Properties();\r\n/* 15: */ try\r\n/* 16: */ {\r\n/* 17:29 */ properties.load(new FileInputStream(System.getProperty(\"user.dir\") + \"/properties/\" + filename));\r\n/* 18: */ }\r\n/* 19: */ catch (IOException ex)\r\n/* 20: */ {\r\n/* 21:31 */ logger.error(\"Can't load properties file: \" + filename, ex);\r\n/* 22: */ }\r\n/* 23:33 */ return properties;\r\n/* 24: */ }", "private static void loadPropertiesFile() {\n checkNotNull(propertyFileName, \"propertyFileName cannot be null\");\n String currentDir = new File(\"\").getAbsolutePath();\n propertyFile = currentDir + \"/\" + propertyFileName;\n File propFile = new File(propertyFile);\n try {\n propFile.createNewFile();\n } catch (IOException ex) {\n Debugger.logMessage(ex);\n }\n\n props = new Properties();\n try {\n FileInputStream fis = new FileInputStream(propertyFile);\n props.load(fis);\n fis.close();\n } catch (IOException ex) {\n Debugger.logMessage(ex);\n }\n }", "@SuppressWarnings(\"unchecked\")\n private void loadProperties()\n {\n File f = getPropertiesFile();\n if (!f.exists())\n return;\n \n m_props = (Map<String, Object>) PSConfigUtils.loadObjectFromFile(f);\n }", "public void readProperties() {\r\n File directory = new File(OptionItems.XML_DEFINITION_PATH);\r\n if (directory.exists()) {\r\n propertyParserXML.readPropertyDefinition(configData.getPropertyList());\r\n propertyParserXML.processPropertyDependency();\r\n }\r\n Log.info(\"info.progress_control.load_property_description\");\r\n }", "public void loadProperties(){\n\n\ttry{\n\t prop.load(file);\n // get the property value and print it out\n host = prop.getProperty(\"host\");\n\t port = prop.getProperty(\"port\");\n\t sslmode = prop.getProperty(\"sslmode\");\n\t source = prop.getProperty(\"source\");\n dbname = prop.getProperty(\"dbname\");\n help_url_prefix = prop.getProperty(\"base.help.url\");\n password = prop.getProperty(\"password\");\n\t user = prop.getProperty(\"user\");\t \n\t temp_dir = new File(System.getProperty(\"java.io.tmpdir\")).toString();\n\t working_dir = new File(System.getProperty(\"user.dir\")).toString();\n\t file.close();\n\t}catch(IOException ioe){\n\t\t\n\t} \n\t \n }", "public static void loadProperties(String filename) {\n\n if (filename.equals(\"\")) {\n return;\n }\n propfilename = userhome + FS + filename;\n File f = new File(propfilename);\n if (f.exists()) {\n //loadProperties(propfilename);\n } else {\n propfilename = userhome + FS + \"Properties\" + FS + filename;\n f = new File(propfilename);\n if (f.exists()) {\n //loadProperties(propfilename);\n }\n }\n\n try {\n try (FileInputStream i = new FileInputStream(propfilename)) {\n prop.load(i);\n //prtProperties();\n }\n } catch (FileNotFoundException e) {\n System.out.println(\" ** Properties file not found=\" + propfilename + \" userhome=\" + userhome + \" \" + System.getProperty(\"user.home\"));\n saveProperties();\n } catch (IOException e) {\n System.out.println(\"IOException reading properties file=\" + propfilename);\n System.exit(1);\n }\n }", "public static Properties loadProperties(final String filename) throws IllegalArgumentException {\n final File file = new File(filename);\n final Properties properties = new Properties();\n try {\n properties.load(new FileInputStream(file));\n } catch (FileNotFoundException ex) {\n throw new IllegalArgumentException(\"File not found: \" + file, ex);\n } catch (IOException ex) {\n throw new IllegalArgumentException(\"Unable to load properties: \" + file, ex);\n }\n return properties;\n }", "private Properties loadPropertiesFile(String file) {\n\t\tFileInputStream fis = null;\n\t\ttry {\n\t\t\tfis = new FileInputStream(file);\n\t\t\tif (fis != null) {\n\t\t\t\tProperties props = new Properties();\n\t\t\t\tprops.load(fis);\n\t\t\t\treturn props;\n\t\t\t}\n\t\t\tSystem.err.println(\"Cannot load \" + file\n\t\t\t\t\t+ \" , file input stream object is null\");\n\t\t} catch (java.io.IOException ioe) {\n\t\t\tSystem.err.println(\"Cannot load \" + file + \", error reading file\");\n\t\t}\n\t\treturn null;\n\t}", "@Override\n public Map<String, String> readProperty(String fileName) {\n Map<String, String> result = new HashMap<>();\n Properties prop = new Properties();\n InputStream input;\n try {\n input = FullPropertyReader.class.getClassLoader().getResourceAsStream(fileName);\n prop.load(input);\n Set<String> strings = prop.stringPropertyNames();\n for (String string : strings) {\n result.put(string, prop.getProperty(string));\n }\n } catch (IOException e) {\n throw new PropertyReaderException(\"Trouble in FullPropertyReader\", e);\n }\n return result;\n }", "public Properties loadProps(String propFile) {\n Properties props = new Properties();\n BufferedReader f;\n try {\n f = new BufferedReader(new FileReader(propFile));\n } catch (FileNotFoundException e) {\n return null;\n }\n try {\n props.load(f);\n } catch (IOException e) {\n System.err.println(\"IO EXception in loadProps in EvalModels class\");\n }\n System.out.println(props.toString());\n return props;\n }", "private void getPropValues() {\n Properties prop = new Properties();\n \n InputStream inputStream = getClass().getClassLoader().getResourceAsStream(propFileName);\n try {\n prop.load(inputStream);\n } catch (IOException ex) {\n Logger.getLogger(PropResources.class.getName()).log(Level.SEVERE, null, ex);\n }\n if (inputStream == null) {\n try {\n throw new FileNotFoundException(\"ERROR: property file '\" + propFileName + \"' not found in the classpath\");\n } catch (FileNotFoundException ex) {\n Logger.getLogger(PropResources.class.getName()).log(Level.SEVERE, null, ex);\n }\n }\n // get property values\n this.defaultDirectory = prop.getProperty(\"defaultDirectory\");\n this.topicsFile = this.defaultDirectory + prop.getProperty(\"topics\");\n this.scripturesFile = this.defaultDirectory + prop.getProperty(\"scriptures\");\n this.defaultJournalXML = this.defaultDirectory + prop.getProperty(\"defaultJournalXML\");\n this.defaultJournalTxt = this.defaultDirectory + prop.getProperty(\"defaultJournalTxt\");\n }", "protected Properties loadClientProperties(String filename) throws Exception {\n InputStream is = null;\n try {\n Properties props = new Properties();\n\n // Open the properties file specified by the user.\n File f = new File(filename);\n if (f.exists()) {\n is = new FileInputStream(f);\n } else {\n throw new FileNotFoundException(\"Properties file '\" + filename + \"' not found.\");\n }\n\n // Load the properties.\n props.load(is);\n is.close();\n\n return props;\n } finally {\n if (is != null) {\n is.close();\n }\n }\n }", "public static List getPropertyList(String pPropertyList,Logger pLogger)\n\t{\n\t\tArrayList propList=null;\n\t\tStringTokenizer tokenizer = new StringTokenizer(pPropertyList,Constants.DELIMITER);\n\t\tint tokens = tokenizer.countTokens();\n\t\tpLogger.log(Level.INFO,\"Value to parse:\"+pPropertyList);\n\t\tpLogger.log(Level.INFO,\"Num tokens:\"+tokens);\n\t\t\n\t\tif(pPropertyList!=null)\t\t\t\n\t\t{\n\t\t\tpropList = new ArrayList();\n\t\t\t\n\t\t\t\t\twhile(tokenizer.hasMoreTokens())\n\t\t\t\t\t{\n\t\t\t\t\t\tString token = tokenizer.nextToken();\n\t\t\t\t\t\tpropList.add(token);\n\t\t\t\t\t}\n\t\t\t\t\n\t\t}\n\t\treturn propList;\n\t\t\n\t}", "public static Properties parsePropertiesFile(File propertiesFile) {\n\t\tProperties clientProperties = new Properties();\n\t\tFileInputStream in;\n\t\ttry {\n\t\t\tin = new FileInputStream(propertiesFile);\n\t\t\tclientProperties.load(in);\n\t\t\tin.close();\n\t\t} catch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t\treturn clientProperties;\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t\treturn clientProperties;\n\t\t}\n\t\treturn clientProperties;\n\t}", "public Properties getPropertyInfo(Properties list);", "private ConfigProperties parsePropertiesFile(final String propertiesFile) {\n properties = ConfigFactory.getInstance().getConfigPropertiesFromAbsolutePath(propertiesFile);\n return properties;\n }", "private static Properties getProperties(final String filename) throws IOException, FileNotFoundException {\r\n \r\n final Properties result = new Properties();\r\n final InputStream propertiesStream = getInputStream(filename);\r\n result.load(propertiesStream);\r\n return result;\r\n }", "File getPropertiesFile();", "public static void loadProps(InputStream in) {\r\n\t\ttry {\r\n properties.load(in);\r\n } catch (IOException e) {\r\n System.out.println( \"No config.properties was found.\");\r\n e.printStackTrace();\r\n }\r\n\t}", "private static void readCitProperties(String fileName) {\n/* */ try {\n/* 91 */ ResourceLocation e = new ResourceLocation(fileName);\n/* 92 */ InputStream in = Config.getResourceStream(e);\n/* */ \n/* 94 */ if (in == null) {\n/* */ return;\n/* */ }\n/* */ \n/* */ \n/* 99 */ Config.dbg(\"CustomItems: Loading \" + fileName);\n/* 100 */ Properties props = new Properties();\n/* 101 */ props.load(in);\n/* 102 */ in.close();\n/* 103 */ useGlint = Config.parseBoolean(props.getProperty(\"useGlint\"), true);\n/* */ }\n/* 105 */ catch (FileNotFoundException var4) {\n/* */ \n/* */ return;\n/* */ }\n/* 109 */ catch (IOException var5) {\n/* */ \n/* 111 */ var5.printStackTrace();\n/* */ } \n/* */ }", "private Properties loadProperties(String propertyFile) {\n\t\toAuthProperties = new Properties();\n\t\ttry {\n\t\t\toAuthProperties.load(App.class.getResourceAsStream(propertyFile));\n\t\t} catch (IOException e) {\n\t\t\tSystem.err.println(\"Unable to read \" + propertyFile\n\t\t\t\t\t+ \" configuration. Make sure you have a properly formatted \" + propertyFile + \" file.\");\n\t\t\treturn null;\n\t\t}\n\t\treturn oAuthProperties;\n\t}", "static List<MCProperty> getProperty(List<Property> properties) {\n\n\t\tif (properties == null) {\n\t\t\treturn null;\n\t\t} else {\n\t\t\tList<MCProperty> list = new ArrayList<MCProperty>(properties.size());\n\t\t\tfor (Property property : properties) {\n\t\t\t\tMCProperty p = new MCProperty();\n\t\t\t\tp.setName(property.getName());\n\t\t\t\tp.setValue(property.getValue());\n\t\t\t\tlist.add(p);\n\t\t\t}\n\t\t\treturn list;\n\t\t}\n\t}", "public static void loadPropertyFile() {\r\n\t\t\r\n\t\tif (loaded) {\r\n\t\t\tthrow new IllegalStateException(\"Properties have already been loaded!\"); \r\n\t\t}\r\n\t\tloaded = true; \r\n\t\t\r\n\t\t// if property file was specified, use it instead of standard property\r\n\t\t// file\r\n\r\n\t\tString file = STANDARD_PROPERTY_FILE;\r\n\r\n\t\tif (System.getProperty(PROPERTY_WHERE_TO_FIND_PROPERTY_FILE) != null\r\n\t\t\t\t&& System.getProperty(PROPERTY_WHERE_TO_FIND_PROPERTY_FILE)\r\n\t\t\t\t\t\t.length() != 0) {\r\n\t\t\tfile = System.getProperty(PROPERTY_WHERE_TO_FIND_PROPERTY_FILE);\r\n\t\t}\r\n\r\n\t\t// load property file\r\n\t\ttry {\r\n\t\t\tProperties props = System.getProperties();\r\n\t\t\tprops.load(ClassLoader.getSystemResourceAsStream(file));\r\n\t\t\tSystem.setProperties(props);\r\n\t\t} catch (IOException e) {\r\n\t\t\tthrow new RuntimeException(\"Property file was not found: \" + file\r\n\t\t\t\t\t+ \"! It must be located in the CLASSPATH and \"\r\n\t\t\t\t\t+ \"either be named 'chord.properties' or its name \"\r\n\t\t\t\t\t+ \"be specified by -Dchord.properties.file='filename'\", e);\r\n\t\t} catch (NullPointerException e) {\r\n\t\t\tthrow new RuntimeException(\"Property file was not found: \" + file\r\n\t\t\t\t\t+ \"! It must be located in the CLASSPATH and \"\r\n\t\t\t\t\t+ \"either be named 'chord.properties' or its name \"\r\n\t\t\t\t\t+ \"be specified by -Dchord.properties.file='filename'\", e);\r\n\t\t}\r\n\r\n\t}", "public static Properties readProperties(String filePath){\n try {\n FileInputStream fileInputStream= new FileInputStream(filePath);\n properties=new Properties();\n properties.load(fileInputStream);\n fileInputStream.close();\n\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return properties;\n }", "static public Vector getPropertyValues (Properties props, String propName)\n{\n String propertyDelimiterName = \"property.token.delimiter\";\n String delimiter = props.getProperty (propertyDelimiterName, \"::\");\n\n String listStartTokenName = \"list.startToken\";\n String listStartToken = props.getProperty (listStartTokenName, \"(\");\n\n String listEndTokenName = \"list.endToken\";\n String listEndToken = props.getProperty (listEndTokenName, \")\");\n\n Vector result = new Vector ();\n String propString = props.getProperty (propName);\n if (propString == null)\n return result;\n String propStringTrimmed = propString.trim ();\n String [] tokens = Misc.parseList (propStringTrimmed, listStartToken, listEndToken, delimiter);\n\n for (int i=0; i < tokens.length; i++)\n result.add (tokens [i]);\n\n return result;\n\n}", "public static Properties loadProperties(String file) throws Exception {\n Properties props = new Properties();\n props.load(new FileInputStream(file));\n\n return props;\n }", "public static Properties load(String propsFile)\n {\n \tProperties props = new Properties();\n FileInputStream fis;\n\t\ttry {\n\t\t\tfis = new FileInputStream(new File(propsFile));\n\t\t\tprops.load(fis); \n\t\t fis.close();\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n \n return props;\n }", "public static Properties getPropsFromFile(String propsFile)\n {\n Properties props = new Properties();\n if (propsFile == null)\n {\n return props;\n }\n FileInputStream propStream = null;\n try\n {\n propStream = new FileInputStream(propsFile);\n props.load(propStream);\n }\n catch (IOException e)\n {\n System.out.println(\"Couldn't load properties from \" + propsFile);\n }\n finally\n {\n if (propStream != null)\n {\n try\n {\n propStream.close();\n propStream = null;\n }\n catch (IOException e)\n {\n\n e.printStackTrace();\n }\n }\n }\n return props;\n }", "public Properties loadPropertiesFromFile(String path) {\n\n\t\ttry {\n\t\t\tInputStream fileInputStream = PropertyUtil.class\n\t\t\t\t\t.getResourceAsStream(path);\n\t\t\tproperties.load(fileInputStream);\n\t\t\tfileInputStream.close();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn properties;\n\t}", "private Properties loadProperties(String fileName){\r\n\t\t\r\n\t\tProperties prop = new Properties();\r\n\t\tInputStream input = null;\r\n\r\n\t\ttry {\r\n\r\n\t\t\tinput = new FileInputStream(fileName);\r\n\t\t\tprop.load(input);\r\n\r\n\t\t} catch (IOException ex) {\r\n\t\t\tex.printStackTrace();\r\n\t\t} finally {\r\n\t\t\tif (input != null) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tinput.close();\r\n\t\t\t\t} catch (IOException e) {\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn prop;\t \r\n\t}", "@Override\n public Properties loadProperties(String filename) {\n return testProperties;\n }", "public ConfigFileReader(){\r\n\t\tBufferedReader reader;\r\n\t\ttry {\r\n\t\t\treader = new BufferedReader(new FileReader(propertyFilePath));\r\n\t\t\tproperties = new Properties();\r\n\t\t\ttry {\r\n\t\t\t\tproperties.load(reader);\r\n\t\t\t\treader.close();\r\n\t\t\t}catch(IOException e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}catch(FileNotFoundException ex) {\r\n\t\t\tSystem.out.println(\"Configuration.properties not found at \"+propertyFilePath);\r\n\t\t}\r\n\t}", "public Properties readParameters(String filename) {\n\t// Läser in parametrar för simuleringen\n\t// Metoden kan läsa från terminalfönster, dialogrutor\n\t// eller från en parameterfil. Det sista alternativet\n\t// är att föredra vid uttestning av programmet eftersom\n\t// man inte då behöver mata in värdena vid varje körning.\n // Standardklassen Properties är användbar för detta.\n\n Properties p = new Properties();\n try {\n p.load(new FileInputStream(filename));\n } catch (IOException e) {\n System.out.println(e);\n }\n return p;\n }", "void loadPropertiesFile()\n\t{\n\t\tlogger.info(\"Fetching the properties files\");\n\t\t\n\t\tconfigProp=new Properties(); \n\t\ttry{\tconfigProp.load(loadFile(\"Config.properties\"));\t\t} \n\t\tcatch (IOException e){\tAssert.assertTrue(\"Cannot initialise the Config properties file, Check if the file is corrupted\", false);\t}\t\t\t\n\t}", "public final Properties readPropertiesFromFile(final String fileName)\n {\n\n if (!StringUtils.isEmpty(fileName))\n {\n return PropertyLoader.loadProperties(fileName);\n } else\n {\n return null;\n } // end if..else\n\n }", "public String fw_Read_From_Property_file(String PropertyName) throws IOException\n\t{\n\t\tProperties prop = new Properties();\n\t\tInputStream input = null;\n\t\tinput = new FileInputStream(\"config.properties\");\n\t\tprop.load(input);\n\t\treturn prop.getProperty(PropertyName);\n\n\t}", "private void loadProperties() {\n try (InputStream in = getClass().getClassLoader().getResourceAsStream(PATH_TO_PROPERTIES)) {\n this.prs.load(in);\n } catch (IOException e1) {\n e1.printStackTrace();\n }\n }", "private void loadPropertyFile(InputStream stream) throws IOException{\n\t\tproperties = new Properties();\n\t\tproperties.load(stream);\n\t}", "void load() {\n\t\ttry {\n\t\t\tfinal FileInputStream fis = new FileInputStream(propertyFile);\n\t\t\tfinal Properties newProperties = new Properties();\n\t\t\tnewProperties.load(fis);\n\t\t\ttimeLastRead = propertyFile.lastModified();\n\t\t\tproperties = newProperties;\n\t\t\tfis.close();\n\t\t} catch (final Exception e) {\n\t\t\tlogger.info(\"Property file \" + propertyFile + \" \" + e.getMessage());\n\t\t}\n\t}", "private void loadProperties(){\n try {\n input = new FileInputStream(fileName);\n properties.load(input);\n } catch (IOException e) {\n System.out.println(\"--- FAILED TO LOAD GAME ---\");\n e.printStackTrace();\n } finally {\n if (input != null) {\n try {\n input.close();\n } catch (IOException e) {\n System.out.println(\"--- FAILED TO CLOSE INTPUT ---\");\n e.printStackTrace();\n }\n }\n }\n }", "public static Properties readPropertyFile(String fileName) {\n\t\tProperties properties = new Properties();\n\t\tFileInputStream in = null;\n\t\ttry {\n\t\t\tin = new FileInputStream(fileName);\n\t\t\tproperties.load(in);\n\t\t} catch (IOException e) {\n\t\t\tLOG.error(\"cannot read property file \" + fileName);\n\t\t\tSystem.exit(-1);\n\t\t} finally {\n\t\t\tif (in != null) {\n\t\t\t\ttry {\n\t\t\t\t\tin.close();\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\tLOG.error(e.getMessage());\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn properties;\n\t}", "@Test\r\n\t\tpublic static void Properties() \r\n\r\n\t\t{\r\n\t\t\ttry{\r\n\t\t\t\tprop = new Properties();\r\n\t\t\t\tfile = new File(\"C:\\\\Users\\\\vardhan\\\\eclipse-workspace\\\\com.makemytrip\\\\prop.properties\");\r\n\t\t\t\tfilereader = new FileReader(file);\r\n\t\t\t\tprop.load(filereader);\r\n\t\t\t\t\r\n\t\t\t }\r\n\t\t\r\n\t\t\r\n\t\t\tcatch(Exception e)\r\n\t\t\t{\r\n\t\t\t\tSystem.out.println(e.getMessage());\r\n\t\t\t\r\n\t\t\t}\r\n\t\t}", "private void loadProperties() {\n\t\t\n\t\tString fldr = env.getProperty(\"response.folder\");\n\t\tthis.repo.setRootFolder( new File(fldr));;\n\t\t\n\t\tint nthConfigItem = 1;\n\t\twhile(true) {\n\t\t\tString seq = (\"\"+nthConfigItem++).trim();\n\t\t\t\n\t\t\tString xpathPropName = \"request.\" + seq + \".xpath\";\n\t\t\tString responseTextFilePropName = \"request.\" + seq + \".response.file\";\n\t\t\tString xpath = env.getProperty(xpathPropName);\n\t\t\tString responseTextFileName = env.getProperty(responseTextFilePropName);\n\t\t\tif (xpath!=null && !\"\".equals(xpath.trim())\n\t\t\t\t&& responseTextFileName!=null & !\"\".equals(responseTextFileName.trim())\t) {\n\t\t\t\t\n\t\t\t\trepo.addFile(xpath, responseTextFileName);\n\t\t\t\tController.logAlways(\"Loading config item [\" + seq + \"] xpath: [\" + rpad(xpath, 60) + \"] data file: [\" + rpad(responseTextFileName,25) + \"]\" );\n\t\t\t\t\n\t\t\t} else {\n\t\t\t\tController.logAlways(\"End of littleMock initialization. No more properties from application.properties will be loaded because either [\" + xpathPropName + \"] or [\" + responseTextFilePropName + \"] was not found in application.properties.\");\n\t\t\t\t//parameters in application.properties must be\n\t\t\t\t//in sequential order, starting at 1.\n\t\t\t\t//When we discover the first missing one, stop looking for more.\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\thumanReadableConfig = PlaybackRepository.SINGLETON.humanReadable();\n\t}", "private static String[] readFile(final String pathToFile) {\n try (BufferedReader reader = new BufferedReader(new FileReader(pathToFile))) {\n final List<String> lines = new ArrayList<>();\n String line;\n while ((line = reader.readLine()) != null) {\n line = line.trim();\n if (!line.startsWith(\"#\")) {\n lines.add(line);\n }\n }\n return lines.toArray(new String[lines.size()]);\n } catch (final IOException e) {\n throw new OpenGammaRuntimeException(\"Couldn't read properties file - \" + pathToFile, e);\n }\n }", "public final void loadPropertiesFromFile(final String fileName)\n {\n\n Properties tempProp = PropertyLoader.loadProperties(fileName);\n fProp.putAll(tempProp);\n\n }", "public File getPropertyFile() { return propertyFile; }", "public ConfigFileReader(){\r\n\t\t \r\n\t\t BufferedReader reader;\r\n\t\t try {\r\n\t\t\t reader = new BufferedReader(new FileReader(propertyFilePath));\r\n\t\t\t properties = new Properties();\r\n\t\t\t try {\r\n\t\t\t\t properties.load(reader);\r\n\t\t\t\t reader.close();\r\n\t\t\t } catch (IOException e) {\r\n\t\t\t\t e.printStackTrace();\r\n\t\t\t }\r\n\t\t } catch (FileNotFoundException e) {\r\n\t\t\t e.printStackTrace();\r\n\t\t\t throw new RuntimeException(\"configuration.properties not found at \" + propertyFilePath);\r\n\t \t } \r\n\t }", "PropertiesTask setProperties( File propertiesFile );", "public static Properties loadProperties(@NonNull File file) throws IOException {\n FileInputStream fileInputStream = new FileInputStream(file);\n Properties properties = new Properties();\n properties.load(fileInputStream);\n return properties;\n }", "public static void loadPropertyFile() throws IOException {\n\t\tPropertyFileReader.property = new Properties();\n\t\tPropertyFileReader.targetPlatform = System.getProperty(\"targetPlatform\");\n\t\tPropertyFileReader.targetDevice = System.getProperty(\"targetDevice\");\n\n\t\t// Load the property file based on platform and device\n\n\t\tif (PropertyFileReader.targetPlatform.equalsIgnoreCase(\"android\")) {\n\t\t\tfinal File file = new File(String.valueOf(System.getProperty(\"user.dir\"))\n\t\t\t\t\t+ \"\\\\src\\\\main\\\\resources\\\\testdata\\\\\" + PropertyFileReader.targetPlatform + \"\\\\\"\n\t\t\t\t\t+ PropertyFileReader.targetDevice + \"\\\\capabilities.properties\");\n\t\t\tPropertyFileReader.filereader = new FileReader(file);\n\t\t\tPropertyFileReader.property.load(PropertyFileReader.filereader);\n\t\t}\n\n\t\tif (PropertyFileReader.targetPlatform.equalsIgnoreCase(\"iOS\")) {\n\t\t\t// To do in case of iOS\n\t\t}\n\t}", "protected void readProperties() throws RepositoryException {\n try {\n log.debug(\"Reading meta file: \" + this.metaFile);\n this.properties = new HashMap();\n BufferedReader reader = new BufferedReader(new FileReader(this.metaFile));\n String line;\n while ((line = reader.readLine()) != null) {\n line = line.trim();\n String name;\n String typeName;\n String value;\n try {\n name = line.substring(0, line.indexOf(\"<\")).trim();\n typeName = line.substring(line.indexOf(\"<\")+1, line.indexOf(\">\")).trim();\n value = line.substring(line.indexOf(\":\")+1).trim();\n } catch (StringIndexOutOfBoundsException e) {\n throw new RepositoryException(\"Error while parsing meta file: \" + this.metaFile \n + \" at line \" + line);\n }\n Property property = new DefaultProperty(name, PropertyType.getType(typeName), this);\n property.setValueFromString(value);\n this.properties.put(name, property);\n }\n reader.close();\n } catch (IOException e) {\n throw new RepositoryException(\"Error while reading meta file: \" + metaFile + \": \" \n + e.getMessage());\n }\n }", "private void loadPropertiesFromFile(String propertiesFileName) {\t\t\n\t\tif ( (propertiesFileName != null) && !(propertiesFileName.isEmpty()) ) {\n\t\t\tpropertiesFileName = config_file_name;\n\t \t\ttry {\n\t \t\t\t// FileInputStream lFis = new FileInputStream(config_file_name);\n\t \t\t\t// FileInputStream lFis = getServletContext().getResourceAsStream(config_file_name);\n\t \t\t\tInputStream lFis = Thread.currentThread().getContextClassLoader().getResourceAsStream(\"config.properties\");\n\t \t\t\tif (lFis != null) {\n\t\t \t\t\tProperties lConnectionProps = new Properties();\n\t\t \t\t\tlConnectionProps.load(lFis);\n\t\t \t\t\tlFis.close();\n\t\t \t\t\tlLogger.info(DEBUG_PREFIX + \"Using configuration file \" + config_file_name);\n\t\t \t\t\tif ( lConnectionProps.getProperty(\"SsoServiceNname\") != null) ssosvc_name = lConnectionProps.getProperty(\"SsoServiceNname\");\n\t\t \t\t\tif ( lConnectionProps.getProperty(\"SsoServiceLabel\") != null) ssosvc_label = lConnectionProps.getProperty(\"SsoServiceLabel\");\n\t\t \t\t\tif ( lConnectionProps.getProperty(\"SsoServicePlan\") != null) ssosvc_plan = lConnectionProps.getProperty(\"SsoServicePlan\");\n\t\t \t\t\tif ( lConnectionProps.getProperty(\"SsoServiceCredential\") != null) ssosvc_cred_clientId = lConnectionProps.getProperty(\"SsoServiceCredential_clientId\");\n\t\t \t\t\tif ( lConnectionProps.getProperty(\"SsoServiceCredential\") != null) ssosvc_cred_secret = lConnectionProps.getProperty(\"SsoServiceCredential_secret\");\n\t\t \t\t\tif ( lConnectionProps.getProperty(\"SsoServiceCredential\") != null) ssosvc_cred_serverSupportedScope = lConnectionProps.getProperty(\"SsoServiceCredential_serverSupportedScope\");\n\t\t\tlLogger.info(DEBUG_PREFIX + \"CONFIG FILE parsing, found Scopes = \" + ssosvc_cred_serverSupportedScope + \" for service name = \" + ssosvc_name);\t\n\t\t\t Pattern seperators = Pattern.compile(\".*\\\\[ *(.*) *\\\\].*\");\n\t\t\t if (seperators != null) {\n\t\t\t \tMatcher scopeMatcher = seperators.matcher(ssosvc_cred_serverSupportedScope);\n\t\t\t\t scopeMatcher.find();\n\t\t\t\t ssosvc_cred_serverSupportedScope = scopeMatcher.group(1); // only get the first occurrence\n\t\t\t\t lLogger.info(DEBUG_PREFIX + \"CONFIG FILE parsing, retrieved first Scope = \" + ssosvc_cred_serverSupportedScope);\n\t\t\t }\n\t \t\t\tif ( lConnectionProps.getProperty(\"SsoServiceCredential\") != null) ssosvc_cred_issuerIdentifier = lConnectionProps.getProperty(\"SsoServiceCredential_issuerIdentifier\");\n\t\t \t\t\tif ( lConnectionProps.getProperty(\"SsoServiceCredential\") != null) ssosvc_cred_tokenEndpointUrl = lConnectionProps.getProperty(\"SsoServiceCredential_tokenEndpointUrl\");\n\t\t \t\t\tif ( lConnectionProps.getProperty(\"SsoServiceCredential\") != null) ssosvc_cred_authorizationEndpointUrl = lConnectionProps.getProperty(\"SsoServiceCredential_authorizationEndpointUrl\");\n\t\n\t\t \t\t\tlLogger.info(DEBUG_PREFIX + \"Using config for SSO Service with name \" + ssosvc_name);\n\t \t\t\t} else {\n\t \t\t\t\tlLogger.severe(DEBUG_PREFIX + \"Configuration file not found! Using default settings.\");\n\t \t\t\t}\n\n\t \t\t} catch (FileNotFoundException e) {\n\t \t\t\tlLogger.severe(DEBUG_PREFIX + \"Configuration file = \" + config_file_name + \" not found! Using default settings.\");\n\t \t\t\te.printStackTrace();\n\t \t\t} catch (IOException e) {\n\t \t\t\tlLogger.severe(\"SF-DEBUG: Configuration file = \" + config_file_name + \" not readable! Using default settings.\");\n\t \t\t\te.printStackTrace();\n\t \t\t}\n\t \t} else {\n\t \t\tlLogger.info(DEBUG_PREFIX + \"Configuration file = \" + config_file_name + \" not found! Using default settings.\");\n\t \t}\n\t}", "public synchronized Properties getProperties() {\n if (properties != null) {\n return properties;\n }\n Properties p = new Properties();\n if (propertiesFile != null && propertiesFile.isFile()) {\n try (InputStream in = new FileInputStream(propertiesFile)) {\n p.load(in);\n } catch (Exception e) {\n e.printStackTrace();\n // oh well!\n }\n }\n properties = p;\n return p;\n }", "public static Properties readPropertiesFile(String path) {\n\n\t\tProperties propFile = new Properties();\n\t\ttry {\n\t\t\tpropFile.load(new FileInputStream(path));\n\t\t} catch (IOException e) {\n\t\t\tSystem.err.println(\"Error Reading Properties File\");\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn propFile;\n\t}", "public HistogramConfiguration loadProperties(String propertyFileName)\n {\n HistogramConfiguration histConfig = HistogramConfiguration.getInstance();\n\n try(FileInputStream inputStream = new FileInputStream(propertyFileName))\n {\n properties.load(inputStream);\n\n histConfig.setShouldIgnoreWhiteSpaces(loadShouldIgnoreWhiteSpace());\n histConfig.setIgnoreCharacters(loadIgnoredCharactersProperties());\n\n }catch (IOException e)\n {\n e.printStackTrace();\n }\n\n return histConfig;\n }", "private void readProperties() {\n // reading config files\n if (driver == null) {\n try {\n fis = new FileInputStream(userDir + \"\\\\src\\\\main\\\\resources\\\\properties\\\\Config.properties\");\n } catch (IOException e) {\n e.printStackTrace();\n }\n try {\n config.load(fis);\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }", "public static Properties loadProperties(String path) throws IOException {\n BufferedReader br = IOTools.asReader(path);\n Properties prop = new Properties();\n prop.load(br);\n br.close();\n return prop;\n }", "protected static Properties loadFileAsProperty(File file) throws FileNotFoundException, IOException {\r\n\t\tProperties result = new Properties();\r\n\t\tresult.load(new FileReader(file));\r\n\t\treturn result;\r\n\t}", "public ReadConfigFile (){\n\t\ttry {\n\t\t\tinput = ReadConfigFile.class.getClassLoader().getResourceAsStream(Constant.CONFIG_PROPERTIES_DIRECTORY);\n\t\t\tprop = new Properties();\n\t\t\tprop.load(input);\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t}catch ( IOException e ) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\t\t\n\t}", "public void setPropertiesFile(File propertiesFile) {\n this.propertiesFile = propertiesFile;\n }", "public ConfigListDTO getListProperty(final String name) {\n \t\treturn listProperties.get(name);\n \t}", "private List<Integer> readConfigFile(String filename) {\n\n Scanner input;\n try {\n input = new Scanner(this.getClass().getClassLoader().getResourceAsStream(filename));\n input.useDelimiter(\",|\\\\n\");\n } catch (NullPointerException e){\n throw new IllegalArgumentException(filename + \" cannot be found\", e);\n }\n\n checkConfigFile(filename);\n\n return parseFile(input);\n }", "public static synchronized void refreshProperties(File file) {\n var prop = new Properties();\n FileInputStream input;\n try {\n input = new FileInputStream(file);\n prop.load(input);\n input.close();\n } catch (IOException e) {\n throw new PropertyReadException(e.getMessage(), e);\n }\n\n prop.forEach((key, value) -> checkSystemPropertyAndFillIfNecessary(valueOf(key),\n nonNull(value) ? valueOf(value) : EMPTY));\n arePropertiesRead = true;\n }", "private Properties readProperties() throws IOException {\n\t\tProperties props = new Properties();\n\t\t\n\t\tFileInputStream in = new FileInputStream(\"Config.properties\");\n\t\tprops.load(in);\n\t\tin.close();\n\t\treturn props;\n\t}", "public static Properties file2Properties(File file) {\r\n Properties props = new Properties();\r\n FileInputStream stream = null;\r\n InputStreamReader streamReader = null;\r\n\r\n\r\n try {\r\n stream = new FileInputStream(file);\r\n streamReader = new InputStreamReader(stream, charSet);\r\n props.load(streamReader);\r\n } catch (IOException ex) {\r\n Logger.getLogger(RunProcessor.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n\r\n return props;\r\n }", "private void getProperties() {\n\t\tProperties menu_properties = new Properties();\n\t\tInputStream input = null;\n\t\ttry {\n\t\t\tinput = new FileInputStream(PROPERTY_FILENAME);\n\t\t\tmenu_properties.load(input);\n\t\t\ttitle = menu_properties.getProperty(TITLE_PROPERTY);\n\t\t\tscreen_width = Integer.parseInt(menu_properties.getProperty(WIDTH_PROPERTY));\n\t\t\tscreen_height = Integer.parseInt(menu_properties.getProperty(HEIGHT_PROPERTY));\n\t\t} catch (IOException ex) {\n\t\t\tSystem.err.println(\"Display file input does not exist!\");\n\t\t} catch (Exception ey) {\n\t\t\tSystem.err.println(\"The properties for the display could not be retrieved completely.\");\n \t} finally {\n \t\tif (input != null) {\n \t\t\ttry {\n \t\t\t\tinput.close();\n \t\t\t} catch (IOException e) {\n \t\t\t\tSystem.err.println(\"Display file input cannot close!\");\n \t\t\t}\n \t\t}\n \t}\n }", "private static void loadProperties(final String[] filenames, final Properties props,\n final Properties logProps) {\n\n for(String filename : filenames) {\n\n File f = new File(filename);\n\n if(!f.exists()) {\n System.err.println(\"Start-up error: The configuration file, '\" + f.getAbsolutePath() + \" does not exist\");\n System.exit(1);\n }\n\n if(!f.canRead()) {\n System.err.println(\"Start-up error: The configuration file, '\" + f.getAbsolutePath() + \" is not readable\");\n System.exit(1);\n }\n\n FileInputStream fis = null;\n Properties currProps = new Properties();\n\n try {\n fis = new FileInputStream(f);\n currProps.load(fis);\n if(f.getName().startsWith(\"log.\")) {\n logProps.putAll(resolveLogFiles(currProps));\n } else {\n props.putAll(currProps);\n }\n } catch(IOException ioe) {\n System.err.println(\"Start-up error: Problem reading configuration file, '\" + f.getAbsolutePath() + \"'\");\n Util.closeQuietly(fis);\n fis = null;\n System.exit(1);\n } finally {\n Util.closeQuietly(fis);\n }\n }\n }", "public Map<String, String> fetchPropertyFromFile()\n {\n Map<String, String> components = new HashMap<>();\n Properties props = new Properties();\n InputStream in = null;\n try {\n in = new FileInputStream(\"/slog/properties/LogAnalyzer.properties\");\n props.load(in);\n in.close();\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n\n catch (IOException e) {\n e.printStackTrace();\n }\n// Add component config , logname RegEx pattern to a Map. This map will be used to search matching files and forming logstash command\n for (String key : props .stringPropertyNames())\n {\n System.out.println(key + \" = \" + props .getProperty(key));\n components.put (key, props.getProperty(key));\n }\n\n return components;\n }", "public abstract void load(Properties props, InputStream in)\n throws IOException, InvalidPropertiesFormatException;", "private void loadPropertyFiles() {\n if ( _sax_panel != null ) {\n _property_files = ( ( SAXTreeModel ) _sax_panel.getModel() ).getPropertyFiles();\n if ( _property_files == null )\n return ;\n HashMap filelist = new HashMap();\n ArrayList resolved = new ArrayList();\n Iterator it = _property_files.keySet().iterator();\n while ( it.hasNext() ) {\n Object o = it.next();\n if ( o == null )\n continue;\n File f = null;\n if ( o instanceof File ) {\n f = ( File ) o;\n Long lastModified = ( Long ) _property_files.get( f );\n filelist.put( f, lastModified );\n }\n else if ( _project != null ) {\n String value = o.toString();\n String filename = value;\n if ( value.startsWith( \"${\" ) && value.endsWith( \"}\" ) ) {\n filename = filename.substring( 2, filename.length() - 1 );\n }\n filename = _project.getProperty( filename );\n if ( filename != null )\n f = new File( filename );\n if ( f != null && !f.exists() ) {\n f = new File( _project.getBaseDir(), filename );\n }\n if ( f != null && f.exists() ) {\n filelist.put( f, new Long( f.lastModified() ) );\n resolved.add( value );\n }\n // see issue #21, Ant standard is to quietly ignore files not found\n //else\n // _logger.warning( \"Unable to find property file for \" + value );\n }\n }\n it = resolved.iterator();\n while ( it.hasNext() ) {\n filelist.remove( it.next() );\n }\n _property_files = filelist;\n }\n }", "static List<Property> getMCProperty(List<MCProperty> properties) {\n\n\t\tif (properties == null) {\n\t\t\treturn null;\n\t\t} else {\n\t\t\tList<Property> list = new ArrayList<Property>(properties.size());\n\t\t\tfor (MCProperty property : properties) {\n\t\t\t\tlist.add(new Property(property.getName(), property.getValue()));\n\t\t\t}\n\t\t\treturn list;\n\t\t}\n\t}", "private static Properties readPropertiesFile(String fileName) throws IOException\n {\n LOG.log(Level.FINE, \"Searching for {0} file...\", fileName);\n try (final InputStream stream = SmartProperties.class.getClassLoader().getResourceAsStream(fileName))\n {\n Properties properties = new Properties();\n properties.load(stream);\n LOG.log(Level.FINE, \"{0} loaded successfully\", fileName);\n return properties;\n }\n }", "void setPropertiesFile(File file);", "public ConfigProperties read(File fFile) throws GUIReaderException { \n if ( fFile == null || fFile.getName().trim().equalsIgnoreCase(\"\") ) /*no filename for input */\n {\n throw new GUIReaderException\n (\"No input filename specified\",GUIReaderException.EXCEPTION_NO_FILENAME);\n }\n else /* start reading from config file */\n {\n try{ \n URL url = fFile.toURI().toURL();\n \n Map global = new HashMap(); \n Map pm = loader(url, global);\n ConfigProperties cp = new ConfigProperties ();\n cp.setGlobal(global);\n cp.setProperty(pm);\n return cp;\n \n }catch(IOException e){\n throw new GUIReaderException(\"IO Exception during read\",GUIReaderException.EXCEPTION_IO);\n }\n }\n }", "public static Properties getProperties(String propFilename) {\n File propFile = new File(propFilename);\n\n if (!propFile.exists()) {\n log.error(\"ERROR: Properties file '{}' cannot be found or accessed.\", propFilename);\n System.exit(1);\n }\n\n Properties props = null;\n try {\n FileInputStream propFileIn = new FileInputStream(propFile);\n props = new Properties(System.getProperties());\n props.load(propFileIn);\n } catch (IOException ioe) {\n log.error(\"ERROR: Reading properties file '{}'\", propFilename, ioe);\n System.exit(1);\n }\n return props;\n }", "ArrayList<PropertyMetadata> getProperties();", "@Test\n public void testGetPropertyAsList() {\n System.out.println(\"getPropertyAsList\");\n Properties props = new Properties();\n String key = \"testProp\";\n props.setProperty(key, \"alpha, beta, gamma\");\n List<String> expResult = Arrays.asList(\"alpha\", \"beta\", \"gamma\");\n List<String> result = EngineConfiguration.getPropertyAsList(props, key);\n assertEquals(expResult, result);\n }", "@Override\n public Configuration parseProperties(String fileUrlToProperties) throws Exception {\n fileUrlToProperties = resolvePropertiesSources(fileUrlToProperties);\n if (fileUrlToProperties != null) {\n for (String fileUrl : fileUrlToProperties.split(\",\")) {\n Properties brokerProperties = new InsertionOrderedProperties();\n if (fileUrl.endsWith(\"/\")) {\n // treat as a directory and parse every property file in alphabetical order\n File dir = new File(fileUrl);\n if (dir.exists()) {\n String[] files = dir.list(new FilenameFilter() {\n @Override\n public boolean accept(File file, String s) {\n return s.endsWith(\".properties\");\n }\n });\n if (files != null && files.length > 0) {\n Arrays.sort(files);\n for (String fileName : files) {\n try (FileInputStream fileInputStream = new FileInputStream(new File(dir, fileName));\n BufferedInputStream reader = new BufferedInputStream(fileInputStream)) {\n brokerProperties.clear();\n brokerProperties.load(reader);\n parsePrefixedProperties(this, fileName, brokerProperties, null);\n }\n }\n }\n }\n } else {\n File file = new File(fileUrl);\n try (FileInputStream fileInputStream = new FileInputStream(file);\n BufferedInputStream reader = new BufferedInputStream(fileInputStream)) {\n brokerProperties.load(reader);\n parsePrefixedProperties(this, file.getName(), brokerProperties, null);\n }\n }\n }\n }\n parsePrefixedProperties(System.getProperties(), systemPropertyPrefix);\n return this;\n }", "public static Properties loadProperties(@NonNull String path) throws IOException {\n File file = loadFile(path);\n if(file == null){ throw new IOException(\"没有找到文件\"); }\n return ReaderUtils.loadProperties(file);\n }", "public ArrayList loadItems (String file) {\n ArrayList<Item> itemList = new ArrayList<>();\n\n File itemFile = new File(file);\n\n Scanner scanner = null;\n\n try{\n scanner = new Scanner(itemFile);\n\n } catch (FileNotFoundException e){\n e.printStackTrace();\n }\n\n while(scanner.hasNextLine()){\n String line = scanner.nextLine();\n String [] oneItem = line.split(\"=\");\n itemList.add(new Item(oneItem[0],Integer.parseInt(oneItem[1])));\n }\n\n\n return itemList;\n }", "private synchronized void readProperties()\n {\n \n String workPath = \"webserver\";\n try\n {\n workPath = (String) SageTV.api(\"GetProperty\", new Object[]{\"nielm/webserver/root\",\"webserver\"});\n }\n catch (InvocationTargetException e)\n {\n System.out.println(e);\n }\n \n // check if called within 30 secs (to prevent to much FS access)\n if (fileLastReadTime + 30000 > System.currentTimeMillis())\n {\n return;\n }\n\n // check if file has recently been loaded\n File propsFile=new File(workPath,\"extenders.properties\");\n if (fileLastReadTime >= propsFile.lastModified())\n {\n return;\n }\n\n if (propsFile.canRead())\n {\n BufferedReader in = null;\n contextNames.clear();\n try\n {\n in = new BufferedReader(new FileReader(propsFile));\n String line;\n Pattern p = Pattern.compile(\"([^=]+[^=]*)=(.*)\");\n while (null != (line = in.readLine()))\n {\n line = line.trim();\n if ((line.length() > 0) && (line.charAt(0) != '#'))\n {\n Matcher m =p.matcher(line.trim());\n if (m.matches())\n {\n contextNames.put(m.group(1).trim(), m.group(2).trim());\n }\n else\n {\n System.out.println(\"Invalid line in \"+propsFile+\"\\\"\"+line+\"\\\"\");\n }\n }\n }\n fileLastReadTime=System.currentTimeMillis();\n\n }\n catch (IOException e)\n {\n System.out.println(\"Exception occurred trying to load properties file: \"+propsFile+\"-\" + e);\n }\n finally\n {\n if (in != null)\n {\n try\n {\n in.close();\n }\n catch (IOException e) {}\n }\n }\n } \n }", "static void getProps() throws Exception {\r\n\t\tFileReader fileReader = new FileReader(\"C:\\\\repos\\\\test\\\\src\\\\main\\\\java\\\\test\\\\config.properties\");\r\n\t\tProperties properties = new Properties();\r\n\r\n\t\tproperties.load(fileReader);\r\n\r\n\t\tSystem.out.println(\"By using File Reader: \" + properties.getProperty(\"username\"));\r\n\r\n\t}", "private void loadData() {\n\n \tInputStream inputStream = this.getClass().getResourceAsStream(propertyFilePath);\n \n //Read configuration.properties file\n try {\n //prop.load(new FileInputStream(propertyFilePath));\n \tprop.load(inputStream);\n //prop.load(this.getClass().getClassLoader().getResourceAsStream(\"configuration.properties\"));\n } catch (IOException e) {\n System.out.println(\"Configuration properties file cannot be found\");\n }\n \n //Get properties from configuration.properties\n browser = prop.getProperty(\"browser\");\n testsiteurl = prop.getProperty(\"testsiteurl\");\n defaultUserName = prop.getProperty(\"defaultUserName\");\n defaultPassword = prop.getProperty(\"defaultPassword\");\n }", "@Override\r\n\tpublic void setPropFile(Properties prop) {\n\t\t\r\n\t}", "public Map<String, String> getConfigPropertiesAsMap(File propertiesFile) {\n\t\tPropertiesConfiguration propertiesConfiguration = null;\n\n\t\t// A List of List of pairs (key, value)\n\t\t// List<List<String>> propertiesList = new ArrayList<>();\n\t\tMap<String, String> propertiesMap = new HashMap<String, String>();\n\n\t\t// Another option: use a HashMap, then transform it in a Set using\n\t\t// Set<Map.Entry<K,V>>\n\t\t// Map<String,String> propertiesHashMap = new HashMap<>();\n\t\ttry {\n\t\t\tpropertiesConfiguration = new PropertiesConfiguration(propertiesFile);\n\t\t\tIterator<String> iteratorPropertiesConfiguration = propertiesConfiguration.getKeys();\n\t\t\tString key = null;\n\t\t\tString value = null;\n\t\t\twhile (iteratorPropertiesConfiguration.hasNext()) {\n\t\t\t\tkey = iteratorPropertiesConfiguration.next();\n\t\t\t\tvalue = propertiesConfiguration.getProperty(key).toString().replace(\"[\", \"\").replace(\"]\", \"\");\n\t\t\t\tpropertiesMap.put(key, value);\n\n\t\t\t}\n\n\t\t} catch (ConfigurationException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\treturn propertiesMap;\n\n\t}", "protected void fromProperties(Properties properties) {\r\n value = reader.read(properties, key, value);\r\n }", "public final List<String> getPropertiesList()\n {\n\n List<String> allProps = new ArrayList<String>();\n Enumeration<?> e = this.fProp.propertyNames();\n\n while (e.hasMoreElements())\n {\n String key = (String) e.nextElement();\n String value = this.fProp.getProperty(key);\n allProps.add(key + \"=\" + value);\n } // end while\n\n Collections.sort(allProps);\n return allProps;\n\n }", "public ReadConfigProperty() {\n\n\t\ttry {\n\t\t\tString filename = \"com/unitedcloud/resources/config.properties\";\n\t\t\tinput = ReadConfigProperty.class.getClassLoader().getResourceAsStream(filename);\n\t\t\tif (input == null) {\n\t\t\t\tSystem.out.println(\"Sorry, unable to find \" + filename);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tprop = new Properties();\n\t\t\tprop.load(input);\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public static void loadProperties() {\n properties = new Properties();\n try {\n File f = new File(\"system.properties\");\n if (!(f.exists())) {\n OutputStream out = new FileOutputStream(f);\n }\n InputStream is = new FileInputStream(f);\n properties.load(is);\n lastDir = getLastDir();\n if (lastDir == null) {\n lastDir = \"~\";\n setLastDir(lastDir);\n }\n properties.setProperty(\"lastdir\", lastDir);\n\n // Try loading properties from the file (if found)\n properties.load(is);\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "private void initProperties()\r\n {\r\n try\r\n {\r\n properties.load(new FileInputStream(propertiesURL));\r\n }\r\n catch (IOException ex)\r\n {\r\n log.log(DEBUG,\"\"+ex);\r\n } \r\n }", "public void populate(java.util.Map properties) throws LexComponentException;" ]
[ "0.68936706", "0.67187476", "0.6650028", "0.66214365", "0.6593103", "0.652771", "0.6510583", "0.63506675", "0.6321745", "0.6310717", "0.6303097", "0.6267891", "0.6246", "0.62449586", "0.62313414", "0.62202936", "0.62016773", "0.61927426", "0.6189398", "0.6173349", "0.61684", "0.6129739", "0.6097686", "0.60830796", "0.60817635", "0.60773486", "0.60321397", "0.6029511", "0.60262585", "0.6022562", "0.6021635", "0.5971853", "0.5951851", "0.5950986", "0.594812", "0.59459215", "0.5942551", "0.5941399", "0.59411424", "0.59157854", "0.59115046", "0.5905791", "0.5894277", "0.5874358", "0.5872303", "0.58589494", "0.5857972", "0.5842272", "0.5828085", "0.58105487", "0.5810076", "0.580965", "0.5790535", "0.5770802", "0.5766379", "0.5766161", "0.5763814", "0.5759481", "0.57561433", "0.5747019", "0.57294655", "0.57101744", "0.57015437", "0.5693548", "0.56928766", "0.568804", "0.5685527", "0.5679644", "0.56701213", "0.56677854", "0.5653955", "0.5626739", "0.5622369", "0.56190187", "0.56113476", "0.5609803", "0.5605634", "0.55962646", "0.5591396", "0.5587165", "0.5576818", "0.55743134", "0.5572163", "0.55648535", "0.5563822", "0.5554774", "0.5542118", "0.5537826", "0.55285287", "0.55228704", "0.5509121", "0.54918927", "0.54887694", "0.54876715", "0.54869354", "0.54772735", "0.5469941", "0.546937", "0.5466727", "0.5458022" ]
0.5853279
47
Check if property is missing or blank
Boolean isBlankOrNull(String key) { return StringUtils.isBlank(properties.getProperty(key)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean isPropertyMissing() {\n \t\t\t\t\t\t\t\t\treturn false;\n \t\t\t\t\t\t\t\t}", "@SuppressWarnings(\"rawtypes\")\n private boolean containsNoValidValueFor(final Dictionary properties,\n final String propertyKey) {\n final Object propertyValue = properties.get(propertyKey);\n return !(propertyValue instanceof String) || StringUtils.isEmpty((String) propertyValue);\n }", "@Override\n\tpublic boolean hasMissingValue() {\n\t\treturn false;\n\t}", "boolean hasProperty();", "boolean hasProperty();", "boolean hasProperty();", "public boolean hasProperty() {\n return !properties.isEmpty();\n }", "private boolean haveEmptyField() {\n return getTextID(FIRST_NAME).isEmpty() ||\n getTextID(LAST_NAME).isEmpty() ||\n getTextID(ADDRESS).isEmpty();\n }", "boolean hasProperty0();", "@Override\n\t\tpublic boolean hasProperty(String key) {\n\t\t\treturn false;\n\t\t}", "public boolean isEmpty() {\n\t\t\treturn properties.isEmpty();\n\t\t}", "public boolean isMissing(String propname)\n\t\t{\n\t\t\treturn m_missingInformation.contains(propname) || m_missingInformation.contains(Validator.escapeUrl(propname));\n\t\t}", "private boolean hasValue (String s) { return s != null && s.length() != 0; }", "private static boolean validateString(Map.Entry<String, CheckState> entry) {\n String prop = System.getProperty(entry.getKey());\n if (entry.getValue().isOptional && prop == null) {\n return true;\n }\n return prop != null && !\"\".equals(prop);\n }", "private boolean checkForEmptyString(Object value)\n\t{\n\t\tif (value == null || value.toString().isEmpty()) \n\t\t\treturn true;\n\t\treturn false;\n\t}", "@Test\n public void labelIsNotNull() {\n propertyIsNot(null, null, CodeI18N.FIELD_NOT_NULL, \"name property must not be null\");\n }", "Object getPropertyexists();", "boolean hasProperty1();", "private void checkForEmptyFields() throws EmptyTextFieldException {\n\n if (date == null || title.equals(\"\") || function.equals(\"\") || protagonist.equals(\"\")\n || source.equals(\"\") || references.equals(\"\") || description.equals(\"\")) {\n throw new EmptyTextFieldException();\n }\n }", "@Test\n public void labelIsNotBlank() {\n propertyIsNot(\"\", null, CodeI18N.FIELD_NOT_BLANK, \"label property must not be blank\");\n }", "public void _hasPropertyByName() {\n requiredMethod(\"getProperties()\");\n tRes.tested(\"hasPropertyByName()\",\n (\n (oObj.hasPropertyByName(IsThere.Name)) &&\n (!oObj.hasPropertyByName(\"Jupp\")) )\n );\n }", "protected boolean shouldAddProperty(String key) {\n return !key.equals(\"label\") && !key.equals(\"id\");\n }", "public static String verifyAndFetchMandatoryProperty(String key,\r\n\t\t\tProperties prop) throws PropertyNotConfiguredException {\r\n\t\tString property;\r\n\t\t// Mandatory property should not be null.\r\n\t\tproperty = Objects.requireNonNull(fetchProperty(key, prop),\r\n\t\t\t\t\"ERROR: Must set configuration value for \" + key);\r\n\r\n\t\t// Mandatory property should not be blank.\r\n\r\n\t\tif (property.isEmpty()) {\r\n\t\t\tthrow new PropertyNotConfiguredException(\r\n\t\t\t\t\t\"ERROR: Must set configuration value for \" + key);\r\n\t\t}\r\n\t\treturn property;\r\n\t}", "public abstract boolean isBlank() throws Exception;", "private static void isValid(Map<String, Set<String>> propertiesGroupedBy, String key) {\n stringPredicate = s -> {\n final String property = PropertiesUtil.getInstance().getProperty(s);\n return (property == null || property.isEmpty());\n };\n\n //but you can write more predicates as per your needs\n\n\n final Optional<String> optional = propertiesGroupedBy.get(key).stream().filter(stringPredicate).findFirst();\n\n if (optional.isPresent()) {\n try {\n throw new Exception(optional.get() + \" value is null or empty \");\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n }", "boolean hasGetProperty();", "String getPropertyExists();", "protected void validateProperty(String name, PolylineMapObject line) throws RuntimeException {\n if (line.getProperties().get(name) == null)\n throw new RuntimeException(\"Property '\" + name + \"' not found when loading platform\");\n\n String value = line.getProperties().get(name).toString();\n\n /*if (value == null)\n throw new RuntimeException(\"Property '\" + name + \"' must be != NULL\");*/\n\n if (value.trim().length() == 0)\n throw new RuntimeException(\"Property '\" + name + \"' cannot be empty\");\n }", "public boolean isProperty();", "private final static boolean isEmpty(String field) {\n return field == null || field.trim().length() == 0;\n }", "boolean hasProperty2();", "private void check()\n {\n Preconditions.checkArgument(name != null, \"Property name missing\");\n Preconditions.checkArgument(valueOptions != null || valueMethod != null, \"Value method missing\");\n Preconditions.checkArgument(\n !(this.validationRegex != null && this.valueOptions != null && this.valueOptionsMustMatch),\n \"Cant have regexp validator and matching options at the same time\");\n\n if (required == null)\n {\n /*\n If a property has a default value, the common case is that it's required.\n However, we need to allow for redundant calls of required(): defaultOf(x).required();\n and for unusual cases where a property has a default value but it's optional: defaultOf(x).required(false).\n */\n required = this.defaultValue != null;\n }\n\n if (description == null)\n description = \"Property name: \" + name + \", required = \" + required;\n\n if (valueOptions != null && defaultValue != null)\n {\n for (PropertySpec.Value v : valueOptions)\n {\n if (v.value.equals(defaultValue.value))\n v.isDefault = true;\n }\n }\n\n if (dependsOn != null)\n {\n if (category == null)\n throw new IllegalArgumentException(\"category required when dependsOn is set \" + name);\n\n if (!dependsOn.isOptionsOnly())\n throw new IllegalArgumentException(\n \"Invalid dependsOn propertySpec (must be optionsOnly) \" + dependsOn.name());\n }\n }", "boolean hasOptionalValue();", "boolean hasSetProperty();", "private boolean isEmpty(ListItem<PropertyWrapper> attribute) {\n return false;\n }", "public boolean externalFilled() {\n return firstName != null && !firstName.isEmpty()\n || lastName != null && !lastName.isEmpty()\n || email != null && !email.isEmpty();\n }", "private boolean isPropertyRelevant(String property) {\n return relevantProperties == null || relevantProperties.contains(property);\n }", "private boolean areFieldsNotBlank() {\r\n boolean ok=true;\r\n if (dogNameField.getText() == null) {\r\n dogNameField.setStyle(\"-fx-border-color: red ; \");\r\n ok = false;\r\n } else if (dogNameField.getText().isBlank()) {\r\n dogNameField.setStyle(\"-fx-border-color: red ; \");\r\n ok = false;\r\n }\r\n return ok;\r\n }", "public static boolean isEmpty(Object field) {\r\n\t\treturn (field == null) || field.toString().trim().isEmpty();\r\n\t}", "public boolean isSetProperties() {\n return this.properties != null;\n }", "public static boolean isEmpty(Object bean) throws IntrospectionException, IllegalAccessException, IllegalArgumentException, InvocationTargetException {\r\n\t\tif (bean == null) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\tBeanInfo info = Introspector.getBeanInfo(bean.getClass(), Object.class);\r\n\t\tPropertyDescriptor[] props = info.getPropertyDescriptors();\r\n\t\tfor (PropertyDescriptor pd : props) {\r\n\t\t\tMethod getter = pd.getReadMethod();\r\n\t\t\tClass<?> type = pd.getPropertyType();\r\n\t\t\tObject value = getter.invoke(bean);\r\n\r\n\t\t\tif (CharSequence.class.isAssignableFrom(type)) {\r\n\t\t\t\tif (isNotEmpty((String) value)) {\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t} else if (value != null) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "@Test(expected = IllegalArgumentException.class)\n public void testGetPropertyValueSetEmptyPropertyName1(){\n List<User> list = toList(new User(2L), new User(5L), new User(5L));\n CollectionsUtil.getPropertyValueSet(list, \" \", Integer.class);\n }", "public boolean isMaybePresent() {\n checkNotUnknown();\n if (isPolymorphic())\n return (flags & (PRESENT_DATA | PRESENT_ACCESSOR)) != 0;\n else\n return (flags & PRIMITIVE) != 0 || num != null || str != null || object_labels != null || getters != null || setters != null;\n }", "public boolean hasProperty( String key );", "public boolean isEmpty() {\n\t\tString v = getValue();\n\t\treturn v == null || v.isEmpty();\n\t}", "@Test\n @org.junit.Ignore\n public void shouldBeAbleToCallPropertyIfThereIsASingleProperty() {\n }", "private String getRequiredProperty(Properties props, String key) {\r\n\t\tString value = props.getProperty(key);\r\n\t\tif ((value == null) || (value.trim().length() == 0)) {\r\n\t\t\tthrow new IllegalArgumentException(\r\n\t\t\t\t\t\"Property file must provide a value for '\" + key + \"'\");\r\n\t\t}\r\n\t\treturn value;\r\n\t}", "private boolean validateMandatoryParameters(QuotationDetailsDTO detail) {\t\n\n\t\tif(detail.getArticleName() == null || detail.getArticleName().equals(EMPTYSTRING)){\t\t\t\n\t\t\tAdminComposite.display(\"Please Enter Article Name\", STATUS_SUCCESS, SUCCESS_FONT_COLOR);\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}", "@Override\n public boolean hasProperty(final String relPath) {\n return false;\n }", "protected boolean isEmptyValue(final String parameter) {\n // String value = parameters.get(parameter);\n // return isEmptyString(value);\n return false;\n }", "private boolean isValueAProperty(String name)\n {\n int openIndex = name.indexOf(\"${\");\n\n return openIndex > -1;\n }", "public boolean getBlank(){\n return blank;\n }", "boolean hasProperty(String propertyName);", "private static String getPropertyValue(Properties properties, String propertyName) {\n \n String value = properties.getProperty(propertyName);\n \n if (\"\".equals(value)) {\n return null;\n }\n \n return value;\n }", "boolean hasPropType();", "public boolean exists(String property) { // e.g. th:unless=\"${errors.exists('seaName')}\"\n return messages.hasMessageOf(property);\n }", "default boolean hasValue() {\n\t\t\treturn getValue() != null;\n\t\t}", "public boolean hasValue() throws SdpParseException {\n\t\tNameValue nameValue = getAttribute();\n\t\tif (nameValue == null)\n\t\t\treturn false;\n\t\telse {\n\t\t\tObject value = nameValue.getValue();\n\t\t\tif (value == null)\n\t\t\t\treturn false;\n\t\t\telse\n\t\t\t\treturn true;\n\t\t}\n\t}", "boolean hasProperty(String key);", "@Test(expected = IllegalArgumentException.class)\n public void testGetPropertyValueSetEmptyPropertyName(){\n List<User> list = toList(new User(2L), new User(5L), new User(5L));\n CollectionsUtil.getPropertyValueSet(list, \"\", Integer.class);\n }", "public boolean hasProperty( final String name )\n {\n return getPropertyClass( name ) != null;\n }", "default boolean isEmpty() {\n return get() == null;\n }", "public void verifyNoMatching(AcProperty e)\n {\n }", "@Override\n public boolean isDefined()\n {\n return getValue() != null || getChildrenCount() > 0\n || getAttributeCount() > 0;\n }", "boolean hasPropertyLike(String name);", "private static boolean validateFileExists(Map.Entry<String, CheckState> entry) {\n String prop = System.getProperty(entry.getKey());\n if (entry.getValue().isOptional && prop == null) {\n return true;\n }\n\n if (prop == null || \"\".equals(prop)) {\n return false;\n }\n\n return Files.exists(new File(prop).toPath());\n }", "public boolean hasProperty() {\n return ((bitField0_ & 0x00000080) == 0x00000080);\n }", "@Override\n\tpublic boolean hasProperty(String fieldName, String value) {\n\t\tString[] fields = doc.getValues(fieldName);\n\t\tif (fields != null) {\n\t\t\tfor (String field : fields) {\n\t\t\t\tif (value.equals(field)) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}", "private boolean isBuildingNumberNull() {\n return (buildingNumber == null || buildingNumber.isEmpty());\n }", "private boolean noFieldsEmpty() {\n if ( nameField.getText().isEmpty()\n || addressField.getText().isEmpty()\n || cityField.getText().isEmpty()\n || countryComboBox.getSelectionModel().getSelectedItem() == null\n || divisionComboBox.getSelectionModel().getSelectedItem() == null\n || postalField.getText().isEmpty()\n || phoneField.getText().isEmpty() ) {\n errorLabel.setText(rb.getString(\"fieldBlank\"));\n return false;\n }\n return true;\n }", "public static boolean isBlank(Object bean) throws IllegalAccessException, IllegalArgumentException, InvocationTargetException, IntrospectionException {\r\n\t\treturn isBlank(bean, false);\r\n\t}", "private static boolean verifyProperties(Properties pProperties){\n boolean completeParams = false;\n if (pProperties.getProperty(UtilsConnection.CONSUMER_KEY) != null &&\n pProperties.getProperty(UtilsConnection.CONSUMER_SECRET) != null &&\n pProperties.getProperty(UtilsConnection.ACCESS_TOKEN) != null &&\n pProperties.getProperty(UtilsConnection.ACCESS_TOKEN_SECRET) != null )\n completeParams = true;\n return completeParams;\n }", "private boolean isAdditionalPorperty(String propertyName)\n\t{\n\t\tif (propertyName == null)\n\t\t\treturn false;\n\t\t\n\t\treturn (!(this.definedPropertyKeys.contains(propertyName)));\n\t}", "default boolean isPresent() {\n return get() != null;\n }", "default boolean isPresent() {\n return get() != null;\n }", "protected boolean isEmpty(Object obj) {\r\n return (obj == null || obj instanceof String\r\n && ((String) obj).trim().length() == 0);\r\n }", "private String getRequiredStringProperty(String property) throws MissingRequiredTestPropertyException{\n\t\tString value = testProperties.getProperty(property);\n\t\tif (value == null)\n\t\t\tthrow new MissingRequiredTestPropertyException(\"test.properties is missing required property \" + property);\n\t\treturn value;\n\t}", "boolean hasValue(PropertyValue<?, ?> value);", "@Override\n public boolean knownProperty(final QName tag) {\n if (propertyNames.get(tag) != null) {\n return true;\n }\n\n // Not ours\n return super.knownProperty(tag);\n }", "@Override\n public boolean knownProperty(final QName tag) {\n if (propertyNames.get(tag) != null) {\n return true;\n }\n\n // Not ours\n return super.knownProperty(tag);\n }", "private final boolean emptyVal(String val) {\n return ((val == null) || (val.length() == 0));\n }", "public static boolean isNotBlank(Object bean) throws IllegalAccessException, IllegalArgumentException, InvocationTargetException, IntrospectionException {\r\n\t\treturn !isBlank(bean);\r\n\t}", "public boolean isEmpty()\n {\n return ( name == null ) && ( data == null ) && ( notes == null );\n }", "public static boolean isBlank(Object bean, boolean deep) throws IntrospectionException, IllegalAccessException, IllegalArgumentException, InvocationTargetException {\r\n\t\tif (bean == null) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\tClass<? extends Object> clazz = bean.getClass();\r\n\t\tBeanInfo info = Introspector.getBeanInfo(clazz, Object.class);\r\n\t\tPropertyDescriptor[] props = info.getPropertyDescriptors();\r\n\t\tfor (PropertyDescriptor pd : props) {\r\n\t\t\tMethod getter = pd.getReadMethod();\r\n\t\t\tClass<?> type = pd.getPropertyType();\r\n\t\t\tObject value = getter.invoke(bean);\r\n\t\t\t\r\n\t\t\tif (CharSequence.class.isAssignableFrom(type)) {\r\n\t\t\t\tif (isNotBlank((String) value)) {\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t} else if (Collection.class.isAssignableFrom(type)) {\r\n\t\t\t\tif (value != null && !((Collection<?>) value).isEmpty()) {\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t} else if (Map.class.isAssignableFrom(type)) {\r\n\t\t\t\tif (value != null && !((Map<?, ?>) value).isEmpty()) {\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t} else if (deep && !isWrapperType(clazz)) {\r\n\t\t\t\tif (!isBlank(value, deep)) {\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t} else if (value != null) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif (props.length == 0) {\r\n\t\t\treturn bean == null;\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "protected boolean checkEmpty(String line) {\n return line == null || line.isBlank();\n }", "private static void checkRequiredProperties()\n\t{\n\t\tfor (ServerProperty prop : ServerProperty.values())\n\t\t{\n\t\t\tif (prop.isRequired())\n\t\t\t{\n\t\t\t\t// TODO\n//\t\t\t\tswitch (prop)\n//\t\t\t\t{\n//\t\t\t\t\tcase GERMINATE_AVAILABLE_PAGES:\n//\t\t\t\t\t\tSet<Page> availablePages = getSet(prop, Page.class);\n//\t\t\t\t\t\tif (CollectionUtils.isEmpty(availablePages))\n//\t\t\t\t\t\t\tthrowException(prop);\n//\t\t\t\t\t\tbreak;\n//\n//\t\t\t\t\tcase GERMINATE_USE_AUTHENTICATION:\n//\t\t\t\t\t\tboolean useAuthentication = getBoolean(prop);\n//\t\t\t\t\t\tif (useAuthentication)\n//\t\t\t\t\t\t{\n//\t\t\t\t\t\t\tif (StringUtils.isEmpty(get(ServerProperty.GERMINATE_GATEKEEPER_SERVER)))\n//\t\t\t\t\t\t\t\tthrowException(ServerProperty.GERMINATE_GATEKEEPER_SERVER);\n//\t\t\t\t\t\t\tif (StringUtils.isEmpty(get(ServerProperty.GERMINATE_GATEKEEPER_NAME)))\n//\t\t\t\t\t\t\t\tthrowException(ServerProperty.GERMINATE_GATEKEEPER_NAME);\n//\t\t\t\t\t\t}\n//\t\t\t\t\t\tbreak;\n//\n//\t\t\t\t\tcase GERMINATE_GATEKEEPER_REGISTRATION_ENABLED:\n//\t\t\t\t\t\tboolean registrationNeedsGatekeeper = getBoolean(prop);\n//\n//\t\t\t\t\t\tif (registrationNeedsGatekeeper)\n//\t\t\t\t\t\t{\n//\t\t\t\t\t\t\tString gatekeeperUrl = get(ServerProperty.GERMINATE_GATEKEEPER_URL);\n//\n//\t\t\t\t\t\t\tif (StringUtils.isEmpty(gatekeeperUrl))\n//\t\t\t\t\t\t\t\tthrowException(ServerProperty.GERMINATE_GATEKEEPER_URL);\n//\t\t\t\t\t\t}\n//\t\t\t\t\t\tbreak;\n//\n//\t\t\t\t\tdefault:\n\t\t\t\tif (StringUtils.isEmpty(get(prop)))\n\t\t\t\t\tthrowException(prop);\n//\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "private boolean m16125a(Object obj) {\n return obj == null || obj.toString().equals(\"\") || obj.toString().trim().equals(\"null\");\n }", "@Override\r\n public boolean checkNull() {\r\n // Check if the two textfields are null or default \r\n return newIng_ingName.getText().equals(\"\") || newIng_ingCal.getText().equals(\"\");\r\n }", "public void validateComponent() throws org.apache.ant.common.util.ExecutionException {\n if (name == null) {\n throw new org.apache.ant.common.util.ExecutionException(\"\\\"name\\\" attribute of \" + \"<property> must be supplied\");\n }\n if (value == null) {\n throw new org.apache.ant.common.util.ExecutionException(\"\\\"value\\\" attribute of \" + \"<property> must be supplied\");\n }\n }", "public boolean existsProperty(String name)\r\n\t{\r\n\t\treturn obtainOntProperty(name) != null;\r\n\t}", "@Test(expected = IllegalStateException.class)\n @org.junit.Ignore\n public void shouldNotBeAbleToCallPropertyIfThereAreMultipleProperties() {\n }", "public boolean isFilled() {\n return(!this.getText().trim().equals(\"\"));\n }", "public boolean isEmpty() {\n\t\treturn memberNo == 0 && (name == null || name.isEmpty()) && minTotalPrice == 0 && maxTotalPrice == 0\n\t\t && getBeginOrderDate() == null && getEndOrderDate() == null;\n\t}", "public boolean isBlank() {\n return (tags.length() == 0);\n }", "public boolean hasProperty() {\n return ((bitField0_ & 0x00000040) == 0x00000040);\n }", "boolean isNilValue();", "public static boolean checkMandatoryFields(Object obj) {\n\n\t\tif (obj instanceof UserDTO) {\n\n\t\t\tUserDTO userDTO = (UserDTO) obj;\n\n\t\t\tif (userDTO.getPasscode().trim().isEmpty()) {\n\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t}", "private String getRequiredStringProperty(String[] propertyNameList) throws MissingRequiredTestPropertyException{\n\t\tif (propertyNameList.length == 0)\n\t\t\tthrow new IllegalArgumentException(\"empty property name list\");\n\t\tString value = getOptionalStringProperty(propertyNameList);\n\t\tif (value == null)\n\t\t\tthrow new MissingRequiredTestPropertyException(\"test.properties is missing required property \" + propertyNameList[0]);\n\t\treturn value;\n\t}", "public void _getPropertyByName() {\n requiredMethod(\"getProperties()\");\n boolean result;\n try {\n Property prop = oObj.getPropertyByName(IsThere.Name);\n result = (prop != null);\n } catch (com.sun.star.beans.UnknownPropertyException e) {\n log.println(\"Exception occurred while testing\" +\n \" getPropertyByName with existing property\");\n e.printStackTrace(log);\n result = false;\n }\n\n try {\n oObj.getPropertyByName(\"Jupp\");\n log.println(\"No Exception thrown while testing\"+\n \" getPropertyByName with non existing property\");\n result = false;\n }\n catch (UnknownPropertyException e) {\n result = true;\n }\n tRes.tested(\"getPropertyByName()\", result);\n return;\n }", "private void checkForNullOrEmptyParameter(String param, String paramName)\n\t\t\tthrows MissingParameterException, InvalidParameterException {\n\t\tif (param == null) {\n\t\t\tthrow new MissingParameterException(paramName + \" can not be null\");\n\t\t} else if (param.trim().isEmpty()) {\n\t\t\tthrow new InvalidParameterException(paramName + \" can not be empty\");\n\t\t}\n\t}" ]
[ "0.75159866", "0.67995244", "0.6748104", "0.67318994", "0.67318994", "0.67318994", "0.6712649", "0.66744506", "0.66408205", "0.66265005", "0.6553647", "0.6523469", "0.6518938", "0.6485601", "0.64410967", "0.6417902", "0.6410742", "0.6402587", "0.6394694", "0.6367265", "0.63668704", "0.6351533", "0.6344914", "0.6336116", "0.63358116", "0.6252088", "0.62361544", "0.62061423", "0.62046164", "0.61958903", "0.61852574", "0.6183848", "0.6154593", "0.6153636", "0.6153036", "0.6150756", "0.6109314", "0.6102833", "0.6101547", "0.60978097", "0.60977936", "0.60718024", "0.606674", "0.6062308", "0.6060772", "0.6042739", "0.60207635", "0.60181147", "0.6005375", "0.5986774", "0.5978011", "0.59720874", "0.5970199", "0.5958099", "0.5953874", "0.59506685", "0.5946874", "0.59437615", "0.5937916", "0.593181", "0.5916132", "0.59118867", "0.5909448", "0.5908279", "0.5905543", "0.59035635", "0.5901116", "0.58972067", "0.5891284", "0.58898443", "0.5886778", "0.5884095", "0.5883916", "0.5876908", "0.5876908", "0.5869014", "0.5860389", "0.58567786", "0.5852319", "0.5852319", "0.584395", "0.5828015", "0.5801696", "0.5782914", "0.5778857", "0.5778014", "0.5774801", "0.5762335", "0.57616353", "0.5756475", "0.57540697", "0.5748619", "0.57455206", "0.5743066", "0.57422477", "0.574123", "0.57394665", "0.57360214", "0.5729839", "0.57275516" ]
0.74075544
1
end of BeforeSuite Before method is only defined to capture your test method name to imported on your html report
@BeforeMethod public void methodName(Method method) { logger = reports.startTest(method.getName()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@BeforeMethod\r\n public void beforeMethod(Method method)\r\n {\n\t String testName = method.getName();\r\n\t \r\n\t System.out.println(\"Before Method\" + testName);\r\n\t \r\n\t //Get the data from DataSheet corresponding to Class Name & Test Name\r\n\t asapDriver.fGetDataForTest(testName);\r\n\t \r\n\t //Create Individual HTML Report\t\r\n\t Global.Reporter.fnCreateHtmlReport(testName);\t \r\n }", "@BeforeSuite\r\n\t\tpublic void BeforeSute()\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Before suite\");\r\n\t\t}", "@Parameters({ \"report_name\" })\n\t@BeforeSuite\n\tpublic void setUp() {\n\t\tString reportName = \"Report-\" + getCurrentDateNTime(\"yyyy-MM-dd-HH-mm-ss\");\n\t\t//String reportFileName = reportName + \".html\";\n\t\tString reportFileName = \"TestExecutionReport.html\";\n\t\treports = new ExtentReports(\"./ExecutionReport/\" + reportFileName, true);\n\t\treports.loadConfig(new File(\"extent-config.xml\"));\n\t}", "@BeforeMethod\n\tpublic void setup()\n\t{\n\t ExtentHtmlReporter reporter=new ExtentHtmlReporter(\"./Reports/naveen-report.html\");\n\t\t\n\t extent = new ExtentReports();\n\t \n\t extent.attachReporter(reporter);\n\t \n\t logger=extent.createTest(\"LoginTest\");\n\t}", "@BeforeTest\n\tpublic void beforeTest() throws Exception {\n\t\textent = ExtentManager.getReporter(filePath);\n\t\trowData = testcase.get(this.getClass().getSimpleName());\n\t\ttest = extent.startTest(rowData.getTestcaseId(), rowData.getTestcaseDescription()).assignCategory(\"IPA\");\n\t}", "protected void runBeforeTest() {}", "@BeforeSuite\r\n\tpublic void setUpSuite()\r\n\t{\n\t\t\r\n\t\t Reporter.log(\"*****************Setting up reports and test started********************\", true);\r\n\t\t exceldata = new ExcelDataProvider();\r\n\t\t configreader = new ConfigReader();\r\n\t\t \r\n\t\tExtentHtmlReporter extent = new ExtentHtmlReporter(new File(System.getProperty(\"user.dir\") + \"/Reports/SampleFramwork.html\"));\r\n\t\treport = new ExtentReports();\r\n\t\treport.attachReporter(extent);\r\n\t\t Reporter.log(\"******************All configurations done********************\", true);\r\n\t}", "@BeforeMethod\n\tpublic void setup()\n\t{\n\t ExtentHtmlReporter reporter=new ExtentHtmlReporter(\"./Reports/amazon.html\");\n\t\t\n\t extent = new ExtentReports();\n\t \n\t extent.attachReporter(reporter);\n\t \n\t logger=extent.createTest(\"LoginTest\");\n\t}", "@BeforeTest\n\tpublic void beforeTest() throws Exception {\n\t\textent = ExtentManager.getReporter(filePath);\n\t\trowData = testcase.get(this.getClass().getSimpleName());\n\t\ttest = extent.startTest(rowData.getTestcaseId(), rowData.getTestcaseDescription()).assignCategory(\"Watchlist\");\n\n\t}", "@BeforeMethod(alwaysRun = true)\n\tpublic void beforeMethod(Method method, ITestContext ctx) throws Exception {\n\n\t\tString suitTest = ctx.getCurrentXmlTest().getName();\n\t\t// logger = report.startTest(\"<font color='magenta';>\"+suitTest+\"</font>\");\n\t\t// String suiteinfo = suitTest+\" Start\";\n\t\t// logger.log(LogStatus.INFO, \"<font color='cyan';>\"+suiteinfo+\"</font>\");\n\t\tif (suitTest.equals(\"cljTestChrome\") && driver != null) {\n\t\t\tlogger = report.startTest(\n\t\t\t\t\t(\"CH\" + \"-\" + \"<font color='#b4dcff'>\" + this.getClass().getSimpleName() + \"-\" + method.getName())\n\t\t\t\t\t\t\t+ \"</font>\",\n\t\t\t\t\t\"-\" + \"<font color='white'>\" + method.getName() + \"</font>\");\n\n\t\t} else if (suitTest.equals(\"cljTestFirefox\") && driver != null) {\n\t\t\tlogger = report.startTest(\n\t\t\t\t\t(\"FF\" + \"-\" + \"<font color='#b4dcff'>\" + this.getClass().getSimpleName() + \"-\" + method.getName())\n\t\t\t\t\t\t\t+ \"</font>\",\n\t\t\t\t\t\"-\" + \"<font color='white'>\" + method.getName() + \"</font>\");\n\n\t\t} else {\n\t\t\tlogger.log(LogStatus.ERROR, \"Browser is not open\");\n\t\t}\n\n\t}", "@Before\n public void beforeTest(){\n\n\n }", "@BeforeClass\n\tpublic void setup() {\n\t\treport2 = new ExtentReports(\"./Reports/ElfuScripts.html\");\n\n\t}", "@Before\n public void beforeScenario() {\n }", "@BeforeMethod\n\tpublic void beforeMethod() {\n//\t\tSeleniumWrapper.openPage(\"http://localhost:8080\");\n//\t\tm_logMessage = new StringBuilder();\n//\t\tm_logMessage.append(String.format(\"TestCase - %s, started @ %s \\n\", m_currentTestCaseName,\n//\t\t\t\tCommonUtil.getFormatedDate(\"yyyy-MM-dd HH:mm:ss.SSS \")));\n//\t\tm_logMessage.append(\n//\t\t\t\t\"------------------------------------------------------------------------------------------------------------------------- \\n\");\n//\t\tm_logMessage.append(String.format(\"Description: %s. \\nTest Steps: \\n\", m_currentTestCaseDescription));\n//\t\tlogFullTestDescription();\n//\t\tLog.writeMessage(LogLevel.INFO, m_logMessage.toString());\n\t\tHelper.sleep(4000);\n\t}", "@BeforeSuite(alwaysRun=true,description=\"test\")\r\n\tpublic void extentReportSetup() \r\n\t{\r\n\t\tSystem.out.println(\"===== I am Befor Test Method==== \");\r\n\t\t\r\n\t\thtmlReporter = new ExtentHtmlReporter(reporterPath);\r\n\t\thtmlReporter.config().setDocumentTitle(\"Free Job Portal\");\r\n\t\thtmlReporter.config().setReportName(\"ExtentReporter\");\r\n\t\thtmlReporter.config().setTheme(Theme.STANDARD);\r\n\t\t\r\n\t\treporter = new ExtentReports();\r\n\t\treporter.attachReporter(htmlReporter);\r\n\t\t\r\n\t\treporter.setSystemInfo(\"Host\",\"localhost\");\r\n\t\treporter.setSystemInfo(\"OS\",System.getProperty(\"OS\"));\r\n\t\treporter.setSystemInfo(\"User\",\"Sekhar\");\r\n\t}", "@BeforeTest\npublic void hai()\n{\n\t\n\tHello();\n\t\n}", "@BeforeSuite\n public void setUp() {\n htmlReporter = new ExtentHtmlReporter(\"Reports.html\");\n // create ExtentReports and attach reporter(s)\n extent = new ExtentReports();\n extent.attachReporter(htmlReporter);\n }", "@BeforeSuite\n public static void setup() {\n ExtentProperties extentProperties = ExtentProperties.INSTANCE;\n extentProperties.setReportPath(\"ExtentReports/myreport.html\");\n }", "@BeforeTest\n\tpublic void StartReportbeforeTest() {\n\t\textent = new ExtentReports(System.getProperty(\"user.dir\") + \"/test-output/casestudy_Reports.html\", true);\n\t\textent.addSystemInfo(\"Host Name\", \"TestMeApp\");\n\t\textent.addSystemInfo(\"Environment\", \"Selenium Testing\");\n\t\textent.addSystemInfo(\"User Name\", \"Group-1\");\n\n\t\tdriver = UtilityClass.getDriver(\"chrome\");\n\t\tdriver.manage().window().maximize();\n\t\tdriver.get(\"http://10.232.237.143:443/TestMeApp\");\n\n\t}", "@Before\n public void before() {\n System.out.format(\"In Before of %s\\n\", ExecutionProcedureJunit2.class.getName());\n }", "@BeforeTest\n\tpublic void startReport() {\n\t\t// ExtentReports(String filePath,Boolean replaceExisting)\n\t\t// filepath - path of the file, in .htm or .html format - path where your report\n\t\t// needs to generate.\n\t\t// replaceExisting - Setting to overwrite (TRUE) the existing file or append to\n\t\t// it\n\t\t// True (default): the file will be replaced with brand new markup, and all\n\t\t// existing data will be lost. Use this option to create a brand new report\n\t\t// False: existing data will remain, new tests will be appended to the existing\n\t\t// report. If the the supplied path does not exist, a new file will be created.\n\t\textent = new ExtentReports(System.getProperty(\"user.dir\") + \"/test-output/ExtentReport.html\", true);\n\t\t// extent.addSystemInfo(\"Environment\",\"Environment Name\")\n\t\textent.addSystemInfo(\"Host Name\", \"SoftwareTestingMaterial\").addSystemInfo(\"Environment\", \"Automation Testing\")\n\t\t\t\t.addSystemInfo(\"User Name\", \"Rajkumar SM\");\n\t}", "@BeforeMethod(groups={\"loadDriver\"},alwaysRun=true)\n\tpublic void LoadDriverBeforeTest(Method method) {\n\t\tDesiredCapabilities capabilities = new DesiredCapabilities();\n\t\tcapabilities.setBrowserName(\"firefox\");\n\t\tcapabilities.setPlatform(Platform.WINDOWS);\n\t\tdriver = new FirefoxDriver(capabilities);\n\t\tMyReporter.log(\"Starting Test Method :\"+method.getName());\n\n\t}", "@Before\n public void setupThis() {\n System.out.println(\"* Before test method *\");\n }", "@BeforeTest\n\tpublic void startReport() {\n\t\textent = new ExtentReports(System.getProperty(\"user.dir\")+\"//extent-reports//myreport.html\",true);\n\t\textent.addSystemInfo(\"Host Name\", \"LocalHost\");\n\t\textent.addSystemInfo(\"Environment\", \"QA\");\n\t\textent.addSystemInfo(\"User Name\", \"Prasanta\");\n\t\textent.loadConfig(new File(System.getProperty(\"user.dir\")+\"//ReportsConfig.xml\"));\n\t}", "public static void setReport()\n {\n ExtentHtmlReporter htmlReporter = new ExtentHtmlReporter(\"\\\\C:\\\\Users\\\\shir halevi\\\\Desktop\\\\qaexpert\\\\buyMe\\\\reports\\\\extent.html\");\n htmlReporter.setAppendExisting(true);\n extent = new ExtentReports();\n extent.attachReporter(htmlReporter);\n test = extent.createTest(\"BuyMeSanityTestWeb\", \"This is a BuyMe Sanity Test Web\");\n extent.setSystemInfo(\"Tester\", \"Shir\");\n test.log(Status.INFO, \"@Before class\");\n }", "@BeforeMethod(alwaysRun = true)\r\n\tpublic void testMethodSetup() {\r\n\t\tif (driver == null)\r\n\t\t\tinitializeDriver();\r\n\t\tlaunchURl();\r\n\t\twaitForPageLoad(1000);\r\n\t}", "@BeforeMethod\r\n\tpublic void beforeMethod() {\r\n\t\t//initializeTestBaseSetup();\r\n\t}", "@BeforeMethod\r\n\tpublic void startTestCase() {\n\t\ttest = extent.createTest(testCaseName, testCaseDescription);\r\n\t\ttest.assignAuthor(author);\r\n\t\ttest.assignCategory(category);\r\n\t}", "@Override\r\n\tpublic void beforeInvocation(IInvokedMethod arg0, ITestResult arg1) {\n\t\tGenerateReports.starttest(crntclassname);\r\n\t}", "@Before\r\n\t public void setUp(){\n\t }", "@Override\n\t\tpublic void onStart(ITestContext context) {\n\t\t\tSystem.out.println(\"Extent Reports Version 3 Test Suite started!\");\n\t ParentextentTest = extent.createTest(context.getName());\n\n\t\t\t\n\t\t}", "@BeforeTest\n\n public void Initialize() {\n\n\n}", "@BeforeMethod\n\tpublic void beforeMethod() {\n\t}", "@Before\n public void before() {\n }", "@Before\n public void before() {\n }", "@Test(dependsOnMethods=\"testReadReportTwo\")\n \tpublic void testReadReportThree() {\n \t\t\n \t}", "@BeforeClass // runs before all test cases; runs only once\n public static void setUpSuite() {\n\n }", "@BeforeMethod(alwaysRun=true)// @BeforeMethod\r\n\tpublic void test_before()throws Exception{\r\n\t\t// WebDriver driver;\t\r\n\t\t\r\n\t\tSystem.setProperty(\"webdriver.chrome.driver\",driverPath_Chrome); // System.setProperty(\"webdriver.gecko.driver\",driverPath_Firefox);\r\n\t\tdriver = new ChromeDriver(); // driver = new FirefoxDriver(); // \r\n\t\tdriver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);\r\n\t\tdriver.manage().window().maximize();\r\n\t\tdriver.get(baseURL_LC); //driver.get(baseURL_LC);// driver.get(baseGoogle); // driver.get(baseUK);\r\n//\t\tJavascriptExecutor js = (JavascriptExecutor) driver;\r\n\t}", "@BeforeClass(enabled =true)\n\tpublic void beforeClass(){\n\t\tSystem.out.println(\"In BeforeClass\");\n\t}", "@BeforeClass\n public void beforeclass() {\n\t}", "@Before\r\n\tpublic void before() {\r\n\t}", "@BeforeClass\r\n\tpublic void initiate()\r\n\t{\r\n\t\treporter = new ExtentHtmlReporter(\"./Reports/TestReport.html\");\r\n\t\textent = new ExtentReports();\r\n\t\textent.attachReporter(reporter);\r\n\t}", "@BeforeClass\n\tpublic void beforeClass() {\n\t\tif (!m_isTestPassed)\n\n\t\t\tSeleniumWrapper.openPage(\"http://localhost:8080/#/reporting/student/orr/reading_level_progress\");\n\n\t\tm_logMessage = new StringBuilder();\n\t\tm_logMessage.append(String.format(\"TestCase - %s, started @ %s \\n\", m_currentTestCaseName,\n\t\t\t\tCommonUtil.getFormatedDate(\"yyyy-MM-dd HH:mm:ss.SSS \")));\n\t\tm_logMessage.append(\n\t\t\t\t\"------------------------------------------------------------------------------------------------------------------------- \\n\");\n\t\tm_logMessage.append(String.format(\"Description: %s. \\nTest Steps: \\n\", m_currentTestCaseDescription));\n\t\tlogFullTestDescription();\n\t\tLog.writeMessage(LogLevel.INFO, m_logMessage.toString());\n\t}", "@BeforeSuite\n public void beforeSuite(ITestContext context) {\n useGrid = Boolean.parseBoolean(getTestNGParam(context,\"run.on.grid\"));\n \t//data properties file\n initDataFile(getTestNGParam(context,\"data.file.name\"));\n //device log\n initDeviceLogsFolder(context);\n }", "protected void runBeforeStep() {}", "@Before\n public void postSetUpPerTest(){\n\n }", "@BeforeClass\n\tpublic void beforeClass() {\n\t}", "@Before\r\n\tpublic void beforeCucumber(Scenario sc)\r\n\t{\n\t\tstartResult();\r\n\r\n\t\t//Calling Before Class Method\r\n\t\ttestCaseName = sc.getName();\r\n\t\ttestCaseDescription =sc.getId();\r\n\t\tcategory = \"Smoke\";\r\n\t\tauthor= \"Babu\";\r\n\r\n\t\t//Calling Before Method\r\n\r\n\t\tstartTestCase();\r\n\r\n\t\t//Calling at test\r\n\r\n\t\tstartApp(\"chrome\",\"https://www.bankbazaar.com\");\r\n\r\n\t}", "@Before\n public void init() {\n this.testMethodName = this.getTestMethodName();\n this.initialize();\n }", "@Override\r\npublic void beforeScript(String arg0, WebDriver arg1) {\n\tSystem.out.println(\"as\");\r\n}", "@BeforeEach\n public void beforeTest() {\n loginPage.navigateToLoginPage();\n }", "@Override\r\n\tpublic void onTestStart(ITestResult classname) {\n\t\tString tcname=classname.getInstanceName().toString();\r\n\t\tint lastpos_dot =tcname.lastIndexOf(\".\")+1;\r\n\t\tcrntclassname=tcname.substring(lastpos_dot);\r\n\t\tGenerateReports.initializeReport(crntclassname);\r\n\t\t\r\n\t}", "@BeforeTest\n\tpublic void config() {\n\t\tString path=System.getProperty(\"user.dir\")+\"\\\\reports\\\\index.html\"; //after + we want new path to add to it\n\t\tExtentSparkReporter reporter=new ExtentSparkReporter(path);// this is responsible for creating report\n\t\treporter.config().setReportName(\"Web Automation Akhil\");\n\t\treporter.config().setDocumentTitle(\"Test Results\");\n\t\t\n\t\tExtentReports extent=new ExtentReports();// this is main class for Tracking the things.\n\t\textent.attachReporter(reporter); // Here is link of config with main class\n\t\textent.setSystemInfo(\"Tester\", \"Akhilesh Rawat\");\n\t}", "@Override\r\n public void beforeScript(final String arg0, final WebDriver arg1) {\n\r\n }", "@BeforeSuite\r\n\tpublic void before_suite() {\n\t\tSystem.setProperty(\"webdriver.chrome.driver\",\"G:\\\\chromedriver.exe\");\r\n\t}", "@Before\r\n public void setUp()\r\n {\r\n }", "@Before\r\n public void setUp()\r\n {\r\n }", "@Before\r\n public void setUp()\r\n {\r\n }", "@Before\r\n public void setUp()\r\n {\r\n }", "@BeforeSuite\r\n\t public void setExtent() \r\n\t {\n\t htmlReporter = new ExtentHtmlReporter(System.getProperty(\"user.dir\") + \"/test-output/myReport.html\");\r\n\r\n\t htmlReporter.config().setDocumentTitle(\"Automation Report\");\t // Tile of report\r\n\t htmlReporter.config().setReportName(\"REIMBURSIFY ANDROID\"); // Name of the report\r\n\t htmlReporter.config().setReportName(\"Regression Testing\"); // Name of the report\r\n\r\n\t htmlReporter.config().setTheme(Theme.STANDARD);\r\n\t \r\n\t extent = new ExtentReports();\r\n\t extent.attachReporter(htmlReporter);\r\n\t \r\n\t // Passing General information\r\n\t extent.setSystemInfo(\"Host name\", \"Reim Demo Runner\");\r\n\t extent.setSystemInfo(\"Environemnt\", \"QA\");\r\n\t// extent.setSystemInfo(\"User\", \"Sharmila\");\r\n\t extent.setSystemInfo(\"iOS\", \"13.6\");\r\n\t extent.setSystemInfo(\"Application Version\", \"QA Version 3.3.15\");\r\n\t extent.setSystemInfo(\"Type of Testing\", \"E2E Test\");\r\n\t }", "@Test\n public void testWizardReport() {\n testReporterConfig(Reporter.ALL_2017_4_24, \"WizardReport.txt\");\n }", "@Before public void setUp() {\n }", "@Before public void setUp() {\n }", "@Before public void setUp() {\n }", "@Before public void setUp() {\n }", "@Before public void setUp() {\n }", "@Override\r\n\tpublic void onStart(ITestContext context) {\n\t\tSystem.out.println(\"onStart -> Test Name: \"+context.getName());\r\n\t\t\r\n\t}", "@Test(groups={\"it\"})\r\n\tpublic void testBeforeMethodCapturesArePresent() throws Exception {\r\n\t\t\r\n\t\ttry {\r\n\t\t\tSystem.setProperty(SeleniumTestsContext.BROWSER, \"chrome\");\r\n\t\t\tSystem.setProperty(\"startLocation\", \"beforeMethod\");\r\n\t\t\texecuteSubTest(1, new String[] {\"com.seleniumtests.it.stubclasses.StubTestClassForListener5.test1Listener5\"}, \"\", \"stub1\");\r\n\t\t} finally {\r\n\t\t\tSystem.clearProperty(SeleniumTestsContext.BROWSER);\r\n\t\t}\r\n\t\t\r\n\t\tString outDir = new File(SeleniumTestsContextManager.getGlobalContext().getOutputDirectory()).getAbsolutePath();\r\n\r\n\t\t\r\n\t\t// check that there is not folder named 'beforeMethod' or 'startTestMethod', which correspond to @BeforeMethod annotated methods\r\n\t\tfor (String fileName: new File(outDir).list()) {\r\n\t\t\tif (fileName.startsWith(\"beforeMethod\") || fileName.startsWith(\"startTestMethod\")) {\r\n\t\t\t\tAssert.fail(\"execution of '@BeforeMethod' should not create output folders\");\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// check that a 'before-test1Listener5' has been created and (iisue #399) does not contain html capture\r\n\t\tAssert.assertTrue(Arrays.asList(new File(outDir).list()).contains(\"before-test1Listener5\"));\r\n\t\tAssert.assertEquals(Paths.get(outDir, \"before-test1Listener5\", \"htmls\").toFile().list().length, 0);\r\n\t\t\r\n\t\t// check that a 'test1Listener5' has been created and contains html capture from \"before\" step and test step\r\n\t\tAssert.assertEquals(Paths.get(outDir, \"test1Listener5\", \"htmls\").toFile().list().length, 2);\r\n\t}", "@BeforeMethod\n\tpublic void setUpMethod() {\n//\t\tDrivers.setChrome();\n//\t\tthis.driver = Drivers.getDriver();\n\t\tdriver.get(DataReaders.projectProperty(\"baseURL\"));\n\t}", "@BeforeMethod\n\tpublic void testSetUp()\n\t{\n\t\tcommonUtilities.invokeBrowser();\n\t\tloginPage.login(ReadPropertiesFile.getPropertyValue(\"username\"), ReadPropertiesFile.getPropertyValue(\"password\"));\n\t}", "@Override\n protected String testName(FrameworkMethod method)\n {\n return method.getName() + getName();\n }", "@BeforeClass\n public static void beforeClass() {\n }", "@BeforeMethod\n public void beforeMethod() {\n System.setProperty(\"webdriver.chrome.driver\",\n \"./src/test/resources/drivers/chromedriver\");\n System.setProperty(\"webdriver.gecko.driver\",\n \"./src/test/resources/drivers/geckodriver\");\n System.setProperty(\"webdriver.opera.driver\",\n \"./src/test/resources/drivers/operadriver\");\n\n // Initialize new WebDriver session\n ChromeOptions chromeOptions = new ChromeOptions();\n chromeOptions.setHeadless(false);\n\n driver = new ChromeDriver(chromeOptions);\n\n FirefoxOptions firefoxOptions = new FirefoxOptions();\n firefoxOptions.setHeadless(false);\n\n// driver = new FirefoxDriver(firefoxOptions);\n// driver = new SafariDriver();\n// driver = new OperaDriver();\n\n // Maximize browser window\n driver.manage().window().maximize();\n\n // Take screenshot of the web page and save it to a file\n// File scrFile = ((TakesScreenshot) driver).getScreenshotAs(OutputType.FILE);\n// FileUtils.copyFile(scrFile, new File(\"./target/screenshot.png\"));\n }", "public void before() {\n }", "public void before() {\n }", "@BeforeMethod\n public void beforeMethod() {\n loginPage = new LoginPage(driver);\n loginPage.open(); //open poker URL\n }", "@BeforeClass\n public static void beforeClass() {\n System.out.format(\"In BeforeClass of %s\\n\", ExecutionProcedureJunit2.class.getName());\n }", "@Before\n public void createCalc(){\n calculator = new Calculator();\n System.out.println(\"I am BeforeMethod\");\n }", "@BeforeClass\r\n\tpublic static void beforeClass() {\r\n\t\tSystem.out.println(\"in before class\");\r\n\t}", "@Then(\"User can view the dashboard\")\npublic void user_can_view_the_dashboard() {\n addCust = new AddcustomerPage(driver);\n Assert.assertEquals(\"Dashboard / nopCommerce administration\", addCust.getPageTitle());\n \n}", "public void onStart(ITestContext testContext) {\n\t\tString timeStamp = LocalDateTime.now().format(DateTimeFormatter.ofPattern(\"yyyy_MM_dd_HH_mm_ss\"));\n\t\tString reportName= \"NetBanking_Report_\"+timeStamp+\".html\";\n\t\textent = new ExtentReports();\n\t\tspark = new ExtentSparkReporter(\"./test-output/\"+reportName);\n\t\ttry {\n\t\t\tspark.loadXMLConfig(\"./extent-config.xml\");\n\t\t\t\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\textent.attachReporter(spark);\n\t\textent.setSystemInfo(\"Host name\", \"localHost\");\n\t\textent.setSystemInfo(\"Environment\", \"QA\");\n\t\textent.setSystemInfo(\"user\", \"Ashis\");\n\t\t\n\t\t\n\t\t\n\t\t\n\t}", "@Before public void setUp() { }", "@Before\r\n\tpublic void setUp() {\n\t}", "@Before\n public void setUp() throws Exception {\n System.out.println(MessageFormat.format(\"Running unit-test: {0}#{1}\",\n this.getClass().getName(), testName.getMethodName()));\n }", "@AfterMethod\r\n\t\t\tpublic void testdataReporter()\r\n\t\t\t{\n\t\t\t\tif(skip)\r\n\t\t\t\t\tTestUtil.reportDataSetResult(suiteProductDescPageXls,this.getClass().getSimpleName(),count+2,\"Skip\");\r\n\t\t\t\telse if(fail)\r\n\t\t\t\t{\r\n\t\t\t \tTestUtil.reportDataSetResult(suiteProductDescPageXls,this.getClass().getSimpleName(),count+2,\"Fail\");\r\n\t\t\t istestpass=false; //checking for the TestCase is failed or passed\r\n\t\t\t\t}\r\n\t\t\t else\r\n\t\t\t TestUtil.reportDataSetResult(suiteProductDescPageXls,this.getClass().getSimpleName(),count+2,\"Pass\");\r\n\t\t\t \t \t \r\n\t\t\t\tskip=false;\r\n\t\t\t \tfail=false;\r\n\t\t\t \r\n\t\t\t}", "@BeforeClass public static void initialiseScenario(){\n SelectionScenario.initialiseScenario();\n }", "@Before\n\t public void setUp() {\n\t }", "@Before\r\n public void before() throws Exception {\r\n }", "@Before\r\n\tpublic void before() {\r\n\t\tSystem.out.println(\" Before() \");\r\n\t\tcalc = new CalculadoraDos();// no forma parte del test es una precondicion para ejecutar el test\r\n\t}", "@BeforeAll\n static void setup() {\n log.info(\"@BeforeAll - executes once before all test methods in this class\");\n }", "@Before\n public void setUp() {\n }", "@Before\n\tpublic void setUp() {\n\t}", "@Override\r\npublic void onTestSuccess(ITestResult arg0) {\n\tExtentReports er = new ExtentReports(\"./Report/Report.html\");\r\n\tExtentTest t1 = er.startTest(\"TC001\");\r\n\tt1.log(LogStatus.PASS, \"Passed\");\r\n\tSystem.out.println(\"balle\");\r\n\ter.endTest(t1);\r\n\ter.flush();\r\n\ter.close();\r\n\r\n\t}", "@BeforeMethod\n\tpublic void setUp()\n\t{\n\t\tdriver = utilities.WebDriverFactory.Open(\"chrome\");\n\t\tdriver.get(webUrl);\n\t\tdashboardPage = new DashboardPageObject(driver);\n\t\t\n\t}", "@Override\r\npublic void onTestStart(ITestResult arg0) {\n\t\r\n}", "@Test(priority=1, testName = \"LoginTest\")\n public void HrmLoginTest() {\n ConcreteMixer.ConcretePanel();\n\n\n }", "@Before\n public void setUp()\n {\n }", "@Before\n public void setUp()\n {\n }", "@Before\n public void setUp()\n {\n }", "@Before\n public void setUp()\n {\n }" ]
[ "0.75970453", "0.7358651", "0.71479565", "0.7117101", "0.7082368", "0.70649135", "0.70277166", "0.70216817", "0.70021254", "0.69852597", "0.69120044", "0.68553436", "0.68517524", "0.68309444", "0.68220705", "0.68156093", "0.6748374", "0.67256826", "0.672475", "0.6712811", "0.6631749", "0.6619828", "0.661079", "0.6577446", "0.65661055", "0.65634114", "0.65534693", "0.6553251", "0.64260244", "0.64015526", "0.6372311", "0.6370751", "0.63620645", "0.63531554", "0.63531554", "0.63429046", "0.6339622", "0.63358456", "0.63356084", "0.633336", "0.6328859", "0.6305788", "0.6302627", "0.63010615", "0.6299316", "0.62965244", "0.62869143", "0.62857217", "0.6280396", "0.6275877", "0.62710613", "0.6253462", "0.6250945", "0.6247041", "0.62366396", "0.6232591", "0.6232591", "0.6232591", "0.6232591", "0.62209857", "0.6214884", "0.62143666", "0.62143666", "0.62143666", "0.62143666", "0.62143666", "0.6206033", "0.6204444", "0.6193734", "0.619197", "0.61834925", "0.6182251", "0.6179463", "0.6174512", "0.6174512", "0.6170213", "0.616884", "0.61579716", "0.61561704", "0.6154914", "0.61463034", "0.61439145", "0.61427605", "0.6141428", "0.614035", "0.61392117", "0.61093247", "0.6104218", "0.6096649", "0.6090371", "0.6088685", "0.6086044", "0.60853034", "0.6082686", "0.6082451", "0.60674244", "0.60628057", "0.60628057", "0.60628057", "0.60628057" ]
0.6804273
16
After method to end the test that your are running on your xml suite
@AfterMethod public void endTest(){ reports.endTest(logger); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@AfterTest\n\tpublic void afterTest() {\n\t\tiDriver.quit();\n\t\tSystem.out.println(\"=====================VEGASF_419_END=====================\");\n\t}", "@After \n public void tearDownTest()\n {\n\t System.out.println(\"Test Complete\\n\\n\\n\\n\\n\");\n }", "@After\n\tpublic void testEachCleanup() {\n\t\tSystem.out.println(\"Test Completed!\");\n\t}", "@AfterClass\n\tpublic static void after() {\n\t\tXMLRetryConfigMgr.setXML_FILE(ORIG_FILE);\n\t\tHzIntegrationTestUtil.afterClass();\n\t}", "@AfterMethod()\n\tpublic void afterMethod() {\n\t\textent.endTest(test);\n\t\textent.flush();\n\t}", "@AfterSuite\n\tpublic void teardown() {\n\t\t\n\t\tdriver.quit();\n\t}", "@AfterTest\n\tpublic void teardown()\n\t{\n\t\t\n\t\tdriver.close();\n\t}", "protected void runAfterTest() {}", "@After\n public void endingTests() throws Exception {\n driver.quit();\n }", "@AfterMethod\n\tpublic void wrapUp() {\n\t\tDriverManager.getDriver().quit();\n\t\tExtentReport.report.endTest(ExtentManager.getExtTest());\n\t\tExtentReport.report.flush();\n\n\t}", "@AfterTest\n\tpublic void afterTest() {\n\t}", "@After\n\tpublic void afterTest() {\n\t\tmyD.close();\n\n\t}", "@AfterClass\n public void End_Test() {\n exReport.endTest(exTest);\n exReport.flush();\n driver.close();\n global.Processing_Time();\n }", "@After\n public final void tearDown() throws Exception\n {\n // Empty\n }", "@AfterTest\n public void tearDown() {\n Log.endLog(\"Test is ending!\");\n driver.close();\n }", "@AfterClass\n\tpublic void afterClass() {\n\t}", "@After\r\n\tpublic void tearDown() throws Exception {\n\t\tdriver.quit();\r\n\r\n\t\t// TODO Figure out how to determine if the test code has failed in a\r\n\t\t// manner other than by EISTestBase.fail() being called. Otherwise,\r\n\t\t// finish() will always print the default passed message to the console.\r\n\t\tfinish();\r\n\t}", "@After\r\n\tpublic void tearDown() throws Exception {\n\t\tdriver.quit();\r\n\r\n\t\t// TODO Figure out how to determine if the test code has failed in a\r\n\t\t// manner other than by EISTestBase.fail() being called. Otherwise,\r\n\t\t// finish() will always print the default passed message to the console.\r\n\t\tfinish();\r\n}", "@After\n\tpublic void teardown() {\n\t\tthis.driver.quit();\n\t}", "@AfterSuite\r\n\tpublic void tearDown() {\r\n\t\tSystem.out.println(\"Driver teared down\");\r\n\t}", "@After\r\n public void tearDown() throws Exception {\r\n solo.finishOpenedActivities();\r\n }", "@AfterSuite\n\tpublic void teardown() {\n\t\tlogger.info(\"ALL TESTS COMPLETED: Quiting driver\");\n\t\tgmailPg.quitDriver();\n\t}", "@After\n public void afterTest(){\n }", "@After\n\tpublic void tearDown() {}", "@After\n\t\t public void tearDown() throws Exception {\n\t\t\t testHelper.tearDown();\n\t\t }", "@AfterTest\r\n public void tearDown() {\n }", "@AfterMethod\r\n\tpublic void tearDown() {\r\n\t\tdriver.quit();\r\n\t\tsoftAssert.assertAll();\r\n\t}", "@AfterClass\n\tpublic void teardown() {\n\t\tSystem.out.println(\"After class Annotation\");\n\t}", "@AfterClass\r\n\tpublic static void testCleanup() {\r\n\t\tConfig.teardown();\r\n\t}", "@After\n public void tearDown() throws Exception{\n solo.finishOpenedActivities();\n }", "@After\n public void tearDown() {\n fixture.cleanUp();\n }", "@AfterSuite\n public static void teardown() {\n Reporter.loadXMLConfig(new File(\"src/main/resources/extent-config.xml\"));\n Reporter.setSystemInfo(\"user\", System.getProperty(\"user.name\"));\n Reporter.setSystemInfo(\"os\", System.getProperty(\"os.name\"));\n Reporter.setSystemInfo(\"Selenium\", \"3.4.0\");\n Reporter.setSystemInfo(\"Cucumber\", \"1.2.5\");\n }", "@After\r\n public void tearDown()\r\n {\r\n }", "@After\r\n public void tearDown()\r\n {\r\n }", "@After\r\n public void tearDown()\r\n {\r\n }", "@After\r\n public void tearDown()\r\n {\r\n }", "@Override\r\n\t@AfterTest\r\n\tpublic void endSetting() {\n\t\tSystem.out.println(\"结束系统设置测试\");\r\n\t}", "@After\n public void tearThis() {\n System.out.println(\"* After test method *\");\n }", "@After\n public void tearDown() {\n \n }", "@AfterEach\n private void afterEachEnd()\n {\n System.out.println(\"Test Completed \" + testInfo.getDisplayName());\n System.out.println(\"After Each Clean Test........\");\n System.out.println(\"Elapsed TIme : \" + ELAPSED_TIME + \" ns\");\n LOGGER.info(\"Elapsed TIme for \" + testInfo.getDisplayName() + \" : \" + ELAPSED_TIME);\n }", "@After\n public void tearDown() {\n }", "@After\n public void tearDown() {\n }", "@After\n public void tearDown() {\n }", "@After\n public void tearDown() {\n }", "@After\n public void tearDown() {\n }", "@After\r\n public void tearDown() throws Exception {\n }", "@After\r\n public void tearDown() throws Exception {\n }", "@AfterTest\n\tpublic void endReport() {\n\t\textent.flush();\n\t\t// Call close() at the very end of your session to clear all resources.\n\t\t// If any of your test ended abruptly causing any side-affects (not all logs\n\t\t// sent to ExtentReports, information missing), this method will ensure that the\n\t\t// test is still appended to the report with a warning message.\n\t\t// You should call close() only once, at the very end (in @AfterSuite for\n\t\t// example) as it closes the underlying stream.\n\t\t// Once this method is called, calling any Extent method will throw an error.\n\t\t// close() - To close all the operation\n\t\textent.close();\n\t\t\n\t}", "@AfterClass\n\tpublic void teardown(){\n\t}", "@After\r\n\tpublic void tearDown() {\n\t}", "@After\r\n\tpublic void tearDown() throws Exception {\r\n\t\t//System.out.println( this.getClass().getSimpleName() + \".tearDown() called.\" );\r\n\t}", "@AfterSuite\n\tpublic void tearDown() {\n\t\tremoveSingleFileOrAllFilesInDirectory(\"file\", \"./Logs/Log4j.log\");\n\n\t\t// Flushing extent report after completing all test cases\n\t\treports.endTest(extent);\n\t\treports.flush();\n\t}", "@After\n public void tearDown() throws Exception {\n }", "@After\n public void tearDown()\n {\n }", "@After\n public void tearDown()\n {\n }", "@After\n public void tearDown()\n {\n }", "@After\n public void tearDown()\n {\n }", "@After\n public void tearDown()\n {\n }", "@After\n public void tearDown()\n {\n }", "@After\n public void tearDown()\n {\n }", "@After\n public void tearDown()\n {\n }", "@After\n public void tearDown()\n {\n }", "@After\n public void tearDown()\n {\n }", "@After\n public void tearDown()\n {\n }", "@After\n public void tearDown()\n {\n }", "@After\n public void tearDown()\n {\n }", "@After\n public void tearDown()\n {\n }", "@After\n public void tearDown()\n {\n }", "@After\n public void tearDown()\n {\n }", "@After\n public void tearDown()\n {\n }", "@After\n public void tearDown()\n {\n }", "@After\n public void tearDown()\n {\n }", "@After\n public void tearDown()\n {\n }", "@After\n public void tearDown()\n {\n }", "@After\n public void tearDown()\n {\n }", "@After\n public void tearDown()\n {\n }", "@After\n public void tearDown()\n {\n }", "@After\n public void tearDown()\n {\n }", "@After\n public void tearDown()\n {\n }", "@After\n public void tearDown()\n {\n }", "@After\n public void tearDown()\n {\n }", "@After\n public void tearDown()\n {\n }", "@AfterSuite\n public void AftersuiteSetup2() throws Exception {\n\t\t\n\t}", "@AfterClass\n public static void tear() {\n System.out.println(\"*** After class ***\");\n }", "@AfterMethod(alwaysRun = true)\n public void cleanupTest() throws Exception {\n busService.getBus().unregister(testListener);\n busService.getBus().stop();\n \n // STOP NOTIFICATION QUEUE\n ((Engine)entitlementService).stop();\n\n log.warn(\"DONE WITH TEST\\n\");\n }", "@After\n\tpublic void tearDown() {\n\n\t}", "@After\n public void tearDown () {\n }", "@After\n\tpublic void tearDown() throws Exception {\n\t\t\n\t}", "@AfterMethod\r\n\t\tpublic void tearDown(){\r\n\t\t\t\r\n\t\t \r\n\t\t\tdriver.close();\r\n\t\t\tdriver.quit();\r\n\t\t\t\t\r\n\t\t\t}", "@After\n\tpublic void tearDown() throws Exception{\n\t\t// Don't need to do anything here.\n\t}", "@AfterClass\r\n\tpublic static void afterClass() {\r\n\t\tSystem.out.println(\"in after class\");\r\n\t}", "@AfterClass\n static public void tearDownClass() {\n logger.info(\"Completed Example Code Unit Tests.\\n\");\n }", "@After\n public void tearDown() {\n System.out.println(\"@After - Tearing Down Stuffs: Pass \"\n + ++tearDownCount);\n }", "@AfterSuite\r\n\tpublic void tearDown()\r\n\t{\n extent.flush();\r\n\t}", "@After\n public void tearDown(){\n }", "@After\n public void tearDown(){\n }", "@After\n\tpublic void tearDown() throws Exception {\n\t\t//System.out.println( this.getClass().getSimpleName() + \".tearDown() called.\" );\n\t}", "@AfterMethod\n\tpublic void end()\n\t{\n\n\t}", "@After\n public void after() {\n System.out.format(\"In After of %s\\n\", ExecutionProcedureJunit2.class.getName());\n }", "@After\r\n\tpublic void tearDown() throws Exception {\n\t}" ]
[ "0.8213764", "0.8018958", "0.7961067", "0.7955303", "0.7940437", "0.7814027", "0.77378345", "0.77364", "0.77161795", "0.77027565", "0.76975536", "0.7691849", "0.7673472", "0.76702607", "0.76616186", "0.76610416", "0.7648926", "0.76469404", "0.7629352", "0.7623443", "0.76162463", "0.7613647", "0.76044947", "0.7578806", "0.75761", "0.7575967", "0.7564831", "0.75646996", "0.75520515", "0.75454473", "0.75095797", "0.75015193", "0.75006753", "0.75006753", "0.75006753", "0.75006753", "0.7494959", "0.7494535", "0.74943155", "0.74803", "0.7477719", "0.7477719", "0.7477719", "0.7477719", "0.7477719", "0.7475905", "0.7475905", "0.7473827", "0.7473133", "0.7462553", "0.745431", "0.7453534", "0.7451483", "0.74427605", "0.74427605", "0.74427605", "0.74427605", "0.74427605", "0.74427605", "0.74427605", "0.74427605", "0.74427605", "0.74427605", "0.74427605", "0.74427605", "0.74427605", "0.74427605", "0.74427605", "0.74427605", "0.74427605", "0.74427605", "0.74427605", "0.74427605", "0.74427605", "0.74427605", "0.74427605", "0.74427605", "0.74427605", "0.74427605", "0.74427605", "0.74427605", "0.74427605", "0.74413633", "0.74387103", "0.74385256", "0.74318546", "0.7430265", "0.74193573", "0.74169207", "0.74030966", "0.7399523", "0.7394959", "0.7394079", "0.7393812", "0.73833615", "0.73833615", "0.7382778", "0.7378083", "0.7376102", "0.7369959" ]
0.80658567
1
Close and flush the report and either quit the driver or open your html report automatically
@AfterSuite public void close(){ //flush the report reports.flush(); //close the report reports.close(); //quit the driver driver.quit(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void close_report() {\n if (output != null) {\n output.flush();\n output.close();\n }\n }", "@AfterSuite (alwaysRun = true)\n public static void closeBrowser() {\n report.endTest(test);\n //line below will flush the report\n report.flush();\n\n\n //line below will open the report\n driver.get(\"C:\\\\Users\\\\zakir\\\\Documents\\\\MyMavenProject\\\\\" + reportPath);\n\n //line below will close the report\n //report.close();\n\n\n // driver.quit();\n }", "@Override\n public synchronized void close() {\n closeReportFile();\n }", "public void fnCloseHtmlReport() {\r\n\r\n\t\t//Declaring variables\r\n\r\n\t\tString strTestCaseResult = null;\r\n\r\n\t\t//Open the report file to write the report\r\n\t\ttry {\r\n\t\t\tfoutStrm = new FileOutputStream(g_strTestCaseReport, true);\r\n\r\n\t\t} catch (FileNotFoundException fe) {\r\n\t\t\tfe.printStackTrace();\r\n\t\t}\r\n\r\n\t\t//Get the current time\r\n\t\tg_EndTime = new Date();\r\n\t\t\r\n\t\t//Fetch the time difference\r\n\t\tString strTimeDifference = fnTimeDiffference(g_StartTime.getTime(),g_EndTime.getTime());\r\n\t\t\r\n\t\t//Close the html file\r\n\t\ttry {\t\t\r\n\t //Write the number of test steps passed/failed and the time which the test case took to run\r\n\t\t\tnew PrintStream(foutStrm).println(\"<TR></TR><TR><TD BGCOLOR=BLACK WIDTH=5%></TD><TD BGCOLOR=BLACK WIDTH=28%><FONT FACE=VERDANA COLOR=WHITE SIZE=2><B>Time Taken : \"+ strTimeDifference + \"</B></FONT></TD><TD BGCOLOR=BLACK WIDTH=25%><FONT FACE=VERDANA COLOR=WHITE SIZE=2><B>Pass Count : \" + g_iPassCount + \"</B></FONT></TD><TD BGCOLOR=BLACK WIDTH=25%><FONT FACE=VERDANA COLOR=WHITE SIZE=2><B>Fail Count : \" + g_iFailCount + \"</b></FONT></TD><TD BGCOLOR=Black WIDTH=7%></TD></TR>\");\r\n\t //Close the HTML tags\r\n\t\t\tnew PrintStream(foutStrm).println(\"</TABLE><TABLE WIDTH=100%><TR><TD ALIGN=RIGHT><FONT FACE=VERDANA COLOR=ORANGE SIZE=1>&copy; Tieto NetBank Automation - Integrated Customer Management</FONT></TD></TR></TABLE></BODY></HTML>\");\r\n\t\t\t//Close File stream\r\n\t\t\tfoutStrm.close();\r\n\t\t\t\r\n\t\t} catch (IOException io) {\r\n\t\t\tio.printStackTrace();\r\n\t\t}\r\n\r\n\t\t//Deference the file pointer\r\n\t\tfoutStrm = null;\r\n\r\n\t\t//Check if test case passed or failed\r\n\r\n\t\tif (g_iFailCount != 0) {\r\n\t\t\tstrTestCaseResult = \"Fail\";\r\n\t\t} else \r\n\t\t{\r\n\t\t\tstrTestCaseResult = \"Pass\";\r\n\t\t}\r\n\t\t\r\n //fnCloseHtmlReport = strTestCaseResult\r\n \r\n //Write into the Summary Report\r\n fnWriteTestSummary (\"Report_\"+ Dictionary.get(\"TEST_NAME\") + \"-\" + Dictionary.get(\"ACTION\"),strTestCaseResult,strTimeDifference);\r\n\t\t\r\n\t}", "@AfterTest\n\tpublic void endReport() {\n\t\textent.flush();\n\t\t// Call close() at the very end of your session to clear all resources.\n\t\t// If any of your test ended abruptly causing any side-affects (not all logs\n\t\t// sent to ExtentReports, information missing), this method will ensure that the\n\t\t// test is still appended to the report with a warning message.\n\t\t// You should call close() only once, at the very end (in @AfterSuite for\n\t\t// example) as it closes the underlying stream.\n\t\t// Once this method is called, calling any Extent method will throw an error.\n\t\t// close() - To close all the operation\n\t\textent.close();\n\t\t\n\t}", "private void cleanReporter(){\n File file = new File(\"test-report.html\");\n file.delete();\n\n }", "@AfterClass\n public void End_Test() {\n exReport.endTest(exTest);\n exReport.flush();\n driver.close();\n global.Processing_Time();\n }", "public static void generateReport()\n\t{\n\t\tlong time=System.currentTimeMillis();\n\t\tString reportPath=System.getProperty(\"user.dir\")+\"//automationReport//Report\"+time+\".html\";\n\t\t\n\t\thtmlreporter=new ExtentHtmlReporter(reportPath);\n\t\textent=new ExtentReports();\n\t\textent.attachReporter(htmlreporter);\n\t\t\n\t\tString username=System.getProperty(\"user.name\");\n\t\tString osname=System.getProperty(\"os.name\");\n\t\tString browsername=CommonFunction.readPropertyFile(\"Browser\");\n\t\tString env=CommonFunction.readPropertyFile(\"Enviornment\");\n\t\t\n\t\t\n\t\textent.setSystemInfo(\"User Name\", username);\n\t\textent.setSystemInfo(\"OS Name\", osname);\n\t\textent.setSystemInfo(\"Browser Name\", browsername);\n\t\textent.setSystemInfo(\"Enviornment\", env);\n\t\t\n\t\t\n\t\thtmlreporter.config().setDocumentTitle(\"Automation Report\");\n\t\thtmlreporter.config().setTheme(Theme.STANDARD);\n\t\thtmlreporter.config().setChartVisibilityOnOpen(true);\n \n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t}", "@Override\n public void dispose() {\n reporter.stop();\n reporter.close();\n }", "public void summaryReport() {\r\n\r\n\t\tString strTimeStamp = new SimpleDateFormat(\"yyyy-MM-dd-HH-mm-ss\").format(new Date());\r\n\t\tString reportPath = new File(\"Report\").getAbsolutePath();\r\n\t\tint stepPassed = 0;\r\n\t\tint stepFailed = 0;\r\n\t\tString cssData = \"\";\r\n\r\n\t\ttry {\r\n\t\t\tString cssPath = new File(\"Report\\\\Style\\\\style.css\").getAbsolutePath();\r\n\t\t\tbufferedReader = new BufferedReader(new FileReader(cssPath));\r\n\r\n\t\t\tStringBuilder stringBuilder = new StringBuilder();\r\n\t\t\tString line = bufferedReader.readLine();\r\n\t\t\twhile (line != null) {\r\n\t\t\t\tstringBuilder.append(line);\r\n\t\t\t\tstringBuilder.append(System.lineSeparator());\r\n\t\t\t\tline = bufferedReader.readLine();\r\n\t\t\t}\r\n\t\t\tcssData = stringBuilder.toString();\r\n\t\t} catch (Exception ex) {\r\n\t\t\tLog.error(\"Exception occure in reading file\" + ex.getMessage());\r\n\t\t\tex.printStackTrace();\r\n\t\t} finally {\r\n\t\t\ttry {\r\n\t\t\t\tbufferedReader.close();\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t\tLog.error(\"Exception occure in reading file\");\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t\tFile HTMLDir = new File(reportPath + \"\\\\HTMLReport\");\r\n\t\tif (!HTMLDir.exists()) {\r\n\t\t\ttry {\r\n\t\t\t\tHTMLDir.mkdir();\r\n\t\t\t} catch (SecurityException ex) {\r\n\t\t\t\tLog.error(\"Error in creating HTMLReport directory\" + ex.getMessage());\r\n\t\t\t\t// log.error(\"Error in creating Detail directory\");\r\n\t\t\t}\r\n\t\t}\r\n\t\tString htmlname = HTMLDir + \"\\\\\" + strTimeStamp + \".html\";\r\n\t\tString logoPath = new File(\"Report\\\\Style\\\\logo.png\").getAbsolutePath();\r\n\t\tfor (ReportBean reportValue : GlobalVariables.getReportList()) {\r\n\t\t\tif (reportValue.getStatus().equalsIgnoreCase(\"Failed\")) {\r\n\t\t\t\tstepFailed++;\r\n\t\t\t} else if (reportValue.getStatus().equalsIgnoreCase(\"Passed\")) {\r\n\t\t\t\tstepPassed++;\r\n\t\t\t}\r\n\t\t}\r\n\t\tstrBufferReportAppend = new StringBuffer();\r\n\t\ttry {\r\n\t\t\tbufferedWriter = new BufferedWriter(new FileWriter(htmlname));\r\n\t\t} catch (IOException e) {\r\n\t\t\tLog.error(\"Error in wrinting the file\" + e.getMessage());\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\tstrBufferReportAppend.append(\r\n\t\t\t\t\"<html><head><script type=\\\"text/javascript\\\" src=\\\"https://www.gstatic.com/charts/loader.js\\\"></script>\");\r\n\t\tstrBufferReportAppend.append(\"<script src=\\\"https://www.google.com/jsapi\\\"></script>\");\r\n\t\tstrBufferReportAppend.append(\"<style>\" + cssData);\r\n\t\tstrBufferReportAppend.append(\"</style>\");\r\n\t\tstrBufferReportAppend.append(\"</head><body>\");\r\n\t\tstrBufferReportAppend.append(\"<table class=\\\"width100\\\">\");\r\n\t\tstrBufferReportAppend.append(\"<tr><td>\");\r\n\t\tstrBufferReportAppend.append(\"<table class=\\\"width100\\\">\");\r\n\t\tstrBufferReportAppend.append(\"<tr><td><img src=file:\\\\\\\\\" + logoPath + \"></td>\" + \"<td class=\\\"headertext\\\">\"\r\n\t\t\t\t+ reportHeader + \"</td>\");\r\n\r\n\t\tstrBufferReportAppend.append(\"</tr></table><hr></hr>\");\r\n\t\tstrBufferReportAppend.append(\"</td></tr>\");\r\n\t\tstrBufferReportAppend.append(\"<tr><td>\");\r\n\t\tstrBufferReportAppend.append(\"<table class=\\\"width100\\\">\");\r\n\t\tstrBufferReportAppend.append(\"<tr><td class=\\\"width50\\\">\");\r\n\t\tstrBufferReportAppend.append(\"<table cellpadding=3 cellspacing=1>\");\r\n\t\tstrBufferReportAppend\r\n\t\t.append(\"<tr><td class=\\\"width50 bold\\\">Execution Start Time</td><td class=\\\"width50 bold\\\">\"\r\n\t\t\t\t+ GlobalVariables.getStrStartTime() + \"</td></tr>\");\r\n\t\tstrBufferReportAppend\r\n\t\t.append(\"<tr><td class=\\\"width50 bold\\\">Execution End Time</td><td class=\\\"width50 bold\\\">\"\r\n\t\t\t\t+ GlobalVariables.getStrEndTime() + \"</td></tr>\");\r\n\t\tstrBufferReportAppend\r\n\t\t\t\t.append(\"<tr><td class=\\\"width50 bold\\\">Total TestSteps Executed</td><td class=\\\"width50 bold\\\">\"\r\n\t\t\t\t\t\t+ (stepFailed + stepPassed) + \"</td></tr>\");\r\n\t\tstrBufferReportAppend.append(\r\n\t\t\t\t\"<tr><td class=\\\"width50 green\\\">Passed</td><td class=\\\"width50 green\\\">\" + stepPassed + \"</td></tr>\");\r\n\t\tstrBufferReportAppend.append(\r\n\t\t\t\t\"<tr><td class=\\\"width50 red\\\">Failed</td><td class=\\\"width50 red\\\">\" + stepFailed + \"</td></tr>\");\r\n\t\tstrBufferReportAppend.append(\"</table></td>\");\r\n\t\tstrBufferReportAppend.append(\"<td class=\\\"width50\\\">\");\r\n\t\tstrBufferReportAppend.append(\"<table>\");\r\n\t\tstrBufferReportAppend.append(\"<tr><td class=\\\"width25\\\">\");\r\n\t\tstrBufferReportAppend.append(\"</td>\");\r\n\t\tstrBufferReportAppend.append(\"<td class=\\\"width25\\\">\");\r\n\t\tstrBufferReportAppend.append(\"<script type=\\\"text/javascript\\\">\");\r\n\t\tstrBufferReportAppend.append(\"google.charts.load('current', {'packages':['corechart']});\");\r\n\t\tstrBufferReportAppend.append(\"google.charts.setOnLoadCallback(drawDetailsChart);\");\r\n\t\tstrBufferReportAppend.append(\"function drawDetailsChart() {\");\r\n\t\tstrBufferReportAppend.append(\"var data = new google.visualization.DataTable();\");\r\n\t\tstrBufferReportAppend.append(\"data.addColumn('string', 'Test Execution Detail Graph');\");\r\n\t\tstrBufferReportAppend.append(\"data.addColumn('number', 'Count');\");\r\n\t\tstrBufferReportAppend.append(\"data.addRows([\");\r\n\t\tstrBufferReportAppend.append(\"['Passed',\" + stepPassed + \"],\");\r\n\t\tstrBufferReportAppend.append(\"['Failed',\" + stepFailed + \"]]);\");\r\n\t\tstrBufferReportAppend\r\n\t\t\t\t.append(\"var options = {'title':'Test Step Details Graph',colors: ['#12C909', '#C3100A'],pieHole: 0.3,\");\r\n\t\tstrBufferReportAppend.append(\"'width':300,\");\r\n\t\tstrBufferReportAppend.append(\"'height':170};\");\r\n\t\tstrBufferReportAppend\r\n\t\t\t\t.append(\"var chart = new google.visualization.PieChart(document.getElementById('detailsChart_div'));\");\r\n\t\tstrBufferReportAppend.append(\"chart.draw(data, options); } </script>\");\r\n\t\tstrBufferReportAppend.append(\"<div id=\\\"detailsChart_div\\\"></div>\");\r\n\t\tstrBufferReportAppend.append(\"</td></tr></table>\");\r\n\t\tstrBufferReportAppend.append(\"</td></tr></table><hr></hr></td></tr>\");\r\n\t}", "@AfterClass(description = \"After class: closing browser\")\n public void quitBrowser()\n {\n HTMLReport htmlReport = new HTMLReport();\n htmlReport.log(\"STARTING AfterClass\");\n htmlReport.logINFO(\"The browser is quit\");\n driver.quit();\n htmlReport.logINFO(\"The end of test reporting\");\n reports.endTest(test);\n htmlReport.logINFO(\"Saving all logs to file\");\n reports.flush();\n }", "public void fnCreateSummaryReport(){\r\n //Setting counter value\r\n g_iTCPassed = 0;\r\n g_iTestCaseNo = 0;\r\n g_SummaryStartTime = new Date();\r\n \r\n\t\ttry \r\n\t\t{ \r\n\t //Open the test case report for writing \r\n\t foutStrm = new FileOutputStream(Environment.get(\"HTMLREPORTSPATH\")+ \"\\\\SummaryReport.html\", true);\r\n\t \r\n\t\t\t//Close the html file\r\n\t new PrintStream(foutStrm).println(\"<HTML><BODY><TABLE BORDER=0 CELLPADDING=3 CELLSPACING=1 WIDTH=100% BGCOLOR=BLACK>\");\r\n\t\t\tnew PrintStream(foutStrm).println(\"<TR><TD WIDTH=90% ALIGN=CENTER BGCOLOR=WHITE><FONT FACE=VERDANA COLOR=ORANGE SIZE=3><B>Tieto NetBank automation</B></FONT></TD></TR><TR><TD ALIGN=CENTER BGCOLOR=ORANGE><FONT FACE=VERDANA COLOR=WHITE SIZE=3><B>Selenium Framework Reporting</B></FONT></TD></TR></TABLE><TABLE CELLPADDING=3 WIDTH=100%><TR height=30><TD WIDTH=100% ALIGN=CENTER BGCOLOR=WHITE><FONT FACE=VERDANA COLOR=//0073C5 SIZE=2><B>&nbsp; Automation Result : \" + new Date() + \" on Machine \" + InetAddress.getLocalHost().getHostName() + \" by user \" + System.getProperty(\"user.name\") + \" on Browser \" + driverType +\"</B></FONT></TD></TR><TR HEIGHT=5></TR></TABLE>\"); \r\n\t new PrintStream(foutStrm).println(\"<TABLE CELLPADDING=3 CELLSPACING=1 WIDTH=100%>\"); \r\n\t new PrintStream(foutStrm).println(\"<TR COLS=6 BGCOLOR=ORANGE><TD WIDTH=10%><FONT FACE=VERDANA COLOR=BLACK SIZE=2><B>TC No.</B></FONT></TD><TD WIDTH=60%><FONT FACE=VERDANA COLOR=BLACK SIZE=2><B>Test Name</B></FONT></TD><TD BGCOLOR=ORANGE WIDTH=15%><FONT FACE=VERDANA COLOR=BLACK SIZE=2><B>Status</B></FONT></TD><TD WIDTH=15%><FONT FACE=VERDANA COLOR=BLACK SIZE=2><B>Test Duration</B></FONT></TD></TR>\");\r\n\t \r\n\t //Close the object\r\n\t foutStrm.close();\r\n\t\t} catch (IOException io) \r\n\t\t{\r\n\t\t\tio.printStackTrace();\r\n\t\t} \r\n\t\t\r\n\t\tfoutStrm = null;\r\n }", "public static void reportes(){\n try {\n /**Variable necesaria para abrir el archivo creado*/\n Desktop pc=Desktop.getDesktop();\n /**Variables para escribir el documento*/\n File f=new File(\"Reporte_salvajes.html\");\n FileWriter w=new FileWriter(f);\n BufferedWriter bw=new BufferedWriter(w);\n PrintWriter pw=new PrintWriter(bw);\n \n /**Se inicia el documento HTML*/\n pw.write(\"<!DOCTYPE html>\\n\");\n pw.write(\"<html>\\n\");\n pw.write(\"<head>\\n\");\n pw.write(\"<title>Reporte de los Pokemons Salvajes</title>\\n\");\n pw.write(\"<style type=\\\"text/css\\\">\\n\" +\n \"body{\\n\" +\n \"background-color:rgba(117, 235, 148, 1);\\n\" +\n \"text-align: center;\\n\" +\n \"font-family:sans-serif;\\n\" +\n \"}\\n\"\n + \"table{\\n\" +\n\"\t\t\tborder: black 2px solid;\\n\" +\n\"\t\t\tborder-collapse: collapse;\\n\" +\n\" }\\n\"\n + \"#td1{\\n\" +\n\" border: black 2px solid;\\n\"\n + \" background-color: skyblue;\\n\" +\n\" }\\n\" +\n\" #td2{\\n\" +\n\" border: black 2px solid;\\n\"\n + \" background-color: white;\\n\" +\n\" }\\n\"\n +\"</style>\");\n pw.write(\"<meta charset=\\\"utf-8\\\">\");\n pw.write(\"</head>\\n\");\n /**Inicio del cuerpo*/\n pw.write(\"<body>\\n\");\n /**Título del reporte*/\n pw.write(\"<h1>Reporte de los Pokemons Salvajes</h1>\\n\");\n /**Fecha en que se genero el reporte*/\n pw.write(\"<h3>Documento Creado el \"+fecha.get(Calendar.DAY_OF_MONTH)+\n \"/\"+((int)fecha.get(Calendar.MONTH)+1)+\"/\"+fecha.get(Calendar.YEAR)+\" a las \"\n +fecha.get(Calendar.HOUR)+\":\"+fecha.get(Calendar.MINUTE)+\":\"+fecha.get(Calendar.SECOND)+\"</h3>\\n\");\n \n pw.write(\"<table align=\\\"center\\\">\\n\");\n //Se escriben los títulos de las columnas\n pw.write(\"<tr>\\n\");\n pw.write(\"<td id=\\\"td1\\\">\"+pokemon.Titulo[0]+\"</td>\\n\");\n pw.write(\"<td id=\\\"td1\\\">\"+pokemon.Titulo[1]+\"</td>\\n\");\n pw.write(\"<td id=\\\"td1\\\">\"+pokemon.Titulo[2]+\"</td>\\n\");\n pw.write(\"<td id=\\\"td1\\\">\"+pokemon.Titulo[3]+\"</td>\\n\");\n pw.write(\"<td id=\\\"td1\\\">\"+pokemon.Titulo[4]+\"</td>\\n\");\n pw.write(\"<td id=\\\"td1\\\">\"+pokemon.Titulo[5]+\"</td>\\n\");\n pw.write(\"<td id=\\\"td1\\\">\"+pokemon.Titulo[6]+\"</td>\\n\");\n pw.write(\"</tr>\\n\");\n for (int i = 0; i < pokemon.ingresados; i++) {\n //Se determina si el pokemon es salvaje\n if(pokemon.Capturado[i]==false){\n pw.write(\"<tr>\\n\");\n pw.write(\"<td id=\\\"td2\\\">\"+pokemon.Id[i]+\"</td>\\n\");\n pw.write(\"<td id=\\\"td2\\\">\"+pokemon.Tipo[i]+\"</td>\\n\");\n pw.write(\"<td id=\\\"td2\\\">\"+pokemon.Nombre[i]+\"</td>\\n\");\n pw.write(\"<td id=\\\"td2\\\">\"+pokemon.Vida[i]+\"</td>\\n\");\n pw.write(\"<td id=\\\"td2\\\">\"+pokemon.ptAt[i]+\"</td>\\n\");\n pw.write(\"<td id=\\\"td2\\\">Salvaje</td>\\n\");\n //Se determina si el pokemon esta vivo o muerto\n String estado;\n if (pokemon.Estado[i]==true) {\n estado=\"Vivo\";\n }else{estado=\"Muerto\";}\n pw.write(\"<td id=\\\"td2\\\">\"+estado+\"</td>\\n\");\n pw.write(\"</tr>\\n\");\n }\n }\n pw.write(\"</table><br>\\n\");\n \n pw.write(\"</body>\\n\");\n pw.write(\"</html>\\n\");\n /**Se finaliza el documento HTML*/\n \n /**Se cierra la capacidad de escribir en el documento*/ \n pw.close();\n /**Se cierra el documento en el programa*/\n bw.close();\n /**Se abre el documento recien creado y guardado*/\n pc.open(f);\n } catch (Exception e) {\n System.err.println(\"Asegurese de haber realizado las actividades previas \"\n + \"relacionadas\");\n }\n }", "void printReport();", "public void setup_report() {\n try {\n output = new PrintWriter(new FileWriter(filename));\n } catch (IOException ioe) {}\n }", "public void close() {\r\n driver.quit();\r\n }", "public void closeDriver(){\n\t\tdriver.quit();\n\t\tlogger.info(\"End of Execution\");\n\t}", "private void startReport() {\r\n // initialize the HtmlReporter\r\n htmlReporter = new ExtentHtmlReporter(System.getProperty(\"user.dir\")\r\n + jsonConfig.get(\"extentReportPath\") + \"testReport.html\");\r\n\r\n //initialize ExtentReports and attach the HtmlReporter\r\n extent = new ExtentReports();\r\n extent.attachReporter(htmlReporter);\r\n\r\n //To add system or environment info by using the setSystemInfo method.\r\n extent.setSystemInfo(\"OS\", (String) jsonConfig.get(\"osValue\"));\r\n switch ((String) jsonConfig.get(\"browserToBeUsed\")) {\r\n case \"FF\":\r\n extent.setSystemInfo(\"Browser\", \"Firefox\");\r\n break;\r\n case \"CH\":\r\n extent.setSystemInfo(\"Browser\", \"Chrome\");\r\n break;\r\n case \"IE\":\r\n extent.setSystemInfo(\"Browser\", \"Internet Explorer\");\r\n break;\r\n }\r\n\r\n //configuration items to change the look and feel\r\n //add content, manage tests etc\r\n htmlReporter.config().setChartVisibilityOnOpen(true);\r\n htmlReporter.config().setDocumentTitle(\"Test Report\");\r\n htmlReporter.config().setReportName(\"Test Report\");\r\n htmlReporter.config().setTestViewChartLocation(ChartLocation.TOP);\r\n htmlReporter.config().setTheme(Theme.STANDARD);\r\n htmlReporter.config().setTimeStampFormat(\"EEEE, MMMM dd, yyyy, hh:mm a '('zzz')'\");\r\n }", "@AfterClass\n\tpublic static void generateReport() {\n\t\tCucumberReportingConfig.reportConfig();\n\t\n\t}", "@Test\n\tpublic void generateBatchReport(){\n\t\t\t\tWebDriver driver = new FirefoxDriver();\n\t\t\t\t// Alternatively the same thing can be done like this\n\t\t // driver.get(\"http://www.google.com\");\n\t\t\t\tdriver.navigate().to(determineUrl());\n\t\t\t\t// Find the text input element by its name\n\t\t\t\tWebElement user_name = driver.findElement(By.id(\"user_email\"));\n\t\t\t\tuser_name.sendKeys(user);\n\t\t\t\t\n\t\t\t\tWebElement password = driver.findElement(By.id(\"user_password\"));\n\t\t\t\tpassword.sendKeys(password_login);\n\t\t\t\tpassword.submit();\n\t\t\t\t\n\t\t\t\tWebElement select_venue = driver.findElement(By.id(\"change_venue\"));\n\t\t\t\tselect_venue.sendKeys(venue);\n\t\t\t\tselect_venue.submit();\n\t\t\t\t\n\t\t\t\t//Generate Batch report\n\t\t\t\tWebElement report = driver.findElement(By.linkText(\"Reporting\"));\n\t\t\t\treport.click();\n\t\t\t\t\n\t\t\t\tWebElement select_report = driver.findElement(By.id(\"report_type_chooser\"));\n\t\t\t\tselect_report.sendKeys(\"Batch Report\");\n\t\t\t\tWebElement select_event = driver.findElement(By.id(\"report_event\"));\n\t\t\t\tselect_event.sendKeys(event);\t\t\n\t\t\t\tselect_event.submit();\n\t\t\t\tdriver.close();\n\t\t\n\t}", "public void saveReport() {\n\t\ttry {\n\t\t\tPrintWriter out = new PrintWriter(new FileOutputStream(reportFile));\n\t\t\tout.println(record.reportToString());\n\t\t\tout.close();\n\t\t} catch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public static void closeBrowser()\n\t{\n\t\t\tdriver.quit();\n\t\t\tBaseUI.logger.log(Status.INFO,ReadPropertiesFile.getBrowser()+\" is closed Successfully \");\n\t\t\treport.flush();\n\t\t\tlog.info(\"Closing Browser \\n\");\n\t}", "public void fnCloseTestSummary()\r\n {\r\n g_SummaryEndTime = new Date();\r\n //Fetch the time difference\r\n\t\tString strTimeDifference = fnTimeDiffference(g_SummaryStartTime.getTime(),g_SummaryEndTime.getTime());\r\n \r\n //Open the Test Summary Report File\r\n\t\ttry { \r\n\t\t\tfoutStrm = new FileOutputStream(Environment.get(\"HTMLREPORTSPATH\")+ \"\\\\SummaryReport.html\", true);\r\n \r\n new PrintStream(foutStrm).println(\"</TABLE><TABLE WIDTH=100%><TR>\");\r\n\t new PrintStream(foutStrm).println(\"<TD BGCOLOR=BLACK WIDTH=10%></TD><TD BGCOLOR=BLACK WIDTH=60%><FONT FACE=VERDANA SIZE=2 COLOR=WHITE><B></B></FONT></TD><TD BGCOLOR=BLACK WIDTH=15%><FONT FACE=WINGDINGS SIZE=4>2</FONT><FONT FACE=VERDANA SIZE=2 COLOR=WHITE><B>Total Passed: \" + g_iTCPassed + \"</B></FONT></TD><TD BGCOLOR=BLACK WIDTH=15%><FONT FACE=VERDANA SIZE=2 COLOR=WHITE><B>\" + strTimeDifference + \"</B></FONT></TD>\");\r\n\t new PrintStream(foutStrm).println(\"</TR></TABLE>\");\r\n\t new PrintStream(foutStrm).println(\"<TABLE WIDTH=100%><TR><TD ALIGN=RIGHT><FONT FACE=VERDANA COLOR=ORANGE SIZE=1>&copy; Tieto NetBank Automation - Integrated Customer Management</FONT></TD></TR></TABLE></BODY></HTML>\");\r\n \r\n\t\t\t//Close File stream\r\n\t\t\tfoutStrm.close();\r\n\t\t\t\r\n\t\t} catch (IOException io) {\r\n\t\t\tio.printStackTrace();\r\n\t\t}\r\n\r\n\t\t//Deference the file pointer\r\n\t\tfoutStrm = null;\r\n }", "public void close()\n {\n driver.close();\n }", "@SneakyThrows\n private void pdfReport() {\n NotificationUtil.warningAlert(\"Warning\", \"Nothing to export\", NotificationUtil.SHORT);\n ServiceFactory.getPdfService().projectReport(table.getItems());\n }", "public static void endTest() {\n \tif(!extentReportsPath.isEmpty()) {\n \treport.endTest(test);\n \treport.flush();\n \t}\n }", "public void fnCreateHtmlReport(String strTestName) {\r\n\r\n //Set the default Operation count as 0\r\n g_OperationCount = 0;\r\n \r\n //Number of default Pass and Fail cases to 0\r\n g_iPassCount = 0;\r\n g_iFailCount = 0;\r\n \r\n //Snapshot count to start from 0\r\n g_iSnapshotCount = 0;\r\n \r\n //script name\r\n g_strScriptName = strTestName;\t\t\r\n\r\n //Set the name for the Test Case Report File\r\n g_strTestCaseReport = Environment.get(\"HTMLREPORTSPATH\") + \"\\\\Report_\" + g_strScriptName + \".html\";\r\n \r\n //Snap Shot folder\r\n g_strSnapshotFolderName = Environment.get(\"SNAPSHOTSFOLDER\") + \"\\\\\" + g_strScriptName;\r\n \r\n //Delete the Summary Folder if present\r\n\t\tFile file = new File(g_strSnapshotFolderName);\r\n\r\n\t\tif (file.exists()) {\r\n\t\t\tfile.delete();\r\n\t\t}\r\n\r\n\t\t//Make a new snapshot folder\r\n\t\tfile.mkdir();\r\n\r\n\t\t//Open the report file to write the report\r\n\r\n\t\ttry {\r\n\t\t\tfoutStrm = new FileOutputStream(g_strTestCaseReport);\r\n\t\t} catch (FileNotFoundException fe) {\r\n\t\t\tfe.printStackTrace();\r\n\t\t}\r\n\r\n\t\t//Write the Test Case name and allied headers into the file\r\n //Write the Test Case name and allied headers into the file\r\n\t\t//Close the html file\r\n\t\ttry \r\n\t\t{\t\t\r\n\t\t\tnew PrintStream(foutStrm).println(\"<HTML><BODY><TABLE BORDER=0 CELLPADDING=3 CELLSPACING=1 WIDTH=100% BGCOLOR=ORANGE>\");\r\n\t\t\tnew PrintStream(foutStrm).println(\"<TR><TD WIDTH=90% ALIGN=CENTER BGCOLOR=WHITE><FONT FACE=VERDANA COLOR=ORANGE SIZE=3><B>Tieto NetBank Automation</B></FONT></TD></TR><TR><TD ALIGN=CENTER BGCOLOR=ORANGE><FONT FACE=VERDANA COLOR=WHITE SIZE=3><B>Selenium Framework Reporting</B></FONT></TD></TR></TABLE><TABLE CELLPADDING=3 WIDTH=100%><TR height=30><TD WIDTH=100% ALIGN=CENTER BGCOLOR=WHITE><FONT FACE=VERDANA COLOR=//0073C5 SIZE=2><B>&nbsp; Automation Result : \" + new Date() + \" on Machine \" + InetAddress.getLocalHost().getHostName() + \" by user \" + System.getProperty(\"user.name\") + \" on Browser \" + driverType +\"</B></FONT></TD></TR><TR HEIGHT=5></TR></TABLE>\");\r\n\t\t\tnew PrintStream(foutStrm).println(\"<TABLE BORDER=0 BORDERCOLOR=WHITE CELLPADDING=3 CELLSPACING=1 WIDTH=100%>\");\r\n\t\t\tnew PrintStream(foutStrm).println(\"<TR><TD BGCOLOR=BLACK WIDTH=20%><FONT FACE=VERDANA COLOR=WHITE SIZE=2><B>Test Name:</B></FONT></TD><TD COLSPAN=6 BGCOLOR=BLACK><FONT FACE=VERDANA COLOR=WHITE SIZE=2><B>\" + g_strScriptName + \"</B></FONT></TD></TR>\");\r\n\t //new PrintStream(foutStrm).println(\"<TR><TD BGCOLOR=BLACK WIDTH=20%><FONT FACE=VERDANA COLOR=WHITE SIZE=2><B>Test Iteration:</B></FONT></TD><TD COLSPAN=6 BGCOLOR=BLACK><FONT FACE=VERDANA COLOR=WHITE SIZE=2><B> </B></FONT></TD></TR>\");\r\n\t\t\tnew PrintStream(foutStrm).println(\"</TABLE><BR/><TABLE WIDTH=100% CELLPADDING=3>\");\r\n\t\t\tnew PrintStream(foutStrm).println(\"<TR WIDTH=100%><TH BGCOLOR=ORANGE WIDTH=5%><FONT FACE=VERDANA SIZE=2>Step No.</FONT></TH><TH BGCOLOR=ORANGE WIDTH=28%><FONT FACE=VERDANA SIZE=2>Step Description</FONT></TH><TH BGCOLOR=ORANGE WIDTH=25%><FONT FACE=VERDANA SIZE=2>Expected Value</FONT></TH><TH BGCOLOR=ORANGE WIDTH=25%><FONT FACE=VERDANA SIZE=2>Obtained Value</FONT></TH><TH BGCOLOR=ORANGE WIDTH=7%><FONT FACE=VERDANA SIZE=2>Result</FONT></TH></TR>\");\r\n\t\t\r\n\t\t\tfoutStrm.close();\r\n\t\t} catch (IOException io) \r\n\t\t{\r\n\t\t\tio.printStackTrace();\r\n\t\t}\r\n\t\t//Deference the file pointer\r\n\t\tfoutStrm = null;\r\n\r\n\t\t//Get the start time of the execution\r\n\t\tg_StartTime = new Date();\r\n\r\n\t}", "private void printReport() {\n\t\tSystem.out.println(getReport());\n\t}", "@AfterSuite\n\tpublic void closeBrowser(){\n\t\t\n\t\ttry{\n\t\t\tdriver.close();\n\t\t\tThread.sleep(5000);\n\t\t\t//MailService_API.zip(System.getProperty(\"user.dir\")+\"\\\\test-output\\\\Hybrid Security Telepath Test Suite\");\n\t\t\t//MailService_API.Email(config.getProperty(\"sendTo\"), config.getProperty(\"sendCC\"), config.getProperty(\"sendBCC\"), config.getProperty(\"sendMailFrom\"), config.getProperty(\"sendMailPassword\"));\n\t\t\t\n\t\t}catch(Exception e){\n\t\t\t\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\t\n\t\t\n\t}", "private void report() {\n\t\t\n\t}", "public abstract void getReport(java.io.Writer writer);", "public void verifyreport()\t\n{\n\tif(ReadPropertyFile.get(\"Application\").equalsIgnoreCase(\"Phonakpro\"))\n\t{\n\t\t// handling the windows tab using below code\n\t\t \n\t\tArrayList<String> newTab = new ArrayList<String>(DriverManager.getDriver().getWindowHandles());\n\t \n\t //if you traverse forward the next tab from the existing tab\n\t DriverManager.getDriver().switchTo().window(newTab.get(2));\n\t}\n\telse if(ReadPropertyFile.get(\"Application\").equalsIgnoreCase(\"Unitron\"))\n\t{\n\t\t// handling the windows tab using below code\n\t\t \n\t\tArrayList<String> newTab = new ArrayList<String>(DriverManager.getDriver().getWindowHandles());\n\t \n\t //if you traverse forward the next tab from the existing tab\n\t DriverManager.getDriver().switchTo().window(newTab.get(0));\n\t}\n\t\n\t//SELECT REPORT MENU ITEM\n\tjScriptClick(settingsMenuItem.get(1));\n\t//SELECT THE REPORT DROP DOWN\n\tjScriptClick(reportDropDownbutton.get(0));\n\t\n\t// ENTER THE SCREENER NAME\n\tsendkeys(reportDropDownInputText.get(1),\"automatescreener\");\n\t//SELECT THE FIRST SCREENER IF THE SCREENER HAS THE SAME NAME\n\tjScriptClick(reportDropDownScreenersListOptions.get(0));\n\tjScriptClick(dateReportDropDownbutton.get(1));\n\tjScriptClick(reportDropDownbutton.get(1));\n\tjScriptClick(dateReportDropDownoptionToday);\n\tjScriptClick(dateOptionOkButton);\n}", "abstract public void report();", "public void displayReport() {\n\t\treport = new ReportFrame(fitnessProg);\n\t\treport.buildReport();\n\t\treport.setVisible(true);\n\t}", "@Override\r\n\tpublic void afterInvocation(IInvokedMethod arg0, ITestResult arg1) {\n\t\tGenerateReports.flushReport();\r\n\t}", "@Override\n\tpublic void report() throws Exception {\n\t\t\n\t}", "public void clearReports()\n {\n reports.clear();\n }", "@Override\r\n\tpublic void report() {\r\n\t}", "public void finish() {\n printReport();\n printGlobalOpsPerSec();\n }", "public String generateHtmlReport() {\n try {\n LogManager.suitLogger.info(\"Generating HTML report...\");\n writer = createWriter();\n writer.println(new String(api.core.htmlreport()));\n writer.flush();\n writer.close();\n Thread.sleep(2000);\n return new File(Config.getReportsLocation() + File.separator + \"penetration-test-report.html\").getAbsolutePath();\n } catch (Exception e) {\n LogManager.suitLogger.error(\"Failed to generate penetration test html report. \", e);\n }\n return null;\n }", "private void generateReports() {\r\n\t\tLOGGER.debug(\"Report generation trigerred\");\r\n\t\tgenerateIncomingReport();\r\n\t\tgenerateOutgoingReport();\r\n\t\tgenerateIncomingRankingReport();\r\n\t\tgenerateOutgoingRankingReport();\r\n\t\tLOGGER.debug(\"Report generation completed\");\r\n\t}", "public void closeAllBrowser(){\r\n\tdriver.quit();\t\r\n\t}", "@Test\n\tpublic void LocationInventoryDetailReport(){\n\t\t\t\tWebDriver driver = new FirefoxDriver();\n\t\t\t\t// Alternatively the same thing can be done like this\n\t\t // driver.get(\"http://www.google.com\");\n\t\t\t\tdriver.navigate().to(determineUrl());\n\t\t\t\t// Find the text input element by its name\n\t\t\t\tWebElement user_name = driver.findElement(By.id(\"user_email\"));\n\t\t\t\tuser_name.sendKeys(user);\n\t\t\t\t\n\t\t\t\tWebElement password = driver.findElement(By.id(\"user_password\"));\n\t\t\t\tpassword.sendKeys(password_login);\n\t\t\t\tpassword.submit();\n\t\t\t\t\n\t\t\t\tWebElement select_venue = driver.findElement(By.id(\"change_venue\"));\n\t\t\t\tselect_venue.sendKeys(venue);\n\t\t\t\tselect_venue.submit();\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tWebElement report = driver.findElement(By.linkText(\"Reporting\"));\n\t\t\t\treport.click();\n\t\t\t\t\n\t\t\t\tWebElement select_report = driver.findElement(By.id(\"report_type_chooser\"));\n\t\t\t\tselect_report.sendKeys(\"Location Inventory Detail Report\");\n\t\t\t\tWebElement select_event = driver.findElement(By.id(\"report_event\"));\n\t\t\t\tselect_event.sendKeys(event);\n\t\t\t\tselect_event.submit();\n\t\t\t\tdriver.close();\n\t\t\n\t}", "private void openUserReporttWindow() {\r\n\t\tnew JFrameReport();\r\n\t}", "@Test\n\tpublic void generateEndOfNightReport(){\n\t\t\t\tWebDriver driver = new FirefoxDriver();\n\t\t\t\t// Alternatively the same thing can be done like this\n\t\t // driver.get(\"http://www.google.com\");\n\t\t\t\tdriver.navigate().to(determineUrl());\n\t\t\t\t// Find the text input element by its name\n\t\t\t\tWebElement user_name = driver.findElement(By.id(\"user_email\"));\n\t\t\t\tuser_name.sendKeys(user);\n\t\t\t\t\n\t\t\t\tWebElement password = driver.findElement(By.id(\"user_password\"));\n\t\t\t\tpassword.sendKeys(password_login);\n\t\t\t\tpassword.submit();\n\t\t\t\t\n\t\t\t\tWebElement select_venue = driver.findElement(By.id(\"change_venue\"));\n\t\t\t\tselect_venue.sendKeys(venue);\n\t\t\t\tselect_venue.submit();\n\t\t\t\t\n\t\t\t\tWebElement report = driver.findElement(By.linkText(\"Reporting\"));\n\t\t\t\treport.click();\n\t\t\t\t\n\t\t\t\tWebElement select_report = driver.findElement(By.id(\"report_type_chooser\"));\n\t\t\t\tselect_report.sendKeys(\"End-of-Night Report\");\n\t\t\t\tWebElement select_event = driver.findElement(By.id(\"report_event\"));\n\t\t\t\tselect_event.sendKeys(event);\n\t\t\t\tselect_event.submit();\n\t\t\t\tdriver.close();\n\t\t\n\t}", "public void clearReports()\n\t{\n\t\treports.clear();\n\t}", "public void closeDriver() {\n driver.quit();\n }", "public void detailReport() {\r\n\t\tint testStepId = 1;\r\n\t\tstrBufferReportAppend.append(\r\n\t\t\t\t\"<tr><td><table class=\\\"width100\\\"><tr><td><div class=\\\"headertext1 bold\\\">Test Execution Detail Report</div></td></tr>\");\r\n\t\tstrBufferReportAppend.append(\r\n\t\t\t\t\"<tr><td><div class=\\\"headertext1 bold\\\">Execution Browser Name: \"+ GlobalVariables.getBrowserName() + \"</div></td></tr>\");\r\n\t\tstrBufferReportAppend.append(\r\n\t\t\t\t\"<tr><td><div class=\\\"headertext1 bold\\\">Test Case Name: \"+ GlobalVariables.getTestCaseName() + \"</div></td></tr>\");\r\n\t\t\r\n\t\t\r\n\t\tstrBufferReportAppend.append(\"<tr><td>\");\r\n\t\tstrBufferReportAppend\r\n\t\t\t\t.append(\"<table colspan=3 border=0 cellpadding=3 cellspacing=1 class=\\\"reporttable width100\\\">\");\r\n\t\tstrBufferReportAppend.append(\"<tr><th class=\\\"auto-style1\\\">Test Step No</th>\" + \"<th class=\\\"auto-style2\\\">Action</th>\"\r\n\t\t\t\t+ \"<th class=\\\"auto-style3\\\">Actual Result</th>\" + \"<th class=\\\"auto-style4\\\">Status</th></tr>\");\r\n\t\tfor (ReportBean reportValue : GlobalVariables.getReportList()) {\r\n\r\n\t\t\tif (reportValue.getStatus().equalsIgnoreCase(\"Passed\")) {\r\n\r\n\t\t\t\tstrBufferReportAppend.append(\"<tr>\" + \"<td class=\\\"auto-style1 blue\\\">\" + testStepId++ + \"</td>\"// teststepid\r\n\t\t\t\t\t\t+ \"<td class=\\\"auto-style2 blue\\\">\" + reportValue.getStrAction() + \"</td>\"\r\n\t\t\t\t\t\t+ \"<td class=\\\"auto-style3 blue\\\">\" + reportValue.getResult() + \"</td>\"\r\n\t\t\t\t\t\t+ \"<td class=\\\"auto-style4 green\\\">\" + reportValue.getStatus() + \"</td></tr>\");\r\n\t\t\t} else if (reportValue.getStatus().equalsIgnoreCase(\"Failed\")) {\r\n\t\t\t\tstrBufferReportAppend.append(\"<tr>\" + \"<td class=\\\"auto-style1 blue\\\">\" + testStepId++ + \"</td>\"// teststepid\r\n\t\t\t\t\t\t+ \"<td class=\\\"auto-style2 blue\\\">\" + reportValue.getStrAction() + \"</td>\"\r\n\t\t\t\t\t\t+ \"<td class=\\\"auto-style3 blue\\\">\" + reportValue.getResult() + \"</td>\"\r\n\t\t\t\t\t\t+ \"<td class=\\\"auto-style4 red\\\">\" + reportValue.getStatus() + \"</td></tr>\");\r\n\t\t\t}\r\n\t\t}\r\n\t\tstrBufferReportAppend.append(\"</table>\");\r\n\t\tstrBufferReportAppend.append(\"</td></tr>\");\r\n\t\tstrBufferReportAppend.append(\"</table></td></tr></table></body></html>\");\r\n\t}", "public void writeReport()\n {\n // System.out.println(getClass().getName()+\":: writeReport \");\n\n switch (protocol)\n {\n case ProtocolPush:\n synchronized (circularBuffer)\n {\n if (reset /* && pendingWriteReport */)\n return;\n circularBuffer.writeReport();\n }\n getInputConnector().getModule()\n .connectorPushed(getInputConnector());\n return;\n case ProtocolSafe:\n synchronized (circularBuffer)\n {\n if (reset)\n return;\n circularBuffer.writeReport();\n circularBuffer.notifyAll();\n return;\n }\n default:\n throw new RuntimeException();\n }\n\n }", "public static void setReport()\n {\n ExtentHtmlReporter htmlReporter = new ExtentHtmlReporter(\"\\\\C:\\\\Users\\\\shir halevi\\\\Desktop\\\\qaexpert\\\\buyMe\\\\reports\\\\extent.html\");\n htmlReporter.setAppendExisting(true);\n extent = new ExtentReports();\n extent.attachReporter(htmlReporter);\n test = extent.createTest(\"BuyMeSanityTestWeb\", \"This is a BuyMe Sanity Test Web\");\n extent.setSystemInfo(\"Tester\", \"Shir\");\n test.log(Status.INFO, \"@Before class\");\n }", "private void writeSizeReport()\n {\n Writer reportOut = null;\n try\n {\n reportOut = new BufferedWriter(new OutputStreamWriter(\n new FileOutputStream(sizeReportFile), \"UTF8\"));\n reportOut.write(report.generate());\n reportOut.flush();\n }\n catch (Exception e)\n {\n // TODO: report a problem\n throw new RuntimeException(e);\n }\n finally\n {\n if (reportOut != null)\n try\n {\n reportOut.close();\n }\n catch (IOException e)\n {\n // ignore\n }\n }\n }", "@Override\r\npublic void onTestSuccess(ITestResult arg0) {\n\tExtentReports er = new ExtentReports(\"./Report/Report.html\");\r\n\tExtentTest t1 = er.startTest(\"TC001\");\r\n\tt1.log(LogStatus.PASS, \"Passed\");\r\n\tSystem.out.println(\"balle\");\r\n\ter.endTest(t1);\r\n\ter.flush();\r\n\ter.close();\r\n\r\n\t}", "public void runReport(String sReportFile)\n {\n }", "@Test\n\tpublic void generateOrdersReport(){\n\t\t\t\tWebDriver driver = new FirefoxDriver();\n\t\t\t\t// Alternatively the same thing can be done like this\n\t\t // driver.get(\"http://www.google.com\");\n\t\t\t\tdriver.navigate().to(determineUrl());\n\t\t\t\t// Find the text input element by its name\n\t\t\t\tWebElement user_name = driver.findElement(By.id(\"user_email\"));\n\t\t\t\tuser_name.sendKeys(user);\n\t\t\t\t\n\t\t\t\tWebElement password = driver.findElement(By.id(\"user_password\"));\n\t\t\t\tpassword.sendKeys(password_login);\n\t\t\t\tpassword.submit();\n\t\t\t\t\n\t\t\t\tWebElement select_venue = driver.findElement(By.id(\"change_venue\"));\n\t\t\t\tselect_venue.sendKeys(venue);\n\t\t\t\tselect_venue.submit();\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tWebElement report = driver.findElement(By.linkText(\"Reporting\"));\n\t\t\t\treport.click();\n\t\t\t\t\n\t\t\t\tWebElement select_report = driver.findElement(By.id(\"report_type_chooser\"));\n\t\t\t\tselect_report.sendKeys(\"Orders Report\");\n\t\t\t\tWebElement select_event = driver.findElement(By.id(\"report_event\"));\n\t\t\t\tselect_event.sendKeys(event);\n\t\t\t\tselect_event.submit();\n\t\t\t\tdriver.close();\n\t\t\n\t}", "public void close() {\n seleniumDriver.close();\n }", "public void close() {\n\t\tSystem.out.println(\"Scraper terminated\");\n\t}", "@Test\n\tpublic void generateTotalsReport(){\n\t\t\t\tWebDriver driver = new FirefoxDriver();\n\t\t\t\t// Alternatively the same thing can be done like this\n\t\t // driver.get(\"http://www.google.com\");\n\t\t\t\tdriver.navigate().to(determineUrl());\n\t\t\t\t// Find the text input element by its name\n\t\t\t\tWebElement user_name = driver.findElement(By.id(\"user_email\"));\n\t\t\t\tuser_name.sendKeys(user);\n\t\t\t\t\n\t\t\t\tWebElement password = driver.findElement(By.id(\"user_password\"));\n\t\t\t\tpassword.sendKeys(password_login);\n\t\t\t\tpassword.submit();\n\t\t\t\t\n\t\t\t\tWebElement select_venue = driver.findElement(By.id(\"change_venue\"));\n\t\t\t\tselect_venue.sendKeys(venue);\n\t\t\t\tselect_venue.submit();\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tWebElement report = driver.findElement(By.linkText(\"Reporting\"));\n\t\t\t\treport.click();\n\t\t\t\t\n\t\t\t\tWebElement select_report = driver.findElement(By.id(\"report_type_chooser\"));\n\t\t\t\tselect_report.sendKeys(\"Totals Report\");\n\t\t\t\tWebElement select_event = driver.findElement(By.id(\"report_event\"));\n\t\t\t\tselect_event.sendKeys(event);\n\t\t\t\tselect_event.submit();\n\t\t\t\tdriver.close();\n\t\t\n\t}", "@AfterClass\r\n\tpublic void windUp()\r\n\t{\r\n\t\t\r\n\t\tdriver.close();\r\n\t}", "public GenerateReport() {\n initComponents();\n displayLogs();\n }", "public void generateReport() {\n ReportGenerator rg = ui.getReportGenerator();\n if (rg == null || !rg.isVisible()) {\n ui.openReportGenerator();\n rg = ui.getReportGenerator();\n }\n Image img = getImage();\n if (img == null) {\n return;\n }\n rg.addImage(img, \"Plot\");\n }", "public void getReportManually() {\n File reportDir = new File(KOOM.getInstance().getReportDir());\n for (File report : reportDir.listFiles()) {\n //Upload the report or do something else.\n }\n }", "@After\n public void end(){\n driver.close();\n driver.quit();\n }", "public static void CreateReport() {\n\t\tString fileName = new SimpleDateFormat(\"'Rest_Country_Report_'YYYYMMddHHmm'.html'\").format(new Date());\n\t\tString path = \"Report/\" + fileName;\n\t\treport = new ExtentReports(path);\n\t}", "private void close() throws Exception {\n browser.getDriver().close();\n }", "public void closeBrowser(){\n\t driver.close();\n\t \t }", "@Test\n\tpublic void generateTicketsReport(){\n\t\t\t\tWebDriver driver = new FirefoxDriver();\n\t\t\t\t// Alternatively the same thing can be done like this\n\t\t // driver.get(\"http://www.google.com\");\n\t\t\t\tdriver.navigate().to(determineUrl());\n\t\t\t\t// Find the text input element by its name\n\t\t\t\tWebElement user_name = driver.findElement(By.id(\"user_email\"));\n\t\t\t\tuser_name.sendKeys(user);\n\t\t\t\t\n\t\t\t\tWebElement password = driver.findElement(By.id(\"user_password\"));\n\t\t\t\tpassword.sendKeys(password_login);\n\t\t\t\tpassword.submit();\n\t\t\t\t\n\t\t\t\tWebElement select_venue = driver.findElement(By.id(\"change_venue\"));\n\t\t\t\tselect_venue.sendKeys(venue);\n\t\t\t\tselect_venue.submit();\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tWebElement report = driver.findElement(By.linkText(\"Reporting\"));\n\t\t\t\treport.click();\n\t\t\t\t\n\t\t\t\tWebElement select_report = driver.findElement(By.id(\"report_type_chooser\"));\n\t\t\t\tselect_report.sendKeys(\"Tickets Report\");\n\t\t\t\tWebElement select_event = driver.findElement(By.id(\"report_event\"));\n\t\t\t\tselect_event.sendKeys(event);\n\t\t\t\tselect_event.submit();\n\t\t\t\tdriver.close();\n\t\t\n\t}", "public void close() {\n if (driver.get() != null) {\n driver.get().quit();\n driver.set(null);\n }\n }", "@SuppressWarnings(\"unchecked\")\n private void generateHTMLReport(IReportRunnable report, HttpServletResponse response, HttpServletRequest request) {\n IRunAndRenderTask runAndRenderTask = birtEngine.createRunAndRenderTask(report);\n response.setContentType(birtEngine.getMIMEType(\"html\"));\n IRenderOption options = new RenderOption();\n HTMLRenderOption htmlOptions = new HTMLRenderOption(options);\n htmlOptions.setOutputFormat(\"html\");\n htmlOptions.setBaseImageURL(\"/\" + reportsPath + imagesPath);\n htmlOptions.setImageDirectory(imageFolder);\n htmlOptions.setImageHandler(htmlImageHandler);\n runAndRenderTask.setRenderOption(htmlOptions);\n runAndRenderTask.getAppContext().put(EngineConstants.APPCONTEXT_BIRT_VIEWER_HTTPSERVET_REQUEST, request);\n\n try {\n htmlOptions.setOutputStream(response.getOutputStream());\n runAndRenderTask.run();\n } catch (Exception e) {\n throw new RuntimeException(e.getMessage(), e);\n } finally {\n runAndRenderTask.close();\n }\n }", "public void cancelReport() {\n }", "@AfterMethod\n public void closeBrowser() throws IOException, WriteException {\n\n writableFile.write();\n writableFile.close();\n readableFile.close();\n driver.quit();\n }", "@Test\n\tpublic void generateSummaryReport(){\n\t\tWebDriver driver = new FirefoxDriver();\n\t\t//Maximize chrome window\n\t\t//driver.manage().window().maximize();\n\t\t// Alternatively the same thing can be done like this\n // driver.get(\"http://www.google.com\");\n\t\tdriver.navigate().to(determineUrl());\n\t\t// Find the text input element by its name\n\t\tWebElement user_name = driver.findElement(By.id(\"user_email\"));\n\t\tuser_name.sendKeys(user);\n\t\tWebElement password = driver.findElement(By.id(\"user_password\"));\n\t\tpassword.sendKeys(password_login);\n\t\tpassword.submit();\n\t\t//Expand Venue drop-down\n\t\tWebElement select_venue = driver.findElement(By.id(\"change_venue\"));\n\t\t//driver.manage().timeouts().implicitlyWait(2, TimeUnit.SECONDS);\n\t\t//Pass Venue under test\n\t\tselect_venue.sendKeys(venue);\n\t\t\n\t\tselect_venue.submit();\n\t\t//Generate Summary report\n\t\tWebElement report = driver.findElement(By.linkText(\"Reporting\"));\n\t\treport.click();\n\t\tWebElement select_report = driver.findElement(By.id(\"report_type_chooser\"));\n\t\tselect_report.sendKeys(\"Summary Report\");\n\t\tWebElement select_event = driver.findElement(By.id(\"report_event\"));\n\t\tselect_event.sendKeys(event);\n\t\tselect_event.submit();\n\t\tdriver.close();\n\t\t\n\t}", "public void closeBrowser(){\n driver.quit();\n }", "public static void main(String[] args) throws InterruptedException {\n\t\tExtentReports report = new ExtentReports(\"Report08.html\");\r\n\t\tExtentTest test = report.startTest(\"TestCase08\");\r\n\t\t\r\n\t\tSystem.setProperty(\"webdriver.chrome.driver\", \"chromedriver.exe\");\r\n\t\tWebDriver driver=new ChromeDriver();\r\n\r\n\t\tdriver.get(\"file:///D:/TestCases_11Feb/testcase8.html\");\r\n\t\tWebElement drop=driver.findElement(By.xpath(\"/html/body/div/button\"));\r\n\r\n\t\tActions actions=new Actions(driver);\r\n\t\tactions.moveToElement(drop).build().perform();\r\n\t\t\r\n\t\tThread.sleep(2000);\r\n\t\tdriver.findElement(By.linkText(\"Google\")).click();\r\n\r\n\t\tThread.sleep(4000);\r\n\t\t\r\n\t\tif(driver.getTitle().equals(\"Google\"))\r\n\t\t{\r\n\t\tSystem.out.println(\"Google\");\r\n\t\ttest.log(LogStatus.PASS, \"Verified\");\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\tSystem.out.println(\"Failure\");\r\n\t\ttest.log(LogStatus.FAIL, \"Failed to move to Google page\");\r\n\t\t}\r\n\t\tThread.sleep(2000);\r\n\t\treport.endTest(test);\r\n\t\treport.flush();\r\n\t\tdriver.quit();\t\t\r\n\t\r\n\t\r\n\t}", "public void makeReport() throws IOException{\n File report = new File(\"Report.txt\");\n BufferedWriter reportWriter = new BufferedWriter(new FileWriter(report));\n BufferedReader bookReader = new BufferedReader(new FileReader(\"E-Books.txt\"));\n String current;\n while((current = bookReader.readLine()) != null ){\n String[] tokens = current.split(\",\");\n reportWriter.write(tokens[0].trim()+\" for \"+tokens[1].trim()+\" with redemption Code \"+tokens[2].trim()+\n \" is assigned to \"+tokens[4].trim()+\" who is in \"+tokens[5].trim()+\" grade.\");\n reportWriter.write(System.lineSeparator());\n reportWriter.flush();\n }\n reportWriter.close();\n bookReader.close();\n new reportWindow();\n }", "@AfterTest\n\tpublic void closeBrowser() {\n\t\tdriver.close();\n\t}", "public void report(){\n outTime = ElevatorControl.getTick();\n Report.addToReport(this);\n }", "public void close(){\r\n\t\tif (this.fileWriter != null){\r\n\t\t\ttry {\r\n\t\t\t\tthis.fileWriter.flush();\r\n\t\t\t\tthis.fileWriter.close();\r\n\t\t\t\tthis.fileWriter = null;\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t\tlogger.error(\"Cannot close the file handle \"+this.myfilename+\". Your results might be lost. Cause: \"+e.getMessage());\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\r\n\t\t}\r\n\t}", "public static void browserClose() {\r\n\t// Make sure we shut everything down to avoid memory leaks\r\n\tdriver.close();\r\n\tdriver.quit();\r\n\tdriver = null;\r\n}", "@Test\n\tpublic void generateCashierSummaryReport(){\n\t\t\t\tWebDriver driver = new FirefoxDriver();\n\t\t\t\t// Alternatively the same thing can be done like this\n\t\t // driver.get(\"http://www.google.com\");\n\t\t\t\tdriver.navigate().to(determineUrl());\n\t\t\t\t// Find the text input element by its name\n\t\t\t\tWebElement user_name = driver.findElement(By.id(\"user_email\"));\n\t\t\t\tuser_name.sendKeys(user);\n\t\t\t\t\n\t\t\t\tWebElement password = driver.findElement(By.id(\"user_password\"));\n\t\t\t\tpassword.sendKeys(password_login);\n\t\t\t\tpassword.submit();\n\t\t\t\t\n\t\t\t\tWebElement select_venue = driver.findElement(By.id(\"change_venue\"));\n\t\t\t\tselect_venue.sendKeys(venue);\n\t\t\t\tselect_venue.submit();\n\t\t\t\t\n\t\t\t\tWebElement report = driver.findElement(By.linkText(\"Reporting\"));\n\t\t\t\treport.click();\n\t\t\t\t\n\t\t\t\tWebElement select_report = driver.findElement(By.id(\"report_type_chooser\"));\n\t\t\t\tselect_report.sendKeys(\"Cashier Summary Report\");\n\t\t\t\tWebElement select_event = driver.findElement(By.id(\"report_event\"));\n\t\t\t\tselect_event.sendKeys(event);\n\t\t\t\tselect_event.submit();\n\t\t\t\tdriver.close();\n\t\t\n\t}", "private void writeFinalReports() {\n\t\tSystem.out.println(\"Printing data to output files ...\");\n\t\twritePropertyData();\n\t\twriteClassData();\n\t\tSystem.out.println(\"Finished printing data.\");\n\t}", "public void closeAllBrowsers() {\n\n driver.quit();\n\n\n }", "@AfterClass\n\tpublic void closeBrowser(){\n\t\tdriver.quit();\n\t}", "@Test\n\tpublic void generateGreen4LoyaltyReport(){\n\t\t\t\tWebDriver driver = new FirefoxDriver();\n\t\t\t\t// Alternatively the same thing can be done like this\n\t\t // driver.get(\"http://www.google.com\");\n\t\t\t\tdriver.navigate().to(determineUrl());\n\t\t\t\t// Find the text input element by its name\n\t\t\t\tWebElement user_name = driver.findElement(By.id(\"user_email\"));\n\t\t\t\tuser_name.sendKeys(user);\n\t\t\t\t\n\t\t\t\tWebElement password = driver.findElement(By.id(\"user_password\"));\n\t\t\t\tpassword.sendKeys(password_login);\n\t\t\t\tpassword.submit();\n\t\t\t\t\n\t\t\t\tWebElement select_venue = driver.findElement(By.id(\"change_venue\"));\n\t\t\t\tselect_venue.sendKeys(venue);\n\t\t\t\tselect_venue.submit();\n\t\t\t\t\n\t\t\t\t//Generate Batch report\n\t\t\t\tWebElement report = driver.findElement(By.linkText(\"Reporting\"));\n\t\t\t\treport.click();\n\t\t\t\t\n\t\t\t\tWebElement select_report = driver.findElement(By.id(\"report_type_chooser\"));\n\t\t\t\tselect_report.sendKeys(\"Green4 Loyalty Report\");\n\t\t\t\tWebElement select_event = driver.findElement(By.id(\"report_event\"));\n\t\t\t\tselect_event.sendKeys(event);\n\t\t\t\tselect_event.submit();\n\t\t\t\tdriver.close();\n\t\t\n\t}", "public void reports_TM() throws InterruptedException\n {\n\t System.out.println(\"---*** Reports.reports_TM() ***---\");\n\t if(driver.findElements(By.linkText(\"Reports\")).size()>0)\n\t {\n\t\t clickreports.click();\n\t\t Thread.sleep(1000);\n\t\t if(driver.findElements(By.linkText(\"My reports\")).size()>0)\n\t\t {\n\t\t\t myreportlink.click();\n\t\t\t Thread.sleep(2000);\n\t\t\t String logname = driver.findElement(By.xpath(\"//span[@class='userInfo']\")).getText();\n\t\t\t\tSystem.out.println(\"Loged in user is \" +logname);\n\t\t\t\tswitch(logname)\n\t\t\t\t {\n\t\t\t\t case \"Teammanager Demo2\":\n\t Req_detail();\n\t Large_Req_detail();\n\t Req_Multiple_vol();\n\t feedbacklink.click();\n\t Thread.sleep(1000);\n\t Feedback_req();\n\t Request_type();\n\t timelink.click();\n\t Thread.sleep(1000);\n\t timesheet_report();\n\t userlink.click();\n\t Thread.sleep(1000);\n\t user_details();\n\t user_mappings();\n\t SLAlink.click();\n\t Thread.sleep(1000);\n\t SLA_Report();\n\t auditlink.click();\n\t Thread.sleep(1000);\n\t tracking_Report();\n\t knowlink.click();\n\t Thread.sleep(1000);\n\t know_doc_Report();\n\t if(countreports.size()!=11)\n\t\t {\n\t\t\t System.out.println(\"INCORRECT reports displaying for Team manager\");\n\t\t }\n\t\t else\n\t\t {\n\t\t\t System.out.println(\"Correct reports displaying for Team manager\");\n\t\t }\n\t break;\n\t\tcase \"Analyst Demo2\":\n\t\t Req_detail();\n\t\t\t feedbacklink.click();\n\t\t\t Thread.sleep(1000);\n\t\t\t my_timesheet_report();\n\t\t\t if(countreports.size()!=2)\n\t\t\t {\n\t\t\t\t System.out.println(\"INCORRECT reports displaying for Analyst\");\n\t\t\t }\n\t\t\t else\n\t\t\t {\n\t\t\t\t System.out.println(\"Correct reports displaying for Analyst\");\n\t\t\t }\n\t\t\t break;\n\t\t\t }\n\t\t }\n\t\t else\n\t\t {\n\t\t\t System.out.println(\"\\n\" + \"My Reports is not present\");\n\t\t }\n\t }\n\t else\n\t {\n\t\t System.out.println(\"\\n\" + \"Reports module not present\");\n\t }\n\t }", "@Test\n\tpublic void Reports_18961_execute() throws Exception {\n\t\tVoodooUtils.voodoo.log.info(\"Running \" + testName + \"...\");\n\n\t\t// Navigate to Advance Reports in navbar \n\t\tsugar().navbar.navToModule(ds.get(0).get(\"advance_report_name\"));\n \t\tnavigationCtrl.click();\n \t\t\n \t\t// Click on View Advance Report link\n \t\tviewAdvanceReportCtrl = new VoodooControl(\"a\", \"css\", \"[data-navbar-menu-item='LNK_LIST_REPORTMAKER']\");\n \t\tviewAdvanceReportCtrl.click();\n \t\tVoodooUtils.focusFrame(\"bwc-frame\");\n \t\t\n \t\t// click on list item\n \t\tnew VoodooControl(\"a\", \"css\", \"tr.oddListRowS1 > td:nth-child(3) a\").click();\n \t\tVoodooUtils.focusDefault();\n \t\tVoodooUtils.focusFrame(\"bwc-frame\");\n \t\t\n \t\t// Click to Select to add data format in report\n \t\tnew VoodooControl(\"input\", \"css\", \"#form [title='Select']\").click();\n \t\tVoodooUtils.focusWindow(1);\n \t\t\n \t\t// select data format in list\n \t\tnew VoodooControl(\"a\", \"css\", \"tr.oddListRowS1 td:nth-child(1) a\").click();\n \t\tVoodooUtils.focusWindow(0);\n \t\tVoodooUtils.focusFrame(\"bwc-frame\");\n \t\t\n \t\t// Click \"Edit\" of a \"Data Format\"\n \t\tnew VoodooControl(\"a\", \"css\", \"#contentTable tr.oddListRowS1 > td:nth-child(6) > slot > a:nth-child(3)\").click();\n \t\tVoodooUtils.focusDefault();\n \t\tVoodooUtils.focusFrame(\"bwc-frame\");\n \t\tnew VoodooControl(\"input\", \"id\", \"name\").assertEquals(ds.get(0).get(\"data_format_name\"), true);\n \t\tnew VoodooControl(\"input\", \"id\", \"query_name\").assertEquals(ds.get(0).get(\"query_name\"), true);\n \t\tnew VoodooControl(\"a\", \"css\", \"#Default_DataSets_Subpanel tr:nth-child(1) td:nth-child(4) a\").assertEquals(ds.get(0).get(\"report_name\"), true);\n \t\tVoodooUtils.focusDefault();\n\n\t\tVoodooUtils.voodoo.log.info(testName + \" complete.\");\n\t}", "public static void runReport(HttpServletRequest request,HttpServletResponse response)throws IOException{\n\n\t\tAsePool connectionPool = null;\n\n\t\tConnection conn = null;\n\n\t\tString reportUser = null;\n\n\t\tString sql = null;\n\n\t\tboolean debug = false;\n\n\t\tAseUtil aseUtil = null;\n\n\t\tWebSite website = null;\n\n\t\ttry{\n\t\t\taseUtil = new AseUtil();\n\n\t\t\tHttpSession session = request.getSession(true);\n\n\t\t\treportUser = Encrypter.decrypter((String)session.getAttribute(\"aseUserName\"));\n\n\t\t\tint i = 0;\n\t\t\tint j = 0;\n\n\t\t\tString junk = \"\";\n\n\t\t\t// step 0\n\t\t\tconnectionPool = AsePool.getInstance();\n\t\t\tconn = connectionPool.getConnection();\n\n\t\t\twebsite = new WebSite();\n\t\t\tString campus = website.getRequestParameter(request,\"c\",\"\");\t\t// parm1\n\t\t\tString alpha = website.getRequestParameter(request,\"a\",\"\");\t\t\t// parm2\n\t\t\tString num = website.getRequestParameter(request,\"n\",\"\");\t\t\t// parm3\n\t\t\tString type = website.getRequestParameter(request,\"t\",\"\");\t\t\t// parm4\n\t\t\tString user = website.getRequestParameter(request,\"u\",\"\");\t\t\t// parm5\n\t\t\tString historyid = website.getRequestParameter(request,\"h\",\"\");\t// parm6\n\t\t\tint route = website.getRequestParameter(request,\"r\",0);\t\t\t\t// parm7\n\t\t\tString p8 = website.getRequestParameter(request,\"p8\",\"\");\t\t\t// any value\n\t\t\tString p9 = website.getRequestParameter(request,\"p9\",\"\");\t\t\t// any value\n\n\t\t\tif (campus == null || campus.length() == 0)\n\t\t\t\tcampus = Encrypter.decrypter((String)session.getAttribute(\"aseCampus\"));\n\n\t\t\tif (user == null || user.length() == 0)\n\t\t\t\tuser = Encrypter.decrypter((String)session.getAttribute(\"aseUserName\"));\n\n\t\t\tString campusName = CampusDB.getCampusNameOkina(conn,campus);\n\n\t\t\tString reportFolder = aseUtil.getReportFolder();\n\t\t\tString outputFolder = aseUtil.getReportOutputFolder(campus +\"/\");\n\n\t\t\tString logoFile = aseUtil.getCampusLogo(campus);\n\t\t\tString reportFileName = outputFolder + user + \".pdf\";\n\n\t\t\tString reportType = \"generic\";\n\t\t\tString reportTitle = \"\";\n\t\t\tString colsWidth = \"\";\n\t\t\tString headerColumns = \"\";\n\t\t\tString dataColumns = \"\";\n\n\t\t\tString where = \"\";\n\t\t\tString order = \"\";\n\t\t\tString grouping = null;\n\t\t\tString savedGrouping = null;\n\t\t\tString groupedValue = null;\n\t\t\tString footer = null;\n\t\t\tString reportSubTitle = null;\n\n\t\t\tString sWhere = \"\";\n\n\t\t\tString parm1 = \"\";\t\t// campus or FORUM src\n\t\t\tString parm2 = \"\";\t\t// alpha or FORUM status\n\t\t\tString parm3 = \"\";\t\t// num\n\t\t\tString parm4 = \"\";\t\t// type\n\t\t\tString parm5 = \"\";\t\t// user\n\t\t\tString parm6 = \"\";\t\t//\thistoryid\n\t\t\tString parm7 = \"\";\t\t//\troute\n\t\t\tString parm8 = \"\";\t\t//\n\t\t\tString parm9 = \"\";\t\t//\n\n\t\t\tint psIndex = 0;\n\n\t\t\tString aseReport = (String)session.getAttribute(\"aseReport\");\n\n\t\t\tif (aseReport != null && aseReport.length() > 0){\n\n\t\t\t\tResourceBundle reportBundle = ResourceBundle.getBundle(\"ase.central.reports.\" + aseReport);\n\t\t\t\tif (reportBundle != null){\n\n\t\t\t\t\tBundleDB bundle = new BundleDB();\n\n\t\t\t\t\treportType = bundle.getBundle(reportBundle,\"reportType\",\"\");\n\t\t\t\t\treportTitle = bundle.getBundle(reportBundle,\"reportTitle\",\"\");\n\t\t\t\t\tcolsWidth = bundle.getBundle(reportBundle,\"colsWidth\",\"\");\n\t\t\t\t\theaderColumns = bundle.getBundle(reportBundle,\"headerColumns\",\"\");\n\t\t\t\t\tdataColumns = bundle.getBundle(reportBundle,\"dataColumns\",\"\");\n\t\t\t\t\tsql = bundle.getBundle(reportBundle,\"sql\",\"\");\n\t\t\t\t\tgrouping = bundle.getBundle(reportBundle,\"grouping\",\"\");\n\t\t\t\t\tfooter = bundle.getBundle(reportBundle,\"footer\",\"\");\n\t\t\t\t\treportSubTitle = bundle.getBundle(reportBundle,\"reportSubTitle\",\"\");\n\n\t\t\t\t\twhere = bundle.getBundle(reportBundle,\"where\",\"\");\n\t\t\t\t\tif (where != null && where.length() > 0){\n\t\t\t\t\t\twhere = where.replace(\"_EQUALS_\",\"=\");\n\t\t\t\t\t}\n\n\t\t\t\t\torder = bundle.getBundle(reportBundle,\"order\",\"\");\n\t\t\t\t\tparm1 = bundle.getBundle(reportBundle,\"parm1\",\"\");\t// campus, src\n\t\t\t\t\tparm2 = bundle.getBundle(reportBundle,\"parm2\",\"\");\t// alpha\n\t\t\t\t\tparm3 = bundle.getBundle(reportBundle,\"parm3\",\"\");\t// num\n\t\t\t\t\tparm4 = bundle.getBundle(reportBundle,\"parm4\",\"\");\t// type\n\t\t\t\t\tparm5 = bundle.getBundle(reportBundle,\"parm5\",\"\");\t// userid\n\t\t\t\t\tparm6 = bundle.getBundle(reportBundle,\"parm6\",\"\");\t// history\n\t\t\t\t\tparm7 = bundle.getBundle(reportBundle,\"parm7\",\"\");\t// route\n\t\t\t\t\tparm8 = bundle.getBundle(reportBundle,\"parm8\",\"\");\n\t\t\t\t\tparm9 = bundle.getBundle(reportBundle,\"parm9\",\"\"); // any single value\n\n\t\t\t\t\tbundle = null;\n\n\t\t\t\t} // reportBundle\n\n\t\t\t\tif (reportTitle != null && colsWidth != null && headerColumns != null && dataColumns != null && sql != null){\n\t\t\t\t\tPdfPTable table = null;\n\t\t\t\t\tPhrase phrase = null;\n\t\t\t\t\tPdfPCell cell = null;\n\n\t\t\t\t\tBaseColor campusColor = null;\n\n\t\t\t\t\tString[] aColsWidth = colsWidth.split(\",\");\n\t\t\t\t\tString[] aDataColumns = dataColumns.split(\",\");\n\n\t\t\t\t\t// define colum width\n\t\t\t\t\tint columns = aDataColumns.length;\n\n\t\t\t\t\tfloat[] fColsWidth = new float[aDataColumns.length];\n\n\t\t\t\t\tfor(i=0; i<columns; i++){\n\t\t\t\t\t\tfColsWidth[i] = Float.valueOf(aColsWidth[i]).floatValue();\n\t\t\t\t\t}\n\n\t\t\t\t\t//---------------------------------------------------\n\t\t\t\t\t// define campus color; for grouping, use a different color\n\t\t\t\t\t//---------------------------------------------------\n\t\t\t\t\tif (reportType.equals(Constant.FORUM)){\n\t\t\t\t\t\tcampusColor = (BaseColor)campusColorMap.get(Constant.CAMPUS_TTG);\n\t\t\t\t\t}\n\t\t\t\t\telse if (reportType.equals(\"ApprovalRouting\")){\n\t\t\t\t\t\tcampusColor = (BaseColor)campusColorMap.get(Constant.CAMPUS_TTG);\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tif (campus != null && campus.length() > 0 && campusColorMap.containsKey(campus))\n\t\t\t\t\t\t\tcampusColor = (BaseColor)campusColorMap.get(campus);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (campusColor == null)\n\t\t\t\t\t\tcampusColor = BaseColor.LIGHT_GRAY;\n\n\t\t\t\t\t// step 1 of 5\n\t\t\t\t\tDocument document = new Document(PageSize.LETTER.rotate());\n\n\t\t\t\t\t// step 2 of 5\n\t\t\t\t\tPdfWriter writer = PdfWriter.getInstance(document, new FileOutputStream(reportFileName));\n\t\t\t\t\tTableHeader event = new TableHeader();\n\t\t\t\t\twriter.setPageEvent(event);\n\t\t\t\t\twriter.setPageEvent(new Watermark(\"Curriculum Central\"));\n\n\t\t\t\t\tint leading = 18;\n\n\t\t\t\t\t// step 3 of 5\n\t\t\t\t\tdocument.open();\n\t\t\t\t\tdocument.newPage();\n\n\t\t\t\t\t// create table with user column count\n\t\t\t\t\ttable = new PdfPTable(fColsWidth);\n\t\t\t\t\ttable.setWidthPercentage(100f);\n\t\t\t\t\ttable.setHorizontalAlignment(Element.ALIGN_LEFT);\n\t\t\t\t\ttable.getDefaultCell().setBorder(PdfPCell.NO_BORDER);\n\t\t\t\t\ttable.getDefaultCell().setUseAscender(true);\n\t\t\t\t\ttable.getDefaultCell().setUseDescender(true);\n\n\t\t\t\t\t//---------------------------------------------------\n\t\t\t\t\t//formulate sql statement\n\t\t\t\t\t//---------------------------------------------------\n\t\t\t\t\tif (reportType.equals(Constant.FORUM)){\n\t\t\t\t\t\tparm1 = website.getRequestParameter(request,\"src\",\"\");\n\t\t\t\t\t\tif (parm1 != null && parm1.length() > 0){\n\t\t\t\t\t\t\tsWhere = \" src=? \";\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tparm2 = website.getRequestParameter(request,\"status\",\"\");\n\t\t\t\t\t\tif (parm2 != null && parm2.length() > 0){\n\t\t\t\t\t\t\tif (sWhere.length() > 0)\n\t\t\t\t\t\t\t\tsWhere += \" AND \";\n\n\t\t\t\t\t\t\tsWhere += \" status=? \";\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse if (reportType.equals(\"ApprovalRouting\")){\n\t\t\t\t\t\tif (parm1 != null && parm1.length() > 0 && campus != null && campus.length() > 0){\n\t\t\t\t\t\t\tif (sWhere.length() > 0)\n\t\t\t\t\t\t\t\tsWhere += \" AND \";\n\n\t\t\t\t\t\t\tsWhere += \" c.campus=? \";\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (parm7 != null && parm7.length() > 0 && (route > 0 || route == -999)){\n\t\t\t\t\t\t\tif (sWhere.length() > 0)\n\t\t\t\t\t\t\t\tsWhere += \" AND \";\n\n\t\t\t\t\t\t\tif (route == -999)\n\t\t\t\t\t\t\t\tsWhere += \" c.route>? \";\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\tsWhere += \" c.route=? \";\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse if (reportType.equals(\"SystemSettings\")){\n\t\t\t\t\t\tif (parm1 != null && parm1.length() > 0 && campus != null && campus.length() > 0){\n\t\t\t\t\t\t\tif (sWhere.length() > 0)\n\t\t\t\t\t\t\t\tsWhere += \" AND \";\n\n\t\t\t\t\t\t\tsWhere += \" campus=? \";\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (parm9 != null && parm9.length() > 0){\n\t\t\t\t\t\t\tif (sWhere.length() > 0)\n\t\t\t\t\t\t\t\tsWhere += \" AND \";\n\n\t\t\t\t\t\t\tsWhere += \" \" + parm9 + \"=? \";\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tif (parm1 != null && parm1.length() > 0 && campus != null && campus.length() > 0){\n\t\t\t\t\t\t\tsWhere = \" campus=? \";\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (parm2 != null && parm2.length() > 0 && alpha != null && alpha.length() > 0){\n\t\t\t\t\t\t\tif (sWhere.length() > 0)\n\t\t\t\t\t\t\t\tsWhere += \" AND \";\n\n\t\t\t\t\t\t\tsWhere += \" alpha=? \";\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (parm3 != null && parm3.length() > 0 && num != null && num.length() > 0){\n\t\t\t\t\t\t\tif (sWhere.length() > 0)\n\t\t\t\t\t\t\t\tsWhere += \" AND \";\n\n\t\t\t\t\t\t\tsWhere += \" num=? \";\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (parm4 != null && parm4.length() > 0 && type != null && type.length() > 0){\n\t\t\t\t\t\t\tif (sWhere.length() > 0)\n\t\t\t\t\t\t\t\tsWhere += \" AND \";\n\n\t\t\t\t\t\t\tsWhere += \" type=? \";\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (parm5 != null && parm5.length() > 0 && user != null && user.length() > 0){\n\t\t\t\t\t\t\tif (sWhere.length() > 0)\n\t\t\t\t\t\t\t\tsWhere += \" AND \";\n\n\t\t\t\t\t\t\tsWhere += \" userid=? \";\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (parm6 != null && parm6.length() > 0 && historyid != null && historyid.length() > 0){\n\t\t\t\t\t\t\tif (sWhere.length() > 0)\n\t\t\t\t\t\t\t\tsWhere += \" AND \";\n\n\t\t\t\t\t\t\tsWhere += \" historyid=? \";\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (parm7 != null && parm7.length() > 0 && route > 0){\n\t\t\t\t\t\t\tif (sWhere.length() > 0)\n\t\t\t\t\t\t\t\tsWhere += \" AND \";\n\n\t\t\t\t\t\t\tsWhere += \" route=? \";\n\t\t\t\t\t\t}\n\n\t\t\t\t\t} // reportType\n\n\t\t\t\t\t//---------------------------------------------------\n\t\t\t\t\t// final formulation of SQL\n\t\t\t\t\t//---------------------------------------------------\n\t\t\t\t\tif (where.length()==0 && sWhere.length()>0)\n\t\t\t\t\t\twhere = \" WHERE \" + sWhere;\n\t\t\t\t\telse{\n\t\t\t\t\t\twhere = \" WHERE \" + where;\n\n\t\t\t\t\t\tif (sWhere.length()>0)\n\t\t\t\t\t\t\twhere += \" AND \" + sWhere;\n\t\t\t\t\t}\n\n\t\t\t\t\t// prevent empty where\n\t\t\t\t\tif (where.trim().toUpperCase().equals(\"WHERE\"))\n\t\t\t\t\t\twhere = \"\";\n\n\t\t\t\t\tif (order.length() > 0)\n\t\t\t\t\t\torder = \" ORDER BY \" + order;\n\n\t\t\t\t\t// prevent empty order\n\t\t\t\t\tif (order.trim().toUpperCase().equals(\"ORDER BY\"))\n\t\t\t\t\t\torder = \"\";\n\n\t\t\t\t\tsql = sql + where + order;\n\n\t\t\t\t\tdebug = false;\n\n\t\t\t\t\tif (debug){\n\t\t\t\t\t\tlogger.info(\"campus: \" + campus);\n\t\t\t\t\t\tlogger.info(\"alpha: \" + alpha);\n\t\t\t\t\t\tlogger.info(\"num: \" + num);\n\t\t\t\t\t\tlogger.info(\"type: \" + type);\n\t\t\t\t\t\tlogger.info(\"user: \" + user);\n\t\t\t\t\t\tlogger.info(\"historyid: \" + historyid);\n\t\t\t\t\t\tlogger.info(\"route: \" + route);\n\t\t\t\t\t\tlogger.info(\"p8: \" + p8);\n\t\t\t\t\t\tlogger.info(\"p9: \" + p9);\n\t\t\t\t\t\tlogger.info(\"reportFolder: \" + reportFolder);\n\t\t\t\t\t\tlogger.info(\"logoFile: \" + logoFile);\n\t\t\t\t\t\tlogger.info(\"reportFileName: \" + reportFileName);\n\t\t\t\t\t\tlogger.info(\"reportType: \" + reportType);\n\t\t\t\t\t\tlogger.info(\"reportTitle: \" + reportTitle);\n\t\t\t\t\t\tlogger.info(\"colsWidth: \" + reportTitle);\n\t\t\t\t\t\tlogger.info(\"headerColumns: \" + headerColumns);\n\t\t\t\t\t\tlogger.info(\"dataColumns: \" + dataColumns);\n\t\t\t\t\t\tlogger.info(\"grouping: \" + grouping);\n\t\t\t\t\t\tlogger.info(\"footer: \" + footer);\n\t\t\t\t\t\tlogger.info(\"reportSubTitle: \" + reportSubTitle);\n\t\t\t\t\t\tlogger.info(\"order: \" + order);\n\t\t\t\t\t\tlogger.info(\"parm1: \" + parm1);\n\t\t\t\t\t\tlogger.info(\"parm2: \" + parm2);\n\t\t\t\t\t\tlogger.info(\"parm3: \" + parm3);\n\t\t\t\t\t\tlogger.info(\"parm4: \" + parm4);\n\t\t\t\t\t\tlogger.info(\"parm5: \" + parm5);\n\t\t\t\t\t\tlogger.info(\"parm6: \" + parm6);\n\t\t\t\t\t\tlogger.info(\"parm7: \" + parm7);\n\t\t\t\t\t\tlogger.info(\"parm8: \" + parm8);\n\t\t\t\t\t\tlogger.info(\"parm9: \" + parm9);\n\t\t\t\t\t\tlogger.info(\"aseReport: \" + aseReport);\n\t\t\t\t\t\tlogger.info(\"sql: \" + sql);\n\t\t\t\t\t}\n\n\t\t\t\t\t//---------------------------------------------------\n\t\t\t\t\t// Add the first header row (step 4 of 5)\n\t\t\t\t\t//---------------------------------------------------\n\t\t\t\t\tFont f = new Font();\n\n\t\t\t\t\tdrawTitleRow(table,reportTitle,campusColor,f,BaseColor.WHITE,columns,Element.ALIGN_CENTER);\n\n\t\t\t\t\t//---------------------------------------------------\n\t\t\t\t\t// customized subtitles\n\t\t\t\t\t//---------------------------------------------------\n\t\t\t\t\tif (reportType.equals(Constant.FORUM)){\n\t\t\t\t\t\treportSubTitle = parm1 + \" Report\";\n\t\t\t\t\t}\n\t\t\t\t\telse if (reportType.equals(\"ApprovalRouting\")){\n\t\t\t\t\t\tif (route == -999)\n\t\t\t\t\t\t\treportSubTitle = \"Approval Routing\";\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\treportSubTitle = \"Approval Routing - \" + ApproverDB.getRoutingFullNameByID(conn,campus,route);\n\t\t\t\t\t}\n\t\t\t\t\telse if (reportType.equals(\"SystemSettings\")){\n\t\t\t\t\t\treportSubTitle = \"System Settings - \" + p9;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (reportSubTitle != null && reportSubTitle.length() > 0){\n\t\t\t\t\t\tdrawTitleRow(table,reportSubTitle,campusColor,f,BaseColor.WHITE,columns,Element.ALIGN_CENTER);\n\t\t\t\t\t}\n\n\t\t\t\t\t//---------------------------------------------------\n\t\t\t\t\t// table header\n\t\t\t\t\t//---------------------------------------------------\n\t\t\t\t\tdrawHeaderRow(table,campusColor,columns,headerColumns,f);\n\n\t\t\t\t\ttable.getDefaultCell().setBackgroundColor(null);\n\n\t\t\t\t\ttable.setHeaderRows(2);\n\n\t\t\t\t\t//---------------------------------------------------\n\t\t\t\t\t// get the data\n\t\t\t\t\t//---------------------------------------------------\n\t\t\t\t\tPreparedStatement ps = conn.prepareStatement(sql);\n\n\t\t\t\t\tif (reportType.equals(Constant.FORUM)){\n\t\t\t\t\t\tif (parm1 != null && parm1.length() > 0)\n\t\t\t\t\t\t\tps.setString(1,parm1);\n\n\t\t\t\t\t\tif (parm2 != null && parm2.length() > 0)\n\t\t\t\t\t\t\tps.setString(2,parm2);\n\t\t\t\t\t}\n\t\t\t\t\telse if (reportType.equals(\"ApprovalRouting\")){\n\t\t\t\t\t\tif (parm1 != null && parm1.length() > 0 && campus != null && campus.length() > 0)\n\t\t\t\t\t\t\tps.setString(++psIndex,campus);\n\n\t\t\t\t\t\tif (parm7 != null && parm7.length() > 0 && (route > 0 || route == -999)){\n\t\t\t\t\t\t\tif (route == -999)\n\t\t\t\t\t\t\t\tps.setInt(++psIndex,0);\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\tps.setInt(++psIndex,route);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse if (reportType.equals(\"SystemSettings\")){\n\t\t\t\t\t\tif (parm1 != null && parm1.length() > 0 && campus != null && campus.length() > 0)\n\t\t\t\t\t\t\tps.setString(++psIndex,campus);\n\n\t\t\t\t\t\tif (p9 != null && p9.length() > 0)\n\t\t\t\t\t\t\tps.setString(++psIndex,p9);\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tif (parm1 != null && parm1.length() > 0 && campus != null && campus.length() > 0)\n\t\t\t\t\t\t\tps.setString(++psIndex,campus);\n\n\t\t\t\t\t\tif (parm2 != null && parm2.length() > 0 && alpha != null && alpha.length() > 0)\n\t\t\t\t\t\t\tps.setString(++psIndex,alpha);\n\n\t\t\t\t\t\tif (parm3 != null && parm3.length() > 0 && num != null && num.length() > 0)\n\t\t\t\t\t\t\tps.setString(++psIndex,num);\n\n\t\t\t\t\t\tif (parm4 != null && parm4.length() > 0 && type != null && type.length() > 0)\n\t\t\t\t\t\t\tps.setString(++psIndex,type);\n\n\t\t\t\t\t\tif (parm5 != null && parm5.length() > 0 && user != null && user.length() > 0)\n\t\t\t\t\t\t\tps.setString(++psIndex,user);\n\n\t\t\t\t\t\tif (parm6 != null && parm6.length() > 0 && historyid != null && historyid.length() > 0)\n\t\t\t\t\t\t\tps.setString(++psIndex,historyid);\n\n\t\t\t\t\t\tif (parm7 != null && parm7.length() > 0 && route > 0)\n\t\t\t\t\t\t\tps.setInt(++psIndex,route);\n\n\t\t\t\t\t} // reportType\n\n\t\t\t\t\tResultSet rs = ps.executeQuery();\n\t\t\t\t\twhile(rs.next()){\n\n\t\t\t\t\t\tevent.setHeader(reportTitle,campusName,user);\n\n\t\t\t\t\t\tif (grouping != null && grouping.length() > 0){\n\t\t\t\t\t\t\tgroupedValue = AseUtil.nullToBlank(rs.getString(grouping));\n\t\t\t\t\t\t\tif (savedGrouping == null || !savedGrouping.equals(groupedValue)){\n\t\t\t\t\t\t\t\tsavedGrouping = groupedValue;\n\t\t\t\t\t\t\t\tdrawTitleRow(table,\n\t\t\t\t\t\t\t\t\t\t\t\tsavedGrouping.toUpperCase(),\n\t\t\t\t\t\t\t\t\t\t\t\tcampusColor,\n\t\t\t\t\t\t\t\t\t\t\t\tf,\n\t\t\t\t\t\t\t\t\t\t\t\tBaseColor.BLACK,\n\t\t\t\t\t\t\t\t\t\t\t\tcolumns,\n\t\t\t\t\t\t\t\t\t\t\t\tElement.ALIGN_LEFT);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} // grouping\n\n\t\t\t\t\t\tif (j % 2 == 0)\n\t\t\t\t\t\t\ttable.getDefaultCell().setBackgroundColor(ASE_ODD_ROW_COLOR);\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\ttable.getDefaultCell().setBackgroundColor(ASE_EVEN_ROW_COLOR);\n\n\t\t\t\t\t\tfor (i=0;i<columns;i++){\n\n\t\t\t\t\t\t\tif (!aDataColumns[i].equals(Constant.BLANK)){\n\t\t\t\t\t\t\t\tif (aDataColumns[i].indexOf(\"date\") > -1){\n\t\t\t\t\t\t\t\t\tjunk = aseUtil.ASE_FormatDateTime(rs.getString(aDataColumns[i]),Constant.DATE_DATE_MDY);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\t\tjunk = aseUtil.nullToBlank(rs.getString(aDataColumns[i]));\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\tjunk = \"\";\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tjunk = junk.replace(\"<p>\",\"\")\n\t\t\t\t\t\t\t\t\t\t.replace(\"</p>\",\"\\n\")\n\t\t\t\t\t\t\t\t\t\t.replace(\"<br>\",\"\\n\")\n\t\t\t\t\t\t\t\t\t\t.replace(\"<br/>\",\"\\n\")\n\t\t\t\t\t\t\t\t\t\t.replace(\"<br />\",\"\\n\")\n\t\t\t\t\t\t\t\t\t\t.replace(\"&nbsp;\",\" \")\n\t\t\t\t\t\t\t\t\t\t;\n\n\t\t\t\t\t\t\ttry{\n\t\t\t\t\t\t\t\t//phrase = new Phrase();\n\t\t\t\t\t\t\t\t//phrase.add(createPhrase(junk,false));\n\n\t\t\t\t\t\t\t\t//OR\n\n\t\t\t\t\t\t\t\t// this version cuts does not parse html\n\t\t\t\t\t\t\t\tphrase = new Phrase(leading, new Chunk(junk, FontFactory.getFont(FontFactory.TIMES_ROMAN, dataFontSize, Font.NORMAL, BaseColor.BLACK)));\n\t\t\t\t\t\t\t\tcell = new PdfPCell(phrase);\n\n\t\t\t\t\t\t\t\t// OR\n\n\t\t\t\t\t\t\t\t// this version is having problems with a stylesheet or font message\n\t\t\t\t\t\t\t\t//cell = new PdfPCell(processElement(junk, DATACOLOR, Font.NORMAL));\n\n\t\t\t\t\t\t\t\t// OR\n\n\t\t\t\t\t\t\t\t// this version is having problems with a stylesheet or font message.\n\t\t\t\t\t\t\t\t// also cuts off multiline data\n\t\t\t\t\t\t\t\t//cell = processElement(junk);\n\n\t\t\t\t\t\t\t\tcell.setFixedHeight(20);\n\t\t\t\t\t\t\t\tcell.setPaddingRight(10);\n\t\t\t\t\t\t\t\ttable.addCell(cell);\n\t\t\t\t\t\t\t} catch(IllegalArgumentException e){\n\t\t\t\t\t\t\t\tlogger.fatal(\"ReportGeneric - runReport 1: \" + e.toString());\n\t\t\t\t\t\t\t} catch(Exception e){\n\t\t\t\t\t\t\t\tlogger.fatal(\"ReportGeneric - runReport 2: \" + e.toString());\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t++j;\n\t\t\t\t\t} // while\n\n\t\t\t\t\tif (j==0){\n\t\t\t\t\t\ttry{\n\t\t\t\t\t\t\tphrase = new Phrase();\n\t\t\t\t\t\t\tphrase.add(createPhrase(\"no date found for requested report\",false));\n\t\t\t\t\t\t\tcell = new PdfPCell(phrase);\n\t\t\t\t\t\t\tcell.setFixedHeight(20);\n\t\t\t\t\t\t\tcell.setPaddingRight(10);\n\t\t\t\t\t\t\tcell.setColspan(columns);\n\t\t\t\t\t\t\ttable.addCell(cell);\n\t\t\t\t\t\t} catch(IllegalArgumentException e){\n\t\t\t\t\t\t\tlogger.fatal(\"ReportGeneric - runReport 1: \" + e.toString());\n\t\t\t\t\t\t} catch(Exception e){\n\t\t\t\t\t\t\tlogger.fatal(\"ReportGeneric - runReport 2: \" + e.toString());\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tdocument.add(table);\n\n\t\t\t\t\t// footer\n\t\t\t\t\tif (reportType.equals(Constant.FORUM)){\n\n\t\t\t\t\t\tList list = new List();\n\n\t\t\t\t\t\tjunk = \"CLOSED - tickets combined with another item because of similarity in the work that is needed, or the work that is no longer necessary.\";\n\t\t\t\t\t\tphrase = new Phrase(leading, new Chunk(junk, FontFactory.getFont(FontFactory.TIMES_ROMAN, dataFontSize, Font.NORMAL, BaseColor.BLACK)));\n\t\t\t\t\t\tlist.add(new ListItem(phrase));\n\n\t\t\t\t\t\tjunk = \"COMPLETED - this status is set after development has been completed, and user confirms that CC is working as expected.\";\n\t\t\t\t\t\tphrase = new Phrase(leading, new Chunk(junk, FontFactory.getFont(FontFactory.TIMES_ROMAN, dataFontSize, Font.NORMAL, BaseColor.BLACK)));\n\t\t\t\t\t\tlist.add(new ListItem(phrase));\n\n\t\t\t\t\t\tjunk = \"MONITORING - either a problem cannot be recreated or a fix was implemented without a way to recreate the problem.\";\n\t\t\t\t\t\tphrase = new Phrase(leading, new Chunk(junk, FontFactory.getFont(FontFactory.TIMES_ROMAN, dataFontSize, Font.NORMAL, BaseColor.BLACK)));\n\t\t\t\t\t\tlist.add(new ListItem(phrase));\n\n\t\t\t\t\t\tjunk = \"REQUIREMENTS - an enhancement or bug fix requiring additional specification prior to development.\";\n\t\t\t\t\t\tphrase = new Phrase(leading, new Chunk(junk, FontFactory.getFont(FontFactory.TIMES_ROMAN, dataFontSize, Font.NORMAL, BaseColor.BLACK)));\n\t\t\t\t\t\tlist.add(new ListItem(phrase));\n\n\t\t\t\t\t\tjunk = \"RESEARCH - the development team is unclear of the reported ticket or requset and requires time to better understand what has taken place and possible recommendation for the user.\";\n\t\t\t\t\t\tphrase = new Phrase(leading, new Chunk(junk, FontFactory.getFont(FontFactory.TIMES_ROMAN, dataFontSize, Font.NORMAL, BaseColor.BLACK)));\n\t\t\t\t\t\tlist.add(new ListItem(phrase));\n\n\t\t\t\t\t\tjunk = \"REVIEW - items the development team required additional time to understand.\";\n\t\t\t\t\t\tphrase = new Phrase(leading, new Chunk(junk, FontFactory.getFont(FontFactory.TIMES_ROMAN, dataFontSize, Font.NORMAL, BaseColor.BLACK)));\n\t\t\t\t\t\tlist.add(new ListItem(phrase));\n\n\t\t\t\t\t\tjunk = \"UAT - user acceptance testing (UAT) is the process where user(s) confirms that a fix or enhancement was completed as requested. If all goes well, the work is moved to production; otherwise, the work goes back for more requirements.\";\n\t\t\t\t\t\tphrase = new Phrase(leading, new Chunk(junk, FontFactory.getFont(FontFactory.TIMES_ROMAN, dataFontSize, Font.NORMAL, BaseColor.BLACK)));\n\t\t\t\t\t\tlist.add(new ListItem(phrase));\n\n\t\t\t\t\t\tdocument.add(list);\n\n\t\t\t\t\t}\n\n\t\t\t\t\t// step 5 of 5\n\t\t\t\t\tdocument.close();\n\n\t\t\t\t\t// with report ready, open in browser\n\t\t\t\t\twritePDF(request,response,reportFileName);\n\n\t\t\t\t} // not null report fields\n\n\t\t\t} // aseReport\n\n\t\t} catch(SQLException ex){\n\t\t\tlogger.fatal(\"ReportGeneric - runReport 3: \" + ex.toString());\n\t\t} catch(IllegalArgumentException ex){\n\t\t\tlogger.fatal(\"ReportGeneric - runReport - 4: \" + ex.toString());\n\t\t} catch(Exception ex){\n\t\t\tlogger.fatal(\"ReportGeneric - runReport 5: \" + ex.toString());\n\t\t} finally {\n\t\t\tconnectionPool.freeConnection(conn,\"ReportGeneric\",reportUser);\n\n\t\t\ttry{\n\t\t\t\tif (conn != null){\n\t\t\t\t\tconn.close();\n\t\t\t\t\tconn = null;\n\t\t\t\t}\n\t\t\t}\n\t\t\tcatch(Exception e){\n\t\t\t\tlogger.fatal(\"Tables: campusOutlines - \" + e.toString());\n\t\t\t}\n\n\t\t\taseUtil = null;\n\t\t\twebsite = null;\n\t\t}\n\t}", "@Test (priority=2)\n\tpublic void ReportingTest()\n\t{\n\t\tReportingPOM ReportPOM = new ReportingPOM(driver);\t\n\t\tReportPOM.clickReporting();\n\t\tWait = properties.getProperty(\"implicitWait\");\n\t\tReportPOM.clickFollowedStudents();\n\t\tscreenShot.captureScreenShot(\"17\");\t\n\t\t//Enter student name in keyword\t\n\t\tReportPOM.keyword(\"Kritika\");\n\t\t//Click on search button\t\n\t\tReportPOM.clicksearchbutton();\t\n\t\tscreenShot.captureScreenShot(\"18\");\n\t\t//Click on >> icon of the student name\n\t\tReportPOM.ClickArrow(); \t\n\t\tscreenShot.captureScreenShot(\"19\");\n\t\t//Click on course >> icon\n\t\tReportPOM.Clickcoursearrow();\n\t\tscreenShot.captureScreenShot(\"20\");\t\n\t\t// Click on quiz icon\n\t\tReportPOM.Clickquizicon(); \n\t\tscreenShot.captureScreenShot(\"21\");\n\t\t//Click on send email\n\t\tReportPOM.Clicknotification(); \n\t\t// Click on correct test\n\t\tReportPOM.Clickcorrecttest(); \n\t\tscreenShot.captureScreenShot(\"22\");\n\t\t//Click on course link \n\t\tReportPOM.ClickCourseName(); \n\t\tscreenShot.captureScreenShot(\"23\");\n\n\t}", "@Test\r\n\tpublic void extendReports() throws IOException {\n\t\tString File = \"./Reports/report.html\";\r\n\t\tExtentHtmlReporter html = new ExtentHtmlReporter(File);\r\n\t\thtml.setAppendExisting(true);\r\n\t\t//to write on the created html file\r\n\t\tExtentReports extents = new ExtentReports();\r\n\t\textents.attachReporter(html);\r\n\t\t\r\n\t\tExtentTest createAccountTest = extents.createTest(\"TC001\", \"CreateAccount\");\r\n\t\tcreateAccountTest.pass(\"username entered\", MediaEntityBuilder.createScreenCaptureFromPath(\"./../snaps/img1.png\").build());\r\n\t\textents.flush();\r\n\t\t\r\n\r\n\t}", "void outputReport(RandomAccessFile reportFile, boolean last) {\n\n String line1 = \"----+---------+----------+----------+---+----------+\" +\n \"----------+----------+----------+\" +\n \"---------------------------------------------+\";\n String line2 = \"----+---------+------------+----------+---------------------+\" +\n \"---------+----------+----------+--------------------+--------+\" +\n \"-----+-----+-----+\";\n\n if (dbg3) System.out.println(\"outputReport: station.getStationId() = *\" +\n station.getStationId(\"\") + \"*\");\n if (\"\".equals(station.getStationId(\"\"))) { // only done formats 01/02 -> survey data only\n\n //display the survey data }\n //ec.writeFileLine(reportFile, \"----+---------+----------+----------\" +\n // \"+---+----------+----------+----------+----------+----------\" +\n // \"------------------------------+\");\n ec.writeFileLine(reportFile, line1);\n ec.writeFileLine(reportFile, \"dup.|Survey |Platform | \" +\n \"| | | | | | \" +\n \" |\");\n ec.writeFileLine(reportFile, \"code|Id |Name |Expedition\" +\n \"|Ins|Proj Name |Area Name |Domain |Platform |Notes \" +\n \" |\");\n ec.writeFileLine(reportFile, line1);\n\n ec.writeFileLine(reportFile, surveyStatus + \" |\" + //j24\n ec.frm(survey.getSurveyId(\"\"),9) + \"|\" +\n ec.frm(survey.getPlanam(\"\"),10) + \"|\" +\n ec.frm(survey.getExpnam(\"\"),10) + \"|\" +\n ec.frm(survey.getInstitute(\"\"),03) + \"|\" +\n ec.frm(survey.getPrjnam(\"\"),10) + \"|\" +\n ec.frm(inventory.getAreaname(\"\"),10)+ \"|\" +\n ec.frm(inventory.getDomain(\"\"),10) + \"|\" +\n ec.frm(\" \",10) + \"|\" +\n //survey.getPlatfm() + \"|\" +\n ec.frm(survey.getNotes1(\"\"),45) + \"|\");\n\n // write to station file - keep place for actual output\n if (loadFlag) {\n try {\n stnFile.writeBytes(\"\");\n headerPos1 = stnFile.getFilePointer();\n ec.writeFileLine(stnFile, ec.frm(\" \",80));\n headerPos2 = stnFile.getFilePointer();\n ec.writeFileLine(stnFile, ec.frm(\" \",80));\n headerPos3 = stnFile.getFilePointer();\n ec.writeFileLine(stnFile, ec.frm(\" \",80));\n } catch (Exception e) {\n ec.processError(e, thisClass, \"outputReport\", \"Header Pos Error\");\n } // try-catch\n } // if (loadFlag)\n\n\n if (surveyLoaded) { // display details of loaded survey //j24\n // get the old inventory record\n MrnInventory tInventory[] =\n new MrnInventory(survey.getSurveyId()).get();\n\n ec.writeFileLine(reportFile, \"lod |\" +\n ec.frm(tSurvey[0].getSurveyId(\"\"),9) + \"|\" +\n ec.frm(tSurvey[0].getPlanam(\"\"),10) + \"|\" + //j24\n ec.frm(tSurvey[0].getExpnam(\"\"),10) + \"|\" + //j24\n ec.frm(tSurvey[0].getInstitute(\"\"),03) + \"|\" + //j24\n ec.frm(tSurvey[0].getPrjnam(\"\"),10) + \"|\" + //j24\n ec.frm(tInventory[0].getAreaname(\"\"),10) + \"|\" + //j24\n ec.frm(tInventory[0].getDomain(\"\"),10) + \"|\" + //j24\n ec.frm(\" \",10) + \"|\" +\n //tSurvey[0].getPlatfm() + \"|\" + //j24\n ec.frm(tSurvey[0].getNotes1(\"\"),45) + \"|\"); //j24\n } // if (survey_loaded)\n\n ec.writeFileLine(reportFile, line1);\n ec.writeFileLine(reportFile, \" \");\n\n ec.writeFileLine(reportFile, line2);\n ec.writeFileLine(reportFile, \"dup.| | | |\" +\n \" | | | |\" +\n \" | | Records |\");\n ec.writeFileLine(reportFile, \"code| Surv Id | Station Id | StnNam |\" +\n \" Date Time GMT | Latitude| Longitude| Subdes(s)|\" +\n \" Sample depth range | StnDep | Tot.| O.K.| Rej |\");\n ec.writeFileLine(reportFile, line2);\n } else { // if (\"\".equals(station.getStationId(\"\")))\n\n\n if (dbg) System.out.println(\"<br>outputReport: tStation.length = \" +\n tStation.length);\n\n int stationSampleOKCount = stationSampleCount - stationSampleRejectCount;\n ec.writeFileLine(reportFile, stationStatusLD + \" |\" + //j24\n ec.frm(\" \",9) + \"|\" +\n ec.frm(station.getStationId(),12) + \"|\" +\n ec.frm(station.getStnnam(),10) + \"| \" +\n //station.getDatum + \"| \" +\n ec.frm(startDateTime,20) + \"|\" +\n ec.frm(station.getLatitude(),9,5) + \"|\" +\n ec.frm(station.getLongitude(),10,5) + \"|\" +\n ec.frm(subdes,10) + \"|\" +\n ec.frm(depthMin + \" to \" + depthMax,20) + \"|\" +\n ec.frm(station.getStndep(),8,2) + \"|\" +\n ec.frm(stationSampleCount,5) + \"|\" +\n ec.frm(stationSampleOKCount,5) + \"|\" +\n ec.frm(stationSampleRejectCount,5) + \"|\");\n if (!loadFlag) {\n ec.writeFileLine(workFile, ec.frm(station.getStationId(),12) +\n ec.frm(stationSampleCount,5));\n } // if (!loadFlag)\n\n if (stationExists) { // || (!\"new\".equals(stationStatusLD))) {\n for (int i = 0; i < tStation.length; i++) {\n int tmpRecordCount = 0;\n if (dataType == CURRENTS) {\n tmpRecordCount = currentsRecordCountArray[i];\n } else if (dataType == SEDIMENT) {\n tmpRecordCount = sedphyRecordCountArray[i];\n } else if ((dataType == WATER) || (dataType == WATERWOD)) {\n tmpRecordCount = watphyRecordCountArray[i];\n } // if (dataType == CURRENTS)\n\n String subdesLocal = subdesArray[i][0];\n for (int j = 1; j < MAX_SUBDES; j++) {\n subdesLocal += (!\"\".equals(subdesArray[i][j]) ?\n \"/\"+subdesArray[i][j] : \"\");\n } // for int (j = 1; j < MAX_SUBDES; j++)\n if (stationExistsArray[i]) {\n ec.writeFileLine(reportFile, stationStatusDB[i] + \" |\" +\n ec.frm(tStation[i].getSurveyId(),9) + \"|\" +\n ec.frm(tStation[i].getStationId(),12) + \"|\" +\n ec.frm(tStation[i].getStnnam(\"\"),10) + \"| \" +\n //tStation[i].getDateStart(\"\"), \"| \",\n ec.frm(spldattimArray[i],20) + \"|\" +\n ec.frm(tStation[i].getLatitude(),9,5) + \"|\" +\n ec.frm(tStation[i].getLongitude(),10,5) + \"|\" +\n //ec.frm(subdesArray[i],5) + \"|\" +\n ec.frm(subdesLocal,10) + \"|\" +\n ec.frm(loadedDepthMin[i] + \" to \" + loadedDepthMax[i],20) + \"|\" +\n ec.frm(tStation[i].getStndep(),8,2) + \"|\" +\n ec.frm(tmpRecordCount,5) + \"| | |\");\n } // if (stationExistsArray[i])\n } // for (int i = 0; i < tStation.length; i++)\n } // if (stationExists || (!\"new\".equals(stationStatusDB))\n ec.writeFileLine(reportFile, \"\");\n\n // write to station file\n if (loadFlag) {\n ec.writeFileLine(stnFile, \"'\" +\n ec.frm(station.getStationId(\"\"),12) + \"' '\" +\n station.getDateStart(\"\").substring(0,10) + \"' \" +\n ec.frm(station.getLatitude(),11,5) + \" \" +\n ec.frm(station.getLongitude(),11,5) + \" \" +\n ec.frm(ec.nullToNines(station.getStndep(),9999.0f),10,2) + \" '\" +\n ec.frm(station.getStnnam(\"\"),10) + \"'\");\n } // if (loadFlag)\n\n\n if (last) {\n //ec.writeFileLine(reportFile, \"last\");\n\n int sampleOKCount = sampleCount - sampleRejectCount;\n //ec.writeFileLine(reportFile, \"----+------------+----------\" +\n // \"+---------------------+---------+----------+-----+---\" +\n // \"-----------------+--------+-----------------+\");\n ec.writeFileLine(reportFile, line2);\n ec.writeFileLine(reportFile, \" ^\"); //j24//\n ec.writeFileLine(reportFile, \" |\"); //j24//\n ec.writeFileLine(reportFile, \" +--new = new record\"); //j24//\n ec.writeFileLine(reportFile, \" dup = new record is a duplicate record\"); //j24//\n //ec.writeFileLine(reportFile, \" lod = existing record\"); //j24//\n ec.writeFileLine(reportFile, \" did = duplicate station-id - different SUBDES\"); //k46//\n ec.writeFileLine(reportFile, \" dis = duplicate station-id - same SUBDES\"); //u02//\n ec.writeFileLine(reportFile, \" dia = duplicate station-id - different SUBDES: data added\");//u02//\n ec.writeFileLine(reportFile, \" dij = ignored station - matched existing station record - did\"); //k46//\n ec.writeFileLine(reportFile, \" dip = data records replaced for existing station record - did\"); //k46//\n ec.writeFileLine(reportFile, \" dsd = duplicate station record - different SUBDES\"); //k46//\n ec.writeFileLine(reportFile, \" dss = duplicate station record - same SUBDES\"); //u02//\n ec.writeFileLine(reportFile, \" dsa = duplicate station record - different SUBDES: data added\");\n ec.writeFileLine(reportFile, \" dsj = ignored station - matched existing station record - dsd\"); //k46//\n ec.writeFileLine(reportFile, \" dsp = data records replaced for existing station record - dsd\"); //k46//\n\n ec.writeFileLine(reportFile, \" \");\n ec.writeFileLine(reportFile, \"----------------------------\" +\n \"-----------------------------------------------------\" +\n \"------------------------------\");\n ec.writeFileLine(reportFile, \" \");\n ec.writeFileLine(reportFile, \"This data was \" +\n (loadFlag ? \"loaded\" : \"checked\") + \" with the following ranges:\");\n ec.writeFileLine(reportFile, \" Area: \" + areaRangeVal + \" (decimal degrees)\");\n ec.writeFileLine(reportFile, \" Time: \" + timeRangeVal + \" (minutes)\");\n ec.writeFileLine(reportFile, \" \");\n ec.writeFileLine(reportFile, \"----------------------------\" +\n \"-----------------------------------------------------\" +\n \"------------------------------\");\n ec.writeFileLine(reportFile, \"Closing statistics - survey_id: \" +\n survey.getSurveyId());\n ec.writeFileLine(reportFile, \" \");\n ec.writeFileLine(reportFile, \" Number of lines - \" +\n ec.frm(lineCount,6));\n ec.writeFileLine(reportFile, \" Fatal Errors - \" +\n ec.frm(fatalCount,6));\n ec.writeFileLine(reportFile, \" \");\n ec.writeFileLine(reportFile, \" Number of stations - \" +\n ec.frm(stationCount,6));\n ec.writeFileLine(reportFile, \" New - \" +\n ec.frm(newStationCount,6));\n ec.writeFileLine(reportFile, \" Dup - \" +\n ec.frm((stationCount-newStationCount),6));\n ec.writeFileLine(reportFile, \" \");\n ec.writeFileLine(reportFile, \" Duplicate Station-id (DI)\");\n ec.writeFileLine(reportFile, \" DI: diff SUBDES (DID) - \" +\n ec.frm(didCount,6));\n ec.writeFileLine(reportFile, \" DI: same SUBDES (DIS) - \" +\n ec.frm(disCount,6));\n ec.writeFileLine(reportFile, \" DI: diff SUBDES added (DIA) - \" +\n ec.frm(diaCount,6));\n ec.writeFileLine(reportFile, \" DI's Rejected (DIJ) - \" +\n ec.frm(dijCount,6));\n ec.writeFileLine(reportFile, \" DI's Replaced (DIP) - \" +\n ec.frm(dipCount,6));\n ec.writeFileLine(reportFile, \" \");\n ec.writeFileLine(reportFile, \" Duplicate Station (DS)\");\n ec.writeFileLine(reportFile, \" DS: diff SUBDES (DSD) - \" +\n ec.frm(dsdCount,6));\n ec.writeFileLine(reportFile, \" DS: same SUBDES (DSS) - \" +\n ec.frm(dssCount,6));\n ec.writeFileLine(reportFile, \" DS: diff SUBDES added (DSA) - \" +\n ec.frm(dsaCount,6));\n ec.writeFileLine(reportFile, \" DS's Rejected (DSJ) - \" +\n ec.frm(dsjCount,6));\n ec.writeFileLine(reportFile, \" DS's Replaced (DSP) - \" +\n ec.frm(dspCount,6));\n ec.writeFileLine(reportFile, \" \");\n ec.writeFileLine(reportFile, \" Number of Samples - \" +\n ec.frm(sampleCount,6));\n ec.writeFileLine(reportFile, \" OK - \" +\n ec.frm(sampleOKCount,6));\n ec.writeFileLine(reportFile, \" Rejected - \" +\n ec.frm(sampleRejectCount,6));\n ec.writeFileLine(reportFile, \" \");\n java.text.SimpleDateFormat formatter =\n new java.text.SimpleDateFormat (\"yyyy-MM-dd\");\n ec.writeFileLine(reportFile, \" date range - \" +\n formatter.format(dateMin) + \" to \" + formatter.format(dateMax));\n ec.writeFileLine(reportFile, \" latitude range - \" +\n ec.frm(latitudeMin,10,5) + \" to \" + ec.frm(latitudeMax,10,5));\n ec.writeFileLine(reportFile, \" longitude range - \" +\n ec.frm(longitudeMin,10,5) + \" to \" + ec.frm(longitudeMax,10,5));\n ec.writeFileLine(reportFile, \" \");\n ec.writeFileLine(reportFile, \"----------------------------\" +\n \"-----------------------------------------------------\" +\n \"------------------------------\");\n\n if (loadFlag) {\n ec.writeFileLine(reportFile, \" \");\n\n if (fatalCount > 0) {\n ec.writeFileLine(reportFile,\n \" THERE ARE FATAL ERRORS - THIS LOAD IS UNSUCCESSFUL \");\n ec.writeFileLine(reportFile,\n \" ================================================== \");\n ec.writeFileLine(reportFile,\n \" As some data has been loaded, it is necessary to remove it\\n\" +\n \" by running the 'Delete a survey' option on the SADCO website\\n\" +\n \" located in the 'Marine Database: Admin / Load Data' menu options\");\n } else { // if (fatalCount > 0)\n Timestamp loadDate = new Timestamp(new java.util.Date().getTime());\n ec.writeFileLine(reportFile, \" LOAD SUCCESSFUL \");\n ec.writeFileLine(reportFile, \" =============== \");\n ec.writeFileLine(reportFile, \" date loaded: \" +\n formatter.format(loadDate));\n\n if (dataType != CURRENTS) {\n ec.writeFileLine(reportFile, \" \" + DATA_TYPE[dataType] +\n \" code range - \" + dataCodeStart + \" to \" + dataCodeEnd);\n } // if (dataType != CURRENTS)\n\n ec.writeFileLine(reportFile, \" \");\n if (\"\".equals(passkey)) {\n ec.writeFileLine(reportFile, \" This data is NOT flagged \");\n } else {\n ec.writeFileLine(reportFile, \" This data is FLAGGED \");\n } // if (p_station.passkey is NULL)\n } // if (fatalCount > 0)\n\n // write header to station file\n String lineA =\n \"'MARINE' \" +\n ec.frm((int) latitudeMin,4) +\n ec.frm((int) (latitudeMax+1f),4) +\n ec.frm((int) longitudeMin,4) +\n ec.frm((int) (longitudeMax+1f),4) + \" '\" +\n dateMin.toString().substring(0,10) + \"' '\" +\n dateMax.toString().substring(0,10) + \"' 'STATIONS'\";\n String lineB = \"'\" + survey.getSurveyId(\"\") +\n \"' \" + stationCount + \" '\" +\n platformName + \"' '\" +\n projectName + \"' '\" +\n expeditionName + \"'\";\n String lineC = \"'\" + instituteName + \"'\";\n try {\n stnFile.seek(headerPos1);\n stnFile.writeBytes(lineA);\n stnFile.seek(headerPos2);\n stnFile.writeBytes(lineB);\n stnFile.seek(headerPos3);\n stnFile.writeBytes(lineC);\n } catch (Exception e) {\n System.out.println(\"<br>\" + thisClass +\n \".printHeader: Write Error: \" + e.getMessage());\n e.printStackTrace();\n } // try-catch\n\n } // if (loadflag)\n\n Timestamp loadDate = new Timestamp(new java.util.Date().getTime());\n String text = (loadFlag ? \"loaded\" : \"checked\");\n ec.writeFileLine(reportFile, \" date \" + text + \": \" +\n formatter.format(loadDate));\n ec.writeFileLine(reportFile, \" \");\n ec.writeFileLine(reportFile, \"----------------------------\" +\n \"-----------------------------------------------------\" +\n \"------------------------------\");\n } // if (last)\n\n } // if (\"\".equals(station.getStationId(\"\")))\n\n\n //ec.writeFileLine(reportFile, message);\n //if (dbg) System.out.println(\"outputReport: message = \" + message);\n // output to screen or file\n }", "void closeDriver()\n\t{\t\t\n\t\tif(getDriver()!=null)\n\t\t{ \t\n\t\t\tgetDriver().quit();\n\t\t\tsetDriver(null);\n\t\t}\n\t}", "@Override\r\npublic void onTestFailure(ITestResult arg0) {\n\tExtentReports er = new ExtentReports(\"./Report/Report.html\");\r\n\tExtentTest t1 = er.startTest(\"TC001\");\r\n\tt1.log(LogStatus.PASS, \"Passed\");\r\n\tSystem.out.println(\"vballe\");\r\n\ter.endTest(t1);\r\n\ter.flush();\r\n\ter.close();\r\n}", "void exportarLog() {\n try {\n JasperPrint rU = null;\n HashMap map = new HashMap();\n\n String arquivoJasper = \"/Sistema/relatorios/relatorioAcessos.jasper\";\n try{\n rU = JasperFillManager.fillReport(arquivoJasper, map, parametrosNS.con);\n }catch(Exception e){ \n JOptionPane.showMessageDialog(null, \"visualizar relatorio \" + e);\n JOptionPane.showMessageDialog(null, e.getMessage());\n }\n JasperViewer.viewReport(rU, false); \n } catch (Exception e) {\n JOptionPane.showMessageDialog(null, \"o erro foi ao gerar relatorio \" + e);\n }\n }", "public void quitDriver() {\n webDriver.quit();\n webDriver = null;\n }", "@Override\n void createReport(final Format reportFormat,\n final long start, final long end) {\n makeBriefReport(reportFormat, \"Informe breu\", start, end);\n writeToFile();\n getFormat().finishPrinting();\n }", "private void downloadReport() {\n // Get Employees and Tasks\n ArrayList<Employee> inUnit = Main.getEmployeesInUnit();\n ArrayList<Task> allTasks = Main.getAllTasks();\n\n // Create BufferedWriter Object\n String fileName = fileDate.format(new Date()) + \"_report.csv\";\n BufferedWriter writer = null;\n try {\n writer = new BufferedWriter(new FileWriter(fileName));\n } catch (IOException e) {\n e.printStackTrace();\n System.out.println(\"Filename already exists.\");\n }\n\n try {\n // Write Header\n writer.write(\n \"Task ID,Task Description,Employee ID, Employee Name, WiGrow Needed, Incomplete Scheduling, Exception Report Needed\\n\");\n // Look through employee and their task\n for (int i = 0; i < inUnit.size(); ++i) {\n Employee current = inUnit.get(i);\n for (int j = 0; j < allTasks.size(); ++j) {\n Task currentTask = allTasks.get(j);\n // If found, write to file\n if (currentTask.getEmployees().contains(current)) {\n writer.write(currentTask.getID() + \",\" + currentTask.getDescription() + \",\"\n + current.getId() + \",\" + current.getName() + \",\" + current.isWiGrow() + \",\"\n + current.isScheduling() + \",\" + current.isExceptionReport() + \"\\n\");\n }\n }\n }\n writer.close();\n } catch (IOException e) {\n // Do nothing\n\n }\n // Alert pop up\n Alert downloadSuccess = new Alert(AlertType.NONE, \"Successfully Downloaded Report! It is named \"\n + fileName + \" and is located in your program's local directory.\");\n downloadSuccess.setTitle(\"Download File\");\n downloadSuccess.getButtonTypes().add(ButtonType.OK);\n downloadSuccess.showAndWait();\n }", "@Test\n\tpublic void generateSpecialInstructionsReport(){\n\t\t\t\tWebDriver driver = new FirefoxDriver();\n\t\t\t\t// Alternatively the same thing can be done like this\n\t\t // driver.get(\"http://www.google.com\");\n\t\t\t\tdriver.navigate().to(determineUrl());\n\t\t\t\t// Find the text input element by its name\n\t\t\t\tWebElement user_name = driver.findElement(By.id(\"user_email\"));\n\t\t\t\tuser_name.sendKeys(user);\n\t\t\t\t\n\t\t\t\tWebElement password = driver.findElement(By.id(\"user_password\"));\n\t\t\t\tpassword.sendKeys(password_login);\n\t\t\t\tpassword.submit();\n\t\t\t\t\n\t\t\t\tWebElement select_venue = driver.findElement(By.id(\"change_venue\"));\n\t\t\t\tselect_venue.sendKeys(venue);\n\t\t\t\tselect_venue.submit();\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tWebElement report = driver.findElement(By.linkText(\"Reporting\"));\n\t\t\t\treport.click();\n\t\t\t\t\n\t\t\t\tWebElement select_report = driver.findElement(By.id(\"report_type_chooser\"));\n\t\t\t\tselect_report.sendKeys(\"Special Instructions Report\");\n\t\t\t\tWebElement select_event = driver.findElement(By.id(\"report_event\"));\n\t\t\t\tselect_event.sendKeys(event);\n\t\t\t\tselect_event.submit();\n\t\t\t\tdriver.close();\n\t\t\n\t}", "@Test\n\tpublic void generateCashOverShortSummaryReport(){\n\t\t\t\tWebDriver driver = new FirefoxDriver();\n\t\t\t\t// Alternatively the same thing can be done like this\n\t\t // driver.get(\"http://www.google.com\");\n\t\t\t\tdriver.navigate().to(determineUrl());\n\t\t\t\t// Find the text input element by its name\n\t\t\t\tWebElement user_name = driver.findElement(By.id(\"user_email\"));\n\t\t\t\tuser_name.sendKeys(user);\n\t\t\t\t\n\t\t\t\tWebElement password = driver.findElement(By.id(\"user_password\"));\n\t\t\t\tpassword.sendKeys(password_login);\n\t\t\t\tpassword.submit();\n\t\t\t\t\n\t\t\t\tWebElement select_venue = driver.findElement(By.id(\"change_venue\"));\n\t\t\t\tselect_venue.sendKeys(venue);\n\t\t\t\tselect_venue.submit();\n\t\t\t\t\n\t\t\t\tWebElement report = driver.findElement(By.linkText(\"Reporting\"));\n\t\t\t\treport.click();\n\t\t\t\t\n\t\t\t\tWebElement select_report = driver.findElement(By.id(\"report_type_chooser\"));\n\t\t\t\tselect_report.sendKeys(\"Cash Over/Short Summary Report\");\n\t\t\t\tWebElement select_event = driver.findElement(By.id(\"report_event\"));\n\t\t\t\tselect_event.sendKeys(event);\n\t\t\t\tselect_event.submit();\n\t\t\t\tdriver.close();\n\t\t\n\t}", "public void close() throws FileSystemException {\n\t\tlogger.info(\"Closing \" + this.getClass().getSimpleName());\n\t\tWebDriver wd = Connection.getDriver();\n\t\twd.close();\n\t\tif (callersWindowHandle != null) {\n\t\t\twd.switchTo().window(callersWindowHandle);\n\t\t}\n\t}", "@Test\n\tpublic void generateVenueInventorySummaryReport(){\n\t\t\t\tWebDriver driver = new FirefoxDriver();\n\t\t\t\t// Alternatively the same thing can be done like this\n\t\t // driver.get(\"http://www.google.com\");\n\t\t\t\tdriver.navigate().to(determineUrl());\n\t\t\t\t// Find the text input element by its name\n\t\t\t\tWebElement user_name = driver.findElement(By.id(\"user_email\"));\n\t\t\t\tuser_name.sendKeys(user);\n\t\t\t\t\n\t\t\t\tWebElement password = driver.findElement(By.id(\"user_password\"));\n\t\t\t\tpassword.sendKeys(password_login);\n\t\t\t\tpassword.submit();\n\t\t\t\t\n\t\t\t\tWebElement select_venue = driver.findElement(By.id(\"change_venue\"));\n\t\t\t\tselect_venue.sendKeys(venue);\n\t\t\t\tselect_venue.submit();\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tWebElement report = driver.findElement(By.linkText(\"Reporting\"));\n\t\t\t\treport.click();\n\t\t\t\t\n\t\t\t\tWebElement select_report = driver.findElement(By.id(\"report_type_chooser\"));\n\t\t\t\tselect_report.sendKeys(\"Venue Inventory Summary Report\");\n\t\t\t\tWebElement select_event = driver.findElement(By.id(\"report_event\"));\n\t\t\t\tselect_event.sendKeys(event);\n\t\t\t\tselect_event.submit();\n\t\t\t\tdriver.close();\n\t\t\n\t}", "protected void outputResultData (FinalReport report)\n {\n trc.show (\"outputResultData\", \"output simulation results\");\n\n\tmodelReport = report;\n\tnew HandleReportDialog (this);\n\n }" ]
[ "0.788908", "0.74182206", "0.73363817", "0.72296864", "0.6620998", "0.6520037", "0.64725405", "0.642409", "0.6326075", "0.6301825", "0.621403", "0.6204132", "0.6188141", "0.6153084", "0.6115005", "0.610599", "0.59950143", "0.59595", "0.595077", "0.5938151", "0.5920842", "0.592005", "0.59166425", "0.59045255", "0.58928263", "0.5892777", "0.5859924", "0.5838151", "0.58362305", "0.58352035", "0.5812944", "0.57913595", "0.5788676", "0.57769454", "0.57766443", "0.5772154", "0.5764902", "0.57629204", "0.5753596", "0.57527584", "0.57208145", "0.569896", "0.5697077", "0.56871253", "0.56823444", "0.5675166", "0.56696975", "0.56652045", "0.5651845", "0.56473863", "0.5642323", "0.564081", "0.56328595", "0.5631401", "0.56279874", "0.56271774", "0.56232274", "0.561843", "0.5617928", "0.56137365", "0.5601683", "0.55990636", "0.55843264", "0.5580139", "0.55783844", "0.5576017", "0.55689526", "0.5565165", "0.5559573", "0.55583864", "0.5554987", "0.5551148", "0.55482405", "0.55473435", "0.5535379", "0.5530275", "0.5525492", "0.5513884", "0.5507946", "0.5505481", "0.5503737", "0.5497251", "0.5493955", "0.54926455", "0.5468332", "0.54620016", "0.54521495", "0.54462415", "0.5438977", "0.54300225", "0.54265517", "0.54264283", "0.5419137", "0.5415986", "0.54151183", "0.54116106", "0.5411185", "0.5405439", "0.5402593", "0.5401326" ]
0.7551578
1
Returns tne maximum flow from s to t in the given graph
int fordFulkerson(int graph[][], int s, int t) { int u, v; // Create a residual graph and fill the residual graph with given capacities in the original graph as residual capacities in residual graph int rGraph[][] = new int[MaxFlow.graph.getNumOfNode()][MaxFlow.graph.getNumOfNode()]; // Residual graph where rGraph[i][j] indicates residual capacity of edge from i to j (if there is an edge. If rGraph[i][j] is 0, then there is not) for (u = 0; u < MaxFlow.graph.getNumOfNode(); u++) for (v = 0; v < MaxFlow.graph.getNumOfNode(); v++) rGraph[u][v] = graph[u][v]; //store the graph capacities int parent[] = new int[MaxFlow.graph.getNumOfNode()]; // This array is filled by BFS and to store path int max_flow = 0; // There is no flow initially while (bfs(rGraph, s, t, parent)) { // Augment the flow while there is path from source to sink int path_flow = Integer.MAX_VALUE; // Find minimum residual capacity of the edges along the path filled by BFS. Or we can say find the maximum flow through the path found. for (v = t; v != s; v = parent[v]) { //when v=0 stop the loop u = parent[v]; path_flow = Math.min(path_flow, rGraph[u][v]); } for (v = t; v != s; v = parent[v]) { // update residual capacities of the edges and reverse edges along the path u = parent[v]; rGraph[u][v] -= path_flow; //min the path cap rGraph[v][u] += path_flow; //add the path cap } System.out.println("Augmenting Path "+ path_flow); max_flow += path_flow; // Add path flow to overall flow } return max_flow; // Return the overall flow }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public MaxFlow(Graph g){\n graph = g;\n graphNode = graph.G;\n s = 0;\n maxFlow = 0;\n t = graphNode[graphNode.length - 1].nodeID;\n }", "public AbstractWeightedGraph<V,E>.FlowGraph maximumFlow(V source, V sink);", "public double getMaxFlow(long source, long sink){\n double flow = 0.0;\n double accumulator = 0.0;\n double min = Double.MAX_VALUE;\n this.uuid = UUID.randomUUID(); // Process uniqueness...\n String flowUUID = \"flw-\" + this.uuid.toString();\n Transaction tx = database.beginTx();\n try {\n this.nSink = database.getNodeById(sink);\n this.nSource = database.getNodeById(source);\n //Assing an unique temp property to relationships...\n this.assingTempProperty(this.uuid);\n //Search for the maximum flow between a source and sink...\n for(org.neo4j.graphdb.Path p : this.database.traversalDescription()\n .depthFirst()\n .evaluator(Evaluators.endNodeIs(Evaluation.INCLUDE_AND_CONTINUE,\n Evaluation.EXCLUDE_AND_CONTINUE,\n this.nSink))\n .relationships(Rels.HAS_TERM)\n /** The next line is what makes the proccess expensive,\n * because it searches for \"Unique Augmenting Paths\".\n * :::Theory:::\n * If you have a sparsely connected graph, and apply\n * relationship-uniqueness, you have to explore very very long\n * paths to really find all the unique relationships in your\n * graph, so you have to meander back and forth until you find\n * the last globally unique relationship.\n * Thanks @Michael Hunger (Neo4j Team).\n *\n * The solution is to write a custom Uniqueness overriding\n * the method.\n * For a future version and more info,\n * please check: http://goo.gl/f8EP4U\n */\n .uniqueness(Uniqueness.NODE_PATH)\n .evaluator(Evaluators.toDepth(5))\n .traverse(this.nSource)) {\n //Getting the min value from each path...\n for (Relationship r : p.relationships()) {\n if (r.hasProperty(flowUUID) && (Double)r.getProperty(flowUUID) < min)\n flow = (Double)r.getProperty(flowUUID) * 1.0;\n }\n accumulator = accumulator + flow;\n // Setting up the flow values for the next round...\n for (Relationship r: p.relationships()){\n if (r.hasProperty(flowUUID))\n r.setProperty(flowUUID,(Double)r.getProperty(flowUUID)-flow);\n }\n // Save the flow in the node...\n for(Node n : p.nodes()){\n if((n!= p.startNode()) && (n!=p.endNode())){\n if(n.hasProperty(\"flow\")) {\n n.setProperty(\"flow\",(Double)n.getProperty(\"flow\")+ Math.round(Math.abs(flow)*100.0)/100.0);\n } else {\n n.setProperty(\"flow\", Math.round(Math.abs(flow)*100.0)/100.0);\n }\n }\n }\n }\n //Remove the temp property...\n this.removeTempProperty(this.uuid);\n //Save the maxflow between these nodes.\n nSource.createRelationshipTo(nSink,Rels.MAX_FLOW)\n .setProperty(\"maxflow\", accumulator);\n tx.success();\n } catch (Exception e) {\n System.err.println(\"hintplugin.utils.MaximumFlow.getMaxFlow: \" + e);\n tx.failure();\n } finally {\n tx.close();\n }\n return Math.round(Math.abs(accumulator)*100.0)/100.0;\n }", "public void flowAlgorithm(){\n while(!augmentedPath()){\n ArrayList<Integer> flowList = new ArrayList<>();//this is here just so we can print out the path\n int minFlow = 10000;\n int currentID = t;\n GraphNode node = graphNode[currentID];\n //very simply this part will start at the last node and go back through the path that was selected and fin the minimum flow\n flowList.add(t);\n while(node != graphNode[s]){\n int parent = node.parent;\n flowList.add(parent);\n if(graph.flow[parent][currentID][1] < minFlow){\n minFlow = graph.flow[parent][currentID][1];\n }\n node = graphNode[parent];\n currentID = parent;\n }\n currentID = t;//should this be here\n displayMaxFlow(flowList, minFlow);\n node = graphNode[t];\n //this will go back through the same list as the one up above and change their current value\n while(node != graphNode[s]){\n int parent = node.parent;\n graph.flow[parent][currentID][1] = graph.flow[parent][currentID][1] - minFlow;\n node = graphNode[parent];\n currentID = parent;\n }\n }\n }", "private boolean isFeasible(FlowNetwork G, int s, int t) {\n\t double EPSILON = 1E-11;\n\n\t // check that capacity constraints are satisfied\n\t for (int v = 0; v < G.V(); v++) {\n\t for (FlowEdge e : G.adj(v)) {\n\t if (e.flow() < -EPSILON || e.flow() > e.capacity() + EPSILON) {\n\t System.err.println(\"Edge does not satisfy capacity constraints: \" + e);\n\t return false;\n\t }\n\t }\n\t }\n\n\t // check that net flow into a vertex equals zero, except at source and sink\n\t if (Math.abs(value + excess(G, s)) > EPSILON) {\n\t System.err.println(\"Excess at source = \" + excess(G, s));\n\t System.err.println(\"Max flow = \" + value);\n\t return false;\n\t }\n\t if (Math.abs(value - excess(G, t)) > EPSILON) {\n\t System.err.println(\"Excess at sink = \" + excess(G, t));\n\t System.err.println(\"Max flow = \" + value);\n\t return false;\n\t }\n\t for (int v = 0; v < G.V(); v++) {\n\t if (v == s || v == t) continue;\n\t else if (Math.abs(excess(G, v)) > EPSILON) {\n\t System.err.println(\"Net flow out of \" + v + \" doesn't equal zero\");\n\t return false;\n\t }\n\t }\n\t return true;\n\t }", "public final int findMaxFlow(final String[] sources, final String[] destinations) {\r\n\t\t//TODO Add you code here\r\n if(Arrays.equals(sources, destinations)){\r\n return SOURCES_SAME_AS_DESTINATIONS;\r\n } else{\r\n Node startNode;\r\n String sourceName = sources[0];\r\n String sinkName = destinations[0];\r\n\r\n //check if sources/sinks exists and if multiple sources/sinks, create \"superSource/-Sink\"\r\n boolean sourceNotFound = false;\r\n if (sources.length > 1){\r\n sourceNotFound = addSuperNode(\"superSource\", sources);\r\n sourceName = \"superSource\";\r\n }else\r\n sourceNotFound = findNode(sourceName) == null;\r\n boolean destinationNotFound = false;\r\n if (destinations.length > 1){\r\n destinationNotFound = addSuperNode(\"superSink\", destinations);\r\n sinkName = \"superSink\";\r\n }else\r\n destinationNotFound = findNode(sinkName) == null;\r\n\r\n if(sourceNotFound && destinationNotFound)\r\n return NO_SOURCE_DESTINATION_FOUND;\r\n else if (sourceNotFound)\r\n return NO_SOURCE_FOUND;\r\n else if (destinationNotFound)\r\n return NO_DESTINATION_FOUND;\r\n\r\n //set flow to 0\r\n setZero();\r\n ArrayList<Node> path = new ArrayList<>();\r\n startNode = findNode(sourceName);\r\n //find first path, if no path found return NO_PATH\r\n Node pathNode = pathfinder.findPathFlow(sourceName, sinkName, nodes);\r\n if (pathNode.getName().equals(\"null\") && pathNode.getDelay() == -4)\r\n return NO_PATH;\r\n //main loop;\r\n while (pathNode.getName() != \"null\") {\r\n double flow = Double.POSITIVE_INFINITY;\r\n path.clear();\r\n //find minimum residual capacity in path as new flow\r\n while (pathNode != null) {\r\n path.add(pathNode);\r\n if (pathNode != startNode && pathNode.getEdgeToPrevious().getResidualFlow() < flow)\r\n flow = pathNode.getEdgeToPrevious().getResidualFlow();\r\n pathNode = pathNode.getPreviousInPath();\r\n }\r\n //add min(new flow. residual capacity) to old flow, and subtract same from residual capacity\r\n for (int i = 0; i < path.size(); i++) {\r\n if (path.get(i) != startNode) {\r\n path.get(i).getEdgeToPrevious().setFlow(path.get(i).getEdgeToPrevious().getFlow() + Math.min(flow, path.get(i).getEdgeToPrevious().getResidualFlow()));\r\n path.get(i).getEdgeToPrevious().setResidualFlow(path.get(i).getEdgeToPrevious().getResidualFlow() - Math.min(flow, path.get(i).getEdgeToPrevious().getResidualFlow()));\r\n }\r\n }\r\n //find next path\r\n pathNode = pathfinder.findPathFlow(sourceName, sinkName, nodes);\r\n }\r\n //after algorithm is done maximum flow is the summation of all the outgoing flows of all the sources/destinations\r\n return startNode.getOutgoingFlow();\r\n }\r\n\t}", "private boolean isFeasible(FlowNetwork G, int s, int t) {\r\n\r\n // check that capacity constraints are satisfied\r\n for (int v = 0; v < G.V(); v++) {\r\n for (FlowEdge e : G.adj(v)) {\r\n if (e.flow() < -FLOATING_POINT_EPSILON\r\n || e.flow() > e.capacity() + FLOATING_POINT_EPSILON) {\r\n System.err\r\n .println(\"Edge does not satisfy capacity constraints: \" + e);\r\n return false;\r\n }\r\n }\r\n }\r\n\r\n // check that net flow into a vertex equals zero, except at source and\r\n // sink\r\n if (Math.abs(value + excess(G, s)) > FLOATING_POINT_EPSILON) {\r\n System.err.println(\"Excess at source = \" + excess(G, s));\r\n System.err.println(\"Max flow = \" + value);\r\n return false;\r\n }\r\n if (Math.abs(value - excess(G, t)) > FLOATING_POINT_EPSILON) {\r\n System.err.println(\"Excess at sink = \" + excess(G, t));\r\n System.err.println(\"Max flow = \" + value);\r\n return false;\r\n }\r\n for (int v = 0; v < G.V(); v++) {\r\n if (v == s || v == t)\r\n continue;\r\n else if (Math.abs(excess(G, v)) > FLOATING_POINT_EPSILON) {\r\n System.err.println(\"Net flow out of \" + v + \" doesn't equal zero\");\r\n return false;\r\n }\r\n }\r\n return true;\r\n }", "public int flow(Edge e) {\n\t\tif(mcg!=null)\n\t\t{\n\t\t\treturn mcg.flow(e);\n\t\t}\n\t\treturn 0;\n\t}", "@RequestMapping(value = \"/max_weight_dag\", method = RequestMethod.GET)\r\n @ResponseBody\r\n public DirectedGraph getMaxWeightDAG() {\n UndirectedGraph graph = new UndirectedGraph(5);\r\n graph.addEdge(0, 1, 10.0);\r\n graph.addEdge(1, 2, 11.0);\r\n graph.addEdge(2, 3, 13.0);\r\n graph.addEdge(3, 4, 14.0);\r\n graph.addEdge(4, 0, 15.0);\r\n return graph;\r\n }", "Cycle getOptimalCycle(Graph<L, T> graph);", "public MaxFlow(final String filename) {\r\n\t\tthis.nodes = new ArrayList<>();\r\n\t\tArrayList<String> nodeNames = new ArrayList<>();\r\n Pattern pattern = Pattern.compile(\"[^->\\\"\\\\[\\\\s]+\");\r\n Matcher matcher;\r\n\r\n\t\ttry{\r\n\t\t\tFileReader fr = new FileReader(filename);\r\n\t\t\tBufferedReader br = new BufferedReader(fr);\r\n\r\n\t\t\tString currentLine = br.readLine();\r\n\t\t\tboolean finished = false;\r\n\t\t\t//create nodes and edges\r\n\r\n\t\t\twhile(!finished) {\r\n if(currentLine.matches(\".* -> .*\")) {\r\n matcher = pattern.matcher(currentLine);\r\n matcher.find();\r\n String start = matcher.group();\r\n matcher.find();\r\n String end = matcher.group();\r\n int maxFlow = Integer.parseInt(currentLine.substring(currentLine.indexOf(\"\\\"\") + 1, currentLine.indexOf(\"]\") - 1));\r\n\r\n if (!nodeNames.contains(start) && !nodeNames.contains(end)) {\r\n Node startNode = new Node(start, 0);\r\n Node endNode = new Node(end, 0);\r\n Edge connection = new Edge(startNode, endNode, maxFlow, 0);\r\n\r\n startNode.addEdge(connection);\r\n nodeNames.add(start);\r\n nodes.add(startNode);\r\n nodeNames.add(end);\r\n nodes.add(endNode);\r\n } else if (!nodeNames.contains(start) && nodeNames.contains(end)) {\r\n Node startNode = new Node(start, 0);\r\n Node endNode = findNode(end);\r\n Edge connection = new Edge(startNode, endNode, maxFlow, 0);\r\n\r\n startNode.addEdge(connection);\r\n nodeNames.add(start);\r\n nodes.add(startNode);\r\n } else if (nodeNames.contains(start) && !nodeNames.contains(end)) {\r\n Node startNode = findNode(start);\r\n Node endNode = new Node(end, 0);\r\n Edge connection = new Edge(startNode, endNode, maxFlow, 0);\r\n\r\n startNode.addEdge(connection);\r\n nodeNames.add(end);\r\n nodes.add(endNode);\r\n } else {\r\n Node startNode = findNode(start);\r\n Node endNode = findNode(end);\r\n Edge connection = new Edge(startNode, endNode, maxFlow, 0);\r\n startNode.addEdge(connection);\r\n }\r\n }\r\n currentLine = br.readLine();\r\n if (currentLine == null)\r\n finished = true;\r\n\r\n }\r\n this.pathfinder = new Navigation(nodes);\r\n\r\n\t\t} catch (IOException e){e.printStackTrace();}\r\n\t}", "private BinaryNode<AnyType> findMax(BinaryNode<AnyType> t) {\r\n\t\tif (t != null)\r\n\t\t\twhile (t.right != null)\r\n\t\t\t\tt = t.right;\r\n\r\n\t\treturn t;\r\n\t}", "@Override\n\tpublic double calcMinCostFlow(Graph graph) {\n\t\treturn 0;\n\t}", "private BinaryNode<AnyType> findMax(BinaryNode<AnyType> t) {\n\t\tif (t != null)\n\t\t\twhile (t.right != null)\n\t\t\t\tt = t.right;\n\n\t\treturn t;\n\t}", "private void run() {\n final int[][] graph = new int[][] {\n {0, 16, 13, 0, 0, 0},\n {0, 0, 10, 12, 0, 0},\n {0, 4, 0, 0, 14, 0},\n {0, 0, 9, 0, 0, 20},\n {0, 0, 0, 7, 0, 4},\n {0, 0, 0, 0, 0, 0}\n };\n\n System.out.println(String.format(\"The maximum possible flow is %d\", fordFulkerson(graph, 0, 5)));\n }", "private BinaryNode<AnyType> findMax( BinaryNode<AnyType> t )\r\n\t{\r\n\t\tif( t != null )\r\n\t\t\twhile( t.right != null )\r\n\t\t\t\tt = t.right;\r\n\r\n\t\treturn t;\r\n\t}", "public FordFulkerson(FlowNetwork G, int s, int t) {\r\n V = G.V();\r\n if (s == t)\r\n throw new IllegalArgumentException(\"Source equals sink\");\r\n // if (!isFeasible(G, s, t)) throw new\r\n // IllegalArgumentException(\"Initial flow is\r\n // infeasible\");\r\n\r\n // while there exists an augmenting path, use it\r\n value = excess(G, t);\r\n while (hasAugmentingPath(G, s, t)) {\r\n\r\n // compute bottleneck capacity\r\n double bottle = Double.POSITIVE_INFINITY;\r\n for (int v = t; v != s; v = edgeTo[v].other(v)) {\r\n bottle = Math.min(bottle, edgeTo[v].residualCapacityTo(v));\r\n }\r\n\r\n // augment flow\r\n for (int v = t; v != s; v = edgeTo[v].other(v)) {\r\n edgeTo[v].addResidualFlowTo(v, bottle);\r\n }\r\n\r\n value += bottle;\r\n }\r\n\r\n // check optimality conditions\r\n // assert check(G, s, t);\r\n }", "public static void main(String[] args) {\n\t\t\r\n\t\tint n = 4;\r\n\t\t\r\n\t\tint graph[][] = {\r\n\t\t\t\t\t\t{0, 10, 15, 20},\r\n\t\t\t\t\t\t{10, 0, 35, 25},\r\n\t\t\t\t\t\t{15, 35, 0, 30},\r\n\t\t\t\t\t\t{20, 25, 30, 0}};\r\n\t\t\r\n\t\tboolean visited[] = new boolean[n];\r\n\t\t\r\n\t\tvisited[0] = true;\r\n\t\tint result = Integer.MAX_VALUE;\r\n\t\t\r\n\t\tresult = tsp(graph, visited, 0, n, 1, 0, result);\r\n\t\t\r\n\t\tSystem.out.println(result);\t\t\r\n\r\n\t}", "public static <T> T findMax(Node<T> t) {\n if (t == null)\n return null;\n else if (t.right == null)//right-most node found\n return t.data;\n else\n return findMax(t.right);//recursive call to traverse as far right\n }", "public SplayNode maximum(SplayNode x) {\n\t\t while(x.right != null)\n\t\t x = x.right;\n\t\t return x;\n\t\t }", "public double getTargetNodeFlow(){\n return this.targetNodeFlow;\n }", "int[] clo(int s,int t)\r\n\t{\r\n\t\tint [] st=new int[2];\r\n\t\t//Please fill in the program here\r\n\t\t\r\n\t\tst[0] = incCapacity();\r\n\t\taddEdge(st[0], epssymbol, s);\r\n \r\n\t\tst[1] = incCapacity();\r\n\t\taddEdge(t, epssymbol, st[1]);\r\n addEdge(t, epssymbol, s);\r\n\t\taddEdge(st[0], epssymbol, st[1]);\r\n\t\t\r\n\t\treturn st;\r\n\t}", "public static <V> Graph<V> getMinimumSpanningTreeKruskal(Graph<V> graph) {\n class Arista {\n private V origen;\n private V destino;\n private double peso;\n\n private Arista(V pOrigen, double pPeso, V pDestino) {\n origen = pOrigen;\n peso = pPeso;\n destino = pDestino;\n }\n }\n\n V[] array = graph.getValuesAsArray();\n double[][] matrizPesos = graph.getGraphStructureAsMatrix();\n double[][] matrizCopia = new double[array.length][array.length];\n for (int x = 0; x < array.length; x++) {\n for (int y = 0; y < array.length; y++) {\n matrizCopia[x][y] = matrizPesos[x][y];\n }\n }\n\n List<Arista> aristas = new LinkedList<>();\n\n // Se buscan todas las aristas del grafo y se enlistan\n for (int x = 0; x < array.length; x++) {\n for (int y = 0; y < array.length; y++) {\n if (matrizCopia[x][y] != -1) {\n if (!graph.isDirected()) {\n matrizCopia[y][x] = -1;\n }\n Arista ar = new Arista(array[x], matrizCopia[x][y], array[y]);\n aristas.add(ar);\n }\n }\n }\n\n //Se ordenan las listas de menor a mayor, aplicando el ordenamiento de burbuja.\n if (aristas.size() > 1) {\n int i = 0;\n for (int x = 2; x < aristas.size(); x++) {\n for (int y = 1; y < aristas.size() - i; y++) {\n Arista temp = aristas.get(y);\n Arista temp2 = aristas.get(y+1);\n if (temp.peso > temp2.peso) {\n aristas.set(y, temp2);\n aristas.set(y+1, temp);\n }\n }\n i++;\n }\n }\n\n List<Graph<V>> bosque = new LinkedList<>();\n for (int x = 0; x < array.length; x++) {\n Graph<V> temp = new AdjacencyMatrix<>();\n temp.addNode(array[x]);\n bosque.add(temp);\n }\n\n Iterator<Arista> it1 = aristas.iterator();\n while (it1.hasNext()) {\n Arista aux = it1.next();\n int arbolOrigen = buscarArbol(aux.origen, bosque);\n int arbolDestino = buscarArbol(aux.destino, bosque);\n if (arbolDestino < arbolOrigen) {\n int temp = arbolDestino;\n arbolDestino = arbolOrigen;\n arbolOrigen = temp;\n }\n\n if (arbolDestino != arbolOrigen) { // Significa que estan en diferentes arboles.\n Graph<V> grafoDestino = bosque.remove(arbolDestino);\n Graph<V> grafoTemp = unirGrafos(bosque.get(arbolOrigen), grafoDestino);\n grafoTemp.addEdge(aux.origen, aux.destino, aux.peso);\n bosque.set(arbolOrigen, grafoTemp);\n }\n }\n if (bosque.size() != 1) { // Significa que hay vertices aislados.\n for (int x = 2; x <= bosque.size(); x++) {\n Graph<V> grafoTemp = bosque.remove(x);\n Graph<V> grafosUnidos = unirGrafos(bosque.get(1), grafoTemp);\n bosque.set(1, grafosUnidos);\n }\n }\n\n return bosque.get(1);\n }", "public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n int N = scanner.nextInt(), M = scanner.nextInt();\n int[][] graph = new int[N + 1][N + 1];\n\n for (int i = 0; i < M; i++) {\n int from = scanner.nextInt(), to = scanner.nextInt();\n int weight = scanner.nextInt();\n graph[from][to] = weight;\n }\n \n int[][][] dp = new int[N + 1][N + 1][N + 1];\n\n for (int i = 1; i <= N; i++) {\n for (int j = 1; j <= N; j++) {\n if (graph[i][j] != 0) {\n dp[0][i][j] = graph[i][j];\n } else {\n dp[0][i][j] = Integer.MAX_VALUE;\n }\n }\n }\n \n for (int k = 0; k <= N; k++) {\n for (int i = 1; i <= N; i++) {\n dp[k][i][i] = 0;\n }\n }\n\n for (int k = 1; k <= N; k++) {\n for (int i = 1; i <= N; i++) {\n for (int j = 1; j <= N; j++) {\n if (dp[k - 1][i][k] != Integer.MAX_VALUE && dp[k - 1][k][j] != Integer.MAX_VALUE) {\n dp[k][i][j] = Math.min(dp[k - 1][i][j], dp[k -1][i][k] + dp[k -1][k][j]);\n } else {\n dp[k][i][j] = dp[k - 1][i][j];\n }\n }\n }\n }\n\n int Q = scanner.nextInt();\n StringBuilder sb = new StringBuilder();\n for (int i = 0; i < Q; i++) {\n int from = scanner.nextInt(), to = scanner.nextInt();\n int res = dp[N][from][to] == Integer.MAX_VALUE ? -1 : dp[N][from][to];\n sb.append(res).append('\\n');\n }\n System.out.println(sb.toString());\n }", "public int findMaxDegree() {\n\t\tint gradoMax = 0;\n\t\t\n\t\tfor(String s : grafo.vertexSet()) {\n\t\t\tint grado = grafo.degreeOf(s);\n\t\t\t\n\t\t\tif(grado > gradoMax) {\n\t\t\t\tgradoMax = grado;\n\t\t\t\tverticeGradoMax = s;\n\t\t\t}\n\t\t\t\t\n\t\t}\n\t\treturn gradoMax;\n\t}", "public static int largestIslandChain(Scanner sc) {\n int islands=sc.nextInt();\r\n boolean graph[][] = new boolean[islands][islands];\r\n\r\n //System.out.print(\"How many ziplines? \");\r\n int ziplines=sc.nextInt();\r\n\r\n for (int edge=0; edge<ziplines; edge++) {\r\n int from=sc.nextInt();\r\n int to=sc.nextInt();\r\n graph[from][to]=true;\r\n }\r\n\r\n\r\n /* Find the SCCs... */\r\n\r\n //Utility Data Structures\r\n Stack<Integer> stack = new Stack<Integer>(); \r\n\r\n\r\n //First DFS\r\n boolean[] visited01 = new boolean[islands];\r\n int exitTimeTicker=0;\r\n int[] exitTimes = new int[islands];\r\n int[] exitPoints = new int[islands];\r\n for (int island=0; island<islands; island++) {\r\n int source;\r\n if (!visited01[island])\r\n {\r\n visited01[island]=true;\r\n stack.push(island);\r\n source=island;\r\n\r\n int destination=0;\r\n while (!stack.isEmpty())\r\n {\r\n source=stack.peek();\r\n destination=0;\r\n while (destination<islands)\r\n {\r\n if (graph[source][destination] && !visited01[destination])\r\n {\r\n stack.push(destination);\r\n visited01[destination]=true;\r\n source=destination;\r\n destination=0;\r\n }\r\n else {\r\n destination++;\r\n }\r\n }\r\n exitTimes[stack.peek()]=exitTimeTicker;\r\n exitPoints[exitTimeTicker]=stack.peek();\r\n stack.pop();\r\n exitTimeTicker++;\r\n }\r\n }\r\n }\r\n\r\n\r\n boolean graphTransposeUsingExits[][] = new boolean[islands][islands];\r\n for (int i=0; i<islands; i++)\r\n {\r\n for (int j=0; j<islands; j++)\r\n {\r\n if (graph[i][j])\r\n graphTransposeUsingExits[exitTimes[j]][exitTimes[i]]=true;\r\n }\r\n }\r\n\r\n\r\n //Second DFS\r\n boolean[] visited02 = new boolean[islands];\r\n int[] numberOfSCC = new int[islands];\r\n int currSCCnum=0;\r\n for (int exitTime=islands-1; exitTime>=0; exitTime--)\r\n {\r\n if (!visited02[exitTime])\r\n {\r\n //entryPointToScc=exitTime;\r\n visited02[exitTime]=true;\r\n numberOfSCC[exitPoints[exitTime]]=++currSCCnum;\r\n stack.push(exitTime);\r\n int source=exitTime;\r\n while (!stack.isEmpty())\r\n {\r\n source=stack.peek();\r\n int destination=0;\r\n while (destination<islands)\r\n {\r\n if (graphTransposeUsingExits[source][destination] && !visited02[destination])\r\n {\r\n if (numberOfSCC[exitPoints[destination]]==0) {\r\n numberOfSCC[exitPoints[destination]]=currSCCnum;\r\n }\r\n stack.push(destination);\r\n visited02[destination]=true;\r\n source=destination;\r\n destination=0;\r\n }\r\n else {\r\n destination++;\r\n } \r\n }\r\n stack.pop();\r\n } \r\n }\r\n }\r\n\r\n\r\n int[] sizeOfSCCs = new int[currSCCnum];\r\n for (int i=0; i<islands; i++) {\r\n sizeOfSCCs[numberOfSCC[i]-1]++;\r\n }\r\n \r\n int sccsMax = Integer.MIN_VALUE;\r\n for(int i=0; i<sizeOfSCCs.length; ++i) {\r\n \tif(sizeOfSCCs[i] > sccsMax) {\r\n \t\tsccsMax = sizeOfSCCs[i];\r\n \t}\r\n }\r\n return sccsMax;\r\n \r\n // Java 8\r\n //return Arrays.stream(sizeOfSCCs).summaryStatistics().getMax();\r\n }", "private static WeightedUndirectedGraph getLargestCC(WeightedUndirectedGraph g) throws InterruptedException {\n int[] all = new int[g.size];\n for (int i = 0; i < g.size; i++) {\n all[i] = i;\n }\n System.out.println(\"CC\");\n Set<Set<Integer>> comps = ConnectedComponents.rootedConnectedComponents(g, all, runner);\n\n Set<Integer> max_set = getMaxSet(comps);\n int[] subnodes = new int[max_set.size()];\n Iterator<Integer> iterator = max_set.iterator();\n for (int j = 0; j < subnodes.length; j++) {\n subnodes[j] = iterator.next();\n }\n\n WeightedUndirectedGraph s = SubGraph.extract(g, subnodes, runner);\n return s;\n }", "public FordFulkerson(FlowNetwork G, int s, int t) {\n\t validate(s, G.V());\n\t validate(t, G.V());\n\t if (s == t) throw new IllegalArgumentException(\"Source equals sink\");\n\t if (!isFeasible(G, s, t)) throw new IllegalArgumentException(\"Initial flow is infeasible\");\n\n\t // while there exists an augmenting path, use it\n\t value = excess(G, t);\n\t while (hasAugmentingPath(G, s, t)) {\n\n\t // compute bottleneck capacity\n\t double bottle = Double.POSITIVE_INFINITY;\n\t for (int v = t; v != s; v = edgeTo[v].other(v)) {\n\t bottle = Math.min(bottle, edgeTo[v].residualCapacityTo(v));\n\t }\n\n\t // augment flow\n\t for (int v = t; v != s; v = edgeTo[v].other(v)) {\n\t edgeTo[v].addResidualFlowTo(v, bottle); \n\t }\n\n\t value += bottle;\n\t }\n\n\t // check optimality conditions\n\t assert check(G, s, t);\n\t }", "static ToDoubleBiFunction<Integer, Integer> findFeasibleBoundedFlow(\n final Integer source, final Integer sink, Collection<Integer> nodes,\n ToDoubleBiFunction<Integer, Integer> minEdgeFlow,\n ToDoubleBiFunction<Integer, Integer> maxEdgeFlow) {\n\t \n\t Map<Integer, Double> map = new HashMap<Integer, Double>();\n\t for (Integer val : nodes) {\n\t\t map.put(val, -GraphUtils.imbalanceAt(val, nodes, minEdgeFlow));\n\t }\n\t ToDoubleBiFunction<Integer, Integer> max = (a, b) -> {\n\t\t if (b.equals(source) && a.equals(sink)) {\n\t\t\t return Double.POSITIVE_INFINITY;\n\t\t } else {\n\t\t\t return maxEdgeFlow.applyAsDouble(a, b) - minEdgeFlow.applyAsDouble(a, b);\n\t\t }\n\t };\n\t ToDoubleBiFunction<Integer, Integer> feasibleFlow = findFeasibleDemandFlow(nodes, max,\n\t\t\t \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t(a) -> map.get(a));\n\t return (a, b) -> feasibleFlow.applyAsDouble(a, b) + minEdgeFlow.applyAsDouble(a, b);\n }", "public static void botched_dfs3(Graph g, int s) {\n int cpt = 0;\n\n Stack<Integer> stack = new Stack<Integer>();\n boolean visited[] = new boolean[g.vertices()];\n stack.push(s);\n while (!stack.empty()) {\n System.out.println(\"Capacité : \" + stack.capacity());\n int u = stack.pop();\n if (!visited[u]) {\n visited[u] = true;\n System.out.println(u);\n for (Edge e : g.next(u))\n if (!visited[e.to]) {\n stack.push(e.to);\n cpt++;\n }\n }\n }\n }", "public String getTemperatureMax(String s) {\n return ((temperatureMax != FLOATNULL) ? new Float(temperatureMax).toString() : \"\");\n }", "public double getEdgeFlow() {\n\t\treturn this.flow;\r\n\t}", "public static int findSmallestCycleEdge(int[][] graph){\r\n int smallest = Integer.MAX_VALUE;\r\n for(int i = 0 ; i < graph.length;i++){\r\n for(int j = 0; j < graph[i].length;j++){\r\n if (graph[i][j] < smallest){\r\n smallest = graph[i][j];\r\n }\r\n }\r\n }\r\n return smallest;\r\n }", "private YDimension computeMaxNodeSize (Graph2D graph)\n {\n double maxWidth = 0;\n double maxHeight = 0;\n for (Node node : graph.getNodeArray ())\n {\n NodeRealizer realizer = graph.getRealizer (node);\n double width = realizer.getLabel ().getWidth ();\n double height = realizer.getLabel ().getHeight ();\n maxWidth = Math.max (maxWidth, width);\n maxHeight = Math.max (maxHeight, height);\n }\n GraphManager graphManager = GraphManager.getGraphManager ();\n return graphManager.createYDimension (maxWidth, maxHeight);\n }", "F[] getFlows(T node);", "public static void main(String[] args) {\n\n final Graph<UniformFanInShape, NotUsed> max3StaticGraph = GraphDSL.create(builder -> {\n // step 2 - define aux SHAPES\n final FanInShape2<Integer, Integer, Integer> max1 = builder.add(ZipWith.create(Math::max));\n final FanInShape2<Integer, Integer, Integer> max2 = builder.add(ZipWith.create(Math::max));\n // step 3\n builder.from(max1.out()).toInlet(max2.in0());\n\n final Inlet<Integer>[] inlets = asList(max1.in0(), max1.in1(), max2.in1()).toArray(new Inlet[3]);\n\n return new UniformFanInShape(max2.out(), inlets);\n });\n\n final Source<Integer, NotUsed> source1 = Source.range(1, 10);\n final Source<Integer, NotUsed> source2 = Source.range(1, 10).map(x -> 5);\n final Source<Integer, NotUsed> source3 = Source.range(10, 1, -1);\n\n final Sink<Integer, CompletionStage<Done>> sink = Sink.foreach(x -> printf(\"Max is: %s\\n\", x));\n\n // step 1\n final RunnableGraph<CompletionStage<Done>> max3RunnableGraph = RunnableGraph.fromGraph(\n GraphDSL.create(sink,\n (builder, out) -> {\n // step 2: declaring components\n final UniformFanInShape max3Shape = builder.add(max3StaticGraph);\n // step 3: tying them together\n builder.from(builder.add(source1)).viaFanIn(max3Shape);\n builder.from(builder.add(source2)).viaFanIn(max3Shape);\n builder.from(builder.add(source3)).viaFanIn(max3Shape);\n\n builder.from(max3Shape).to(out);\n // step 4\n return ClosedShape.getInstance();\n }\n )\n );\n\n //max3RunnableGraph.run(mat).whenComplete((d, t) -> system.terminate());\n\n /*\n Non-uniform fan out shape\n Processing bank transactions\n Txn suspicious if amount > 10000\n\n Streams component for txns\n - output1: let the transaction go through\n - output2: suspicious txn ids\n */\n @AllArgsConstructor\n @Getter\n @ToString\n class Transaction{ String id; String source; String recipient; Integer amount; Date date; }\n\n Source<Transaction, NotUsed> transactionSource = Source.from(List(\n new Transaction(\"5273890572\", \"Paul\", \"Jim\", 100, new Date()),\n new Transaction(\"3578902532\", \"Daniel\", \"Jim\", 100000, new Date()),\n new Transaction(\"5489036033\", \"Jim\", \"Alice\", 7000, new Date())\n ));\n\n final Sink<Transaction, CompletionStage<Done>> bankProcessor = Sink.foreach(API::println);\n final Sink<String, CompletionStage<Done>> suspiciousAnalysisService = Sink.foreach(txnId -> printf(\"Suspicious transaction ID: %s\\n\",txnId));\n\n // step 1\n final Graph<FanOutShape2, NotUsed> suspiciousTxnStaticGraph = GraphDSL.create(builder -> {\n // step 2 - define SHAPES\n final UniformFanOutShape<Transaction, Transaction> broadcast = builder.add(Broadcast.create(2));\n final FlowShape<Transaction, Transaction> suspiciousTxnFilter = builder.add(Flow.<Transaction>create().filter(txn -> txn.amount > 10000));\n final FlowShape<Transaction, String> txnIdExtractor = builder.add(Flow.fromFunction(txn -> txn.id));\n // step 3 - tie SHAPES\n builder.from(broadcast.out(0)).via(suspiciousTxnFilter).via(txnIdExtractor);\n\n return new FanOutShape2(broadcast.in(), broadcast.out(1), txnIdExtractor.out());\n });\n\n // step 1\n final RunnableGraph<NotUsed> suspiciousTxnRunnableGraph = RunnableGraph.fromGraph(\n GraphDSL.create(transactionSource,\n (builder, sourceShape) -> {\n // step 2: declaring components\n final FanOutShape2 suspiciousTxnShape = builder.add(suspiciousTxnStaticGraph);\n // step 3: tying them together\n builder.from(sourceShape).toInlet(suspiciousTxnShape.in());\n builder.from(suspiciousTxnShape.out0()).to(builder.add(bankProcessor));\n builder.from(suspiciousTxnShape.out1()).to(builder.add(suspiciousAnalysisService));\n // step 4\n return ClosedShape.getInstance();\n }\n )\n );\n\n suspiciousTxnRunnableGraph.run(mat);\n }", "public int[] findMinimunPathBF(int src, int[][] graph) {\r\n\t\t// The distance from the src to each vertices.\r\n\t\tint[] dist = new int[graph.length];\r\n\t\t// Maximizing the distance of the sre to all the vertices.\r\n\t\tfor (int i = 0; i < dist.length; i++) {\r\n\t\t\tdist[i] = Integer.MAX_VALUE;\r\n\t\t}\r\n\t\tdist[src] = 0;\r\n\r\n\t\t// Loop |v|-1 times, For each edge in the graph.\r\n\t\tfor (int k = 0; k < graph.length - 1; k++) {\r\n\t\t\t// For each edge in the graph. \r\n\t\t\tfor (int i = 0; i < graph.length; i++) {\r\n\t\t\t\tfor (int j = 0; j < graph.length; j++) {\r\n\t\t\t\t\t// Relax edge(i, j).\r\n\t\t\t\t\tif (graph[i][j] != 0) {\r\n\t\t\t\t\t\tif (dist[i] != Integer.MAX_VALUE\r\n\t\t\t\t\t\t\t\t&& dist[j] > dist[i] + graph[i][j]) {\r\n\t\t\t\t\t\t\tdist[j] = dist[i] + graph[i][j];\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t// Check if there is a negative cycle, loop the edges.\r\n\t\tfor (int i = 0; i < graph.length; i++) {\r\n\t\t\t// For each edge in the graph.\r\n\t\t\tfor (int j = 0; j < graph.length; j++) {\r\n\t\t\t\tif (graph[i][j] != 0) {\r\n\t\t\t\t\t// Still can relax the edges?.\r\n\t\t\t\t\tif (dist[i] != Integer.MAX_VALUE\r\n\t\t\t\t\t\t\t&& dist[j] > dist[i] + graph[i][j]) {\r\n\t\t\t\t\t\t// Put a sign of having a negative cycle.\r\n\t\t\t\t\t\tdist[0] = Integer.MIN_VALUE;\r\n\t\t\t\t\t\treturn dist;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn dist;\r\n\t}", "public int getFlowSize()\n\t{\n\t\tint result = 0;\n\t\t\n\t\tfor(Edge e : this.source.getOutgoingEdges())\n\t\t{\n\t\t\tresult += e.getFlow();\n\t\t}\n\t\t\n\t\treturn result;\n\t}", "private PathCostFlow findCheapestPath(int start, int end, double max_flow) throws Exception {\n if (getNode(start) == null || getNode(end) == null\n || !getNode(start).isSource() || getNode(end).isSource()) {\n throw new IllegalArgumentException(\"start must be the index of a source and end must be the index of a sink\");\n }\n double amount = Math.min(Math.min(getNode(start).getResidualCapacity(),\n getNode(end).getResidualCapacity()), max_flow);\n\n boolean[] visited = new boolean[n];\n int[] parent = new int[n];\n for (int i = 0; i < n; i++) {\n parent[i] = -1;\n }\n double[] cost = new double[n];\n for (int i = 0; i < n; i++) {\n cost[i] = Integer.MAX_VALUE;\n }\n cost[start] = 0;\n\n PriorityQueue<IndexCostTuple> queue = new PriorityQueue<IndexCostTuple>();\n queue.add(new IndexCostTuple(start, 0));\n\n while (!queue.isEmpty()) {\n IndexCostTuple current = queue.poll();\n\n // we found the target node\n if (current.getIndex() == end) {\n ArrayList<Integer> path = new ArrayList<Integer>();\n path.add(new Integer(end));\n while (path.get(path.size() - 1) != start) {\n path.add(parent[path.get(path.size() - 1)]);\n }\n Collections.reverse(path);\n if ((path.get(0) != start) || (path.get(path.size() - 1) != end)) {\n throw new Exception(\"I fucked up coding Dijkstra's\");\n }\n return new PathCostFlow(path, cost[end], amount);\n }\n\n // iterate through all possible neighbors of the current node\n for (int i = 0; i < n; i++) {\n SingleEdge e = matrix[current.getIndex()][i];\n if ((!visited[i]) && (e != null)\n && (current.getCost() + e.getCost(amount) < cost[i])) {\n cost[i] = current.getCost() + e.getCost(amount);\n parent[i] = current.getIndex();\n\n // update the entry for this node in the queue\n IndexCostTuple newCost = new IndexCostTuple(i, cost[i]);\n queue.remove(newCost);\n queue.add(newCost);\n }\n }\n visited[current.getIndex()] = true;\n }\n\n return null; //the target node was unreachable\n }", "public void minCut(){\n QueueMaxHeap<GraphNode> queue = new QueueMaxHeap<>();\n setNodesToUnvisited();\n queue.add(graphNode[0]);\n graphNode[0].visited = true;\n while(!queue.isEmpty()){//if queue is empty it means that we have made all the cuts that need to be cut and we cant get anywhere else\n GraphNode node = queue.get();\n int from = node.nodeID;\n for(int i = 0; i < node.succ.size(); i++){//get the successor of each node and then checks each of the edges between the node and that successor\n GraphNode.EdgeInfo info = node.succ.get(i);\n int to = info.to;\n if(graph.flow[from][to][1] == 0){//if it has no flow then it prints out that line\n System.out.printf(\"Edge (%d, %d) transports %d cases\\n\", from, to, graph.flow[from][to][0]);\n } else {//adds it to the queue if it still has flow to it and if we haven't gone there yet\n if(!graphNode[to].visited){\n graphNode[to].visited = true;\n queue.add(graphNode[to]);\n }\n }\n }\n }\n }", "public static void botched_dfs2(Graph g, int s) {\n Stack<Integer> stack = new Stack<Integer>();\n boolean visited[] = new boolean[g.vertices()];\n stack.push(s);\n System.out.println(s);\n visited[s] = true;\n while (!stack.empty()) {\n int u = stack.pop();\n for (Edge e : g.next(u))\n if (!visited[e.to]) {\n System.out.println(e.to);\n visited[e.to] = true;\n stack.push(e.to);\n }\n }\n }", "public float castAlongMax(Vector2f axis, Transform t) {\n\t\tfloat max = 0;\n\t\tfor (Vector2f p : points) {\n\t\t\tmax = Math.max(max, castAlong(axis, t, p));\n\t\t}\n\t\treturn max;\n\t}", "private int getMax(int[] times) {\n\n\t\t//Initially set max to the first value\n\t\tint max = times[0];\n\n\t\t//Loop through all times in the array\n\t\tfor (int i = 0; i < times.length; i++) {\n\n\t\t\t//Find max\n\t\t\tif (times[i]>max) {\n\n\t\t\t\t//Update max\n\t\t\t\tmax = times[i];\n\t\t\t}\n\t\t}\n\n\t\treturn max;\n\t\t//Print the max time to the console\n\n\t}", "public int getFlowCost()\n\t{\n\t\tint result = 0;\n\t\t\n\t\tfor (Node v : this.getNodes())\n\t\t for (Edge e : v.getOutgoingEdges())\n\t\t\tresult += (e.getFlow() * e.getCost());\n\t\t\n\t\treturn result;\n\t}", "private int getDistanceBetweenNodes(Node s, Node t) {\n\t\tif (s.equals(t)) return 0;\n\t\tArrayList<Node> visitedNodes = new ArrayList<Node>();\n\t\tArrayDeque<Node> nodesToVisit = new ArrayDeque<Node>();\n\t\tdistanceFromS.put(s, 0);\n\t\tnodesToVisit.add(s);\n\t\twhile (!nodesToVisit.isEmpty()) {\n\t\t\tNode currentNode = nodesToVisit.poll();\n\t\t\tvisitedNodes.add(currentNode);\n\t\t\tfor (Node n: currentNode.getNeighbors()) {\n\t\t\t\tif (!visitedNodes.contains(n) && !nodesToVisit.contains(n)) {\n\t\t\t\t\tnodesToVisit.add(n);\n\t\t\t\t\tdistanceFromS.put(n, (distanceFromS.get(currentNode) + 1));\n\t\t\t\t\tif (distanceFromS.containsKey(t)) break;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (distanceFromS.containsKey(t)) break;\n\t\t}\n\t\tif (distanceFromS.containsKey(t)) {\n\t\t\treturn distanceFromS.get(t);\n\t\t} else {\n\t\t\treturn -1;\n\t\t}\n\t}", "String targetGraph();", "@Override\r\n\tpublic double max_value(GameState s, int depthLimit) \r\n\t{\r\n\t\tdouble stateEvaluationValue = stateEvaluator(s);\r\n\r\n\t\tif (depthLimit == 0)\r\n\t\t{\r\n\t\t\treturn stateEvaluationValue;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tdouble currMax = Double.NEGATIVE_INFINITY;\r\n\t\t\tint bestMove = 0;\r\n\t\t\tArrayList <Integer> succList = generateSuccessors(s.lastMove, s.takenList);\r\n\t\t\tif (succList.isEmpty())\r\n\t\t\t{\r\n\t\t\t\ts.bestMove = -1;\r\n\t\t\t\ts.leaf = true;\r\n\t\t\t\treturn -1;\r\n\t\t\t}\r\n\t\t\tIterator <Integer> myItr = succList.iterator();\r\n\t\t\twhile (myItr.hasNext())\r\n\t\t\t{\r\n\t\t\t\tdouble tempMax = currMax;\r\n\t\t\t\tint currNumber = myItr.next();\r\n\t\t\t\tint [] newList = s.takenList;\r\n\t\t\t\tnewList [currNumber] = 1; //assign it to player 1\r\n\t\t\t\tGameState newGameState = new GameState(newList, currNumber);\r\n\t\t\t\tcurrMax = Math.max(currMax, min_value(newGameState, depthLimit - 1));\r\n\r\n\t\t\t\tif (tempMax < currMax)\r\n\t\t\t\t{\r\n\t\t\t\t\tbestMove = currNumber;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\ts.bestMove = bestMove;\t\t\t\r\n\t\t\treturn currMax;\r\n\t\t}\r\n\r\n\r\n\t}", "private ArrayList findBestShiftGraph (TimeSeries timeSeries)\n {\n ArrayList candidateShiftGraph = new ArrayList (timeSeries.size() / 2);\n ArrayList bestShiftGraph = new ArrayList ();\n\n int matchCount = 0;\n int bestMatchCount = 0;\n int shiftOffset = 0;\n int bestShiftOffset = 0;\n\n // we can stop correlation runs when we get to point where remaining portion is too small\n int lastShiftOffset = timeSeries.size() - this.minPeriodLength;\n\n // successively shift to a starting point further to the right in the time series.\n for (shiftOffset = minPeriodLength; shiftOffset < lastShiftOffset; shiftOffset++)\n {\n matchCount = 0;\n candidateShiftGraph.clear();\n\n // compare the shifted version against as much of a non-shifted version as possible\n //the number of elements to compare decreases by one each time as shifting occurs\n int lastComparisonIndex = timeSeries.size() - shiftOffset;\n for (int j = 0 ; j < lastComparisonIndex; j++)\n {\n Double staticElement = null;\n Double shiftElement = null;\n\n // get the shifted element and the static one and comparet them for equality\n try\n {\n TimeSeriesValue staticVal = timeSeries.getValueAt (j);\n TimeSeriesValue shiftVal = timeSeries.getValueAt (j + shiftOffset);\n\n staticElement = new Double (((Number)staticVal.getValue()).doubleValue());\n shiftElement = new Double (((Number)shiftVal.getValue()).doubleValue());\n }\n catch (Exception e)\n {\n candidateShiftGraph.add (null);\n }\n\n // if elements are equal add that value to the shift graph, otherwise add null\n if (elementsAreEqual (staticElement, shiftElement))\n {\n candidateShiftGraph.add (staticElement);\n matchCount++;\n }\n else\n candidateShiftGraph.add (null);\n\n } // end for (j)\n\n // determine if this shift attempt resulted in more matches that anything previously tried\n // if so make this our 'best' attempt.\n if (matchCount > bestMatchCount)\n {\n bestMatchCount = matchCount;\n bestShiftOffset = shiftOffset;\n\n bestShiftGraph.clear();\n bestShiftGraph.addAll (candidateShiftGraph);\n candidateShiftGraph.clear();\n\n df.addText (\"Found new best shift graph : \" + bestShiftGraph.toString());\n } // end if\n } // end for (shiftOffset)\n\n return bestShiftGraph;\n }", "protected void computeFactor2Var(int[] nodes) throws AlgorithmException\n {\n for(int x=0, N=nodes.length; x < N; x++)\n {\n int n = nodes[x];\n FactorNode fn = _fg.getFactorNode(n);\n\n List messages = _fg.getAdjacentMessages(n);\n for(int m=0, M=messages.size(); m < M; m++)\n {\n EdgeMessage em = (EdgeMessage) messages.get(m);\n\n em.f2v(fn.maxProduct(messages, m));\n }\n }\n }", "@Override\n\tpublic Rank getMax(Set<StrategyState<State,Memory>> strategyStates) {\n\t\tValidate.notEmpty(strategyStates);\n\t\tRankFunction<State> rankFunction = this.getRankFunction(strategyStates.iterator().next().getMemory());\n\t\treturn rankFunction.getMaximum(GRUtils.getStates(strategyStates));\n\t}", "public String getNitrateMax(String s) {\n return ((nitrateMax != FLOATNULL) ? new Float(nitrateMax).toString() : \"\");\n }", "public static Long forwardAlgorithm(ArrayList<Integer>[] graph) {\n // define injective function eta - takes O(n log(n)) time\n Set<Pair<Integer, ArrayList<Integer>>> pairs = Utils.getSortedArrays(graph);\n Map<Integer, Integer> etas = Utils.getEtasMap(pairs);\n\n // initialize arraylists\n //ArrayList<Integer>[] A = (ArrayList<Integer>[]) new ArrayList[graph.length];\n ArrayList<Integer>[] A = new ArrayList[graph.length];\n for (int i = 0; i < graph.length; i++) {\n A[i] = new ArrayList<>(0);\n //A[i].ensureCapacity(graph.length / 50);\n }\n\n int triangleCount = 0;\n // main part, in which we actually count triangles\n Iterator<Pair<Integer, ArrayList<Integer>>> iterator = pairs.iterator();\n while (iterator.hasNext()) {\n Pair<Integer, ArrayList<Integer>> pair = iterator.next();\n int v = pair.getFirst();\n for (int u : pair.getSecond()) {\n if (etas.get(u) > etas.get(v)) {\n triangleCount += Utils.arrayIntersection(A[u], A[v]);\n A[u].add(etas.get(v));\n }\n }\n }\n return new Long(triangleCount);\n }", "public double getMaxT() {\n return v[points_per_segment - 1];\n }", "@GET\n @Produces(MediaType.APPLICATION_JSON)\n @Path( \"/{source}/{sink}\" )\n public Response maximumflow(@PathParam(\"source\") long source,\n @PathParam(\"sink\") long sink) {\n JSONObject obj = new org.json.JSONObject();\n obj.put(\"source-id\",source);\n obj.put(\"sink-id\", sink);\n obj.put(\"maxflow\", this.getMaxFlow(source,sink));\n return Response.ok(obj.toString(), MediaType.APPLICATION_JSON)\n .header(\"X-Stream\", \"true\") //Enables large and huge operations in server to avoid crashing.\n .build();\n }", "public static GameState getBestMove(Vector<GameState> states){\n int index = 0;\n double max = 0;\n double v = 0;\n\n // find state with max value and save its index\n for(int i = 0; i < states.size(); i++){\n v = minMaxPruning(states.get(i), depth, Double.NEGATIVE_INFINITY, Double.POSITIVE_INFINITY);\n if(max < v){\n max = v;\n index = i;\n }\n }\n return states.get(index);\n }", "private int negaMax(int depth, String indent) {\r\n\r\n\t\tif (depth <= 0\r\n\t\t\t|| this.chessGame.getGameState() == ChessGame.GAME_STATE_END_WHITE_WON\r\n\t\t\t|| this.chessGame.getGameState() == ChessGame.GAME_STATE_END_BLACK_WON){\r\n\t\t\t\r\n\t\t\treturn evaluateState();\r\n\t\t}\r\n\t\t\r\n\t\tList<Move> moves = generateMoves(false);\r\n\t\tint currentMax = Integer.MIN_VALUE;\r\n\t\t\r\n\t\tfor(Move currentMove : moves){\r\n\t\t\t\r\n\t\t\texecuteMove(currentMove);\r\n\t\t\t//ChessConsole.printCurrentGameState(this.chessGame);\r\n\t\t\tint score = -1 * negaMax(depth - 1, indent+\" \");\r\n\t\t\t//System.out.println(indent+\"handling move: \"+currentMove+\" : \"+score);\r\n\t\t\tundoMove(currentMove);\r\n\t\t\t\r\n\t\t\tif( score > currentMax){\r\n\t\t\t\tcurrentMax = score;\r\n\t\t\t}\r\n\t\t}\r\n\t\t//System.out.println(indent+\"max: \"+currentMax);\r\n\t\treturn currentMax;\r\n\t}", "public void generateT(HashMap <Integer, Integer> saturation, HashMap <Integer, Integer> numEdges) {\r\n\t\tint nextNode = 0;\r\n\t\tint key = 0;\r\n int amountUncoloured = numNodes - colouredNodes.size();\r\n\t\tT.clear();\r\n\r\n //Starts by assuming maxSat = sat first uncoloured vertex\r\n for(int j = 0; j < amountUncoloured; j++){\r\n \t\tfor(int i = 1; i < saturation.size(); i++){\r\n \t\t\tif(!colouredNodes.contains(i)){\r\n \t\t\t\tnextNode = i;\r\n \t\t\t\tmaxSat = saturation.get(nextNode);\r\n \t\t\t\tbreak;\r\n \t\t\t}\r\n \t\t}\r\n //Starts updating maxSat for uncoloured vertices\r\n \t\tfor(int i = 2; i <= saturation.size(); i++){\r\n \t\t\tif(!colouredNodes.contains(i)){\r\n \t\t\t\tint sat = saturation.get(i);\r\n \t\t\t\tif(sat > maxSat){\r\n \t\t\t\t\tnextNode = i;\r\n \t\t\t\t\tmaxSat = sat;\r\n \t\t\t\t}\r\n \t\t\t}\r\n \t\t}\r\n }\r\n\t\t//Adds vertices with maxSat to a set T\r\n\t\tfor(int a = 2; a <= saturation.size(); a++){\r\n\t\t\tif(saturation.get(a) == maxSat){}\r\n\t\t\tnextNode = a;\r\n\t\t\tT.put(key, nextNode);\r\n\t\t\tkey++;\r\n\t\t}\r\n\t}", "public double getMaxS() {\n return u[nr_of_segments - 1];\n }", "public static <T> Node<T> removeMax(Node<T> t) {\n if (t == null)\n return null;\n else if (t.right != null) {\n t.right = removeMax(t.right);//recursive call to remove max\n return t;\n } else\n return t.left;// otherwise return left node\n }", "boolean isBipartite(int graph[][],int s){\n Queue<Integer> queue=new LinkedList<>();\n queue.add(s);\n boolean bipartite=true;\n int color[]=new int[graph.length];\n for(int i=0;i<color.length;i++){\n color[i]=Integer.MAX_VALUE/2;\n }\n color[s]=0;\n while(!queue.isEmpty() && bipartite){\n int u=queue.poll();\n for(int v:graph[u]){\n if (color[v]==Integer.MAX_VALUE/2) {\n color[v]=1-color[u];\n queue.add(v);\n }\n else if (color[v]==color[u]) {\n bipartite=false;\n break;\n }\n }\n }\n return bipartite;\n }", "public static void main(String[] args) throws java.lang.Exception {\n double []averageTime = new double[3]; //double array to get average time\n MaxFlow m = new MaxFlow();\n Stopwatch stopwatch = new Stopwatch();\n\n getDataset();\n try{\n System.out.println(\"\\n\"+\"The maximum possible flow is \" + m.fordFulkerson(graph.getAddMatrix(), 0, graph.getNumOfNode()-1));\n for(int i =1; i<=3;i++){\n System.out.println(\"Time \"+i+\" : \"+stopwatch.elapsedTime());\n averageTime[i-1]= stopwatch.elapsedTime();\n }\n\n\n double a = averageTime[0]; //calculate the average time\n double b = averageTime[1];\n double c = averageTime[2];\n double average = (a+b+c)/3;\n System.out.println(\"\\nAverage Time: \"+average);\n\n graph.printArray();\n\n }catch (NullPointerException e){\n System.out.println(\"\");\n }\n }", "int[] bfs(int[][] graph,int source){\n int len=graph.length;\n int shortest_path[]=new int[len];\n int parent[]=new int[len];\n Arrays.fill(shortest_path, Integer.MAX_VALUE/2);\n shortest_path[source]=0;\n Queue<Integer> q=new LinkedList<>();\n q.add(source);\n while (!q.isEmpty()) { \n int u=q.poll();\n for(int v:graph[u]){\n if(shortest_path[v]==Integer.MAX_VALUE/2){\n q.add(v);\n shortest_path[v]=shortest_path[u]+1;\n parent[v]=u;\n }\n }\n }\n return shortest_path;\n }", "private AvlNode<E> findMax(AvlNode<E> node){\n if(node.right == null){\n return node;\n } else {\n return findMax(node.right);\n }\n }", "private Node max(Node node){\n if(node == null)\n return null;\n else if(node.right == null)\n return node;\n\n //walk through right branch\n return max(node.right);\n }", "public int findMax(){\n return nilaiMaks(this.root);\n }", "public static GraphResult GenericAlgorithm(Graph g, int source) {\n\t\tpreliminaryDistanceSearch(g, source);\r\n//\t\tg.initialize(source);\r\n\t\tArc[] arcs = g.arcs.getArcs().toArray(new Arc[g.arcCount - 1]);\r\n\t\tshuffleArray(arcs);\r\n\t\tshuffleArray(arcs);\r\n\r\n\t\t// O(n^2*m*C), so check cost for max iterations\r\n\t\tlong maxIterations = 2*(long)g.nodeCount * (g.arcs.maxWeight - g.arcs.minWeight);\r\n\t\tlong iterCount = 0;\r\n\t\tlong arcScanCount = 0;\r\n\t\tlong dUpdatedCount = 0;\r\n\t\t/*\r\n\t\t * used for determining a starting point in a negative cycle search\r\n\t\t */\r\n\t\tint lastNodeTouched = 0;\r\n\t\tboolean cont = true; // will be changed if no arc change exists\r\n\t\tlong startTime = System.currentTimeMillis();\r\n\t\twhile (cont) {\r\n\t\t\tcont = false; // triggers end of loop if not corrected in the check\r\n\t\t\tfor (Arc a : arcs) {\r\n\t\t\t\tarcScanCount++;\r\n\t\t\t\tint i = a.src.tag;\r\n\t\t\t\tint j = a.dest.tag;\r\n\t\t\t\t// value of d[i] + weight\r\n\t\t\t\tint value = Integer.MAX_VALUE;\r\n\t\t\t\t// only update value if meaningful, avoid overflow\r\n\t\t\t\tif (g.distance[i] != Integer.MAX_VALUE) {\r\n\t\t\t\t\tvalue = g.distance[i] + a.weight;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (g.distance[j] > value) {\r\n\t\t\t\t\tlastNodeTouched = j;\r\n\t\t\t\t\tdUpdatedCount++;\r\n\t\t\t\t\tg.distance[j] = value;\r\n\t\t\t\t\tg.pred[j] = i;\r\n\t\t\t\t\tcont = true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\titerCount++;\r\n\t\t\tif (iterCount > maxIterations) {\r\n\t\t\t\tSystem.out.println(\"NEGATIVE CYCLE DETECTED, QUITTING LOOP\");\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\tlong endTime = System.currentTimeMillis();\r\n\t\tGraphResult result = new GraphResult(endTime - startTime, arcScanCount, dUpdatedCount);\r\n\t\treturn result;\r\n\r\n\t}", "public void doDfsIterative(Graph g, int s) {\n boolean[] myVisited = new boolean[8];\n Stack<Integer> stack = new Stack<>();\n stack.push(s);\n myVisited[s] = true;\n while (!stack.isEmpty()) {\n int top = stack.pop();\n System.out.print(\"[\" + top + \"] \");\n for (int e : g.adj[top]) {\n if (!myVisited[e]) {\n stack.push(e);\n myVisited[e] = true;\n }\n }\n }\n\n }", "private static int minTime(Map<Integer, Map<Integer, Integer>> graph, int s, int d) {\n //System.out.println(\"minTime: \" + s + \",\" + d);\n int min = Integer.MAX_VALUE;\n int[] minAr = new int[3];\n boolean found = false;\n LinkedList<Integer> queue = new LinkedList<>();\n HashSet<Integer> visited = new HashSet<>(graph.size());\n\n queue.add(s);\n visited.add(s);\n\n while (queue != null && queue.peek() != null) {\n int i = queue.poll();\n Map<Integer, Integer> map = graph.get(i);\n if(map!=null){\n for (Integer key : map.keySet()) {\n if (!visited.contains(key)) {\n queue.add(key);\n visited.add(key);\n\n if (min > map.get(key)) {\n min = map.get(key);\n minAr[0] = i;\n minAr[1] = key;\n minAr[2] = min;\n\n //System.out.println( \"minAr inside: \" + minAr[0] + \"-\"+ minAr[1] + \"-\" +minAr[2]);\n }\n\n if (key == d) {\n found = true;\n queue = null;\n break;\n\n }\n }\n }\n }\n }\n if (found) {\n //System.out.println(\"minAr: \" + minAr[0] + \"-\" + minAr[1] + \"-\" + minAr[2]);\n Map<Integer, Integer> map1 = graph.get(minAr[0]);\n map1.remove(minAr[1]);\n graph.put(minAr[0], map1);\n Map<Integer, Integer> map2 = graph.get(minAr[1]);\n map2.remove(minAr[0]);\n graph.put(minAr[1], map2);\n System.out.println(\"min : \" + min);\n\n min = (min == Integer.MAX_VALUE) ? 0 : min;\n } else {\n System.out.println(\"no connection\");\n min = 0;\n }\n return min;\n }", "public BinaryNode getMaxNode(BinaryNode current, int max) throws Exception {\n getMaxNodeHelper(current, max);\n\n if (getMaxNodeFromSeq() == null) {\n throw new Exception(\"Alle Knoten sind groesser als der angegebene Wert!\");\n }\n\n return getMaxNodeFromSeq();\n }", "Long[] searchSolution(int timeLimit, Graph g);", "float getTransferFunction(ArrayList<INode> Nodes, ArrayList edges);", "private static int numBusesToDestination(int[][] routes, int S, int T) {\n if (routes == null || routes.length == 0) {\n return 0;\n }\n\n if (S == T) {\n return 0;\n }\n\n // map a stop to routes\n // 1 -> 0, stop 1 belongs to route 0\n // 7 -> 0, 1 stop 7 belongs to route 0 and 1\n Map<Integer, List<Integer>> graph = new HashMap<>();\n for (int i = 0; i < routes.length; i++) {\n for (int stop: routes[i]) {\n if (!graph.containsKey(stop)) {\n graph.put(stop, new ArrayList<>());\n }\n graph.get(stop).add(i); // stop, routeid\n }\n }\n\n Queue<Integer> queue = new LinkedList<>(); // bus stop\n Set<Integer> visited = new HashSet<>(); // visited routes\n\n queue.offer(S);\n\n int level = 1;\n\n while (!queue.isEmpty()) {\n int size = queue.size();\n\n for (int i = 0; i < size; i++) {\n int cur = queue.poll(); // current stop\n\n // get all routes available from the current stop\n for (int routeId: graph.get(cur)) {\n if (!visited.contains(routeId)) {\n visited.add(routeId);\n\n // get all stops from this route\n for (int stop: routes[routeId]) {\n if (stop == T) {\n return level;\n }\n queue.offer(stop);\n }\n }\n }\n }\n level++;\n }\n\n return -1;\n }", "public static int longestPath(int[] parent, String s) {\n int n = parent.length;\n\n Map<Integer, List<Integer>> graph = new HashMap<>();\n for (int i = 0; i < n; i++) {\n int father = parent[i];\n graph.computeIfAbsent(father, value -> new ArrayList<>()).add(i);\n }\n\n int ans = 0;\n for (int i = 0; i < n; i++) {\n ans = Math.max(ans, dfs(graph, i, s));\n }\n\n return ans;\n }", "public static void Kruskals(int graph[][]) {\n\t\tgraph = ArraySort(graph, 1);\n\t\t\n\t\tint[][] sets = PopulateSets(graph);\n\t\tint i1;\n\t\tint i2;\n\t\tint max_node=0;\n\t\tint min_node=0;\n\t\tint count = 0;\n\t\tfor (int[] edge: graph) {\n\t\t\tSystem.out.printf(\"%d: \", ++count);\n\t\t\ti1 = FindEdge(sets, edge[0]);\n\t\t\tSystem.out.printf(\"Find(%d) returns %d\\t\", edge[0], i1);\n\t\t\ti2 = FindEdge(sets, edge[2]);\n\t\t\tSystem.out.printf(\"Find(%d) returns %d\\t\", edge[2], i2);\n\t\t\t\n\t\t\tif (i1 != i2) {\n\t\t\t\tif (i1 > i2){max_node = i1;min_node = i2;}\n\t\t\t\tif (i1 < i2){max_node = i2;min_node = i1;}\n\t\t\t\tsets[max_node] = UnionSets(sets[max_node], sets[min_node]);\n\t\t\t\tSystem.out.printf(\"Union(%d, %d) done\\n\", i1, i2);\n\t\t\t} else {\n\t\t\t\tSystem.out.printf(\"Union(%d, %d) not done. Same set\\n\", i1, i2);\n\t\t\t}\n\t\t\tShowForest(sets);\n\t\t}\n//\t\tsets[0] = UnionSets(sets[0], sets[1]);\n\t}", "private static int getLongestPath(ArrayList<ArrayList<Integer>> graph, int N) {\n int startNode = 1;\n int edgeVertex = 0;\n\n boolean[] visited = new boolean[N + 1];\n\n LinkedList<Integer> queue = new LinkedList<>();\n\n queue.add(startNode);\n visited[startNode] = true;\n\n while (!queue.isEmpty()) {\n int u = queue.poll();\n\n for (int v : graph.get(u)) {\n if (!visited[v]) {\n queue.add(v);\n visited[v]=true;\n edgeVertex = v;\n }\n }\n }\n\n\n //Doing BFS from one of the edgeVertex\n\n queue.clear();\n Arrays.fill(visited, false);\n\n int length = 0;\n\n queue.add(edgeVertex);\n queue.add(-1);\n visited[edgeVertex] = true;\n\n while (queue.size() > 1) {\n int u = queue.poll();\n\n if (u == -1) {\n queue.add(-1);\n length++;\n\n } else {\n for (int v : graph.get(u)) {\n if (!visited[v]) {\n queue.add(v);\n visited[v] = true;\n }\n }\n }\n }\n\n return length;\n }", "public _AcyclicSP(_EdgeWeightedDigraph G, int s) {\n edgeTo = new _DirectedEdge[G.V()];\n distTo = new double[G.V()];\n for (int v = 0; v < G.V(); v++) {\n distTo[v] = Double.POSITIVE_INFINITY;\n }\n // Topological top = new Topological(G);\n }", "public static OptimizationProblem createOptimizationProblemTempMaxFv() {\n return createOptimizationProblem(From.tpac_T_uw_d, To.Fv, true);\n }", "private int best_Broadcasting_Router(int[][] matrx)\n\t{\n\t\tint best_router = -1;\n\t\tint min = INFINITE_DIST;\n\t\tint[] min_dist = new int[matrx.length];\n\t\tint[] forward_min_dist_table = new int[matrx.length];\n\t\tint[] prev_node = new int[matrx.length];\n\t\t\n\t\tfor(int s=0; s<matrx.length; s++)\n\t\t{\n\t\t\t//Compute shortest path for every node\n\t\t\tforward_min_dist_table = shrtst_Path_Dijkstra_Algo(matrx, s, forward_min_dist_table, prev_node);\n\t\t\t\n\t\t\t//only include reachable nodes for total\n\t\t\tfor(int i=0; i<forward_min_dist_table.length; i++)\n\t\t\t{\n\t\t\t\tif(forward_min_dist_table[i] != INFINITE_DIST)\n\t\t\t\t\tmin_dist[s] += forward_min_dist_table[i];\n\t\t\t}\n\t\t}\n\t\t//min_dist array contains min distance from every node to every other node\n\t\tfor(int n=0; n<min_dist.length; n++)\n\t\t{\n\t\t\tSystem.out.println(\"Total cost of router \"+ (n+1) +\" to other nodes is: \"+ min_dist[n]);\n\t\t\tif(min_dist[n] < min && min_dist[n] != 0)\n\t\t\t{\n\t\t\t\tmin = min_dist[n];\n\t\t\t\tbest_router = n;\n\t\t\t}\n\t\t}\n\t\treturn (best_router + 1);\n\t}", "public static void main(String[] args) throws IOException {\n\n // read in graph\n Scanner scanner = new Scanner(System.in);\n int n = scanner.nextInt(), m = scanner.nextInt();\n ArrayList<Integer>[] graph = new ArrayList[n];\n for (int i = 0; i < n; i++)\n graph[i] = new ArrayList<>();\n\n for (int i = 0; i < m; i++) {\n scanner.nextLine();\n int u = scanner.nextInt() - 1, v = scanner.nextInt() - 1; // convert to 0 based index\n graph[u].add(v);\n graph[v].add(u);\n }\n\n int[] dist = new int[n];\n Arrays.fill(dist, -1);\n // partition the vertices in each of the components of the graph\n for (int u = 0; u < n; u++) {\n if (dist[u] == -1) {\n // bfs\n Queue<Integer> queue = new LinkedList<>();\n queue.add(u);\n dist[u] = 0;\n while (!queue.isEmpty()) {\n int w = queue.poll();\n for (int v : graph[w]) {\n if (dist[v] == -1) { // unvisited\n dist[v] = (dist[w] + 1) % 2;\n queue.add(v);\n } else if (dist[w] == dist[v]) { // visited and form a odd cycle\n System.out.println(-1);\n return;\n } // otherwise the dist will not change\n }\n }\n }\n\n }\n\n BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(System.out));\n // vertices with the same dist are in the same group\n List<Integer>[] groups = new ArrayList[2];\n groups[0] = new ArrayList<>();\n groups[1] = new ArrayList<>();\n for (int u = 0; u < n; u++) {\n groups[dist[u]].add(u + 1);\n }\n for (List<Integer> g: groups) {\n writer.write(String.valueOf(g.size()));\n writer.newLine();\n for (int u: g) {\n writer.write(String.valueOf(u));\n writer.write(' ');\n }\n writer.newLine();\n }\n\n writer.close();\n\n\n }", "public static int Dij(int s , int g){\n PriorityQueue<Edge> pq = new PriorityQueue<>();\n HashSet<Integer> hs = new HashSet<>();\n distance[s]=0;\n pq.add(new Edge(s,0));\n while (!pq.isEmpty()){\n Edge curr = pq.remove();\n if(curr.getto()==g)return distance[g];\n if(!hs.contains(curr.getto())){\n hs.add(curr.getto());\n List<Edge> ll = getNei(curr.getto()) ;\n for(Edge e :ll ){\n if(!hs.contains(e.getto())){\n\n if(distance[e.getto()]>(distance[curr.getto()] +e.getweight())){\n\n distance[e.getto()] = distance[curr.getto()] +e.getweight() ;\n pq.add(new Edge(e.getto(),distance[e.getto()]));\n\n }\n }\n }\n }\n\n }\n return distance[g] ;\n }", "public int getMaxTourDay(int a, int b, int c, int d, int e, int f, int g){\r\n\t\tint currentMax = a;\r\n\t\tif(b > currentMax){\r\n\t\t\tcurrentMax = b;\r\n\t\t}\r\n\t\tif(c > currentMax){\r\n\t\t\tcurrentMax = c;\r\n\t\t}\r\n\t\tif(d > currentMax){\r\n\t\t\tcurrentMax = d;\r\n\t\t}\r\n\t\tif(e > currentMax){\r\n\t\t\tcurrentMax = e;\r\n\t\t}\r\n\t\tif(f > currentMax){\r\n\t\t\tcurrentMax = f;\r\n\t\t}\r\n\t\tif(g > currentMax){\r\n\t\t\tcurrentMax = g;\r\n\t\t}\r\n\t\t\r\n\t\treturn currentMax;\r\n\t}", "public Graph classementDegre(Graph g) {\n List<Sommet<T>> noeuds = this.getSommets();\n Sommet<T> temp;\n for (int i = 0; i < noeuds.size(); i++) {\n for (int j = i; j > 0; j--) {\n if (noeuds.get(j).getDegre() > noeuds.get(j - 1).getDegre()) {\n temp = noeuds.get(j);\n noeuds.set(j, noeuds.get(j - 1));\n noeuds.set(j - 1, temp);\n }\n }\n }\n return g;\n }", "int getMaximum();", "public int findMinDistanceToFarthestNode(int vertices, int[][] edges) {\n Map<Integer, List<Integer>> adjacencyList = buildAdjacencyList(edges);\n\n // Create array to hold distance from specific node to other node\n int[] distanceToNode = new int[vertices];\n\n // First BFS from random node to find furthest node from it\n int firstFurthestNode = bfs(1, adjacencyList, distanceToNode);\n\n // Second BFS from the furthest node above to find the furthest node from it\n int secondFurthestNode = bfs(firstFurthestNode, adjacencyList, distanceToNode);\n\n // Find max distance (diameter) from the array above, populated after second bfs\n int graphDiameter = findGraphDiameter(distanceToNode);\n\n // Find max distance to furthest node\n if (graphDiameter % 2 == 0)\n return graphDiameter / 2;\n else\n return graphDiameter / 2 + 1;\n }", "private int getYmax(int[] yt){\n\t\tint max = -1;\n\t\tfor(int i = 0;i<=3;i++){\n\t\t\tif(max < yt[i]){\n\t\t\t\tmax = yt[i];\n\t\t\t}\n\t\t}\n\t\treturn max;\n\t}", "static List<TrafficElement> computeTheMaximumOfASlidingWindow(TrafficElement traffic[], int w) {\n List<TrafficElement> result = new ArrayList<>();\n\n Deque<TrafficElement> queue = new ArrayDeque<>();\n ArrayDeque<TrafficElement> max = new ArrayDeque<>();\n\n for (int i = 0; i < traffic.length; i++) {\n queue.addLast(traffic[i]);\n addToTheMax(max, traffic[i]);\n\n while (traffic[i].timestamp - queue.peek().timestamp > w) {\n TrafficElement element = queue.removeFirst();\n if (element == max.peek()) max.removeFirst();\n\n }\n\n result.add(new TrafficElement(traffic[i].timestamp, max.peek().volume));\n\n }\n\n return result;\n }", "static int[] bfs(int n, int m, int[][] edges, int s) {\r\n \r\n HashSet<Integer> aList[] = new HashSet[n];\r\n // Array of the nodes of the tree\r\n\r\n Queue<Integer> bfsQueue = new LinkedList();\r\n\r\n boolean visited[] = new boolean[n];\r\n // check if a node is visited or not\r\n\r\n\r\n int cost[] = new int[n];\r\n // cost to travel from one node to other\r\n\r\n for (int i = 0; i < n; i++) {\r\n // intialising the values\r\n visited[i] = false;\r\n cost[i] = -1;\r\n\r\n aList[i] = new HashSet<Integer>();\r\n // Each element of aList is a Set\r\n // To store the neighbouring nodes of a particular node\r\n }\r\n\r\n for (int i = 0; i < m; i++) {\r\n // let node[i] <--> node[j]\r\n\r\n // adding node[j] to neighbours list of node[i]\r\n aList[edges[i][0] - 1].add(edges[i][1] - 1);\r\n\r\n // adding node[i] to neighbours list of node[j]\r\n aList[edges[i][1] - 1].add(edges[i][0] - 1);\r\n }\r\n\r\n //\r\n s = s - 1;\r\n bfsQueue.add(s);\r\n visited[s] = true;\r\n cost[s] = 0;\r\n //\r\n \r\n \r\n while (!bfsQueue.isEmpty()) {\r\n \r\n int curr = bfsQueue.poll();\r\n // takes the last element of the queue\r\n \r\n for (int neigh : aList[curr]) { // iterating the neighbours of node 'curr'\r\n if (!visited[neigh]) { // checking if node neigh id already visited during the search\r\n visited[neigh ] = true;\r\n bfsQueue.add(neigh); //add the node neigh to bfsqueue\r\n cost[neigh] = cost[curr] + 6; \r\n }\r\n }\r\n }\r\n\r\n int result[] = new int[n-1];\r\n\r\n for (int i=0, j=0; i<n && j<n-1; i++, j++) {\r\n if (i == s){\r\n i++;\r\n }\r\n result[j] = cost[i];\r\n }\r\n \r\n return result;\r\n }", "public double value(Edge[] edges){\n\t\tdouble result = 0;\n\t\tint limit = edges.length-1;\t//ugly but quick versino of the loop\n\n\t\tfor (int i=limit;i>=0;i--)\t\t//sum all weights times their node's value\n\t\t\tresult += (edges[i].getWeight()*edges[i].getSource().value());\t\n\t\t\n\t\treturn hypTan(result);\t//take hypTan of that to smoothly combine\n\t}", "public List<Integer> BFS(int s, int t, ArrayList<ArrayList<Integer>> adjacencyLists) {\n\t\tint N = adjacencyLists.size();\n boolean visited[] = new boolean[N]; \n int parrent[] = new int[N];\n \n // Create a queue for BFS \n LinkedList<Integer> queue = new LinkedList<Integer>(); \n \n // Mark the current node as visited and enqueue it \n visited[s]=true; \n parrent[s]=-1;\n queue.add(s); \n Boolean hasPath = false;\n \n while (queue.size() != 0) \n { \n // Dequeue a vertex from queue and print it \n int current = queue.poll(); \n \n Iterator<Integer> i = adjacencyLists.get(current).listIterator();\n while (i.hasNext()) \n { \n int n = i.next(); \n if (!visited[n]) \n { \n visited[n] = true; \n parrent[n] = current;\n if (n == t) {\n \thasPath = true;\n \tbreak;\n }\n queue.add(n); \n } \n } \n } \n if (!hasPath) {\n \treturn null;\n }\n \n int trace = t;\n ArrayList<Integer> shortestPath = new ArrayList<Integer>();\n while(parrent[trace] != -1) {\n \tshortestPath.add(trace);\t\n \ttrace = parrent[trace];\n }\n shortestPath.add(s);\n Collections.reverse(shortestPath);\n return shortestPath;\n }", "public int getMaxFrequency() {\n\t\t\n\t\tif(firstNode!=null){\n\t\t\tNode currentNode = firstNode;\n\t\t\tNode maxNode = firstNode;\n\t\t\twhile(currentNode!=null){\n\t\t\t\tif(currentNode.getFrequencyOfNode()>=maxNode.getFrequencyOfNode()){\n\t\t\t\t\tmaxNode = currentNode;\n\t\t\t\t}\n\t\t\t\tcurrentNode = currentNode.next;\n\t\t\t}\n\t\t\treturn maxNode.getFrequencyOfNode();\n\t\t}\n\t\t\t\n\t\treturn 0;\n\t}", "public static int findPath(int currentTime[],int tLeave[], int timeStation[][], int transferTime[][], int totalStations) {\n\t\tint numofLines = currentTime.length;\n\t\tif(numofLines != 2){\n\t\t\tSystem.err.println(\"Only two assembly line supported\");\n\t\t\treturn -1;\n\t\t}\n\t\t//Cost function array\n\t\tint f[][] = new int[numofLines][totalStations];\n\t\t//Station index back track array\n\t\tint i[][] = new int[numofLines][totalStations];\n\t\t\n\t\t//Final Cost and Final Station\n\t\tint finalCost = 0;\n\t\tint lastStation = 0;\n\t\t\n\t\t//Time for first station\n\t\tf[0][0] = currentTime[0]+timeStation[0][0];\n\t\tf[1][0] = currentTime[1]+timeStation[1][0];\n\t\t\n\t\t\n\t\tfor (int j = 1; j < totalStations; j++) {\n\t\t\t\n\t\t\t\n\t\t\tif((f[0][j-1] + timeStation[0][j]) <= (f[1][j-1]+ transferTime[1][j-1]+timeStation[0][j])){\n\t\t\t\tf[0][j]= f[0][j-1]+ timeStation[0][j];\n\t\t\t\ti[0][j] = 0;\n\t\t\t}\n\t\t\telse{\n\t\t\t\tf[0][j]= f[1][j-1]+ transferTime[1][j-1]+timeStation[0][j];\n\t\t\t\ti[0][j]=1;\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\tif(f[1][j-1] + timeStation[1][j] <= f[0][j-1]+ transferTime[0][j-1]+timeStation[1][j]){\n\t\t\t\tf[1][j]= f[1][j-1]+ timeStation[1][j];\n\t\t\t\ti[1][j] = 1;\n\t\t\t}\n\t\t\telse{\n\t\t\t\tf[1][j]= f[0][j-1]+ transferTime[0][j-1]+timeStation[1][j];\n\t\t\t\ti[1][j] = 0;\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\t\n\t\tif((f[0][totalStations-1]+tLeave[0]) <= (f[1][totalStations-1]+tLeave[1] )){\n\t\t\tfinalCost = f[0][totalStations-1]+tLeave[0];\n\t\t\tlastStation = 0;\n\t\t}\n\t\telse{\n\t\t\tfinalCost = f[1][totalStations-1]+tLeave[1] ;\n\t\t\tlastStation = 1;\n\t\t}\t\n\t\n\t\tprintStation(lastStation,finalCost, i, totalStations);\n\t\treturn finalCost;\n\t}", "public T max();", "int findMaximumOrderByWorkflowId( int nWorkflowId );", "public void maximize()\n\t{\n\t\tint i,j,max=cost[0][0];\n\t\t\n\t\tfor(i=0;i<n;i++)\n\t\t{\n\t\t\tfor(j=0;j<n;j++)\n\t\t\t{\n\t\t\t\tif(cost[i][j]>max)\n\t\t\t\t{\n\t\t\t\t\tmax=cost[i][j];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tfor(i=0;i<n;i++)\n\t\t{\n\t\t\tfor(j=0;j<n;j++)\n\t\t\t{\t\t\n\t\t\t\tcost[i][j]=max-cost[i][j];\n\t\t\t}\n\t\t}\n\t\t\n\t}", "public static int DSaturAlgoritm(Graph graph) // Total: O((V+E)LogV) // Total: O(V^2+ELogV) // Total: O(VC + (V+E)LogV)\r\n\t{\r\n\t\tint ColorNumber = 1;\r\n\t\t\r\n\t\tgraph.HeapInit(); // O(VLogV)\r\n\t\t\r\n\t\tVertex FirstVertex = graph.getMaxAdjacencyDegreeVertex(); // O(V)\r\n\t\tgraph.Coloring(FirstVertex, 1);\r\n\t\t\r\n\t\twhile (graph.getNotColoredVertex() > 0) //O(V)\r\n\t\t{\r\n\t\t\tVertex Max_Sat_Adj_Vertex = graph.getMaximalSatAdjVertex(); // O(logV)\r\n\r\n\t\t\tint color = Max_Sat_Adj_Vertex.ChooseSmallestColor(); // O(V)\r\n\t\t\tgraph.Coloring(Max_Sat_Adj_Vertex, color); // O(VlogV) Total: O(ElogV)\r\n\t\t\t\r\n\r\n\t\t\tif (color > ColorNumber)\r\n\t\t\t\tColorNumber = color;\r\n\t\t}\r\n\r\n\t\treturn ColorNumber;\r\n\t}", "public static Long compactForwardAlgorithm(ArrayList<Integer>[] graph) {\n // define injective function eta - takes O(n log(n)) time\n Set<Pair<Integer, ArrayList<Integer>>> pairs = Utils.getSortedArrays(graph);\n Map<Integer, Integer> etas = Utils.getEtasMap(pairs);\n\n // sort adjacency arrays according to eta\n pairs.forEach(p -> Collections.sort(p.getSecond(), new Comparator<Integer>() {\n @Override\n public int compare(Integer first, Integer second) {\n if (etas.get(first) > etas.get(second))\n return 1;\n else\n return -1;\n }\n }));\n\n int triangleCount = 0;\n\n // main part, in which we actually count triangles\n Iterator<Pair<Integer, ArrayList<Integer>>> iterator = pairs.iterator();\n while (iterator.hasNext()) {\n Pair<Integer, ArrayList<Integer>> pair = iterator.next();\n Integer v = pair.getFirst();\n ArrayList<Integer> v_neighbors = graph[v];\n\n for (int u : v_neighbors) {\n if (etas.get(u) > etas.get(v)) {\n ArrayList<Integer> u_neighbors = graph[u];\n\n Iterator<Integer> uIterator = u_neighbors.iterator(), vIterator = v_neighbors.iterator();\n\n if (uIterator.hasNext() && vIterator.hasNext()) {\n Integer u_ = uIterator.next(), v_ = vIterator.next();\n while (uIterator.hasNext() && vIterator.hasNext() && etas.get(u_) < etas.get(v)\n && etas.get(v_) < etas.get(v)) {\n if (etas.get(u_) < etas.get(v_))\n u_ = uIterator.next();\n else if (etas.get(u_) > etas.get(v_))\n v_ = vIterator.next();\n else {\n triangleCount++;\n u_ = uIterator.next();\n v_ = vIterator.next();\n }\n }\n\n }\n }\n }\n }\n return new Long(triangleCount);\n }", "public static void runTest() {\n Graph mnfld = new Graph();\n float destTank = 7f;\n\n // Adding Tanks\n mnfld.addPipe( new Node( 0f, 5.0f ) );\n mnfld.addPipe( new Node( 1f, 5.0f ) );\n mnfld.addPipe( new Node( 7f, 5.0f ) );\n\n // Adding Pipes\n mnfld.addPipe( new Node( 2f, 22f, 100f ) );\n mnfld.addPipe( new Node( 3f, 33f, 150f ) );\n mnfld.addPipe( new Node( 4f, 44f, 200f ) );\n mnfld.addPipe( new Node( 5f, 55f, 250f ) );\n mnfld.addPipe( new Node( 6f, 66f, 300f ) );\n mnfld.addPipe( new Node( 8f, 88f, 200f ) );\n mnfld.addPipe( new Node( 9f, 99f, 150f ) );\n mnfld.addPipe( new Node( 10f, 1010f, 150f ) );\n mnfld.addPipe( new Node( 20f, 2020f, 150f ) );\n\n // Inserting Edges to the graph\n mnfld.insertConnection( new Edge( mnfld.getPipe( 0f ), mnfld.getPipe( 2f ), 1f ) );\n mnfld.insertConnection( new Edge( mnfld.getPipe( 0f ), mnfld.getPipe( 3f ), 1f ) );\n mnfld.insertConnection( new Edge( mnfld.getPipe( 1f ), mnfld.getPipe( 2f ), 1f ) );\n mnfld.insertConnection( new Edge( mnfld.getPipe( 22f ), mnfld.getPipe( 4f ), 1f ) );\n mnfld.insertConnection( new Edge( mnfld.getPipe( 33f ), mnfld.getPipe( 5f ), 1f ) );\n mnfld.insertConnection( new Edge( mnfld.getPipe( 44f ), mnfld.getPipe( 5f ), 1f ) );\n mnfld.insertConnection( new Edge( mnfld.getPipe( 44f ), mnfld.getPipe( 7f ), 500f ) );\n mnfld.insertConnection( new Edge( mnfld.getPipe( 55f ), mnfld.getPipe( 6f ), 1f ) );\n mnfld.insertConnection( new Edge( mnfld.getPipe( 66f ), mnfld.getPipe( 7f ), 100f ) );\n mnfld.insertConnection( new Edge( mnfld.getPipe( 66f ), mnfld.getPipe( 8f ), 1f ) );\n mnfld.insertConnection( new Edge( mnfld.getPipe( 88f ), mnfld.getPipe( 7f ), 1f ) );\n mnfld.insertConnection( new Edge( mnfld.getPipe( 33f ), mnfld.getPipe( 9f ), 1f ) );\n mnfld.insertConnection( new Edge( mnfld.getPipe( 99f ), mnfld.getPipe( 5f ), 1f ) );\n mnfld.insertConnection( new Edge( mnfld.getPipe( 33f ), mnfld.getPipe( 1010f ), 1f ) );\n mnfld.insertConnection( new Edge( mnfld.getPipe( 1010f ), mnfld.getPipe( 7f ), 1f ) );\n mnfld.insertConnection( new Edge( mnfld.getPipe( 1f ), mnfld.getPipe( 20f ), 1f ) );\n mnfld.insertConnection( new Edge( mnfld.getPipe( 2020f ), mnfld.getPipe( 3f ), 1f ) );\n\n // -- Running Dijkstra & Finding shortest Paths -- //\n// Dijkstra.findPaths( mnfld, 10, \"0.0\", destTank );\n//\n// mnfld.restoreDroppedConnections();\n//\n// System.out.println( \"\\n\\n\" );\n Dijkstra.findMinPaths( mnfld, mnfld.getPipe( 0f ) );\n Dijkstra.mergePaths( mnfld, 1f, mnfld.getPipe( destTank ).getPath(), mnfld.getPipe( destTank ) );\n\n }", "private BinaryNode max(BinaryNode node) {\n if (node == null) return node.parent;\n else if (node.right == null) return node;\n else return max(node.right);\n }", "public static int findSmallestMSTEdge(int[][] graph,ArrayList<Integer> chosenVertices, ArrayList<Integer> unChosenVertices){\r\n int smallest = Integer.MAX_VALUE;\r\n for(int i = 0 ; i<chosenVertices.size();i++){\r\n for(int j = 0; j< unChosenVertices.size();j++){\r\n if (graph[unChosenVertices.get(j)][chosenVertices.get(i)] < smallest){\r\n smallest = graph[unChosenVertices.get(j)][chosenVertices.get(i)];\r\n }\r\n }\r\n }\r\n return smallest;\r\n }", "public void stopGraph (String graph) {\n // Check if an execution handler is associated to this graph\n FlowExecutionHandler executionHandler = executionHandlers.get(graph);\n\n executionHandler.stop();\n }" ]
[ "0.73227924", "0.6728781", "0.6244345", "0.59956586", "0.58540636", "0.57665086", "0.57051474", "0.56564367", "0.54589003", "0.54535556", "0.54012847", "0.53244126", "0.53182495", "0.5316524", "0.53012604", "0.5276124", "0.52074045", "0.52022123", "0.51782227", "0.51722956", "0.5169458", "0.51646537", "0.51521784", "0.50865966", "0.50859344", "0.50840026", "0.507719", "0.5053907", "0.5018322", "0.5015614", "0.49888912", "0.49860638", "0.49725577", "0.49675533", "0.496042", "0.49552757", "0.49457976", "0.49360314", "0.4909035", "0.48758644", "0.48744288", "0.48728293", "0.48672134", "0.48515704", "0.48499194", "0.48158118", "0.47979566", "0.47817972", "0.47784492", "0.4777853", "0.47735527", "0.4773312", "0.47729856", "0.47525057", "0.47461078", "0.47440544", "0.4731593", "0.47091213", "0.47088528", "0.47014344", "0.47010055", "0.469384", "0.46896648", "0.46848354", "0.46785352", "0.46747565", "0.46739966", "0.46734983", "0.46707436", "0.46690843", "0.46664533", "0.46648556", "0.46620807", "0.46532634", "0.4639271", "0.46265593", "0.46208447", "0.46141964", "0.4584906", "0.45831275", "0.45791203", "0.45749465", "0.45472327", "0.4544621", "0.4542104", "0.4541621", "0.45367035", "0.4532125", "0.45278195", "0.4526706", "0.45254874", "0.45196393", "0.45137024", "0.4510208", "0.45024934", "0.44959784", "0.44948393", "0.44943127", "0.44941854", "0.44922876" ]
0.6438728
2
Driver program to test above functions
public static void main(String[] args) throws java.lang.Exception { double []averageTime = new double[3]; //double array to get average time MaxFlow m = new MaxFlow(); Stopwatch stopwatch = new Stopwatch(); getDataset(); try{ System.out.println("\n"+"The maximum possible flow is " + m.fordFulkerson(graph.getAddMatrix(), 0, graph.getNumOfNode()-1)); for(int i =1; i<=3;i++){ System.out.println("Time "+i+" : "+stopwatch.elapsedTime()); averageTime[i-1]= stopwatch.elapsedTime(); } double a = averageTime[0]; //calculate the average time double b = averageTime[1]; double c = averageTime[2]; double average = (a+b+c)/3; System.out.println("\nAverage Time: "+average); graph.printArray(); }catch (NullPointerException e){ System.out.println(""); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void main(String[] args) {\r\n // 2. Call your method in various ways to test it here.\r\n }", "public static void main(String[] args) {\n // PUT YOUR TEST CODE HERE\n }", "public static void main(String[] args){\n //The driver of the methods created above\n //first display homeowork header\n homeworkHeader();\n //calls driver method\n System.out.println(\"Calling driver method:\");\n driver(true);//runs choice driver\n //when prompted for a choice input 9 to see test driver\n System.out.println(\"End calling of driver method\");\n \n }", "public void TestMain(){\n SampleStatements();\n TestMyPow();\n }", "public static void main(String args[]) {\n\t\tSystem.out.println(\"\\r\\ngetGameSituationTest()\");\n\t\tgetGameSituationTest();\n\n\t\tSystem.out.println(\"\\r\\nstateCheckerboardConvertionTest()\");\n\t\tstateCheckerboardConvertionTest();\n\n\t\tSystem.out.println(\"\\r\\ngetValidActionsTest()\");\n\t\tgetValidActionsTest();\n\t}", "public static void main(String [] args) {\r\n\t\ttestOne(); //adds items to WH; tests getNumItems method & toString method\r\n\t\tSystem.out.print(\"\\n\");\r\n\t\ttestTwo(); //tests getItem(String) method\r\n\t\tSystem.out.print(\"\\n\");\r\n\t\ttestThree(); //test getItem(Item) method\r\n\t\tSystem.out.print(\"\\n\");\r\n\t\ttestFour(); //tests total cost method\r\n\t\tSystem.out.print(\"\\n\");\r\n\t\ttestFive(); //this will test the getRefrigeratedItems method\r\n\t\tSystem.out.print(\"\\n\"); \r\n\t\ttestSix(); //tests getTotalCostRefrigerated method\r\n\t\tSystem.out.print(\"\\n\");\r\n\t\ttestSeven(); //tests remove method\r\n\t}", "public static void main(String[] args) {\n System.out.println(testLibraryParseCardBarCode());\n System.out.println(testLibraryParseRunLibrarianCheckoutBookCommand());\n System.out.println(testLibraryParseRunSubscriberReturnBookCommand());\n System.out.println(testparseBookId());\n System.out.println(testparseRunSubscriberCheckoutBookCommand());\n }", "public static void main (String[] args){\n\t\tincPieceCountTest();\n\t\tdecPieceCountTest();\n\t\tsetPieceTest();\n\t\tmoveTest();\n\t\tanyMoveTest();\n\t\tgetPiecesTest();\n\t\tsetPieceTest2();\n\t}", "private void test() {\n\n\t}", "public static void main(String[] args) {\n\t\t\n\t\tglobalTest();\n//\t\ttimeTest();\n//\t\ttestPrefixSearch();\n//\t\ttestSearch();\n//\t\ttestPrediction();\n//\t\ttestTrieSearch();\n//\t\ttestRebuid();\n//\t\ttest13();\n//\t\ttest14();\n\t}", "public static void main (String[] args) {\n \n doTest (\"hello\");\n doTest (\"query\");\n doTest (\"Mississippi\");\n doTest (\"elephant\");\n doTest (\"Qatar\");\n System.out.println();\n \n }", "@Test\n\tpublic void testMain() {\n\t\t// TODO: test output streams for various IO methods, emulating a user's\n\t\t// input - kinda like Joel did for CSSE2310\n\t\tAssert.fail();\n\t}", "@Test\n public void testMain() throws Exception {\n //main function cannot be tested as it is dependant on user input\n System.out.println(\"main\");\n }", "public static void main(String[] args) {\r\n\t\t// test method\r\n\t\tNewFeatures newFeatures = new NewFeatures();\r\n\t\tnewFeatures.testingArrayList();\r\n\t\tnewFeatures.testingTryCatch();\r\n\t\tnewFeatures.testingNumericValues();\r\n\t\tnewFeatures.testingSwitchWithStringStatemant();\r\n\r\n\t}", "private test5() {\r\n\t\r\n\t}", "public static void main(String[] args){\n new Testing().runTests();\r\n \r\n }", "static void testCaculator(){\n }", "@Test\n public void test() {\n\n testBookExample();\n // testK5();\n // testK3_3();\n }", "public static void main(String[] args) {\n\t\t \n\t\tResult result1 = JUnitCore.runClasses(TestUnitForCreate.class);\n\t for (Failure failure : result1.getFailures()) {\n\t System.out.println(failure.toString());\n\t }\n\t System.out.println(result1.wasSuccessful());\n\n\t Result result2 = JUnitCore.runClasses(TestUnitForReadByCalimNumber.class);\n\t for (Failure failure : result2.getFailures()) {\n\t System.out.println(failure.toString());\n\t }\n\t System.out.println(result2.wasSuccessful());\n\t \n\t Result result3 = JUnitCore.runClasses(TestUnitForReadByLossDate.class);\n\t for (Failure failure : result3.getFailures()) {\n\t System.out.println(failure.toString());\n\t }\n\t System.out.println(result3.wasSuccessful());\n\t \n\t\tResult result4 = JUnitCore.runClasses(TestUnitForUpdate.class);\n\t\tfor (Failure failure : result4.getFailures()) {\n\t\t\tSystem.out.println(failure.toString());\n\t\t}\n\t\tSystem.out.println(result4.wasSuccessful());\n\t \n\t Result result5 = JUnitCore.runClasses(TestUnitForReadVehicle.class);\n\t for (Failure failure : result5.getFailures()) {\n\t System.out.println(failure.toString());\n\t }\n\t System.out.println(result5.wasSuccessful());\n \n\t Result result6 = JUnitCore.runClasses(TestUnitForDelete.class);\n\t for (Failure failure : result6.getFailures()) {\n\t System.out.println(failure.toString());\n\t }\n\t System.out.println(result6.wasSuccessful());\n\t \n\t}", "public static void main(String[] args) {\n\t\tint firstValue = fnInputFirst();\r\n\t\tfnChoice(firstValue);\r\n\t\t//test(args);\r\n\t\t\r\n\t}", "public static void main(String[] args) {\r\n\t\tSystem.out.println(\"Testing Calculator\");\r\n\t\ttestConstructors();\r\n\t\ttestSetters();\r\n\t\ttestGetters();\r\n\t\ttestToString();\r\n\t}", "public static void main(String... args) throws Exception {\n //testHelloWorld();\n //testExchange();\n //testParentChild();\n //testLinking();\n //testListener();\n //testParse(\"1\");\n //testOuterInner();\n //testResourceARM();\n //testExecuteAround();\n testExecuteAroundARM();\n }", "public static void main(String[] args) {\n\ttest(tests);\n }", "public static void main(String[] args) {\n testFactorial();\n testFibonacci();\n testMissing();\n testPrime();\n\n\n }", "public static void main(String[] args) throws Exception {\n\n\t\t testDistance();\n\n\t\t //functionFitting();\n\t\t //testFunction();\n\t}", "public static void main(String args[]){\n\t\tTestingUtils.runTests();\n\t\t\n\t}", "public static void main(String[] args) {\n\t\t\n\t\t\n\t\ttest01();\n\t}", "public static void main(String[] args){\n\t\ttest1();\r\n\t}", "public static void run() {\n testAlgorithmOptimality();\n// BenchmarkGraphSets.testMapLoading();\n //testAgainstReferenceAlgorithm();\n //countTautPaths();\n// other();\n// testLOSScan();\n //testRPSScan();\n }", "public static void main(String[] args) {\n\t\t\n\t\ttestQuery();\n\t\t//testInsert();\n\t\t\n\t}", "@Override\n public void runTest() {\n }", "@Test\n public void testMain() {\n String simulatedUserInput = \"100AUD\" + System.getProperty(\"line.separator\")\n + \"1\" + System.getProperty(\"line.separator\");\n\n InputStream savedStandardInputStream = System.in;\n System.setIn(new ByteArrayInputStream(simulatedUserInput.getBytes()));\n\n mainFunction mainfunc = new mainFunction();\n\n try {\n mainfunc.start();\n } catch(Exception e) {\n System.out.println(\"Exception!\");\n }\n\n assertEquals(1,1);\n }", "public static void main (String args[]) {\n\t\tteste01();\n\t\tteste02();\n\t\tteste03();\n\t\t//teste04();\n\t}", "public static void main(String[] args) {\n\t\ttest4();\n//\t\ttest7();\n//\t\ttest8();\n//\t\ttest9();\n//\t\ttest10();\n//\t\ttest11();\n//\t\t test13() ;\n\t}", "public static void main(String[] args) throws IOException, ParseException{\n\t\tGetBrowser browser=new GetBrowser();\n\t\tWebDriver driver = browser.getDriver(\"FireFox\");\n\t\t\n\t\tHashMap<String, String> test = new CommonUtilities(driver).getTestCases();\n\t\tfor(Map.Entry m:test.entrySet()){ \n\t\t\t System.out.println(m.getKey()+\" \"+m.getValue()); \n\t\t\t } \n\t}", "public void mainTest()\n {\n \tprintSimilarRatingsByYearAfterAndMinutes();\n }", "public static void main(String arg[]) {\n System.out.println(\"testGuset(): \" + testGuset());\n System.out.println(\"testServingQueue(): \" + testServingQueue());\n System.out.println(\"testDessertSolvers(): \" + testDessertSolvers());\n testCapicity();\n }", "public void testGetInsDyn() {\n }", "public static void main(String args[]) {\n\t\ttestFindStop();\n\t\ttestFindGene() ;\n\t\ttestAllGenes();\n\t}", "public static void main(String[] args) throws InterruptedException {\n signin();\n\n\n //test case 4\n searchProduct();\n //test case 5:\n //searchInvalidProduct();\n\n }", "public static void main(String[] args) {\n Part2_2 part2_2 = new Part2_2();\n part2_2.testHowMany();\n Part2_3 part_23 = new Part2_3();\n part_23.testHowManyGenes();\n Part3_1 part3_1 = new Part3_1();\n part3_1.testCgRatio();\n }", "@Test\n public void testWalkForPduTarget() throws Exception {\n//TODO: Test goes here... \n }", "public static void main(String[] args) throws IOException {\n\t\t testType1();\n\n\t\t// testMatrix();\n//\t\ttestKening();\n\t\t\n//\t\ttestOutline();\n\t}", "public void test5() {\n\t\t\n\t}", "@Test\n public void run () {\n\t \n\t System.out.println(\"---------->\");\n\t //System.out.println(md5list.getResult());\n\t //System.out.println(hashsearch.getResult());\n\t \n\t \n\t \n\t // System.out.println(samples.Testing());\n\t //System.out.println(\"getserult: \"+samples.getResult());\n\t \n }", "public static void main(String[] args) {\n\t\ttestStreamMapReduce();\r\n\t\t//testMethodReference();\r\n\t}", "@Override\r\n\t\t\tpublic void test() {\n\t\t\t}", "@Test\n public void testDAM30203001() {\n testDAM30102001();\n }", "public static void main(String[] args) throws Exception{\n test1();\n }", "public static void main(String[] args) \r\n\t{\r\n\t\tShouldGetSize();\r\n\t\tShouldFindIfContains();\r\n\t\tShouldFindRange();\r\n\t}", "public static void main(String[] args) {\n\t\tDifferentMethods di = new DifferentMethods();\r\n\t\tdi.ReadNumber();\r\n\t\tint isEven = di.Verify();\r\n\t di.Print(isEven);\r\n\t\r\n\t\t\r\n\r\n\t}", "public static void main(String[] args) {\n ListTest lt = new ListTest();\n lt.testAdd();\n// lt.testGet();\n lt.testIterator();\n lt.testListContains();\n }", "public static void main(String[] args) {\n\t\ttest1();\r\n\t\ttest2();\r\n\t\t\r\n\t}", "public static void main(String argv[]) {\n \r\n PolicyTest bmt = new PolicyTest();\r\n\r\n bmt.create_minibase();\r\n\r\n // run all the test cases\r\n System.out.println(\"\\n\" + \"Running \" + TEST_NAME + \"...\");\r\n boolean status = PASS;\r\n status &= bmt.test1();\r\n \r\n bmt = new PolicyTest();\r\n bmt.create_minibase();\r\n status &= bmt.test2();\r\n\r\n // display the final results\r\n System.out.println();\r\n if (status != PASS) {\r\n System.out.println(\"Error(s) encountered during \" + TEST_NAME + \".\");\r\n } else {\r\n System.out.println(\"All \" + TEST_NAME + \" completed successfully!\");\r\n }\r\n\r\n }", "public static void main(String[] arg) {\n testSingleLowRate();\n testSingleHighRate();\n testMarriedLowRate();\n testMarriedHighRate();\n System.out.println(doesPass ? \"PASS\" : \"FAIL\");\n }", "public static void main(String[] args) throws IOException, InterruptedException {\r\n\t\r\n TournamentTest();\r\n //humanPlayersTest();\r\n }", "public static void main(String[] args) {\n\t\t\tmeth(args);\r\n\t\t\targument_test:meth(args);\r\n\t}", "@Test\n\tpublic void testMain() {\n\t}", "public static void run()\n {\n String[] testInput = FileIO.readAsStrings(\"2020/src/day17/Day17TestInput.txt\");\n String[] realInput = FileIO.readAsStrings(\"2020/src/day17/Day17Input.txt\");\n\n Test.assertEqual(\"Day 17 - Part A - Test input\", partA(testInput), 112);\n Test.assertEqual(\"Day 17 - Part A - Challenge input\", partA(realInput), 384);\n Test.assertEqual(\"Day 17 - Part B - Test input\", partB(testInput), 848);\n Test.assertEqual(\"Day 17 - Part B - Challenge input\", partB(realInput), 2012);\n }", "public void testBidu(){\n\t}", "public static void main(String[] args) {\n\r\n\t\ttry {\r\n\t\t\tSystem.out.println(\"INSERT\");\r\n\t\t\tTestFromFile(\"C:\\\\\\\\Users\\\\\\\\dhdim\\\\\\\\projects\\\\\\\\Coursework\\\\\\\\src\\\\\\\\Coursework\\\\\\\\test.txt\",\r\n\t\t\t\t\tHashDirectory::testInsert);\r\n\t\t\tSystem.out.println(\"LOOKUP\");\r\n\t\t\tTestFromFile(\"C:\\\\\\\\Users\\\\\\\\dhdim\\\\\\\\projects\\\\\\\\Coursework\\\\\\\\src\\\\\\\\Coursework\\\\\\\\test.txt\",\r\n\t\t\t\t\tHashDirectory::testLookup);\r\n\t\t\tSystem.out.println(\"DELETE BY NAME\");\r\n\t\t\tTestFromFile(\"C:\\\\Users\\\\dhdim\\\\projects\\\\Coursework\\\\src\\\\Coursework\\\\test.txt\",\r\n\t\t\t\t\tHashDirectory::testDeleteByName);\r\n\t\t\tSystem.out.println(\"DELETE BY NUMBER\");\r\n\t\t\tTestFromFile(\"C:\\\\\\\\Users\\\\\\\\dhdim\\\\\\\\projects\\\\\\\\Coursework\\\\\\\\src\\\\\\\\Coursework\\\\\\\\test.txt\",\r\n\t\t\t\t\tHashDirectory::testDeleteByNumber);\r\n\t\t\tSystem.out.println(\"CHANGE NUMBER\");\r\n\t\t\tTestFromFile(\"C:\\\\\\\\Users\\\\\\\\dhdim\\\\\\\\projects\\\\\\\\Coursework\\\\\\\\src\\\\\\\\Coursework\\\\\\\\test.txt\",\r\n\t\t\t\t\tHashDirectory::testChangeNumber);\r\n\r\n\t\t} catch (FileNotFoundException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (IOException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (Exception e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\r\n\t}", "public static void main(String [] args) {\n TestFListInteger test = new TestFListInteger();\n \n test.testIsEmpty();\n test.testGet();\n test.testSet();\n test.testSize();\n test.testToString();\n test.testEquals();\n \n test.summarize();\n \n }", "public void test() {\n\t}", "@Test\n public void testDAM30402001() {\n testDAM30101001();\n }", "public static void main(String[] args) {\r\n// Use for unit testing\r\n }", "public static void main(String[] args) {\n //init\n Client.getLayerIntersectDao().getConfig().getIntersectionFile(null);\n\n //tests\n TestLayers();\n// TestFields();\n// TestObjects();\n// TestDistributions();\n// TestDistributionData();\n// TestDistributionShapes();\n// TestObjNames();\n }", "public static void main(String[] args) {\n \tif(testInsert()) \n \t\tSystem.out.println(\"testInsert: succeeded\");\n \telse\n \t\tSystem.out.println(\"testInsert: failed\");\n if(testSearch()) \n System.out.println(\"testSearch: succeeded\");\n else\n System.out.println(\"testSearch: failed\");\n }", "@Test\n public void baseCommandTests_part1() throws Exception {\n ExecutionSummary executionSummary = testViaExcel(\"unitTest_base_part1.xlsx\");\n assertPassFail(executionSummary, \"base_showcase\", TestOutcomeStats.allPassed());\n assertPassFail(executionSummary, \"function_projectfile\", TestOutcomeStats.allPassed());\n assertPassFail(executionSummary, \"function_array\", TestOutcomeStats.allPassed());\n assertPassFail(executionSummary, \"function_count\", TestOutcomeStats.allPassed());\n assertPassFail(executionSummary, \"function_date\", TestOutcomeStats.allPassed());\n assertPassFail(executionSummary, \"actual_in_output\", TestOutcomeStats.allPassed());\n }", "private void doTests()\n {\n doDeleteTest(); // doSelectTest();\n }", "public static void main ( String [] args ) {\n test_containsVowel(); // 3 tests\n test_isPalindrome(); // 7 tests\n test_evensOnly(); // 8 tests\n test_oddsOnly(); // 8 tests\n test_evensOnlyNoDupes(); // 2 tests\n test_oddsOnlyNoDupes(); // 2 tests\n test_reverse(); // 2 tests\n\n }", "public void testMain() throws ClassNotFoundException, IOException \r\n {\r\n String[] args = new String[1];\r\n args[0] = \"SyntaxTest\";\r\n \r\n System.out.println(\"Filename: SyntaxTest:\\n\");\r\n Rectangle1.main(args);\r\n \r\n\r\n\r\n String[] args2 = new String[1];\r\n args2[0] = \"SimpleInsertionTest\";\r\n \r\n System.out.println(\"\\n\\nFilename: SimpleInsertionTest:\\n\");\r\n Rectangle1.main(args2);\r\n \r\n String[] args3 = new String[1];\r\n args3[0] = \"RegionSearchTest\";\r\n \r\n System.out.println(\"\\n\\nFilename: RegionSearchTest:\\n\");\r\n Rectangle1.main(args3);\r\n \r\n String[] args4 = new String[1];\r\n args4[0] = \"WebCatTests\";\r\n \r\n System.out.println(\"\\n\\nFilename: WebCatTests:\\n\");\r\n Rectangle1.main(args4);\r\n \r\n String[] args5 = new String[1];\r\n args5[0] = \"RemoveTest\";\r\n \r\n System.out.println(\"\\n\\nFilename: RemoveTest:\\n\");\r\n Rectangle1.main(args5);\r\n \r\n String[] args6 = new String[1];\r\n args6[0] = \"MoreCommands\";\r\n \r\n System.out.println(\"\\n\\nFilename: MoreCommands:\\n\");\r\n Rectangle1.main(args6);\r\n \r\n assertEquals(\"RegionSearchTest\", args3[0]);\r\n }", "public static void main(String[] args) {\n\n\t\tParseExcercise2 px = new ParseExcercise2();\n//\t\tpx.testColdestHourInFile();\n\t\tpx.testFileWithColdestTemperature();\n//\t\tpx.testLowestHumidityInFile();\n//\t\tpx.testLowestHumidityInManyFiles();\n//\t\tpx.testAverageTemperatureInFile();\n//\t\tpx.testAverageTemperatureWithHighHumidityInFile();\n\t}", "public static void main(String[] args) {\n final int t = SYS_IN.nextInt(); // total test cases\n SYS_IN.nextLine();\n for (int ti = 0; ti < t; ti++) {\n evaluateCase();\n }\n SYS_IN.close();\n }", "public void testOperation();", "public static void main(String[] args) {\n\t\ttest();\n\t}", "public static void main(String[] args) {\n // TODO Auto-generated method stub\n test2();\n }", "@Test\n public void testDAM30601001() {\n testDAM30102001();\n }", "public static void main(String[] args) {\n\n experiment();\n }", "@Test\n public void testMain() {\n System.out.println(\"main\");\n String[] args = null;\n CashRegister.main(args);\n // TODO review the generated test code and remove the default call to fail.\n //fail(\"The test case is a prototype.\");\n }", "void test02(){\n\t}", "@Test\n public void testPrintPosLnS() throws Exception\n {\n//TODO: Test goes here... \n }", "public void testLizard(){\n }", "public static void main(String[] args) {\n inOrbitDestinationControllerTest();\n// inOrbitReplayControllerTest();\n\n }", "public void testMain(Object[] args) \n\t{\n\t\t//----------------------------------------------------------------------\n\t\t// Verify SUCCESS of Journey\n\t\t// Grab Inspection Details and Report\n\t\t//----------------------------------------------------------------------\n\t\ttry {\t\t\t\n\t\t\t//----------------------------------------------------------------------\t\t\t\t\n\t\t\thtml_thankYou().waitForExistence(20.0, 0.25);\n\t\t\t//----------------------------------------------------------------------\t\t\t\t\n\t\t\tString sPaymentSuccess_Text = (String)html_thankYou().getProperty(\".text\");\t\t\n\t\t\t//----------------------------------------------------------------------\t\t\t\t\n\t\t\tSystem.out.println(\" PAYMENT SUCCESS * * * \"+sPaymentSuccess_Text+\"* * * \");\n\t\t\tlogTestResult(\" PAYMENT SUCCESS * * * \"+sPaymentSuccess_Text+\"* * * \", true);\t\t\n\t\t\t//----------------------------------------------------------------------\t\t\t\t\n\t\t} catch (Exception e) {\t\t\t\n\t\t\tlogTestResult(\" There Is A Problem WIth The CONFIRMATION Page - Quote Text Is NULL, Payment Gateway Issue or The Page Structure Changed?\", false);\t\t\n\t\t}\n\t\t//----------------------------------------------------------------------\t\n\t\tSystem.out.println(\"Test Journey Completed\");\n\t\tSystem.out.println(\"---------------------------------------------------\");\n\t\tiE().close();\n\t\t//stop();\n\t\t//----------------------------------------------------------------------\t\n\t}", "@Test\n\tvoid testLectureChoixInt() {\n\t\t\n\t}", "@Test\n\tpublic void testAllExampleGenerations() {\n\t\ttry {\n\t\t\tOdfHelper.main(null);\n\t\t} catch (Exception ex) {\n\t\t\tLOG.log(Level.SEVERE, null, ex);\n\t\t\tAssert.fail(ex.toString());\n\t\t}\n\t}", "public static void main(String[] args) {\n DatabaseCommunicator test = new DatabaseCommunicator();\n// HashMap<String,LabTest> methods = test.getMethods();\n// System.out.println(methods.get(\"mingi labTest\").getMatrix());\n LabTest labTest = new LabTest();\n ArrayList testData = test.fileReader();\n DatabaseCommunicator.testSendingToDatabase(test, labTest, testData);\n }", "public static void main(String[] args) {\n\t\tdebutTest();\n\t\t\tinstancePerson();\n\t\t\tmodifier1Personne();\n\t\t\t//modifier2Personne();\n\t\t\n\t\tfinTest();\n\t}", "public static void main(String[] args) {\n\t\tTestGeneric t=new TestGeneric();\n\t\tt.testAdd();\n\t\tt.testForEach();\n\t\tt.testChild();\n\t\tt.testForEach();\n\t\tt.testBasicType();\n\t\t\n\n\t}", "public static void main(String[] args) {\n test7();\n }", "@Test\n public void main() {\n MainApp.main(new String[] {});\n }", "private void runAllTests(){\n System.out.println(\"------ RUNNING TESTS ------\\n\");\n testAdd(); // call tests for add(int element)\n testGet(); // tests if the values were inserted correctly\n testSize(); // call tests for size()\n testRemove(); // call tests for remove(int index)\n testAddAtIndex(); // call tests for add(int index, int element)\n\n // This code below will test that the program can read the file\n // and store the values into an array. This array will then be sorted\n // by the insertionSort and it should write the sorted data back into the file\n\n testReadFile(); // call tests for readFile(String filename)\n testInsertionSort(); // call tests for insertionSort()\n testSaveFile(); // call tests for saveFile(String filename)\n System.out.println(\"\\n----- TESTING COMPLETE ----- \");\n }", "@Test\r\n\tpublic void testSanity() {\n\t}", "public static void main(String[] args) {\n\t\ttest1();\n\t\ttest2();\n\t\tdivision();\n\t\tdivision_nullexception();\n\t\n\t}", "@Test\n public void testMain() {\n System.out.println(\"main\");\n String[] args = null;\n GOL_Main.main(args);\n }", "public static void main(String[] args) {\n\t\t\n\t\t testMid();\n\t\t testCircular();\n\t\n\t}", "static void mainTest(PrintWriter out) throws Exception {\n\t}", "@Test\n public void test() throws Exception {\n// diversifiedRankingxPM2()\n diversifiedRankingxQuAD();\n }", "@Test\n public void main() {\n System.out.println(\"main\");\n String[] args = null;\n SaalHelper.main(args);\n }", "public static void hvitetest1w(){\r\n\t}", "@Override\n\tpublic void test() {\n\t\t\n\t}" ]
[ "0.73421466", "0.7015957", "0.7015154", "0.69689256", "0.69380856", "0.6917498", "0.68921894", "0.6879147", "0.6814333", "0.6773102", "0.67368996", "0.6724063", "0.6697663", "0.6696944", "0.66904354", "0.6680867", "0.6614301", "0.66120595", "0.6589705", "0.6577128", "0.65586853", "0.6553171", "0.65508264", "0.655069", "0.6539583", "0.652219", "0.65202415", "0.6519937", "0.6519662", "0.6519005", "0.65166724", "0.64905894", "0.6488177", "0.64814436", "0.6472057", "0.6469432", "0.64613277", "0.6446495", "0.6441054", "0.6438843", "0.64383894", "0.6429874", "0.6428608", "0.64217347", "0.64194804", "0.6416871", "0.6411423", "0.64028645", "0.6376824", "0.63740015", "0.636471", "0.6362237", "0.63598955", "0.6350684", "0.6342969", "0.6337255", "0.6330563", "0.63252586", "0.6305306", "0.63013244", "0.6298937", "0.6297559", "0.6291265", "0.62908506", "0.6289124", "0.6288149", "0.62872696", "0.627453", "0.6274268", "0.62640864", "0.6259151", "0.62361056", "0.6233833", "0.62309295", "0.62307554", "0.62232435", "0.62188256", "0.62182707", "0.6211394", "0.62108046", "0.62066936", "0.62066567", "0.6201835", "0.6200927", "0.6197553", "0.6197058", "0.6179915", "0.61778635", "0.6169187", "0.6169052", "0.61648816", "0.61601156", "0.6159763", "0.6159483", "0.61568546", "0.6151611", "0.6149949", "0.6149158", "0.61472094", "0.614677", "0.6145059" ]
0.0
-1
Method called to notify the observers about the Action contained in the parameter
public void notifyNewAction(Action action){ notifyObservers(action); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void actionChanged( final ActionAdapter action );", "@Override\n public void onPressed(Action action) {\n // pass the message on\n notifyOnPress(action);\n }", "public abstract void onAction();", "public interface Observer {\n\tpublic void update(Action action);\n}", "protected void fireActionChanged()\n {\n for( final ActionAdapterListener listener : this.listeners )\n {\n listener.actionChanged( this );\n }\n }", "@Override\n\tpublic void ApplicationNotificationAction(int arg0, String arg1) {\n\t\t\n\t}", "private void _notifyAction() {\n for (int i = 0; i < _watchers.size(); ++i) {\n OptionWidgetWatcher ow = (OptionWidgetWatcher) _watchers.elementAt(i);\n ow.optionAction(this);\n }\n }", "@Override\n public void accept(Action action) {\n }", "public void Notify(INofificationAction concreteAction, String message)\n {\n this.action = concreteAction;\n action.ActOnNotification(message);\n }", "public void actionPerformed(ActionEvent ae) {\n _notifyAction();\n }", "@Override\n\tpublic void update(VPAction arg0) {\n\n\t}", "@Override\r\n\tpublic void visit(SimpleAction action)\r\n\t{\n\t\t\r\n\t}", "interface ActionDelegate {\n\n /** Called when value of the 'Working directory' field has been changed. */\n void onWorkingDirectoryChanged();\n\n /** Called when value of the 'Arguments' field has been changed. */\n void onArgumentsChanged();\n }", "@Override\n public void action() {\n }", "@Override\n public void action() {\n }", "@Override\n public void action() {\n }", "void noteActionEvaluationStarted(ActionLookupData actionLookupData, Action action);", "@Override\n\tpublic void update(VPAction arg0, VPContext arg1) {\n\t\t\n\t}", "public void notifyMonitor(String action)\n\t{\n\t\tString msg;\n\t\tswitch(action)\n\t\t{\n\t\tcase \"moving\":\n\t\t\tmsg = \"moving \" + this.user.currentStation + \" \" + this.user.destinationStation + \" \" + this.user.getVehicleName();\n\t\t\tUtils.enviarMensaje(myAgent, \"Monitor\", msg, \"USERSTATUS_NOTIFICATION\");\n\t\t\tbreak;\n\t\t\t\n\t\tcase \"waiting\":\n\t\t\tif(this.user.arrivedToFinalStationVerboseOff()) \n\t\t\t\tmsg = \"final\" + \" \"+ this.user.currentStation;\n\t\t\telse \n\t\t\t\tmsg = \"waiting\" + \" \"+ this.user.currentStation;\n\t\t\tUtils.enviarMensaje(myAgent, \"Monitor\", msg, \"USERSTATUS_NOTIFICATION\");\n\t\t\tbreak;\n\t\t}\n\t}", "public void notifyChangementTour();", "public void action() {\n action.action();\n }", "@Override\r\n\tpublic void action() {\n\t\t\r\n\t}", "public void executeAction( String actionInfo );", "public void selectionChanged(IAction action, ISelection selection) {\n }", "@Override\r\n\tprotected void firePropertyChange(int action) {\r\n\t\tsuper.firePropertyChange(action);\r\n\t}", "void actionCompleted(ActionLookupData actionLookupData);", "@Override\n\tpublic void action() {\n\n\t}", "@Override\r\n public void notify(Object arg) {\n }", "void notifyObserver();", "public void takeAction(BoardGameController.BoardBugAction action)\n {\n\n }", "public void selectionChanged(IAction action, ISelection selection) {\n\r\n\t}", "public void selectionChanged(IAction action, ISelection selection) {\n\r\n\t}", "@Override\n public void notifyAppointmentWFActionTriggered( int nIdAppointment, int nIdAction )\n {\n }", "public void sendRegister(ActionEvent actionEvent) {\n }", "abstract void botonRecibir_actionPerformed(ActionEvent e);", "@Override\n public void actionPerformed (ActionEvent e) {\n fireChanged();\n }", "public synchronized void applyAction(int action) {\n\n }", "@Override\n\tpublic void action() {\n\t\tSystem.out.println(\"action now!\");\n\t}", "@Override\r\n\tpublic void Update() {\n\t\tSystem.out.println(name+\",¹Ø±ÕNBA£¬¼ÌÐø¹¤×÷£¡\"+abstractNotify.getAction());\r\n\t}", "public void selectionChanged(IAction action, ISelection selection) {\n\t\t\r\n\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\n\t\t\t}", "public void notifyObservers() {}", "@Override\n\tpublic void NotifyObserver() {\n\n\t}", "@Override\r\n public void actionPerformed( ActionEvent e )\r\n {\n }", "@Override\n public void onAction(RPObject player, RPAction action) {\n }", "public void performAction();", "@Override\r\n\t\t\tpublic void handle(ActionEvent arg0) {\n\t\t\t}", "@Override\n\tpublic void onActionStart(int action) {\n\t\t\n\t}", "@Override\n\t\t\t\tpublic void handle(ActionEvent event) {\n\t\t\t\t}", "public void notifyObservers();", "public void notifyObservers();", "public void notifyObservers();", "public void act() \n {\n // Add your action code here.\n }", "public void act() \n {\n // Add your action code here.\n }", "public void act() \n {\n // Add your action code here.\n }", "public void act() \n {\n // Add your action code here.\n }", "public void act() \n {\n // Add your action code here.\n }", "public void act() \n {\n // Add your action code here.\n }", "public void act() \n {\n // Add your action code here.\n }", "public void act() \n {\n // Add your action code here.\n }", "@Override\n\t\t\t\tpublic void handle(ActionEvent event) {\n\n\t\t\t\t}", "@Override\n public void actionPerformed(ActionEvent actionEvent) {\n }", "public void act() \r\n {\r\n // Add your action code here.\r\n }", "public void act() \r\n {\r\n // Add your action code here.\r\n }", "@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tfireDetailEvent(new DetailEvent(this,'P'));\r\n\t\t\t}", "public void selectionChanged(Action item);", "public void actionOffered();", "public void actionPerformed(ActionEvent e) {\n action.actionPerformed(e);\n }", "public void setAction(String action);", "public void updateObserver();", "@Override\n public void actionPerformed(@NotNull AnActionEvent anActionEvent) {\n }", "public void notifyJoueurActif();", "void notify(BoardEditorInternalController source);", "private void announce( String arg ) {\r\n for ( var obs : this.observers ) {\r\n obs.update( this, arg );\r\n }\r\n }", "public void onAction(Player player) {\n }", "@Override\n\t\t\tpublic void handle(ActionEvent event) {\n\t\t\t}", "@Override\n\tpublic void selectionChanged(IAction arg0, ISelection arg1) {\n\n\t}", "@Override\n\t public void actionPerformed(ActionEvent e){\n\t }", "@Override\r\n\tpublic void novo(ActionEvent actionEvent) {\n\t\t\r\n\t}", "@Override\n\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\n\t\t}", "@Override\n\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\n\t\t}", "@Override\n public void actionPerformed(@NotNull final AnActionEvent anActionEvent)\n {\n }", "void onAction(TwitchUser sender, TwitchMessage message);", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\t\n\t\t\t}", "public void toSelectingAction() {\n }", "abstract void botonDemo_actionPerformed(ActionEvent e);", "@Override\n\tpublic void setAction() {\n\t}", "public void actionPerformed(ActionEvent evt) {\r\n if (listener != null) {\r\n listener.actionPerformed(evt);\r\n } else {\r\n System.out.println(\"RefactoringAction.actionPerformed()\");\r\n updateMetaData();\r\n System.out.println(\"RefactoringAction.actionPerformed() - 2\");\r\n TypeSummary[] typeSummaryArray = getTypeSummaryArray();\r\n System.out.println(\"RefactoringAction.actionPerformed() - 3\");\r\n activateListener(typeSummaryArray, evt);\r\n System.out.println(\"RefactoringAction.actionPerformed() - 4\");\r\n\r\n CurrentSummary.get().reset();\r\n System.out.println(\"RefactoringAction.actionPerformed() - 5\");\r\n }\r\n }", "public void doAction(){}", "public void processAction(CIDAction action);", "public void selectionChanged(IAction action, ISelection selection) {\n\t}", "public void setAction(String action) { this.action = action; }", "public void actionPerformed( ActionEvent event )\n {\n \n }", "@Override\n public void actionPerformed(ActionEvent e) {\n handleAction();\n }", "@Override\n\tpublic void handleAction(Action action, Object sender, Object target) {\n\t\t\n\t}", "protected void fireChange() {\n\t\tActionListener[] actionListenerArray = actionListeners.toArray(new ActionListener[0]);\n\t\tfor (int i = 0; i < actionListenerArray.length; i++) {\n\t\t\tActionListener listener = actionListenerArray[i];\n\t\t\tlistener.onActionChanged(this);\n\t\t}\n\t}", "public void showPerformedAction(int act);", "@Override\n\t\t\tpublic void handle(ActionEvent event) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void handle(ActionEvent event) {\n\t\t\t\t\n\t\t\t}" ]
[ "0.7384706", "0.6723216", "0.66858166", "0.653126", "0.65106636", "0.6420981", "0.6366028", "0.6353828", "0.63482803", "0.633666", "0.6324881", "0.6323988", "0.625573", "0.6252857", "0.6252857", "0.6252857", "0.6226673", "0.62250066", "0.6207616", "0.61561126", "0.61495066", "0.6127219", "0.6104226", "0.60817", "0.60754067", "0.60680723", "0.60533094", "0.6042488", "0.60247946", "0.6024398", "0.60210454", "0.60210454", "0.60125196", "0.60077757", "0.60063183", "0.60046464", "0.5999832", "0.59994996", "0.5996079", "0.5995943", "0.5989694", "0.5989694", "0.5987065", "0.59868205", "0.5984932", "0.59826654", "0.5981198", "0.5960095", "0.59598017", "0.59509444", "0.59486854", "0.59486854", "0.59486854", "0.594616", "0.594616", "0.594616", "0.594616", "0.594616", "0.594616", "0.594616", "0.594616", "0.5941919", "0.59413403", "0.593937", "0.593937", "0.593772", "0.5933607", "0.5931024", "0.59300584", "0.59269315", "0.59268403", "0.5925151", "0.5914064", "0.5913697", "0.5909007", "0.5908411", "0.5907595", "0.59045184", "0.59027714", "0.59022605", "0.5897955", "0.5897955", "0.58912647", "0.58907706", "0.58842456", "0.58765125", "0.5873808", "0.58677346", "0.5864306", "0.5862826", "0.5861636", "0.58612025", "0.5859407", "0.58581406", "0.58517516", "0.58416885", "0.58329207", "0.5827436", "0.5826845", "0.5826845" ]
0.7297401
1
bazi objectler external vrebiliyor cook cook what?cook pasta for example masanin uzunlugunu soyle; tableObject.length(); arabanin mileage goster carObject.displayMileage(); tell me your first and last name personObject.showName(Fatma,Ulusal); butun bunlara method deniyor system.out.println(); calling method class is a blueprinth method is action(cookie cutter and cookie gibi) string class; you have two stack and heap living room bed room gibi 2 farkli string iki farkli objectde durabilir String str1 ="Hello"; ==> string object gidiyor String str2 ="World";
public static void main(String[] args) { int x = 2; int y = x ; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void main(String[] args) {\n String obj=new String();\n obj.getData();\n obj.operation1();\n obj.operation2();\n obj.operation3();\n obj.operation4();\n }", "public static void main(String[] args) {\n Object obj1 = obterString();\n String s1 = (String) obj1; //downcasting Object para String\n\n Object obj2 = \"Minha String\";//upcasting String para Object\n String s2 = (String) obj2; //downcasting obj2 referencia uma string diretamente\n\n Object obj3 = new Object();\n String s3 = (String) obj3; //ex de downcasting vai falhar em execucao\n // nao faz referencia a uma string\n\n Object obj4 = obterInteiro();\n String s4 = (String) obj4;//nao funciona em tempo de execucao\n }", "public static void main(String[] args) {\n\t\tObject o1=new Object();\r\n\t\tObject o2=new RbiBank();\r\n\t\tObject o3=new HdfcBank();\r\n\t\tObject o4=new IciciBank();\r\n\t\tObject o5=\"RBG Technologies\";\r\n\t\tObject o6=10;\r\n\t\tObject o7=true;\r\n\t\r\n\t\t\r\n\r\n\t}", "public static void main(String[] args) {\n\t\tString name =\"Siyar\";\n\t\t\n\t\tint a=-21;\n\t\tif (a%2!=0) {\n\t\t\tSystem.out.println(\"odd\");\n\t\t} else {\n\t\t\tSystem.out.println(\"even\");\n\t\t}\n\t\t\n\t\tchar ch[]={'s','t','r','i','n','g','s'};\n\t\tString s2=new String(ch);\n\t\tSystem.out.println(ch);\n\t\t\nBookStudy num=new BookStudy();\nSystem.out.println(num.VAR(40));//=20\nname =\"mehmet\";\nnum.b1 =\"kk\";\n\t}", "public static void main(String[] args) {\n\n Car car2=new Car(\"bmw\" ,2020,250876,\"yellow\");\n\n System.out.println(car2.brand);\n System.out.println(car2.year);\n System.out.println(car2.price);\n System.out.println(car2.color);\n\n Car car3=new Car(\"toyoto\",2010,35876,\"black\");\n System.out.println(car3);//tostring\n\n Library.stars();\n car3.getCarBrandYear();\n Library.stars();\n car2.getCarBrandYear();\n\n Car car4=new Car(\"audi\",2010);\n System.out.println(car4);\n\n }", "public static void main(String[] args) {\n\t//Class name variable - new ClassName(); \n\t\n Car car1=new Car(); // we create a new object by using NEW\n \n //1 Object\n System.out.println(\"---------The first object----------\");\n car1.make=\"Honda\"; //you assign features according to their data type specified in template\n car1.model=\"Civic\"; //we can identify because this object has its unique features\n car1.color=\"Silver\";\n car1.door=4;\n car1.wheels=4; \n \n System.out.println(\"Car \"+car1.make+\" has \"+car1.wheels+\" wheels\");\n // define behavior \n car1.drive(); // if we debug when we run drive will search for same method -> it will jump to line 39\n\t\tcar1.reverse();\n\t\tcar1.honk(); \n \n //2 Object\n Car car2 = new Car();\n System.out.println(\"---------The second object---------\");\n car2.make=\"Tesla\";\n car2.model=\"X\";\n car2.color=\"Blue\";\n car2.door=4;\n car2.wheels=4;\n System.out.println(\"My car is \"+car2.color+ \" \"+car2.make);\n // define behavior\n car2.drive();\n car2.reverse();\n car2.honk();\n}", "public static void main(String[] args) {\n\t\tString A = \"This\";\n\t\tString B = \"This\";//new String()\n\t\t\n\t\tStringBuilder sb = new StringBuilder(200);\n\t\tsb.append(\"Hello\");\n\t\tsb.append(\" my name is Tiki.\");\n\t\tsb.append(\" This is my story.\");\n\t\tsb.append(\" The end.\");\n\t\t\n\t\tStringBuffer sbuff = new StringBuffer();\n\t\tsbuff.append(\"\");\n\t\t\n\t\tString result = sb.toString();\n\t\tSystem.out.println(result);\n\t\t\n\t\tA.toLowerCase();//{return new String();}\n\t\tB.toLowerCase();\n\t\t\n\t\tresult.split(\"\\\\d\\\\-\");\n\t\t\n\t\tif(result.contains(\"Tiki\"))\n\t\t{\n\t\t\tString resultSub = result.substring(result.indexOf(\"Tiki\"));\n\t\t\tSystem.out.println(\"Result: \" + resultSub);\n\t\t\tSystem.out.println(\"Character count: \" + result.length());\n\t\t}\n\t\t//A = B + \" and That\";\n\t\t\n\t\tString names = \"\";\n\t\tnames += \"Tiki\";\n\t\tnames += \",Ahad\";\n\t\tnames += \",Dat\";\n\t\tnames += \",Kevin\";\n\t\tnames += \",Son\";\n\t\t\n\t\tDemo obj1 = new Demo();\n\t\tobj1.x = 10;\n\t\tobj1.y = 2.5;\n\t\t\n\t\tDemo obj2 = new Demo();\n\t\tobj2.x = 10;\n\t\tobj2.y = 2.5;\n\t\t\n\t\tSystem.out.println(obj1);\n\t\tSystem.out.println(obj2);\n\t\t\n\t\tif(A.equals(B))\n\t\t{\n\t\t\tSystem.out.println(\"Same Object\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\tSystem.out.println(\"Not the same object\");\n\t\t}\n\t}", "public static void main(String[] args) {\n\t\tObject o3=\"chandan\";\n String n1=(String)o3;\n\t\t\n\t}", "public static void main(String[] args) {\n Cachorro cachorro = new Cachorro();\n cachorro.andar();\n System.out.println(cachorro.toString(true));\n cachorro.fazerBarulho();\n cachorro.morrer(); \n Cavalo cavalo = new Cavalo();\n cavalo.andar();\n cavalo.andar();\n System.out.println(cavalo.toString(false));\n cavalo.fazerBarulho();\n System.out.println(cavalo);\n cavalo.morrer(); \n //PatinhoDeBorracha patinho = new PatinhoDeBorracha();\n //patinho.andar();\n //patinho.fazerBarulho(); \n }", "public static void main(String[] args) {\n\t\tMyString2 object1 = new MyString2(\"Nesto nesto nesto\");\n\t\tMyString2 object2 = new MyString2(\"Nesto sto NIje bitno\");\n\t\t// poziv metoda klase\n\t\tSystem.out.println(\" Substring metoda : \" + object1.substring(3));\n\t\tSystem.out.println(\" ToUpperCase metoda : \" + object2.toUpperCase());\n\t\tSystem.out.println(\" ValueOf metoda : \" + MyString2.valueOf(true));\n\t\tSystem.out.println(\" Compare strings metoda \"\n\t\t\t\t+ object1.compare(\"nasa mala klinika\"));\n\t\tSystem.out.println(\" Compare metoda : \"\n\t\t\t\t+ object1.compare(\"Previse zadace odjednom\"));\n\n\t}", "public static void main(String[] args) {\n\t\tclass Horse{\r\n\t\t\tpublic String name;\r\n\t\t\tpublic Horse(String s) {\r\n\t\t\t\tname =s;\r\n\t\t\t}\r\n\t\t}\r\n\t\tObject o = new Horse(\"z\");\r\n//\t\tSystem.out.println(o.name);\r\n\t}", "public static void main(String[] args) {\n\n\t\tCar myCar = new Car(\"그렌져\");\n\t\tCar yourCar = new Car(\"그렌져\");\n\t\tString bigyo ;\n\t\tDate date = new Date();\n\t\t\n\t\tif(myCar.equals(yourCar.getName()) == true) {\n\t\t\tbigyo = \"같다\";\n\t\t}\n\t\telse{\n\t\t\tbigyo = \"다르다\";\n\t\t}\n\t\t\n\t\tSimpleDateFormat sdf1 = new SimpleDateFormat(\"MM-dd-YYYY\");\n\t\tString s = MessageFormat.format(\"내 차 [{0}], 니 차 [{1}] 로 {2}\", myCar.getName(), yourCar.getName(), bigyo);\n\t\tString s1 = MessageFormat.format(\"날짜: {0}, 자동차 모델 = {1}, 운전자(홍길동)\", sdf1.format(date), myCar.getName());\n\t\tSystem.out.println(s);\n\t\tSystem.out.println(s1);\n\n\t\tStringTokenizer token = new StringTokenizer(s1,\" =,()\");\n\t\t//문장에 있는 문자들을 문자단위로 구분하여 추출하려할때 쓰는 클래스 StringTokenizer.\n\t\t//StringTokenizer(구분할 문자열 변수명, \"조건들\");\n\t\t//조건들에는 공백문자도 포함하므로 조건과 조건 사이에 공백을 안써도 된다.\n\t\t//즉, 이 문장에서 구분 추출의 조건은 공백문자 / = / , / ( / ) 이다.\n\t\tSystem.out.println(token.countTokens());\n\t\t\n\t\twhile(token.hasMoreTokens()) {\n\t\t\tSystem.out.println(token.nextToken());\n\t\t}\n\t}", "public static void main(String[] args){\n // isveda teksta i konsole\n // sout - greitai atspausdina\n System.out.println(\"Hello world\");\n // metodo kvietimas maine\n\n int a = 10;\n\n // sukurtas objektas\n // tipas pavadinimas = new tipas\n MyFirstClass myFirstClass = new MyFirstClass();\n\n // per objekta kvieciamas metodas\n // ne statinis kvieciamas statiniame per klases objekta\n myFirstClass.myNotStaticMethod(a);\n\n // tiesiogiai per varda toje pacioje klaseje\n myStaticMethod();\n\n // float visada su f\n float b = 4.6f;\n\n // galima pridet d, bet nebutina\n double c = 2.4;\n\n // saugo true arba false(1 bito)\n boolean d = true;\n\n // viena raide, simbolis\n char e = 'A';\n\n // Javoj string neturi atskiro tipo, todel naudoja klase ir rasomas is didziosios(nes klase)\n String f = \"This is string!!!\";\n }", "public abstract String mo83558a(Object obj);", "public static void main(String[] args) {\n\t\tString s1 = \"My name is manish\";\n\t\t//By new keyword\n\t\tString s2 = new String(\"My name is manish\");\n\t\t//System.out.println(s1.equals(s2)); //compare values\n\t\t//System.out.println(s1==(s2));// compare references not value\n\t\t\n\t\t//Java String toUpperCase() and toLowerCase() method\n\t\tString s = \"SacHin\";\n\t\t//System.out.println(s.toUpperCase());\n\t\t//System.out.println(s.toLowerCase());\n\t\t\n\t\t//string trim() method eliminates white spaces before and after string\n\t\tString s3= \" String \";\n\t\t//System.out.println(s3.trim());\n\t\t\n\t\t//string charAt() method returns a character at specified index\n\t\tString s4 = \"Manish\";\n\t\t//System.out.println(s4.charAt(4));\n\t\t\n\t\t//string length() method returns length of the string\n\t\tString a = \"manish\";\n\t\tString a1 = \"My name is manish\";\n\t\t//System.out.println(a.length());\n\t\t//System.out.println(a1.length());\n\t\t\n\t\t//string valueOf() method coverts given type such as int, long, float, double, boolean, char and char array into string.\n\t\tint i = 23;\n\t\tchar [] ch = {'a','b','c','d'};\n\t\tString s5 = String.valueOf(i);\n\t\tString c = String.valueOf(ch);\n\t\t//System.out.println(s5+10);\n\t\t//System.out.println(s5.length());\n\t\t//System.out.println(c+10);\n\t\t//System.out.println(c.length());\n\t\t\n\t\t//string replace() method replaces all occurrence of first sequence of character with second sequence of character.\n\t\tString s6 = \"java is programming Language, java is oops language, java is easy language\";\n\t\t//String replaceString = s6.replace(\"java\",\"kava\");\n\t\t//System.out.println(replaceString);\n\t\t\n\t\t//string concat() method combines specified string at the end of this string\n\t\tString s7 = \"ram goes to home, \";\n\t\tString s8 = \"he also goes to school\";\n\t\t//System.out.println(s7.concat(s8));\n\t\t//System.out.println(s7+s8);\n\t\t\n\t\t/*\n\t\t * //string split() method splits this string against given regular expression\n\t\t * and returns a char array String s9 =\n\t\t * \"java string split method by javatpoint\"; String [] spParts = s9.split(\" \");\n\t\t * //String [] s10Parts = s9.split(\" \",4); for(int i=) {\n\t\t * System.out.print(str+\",\"); }\n\t\t */\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\n\t}", "void mo29844a(IObjectWrapper iObjectWrapper, zzxz zzxz, String str, zzatk zzatk, String str2) throws RemoteException;", "public static void main(String[] args) {\n\r\n\t\tWord word = new Word(\"Look,\");\r\n\t\tWord word2 = new Word(\" I was \");\r\n\t\tWord word3 = new Word(\"gonna go \");\r\n\t\tWord word4 = new Word(\"easy on\");\r\n\t\tWord word5 = new Word(\" you and \");\r\n\r\n\t\tSentence sent = new Sentence();\r\n\r\n\t\tsent.add(word);\r\n\t\tsent.add(word2);\r\n\t\tsent.add(word3);\r\n\t\tsent.add(word4);\r\n\t\tsent.add(word5);\r\n\r\n\t\tSystem.out.println(\"--------------\");\r\n\r\n\t\tText text = new Text(sent.sh());\r\n//\t\t\r\n//\t\ttext.headline(\"dfgsdsd\");\r\n//\t\t\r\n//\t\ttext.add(\"efwefw\");\r\n//\t\t\r\n//\t\tSystem.out.println(text.displayAll());\r\n\r\n\t\tLogic lg = new Logic(text.getText());\r\n\r\n\t\tlg.headline(\"fdsfdf\");\r\n\t\tlg.add(\"sfasfas\");\r\n\r\n\t\tSystem.out.println(lg.displayAll());\r\n\r\n\t}", "public static void main(String[] args) {\n Siswa objek1 = new Siswa(\"roby\", \"A2.1900158\",\"TI\");\n Siswa objek2 = new Siswa(\"otong\",\"A2.00001\",\"SI\");\n objek1.nama=\"fuad\";\n objek2.nama=\"mh ihsan\";\n System.out.println(objek1.nama);\n\n\n\n \n\n \n\n\n \n \n \n}", "public static void main(String[] args) {\nNhanVienChinhThuc linh= new NhanVienChinhThuc(2,\"ngo thi phuong linh\");\nNhanVienThoiVu thao= new NhanVienThoiVu(3,\"ngo thi phuong thao\");\nlinh.tinhLuong();\nthao.tinhLuong();\n\t}", "private static void zza(String object, Object object2, StringBuffer stringBuffer, StringBuffer stringBuffer2) throws IllegalAccessException, InvocationTargetException {\n if (object2 == null) return;\n if (object2 instanceof zzfjs) {\n n2 = stringBuffer.length();\n if (object != null) {\n stringBuffer2.append(stringBuffer).append(zzfjt.zzty((String)object)).append(\" <\\n\");\n stringBuffer.append(\" \");\n }\n class_ = object2.getClass();\n object5 = class_.getFields();\n n4 = ((Field[])object5).length;\n } else {\n object = zzfjt.zzty((String)object);\n stringBuffer2.append(stringBuffer).append((String)object).append(\": \");\n if (object2 instanceof String) {\n object = object2 = (String)object2;\n if (!object2.startsWith(\"http\")) {\n object = object2;\n if (object2.length() > 200) {\n object = String.valueOf(object2.substring(0, 200)).concat(\"[...]\");\n }\n }\n object = zzfjt.zzgr((String)object);\n stringBuffer2.append(\"\\\"\").append((String)object).append(\"\\\"\");\n } else if (object2 instanceof byte[]) {\n zzfjt.zza((byte[])object2, stringBuffer2);\n } else {\n stringBuffer2.append(object2);\n }\n stringBuffer2.append(\"\\n\");\n return;\n }\n for (n = 0; n < n4; ++n) {\n object6 = object5[n];\n n3 = object6.getModifiers();\n object4 = object6.getName();\n if (\"cachedSize\".equals(object4) || (n3 & 1) != 1 || (n3 & 8) == 8 || object4.startsWith(\"_\") || object4.endsWith(\"_\")) continue;\n object3 = object6.getType();\n object6 = object6.get(object2);\n if (object3.isArray() && object3.getComponentType() != Byte.TYPE) {\n n3 = object6 == null ? 0 : Array.getLength(object6);\n for (i = 0; i < n3; ++i) {\n zzfjt.zza((String)object4, Array.get(object6, i), stringBuffer, stringBuffer2);\n }\n continue;\n }\n zzfjt.zza((String)object4, object6, stringBuffer, stringBuffer2);\n }\n object4 = class_.getMethods();\n n3 = ((Method[])object4).length;\n n = 0;\n do {\n block20: {\n if (n >= n3) {\n if (object == null) return;\n stringBuffer.setLength(n2);\n stringBuffer2.append(stringBuffer).append(\">\\n\");\n return;\n }\n object5 = object4[n].getName();\n if (!object5.startsWith(\"set\")) break block20;\n object3 = object5.substring(3);\n object5 = String.valueOf(object3);\n object5 = object5.length() != 0 ? \"has\".concat((String)object5) : new String(\"has\");\n if (!((Boolean)(object5 = class_.getMethod((String)object5, new Class[0])).invoke(object2, new Object[0])).booleanValue()) ** GOTO lbl81\n {\n catch (NoSuchMethodException noSuchMethodException) {}\n }\n try {\n block22: {\n block21: {\n object5 = String.valueOf(object3);\n if (object5.length() == 0) break block21;\n object5 = \"get\".concat((String)object5);\n break block22;\n break block20;\n }\n object5 = new String(\"get\");\n }\n object5 = class_.getMethod((String)object5, new Class[0]);\n }\n catch (NoSuchMethodException noSuchMethodException) {}\n zzfjt.zza((String)object3, object5.invoke(object2, new Object[0]), stringBuffer, stringBuffer2);\n }\n ++n;\n } while (true);\n }", "public static void main(String[] args) {\n llama coolAnimal = new llama();\n llama.giveName();\n llama.giveGender();\n llama.name = \"joe the llama papa\";\n llama.gender = \"male\";\n llama.giveName();\n llama.giveGender();\n unicorn.giveName();\n unicorn.giveGender();\n\n }", "void mo29847a(IObjectWrapper iObjectWrapper, zzyd zzyd, zzxz zzxz, String str, zzamv zzamv) throws RemoteException;", "void mo29845a(IObjectWrapper iObjectWrapper, zzxz zzxz, String str, String str2, zzamv zzamv) throws RemoteException;", "public static void main(String[] args) {\n\t\t\n\t\tSingleObject object = SingleObject.getInstance();\n \n\t\tobject.showMessage();\n\t\tString myname = \"ABC\".concat(\"str\").concat(\"str\");\n\t\tSystem.out.println(myname);\n\t\t\n\t}", "void mo29848a(IObjectWrapper iObjectWrapper, zzyd zzyd, zzxz zzxz, String str, String str2, zzamv zzamv) throws RemoteException;", "public static void main(String[] args) {\n persegi_panjang pp = new persegi_panjang();\r\n pp.lebar=30;\r\n pp.panjang=50;\r\n Segitiga s = new Segitiga();\r\n s.alas=20;\r\n s.tinggi=40;\r\n Persegi p = new Persegi();\r\n p.sisi=40;\r\n lingkaran l= new lingkaran();\r\n l.jari=20;\r\n \r\npp.luas();\r\npp.keliling();\r\np.luas();\r\np.keliling();\r\ns.luas();\r\ns.keliling();\r\nl.luas();\r\nl.keliling();\r\n}", "void mo29843a(IObjectWrapper iObjectWrapper, zzxz zzxz, String str, zzamv zzamv) throws RemoteException;", "public static void main(String[] args) {\n Pasien Dam = new Pasien(\"Puspaningsyas\");\r\n Dam.setTanggalLahir(1974, 1, 12);\r\n// String str = Dam.getNama();\r\n \r\n \r\n\r\n System.out.println(\"Umur = \" + Dam.getUsia());\r\n Dam.NomorRekamMedis();\r\n // System.out.println(str.substring(0, 3));\r\n\r\n// Pasien Dam2 = new Pasien(\"Dam\");\r\n// Dam2.setTanggalLahir(1999,3,13);\r\n// System.out.println(\"Umur = \" +Dam2.getUsia());\r\n }", "public static void main(String[] args) {\n stringhandler obj=new stringhandler();\r\n obj.transform(\"Greety\");\r\n }", "public static void main(String[] args) {\n\t\tnew Object();\n\t\tSystem.out.println(new Carte(\"dsadas\", 15));\n\t\tSystem.out.println(new Carte(\"dsadas\"));\n\t\tSystem.out.println(new Carte());\n\t\tCarte crt1 = new Carte(\"Titlu roz\", 2013);\n\t\tCarte crt2 = new Carte(\"fdsfs\");\n\t\tString crt3 = crt1.titlu;\n\t\tSystem.out.println(crt3);\n\t\t\n\t}", "public static void main(String[] args) {\n\t Nosy firstTv = new Nosy() ; \n\t String textFirst = \"Ala ma kota\" ;\n\t String textSecond = \"Ala ma 2 koty\" ; \n\t \n\t /*Kazda klasa dziedziczy po klasie Object*/\n\t System.out.println(\"tekst\".toString());\n\t System.out.println(firstTv.toString());\n\t \n\t if(textFirst.equals(textSecond)) {\n\t\t System.out.println(\"Te teskty sa sobie rowne\");\n\t }else {\n\t\t System.out.println(\"Te teksty nie sa sobie rowne\");\n\t }\n\t \n\t //Operator sprawdzajacy czy dany obiekt jest instancja danej klasy\n\t if(textFirst instanceof Object) {\n\t\t System.out.println(\"textFirst jest instancja Object\");\n\t }\n\t \n\t Tv.changeVolume();\n\t \n\t /*Klasy nie moga byc statyczne*/\n\t int numberSecond = Nosy.number ;\n }", "public static void main(String []args) {\n\t\tMinion minion1 = new Minion();\n\t\tMinion minion2 = new Minion();\n\t\tMinion minion3 = new Minion();\n\t\t\n\t\t//Giving names to the minion objects\n\t\tminion1.setName(\"Kevin\");\n\t\tminion2.setName(\"Bob\");\n\t\tminion3.setName(\"Stuart\");\n\t\t\n\t\t//Giving number of eyes to each of the minion objects\n\t\tminion1.setEye(2);\n\t\tminion2.setEye(2);\n\t\tminion3.setEye(1);\n\t\t\n\t\t//Giving a String to catchPhrase for each minion object\n\t\tminion1.setCatchPhrase(\"BANANA!\");\n\t\tminion2.setCatchPhrase(\"BABOI!\");\n\t\tminion3.setCatchPhrase(\"SA LA KA!\");\n\t\t\n\t\t//Printing out minion objects' information\n\t\tSystem.out.println(\"The first minion is called \" + minion1.getName() + \", and he has \" + minion1.getEye() + \" eyes.\");\n\t\tSystem.out.println(\"The second minion is called \" + minion2.getName() + \", and he has \" + minion2.getEye() + \" eyes.\");\n\t\tSystem.out.println(\"The third minion is called \" + minion3.getName() + \", and he has \" + minion3.getEye() + \" eye.\\n\");\n\t\t\n\t\t//calling method sayCatchPhrase to print out each minion and what their catch-phrase is\n\t\tminion1.sayCatchPhrase();\n\t\tminion2.sayCatchPhrase();\n\t\tminion3.sayCatchPhrase();\n\t\t\t}", "public static void objectDemo() {\n\t}", "public static void main(String[] args) {\n\t\tBMW b= new BMW();\r\n\t\tb.start();\r\n\t\tb.stop();\r\n\t b.refuel();\r\n\t\tb.thfesafty();\r\n\t\tb.engine();\r\n\t\t\r\n\t\tSystem.out.println(\"--------\");\r\n\t\t\r\n\t\tcar c= new car();\r\n\t\tc.start();\r\n\t\tc.stop();\r\n\t\tc.refuel();\r\n\t\tc.engine();\r\n\t\t\r\n\t\t\r\n\t\tSystem.out.println(\"---------\");\r\n\t\t\r\n\t\t\r\n\t\t//top casting \r\n\t\tcar c1= new BMW(); \r\n// child class obj can be refs byparent class ref..(or) var.. is called dynamic polymorphism \r\n\t\tc1.start();\r\n\t\tc1.stop();\r\n\t\tc1.refuel();\r\n\t\t\r\n\t\t\r\n\t\t//dowm casting\r\n\t\t\r\n\t\t//BMW B =(BMW) new car();\t\r\n\t\t}", "public static void main(String[] args) throws Exception {\nSystem.out.println(\"i love nayanthara\");\nSystem.out.println(\"i love trisha\");\nSystem.out.println(\"i love keerthisuresh\");\n\n \n \n\t }", "void mo29851b(IObjectWrapper iObjectWrapper, zzxz zzxz, String str, zzamv zzamv) throws RemoteException;", "public static void main(String[] args){\n //uso correcto de git aaaaa por fin lo comprendi, bueno, por ahora :/...\n\n Perro dog = new Perro(\"Teddy\", \"Callejero\", \"Croquetas\", 2, \"Fuerte\");\n Gato cat = new Gato(\"Miau\", \"Hogareño\", \"Atún\", 1, 7);\n //Perico\n Perico parrot = new Perico(\"Pericles\", \"Loro gris\", \"Galletas\", 1, \"Saludos humanos\");\n //Hamster\n Hamster ham = new Hamster(\"Hamilton\", \"Hamster chino\", \"Apio\", 4, \"Morado\");\n //No recuerdo lol...\n\n //los metodos\n dog.mostrarPerro();\n System.out.println(\"-------\");\n cat.mostrarGato();\n System.out.println(\"-------\");\n parrot.mostrarPerico();\n System.out.println(\"-------\");\n ham.mostrarHamster();\n System.out.println(\"_______\");\n \n }", "public static void main(String agrs[]){\n\t\t\n\t\tAnimal m = new Cat(); \n\t\n\t\n\t\ttestVoice(m);\n\t\t//只写了Animal方法区,m猫对象只有这个方法的地址却找不到方法区中animal类的方法//\n\t\tAnimal n = new Dog();\n\t\tDog k = (Dog)n;\n\t\ttestVoice(n);\n\t\tk.seeDoor();\n\t}", "public void model(){\n\t\t\t String model = \"Honda Shine\";\r\n\t\t\t System.out.println(\"bike model is\"+ model);\r\n\t\t }", "public static void main(String[] args) {Dog dog1 = new Dog();\n//\t\tdog1.name=\"Bubbly\";\n//\t\tdog1.age=5;\n//\t\tdog1.breed=\"Poodle\";\n//\t\tdog1.color=\"White\";\n//\t\t\n//\t\tSystem.out.println(dog1.name + \":\" + dog1.age + \":\" + dog1.breed + \":\" + dog1.color);\n//\t\t\n//\t\tdog1.bark();\n//\t\tdog1.eat();\n//\t\tdog1.wagTail();\n//\t\t\n//\t\tSystem.out.println(\"--------------\");\n\t\t\n\t\t\n//\t\tDog2 dog = new Dog2();\n//\t\tSystem.out.println(dog.name + \":\" + dog.age + \":\" + dog.breed + \":\" + dog.color);\n//\t\t\n\t\tDog2 dog2=new Dog2();\n\t\tSystem.out.println(dog2.name + \":\" + dog2.age + \":\" + dog2.breed + \":\" + dog2.color);\n\t\t\n//\t\tDog2 dog3=new Dog2(\"Rusty\",20,\"Bulldog\",\"Black\");\n//\t\tSystem.out.println(dog3.name + \":\" + dog3.age + \":\" + dog3.breed + \":\" + dog3.color);\n\n\t\t\n\t\t\n\t}", "public static void main(String[] args) {\nPar1 obj1 = new Par1();\nSon1 obj2 = new Son1();\nPar1 obj3 = new Son1(); //업캐스팅\nobj3.method1(); //하위클래스에서 재정의된 Method1()사용\n\n//추상클래스\n//par2 obj4 = new par2 ();//추상 클래스로는 객체 생성이 불가능\nSon2 obj5 = new Son2(); // 추상매서드를 재정의한 자식클래스는 객체생성가능\nPar2 obj6 = new Son2(); //업캐스팅\nobj3.method1();\n\t\n\t}", "public static void main(String[] args) {\n\t\tCar carUserObj = new Car();\n\t\t//carUserObj.sound();\n\t\tcarUserObj.drive();\n\t\tCar CarObject2= new Car();\n\t\tcarUserObj.changSpeed();\n\t\tSystem.out.println(\"enginType \"+ carUserObj.enginType);\n\t\t//System.out.println(\"modelName \"+ carUserObj.modelName);\n\t}", "public static void main(String[] args) {\n\t\tPerson firstPerson = new Person();//instansiasi by reference variable\n\t\tPerson secondPerson = new Person(\"Rizalddi\", \"Rnensia\", \"Male\", \"Music, Food\", 21);//instansiasi by konstruktor\n\t\tPerson thirdPerson = new Person(\"Arul\", \"Aral\", \"Male\", \"soccer\", 30);//instansiasi by konstruktor\n\t\t\n\t\t\n\t\tfirstPerson.firstName\t= \"Rizaldi\";// instansiasi by reference variable\n\t\tfirstPerson.lastName\t= \"Rnensia\";\n\t\tfirstPerson.age\t\t\t= 29;\n\t\tfirstPerson.gender\t\t= \"Male\";\n\t\tfirstPerson.interest\t= \"Music, food, travel\";\n\t\t\n\t\tSystem.out.println(\"Orang ke 1 : \");\n\t\tfirstPerson.biodata();// instansiasi by method\n\t\tfirstPerson.greeting();\n\t\tSystem.out.println(\"Orang ke 2 : \");\n\t\tsecondPerson.biodata();// instansiasi by method\n\t\tsecondPerson.greeting();\n\t\tSystem.out.println(\"Orang ke 3 : \");\n\t\tthirdPerson.biodata();// instansiasi by method\n\t\tthirdPerson.greeting();\n\t\tthirdPerson.sayThanks();\n\t\t\n\t\tTeacher firstTeacher = new Teacher();\n\t\tfirstTeacher.firstName\t= \"asep\";\n\t\tfirstTeacher.lastName\t= \"Sutiawan\";\n\t\tfirstTeacher.age\t\t= 29;\n\t\tfirstTeacher.gender\t\t= \"Male\";\n\t\tfirstTeacher.interest\t= \"noodles\";\n\t\tfirstTeacher.subject\t= \"Math\";\n\t\t\n\t\tSystem.out.println(\"\\nGuru ke 1 : \");\n\t\tfirstTeacher.biodata();\n\t\tfirstTeacher.greeting();\n\n\t\tStudent firstStudent = new Student(\"Richa\", \"Fitria\", \"Female\", \"Makan\", 20);\n\t\t\n\t\tSystem.out.println(\"\\nMurid ke 1 : \");\n\t\tfirstStudent.biodata();\n\t\tfirstStudent.greeting();\n\t}", "public static void main(String[] args) {\n\t\tObject01 ob1 = new Object01();\n\t\tString st1 = ob1.returnExp();\n\t\tString st2 = ob1.returnExp();\n\t\tString st3 = ob1.returnExp();\n\t\t\n\t\tSystem.out.println(st1);\n\t\tSystem.out.println(st2);\n\t\tSystem.out.println(st3);\n\t\t\n\t\tObject01 ob2 = new Object01();\n\t\tSystem.out.println(ob2.returnExp1());\n\t\tSystem.out.println(ob2.returnExp2());\n\t\tSystem.out.println(ob2.returnExp3());\n\t\tSystem.out.println(ob2.returnExp4());\n\t\tSystem.out.println(ob2.returnExp5());\n\t\t\n\t\t// 배열을 리턴해오는 메소드들 출력이 잘 못되서 확인을 못한 것,,\n\t\tSystem.out.println(ob2.returnExp6());\n\t\tSystem.out.println(ob2.returnExp7());\n\t\t\n\t\t// 배열이 리턴되므로 배열에 해당하는 데이터 type으로 할당하여 사용해야함\n\t\tint[] chA = ob2.returnExp6();\n\t\tSystem.out.println(chA[0]);\n\t\t\n\t\t\n\t\t\n\t}", "public static void main(String[] args) {\n\t\tString make = \"Toyota\";\n\t\tString Model =\"Highlander\";\n\t\tSystem.out.println(\"My car is New \"+make+\" \"+Model);\n\t\tSystem.out.println(\"What Year is My Car \"+make+\" \"+Model);\n\t\t\n\t\t\n\t\tString Hello_$ =\"mmmmmmm\";\n\t\t\n\t\t\n\t\tString Ammi2019$ =\"jhihn\";\n\t\tSystem.out.println(\"Ammi ke abbu ke abbu\");\t\t\n\t\tString something999999_$$;\n\t\tString $____________________;\n\t\tint $;\n\t\tString String;\n\t\tString Static;\n\t\tString Public;\n\t\tString Boolean;\n\t\tString Abstract;\n\t\tString Else;\n\t\tString Protected;\n\t\tint if_;\n\t\tint ifabbu_;\n\t\tint count;\n\t\tint numberofPeople;\n\t\tString name = \"Goochi\";\n\t\tSystem.out.println(name);\n\t\t\n\t\n\t}", "public static void main(String[] args) {\nconstructorDemo obj=new constructorDemo();\nconstructorDemo obj1=new constructorDemo(\"My Parameter\");\nconstructorDemo obj2=new constructorDemo(123);\nconstructorDemo obj3=new constructorDemo(123,6);\nSystem.out.println(\"code after creating object\");\nobj.hello();\nobj.hello(\"hi\");\n\t}", "public void main(String[] args) {\n\t\tManipulationChaine car = new ManipulationChaine();\n\n\t\tchar premierCaractere = car.chaine.charAt(0);\n\t\tint longueur = car.chaine.length();\n\t\tint index = car.chaine.indexOf(';');\n\t\tString familyName = car.chaine.substring(0,index);\n\t\tString majName = familyName.toUpperCase();\n\t\tString minName = familyName.toLowerCase();\n\t\tString[] allChar = car.chaine.split(\";\");\n\t\tSystem.out.println(\"Premier caractère: \" + premierCaractere);\n\t\tSystem.out.println(\"Le longueur de la chaine est de: \" + longueur);\n\t\tSystem.out.println(\"Le caractère ; se trouve a l'index: \" + index);\n\t\tSystem.out.println(\"Le nom de famille est : \" + familyName);\n\t\tSystem.out.println(\"Le nom de famille en majuscule est: \" + majName);\n\t\tSystem.out.println(\"Le nom de famille en minuscule est: \" + minName);\n\t\tSystem.out.println(Arrays.toString(allChar));\n\t\tallChar[2] = allChar[2].replace(\" \",\"\");\n\t\tdouble salaire = Double.parseDouble(allChar[2]); \n\t\tSalarie newSalarie = new Salarie(allChar[0],allChar[1],salaire);\n\t\t\n\t\tSystem.out.println(newSalarie.toString());\n\t\t\n\t\t\n\t\t\n\t}", "public static void main(String[] args) {\n\t\tPerson p1 = new Person(\"홍길동\", \"1234-5678\");\r\n\t\tp1.eat();\r\n\t\t\r\n\t\tStudent s1 = new Student(\"이순신\",\"1234-5678\",\"전사공학자\");\r\n\t\ts1.eat();\r\n\t\ts1.study();\r\n\t\t\r\n\t\tTeacher t1 = new Teacher(\"강감찬\",\"5555-6666\",\"Java\");\r\n\t\tt1.eat();\r\n\t\tt1.teach();\r\n\t}", "public static void main(String[] args) {\n Student sv;\n\n //cap phat bo nho cho bien doi tuong [sv] \n sv = new Student();\n\n //gan gia tri cho cac fields cua bien [sv]\n sv.id = \"student100\";\n sv.name = \"Luu Xuan Loc\";\n sv.yob = 2000;\n sv.mark = 69;\n sv.gender = true;\n\n //in thong tin doi tuong [sv]\n sv.output();\n\n //tao them 1 bien doi tuong [sv2] kieu [Student]\n Student sv2 = new Student();\n //gan gia tri cho cac fields cua doi tuong [sv2]\n sv2.id = \"student101\";\n sv2.name = \"Nguyen Ngoc Son\";\n sv2.yob = 2004;\n sv2.mark = 85;\n sv2.gender = false;\n\n //in thong tin doi tuong [sv2]\n sv2.output();\n\n //tao them 1 bien doi tuong [sv3] kieu [Student]\n Student sv3 = new Student();\n //in thong tin doi tuong [sv3]\n sv3.output();\n }", "public static void main(String[] args) {\nsample1 obj=new sample1();\r\n\t}", "public static void main(String[] args) {\n String str=new String(\"ab\");//创建几个对象?\n }", "public static void main(String[] args) {\n\t\tString s1 = new String(\"!!!Hello!!!\");\r\n\t\tObject object = s1;\r\n\t\tSystem.out.println(object);\r\n\t\tSystem.out.println(object.hashCode());\r\n\t\tSystem.out.println(s1.hashCode());\r\n\t\t\r\n\t\t\r\n\t\tClass clas = s1.getClass();\r\n\t\tSystem.out.println(clas.getName());\r\n\t\tSystem.out.println(s1.getClass().getName());\r\n\r\n\t}", "public static void main(String[] args) {\n\t\tString name=\"Jhon\";\n\t\t\n\t\tSystem.out.println(name);\n\t\t\n\t\tSystem.out.println(\"The length of nameis= \"+name.length()); // string name.length = index sayisini verir yani 4 \n\t\t\n////////////////\n\t\t\n//****\t//2\n\t\t//Creating String with new key word\n\t\t\n\t\tString name1=new String(\"John1\");\n\t\t\n\t\tSystem.out.println(name1);\n\t\t\n/////////////////////\n\t\t\n//****\tStringin uzunlugunu bulma\n\t\t/* \n\t\t//\t.length() \n//\t\t *This method returns the length of this string. \n//\t\t *The length is equal to the number \n//\t\t *of 16-bit Unicode characters in the string. \n//\t\t */\n\n\t\t \n//**\t\n\t\tint name1Len=name1.length();\n\t\tSystem.out.println(\"The lenght of name1 is= \"+name1Len); // sonuc 5 cikar\n\t\t\n\t\tSystem.out.println(\"=================\");\n\t\t\n\t\t\n\t\t\n//** \n\t\tString Str1 = new String(\"Welcome Student\");\n\t\tString Str2 = new String(\"Tutorials\" );\n\t\t\n\t\t System.out.print(\"String Length :\" );\n\t\t System.out.println(Str1.length()); // 15 cikar\n\t\t \n\t\t System.out.print(\"String Length :\" );\n\t\t System.out.println(Str2.length()); // 9 cikar\n\t\t\n////////////////////////\t\t\n\t\t\n//**** Lowercase yapma\t\n\t\t\n\t\t/*\n\t\t * toLowerCase();\n\t\t * This method converts all of the \n\t\t * characters in this String to lowercase \t\n\t\t */\n\t\t \n\t\tString str1=\"HelLo woRld\";\n\t\t\n\t\tSystem.out.println(\"Before:: \"+str1);\n\t\t\n\t\tstr1 = str1.toLowerCase();\n\t\t\n\t\tSystem.out.println(\"After:: \"+str1); // hello world cikar\n\t\t\n\t\tSystem.out.println(\"=================\");\n\n//////////////////////////////////\n\n//****\t\tUppercase yapma\n\t\t/*\n\t\t * toUpperCase();\n\t\t * This method converts all of the characters in \n\t\t * this String to uppercase\n\t\t */\n\n//**\n\t\tString str3=\"Mohammad\";\n\t\t\n\t\tSystem.out.println(\"Before: \"+str3);\n\t\t\n\t\tstr3=str3.toUpperCase();\n\t\t\n\t\tSystem.out.println(\"After: \"+str3); // MOHAMMAD\n\t\t\n//**\n\t\t\n\t\tString Str = new String(\"Welcome on Board\");\n\t\t\t \n\t\tSystem.out.print(\"Return Value :\" );\n\t\t\n\t\tSystem.out.println(Str.toUpperCase() ); // WELCOME ON BOARD\n\t\t\n//////////////////////////////////////\t\t\n\t\t\n//****\n\t\t\n//\t\t.equalsIgnoreCase();\n\t\t\n//\t\tThis method does not care for capitalization and compare the\n//\t\tcontent only\n\t\t\n//\t\tThis method compares this String to another String, ignoring case\n//\t\tconsiderations. Two strings are considered equal ignoring case if\n//\t\tthey are of the same length, and corresponding characters in the\n//\t\ttwo strings are equal ignoring case.\n\t\t\n//**\t\n\t\tString str7=\"HElLo WoRld\";\n\t\tString str8 = \"HelLo WorLD\";\n\t\t\n\t\tSystem.out.println(str8.equalsIgnoreCase(str7)); //true\n\t\t\n\t\t\n\t\t\n\t\t\n\t}", "public static void main(String[] args) {\n\t\t \n\t StaticTestString s1 = new StaticTestString (111,\"Karan\"); \n\t s1.change();\n\t StaticTestString s2 = new StaticTestString (222,\"Aryan\"); \n\t StaticTestString s3 = new StaticTestString (333,\"Sonoo\"); \n\t \n\t s1.display(); \n\t s2.display(); \n\t s3.display(); \n\t }", "private static void main (String[] args) {\n Buku a = new Buku(\"Matahari\",\r\n \"Tere Liye\",\r\n \"Gramedia\",\r\n \"97860239034\",\r\n \"Novel Remaja\");\r\n\r\n //buat object b dari class Jurnal\r\n Jurnal b = new Jurnal(\"Persepsi Wisatawan Terhadap Kualitas Pelayanan Pramuwisata di Bali\",\r\n \"IBS Putra\",\r\n \"Jurnal IPTA\",\r\n \"Universitas Udayana\",\r\n \"https://doi.org/10.24843/IPTA.2017.v05.i01.p07\",\r\n \"Vo. 5 no. 1\",\r\n \"2017\");\r\n\r\n //Panggil method Cetak dari superclass\r\n a.Cetak();\r\n b.Cetak();\r\n }", "public static void main(String[] args) {\n\t\tBaby baby1 = new Baby();\n\t\tbaby1.cry();\n\t\tbaby1.firstname = \"jhon\";\n\t\tbaby1.lastname = \"smith\";\n\t\tbaby1.gender = 'M';\n\t\tbaby1.weight = 7;\n\t\tbaby1.haircolor = \"yellow\";\n\n\t\tSystem.out.println(\"baby first name is \" + baby1.firstname);\n\t\tbaby1.cry();\n\t\tbaby1.talk(3);\n\t\t\n\t\t\n\t\tBaby baby2=new Baby();\n\t\tbaby2.firstname=\"selin\";\n\t\tbaby2.lastname=\"atasoy\";\n\t\tbaby2.gender='F';\n\t\tbaby2.weight=6;\n\t\tbaby2.haircolor=\"black\";\n\t\tSystem.out.println(\"Baby 1\");\n\t\tbaby1.displayinfo();\n\t\tSystem.out.println(\"Baby 2\");\n\t\tbaby2.displayinfo();\n\t}", "public static void main(String args[]) { \r\n\tCW27FebClass dog =new CW27FebClass(); //Constructor declaration\r\n\tdog.bark(); // Object creation & Calling the Class method execution \r\n\tdog.walk();\r\n\tSystem.out.println(\"Print the Class Method Declaration tail variable :\" +dog.tail);\r\n\tSystem.out.println(\"Print the Class Method Declaration legs variable :\" +dog.legs);\r\n\t\r\n}", "slco.Object getObject1();", "public static void main(String[] args) {\n\r\n\t\templeado emple = new empleado(\"Jonnhy\", 25, 1800);\r\n\t\tSystem.out.println(emple.toString());\r\n\t\t\r\n\t\tcomercial com = new comercial(\"Joseph\", 23, 1200, 100);\r\n\t\tSystem.out.println(com.toString());\r\n\t\t\r\n\t\trepartidor rep = new repartidor(\"Jonathan\", 45, 43, \"zona2\");\r\n\t\tSystem.out.println(rep.toString());\r\n\t\t\r\n\t}", "public static void main(String[] args) {\r\n\t\t\r\n//\t\tSystem.out.println(\"Start here\");\r\n//\t\tCars vinCar = new Cars(\"Red\", \"BMW\", \"M5\", 2018, 100,2); // object 1\r\n//\t\tCars ahmadsCar = new Cars(\"Black\",\"Merc\",\"c63 amgs\",2020,150,2); // object 2\r\n\t\tCars newCar = new Cars();\r\n//\t\tnewCar.setBrand(\"Audi\");\r\n////\t\tnewCar.setColour(\"green\");\r\n//////\t\tnewCar.setModel(\"A5\");\r\n//\t\tnewCar.setSpeed(0);\r\n//\t\tnewCar.setYear(2020);\r\n////\t\tnewCar.setNoWheels(0);\r\n\t\tSystem.out.println(newCar.getNoWheels());\r\n//\t\tSystem.out.println(newCar.col);\r\n\t\t//System.out.println(newCar);\r\n\t\t\r\n\t\t//System.out.println(vinCar);\r\n//\t\tSystem.out.println(ahmadsCar);\r\n\t//\tvinCar.setBrand(\"Audi\");\r\n\t\t//System.out.println(vinCar.getBrand());\r\n\t\t//System.out.println(vinCar);\r\n//\t\tSystem.out.println(vinCar.drive(123));\r\n\t\t\r\n\r\n\t}", "public static void main(String[] args) {\n ALuno a1=new ALuno(500);\n a1.setNome(\"Claudio\");\n a1.setMatricula(1111);\n a1.setCurso(\"Informatica\");\n a1.setIdade(16);\n a1.setSexo(\"M\");\n a1.pagarMensalidade(400);\n //bolsista\n Bolsista b1 = new Bolsista(1000);\n b1.setMatricula(1112);\n b1.setNome(\"Jubileu\");\n b1.setSexo(\"M\");\n b1.pagarMensalidade();\n }", "void mo6504by(Object obj);", "public static void main(String[] args)\r\n\t{\r\n\t\tBook b1 = new Book(\"Simple Book\"); // instantiation of Book class. b1.\r\n\t\tScience s1 = new Science(\"Hello Physics!\", \"ScienceWorld\"); // instantiation of Science class. s1.\r\n\t\tHistory h1 = new History(\"What Is history?\", \"E.H.Carr\"); // instantiation of History class. h1\r\n\t\tHistory h2 = new History(\"The South Korea\", \"Judis\");// instantiation of History class. h2\r\n\t\t\r\n\t\tb1.showthebook(); // call to the showthebook method in the book class. b1\r\n \t\ts1.showthebook(); // call to the showthebook method in the Science class. s1\r\n\t\th1.showthebook(); // call to the showthebook method in the History class. h1\r\n\t\th2.showthebook(); // call to the showthebook method in the History class. h2\r\n\t}", "public static void main(String[] args) {\n\t\tPerson person = new Person();\n\t\tPerson p1 = new Person(\"小强\",19);\n\t\tp1.speak();\n\t}", "public void mo55574a(String str, Object obj) {\n C3561h5.m954c().mo55465a().execute(new C3625j(str, obj));\n }", "public static void main(String[] args) {\n\t\tBbs b1 = new Bbs(1, \"java\", \"fun java\", \"park\");\r\n\t\tBbs b2 = new Bbs(2, \"jsp\", \"fun jsp\", \"hong\");\r\n\t\tBbs b3 = new Bbs(3, \"spring\", \"fun spring\", \"kim\");\r\n\t\t\r\n\t\tSystem.out.println(\"no \"+\"title \"+ \"content \" + \"writer \");\r\n\t\tSystem.out.println(b1);\r\n\t\tSystem.out.println(b2);\r\n\t\tSystem.out.println(b3);\r\n\r\n\t}", "public static void main(String[] args) {\n\t\tCoffee coffee1 = new Coffee(\"Starbucks Frapachino\", 4.25, 3, 14, 40);\n\t\t\n\t\t// Juice objects\n\t\tJuice juice1 = new Juice(\"Apple\", 2.25, 5, 16, \"Fruit Juice\");\n\t\tJuice j = new Juice(\"Orange\", 2.25, 1, 20, \"Fruit Juice\");\n\t\t\n\t\t// Milk object \n\t\tMilk milk1 = new Milk(\"Horizon Vanilla\", 3.55, 3, 12, 4);\n\t\t\n\t\t// Soda object\n\t\tSoda soda1 = new Soda(\"Coke\", 2.25, 6, 20, 180);\n\t\t\n\t\t// Water object\n\t\tWater water1 = new Water(\"Ice Water\", 2.00, 4, 15, \"Strawberry\");\n\t\t\n\t\t// Coffee print\n\t\tSystem.out.println(coffee1.toString() + \"\\n\");\n\t\t\n\t\t// Juice prints\n\t\tSystem.out.println(juice1.toString() + \"\\n\");\n\t\tSystem.out.println(j.toString() + \"\\n\");\n\t\t\n\t\t// Milk Print\n\t\tSystem.out.println(milk1.toString() + \"\\n\");\n\t\t\n\t\t// Soda Print\n\t\tSystem.out.println(soda1.toString() + \"\\n\");\n\t\t\n\t\t// Water Print\n\t\tSystem.out.println(water1.toString() + \"\\n\");\n\t\t\n// Snacks String name, double price, int quantity, int nutritionRating\n\t\t// Candy object\n\t\tCandy candy1 = new Candy(\"Snickers\", 1.69, 2, 4, 1);\n\t\t\n\t\t// Chips object\n\t\tChips chips1 = new Chips(\"Daritos: Nacho\", 1.25, 4, 15, 1);\n\t\t\n\t\t// Fruit object\n\t\tFruit fruit1 = new Fruit(\"Green Apple\", .99, 3, 89, \"Whole Fruit\");\n\t\t\n\t\t// Gum object\n\t\tGum gum1 = new Gum(\"Orbit: Mint\", 1.79, 12, 2, 18);\n\t\t\n\t\t// Sandwich object\n\t\tSandwich sandwich1 = new Sandwich(\"Black Forest Ham\", 3.50, 2, 78, \"6 inch\");\n\t\t\n\t\t// Candy print\n\t\tSystem.out.println(candy1.toString() + \"\\n\");\n\t\t\n\t\t// Chips print\n\t\tSystem.out.println(chips1.toString() + \"\\n\");\n\t\t\n\t\t// Fruit print\n\t\tSystem.out.println(fruit1.toString() + \"\\n\");\n\t\t\n\t\t// Gum print\n\t\tSystem.out.println(gum1.toString() + \"\\n\");\n\t\t\n\t\t// Sandwich print\n\t\tSystem.out.println(sandwich1.toString() + \"\\n\");\n\t}", "public static void main(String args[]){\n SingleTonClass myobject= SingleTonClass.objectCreationMethod();\r\n SingleTonClass myobject1= SingleTonClass.objectCreationMethod();\r\n myobject.display();\r\n myobject.b = 600;\r\n myobject1.display();\r\n myobject1.b = 800;\r\n SingleTonClass myobject2 = new SingleTonClass();\r\n myobject2.display();\r\n }", "private static String m6819d(String str, Object... objArr) {\n if (objArr != null) {\n str = String.format(Locale.US, str, objArr);\n }\n StackTraceElement[] stackTrace = new Throwable().fillInStackTrace().getStackTrace();\n String str2 = \"<unknown>\";\n int i = 2;\n while (true) {\n if (i >= stackTrace.length) {\n break;\n } else if (!stackTrace[i].getClassName().equals(f5338c)) {\n String className = stackTrace[i].getClassName();\n String substring = className.substring(className.lastIndexOf(46) + 1);\n String substring2 = substring.substring(substring.lastIndexOf(36) + 1);\n String methodName = stackTrace[i].getMethodName();\n StringBuilder sb = new StringBuilder(String.valueOf(substring2).length() + 1 + String.valueOf(methodName).length());\n sb.append(substring2);\n sb.append(\".\");\n sb.append(methodName);\n str2 = sb.toString();\n break;\n } else {\n i++;\n }\n }\n return String.format(Locale.US, \"[%d] %s: %s\", new Object[]{Long.valueOf(Thread.currentThread().getId()), str2, str});\n }", "public void parler() {\n\t System.out.println(this.formulerMonNom()); // appel d'une méthode de l'objet\n\t System.out.println(\"Je suis un animal et j'ai \" + this.nombreDePatte + \" pattes\");\n\t }", "public static void main(String[] args) {\n\t\t\n\t MethodExample object=new MethodExample();\n\t object.greet(\"Sarmed\");\n\t object.greet(\"Farid\");\n\t object.greet(\"John\");\n\t object.greet(\"Gulen\");\n\t}", "public static void main(String[] args) {\n\t\tSystem.out.println(\"hello world\");\nhell clsk1 = new hell(30,40);\nhell clsk2 = new hell(30,40);\nhell clsk3 = new hell();\n\n\nfloat result = clsk1.add(clsk1.v,clsk1.r);\nSystem.out.println(\"add should print method overloading and construction overloding 2 variables \"+result);\nfloat result1 = clsk2.add(clsk2.v,clsk2.r,clsk2.o);\nSystem.out.println(\"add should print method overloading and construction chaining 3 variables with 2 variables \"+result1);\nfloat result2 = clsk3.add(12,14,50,80);\nSystem.out.println(\"hello world\"+result2);\n\n\t}", "public static void main(String[] args) {\n\t\tCat cat=new Cat(\"Kira\",8); \n\t\tSystem.out.println(cat); \n\t\tcat.getSound(); \n\t\tcat.eat(); \n\t\tcat.eat(\"wiskas\"); \n\t}", "public static void main(String[] args) {\r\n\t\t//A obj = new A(); //A cannot be resolved to a type...try to access the class A method in thz class -- error \r\n\t // obj.i = 80; //here..The field A.i is not visible...it, allow as to create the object, but still it is not allow as to access thev & m, bcoz if we dont specify anything-- default(V & M) so it only accessible within the package.\r\n\t\r\n\t // obj.j = 90; //The field A.j is not visible -- error, cant access since it is protected.\r\n\t // obj.flow(); //The method flow() from the type A is not visible, cant access since it is protected.\r\n\t \r\n\t B obj1 = new B(); //extended class A, so we can access its V and M here.\r\n\t obj1.j = 70;\r\n\t obj1.flow();\r\n\t \r\n\t A obj3 = new A(); // here no need to extend class A , just create obj for A class and access it, bcoz it is \"public\".\r\n\t obj3.D = 100;\r\n\t obj3.sub();\r\n\t}", "public static void main(String[] args) {\n String eName = \"Edison\";\n int eAge = 4;\n double eWeight = 13.4;\n\n String tesName = \"Tesla\";\n int tesAge = 7;\n double tesWeight = 6.9;\n\n // Object WITHOUT constructor\n Cat ncEdison = new Cat();\n ncEdison.name = \"Edison\";\n ncEdison.age = 4;\n ncEdison.weight = 13.4;\n ncEdison.printDescription();\n\n // Object WITH constructor\n Cat cTesla = new Cat(\"Tesla\", 7, 6.9);\n Cat cSpotify = new Cat(\"Spotify\", 8, 3.4);\n\n cTesla.printDescription();\n cSpotify.printDescription();\n\n Cat mystery = new Cat();\n mystery.printDescription();\n\n Dog fido = new Dog(\"Fido\", 15, 30);\n// Dog frodo = new Dog(); // No default constructor for Dog()\n\n// System.out.println(fido.weight); // Is private\n\n Journal diary = new Journal();\n diary.append(\"Today Tesla was evil\");\n diary.append(\"Today Edison was asleep\");\n String theWords = diary.getWords();\n theWords = \"_deleted by timmy\";\n\n // Static\n ElectricCharge blanket = new ElectricCharge(7);\n ElectricCharge pants = new ElectricCharge(2);\n ElectricCharge pyjamas = new ElectricCharge(5);\n ElectricCharge socks = new ElectricCharge(4);\n\n System.out.println(\"The total Charge is: \" + ElectricCharge.getTotalCharge());\n\n }", "static String filterString(Object o, String str) {\r\n // if (o instanceof Named) {\r\n // Named n = (Named) o;\r\n // str = str.replace(\"$name\", n.getName());\r\n // // System.out.println(n.getName());\r\n // }\r\n // if (o instanceof Described) {\r\n // Described n = (Described) o;\r\n // str = str.replace(\"$description\", n.getDescription());\r\n // }\r\n return str;\r\n }", "public static void main(String[] args) {\n Toy ironMan = ToyFactory.createToy(\"Hero\", \"Iron Man\", \" I am Iron man!\", 75, null);\n Toy thanos = ToyFactory.createToy(\"Villian\", \"Thanos\", \"I am inevitable!\" , 85, \"Infinity Gaunlet\");\n // Toy redHulk = ToyFactory.createToy(\"Villian\", \"Red Hulk\", \"It culmnber time\", 50, \"cars\");\n // Toy joker = ToyFactory.createToy(\"Villian\", \"Put a smile on that face!\", \"Joker\", 75, \"Knife\");\n // System.out.println(thanos.getWeapon());\n // redHulk.another();\n\n System.out.println(ironMan.getWeapon());\n\n // ironMan.sayCatchPhrase();\n }", "public static void main(String[] args){\n\n AlfredQuotes alfred = new AlfredQuotes();\n String testGreeting = alfred.basicGreeting();\n System.out.println( testGreeting );\n String testDate = alfred.dateAnnouncement();\n System.out.println( testDate );\n // storing in a string the return of a function\n // String testAlexa = alfred.respondBeforeAlexis(\"hello my name is Alfred\");\n // System.out.println( testAlexa );\n // printing the method of a function\n System.out.println( alfred.respondBeforeAlexis(\"hello my name is Alfred\") );\n }", "public static void main(String[] args) {\n Person p = new Person();\n p.hello();\n int age = 19;\n Integer arg2 = 19;\n// arg2.intValue();\n char c = 'A';\n byte b = 120;\n float weight = 66.5f;\n boolean adult = true;\n boolean enroll = false;\n String name = \"Richard\";\n\n\n }", "private void strin() {\n\n\t}", "public static void main(String args[]) {\n Human obj = new Boy();\n /* Reference is of HUman type and object is\n * of Human type.\n */\n Human obj2 = new Human();\n obj.walk();\n obj2.walk();\n }", "public static void main(String[] args) {\n\r\n String nome = \"Mario\"; //object literal\r\n String outro = \"Alura\"; //má prática, sempre prefere a sintaxe literal\r\n\r\n String novo = outro.replace(\"A\", \"a\");\r\n System.out.println(novo);\r\n\r\n String novo2 = nome.toLowerCase(); //também teste toUpperCase()\r\n System.out.println(novo2);\r\n\r\n char c = nome.charAt(3); //char i\r\n System.out.println(c);\r\n\r\n int pos = nome.indexOf(\"rio\");\r\n System.out.println(pos);\r\n\r\n String sub = nome.substring(1);\r\n System.out.println(sub);\r\n\r\n for (int i = 0; i < nome.length(); i++) {\r\n System.out.println(nome.charAt(i));\r\n }\r\n\r\n StringBuilder builder = new StringBuilder(\"Socorram\");\r\n builder.append(\"-\");\r\n builder.append(\"me\");\r\n builder.append(\", \");\r\n builder.append(\"subi \");\r\n builder.append(\"no \");\r\n builder.append(\"ônibus \");\r\n builder.append(\"em \");\r\n builder.append(\"Marrocos\");\r\n String texto = builder.toString();\r\n\r\n System.out.println(texto);\r\n }", "public static void main(String[] args) {\n\t\t\r\n\t\tStringBuffer s1 = new StringBuffer(\"This method returns the reversed object on which it was called\");\r\n\t\tSystem.out.println(\"Original string: \" + s1);\r\n\t\ts1.reverse();\r\n\t\tSystem.out.println(\"Reversed string: \" + s1);\r\n\r\n\t}", "public static void main(String[] args) {\n\tA1 a=new A1();\n//\t//a.m1();\n//\t//B1 a=new B1();\n//\tA1 a=new C();\n\ta.m1();\n\t//int x=20;\n\tString x=\"20\";\n\tSystem.out.println(x);\n\t\n\tint in =1;\n\tInteger obj =in;\n\t\nf\n\n}", "public static void main (String[] arg){\n\n Personnage[] tpers = {new Guerrier(),new Sniper(),new Chirirugien(),new Medecin(), new Civil()};\n\n for (Personnage p : tpers) {\n\n System.out.println(\"\\t Instancier de\" +p.getClass().getName());\n System.out.println(\"********************************\");\n p.seDeplacer();\n p.soigne();\n p.combattre();\n\n\n }\n System.out.println(\"********************************\");\n Personnage pers = new Guerrier();\n pers.soigne();\n pers.setSoin(new Operation(\n\n ));\n pers.soigne();\n }", "public static void main(String[] args) {\n\t\t\r\n\t\tDog dog1 = new Dog();\r\n//\t\tdog1.bark(); //we need to have created method bark().\r\n\t\tdog1.name = \"Tinito\";\r\n\t\t\r\n/*____________________________________________________________*/\t\t\r\n\t\t\r\n\t\t//Now make a Dog array.\r\n\t\t\r\n\t\tDog[] myDogs = new Dog[3];\r\n\t\tmyDogs[0] = new Dog(); //instantiates dog object referenced to by myDog[0]. \r\n\t\tmyDogs[1] = new Dog(); \r\n\t\tmyDogs[2] = dog1;\r\n/*____________________________________________________________*/\t\t\r\n\r\n\t\t//Now access the dogs using the array references\r\n\t\t\r\n\t\tmyDogs[0].name = \"Fred\";\r\n\t\tmyDogs[1].name = \"Merge\";\r\n\t\t//Note that you can't say dog1.name = \"Tinito.\"\r\n/*____________________________________________________________*/\t\t\r\n\t\t\r\n\t\t//Hmmmm....what myDogs[2] name?\r\n\t\tSystem.out.print(\"Last dog's name is \");\r\n\t\tSystem.out.println(myDogs[2].name);// Also accessed thru array ref.\r\n/*______________________________________________________________*/\t\t\r\n\t\r\n\t\t//Now loop through the array and tell all dogs to bark.\r\n\t\tint i = 0;\r\n\t\twhile(i < myDogs.length) {\r\n//\t\t\tmyDogs[i].bark;\r\n\t\t\ti = i +1;\r\n/*______________________________________________________________*/\t\t\t\r\n\t\t\t\r\n\t\t//Up to now the dogs don't know how to bark. We create method bark.\t\r\n\t\t\r\n//\t\t\tpublic void bark(){\t\t//Not sure why method rejected.\r\n\t\t\tSystem.out.println(name + \"says Ruff Ruff!\");\r\n\t\t}\r\n\t\t\r\n/*____________________________________________________________*/\r\n//\t //Similarly u can command the dogs to eat, chaseCat etc.\t\t\r\n//\t\t\tpublic void eat() { }\r\n//\t\t\tpublic void chaseCat() { }\r\n//\t\t\t\r\n//\t\t}\r\n\t}", "public static void main(String args[]) {\n String str1 = new String(\"Java strings are objects.\");\n String str2 = \"They are constructed various ways.\";\n String str3 = new String(str2);\n\n String test = \"this is a string\";\n test = \"this is a new string\";\n\n String b = \" This\" + \" is \" + \"a \" + \"String\";\n\n\n System.out.println(str1);\n System.out.println(str2);\n System.out.println(str3);\n System.out.println(test);\n System.out.println(b);\n }", "void mo29846a(IObjectWrapper iObjectWrapper, zzxz zzxz, String str, String str2, zzamv zzamv, zzady zzady, List<String> list) throws RemoteException;", "public static void main(String[] args) {\n\t\tStringLoops looper = new StringLoops();\n\t\tlooper.printString(\"Hello World\"); \n\t\tlooper.printPattern(\"Hello\");\n\t\tPerson person1 = new Person();\n\t\tperson1.age = 10;\n\t\tPerson person2 = new Person(); \n\t\tperson2.age = 15; \n\t\tSystem.out.println(person1.compareTo(person2));\n\t}", "public static void main(String[] args) {\n\n Reptiles rep1 = new Reptiles(Mainland.AFRICA, \"Morocco\", \"Nile Crocodile\" );\n Crocodile crocodile1 = new Crocodile(Mainland.AUSTRALIA, \"Australia\", \"Comb crocodile\", \"Male\", 5, 180);\n Crocodile crocodile2 = new Crocodile(Mainland.SOUTH_AMERICA, \"Mexico\", \"Wild crocodile\", \"Female\", 7, 400 );\n\n\n\n System.out.println(rep1. getInfo());\n System.out.println(crocodile1.getInfo());\n System.out.println(crocodile2.getInfo());\n\n rep1.makeVoice(\"Pppp\");\n rep1.makeVoice(4);\n\n\n\n\n\n\n\n\n\n }", "public static void main(String[] args) {\n\t\tMagicString s = new MagicString(\"hasan ali khattak\");\n\t\tSystem.out.println(\"String \" + s + \" has \" + s.getNumberOfVowels() + \" vowels\");\n\t}", "public static void main(String[] args)\n\t\n\t{\n\t\tNonStaticPracticeDemo nonobj=new NonStaticPracticeDemo();\n\t\t\n\t\t//using hash code method and print objref address\n\t\t//fetch the nonobj address using hashcode()of object calss\n\t\tint nonobjAddressVal=nonobj.hashCode();\n\t\tSystem.out.println(\"HASH CODE ADDRESS IS\"+ nonobjAddressVal);\n\t\t//creating another object\n\t\tNonStaticPracticeDemo nonobj2=new NonStaticPracticeDemo();\n\t\tint nonobj2AddressVal=nonobj2.hashCode();\n\t\tSystem.out.println(\"HASH CODE OF ADDRESS nonobj2 :\"+nonobj2AddressVal);\n\t\tboolean b=(nonobj==nonobj2);\n\t\tSystem.out.println(\"Comparing nonobj with nonobj2 using==operator:\"+b);\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t//calling non static variavles\n\t\tSystem.out.println(\"NON STATIC VARIABLE IS:\"+nonobj.s);\n\t\tSystem.out.println(\"NON STATIC VARIABLE IS :\"+nonobj.f);\n\t\t//calling non staticvoid method\n\t\t\t\tnonobj.charDemo();\n\t\t\t\t//calling non static void with parameterised method\n\t\tnonobj.swapMethod(17,34);\n\t\t//calling non static reaturn type with peremeterised method\n\t\tSystem.out.println(\"getmaxvalue of non static return type method:\"+nonobj.getMaxValue(34, 23));\n\t\tSystem.out.println(\"GET MAX DOUBLE RETURN TYPE VALUE:\"+nonobj.getMaxValue1(170, 230));\n\t\tSystem.out.println(\"GET MAX FLOAT RETURN TYPE VALUE:\"+nonobj.getMaxValue2(4.5f, 3.5f));\n\t\t//calling non staic return type without parameterised method\n\t\tSystem.out.println(\"AFTER TRIMMING STRING VALUE IS\"+ nonobj.stringMethod());\n\t\tSystem.out.println(\"getminvalue of non static return type method:\"+nonobj.getMinValue(45, 67));\n\t\t//calling non staic return type without parameterised method\n\t\tSystem.out.println(\"non staic return type without parameterised method convert celcius to farenheat:\"+nonobj.convertCelciusToFarenheattTemp(55));\n\t\t\n\t\t//calling non staic return type without parameterised method\n\t\t\tSystem.out.println(\"non staic return type without parameterised method convert farenheat to celcius:\"+nonobj.convertFarenheatToCelciusTemp(131));\n\t\t\t\n\t\t\t//calling non static reaturn type with peremeterised method\n\t\t\tSystem.out.println(\"GET MIN INT VALUE RETURN TYPE METHOD:\"+nonobj.getMinValue(345, 567));\n\t\t\tSystem.out.println(\"GET MIN LONG RTURN TYPE VALUE:\"+nonobj.getMinValue2(100, 200));\n\t\t\tSystem.out.println(\"GET MIN FLOAT RETURN TYPE VALUE:\"+nonobj.getMinValue3(4.5f, 9.8f));\n\t\t\t\n\t\t\tint a21=(int) (nonobj.a-nonobj.c+nonobj.f);\n\t\t\tSystem.out.println(\"THE VALUE OF a21 is:\"+a21);\n\t\t\tSystem.out.println(\"THE MULTIPLY BETWEEN TWO NON STATIC VARIABLE IS:\"+nonobj.a*nonobj.c/nonobj.f);\n\t\t\t\n\t\t\t}", "public static void main(String[] args) {\n\t Boy boy = new Boy(\"James\", \"男\", 36, 195,\"own\");\n\t// Wang wang = new Wang(1);\n\t System.out.println(boy.getX());\n\t System.out.println(boy.name);\n\t}", "public static void main(String[] args) {\n\t\tVehicle v = new Car(10,20);\n\t\tObject o = new Vehicle();\n\t\t\n\t\tv.maxSpeed = 100;\n\t\tv.print();\n\t\tv = new Vehicle();\n\t\tv.setColor(\"green\");\n//\t\tCar c = (Car) v; dangerous casting\n//\t\tv.numDoors = 4;\n//\t\tVehicle v3 = new Bicycle(12);\n\n\t\t\n\t\tv.maxSpeed = 80;\n\t\tv.setColor(\"red\");\n\t\tv.print();\n//\t\t\n//\t\tCar c = new Car();\n//\t\tc.color = \"Black\";\n//\t\tc.maxSpeed = 100;\n//\t\tc.numDoors = 4;\n//\t\tc.setColor(\"black\");\n//\t\tc.printMaxspeed();\n//\t\tc.print();\n//\t\tc.printCar();\n\t\t\n//\t\tBicycle b = new Bicycle();\n//\t\tb.print();\n\n\t}", "public static void main(String[] args) {\n\n Car Lorry=new Car();\n Car SportCar=new Car();\n\n printInfo();\n\n }", "public static void main(String[] args) {\n\t\tbacteria[] newobject = new bacteria[2];\n\t\tsalmonela object1 = new salmonela();\n\t\tstreptococus object2 = new streptococus();\n\t\tnewobject[0]=object1; \n\t\tnewobject[1]=object2; \n\t\tfor (bacteria x: newobject) {\n\t\t\tx.noise();\n\t\t}\n\n\t}", "public static void main(String[] args) {\n\t\t\n\t\tBmw bm=new Bmw();\n\t\tbm.Start();\n\t\tbm.Refuel();\n\t\tbm.TheftSafety();\n\t\tbm.Stop();\n\t\tbm.Engine();\n\t\tSystem.out.println(\"****************************\");\n\t\tCar c= new Car();\n\t\tc.Start();\n\t\tc.Stop();\n\t\tc.Refuel();\n\t\tSystem.out.println(\"****************************\");\t\t\n\t\t//Child class object can be referred by parent class reference variable is called,\n\t\t//Dynamic Polymorphism or Runtime Polymorphism.\n\t\tCar c1=new Bmw();//Top Casting\n\t\tc1.Start();\n\t\tc1.Start();\n\t\tc1.Refuel();\n\t\t\n\t\t\n\t\t\n\t}", "public static void main(String[] args) {\n\n\n\n Scanner sc = new Scanner(System.in);\n Thing thing = new Thing();\n\n MyObject object = new MyObject();\n\n object.name = \"Lancelot\";\n object.number = 1;\n\n System.out.println(\"My name is \" + object.name + \" I'm number \" + 1);\n object.test();\n\n thing.num = 5;\n thing.word = \"hello\";\n\n Thing thing2 = new Thing();\n\n thing2.word = \"whatever\";\n thing2.num = 21;\n\n// System.out.println(thing.num + thing2.num);\n\n thing.foo();\n\n thing2.foo();\n\n ///// Data structures ///////\n\n Employee emp = new Employee();\n Employee emp2 = new Employee();\n Employee emp3 = new Employee();\n\n emp.name = \"Jeff\";\n emp.age = 32;\n emp.jobTitle =\"Construction Worker\";\n\n emp2.name = \"Sara\";\n emp2.age = 28;\n emp2.jobTitle = \"School Teacher\";\n\n emp3.name = \"Lancelot\";\n emp3.age = 41;\n emp3.jobTitle = \"The most interesting man in world\";\n\nbar(emp3);\nbar(emp);\nbar(emp2);\n}", "public static void main(String[] args) {\n\t\t int sayi=10;\n\t \n\t for (int i = 0; i < 10000; i++) {\n\t i++;\n\t sayi++;\n\t }\n\t \n\t // Bu kodu calistirdigimizda 13.satira kadar Java kac obje uretir\n\t // Bu soruyu cevaplamak icin degiskenin data turune bakmaliyiz\n\t // sayi ve i'nin veri turu : int\n\t // int mutable\n\t \n\t String str=\"A\";\n\t for (int i = 0; i < 10000; i++) {\n\t\t\t\tstr+=\" \";\n\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t \n\t /*\n\t * 20.satir ile 24.satir arasındakı kac obje olur\n\t * i int oldugu icin sadece bir tane variavl olusturulur\n\t * ancak str string oldugunda 10002 tane obje olustururlur\n\t * \t */\n\t}", "public static void main(String[] args) {\n FunctionInJava obj=new FunctionInJava();\n //one object will be created , obj is references variable, referring to this object\n//after creating the object,the copy of the all non static methods will be give the to this object\n obj.test();\n int l=obj.pqr();\n System.out.println(l);\n String s1=obj.qa();\n System.out.println(s1);\n int div=obj.division(30,10);\n System.out.println(div);\n// main method void, never return the value\n }", "public static void main(String[] args) {\n \r\n\t\tPerson person1 = new Person(\"Ravali\",\"Springfield\");\r\n\t\tSystem.out.println(person1);\r\n\t\t\r\n\t\tString[] arr = new String[3];\r\n\t\tarr[0] = \"Computer Network Principles\";\r\n\t\tarr[1] = \"GRS\";\r\n\t\tarr[2] = \"Computer Organization\";\r\n\t\t\r\n\t\tPerson person2 = new Teacher(3,arr);\r\n\t\tperson2.setName(\"Renuka\");\r\n\t\tperson2.setAddress(\"India\");\r\n\t\t//Here toString method of Teacher class is being called and overrides the parent class method at runtime.Hence Runtime Polymorphism\r\n\t\tSystem.out.println(person2);\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t}" ]
[ "0.6616418", "0.65410566", "0.62074494", "0.62072706", "0.6186344", "0.6179418", "0.617828", "0.61754686", "0.6079712", "0.60211414", "0.59924734", "0.5976613", "0.59561", "0.5925742", "0.5921404", "0.5920388", "0.5918226", "0.591619", "0.59142685", "0.5896429", "0.58641344", "0.58567125", "0.58340585", "0.5829384", "0.5825707", "0.57938606", "0.5786941", "0.57686955", "0.5760091", "0.5748678", "0.5743745", "0.5743345", "0.5720729", "0.57191235", "0.5718562", "0.571853", "0.5697445", "0.5694225", "0.5678833", "0.56753963", "0.5673571", "0.5671733", "0.56559145", "0.5652505", "0.5634482", "0.56311184", "0.56252587", "0.5625074", "0.5611154", "0.5610401", "0.56030995", "0.56029975", "0.56013936", "0.55983454", "0.5597848", "0.5597834", "0.5596107", "0.5585875", "0.55796283", "0.55666304", "0.55660623", "0.55643696", "0.55618006", "0.5555497", "0.5552594", "0.5550872", "0.55495113", "0.55478203", "0.5537306", "0.553406", "0.55313766", "0.55286425", "0.55212665", "0.55209196", "0.5520341", "0.55202943", "0.5514133", "0.55098575", "0.5496302", "0.5491234", "0.5486749", "0.54855824", "0.5484778", "0.5482813", "0.5480169", "0.5480125", "0.5477137", "0.54759663", "0.5473975", "0.5472655", "0.5471253", "0.54686457", "0.5465192", "0.54626626", "0.54560614", "0.54558647", "0.54520917", "0.5443787", "0.5439746", "0.54384345", "0.5435037" ]
0.0
-1
Code'u yazinca gorunmuyolar fakat gizlice var olan exceptionlar. ornek1
public static void main(String[] args) { int [] array = {12,13,12}; System.out.println(array[3]); //Exception'in ismi = java.lang.ArrayIndexOutOfBoundsException //cunku array icinde index 3 yok. (0,1,2) //ornek2 String a="Hello"; System.out.println(a.charAt(5));//java.lang.StringIndexOutOfBoundsException //cuku 5. index yok //ornek3 String str=null; System.out.println(str.length());//NullPointerException //cunku null'un length'i olmaz }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void estiloError() {\r\n /**Bea y Jose**/\r\n\t}", "public void sendeFehlerHelo();", "private void inizia() throws Exception {\n /* variabili e costanti locali di lavoro */\n\n try { // prova ad eseguire il codice\n } catch (Exception unErrore) { // intercetta l'errore\n Errore.crea(unErrore);\n }// fine del blocco try-catch\n }", "private void inizia() throws Exception {\n try { // prova ad eseguire il codice\n } catch (Exception unErrore) { // intercetta l'errore\n Errore.crea(unErrore);\n }// fine del blocco try-catch\n }", "public void mo1966i() throws cf {\r\n }", "public void mo1972o() throws cf {\r\n }", "public void mo1964g() throws cf {\r\n }", "public void mo1944a() throws cf {\r\n }", "private static void cajas() {\n\t\t\n\t}", "public String editar()\r\n/* 441: */ {\r\n/* 442:445 */ return null;\r\n/* 443: */ }", "public void mo1970m() throws cf {\r\n }", "private V e() throws com.amap.api.col.n3.gh {\n /*\n r6 = this;\n r0 = 0\n r1 = 0\n L_0x0002:\n int r2 = r6.b\n if (r1 >= r2) goto L_0x00cd\n com.amap.api.col.n3.ki r2 = com.amap.api.col.n3.ki.c() // Catch:{ ic -> 0x0043, gh -> 0x0032, Throwable -> 0x002a }\n android.content.Context r3 = r6.d // Catch:{ ic -> 0x0043, gh -> 0x0032, Throwable -> 0x002a }\n java.net.Proxy r3 = com.amap.api.col.n3.ik.a(r3) // Catch:{ ic -> 0x0043, gh -> 0x0032, Throwable -> 0x002a }\n r6.a((java.net.Proxy) r3) // Catch:{ ic -> 0x0043, gh -> 0x0032, Throwable -> 0x002a }\n byte[] r2 = r2.a((com.amap.api.col.n3.kj) r6) // Catch:{ ic -> 0x0043, gh -> 0x0032, Throwable -> 0x002a }\n java.lang.Object r2 = r6.a((byte[]) r2) // Catch:{ ic -> 0x0043, gh -> 0x0032, Throwable -> 0x002a }\n int r0 = r6.b // Catch:{ ic -> 0x0025, gh -> 0x0020, Throwable -> 0x002a }\n r1 = r0\n r0 = r2\n goto L_0x0002\n L_0x0020:\n r0 = move-exception\n r5 = r2\n r2 = r0\n r0 = r5\n goto L_0x0033\n L_0x0025:\n r0 = move-exception\n r5 = r2\n r2 = r0\n r0 = r5\n goto L_0x0044\n L_0x002a:\n com.amap.api.col.n3.gh r0 = new com.amap.api.col.n3.gh\n java.lang.String r1 = \"未知错误\"\n r0.<init>(r1)\n throw r0\n L_0x0032:\n r2 = move-exception\n L_0x0033:\n int r1 = r1 + 1\n int r3 = r6.b\n if (r1 < r3) goto L_0x0002\n com.amap.api.col.n3.gh r0 = new com.amap.api.col.n3.gh\n java.lang.String r1 = r2.a()\n r0.<init>(r1)\n throw r0\n L_0x0043:\n r2 = move-exception\n L_0x0044:\n int r1 = r1 + 1\n int r3 = r6.b\n if (r1 >= r3) goto L_0x008a\n int r3 = r6.e // Catch:{ InterruptedException -> 0x0053 }\n int r3 = r3 * 1000\n long r3 = (long) r3 // Catch:{ InterruptedException -> 0x0053 }\n java.lang.Thread.sleep(r3) // Catch:{ InterruptedException -> 0x0053 }\n goto L_0x0002\n L_0x0053:\n java.lang.String r0 = \"http连接失败 - ConnectionException\"\n java.lang.String r1 = r2.getMessage()\n boolean r0 = r0.equals(r1)\n if (r0 != 0) goto L_0x0082\n java.lang.String r0 = \"socket 连接异常 - SocketException\"\n java.lang.String r1 = r2.getMessage()\n boolean r0 = r0.equals(r1)\n if (r0 != 0) goto L_0x0082\n java.lang.String r0 = \"服务器连接失败 - UnknownServiceException\"\n java.lang.String r1 = r2.getMessage()\n boolean r0 = r0.equals(r1)\n if (r0 == 0) goto L_0x0078\n goto L_0x0082\n L_0x0078:\n com.amap.api.col.n3.gh r0 = new com.amap.api.col.n3.gh\n java.lang.String r1 = r2.a()\n r0.<init>(r1)\n throw r0\n L_0x0082:\n com.amap.api.col.n3.gh r0 = new com.amap.api.col.n3.gh\n java.lang.String r1 = \"http或socket连接失败 - ConnectionException\"\n r0.<init>(r1)\n throw r0\n L_0x008a:\n java.lang.String r0 = \"http连接失败 - ConnectionException\"\n java.lang.String r1 = r2.getMessage()\n boolean r0 = r0.equals(r1)\n if (r0 != 0) goto L_0x00c5\n java.lang.String r0 = \"socket 连接异常 - SocketException\"\n java.lang.String r1 = r2.getMessage()\n boolean r0 = r0.equals(r1)\n if (r0 != 0) goto L_0x00c5\n java.lang.String r0 = \"未知的错误\"\n java.lang.String r1 = r2.a()\n boolean r0 = r0.equals(r1)\n if (r0 != 0) goto L_0x00c5\n java.lang.String r0 = \"服务器连接失败 - UnknownServiceException\"\n java.lang.String r1 = r2.getMessage()\n boolean r0 = r0.equals(r1)\n if (r0 == 0) goto L_0x00bb\n goto L_0x00c5\n L_0x00bb:\n com.amap.api.col.n3.gh r0 = new com.amap.api.col.n3.gh\n java.lang.String r1 = r2.a()\n r0.<init>(r1)\n throw r0\n L_0x00c5:\n com.amap.api.col.n3.gh r0 = new com.amap.api.col.n3.gh\n java.lang.String r1 = \"http或socket连接失败 - ConnectionException\"\n r0.<init>(r1)\n throw r0\n L_0x00cd:\n return r0\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.amap.api.col.n3.gi.e():java.lang.Object\");\n }", "public void mo1963f() throws cf {\r\n }", "public void trykkPaa() throws TrykketPaaBombe {\n // Ingenting skal skje dersom en av disse er true;\n if (brettTapt || trykketPaa || flagget) {\n return;\n }\n\n // Om ruten er en bombe taper man brettet\n if (bombe) {\n trykketPaa = true;\n setText(\"x\");\n setBackground(new Background(new BackgroundFill(Color.RED, CornerRadii.EMPTY, Insets.EMPTY)));\n throw new TrykketPaaBombe();\n }\n // Om ruten har null naboer skal et stoerre omraade aapnes\n else if (bombeNaboer == 0) {\n Lenkeliste<Rute> besokt = new Lenkeliste<Rute>();\n Lenkeliste<Rute> aapneDisse = new Lenkeliste<Rute>();\n aapneDisse.leggTil(this);\n // Rekursiv metode som fyller aapneDisse med riktige ruter\n finnAapentOmraade(besokt, aapneDisse);\n for (Rute r : aapneDisse) {\n r.aapne();\n }\n } else {\n aapne();\n }\n }", "public void guardaDjAlcabala(RaDjalcabala raDjalcabala) throws Exception;", "public void estiloAcierto() {\r\n\t\t /**Bea y Jose**/\t\t\r\n \r\n\t}", "public void guardarTransferenteAlcabala(RaTransferenteAlcabala raTransferenteAlcabala)throws Exception;", "public void mo1976s() throws cf {\r\n }", "static void m14937e(String str, Throwable th) {\n int b = m14929b();\n int d = C3205z0.INFO.mo12550d();\n }", "public void mo1962e() throws cf {\r\n }", "public static void main(String[] args){\n try {\r\n // m.nada(0);\r\n } catch (Exception ex) {\r\n System.out.println(\"No hay error\");\r\n }\r\n }", "public String ingresarLetra(String letra, String palabra)throws MyException{\n String respuesta=\"\";\n if(Integer.toString(1).equals(letra)||Integer.toString(2).equals(letra)||Integer.toString(3).equals(letra)||Integer.toString(4).equals(letra)||Integer.toString(5).equals(letra)||Integer.toString(6).equals(letra)||Integer.toString(7).equals(letra)||Integer.toString(8).equals(letra)||Integer.toString(9).equals(letra)||Integer.toString(0).equals(letra)||letra.equals(letra.toUpperCase())){\n throw new MyException(\"Debe ingresar una letra en minúsculas(a-z)\");\n }else{\n if(palabra.contains(letra)){\n if(this.palabra.contains(\"-\")){\n for(int i=0;i<this.palabra.length();i++){\n if((letra.toLowerCase().equals(palabra.toLowerCase().substring(i,i+1)))){\n respuesta+=palabra.subSequence(i, i+1);\n }else{\n respuesta+=\"-\";\n }\n }\n }else{\n for(int i=0;i<this.palabra.length();i++){\n if((letra.toLowerCase().equals(palabra.toLowerCase().substring(i,i+1)))){\n respuesta+=palabra.subSequence(i, i+1);\n }else{\n respuesta+=\"-\";\n }\n }\n this.palabra=respuesta;\n }\n }else{\n respuesta=this.ocultarPalabra(this.palabra);\n this.oportunidades-=1;\n try{\n this.cambiarEstadoImagen();\n }\n catch(NullPointerException ex){\n JOptionPane.showMessageDialog(null, \"No se pudo actualizar la imagen del ahorcado :(\\n\\n Imagen no encontrada\");\n }\n }\n return respuesta;\n }\n }", "public static void main(String[] args) throws Exception {\n try{\n voziTrku();\n }catch(PokvarenMotorException exPom){\n System.out.println(\"Pokvario se motor!!! skloni ga sa staze\");\n }catch(MaglaException exM){\n System.out.println(\"Magla je! Nema trke\");\n } \n \n }", "public static void main(String[] args) {\n\t\t\ttry {\r\n\t\t\t\tRuntiomException t = newRuntiom Eceprin,\r\n\t\t\t\t\t\tNullpertherExcetpion)();\r\n\t\t\tthrow e;\t\r\n\t\t}catch( NullPoiterporinter Eception e){\r\n\t\t\tSystem.out.println( \"Á¤¸®\");\r\n\t\t\t}\r\n\r\n}", "public void mo1960c() throws cf {\r\n }", "public String nippideJarjend () throws Exception {\n File nippideFail = new File(\"nipid.txt\"); // txt failid peavad olema proj. samas kaustas antud juhul\n Scanner sc = new Scanner(nippideFail);\n List<String> listNipid = new ArrayList<>(); //failist loetud nipid salvestatakse kausta\n while (sc.hasNextLine()) {\n String rida = sc.nextLine();//rida tuleb eraldi muutujasse salvestada\n listNipid.add(rida);}\n sc.close();\n return listNipid.get((int) (Math.random() * (listNipid.size()))); //randomiga valitakse nipp\n }", "private void inizia() throws Exception {\n }", "private void inizia() throws Exception {\n }", "private void inizia() throws Exception {\n }", "private void inizia() throws Exception {\n }", "private void inizia() throws Exception {\n }", "void mo57276a(Exception exc);", "private void carregaAvisosGerais() {\r\n\t\tif (codWcagEmag == WCAG) {\r\n\t\t\t/*\r\n\t\t\t * Mudan�as de idioma\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"4.1\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Ignorar arte ascii\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"13.10\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Utilizar a linguagem mais clara e simples poss�vel\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"14.1\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * navega��o de maneira coerente\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"13.4\", AVISO, codWcagEmag, \"\"));\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"14.2\", AVISO, codWcagEmag, \"\"));\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"11.4\", AVISO, codWcagEmag, \"\"));\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"14.3\", AVISO, codWcagEmag, \"\"));\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"12.3\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Fornecer mapa\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"13.3\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Abreviaturas\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"4.2\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Fornecer atalho\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"9.5\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Prefer�ncias (por ex., por idioma ou por tipo de conte�do).\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"11.3\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * BreadCrumb\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"13.5\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * fun��es de pesquisa\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"13.7\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * front-loading\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"13.8\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Documentos compostos por mais de uma p�gina\r\n\t\t\t */\r\n\t\t\t// comentado por n�o ter achado equi\r\n\t\t\t// erroOuAviso.add(new ArmazenaErroOuAviso(\"3.10\", AVISO,\r\n\t\t\t// codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Complementar o texto com imagens, etc.\r\n\t\t\t */\r\n\t\t\t// erroOuAviso.add(new ArmazenaErroOuAviso(\"3.11\", AVISO,\r\n\t\t\t// codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Forne�a metadados.\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"13.2\", AVISO, codWcagEmag, \"\"));\r\n\t\t} else if (codWcagEmag == EMAG) {\r\n\t\t\t/*\r\n\t\t\t * Mudan�as de idioma\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"1.2\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Ignorar arte ascii\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"1.3\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Utilizar a linguagem mais clara e simples poss�vel\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"1.9\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * navega��o de maneira coerente\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"1.10\", AVISO, codWcagEmag, \"\"));\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"1.21\", AVISO, codWcagEmag, \"\"));\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"1.24\", AVISO, codWcagEmag, \"\"));\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"2.9\", AVISO, codWcagEmag, \"\"));\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"2.11\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Fornecer mapa\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"2.17\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Abreviaturas\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"3.2\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Fornecer atalho\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"3.3\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Prefer�ncias (por ex., por idioma ou por tipo de conte�do).\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"3.5\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * BreadCrumb\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"3.6\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * fun��es de pesquisa\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"3.8\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * front-loading\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"3.9\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Documentos compostos por mais de uma p�gina\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"3.10\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Complementar o texto com imagens, etc.\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"3.11\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Forne�a metadados.\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"3.14\", AVISO, codWcagEmag, \"\"));\r\n\t\t}\r\n\r\n\t}", "@Override\n protected void adicionarLetrasErradas() {\n }", "private void inizia() throws Exception {\n this.setMessaggio(\"Addebiti in corso\");\n this.setBreakAbilitato(true);\n }", "private void verificarCodigoErro() {\n\t\ttry {\n\t\t\tif (resultado.getStatus().isCodigoErro() && emailReplicacaoServico != null) {\n\t\t\t\tExecucaoReplicacaoUtil.log(\"Enviando e-mail de erro.\");\n\t\t\t\tenviarEmailErro();\n\t\t\t}\n\t\t} catch (BancoobException e) {\n\t\t\tExecucaoReplicacaoUtil.log(e.getMessage());\n\t\t}\n\t}", "private void inizia() throws Exception {\n }", "@Test(expected = Exception.class)\n public void testCSesionAgregarLiena5() throws Exception {\n System.out.println(\"testCSesionAgregarLiena cantidad Negativa(2)\");\n CSesion instance = new CSesion();\n instance.inicioSesion(\"Dan\", \"danr\");\n instance.agregaLinea(1, 2);\n instance.agregaLinea(-2, 2);\n }", "public void avvia() {\n /* variabili e costanti locali di lavoro */\n\n try { // prova ad eseguire il codice\n getModuloRisultati().avvia();\n } catch (Exception unErrore) { // intercetta l'errore\n Errore.crea(unErrore);\n }// fine del blocco try-catch\n\n super.avvia();\n\n }", "zzang mo29839S() throws RemoteException;", "public Frmin_so_entry() throws CodeException {\n initComponents();\n }", "@Test(expected = Exception.class)\n public void testCSesionAgregarLiena3() throws Exception {\n System.out.println(\"testCSesionAgregarLiena cantidad Negativa\");\n CSesion instance = new CSesion();\n instance.inicioSesion(\"Dan\", \"danr\");\n instance.agregaLinea(-1, 2);\n }", "@Test\r\n\tpublic void CT03ConsultarLivroComRaNulo() {\r\n\t\ttry {\r\n\t\t\t// cenario\r\n\t\t\t@SuppressWarnings(\"unused\")\r\n\t\t\tUsuario usuario;\r\n\t\t\t// acao\r\n\t\t\tusuario = ObtemUsuario.comRA_nulo();\r\n\t\t} catch (RuntimeException e) {\r\n\t\t\t// verificacao\r\n\t\t\tassertEquals(\"RA inválido\", e.getMessage());\r\n\t\t}\r\n\t}", "zzana mo29855eb() throws RemoteException;", "public void falschesSpiel(SpielException e);", "private String elaboraIncipit() {\n String testo = VUOTA;\n\n if (usaHeadIncipit) {\n testo += elaboraIncipitSpecifico();\n testo += A_CAPO;\n }// fine del blocco if\n\n return testo;\n }", "public void Excepti() throws Exception{ \n throw new Exception(\"El dato especificado NO existe en la lista!!!\"); \n }", "@Test\n public void test084() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n // Undeclared exception!\n try {\n String string0 = errorPage0.encode(\"%k8|vhOy\");\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "public final void mo66087a(Exception exc, int i) {\n if (i == 4) {\n if (this.f94801aw != null) {\n this.f94801aw.mo91617g();\n }\n C22814a.m75245a(getActivity(), exc, R.string.d80);\n }\n }", "private String tallenna() {\n Dialogs.showMessageDialog(\"Tallennetaan!\");\n try {\n paivakirja.tallenna();\n return null;\n } catch (SailoException ex) {\n Dialogs.showMessageDialog(\"Tallennuksessa ongelmia!\" + ex.getMessage());\n return ex.getMessage();\n }\n }", "@Test(timeout = 4000)\n public void test109() throws Throwable {\n Form form0 = new Form(\")`EP/)LkuiRB$z_\");\n // Undeclared exception!\n try { \n form0.ins((Object) \")`EP/)LkuiRB$z_\");\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "public void encerrarJogo(){\n if (isAndamento()) {\n situacao = SituacaoJogoEnum.ENCERRADO;\n }\n }", "@Test(timeout = 4000)\n public void test274() throws Throwable {\n Form form0 = new Form(\"rqx^8<h<Qjl$<>8\");\n // Undeclared exception!\n try { \n form0.cite();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "public void m9741j() throws cf {\r\n }", "private void inizia() throws Exception {\n /* variabili e costanti locali di lavoro */\n Dati dati;\n\n try { // prova ad eseguire il codice\n\n this.setMessaggio(\"Analisi in corso\");\n this.setBreakAbilitato(true);\n\n /* recupera e registra i dati delle RMP da elaborare */\n dati = getDatiRMP();\n this.setDati(dati);\n\n /* regola il fondo scala dell'operazione */\n this.setMax(dati.getRowCount());\n\n } catch (Exception unErrore) { // intercetta l'errore\n Errore.crea(unErrore);\n }// fine del blocco try-catch\n\n }", "private String nalozZvieraNaVozidlo() {\r\n if (zoo.getPracovneVozidlo() == null) {\r\n return \"Pracovne vozidlo nie je pristavene\";\r\n }\r\n\r\n Integer pozicia = MojeMetody.vlozInt(\"Vloz cislo zvierata\");\r\n if (pozicia == null) return \"\";\r\n\r\n try {\r\n Prepravitelny z = (Prepravitelny) zoo.getZvierataZOO(pozicia - 1);\r\n zoo.nalozZivocicha(z);\r\n zoo.odstranZivocicha(pozicia - 1);\r\n return \"Zviera \" + z + \"\\n\\tbolo nalozene na prepravne vozidlo\";\r\n } catch (ClassCastException exCC) {\r\n return \"Zviera c. \" + pozicia + \" nemozno prepravit\\n\\t\";\r\n } catch (NullPointerException exNP) {\r\n return \"Zviera c. \" + pozicia + \" nie je v ZOO\";\r\n } catch (Exception ex) {\r\n return \"Neznama chyba:\\n\\t\" + ex;\r\n }\r\n }", "void m5771e() throws C0841b;", "public static void main(String[] args) {\n\t\t\n\t\ttry {\n\t\t\tFileInputStream fis=new FileInputStream(\"C:\\\\Users\\\\Lenovo\\\\eclipse-workspace\\\\java2021summerTr\\\\src\\\\day39_exception\\\\File\");\n\t\t\t\n\t\t\tint k=0;\n\t\t\ttry {\n\t\t\t\twhile((k=fis.read())!=-1) { // read \n\t\t\t\t\tSystem.out.print((char)k);\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t} catch (IOException e) {// dosyalarla ilgili genel yazma ve okuma sorunlarini handle eder\n\t\t\t\t // FileNotFoundException IS-A IOException\n\t\t\t\t\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t} catch (FileNotFoundException e) {\n\t\t\t\n\t\t\t// e.printStackTrace(); // tum hata aciklamalarini yazdirir ama kodumuz bloke olmaz\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n System.out.println(\"kod bloke olmadi\");\n\n\t}", "private void esqueceu() {\n\n //Declaração de Objetos\n Veterinario veterinario = new Veterinario();\n\n //Declaração de Variaveis\n int crmv;\n String senha;\n\n //Atribuição de Valores\n try {\n crmv = Integer.parseInt(TextCrmv.getText());\n senha = TextSenha.getText();\n \n //Atualizando no Banco\n veterinario.Vdao.atualizarAnimalSenhaPeloCrmv(senha, crmv);\n \n } catch (NumberFormatException ex) {\n JOptionPane.showMessageDialog(null, \"APENAS NUMEROS NO CRMV!\");\n }\n JOptionPane.showMessageDialog(null, \"SUCESSO AO ALTERAR SENHA!\");\n\n }", "public void orina() {\n System.out.println(\"Que bien me quedé! Deposito vaciado.\");\n }", "private final com.google.wireless.android.finsky.dfe.p505c.p506a.ec m35437b(com.google.protobuf.nano.C7213a r8) {\n /*\n r7 = this;\n r1 = 0;\n L_0x0001:\n r0 = r8.m33550a();\n switch(r0) {\n case 0: goto L_0x000e;\n case 8: goto L_0x000f;\n case 16: goto L_0x004c;\n case 26: goto L_0x006f;\n case 34: goto L_0x007c;\n default: goto L_0x0008;\n };\n L_0x0008:\n r0 = super.a(r8, r0);\n if (r0 != 0) goto L_0x0001;\n L_0x000e:\n return r7;\n L_0x000f:\n r2 = r7.f37533a;\n r2 = r2 | 1;\n r7.f37533a = r2;\n r2 = r8.m33573o();\n r3 = r8.m33567i();\t Catch:{ IllegalArgumentException -> 0x003b }\n switch(r3) {\n case 0: goto L_0x0043;\n case 1: goto L_0x0043;\n default: goto L_0x0020;\n };\t Catch:{ IllegalArgumentException -> 0x003b }\n L_0x0020:\n r4 = new java.lang.IllegalArgumentException;\t Catch:{ IllegalArgumentException -> 0x003b }\n r5 = 42;\n r6 = new java.lang.StringBuilder;\t Catch:{ IllegalArgumentException -> 0x003b }\n r6.<init>(r5);\t Catch:{ IllegalArgumentException -> 0x003b }\n r3 = r6.append(r3);\t Catch:{ IllegalArgumentException -> 0x003b }\n r5 = \" is not a valid enum ResultCode\";\n r3 = r3.append(r5);\t Catch:{ IllegalArgumentException -> 0x003b }\n r3 = r3.toString();\t Catch:{ IllegalArgumentException -> 0x003b }\n r4.<init>(r3);\t Catch:{ IllegalArgumentException -> 0x003b }\n throw r4;\t Catch:{ IllegalArgumentException -> 0x003b }\n L_0x003b:\n r3 = move-exception;\n r8.m33562e(r2);\n r7.a(r8, r0);\n goto L_0x0001;\n L_0x0043:\n r7.f37534b = r3;\t Catch:{ IllegalArgumentException -> 0x003b }\n r3 = r7.f37533a;\t Catch:{ IllegalArgumentException -> 0x003b }\n r3 = r3 | 1;\n r7.f37533a = r3;\t Catch:{ IllegalArgumentException -> 0x003b }\n goto L_0x0001;\n L_0x004c:\n r2 = r7.f37533a;\n r2 = r2 | 2;\n r7.f37533a = r2;\n r2 = r8.m33573o();\n r3 = r8.m33560d();\t Catch:{ IllegalArgumentException -> 0x0067 }\n r3 = com.google.wireless.android.finsky.dfe.p505c.p506a.dp.m35391a(r3);\t Catch:{ IllegalArgumentException -> 0x0067 }\n r7.f37535c = r3;\t Catch:{ IllegalArgumentException -> 0x0067 }\n r3 = r7.f37533a;\t Catch:{ IllegalArgumentException -> 0x0067 }\n r3 = r3 | 2;\n r7.f37533a = r3;\t Catch:{ IllegalArgumentException -> 0x0067 }\n goto L_0x0001;\n L_0x0067:\n r3 = move-exception;\n r8.m33562e(r2);\n r7.a(r8, r0);\n goto L_0x0001;\n L_0x006f:\n r0 = r8.m33565g();\n r7.f37536d = r0;\n r0 = r7.f37533a;\n r0 = r0 | 4;\n r7.f37533a = r0;\n goto L_0x0001;\n L_0x007c:\n r0 = 34;\n r2 = com.google.protobuf.nano.C7222l.m33624a(r8, r0);\n r0 = r7.f37537e;\n if (r0 != 0) goto L_0x00a8;\n L_0x0086:\n r0 = r1;\n L_0x0087:\n r2 = r2 + r0;\n r2 = new com.google.wireless.android.finsky.dfe.p505c.p506a.ed[r2];\n if (r0 == 0) goto L_0x0091;\n L_0x008c:\n r3 = r7.f37537e;\n java.lang.System.arraycopy(r3, r1, r2, r1, r0);\n L_0x0091:\n r3 = r2.length;\n r3 = r3 + -1;\n if (r0 >= r3) goto L_0x00ac;\n L_0x0096:\n r3 = new com.google.wireless.android.finsky.dfe.c.a.ed;\n r3.<init>();\n r2[r0] = r3;\n r3 = r2[r0];\n r8.m33552a(r3);\n r8.m33550a();\n r0 = r0 + 1;\n goto L_0x0091;\n L_0x00a8:\n r0 = r7.f37537e;\n r0 = r0.length;\n goto L_0x0087;\n L_0x00ac:\n r3 = new com.google.wireless.android.finsky.dfe.c.a.ed;\n r3.<init>();\n r2[r0] = r3;\n r0 = r2[r0];\n r8.m33552a(r0);\n r7.f37537e = r2;\n goto L_0x0001;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.wireless.android.finsky.dfe.c.a.ec.b(com.google.protobuf.nano.a):com.google.wireless.android.finsky.dfe.c.a.ec\");\n }", "public void mo5385r() {\n throw null;\n }", "public abstract void mo133131c() throws InvalidDataException;", "@Override\n public String getPesan()\n {\n return super.getMessage() + hotel_error + \" tidak ditemukan\";\n }", "Code getCode();", "@Test(timeout = 4000)\n public void test292() throws Throwable {\n XmlEntityRef xmlEntityRef0 = new XmlEntityRef(\"0+_/OK]Z5%q-UP hR\");\n // Undeclared exception!\n try { \n xmlEntityRef0.code((Object) \"0+_/OK]Z5%q-UP hR\");\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "@Override\n protected int getCodigoJuego() {\n return 5;\n }", "private static void FINtotalRondasAlcanzadas(Exception e) {\r\n\t\t// System.out.println(\"¡FIN DE JUEGO!\\n\" + e.getMessage());\r\n\t\tSystem.out.println(\"Fin de juego por \" + e.getMessage());\r\n\t}", "private void miInregistrareActionPerformed(java.awt.event.ActionEvent evt) { \n try {\n int n = Integer.parseInt(JOptionPane.showInputDialog(rootPane, \"Introduceti codul de validare:\", \"Confirmare\", JOptionPane.QUESTION_MESSAGE));\n if (n == cod) {\n // In cazul introducerii codului de inregistrare corect, toate functionalitatile aplicatiei devin accesibile, altfel se genereaza exceptie\n lblReclama.setVisible(false);\n miDeschidere.setEnabled(true);\n miSalvare.setEnabled(true);\n miInregistrare.setEnabled(false);\n btnAdauga.setEnabled(true);\n btnModifica.setEnabled(true);\n btnSterge.setEnabled(true);\n lblCod.setVisible(false);\n cbFiltre.setEnabled(true);\n cbOrdonari.setEnabled(true);\n tfPersonalizat.setEditable(true);\n } else {\n throw new NumberFormatException();\n }\n } catch (NumberFormatException numberFormatException) {\n JOptionPane.showMessageDialog(null, \"Cod de validare eronat!\");\n }\n\n }", "public void mo38117a() {\n }", "public abstract java.lang.String getCod_tecnico();", "void berechneFlaeche() {\n\t}", "private void obtieneError(int error) throws Excepciones{\n String[] err = {\n \"ERROR DE SYNTAXIS\",\n \"PARENTESIS NO BALANCEADOS\",\n \"NO EXISTE EXPRESION\",\n \"DIVISION POR CERO\"\n };\n throw new Excepciones(err[error]);\n}", "zzafe mo29840Y() throws RemoteException;", "private void ulangiEnkripsi() {\n this.tfieldP.setText(\"P\");\n this.tfieldQ.setText(\"Q\");\n this.tfieldN.setText(\"N\");\n this.tfieldTN.setText(\"TN\");\n this.tfieldE.setText(\"E\");\n this.tfieldD.setText(\"D\");\n this.tfieldLokasidannamafilehasilenkripsi.setText(\"Lokasi & Nama File Hasil Enkripsi\");\n this.tfieldLokasidannamafileenkripsi.setText(\"Lokasi & Nama File\");\n this.fileAsli = null;\n this.pbEnkripsi.setValue(0);\n this.enkripsi.setP(null);\n this.enkripsi.setQ(null);\n this.enkripsi.setN(null);\n this.enkripsi.setTn(null);\n this.enkripsi.setE(null);\n this.enkripsi.setD(null);\n }", "public String mo5145a() {\n throw null;\n }", "private int cantFantasmasRestantes() {\n // TODO implement here\n return 0;\n }", "public void accept(Throwable th) throws Exception {\n C5489g.m14902d(\"ruomiz\", th.toString());\n }", "public void asetaTeksti(){\n }", "public abstract String dohvatiKontakt();", "private String vylozZvieraZVozidla() {\r\n if (zoo.getPracovneVozidlo() == null) {\r\n return \"Pracovne vozidlo nie je pristavene\";\r\n }\r\n\r\n Integer pozicia = MojeMetody.vlozInt(\"Vloz index zvierata\");\r\n if (pozicia == null) return \"\";\r\n\r\n try {\r\n Zivocich ziv = zoo.vylozZivocicha(pozicia-1);\r\n if (ziv == null) {\r\n return \"Zviera c. \" + pozicia + \" nie je na vozidle\\n\\t\";\r\n }\r\n zoo.pridajZivocicha(ziv);\r\n return \"Zviera \" + ziv\r\n + \"\\n\\tbolo vylozene z prepravneho vozidla\";\r\n } catch (ClassCastException exCC) {\r\n return \"Zviera c. \" + pozicia + \" nie je na vozidle\\n\\t\";\r\n } catch (Exception ex) {\r\n return \"Neznama chyba:\\n\\t\" + ex;\r\n }\r\n }", "public String limpiar()\r\n/* 509: */ {\r\n/* 510:529 */ return null;\r\n/* 511: */ }", "public void exibirJogo() {\n super.exibirJogo();\n System.out.println(\"Codigo do Jogo Digital: \" + codigo);\n }", "public static void main(String[] args) {\n\t\tYazdirmaMetodlari.fatihBilisimOkuluProgramBasligiYazdir();\r\n\t\tString parametre = \"JAVA\";\r\n\t\tSystem.out.println();\r\n\t\tYazdirmaMetodlari.programBasligiYazdir(parametre);\r\n\t\tYazdirmaMetodlari.ayracYazdir();\r\n\t\tYazdirmaMetodlari.islemSonucuYazdir(\"Hafta\", 4);\r\n\t\tSystem.out.println();\r\n\t\tSystem.out.print(\"harf sayısı: \");\r\n\t\tScanner scan = new Scanner(System.in);\r\n\t\tint harfSayisi = scan.nextInt();\r\n\t\tKelimeUretec kelimeUretec = new KelimeUretec(harfSayisi);\r\n\r\n\t\tSystem.out.println(kelimeUretec.kelime);\r\n\t\t\r\n\t\tSystem.out.println(\"\\n\\röğrenci Listesi\");\r\n\t\tOgrenciEkle ogrEkle = new OgrenciEkle();\r\n\t\togrEkle.ekle();\r\n\t\t\r\n\r\n\t\tfor (int i = 0; i < ogrEkle.ogrenciArray.size(); i++) {\r\n\r\n\t\t\tSystem.out.println(\"No:\" + ogrEkle.ogrenciArray.get(i).ogrenciNo + \" - Ogrenci ad: \"\r\n\t\t\t\t\t+ ogrEkle.ogrenciArray.get(i).ogrenciAd);\r\n\r\n\t\t}\r\n\r\n\t}", "protected int mo3987c() {\n return -1;\n }", "private static void etapa3Urna() {\n\t\t\n\t\turna.contabilizarVotosPorCandidato(enderecoCandidatos);\n\t\t\n\t}", "void mo28890b(int i) throws zzlm;", "public void gerarReceitaLiquidaIndiretaDeEsgoto() \n\t\t\tthrows ErroRepositorioException;", "public void cargarSecuencia(FacturaProveedorSRI facturaProveedorSRI, PuntoDeVenta puntoDeVenta)\r\n/* 277: */ throws ExcepcionAS2\r\n/* 278: */ {\r\n/* 279:280 */ AutorizacionDocumentoSRI autorizacionDocumentoSRI = null;\r\n/* 280:283 */ if (puntoDeVenta != null) {\r\n/* 281:284 */ autorizacionDocumentoSRI = this.servicioDocumento.cargarDocumentoConAutorizacion(getFacturaProveedorSRI().getDocumento(), puntoDeVenta, facturaProveedorSRI\r\n/* 282:285 */ .getFechaEmisionRetencion());\r\n/* 283: */ }\r\n/* 284:287 */ if ((Integer.parseInt(facturaProveedorSRI.getNumeroRetencion()) == 0) || (\r\n/* 285:288 */ (facturaProveedorSRI.getDocumento() != null) && (facturaProveedorSRI.getDocumento().isIndicadorDocumentoElectronico()) && \r\n/* 286:289 */ (!facturaProveedorSRI.isTraCorregirDatos())))\r\n/* 287: */ {\r\n/* 288:290 */ String numero = this.servicioSecuencia.obtenerSecuencia(getFacturaProveedorSRI().getDocumento().getSecuencia(), facturaProveedorSRI\r\n/* 289:291 */ .getFechaEmisionRetencion());\r\n/* 290: */ \r\n/* 291:293 */ facturaProveedorSRI.setNumeroRetencion(numero);\r\n/* 292:294 */ facturaProveedorSRI.setAutorizacionRetencion(autorizacionDocumentoSRI.getAutorizacion());\r\n/* 293: */ }\r\n/* 294: */ }", "@Test\r\n\tpublic void testGetErabBalorazioNormalizatuak() {\n\t\tBektorea bek = BalorazioenMatrizea.getBalorazioenMatrizea().getErabBalorazioNormalizatuak(e1.getId());\r\n\t\tassertTrue(bek.luzera() == 3);\r\n\t\tassertTrue(bek.getBalioa(p1.getPelikulaId()) == 0.5);\r\n\t\tassertTrue(bek.getBalioa(p2.getPelikulaId()) == -0.5);\r\n\t\tassertTrue(bek.getBalioa(p4.getPelikulaId()) == 0);\r\n\t\tassertFalse(bek.bektoreanDago(p3.getPelikulaId()));\r\n\t\t\r\n\t\t// e2 erabiltzaileak baloratu dituen pelikulen ID-ak eta balorazio normalizatuak (Batezbestekoa erabiliz) itzuli\r\n\t\tbek = BalorazioenMatrizea.getBalorazioenMatrizea().getErabBalorazioNormalizatuak(e2.getId());\r\n\t\tassertTrue(bek.luzera() == 2);\r\n\t\tassertTrue(bek.getBalioa(p2.getPelikulaId()) == 0.5);\r\n\t\tassertTrue(bek.getBalioa(p3.getPelikulaId()) == -0.5);\r\n\t\tassertFalse(bek.bektoreanDago(p1.getPelikulaId()));\r\n\t\t\r\n\t\t// e3 erabiltzaileak baloratu dituen pelikulen ID-ak eta balorazio normalizatuak (Batezbestekoa erabiliz) itzuli\r\n\t\tbek = BalorazioenMatrizea.getBalorazioenMatrizea().getErabBalorazioNormalizatuak(e3.getId());\r\n\t\tassertTrue(bek.luzera() == 4);\r\n\t\tassertTrue(bek.getBalioa(p1.getPelikulaId()) == -2.75);\r\n\t\tassertTrue(bek.getBalioa(p2.getPelikulaId()) == 0.25);\r\n\t\tassertTrue(bek.getBalioa(p3.getPelikulaId()) == 0.75);\r\n\t\tassertTrue(bek.getBalioa(p4.getPelikulaId()) == 1.75);\r\n\t\t\r\n\t\t// e4 erabiltzaileak baloratu dituen pelikulen ID-ak eta balorazio normalizatuak (Batezbestekoa erabiliz) itzuli\r\n\t\tbek = BalorazioenMatrizea.getBalorazioenMatrizea().getErabBalorazioNormalizatuak(e4.getId());\r\n\t\tassertTrue(bek.luzera() == 1);\r\n\t\tassertTrue(bek.getBalioa(p2.getPelikulaId()) == 0);\r\n\t\tassertFalse(bek.bektoreanDago(p1.getPelikulaId()));\r\n\t\t\r\n\t\t\r\n\t\t// Normalizazioa Zsore erabiliz egiten dugu\r\n\t\t\r\n\t\tBalorazioenMatrizea.getBalorazioenMatrizea().erreseteatu();\r\n\t\tNormalizazioKalkulua.getNormalizazioKalkulua().normalizazioMotaAldatu(new Zscore());\r\n\t\t\r\n\t\tDecimalFormat df = new DecimalFormat(\"#.0000\");\r\n\t\t\r\n\t\t// e1 erabiltzaileak baloratu dituen pelikulen ID-ak eta balorazio normalizatuak (Zscore erabiliz) itzuli\r\n\t\tbek = BalorazioenMatrizea.getBalorazioenMatrizea().getErabBalorazioNormalizatuak(e1.getId());\r\n\t\tassertTrue(bek.luzera() == 3);\r\n\t\tassertTrue(df.format(bek.getBalioa(p1.getPelikulaId())).equals(\"1,2247\"));\r\n\t\tassertTrue(df.format(bek.getBalioa(p2.getPelikulaId())).equals(\"-1,2247\"));\r\n\t\tassertTrue(bek.getBalioa(p4.getPelikulaId()) == 0);\r\n\t\tassertFalse(bek.bektoreanDago(p3.getPelikulaId()));\r\n\t\t\r\n\t\t// e2 erabiltzaileak baloratu dituen pelikulen ID-ak eta balorazio normalizatuak (Zscore erabiliz) itzuli\r\n\t\tbek = BalorazioenMatrizea.getBalorazioenMatrizea().getErabBalorazioNormalizatuak(e2.getId());\r\n\t\tassertTrue(bek.luzera() == 2);\r\n\t\tassertTrue(bek.getBalioa(p2.getPelikulaId()) == 1);\r\n\t\tassertTrue(bek.getBalioa(p3.getPelikulaId()) == -1);\r\n\t\tassertFalse(bek.bektoreanDago(p1.getPelikulaId()));\r\n\t\t\r\n\t\t// e3 erabiltzaileak baloratu dituen pelikulen ID-ak eta balorazio normalizatuak (Zscore erabiliz) itzuli\r\n\t\tbek = BalorazioenMatrizea.getBalorazioenMatrizea().getErabBalorazioNormalizatuak(e3.getId());\r\n\t\tassertTrue(bek.luzera() == 4);\r\n\t\tassertTrue(df.format(bek.getBalioa(p1.getPelikulaId())).equals(\"-1,6398\"));\r\n\t\tassertTrue(df.format(bek.getBalioa(p2.getPelikulaId())).equals(\",1491\"));\r\n\t\tassertTrue(df.format(bek.getBalioa(p3.getPelikulaId())).equals(\",4472\"));\r\n\t\tassertTrue(df.format(bek.getBalioa(p4.getPelikulaId())).equals(\"1,0435\"));\r\n\t\t\r\n\t\t// e4 erabiltzaileak baloratu dituen pelikulen ID-ak eta balorazio normalizatuak (Zscore erabiliz) itzuli\r\n\t\tbek = BalorazioenMatrizea.getBalorazioenMatrizea().getErabBalorazioNormalizatuak(e4.getId());\r\n\t\tassertTrue(bek.luzera() == 1);\r\n\t\tassertTrue(bek.getBalioa(p2.getPelikulaId()) == 0);\r\n\t\tassertFalse(bek.bektoreanDago(p1.getPelikulaId()));\r\n\t\t\r\n\t\tBalorazioenMatrizea.getBalorazioenMatrizea().erreseteatu();\r\n\t\tNormalizazioKalkulua.getNormalizazioKalkulua().normalizazioMotaAldatu(new Batezbestekoa());\r\n\t\t\r\n\t}", "public void btnActualizarSecuencia()\r\n/* 653: */ {\r\n/* 654:727 */ AutorizacionDocumentoSRI autorizacionDocumentoSRI = null;\r\n/* 655:728 */ PuntoDeVenta puntoDeVenta = AppUtil.getPuntoDeVenta();\r\n/* 656: */ try\r\n/* 657: */ {\r\n/* 658:731 */ if (puntoDeVenta != null) {\r\n/* 659:732 */ autorizacionDocumentoSRI = this.servicioDocumento.cargarDocumentoConAutorizacion(getFacturaProveedorSRI().getDocumento(), puntoDeVenta, this.facturaProveedorSRI\r\n/* 660:733 */ .getFechaEmisionRetencion());\r\n/* 661: */ }\r\n/* 662:735 */ String numero = this.servicioSecuencia.obtenerSecuencia(getFacturaProveedorSRI().getDocumento().getSecuencia(), this.facturaProveedorSRI\r\n/* 663:736 */ .getFechaEmisionRetencion());\r\n/* 664: */ \r\n/* 665:738 */ this.facturaProveedorSRI.setNumeroRetencion(numero);\r\n/* 666:739 */ this.facturaProveedorSRI.setAutorizacionRetencion(autorizacionDocumentoSRI.getAutorizacion());\r\n/* 667: */ }\r\n/* 668: */ catch (ExcepcionAS2 e)\r\n/* 669: */ {\r\n/* 670:741 */ addErrorMessage(getLanguageController().getMensaje(e.getCodigoExcepcion()) + e.getMessage());\r\n/* 671: */ }\r\n/* 672: */ }", "@SuppressWarnings(\"resource\")\n\tpublic static void main(String[] args) {\n\t\t\n\t\t/*\n\t\tScanner scan = new Scanner(System.in);\n\t\tSystem.out.println(\"Lutfen yasinizi giriniz\");\n\t\tint yas = scan.nextInt();\n\t\t\n\t\tif (yas>=0) {\n\t\t\tSystem.out.println(\"Girdiginiz yas: \" + yas);\n\t\t}else {\n\t\t\tthrow new IllegalArgumentException();\n\t\t}\n\t\t*/\n\n\t\t// Java'ya bir exception throw ettirmek için \"throw\" ve \"new\" keyword'leri kullanılır \n\t\t// Bu sekilde yazdigimizda java exception throw eder ama kodumuz da bloke olmus olur. \n\t\t// Bloke olmasını engellemek istersek kodu try - catch ile surround yapailiriz\n\t\t\n\t\t\n\t\tScanner scan = new Scanner(System.in);\n\t\tSystem.out.println(\"Lutfen yasinizi giriniz\");\n\t\tint yas = scan.nextInt();\n\t\t\n\t\ttry {\n\t\tif (yas>=0) {\n\t\t\tSystem.out.println(\"Girdiginiz yas: \" + yas);\n\t\t}else {\n\t\t\tthrow new IllegalArgumentException();\n\t\t} \n\t\t} catch(IllegalArgumentException e) {\n\t\t\te.printStackTrace();\n\t\t\t//System.out.println(e.getMessage());\n\t\t}\n\t\t\n\t\tSystem.out.println(\"kod bloke olmamis\");\n\t\t\n\t\n\t\tscan.close();\n\t}", "void oR() {\n if (this.aqt == null) {\n throw new IllegalStateException(\"Callback must be set before execute\");\n }\n this.aqt.ob();\n bh.V(\"Attempting to load resource from disk\");\n if ((ce.oJ().oK() == ce.a.aqi || ce.oJ().oK() == ce.a.aqj) && this.aoc.equals(ce.oJ().getContainerId())) {\n this.aqt.a(bg.a.apM);\n return;\n }\n try {\n var1_1 = new FileInputStream(this.oS());\n }\n catch (FileNotFoundException var1_2) {\n bh.S(\"Failed to find the resource in the disk\");\n this.aqt.a(bg.a.apM);\n return;\n }\n var2_7 = new ByteArrayOutputStream();\n cr.b(var1_1, (OutputStream)var2_7);\n var2_7 = ol.a.l(var2_7.toByteArray());\n this.d((ol.a)var2_7);\n this.aqt.l((ol.a)var2_7);\n try {\n var1_1.close();\n }\n catch (IOException var1_3) {\n bh.W(\"Error closing stream for reading resource from disk\");\n }\n ** GOTO lbl52\n catch (IOException var2_8) {\n this.aqt.a(bg.a.apN);\n bh.W(\"Failed to read the resource from disk\");\n {\n catch (Throwable var2_10) {\n try {\n var1_1.close();\n }\n catch (IOException var1_6) {\n bh.W(\"Error closing stream for reading resource from disk\");\n throw var2_10;\n }\n throw var2_10;\n }\n }\n try {\n var1_1.close();\n }\n catch (IOException var1_4) {\n bh.W(\"Error closing stream for reading resource from disk\");\n }\n ** GOTO lbl52\n catch (IllegalArgumentException var2_9) {\n this.aqt.a(bg.a.apN);\n bh.W(\"Failed to read the resource from disk. The resource is inconsistent\");\n try {\n var1_1.close();\n }\n catch (IOException var1_5) {\n bh.W(\"Error closing stream for reading resource from disk\");\n }\nlbl52: // 6 sources:\n bh.V(\"The Disk resource was successfully read.\");\n return;\n }\n }\n }", "public void program() throws Exception {\r\n int valg;\r\n skrivInn(\"dvdarkiv2.txt\");//leser inn fra dvd arkivet\r\n while(true) {\r\n meny();//kaller paa meny for a skrive ut menyen etter hvert fullforte valg\n System.out.println(\"Skriv inn valget ditt\");\n valg = sjekkOmTall();//kaller paa metoden for o sorge for aa faa valg\n if (valg == 1) {\n nyPerson();\n }\n else if (valg == 2) {\n kjop();\n }\n else if (valg == 3) {\n laan();\n }\n else if (valg == 4) {\n visPerson();\n }\n else if (valg == 5) {\n visOversikt();\n }\n else if (valg == 6){\n retur();\n }\n else if (valg == 7) {\n avslutt();\n }\n }\r\n }", "private static Exception method_7085(Exception var0) {\r\n return var0;\r\n }", "private String elaboraRitorno() {\n String testo = VUOTA;\n String titoloPaginaMadre = getTitoloPaginaMadre();\n\n if (usaHeadRitorno) {\n if (text.isValid(titoloPaginaMadre)) {\n testo += \"Torna a|\" + titoloPaginaMadre;\n testo = LibWiki.setGraffe(testo);\n }// fine del blocco if\n }// fine del blocco if\n\n return testo;\n }", "static void m14941f(String str, Throwable th) {\n int b = m14929b();\n int d = C3205z0.DEBUG.mo12550d();\n }", "public void cargarConceptoRetencion()\r\n/* 393: */ {\r\n/* 394: */ try\r\n/* 395: */ {\r\n/* 396:387 */ this.listaConceptoRetencionSRI = this.servicioConceptoRetencionSRI.getConceptoListaRetencionPorFecha(this.facturaProveedorSRI.getFechaRegistro());\r\n/* 397: */ }\r\n/* 398: */ catch (Exception e)\r\n/* 399: */ {\r\n/* 400:390 */ addErrorMessage(getLanguageController().getMensaje(\"msg_error_cargar_datos\"));\r\n/* 401: */ }\r\n/* 402: */ }", "public void setExceptcode(Long exceptcode) {\n this.exceptcode = exceptcode;\n }", "@SuppressWarnings(\"SuspiciousMethodCalls\")\n private int houve_estouro()\n {\n int retorno = 0;\n boolean checar = false;\n for (Map.Entry i: janela.entrySet())\n {\n if (janela.get(i.getKey()).isEstouro())\n {\n janela.get(i.getKey()).setEstouro(false);\n retorno =(int) i.getKey();\n checar = true;\n break;\n }\n }\n for(Map.Entry i2: janela.entrySet()) janela.get(i2.getKey()).setEstouro(false);\n if(checar) return retorno;\n else return -69;\n }", "public DialogoAggiungiFissi() {\n /* rimanda al costruttore della superclasse */\n super();\n\n\n try { // prova ad eseguire il codice\n /* regolazioni iniziali di riferimenti e variabili */\n this.inizia();\n } catch (Exception unErrore) { // intercetta l'errore\n Errore.crea(unErrore);\n }// fine del blocco try-catch\n }" ]
[ "0.69464797", "0.67312056", "0.6641686", "0.66094315", "0.6457155", "0.64493656", "0.63986355", "0.63821584", "0.62724954", "0.62294286", "0.6074946", "0.6068068", "0.60664105", "0.60547143", "0.60498834", "0.60457414", "0.604044", "0.6010105", "0.5998335", "0.59938407", "0.5987807", "0.59856355", "0.5980332", "0.5971751", "0.59680206", "0.59663403", "0.5952309", "0.5952309", "0.5952309", "0.5952309", "0.5952309", "0.5945173", "0.5930551", "0.5918099", "0.5909718", "0.5896876", "0.5895483", "0.5873534", "0.58642834", "0.58642745", "0.5848726", "0.58362436", "0.5825079", "0.5807955", "0.5807065", "0.58059895", "0.579073", "0.57772833", "0.5768149", "0.5759107", "0.57590723", "0.57578105", "0.5756028", "0.5748798", "0.5742063", "0.5742035", "0.57376605", "0.57349", "0.57323307", "0.5730369", "0.5726705", "0.57215923", "0.5719903", "0.5699052", "0.5696506", "0.5694143", "0.5692295", "0.5691224", "0.56879556", "0.56866664", "0.5686527", "0.56853575", "0.5666406", "0.5662468", "0.566025", "0.56547874", "0.5654652", "0.5653196", "0.56502837", "0.5643797", "0.56421274", "0.5641981", "0.5633285", "0.56332576", "0.56319374", "0.56284696", "0.56240076", "0.5619787", "0.5617453", "0.5615926", "0.5613724", "0.5605366", "0.5602785", "0.56023216", "0.5598828", "0.5596609", "0.5595022", "0.5594434", "0.5590708", "0.55872273", "0.5587066" ]
0.0
-1
Created by Administrator on 2017/9/20.
public interface MyObserver extends Parcelable, Observer { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private stendhal() {\n\t}", "@Override\n public void perish() {\n \n }", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "public final void mo51373a() {\n }", "private static void cajas() {\n\t\t\n\t}", "@Override\n public void memoria() {\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\n protected void initialize() {\n\n \n }", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "public void mo4359a() {\n }", "private Rekenhulp()\n\t{\n\t}", "@Override\n\tpublic void create () {\n\n\t}", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "Petunia() {\r\n\t\t}", "private TMCourse() {\n\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\n\tpublic void create() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "protected MetadataUGWD() {/* intentionally empty block */}", "@Override\n public void settings() {\n // TODO Auto-generated method stub\n \n }", "public Pitonyak_09_02() {\r\n }", "public contrustor(){\r\n\t}", "@Override\n public void init() {\n\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "public void create() {\n\t\t\n\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "public void autoDetails() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\n\tpublic void create() {\n\n\t}", "@Override\n protected void getExras() {\n }", "public void mo6081a() {\n }", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void create() {\n\r\n\t}", "public void mo55254a() {\n }", "private UsineJoueur() {}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n void init() {\n }", "private void init() {\n\n\t}", "@Override\r\n\tpublic void create() {\n\t\t\r\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "private ReportGenerationUtil() {\n\t\t\n\t}", "public void verarbeite() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@SuppressWarnings(\"unused\")\n\tprivate void version() {\n\n\t}", "@Override\n public void init() {\n }", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "protected Doodler() {\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@SuppressWarnings(\"unused\")\n private void generateInfo()\n {\n }", "public void mo12930a() {\n }", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "private static void oneUserExample()\t{\n\t}", "private Singletion3() {}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n public void init() {\n\n }", "@Override\n public void init() {\n\n }", "@Override\n public int describeContents() { return 0; }", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "private void poetries() {\n\n\t}", "private void getStatus() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\n public void initialize() {\n \n }", "private MetallicityUtils() {\n\t\t\n\t}", "@Override\n\tprotected void interr() {\n\t}" ]
[ "0.63247395", "0.61438745", "0.58734256", "0.5863221", "0.58613014", "0.58445585", "0.58309525", "0.5765187", "0.574053", "0.574053", "0.5731307", "0.57303196", "0.57303196", "0.5728562", "0.57016814", "0.57006466", "0.56992906", "0.5698493", "0.5694588", "0.5680047", "0.56670374", "0.5662517", "0.56593114", "0.5651855", "0.5634997", "0.563378", "0.56284153", "0.56146747", "0.56005377", "0.559794", "0.5590522", "0.5588644", "0.55759114", "0.5573775", "0.5571293", "0.55692345", "0.5548687", "0.5548687", "0.5548687", "0.5548687", "0.5548687", "0.5548687", "0.5548687", "0.55345315", "0.55345315", "0.55345315", "0.55345315", "0.55345315", "0.55345315", "0.55314434", "0.5521144", "0.5496293", "0.5493491", "0.54901624", "0.54897976", "0.5480343", "0.54731923", "0.546324", "0.5462104", "0.54618657", "0.5451316", "0.54460955", "0.5443767", "0.54434174", "0.54269606", "0.5420754", "0.5420754", "0.54177445", "0.54159725", "0.5414757", "0.5413978", "0.54121464", "0.541037", "0.54095286", "0.5404015", "0.5403837", "0.54002154", "0.5389688", "0.53870124", "0.5385991", "0.53855336", "0.5383274", "0.5383274", "0.5383274", "0.5383274", "0.5383274", "0.5380292", "0.53800535", "0.536806", "0.53665286", "0.53665286", "0.5362285", "0.53615016", "0.5360562", "0.535877", "0.5344889", "0.5344889", "0.5344889", "0.5342157", "0.53411824", "0.5336219" ]
0.0
-1
Identifica qual botao foi clicado
public void onClick( View v ) { switch (v.getId()) { // Caso o botao de adicionar experimento for clicado case R.id.buttonDim: if( isNumeric(Largura.getEditText().getText().toString()) && isNumeric(Profundidade.getEditText().getText().toString()) && !Unidade.getEditText().getText().toString().equals("") && !Instituicao.getEditText().getText().toString().equals("") && !Sala.getEditText().getText().toString().equals("") && !NumLamp.getEditText().getText().toString().equals("") && !NumLum.getEditText().getText().toString().equals("") && !Potencia.getEditText().getText().toString().equals("")){ Global.X = Integer.parseInt(spinnerX.getSelectedItem().toString()); Global.Y = Integer.parseInt(spinnerY.getSelectedItem().toString()); Global.Sala = Integer.parseInt( Sala.getEditText().getText().toString()); Global.NumLum = Integer.parseInt( NumLum.getEditText().getText().toString()); Global.NumLamp = Integer.parseInt( NumLamp.getEditText().getText().toString()); Global.Potencia = Double.parseDouble( Potencia.getEditText().getText().toString() ); Global.Largura = Double.parseDouble(Largura.getEditText().getText().toString()); Global.Profundidade = Double.parseDouble(Profundidade.getEditText().getText().toString()); Global.Instituicao = Instituicao.getEditText().getText().toString(); Global.Unidade = Unidade.getEditText().getText().toString(); Global.Mapa = new int[ Global.Y ][ Global.X ]; for ( int i = 0; i < Global.Y; i++ ){ for ( int j = 0; j < Global.X; j++ ){ Global.Mapa[i][j] = 0; } } Intent ClickMap = new Intent( mActivity, MapeamentoFisico.class ); startActivity(ClickMap); finish(); } else{ Snackbar.make(findViewById(android.R.id.content), "Existem campos ainda nao preenchidos. Preencha todos os campos e tente de novo.", Snackbar.LENGTH_LONG).setAction("Action", null).show(); } break; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void actionPerformed(ActionEvent ae) {\n\t\tif(ae.getActionCommand().equals(\"Ação 3\"));\n\t\tSystem.out.println(\"Clicke no botão 3\");\n\t\t\n\t}", "public boolean test(CommandSender sender, MCommand command);", "public void uiVerifyButtonUndoExist() {\n try {\n getLogger().info(\"Verify button Undo Todo exist.\");\n btnToDoUndo.getAttribute(\"class\");\n NXGReports.addStep(\"Verify button Undo Todo exist.\", LogAs.PASSED, null);\n } catch (Exception ex) {\n getLogger().info(ex);\n AbstractService.sStatusCnt++;\n NXGReports.addStep(\"verify button Undo Todo exist.\", LogAs.FAILED, new CaptureScreen(CaptureScreen.ScreenshotOf.BROWSER_PAGE));\n }\n }", "@Override\n public void viewWillAppear() throws InterruptedException {\n commandView.addLocalizedText(\"Vuoi essere scomunicato? 0: sì, 1:no\");\n int answ = commandView.getInt(0, 1);\n boolean answer = (answ == 0);\n clientNetworkOrchestrator.send(new PlayerChoiceExcommunication(answer));\n }", "public void uiVerifyButtonUndoEnable() {\n try {\n getLogger().info(\"Verify button Undo Todo enable.\");\n Thread.sleep(largeTimeOut);\n\n if (btnToDoUndo.getAttribute(\"class\").toString().equals(\"fa fa-undo\")) {\n NXGReports.addStep(\"Verify button Undo Todo enable.\", LogAs.PASSED, null);\n } else {\n AbstractService.sStatusCnt++;\n NXGReports.addStep(\"verify button Undo Todo enable.\", LogAs.FAILED, new CaptureScreen(CaptureScreen.ScreenshotOf.BROWSER_PAGE));\n }\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }", "public void act() \n {\n verificaClique();\n }", "public boolean isBot(){\n return false;\n }", "@Override\n\tpublic void mouseClicked(MouseEvent e) {\n\t\tSystem.out.println(\"Botón pulsado\");\n\t\tObject o = e.getSource();\n\t\tif((JButton) o instanceof JButton) {\n\t\t\tJButton a = (JButton) o;\n\t\t\tif(a.equals(panel.getEnviarMensaje())) {\n\t\t\t\tint rec = 2 ; //En principio\n\t\t\t\tif(this.receptor instanceof ONG) {\n\t\t\t\t\tSystem.out.println(\"Es una ONG\");\n\t\t\t\t}else if(this.receptor instanceof Usuario ) {\n\t\t\t\t\tSystem.out.println(\"Es un participante\");\n\t\t\t\t}else {\n\t\t\t\t\tSystem.out.println(\"Es un gestor\");\n\t\t\t\t}\n\t\t\t\tSystem.out.println(\"Mensaje aún no enviado\");\n\t\t\t\tMensaje.enviarMensaje(emisor.getEmail(), receptor.getEmail(), panel.getMensaje().getText(), rec);\n\t\t\t\tSystem.out.println(\"Mensaje enviado\");\n\t\t\t\t\n\t\t\t\tpanel.dispose();\n\t\t\t\tJFrame t =new Toast(\"Mensaje enviado correctamente\", true);\n\t\t\t\tt.setVisible(true);\n\t\t\t}\n\t\t}\n\t}", "private void enableBotonAceptar()\r\n\t{\r\n\t\t\r\n\t}", "@Override\n public void action() {\n ACLMessage acl = blockingReceive();\n System.err.println(\"Hola, que gusto \" + acl.getSender() + \", yo soy \" + getAgent().getName());\n new EnviarMensaje().enviarMensajeString(ACLMessage.INFORM, \"Ag4\", getAgent(), \"Hola agente, soy \" + getAgent().getName(),\n \"COD0001\");\n }", "public void cliquerSauverContinuer() {\r\n\t\t\t\r\n\t\t\t//Identification du bouton et clic\r\n\t\t\tWebElement boutonSaveContinue = wait.until(ExpectedConditions.presenceOfElementLocated(By.xpath(\"//table[@id='\"+prefix()+\"y5-box']/tbody/tr[2]/td[2]\")));\r\n\t\t\tboutonSaveContinue.click();\r\n\t\t}", "private void esconderBotao() {\n\t\tfor (int i = 0; i < dificuldade.getValor(); i++) {// OLHAM TODOS OS BOTOES\r\n\t\t\tfor (int j = 0; j < dificuldade.getValor(); j++) {\r\n\t\t\t\tif (celulaEscolhida(botoes[i][j]).isVisivel() && botoes[i][j].isVisible()) {// SE A CELULA FOR VISIVEL E\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// O BOTAO FOR VISIVEL,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// ESCONDE O BOTAO\r\n\t\t\t\t\tbotoes[i][j].setVisible(false);//DEIXA BOTAO INVISIVEL\r\n\t\t\t\t\tlblNumeros[i][j].setVisible(true);//DEIXA O LABEL ATRAS DO BOTAO VISIVEL\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "boolean hasActionCommand();", "protected abstract InGameServerCommand getCommandOnConfirm();", "public void uiVerifyButtonUndoDisable() {\n try {\n getLogger().info(\"Verify button Undo Todo disable.\");\n Thread.sleep(largeTimeOut);\n\n if (btnToDoUndo.getAttribute(\"class\").toString().equals(\"fa fa-undo disabled\")) {\n NXGReports.addStep(\"Verify button Undo Todo disable.\", LogAs.PASSED, null);\n } else {\n AbstractService.sStatusCnt++;\n NXGReports.addStep(\"verify button Undo Todo disable.\", LogAs.FAILED, new CaptureScreen(CaptureScreen.ScreenshotOf.BROWSER_PAGE));\n }\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }", "boolean hasCommand();", "boolean hasCommand();", "@Override\n public void actionPerformed(ActionEvent e) {\n if(e.getActionCommand() == \"Iniciar sesión\" ){\n this.mostrarDatosUsuario();\n this.entrar();\n }\n if(e.getActionCommand() == \"Registrate\" ){\n JOptionPane.showMessageDialog(null, \"Oprimió botón registrarse\" , \"Advertencia\", 1);\n }\n if(e.getActionCommand() == \"¿Olvidaste tu contraseña?\" ){\n JOptionPane.showMessageDialog(null, \"Oprimió botón recuperar contraseña\" , \"Advertencia\", 1);\n }\n if(e.getSource() == logintemplate.getBVerContraseña()){\n JOptionPane.showMessageDialog(null, \"Oprimido botón ver contraseña\" , \"Advertencia\", 1);\n }\n if(e.getSource() == logintemplate.getBVerMas()){\n JOptionPane.showMessageDialog(null, \"Oprimido botón ver mas\" , \"Advertencia\", 1);\n }\n }", "private void cs0() {\n\t\t\tif(!Method.isChatiing()){\n\t\t\t\tMethod.npcInteract(RUNESCAPEGUIDE, \"Talk-to\");\n\t\t\t}\n\t\t\t\n\t\t}", "@Override\r\n\tpublic void action() {\n\t\tMessageTemplate mt=MessageTemplate.or(MessageTemplate.MatchContent(\"comida\"), MessageTemplate.MatchContent(\"bebida\"));\r\n ACLMessage msg = myAgent.receive(mt);\r\n if(msg!=null){\r\n \tif(msg.getContent().compareTo(\"comida\")==0){\r\n \t\tif(Comida>=5){\r\n \t\t\tACLMessage reply = msg.createReply();\r\n reply.setContent(\"Si\");\r\n System.out.println(myAgent.getLocalName()+\":Si, gracias tengo hambre todavia\"); \r\n myAgent.send(reply);\r\n Comida=Comida-5;\r\n \t\t}\r\n \t\telse{\r\n \t\t\tACLMessage reply = msg.createReply();\r\n reply.setContent(\"No\");\r\n System.out.println(myAgent.getLocalName()+\":No gracias\"); \r\n myAgent.send(reply);\r\n \t\t} \r\n \t}\r\n \telse if(msg.getContent().compareTo(\"bebida\")==0){\r\n \t\tif(Bebida>=5){\r\n \t\t\tACLMessage reply = msg.createReply();\r\n reply.setContent(\"Si\");\r\n System.out.println(myAgent.getLocalName()+\":Si, gracias tengo sed todavia\"); \r\n myAgent.send(reply);\r\n Bebida=Bebida-5;\r\n \t\t}\r\n \t\telse{\r\n \t\t\tACLMessage reply = msg.createReply();\r\n reply.setContent(\"No\");\r\n System.out.println(myAgent.getLocalName()+\":No gracias\"); \r\n myAgent.send(reply);\r\n \t\t} \r\n \t}\r\n }\r\n if (Comida==0 && Bebida==0){\r\n \tmyAgent.doDelete();\r\n }\r\n\t}", "public void setOnActionClic(EventHandler<ActionEvent> evt){\n this.contarClic();\n\n //Ejecutar el evento del usuario\n }", "@FXML\n\tprivate void botChecked(MouseEvent event) {\n\t\tuserList.setVisible(false);\n\t\tchatView.setText(\"\");\n\t\tif (\tsassiBot) {\n\t\t\tfor (ArrayList <String> conversation : this.conversations) {\n\t\t\t\tif (this.currentConversation.equals(String.join(\", \", conversation))) {\n\t\t\t\t\tclient.updateGroup(conversation);\n\t\t\t\t}\n\t\t\t}\n\t\t\tsassiBot = false;\n\t\t\tuserList.setVisible(true);\n\t\t\treturn;\n\t\t}\n\t\tsassiBot = true;\n\t\tthis.conversantName.setText(\"SASSIBOT\");\n\t\tthis.conversantImage.setVisible(true);\n\t\tthis.greenCircle.setVisible(false);\n\t}", "@Override\n\tpublic boolean doNpcClicking(Player player, Npc npc) {\n\t\treturn false;\n\t}", "@Override\n public void onClick(View view) {\n IdEvento = obtenerEmegencia().get(recyclerViewEmergencia.getChildAdapterPosition(view)).getId();\n\n //Se muestra un mensaje en pantalla de lo que seleciono\n Next();\n }", "public void Pedircarnet() {\n\t\tSystem.out.println(\"solicitar carnet para verificar si es cliente de ese consultorio\");\r\n\t}", "public void definirActionBoton(ActionEvent e) {\n CommandButton btnSelect = (CommandButton) e.getSource();\n\n //System.out.println(\"boton id: \" + btnSelect.getId());\n //this.getCbAction().setDisabled(false);\n if (btnSelect.getId().equals(\"btnEdit\")) {\n this.getCbActionTelefonos().setValue(\"Editar\");\n this.getListadoTelefonosBean().setiTipoBoton(1);\n //System.out.println(\"Entro al Edit\");\n }\n if (btnSelect.getId().equals(\"btnDelete\")) {\n this.getCbActionTelefonos().setValue(\"Eliminar\");\n this.getListadoTelefonosBean().setiTipoBoton(2);\n //System.out.println(\"Entro al Delete\");\n }\n\n if (btnSelect.getId().equals(\"btnCreateTelefonos\")) {\n //System.out.println(\"Entro al if : \" + this.getPersona());\n // this.getCbAction().setValue(\"Guardar\");\n //System.out.println(\"Despues del if\");\n this.getListadoTelefonosBean().setiTipoBoton(0);\n System.out.println(\"Get Tipo boton\" + this.getListadoEmailBean().getiTipoBoton());\n }//fin if\n\n //System.out.println(\"termino el definir: \" + this.getPersona());\n }", "public void clicarBotaoTabela(String colunaBusca, String valor, String colunaBotao, String idTabela) {\n WebElement tabela = getDriver().findElement(By.xpath(\"//*[@id='elementosForm:tableUsuarios']\"));\n int idColuna = obterIndiceColuna(colunaBusca, tabela);\n\n //encontrar a linha do registro\n int idLinha = obterIndiceLinha(valor, tabela, idColuna);\n\n //procurar coluna do botão\n int idColunaBotao = obterIndiceColuna(colunaBotao, tabela);\n\n //clicar no botão da celula encontrada\n WebElement celula = tabela.findElement(By.xpath(\".//tr[\" + idLinha + \"]/td[\" + idColunaBotao + \"]\"));\n celula.findElement(By.xpath(\".//input\")).click();\n\n }", "@Override\n public boolean onCambioEstado() {\n int estado = interfaceActivity.getEstado();\n\n switch (estado) {\n case DetallesNotaActivity.ESTADO_EDITAR:\n ImageButton borrarBoton = (ImageButton) getView()\n .findViewById(R.id.borrarBotom);\n borrarBoton.setVisibility(View.VISIBLE);\n break;\n }\n\n return true;\n }", "public void conectarControlador(Controlador c){\n int i = 1;\n for(BCE b : eleccion.getBotones()){\n b.getBoton().setActionCommand(\"\" + i++);\n b.getBoton().addActionListener(c);\n }\n btnRegistrar.addActionListener(c);\n }", "public void contactOwnerBtnClicked() {\n if (contactOwnerButtonClickedOnceBefore) {\n String chatID = dataModel.findChatID(advertisement.getUniqueID());\n if (chatID != null) {\n openChat(chatID);\n } else {\n createNewChat();\n }\n } else {\n view.setOwnerButtonText();\n }\n\n contactOwnerButtonClickedOnceBefore = true;\n }", "public boolean isBot() {\n//\t\treturn this.getUserIO().checkConnection();\n\t\treturn false;\n\t}", "private void fncConversacionPendienteSessionActiva() {\n if( Storage.fncStorageEncontrarUnaLinea(perfil.stgFriends, yoker) == true && \r\n Storage.fncStorageEncontrarUnaLinea(perfil.stgChats, yoker) == true\r\n ){\r\n\r\n // Agrego un nuevo mensaje a la conversion original\r\n // por que si perfil me tiene como amigo pudo estar enviado mesajes... (Entonces es el más actualizado)\r\n String chat_original = Storage.fncStorageCrearRutaChats(perfil.getStrEmail(), session_activa.getStrEmail());\r\n Storage.fncStorageAcoplarUnaLinea(chat_original, mensaje);\r\n\r\n // Registrar a perfil en mi cuenta o session_activa\r\n Storage.fncStorageActualizarUnaLinea(session_activa.stgFriends, perfil_seleccionado);\r\n\r\n // Regitrar a perfil en mi cuenta o session_activa (Este no es necesario)\r\n // Storage.fncStorageActualizarUnaLinea(session_activa.stgChats, perfil);\r\n\r\n // Clonar la conversion de perfil a session_activa (Entonces es el más actualizado)\r\n String chat_clone = Storage.fncStorageCrearRutaChats(session_activa.getStrEmail(), perfil.getStrEmail());\r\n Storage.fncStorageCopiarArchivo(new File(chat_original), chat_clone);\r\n \r\n if( this.mostrar_msg )\r\n JOptionPane.showMessageDialog(null, \"Tienes una conversación pendiente con \"\r\n + \"\\n\\t\\t\\t\\t\" + perfil.getStrEmail()\r\n + \"\\nPuedes chatear pueden conservar en usuario en las lista de amigos.\");\r\n }else{ \r\n\r\n // Agrego un nuevo mensaje en la conversación de session_activa\r\n String chat = Storage.fncStorageCrearRutaChats(session_activa.getStrEmail(), perfil.getStrEmail());\r\n Storage.fncStorageAcoplarUnaLinea(chat, mensaje);\r\n\r\n // Clonar la conversion de session_activa a perfil \r\n String chat_clone = Storage.fncStorageCrearRutaChats(perfil.getStrEmail(), session_activa.getStrEmail());\r\n Storage.fncStorageCopiarArchivo(new File(chat), chat_clone);\r\n\r\n // * Verificar que los puedan conversar entre ellos ....\r\n if( Storage.fncStorageEncontrarUnaLinea(perfil.stgFriends, yoker) == false && \r\n Storage.fncStorageEncontrarUnaLinea(session_activa.stgFriends, perfil_seleccionado) == false\r\n ){\r\n\r\n Storage.fncStorageActualizarUnaLinea(perfil.stgFriends, yoker);\r\n Storage.fncStorageActualizarUnaLinea(session_activa.stgFriends, perfil_seleccionado);\r\n \r\n if( this.mostrar_msg )\r\n JOptionPane.showMessageDialog(null, \"Haz recuperado la conversación con \"\r\n + \"\\n\\t\\t\\t\\t\" + perfil.getStrEmail()\r\n + \"\\nPuedes chatear pueden conservar en usuario en las lista de amigos.\");\r\n\r\n }else JOptionPane.showMessageDialog(null, \"Mensaje enviado.\"); \r\n } \r\n }", "@FXML private void manejadorBotonAceptar() {\n\t\tif (this.validarDatos()) {\n\t\t\tif (this.opcion == CREAR) {\n\t\t\t\tthis.usuario.setUsuario(this.campoTextoNombreUsuario.getText());\n\t\t\t\tthis.usuario.setContrasena(this.campoContrasena.getText());\n\t\t\t\tthis.usuario.setCorreoElectronico(this.campoCorreo.getText());\n\t\t\t\tif (comboStatus.getSelectionModel().getSelectedItem() == \"Bloqueado\")\n\t\t\t\t\tthis.usuario.setStatus(0);\n\t\t\t\tif (comboStatus.getSelectionModel().getSelectedItem() == \"Activo\")\n\t\t\t\t\tthis.usuario.setStatus(1);\n\t\t\t\tif (comboStatus.getSelectionModel().getSelectedItem() == \"Baja\")\n\t\t\t\t\tthis.usuario.setStatus(2);\n\t\t\t\tthis.usuario.setGrupoUsuarioFk(listaGrupoUsuario.get(comboGrupoUsuario.getSelectionModel().getSelectedIndex()).getSysPk());\n\t\t\t\tthis.usuario.setEmpleadoFK(EmpleadoDAO.readEmpleadoPorNombre(this.mainApp.getConnection(), comboEmpleados.getSelectionModel().getSelectedItem()).getSysPK());\n\n\t\t\t\tif (UsuarioDAO.crear(this.mainApp.getConnection(), this.usuario)) {\n\t\t\t\t\tmanejadorBotonCerrar();\n\t\t\t\t\tNotificacion.dialogoAlerta(AlertType.INFORMATION, \"\", \"El registro se creo correctamente\");\n\t\t\t\t} else {\n\t\t\t\t\tNotificacion.dialogoAlerta(AlertType.INFORMATION, \"\", \"No se pudo crear el registro\");\n\t\t\t\t}//FIN IF-ELSE\n\t\t\t} else if (this.opcion == EDITAR) {\n\t\t\t\tthis.usuario.setUsuario(this.campoTextoNombreUsuario.getText());\n\t\t\t\tthis.usuario.setContrasena(this.campoContrasena.getText());\n\t\t\t\tthis.usuario.setCorreoElectronico(this.campoCorreo.getText());\n\t\t\t\tif (comboStatus.getSelectionModel().getSelectedItem() == \"Bloqueado\")\n\t\t\t\t\tthis.usuario.setStatus(0);\n\t\t\t\tif (comboStatus.getSelectionModel().getSelectedItem() == \"Activo\")\n\t\t\t\t\tthis.usuario.setStatus(1);\n\t\t\t\tif (comboStatus.getSelectionModel().getSelectedItem() == \"Baja\")\n\t\t\t\t\tthis.usuario.setStatus(2);\n\t\t\t\tthis.usuario.setGrupoUsuarioFk(listaGrupoUsuario.get(comboGrupoUsuario.getSelectionModel().getSelectedIndex()).getSysPk());\n\t\t\t\tthis.usuario.setEmpleadoFK(EmpleadoDAO.readEmpleadoPorNombre(this.mainApp.getConnection(), comboEmpleados.getSelectionModel().getSelectedItem()).getSysPK());\n\n\t\t\t\tif (UsuarioDAO.update(this.mainApp.getConnection(), this.usuario)) {\n\t\t\t\t\tmanejadorBotonCerrar();\n\t\t\t\t\tNotificacion.dialogoAlerta(AlertType.INFORMATION, \"\", \"El registro se modifico correctamente\");\n\t\t\t\t} else {\n\t\t\t\t\tNotificacion.dialogoAlerta(AlertType.INFORMATION, \"\", \"No se pudo modificar el registro, revisa la información sea correcta\");\n\t\t\t\t}//FIN IF-ELSE\n\t\t\t} else if (this.opcion == VER) {\n\t\t\t\tmanejadorBotonCerrar();\n\t\t\t}//FIN IF ELSE\n\t\t}//FIN METODO\n\t}", "@Override\n public void onBoomButtonClick(int index) {\n }", "@When(\"^acionar o Botao de ENTRAR$\")\n\tpublic void acionar_o_Botao_de_ENTRAR() throws Throwable {\n\t\t\n\t\tPageObject_Login.ButtonEntrar();\t\n\t\t\n\t}", "public void actionPerformed(ActionEvent evento) {\n\t\tif (evento.getSource() == janelaBanList.getMenuSair()) {\r\n\t\t\tSystem.exit(0);\r\n\t\t}\r\n\r\n\t\t// Caso o evento tenha ocorrido no botao Configurações.\r\n\t\telse if (evento.getSource() == janelaBanList.getMenuAlternarConta()) {\r\n\t\t\tnew JanelaAlternarConta(janelaBanList);\r\n\t\t}\r\n\r\n\t\t// Caso o evento tenha ocorrido no botao Banir.\r\n\t\telse if (evento.getSource() == janelaBanList.getBotaoBanir()) {\r\n\t\t\tbanirUsuario();\r\n\t\t}\r\n\t\t\r\n\t\t// Caso o evento tenha ocorrido no menu Desbanir.\r\n\t\telse if (evento.getSource() == janelaBanList.getMenuDesbanir()) {\r\n\t\t\tdesbanirUsuario();\r\n\t\t}\r\n\t}", "protected void botonAceptarPulsado() {\n\t\tString pass = this.vista.getClave();\n\t\tchar[] arrayC = campoClave.getPassword();\n\t\tString clave = new String(arrayC);\n\t\tclave = Vista.md5(clave);\n\t\t\n\t\tif (pass.equals(clave)) {\n\t\t\tarrayC = campoClaveNueva.getPassword();\n\t\t\tString pass1 = new String(arrayC);\n\t\t\t\n\t\t\tarrayC = campoClaveRepita.getPassword();\n\t\t\tString pass2 = new String(arrayC);\n\t\t\t\n\t\t\tif (pass1.equals(pass2)) {\n\t\t\t\tif (this.vista.cambiarClave(pass1)) {\n\t\t\t\t\tthis.vista.msg(this, \"Contraseña maestra cambiada con éxito\");\n\t\t\t\t\tthis.setVisible(false);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tthis.vista.error(this, \"Error al cambiar la contraseña maestra\");\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthis.vista.error(this, \"Las contraseñas no coinciden\");\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tthis.vista.error(this, \"Contraseña incorrecta\");\n\t\t}\n\t}", "@Override\n\tpublic String textoVerificarAceptar() {\n\t\treturn \"Debe seleccionar un item o hacer click en [Cancelar] para continuar\";\n\t}", "public void VerifyButtons(){\n if (currentTurn.getSiguiente() == null){\n next_turn.setEnabled(false);\n } else{\n next_turn.setEnabled(true);\n }\n if (currentTurn.getAnterior() == null){\n prev_turn.setEnabled(false);\n } else{\n prev_turn.setEnabled(true);\n }\n if (current.getSiguiente() == null){\n next_game.setEnabled(false);\n } else{\n next_game.setEnabled(true);\n }\n if (current.getAnterior() == null){\n prev_game.setEnabled(false);\n } else{\n prev_game.setEnabled(true);\n }\n }", "public void youWinByAbandonment() {\n try {\n if (getClientInterface() != null)\n getClientInterface().gameEndedByAbandonment(\"YOU WON BECAUSE YOUR OPPONENTS HAVE ABANDONED!!\");\n }\n catch (RemoteException e) {\n System.out.println(\"remote sending ended by abandonment error\");\n }\n }", "public void interactionOneTouch(int x, int y){\n if(this.getBotones().getBotonRecHorizLeft().contains(x,y)){\n Log.d(TAG,\"boton Left\");\n this.getJugadora().setDireccio(1);\n this.getJugadora().setPosicion(this.getJugadora().getPosicion().x - this.getJugadora().getSpeed(),this.getJugadora().getPosicion().y);\n }else if(this.getBotones().getBotonRecHorizRigth().contains(x,y)) {\n Log.d(TAG, \"boton Right\");\n this.getJugadora().setDireccio(0);\n this.getJugadora().setPosicion(this.getJugadora().getPosicion().x + this.getJugadora().getSpeed(),this.getJugadora().getPosicion().y);\n } else if (this.getBotones().getBotonRecVertArriba().contains(x,y)){\n Log.d(TAG, \"boton Arriba\");\n this.getJugadora().setDireccio(2);\n this.getJugadora().setPosicion(this.getJugadora().getPosicion().x,this.getJugadora().getPosicion().y - this.getJugadora().getSpeed());\n } else if (this.getBotones().getBotonRecVertBajo().contains(x,y)){\n Log.d(TAG, \"boton Abajo\");\n this.getJugadora().setDireccio(3);\n this.getJugadora().setPosicion(this.getJugadora().getPosicion().x,this.getJugadora().getPosicion().y + this.getJugadora().getSpeed());\n }\n if(this.getBotones().getBotonCercleA().contains(x,y)){\n Log.d(TAG, \"boton A\");\n }\n if(this.getBotones().getBotonCercleB().contains(x,y)){\n Log.d(TAG, \"boton B\");\n }\n\n // mover player , interaccion de una sola respuesta por cada click\n\n\n\n }", "public boolean getBot() {\n return bot;\n }", "@Override\n\tpublic boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {\n\t\tif (sender instanceof ConsoleCommandSender){\n\t\t\t\n\t\t\tsender.sendMessage(\"§r ARRETE DE FAIRE LE CON\");\n\t\t\t\n\t\t}\n\t\t//si c'est un joueur on gère la commandes\n\t\telse if(sender instanceof Player){\n\t\t\t\n\t\t\tPlayer player = (Player) sender;\n\t\t\t\n\t\t\t//on verifie que la commende est la bonne\n\t\t\tif(cmd.getName().equalsIgnoreCase(\"castejoin\")){\n\t\t\t\t\n\t\t\t\t//on verifie que l'on a bien des arguments\n\t\t\t\tif(args.length != 0){\n\t\t\t\t\t\n\t\t\t\t\t//on recupère la caste en argument\n\t\t\t\t\tString caste = args[0];\n\t\t\t\t\t\n\t\t\t\t\t//le message que le joueur recevra s'il ne peut pas rejoindre la caste au cas ou il y aurais plusieur raison\n\t\t\t\t\tString message = \"\"; \n\t\t\t\t\t\n\t\t\t\t\t//si le joueur peut rejoindre une caste\n\t\t\t\t\tif( (message = playerCanJoinCaste(player,caste)).equals(\"ok\")){\n\t\t\t\t\t\t\n\t\t\t\t\t\tint indexCaste = -1;\n\t\t\t\t\t\t//si la caste existe elle nous renvoie l'id de la position dans la liste des Caste sinon -1\n\t\t\t\t\t\tif( (indexCaste = isCasteExiste(caste)) != -1){\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//on recupère la class caste qui correspond pour la mettre dans la hashmap\n\t\t\t\t\t\t\tCaste casteClass = Caste.castes.get(indexCaste);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//on l'ajoute a la liste des joueur et des caste qui leur corespond\n\t\t\t\t\t\t\tMain.playerCaste.put(player, casteClass);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//on ecrit le changement dans le fichier player .yml\n\t\t\t\t\t\t\tPlayerManager.createEntryYml(player);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//message de confirmation\n\t\t\t\t\t\t\tplayer.sendMessage(\"vous avez rejoins la caste : \"+caste);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\t//la caste demander n'existe pas\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tplayer.sendMessage(\"la caste : \"+caste+\" n'existe pas\");\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t//le joueur ne peut pas pretendre a aller dans cette caste\n\t\t\t\t\telse{\n\t\t\t\t\t\t\n\t\t\t\t\t\tplayer.sendMessage(message);\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tplayer.sendMessage(\"/casteJoin <nom_de_la_caste>\");\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t}\n\t\telse{\n\t\t\tsender.sendMessage(\"impossible Oo\");\n\t\t}\n\t\treturn true;\n\t\t\n\t}", "@Override\n public void action() {\n ACLMessage acl = receive();\n if (acl != null) {\n if (acl.getPerformative() == ACLMessage.REQUEST) {\n try {\n ContentElement elemento = myAgent.getContentManager().extractContent(acl);\n if (elemento instanceof PublicarServicio) {\n PublicarServicio publicar = (PublicarServicio) elemento;\n Servicio servicio = publicar.getServicio();\n jadeContainer.iniciarChat(servicio.getTipo(), servicio.getDescripcion());\n //myAgent.addBehaviour(new IniciarChatBehaviour(myAgent, servicio.getTipo(), servicio.getDescripcion()));\n } else if (elemento instanceof EnviarMensaje) {\n EnviarMensaje enviar = (EnviarMensaje) elemento;\n Mensaje mensaje = enviar.getMensaje();\n jadeContainer.enviarMensajeChatJXTA(mensaje.getRemitente(), mensaje.getMensaje());\n }\n } catch (CodecException ex) {\n System.out.println(\"CodecException: \" + ex.getMessage());\n } catch (UngroundedException ex) {\n System.out.println(\"UngroundedException: \" + ex.getMessage());\n } catch (OntologyException ex) {\n System.out.println(\"OntologyException: \" + ex.getMessage());\n }\n }\n } else {\n block();\n }\n }", "@Override\n public void onMessageReceived(@NotNull MessageReceivedEvent event) {\n String message = event.getMessage().getContentRaw().toLowerCase();\n Commands commands = Main.getBOT().getCommands();\n\n // When message is intended for bob, check it\n if (message.startsWith(\"!bob\")) {\n commands.evaluateCommand(message.replace(\"!bob \", \"\"), event);\n } else if (message.contains(\"#blamekall\")) {\n event.getChannel().sendMessage(\"NO! BE NICE! GO TO NAUGHTY JAIL!\").queue();\n event.getChannel().sendMessage(\"https://tenor.com/view/bonk-gif-18805247\").queue();\n }\n\n }", "public void activarAceptar() {\n aceptar = false;\n }", "@Override\n public void actionPerformed(ActionEvent e) {\n String comando = e.getActionCommand();\n\n if (comando == \"Novo labirinto\")\n this.btnNovoLabirinto();\n else if (comando == \"Abrir labirinto\")\n this.btnAbrirLabirinto();\n else if (comando == \"Salvar labirinto\")\n this.btnSalvarLabirinto();\n else // comando==\"Executar labirinto\"\n this.btnExecutarLabirinto();\n }", "boolean isAlreadyTriggered();", "@Override\n\tpublic boolean verificarCancelar() {\n\t\treturn true;\n\t}", "void userPressDisconnectButton();", "@Override\n\tpublic void execute() {\n\t\tfinal Component KNIFE = CONSTS.KNIFE_CLICK;\n\t\tfinal Component FLETCH_BUTTON = CONSTS.FLETCH_BUTTON;\n\t\t// get random log from inventory\n\t\tfinal Item log = ctx.backpack.id(CONSTS.fletching.getId()).shuffle().poll();\n\t\t// interact with log\n\t\tif(log.interact(\"Craft\")) {\n\t\t\tCondition.wait(new Callable<Boolean>() {\n\n\t\t\t\t@Override\n\t\t\t\tpublic Boolean call() throws Exception {\n\t\t\t\t\treturn KNIFE.valid() && KNIFE.visible();\n\t\t\t\t}\n\t\t\t},200,3);\n\t\t\tif(KNIFE.valid() && KNIFE.visible()) {\n\t\t\t\t// click on knife in popup menu\n\t\t\t\tif(KNIFE.click()) {\n\t\t\t\t\t// wait for fletch button to open up\n\t\t\t\t\tCondition.wait(new Callable<Boolean> () {\n\n\t\t\t\t\t\t@Override\n\t\t\t\t\t\tpublic Boolean call() throws Exception {\n\t\t\t\t\t\t\treturn FLETCH_BUTTON.visible() && FLETCH_BUTTON.valid();\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t\t// if the buttons visible\n\t\t\t\t\tif(FLETCH_BUTTON.visible() && FLETCH_BUTTON.valid()) {\n\t\t\t\t\t\t// if it still needs to select the menu item\n\t\t\t\t\t\tif(first) {\n\t\t\t\t\t\t\tfinal Component itemchoice = evaluateIndexes(CONSTS.method);\n\t\t\t\t\t\t\tif(itemchoice.visible() && itemchoice.valid()) {\n\t\t\t\t\t\t\t\titemchoice.click(\"Select\");\n\t\t\t\t\t\t\t\tfirst = false;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(CONSTS.FLETCH_BUTTON.click()) {\n\t\t\t\t\t\t\t// wait to fletch the logs\n\t\t\t\t\t\t\tCondition.wait(new Callable<Boolean>() {\n\t\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\t\tpublic Boolean call() throws Exception {\n\t\t\t\t\t\t\t\t\treturn ctx.backpack.id(CONSTS.fletching.getId()).isEmpty();\n\t\t\t\t\t\t\t\t}\t\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// if it took us directly to the fletching interface\n\t\t\t} else if(FLETCH_BUTTON.visible() && FLETCH_BUTTON.valid()) {\n\t\t\t\t// if it still needs to select the menu item\n\t\t\t\tif(first) {\n\t\t\t\t\tfinal Component itemchoice = evaluateIndexes(CONSTS.method);\n\t\t\t\t\tif(itemchoice.visible() && itemchoice.valid()) {\n\t\t\t\t\t\titemchoice.click(\"Select\");\n\t\t\t\t\t\tfirst = false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(FLETCH_BUTTON.click()) {\n\t\t\t\t\t// wait to fletch the logs\n\t\t\t\t\tCondition.wait(new Callable<Boolean>() {\n\t\t\t\t\t\t@Override\n\t\t\t\t\t\tpublic Boolean call() throws Exception {\n\t\t\t\t\t\t\treturn ctx.backpack.id(CONSTS.fletching.getId()).isEmpty();\n\t\t\t\t\t\t}\t\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "private void quitarCorazones(){\n if(ramiro.estadoItem== Ramiro.EstadoItem.NORMAL){\n efectoDamage.play();\n vidas--;\n }\n }", "@Override\npublic boolean onCommand(CommandSender arg0, Command arg1, String arg2, String[] arg3) {\n\treturn false;\n}", "@FXML private void okButtonActivity() {\n if (activeUser != null && !activeUser.getUsername().equals(recipe.getAuthor())){\n okButton.setDisable(false);\n }\n }", "private void chatRoomBtnListener() {\n chatRoomBtn.addListener(new ClickListener(){\n public void clicked(InputEvent event, float x, float y){\n ChessGame.client.ingame = false;\n }\n });\n }", "@ReceiveEvent(components = ClientComponent.class)\n public void onToggleConsole(BTEditorButton event, EntityRef entity) {\n if (event.getState() == ButtonState.DOWN) {\n console.addMessage(\"Behavior Editor is only available to the Host or on Singleplayer\", CoreMessageType.CHAT);\n }\n }", "@Override\n public void onClick(View v) {\n if(!mf.getSnap().equals(nk.getIdentifier())) {\n if (ChangeFragment.checkAvailibity(mf.getSnap())) {\n Utils.createPopUpContact(mContext, mf,new Utils.SelectionListener() {\n @Override\n public void onConfirm() {\n ChanInfo chanInfo = new ChanInfo();\n\n chanInfo.identifierChannel = nk.getIdentifier() + \"-chat-\" + mf.getSnap();\n chanInfo.channelName = \"Chat \" + nk.getNamef() + \" & \" + mf.getName_of();\n // nk.setLang_chat();\n NamkoFragment.chanInfo = chanInfo;\n nk.setLang_chat(chanInfo.identifierChannel);\n\n ChangeFragment.processNewChan(chanInfo);\n\n fragmentManager.beginTransaction().replace(nk.ContainerId, nk).commitAllowingStateLoss();\n\n\n }\n\n @Override\n public void onCancel() {\n\n }\n\n @Override\n public void OnBanUser() {\n super.OnBanUser();\n Utils.banThis(mf.getSnap());\n removeMessage(i);\n }\n });\n\n } else {\n\n if (!ChangeFragment.checkIsSameChan(nk.getIdentifier())) {\n goChatPrivate(mf, i);\n }\n\n\n\n }\n }\n }", "@Override\n\tpublic void goToUICMantCliente(String modo) {\n\t\tif (modo.equalsIgnoreCase(constants.modoNuevo())) {\n\t\t\tuiHomeCliente.getUIMantCliente().setModo(modo);\n\t\t\tuiHomeCliente.getUIMantCliente().activarCampos();\n\t\t\tuiHomeCliente.getUIMantCliente().setTituloOperacion(\"Insertar\");\n\t\t\tuiHomeCliente.getContainer().showWidget(1);\t\t\t\n\t\t\tuiHomeCliente.getUIMantCliente().refreshScroll();\n\t\t} else if (modo.equalsIgnoreCase(constants.modoEditar())) {\n\t\t\tClienteProxy bean = grid.getSelectionModel().getSelectedObject();\n\t\t\t//Window.alert(bean.getIdCliente());\n\t\t\tif (bean == null){\n\t\t\t\t//Dialogs.alert(constants.alerta(), constants.seleccioneCliente(), null);\n\t\t\t\t//Window.alert(constants.seleccioneCliente());\n\t\t\t\tNotification not=new Notification(Notification.ALERT,constants.seleccioneCliente());\n\t\t\t\tnot.showPopup();\n\t\t\t\treturn;\n\t\t\t}\t\t\t\t\n\t\t\tuiHomeCliente.getUIMantCliente().setModo(modo);\n\t\t\tuiHomeCliente.getUIMantCliente().setBean(bean);\n\t\t\tuiHomeCliente.getUIMantCliente().activarCampos();\n\t\t\tuiHomeCliente.getUIMantCliente().setTituloOperacion(\"Actualizar\");\n\t\t\tuiHomeCliente.getContainer().showWidget(1);\t\t\t\n\t\t\tuiHomeCliente.getUIMantCliente().refreshScroll();\n\t\t} else if (modo.equalsIgnoreCase(constants.modoDesactivar())) {\n\t\t\tClienteProxy bean = grid.getSelectionModel().getSelectedObject();\n\t\t\t//Window.alert(bean.getIdCliente());\n\t\t\tif (bean == null){\n\t\t\t\t//Dialogs.alert(constants.alerta(), constants.seleccioneCliente(), null);\n\t\t\t\t//Window.alert(constants.seleccioneCliente());\n\t\t\t\tNotification not=new Notification(Notification.ALERT,constants.seleccioneCliente());\n\t\t\t\tnot.showPopup();\n\t\t\t\treturn;\n\t\t\t}\t\t\t\t\n\t\t\tuiHomeCobrador.getUIMantCliente().setModo(modo);\n\t\t\tuiHomeCobrador.getUIMantCliente().setBean(bean);\n\t\t\tuiHomeCobrador.getUIMantCliente().activarCampos();\n\t\t\tuiHomeCobrador.getUIMantCliente().setTituloOperacion(\"Desactivar\");\n\t\t\tuiHomeCobrador.getContainer().showWidget(4);\t\t\t\n\t\t\tuiHomeCobrador.getUIMantCliente().refreshScroll();\n\t\t}else if (modo.equalsIgnoreCase(constants.modoEliminar())) {\n\t\t\tClienteProxy bean = grid.getSelectionModel().getSelectedObject();\n\t\t\t//Window.alert(bean.getIdCliente());\n\t\t\tif (bean == null){\n\t\t\t\t//Dialogs.alert(constants.alerta(),constants.seleccioneCliente(), null);\n\t\t\t\t//Window.alert(constants.seleccioneCliente());\n\t\t\t\tNotification not=new Notification(Notification.ALERT,constants.seleccioneCliente());\n\t\t\t\tnot.showPopup();\n\t\t\t\treturn;\n\t\t\t}\t\t\t\t\n\t\t\tuiHomeCliente.getUIMantCliente().setModo(modo);\n\t\t\tuiHomeCliente.getUIMantCliente().setBean(bean);\n\t\t\tuiHomeCliente.getUIMantCliente().activarCampos();\n\t\t\tuiHomeCliente.getUIMantCliente().setTituloOperacion(\"Eliminar\");\n\t\t\tuiHomeCliente.getContainer().showWidget(1);\t\t\t\n\t\t\tuiHomeCliente.getUIMantCliente().refreshScroll();\n\t\t}\n\n\t}", "private void isAbleToBuild() throws RemoteException {\n int gebouwdeGebouwen = speler.getGebouwdeGebouwen();\n int bouwLimiet = speler.getKarakter().getBouwLimiet();\n if (gebouwdeGebouwen >= bouwLimiet) {\n bouwbutton.setDisable(true); // Disable button\n }\n }", "public void DoGoToSeat() {\n\t\tcommand = Command.FollowWaiter;\n\t}", "public void verifierSaisie(){\n boolean ok = true;\n\n // On regarde si le client a ecrit quelque chose\n if(saisieMessage.getText().trim().equals(\"\"))\n ok = false;\n\n if(ok)\n btn.setEnabled(true); //activer le bouton\n else\n btn.setEnabled(false); //griser le bouton\n }", "public void sincronizza() {\n boolean abilita;\n\n super.sincronizza();\n\n try { // prova ad eseguire il codice\n\n /* abilitazione bottone Esegui */\n abilita = false;\n if (!Lib.Data.isVuota(this.getDataInizio())) {\n if (!Lib.Data.isVuota(this.getDataFine())) {\n if (Lib.Data.isSequenza(this.getDataInizio(), this.getDataFine())) {\n abilita = true;\n }// fine del blocco if\n }// fine del blocco if\n }// fine del blocco if\n this.getBottoneEsegui().setEnabled(abilita);\n\n } catch (Exception unErrore) { // intercetta l'errore\n Errore.crea(unErrore);\n }// fine del blocco try-catch\n\n }", "public static void eventoArticuloClienteDistribuidor(boolean preguntar) {\n if (preguntar) {\n if (Logica.Cuadros_Emergentes.confirmacionDefinida(\"\"\n + \"-Se borraran todos los datos escritos del nuevo distribuidor.\\n\\n\") == 0) {\n panel_nuevoDistribuidor.panelNuevoDistribuidor_textFieldCodigo.setText(\"\");\n panel_nuevoDistribuidor.panelNuevoDistribuidor_textFieldNombre.setText(\"\");\n panel_nuevoDistribuidor.panelNuevoDistribuidor_textFieldContacto.setText(\"\");\n panel_nuevoDistribuidor.panelNuevoDistribuidor_textFieldDireccion.setText(\"\");\n panel_nuevoDistribuidor.panelNuevoDistribuidor_botonHistorialDeDistribuidor.setVisible(false);\n panel_nuevoDistribuidor.panelNuevoDistribuidor_textFieldCodigo.setEditable(true);\n Diseño.Facturacion.paneles_base.panelBase_inventarioClientesDistribuidores.reestablecerComponentes();\n }\n } else {\n panel_nuevoDistribuidor.panelNuevoDistribuidor_textFieldCodigo.setText(\"\");\n panel_nuevoDistribuidor.panelNuevoDistribuidor_textFieldNombre.setText(\"\");\n panel_nuevoDistribuidor.panelNuevoDistribuidor_textFieldContacto.setText(\"\");\n panel_nuevoDistribuidor.panelNuevoDistribuidor_textFieldDireccion.setText(\"\");\n panel_nuevoDistribuidor.panelNuevoDistribuidor_botonHistorialDeDistribuidor.setVisible(false);\n panel_nuevoDistribuidor.panelNuevoDistribuidor_textFieldCodigo.setEditable(true);\n Diseño.Facturacion.paneles_base.panelBase_inventarioClientesDistribuidores.reestablecerComponentes();\n }\n }", "public void handleEvent(Message event) {\n\r\n if(m_ensureLock && event.getMessageType() == Message.ARENA_MESSAGE && event.getMessage().equals(\"Arena UNLOCKED\")) {\r\n m_botAction.toggleLocked();\r\n return;\r\n }\r\n\r\n if(event.getMessageType() != Message.PRIVATE_MESSAGE) {\r\n return;\r\n }\r\n\r\n int id = event.getPlayerID();\r\n String name = m_botAction.getPlayerName(id);\r\n String msg = event.getMessage().trim().toLowerCase();\r\n\r\n if(name == null || msg == null || msg.length() == 0) {\r\n return;\r\n }\r\n\r\n String lcname = name.toLowerCase();\r\n\r\n boolean isSmod = m_operatorList.isSmod(lcname);\r\n boolean hasAccess = isSmod || m_access.contains(lcname);\r\n\r\n /* public pm commands */\r\n //!help\r\n if(msg.equals(\"!help\")) {\r\n m_botAction.privateMessageSpam(id, help_player);\r\n\r\n if(hasAccess) {\r\n m_botAction.privateMessageSpam(id, help_staff);\r\n }\r\n\r\n if(isSmod) {\r\n m_botAction.privateMessageSpam(id, help_smod);\r\n m_botAction.sendPrivateMessage(id, \"Database: \" + (m_botAction.SQLisOperational() ? \"online\" : \"offline\"));\r\n }\r\n\r\n //!status\r\n } else if(msg.equals(\"!status\")) {\r\n cmdStatus(id);\r\n\r\n //!spec\r\n } else if(msg.equals(\"!spec\")) {\r\n if(m_state.isStarting() || m_state.isStartingFinal()) {\r\n m_botAction.specWithoutLock(id);\r\n }\r\n\r\n //!about\r\n } else if(msg.equals(\"!about\")) {\r\n m_botAction.sendPrivateMessage(id, \"KimBot! (2007-12-15) by flibb <ER>\", 7);\r\n\r\n //!lagout/!return\r\n } else if(msg.equals(\"!lagout\") || msg.equals(\"!return\")) {\r\n KimPlayer kp = m_allPlayers.get(lcname);\r\n\r\n if(kp == null) {\r\n return;\r\n }\r\n\r\n if(!kp.m_isOut) {\r\n synchronized(m_state) {\r\n if((m_state.isMidGame() || m_state.isMidGameFinal()) && m_lagoutMan.remove(lcname)) {\r\n putPlayerInGame(id, kp, false);\r\n } else if((m_state.isStarting() || m_state.isStartingFinal()) && m_startingLagouts.remove(lcname)) {\r\n m_startingReturns.add(kp);\r\n m_botAction.sendPrivateMessage(id, \"You will be put in at the start of the game.\");\r\n }\r\n }\r\n } else {\r\n m_botAction.sendPrivateMessage(id, \"Cannot return to game.\");\r\n }\r\n\r\n //poll vote\r\n } else if(Tools.isAllDigits(msg)) {\r\n if(m_poll != null) {\r\n m_poll.handlePollCount(id, name, msg);\r\n }\r\n\r\n /* staff commands */\r\n } else if(hasAccess) {\r\n //!start\r\n if(msg.equals(\"!start\")) {\r\n m_deathsToSpec = 10;\r\n m_maxTeamSize = 1;\r\n cmdStart(id);\r\n } else if(msg.startsWith(\"!start \")) {\r\n String[] params = msg.substring(7).split(\" \");\r\n m_deathsToSpec = 10;\r\n m_maxTeamSize = 1;\r\n\r\n for(String p : params) {\r\n try {\r\n if(Tools.isAllDigits(p)) {\r\n m_deathsToSpec = Integer.parseInt(p);\r\n } else if(p.startsWith(\"teams=\")) {\r\n m_maxTeamSize = Integer.parseInt(p.substring(6));\r\n }\r\n } catch(NumberFormatException e) {\r\n m_botAction.sendPrivateMessage(id, \"Can't understand: \" + p);\r\n return;\r\n }\r\n }\r\n\r\n m_deathsToSpec = Math.max(1, Math.min(99, m_deathsToSpec));\r\n m_maxTeamSize = Math.max(1, Math.min(99, m_maxTeamSize));\r\n cmdStart(id);\r\n //!stop\r\n } else if(msg.equals(\"!stop\")) {\r\n cmdStop(id);\r\n //!die\r\n } else if(msg.equals(\"!die\")) {\r\n if(m_state.isStopped()) {\r\n m_lvz.clear();\r\n\r\n try {\r\n Thread.sleep(3000);\r\n } catch(InterruptedException e) {}\r\n\r\n m_botAction.die(\"!die by \" + name);\r\n } else {\r\n m_botAction.sendPrivateMessage(id, \"A game is in progress. Use !stop first.\");\r\n }\r\n\r\n //!startinfo\r\n } else if(msg.equals(\"!startinfo\")) {\r\n if(m_state.isStopped() || m_startedBy == null) {\r\n m_botAction.sendPrivateMessage(id, \"No one started a game.\");\r\n } else {\r\n m_botAction.sendPrivateMessage(id, \"Game started by \" + m_startedBy);\r\n }\r\n\r\n //!reset\r\n } else if(msg.equals(\"!reset\")) {\r\n if(m_state.isStopped()) {\r\n resetArena();\r\n m_botAction.sendPrivateMessage(id, \"Resetted.\");\r\n } else {\r\n m_botAction.sendPrivateMessage(id, \"A game is in progress. Use !stop first.\");\r\n }\r\n\r\n //!remove\r\n } else if(msg.startsWith(\"!remove \")) {\r\n synchronized(m_state) {\r\n if(m_state.isStopped()) {\r\n m_botAction.sendPrivateMessage(id, \"The game is not running.\");\r\n } else {\r\n cmdRemove(id, msg.substring(8));\r\n }\r\n }\r\n\r\n //!test\r\n } else if(msg.startsWith(\"!test\")) {\r\n m_botAction.sendArenaMessage(Tools.addSlashes(\"test'test\\\"test\\\\test\"));\r\n\r\n } else if(isSmod) {\r\n //!addstaff\r\n if(msg.startsWith(\"!addstaff \")) {\r\n String addname = msg.substring(10);\r\n\r\n if(addname.length() <= 1 || addname.indexOf(':') >= 0) {\r\n m_botAction.sendPrivateMessage(id, \"Invalid name. Access list not changed.\");\r\n } else if(addname.length() > MAX_NAMELENGTH) {\r\n m_botAction.sendPrivateMessage(id, \"Name too long. Max. 18 characters.\");\r\n } else if(m_access.add(msg.substring(10))) {\r\n updateAccessList(id);\r\n } else {\r\n m_botAction.sendPrivateMessage(id, \"That name already has access.\");\r\n }\r\n\r\n //!delstaff\r\n } else if(msg.startsWith(\"!delstaff \")) {\r\n if(m_access.remove(msg.substring(10))) {\r\n updateAccessList(id);\r\n } else {\r\n m_botAction.sendPrivateMessage(id, \"Name not found.\");\r\n }\r\n\r\n //!accesslist\r\n } else if(msg.equals(\"!accesslist\")) {\r\n for(String s : m_access) {\r\n m_botAction.sendPrivateMessage(id, s);\r\n }\r\n\r\n m_botAction.sendPrivateMessage(id, \"End of list.\");\r\n //!purge\r\n } else if(msg.equals(\"!purge\")) {\r\n cmdPurge(id, 90);\r\n } else if(msg.startsWith(\"!purge \")) {\r\n try {\r\n cmdPurge(id, Integer.parseInt(msg.substring(7)));\r\n } catch(NumberFormatException e) {\r\n m_botAction.sendPrivateMessage(id, \"Nothing done. Check your typing.\");\r\n }\r\n }\r\n }\r\n }\r\n }", "@Test\r\n public void TestCancelButton(){\r\n solo.clickOnView(solo.getView(R.id.nav_view).findViewById(R.id.navigation_notifications));\r\n solo.waitForFragmentById(R.id.navigation_notifications);\r\n solo.clickOnView(solo.getView(R.id.addFollowing));\r\n solo.sleep(5000);\r\n solo.waitForActivity(AddFollowingActivity.class, 2000);\r\n solo.clickOnView(solo.getView(R.id.cancel2));\r\n solo.waitForFragmentById(R.id.navigation_notifications);\r\n\r\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n if (metodo.equals(\"btn_actualizar\")) {\n actualizar_registro();\n } else if (metodo.equals(\"btn_borrar_registro\")) {\n borrar_registro();\n }else{}\n\n }", "@Override\n\tpublic void dialogar() {\n\t\tSystem.out.println(\"Ofrece un Discurso \");\n\t\t\n\t}", "private void abrirVentanaChatPrivada() {\n\t\tthis.chatPublico = new MenuVentanaChat(\"Sala\", this, false);\n\t}", "public boolean estaEnModoAvion();", "@Quando(\"acionar o botao save\")\r\n\tpublic void acionarOBotaoSave() {\n\t\tNa(CadastrarUsuarioPage.class).acionarBtnSave();\r\n\t}", "private boolean isBtConnected(){\n \treturn false;\n }", "public abstract CommandResponse onCommand(CommandSender sender, String label, String[] args);", "@Override\n public void onInteract() {\n }", "public void onYesButtonClicked() {\n changeAfterClientPick();\n }", "public void selecao () {}", "@Override\n public void actionPerformed(ActionEvent e) {\n String actionCommand = e.getActionCommand();\n\n switch (actionCommand) {\n case \"CHAT\":\n menuController.goToChatPanel();\n break;\n case \"PLAY\":\n //demano un nou usuari a mosrar al connect\n serverComunicationConnect.startServerComunication(CONNECT_USER);\n menuController.closeMatch();\n break;\n default:\n break;\n\n }\n\n }", "public void onInteract() {\n }", "@Override\r\n public void onMessage(MessageEvent message) {\r\n String newMessage = message.getMessage();\r\n String response;\r\n\r\n //split the message on spaces to identify the command\r\n String[] messageArray = newMessage.split(\" \");\r\n \r\n switch (messageArray[0]) {\r\n case \"!command\":\r\n if (message.getChannel().getOps().contains(message.getUser())) {\r\n if (messageArray.length == 2) {\r\n if (messageArray[1].equals(\"off\")) {\r\n commandsActive = false;\r\n } \r\n if (messageArray[1].equals(\"on\")) {\r\n commandsActive = true;\r\n }\r\n }\r\n }\r\n break;\r\n //command to make a custom command for the bot\r\n case \"!addcom\":\r\n if (commandsActive) {\r\n if (message.getChannel().getOps().contains(message.getUser())) {\r\n response = addCom(messageArray, message.getChannel().getName());\r\n message.getChannel().send().message(response);\r\n } \r\n else {\r\n message.respond(\"You are not allowed to add commands.\");\r\n }\r\n }\r\n break;\r\n case \"!commands\":\r\n if (commandsActive) {\r\n if (messageArray.length ==1) {\r\n ArrayList<String> commands = manager.getCommands(message.getChannel().getName());\r\n String commandList = \"The custom commands available to everyone for this channel are: \";\r\n while (!commands.isEmpty()) {\r\n commandList += commands.remove(0) + \", \";\r\n }\r\n message.getChannel().send().message(commandList);\r\n }\r\n }\r\n break;\r\n //command to delete a custom command from the bot\r\n case \"!delcom\":\r\n if (commandsActive) {\r\n if (message.getChannel().getOps().contains(message.getUser())) {\r\n response = delCom(messageArray[1], message.getChannel().getName());\r\n message.getChannel().send().message(response);\r\n } \r\n else {\r\n message.respond(\"You are not allowed to remove commands.\");\r\n }\r\n }\r\n break;\r\n //command to edit a custom command the bot has\r\n case \"!editcom\":\r\n if (commandsActive) {\r\n if (message.getChannel().getOps().contains(message.getUser())) {\r\n response = editCom(messageArray, message.getChannel().getName());\r\n message.getChannel().send().message(response);\r\n } \r\n else {\r\n message.respond(\"You are not allowed to edit commands.\");\r\n }\r\n }\r\n break;\r\n\r\n //default message handling for custom commands\r\n default:\r\n if (commandsActive) {\r\n if (message.getMessage().startsWith(\"!\") && !messageArray[0].equals(\"!permit\")&& !messageArray[0].equals(\"!spam\")) {\r\n customCommands(message);\r\n }\r\n }\r\n break;\r\n }\r\n }", "@Override\r\n\tprotected void onBoEdit() throws Exception {\n\t\tgetButtonManager().getButton(\r\n\t\t\t\tnc.ui.wds.w8006080202.tcButtun.ITcButtun.Con)\r\n\t\t\t\t.setEnabled(false);\r\n\t\tgetButtonManager().getButton(\r\n\t\t\t\tnc.ui.wds.w8006080202.tcButtun.ITcButtun.Pp)\r\n\t\t\t\t.setEnabled(false);\r\n\t\tsuper.onBoEdit();\r\n\t}", "@Override\n\tpublic void onCommand(CommandSender sender, String[] args) {\n\t\t\n\t}", "@Override\n\tpublic void onCommand(CommandSender sender, String[] args) {\n\t\t\n\t}", "@Override\n\t\t\tpublic void buttonClick(ClickEvent event) {\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tConfirmDialog.show(UI.getCurrent(), MESSAGE_1,\"\",\"Aceptar\",\"Crear mas Usuarios\",\n\t\t\t\t new ConfirmDialog.Listener() {\n\n\t\t\t\t public void onClose(ConfirmDialog dialog) {\t\n\t\t\t\t \tent= false;\n\t\t\t\t if (dialog.isConfirmed()) {\n\t\t\t\t // Confirmed to continue\t\n\t\t\t\t \tc.navegar((StartView.VIEW_NAME));\n\t\t\t\t } else {\n\t\t\t\t // User did not confirm\t\t\t \n\t\t\t\t \t//c.crearWindow(RegistrarUser.VIEW_NAME);\n\t\t\t\t \tc.navegar((StartView.VIEW_NAME));\n\t\t\t\t \n\t\t\t\t }\n\t\t\t\t \n\t\t\t\t }\n\t\t\t\t \n\t\t\t\t });\n\t\t\t\t\n\t\t\t\t//Notification nota= new Notification(\"Registro Exitoso!\",Notification.Type.HUMANIZED_MESSAGE);\n\t\t\t\t//nota.setDelayMsec(-1);\n\t\t\t\t//nota.show(Page.getCurrent());\t\n\t\t\t\t\n\t\t\t\tclose();\t\t\t\n\t\t\t}", "boolean hasLastAction();", "public boolean onInteract(Entity x, Entity y) {\n //Empty stub\n return false;\n }", "private void sendGameCommand(){\n\n }", "@Override\r\n\tpublic void mouseReleased(MouseEvent e) {\n\t\t\r\n\r\n\t\tBotaoJogo botao = (BotaoJogo) e.getSource();\r\n\r\n\t\tif (SwingUtilities.isRightMouseButton(e)) {//SE FOR O BOTAO DIREITO DO MOUSE\r\n\r\n\t\t\tif (celulaEscolhida(botao).isBandeira() == false) {//SE NAO FOR UMA BANDEIRA\r\n\t\t\t\tif (this.numeroBombas > 0) {//CHECA SE PODE COLOCAR BANDEIRA\r\n\t\t\t\t\tcelulaEscolhida(botao).setBandeira(true);//COLOCA BANDEIRA E IMPEDE DE ESCOLHER O BOTAO E SUBTRAI DO NUMEROBOMBAS\r\n\t\t\t\t\tbotao.setEnabled(false);\r\n\t\t\t\t\tthis.numeroBombas--;\r\n\t\t\t\t}\r\n\r\n\t\t\t} else {//O CONTRARIO DO DE CIMA\r\n\t\t\t\tcelulaEscolhida(botao).setBandeira(false);\r\n\t\t\t\tbotao.setEnabled(true);\r\n\t\t\t\tthis.numeroBombas++;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.atualizarNumeroBombas();//ATUALIZA O LABEL QUE TEM O CONTADOR DE BOMBAS\r\n\t\t\t\r\n\t\t}\r\n\t}", "private void cargarBotones() throws Exception{\n Image img = null;\n Image img2 = null;\n try {\n img = Lienzo.cargarImagen(\"imagenes/skip.png\");\n //img2 = Lienzo.cargarImagen(\"imagenes/skipHover.png\");\n } catch (Exception e) {\n e.printStackTrace();\n }\n //añadimos los botones al menu\n Boton b =new BotonGeneral(img, img, \"Menu\", 900, 550, img.getWidth(null), img.getHeight(null));\n new ObservadorCredits(b);\n botones.add(b);\n }", "public void action(BotInstance bot, Message message);", "network.message.PlayerResponses.Command getCommand();", "public boolean isDisponible() {\n if (tipo == CAMINO) return true;\n else return false;\n }", "public void acessarBuscaCep() throws InterruptedException {\n navegador.findElement(By.xpath(\"//*[@class='bt-link-ic bt-login link-btn-meu-correios']\")).click();\n\n // REALIZAR O LOGIN COM USUARIO E SENHA\n navegador.findElement(By.id(\"username\")).click();\n navegador.findElement(By.id(\"username\")).sendKeys(\"31403971862\");\n navegador.findElement(By.id(\"password\")).click();\n navegador.findElement(By.id(\"password\")).sendKeys(\"haenois001\");\n\n //CLICAR NO BOTÃO ENTRAR\n navegador.findElement(By.xpath(\"//button[@class='primario']\")).click();\n\n // ESPERAR OPÇÕES E CLICAR EM BUSCA CEP\n WebDriverWait wait = new WebDriverWait(navegador, 20);\n wait.until(ExpectedConditions.elementToBeClickable(By.id(\"opcoes\")));\n navegador.findElement(By.id(\"busca-cep\")).click();\n Thread.sleep(1000);\n\n }", "abstract void botonEnviar_actionPerformed(ActionEvent e);", "@Override\n\t\t\t\t\tpublic void onEvent(Event event) throws Exception {\n\t\t\t\t\t\tMessagebox.Button button = (Messagebox.Button) event.getData();\n\t\t\t\t\t\tif (button == Messagebox.Button.YES) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tanalista.setiEstatus(EstatusPersonaFactory.getEstatusActivo());\n\t\t\t\t\t\t\t\t//EL METODO DICE ACTUTALIZARPERSONA\n\t\t\t\t\t\t\t\tsMaestros.acutalizarPersona(analista);\n\t\t\t\t\t\t\t\tcambiarAnalistas(0, null, null);\n\t\t\t\t\t\t\t\tnotifyChange(\"analistas\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t}", "@Override\n\tpublic void actionPerformed(ActionEvent e) {\n\t\tString ev = e.getActionCommand();\n\t\tif(ev.equals(\"Buscar Influyentes\")) {\n\t\t\tprincipal.buscarInfluyentes();\n\n\t\t}\n\t\telse if(ev.equals(\"Nivel De Alcance\")){\n\t\t\tprincipal.nivelDeAlcance();\n\t\t}\n\t\t\t\t\n\t\t\n\t}", "abstract void botonRecibir_actionPerformed(ActionEvent e);", "public void modifHandler(ActionEvent event) throws Exception\n\t{\n\t\t\n\t\t String id= new String();\n\t\t\tfor (Button bouton : list_bouton)\n\t\t\t{\n\t\t\t\tif(event.getSource()==bouton)\n\t\t\t\t{\n\t\t\t bouton.setOnAction(new EventHandler<ActionEvent>() {\n\t private String args;\n\n\t\t\t\t@Override\n\t\t\t public void handle(ActionEvent arg0) {\n\t\t\t\t\t try {\n\t\t\t\t\t\t//choisir l'activité à modifier\n\t\t\t\t\t mod= new ChoixActiviteModif();\n\t\t\t\t\t} catch (Exception e) {e.printStackTrace();} \n\t\t\t\t\t\t}});\n\t\t\t ChoixControler.selectedDomaine=bouton.getId();\n\t\t\t }\n\t\t\t }\n\t\t\n }", "@Override\n\tpublic boolean activate() {\n\t\tfinal Component CANCEL_BUTTON = CONSTS.CANCEL_BUTTON;\n\t\treturn ctx.backpack.select().id(CONSTS.fletching.getId()).count() >= 1\n\t\t\t\t&& !CANCEL_BUTTON.valid() \n\t\t\t\t&& !CANCEL_BUTTON.visible();\n\t}", "@Override\n public void clickPositive() {\n meetingManager.undoConfirm(chosenTrade, chosenTrader);\n Toast.makeText(this, \"Successfully undo confirm\", Toast.LENGTH_SHORT).show();\n viewList();\n\n }", "@Override\n public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {\n if (!(sender instanceof Player)) {\n sender.sendMessage(\"Command needs to be run by a player.\");\n return true;\n }\n\n return doCommand(sender, null, ((Player) sender).getUniqueId().toString(), sender.getName());\n }", "@Override\n public void messageArrived(IChatMessage msg) {\n try { \n if (msg.getText().matches(\"JOIN .*\")) {\n //Obtenir el canal on s'ha unit.\n IChatChannel channel = server.getChannel(conf.getChannelName()); \n //Crear el missatge per a donar la benvinguda al usuari\n IChatMessage message = new ChatMessage(user, channel,\n \"Benvingut, \" + msg.getText().substring(ChatChannel.JOIN.length() + 1));\n //Enviar el missatge\n channel.sendMessage(message);\n }\n } catch (RemoteException e) {\n \n }\n }", "boolean hasSendMessage();" ]
[ "0.61551255", "0.6013124", "0.5928976", "0.5907848", "0.5872263", "0.58666265", "0.58574224", "0.5761426", "0.57277066", "0.5720287", "0.57156324", "0.564312", "0.5598524", "0.55839604", "0.5580043", "0.5565054", "0.5565054", "0.5560962", "0.55535656", "0.55470943", "0.5527831", "0.548926", "0.54823095", "0.54757625", "0.546673", "0.5461888", "0.5458964", "0.5449108", "0.5448455", "0.5446812", "0.54399794", "0.5435058", "0.540546", "0.5401121", "0.5398451", "0.53890544", "0.5388288", "0.53878826", "0.5376438", "0.5369424", "0.5365342", "0.53612083", "0.5350871", "0.53435475", "0.53407615", "0.5340262", "0.5336945", "0.53353065", "0.5329038", "0.53284913", "0.5327163", "0.53215283", "0.53195703", "0.5318028", "0.5313323", "0.53114873", "0.5308302", "0.5306836", "0.530207", "0.52996296", "0.5298882", "0.5297642", "0.5293148", "0.5273898", "0.5272253", "0.52688026", "0.52579206", "0.5257332", "0.5251162", "0.52385044", "0.52226657", "0.5211616", "0.5209586", "0.5198237", "0.51974225", "0.51940244", "0.51907134", "0.51861185", "0.51856023", "0.51852614", "0.51852614", "0.51768196", "0.51639926", "0.51615095", "0.51614475", "0.5159254", "0.51571053", "0.51558477", "0.5149153", "0.5146396", "0.5144256", "0.51431555", "0.51430124", "0.514272", "0.51422614", "0.5141775", "0.51362455", "0.51313865", "0.51308143", "0.512923", "0.5121638" ]
0.0
-1
A type of item.
@CatalogedBy(ItemTypes.class) public interface ItemType extends CatalogType, Translatable { /** * Gets the id of this item. * * <p>Ex. Minecraft registers a golden carrot as * "minecraft:golden_carrot".</p> * * @return The id */ @Override String getName(); /** * Get the default maximum quantity for * {@link ItemStack}s of this item. * * @return Max stack quantity */ int getMaxStackQuantity(); /** * Gets the default {@link Property} of this {@link ItemType}. * * <p>While item stacks do have properties, generally, there is an * intrinsic default property for many item types. However, it should be * considered that when mods are introducing their own custom items, they * too could introduce different item properties based on various data on * the item stack. The default properties retrieved from here should merely * be considered as a default, not as a definitive property.</p> * * @param propertyClass The item property class * @param <T> The type of item property * @return The item property, if available */ <T extends Property<?, ?>> Optional<T> getDefaultProperty(Class<T> propertyClass); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public ItemType getType();", "@Override\n public int getItemType() {\n return ITEM_TYPE;\n }", "public ItemType getType() {\n return type;\n }", "public String getItemType() {\n\t\treturn itemType;\n\t}", "public ItemType getType()\n {\n\treturn type;\n }", "@Override\n\tprotected DataTypes getDataType() {\n\t\treturn DataTypes.ITEM;\n\t}", "public com.rpg.framework.database.Protocol.ItemType getType() {\n return type_;\n }", "public com.rpg.framework.database.Protocol.ItemType getType() {\n return type_;\n }", "public void setItemType(String itemType) {\n\t\tthis.itemType = itemType;\n\t}", "com.rpg.framework.database.Protocol.ItemType getType();", "public abstract boolean isTypeOf(ItemType type);", "public String getItemObjectType() {\r\n\t\treturn itemObjectType;\r\n\t}", "public static boolean ItemType(PsiBuilder b, int l) {\n if (!recursion_guard_(b, l, \"ItemType\")) return false;\n boolean r;\n Marker m = enter_section_(b, l, _NONE_, ITEM_TYPE, \"<item type>\");\n r = KindTest(b, l + 1);\n if (!r) r = GeneralItemType(b, l + 1);\n if (!r) r = FunctionTest(b, l + 1);\n if (!r) r = MapTest(b, l + 1);\n if (!r) r = ArrayTest(b, l + 1);\n if (!r) r = AtomicOrUnionType(b, l + 1);\n if (!r) r = ParenthesizedItemType(b, l + 1);\n exit_section_(b, l, m, r, false, null);\n return r;\n }", "@Override\r\n\tpublic String getType() {\n\t\treturn type;\r\n\t}", "public Object getType()\r\n {\r\n\treturn type;\r\n }", "public String getType() {return type;}", "public Item getItem(String typeItem){\r\n if(typeItem.equals(\"coeur\")){\r\n Item coeur = new Coeur();\r\n return coeur;\r\n } else if(typeItem.equals(\"potionvie\")){\r\n Item potion = new Potion();\r\n return potion;\r\n } else if(typeItem.equals(\"hexaforce\")){\r\n Item hexa = new Hexaforce();\r\n return hexa;\r\n } else {\r\n return null;\r\n }\r\n }", "@Override\n\tpublic String getType() {\n\t\treturn type;\n\t}", "@Override\n\tpublic String getType() {\n\t\treturn type;\n\t}", "@Override\n\tpublic String getType() {\n\t\treturn type;\n\t}", "public String getType() { return type; }", "protected abstract String getType();", "public ConfigurationItemType getType() {\r\n\t\treturn type;\r\n\t}", "public int getType() { return type; }", "public int getType() { return type; }", "public Item(String name, ItemType type)\n {\n\tthis.name = name;\n\tthis.type = type;\n }", "@Override\n public Type getType() {\n return type;\n }", "@Override\n public Type getType() {\n return type;\n }", "public String getType()\r\n\t{\r\n\t\treturn type;\r\n\t}", "public String get_type()\r\n\t{\r\n\t\treturn this.type;\r\n\t}", "public String getType() {\r\n\t\treturn type_;\r\n\t}", "abstract public String getType();", "public abstract String getType();", "public abstract String getType();", "public abstract String getType();", "public abstract String getType();", "public abstract String getType();", "public abstract String getType();", "public abstract String getType();", "public abstract String getType();", "public String getType() {\r\r\n\t\treturn type;\r\r\n\t}", "public String getType() {\r\n\t\treturn type;\r\n\t}", "public String getType() {\r\n\t\treturn type;\r\n\t}", "public String getType() {\r\n\t\treturn type;\r\n\t}", "@Override\n\tpublic String getType() {\n\t\treturn this.type;\n\t}", "public abstract Type getType();", "abstract public Type getType();", "public String getType() {\n return type; \n }", "public String getType();", "public String getType();", "public String getType();", "public String getType();", "public String getType();", "public String getType();", "public String getType();", "public String getType();", "public String getType();", "public String getType();", "public String getType();", "public String getType();", "public String getType();", "@Override\n\tpublic String type() {\n\t\treturn type;\n\t}", "ItemType(String itemCode) {\n code = itemCode;\n }", "protected String getType() {\n\t\treturn type;\n\t}", "public String getType() {\n return type;\n }", "@Override\n\tpublic String getType() {\n\t\treturn this.description.getType();\n\t}", "public String getType()\r\n {\r\n return type;\r\n }", "public String getType()\n {\n return type;\n }", "public int getType()\n {\n return m_type;\n }", "public String getType() \n {\n return type;\n }", "public int getType()\r\n\t{\r\n\t\treturn type;\r\n\t}", "public String getType(){\n\t\treturn type;\n\t}", "public String getType(){\n\t\treturn type;\n\t}", "public String getType() {\r\n return type;\r\n }", "public String getType() {\r\n return type;\r\n }", "public String getType() {\r\n return type;\r\n }", "public String getType() {\r\n return type;\r\n }", "public String getType() {\r\n return type;\r\n }", "public String getType() {\r\n return type;\r\n }", "public String getType()\n\t{\n\t\treturn type;\n\t}", "public String getType() {\r\n return type;\r\n }", "public int getType() { \n return type; \n }", "public String getType(){\r\n\t\treturn this.type;\r\n\t}", "@Override\n public String getType() {\n return this.type;\n }", "public String getType() {\n\t\treturn type;\n\t}", "public String getType() {\n\t\treturn type;\n\t}", "public String getType() {\n\t\treturn type;\n\t}", "public String getType() {\n\t\treturn type;\n\t}", "public String getType() {\n\t\treturn type;\n\t}", "public String getType() {\n\t\treturn type;\n\t}", "public String getType() {\n\t\treturn type;\n\t}", "public String getType() {\n\t\treturn type;\n\t}", "public String getType() {\n\t\treturn type;\n\t}", "public String getType() {\n\t\treturn type;\n\t}", "public String getType() {\n\t\treturn type;\n\t}", "public String getType() {\n\t\treturn type;\n\t}", "public int getType(){\r\n\t\treturn type;\r\n\t}", "public String getType()\n \t{\n \t\treturn this.type;\n \t}", "public String getType(){\r\n return type;\r\n }", "public String getType() {\n return m_type;\n }", "public String getType () {\n return type;\n }" ]
[ "0.83738136", "0.8242845", "0.80428374", "0.8015289", "0.8009405", "0.7644276", "0.7584018", "0.75758857", "0.72293234", "0.7087867", "0.707786", "0.705054", "0.69367284", "0.6926918", "0.68929976", "0.68707806", "0.6863873", "0.6847792", "0.6847792", "0.6847792", "0.6801798", "0.67876494", "0.6757438", "0.67425317", "0.67425317", "0.67413974", "0.673883", "0.673883", "0.67107964", "0.6708067", "0.67050457", "0.66977453", "0.66935736", "0.66935736", "0.66935736", "0.66935736", "0.66935736", "0.66935736", "0.66935736", "0.66935736", "0.6687456", "0.66821504", "0.66821504", "0.66821504", "0.6680911", "0.6678357", "0.6674007", "0.666974", "0.6669444", "0.6669444", "0.6669444", "0.6669444", "0.6669444", "0.6669444", "0.6669444", "0.6669444", "0.6669444", "0.6669444", "0.6669444", "0.6669444", "0.6669444", "0.66674376", "0.66655874", "0.6664439", "0.6657647", "0.6655928", "0.6654568", "0.66439307", "0.66416943", "0.66406137", "0.66397196", "0.6637491", "0.6637491", "0.66373473", "0.66365725", "0.66365725", "0.66365725", "0.66365725", "0.66365725", "0.6636439", "0.6636219", "0.66344726", "0.6634085", "0.6630498", "0.6628134", "0.6628134", "0.6628134", "0.6628134", "0.6628134", "0.6628134", "0.6628134", "0.6628134", "0.6628134", "0.6628134", "0.6628134", "0.6628134", "0.66236603", "0.66213953", "0.66182315", "0.6616136", "0.6614175" ]
0.0
-1
Gets the id of this item. Ex. Minecraft registers a golden carrot as "minecraft:golden_carrot".
@Override String getName();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getId() {\n if (!this.registered)\n return -1;\n return id;\n }", "public String getId()\r\n\t{\n\t\treturn id.substring(2, 5);\r\n\t}", "public final ItemId getId() {\r\n return null;\r\n }", "public final String getId() {\r\n\t\treturn id;\r\n\t}", "public String getId() {\n if (id == null)\n return \"\"; //$NON-NLS-1$\n return id;\n }", "java.lang.String getID();", "public static String id()\n {\n return _id;\n }", "public int getId() {\n//\t\tif (!this.isCard())\n//\t\t\treturn 0;\n\t\treturn id;\n\t}", "public final String getId() {\n return id;\n }", "public Integer getId() {\n return (Integer) get(0);\n }", "public int getId() {\n\t\treturn Integer.parseInt(Id);\n\t}", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "public long getId() {\n\t\treturn Long.parseLong(_id);\n\t}", "public java.lang.String getId() {\n return id;\n }", "public java.lang.String getId() {\n return id;\n }", "public java.lang.String getId() {\n return id;\n }", "public java.lang.String getId() {\n return id;\n }", "public String getId()\n\t{\n\t\treturn m_sID;\t\n\t}", "public final int getId() {\n\t\treturn JsUtils.getNativePropertyInt(this, \"id\");\n\t}", "public java.lang.String getId () {\r\n\t\treturn id;\r\n\t}", "public Integer getId() {\n return id.get();\n }", "public java.lang.String getId() {\n return id;\n }", "public java.lang.String getId() {\n return id;\n }", "public java.lang.Integer getId () {\n\t\treturn _id;\n\t}", "public String getId() {\n return mBundle.getString(KEY_ID);\n }", "public java.lang.String getId() {\n return id;\n }", "public java.lang.String getId() {\n return id;\n }", "public java.lang.String getId() {\n return id;\n }", "public java.lang.String getId() {\n return _id;\n }", "public java.lang.Integer getId () {\r\n return id;\r\n }", "long getID(Object item);", "public java.lang.Integer getId () {\n\t\treturn id;\n\t}", "public java.lang.Integer getId () {\n\t\treturn id;\n\t}", "public java.lang.Integer getId () {\n\t\treturn id;\n\t}", "public java.lang.Integer getId () {\n\t\treturn id;\n\t}", "public java.lang.Integer getId () {\n\t\treturn id;\n\t}", "public java.lang.Integer getId () {\n\t\treturn id;\n\t}", "public java.lang.Integer getId () {\n\t\treturn id;\n\t}", "public java.lang.Integer getId () {\n\t\treturn id;\n\t}", "public java.lang.Integer getId () {\n\t\treturn id;\n\t}", "public java.lang.Integer getId () {\n\t\treturn id;\n\t}", "public java.lang.Integer getId () {\n\t\treturn id;\n\t}", "public java.lang.String getId() {\r\n return id;\r\n }", "public java.lang.String getId() {\r\n return id;\r\n }", "public java.lang.String getId() {\r\n return id;\r\n }", "public String getId() {\n\t\treturn Integer.toString(this.hashCode());\n\t}", "public final long getId() {\r\n return id;\r\n }", "public java.lang.String getId () {\n\t\treturn id;\n\t}", "public final Integer getId() {\n\t\treturn this.id;\n\t}", "public int getId(){\n if (ID != null) {\n int i = Integer.parseInt(ID);\n return i;\n }\n return 0;\n }", "public java.lang.Integer getId() {\n return id;\n }", "public java.lang.Integer getId() {\n return id;\n }", "public java.lang.String getId() {\n return this._id;\n }", "public Integer getId() {\n\t\treturn wishlistItemId;\n\t}", "public java.lang.Integer getId() {\n return id;\n }", "@java.lang.Override\n public long getId() {\n return id_;\n }", "public java.lang.Integer getId() {\n\t\treturn id;\n\t}", "public java.lang.Integer getId() {\n\t\treturn id;\n\t}", "public java.lang.String getId() {\r\n return this._id;\r\n }", "public int getItemId() {\n\t\treturn id;\n\t}", "public String getID() {\n return (id);\n }", "public String getId() {\r\n \t\treturn id;\r\n \t}", "public int getId() {\n\t\t\treturn id_;\n\t\t}", "public int getId() {\n\t\t\treturn id_;\n\t\t}", "@java.lang.Override\n public long getId() {\n return id_;\n }", "@Override\n\tpublic long getId() {\n\t\treturn id;\n\t}", "@Override\n\tpublic long getId() {\n\t\treturn id;\n\t}", "@Override\n\tpublic long getId() {\n\t\treturn id;\n\t}", "public String getId() {\n return _theId;\n }", "public java.lang.Integer getId()\n {\n return id;\n }", "@java.lang.Override\n public long getId() {\n return id_;\n }", "public long getId() {\n\t\t\treturn id;\n\t\t}", "public long getId() {\n\t\treturn(id);\n\t}", "public int getId() {\n\t\t\t\treturn id_;\n\t\t\t}", "public int getId() {\n\t\t\t\treturn id_;\n\t\t\t}", "public Long getId()\n\t{\n\t\treturn (Long) this.getKeyValue(\"id\");\n\n\t}", "public long getId()\n\t{\n\t\treturn id;\n\t}", "public long getId() {\r\n\t\treturn id;\r\n\t}", "public long getId() {\r\n\t\treturn id;\r\n\t}", "public long getId() {\r\n\t\treturn id;\r\n\t}", "public long getId() {\r\n\t\treturn id;\r\n\t}", "public long getId() {\r\n\t\treturn id;\r\n\t}", "public long getId() {\r\n\t\treturn id;\r\n\t}" ]
[ "0.7266755", "0.7201945", "0.71473527", "0.70895845", "0.7023227", "0.69790375", "0.6951372", "0.6940282", "0.6936175", "0.6933974", "0.6933222", "0.692857", "0.692857", "0.692857", "0.692857", "0.692857", "0.692857", "0.692857", "0.692857", "0.692857", "0.692857", "0.692857", "0.692857", "0.692857", "0.692857", "0.692857", "0.692857", "0.692857", "0.692857", "0.692857", "0.6879776", "0.68741965", "0.68741965", "0.68741965", "0.6866858", "0.6864712", "0.6860824", "0.6858848", "0.68556935", "0.6852297", "0.6852297", "0.684839", "0.6847047", "0.6843814", "0.6843814", "0.6843814", "0.6842671", "0.684073", "0.6837863", "0.6833791", "0.6833791", "0.6833791", "0.6833791", "0.6833791", "0.6833791", "0.6833791", "0.6833791", "0.6833791", "0.6833791", "0.6833791", "0.6820444", "0.6820444", "0.6820444", "0.68198764", "0.68170255", "0.6816199", "0.6805218", "0.6785113", "0.6775637", "0.6765038", "0.6764351", "0.67579335", "0.67566824", "0.67560405", "0.6755052", "0.6755052", "0.6750822", "0.67427623", "0.6736876", "0.6733809", "0.6728295", "0.6728295", "0.67134523", "0.67099667", "0.67099667", "0.67099667", "0.67062527", "0.6704276", "0.6698706", "0.66937697", "0.669285", "0.6691274", "0.6691274", "0.6690606", "0.6689253", "0.6686653", "0.6686653", "0.6686653", "0.6686653", "0.6686653", "0.6686653" ]
0.0
-1
Update dispensed to confirmed.
public static void updateDispensedToConfirmed(MasterConfig masterConfig, String pillsDispensedUuid ) throws Exception { Connection con = null; PreparedStatement pstmtUpdate = null; PreparedStatement pstmtInsertImage = null; try { con = PooledDataSource.getInstance(masterConfig).getConnection(); con.setAutoCommit(false); pstmtUpdate = con.prepareStatement(sqlUpdateDispensedToConfirmed); int offset = 1; pstmtUpdate.setString(offset++, DispenseState.CONFIRMED.toString()); pstmtUpdate.setString(offset++, pillsDispensedUuid); pstmtUpdate.executeUpdate(); con.commit(); } catch (Exception e) { logger.error(e.getMessage(), e); if( con != null ) { try { con.rollback(); } catch(Exception erb ) { logger.warn(e.getMessage(), e); } } throw e; } finally { try { if (pstmtUpdate != null) pstmtUpdate.close(); } catch (Exception e) { logger.warn(e); } try { if (con != null) con.close(); } catch (Exception exCon) { logger.warn(exCon.getMessage()); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setConfirmed(boolean confirmed) {\n this.confirmed = confirmed;\n }", "protected void setConfirmed(boolean confirmed) {\n this.confirmed = confirmed;\n }", "public static void updatePendingToDispensing(MasterConfig masterConfig, String pillsDispensedUuid) throws Exception {\n\t\tConnection con = null;\n\t\tPreparedStatement pstmt = null;\n\t\ttry {\n\t\t\tcon = PooledDataSource.getInstance(masterConfig).getConnection();\n\t\t\tcon.setAutoCommit(true);\n\t\t\tpstmt = con.prepareStatement(sqlUpdatePendingToDispensing);\n\t\t\tint offset = 1;\n\t\t\tpstmt.setString(offset++, DispenseState.DISPENSING.toString());\n\t\t\tpstmt.setString(offset++, pillsDispensedUuid );\n\t\t\tpstmt.executeUpdate();\n\t\t} catch (Exception e) {\n\t\t\tlogger.error(e.getMessage(), e);\n\t\t\tthrow e;\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tif (pstmt != null)\n\t\t\t\t\tpstmt.close();\n\t\t\t} catch (Exception e) {\n\t\t\t\tlogger.warn(e);\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tif (con != null)\n\t\t\t\t\tcon.close();\n\t\t\t} catch (Exception exCon) {\n\t\t\t\tlogger.warn(exCon.getMessage());\n\t\t\t}\n\t\t}\n\t}", "protected final void setConfirmed(final boolean confirmed) {\n isConfirmed = confirmed;\n }", "@Override\n\tpublic void update(ConfirmDto dto) {\n\t\tsession.update(\"confirm.update\",dto);\n\t}", "void setConfirmed(String value);", "public boolean setConfirm(int reservationID, boolean confirmed){\n \n return dbf.setConfirm(reservationID, confirmed);\n }", "public boolean isConfirmed() {\n return confirmed;\n }", "void resetConfirm(){\n\t\tconfirmed = false;\n\t}", "public void update(){\n addNotificaciones(nombre + \" \" + this.sucursal.descuento());\n mostrarNotificaciones();\n notificaciones.clear();\n }", "private void setConfirmState() {\n if (state == CONFIRM_STATE)\n return;\n consoleLayout.setVisibility(GONE);\n confirmContainer.setVisibility(VISIBLE);\n state = CONFIRM_STATE;\n }", "public void setConfirmedCount(String confirmedCount) {\n this.confirmedCount = confirmedCount;\n }", "public boolean isFullyConfirmed()\n\t{\n\t\treturn getTargetQty().compareTo(getConfirmedQty()) == 0;\n\t}", "@Override\n\tpublic void update(CcNoticereceive entity) {\n\t\t\n\t}", "public void setBooked(boolean confirmed){\n booked = confirmed;\n }", "private void onConfirm() {\n if (canConfirm) {\n onMoveConfirm(gridView.selectedX, gridView.selectedY);\n this.setConsoleState();\n }\n }", "boolean isConfirmed(){\n\t\treturn confirmed;\n\t}", "protected void setProved() {\n\t\tproveState = PROVED;\n\t}", "@Override\n public void notifyUpdate() {\n Update();\n //Invia all'activity di questo frammento il totale speso per aggiornare la sezione di controllo del budget\n onSendTotSpent.ReceiveTotSpent(contactGiftAdapter.totSpent());\n }", "public final boolean isConfirmed() {\n return isConfirmed;\n }", "private void writeCapSenseNotification(boolean value) {\n BLEService.mBluetoothGatt.setCharacteristicNotification(mCapsenseCharacteristic, value);\n byte[] byteVal = new byte[1];\n if (value) {\n byteVal[0] = 1;\n } else {\n byteVal[0] = 0;\n }\n Log.i(TAG, \"CapSense Notification \" + value);\n mCapsenseNotification.setValue(byteVal);\n BLEService.mBluetoothGatt.writeDescriptor(mCapsenseNotification);\n }", "public String getConfirmedCount() {\n return confirmedCount;\n }", "public void setCurrentConfirmedCount(String currentConfirmedCount) {\n this.currentConfirmedCount = currentConfirmedCount;\n }", "@JavascriptInterface \n\t\t\t\t\t\t public void confirmDonation(){\n\t\t\t\t\t\t\tSharedPreferences sp = getSharedPreferences(\"landingSpaceship\", Activity.MODE_PRIVATE);\n\t\t\t\t\t\t\tSharedPreferences.Editor editor = sp.edit(); \n\t\t\t\t\t\t\teditor.putInt(\"confirmDonation\", 1 );\n\t\t\t\t\t\t\teditor.commit();\n\t\t\t\t\t\t\t//Toast.makeText(mContext, \"donatie bevestigd\" , Toast.LENGTH_LONG).show(); \n\t\t\t\t\t\t}", "public void setInstantConfirmation(boolean value) {\n this.instantConfirmation = value;\n }", "private void updateDueList() {\n boolean status = customerDue.storeSellsDetails(new CustomerDuelDatabaseModel(\n selectedCustomer.getCustomerCode(),\n printInfo.getTotalAmountTv(),\n printInfo.getPayableTv(),\n printInfo.getCurrentDueTv(),\n printInfo.getInvoiceTv(),\n date,\n printInfo.getDepositTv()\n ));\n\n if (status) Log.d(TAG, \"updateDueList: --------------successful\");\n else Log.d(TAG, \"updateDueList: --------- failed to store due details\");\n }", "private void confirmarVentaRespuesta(final TransaccionCelda resp) {\n final ConfirmarVentaMapaDatos datos = service.getDatosConfirmar();\n respImprimir = resp;\n service.setDatosConfirmar(null);\n mostrarMensaje(getString(R.string.msg_venta_paquete_exitoso, datos.getPlaca()));\n contenedorBotonVenta.setVisibility(View.GONE);\n contenedorBotonImpresion.setVisibility(View.VISIBLE);\n final double costoTotal = service.getCostoTotal(resp);\n final String auditoria = getString(\n R.string.msg_venta_paquete_auditoria,\n datos.getZona().getNombre(), datos.getTarifa().getNombre(),\n datos.getPlaca(), format.formatearDecimal(costoTotal));\n AppLog.debug(TAG, \"Auditoría: %s\", auditoria);\n final String pin = String.valueOf(resp.getId());\n subscribeSinProcesando(api.auditoria(getIdUsuario(), \"Compra pin\", \"Pin de transito\",\n pin, \"App movil\", auditoria, String.valueOf(datos.getZona().getId()),\n datos.getPlaca(), Constantes.AUDITORIA_VACIO, Constantes.AUDITORIA_VACIO),\n this::respuestaAuditoria);\n }", "public void update() {\n suggestions = model.getDebtRepaymentSuggestions();\n }", "public synchronized void mudarEstadoPistaDisponivel() {\n temPistaDisponivel = !temPistaDisponivel;\n System.out.println(nomeAeroporto + \" tem pista disponível: \" + \n (temPistaDisponivel == true ? \"Sim\" : \"Não\"));\n // Notifica a mudanca de estado para quem estiver esperando.\n if(temPistaDisponivel) this.notify();\n }", "public void updateCount(){\n TextView newCoupons = (TextView) findViewById(R.id.counter);\n //couponsCount.setText(\"Pocet pouzitych kuponov je: \" + SharedPreferencesManager.getUsedCoupons());\n if(SharedPreferencesManager.getNew()>0) {\n newCoupons.setVisibility(View.VISIBLE);\n newCoupons.setText(String.valueOf(SharedPreferencesManager.getNew()));\n }\n else {\n newCoupons.setVisibility(View.GONE);\n }\n }", "public void notifyUpdate() {\n if (mObserver != null) {\n synchronized (mObserver) {\n mNotified = true;\n mObserver.notify();\n }\n }\n }", "@Deprecated\r\n public String confirmPartialPurchase() {\r\n purchaseController.getTickets().add(ticket);\r\n ticket = null;\r\n return Screen.PAYMENT_SCREEN.getOutcome();\r\n }", "private void btnCompleteActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnCompleteActionPerformed\n DBManager db = new DBManager();\n \n for(Map.Entry<Integer, OrderLine> olEntry : loggedInCustomer.findLatestOrder().getOrderLines().entrySet())\n {\n OrderLine actualOrderLine = olEntry.getValue();\n Product orderedProduct = actualOrderLine.getProduct();\n \n orderedProduct.setStockLevel(orderedProduct.getStockLevel() - olEntry.getValue().getQuantity());\n db.updateProductAvailability(orderedProduct); \n }\n \n loggedInCustomer.findLatestOrder().setStatus(\"Complete\");\n db.completeOrder(orderId); \n \n Confirmation confirmation = new Confirmation(loggedInCustomer, orderId);\n this.dispose();\n confirmation.setVisible(true);\n \n }", "public void updateDiscountNotification(int discountQuantity) {\n discountNotification.setText(String.valueOf(discountQuantity));\n }", "public void announceWinner(){\n gameState = GameState.HASWINNER;\n notifyObservers();\n }", "@Override\n\tpublic int update(Proveedor r) {\n\t\treturn 0;\n\t}", "public boolean orderConfirm(int id) {\n\t\ttry {\n\t\t\tConnection conn=DB.getConn();\n\t\t\tPreparedStatement stmt=conn.prepareStatement(\"update orders set status='confirm' where id=?\");\n\t\t\tstmt.setInt(1,id);\n\t\t\tstmt.executeUpdate();\n\t\t\treturn true;\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t\te.printStackTrace();\n\t\t\treturn false;\n\t\t}\n\t}", "public void update() {\r\n\t\t\tsetTextValue(updateNoteEnabled);\r\n\t\t}", "public void draftEvent(){\n gameState = GameState.DRAFT;\n currentMessage = \"\" + currentPlayer.getNumTroops();\n currentTerritoriesOfInterest = currentPlayer.getTerritoriesList();\n notifyObservers();\n }", "public void quitter() {\n\n\t\tint rep = JOptionPane.showConfirmDialog(null, \"Voulez-vous vraiment quitter ?\" , \"Attention\", JOptionPane.WARNING_MESSAGE);\n\t\tif (rep == JOptionPane.OK_OPTION)\n\t\t{\n\t\t\tsetChanged();\n\t\t\tnotifyObservers(QUITTER);\n\t\t}\n\t}", "public static void updatePromotionAsSeen(JSONObject promotionEvent){\n setLastInAppSeen(System.currentTimeMillis());\n DbHelper dbHelper = DbHelper.getDatabaseHelper(context);\n String campaignId = null;\n try {\n campaignId = promotionEvent.getString(\"campaignId\");\n } catch (JSONException e) {\n if(ZeTarget.isDebuggingOn()){\n Log.e(TAG,\"Failure in updating campaigns\",e);\n }\n }\n dbHelper.updateCampaign(campaignId, System.currentTimeMillis());\n logEvent(Constants.Z_CAMPAIGN_VIEWED_EVENT, promotionEvent);\n showingPromotion.set(false);\n }", "@Override\n\tpublic int updConfirmOrder1(int id) {\n\t\treturn order1Mapper.updOrder1State(id);\n\t}", "private void sendUpdates() {\n\n List<PeerUpdateMessage.Part> parts = new ArrayList<PeerUpdateMessage.Part>();\n for (ActivePlayer peer : player.getSavedNeighbors()) {\n PeerUpdateMessage.Part part = new PeerUpdateMessage.Part(\n peer.character.id, peer.character.getExtrapolatedMotionState());\n parts.add(part);\n }\n\n if (!parts.isEmpty()) {\n PeerUpdateMessage msg = new PeerUpdateMessage(parts);\n new ToClientMessageSink(player.session).sendWithoutConfirmation(msg);\n }\n }", "@Override\n public void actionPerformed(ActionEvent e){\n \tframe.getNotif().update();\n ArrayList<Notification> newNotif;\n if (Application.getApplication().getCurrentUser() != null)\n newNotif = Application.getApplication().getCurrentUser().getNotifications();\n else\n newNotif = Application.getApplication().getAdmin().getNotifications();\n frame.getNotif().setNotifications(newNotif);\n this.frame.showPanel(\"notif\");\n }", "private void notifyObservers() {\n BinStatusUpdate newStatus = buildNewStatus();\n observers.iterator().forEachRemaining(binStatusUpdateStreamObserver -> binStatusUpdateStreamObserver.onNext(newStatus));\n }", "public void updateProveedor(Proveedor proveedor) {\n\t\tupdate(proveedor);\n\t}", "@Override\n\tpublic void update(Discount discount) {\n\t\t\n\t}", "public Vector<RationaleStatus> updateOnDelete()\r\n\t{\r\n\t\treturn this.updateStatus();\r\n\t}", "public void payedConfirmation(){\n\t\tassert reserved: \"a seat also needs to be reserved when bought\";\n\t\tassert customerId != -1: \"this seat needs to have a valid user id\";\n\t\tpayed = true;\n\t}", "@Override\n\tpublic String update(double discount, int vid) {\n\t\treturn vb.update(discount, vid);\n\t}", "@Override\n\tpublic void showConfirmation(Customer customer, List<Item> items, double totalPrice, int loyaltyPointsEarned) {\n\t}", "@Override\n public void doUpdate(NotificationMessage notification) {\n \n }", "public Vector<RationaleStatus> updateStatus() {\r\n \t\tAlternativeInferences inf = new AlternativeInferences();\r\n \t\tVector<RationaleStatus> newStat = inf.updateAlternative(this);\r\n \t\treturn newStat;\r\n \t}", "@Override\n public boolean update(EmailNotification entity) {\n return false;\n }", "private void update() {\n if (mSuggestionsPref != null) {\n mSuggestionsPref.setShouldDisableView(mSnippetsBridge == null);\n boolean suggestionsEnabled =\n mSnippetsBridge != null && mSnippetsBridge.areRemoteSuggestionsEnabled();\n mSuggestionsPref.setChecked(suggestionsEnabled\n && PrefServiceBridge.getInstance().getBoolean(\n Pref.CONTENT_SUGGESTIONS_NOTIFICATIONS_ENABLED));\n mSuggestionsPref.setEnabled(suggestionsEnabled);\n mSuggestionsPref.setSummary(suggestionsEnabled\n ? R.string.notifications_content_suggestions_summary\n : R.string.notifications_content_suggestions_summary_disabled);\n }\n\n mFromWebsitesPref.setSummary(ContentSettingsResources.getCategorySummary(\n ContentSettingsType.CONTENT_SETTINGS_TYPE_NOTIFICATIONS,\n PrefServiceBridge.getInstance().isCategoryEnabled(\n ContentSettingsType.CONTENT_SETTINGS_TYPE_NOTIFICATIONS)));\n }", "@Override\r\n\tpublic void update(Responsible p) {\n\t\t\r\n\t}", "@Override\n\tpublic void update_in_DB() throws CouponSiteMsg \n\t{\n\t\t\n\t}", "@Override\n\tpublic void updateEncuestaConExito() {\n\n\t}", "public String getCurrentConfirmedCount() {\n return currentConfirmedCount;\n }", "@Override\n\tpublic int confirm(Integer id) {\n\t\tOrderGoodsEntity orderGoodsEntity = queryObject(id);\n\t\tInteger shippingStatus = orderGoodsEntity.getShippingStatus();//发货状态\n\t\tInteger payStatus = orderGoodsEntity.getPayStatus();//付款状态\n\t\tif (2 != payStatus) {\n\t\t\tthrow new RRException(\"此订单未付款,不能确认收货!\");\n\t\t}\n\t\tif (4 == shippingStatus) {\n\t\t\tthrow new RRException(\"此订单处于退货状态,不能确认收货!\");\n\t\t}\n\t\tif (0 == shippingStatus) {\n\t\t\tthrow new RRException(\"此订单未发货,不能确认收货!\");\n\t\t}\n\t\torderGoodsEntity.setShippingStatus(2);\n\t\torderGoodsEntity.setOrderStatus(301);\n\t\treturn orderGoodsDao.update(orderGoodsEntity);\n\t}", "@Override\n public void run() {\n try {\n pendingConfirms.remove(target.getName(),sender.getName());\n } catch (Exception ignored) {/*player has already confirmed*/}\n }", "boolean setConfirmationCode(OrderBean orderToUpdate);", "public void updateNotification(){\n Bitmap androidImage=BitmapFactory.decodeResource(getResources(),R.drawable.mascot_1);\n NotificationCompat.Builder notifyBuilder=getNotificationBuilder();\n notifyBuilder.setStyle(new NotificationCompat.BigPictureStyle().bigPicture(androidImage).setBigContentTitle(\"Notificacion actualizada!\"));\n mNotifyManager.notify(NOTIFICATION_ID,notifyBuilder.build());\n setNotificationButtonState(false, false, true);\n\n }", "public void confirmPrepared() {\n getCurrentOrder().setPrepared(true);\n getRestaurant().getOrderSystem().preparedOrder(getCurrentOrder());\n EventLogger.log(\"Order #\" + getCurrentOrder().getOrderNum() + \" has been prepared by chef \" + this.getName());\n doneWithOrder();\n }", "public void needconfirmstion(Pending_appoint_Owner pending_appoint_owner) {\n //TODO\n newOwners.put(pending_appoint_owner.grantee.getId(), pending_appoint_owner);\n user.add_msg(\"a new Owner is being appointed for store:\" + getStore().getName()\n + \"- required your confirmation - \" + pending_appoint_owner.grantee.getId());\n }", "@Override\n\tpublic void updateCanceledOrders(CanceledOrders canceledOrders) {\n\t\t\n\t}", "public void updateReactionsPlayArea() {\r\n\t\t((TextChannel) gameChannel).clearReactionsById(playAreaID).queue();\r\n\t\tif (currentPlayer.getPlayArea().getNonPlayedSize() > 0) {\r\n\t\t\tgameChannel.addReactionById(playAreaID, GlobalVars.emojis.get(\"fast_forward\")).queue();\r\n\t\t\tgameChannel.addReactionById(playAreaID, GlobalVars.emojis.get(\"link\")).queue();\r\n\t\t\tfor (int i = 0; i < currentPlayer.getPlayArea().getSize(); i++) {\r\n\t\t\t\tif (!currentPlayer.getPlayArea().getCard(i).isPlayed()) {\r\n\t\t\t\t\tgameChannel.addReactionById(playAreaID, Utils.numToLetterEmojis[i]).queue();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tgameChannel.addReactionById(playAreaID, GlobalVars.emojis.get(\"checkered_flag\")).queue();\r\n\t\t}\r\n\t}", "public Vector<RationaleStatus> updateOnDelete() {\r\n \t\tAlternativeInferences inf = new AlternativeInferences();\r\n \t\tVector<RationaleStatus> newStat = inf.updateOnDelete(this);\r\n \t\treturn newStat;\r\n \t}", "public boolean actualizar(Proveedor proveedor) {\n boolean verificar;\n if (dao.updateProveedor(proveedor)) {\n verificar = true;\n } else {\n verificar = false;\n }\n return verificar;\n }", "boolean isConfirmed();", "@Override\n\tpublic void confirmOrders() {\n\t\t\n\t}", "@Override\n\tpublic void confirmOrders() {\n\t\t\n\t}", "@Override\n\tpublic void confirmOrders() {\n\t\t\n\t}", "public void setConfirmTime(int confirmTime) {\n\t\t_tempNoTiceShipMessage.setConfirmTime(confirmTime);\n\t}", "@Override\n\tpublic void confirmExplanation(IBasicExplanation correctExpl) {\n\t\t\n\t\tconfirmedExplanations.add(correctExpl);\n\t\t\n\t\t// Keep confirmed errors in another field\n\t\t\n\t\tIMarkerSet correctMarkers = correctExpl.getRealExplains();\n\t\tconfirmedMarkers.addAll(correctMarkers);\n\t\t\t\t\n\t\t//TODO 4) adapt ExplanationCollection\n\t\t\n\t\t//TODO 5) wipe internal data structures of the ranker \n\t\t\n\t\t/*\n\t\t\n\t\terrors.removeAll(correctMarkers);\n\t\terrorList.removeAll(correctMarkers);\n\t\tremoveMarkersFromOneErrorList(correctMarkers);\n\t\t\n\t\t*/\n\t\t\n\t\t// Call initialize to restart the ranker\n\t\t\n\t\tinitializeListsAndSets();\n\t\tinitializeCollection(explCollection);\n\t\t\n\t\t//TODO 7) merge confirmed explanations for scoring\n\t}", "@Override\n public void updateWithoutObservations(SensingDevice sensingDevice) {\n\n }", "@Override\n public void confirm(AppointmentBean appointmentBean, AppointmentDetailPresenter presenter) {\n AppointmentStateTypeBean type = presenter.getAppointmentStateTypeBean(1);\n type.setAppointmentState(new AppointmentStateNew());\n appointmentBean.setAppointmentStateType(type);\n }", "@Override\n\tpublic void updateCpteCourant(CompteCourant cpt) {\n\t\t\n\t}", "public String getConfirmMessage() {\n return confirmMessage;\n }", "public String confirm()\n\t{\n\t\tconfirm = true;\n\t\treturn su();\n\t}", "public void pending()\n\t{\n\t\tdriver.findElementByName(OR.getProperty(\"Pending\")).click();\n\t}", "public void update(Conseiller c) {\n\t\t\r\n\t}", "public void selectNCDConfirmed ()\r\n\t{\r\n\r\n\t\tList<WebElement> ncdconfirmedradiobuttons = orPolicyVehicleHub.rdoVehicleNCDConfirmed;\r\n\t\tfor (WebElement ncdconfirmedradiobutton : ncdconfirmedradiobuttons)\r\n\t\t{\r\n\t\t\tif (ncdconfirmedradiobutton.getAttribute (\"value\").equals (\"Y\"))\r\n\t\t\t{\r\n\t\t\t\tncdconfirmedradiobutton.click ();\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}", "@Override\n\tpublic void updateComfirmPeo(Integer comfirm_peo, String bc_id) {\n\t\t\n\t}", "@Override\n public void showConfirm() {\n calledMethods.add(\"showConfirm\");\n }", "private void setFinalNotification() {\n //finished downloading all files\n // update notification\n String note = getResources().getString(R.string.update_complete);\n mBuilder.setContentTitle(note)\n .setContentText(\"\")\n .setSmallIcon(R.drawable.ic_launcher_mp)\n .setTicker(note)\n .setProgress(0, 0, false);\n nm.notify(0, mBuilder.build());\n }", "public void mudaStatus(String e) throws SQLException {\r\n String sql = \"UPDATE solicitacoes SET em_chamado=2 WHERE id_solicitacao= \" + e;\r\n System.err.println(\"MUDASTATUS: \" + sql);\r\n stmt.executeUpdate(sql);\r\n stmt.close();\r\n rs.close();\r\n }", "@FXML\n\tpublic void setOrderToDelivered() {\n\t\tString orderNumber = Integer.toString(order.getOrderNum());\n\t\tboolean isSeen = order.isSeen();\n\t\tboolean isPreparable = order.isPreparable();\n\t\tboolean isPrepared = order.isPrepared();\n\t\tboolean isDelivered = order.isDelivered();\n\t\tif ((isSeen == true) && (isPreparable == true) && (isPrepared == true) && (isDelivered == false)) {\n\t\t\tString[] parameters = new String[1];\n\t\t\tparameters[0] = orderNumber;\n\t\t\tmainController.getPost().notifyMainController(\"SetOrderToDeliveredStrategy\", parameters);\n\t\t\tmainController.modifyOrderStatus(order.getOrderNum(), OrderStatus.DELIVERED);\n\t\t\tmainController.removeOrderFromTableView(order);\n\t\t} else {\n\t\t\tdeliveredCheckBox.setSelected(false);\n\t\t}\n\t}", "@RequestMapping(\"/finalConfirm\")\n public String finalConfirm(Model model, Principal principal){\n model.addAttribute(\"user\", new User());\n model.addAttribute(\"categories\", categoryRepository.findAll());\n model.addAttribute(\"carts\", cartRepository.findAll());\n model.addAttribute(\"user_id\", userRepository.findByUsername(principal.getName()).getId());\n\n\n// model.addAttribute(\"carts\", cartRepository.findAll());\n\n SimpleMailMessage msg = new SimpleMailMessage(); //send confirmation email\n msg.setTo(userService.getUser().getEmail()); //add comma in between emails to send to multiple accounts\n msg.setTo(userService.getUser().getEmail()); //add comma in between emails to send to multiple accounts\n\n msg.setSubject(\"Thank you for your order\");\n msg.setText(\"Thank you for your order \\n You will arrive within 10 days\");\n\n javaMailSender.send(msg);\n\n Cart currentCart = cartRepository.findByEnabledAndUser(true, userService.getUser());\n currentCart.setEnabled(false);\n cartRepository.save(currentCart);\n\n return \"finalConfirm\";\n\n }", "@Override\n\tpublic void updatePengdingWaybill(WaybillPendingEntity entity) {\n\t\t\n\t}", "@Override\n\tpublic void update() {\n\t\tSystem.out.println(\"Observer Pattern on Room Reservation Notification: \");\n\t\tSystem.out.println(\"Your room is \" + reserve.getState()+\"\\n\");\n\t}", "public boolean updatePreferential(Preferential preferential) {\n\t\treturn false;\r\n\t}", "@Override\n public void updateBudgetPassed() {\n }", "private void notifyMissedConfirmations() {\n try {\n JavaSpace05 js = SpaceUtils.getSpace();\n U1467085Bid templateBid = new U1467085Bid();\n templateBid.bidderUserName = UserSession.getInstance().username;\n //find all bids from the user\n MatchSet allMyAds = js.contents(Collections.singleton(templateBid), null, SpaceUtils.TIMEOUT, Integer.MAX_VALUE);\n boolean foundAny = false;\n for (U1467085Bid i = (U1467085Bid) allMyAds.next(); i != null; i = (U1467085Bid) allMyAds.next()) {\n try {\n //check if confirmation was written for that bid\n U1467085BidConfirmation confirmationTemplate = new U1467085BidConfirmation();\n confirmationTemplate.bidId = i.id;\n U1467085BidConfirmation confirmation = (U1467085BidConfirmation) js.readIfExists(confirmationTemplate, null, SpaceUtils.TIMEOUT);\n U1467085AdBid adTemplate = new U1467085AdBid();\n adTemplate.id = i.adId;\n U1467085AdBid ad = (U1467085AdBid) js.readIfExists(adTemplate, null, SpaceUtils.TIMEOUT);\n if (confirmation != null && ad != null && ad.verifySignature(AddressBook.getUserKey(ad.ownerUsername)) &&\n confirmation.verifySignature(AddressBook.getUserKey(ad.ownerUsername)) &&\n i.verifySignature(UserSession.getInstance().pubKey)) {\n String message = \"Your bid of \" + String.format(\"%.2f$\", (float) i.bid / 100) + \" on item: \" + ad.title + \" has won.\";\n Platform.runLater(() -> observableNotificationList.add(message));\n foundAny = true;\n SpaceUtils.cleanAdRemove(ad, 3);\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n //Avoid duplicate popup notifications but showing a single notification if any confirmations\n //were found\n if (foundAny) {\n NotificationUtil.showNotification(\"Some bids won while you were away.\");\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "private void refreshNotification() {\n String str = this.mCurrentAddedNotiSsid;\n if (str != null) {\n showNotification(str, true, true);\n }\n String str2 = this.mCurrentDeletedNotiSsid;\n if (str2 != null) {\n showNotification(str2, false, true);\n }\n }", "public void updateNotificationTranslucency() {\n float fadeoutAlpha = (!this.mClosingWithAlphaFadeOut || this.mExpandingFromHeadsUp || this.mHeadsUpManager.hasPinnedHeadsUp()) ? 1.0f : getFadeoutAlpha();\n if (this.mBarState == 1 && !this.mHintAnimationRunning && !this.mKeyguardBypassController.getBypassEnabled()) {\n fadeoutAlpha *= this.mClockPositionResult.clockAlpha;\n }\n this.mNotificationStackScroller.setAlpha(fadeoutAlpha);\n }", "public final void accept(Disposable disposable) {\n this.f12940c.updateState(C5425a.f12941c);\n }", "private void updateObservation(SessionState state, String peid)\n \t{\n// \t\tContentObservingCourier observer = (ContentObservingCourier) state.getAttribute(STATE_OBSERVER);\n//\n// \t\t// the delivery location for this tool\n// \t\tString deliveryId = clientWindowId(state, peid);\n// \t\tobserver.setDeliveryId(deliveryId);\n\t}", "@Override\n\tpublic void updateCustomerStatus() {\n\t\tfor(int i=0;i<customersInLine.size();i++) {\n\t\t\tif((customersInLine.get(i).getArrival() + customersInLine.get(i).getPatience()) <= this.getCurrentTurn()) {\n\t\t\t\tcustomersInLine.remove(i);\n\t\t\t\tcustomersInRestaurant--;\n\t\t\t\tunsatisfiedCustomers++;\n\t\t\t\ti=-1;\n\t\t\t}\n\t\t}\n\t}", "String getConfirmed();" ]
[ "0.6505874", "0.63787663", "0.63083", "0.60481143", "0.59472793", "0.583679", "0.5717989", "0.558917", "0.5578589", "0.55471927", "0.55223256", "0.5462154", "0.5439987", "0.5439831", "0.5371851", "0.53586394", "0.5352677", "0.5327427", "0.52773684", "0.52249384", "0.5190599", "0.51776654", "0.51602626", "0.51510113", "0.5137079", "0.5111728", "0.51088697", "0.51085126", "0.5107222", "0.51057714", "0.50801045", "0.5078102", "0.507397", "0.50567824", "0.5042922", "0.5030152", "0.50262374", "0.4985798", "0.49575797", "0.4952395", "0.4942363", "0.4941864", "0.49339643", "0.4923942", "0.49224508", "0.49212608", "0.49164388", "0.4910605", "0.4899266", "0.48875225", "0.48826703", "0.48704284", "0.48675275", "0.48638454", "0.486119", "0.48610404", "0.4856121", "0.48557615", "0.48469803", "0.48467436", "0.48466673", "0.48453158", "0.48451683", "0.48364168", "0.48245046", "0.48160377", "0.48051164", "0.47976044", "0.4796645", "0.47937876", "0.4787429", "0.4787429", "0.4787429", "0.47870687", "0.4780221", "0.4765432", "0.47653732", "0.4764134", "0.47624823", "0.4759461", "0.47592857", "0.47520426", "0.47472292", "0.474365", "0.47380933", "0.47263813", "0.4725916", "0.471948", "0.47092336", "0.47088757", "0.47078317", "0.47073653", "0.47023046", "0.4700312", "0.4694213", "0.46940914", "0.4688934", "0.4687747", "0.46859705", "0.4683329" ]
0.63321066
2
Update dispensing to dispensed.
public static void updateDispensingToDispensed(MasterConfig masterConfig, String pillsDispensedUuid, Integer numDispensed, Integer delta, byte[] imagePng ) throws Exception { Connection con = null; PreparedStatement pstmtUpdate = null; PreparedStatement pstmtInsertImage = null; try { con = PooledDataSource.getInstance(masterConfig).getConnection(); con.setAutoCommit(false); pstmtUpdate = con.prepareStatement(sqlUpdateDispensingToDispensed); int offset = 1; pstmtUpdate.setString(offset++, DispenseState.DISPENSED.toString()); pstmtUpdate.setInt(offset++, numDispensed); pstmtUpdate.setInt(offset++, delta); pstmtUpdate.setString(offset++, pillsDispensedUuid); pstmtUpdate.executeUpdate(); pstmtInsertImage = con.prepareStatement(sqlInsertImage); pstmtInsertImage.setString(1, pillsDispensedUuid); ByteArrayInputStream bais = new ByteArrayInputStream(imagePng); pstmtInsertImage.setBinaryStream(2, bais); pstmtInsertImage.execute(); con.commit(); } catch (Exception e) { logger.error(e.getMessage(), e); if( con != null ) { try { con.rollback(); } catch(Exception erb ) { logger.warn(e.getMessage(), e); } } throw e; } finally { try { if (pstmtUpdate != null) pstmtUpdate.close(); } catch (Exception e) { logger.warn(e); } try { if (con != null) con.close(); } catch (Exception exCon) { logger.warn(exCon.getMessage()); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void updateWithoutObservations(SensingDevice sensingDevice) {\n\n }", "public static void updatePendingToDispensing(MasterConfig masterConfig, String pillsDispensedUuid) throws Exception {\n\t\tConnection con = null;\n\t\tPreparedStatement pstmt = null;\n\t\ttry {\n\t\t\tcon = PooledDataSource.getInstance(masterConfig).getConnection();\n\t\t\tcon.setAutoCommit(true);\n\t\t\tpstmt = con.prepareStatement(sqlUpdatePendingToDispensing);\n\t\t\tint offset = 1;\n\t\t\tpstmt.setString(offset++, DispenseState.DISPENSING.toString());\n\t\t\tpstmt.setString(offset++, pillsDispensedUuid );\n\t\t\tpstmt.executeUpdate();\n\t\t} catch (Exception e) {\n\t\t\tlogger.error(e.getMessage(), e);\n\t\t\tthrow e;\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tif (pstmt != null)\n\t\t\t\t\tpstmt.close();\n\t\t\t} catch (Exception e) {\n\t\t\t\tlogger.warn(e);\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tif (con != null)\n\t\t\t\t\tcon.close();\n\t\t\t} catch (Exception exCon) {\n\t\t\t\tlogger.warn(exCon.getMessage());\n\t\t\t}\n\t\t}\n\t}", "void updateRealSense() {\n\t\tLog.debug(\"\\n========== updating RealSense\");\n\t}", "public void update(Conseiller c) {\n\t\t\r\n\t}", "public void update() {\n\n\t\tdisplay();\n\t}", "public void update(){\n addNotificaciones(nombre + \" \" + this.sucursal.descuento());\n mostrarNotificaciones();\n notificaciones.clear();\n }", "public void update() {\r\n\t\tremoveAll();\r\n\t\tdrawGrid();\r\n\t\tplotDecades();\r\n\t\tgetEntries();\r\n\t}", "public void refresh() {\n\t\tdisp.refresh();\n\t\tdisp.repaint();\n\t}", "@Override\n\t\tpublic void update() {\n\n\t\t}", "@Override\n\t\tpublic void update() {\n\n\t\t}", "@Override\n\t\tpublic void update() {\n\n\t\t}", "@Override\r\n\t\tpublic void update() {\n\t\t\t\r\n\t\t}", "@Override\r\n\t\tpublic void update() {\n\t\t\t\r\n\t\t}", "public void update() {\n\t\tif (max == null || max.length < info.size())\r\n\t\t\tmax = info.stream().mapToInt(i -> Math.max(1, i[1])).toArray();\r\n\r\n\t\tfull = improve(max);\r\n\t}", "@Override\n\tpublic void update(Discount discount) {\n\t\t\n\t}", "public void update() {\n\t\tif (c.getResamplingFactor() != 1) return;\n\t\trenderer.getVolume().updateData();\n\t}", "@Override\n\tpublic void update(CcNoticereceive entity) {\n\t\t\n\t}", "@Override\r\n\tpublic void update() {\n\t\tsuper.update();\r\n\t}", "@Override\r\n\tpublic void update() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void update() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void update() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void update() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void update() {\n\t\t\r\n\t}", "private void updateOntChanges() {\r\n\t\ttry {\r\n\t\t\tString status = \"Status: [ACTION - Update Local Ontology]...\";\r\n\t\t\tstatusBar.setText(status);\r\n\t\t\tif (existingOntRadio.isSelected()) {\r\n\t\t\t\tOWLOntology ont = (OWLOntology) ontBox.getSelectedItem();\r\n\t\t\t\tList changes = swoopModel.getChangesCache().getChangeList(ont.getURI());\r\n\t\t\t\tfor (int i=0; i<changes.size(); i++) {\r\n\t\t\t\t\tSwoopChange swc = (SwoopChange) changes.get(i);\r\n\t\t\t\t\tif (!isPresent(ontChanges, swc)) ontChanges.add(swc.clone());\r\n\t\t\t\t}\r\n\t\t\t\tthis.sortChanges(ontChanges);\r\n\t\t\t\tthis.refreshOntTreeTable(); \r\n\t\t\t}\r\n\t\t\tstatusBar.setText(status+\"DONE\");\r\n\t\t}\r\n\t\tcatch (OWLException ex) {\r\n\t\t\tex.printStackTrace();\r\n\t\t}\r\n\t}", "public void updateReactionsInfo() {\r\n\t\t((TextChannel) gameChannel).clearReactionsById(infoID).queue();\r\n\t\t\r\n\t\t// Grab\r\n\t\tString item = mapContents[currentPlayer.getCurrentRoom()];\r\n\t\tif (item != null) {\r\n\t\t\tif (item.startsWith(\"Artifact\") && currentPlayer.count(\"Artifact\") <= currentPlayer.count(\"Backpack\")) {\r\n\t\t\t\tgameChannel.addReactionById(infoID, GlobalVars.emojis.get(\"scroll\")).queue();\r\n\r\n\t\t\t} else if (item.startsWith(\"MonkeyIdol\") && !currentPlayer.getAlreadyPickedUpMonkeyIdol()) {\r\n\t\t\t\tgameChannel.addReactionById(infoID, GlobalVars.emojis.get(\"monkey_face\")).queue();\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// Movement\r\n\t\tint totalRooms = GlobalVars.adjacentRoomsPerRoom[currentPlayer.getCurrentRoom()].length;\r\n\t\tif (currentPlayer.getTeleports() > 0 ) {\r\n\t\t\tgameChannel.addReactionById(infoID, GlobalVars.emojis.get(\"crystal_ball\")).queue();\r\n\t\t\tif (hasLinkedCommand() && linkedCommand.equals(\"tp \")) {\r\n\t\t\t\ttotalRooms += GlobalVars.teleportRoomsPerRoom[currentPlayer.getCurrentRoom()].length;\r\n\t\t\t}\r\n\t\t}\r\n\t\tgameChannel.addReactionById(infoID, GlobalVars.emojis.get(\"link\"));\r\n\t\tfor (int i = 0; i < totalRooms; i++) {\r\n\t\t\t// Later, don't show rooms that can't be moved to\r\n\t\t\tgameChannel.addReactionById(infoID, Utils.numToLetterEmojis[i]).queue();\r\n\t\t}\r\n\t\t\r\n//\t\tif (currentPlayer.getSwords() > 0 && ???) {\r\n//\t\t\tint effect = GlobalVars.effectsPerPath[oldRoom][room];\r\n//\t\t\tif (GlobalVars.effectsPerPath[room][oldRoom] > 0) {\r\n//\t\t\t\teffect = GlobalVars.effectsPerPath[room][oldRoom];\r\n//\t\t\t}\r\n//\t\t\t\r\n//\t\t}\r\n\t}", "public void updateDispatch()\r\n\t{\r\n\t\ttry\r\n\t\t{\r\n\t\t\tDispatchVO dispatchVO = new DispatchVO();\r\n\t\t\tdispatchVO.setBillingName(billingName.getText());\r\n\t\t\tdispatchVO.setCompanyName(companyName.getText());\r\n\t\t\tdispatchVO.setDispatchDate(((TextField)calendar2.getChildren().get(0)).getText());\r\n\t\t\tdispatchVO.setInvoiceDate(((TextField)calendar.getChildren().get(0)).getText());\r\n\t\t\tdispatchVO.setFreightAmount(Double.parseDouble(FreightAmount.getText()));\r\n\t\t\tdispatchVO.setNoOfItems(Integer.parseInt(numberOfItems.getText()));\r\n\t\t\tdispatchVO.setFreightMode(Freightmode.getText());\r\n\t\t\tdispatchVO.setInvoiceNo(invoiceNo.getText());\r\n\t\t\tdispatchVO.setShippingTo(shippingTo.getText());\r\n\t\t\tdispatchVO.setTrackingNo(trackingNo.getText());\r\n\t\t\tdispatchVO.setTransporter(transporter.getText());\r\n\t\t\tdispatchVO.setId(ProductDispatchModifyController.this.dispatchVO.getId());\r\n\t\t\tdispatchDAO.updateDispatch(dispatchVO);\r\n\t\t\tmessage.setText(CommonConstants.DISPATCH_UPDATE);\r\n\t\t\tmessage.getStyleClass().remove(\"failure\");\r\n\t\t\tmessage.getStyleClass().add(\"success\");\r\n\t\t\tmessage.setVisible(true);\r\n\t\t}\r\n\t\tcatch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t\r\n }", "public void update() {\n\t\t\n\t}", "public void updateDisplay() {\n imageCutLevels.updateDisplay();\n }", "public void update() {\n\t\tupdate(1);\n\t}", "public void update() {\n\t}", "public void update() {\n\t}", "public void update() {\n\t}", "public void update() {\n\t}", "@Override\n\tpublic void updateConseille(Conseille c) {\n\t\t\n\t}", "public void update()\n\t{\n\t\tsuper.update();\n\t}", "@Override\r\n\tpublic void update() {\r\n\r\n\t}", "private void updateDisplayDistricts() {\n\t\tmShuffleFrag.updateDisplayDistricts(mDistDisp);\n\t}", "private void updateChannelObject() {\n int i = channelSelect.getSelectedIndex();\n Channel c = channelList.get(i);\n \n double a = Double.valueOf(ampBox.getText()) ;\n double d = Double.valueOf(durBox.getText());\n double f = Double.valueOf(freqBox.getText());\n double o = Double.valueOf(owBox.getText());\n \n c.updateSettings(a, d, f, o);\n }", "@Override\r\n\tpublic void update() {\r\n\t}", "public void update() {\n\t\tremoveAll();\n\t\tdrawGraph();\n\t\tplotEntries();\n\t}", "@Override\n public void update() {\n updateBuffs();\n }", "private synchronized void update() {\n if (upToDate) return; // nothing to do\n productionAndConsumption.clear();\n netProduction.clear();\n goodsUsed.clear();\n ProductionMap production = new ProductionMap();\n for (ColonyTile colonyTile : colony.getColonyTiles()) {\n List<AbstractGoods> p = colonyTile.getProduction();\n if (!p.isEmpty()) {\n production.add(p);\n ProductionInfo info = new ProductionInfo();\n info.addProduction(p);\n productionAndConsumption.put(colonyTile, info);\n for (AbstractGoods goods : p) {\n goodsUsed.add(goods.getType());\n netProduction.incrementCount(goods.getType().getStoredAs(), goods.getAmount());\n }\n }\n }\n\n GoodsType bells = colony.getSpecification().getGoodsType(\"model.goods.bells\");\n int unitsThatUseNoBells = colony.getSpecification().getInteger(\"model.option.unitsThatUseNoBells\");\n int amount = Math.min(unitsThatUseNoBells, colony.getUnitCount());\n ProductionInfo bellsInfo = new ProductionInfo();\n bellsInfo.addProduction(new AbstractGoods(bells, amount));\n productionAndConsumption.put(this, bellsInfo);\n netProduction.incrementCount(bells, amount);\n\n for (Consumer consumer : colony.getConsumers()) {\n Set<Modifier> modifier = consumer.getModifierSet(\"model.modifier.consumeOnlySurplusProduction\");\n List<AbstractGoods> goods = new ArrayList<AbstractGoods>();\n for (AbstractGoods g : consumer.getConsumedGoods()) {\n goodsUsed.add(g.getType());\n AbstractGoods surplus = new AbstractGoods(production.get(g.getType()));\n if (modifier.isEmpty()) {\n surplus.setAmount(surplus.getAmount() + getGoodsCount(g.getType()));\n } else {\n surplus.setAmount((int) FeatureContainer.applyModifierSet(surplus.getAmount(),\n null, modifier));\n }\n goods.add(surplus);\n }\n ProductionInfo info = null;\n if (consumer instanceof Building) {\n Building building = (Building) consumer;\n AbstractGoods output = null;\n GoodsType outputType = building.getGoodsOutputType();\n if (outputType != null) {\n goodsUsed.add(outputType);\n output = new AbstractGoods(production.get(outputType));\n output.setAmount(output.getAmount() + getGoodsCount(outputType));\n }\n info = building.getProductionInfo(output, goods);\n } else if (consumer instanceof Unit) {\n info = ((Unit) consumer).getProductionInfo(goods);\n } else if (consumer instanceof BuildQueue) {\n info = ((BuildQueue<?>) consumer).getProductionInfo(goods);\n }\n if (info != null) {\n production.add(info.getProduction());\n production.remove(info.getConsumption());\n for (AbstractGoods g : info.getProduction()) {\n netProduction.incrementCount(g.getType().getStoredAs(), g.getAmount());\n }\n for (AbstractGoods g : info.getConsumption()) {\n netProduction.incrementCount(g.getType().getStoredAs(), -g.getAmount());\n }\n productionAndConsumption.put(consumer, info);\n }\n }\n this.productionAndConsumption = productionAndConsumption;\n this.netProduction = netProduction;\n upToDate = true;\n }", "private void updateCollectedView() {\n mCollectedCoins = Data.getCollectedCoins();\n mRecyclerViewRec.setVisibility(View.INVISIBLE);\n mRecyclerViewCol.setVisibility(View.VISIBLE);\n mCollectedAdapter.notifyDataSetChanged();\n }", "@Override\n public void updateWithObservationsFromDatastreamOnly(SensingDevice sensingDevice, Datastream datastream) {\n }", "public void updateDataComp() {\n\t\tdataEntryDao.updateDataComp();\n\t}", "private void updateDisplayChars() {\n\t\tmShuffleFrag.updateDisplayChars(mCharDisp);\n\t}", "@Override\r\n\tpublic void update() {\n\t}", "@Override\r\n\tpublic void update() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\tpublic void update() { }", "public void update()\n {\n tick++;\n if (this.part != null)\n {\n for (UpdatedLabel label : dataLabels)\n {\n label.update();\n }\n int c = 0;\n for (Entry<MechanicalNode, ForgeDirection> entry : part.node.getConnections().entrySet())\n {\n if (entry.getKey() != null)\n {\n this.connections[c].setText(\"Connection\" + c + \": \" + entry.getKey());\n c++;\n }\n }\n for (int i = c; i < connections.length; i++)\n {\n this.connections[i].setText(\"Connection\" + i + \": NONE\");\n }\n }\n }", "public void update() {\r\n\t\t\r\n\t}", "private void update() {\n if (mSuggestionsPref != null) {\n mSuggestionsPref.setShouldDisableView(mSnippetsBridge == null);\n boolean suggestionsEnabled =\n mSnippetsBridge != null && mSnippetsBridge.areRemoteSuggestionsEnabled();\n mSuggestionsPref.setChecked(suggestionsEnabled\n && PrefServiceBridge.getInstance().getBoolean(\n Pref.CONTENT_SUGGESTIONS_NOTIFICATIONS_ENABLED));\n mSuggestionsPref.setEnabled(suggestionsEnabled);\n mSuggestionsPref.setSummary(suggestionsEnabled\n ? R.string.notifications_content_suggestions_summary\n : R.string.notifications_content_suggestions_summary_disabled);\n }\n\n mFromWebsitesPref.setSummary(ContentSettingsResources.getCategorySummary(\n ContentSettingsType.CONTENT_SETTINGS_TYPE_NOTIFICATIONS,\n PrefServiceBridge.getInstance().isCategoryEnabled(\n ContentSettingsType.CONTENT_SETTINGS_TYPE_NOTIFICATIONS)));\n }", "public void update() {\n suggestions = model.getDebtRepaymentSuggestions();\n }", "@Override\n\tpublic String update(double discount, int vid) {\n\t\treturn vb.update(discount, vid);\n\t}", "public void update(){\n\t\tSystem.out.println(\"Return From Observer Pattern: \\n\" + theModel.getObserverState() \n\t\t+ \"\\n\");\n\t}", "public DisponibilidadEntity update(DisponibilidadEntity entity) {\r\n\r\n return em.merge(entity);\r\n\r\n }", "@Override\n\tpublic void update() {\n\t\tobj.update();\n\t}", "public void updateReactionsPlayArea() {\r\n\t\t((TextChannel) gameChannel).clearReactionsById(playAreaID).queue();\r\n\t\tif (currentPlayer.getPlayArea().getNonPlayedSize() > 0) {\r\n\t\t\tgameChannel.addReactionById(playAreaID, GlobalVars.emojis.get(\"fast_forward\")).queue();\r\n\t\t\tgameChannel.addReactionById(playAreaID, GlobalVars.emojis.get(\"link\")).queue();\r\n\t\t\tfor (int i = 0; i < currentPlayer.getPlayArea().getSize(); i++) {\r\n\t\t\t\tif (!currentPlayer.getPlayArea().getCard(i).isPlayed()) {\r\n\t\t\t\t\tgameChannel.addReactionById(playAreaID, Utils.numToLetterEmojis[i]).queue();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tgameChannel.addReactionById(playAreaID, GlobalVars.emojis.get(\"checkered_flag\")).queue();\r\n\t\t}\r\n\t}", "@Override\n\tpublic void update() {\n\n\t}", "@Override\n\tpublic void update() {\n\n\t}", "@Override\n\tpublic void update() {\n\n\t}", "@Override\n\tpublic void update() {\n\n\t}", "@Override\n\tpublic void update() {\n\n\t}", "@Override\n\tpublic void update() {\n\n\t}", "@Override\n public void update() {\n }", "@Override\n\tpublic void update() {}", "@Override\n\tpublic void update() {}", "@Override\n\tpublic void update() {\n\t\t\n\t}", "@Override\n\tpublic void update() {\n\t\t\n\t}", "@Override\n\tpublic void update() {\n\t\t\n\t}", "@Override\n\tpublic void update() {\n\t\t\n\t}", "@Override\n\tpublic void update() {\n\t\t\n\t}", "@Override\n\tpublic void update() {\n\t\t\n\t}", "@Override\n\tpublic void update() {\n\t\t\n\t}", "@Override\n\tpublic void update() {\n\t\t\n\t}", "@Override\n\tpublic void update() {\n\t\t\n\t}", "@Override\n\tpublic void update() {\n\t\t\n\t}", "public void refreshDisplayData() {\n if (useLiveDisplayUpdates && displaySection.isOpen()) {\n displayPanel.setValue(device.getDisplayData(), true);\n }\n\n }", "public void updateOnCtWindowChange() {\n int[] displayImageData = resolveRaw(imgData[currentLayer]);\n raster.setPixels(0, 0, imgWidth, imgHeight, displayImageData);\n image.setData(raster);\n }", "@Override\n public void update() {\n \n }", "public void update() {}", "@Override\n\tpublic void update() {\n\t}", "@Override\n\tpublic void update() {\n\t}", "@Override\n\tpublic void update() {\n\t}", "private void updateResorce() {\n }", "public boolean dispense(){\n boolean wasDispensed = false;\n if (!isEmpty()){\n mPezCount--;\n //return true if it is not empty.\n wasDispensed = true;\n }\n return wasDispensed;\n }", "@Override\r\n\tpublic void update() {\n\r\n\t}", "@Override\r\n\tpublic void update() {\n\r\n\t}", "@Override\n\tpublic void dispenseChange(String productCode) {\n\t\t\n\t}", "public void update(){}", "public void update(){}", "public void update() {\n\t\tSystem.out.println(this.name+\"已经获得王者勋章...\");\n\t}", "@Override\n\tpublic void update(double prize) {\n\t\tthis.prize = cambiar(prize);\t\n\t\tSystem.out.println(\"Prize: \" + this.prize + \"¥\");\n\t}", "public void update() {\n\t\t//Indicate that data is fetched\n\t\tactivity.showProgressBar();\n\t\n\t\tPlayer currentPlayer = dc.getCurrentPlayer();\n\t\tactivity.updatePlayerInformation(\n\t\t\t\tcurrentPlayer.getName(),\n\t\t\t\tgetGlobalRanking(),\n\t\t\t\tcurrentPlayer.getGlobalScore(),\n\t\t\t\tcurrentPlayer.getPlayedGames(),\n\t\t\t\tcurrentPlayer.getWonGames(),\n\t\t\t\tcurrentPlayer.getLostGames(),\n\t\t\t\tcurrentPlayer.getDrawGames());\n\n\t\tactivity.hideProgressBar();\n\t}", "public void updateComputerCard()\n {\n this.computerCard = highCardGame.getHand(0).inspectCard(computerCardCounter);\n }", "@Override\r\n\tpublic void updateCV() {\n\r\n\t}", "public void update() {\n\tfireContentsChanged(this, 0, getSize());\n }", "public void updateConicalView();", "public void update() {\n }" ]
[ "0.62397796", "0.61334836", "0.6006788", "0.5976038", "0.58068347", "0.57941055", "0.56536025", "0.55417717", "0.5499086", "0.5499086", "0.5499086", "0.54946023", "0.54946023", "0.54873866", "0.5447617", "0.54417604", "0.54339254", "0.5409066", "0.5379899", "0.5379899", "0.5379899", "0.5379899", "0.5379899", "0.5373815", "0.5370081", "0.535725", "0.53396", "0.533109", "0.5309105", "0.5308995", "0.5308995", "0.5308995", "0.5308995", "0.5300328", "0.5299325", "0.5292538", "0.52823293", "0.5276861", "0.5267953", "0.525911", "0.5250906", "0.5250065", "0.523701", "0.52337563", "0.52108485", "0.52097857", "0.5209288", "0.5209288", "0.5207643", "0.5202388", "0.51908916", "0.51711494", "0.51674354", "0.5164729", "0.51641643", "0.51611066", "0.5158256", "0.5155584", "0.51552695", "0.5150108", "0.5150108", "0.5150108", "0.5150108", "0.5150108", "0.5150108", "0.51489985", "0.51431876", "0.51431876", "0.51387286", "0.51387286", "0.51387286", "0.51387286", "0.51387286", "0.51387286", "0.51387286", "0.51387286", "0.51387286", "0.51387286", "0.5137793", "0.5131404", "0.5121081", "0.51196635", "0.51184696", "0.51184696", "0.51184696", "0.5115676", "0.5105065", "0.51048666", "0.51048666", "0.51044595", "0.5100935", "0.5100935", "0.50982684", "0.5086155", "0.50798655", "0.5071673", "0.50711346", "0.5054474", "0.5048755", "0.5048638" ]
0.53350204
27
Update pending to dispensing.
public static void updatePendingToDispensing(MasterConfig masterConfig, String pillsDispensedUuid) throws Exception { Connection con = null; PreparedStatement pstmt = null; try { con = PooledDataSource.getInstance(masterConfig).getConnection(); con.setAutoCommit(true); pstmt = con.prepareStatement(sqlUpdatePendingToDispensing); int offset = 1; pstmt.setString(offset++, DispenseState.DISPENSING.toString()); pstmt.setString(offset++, pillsDispensedUuid ); pstmt.executeUpdate(); } catch (Exception e) { logger.error(e.getMessage(), e); throw e; } finally { try { if (pstmt != null) pstmt.close(); } catch (Exception e) { logger.warn(e); } try { if (con != null) con.close(); } catch (Exception exCon) { logger.warn(exCon.getMessage()); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private synchronized void incrementPending() {\n\t\tpending++;\n\t}", "@Override\r\n\tpublic void pending() {\n\t\tSystem.out.println(\"pending\");\r\n\t}", "public void BufferUpdates()\n {\n //Clear the dispatch list and start buffering changed entities.\n DispatchList.clear();\n bBufferingUpdates = true;\n }", "public boolean pending() {\n return altingChannel.pending();\n }", "public void pending()\n\t{\n\t\tdriver.findElementByName(OR.getProperty(\"Pending\")).click();\n\t}", "public HistoricAccRequestPendingDisplay() {\n initComponents();\n this.blnDoUpdate = new AtomicBoolean(true);\n }", "private void notifyObservers() {\n BinStatusUpdate newStatus = buildNewStatus();\n observers.iterator().forEachRemaining(binStatusUpdateStreamObserver -> binStatusUpdateStreamObserver.onNext(newStatus));\n }", "@Override\n\tpublic void updatePengdingWaybill(WaybillPendingEntity entity) {\n\t\t\n\t}", "public void update(){\n addNotificaciones(nombre + \" \" + this.sucursal.descuento());\n mostrarNotificaciones();\n notificaciones.clear();\n }", "@Override\n public void update() {\n updateBuffs();\n }", "public void update () {\n synchronized (this) {\n messagesWaiting.add\n (new OleThreadRequest(UPDATE,\n 0, 0, 0, 0));\n notify();\n }\n }", "synchronized private void flushPendingUpdates() throws SailException {\n\t\tif (!isActiveOperation()\n\t\t\t\t|| isActive() && !getTransactionIsolation().isCompatibleWith(IsolationLevels.SNAPSHOT_READ)) {\n\t\t\tflush();\n\t\t\tpendingAdds = false;\n\t\t\tpendingRemovals = false;\n\t\t}\n\t}", "@Override\n public void notifyUpdate() {\n Update();\n //Invia all'activity di questo frammento il totale speso per aggiornare la sezione di controllo del budget\n onSendTotSpent.ReceiveTotSpent(contactGiftAdapter.totSpent());\n }", "@Override\n\tpublic boolean isPending() {\n\t\treturn model.isPending();\n\t}", "private void update() {\n if (mSuggestionsPref != null) {\n mSuggestionsPref.setShouldDisableView(mSnippetsBridge == null);\n boolean suggestionsEnabled =\n mSnippetsBridge != null && mSnippetsBridge.areRemoteSuggestionsEnabled();\n mSuggestionsPref.setChecked(suggestionsEnabled\n && PrefServiceBridge.getInstance().getBoolean(\n Pref.CONTENT_SUGGESTIONS_NOTIFICATIONS_ENABLED));\n mSuggestionsPref.setEnabled(suggestionsEnabled);\n mSuggestionsPref.setSummary(suggestionsEnabled\n ? R.string.notifications_content_suggestions_summary\n : R.string.notifications_content_suggestions_summary_disabled);\n }\n\n mFromWebsitesPref.setSummary(ContentSettingsResources.getCategorySummary(\n ContentSettingsType.CONTENT_SETTINGS_TYPE_NOTIFICATIONS,\n PrefServiceBridge.getInstance().isCategoryEnabled(\n ContentSettingsType.CONTENT_SETTINGS_TYPE_NOTIFICATIONS)));\n }", "@Override\n\tpublic void update(CcNoticereceive entity) {\n\t\t\n\t}", "public void update() {\n \t\tissueHandler.checkAllIssues();\n \t\tlastUpdate = System.currentTimeMillis();\n \t}", "public void setPending()\n\t{\n\t\tprogressBar.setString(XSTR.getString(\"progressBarWaiting\"));\n\t\tprogressBar.setIndeterminate(true);\n\t\tprogressBar.setValue(0);\n\t\t\n\t\tstoplightPanel.setPending();\n\t}", "public void notifyUpdate() {\n if (mObserver != null) {\n synchronized (mObserver) {\n mNotified = true;\n mObserver.notify();\n }\n }\n }", "public void update() {\n\n if (waitingQueue == null)\n return;\n else if (waitingQueue.owner == null)\n return;\n else if (waitingQueue.pickNextThread() == null)\n return;\n\n if (waitingQueue.transferPriority && waitingQueue.pickNextThread().getWinningPriority() > waitingQueue.owner.getWinningPriority())\n {\n waitingQueue.owner.effectivePriority = waitingQueue.pickNextThread().getWinningPriority();\n waitingQueue.owner.recalculateThreadScheduling();\n waitingQueue.owner.update();\n }\n }", "public void update()\n {\n this.controller.updateAll();\n theLogger.info(\"Update request recieved from UI\");\n }", "public void update() {\n suggestions = model.getDebtRepaymentSuggestions();\n }", "private void markPendingRequestAsSeen(String reqID) throws JSONException{\n\t JSONObject jo = BAPreferences.ConfigPreference().getPendingRequestAsJsonObject(reqID);//new JSONObject(req);\n\t jo.put(\"seen\", true);\n\t BAPreferences.ConfigPreference().setPendingRequest(reqID, jo);\n\t //editor.putString(jo.getString(\"RequestID\"), jo.toString());\n\t //editor.commit();\n\t \n\t //\n\t this.singletonEvents.onSetPendingGCMRequestToSeen.Raise(this, null);\n\t}", "private void updateReceivedView() {\n mReceivedCoins = Data.getReceivedCoins();\n mRecyclerViewCol.setVisibility(View.INVISIBLE);\n mRecyclerViewRec.setVisibility(View.VISIBLE);\n mReceivedAdapter.notifyDataSetChanged();\n }", "@Override\n\tpublic boolean updateStatus() {\n\t\treturn false;\n\t}", "public void update() {\r\n\t\t\tsetTextValue(updateNoteEnabled);\r\n\t\t}", "public final void update(){\n if(waitingToExecute){\n execute();\n waitingToExecute = false;\n }\n }", "@Override\n public void updateWithoutObservations(SensingDevice sensingDevice) {\n\n }", "@Override\n public void update() {\n this.blnDoUpdate.set(true);\n }", "public static void FormPending() throws ClassNotFoundException, SQLException {\r\n try (Statement s = DBConnect.connection.createStatement()) {\r\n String upTable = \"UPDATE existing_forms \"\r\n + \"SET Status = 'Pending', Last_Updated = '\" + GtDates.tdate + \"'\"\r\n + \"WHERE Form_Name = '\" + StFrmNm + \"'\";\r\n s.execute(upTable);\r\n }\r\n }", "void freeze() {\n setState(State.FROZEN); // prevent new puts to this chunk\n while (pendingOps.get() != 0) ;\n }", "public void update() {\n\t\tmLast = mNow;\n\t\tmNow = get();\n\t}", "private void updateCollectedView() {\n mCollectedCoins = Data.getCollectedCoins();\n mRecyclerViewRec.setVisibility(View.INVISIBLE);\n mRecyclerViewCol.setVisibility(View.VISIBLE);\n mCollectedAdapter.notifyDataSetChanged();\n }", "public void forceUpdate() {\n if (mLocalManager == null) {\n Log.e(TAG, \"forceUpdate() Bluetooth is not supported on this device\");\n return;\n }\n if (BluetoothAdapter.getDefaultAdapter().isEnabled()) {\n final Collection<CachedBluetoothDevice> cachedDevices =\n mLocalManager.getCachedDeviceManager().getCachedDevicesCopy();\n for (CachedBluetoothDevice cachedBluetoothDevice : cachedDevices) {\n update(cachedBluetoothDevice);\n }\n } else {\n removeAllDevicesFromPreference();\n }\n }", "private void updateOntChanges() {\r\n\t\ttry {\r\n\t\t\tString status = \"Status: [ACTION - Update Local Ontology]...\";\r\n\t\t\tstatusBar.setText(status);\r\n\t\t\tif (existingOntRadio.isSelected()) {\r\n\t\t\t\tOWLOntology ont = (OWLOntology) ontBox.getSelectedItem();\r\n\t\t\t\tList changes = swoopModel.getChangesCache().getChangeList(ont.getURI());\r\n\t\t\t\tfor (int i=0; i<changes.size(); i++) {\r\n\t\t\t\t\tSwoopChange swc = (SwoopChange) changes.get(i);\r\n\t\t\t\t\tif (!isPresent(ontChanges, swc)) ontChanges.add(swc.clone());\r\n\t\t\t\t}\r\n\t\t\t\tthis.sortChanges(ontChanges);\r\n\t\t\t\tthis.refreshOntTreeTable(); \r\n\t\t\t}\r\n\t\t\tstatusBar.setText(status+\"DONE\");\r\n\t\t}\r\n\t\tcatch (OWLException ex) {\r\n\t\t\tex.printStackTrace();\r\n\t\t}\r\n\t}", "private void viewPendingRequests() {\n\n\t}", "@Override\n\tpublic void update()\n\t{\n\t\tfor (int i = 0; i < 16 && !processQueue.isEmpty(); i++)\n\t\t{\n\t\t\tProcessEntry entry = processQueue.remove();\n\t\t\tprocessPacket(entry.packet, entry.sourceClient);\n\t\t}\n\t\t\n\t\t// Flush pending packets\n\t\tclientChannels.flush();\n\t}", "public void scheduledUpdate() {\n\n if (isUpdating.compareAndSet(false, true)) {\n\n if (getCurrentChannel() != null) {\n\n updateData();\n }\n }\n\n timer.cancel();\n timer.purge();\n\n timer = new Timer();\n timer.scheduleAtFixedRate(new UpdateTask(), 3600000,\n 3600000);\n\n }", "private void notifyUpdated() {\n if (mChanged) {\n mChanged = false;\n mObserver.onChanged(this);\n }\n }", "@Override\r\n\t\tpublic void onBufferingUpdate(MediaPlayer arg0, int percent) {\n\t\t\t((TextView) mainLayout.findViewById(R.id.btn_buffering)).setText(\"Buffering \" + percent + \"%\");\r\n\t\t}", "public void updateReactionsPlayArea() {\r\n\t\t((TextChannel) gameChannel).clearReactionsById(playAreaID).queue();\r\n\t\tif (currentPlayer.getPlayArea().getNonPlayedSize() > 0) {\r\n\t\t\tgameChannel.addReactionById(playAreaID, GlobalVars.emojis.get(\"fast_forward\")).queue();\r\n\t\t\tgameChannel.addReactionById(playAreaID, GlobalVars.emojis.get(\"link\")).queue();\r\n\t\t\tfor (int i = 0; i < currentPlayer.getPlayArea().getSize(); i++) {\r\n\t\t\t\tif (!currentPlayer.getPlayArea().getCard(i).isPlayed()) {\r\n\t\t\t\t\tgameChannel.addReactionById(playAreaID, Utils.numToLetterEmojis[i]).queue();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tgameChannel.addReactionById(playAreaID, GlobalVars.emojis.get(\"checkered_flag\")).queue();\r\n\t\t}\r\n\t}", "@Override\n\tpublic long updateDisplay() {\n\t\treturn AppStatus.NO_REFRESH;\n\t}", "public void update() {\n\n\t\tdisplay();\n\t}", "public void update() {\r\n\r\n // update attributes\r\n finishIcon.setColored(isDirty());\r\n cancelIcon.setColored(isDirty());\r\n finishButton.repaint();\r\n cancelButton.repaint();\r\n\r\n }", "@Override\n\tpublic boolean isPending();", "@Override\n\tpublic void update() {\n\t\tSystem.out.println(\"Observer Pattern on Room Reservation Notification: \");\n\t\tSystem.out.println(\"Your room is \" + reserve.getState()+\"\\n\");\n\t}", "private void updateFromProvider() {\n if(isUpdating.get()){\n isHaveUpdateRequest.set(true);\n return;\n }\n mUpdateExecutorService.execute(new UpdateThread());\n }", "private void updateUnitStatus() {\r\n\t\tint b1 = Sense_NotReady;\r\n\t\tif (this.tapeIo != null) {\r\n\t\t\tb1 = Sense_Ready;\r\n\t\t\tb1 |= (this.currentBlock == this.headLimit) ? Sense_AtLoadPoint : 0;\r\n\t\t\tb1 |= (this.isReadonly) ? Sense_FileProtected : 0;\r\n\t\t}\r\n\t\tthis.senseBytes[1] = (byte)((b1 >> 16) & 0xFF);\r\n\t\t\r\n\t\tint b4 = (this.currentBlock == this.tailLimit) ? Sense_EndOfTape : 0;\r\n\t\tthis.senseBytes[4] = (byte)( ((b4 >> 8) & 0xF0) | (this.senseBytes[4] & 0x0F) );\r\n\t}", "public void requestUpdate(){\n shouldUpdate = true;\n }", "public synchronized void setPendingBalance(double pendingBalance) {\n this.pendingBalance = pendingBalance;\n }", "public void update(){\n\t\tSystem.out.println(\"Return From Observer Pattern: \\n\" + theModel.getObserverState() \n\t\t+ \"\\n\");\n\t}", "protected void _updateMsbDisplay()\n\t{\n\t\tignoreActions = true ;\n\t\tSpObs obs = ( SpObs )_spItem ;\n\t\tif( obs.isMSB() )\n\t\t{\n\t\t\t_w.msbPanel.setVisible( true ) ;\n\t\t\t_w.optional.setVisible( false ) ;\n\t\t\t_w.unSuspendCB.setVisible( obs.isSuspended() ) ;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t_w.msbPanel.setVisible( false ) ;\n\n\t\t\tif( OtCfg.telescopeUtil.supports( TelescopeUtil.FEATURE_FLAG_AS_STANDARD ) )\n\t\t\t\t_w.optional.setVisible( true ) ;\n\t\t}\n\t\tignoreActions = false ;\n\t}", "public void draftEvent(){\n gameState = GameState.DRAFT;\n currentMessage = \"\" + currentPlayer.getNumTroops();\n currentTerritoriesOfInterest = currentPlayer.getTerritoriesList();\n notifyObservers();\n }", "private void sendUpdates() {\n\n List<PeerUpdateMessage.Part> parts = new ArrayList<PeerUpdateMessage.Part>();\n for (ActivePlayer peer : player.getSavedNeighbors()) {\n PeerUpdateMessage.Part part = new PeerUpdateMessage.Part(\n peer.character.id, peer.character.getExtrapolatedMotionState());\n parts.add(part);\n }\n\n if (!parts.isEmpty()) {\n PeerUpdateMessage msg = new PeerUpdateMessage(parts);\n new ToClientMessageSink(player.session).sendWithoutConfirmation(msg);\n }\n }", "public void markAvailable() {\n CompletableFuture<?> toNotify = null;\n synchronized (this) {\n if (!availableFuture.isDone()) {\n toNotify = availableFuture;\n }\n }\n if (toNotify != null) {\n toNotify.complete(null);\n }\n }", "public void bufferedAmountChange() {\n // Webrtc.org fires the bufferedAmountChange event from a different\n // thread (B) while locking the native send call on the current\n // thread (A). This leads to a deadlock if we try to lock this\n // instance from (B). So, this... pleasant workaround prevents\n // deadlocking the send call.\n CompletableFuture.runAsync(() -> {\n synchronized (this) {\n final long bufferedAmount = this.dc.bufferedAmount();\n // Unpause once low water mark has been reached\n if (bufferedAmount <= this.lowWaterMark && !this.readyFuture.isDone()) {\n log.debug(this.dc.label() + \" resumed (buffered=\" + bufferedAmount + \")\");\n this.readyFuture.complete(null);\n }\n }\n });\n }", "public void markEverythingDirty() {\n fullUpdate = true;\n }", "private void updateResorce() {\n }", "Update withCancelRequested(Boolean cancelRequested);", "@Override\n\tpublic void updateCanceledOrders(CanceledOrders canceledOrders) {\n\t\t\n\t}", "public void update(){\n \t//NOOP\n }", "public void update() {\r\n\t\tremoveAll();\r\n\t\tdrawGrid();\r\n\t\tplotDecades();\r\n\t\tgetEntries();\r\n\t}", "@Override\n\tpublic void Notify() {\n\t\tfor (Observer observer : obs) {\n\t\t\tobserver.update();\n\t\t}\n\t}", "private void updateNotification() {\n Bitmap image = null;\n if(currentPlayingItem!=null && currentPlayingItem.hasImage()) {\n image = ((MusicPlayerApplication)getApplication()).imagesCache.getImageSync(currentPlayingItem);\n }\n\n\t\t/* Update remote control client */\n if(currentPlayingItem==null) {\n remoteControlClient.setPlaybackState(RemoteControlClient.PLAYSTATE_STOPPED);\n } else {\n if(isPlaying()) {\n remoteControlClient.setPlaybackState(RemoteControlClient.PLAYSTATE_PLAYING);\n } else {\n remoteControlClient.setPlaybackState(RemoteControlClient.PLAYSTATE_PAUSED);\n }\n RemoteControlClient.MetadataEditor metadataEditor = remoteControlClient.editMetadata(true);\n metadataEditor.putString(MediaMetadataRetriever.METADATA_KEY_TITLE, currentPlayingItem.getTitle());\n metadataEditor.putString(MediaMetadataRetriever.METADATA_KEY_ALBUM, currentPlayingItem.getArtist());\n metadataEditor.putString(MediaMetadataRetriever.METADATA_KEY_ARTIST, currentPlayingItem.getArtist());\n metadataEditor.putLong(MediaMetadataRetriever.METADATA_KEY_DURATION, getDuration());\n if(currentPlayingItem.hasImage()) {\n metadataEditor.putBitmap(METADATA_KEY_ARTWORK, image);\n } else {\n metadataEditor.putBitmap(METADATA_KEY_ARTWORK, icon.copy(icon.getConfig(), false));\n }\n metadataEditor.apply();\n }\n\n sendPlayingStateBroadcast();\n\t\t\n\t\t/* Update notification */\n\t\tNotification.Builder notificationBuilder = new Notification.Builder(this);\n\t\tnotificationBuilder.setSmallIcon(R.drawable.audio_white);\n notificationBuilder.setContentIntent(pendingIntent);\n notificationBuilder.setOngoing(true);\n\t\tif (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {\n\t\t\tnotificationBuilder.setChannelId(NOTIFICATION_CHANNEL);\n\t\t}\n\n if(Build.VERSION.SDK_INT >= 21) {\n int playPauseIcon = isPlaying() ? R.drawable.button_pause : R.drawable.button_play;\n if (currentPlayingItem == null) {\n notificationBuilder.setContentTitle(getString(R.string.noSong));\n notificationBuilder.setContentText(getString(R.string.app_name));\n notificationBuilder.setLargeIcon(BitmapFactory.decodeResource(getResources(), R.drawable.ic_launcher));\n } else {\n notificationBuilder.setContentTitle(currentPlayingItem.getTitle());\n notificationBuilder.setContentText(currentPlayingItem.getArtist());\n if (image == null) {\n notificationBuilder.setLargeIcon(BitmapFactory.decodeResource(getResources(), R.drawable.ic_launcher));\n } else {\n notificationBuilder.setLargeIcon(image);\n }\n }\n notificationBuilder.addAction(R.drawable.button_quit, getString(R.string.quit), quitPendingIntent);\n notificationBuilder.addAction(R.drawable.button_previous, getString(R.string.previous), previousPendingIntent);\n notificationBuilder.addAction(playPauseIcon, getString(R.string.pause), playpausePendingIntent);\n notificationBuilder.addAction(R.drawable.button_next, getString(R.string.next), nextPendingIntent);\n notificationBuilder.setColor(getResources().getColor(R.color.primaryDark));\n notificationBuilder.setStyle(new Notification.MediaStyle().setShowActionsInCompactView(2));\n notification = notificationBuilder.build();\n } else {\n int playPauseIcon = isPlaying() ? R.drawable.pause : R.drawable.play;\n notificationBuilder.setContentTitle(getResources().getString(R.string.app_name));\n\n RemoteViews notificationLayout = new RemoteViews(getPackageName(), R.layout.layout_notification);\n\n if (currentPlayingItem == null) {\n notificationLayout.setTextViewText(R.id.textViewArtist, getString(R.string.app_name));\n notificationLayout.setTextViewText(R.id.textViewTitle, getString(R.string.noSong));\n notificationLayout.setImageViewBitmap(R.id.imageViewNotification, BitmapFactory.decodeResource(getResources(), R.drawable.ic_launcher));\n } else {\n String title = currentPlayingItem.getArtist();\n if (!title.equals(\"\")) title += \" - \";\n title += currentPlayingItem.getTitle();\n notificationBuilder.setContentText(title);\n notificationLayout.setTextViewText(R.id.textViewArtist, currentPlayingItem.getArtist());\n notificationLayout.setTextViewText(R.id.textViewTitle, currentPlayingItem.getTitle());\n if (image != null) {\n notificationLayout.setImageViewBitmap(R.id.imageViewNotification, image);\n } else {\n notificationLayout.setImageViewBitmap(R.id.imageViewNotification, BitmapFactory.decodeResource(getResources(), R.drawable.ic_launcher));\n }\n }\n notificationLayout.setOnClickPendingIntent(R.id.buttonNotificationQuit, quitPendingIntent);\n notificationLayout.setOnClickPendingIntent(R.id.buttonNotificationPrevious, previousPendingIntent);\n notificationLayout.setImageViewResource(R.id.buttonNotificationPlayPause, playPauseIcon);\n notificationLayout.setOnClickPendingIntent(R.id.buttonNotificationPlayPause, playpausePendingIntent);\n notificationLayout.setOnClickPendingIntent(R.id.buttonNotificationNext, nextPendingIntent);\n notification = notificationBuilder.build();\n notification.bigContentView = notificationLayout;\n }\n\t\t\n\t\tnotificationManager.notify(NOTIFICATION_ID, notification);\n\t}", "@Override\n public void syncState() {\n scheduledCounter.check();\n }", "Collection<EntityUpdateRequest> pendingUpdates();", "private void updatePlayerList() \n\t{\n\t\tplayerStatus.clear();\n\n\t\tfor(Player thisPlayer: players) // Add the status of each player to the default list model.\n\t\t{\n\t\t\tplayerStatus.addElement(thisPlayer.toString());\n\t\t}\n\n\t}", "private void update() {\n Thread t = new Thread(new Runnable() {\n @Override\n public void run() {\n List<File> list = getContents(NOT_TRASHED + \" and \" + NOT_FOLDER + \" and \" + SUPPORTED_FILES);\n List<File> filteredList = new ArrayList<File>();\n \n // filters out shared drive files\n for (File f : list) {\n if(!f.getShared()) {\n filteredList.add(f);\n }\n }\n\n numDownloading = filteredList.size();\n Log.e(\"START NUM\", \"\" + numDownloading);\n updateMax = numDownloading;\n \n // notification progress bar\n String note = getResources().getString(R.string.notification_message);\n nm = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);\n mBuilder = new NotificationCompat.Builder(mContext);\n mBuilder.setContentTitle(note)\n .setSmallIcon(android.R.drawable.stat_sys_download)\n .setTicker(note);\n\n // main progress bar\n mProgress = (ProgressBar) findViewById(R.id.progressBar1);\n new Thread(new Runnable() {\n @Override\n public void run() {\n while (numDownloading > 0) {\n mHandler.post(new Runnable() {\n @Override\n public void run() {\n int progress = 100 * (updateMax - numDownloading) / updateMax; \n mProgress.setProgress(progress);\n if (numDownloading <= 0) {\n back();//finish();\n }\n } \n });\n }\n }\n }).start();\n\n if (!targetDir.exists())\n targetDir.mkdirs();\n getDriveContents();\n }\n });\n t.start();\n }", "public synchronized void mudarEstadoPistaDisponivel() {\n temPistaDisponivel = !temPistaDisponivel;\n System.out.println(nomeAeroporto + \" tem pista disponível: \" + \n (temPistaDisponivel == true ? \"Sim\" : \"Não\"));\n // Notifica a mudanca de estado para quem estiver esperando.\n if(temPistaDisponivel) this.notify();\n }", "@Override\n public boolean messagePending() {\n return commReceiver.messagePending();\n }", "@Override\n public void doUpdate(NotificationMessage notification) {\n \n }", "@Override\n\t\tpublic void update() {\n\t\t\tSystem.out.println(\"새로운 수정\");\n\t\t}", "public void update() {\n\t\t//Indicate that data is fetched\n\t\tactivity.showProgressBar();\n\t\n\t\tPlayer currentPlayer = dc.getCurrentPlayer();\n\t\tactivity.updatePlayerInformation(\n\t\t\t\tcurrentPlayer.getName(),\n\t\t\t\tgetGlobalRanking(),\n\t\t\t\tcurrentPlayer.getGlobalScore(),\n\t\t\t\tcurrentPlayer.getPlayedGames(),\n\t\t\t\tcurrentPlayer.getWonGames(),\n\t\t\t\tcurrentPlayer.getLostGames(),\n\t\t\t\tcurrentPlayer.getDrawGames());\n\n\t\tactivity.hideProgressBar();\n\t}", "private void sendCurrentState() {\n\ttry {\n\t channel.sendObject(getState());\n\t} catch (IOException e) {\n\t Log.e(\"423-client\", e.toString());\n\t}\n }", "public void updateCount(){\n TextView newCoupons = (TextView) findViewById(R.id.counter);\n //couponsCount.setText(\"Pocet pouzitych kuponov je: \" + SharedPreferencesManager.getUsedCoupons());\n if(SharedPreferencesManager.getNew()>0) {\n newCoupons.setVisibility(View.VISIBLE);\n newCoupons.setText(String.valueOf(SharedPreferencesManager.getNew()));\n }\n else {\n newCoupons.setVisibility(View.GONE);\n }\n }", "public void update() {\n\t\tupdate(1);\n\t}", "public void onBlockingStateUpdated(boolean blocking) {\n \n }", "public void updateReactionsInfo() {\r\n\t\t((TextChannel) gameChannel).clearReactionsById(infoID).queue();\r\n\t\t\r\n\t\t// Grab\r\n\t\tString item = mapContents[currentPlayer.getCurrentRoom()];\r\n\t\tif (item != null) {\r\n\t\t\tif (item.startsWith(\"Artifact\") && currentPlayer.count(\"Artifact\") <= currentPlayer.count(\"Backpack\")) {\r\n\t\t\t\tgameChannel.addReactionById(infoID, GlobalVars.emojis.get(\"scroll\")).queue();\r\n\r\n\t\t\t} else if (item.startsWith(\"MonkeyIdol\") && !currentPlayer.getAlreadyPickedUpMonkeyIdol()) {\r\n\t\t\t\tgameChannel.addReactionById(infoID, GlobalVars.emojis.get(\"monkey_face\")).queue();\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// Movement\r\n\t\tint totalRooms = GlobalVars.adjacentRoomsPerRoom[currentPlayer.getCurrentRoom()].length;\r\n\t\tif (currentPlayer.getTeleports() > 0 ) {\r\n\t\t\tgameChannel.addReactionById(infoID, GlobalVars.emojis.get(\"crystal_ball\")).queue();\r\n\t\t\tif (hasLinkedCommand() && linkedCommand.equals(\"tp \")) {\r\n\t\t\t\ttotalRooms += GlobalVars.teleportRoomsPerRoom[currentPlayer.getCurrentRoom()].length;\r\n\t\t\t}\r\n\t\t}\r\n\t\tgameChannel.addReactionById(infoID, GlobalVars.emojis.get(\"link\"));\r\n\t\tfor (int i = 0; i < totalRooms; i++) {\r\n\t\t\t// Later, don't show rooms that can't be moved to\r\n\t\t\tgameChannel.addReactionById(infoID, Utils.numToLetterEmojis[i]).queue();\r\n\t\t}\r\n\t\t\r\n//\t\tif (currentPlayer.getSwords() > 0 && ???) {\r\n//\t\t\tint effect = GlobalVars.effectsPerPath[oldRoom][room];\r\n//\t\t\tif (GlobalVars.effectsPerPath[room][oldRoom] > 0) {\r\n//\t\t\t\teffect = GlobalVars.effectsPerPath[room][oldRoom];\r\n//\t\t\t}\r\n//\t\t\t\r\n//\t\t}\r\n\t}", "public void DispatchUpdates()\n {\n //Dispatch the updates.\n bBufferingUpdates = false;\n \n for(LaunchEntity entity : DispatchList)\n {\n for(LaunchServerSession session : Sessions.values())\n {\n if(session.CanReceiveUpdates())\n {\n session.SendEntity(entity);\n }\n }\n }\n }", "public final void accept(Disposable disposable) {\n this.f12940c.updateState(C5425a.f12941c);\n }", "private void publishDischargingText() {\n dischargeSampleList = dischargingSampleViewModel.getAll();\n dischargeSampleList.observeForever(dischargeSampleListObserver);\n }", "public void update(){}", "public void update(){}", "public abstract void updatePendingConfiguration(Configuration config);", "@Override\n\tpublic void update() {\n\t\t\n\t\tif (state) {\n\t\t\treturn;\n\t\t}\n\t\tsync();\n\t\tfor (QuestPlayer player : participants.getParticipants()) {\n\t\t\tif (player.getPlayer().isOnline())\n\t\t\tif (player.getPlayer().getPlayer().getLocation().getWorld().getName().equals(destination.getWorld().getName()))\n\t\t\tif ((player.getPlayer().getPlayer()).getLocation().distance(destination) <= targetRange) {\n\t\t\t\tstate = true;\n\t\t\t\tupdateQuest();\n\t\t\t\t\n\t\t\t\t//unregister listener, cause we'll never switch to unsatisfied\n\t\t\t\tHandlerList.unregisterAll(this);\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\t\n\t\tstate = false;\n\t}", "@Override\n\t\tpublic void update() {\n\n\t\t}", "@Override\n\t\tpublic void update() {\n\n\t\t}", "@Override\n\t\tpublic void update() {\n\n\t\t}", "@Override\n\tpublic void addNotify() {\n\t\tsuper.addNotify();\n\t\t// Buffer\n\t\tcreateBufferStrategy(2);\n\t\ts = getBufferStrategy();\n\t}", "private void updateReceivedCoinsInBackground() {\n Log.d(TAG, \"[updateReceivedCoinsInBackground] updating...\");\n Data.retrieveAllCoinsFromCollection(Data.RECEIVED, new OnEventListener<String>() {\n @Override\n public void onSuccess(String object) {\n // If received coins view is currently visible, update the view (which also updates\n // the data), otherwise just update the data\n if (mRecyclerViewRec.getVisibility() == View.VISIBLE) {\n updateReceivedView();\n } else {\n mReceivedCoins = Data.getReceivedCoins();\n }\n Log.d(TAG, \"[updateReceivedCoinsInBackground] updated\");\n }\n @Override\n public void onFailure(Exception e) {\n Log.d(TAG, \"[updateReceivedCoinsInBackground] failed to retrieve coins: \", e);\n }\n });\n }", "@Override\n public void executeUpdate() {\n EventBus.publish(new DialogCraftingReceivedEvent(requestId, title, groups, craftItems));\n }", "void statusUpdate(boolean invalid);", "void updateNotification() {\n\t\tif (isPlaying()) {\n\t\t\tmNotification.icon = R.drawable.ic_now_playing;\n\t\t} else if (isPaused()) {\n\t\t\tmNotification.icon = R.drawable.ic_pause_track;\n\t\t}\n\t\tNotificationManager nM = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);\n\t\tnM.notify(NOTIFICATION_ID, mNotification);\n\t}", "@Override\r\n\tpublic void updateConsumer(Consumer con) {\n\r\n\t}", "private void setFinalNotification() {\n //finished downloading all files\n // update notification\n String note = getResources().getString(R.string.update_complete);\n mBuilder.setContentTitle(note)\n .setContentText(\"\")\n .setSmallIcon(R.drawable.ic_launcher_mp)\n .setTicker(note)\n .setProgress(0, 0, false);\n nm.notify(0, mBuilder.build());\n }", "private void sendActivityUpdated(boolean isDiscarded) {\n Intent i = new Intent(\"com.reconinstruments.SPORTS_ACTIVITY\");\n i.putExtra(\"status\",mStatus);\n i.putExtra(\"type\",mType);\n i.putExtra(\"isDiscarded\",isDiscarded);\n mRTS.sendBroadcast(i);\n }", "public void updateState(){\n\t\t\n\t\t\n\t\t\n\t\tArrayList<String> toAdd = new ArrayList<String>();\n\t\tArrayList<String> toRemove = new ArrayList<String>();\n\n\t\tthis.lastAdded.clear();\n\t\tthis.lastFulfilled.clear();\n\t\tthis.lastViolated.clear();\n\t\t\n\t\ttry {\n\n\t\t\tdo{\n\t\t\t\ttoAdd.clear();\n\t\t\t\ttoRemove.clear();\n\t\t\t\t\n\t\t\t\tIterator<Unifier> iActive = reasoner.findall(\"xactive(A,Fa,Fm,Fd,Fr,Timeout)&not(as(A,Fa,Fm,Fd,Fr,Timeout))\");\n\t\t\t\twhile(iActive.hasNext()){\n\t\t\t\t\tUnifier un = iActive.next();\n\t\t\t\t\ttoAdd.add(\"as(\"+adaptTerm(un.get(\"A\").toString())+\",\"+ adaptTerm(un.get(\"Fa\").toString())+\",\"+adaptTerm(un.get(\"Fm\").toString())+\",\"+adaptTerm(un.get(\"Fd\").toString())+\",\"+adaptTerm(un.get(\"Fr\").toString())+\",\"+adaptTerm(un.get(\"Timeout\").toString())+\")\");\n\t\t\t\t\tthis.lastAdded.add(\"as(\"+adaptTerm(un.get(\"A\").toString())+\",\"+ adaptTerm(un.get(\"Fa\").toString())+\",\"+adaptTerm(un.get(\"Fm\").toString())+\",\"+adaptTerm(un.get(\"Fd\").toString())+\",\"+adaptTerm(un.get(\"Fr\").toString())+\",\"+adaptTerm(un.get(\"Timeout\").toString())+\")\");\n\t\t\t\t}\t\n\t\t\t\t\n\t\t\t\tIterator<Unifier> iViol = reasoner.findall(\"xviol(A,Fa,Fm,Fd,Fr,Timeout)&not(vs(A,Fa,Fm,Fd,Fr,Timeout))\");\n\t\t\t\twhile(iViol.hasNext()){\n\t\t\t\t\tUnifier un = iViol.next();\n\t\t\t\t\ttoAdd.add(\"vs(\"+adaptTerm(un.get(\"A\").toString())+\",\"+adaptTerm(un.get(\"Fa\").toString())+\",\"+adaptTerm(un.get(\"Fm\").toString())+\",\"+adaptTerm(un.get(\"Fd\").toString())+\",\"+adaptTerm(un.get(\"Fr\").toString())+\",\"+adaptTerm(un.get(\"Timeout\").toString())+\")\");\n\t\t\t\t\ttoRemove.add(\"as(\"+adaptTerm(un.get(\"A\").toString())+\",\"+adaptTerm(un.get(\"Fa\").toString())+\",\"+adaptTerm(un.get(\"Fm\").toString())+\",\"+adaptTerm(un.get(\"Fd\").toString())+\",\"+adaptTerm(un.get(\"Fr\").toString())+\",\"+adaptTerm(un.get(\"Timeout\").toString())+\")\");\n\t\t\t\t\tthis.lastViolated.add(\"as(\"+adaptTerm(un.get(\"A\").toString())+\",\"+adaptTerm(un.get(\"Fa\").toString())+\",\"+adaptTerm(un.get(\"Fm\").toString())+\",\"+adaptTerm(un.get(\"Fd\").toString())+\",\"+adaptTerm(un.get(\"Fr\").toString())+\",\"+adaptTerm(un.get(\"Timeout\").toString())+\")\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tIterator<Unifier> iDeactF = reasoner.findall(\"xdeact_f(A,Fa,Fm,Fd,Fr,Timeout)\");\n\t\t\t\twhile(iDeactF.hasNext()){\n\t\t\t\t\tUnifier un = iDeactF.next();\n\t\t\t\t\ttoAdd.add(\"ds(\"+adaptTerm(un.get(\"A\").toString())+\",\"+adaptTerm(un.get(\"Fa\").toString())+\",\"+adaptTerm(un.get(\"Fm\").toString())+\",\"+adaptTerm(un.get(\"Fd\").toString())+\",\"+adaptTerm(un.get(\"Fr\").toString()+\",\"+un.get(\"Timeout\").toString())+\")\");\n\t\t\t\t\ttoRemove.add(\"as(\"+adaptTerm(un.get(\"A\").toString())+\",\"+adaptTerm(un.get(\"Fa\").toString())+\",\"+adaptTerm(un.get(\"Fm\").toString())+\",\"+adaptTerm(un.get(\"Fd\").toString())+\",\"+adaptTerm(un.get(\"Fr\").toString())+\",\"+adaptTerm(un.get(\"Timeout\").toString())+\")\");\n\t\t\t\t\tthis.lastFulfilled.add(\"as(\"+adaptTerm(un.get(\"A\").toString())+\",\"+adaptTerm(un.get(\"Fa\").toString())+\",\"+adaptTerm(un.get(\"Fm\").toString())+\",\"+adaptTerm(un.get(\"Fd\").toString())+\",\"+adaptTerm(un.get(\"Fr\").toString())+\",\"+adaptTerm(un.get(\"Timeout\").toString())+\")\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tIterator<Unifier> iDeactR = reasoner.findall(\"xdeact_r(A,Fa,Fm,Fd,Fr,Timeout)\");\n\t\t\t\twhile(iDeactR.hasNext()){\n\t\t\t\t\tUnifier un = iDeactR.next();\n\t\t\t\t\ttoAdd.add(\"ds(\"+adaptTerm(un.get(\"A\").toString())+\",\"+adaptTerm(un.get(\"Fa\").toString())+\",\"+adaptTerm(un.get(\"Fm\").toString())+\",\"+adaptTerm(un.get(\"Fd\").toString())+\",\"+adaptTerm(un.get(\"Fr\").toString())+\",\"+adaptTerm(un.get(\"Timeout\").toString())+\")\");\n\t\t\t\t\ttoRemove.add(\"vs(\"+adaptTerm(un.get(\"A\").toString())+\",\"+adaptTerm(un.get(\"Fa\").toString())+\",\"+adaptTerm(un.get(\"Fm\").toString())+\",\"+adaptTerm(un.get(\"Fd\").toString())+\",\"+adaptTerm(un.get(\"Fr\").toString())+\",\"+adaptTerm(un.get(\"Timeout\").toString())+\")\");\n\t\t\t\t\tthis.lastFulfilled.add(\"vs(\"+adaptTerm(un.get(\"A\").toString())+\",\"+adaptTerm(un.get(\"Fa\").toString())+\",\"+adaptTerm(un.get(\"Fm\").toString())+\",\"+adaptTerm(un.get(\"Fd\").toString())+\",\"+adaptTerm(un.get(\"Fr\").toString())+\",\"+adaptTerm(un.get(\"Timeout\").toString())+\")\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tIterator<Unifier> iFailed = reasoner.findall(\"xfailed(A,Fa,Fm,Fd,Fr,Timeout)\");\n\t\t\t\twhile(iFailed.hasNext()){\n\t\t\t\t\tUnifier un = iFailed.next();\n\t\t\t\t\ttoAdd.add(\"fs(\"+adaptTerm(un.get(\"A\").toString())+\",\"+adaptTerm(un.get(\"Fa\").toString())+\",\"+adaptTerm(un.get(\"Fm\").toString())+\",\"+adaptTerm(un.get(\"Fd\").toString())+\",\"+adaptTerm(un.get(\"Fr\").toString())+\",\"+adaptTerm(un.get(\"Timeout\").toString())+\")\");\n\t\t\t\t\ttoRemove.add(\"vs(\"+adaptTerm(un.get(\"A\").toString())+\",\"+adaptTerm(un.get(\"Fa\").toString())+\",\"+adaptTerm(un.get(\"Fm\").toString())+\",\"+adaptTerm(un.get(\"Fd\").toString())+\",\"+adaptTerm(un.get(\"Fr\").toString())+\",\"+adaptTerm(un.get(\"Timeout\").toString())+\")\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//norms deactivated (fulfilled) whose maintenance condition does not hold can be removed.\n\t\t\t\t//if they are not removed, new instances of the same norm are not activated\n\t\t\t\tIterator<Unifier> iDeactivated_to_remove = reasoner.findall(\"ds(A,Fa,Fm,Fd,Fr,Timeout)&not(Fm)\");\n\t\t\t\twhile(iDeactivated_to_remove.hasNext()){\n\t\t\t\t\tUnifier un = iDeactivated_to_remove.next();\n\t\t\t\t\ttoRemove.add(\"ds(\"+adaptTerm(un.get(\"A\").toString())+\",\"+adaptTerm(un.get(\"Fa\").toString())+\",\"+adaptTerm(un.get(\"Fm\").toString())+\",\"+adaptTerm(un.get(\"Fd\").toString())+\",\"+adaptTerm(un.get(\"Fr\").toString())+\",\"+adaptTerm(un.get(\"Timeout\").toString())+\")\");\n\t\t\t\t}\n\n\t\t\t\t\n\t\t\t\tfor(String s:toAdd){\n\t\t\t\t\treasoner.assertValue(s);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tfor(String s:toRemove){\n\t\t\t\t\treasoner.retract(s);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}while(toAdd.size()>0|toRemove.size()>0);\t\t\t\t\t\t\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} \n\t}", "@Override\r\n\t\tpublic void update() {\n\t\t\t\r\n\t\t}", "@Override\r\n\t\tpublic void update() {\n\t\t\t\r\n\t\t}", "public void willbeUpdated() {\n\t\t\n\t}" ]
[ "0.64939195", "0.61305994", "0.58833265", "0.5882787", "0.5862058", "0.57387185", "0.5718026", "0.5712421", "0.569692", "0.565186", "0.55728036", "0.55574954", "0.5524154", "0.5486163", "0.5481279", "0.5465564", "0.5459424", "0.5432758", "0.542386", "0.5412199", "0.5399514", "0.53799576", "0.53790265", "0.53724253", "0.5367229", "0.53539443", "0.53449804", "0.5325068", "0.5318593", "0.53164256", "0.52910477", "0.52801394", "0.5270481", "0.5266219", "0.526133", "0.5254947", "0.5250911", "0.52442104", "0.5228799", "0.5222523", "0.5213691", "0.51990634", "0.5188751", "0.5187405", "0.5185313", "0.51811516", "0.5177642", "0.5171387", "0.5157234", "0.5152357", "0.5152328", "0.5130436", "0.5125675", "0.5124249", "0.5120476", "0.5116994", "0.5114517", "0.5104173", "0.5101372", "0.50789046", "0.5077673", "0.507335", "0.5067", "0.50644135", "0.50608927", "0.50578123", "0.50483453", "0.50440544", "0.5039106", "0.50361764", "0.5034013", "0.5033218", "0.50217086", "0.5019429", "0.5005444", "0.49927807", "0.49869227", "0.49763677", "0.49757475", "0.49728072", "0.49665827", "0.4965704", "0.4965704", "0.4958923", "0.49565986", "0.49553463", "0.49553463", "0.49553463", "0.49526635", "0.49439615", "0.49385914", "0.49341977", "0.49239248", "0.49215963", "0.491888", "0.49143636", "0.49124628", "0.49076304", "0.49076304", "0.4896943" ]
0.5886031
2
Sql find by dispense state.
public static List<PillsDispensedVo> sqlFindByDispenseState(MasterConfig masterConfig, DispenseState dispenseState ) throws Exception { Connection con = null; PreparedStatement pstmt = null; try { List<PillsDispensedVo> pillsDispensedVos = new ArrayList<PillsDispensedVo>(); con = PooledDataSource.getInstance(masterConfig).getConnection(); con.setAutoCommit(true); pstmt = con.prepareStatement(sqlFindByDispenseState); int offset = 1; pstmt.setString(offset++, dispenseState.toString()); ResultSet rs = pstmt.executeQuery(); while( rs.next() ) { pillsDispensedVos.add(new PillsDispensedVo(rs)); } rs.close(); return pillsDispensedVos; } catch (Exception e) { logger.error(e.getMessage(), e); throw e; } finally { try { if (pstmt != null) pstmt.close(); } catch (Exception e) { logger.warn(e); } try { if (con != null) con.close(); } catch (Exception exCon) { logger.warn(exCon.getMessage()); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "State findByPrimaryKey( int nIdState );", "public void searchAreaState(Connection connection, String state) throws SQLException {\n\n ResultSet rs = null;\n String sql = \"SELECT hotel_name, branch_id FROM Hotel_Address WHERE state = ?\";\n PreparedStatement pStmt = connection.prepareStatement(sql);\n pStmt.clearParameters();\n\n setState(state);\n pStmt.setString(1, getState());\n\n try {\n\n System.out.printf(\" Hotels in %s:\\n\", getState());\n System.out.println(\"+------------------------------------------------------------------------------+\");\n\n rs = pStmt.executeQuery();\n\n while (rs.next()) {\n System.out.println(rs.getString(1) + \" \" + rs.getInt(2));\n }\n }\n catch (SQLException e) { throw e; }\n finally {\n pStmt.close();\n rs.close();\n }\n }", "public UsState[] findWhereStateEquals(String state) throws UsStateDaoException;", "List<Address> findByState(String state);", "public void searchByState() {\n System.out.println(\"enter a name of state to fetch person data fro state :--\");\n String state = scanner.next();\n\n Iterator it = list.iterator();\n while (it.hasNext()) {\n Contact person = (Contact) it.next();\n if (state.equals(person.getState())) {\n List stream = list.stream().filter(n -> n.getCity().contains(state)).collect(Collectors.toList());\n System.out.println(stream);\n }\n }\n }", "@Override\r\n\tpublic snstatus queryByDocId(String sn) {\n\t\treturn (snstatus)super.getHibernateTemplate().get(snstatus.class, sn); \r\n\t}", "@Override\r\n\tpublic StateVO getStateVO(String state_idx) {\n\t\treturn stateSQLMapper.selectByIdx(state_idx);\r\n\t}", "public UsState findByPrimaryKey(UsStatePk pk) throws UsStateDaoException;", "public String searchByStateUI() {\n console.promptForPrintPrompt(\" +++++++++++++++++++++++++++++++++++\");\n console.promptForPrintPrompt(\" + PLEASE ENTER STATE TO SEARCH BY +\");\n console.promptForPrintPrompt(\" +++++++++++++++++++++++++++++++++++\");\n console.promptForString(\"\");\n String state = console.promptForString(\" STATE: \");\n return state;\n }", "@Override\n\tpublic List<String> findCarState() {\n\t\tList<String> carStateInfoList = chargeCarMapper.selectCarStateInfo();\n\t\treturn carStateInfoList;\n\t}", "@Override\r\n\tpublic int findNum(int state) {\n\t\treturn sqlSessionTemplate.selectOne(typeNameSpace + \".findNum\", state);\r\n\t}", "public ObjectId findMethodEntityState(String name, ObjectId classEntityState, Commit c) {\r\n if (classEntityState == null) {\r\n return null;\r\n }\r\n Query<CodeEntityState> cesq = datastore.find(CodeEntityState.class);\r\n\r\n if (c.getCodeEntityStates() != null && c.getCodeEntityStates().size() > 0) {\r\n cesq.and(\r\n cesq.criteria(\"_id\").in(c.getCodeEntityStates()),\r\n cesq.criteria(\"ce_type\").equal(\"method\"),\r\n cesq.criteria(\"ce_parent_id\").equal(classEntityState)\r\n );\r\n } else {\r\n cesq.and(\r\n cesq.criteria(\"commit_id\").equal(c.getId()),\r\n cesq.criteria(\"ce_type\").equal(\"method\"),\r\n cesq.criteria(\"ce_parent_id\").equal(classEntityState)\r\n );\r\n }\r\n\r\n final List<CodeEntityState> methods = cesq.asList();\r\n\r\n CodeEntityState method = null;\r\n for (CodeEntityState s : methods) {\r\n if (Common.compareMethods(s.getLongName(), name)) {\r\n method = s;\r\n }\r\n }\r\n\r\n return method == null ? null : method.getId();\r\n }", "public UsState findByPrimaryKey(int id) throws UsStateDaoException;", "public ObjectId findAttributeEntityState(String name, ObjectId classEntityState, Commit c) {\r\n if (classEntityState == null) {\r\n return null;\r\n }\r\n Query<CodeEntityState> attributeStates = datastore.find(CodeEntityState.class);\r\n\r\n if (c.getCodeEntityStates() != null && c.getCodeEntityStates().size() > 0) {\r\n attributeStates.and(\r\n attributeStates.criteria(\"_id\").in(c.getCodeEntityStates()),\r\n attributeStates.criteria(\"ce_type\").equal(\"attribute\"),\r\n attributeStates.criteria(\"ce_parent_id\").equal(classEntityState),\r\n attributeStates.criteria(\"long_name\").startsWith(name.replace(\"#\", \".\"))\r\n\r\n );\r\n } else {\r\n attributeStates.and(\r\n attributeStates.criteria(\"commit_id\").equal(c.getId()),\r\n attributeStates.criteria(\"ce_type\").equal(\"attribute\"),\r\n attributeStates.criteria(\"ce_parent_id\").equal(classEntityState),\r\n attributeStates.criteria(\"long_name\").startsWith(name.replace(\"#\", \".\"))\r\n\r\n );\r\n }\r\n final List<CodeEntityState> attributes = attributeStates.asList();\r\n\r\n if (attributes.size() == 1) {\r\n return attributes.get(0).getId();\r\n } else {\r\n logger.debug(\"Could not find ces for attribute: \" + name + \" in commit \" + c.getRevisionHash());\r\n return null;\r\n }\r\n }", "public void testFindByEstado() {\n// Iterable<Servico> servicos = repo.findByEstado(EstadoEspecificacao.INCOMPLETO, NrMecanografico.valueOf(\"1001\"));\n// servicos.forEach(s -> System.out.println(s.identity()));\n }", "State findByResource( int nIdResource, String strResourceType, int nIdWorkflow );", "public State selectByPrimaryKey(Long id_state) {\n State key = new State();\n key.setId_state(id_state);\n State record = (State) getSqlMapClientTemplate().queryForObject(\"lgk_state.abatorgenerated_selectByPrimaryKey\", key);\n return record;\n }", "@Transactional(readOnly = true)\n public List<CountryState> search(String query) {\n log.debug(\"Request to search CountryStates for query {}\", query);\n return StreamSupport\n .stream(countryStateSearchRepository.search(queryStringQuery(query)).spliterator(), false)\n .collect(Collectors.toList());\n }", "public String getShortState(String state) {\n\t\t\t\t\n\t\t\t\tStatement statement=null;\n\t\t\t\tResultSet rs=null;\n\t\t\t\tString shortState=\"\";\n\t\t\t\ttry {\n\t\t\t\t\tstatement = connection.createStatement();\n\t\t\t\t\tString sql=\"select LINK2 from config_master where NAME='EXE_STATE' and VALUE='\"+state+\"'\";\n\t\t\t\t\trs = statement.executeQuery(sql);\n\t\t\t\t\t\n\t\t\t\t\twhile (rs.next()) {\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\tshortState=rs.getString(\"LINK2\");\n\t\t\t\t\t}\n\n\t\t\t\t\t\n\t\t\t\t} catch (SQLException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\n\t\t\t\treturn shortState;\n\t}", "public List<DIS001> findByCriteria(DistrictCriteria criteria);", "@Override\r\n\tpublic List<Courseschedule> getCourseschedulesByCourseState(int courseState) {\n\t\tsession = sessionFactory.openSession();\r\n\t\tTransaction tran = session.beginTransaction();\r\n\t\tString hql = \"from Courseschedule where State=:courseState and state =:state\";\t\t\r\n\t\tList<Courseschedule> lists = session.createQuery(hql).setInteger(\"courseState\", courseState).setInteger(\"state\", 0).list();\r\n\t\ttran.commit();\r\n\t\tsession.close();\r\n\t\tlogger.debug(\"use the method named :getCourseschedulesByCourseState(int courseState) \");\r\n\r\n\t\tif (lists.size() > 0) {\r\n\t\t\treturn lists;\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "@Query(\"FROM Flight WHERE flightState=true\")\r\n\tpublic List<Flight> viewAll();", "public UsState[] findAll() throws UsStateDaoException;", "public Cursor getState( final String rowId, final String[] columns ) {\n String selection = \"rowid = ?\";\n String[] selectionArgs = new String[] {rowId};\n\n return query(selection, selectionArgs, columns);\n }", "@Repository\npublic interface TbRefundDividendDetailRepository extends JpaRepository<TbRefundDividendDetail, Long> {\n\n List<TbRefundDividendDetail> findAllByDataTimeGreaterThanEqualAndDataTimeLessThanAndState(Date startDate, Date endDate, Integer state);\n\n\n}", "@Override\n\tpublic List<Factura> findByEstado() {\n\t\treturn facturaRepository.findByEstado();\n\t}", "@Override\r\n\tpublic List<Food> getFoods() {\n\t\tString sql=\"select state from food group by state\";\r\n\t\tList<Food> s=(List<Food>) BaseDao.select(sql, Food.class);\r\n\t\treturn s;\r\n\t}", "public List<DIS001> findAll_DIS001();", "List<Seat> getSeatsWithState(int filmSessionId);", "List<AccountDetail> findAllByCountryOrState(String country, String state);", "public Estado ReadEstado(int estadoID){\r\n SQLiteDatabase sqLiteDatabase = conn.getReadableDatabase();\r\n String query = \"select * from estados WHERE estadoID=?\";\r\n Cursor c= sqLiteDatabase.rawQuery(query, new String[]{String.valueOf(estadoID)});\r\n if (c.moveToFirst()) return new Estado(estadoID,c.getString(c.getColumnIndex(\"descripcion\")));\r\n return null;\r\n\r\n\r\n }", "@SuppressWarnings(\"unused\")\n@Repository\npublic interface DistrictRepository extends JpaRepository<District,Long> {\n\t\n\tpublic List<District> findByStateId(Long id);\n\t\n\t\n\t\n\n \n}", "List<State> getListStateByFilter( StateFilter filter );", "public UsState[] findWhereIdEquals(int id) throws UsStateDaoException;", "public static void findByEquility() {\n\t\t\r\n\t\tFindIterable<Document> findIterable = collection.find(eq(\"status\", \"D\"));\r\n\t\tprint(findIterable);\r\n\t}", "@Query(\"SELECT * FROM DBTask WHERE taskState = :taskState ORDER by endTime DESC LIMIT 20\")\n List<DBTask> getDBTaskByDBTaskState(String taskState);", "List<Student> findAllByStatus(Student.Status status);", "public static SbColor\ngetEmissive(SoState state) \n{ \n SoLazyElement elem = getInstance(state);\n if(state.isCacheOpen()) elem.registerGetDependence(state, masks.EMISSIVE_MASK.getValue());\n //return curElt.ivState.emissiveColor;\n\treturn elem.coinstate.emissive;\n}", "@Override\r\n\tpublic List<City> getAllCitiesInState(String stateName, String countryName) {\n\t\tSystem.out.println(\"getAllCitiesInCountry,stateName,countryName\");\r\n\t\tSession session=HibernateUtil.getSessionFactory().getCurrentSession();\r\n\t\tsession.beginTransaction();\r\n\t\t\r\n\t\tList<City> clist=new ArrayList<City>();\r\n\t\t\r\n\t\tList<State> list=new ArrayList<State>();\r\n\t\t\r\n\t\t//List<City> clist = this.sessionFactory.getCurrentSession().createCriteria(Country.class)\r\n\t // .add(Restrictions.eq(\"name\",countryName)).list().get(0);\r\n\t\t//null pointer exception\r\n\t\tQuery query = session.createQuery(\"from City c where c.country.name=:countryName and c.district= :stateName\");\r\n\t\t\r\n\t\t//select * from city c, state p, country q where p.StateName='Andhra Pradesh' and q.name='india';\r\n\t\t\r\n\t\t//Query query = session.createQuery(\"from State p, Country q where q.name=:countryName and c.district= :p.stateName and p!=null and c.district!=null\");\r\n\t\t\r\n\t\tquery.setParameter(\"stateName\", stateName);\r\n\t\tquery.setParameter(\"countryName\", countryName);\r\n\t\tclist=query.list();\r\n\t\t\r\n\t\tsession.getTransaction().commit();\r\n\t\t//session.flush();\r\n\t\t//session.close();\r\n\t\treturn clist;\r\n\t}", "@GetMapping(\"/findAllState\")\n\tpublic ResponseEntity<List<State>> findAllState() {\n\t\tList<State> STATES = stateService.findAllState();\n\t\treturn new ResponseEntity<List<State>>(STATES, HttpStatus.OK);\n\t}", "default CompletableFuture<List<Box>> queryVisible() {\n //Fill search Map with the Values\n final Map<String,Object> searchData = new HashMap<String,Object>() {\n {\n put(BoxPersistenceDAO.QUERY_PARAM_DELFLAG, false);\n }\n\n @Override\n public Object put(String key, Object o) {\n if (o != null) return super.put(key, o);\n return null;\n }\n };\n\n return query(searchData);\n }", "public List<Brand> findActives( )\n {\n List<Brand> result;\n\n //region Instrumentation\n _logger.debug( \"Entrando a BrandDAO.findActives\");\n //endregion\n\n try\n {\n CriteriaQuery<Brand> query = _builder.createQuery( Brand.class );\n Root<Brand> root = query.from( Brand.class );\n\n query.select( root );\n query.where( _builder.equal( root.get( \"_status\" ), MasterStatus.ACTIVE ) );\n\n result = _em.createQuery( query ).getResultList();\n }\n catch ( Exception e )\n {\n throw new FindAllException( e, e.getMessage() );\n }\n\n //region Instrumentation\n _logger.debug( \"Saliendo de BrandDAO.findActives result {}\", result );\n //endregion\n\n return result;\n }", "List<Address> findByStateIn(List<String> stateList);", "public UsState[] findByDynamicWhere(String sql, Object[] sqlParams) throws UsStateDaoException;", "public void stateDetail(String state) throws StateNotFoundException, MySqlException {\n\t\t pers.stateDetail(state);\n\t}", "public synchronized static ConectorBBDD saberEstado() throws SQLException{\n\t\tif(instancia==null){\n\t\t\tinstancia=new ConectorBBDD();\n\t\t\t\n\t\t}\n\t\treturn instancia;\n\t}", "final public int query(Location m) {\r\n \r\n if (!revealed[m.x][m.y]) {\r\n if (flag[m.x][m.y]) {\r\n return GameStateModel.FLAG;\r\n } else {\r\n return GameStateModel.HIDDEN;\r\n }\r\n }\r\n\r\n return queryHandle(m);\r\n \r\n }", "public Cursor getStateMatches( final String query, final String[] columns ) {\n String selection = STATE_NAME + \" MATCH ?\";\n String[] selectionArgs = new String[] {query+\"*\"};\n\n return query( selection, selectionArgs, columns );\n }", "Computer findFirstByActiveTrueAndStatusOrderByPriorityDesc(EnumComputerStatus status);", "public Conge find( Integer idConge ) ;", "@Override\r\n\tpublic List<HouseState> queryAllHState() {\n\t\treturn adi.queryAllHState();\r\n\t}", "public UsState[] findWhereStateAbbrEquals(String stateAbbr) throws UsStateDaoException;", "public List<Embarcation> getAllDisponible(){\n\t\tSQLiteDatabase mDb = open();\n\t\tCursor cursor = mDb.rawQuery(\"SELECT * FROM \" + TABLE_NAME +\" WHERE \"+DISPONIBLE+\" = 1\", null);\n\t\t\n\t\tList<Embarcation> resultList = cursorToEmbarcationList(cursor);\n\t\t\n\t\tmDb.close();\n\t\t\n\t\treturn resultList;\n\t}", "public com.apatar.cdyne.ws.demographix.CensusInfoWithDataSet getNeighborhoodPlaceofBirthbyCitizenshipStatusInDataset(java.lang.String stateAbbr, java.lang.String placeID) throws java.rmi.RemoteException;", "public UsState[] findByDynamicSelect(String sql, Object[] sqlParams) throws UsStateDaoException;", "List<Income> findAll(Predicate predicate);", "public String getElectoralVotes(String state) {\r\n result = table.get(state);//storing the data related to a state in a array list called result\r\n String ElectoralVotes = result.get(0);//getting the first of electoral votes from the list\r\n \r\n return ElectoralVotes ;\r\n }", "public List search() {\n\t\tSessionFactory sf = new Configuration().configure()\n\t\t\t\t.buildSessionFactory();\n\t\tSession s = sf.openSession();\n\t\tQuery q = s.createQuery(\"from cat_vo\");\n\t\tList ls = q.list();\n\t\treturn ls;\n\t}", "public List<String> getCity(String state) {\n\t\tSet set=new HashSet();\n\t\tList ls=new LinkedList();\n\t\tStatement statement=null;\n\t\tResultSet rs=null;\n\t\tString engineName=\"\";\n\t\ttry {\n\t\t\tstatement = connection.createStatement();\n\t\t\trs = statement.executeQuery(\"select VALUE from config_master where NAME='EXE_CITY' and LINK1='\"+state+\"'\");\n\t\t\t\n\t\t\twhile (rs.next()) {\n\t\t\t\t\t\t\t\t\n\t\t\t\tls.add(rs.getString(\"VALUE\"));\n\t\t\t}\n\n\t\t\t\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\treturn ls;\n\t}", "@Override\n @Transactional\n public List<City> getCitiesByState(long stateId) {\n return cityRepository.findByStateId(stateId).orElseThrow(()->new NotFoundException(\"State not found\"));\n }", "@Transactional(readOnly = true) \n public List<CountryState> findAll() {\n log.debug(\"Request to get all CountryStates\");\n List<CountryState> result = countryStateRepository.findAllByDelStatusIsFalse();\n\n return result;\n }", "public Cliente[] findWhereEstadoEquals(String estado) throws ClienteDaoException;", "List<TypeTreatmentPlanStatuses> search(String query);", "public String getStateCd() {\n\t\treturn stateCd;\n\t}", "List<Horario_Disponible> findAll();", "@Override\r\n\tpublic List<ClosedOrder> getAllInfoClosed(String cname) {\n\t\tList<ClosedOrder> list=null;\r\n\t\ttry {\r\n\t\t\tString sql=\"SELECT * FROM closedorder WHERE ClosedOrder_name LIKE CONCAT('%',?,'%')\";\r\n\t\t\treturn qr.query(sql, new BeanListHandler<ClosedOrder>(ClosedOrder.class),cname);\r\n\t\t} catch (Exception e) {\r\n\t\t\t// TODO: handle exception\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn list;\r\n\t}", "public List<HrCStatitem> findAll();", "public List<String> findIndiaStates(){\n\t\treturn null;\n\t}", "public ObjectId findClassEntityState(String name, Commit c, boolean useAssignedCommits) {\r\n Query<CodeEntityState> cesq = datastore.find(CodeEntityState.class);\r\n\r\n if (useAssignedCommits && c.getCodeEntityStates() != null && c.getCodeEntityStates().size() > 0) {\r\n cesq.and(\r\n cesq.criteria(\"_id\").in(c.getCodeEntityStates()),\r\n cesq.criteria(\"ce_type\").equal(\"class\"),\r\n cesq.criteria(\"long_name\").equal(name)\r\n );\r\n } else {\r\n cesq.and(\r\n cesq.criteria(\"commit_id\").equal(c.getId()),\r\n cesq.criteria(\"ce_type\").equal(\"class\"),\r\n cesq.criteria(\"long_name\").equal(name)\r\n );\r\n }\r\n final List<CodeEntityState> ces = cesq.asList();\r\n\r\n if (ces.size() == 1) {\r\n return ces.get(0).getId();\r\n } else {\r\n logger.debug(\"Could not find ces for class: \" + name + \" in commit \" + c.getMessage());\r\n return null;\r\n }\r\n }", "CommunityInform selectByPrimaryKey(String id);", "@Override\n\tpublic List<State> getState(String id) {\n\t\t\n\t\tSession currentSession = sessionFactory.getCurrentSession();\n\t\t\n\t\t// create a query ... sort by last name\n\t\tQuery<State> theQuery = \n\t\t\t\tcurrentSession.createQuery(\"from State order where countryid=:c\",\n\t\t\t\t\t\t\t\t\t\t\tState.class);\n\t\ttheQuery.setParameter(\"c\", id);\n\t\t// execute query and get result list\n\t\tList<State> customers = theQuery.getResultList();\n\t\t\t\t\n\t\t// return the results\t\t\n\t\treturn customers;\n\t\t\n\t\t\n\t}", "List<Card> search(String searchString) throws PersistenceCoreException;", "public List<District> findAllDistrict();", "public org.apache.axis2.databinding.types.soapencoding.String getDirectOrderStateQueryReturn(){\n return localDirectOrderStateQueryReturn;\n }", "public Project[] findWhereBillStateEquals(String billState) throws ProjectDaoException {\n\t\treturn findByDynamicSelect(SQL_SELECT + \" WHERE BILL_STATE = ? ORDER BY BILL_STATE\", new Object[] { billState });\n\t}", "AbsractCategory searchByID(int identificaitonNumber) throws PersistenceException;", "State getState(Long stateId);", "private String buildReflexiveStateQuery(final String projectId,\r\n\t\t\tfinal Date date, final State state) {\r\n\r\n\t\treturn String.format(REFLEXIVE_STATE_QUERY, //\r\n\t\t\t\tstate.toString(), // state\r\n\t\t\t\tformatDate(date), // date\r\n\t\t\t\tprojectId, // project\r\n\t\t\t\tformatDate(date)); // date (again)\r\n\t}", "@Override\r\n\tpublic List<Food> queryFoods() {\n\t\tString sql=\"select * from food\";\r\n\t\tList<Food> list=(List<Food>) BaseDao.select(sql, Food.class);\r\n\t\treturn list;\r\n\t}", "List<ShipmentInfoPODDTO> search(String query);", "@Override\n\tpublic List<Orders> queryOrderStatus(int status) {\n\t\tQueryRunner qr= new QueryRunner(dataSource);\n\t\tString sql = \"select * from orders where status=?\";\n\t\ttry {\n\t\t\treturn qr.query(sql, new BeanListHandler<Orders>(Orders.class), status);\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\tthrow new RuntimeException(\"根据状态查询订单出错\");\n\t\t}\n\t}", "public ResultSet Retcomp() throws SQLException {\n\trs=DbConnect.getStatement().executeQuery(\"select * from company c,login l where l.login_id=c.login_id and l.status='approved'\");\r\n\treturn rs;\r\n}", "Computer findFirstByActiveTrueAndStatusOrderByPriorityAsc(EnumComputerStatus status);", "String getState();", "String getState();", "String getState();", "public TIndiaState findTIndiaStateById(final Integer tIndiaStateId) {\n\t\tLOGGER.info(\"find TIndiaState instance with stateId: \" + tIndiaStateId);\n//\t\treturn gisDAO.get(clazz, tIndiaStateId);\n\t\treturn null;\n\t}", "private GlobalState search(Map<String,String> stateMapping) {\n GlobalState desired = new GlobalState(nodes,binding);\n desired.addMapping(stateMapping);\n for(GlobalState g : globalStates) {\n if(g.equals(desired))\n return g;\n }\n return null;\n }", "@Query(\"select r from Record r where r.finalMode = true\")\r\n\tpublic Collection<Record> findRecordsFinalModeTrue();", "DisFans selectByPrimaryKey(String id);", "List<Account> findAllByCountryOrState(String country, String state);", "@Override\n\tpublic ProductState getProductStateByName(String name, String status) {\n\t\tlogger.info(\"productStateServiceMong get productState by name : \" + name);\n\t\treturn productStateDAO.getProductStateByName(name, status);\n\t}", "@Repository\npublic interface StateRepository extends JpaRepository<State, Long> {\n\n Optional<State> findByName(String name);\n\n Optional<State> findByNameContaining(String name);\n\n}", "@Override\n public List<FecetProrrogaOrden> findWhereIdEstatusIdOrdenEquals(final BigDecimal estado, BigDecimal idOrden) {\n StringBuilder query = new StringBuilder();\n query.append(SQL_SELECT).append(SQL_ALL_COLUMNS).append(SQL_FROM).append(getTableName());\n query.append(\" WHERE ID_ORDEN = ? AND ID_ESTATUS = ? \");\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenMapper(), idOrden, estado);\n }", "List<DeliveryBoy> findAllByActive(Boolean activeRecords);", "@Query(value = \"SELECT * FROM aluno a WHERE a.situacao = true ORDER BY ID\", nativeQuery = true)\n List<Aluno> findAlunosAprovados();", "public static Cursor getBusINFOCursor() {\r\n SQLiteDatabase db = SearchHelper.getReadableDatabase();\r\n if(Bus.isLanguare()==true) {\r\n Cursor cursor = db.rawQuery(Prefix_Data_SQL.QUERY_BUS_BASIC_INFO_TC_SQL, null);\r\n return cursor;\r\n }else{\r\n Cursor cursor = db.rawQuery(Prefix_Data_SQL.QUERY_BUS_BASIC_INFO_EN_SQL, null);\r\n return cursor;\r\n }\r\n }", "public ListExpensesDAOSQL() {\n\t\t\tthis.queryHandler = new QueryHandler(this.url,this.login,this.passwd);\n\t\t}", "@Override\n\tpublic List<Equipment> getEquipmentByKey(String state) {\n\t\treturn dao.getEquipmentByKey(state);\n\t}", "public int getEntitystatus();" ]
[ "0.61747587", "0.5715274", "0.57003087", "0.54880345", "0.5487578", "0.5480604", "0.5424714", "0.54196227", "0.53957576", "0.52937055", "0.5257325", "0.51765877", "0.5174929", "0.51662403", "0.5118836", "0.5116647", "0.51146924", "0.5111445", "0.51039565", "0.507431", "0.5065936", "0.50586355", "0.50513923", "0.5044104", "0.5035153", "0.50239265", "0.50221604", "0.50107694", "0.4991132", "0.49704742", "0.49546203", "0.49472034", "0.4936327", "0.49252707", "0.4920736", "0.49109036", "0.4900691", "0.4898297", "0.48920327", "0.48840958", "0.48757598", "0.48514462", "0.48490524", "0.48458743", "0.4831795", "0.48117435", "0.48095557", "0.48082823", "0.48012793", "0.47968316", "0.47965956", "0.47837365", "0.47828737", "0.47785553", "0.47708726", "0.4736261", "0.47357318", "0.4731779", "0.47269765", "0.47240385", "0.47214308", "0.47181505", "0.471651", "0.47151238", "0.4711822", "0.47027877", "0.46988308", "0.46970624", "0.46953303", "0.4694671", "0.46932083", "0.4680402", "0.46782094", "0.4674543", "0.46686557", "0.4667782", "0.46667337", "0.46631852", "0.46546063", "0.4647802", "0.46461454", "0.46388704", "0.46212155", "0.46191856", "0.46191856", "0.46191856", "0.4618888", "0.46105695", "0.4594154", "0.45904216", "0.4582506", "0.45746887", "0.45699462", "0.45673993", "0.45642185", "0.45566314", "0.45529714", "0.45510435", "0.45509827", "0.45501614" ]
0.6288435
0
Find by pills dispensed uuid.
public static PillsDispensedVo findByPillsDispensedUuid(MasterConfig masterConfig, String pillsDispensedUuid ) throws Exception { Connection con = null; PreparedStatement pstmt = null; try { con = PooledDataSource.getInstance(masterConfig).getConnection(); con.setAutoCommit(true); pstmt = con.prepareStatement(sqlFindByPillsDispensedUuid); int offset = 1; pstmt.setString(offset++, pillsDispensedUuid); ResultSet rs = pstmt.executeQuery(); if( !rs.next() ) throw new Exception("Row not found for pillsDispensedUuid=" + pillsDispensedUuid); PillsDispensedVo pillsDispensedVo = new PillsDispensedVo(rs); rs.close(); return pillsDispensedVo; } catch (Exception e) { logger.error(e.getMessage(), e); throw e; } finally { try { if (pstmt != null) pstmt.close(); } catch (Exception e) { logger.warn(e); } try { if (con != null) con.close(); } catch (Exception exCon) { logger.warn(exCon.getMessage()); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int find(int p) {\r\n return id[p];\r\n }", "User getUserByUUID(String uuid);", "private String searchForUser() {\n String userId = \"\";\n String response = given().\n get(\"/users\").then().extract().asString();\n List usernameId = from(response).getList(\"findAll { it.username.equals(\\\"Samantha\\\") }.id\");\n if (!usernameId.isEmpty()) {\n userId = usernameId.get(0).toString();\n }\n return userId;\n }", "Miss_control_log selectByPrimaryKey(String loginuuid);", "@Override\n public int find(int p) {\n while (p != id[p]) { p = id[p]; }\n return p;\n }", "@Query(\"select ins.id from InstancesInfo ins where ins.dataMd5Hash = :dataMd5Hash\")\n Long findIdByDataMd5Hash(@Param(\"dataMd5Hash\") String dataMd5Hash);", "Card findByCardData(String number, long userId) throws PersistenceCoreException;", "public Part getPartPorUID(String text) throws RemoteException;", "private static Parts findPart(String part_id, Data dat) {\r\n\t\tfor (Parts part : dat.getParts_list()) {\r\n\t\t\tif (part.getId().equalsIgnoreCase(part_id)) {\r\n\t\t\t\treturn part;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "public int find(int p) {\n\t\tvalidate(p);\n\t\twhile (p != id[p])\n\t\t\tp = id[p];\n\t\treturn p;\n\t}", "List<Card> search(String searchString, long userId) throws PersistenceCoreException;", "public java.util.List<Todo> findByUuid(String uuid, int start, int end);", "public void getPassportOfPerson(String s) {\n Optional<Person> per = personRepo.findById(s);\n if(per.isEmpty())\n System.out.println(\"person is empty at 456\");\n else {\n //print passport id of person\n System.out.println(per.get().getPassport().getPassId());\n System.out.println(per.get().getPassport().getPassNum());\n }\n\n }", "TerminalInfo selectByPrimaryKey(String terminalId);", "@Override\n public UserDeviceEntity find(BigInteger customerId, String uuid) throws Exception {\n return null;\n }", "@Override\n\tpublic PI findById(Long id) throws NotFoundException {\n\t\treturn null;\n\t}", "BPlayer getPlayer(UUID uuid);", "public MemberPo findMember(final String id);", "public Singer find(int singerId);", "Card selectByPrimaryKey(String card);", "String getRepositoryUUID();", "BeanPedido getPedido(UUID idPedido);", "String getUuid();", "PCDevice getPC(UUID uID);", "Player getPlayer(UUID playerId);", "Device selectByPrimaryKey(String deviceNo);", "@Override\n\tpublic Property selectById(String uuid) {\n\t\treturn pr.findByUuid(uuid);\n\t}", "private Mapping getMappingByID(List<BaseMapping> mappings, String uuid) {\n Mapping objectMapping = null;\n if (mappings != null) {\n for (ListIterator<BaseMapping> iter = mappings.listIterator(); iter.hasNext();) {\n Mapping element = (Mapping)iter.next();\n if (element.getId().equals(uuid)) {\n objectMapping = element;\n break;\n }\n }\n }\n return objectMapping;\n }", "private TestDevice searchTestDevice(final String deviceSerialNumber) {\n for (TestDevice td : mDevices) {\n if (td.getSerialNumber().equals(deviceSerialNumber)) {\n return td;\n }\n }\n return null;\n }", "ScPartyMember selectByPrimaryKey(Integer id);", "@PreAuthorize(\"hasRole('ROLE_USER')\")\r\n\tpublic UserAccount findUserAccountByPrimaryKey(String uuid);", "BaseReturn selectByPrimaryKey(String guid);", "long getLockOwnersID(String uuid) throws DatabaseException;", "java.lang.String getUUID();", "public void findbyid() throws Exception {\n try {\n IPi_per_intDAO pi_per_intDAO = getPi_per_intDAO();\n List<Pi_per_intT> listTemp = pi_per_intDAO.getByPK(pi_per_intT);\n\n pi_per_intT = listTemp.size() > 0 ? listTemp.get(0) : new Pi_per_intT();\n\n } catch (Exception e) {\n easyLogger.error(e.getMessage(), e);\n setMsg(ERROR, \"Falha ao realizar consulta!\");\n } finally {\n close();\n }\n }", "@GetMapping(\"/locate\")\n public String locate(String attribute)\n {\n String returnVal = \"uid(s): \";\n for()\n {\n if()\n {\n if(returnVal.length() == 0)\n {\n returnVal = \"uid(s): \";\n }\n returnVal += uid + \", \";\n }\n }\n if(returnVal.length() == 0)\n {\n returnVal = \"None found\\n\";\n }\n return returnVal;\n }", "Online selectByPrimaryKey(String hash);", "SyncRecord findObject(String name, int type) throws NotFoundException\r\n\t{\r\n\t\tfor (int i=0; i<syncTable.size(); i++)\r\n\t\t{\r\n\t\t\tSyncRecord myrec = (SyncRecord)syncTable.elementAt(i);\r\n\t\t\tif ((myrec.name).equals(name) && (myrec.type)==type)\r\n\t\t\t\treturn myrec;\r\n\t\t}\r\n\t\tthrow new NotFoundException();\r\n\t}", "@Override\r\n\tpublic Product findProductByPid(String pid) throws Exception {\n\t\treturn null;\r\n\t}", "public void findbyid() throws Exception {\n try {\n Ume_unidade_medidaDAO ume_unidade_medidaDAO = getUme_unidade_medidaDAO();\n List<Ume_unidade_medidaT> listTemp = ume_unidade_medidaDAO.getByPK( ume_unidade_medidaT);\t \n\n ume_unidade_medidaT= listTemp.size()>0?listTemp.get(0):new Ume_unidade_medidaT();\n \n } catch (Exception e) {\n e.printStackTrace();\n setMsg(\"Falha ao realizar consulta!\");\t\n } finally {\n\tclose();\n }\n }", "public synchronized MonitoringDevice getBySerial(String serial)\n\t{\n\t\tlogger.debug(\"search by serial:\" + serial);\n\t\tInteger id = this.indexBySerial.get(serial);\n\t\tif (id != null)\n\t\t\treturn (MonitoringDevice) super.getObject(id);\n\t\telse\n\t\t\treturn null;\n\t\t\n\t}", "public List<User> findUserEmployeeIdByPartion(String employeeIDpart) {\n\t\tTypedQuery<User> query = em.createQuery(\"select u from User u where u.employeeId like :emplyeID\", User.class);\n\t\tquery.setParameter(\"emplyeID\", \"%\" + employeeIDpart + \"%\");\n\t\treturn query.setFirstResult(0).setMaxResults(10).getResultList();\n\t}", "SpCharInSeq findById(Integer spcharinseqId);", "public Optional<Memberr> findByUuuid(String uuid) {\n\t\treturn memberrepo.findByUuid(uuid);\n\t}", "private RoomCard findRoomCard(String search) {\n for (RoomCard card : this.getRoomCards()) {\n if (card.getName().toLowerCase().equals(search.toLowerCase())) {\n return card;\n }\n }\n return null;\n }", "public java.util.List<Todo> findByUuid_C(String uuid, long companyId);", "Item findByNo(Long No);", "@SneakyThrows\n @Override\n public DeveloperSkill findByID(Long id) {\n return null; //parse.get(Math.toIntExact(id));\n }", "public abstract SmartObject findIndividualName(String individualName);", "@Override\n public SideDishEntity find(Long id) throws ObjectNotFoundUserException {\n return null;\n }", "public SgfensPedidoProducto[] findWhereIdentificacionEquals(String identificacion) throws SgfensPedidoProductoDaoException;", "@Repository\npublic interface MpidRepository extends JpaRepository<Mpid, Integer> {\n \n Mpid findByHandle(String handle);\n\n List<Mpid> findByDealCode(String dealCode);\n\n}", "FindResponse find(@NonNull String title, @NonNull String space);", "@Override\r\n\tpublic FyTestRecord findByUuid(String uuid) {\n\t\treturn testRecordDao.findByUuid(uuid);\r\n\t}", "@Override\r\n\tpublic PaymentPO findByID(String id) {\n\t\treturn null;\r\n\t}", "E find(final ID identifier) throws ResourceNotFoundException;", "@Override\n\tpublic String nameFind(String user_id) {\n\t\treturn mapper.nameFind(user_id);\n\t}", "@Override\n public T findById(Long id) {\n return manager.find(elementClass, id);\n }", "public ResultSet selectAccount(UUID uuid)\n {\n PreparedStatement preparedStatement = null;\n try\n {\n preparedStatement = connection.prepareStatement(\n String.format(\"SELECT * FROM %s.accounts WHERE uuid = ?;\",\n simpleEconomy.getConfig().getString(\"db.database\")));\n preparedStatement.setString(1, uuid.toString());\n return preparedStatement.executeQuery();\n }\n catch (SQLException e)\n {\n e.printStackTrace();\n }\n return null;\n }", "MemberTag selectByPrimaryKey(Long id);", "@Override\n\tpublic vip selectByphone(String phonum) {\n\t\treturn this.vd.selectByphone(phonum);\n\t}", "protected Pokemon getPokemonByIdOrName(String idOrName) {\n Optional<Pokemon> pokemon;\n if (idOrName.matches(\"[0-9]+\")) {\n pokemon = pokemonDao.getPokemonById(Integer.valueOf(idOrName));\n } else {\n pokemon = pokemonDao.getPokemonByName(idOrName.toLowerCase());\n }\n if (!pokemon.isPresent()) {\n throw new PokemonNotFoundException(idOrName);\n }\n return pokemon.get();\n }", "@Override\n\tpublic String findId(String name) throws Exception {\n\t\treturn null;\n\t}", "public UniquelyIdentifiable getObjectFromUID(String s) throws UIDException {\n return null;\r\n }", "@And(\"^I searched for ([^\\\"]*) device$\") //Check do we need this\r\n\tpublic void i_searched_for_a_device(String container3) throws Throwable {\r\n\t\tenduser.fill_fields_from(\"OVActivationPage\",\"US43123-TC24975\",container3);\r\n\t\tenduser.get_container_from_xml(\"OVActivationPage\",\"US43123-TC24975\",container3);\r\n\t\tSystem.out.println(enduser.get_container_from_xml(\"OVActivationPage\",\"US43123-TC24975\",container3));\r\n\t\t//enduser.click_searchBtn();\r\n\t \r\n\t}", "List<ProductPurchaseItem> getAllSupplierProductPurchaseItems(long suppId, String searchStr);", "Optional<Computer> findOne(long idToSelect);", "Optional<T> find(long id);", "static void searchProductDB() {\n\n int productID = Validate.readInt(ASK_PRODUCTID); // store product ID of user entry\n\n\n productDB.findProduct(productID); // use user entry as parameter for the findProduct method and if found will print details of product\n\n }", "@Override\r\n\tpublic void find(Integer id) {\n\r\n\t}", "public PurchaseVO PFindByID(String id) {\n\t\treturn purchase.find(id);\r\n\t}", "public String searchForID(String searchTerm) throws Exception {\n for (User oneUser : userList) {\n if (oneUser.hasEmail(searchTerm)) {\n return searchTerm;\n }\n }\n\n // did not find an exact match, then search for partial strings\n for (User oneUser : userList) {\n if (oneUser.hasEmailMatchingSearchTerm(searchTerm)) {\n return oneUser.getEmailMatchingSearchTerm(searchTerm);\n }\n }\n\n return null;\n }", "EtpBase selectByPrimaryKey(String id);", "Optional<Resource> find(Session session, IRI identifier);", "@Override //所有id\n\tpublic PoInfo querryById(String poinid) throws Exception {\n\t\treturn (PoInfo) dao.findForObject(\"PoInfoMapper.querryById\", poinid);\n\t}", "public co\n\t\t.com\n\t\t.telefonica\n\t\t.atiempo\n\t\t.ejb\n\t\t.eb\n\t\t.Bitacora_peticionLocal findByPrimaryKey(\n\t\tco.com.telefonica.atiempo.ejb.eb.Bitacora_peticionKey primaryKey)\n\t\tthrows javax.ejb.FinderException;", "@SuppressWarnings(\"all\")\n private Record findTarget() {\n final ConcurrentMap<String, Record> address = ORIGIN.getRegistryData();\n final String target = this.getValue(\"to\");\n final String name = this.getValue(\"name\");\n // 1. Find service names\n final List<Record> records = this.findRecords();\n final Record record = records.stream().filter(item ->\n target.equals(item.getMetadata().getString(\"path\")))\n .findAny().orElse(null);\n // Service Name\n Fn.outWeb(null == record, this.logger,\n _501RpcImplementException.class, this.getClass(),\n name, target, this.event);\n // Address Wrong\n Fn.outWeb(null == record.getMetadata() ||\n !target.equals(record.getMetadata().getString(\"path\")), this.logger,\n _501RpcAddressWrongException.class, this.getClass(),\n target, name);\n this.logger.info(Info.RECORD_FOUND, record.toJson());\n return record;\n }", "@Query(\"SELECT entity FROM VwBancos entity WHERE entity.clientes.id = :id AND (:id is null OR entity.id = :id) AND (:nome is null OR entity.nome like concat('%',:nome,'%'))\")\n public Page<VwBancos> findVwBancosSpecificSearch(@Param(value=\"id\") java.lang.Double id, @Param(value=\"nome\") java.lang.String nome, Pageable pageable);", "public String getNameByPID(int pid) {\n String query = \"SELECT \"+DBHelper.PRODUCTS_PNAME+\" FROM \"+DBHelper.TABLE_PRODUCTS+\" WHERE \"+DBHelper.PRODUCTS_ID+\" =?\";\n String[] arg = new String[]{String.valueOf(pid)};\n\n SQLiteDatabase db = DBHelper.getWritableDatabase();\n Cursor cursor = db.rawQuery(query, arg);\n\n if(cursor.moveToNext()) {\n String pname = cursor.getString(cursor.getColumnIndex(DBHelper.PRODUCTS_PNAME));\n db.close();\n return pname;\n }\n else{\n return null;\n }\n }", "@Override\r\n\tpublic Personne find(int id) {\n\t\treturn null;\r\n\t}", "String getDescription(String uuid) throws DatabaseException;", "@Query(\"MATCH (sp:ServiceProvider) WHERE sp.email={email} RETURN sp\")\n ServiceProvider findByEmail(@Param(\"email\") String email);", "private SortedMap searchByPID(Person person, IcsTrace trace) {\n\t\tProfile.begin(\"PersonIdServiceBean.searchByPID\");\n\n\t\tTreeMap ret = new TreeMap();\n\t\tDatabaseServices dbServices = DatabaseServicesFactory.getInstance();\n\n\t\ttry {\n\t\t\tList matches = null;\n\n\t\t\tIterator ids = person.getPersonIdentifiers().iterator();\n\n\t\t\tQueryParamList params = new QueryParamList(QueryParamList.OR_LIST);\n\t\t\twhile (ids.hasNext()) {\n\t\t\t\tQueryParamList inner = new QueryParamList(\n\t\t\t\t\t\tQueryParamList.AND_LIST);\n\t\t\t\tPersonIdentifier pid = (PersonIdentifier) ids.next();\n\t\t\t\tinner.add(AttributeType.PERSON_IDENTIFIER, pid.getId());\n\t\t\t\tinner.add(AttributeType.AA_NAMESPACE_ID, pid\n\t\t\t\t\t\t.getAssigningAuthority().getNameSpaceID());\n\t\t\t\tinner.add(AttributeType.AF_NAMESPACE_ID, pid\n\t\t\t\t\t\t.getAssigningFacility().getNameSpaceID());\n\t\t\t\tparams.add(inner);\n\t\t\t}\n\t\t\tmatches = dbServices.query(params);\n\n\t\t\tif (trace.isEnabled()) {\n\t\t\t\ttrace.add(\"Persons that match PIDS:\");\n\t\t\t\tIterator i = matches.iterator();\n\t\t\t\twhile (i.hasNext())\n\t\t\t\t\ttrace.add((Person) i.next());\n\t\t\t}\n\n\t\t\tIterator i = matches.iterator();\n\t\t\twhile (i.hasNext()) {\n\t\t\t\tPerson match = (Person) i.next();\n\t\t\t\tret.put(new Double(1.0), match);\n\t\t\t}\n\t\t} catch (DatabaseException dbEx) {\n\t\t\tlog.error(dbEx, dbEx);\n\t\t} finally {\n\t\t\tProfile.end(\"PersonIdServiceBean.searchByPID\");\n\t\t}\n\n\t\treturn ret;\n\t}", "mailIdentify selectByPrimaryKey(Integer id);", "SoccerPlayer find(Integer number);", "public ItemEntity getItemByUUID(String uuid) {\n try {\n return entityManager.createNamedQuery(\"itemByUUID\", ItemEntity.class).setParameter(\"uuid\", uuid).getSingleResult();\n } catch (NoResultException nre) {\n return null;\n }\n }", "List<S> memberOf(String memberUuid);", "ShoppingItem getShoppingItemByGuid(String itemGuid);", "IMemberDto getMember(/*old :String searchMember*/Integer id);", "@Override\r\n public final Product findProduct(final String prodId) throws MandatoryEntryException,NotFoundInDatabaseException {\n ExceptionTest.stringMandatoryEntryTest(prodId);\r\n// if (prodId == null || prodId.length() == 0) {\r\n// System.out.println(\"Sorry, FakeDatabase.findProduct method has \"\r\n// + \"illegal argument\");\r\n// return null; // end method prematurely after log to console\r\n// }\r\n\r\n Product product = null;\r\n for (Product p : products) {\r\n if (prodId.equals(p.getProdId())) {\r\n product = p;\r\n break;\r\n }\r\n }\r\n// ExceptionTest.objectMandatoryEntryTest(product, ExceptionSource.DATABASE);\r\n ExceptionTest.objectNotFoundInDatabaseTest(product);\r\n// if (product==null){\r\n// System.out.println(\"Product not found in the database.\");\r\n// \r\n// }\r\n return product;\r\n }", "public String getUniqueIdentifier(String logonname) {\n\t\tString retUid = null;\n\t\ttry {\n\t\t\tSearchRequest searchReq = new SearchRequest();\n\t\t\tsearchReq.setSearchBase(SAPUSER);\n\t\t\t// specify the attributes to return\n\t\t\tsearchReq.addAttribute(\"id\");\n\t\t\t// specify the filter\n\t\t\tFilterTerm ft = new FilterTerm();\n\t\t\tft.setOperation(FilterTerm.OP_EQUAL);\n\t\t\tft.setName(LOGONNAME);\n\t\t\tft.setValue(logonname);\n\t\t\tsearchReq.addFilterTerm(ft);\n\t\t\tLOG.error(\"Perf: Search request to get UniqueIdentifier started for user {0} \", logonname);\t\t\n\t\t\tSpmlResponse spmlResponse = connection.getResponse(searchReq\n\t\t\t\t\t.toXml());\n\t\t\tLOG.error(\"Perf: Search request to get UniqueIdentifier completed for user {0} \", logonname);\t\t\n\t\t\tSearchResponse resp = (SearchResponse) spmlResponse;\n\t\t\tList results = resp.getResults();\n\t\t\tif (results != null) {\n\t\t\t\tSearchResult sr = (SearchResult) results.get(0);\n\t\t\t\tretUid = sr.getIdentifierString();\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tLOG.error(e, configuration\n\t\t\t\t\t.getMessage(\"SAPUME_ERR_GET_UNIQUEIDENTIFIER\")\n\t\t\t\t\t+ \" \" + e.getMessage());\n\t\t\tthrow new ConnectorException(configuration\n\t\t\t\t\t.getMessage(\"SAPUME_ERR_GET_UNIQUEIDENTIFIER\")\n\t\t\t\t\t+ \" \" + e.getMessage(), e);\n\t\t}\n\t\treturn retUid;\n\t}", "public Device findById(Long id) throws Exception;", "Owner selectByPrimaryKey(String id);", "long getPokemonId();", "TpDevicePlay selectByPrimaryKey(Integer deviceId);", "PaasCustomAutomationRecord selectByPrimaryKey(Integer id);", "public Identification getIdentificationByUID(String identificationUID) throws InvalidFormatException;", "PasswordCard selectByPrimaryKey(Integer id);", "@Query(\"SELECT entity.tiposBancos FROM VwBancos entity WHERE entity.clientes.id = :id AND (:cdTipoBanco is null OR entity.tiposBancos.cdTipoBanco = :cdTipoBanco) AND (:dsTipoBanco is null OR entity.tiposBancos.dsTipoBanco like concat('%',:dsTipoBanco,'%')) AND (:dsIconeBanco is null OR entity.tiposBancos.dsIconeBanco like concat('%',:dsIconeBanco,'%'))\")\n public Page<TiposBancos> listTiposBancosSpecificSearch(@Param(value=\"id\") java.lang.Double id, @Param(value=\"dsTipoBanco\") java.lang.String dsTipoBanco, @Param(value=\"dsIconeBanco\") java.lang.String dsIconeBanco, Pageable pageable);", "protected String createFindBy(String nume) {\n\t\tStringBuilder sb = new StringBuilder();\n\t\tsb.append(\"SELECT \");\n\t\tsb.append(\" * \");\n\t\tsb.append(\" FROM \");\n\t\tsb.append(type.getSimpleName());\n\t\tsb.append(\" WHERE \");\n\t\treturn sb.toString();\n\t}" ]
[ "0.5366394", "0.5203682", "0.5171338", "0.51535577", "0.5106757", "0.50400287", "0.5029949", "0.50189507", "0.49895993", "0.49436402", "0.4922524", "0.49054387", "0.48996004", "0.4871271", "0.48569208", "0.4851756", "0.48503697", "0.48485678", "0.48456058", "0.4845298", "0.484121", "0.48383492", "0.48335525", "0.48165035", "0.4809497", "0.48048747", "0.4798544", "0.47911516", "0.4790552", "0.47896698", "0.47894615", "0.47667634", "0.4746271", "0.47453168", "0.47443867", "0.4734126", "0.47295117", "0.47187093", "0.4718093", "0.47167218", "0.47163048", "0.47157177", "0.47087905", "0.47070393", "0.4663932", "0.46631885", "0.46582964", "0.46569753", "0.46561268", "0.46467355", "0.46366155", "0.46223223", "0.4619311", "0.4617938", "0.46170002", "0.46122345", "0.46096453", "0.46031365", "0.45994422", "0.4598773", "0.45983946", "0.45972973", "0.45959297", "0.45912153", "0.45906508", "0.45891368", "0.4583424", "0.45825535", "0.4576264", "0.45757434", "0.45738918", "0.4573878", "0.45636216", "0.45618924", "0.4561468", "0.45571035", "0.4557097", "0.45560452", "0.45550504", "0.45531517", "0.45520383", "0.45511296", "0.45482183", "0.4547154", "0.45357937", "0.45249534", "0.45201048", "0.45197475", "0.4519177", "0.45157743", "0.45152342", "0.45092946", "0.45070302", "0.45019037", "0.44929758", "0.44876117", "0.4486816", "0.4486621", "0.44865415", "0.44848135" ]
0.5294099
1
Find image bytes by pills dispensed uuid.
public static byte[] findImageBytesByPillsDispensedUuid(MasterConfig masterConfig, String pillsDispensedUuid ) throws Exception { Connection con = null; PreparedStatement pstmt = null; try { con = PooledDataSource.getInstance(masterConfig).getConnection(); con.setAutoCommit(true); pstmt = con.prepareStatement(sqlFindImageBytesByPillsDispensedUuid); int offset = 1; pstmt.setString(offset++, pillsDispensedUuid); ResultSet rs = pstmt.executeQuery(); if( !rs.next() ) throw new Exception("Row not found for pillsDispensedUuid=" + pillsDispensedUuid); InputStream is = rs.getBinaryStream("image_png"); ByteArrayOutputStream baos = new ByteArrayOutputStream(); int buffByte; while( ( buffByte = is.read()) != -1 ) baos.write(buffByte); byte[] imageBytes = baos.toByteArray(); baos.close(); rs.close(); return imageBytes; } catch (Exception e) { logger.error(e.getMessage(), e); throw e; } finally { try { if (pstmt != null) pstmt.close(); } catch (Exception e) { logger.warn(e); } try { if (con != null) con.close(); } catch (Exception exCon) { logger.warn(exCon.getMessage()); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "long extractI2b2QueryId(byte[] bytes);", "byte[] getRecipeImage(CharSequence query);", "private static final byte[] xfuzzyload_image() {\n\t\tbyte data[] = { 71, 73, 70, 56, 57, 97, 16, 0, 16, 0, -62, 0, 0, -82,\n\t\t\t\t69, 12, -128, -128, -128, -1, -1, -1, -64, -64, -64, -1, -1, 0,\n\t\t\t\t0, 0, 0, -1, -1, -1, -1, -1, -1, 33, -2, 14, 77, 97, 100, 101,\n\t\t\t\t32, 119, 105, 116, 104, 32, 71, 73, 77, 80, 0, 33, -7, 4, 1,\n\t\t\t\t10, 0, 6, 0, 44, 0, 0, 0, 0, 16, 0, 16, 0, 0, 3, 75, 8, -86,\n\t\t\t\t-42, 11, 45, -82, -24, 32, -83, -42, -80, 43, -39, -26, -35,\n\t\t\t\t22, -116, 1, -9, 24, -127, -96, 10, 101, 23, 44, 2, 49, -56,\n\t\t\t\t108, 21, 15, -53, -84, -105, 74, -86, -25, 50, -62, -117, 68,\n\t\t\t\t44, -54, 74, -87, -107, 82, 21, 40, 8, 81, -73, -96, 78, 86,\n\t\t\t\t24, 53, 82, -46, 108, -77, -27, -53, 78, -85, -111, -18, 116,\n\t\t\t\t87, 8, 23, -49, -123, 4, 0, 59 };\n\t\treturn data;\n\t}", "private String processBytes(String bytes){\n Pattern p = Pattern.compile(\"170-180\");\r\n Matcher m = p.matcher(bytes);\r\n //find two bounds\r\n int posi[] = new int[2];\r\n for(int i=0;i<2;i++){\r\n if(m.find()) posi[i] = m.start();\r\n }\r\n //Cut string\r\n return bytes.substring(posi[0], posi[1]);\r\n }", "private static final byte[] xfuzzy_image() {\n\t\tbyte data[] = { 71, 73, 70, 56, 57, 97, 16, 0, 16, 0, -95, 0, 0, -1,\n\t\t\t\t-1, -1, -82, 69, 12, -1, -1, -1, -1, -1, -1, 33, -2, 14, 77,\n\t\t\t\t97, 100, 101, 32, 119, 105, 116, 104, 32, 71, 73, 77, 80, 0,\n\t\t\t\t33, -7, 4, 1, 10, 0, 0, 0, 44, 0, 0, 0, 0, 16, 0, 16, 0, 0, 2,\n\t\t\t\t36, -124, -113, -87, -101, -31, -33, 32, 120, 97, 57, 68, -93,\n\t\t\t\t-54, -26, 90, -24, 49, 84, -59, 116, -100, 88, -99, -102, 25,\n\t\t\t\t30, -19, 36, -103, -97, -89, -62, 117, -119, 51, 5, 0, 59 };\n\t\treturn data;\n\t}", "byte[] retrieve(UUID uuid) throws FailedToRetrieveStorageData, DataNotFoundInStorage;", "ImageSearchResponse findAllBySimilarImage(byte[] imageData, ImageRegion objectRegion);", "@Override\r\n\tpublic String searchimage(int cbid) throws Exception {\n\t\treturn dao.searchimage(cbid);\r\n\t}", "private static byte[] m24635a(Context context, String str) {\n String f = C6014b.m23956f();\n String string = Secure.getString(context.getContentResolver(), \"android_id\");\n String substring = str.substring(0, Math.min(8, str.length() - 1));\n StringBuilder sb = new StringBuilder();\n sb.append(substring);\n sb.append(f.substring(0, Math.min(8, f.length() - 1)));\n String sb2 = sb.toString();\n StringBuilder sb3 = new StringBuilder();\n sb3.append(sb2);\n sb3.append(string.substring(0, Math.min(8, string.length() - 1)));\n String sb4 = sb3.toString();\n if (sb4.length() != 24) {\n StringBuilder sb5 = new StringBuilder();\n sb5.append(sb4);\n sb5.append(str.substring(8, 24 - sb4.length()));\n sb4 = sb5.toString();\n }\n return sb4.getBytes();\n }", "protected int findBytes(ByteChunk bc, byte[] b) {\n\n byte first = b[0];\n byte[] buff = bc.getBuffer();\n int start = bc.getStart();\n int end = bc.getEnd();\n\n // Look for first char \n int srcEnd = b.length;\n\n for (int i = start; i <= (end - srcEnd); i++) {\n if (Ascii.toLower(buff[i]) != first) continue;\n // found first char, now look for a match\n int myPos = i+1;\n for (int srcPos = 1; srcPos < srcEnd; ) {\n if (Ascii.toLower(buff[myPos++]) != b[srcPos++])\n break;\n if (srcPos == srcEnd) return i - start; // found it\n }\n }\n return -1;\n }", "private static final byte[] xfuzzydoc_image() {\n\t\tbyte data[] = { 71, 73, 70, 56, 57, 97, 16, 0, 16, 0, -124, 0, 0, 102,\n\t\t\t\t102, 102, -1, -1, 0, -1, -1, -1, 0, 0, 0, 102, 102, 102, -53,\n\t\t\t\t125, 48, -21, -61, -126, -57, -90, 113, -37, -94, 69, -70, 105,\n\t\t\t\t40, -53, 117, 56, -61, 89, 4, -94, 121, 60, -21, -78, 93, -70,\n\t\t\t\t89, 24, -82, 69, 12, -66, 117, 24, -29, -94, 117, -49, 109, 40,\n\t\t\t\t-82, 93, 8, -29, -114, 56, -86, 101, 36, -5, -70, 97, -45, 125,\n\t\t\t\t40, -49, -122, 60, -57, 125, 40, -61, 105, 28, -29, -102, 81,\n\t\t\t\t-37, -122, 65, -13, -78, 97, -37, -94, 81, -1, -1, -1, 33, -2,\n\t\t\t\t14, 77, 97, 100, 101, 32, 119, 105, 116, 104, 32, 71, 73, 77,\n\t\t\t\t80, 0, 33, -7, 4, 1, 10, 0, 0, 0, 44, 0, 0, 0, 0, 16, 0, 16, 0,\n\t\t\t\t0, 5, 67, -32, 35, -118, 64, 57, 62, 101, 58, -90, 38, -54,\n\t\t\t\t-74, 46, 64, -66, 42, 57, -45, -11, -115, -61, -49, -32, -5,\n\t\t\t\t52, 91, 79, 64, 4, -42, 84, 3, 1, 67, -112, 28, -76, 94, -55,\n\t\t\t\t-30, -17, -124, 84, 46, -105, 78, 92, -108, 88, -36, 37, 25,\n\t\t\t\t96, -84, -105, -53, -51, -46, -66, 97, -26, -104, -84, -42, -2,\n\t\t\t\t-34, 33, 0, 59 };\n\t\treturn data;\n\t}", "@Override\n public ByteBuffer extractPattern(byte[] bytes, int offset, int length) {\n if (bytes.length <= 1) {\n return ByteBuffer.wrap(bytes);\n }\n int pos = offset;\n int start = pos;\n for (; pos < length && bytes[pos] != 0; ++pos)\n ;\n int stop = pos;\n return ByteBuffer.wrap(bytes, start, stop - start);\n }", "private static final byte[] xfsim_d_image() {\n\t\tbyte data[] = { 71, 73, 70, 56, 57, 97, 16, 0, 16, 0, -62, 0, 0, 0, 0,\n\t\t\t\t0, -128, -128, -128, -64, -64, -64, 28, 28, 28, -1, -1, -1, -1,\n\t\t\t\t-1, -1, -1, -1, -1, -1, -1, -1, 33, -2, 14, 77, 97, 100, 101,\n\t\t\t\t32, 119, 105, 116, 104, 32, 71, 73, 77, 80, 0, 33, -7, 4, 1,\n\t\t\t\t10, 0, 5, 0, 44, 0, 0, 0, 0, 16, 0, 16, 0, 0, 3, 72, 88, -70,\n\t\t\t\t-36, 30, 48, -58, 39, -86, -83, 1, -80, 64, -70, -17, -112,\n\t\t\t\t-74, 112, 64, 105, 18, -31, 70, 0, 67, -37, -94, -103, -54,\n\t\t\t\t-70, 3, 44, 42, 36, 93, -89, -29, -9, 101, -112, -111, 105, 88,\n\t\t\t\t10, 8, 68, 28, -97, -57, 24, 43, -124, -128, 0, 104, -54, 8,\n\t\t\t\t56, 90, -85, 88, 77, 82, -23, 57, 42, -120, -32, -110, 99, -20,\n\t\t\t\t72, 0, 0, 59 };\n\t\treturn data;\n\t}", "void mo30633b(int i, String str, byte[] bArr);", "public byte[] readImagePNG(BufferedImage bufferedimage) throws IOException{\n byte[] data = ImageUtil.toByteArray(bufferedimage);\r\n /* \r\n for (int i = 0; i < data.length; i++) {\r\n if(i!=0&&i%4==0)\r\n System.out.println();\r\n System.out.format(\"%02X \",data[i]);\r\n }\r\n */ \r\n \r\n \r\n \r\n \r\n byte[] stximage = getStximage();\r\n byte[] etximage = getEtximage();\r\n \r\n byte[] stxdata = new byte[stximage.length];\r\n byte[] etxdata = new byte[etximage.length];\r\n byte[] length = new byte[4];\r\n \r\n boolean stxsw=false;\r\n boolean etxsw=false;\r\n byte[] full_data=null;\r\n byte[] only_data=null;\r\n try{\r\n for (int i = 0; i < data.length; i++) {\r\n System.arraycopy(data, i, stxdata,0, stxdata.length);\r\n stxsw = ByteUtil.equals(stximage, stxdata);\r\n int subindex=i+stxdata.length;\r\n if(stxsw){\r\n System.arraycopy(data, subindex, length,0, length.length);\r\n int length_fulldata = ConversionUtil.toInt(length);\r\n // System.out.format(\"%02X %d subIndex[%d]\",data[subindex],length_fulldata,subindex);\r\n \r\n \r\n subindex+=i+length.length;\r\n int etx_index= subindex+ length_fulldata;\r\n // System.out.println(\"subindex : \"+subindex+\" etx_index : \"+etx_index);\r\n System.arraycopy(data, etx_index, etxdata,0, etxdata.length);\r\n \r\n// for (int j = 0; j < etxdata.length; j++) {\r\n// System.out.format(\"%02X \",etxdata[j]);\r\n// }\r\n \r\n etxsw = ByteUtil.equals(etximage, etxdata);\r\n if(etxsw){\r\n full_data = new byte[etx_index-subindex];\r\n System.arraycopy(data, subindex, full_data,0, full_data.length); //fulldata\r\n break;\r\n }else{\r\n continue;\r\n }\r\n }\r\n \r\n \r\n }\r\n \r\n /////only data search\r\n System.arraycopy(full_data, 0, length,0, length.length);\r\n int length_onlydata = ConversionUtil.toInt(length); \r\n only_data = new byte[length_onlydata];\r\n System.arraycopy(full_data, length.length, only_data,0, only_data.length);\r\n \r\n \r\n \r\n }catch (Exception e) {\r\n return null;\r\n }\r\n \r\n return only_data;\r\n \r\n }", "@Query(\"select ins.id from InstancesInfo ins where ins.dataMd5Hash = :dataMd5Hash\")\n Long findIdByDataMd5Hash(@Param(\"dataMd5Hash\") String dataMd5Hash);", "VirtualFile getFile(String uuid);", "public List<Upfile> findLinerPic(Long itickettypeid);", "void mo8445a(int i, String str, int i2, byte[] bArr);", "public Part getPartPorUID(String text) throws RemoteException;", "byte[] get(byte[] id) throws RemoteException;", "public static void deleteImageBytesByPillsDispensedUuid(MasterConfig masterConfig, String pillsDispensedUuid ) throws Exception {\n\t\tConnection con = null;\n\t\tPreparedStatement pstmt = null;\n\t\ttry {\n\t\t\tcon = PooledDataSource.getInstance(masterConfig).getConnection();\n\t\t\tcon.setAutoCommit(true);\n\t\t\tpstmt = con.prepareStatement(sqlDeleteImageBytesByPillsDispensedUuid);\n\t\t\tint offset = 1;\n\t\t\tpstmt.setString(offset++, pillsDispensedUuid);\n\t\t\tpstmt.execute();\n\t\t} catch (Exception e) {\n\t\t\tlogger.error(e.getMessage(), e);\n\t\t\tthrow e;\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tif (pstmt != null)\n\t\t\t\t\tpstmt.close();\n\t\t\t} catch (Exception e) {\n\t\t\t\tlogger.warn(e);\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tif (con != null)\n\t\t\t\t\tcon.close();\n\t\t\t} catch (Exception exCon) {\n\t\t\t\tlogger.warn(exCon.getMessage());\n\t\t\t}\n\t\t}\n\t}", "@Test\n void findAvatarFromGravatar() {\n LdapEntry ldapEntry = new LdapEntry();\n ldapEntry.addAttribute(new LdapAttribute(\"mail\", \"[email protected]\"));\n when(ldaptiveTemplate.findOne(any())).thenReturn(Optional.of(ldapEntry));\n Optional<byte[]> actual = userRepository.findAvatar(\"somebody\", AvatarDefault.ROBOHASH, 20);\n assertTrue(actual.isPresent());\n }", "private static final byte[] pkg_image() {\n\t\tbyte data[] = { 71, 73, 70, 56, 57, 97, 16, 0, 16, 0, -62, 0, 0, -1,\n\t\t\t\t-6, -51, 0, 0, 0, -91, 42, 42, -128, -128, -128, -1, -1, -1,\n\t\t\t\t-1, -1, -1, -1, -1, -1, -1, -1, -1, 33, -2, 14, 77, 97, 100,\n\t\t\t\t101, 32, 119, 105, 116, 104, 32, 71, 73, 77, 80, 0, 33, -7, 4,\n\t\t\t\t1, 10, 0, 0, 0, 44, 0, 0, 0, 0, 16, 0, 16, 0, 0, 3, 64, 8, -86,\n\t\t\t\t-79, -48, 110, -123, 32, 32, -99, 110, -118, 93, 41, -57, -34,\n\t\t\t\t54, 13, 83, 88, 61, -35, -96, 6, -21, 37, -87, 48, 27, 75, -23,\n\t\t\t\t-38, -98, -26, 88, 114, 120, -18, 75, -102, 96, 7, -62, 16, 85,\n\t\t\t\t-116, 39, -38, -121, -105, 44, 46, 121, 68, -122, 39, -124,\n\t\t\t\t-119, 72, 47, 81, -85, 84, -101, 0, 0, 59 };\n\t\treturn data;\n\t}", "int seachImage(Image img) {\r\n\t\treturn 1;\r\n\t}", "private static final byte[] xfsim_image() {\n\t\tbyte data[] = { 71, 73, 70, 56, 57, 97, 16, 0, 16, 0, -62, 0, 0, -128,\n\t\t\t\t-128, -128, -64, -64, -64, 0, 0, 0, -1, -1, -1, 0, 0, -1, -1,\n\t\t\t\t-1, -1, -1, -1, -1, -1, -1, -1, 33, -2, 14, 77, 97, 100, 101,\n\t\t\t\t32, 119, 105, 116, 104, 32, 71, 73, 77, 80, 0, 33, -7, 4, 1,\n\t\t\t\t10, 0, 5, 0, 44, 0, 0, 0, 0, 16, 0, 16, 0, 0, 3, 72, 88, -70,\n\t\t\t\t-36, 14, 48, -58, 23, -86, -83, 64, 48, 48, -70, -17, -112,\n\t\t\t\t-74, 112, 66, 105, 14, -31, 54, 8, 68, -37, -94, -103, -54,\n\t\t\t\t-70, 4, 44, 42, 36, 93, -89, -29, -9, 101, -112, -111, 105, 88,\n\t\t\t\t2, 4, 68, 28, -97, -57, 24, 43, -124, -128, 2, 104, -54, 40,\n\t\t\t\t56, 90, -85, 88, 77, 82, -23, 57, 42, -120, -32, -110, 99, -20,\n\t\t\t\t72, 0, 0, 59 };\n\t\treturn data;\n\t}", "private byte[] getImageOne() {\n Bitmap icon = BitmapFactory.decodeResource(getApplicationContext().getResources(),\n R.drawable.image0);\n return ImageConvert.convertImage2ByteArray(icon);\n }", "synchronized public byte[] toByteKey(byte[] _bytes) throws Exception {\n byte[] key = toKey(_bytes);\n if (key == null) {\n return null;\n }\n if (UIOSet.contains(index, key)) {\n byte[] bfp = UIOSet.get(index, key);\n byte[] bytes = dataChunkFiler.getFiler(UIO.bytesLong(bfp)).toBytes();\n if (!UByte.equals(bytes, _bytes)) {\n return null;\n }\n } else {\n long bfp = dataChunkFiler.newChunk(_bytes.length);\n dataChunkFiler.getFiler(bfp).setBytes(_bytes);\n byte[] keybfp = UByte.join(key, UIO.longBytes(bfp));\n UIOSet.add(index, keybfp);\n }\n return key;\n }", "private static final byte[] xfsg_d_image() {\n\t\tbyte data[] = { 71, 73, 70, 56, 57, 97, 16, 0, 16, 0, -77, 9, 0, 67,\n\t\t\t\t67, 67, 93, 93, 93, 115, 115, 115, -120, -120, -120, -96, -96,\n\t\t\t\t-96, -89, -89, -89, -88, -88, -88, -62, -62, -62, -28, -28,\n\t\t\t\t-28, -1, -1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n\t\t\t\t0, 0, 0, 33, -7, 4, 1, 0, 0, 9, 0, 44, 0, 0, 0, 0, 16, 0, 16,\n\t\t\t\t0, 0, 4, 83, 48, -55, 121, -86, -99, 88, 90, -124, 110, 78, 21,\n\t\t\t\t39, 118, 71, 86, 9, -60, 56, 0, 21, 117, 10, -24, 10, -80, 45,\n\t\t\t\t-8, 14, 2, 16, -24, -98, 69, 8, 3, -61, 96, 103, 41, -39, 14,\n\t\t\t\t-85, 64, 16, 87, -44, 84, 102, 59, 32, -20, 2, -85, -26, 6,\n\t\t\t\t-65, 105, -51, 42, 24, 33, 8, 53, -119, -43, 27, 78, 112, 15,\n\t\t\t\t28, -113, 88, -80, 46, 26, -41, 24, -10, 7, 62, -1, 68, 0, 0,\n\t\t\t\t59 };\n\t\treturn data;\n\t}", "@VisibleForTesting\n protected static byte[] getGalileoDataByteArray(String dwrd) {\n String dataString = dwrd.substring(0, dwrd.length() - 8);\n byte[] data = BaseEncoding.base16().lowerCase().decode(dataString.toLowerCase());\n // Removing bytes 16 and 32 (they are padding which should be always zero)\n byte[] dataStart = Arrays.copyOfRange(data, 0, 15);\n byte[] dataEnd = Arrays.copyOfRange(data, 16, 31);\n byte[] result = new byte[dataStart.length + dataEnd.length];\n\n System.arraycopy(dataStart, 0, result, 0, dataStart.length);\n System.arraycopy(dataEnd, 0, result, 15, dataEnd.length);\n return result;\n }", "private int findPos(byte[] contents, String target)\n {\n String contentsStr = null;\n try\n {\n contentsStr = new String(contents, \"ISO-8859-1\");\n }\n catch (UnsupportedEncodingException e)\n {\n e.printStackTrace();\n }\n return contentsStr.indexOf(target);\n }", "private static final byte[] xfuzzyclose_image() {\n\t\tbyte data[] = { 71, 73, 70, 56, 57, 97, 16, 0, 16, 0, -95, 0, 0, -82,\n\t\t\t\t69, 12, 0, 0, 0, -64, -64, -64, -1, -1, -1, 33, -2, 14, 77, 97,\n\t\t\t\t100, 101, 32, 119, 105, 116, 104, 32, 71, 73, 77, 80, 0, 33,\n\t\t\t\t-7, 4, 1, 10, 0, 3, 0, 44, 0, 0, 0, 0, 16, 0, 16, 0, 0, 2, 54,\n\t\t\t\t-124, 61, 121, -112, 125, -83, 24, -116, 114, -96, -23, -48,\n\t\t\t\t-59, 121, 115, 90, 125, -102, 55, 109, -63, -119, -94, 86, 24,\n\t\t\t\t8, -18, 43, 4, 75, -45, -74, 110, -51, -39, -11, -99, -65, 118,\n\t\t\t\t-36, -117, 9, -127, -104, -35, -115, 56, -7, -63, 2, -71, 84,\n\t\t\t\t-86, 0, 0, 59 };\n\t\treturn data;\n\t}", "private int BinarySearchBytePage(String wordToBeSearched, byte[] bytePage, ArrayList<Integer> matchingPositions, String filename, int middleLine)\n {\n //If the wordToBeSearched's length is less than MinWordSize or greater than MaxWordSize, then the search fails automatically\n if(wordToBeSearched.length() > SizeConstants.getMaxWordSize() || wordToBeSearched.length() < SizeConstants.getMinWordSize())\n {\n return -1;\n }\n\n //Get the index entry size in ASCII characters\n int indexEntrySize = (SizeConstants.getMaxWordSize() + 4);\n\n //Record per data page\n int entriesPerPage = bytePage.length / indexEntrySize;\n\n //Initialize the String representation of the word in the data page entry\n String dataPageEntryWord = \"\";\n\n //Initialize the String representation of the last non blank(space filled) word in the page\n String lastNonBlankWord = \"\";\n\n //Flag, true if the word to be searched is matched to the first entry of the data page\n boolean foundAtFirstEntry = false;\n\n //Flag, true if the word to be searched is matched to the first entry of the data page\n boolean foundAtLastEntry = false;\n\n //Search for every entry in the byte page\n for(int index = 0; index < entriesPerPage; index++)\n {\n int entryStartingPosition = index * indexEntrySize;\n //Get only the word from the data page and convert the bytes to ASCII characters\n dataPageEntryWord = new String(Arrays.copyOfRange(bytePage, entryStartingPosition, entryStartingPosition + SizeConstants.getMaxWordSize())).replaceAll(\"\\\\s+\",\"\");\n\n //Compare the index entry word and the word to be searched\n if(dataPageEntryWord.equals(wordToBeSearched))\n {\n //Get the line number from the index entry and add it to the ArrayList\n matchingPositions.add(ByteBuffer.wrap(Arrays.copyOfRange(bytePage, entryStartingPosition + SizeConstants.getMaxWordSize(), entryStartingPosition + indexEntrySize)).getInt());\n if(index == 0)\n {\n //Mark that the word to be searched is matched to the first entry of the data page\n foundAtFirstEntry = true;\n }\n }\n\n //Check if the word in the data page entry is not blank\n if(!dataPageEntryWord.trim().isBlank())\n {\n //Store the last non blank data page entry word\n lastNonBlankWord = dataPageEntryWord;\n }\n }\n\n //Compare the last index entry word and the word to be searched\n if(dataPageEntryWord.equals(wordToBeSearched))\n {\n //Mark that the word to be searched is matched to the last entry of the data page\n foundAtLastEntry = true;\n }\n\n //If the ArrayList is empty, the word to be searched wasn't found in the data page\n if(matchingPositions.isEmpty())\n {\n //Check if the word to be searched is alphabetically before or after the last non blank word\n if(wordToBeSearched.compareTo(lastNonBlankWord) < 0)\n {\n //Search the bottom part of the search area\n return -4;\n }\n else if(wordToBeSearched.compareTo(lastNonBlankWord) > 0)\n {\n //Search the top part of the search area\n return -3;\n }\n }\n else\n {\n //Count the new data page accesses\n int dataPageAccesses = 0;\n\n //Search for other occurrences of the word to be searched in the bottom part\n if(foundAtFirstEntry)\n {\n //Search the bottom part of the search area\n dataPageAccesses += LinearSearchAfterBinary(filename, matchingPositions, wordToBeSearched, middleLine, true);\n }\n\n //Search for other occurrences of the word to be searched, in the top part\n if(foundAtLastEntry)\n {\n //Search the top part of the search area\n dataPageAccesses += LinearSearchAfterBinary(filename, matchingPositions, wordToBeSearched, middleLine, false);\n }\n return dataPageAccesses;\n }\n //Continue the binary search normally\n return -2;\n }", "private static final byte[] xfsg_image() {\n\t\tbyte data[] = { 71, 73, 70, 56, 57, 97, 16, 0, 16, 0, -77, 15, 0, 16,\n\t\t\t\t67, 118, -39, 99, 98, 59, 89, -124, -8, -47, 35, 122, -116,\n\t\t\t\t-109, -17, -114, 100, -16, -35, -75, -28, 81, 59, -27, -97,\n\t\t\t\t-106, -1, -32, 102, -1, -42, 36, -1, -42, 35, -1, -17, -65, -1,\n\t\t\t\t-43, 32, -31, 58, 62, -1, -1, -1, 33, -7, 4, 1, 0, 0, 15, 0,\n\t\t\t\t44, 0, 0, 0, 0, 16, 0, 16, 0, 0, 4, 105, -16, -55, -87, -106,\n\t\t\t\t-86, 107, 106, -39, 84, 98, 76, 114, 109, -46, -14, -127, -88,\n\t\t\t\t-46, 108, 77, -29, 20, 6, 104, 16, 64, 75, -75, 78, 94, -48,\n\t\t\t\t64, -35, -107, 56, 71, -64, 1, 16, 20, 91, -103, -57, -94, 85,\n\t\t\t\t56, 4, 16, 4, -29, 0, 9, 108, -48, 4, 4, 68, -32, -48, 106, 36,\n\t\t\t\t-105, -115, -98, 81, -24, -32, 122, 31, -71, 52, -111, 80, -56,\n\t\t\t\t-103, 21, 18, -75, 3, 5, 42, -4, 38, 106, 58, 67, -91, -111,\n\t\t\t\t-97, 68, 112, 120, 14, 113, 14, 22, 24, 125, -125, 120, 36,\n\t\t\t\t-126, -117, -117, 17, 0, 59 };\n\t\treturn data;\n\t}", "private static final byte[] xfsl_d_image() {\n\t\tbyte data[] = { 71, 73, 70, 56, 57, 97, 16, 0, 16, 0, -95, 0, 0, 86,\n\t\t\t\t86, 86, 51, 51, 51, -111, -111, -111, -1, -1, -1, 33, -2, 14,\n\t\t\t\t77, 97, 100, 101, 32, 119, 105, 116, 104, 32, 71, 73, 77, 80,\n\t\t\t\t0, 33, -7, 4, 1, 10, 0, 3, 0, 44, 0, 0, 0, 0, 16, 0, 16, 0, 0,\n\t\t\t\t2, 44, -100, -113, -87, -53, 7, -48, -36, -101, 108, 90, 42,\n\t\t\t\t-81, -122, 59, 108, 62, 5, -34, -122, -120, 95, 18, 12, -126,\n\t\t\t\t38, 40, 41, 32, -84, -16, -22, 14, 83, -116, -107, 54, -119,\n\t\t\t\t26, 90, -28, -125, 0, -127, 5, 0, 59 };\n\t\treturn data;\n\t}", "private static final byte[] xfuzzyclose_d_image() {\n\t\tbyte data[] = { 71, 73, 70, 56, 57, 97, 16, 0, 16, 0, -95, 0, 0, 96,\n\t\t\t\t96, 96, -128, -128, -128, -112, -112, -112, -1, -1, -1, 33, -2,\n\t\t\t\t14, 77, 97, 100, 101, 32, 119, 105, 116, 104, 32, 71, 73, 77,\n\t\t\t\t80, 0, 33, -7, 4, 1, 10, 0, 3, 0, 44, 0, 0, 0, 0, 16, 0, 16, 0,\n\t\t\t\t0, 2, 54, -124, 61, 121, -112, 125, -83, 24, -116, 114, -96,\n\t\t\t\t-23, -48, -59, 121, 115, 90, 125, -102, 55, 109, -63, -119,\n\t\t\t\t-94, 86, 24, 8, -18, 43, 4, 75, -45, -74, 110, -51, -39, -11,\n\t\t\t\t-99, -65, 118, -36, -117, 9, -127, -104, -35, -115, 56, -7,\n\t\t\t\t-63, 2, -71, 84, -86, 0, 0, 59 };\n\t\treturn data;\n\t}", "public static String getImageId(WebElement image) {\n String imageUrl = image.getAttribute(\"src\");\n\n int indexComparisonStart = imageUrl.indexOf(START_TOKEN) + START_TOKEN.length();\n int indexComparisonFinish = imageUrl.substring(indexComparisonStart).indexOf(STOP_TOKEN);\n\n return imageUrl.substring(indexComparisonStart, indexComparisonStart + indexComparisonFinish);\n }", "ResPartnerBankEntityWithBLOBs selectByPrimaryKey(Integer id);", "private int[] findPointer() {\n \n int initialAux = 4095;\n int header = 0;\n \n \n for (int i = 0; i < 4096; i++) {\n String initialBinary = Integer.toBinaryString(0xFF & serialize[i * 4]) + Integer.toBinaryString(0xFF & serialize[i * 4 + 1]);\n short initial = Short.parseShort(initialBinary, 2);\n String sizeBinary = Integer.toBinaryString(0xFF & serialize[i * 4 + 2]) + Integer.toBinaryString(0xFF & serialize[i * 4 + 3]);\n short sizeData = Short.parseShort(sizeBinary, 2);\n \n if (initial == 0 && sizeData == 0) {\n header = i*4;\n break;\n }\n //get the higher initial \n if (initialAux > initial){\n initialAux = initial;\n }\n \n }\n\n int[] toReturn = new int[2];\n \n toReturn[0] = header;\n toReturn[1] = initialAux-1;\n \n return toReturn;\n }", "@Override\n public UserDeviceEntity find(BigInteger customerId, String uuid) throws Exception {\n return null;\n }", "ImageContentData findContentData(String imageId);", "public Point findImage(BufferedImage image, int index) {\n int smallWidth = image.getWidth();\n int smallHeight = image.getHeight();\n int[][] smallPixels = new int[smallWidth][smallHeight];\n for(int x = 0; x < smallWidth; x++) {\n for(int y = 0; y < smallHeight; y++) {\n smallPixels[x][y] = image.getRGB(x, y);\n }\n }\n boolean good;\n int count = 0;\n for(int X = 0; X <= bigWidth - smallWidth; X++) {\n for(int Y = 0; Y <= bigHeight - smallHeight; Y++) {\n good = true;\n for(int x = 0; x < smallWidth; x++) {\n for(int y = 0; y < smallHeight; y++) {\n if(smallPixels[x][y] != bigPixels[X + x][Y + y]) {\n good = false;\n break;\n }\n }\n if(!good) {\n break;\n }\n }\n if(good) {\n if(count == index) {\n return(new Point(X, Y));\n }\n count++;\n }\n }\n }\n return(null);\n }", "public wsihash fetchByUUID_G(java.lang.String uuid, long groupId);", "public char[] uid2_GET(Bounds.Inside ph, char[] dst_ch, int pos)\n {\n for(int BYTE = ph.BYTE, dst_max = pos + 18; pos < dst_max ; pos++, BYTE += 1)\n dst_ch[pos] = (char)((char) get_bytes(data, BYTE, 1));\n return dst_ch;\n }", "private Bitmap getGoodsImageFromDatabase(String goodId) {\r\n Cursor cursor = helper.getSpecifyGoodImage(goodId);\r\n cursor.moveToFirst();\r\n byte bytes[] = Base64.decode(cursor.getString(0), Base64.DEFAULT);\r\n cursor.close();\r\n Bitmap bitmap = BitmapFactory.decodeByteArray(bytes, 0, bytes.length);\r\n return bitmap;\r\n }", "private void findMatch()\n {\n if (this.matchLen > 0) \n {\n this.matchLen += ((this.matchLen - MAX_LENGTH) >>> 31);\n this.matchPos++;\n } \n else \n {\n // Retrieve match position\n this.matchPos = this.hashes[this.hash];\n\n // Detect match\n if ((this.matchPos != 0) && (this.pos - this.matchPos <= MASK2))\n {\n int r = this.matchLen + 1;\n\n while ((r <= MAX_LENGTH) && (this.buffer[(this.pos-r) & MASK2] == this.buffer[(this.matchPos-r) & MASK2])) \n r++;\n\n this.matchLen = r - 1;\n }\n } \n }", "byte[] getId();", "ResourceWithBLOBs selectByPrimaryKey(Integer resourceid);", "short getPQ( byte[] buffer, short offset );", "public BufferedImage readImage(String id) {\n BufferedImage bufImg = null;\n try {\n PreparedStatement pstmt = conn.prepareStatement(\n \"SELECT photo FROM vehicles WHERE veh_reg_no = ?\");\n pstmt.setString(1, id);\n System.out.println(pstmt); // for debugging\n ResultSet rset = pstmt.executeQuery();\n // Only one result expected\n rset.next();\n // Read image via InputStream\n InputStream in = rset.getBinaryStream(\"photo\"); \n // Decode the inputstream as BufferedImage\n bufImg = ImageIO.read(in); \n } catch(Exception ex) {\n ex.printStackTrace();\n }\n return bufImg;\n }", "private static final byte[] xfsp_d_image() {\n\t\tbyte data[] = { 71, 73, 70, 56, 57, 97, 16, 0, 16, 0, -95, 0, 0, 76,\n\t\t\t\t76, 76, -1, -1, -1, 124, 124, 124, -1, -1, -1, 33, -2, 14, 77,\n\t\t\t\t97, 100, 101, 32, 119, 105, 116, 104, 32, 71, 73, 77, 80, 0,\n\t\t\t\t33, -7, 4, 1, 10, 0, 3, 0, 44, 0, 0, 0, 0, 16, 0, 16, 0, 0, 2,\n\t\t\t\t52, -36, -128, -87, 104, 6, 2, -93, 4, -19, -56, 43, 104, 123,\n\t\t\t\t34, 4, -84, 57, -112, 7, 86, 28, 121, -123, 86, -9, -91, -26,\n\t\t\t\t-40, 78, 47, 91, 110, 112, 45, -46, -82, -51, 122, -88, 122,\n\t\t\t\t-14, -3, 102, 24, 8, -80, 24, 1, 46, -106, -122, 2, 0, 59 };\n\t\treturn data;\n\t}", "private char[] toDSUID(UUID uuid) {\n ByteBuffer bb = ByteBuffer.wrap(new byte[17]);\n bb.putLong(uuid.getMostSignificantBits());\n bb.putLong(uuid.getLeastSignificantBits());\n\n String s_uuid = DatatypeConverter.printHexBinary(bb.array());\n return s_uuid.toCharArray();\n }", "public static java.lang.String[] getAvailableIDs(int rawOffset) { throw new RuntimeException(\"Stub!\"); }", "public int getIndex(byte[] value);", "private static final byte[] xfsp_image() {\n\t\tbyte data[] = { 71, 73, 70, 56, 57, 97, 16, 0, 16, 0, -95, 0, 0, -1, 0,\n\t\t\t\t0, 0, -45, 0, -1, -1, -1, -1, -1, -1, 33, -2, 14, 77, 97, 100,\n\t\t\t\t101, 32, 119, 105, 116, 104, 32, 71, 73, 77, 80, 0, 33, -7, 4,\n\t\t\t\t1, 10, 0, 3, 0, 44, 0, 0, 0, 0, 16, 0, 16, 0, 0, 2, 52, -36,\n\t\t\t\t-128, -87, 104, 6, 1, -93, 4, -19, -56, 27, 104, 123, 65, 8,\n\t\t\t\t-84, 57, -112, 7, 86, 28, 121, -123, 86, -9, -91, -26, -40, 78,\n\t\t\t\t47, 91, 110, 112, 45, -46, -82, -51, 122, -88, 122, -14, -3,\n\t\t\t\t102, 24, 8, -80, 24, 1, 46, -106, -122, 2, 0, 59 };\n\t\treturn data;\n\t}", "@Override\r\n\tpublic Buffer getBytes(int start, int end, byte[] dst, int dstIndex) {\n\t\treturn null;\r\n\t}", "List<String> queryScreenShot(String taskId, String serialno) throws BusinessException;", "private static final byte[] xfsl_image() {\n\t\tbyte data[] = { 71, 73, 70, 56, 57, 97, 16, 0, 16, 0, -95, 0, 0, 0, 0,\n\t\t\t\t-103, -83, 0, 0, -124, -124, -1, -1, -1, -1, 33, -2, 14, 77,\n\t\t\t\t97, 100, 101, 32, 119, 105, 116, 104, 32, 71, 73, 77, 80, 0,\n\t\t\t\t33, -7, 4, 1, 10, 0, 3, 0, 44, 0, 0, 0, 0, 16, 0, 16, 0, 0, 2,\n\t\t\t\t44, -100, -113, -87, -53, 7, -48, -36, -101, 108, 90, 42, -81,\n\t\t\t\t-122, 59, 108, 62, 5, -34, -122, -120, 95, 18, 12, -126, 38,\n\t\t\t\t40, 41, 32, -84, -16, -22, 14, 83, -116, -107, 54, -119, 26,\n\t\t\t\t90, -28, -125, 0, -127, 5, 0, 59 };\n\t\treturn data;\n\t}", "public abstract byte[] mo32305a(String str);", "byte[] getProfileImage();", "byte[] getPhotoDetails(Long customerId,String type) throws EOTException;", "public static void srs_print_bytes(String tag, ByteBuffer bb, int size) {\n StringBuilder sb = new StringBuilder();\n int i = 0;\n int bytes_in_line = 16;\n int max = bb.remaining();\n for (i = 0; i < size && i < max; i++) {\n sb.append(String.format(\"0x%s \", Integer.toHexString(bb.get(i) & 0xFF)));\n if (((i + 1) % bytes_in_line) == 0) {\n Log.i(tag, String.format(\"%03d-%03d: %s\", i / bytes_in_line * bytes_in_line, i, sb.toString()));\n sb = new StringBuilder();\n }\n }\n if (sb.length() > 0) {\n Log.i(tag, String.format(\"%03d-%03d: %s\", size / bytes_in_line * bytes_in_line, i - 1, sb.toString()));\n }\n }", "public int countByUuid(java.lang.String uuid);", "Card findByCardData(String number, long userId) throws PersistenceCoreException;", "public int getBitmapIndex(char objectType){\n int index;\n switch (objectType){\n case '.': index = 0; break;\n case '1': index = 1; break;\n case 'p': index = 2; break;\n default: index = 0; break;\n }\n return index;\n }", "public abstract Address getBootImageEnd();", "public byte[] getBytes(String format) {\n try (ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream()) {\n ImageIO.write(embeddedImage, format, byteArrayOutputStream);\n byteArrayOutputStream.flush();\n return byteArrayOutputStream.toByteArray();\n } catch (IOException ex) {\n LOGGER.error(\"\", ex);\n }\n return null;\n }", "com.yahoo.xpathproto.TransformTestProtos.ContentImage getImageByHandler();", "String getRepositoryUUID();", "protected final int getBMPOffset(char paramChar) {\n/* 277 */ return (paramChar >= '?' && paramChar <= '?') ? \n/* */ \n/* 279 */ getRawOffset(320, paramChar) : \n/* 280 */ getRawOffset(0, paramChar);\n/* */ }", "public interface PhotoRepository extends CrudRepository<Photo, UUID> {\n\n Photo findByFilename(String filename);\n}", "String getDescription(String uuid) throws DatabaseException;", "private static final byte[] pkgload_image() {\n\t\tbyte data[] = { 71, 73, 70, 56, 57, 97, 16, 0, 16, 0, -29, 0, 0, 0, 0,\n\t\t\t\t0, -91, 42, 42, -128, -128, -128, 94, 94, 94, -1, -1, -1, -1,\n\t\t\t\t-1, 0, -64, -64, -64, 94, 24, 24, -1, -1, -1, -1, -1, -1, -1,\n\t\t\t\t-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,\n\t\t\t\t-1, 33, -2, 14, 77, 97, 100, 101, 32, 119, 105, 116, 104, 32,\n\t\t\t\t71, 73, 77, 80, 0, 33, -7, 4, 1, 10, 0, 8, 0, 44, 0, 0, 0, 0,\n\t\t\t\t16, 0, 16, 0, 0, 4, 88, 16, 73, 32, 103, -67, 8, -128, 64, 51,\n\t\t\t\t-17, -43, 22, -116, -38, 72, 98, -101, 38, 12, 37, 120, 1, 66,\n\t\t\t\t60, -60, 84, 44, -124, -33, -38, 18, -4, 45, -110, 63, 78, -63,\n\t\t\t\t64, -16, -91, 14, -100, -49, 112, 120, -53, 108, -112, 74, -61,\n\t\t\t\t-14, 102, -85, 90, -103, 8, 1, 111, -53, 45, 2, 10, 84, -62,\n\t\t\t\t82, 74, 30, -62, -102, -38, -79, 90, 0, -109, 104, -53, -16,\n\t\t\t\t66, -37, 77, -120, -109, -39, 21, -85, -98, 29, 1, 0, 59 };\n\t\treturn data;\n\t}", "protected ByteBuffer extractPattern(byte[] bytes, int offset, int length) {\n if (bytes.length <= 2) {\n return ByteBuffer.wrap(bytes);\n }\n\n // parse from the end to enable handling nasty field values\n int pos = offset + length - 1;\n for (; pos >= 0 && bytes[pos] != 0; pos--)\n ;\n // no null bytes found, assume no datatype\n if (pos < 0) {\n return ByteBuffer.wrap(bytes, 0, 0);\n }\n int stop = pos;\n pos--;\n for (; pos >= 0 && bytes[pos] != 0; pos--)\n ;\n // only one null byte found, assume second half is datatype\n if (pos < 0) {\n return ByteBuffer.wrap(bytes, stop + 1, length - (stop + 1));\n }\n int start = pos + 1;\n // multiple null bytes, assume next to last part is the datatype\n return ByteBuffer.wrap(bytes, start, stop - start);\n }", "byte[] getFile(String sha) throws Exception;", "abstract public String getImageKey();", "public byte[] getPhoto(String rpiId, String time) throws SQLException, IOException;", "private boolean compareBytes(byte [] buffer, int offset, String str) {\r\n\t\tfor (int i = 0; i < str.length(); i++) {\r\n\t\t\tif ( ((byte) (str.charAt(i))) != buffer[i + offset]) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "public abstract Address getBootImageStart();", "List<ZlnfBiZzdkZzdkWithBLOBs> selectByExample(ZlnfBiZzdkZzdkExample example);", "private String compareToMagicData(int offset, byte[] data) {\n\t\tint mimeOffset = content.getInt(offset + 4);\n\t\tint numMatches = content.getInt(offset + 8);\n\t\tint matchletOffset = content.getInt(offset + 12);\n\n\t\tfor (int i = 0; i < numMatches; i++) {\n\t\t\tif (matchletMagicCompare(matchletOffset + (i * 32), data)) {\n\t\t\t\treturn getMimeType(mimeOffset);\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "com.yahoo.xpathproto.TransformTestProtos.ContentImage getImagesByHandler(int index);", "private byte[] getImageData(DatagramPacket receivedPacket) {\r\n final byte[] udpData = receivedPacket.getData();\r\n // The camera adds some kind of header to each packet, which we need to ignore\r\n int videoDataStart = getImageDataStart(receivedPacket, udpData);\r\n return Arrays.copyOfRange(udpData, videoDataStart, receivedPacket.getLength());\r\n }", "private byte[] getImageBytes(File image){\n byte[] imageInByte = null;\n try{\n \n\tBufferedImage originalImage = \n ImageIO.read(image);\n \n\tByteArrayOutputStream baos = new ByteArrayOutputStream();\n\tImageIO.write( originalImage, \"png\", baos );\n\tbaos.flush();\n\timageInByte = baos.toByteArray();\n\tbaos.close();\n \n\t}catch(IOException e){\n\t\tSystem.out.println(e.getMessage());\n\t}finally{\n return imageInByte;\n }\n }", "@Test\n void findAvatarAndExpectNoEmailAvatar() {\n when(ldaptiveTemplate.findOne(any())).thenReturn(Optional.of(new LdapEntry()));\n Optional<byte[]> actual = userRepository.findAvatar(\"somebody\", AvatarDefault.ROBOHASH, 20);\n assertTrue(actual.isPresent());\n }", "SysPic selectByPrimaryKey(Integer id);", "MediaMetadata get(String uuid);", "public char[] extract(int[][] warpedArray)\n {\n char[] result = new char[81];\n\n int startY, startX;\n\n // Crop 4 pixels off each edge for an array size divisible by 9. (56);\n int cellSize = (512 - 8) / 9;\n\n // Loop through each cell block, finding a value if it exists.\n StringBuilder sb = new StringBuilder();\n\n CellOCR cellOCR = new CellOCR(context);\n\n for (int y = 0; y < 9; y++) {\n\n startY = (y * cellSize) + 4;\n\n for (int x = 0; x < 9; x++) {\n startX = (x * cellSize) + 4;\n int[][] croppedCell = cropCell(startY, startX, cellSize, warpedArray);\n Bitmap croppedImage = Utils.intToBitmap(croppedCell);\n CellImage cellImage = new CellImage(croppedCell, croppedImage);\n result[(y * 9) + x] = cellOCR.computeDigit(cellImage);\n sb.append(result[(y * 9) + x]);\n }\n }\n\n result = sb.toString().toCharArray();\n\n return result;\n }", "AccountPaymentMethodEntityWithBLOBs selectByPrimaryKey(Integer id);", "@Test\n public void testSearchImages() {\n System.out.println(\"searchImages\");\n String image = \"saqhuss\";\n Docker instance = new Docker();\n String expResult = \"NAME\";\n String[] result = instance.searchImages(image).split(\"\\n\");;\n String[] res = result[0].split(\" \");\n assertEquals(expResult, res[0].trim());\n }", "public void parseUUIDHexBytes(byte[] serString, int offset) throws HyracksDataException {\n decodeBytesFromHex(serString, offset, uuidBytes, 0, 8);\n offset += 8;\n\n // Skip the hyphen part\n offset += 1;\n\n // Second part - 4 bytes\n decodeBytesFromHex(serString, offset, uuidBytes, 4, 4);\n offset += 4;\n\n // Skip the hyphen part\n offset += 1;\n\n // Third part - 4 bytes\n decodeBytesFromHex(serString, offset, uuidBytes, 6, 4);\n offset += 4;\n\n // Skip the hyphen part\n offset += 1;\n\n // Fourth part - 4 bytes\n decodeBytesFromHex(serString, offset, uuidBytes, 8, 4);\n offset += 4;\n\n // Skip the hyphen part\n offset += 1;\n\n // The last part - 12 bytes\n decodeBytesFromHex(serString, offset, uuidBytes, 10, 12);\n }", "public abstract byte[] getBytes(String path) throws IOException, ClassNotFoundException;", "public interface DigitsFilter {\n /**\n * Converts nine digits into an integer and then determines if it is a unique value.\n *\n * @param bytes nine digits\n * @return {@code true} if value is unique and was added to the lookup-table, and {@code false} otherwise\n */\n boolean isUnique(final byte[] bytes);\n}", "public byte[] readBytesUntil(int interesting) {\n\t\tif (bufferIndex == bufferLast)\n\t\t\treturn null;\n\t\tbyte what = (byte) interesting;\n\n\t\tsynchronized (buffer) {\n\t\t\tint found = -1;\n\t\t\tfor (int k = bufferIndex; k < bufferLast; k++) {\n\t\t\t\tif (buffer[k] == what) {\n\t\t\t\t\tfound = k;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (found == -1)\n\t\t\t\treturn null;\n\n\t\t\tint length = found - bufferIndex + 1;\n\t\t\tbyte outgoing[] = new byte[length];\n\t\t\tSystem.arraycopy(buffer, bufferIndex, outgoing, 0, length);\n\n\t\t\tbufferIndex += length;\n\t\t\tif (bufferIndex == bufferLast) {\n\t\t\t\tbufferIndex = 0; // rewind\n\t\t\t\tbufferLast = 0;\n\t\t\t}\n\t\t\treturn outgoing;\n\t\t}\n\t}", "int retrieveString(byte s[]);", "byte[] getBytes();", "byte[] getBytes();", "private static final byte[] xfj_d_image() {\n\t\tbyte data[] = { 71, 73, 70, 56, 57, 97, 16, 0, 16, 0, -29, 0, 0, 76,\n\t\t\t\t76, 76, 11, 11, 11, 7, 7, 7, -47, -47, -47, -1, -1, -1, -7, -7,\n\t\t\t\t-7, -128, -128, -128, 113, 113, 113, -1, -1, -1, -1, -1, -1,\n\t\t\t\t-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,\n\t\t\t\t-1, -1, 33, -2, 14, 77, 97, 100, 101, 32, 119, 105, 116, 104,\n\t\t\t\t32, 71, 73, 77, 80, 0, 33, -7, 4, 1, 10, 0, 8, 0, 44, 0, 0, 0,\n\t\t\t\t0, 16, 0, 16, 0, 0, 4, 93, 16, 73, 9, -24, -84, 51, 99, 84,\n\t\t\t\t119, -106, 1, 16, -124, -31, 7, 6, 2, -112, 10, -23, 24, 76,\n\t\t\t\t-63, 48, -90, -86, -8, 34, 119, 64, 12, -78, 27, -53, 56, 24,\n\t\t\t\t97, -57, -29, 13, 95, 55, 28, -95, 48, 100, 46, -111, -97, 0,\n\t\t\t\t115, 122, 76, 26, -82, -40, -31, 18, -104, -63, 94, -117, 50,\n\t\t\t\t-62, -31, 32, 41, 20, -68, -66, -27, -110, -116, -16, 26, -76,\n\t\t\t\t-50, -79, -28, -118, 56, 27, -118, 99, 118, -37, -48, -11, 125,\n\t\t\t\t-24, 38, -127, 17, 0, 59 };\n\t\treturn data;\n\t}", "List<ZlnfBiZzdkZzdkWithBLOBs> selectByExampleWithBLOBs(ZlnfBiZzdkZzdkExample example);", "private Pixel getPixel(int id)\n {\n int h= id/this.image.getWidth();\n int w= id-this.image.getWidth()*h;\n\n if(h<0 || h>=this.image.getHeight() || w<0 || w>=this.image.getWidth())\n throw new ArrayIndexOutOfBoundsException();\n\n return new Pixel(w,h);\n }" ]
[ "0.54636014", "0.5452571", "0.53813416", "0.5377059", "0.5339149", "0.53151584", "0.52736336", "0.51678336", "0.507859", "0.50772107", "0.5075744", "0.5069479", "0.506282", "0.50533533", "0.49793556", "0.49221453", "0.49048123", "0.48975718", "0.48891523", "0.48673064", "0.48633343", "0.48578078", "0.4837483", "0.48225483", "0.48109064", "0.48004398", "0.47899386", "0.47391993", "0.47332603", "0.4731383", "0.4728804", "0.47188044", "0.47187933", "0.47008395", "0.46936005", "0.46921197", "0.46760994", "0.46650356", "0.46632516", "0.4661227", "0.4656313", "0.46499732", "0.4641649", "0.46295318", "0.4622994", "0.46213558", "0.46192825", "0.46049204", "0.45979506", "0.45917842", "0.4582236", "0.4579894", "0.45719844", "0.45698637", "0.45652795", "0.45420933", "0.4541354", "0.45395547", "0.45278478", "0.45251667", "0.45213205", "0.45177156", "0.4516186", "0.4512298", "0.4496451", "0.44853085", "0.44801715", "0.44741496", "0.44731674", "0.44712767", "0.4470959", "0.44689766", "0.4467431", "0.44635138", "0.44585693", "0.44563168", "0.44475", "0.4445565", "0.44435614", "0.44434038", "0.44399074", "0.44327086", "0.44273442", "0.4426724", "0.44261172", "0.44205767", "0.4416513", "0.44126478", "0.44097304", "0.4407429", "0.43969694", "0.43940014", "0.43937215", "0.43853945", "0.4380792", "0.43800297", "0.43800297", "0.43739122", "0.4372463", "0.4371864" ]
0.6404486
0
Find all pills dispensed uuids.
public static List<String> findAllPillsDispensedUuids( MasterConfig masterConfig ) throws Exception { List<String> allUuids = new ArrayList<String>(); Connection con = null; Statement stmt = null; try { con = PooledDataSource.getInstance(masterConfig).getConnection(); con.setAutoCommit(true); stmt = con.createStatement(); ResultSet rs = stmt.executeQuery(sqlFindAllPillsDispensedUuids); while( rs.next() ) { allUuids.add( rs.getString(1)); } } catch (Exception e) { logger.error(e.getMessage(), e); throw e; } finally { try { if (stmt != null) stmt.close(); } catch (Exception e) { logger.warn(e); } try { if (con != null) con.close(); } catch (Exception exCon) { logger.warn(exCon.getMessage()); } } return allUuids; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "String[] _truncatable_ids();", "List<String> findAllIds();", "private void getAllIds() {\n try {\n ArrayList<String> NicNumber = GuestController.getAllIdNumbers();\n for (String nic : NicNumber) {\n combo_nic.addItem(nic);\n\n }\n } catch (Exception ex) {\n Logger.getLogger(ModifyRoomReservation.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "public java.util.List<suiluppo_equip_allocation> findAll();", "public static java.lang.String[] getAvailableIDs(int rawOffset) { throw new RuntimeException(\"Stub!\"); }", "java.lang.String getDeleteUserMonsterUuids(int index);", "@Override\n\tpublic List<PI> findAll() {\n\t\treturn null;\n\t}", "private static ArrayList<Integer> getInterestingHalPids() {\r\n try {\r\n IServiceManager serviceManager = IServiceManager.getService();\r\n ArrayList<IServiceManager.InstanceDebugInfo> dump =\r\n serviceManager.debugDump();\r\n HashSet<Integer> pids = new HashSet<>();\r\n for (IServiceManager.InstanceDebugInfo info : dump) {\r\n if (info.pid == IServiceManager.PidConstant.NO_PID) {\r\n continue;\r\n }\r\n\r\n if (Watchdog.HAL_INTERFACES_OF_INTEREST.contains(info.interfaceName) ||\r\n CAR_HAL_INTERFACES_OF_INTEREST.contains(info.interfaceName)) {\r\n pids.add(info.pid);\r\n }\r\n }\r\n\r\n return new ArrayList<Integer>(pids);\r\n } catch (RemoteException e) {\r\n return new ArrayList<Integer>();\r\n }\r\n }", "public void pullPlayerTiles() {\r\n\t\tRandom r = new Random();\r\n\t\tfor (int i=0; i < 7; i++) {\r\n\t\t\tint random = r.nextInt(Launch.getBoneyard().size());\r\n\t\t\t//System.out.println(\"[debug] random = \"+random);\r\n\t\t\t//System.out.println(\"[debug] index\"+random+\" in BONEYARD = \"+Arrays.toString(Launch.BONEYARD.get(random).getDots()));\r\n\t\t\tif (Utils.isSet(Launch.getBoneyard(), random)) {\r\n\t\t\t\tPLAYER_DOMINOS.add(Launch.getBoneyard().get(random));\r\n\t\t\t\tLaunch.getBoneyard().remove(random);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public List<DigitoUnico> listOfdigits(Long id) {\n\t\tOptional<User> user = repository.findById(id);\n\n\t\tif (user.isPresent()) {\n\n\t\t\treturn user.get().getDigitoUnico();\n\t\t} else {\n\t\t\tthrow new NotFoundException(\"User com o Id: \" + id + \" não encontrado em nossa base de dados!\");\n\t\t}\n\t}", "@Override\r\n public List<Damagething> damfindAll() {\n return userMapper.damfindAll();\r\n }", "public String [] _truncatable_ids()\r\n {\r\n return _ids_list;\r\n }", "List<String> queryUniqueDomains(Long from, Long to);", "@Override\r\n\tpublic List<ProductRaw_Out> findOuts(String text, PageRequest pageable) {\n\t\treturn productRaw_OutDao.findProductRawOuts(text, pageable);\r\n\t}", "@Override\n public List<Promocion> findAll() {\n return promocionRepository.findAll();\n }", "public List<SkungeePlayer> getPlayers(UUID... uuids) throws TimeoutException, InterruptedException, ExecutionException {\n\t\tPlayersPacket packet = new PlayersPacket();\n\t\tpacket.setUniqueIds(uuids);\n\t\treturn japson.sendPacket(packet);\n\t}", "public static java.lang.String[] getAvailableIDs() { throw new RuntimeException(\"Stub!\"); }", "public static String[] getAvailableIDs();", "List<IdentificationDTO> getIdentificationList();", "@Override\n public List<ClarifaiProcessDTO> findAll() {\n log.debug(\"Request to get all ClarifaiProcesses\");\n return clarifaiProcessRepository.findAll().stream()\n .map(clarifaiProcessMapper::toDto)\n .collect(Collectors.toCollection(LinkedList::new));\n }", "private List<Integer> findAllId(EntityManager em) {\n TypedQuery<Permesso> permessoQuery = em.createQuery(\"SELECT c FROM com.hamid.entity.Permesso c\", Permesso.class);\n List<Permesso> permessoRes = permessoQuery.getResultList();\n List<Integer> p_id = new ArrayList<Integer>();\n for (Permesso p : permessoRes) {\n int p_id1 = p.getPermesso_id();\n p_id.add(p_id1);\n }\n return p_id;\n }", "private void getPairedDevices() {\n\t\tdevicesArray = btAdapter.getBondedDevices();\n\t\tif(devicesArray.size()>0){\n\t\t\tfor(BluetoothDevice device:devicesArray){\n\t\t\t\tpairedDevices.add(device.getName());\n\t\t\t}\n\t\t}\n\t}", "public List getAllIds();", "public ArrayList<String> queryPrecinct() {\r\n\t\tArrayList<String> list = new ArrayList<String>();\r\n\t\tif (DBConnection.conn == null) {\r\n\t\t\tDBConnection.openConn();\r\n\t\t}\r\n\t\ttry {\r\n\t\t\tString sql = \"select distinct precinct from InspectionPersonnel\";\r\n\t\t\tps = DBConnection.conn.prepareStatement(sql);\r\n\t\t\trs = ps.executeQuery();\r\n\t\t\twhile (rs.next()) {\r\n\t\t\t\tlist.add(rs.getString(1));\r\n\t\t\t}\r\n\t\t\tDBConnection.closeResultSet(rs);\r\n\t\t\tDBConnection.closeStatement(ps);\r\n\t\t\tDBConnection.closeConn();\r\n\t\t\treturn list;\r\n\t\t} catch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\treturn null;\r\n\t\t}\r\n\t}", "public List<String> getAllUnconfirmedUuids() {\n\t\treturn null;\n\t}", "com.google.protobuf.ProtocolStringList\n getDeleteUserMonsterUuidsList();", "public void printOwners(){\n ArrayList<String> ownerList = new ArrayList<String>();\n\n for(RegistrationPlate plates: this.registrationList.keySet()){\n if(!ownerList.contains(this.registrationList.get(plates)))\n ownerList.add(this.registrationList.get(plates));\n }\n\n printAllOwners(ownerList);\n }", "@Override\r\n\tpublic List<Object[]> getPlantIds() {\n\r\n\t\tList<Object[]> list = null;\r\n\t\ttry {\r\n\t\t\tsql = \"select p.plantId,p.plantName from Plant p\";\r\n\t\t\tlist = getHibernateTemplate().find(sql);\r\n\t\t} catch (Exception e) {\r\n\r\n\t\t}\r\n\t\treturn list;\r\n\t}", "public java.util.List<Todo> findByUuid(String uuid, int start, int end);", "@Override\n\tpublic Collection<Object> getItemIds() {\n\t\tHashSet<Object> filteredItemIds = new HashSet<Object>(super.getItemIds()),\n\t\t\t\titemIds = new HashSet<Object>(filteredItemIds);\n\t\tFilter filter = getAppliedFiltersAsConjunction();\n\t\tItem item = null;\n\t\tfor (Object itemId : itemIds) {\n\t\t\tif (itemId instanceof UUID) {\n\t\t\t\titem = getItem(itemId);\n\t\t\t\tif (item != null) {\n\t\t\t\t\tif (!filter.passesFilter(itemId, item)) {\n\t\t\t\t\t\tfilteredItemIds.remove(itemId);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tfilteredItemIds.remove(itemId);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn filteredItemIds;\n\t}", "private static Set<String> getCurrentStableIdentifiers(MySQLAdaptor dba) throws Exception {\n\t\tCollection<GKInstance> stableIdentifierInstances = dba.fetchInstancesByClass(ReactomeJavaConstants.StableIdentifier);\n\t\tSet<String> currentStableIdentifiersSet = new HashSet<>();\n\t\tfor (GKInstance stableIdentifierInst : stableIdentifierInstances) {\n\t\t\tcurrentStableIdentifiersSet.add(stableIdentifierInst.getAttributeValue(ReactomeJavaConstants.identifier).toString());\n\t\t}\n\t\treturn currentStableIdentifiersSet;\n\t}", "@Override\n\tpublic Iterable<Pessoa> findAll() {\n\t\treturn null;\n\t}", "@GetMapping(\"/phone-privilages\")\n @Timed\n public List<PhonePrivilage> getAllPhonePrivilages() {\n log.debug(\"REST request to get all PhonePrivilages\");\n return phonePrivilageRepository.findAll();\n }", "List<String> toList(Iterable<UUID> ids) {\n\t\tList<String> list = new ArrayList<String>();\n\t\tfor (UUID guid : ids) {\n\t\t\tlist.add(guid.toString());\n\t\t}\n\t\treturn list;\n\t}", "private Set<Hole> createHoleSetWithUNr(){\n ListIterator children = gridPane.getChildren().listIterator();\n Set<Hole> holeSet = new HashSet<>();\n Integer number = -1;\n for (ListIterator it = children; it.hasNext(); ) {\n Node node = (Node) it.next();\n if (node.getId() != null && node.getId().startsWith(number.toString())){\n\n Label sideLabel = (Label) node;\n Label yLabel = (Label) it.next();\n Label sizeLabel = (Label) it.next();\n TextField uNrText = (TextField) it.next();\n\n String side = sideLabel.getText();\n double y = Double.parseDouble( yLabel.getText() );\n double size = Double.parseDouble(sizeLabel.getText());\n int unr = Integer.parseInt( uNrText.getText() );\n\n Hole uniqueHole = new Hole(side,y,size,unr);\n holeSet.add(uniqueHole);\n }\n number++;\n }\n return holeSet;\n }", "private String[] createDvdListWithIds() {\n if (dao.listAll().size() > 0) {\n //create string array set to the size of the dvds that exist\n String[] acceptable = new String[dao.listAll().size()];\n //index counter\n int i = 0;\n //iterate through dvds that exist\n for (DVD currentDVD : dao.listAll()) {\n //at the index set the current Dvd's id, a delimeter, and the title\n acceptable[i] = currentDVD.getId() + \", \" + currentDVD.getTitle();\n //increase the index counter\n i++;\n }\n //return the string array\n return acceptable;\n }\n return null;\n }", "public Map<String, String[]> getAllIdentifiantsUniques() {\n\t\tMap<String, String[]> allIdentifiantsUniques = new HashMap<>();\n\t\ttry {\n\t\t\tallIdentifiantsUniques = utilisateurDAO.selectAllIdentifiantsUniques();\n\t\t} catch (DALException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn allIdentifiantsUniques;\n\t}", "List<ToChuc> findAll();", "io.dstore.values.StringValue getPersonCharacteristicIds();", "public Future<Map<String, UUID>> getResOwners(List<String> resId) {\n {\n Promise<Map<String, UUID>> p = Promise.promise();\n\n Collector<Row, ?, Map<String, UUID>> ownerCollector =\n Collectors.toMap(row -> row.getString(CAT_ID), row -> row.getUUID(PROVIDER_ID));\n pool.withConnection(\n conn ->\n conn.preparedQuery(GET_RES_OWNERS)\n .collecting(ownerCollector)\n .execute(Tuple.of(resId.toArray()))\n .onFailure(\n obj -> {\n LOGGER.error(\"getResOwners db fail :: \" + obj.getLocalizedMessage());\n p.fail(INTERNALERROR);\n })\n .onSuccess(\n success -> {\n p.complete(success.value());\n }));\n\n return p.future();\n }\n }", "@Override\n\tpublic List<Patient> findAll() {\n\t\t// setting logger info\n\t\tlogger.info(\"Find the details of the patient\");\n\t\treturn patientRepo.findAll();\n\t}", "public List<Tipousr> findAllTipos(){\n\t\t List<Tipousr> listado;\n\t\t Query q;\n\t\t em.getTransaction().begin();\n\t\t q=em.createQuery(\"SELECT u FROM Tipousr u ORDER BY u.idTipousr\");\n\t\t listado= q.getResultList();\n\t\t em.getTransaction().commit();\n\t\t return listado;\n\t\t \n\t\t}", "@Override\n @Transactional(readOnly = true)\n public List<PermisoDTO> findAll() {\n log.debug(\"Request to get all Permisos\");\n List<PermisoDTO> result = permisoRepository.findAll().stream()\n .map(permisoMapper::permisoToPermisoDTO)\n .collect(Collectors.toCollection(LinkedList::new));\n\n return result;\n }", "public List<PrimeNr> getAllPrimeNrs(){\n Cursor cursor = database.query(PrimeNrBaseHelper.TABLE,null, null, null, null\n , null, PrimeNrBaseHelper.PRIME_NR);\n\n List<PrimeNr> primeNrList = new ArrayList<>();\n\n try {\n cursor.moveToFirst();\n while(!cursor.isAfterLast()){\n Long pnr = cursor.getLong(cursor.getColumnIndex(PrimeNrBaseHelper.PRIME_NR));\n String foundOn = cursor.getString(cursor.getColumnIndex(PrimeNrBaseHelper.FOUND_ON));\n primeNrList.add(new PrimeNr(pnr, foundOn));\n cursor.moveToNext();\n }\n } finally {\n cursor.close();\n }\n\n return primeNrList;\n }", "public List <reclamation> findall(){\n\t\tList<reclamation> a = reclamationRepository.findAll();\n\t\t\n\t\tfor(reclamation reclamations : a)\n\t\t{\n\t\t\tL.info(\"reclamations :\"+ reclamations);\n\t\t\t\n\t\t}\n\t\treturn a;\n\t\t}", "@Override\n\tpublic String[] soupList() throws RemoteException {\n\t\tString[] list=dao.getSoups();\n\t\treturn list;\n\n\t}", "io.dstore.values.StringValue getSearchNodeCharacteristicIds();", "java.util.List<java.lang.Integer> getRareIdList();", "java.util.List<java.lang.Integer> getRareIdList();", "public Future<List<cn.vertxup.psi.domain.tables.pojos.POutTicket>> findManyBySerial(Collection<String> values) {\n return findManyByCondition(POutTicket.P_OUT_TICKET.SERIAL.in(values));\n }", "private List<ParcelUuid> adv_get_16bit_service_uuids(byte[] raw_record){\n byte[] uuid_raw_bytes = adv_report_parse(BLE_GAP_AD_TYPE_16BIT_SERVICE_UUID_COMPLETE, raw_record);\n if(uuid_raw_bytes == null){\n return null;\n }\n\n long uuid_16bit = ((((uuid_raw_bytes[1]<<8)&0xFF00) + (uuid_raw_bytes[0]&0x00FF))&0xFFFF);\n long high = fbk.climblogger.ConfigVals.BLE_BASE_UUID.getMostSignificantBits() + (uuid_16bit<<32) ;\n long low = fbk.climblogger.ConfigVals.BLE_BASE_UUID.getLeastSignificantBits();\n List<ParcelUuid> UUIDS = new ArrayList<ParcelUuid>();\n UUIDS.add(new ParcelUuid(new UUID(high, low)));\n return UUIDS;\n }", "@Override\n\tpublic String findAll() {\n\t\treturn null;\n\t}", "@Override\n public List<Part> findAll() {\n List<Part> resultList = new ArrayList<>();\n repositoryPart.findAll().iterator().forEachRemaining(resultList::add);\n return resultList;\n }", "@CrossOrigin()\r\n @GetMapping(\"/products/discover\")\r\n Stream<ProductEntity> getDiscoveryProducts() {\n return productRepository\r\n .findAll(PageRequest.of(0, 3, Sort.by(\"numberOfPurchases\").descending()))\r\n .get();\r\n }", "java.lang.String getPriceListUuid();", "@Override\n\tpublic Iterable<Pedido> findAll() {\n\t\treturn null;\n\t}", "@Override\n\tpublic List<Paper> findByUuid(String uuid) {\n\t\treturn findByUuid(uuid, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null);\n\t}", "@GetMapping(\"/all/id\")\n public List<String> getAllId(){\n return productService.getAllId();\n }", "@Override\r\n\tpublic List<Prize> findAll() {\n\t\treturn prizeDao.findAll();\r\n\t}", "@Override\n\tpublic List<item> findAll() {\n\t\treturn donkyClientFeign.lista().stream().map(p -> new item(p,1)).collect(Collectors.toList());\n\t}", "private List<String> searchForPosts(){\n String userId = searchForUser();\n List <String> postIds;\n String response = given().\n get(\"/posts\").then().extract().asString();\n postIds = from(response).getList(String.format(\"findAll { it.userId.equals(%s) }.id\", userId));\n return postIds;\n }", "public Set<String> listPerms(Long userId);", "private static ArrayList<Integer> getInterestingNativePids() {\r\n ArrayList<Integer> pids = getInterestingHalPids();\r\n\r\n int[] nativePids = Process.getPidsForCommands(Watchdog.NATIVE_STACKS_OF_INTEREST);\r\n if (nativePids != null) {\r\n pids.ensureCapacity(pids.size() + nativePids.length);\r\n for (int i : nativePids) {\r\n pids.add(i);\r\n }\r\n }\r\n\r\n return pids;\r\n }", "default Set<UUID> getOpponents(UUID playerId, boolean excludeDeadPlayers) {\n Player player = getPlayer(playerId);\n if (player == null) {\n return new HashSet<>();\n }\n\n return player.getInRange().stream()\n .filter(opponentId -> !opponentId.equals(playerId))\n .filter(opponentId -> !excludeDeadPlayers || !getPlayer(opponentId).hasLost())\n .collect(Collectors.toSet());\n }", "@Transactional(readOnly = true)\n public List<NextOfKinDTO> findAll() {\n log.debug(\"Request to get all NextOfKins\");\n return nextOfKinRepository.findAll().stream()\n .map(nextOfKinMapper::toDto)\n .collect(Collectors.toCollection(LinkedList::new));\n }", "public Future<List<UUID>> resOwner(List<String> ids, String userId) {\n Promise<List<UUID>> p = Promise.promise();\n\n Collector<Row, ?, List<UUID>> providerIdCollector =\n Collectors.mapping(row -> row.getUUID(PROVIDER_ID), Collectors.toList());\n\n pool.withConnection(\n conn ->\n conn.preparedQuery(RES_OWNER)\n .collecting(providerIdCollector)\n .execute(\n Tuple.of(UUID.fromString(userId)).addArrayOfString(ids.toArray(String[]::new)))\n .onFailure(\n obj -> {\n LOGGER.error(\"resOwner db fail :: \" + obj.getLocalizedMessage());\n p.fail(INTERNALERROR);\n })\n .onSuccess(\n success -> {\n p.complete(success.value());\n }));\n\n return p.future();\n }", "@Override\r\n\tpublic List<Disease> findAll() {\r\n\t\t// setting logger info\r\n\t\tlogger.info(\"Find the details of the disease\");\r\n\t\treturn diseaseRepo.findAll();\r\n\t}", "public java.util.List<wsihash> findAll();", "List<NotificacionInfo> findAll();", "public List<PokemonEntity> findAll() {\n LOGGER.log(Level.INFO, \"Consultando todas los trayectos\");\n // Se crea un query para buscar todas las ciudades en la base de datos.\n TypedQuery query = em.createQuery(\"select u from PokemonEntity u\", PokemonEntity.class);\n // Note que en el query se hace uso del método getResultList() que obtiene una lista de ciudades.\n return query.getResultList();\n}", "@Override\r\n public ProductosPuntoVenta[] findAll()\r\n throws ProductosPuntoVentaDaoException {\r\n return findByDynamicSelect(SQL_SELECT + \" ORDER BY id_pdv\", null);\r\n }", "List<Registration> allRegTrail(long idTrail);", "private Object saveGivens() {\n List<String> out = new ArrayList<>();\n for(UUID id : givenEmpty) {\n out.add(id.toString());\n }\n return out;\n }", "public List<String> getFillTextFillPartOfSpeechTags() {\n return fetchMultipleValues(\"de.saschafeldmann.adesso.master.thesis.detection.filltext.fill.part.of.speech.tags\");\n }", "public List<Node> getPillList();", "@Transactional(readOnly = true)\n List<Protein> getProteinsByIds(Set<Long> proteinIds);", "String findAllAggrGroupByDistinct();", "@Override\n public List<Piscine> afficherPiscines() {\n return piscineRepo.findAll();\n }", "@SuppressWarnings(\"deprecation\")\n public final void getRoomIdAndNames() {\n List<String> custom_names = getCustomRoomNames();\n TARDISARS[] ars = TARDISARS.values();\n // less non-room types\n int l = (custom_names.size() + ars.length) - 3;\n this.room_ids = new ArrayList<Integer>();\n this.room_names = new ArrayList<String>();\n for (TARDISARS a : ars) {\n if (a.getOffset() != 0) {\n this.room_ids.add(a.getId());\n this.room_names.add(a.getDescriptiveName());\n }\n }\n for (final String c : custom_names) {\n this.room_ids.add(Material.valueOf(plugin.getRoomsConfig().getString(\"rooms.\" + c + \".seed\")).getId());\n final String uc = ucfirst(c);\n this.room_names.add(uc);\n TARDISARS.addNewARS(new ARS() {\n @Override\n public int getId() {\n return Material.valueOf(plugin.getRoomsConfig().getString(\"rooms.\" + c + \".seed\")).getId();\n }\n\n @Override\n public String getActualName() {\n return c;\n }\n\n @Override\n public String getDescriptiveName() {\n return uc;\n }\n\n @Override\n public int getOffset() {\n return 1;\n }\n });\n }\n }", "java.util.List<POGOProtos.Rpc.CombatProto.CombatPokemonProto> \n getReservePokemonList();", "public interface ElgPlatformIdRepository extends JpaRepository<ElgPlatformId, String> {\n\n public ElgPlatformId findByPlatformId(String platFormId); \n \n @Query(value = \"select distinct(trim(p.platformId)) as platformId from ElgPlatformId p, ElgPlatformCarrierMap c, ElgEligProfileEpf pr \" +\n\t \"where p.platformId = c.platformId and c.carrierId = pr.carCarrierId order by platformId\") \n public List<String> getAllPlatforms();\n\n \n}", "public String[] randomNames() {\n \n \n Random generator = new Random();\n \n Set randomNumbersName = new HashSet();\n\n for(int i = 0; i < model.getNoOfDevices(); i++)\n {\n Boolean unique = false;\n\n while(!unique)\n {\n int oldSize = randomNumbersName.size();\n\n int r = generator.nextInt(names.size());\n randomNumbersName.add(names.get(r));\n\n int newSize = randomNumbersName.size();\n\n if(newSize > oldSize)\n {\n unique = true;\n }\n }\n\n }\n\n return (String[]) randomNumbersName.toArray(new String[model.getNoOfDevices()]);\n \n }", "public List<Pokemon> showAllPokemon() {\r\n\t\tEntityManager em = emfactory.createEntityManager();\r\n\t\t@SuppressWarnings(\"unchecked\")\r\n\t\tList<Pokemon> allPokemon = em.createQuery(\"SELECT p FROM Pokemon p\").getResultList();\r\n\t\treturn allPokemon;\r\n\t}", "public List<PedidoMaterialModel> findAll(){\n \n List<PedidoMaterialModel> pedidosM = new ArrayList<>();\n \n return pedidosM = pedidoMaterialConverter.entitiesToModels(pedidoMaterialRepository.findAll());\n }", "Set<String> getIdentifiers();", "public List<LogicalTernminationPointMO> queryLtpByUuids(List<String> uuids) throws ServiceException {\r\n return ltpInvDao.query(uuids);\r\n }", "private void collectRandomRIDs(){\n\t\tint numRIDs = iterations + 1;\n\t\trandomRID_list = new String[numRIDs];\n\t\tString randomClusterName;\n\t\tint clusterID, randomPosition;\n\t\t\n\t\t// Collect #iterations of random RID's\n\t\tfor(int i=0; i < numRIDs; i++){\n\t\t\trandomClusterName = env.VERTEX_PREFIX + (int) (Math.random() * env.NUM_VERTEX_TYPE);\n\t\t\tclusterID = db.getClusterIdByName(randomClusterName); \n\t\t\tOClusterPosition [] range = db.getStorage().getClusterDataRange(clusterID);\n\t\t\t\n\t\t\trandomPosition = (int) (Math.random() * range[1].intValue()) + range[0].intValue();\n\t\t\trandomRID_list[i] = \"#\" + clusterID + \":\" + randomPosition;\n\t\t}\n\t\t\n\t}", "public List<DIS001> findAll_DIS001();", "public Utente[] findAll() throws UtenteDaoException\n\t{\n\t\treturn findByDynamicSelect( SQL_SELECT + \" ORDER BY ute_id\", null );\n\t}", "@Transactional(readOnly = true) \n public List<PtoPeriodDTO> findAll() {\n log.debug(\"Request to get all PtoPeriods\");\n List<PtoPeriodDTO> result = ptoPeriodRepository.findAll().stream()\n .map(ptoPeriodMapper::ptoPeriodToPtoPeriodDTO)\n .collect(Collectors.toCollection(LinkedList::new));\n\n if(result.isEmpty()){\n \tresult.add(initialPtoPeriod());\n }\n \n return result;\n }", "public static List<Integer> findAllIdsUsers( )\n {\n return _dao.selectAllIdsUser( _plugin );\n }", "public Future<List<cn.vertxup.psi.domain.tables.pojos.POutTicket>> findManyBySerial(Collection<String> values, int limit) {\n return findManyByCondition(POutTicket.P_OUT_TICKET.SERIAL.in(values),limit);\n }", "private List<Character> lookupPlayerCharacters() throws SQLException {\n QueryBuilder<Character, Integer> charactersQb = characterDao.queryBuilder();\n charactersQb.where().in(\"isPlayer\", true);\n return charactersQb.query();\n }", "private static final String FIND_ALL() {\r\n\t\treturn \"from Shipping3VO vo \";\r\n\t}", "List<PaymentsIdResponse> getAllPaymentsId();", "@GetMapping(\"\")\n public Iterable<Donut> returAllDonuts(){\n\n return this.donutRepository.findAll();\n\n }", "List<ItemPedido> findAll();", "public static List getAllNames() {\n List polovniautomobili = new ArrayList<>();\n try {\n CONNECTION = DriverManager.getConnection(URL, USERNAME, PASSWORD);\n String query = \"SELECT naziv FROM polovni\";\n try (PreparedStatement ps = CONNECTION.prepareStatement(query)) {\n ResultSet result = ps.executeQuery();\n while (result.next()) {\n String naziv = result.getString(\"naziv\");\n polovniautomobili.add(naziv);\n\n }\n\n ps.close();\n CONNECTION.close();\n }\n CONNECTION.close();\n } catch (SQLException ex) {\n Logger.getLogger(Register.class.getName()).log(Level.SEVERE, null, ex);\n }\n return polovniautomobili;\n }", "public String[] ListaPuertos() {\n listaPuertos = CommPortIdentifier.getPortIdentifiers();\n String[] puertos = null;\n ArrayList p = new ArrayList();\n int i = 0;\n while (listaPuertos.hasMoreElements()) {\n id_Puerto = (CommPortIdentifier) listaPuertos.nextElement();\n if (id_Puerto.getPortType() == 1) {\n p.add(id_Puerto.getName());\n }\n i++;\n }\n puertos = new String[p.size()];\n return (String[]) p.toArray(puertos);\n }", "@GetMapping(\"/provider-commands\")\n @Transactional\n public List<ProviderCommand> getAllProviderCommands() {\n List<ProviderCommand> commands = providerCommandService.findAll();\n List<ProviderCommand> fakeProviders = new ArrayList<>();\n for (final ProviderCommand command:commands){\n final ProviderCommand pCommand = getLocalProviderCommand(command.getId());\n for(SecurityParams param:command.getSecurityParams()){\n param.getId();\n }\n for(SecurityParams param:command.getServiceSecurity().getSecurityParams()){\n param.getId();\n }\n fakeProviders.add(pCommand);\n// break;\n }\n return fakeProviders;\n }" ]
[ "0.5451133", "0.52532786", "0.5017727", "0.49009937", "0.48626179", "0.48558137", "0.48209545", "0.48030117", "0.4796302", "0.47814897", "0.47690338", "0.47665662", "0.47636664", "0.47524595", "0.4751993", "0.4751321", "0.47173396", "0.47156918", "0.47153607", "0.47066295", "0.4698535", "0.46942043", "0.46769887", "0.46744478", "0.46689758", "0.4623134", "0.46026945", "0.45894194", "0.45835894", "0.4572935", "0.45718542", "0.455364", "0.45516983", "0.45510635", "0.45417592", "0.45343468", "0.45294905", "0.45269495", "0.4526087", "0.45259625", "0.45253357", "0.45237443", "0.45218217", "0.45178428", "0.45163307", "0.4511078", "0.45028427", "0.45011032", "0.45011032", "0.4498603", "0.44974032", "0.44902343", "0.44896844", "0.44888428", "0.44725347", "0.44667596", "0.44627157", "0.44593835", "0.44530046", "0.44496804", "0.44431698", "0.44388315", "0.44383854", "0.443721", "0.44339263", "0.44327095", "0.4425626", "0.44216472", "0.44215643", "0.44198877", "0.4416278", "0.4414793", "0.44101974", "0.44092926", "0.4406699", "0.44015813", "0.44010004", "0.43998852", "0.43974224", "0.4396125", "0.4393903", "0.43884346", "0.43744603", "0.43740165", "0.4373011", "0.4371508", "0.43714726", "0.43693706", "0.43692738", "0.43687683", "0.43566084", "0.43545684", "0.43517163", "0.4347033", "0.4346071", "0.43378395", "0.43378296", "0.43365824", "0.43331993", "0.43306446" ]
0.64288056
0
Delete pills dispensed by pills dispensed uuid.
public static void deletePillsDispensedByPillsDispensedUuid(MasterConfig masterConfig, String pillsDispensedUuid ) throws Exception { Connection con = null; PreparedStatement pstmt = null; try { con = PooledDataSource.getInstance(masterConfig).getConnection(); con.setAutoCommit(true); pstmt = con.prepareStatement(sqlDeletePillsDispensedByPillsDispensedUuid); int offset = 1; pstmt.setString(offset++, pillsDispensedUuid); pstmt.execute(); } catch (Exception e) { logger.error(e.getMessage(), e); throw e; } finally { try { if (pstmt != null) pstmt.close(); } catch (Exception e) { logger.warn(e); } try { if (con != null) con.close(); } catch (Exception exCon) { logger.warn(exCon.getMessage()); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void deletePokemon(Long pokemonId);", "public static void deleteImageBytesByPillsDispensedUuid(MasterConfig masterConfig, String pillsDispensedUuid ) throws Exception {\n\t\tConnection con = null;\n\t\tPreparedStatement pstmt = null;\n\t\ttry {\n\t\t\tcon = PooledDataSource.getInstance(masterConfig).getConnection();\n\t\t\tcon.setAutoCommit(true);\n\t\t\tpstmt = con.prepareStatement(sqlDeleteImageBytesByPillsDispensedUuid);\n\t\t\tint offset = 1;\n\t\t\tpstmt.setString(offset++, pillsDispensedUuid);\n\t\t\tpstmt.execute();\n\t\t} catch (Exception e) {\n\t\t\tlogger.error(e.getMessage(), e);\n\t\t\tthrow e;\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tif (pstmt != null)\n\t\t\t\t\tpstmt.close();\n\t\t\t} catch (Exception e) {\n\t\t\t\tlogger.warn(e);\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tif (con != null)\n\t\t\t\t\tcon.close();\n\t\t\t} catch (Exception exCon) {\n\t\t\t\tlogger.warn(exCon.getMessage());\n\t\t\t}\n\t\t}\n\t}", "public void deleteEquipoComunidad(EquipoComunidad equipoComunidad);", "public void removeByequip_id(long equip_id);", "void eliminarPedido(UUID idPedido);", "String deleteProvider(String provID) throws RepoxException;", "public static String deletePaidBills(){\n return \"delete from current_bills where cb_paid = 1\";\n }", "void removePC(UUID uID);", "int deleteByPrimaryKey(String repaymentId);", "int deleteByPrimaryKey(Integer actPrizeId);", "@Override\r\n\tpublic TaotaoResult DeletePunishment(Long id) {\n\t\treturn null;\r\n\t}", "@Override\r\n\tpublic GlobalResult deleteEquip(String mspno) {\n\t\treturn null;\r\n\t}", "int deleteByExample(RepaymentPlanInfoUnExample example);", "String deleteProvider(String providerId) throws RepoxException;", "void deleteElective(Long id);", "private void deletion(String pids) {\n\t\tDeletions(pids);\n\t\t\n\t}", "@Delete\n Single<Integer> delete(Collection<Motivator> motivators);", "@Override\n public void delete(Promocion prm) {\n promocionRepository.delete(prm);\n }", "private void removeProdutos() {\n Collection<IProduto> prods = this.controller.getProdutos();\n for(IProduto p : prods) System.out.println(\" -> \" + p.getCodigo() + \" \" + p.getNome());\n System.out.println(\"Insira o codigo do produto que pretende remover da lista de produtos?\");\n String codigo = Input.lerString();\n // Aqui devia se verificar se o produto existe mas nao sei fazer isso.\n this.controller.removeProdutoControl(codigo);\n }", "void removeDrawDetail(Pool pool);", "int deleteByPrimaryKey(String terminalId);", "void deleteProduct(Long id);", "@Override\r\n\tpublic int deleteProduitPanier(Produit p, Panier pan) {\n\t\treturn 0;\r\n\t}", "void deleteProduct(Integer productId);", "public void eliminar(Provincia provincia) throws BusinessErrorHelper;", "void delete(String uuid);", "public void deleteProveedor (Long id_proveedor){\n proveedorPersistence.delete(id_proveedor);\n }", "public void deletePromocion (Long id_p_Promocion_hotel){\n proveedorPromocionHotelPersistence.delete(id_p_Promocion_hotel);\n }", "int deleteByPrimaryKey(String industryId);", "public void deleteByVaiTroID(long vaiTroId);", "@Override\n public void deletePartida(String idPartida) {\n template.opsForHash().delete(idPartida, \"jugador1\");\n template.opsForHash().delete(idPartida, \"jugador2\");\n template.opsForSet().remove(\"partidas\",idPartida);\n }", "public void removePoItems(int pid) throws Exception {\n String query = \"SELECT * FROM PO WHERE id=?\";\n try (Connection con = this.ds.getConnection();\n PreparedStatement p = con.prepareStatement(query);\n PreparedStatement p2 = con.prepareStatement(\"DELETE FROM POItem WHERE id = ?\")) {\n p.setInt(1, pid);\n ResultSet r = p.executeQuery();\n if (!r.next()) throw new Exception(\"Purchase Order doesn't exist.\");\n p2.setInt(1, pid);\n p2.executeUpdate();\n }\n }", "public void removeByUuid_C(String uuid, long companyId);", "public void removeByUuid_C(String uuid, long companyId);", "public void removeByUuid_C(String uuid, long companyId);", "public void removeByUuid_C(java.lang.String uuid, long companyId);", "private void Drop(String[]p){\n List<DeputyTableItem> dti;\n dti = Drop1(p);\n for(DeputyTableItem item:dti){\n deputyt.deputyTable.remove(item);\n }\n }", "public void deleteParticipacao(Integer id) {\n participacaoRepository.deleteById(id);\n //listClient();\n \n}", "@Override\n\tpublic void delete(Integer deptno) {\n\t\t\n\t}", "void deleteBypostno(int postno);", "@Test public void deletePentagonalPyramid()\n {\n PentagonalPyramid[] pArray = new PentagonalPyramid[100];\n PentagonalPyramid p1 = new PentagonalPyramid(\"PP1\", 1, 2);\n PentagonalPyramid p2 = new PentagonalPyramid(\"PP1\", 2, 3);\n PentagonalPyramid p3 = new PentagonalPyramid(\"PP1\", 3, 4);\n pArray[0] = p1;\n pArray[1] = p2;\n pArray[2] = p3;\n \n PentagonalPyramidList2 pList = new PentagonalPyramidList2(\"ListName\", \n pArray, 3);\n \n Assert.assertEquals(p1, pList.deletePentagonalPyramid(\"PP1\"));\n }", "public ReceivingSpace planToRemoveGoodsListWithSmartPallet(ReceivingSpace receivingSpace, String smartPalletId, Map<String,Object> options)throws Exception;", "CommonResponse deletePurchaseOrderPerPhoId(long pohId);", "public void eliminarNotas(int id ){\n String[] campos = {Integer.toString(id)};\n db.delete(\"nota\",\"_id=?\",campos);\n }", "public void delete(SgfensPedidoProductoPk pk) throws SgfensPedidoProductoDaoException;", "void deleteExpense(Expense target) throws NoUserSelectedException;", "public String deleteProductionBlock(ProductionBlock pb);", "@Delete\n Single<Integer> delete(Motivator motivator);", "void delete( String officeCode );", "public void deletePrioritaet(int prioID) throws Exception;", "int deleteByPrimaryKey(Integer productAttributesId);", "int deleteByExample(PayLogInfoPoExample example);", "void removeDetail(String id);", "public String deleterPetDetails(int petId);", "@GetMapping(\"/delete\")\n public RedirectView delete(Long id, Principal p) {\n if(applicationUserRepository.findByUsername(p.getName()).getAdmin()) {\n for (LineItem item : lineItemRepository.findAll()) {\n if (item.getProduct().getId() == id) {\n lineItemRepository.deleteById(item.getId());\n }\n }\n productRepository.deleteById(id);\n }\n return new RedirectView(\"/products\");\n }", "int deleteByPrimaryKey(@Param(\"nodeId\") String nodeId, @Param(\"departmentId\") String departmentId, @Param(\"jobId\") String jobId, @Param(\"processDictId\") String processDictId, @Param(\"uuid\") String uuid);", "int deleteByExample(DisproductExample example);", "public void deletePromo() {\n\t\tviewPromoPackage();\n\t\t\n\t\tScanner dlSC = new Scanner(System.in);\n\t\tpp.clear();\n\t\t\n\t\tboolean checkRemove = true;\n\t\tboolean isRunning = true;\n\t\t\n\t\twhile (isRunning) {\n\t\t\tdo \n\t\t\t{\n\t\t\t\ttry {\n\t\t\t\t\t// Get data contents from saved file\n\t\t\t\t\tFileInputStream fis = new FileInputStream(\"promoData\");\n\t\t ObjectInputStream ois = new ObjectInputStream(fis);\n\t\t \n\t\t pp = (ArrayList<PromotionalPackage>) ois.readObject();\n\t\t \n\t\t ois.close();\n\t\t fis.close();\n\t\t \n\t\t System.out.println(\"Promotional Package to Delete (-1 to Complete):\");\n\t\t \t\tString promoPackID = dlSC.next();\n\t\t \n\t\t checkRemove = pp.removeIf(menuItem -> menuItem.getPackageID().equals(promoPackID.toUpperCase()));\n\t\t \n\t\t if (promoPackID.equals(\"-1\")) {\n\t\t\t\t\t\tisRunning = false;\n\t\t\t\t\t\tbreak;\n\t\t }\n\t\t \n\t\t if (checkRemove) {\n\t\t \ttry {\n\t\t \tFileOutputStream fos = new FileOutputStream(\"promoData\");\n\t\t \t\t\t\tObjectOutputStream oos = new ObjectOutputStream(fos);\n\t\t \t\t\t\toos.writeObject(pp);\n\t\t \t\t\t\toos.close();\n\t\t \t\t\t\tfos.close();\n\t\t }\n\t\t catch (IOException e) {\n\t\t \t\t\tSystem.out.println(\"Failed to delete promotion!\");\n\t\t \t\t\treturn;\n\t\t \t\t}\n\t\t \tbreak;\n\t\t }\n\t\t \n\t\t checkRemove = false;\n\t\t System.out.println(\"Promo Package not found. Please try again!\");\n\t\t\t\t} \n\t\t\t\tcatch (IOException e) {\n\t\t\t\t\tSystem.out.println(\"No promotions to delete!\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tcatch (ClassNotFoundException c) {\n\t\t\t\t\tc.printStackTrace();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t\twhile (!checkRemove);\n\t\t}\n\t\t\n\t}", "public void eliminarTripulante(Long id);", "public void removeJpmProductSaleNew(final Long uniNo);", "boolean removeVariableDiscount(int id,int acc_no);", "void delete(String receiptHandle);", "@Override\n public void delete(Long id) {\n log.debug(\"Request to delete CustomProcess : {}\", id);\n customProcessRepository.deleteById(id);\n }", "int deleteByExample(SmtOrderProductAttributesExample example);", "public abstract BossBar removePlayer(UUID uuid);", "void deleteAllDiscounts();", "@DeleteMapping(\"/produtos/{id}\")\n @Timed\n public ResponseEntity<Void> deleteProduto(@PathVariable Long id) {\n log.debug(\"REST request to delete Produto : {}\", id);\n\n//////////////////////////////////REQUER PRIVILEGIOS\n if (PrivilegioService.podeDeletar(cargoRepository, ENTITY_NAME)) {\n produtoRepository.delete(id);\n } else {\n log.error(\"TENTATIVA DE EXCUIR SEM PERMISSÃO BLOQUEADA! \" + ENTITY_NAME + \" : {}\", id);\n return ResponseEntity.badRequest().headers(HeaderUtil.createFailureAlert(ENTITY_NAME, \"privilegios insuficientes.\", \"Este usuario não possui privilegios sufuentes para deletar esta entidade.\")).body(null);\n }\n//////////////////////////////////REQUER PRIVILEGIOS\n return ResponseEntity.ok().headers(HeaderUtil.createEntityDeletionAlert(ENTITY_NAME, id.toString())).build();\n }", "int deleteByPrimaryKey(String taxregcode);", "int deleteByExample(TerminalInfoExample example);", "public static void deletePromLookup(int envId, int compId, String lookupVaule) {\n\t\tSession session = HibernateConfig.getSessionFactory().getCurrentSession();\n\t\tTransaction txn = session.beginTransaction();\n\t\tQuery query = session.createQuery(HQLConstants.DB_QUERY_DELETE_PROM_LOOKUP);\n\t\tquery.setLong(\"compId\", compId);\n\t\tquery.setLong(\"envId\", envId);\n\t\tquery.setString(\"lookupVaule\", lookupVaule);\n\t\tquery.executeUpdate();\n\t\ttxn.commit();\n\t}", "@Delete\n Single<Integer> delete(Motivator... motivators);", "public void deleteProduto(int cd_Produto) {\n pdao.deleteProduto(cd_Produto);\n }", "@RequestMapping(value = \"/pgmsAppRetirmntPens/{id}\",\n method = RequestMethod.DELETE,\n produces = MediaType.APPLICATION_JSON_VALUE)\n @Timed\n public ResponseEntity<Void> deletePgmsAppRetirmntPen(@PathVariable Long id) {\n log.debug(\"REST request to delete PgmsAppRetirmntPen : {}\", id);\n pgmsAppRetirmntPenRepository.delete(id);\n pgmsAppRetirmntPenSearchRepository.delete(id);\n return ResponseEntity.ok().headers(HeaderUtil.createEntityDeletionAlert(\"pgmsAppRetirmntPen\", id.toString())).build();\n }", "@Override\n public void delete(ReporteAccidente rep) {\n repr.delete(rep);\n }", "public void deleteCrime(UUID id) {\n\n }", "int deleteByExample(PurchasePaymentExample example);", "int deleteByExample(PensionRoleMenuExample example);", "@Override\n\tpublic int deleteByPrimaryKey(Integer permisId) {\n\t\treturn 0;\n\t}", "@Override\r\n\tpublic void deleteBySerialNumber(String serialNumber) {\r\n\t\tdeviceInventoryRepository.deleteBySerialNumber(serialNumber);\r\n\t}", "void delete(SecretIdentifier secretIdentifier);", "public void deleteByChucVuID(long chucVuId);", "public void deleteDepartmentByDeptNo(int dept_no);", "public void deleteSnippeFromDB(int id) {\r\n statsRepo.deleteById(id);\r\n }", "@Test public void deletePentagonalPyramid2Test() {\n PentagonalPyramid[] pArray = new PentagonalPyramid[20];\n pArray[0] = new PentagonalPyramid(\"PP1\", 1, 2);\n pArray[1] = new PentagonalPyramid(\"PP1\", 2, 3);\n pArray[2] = new PentagonalPyramid(\"PP1\", 3, 4);\n PentagonalPyramidList2 pList2 = new PentagonalPyramidList2(\"Test List\", \n pArray, 3);\n pList2.deletePentagonalPyramid(\"ss\");\n Assert.assertEquals(\"Test\", pArray[2], pArray[2]);\n }", "public void DeleteProductById(String pid) {\r\n String query = \"delete from Trungnxhe141261_Product\\n\"\r\n + \"where id=?\";\r\n\r\n try {\r\n conn = new DBContext().getConnection();//mo ket noi voi sql\r\n ps = conn.prepareStatement(query);\r\n ps.setString(1, pid);\r\n ps.executeUpdate();\r\n } catch (Exception e) {\r\n }\r\n\r\n }", "public void removeByUuid(String uuid);", "public void removeByUuid(String uuid);", "public void removeByUuid(String uuid);", "int deleteByExample(PaymentTradeExample example);", "public void removeByUuid(java.lang.String uuid);", "public void deleteBeneficioDeuda(Map parametros);", "void removeProduct(int position) throws ProductNotFoundException;", "public void removeInwDepartCompetence(final String id);", "@Override\n public void eliminarPropiedad(String pIdPropiedad) {\n try {\n bdPropiedad.manipulationQuery(\"DELETE FROM PROPIEDAD WHERE ID_PROPIEDAD = '\" + pIdPropiedad + \"'\");\n } catch (SQLException ex) {\n Logger.getLogger(Propiedad.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "@DeleteMapping(\"/deliver-managements/{id}\")\n @Timed\n public ResponseEntity<Void> deleteDeliverManagement(@PathVariable Long id) {\n log.debug(\"REST request to delete DeliverManagement : {}\", id);\n deliverManagementRepository.delete(id);\n return ResponseEntity.ok().headers(HeaderUtil.createEntityDeletionAlert(ENTITY_NAME, id.toString())).build();\n }", "public void deleteGestionStock(Map criteria);", "public void eliminar(Producto producto) throws IWDaoException;", "SpCharInSeq delete(Integer spcharinseqId);", "int deleteByExample(ItoProductCriteria example);", "@DeleteMapping(\"/phone-privilages/{id}\")\n @Timed\n public ResponseEntity<Void> deletePhonePrivilage(@PathVariable Long id) {\n log.debug(\"REST request to delete PhonePrivilage : {}\", id);\n\n phonePrivilageRepository.deleteById(id);\n return ResponseEntity.ok().headers(HeaderUtil.createEntityDeletionAlert(ENTITY_NAME, id.toString())).build();\n }" ]
[ "0.600786", "0.60053307", "0.5710554", "0.56936395", "0.56837106", "0.5683275", "0.5614295", "0.55874103", "0.54712695", "0.5469679", "0.54192996", "0.53952736", "0.5384172", "0.5334623", "0.53190434", "0.53053504", "0.5292803", "0.529164", "0.5288522", "0.5266265", "0.52615756", "0.5260822", "0.5256155", "0.52557266", "0.5242143", "0.52354693", "0.52289206", "0.5221399", "0.52212554", "0.52168196", "0.5212692", "0.5212506", "0.5210141", "0.5210141", "0.5210141", "0.52097774", "0.5207934", "0.520513", "0.5191759", "0.5180377", "0.51736385", "0.5157198", "0.5141116", "0.51396567", "0.5137682", "0.5127238", "0.51237595", "0.5118203", "0.51020926", "0.50970083", "0.5093026", "0.50771755", "0.5074498", "0.50720453", "0.50618917", "0.5054967", "0.50512946", "0.50494385", "0.5049366", "0.5046882", "0.5046435", "0.5046247", "0.5044326", "0.5037674", "0.5036996", "0.5031739", "0.50290847", "0.5028769", "0.5022211", "0.50187325", "0.5007901", "0.50060827", "0.50011206", "0.49966627", "0.4993186", "0.49888358", "0.498534", "0.49796975", "0.4977891", "0.497565", "0.49730396", "0.4966436", "0.49621737", "0.4961311", "0.49595433", "0.49541736", "0.49541736", "0.49541736", "0.49532008", "0.49486557", "0.4940935", "0.4940657", "0.4940178", "0.49376014", "0.49370524", "0.49344814", "0.49340796", "0.49324524", "0.49298328", "0.49297115" ]
0.70330846
0
Delete image bytes by pills dispensed uuid.
public static void deleteImageBytesByPillsDispensedUuid(MasterConfig masterConfig, String pillsDispensedUuid ) throws Exception { Connection con = null; PreparedStatement pstmt = null; try { con = PooledDataSource.getInstance(masterConfig).getConnection(); con.setAutoCommit(true); pstmt = con.prepareStatement(sqlDeleteImageBytesByPillsDispensedUuid); int offset = 1; pstmt.setString(offset++, pillsDispensedUuid); pstmt.execute(); } catch (Exception e) { logger.error(e.getMessage(), e); throw e; } finally { try { if (pstmt != null) pstmt.close(); } catch (Exception e) { logger.warn(e); } try { if (con != null) con.close(); } catch (Exception exCon) { logger.warn(exCon.getMessage()); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void delete(String uuid);", "int deleteImage(int pos);", "public void removeByUuid(String uuid);", "public void removeByUuid(String uuid);", "public void removeByUuid(String uuid);", "public void removeByUuid(java.lang.String uuid);", "void delete(UUID uuid) throws DataNotFoundInStorage, FailedToDeleteDataInStorage;", "@Override\n\tpublic void delImgrep(int num) {\n\t\tdao.delete(num);\n\t}", "void removePC(UUID uID);", "int deleteByPrimaryKey(String uuid);", "void delete(UUID id);", "void delete(UUID id);", "void delete(UUID id);", "void delete(UUID id);", "public void removeByUuid_C(java.lang.String uuid, long companyId);", "@DeleteMapping(\"/partner-imgs/{id}\")\n @Timed\n public ResponseEntity<Void> deletePartnerImg(@PathVariable Long id) {\n log.debug(\"REST request to delete PartnerImg : {}\", id);\n partnerImgService.delete(id);\n return ResponseEntity.ok().headers(HeaderUtil.createEntityDeletionAlert(ENTITY_NAME, id.toString())).build();\n }", "public Image getDelete();", "public boolean delete(byte[] key) throws Exception;", "@Override\n public void delete(Long id) {\n log.debug(\"Request to delete FicheroByte : {}\", id);\n ficheroByteRepository.deleteById(id);\n }", "public void removeByUuid_C(String uuid, long companyId);", "public void removeByUuid_C(String uuid, long companyId);", "public void removeByUuid_C(String uuid, long companyId);", "@Override\n\tpublic void deleteProductImage(String id) {\n\t\tthis.productGaleryRepository.deleteById(Long.parseLong(id));\n\t}", "private void deleteImage(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t\tint id= Integer.parseInt(request.getParameter(\"fileId\"));\n\t\tFiles file= new FilesDAO().view(id);\n\t\t//Logic to delete the file from the database\n\t\t\n\t\tnew FilesDAO().delete(id);\n\t\t\n\t\t\n\t\t//Logic to delete file from the file system\n\t\t\n\t\tFile fileOnDisk= new File(path+file.getFileName());\n\t\tif(fileOnDisk.delete()) {\n\t\t\tSystem.out.println(\"File deleted from the folder\");\n\t\t}\n\t\telse {\n\t\t\tSystem.out.println(\"Sorr! file couldn't get deleted from the folder\");\n\t\t}\n\t\tlistingPage(request, response);\n\t}", "void deleteArgumentById(UUID id);", "void delete(String identifier) throws IOException;", "public yandex.cloud.api.operation.OperationOuterClass.Operation delete(yandex.cloud.api.containerregistry.v1.ImageServiceOuterClass.DeleteImageRequest request) {\n return io.grpc.stub.ClientCalls.blockingUnaryCall(\n getChannel(), getDeleteMethod(), getCallOptions(), request);\n }", "boolean deleteImage(Image img) {\r\n\t\treturn true;\r\n\t}", "public void deleteRpiPhoto(String rpiId, String time) throws SQLException;", "@Override\n\tpublic int deleteProductPhoto(String productNo) {\n\t\treturn 0;\n\t}", "int deleteByExample(EnterprisePictureExample example);", "void removePhoto(User user, String photoId);", "void deleteAttachment(int id) throws NotAuthorizedException;", "@POST\n @Path(\"/delete\")\n public Response deleteImage(){\n this.organizationLogoService.deleteOrganizationLogo();\n return Response.status(200).build();\n }", "public void delete(String so_cd);", "public void removeImage(Image image) {\n\t\tFile file = new File(image.getByteOrpart());\n\n\tif(file.delete()){\n\t\t\tSystem.out.println(file.getName() + \" is deleted!\");\n\t}else{\n\t\t\tSystem.out.println(\"Delete operation is failed.\");\n\t\t}\n\t\t\n\t}", "public abstract void removeUserImages(Call serviceCall, Response serviceResponse, CallContext messageContext);", "public String deleteImage(String username, String imageName) {\r\n\t\tUser user = getUser(username);\r\n\t\tPoint p;\r\n\t\tString destinationPeerIP;\r\n\t\t\r\n\t\tp = StaticFunctions.hashToPoint(username, imageName);\r\n\t\tSystem.out.println(StaticFunctions.hashTester(username, imageName));\r\n\t\ttry {\r\n\t\t\tif(lookup(p)) {\r\n\t\t\t\t//deletes the files\r\n\t\t\t\tdeleteImageContainer(username, imageName);\r\n\t\t\t} else {\r\n\t\t\t\t//delete the files on remote Peer\r\n\t\t\t\tdestinationPeerIP = routing(p).getIp_adresse();\r\n\t\t\t\tnew PeerClient().deleteImage(destinationPeerIP, username, imageName);\r\n\t\t\t}\r\n\t\t\tuser.deleteFromImageList(imageName);\r\n\t\t\texportUserList();\r\n\t\t} catch (Exception e) {\r\n\t\t\treturn \"Some errors have occured.\";\r\n\t\t}\r\n\t\treturn \"image has been deleted.\";\r\n\t}", "boolean remove(byte[] key);", "@Override\n\tpublic void delete(ThumbnailDTO dto) throws Exception {\n\t\tsession.selectOne(namespace+\".thumbnailDataDelete\",dto);\n\t}", "public void clearImage() {\n IntStream.range(0, bytes.length).forEach(i -> bytes[i] = CLEAR_BYTE);\n }", "public void deleteObjectFromUID(String s) throws UIDException {\n \r\n }", "public void mo33887ck(Context context, String str) {\n if (context != null) {\n try {\n context.getContentResolver().delete(Media.EXTERNAL_CONTENT_URI, \"_data= ?\", new String[]{str});\n } catch (Throwable th) {\n th.printStackTrace();\n }\n }\n }", "public ByteBuf remove(int bytes, ChannelPromise aggregatePromise)\r\n/* 31: */ {\r\n/* 32:63 */ return remove(this.channel.alloc(), bytes, aggregatePromise);\r\n/* 33: */ }", "@Override\n public void onDeleteImage(Path path, int offset) {\n onCommitDeleteImage(); // commit the previous deletion\n mDeletePath = path;\n mDeleteIsFocus = (offset == 0);\n mMediaSet.addDeletion(path, mCurrentIndex + offset);\n }", "ResponseEntity deleteById(UUID id);", "public static void deleteChatThumbTempIntStg() {\n File f = new File(PathUtil.getInternalChatImageTempUri().getPath());\n if(f.exists()) {\n delete(f);\n //LogUtil.e(\"StorageUtil\", \"deleteChatThumbTempIntStg\");\n }\n }", "void deletePhotos(Subscriber<BaseBean> subscriber, String id);", "@Source(\"gr/grnet/pithos/resources/editdelete.png\")\n ImageResource delete();", "public void delete(yandex.cloud.api.containerregistry.v1.ImageServiceOuterClass.DeleteImageRequest request,\n io.grpc.stub.StreamObserver<yandex.cloud.api.operation.OperationOuterClass.Operation> responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getDeleteMethod(), responseObserver);\n }", "public void deleteImage(Context context, String name) {\n ContextWrapper cw = new ContextWrapper(context);\n String name_ = AppConfig.RECIPE_BOOK_FOLDER_NAME; //Folder name in device android/data/\n File directory = cw.getDir(name_, Context.MODE_PRIVATE);\n try {\n File f = new File(directory, name + \".png\");\n if (f.exists()) {\n f.delete();\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "void deleteFingerprint(Long id, String user) throws SQLException;", "public ImageDelete (String operationName, String method, String format,\n\t\t\tInteger version,String accessTokenPregenerated,\n\t\t\tString fileName){\n\t\tsuper(operationName, method, format, version);\n\t\tthis.oauth_token = accessTokenPregenerated;\n\t\tthis.ID_Image = fileName;\n\t}", "public DResult delete(byte[] row, long startId) throws IOException;", "public void delete(yandex.cloud.api.containerregistry.v1.ImageServiceOuterClass.DeleteImageRequest request,\n io.grpc.stub.StreamObserver<yandex.cloud.api.operation.OperationOuterClass.Operation> responseObserver) {\n io.grpc.stub.ClientCalls.asyncUnaryCall(\n getChannel().newCall(getDeleteMethod(), getCallOptions()), request, responseObserver);\n }", "void eliminarPedido(UUID idPedido);", "int deleteByPrimaryKey(String hash);", "public int removeCustomDevice(String id);", "public static void deleteLogo(Long id){\n ER_User_Custom_Logo tcustomLogo = ER_User_Custom_Logo.findById(id);\n String customImgPath = Play.applicationPath.getAbsolutePath()+\"/public/images/custom/\";\n try\n {\n String l = tcustomLogo.logoName;\n String b = tcustomLogo.bannerName;\n File destination = new File(customImgPath, l);\n if(destination.exists())\n destination.delete();\n destination = new File(customImgPath, b);\n if(destination.exists())\n destination.delete();\n tcustomLogo.delete();\n flash.success(Messages.get(\"logo.delete.success\"));\n }catch ( Exception ex )\n {\n flash.error(Messages.get(\"logo.delete.error\"));\n Logger.error(ex,\"logo: %d\", id);\n }\n\n logosList(null,null,true);\n\n }", "public abstract void removeExternalData(String dataID);", "public abstract BossBar removePlayer(UUID uuid);", "void remove(String identifier) throws GuacamoleException;", "void delete(SpCharInSeq spCharInSeq);", "@Override\n public void onWhatEverClick(int position) {\n Upload selectedItem = patientsList.get(position);\n String userId = selectedItem.getKey();\n\n StorageReference imageRef = mStorage.getReferenceFromUrl(selectedItem.getImageUrl());\n imageRef.delete().addOnSuccessListener(new OnSuccessListener<Void>() {\n @Override\n public void onSuccess(Void unused) {\n\n databaseReference.child(userId).removeValue();\n Toast.makeText(PatientsListActivity.this, \"Patient deleted\", Toast.LENGTH_SHORT).show();\n\n\n }\n }).addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n Toast.makeText(PatientsListActivity.this, \"Error: \"+e.getMessage(), Toast.LENGTH_SHORT).show();\n }\n });\n }", "@Override\r\n\tpublic Album deleteMyImage(int id) throws SQLException {\n\t\treturn dao.deleteMyImage(id);\r\n\t}", "SpCharInSeq delete(Integer spcharinseqId);", "public void deleteCoffeeShopImage(CoffeeShopImage coffeeShopImage) {\n SQLiteDatabase db = this.getReadableDatabase();\n db.delete(CoffeeShopDatabase.CoffeeShopImageTable.TABLE_NAME, CoffeeShopDatabase.CoffeeShopImageTable._ID + \" = ? \",\n new String[]{String.valueOf(coffeeShopImage.get_id())});\n }", "ResponseEntity<?> deleteAttachment(String attachmentId);", "public void deleteByChucVuID(long chucVuId);", "public static void removeImage(ContentResolver cr, int id) {\n cr.delete(MediaStore.Images.Media.EXTERNAL_CONTENT_URI,\n MediaStore.Images.Media._ID + \" = ?\", new String[] { \"\" + id });\n }", "void delete(String resourceGroupName, String resourceName, String replicaName);", "@Override\r\n\tpublic void deleteFileData(Long id) {\n\t\t\r\n\t}", "void delete( String officeCode );", "@Override\n\tpublic void deleteHashFile(boardDTO board) throws Exception {\n\t\tsqlSession.delete(namespace+\".deleteFile\",board);\n\t\tsqlSession.delete(namespace+\".deleteHashtag\",board);\n\t\tsqlSession.delete(namespace+\".likedelete\",board);\n\t}", "public void removeUniqueFileIdentifier(java.lang.String value) {\r\n\t\tBase.remove(this.model, this.getResource(), UNIQUEFILEIDENTIFIER, value);\r\n\t}", "public abstract void groupChatPhotoDeleteMessage(Message m);", "int deleteByExample(AvwFileprocessExample example);", "public ImageFile removeImageFile(int f) { return imageFiles.remove(f); }", "@Override\n\tpublic int deleteImgRoom(int room_id, String type_img) {\n\t\treturn roomDao.deleteImgRoom(room_id, type_img);\n\t}", "public void supprimerRenommage(){\n supprRenomGram.supprRenom();\n setChanged();\n notifyObservers(\"5\");\n }", "@DeleteMapping(\"/posts/picture/{pictureId}\")\n void removePostsByPic(@PathVariable Long pictureId);", "@Override\n public void delete(Long id) {\n log.debug(\"Request to delete ShopImage : {}\", id);\n shopImageRepository.deleteById(id);\n }", "public void eliminarImagenImagen( int idImagen){\n Images images = new Images();\n images.setIdImagen(idImagen);\n images.setImagen(\"imags\");\n DaoDeleteImageImage dao = new DaoDeleteImageImage(this, this, images);\n dao.execute();\n }", "int deleteByPrimaryKey(String loginuuid);", "public static void delete(String uuid) {\n\t\tfinal String methodName = \"delete(String)\";\n\t\tConnection con = null;\n\t\ttry {\n\t\t\tcon = Common.getConnection();\n\t\t\tCommon.beginTransaction(con);\n\t\t\tdelete(uuid, con);\n\t\t\tCommon.endTransaction(con);\n\t\t} catch (SQLException e) {\n\t\t\tlog.error(methodName, \"Caught SQLException: \" + e.getMessage(), e);\n\t\t\tCommon.doRollback(con);\n\t\t} finally {\n\t\t\tCommon.safeClose(con);\n\t\t}\n\t}", "void deleteStorageById(Integer id);", "public void delete(short addressInDataBlock) {\n \n //transform 2 bytes in 1 short \n String initialBinary = Integer.toBinaryString(0xFF & serialize[addressInDataBlock * 4]) + Integer.toBinaryString(0xFF & serialize[addressInDataBlock * 4 + 1]);\n short initial = Short.parseShort(initialBinary, 2);\n\n String sizeBinary = Integer.toBinaryString(0xFF & serialize[addressInDataBlock * 4 + 2]) + Integer.toBinaryString(0xFF & serialize[addressInDataBlock * 4 + 3]);\n short sizeData = Short.parseShort(sizeBinary, 2);\n\n //delete the data\n serialize[addressInDataBlock * 4] = 0x00;\n serialize[addressInDataBlock * 4 + 1] = 0x00;\n serialize[addressInDataBlock * 4 + 2] = 0x00;\n serialize[addressInDataBlock * 4 + 3] = 0x00;\n\n for (short i = initial; i < initial + sizeData; i++) {\n serialize[i] = 0x00;\n }\n }", "public int delete(String code) throws DataAccessException;", "@Override\n public void deletePartida(String idPartida) {\n template.opsForHash().delete(idPartida, \"jugador1\");\n template.opsForHash().delete(idPartida, \"jugador2\");\n template.opsForSet().remove(\"partidas\",idPartida);\n }", "@Override\n\tpublic void deleteById(UUID id) {\n\t\t\n\t}", "public com.google.common.util.concurrent.ListenableFuture<yandex.cloud.api.operation.OperationOuterClass.Operation> delete(\n yandex.cloud.api.containerregistry.v1.ImageServiceOuterClass.DeleteImageRequest request) {\n return io.grpc.stub.ClientCalls.futureUnaryCall(\n getChannel().newCall(getDeleteMethod(), getCallOptions()), request);\n }", "@Transactional\n public void deleteImages(Long[] ids, User user){\n String username = user.getUserName();\n for(Long id: ids){\n ImageEntity image = imageRepository.findImageEntityById(id);\n if(image != null && image.getOwner().getUserName().equals(username)){\n this.amazonClient.deleteFileFromS3Bucket(image.getPicture());\n imageRepository.deleteById(id);\n }\n }\n }", "void unregister(String uuid);", "public void removeByUuid_C(java.lang.String uuid, long companyId)\n throws com.liferay.portal.kernel.exception.SystemException;", "public void removeByUuid_C(java.lang.String uuid, long companyId)\n throws com.liferay.portal.kernel.exception.SystemException;", "void delete(SecretIdentifier secretIdentifier);", "private void deletePressedPhoto() {\r\n if (lastPressedPhoto == null)\r\n return;\r\n\r\n int photoId = (int) lastPressedPhoto.getTag(R.integer.tag_event_photo);\r\n\r\n LinearLayout layoutPhotos = findViewById(R.id.layoutPhotos);\r\n layoutPhotos.removeView(lastPressedPhoto);\r\n\r\n EventPhoto photo = DatabaseManager.getInstance().getDatabase().eventPhotoDao().findById(photoId);\r\n DatabaseManager.getInstance().getDatabase().eventPhotoDao().deleteById(photo.uid);\r\n showToast(getString(R.string.event_photo_removed), Toast.LENGTH_SHORT);\r\n disablePhotoEditing();\r\n }", "public static void removeUniqueFileIdentifier(Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, java.lang.String value) {\r\n\t\tBase.remove(model, instanceResource, UNIQUEFILEIDENTIFIER, value);\r\n\t}", "public void removeByUuid(java.lang.String uuid)\n throws com.liferay.portal.kernel.exception.SystemException;", "public void removeByUuid(java.lang.String uuid)\n throws com.liferay.portal.kernel.exception.SystemException;" ]
[ "0.68090856", "0.64973307", "0.62892795", "0.62892795", "0.62892795", "0.62749076", "0.6215396", "0.5983342", "0.58597517", "0.5850349", "0.5848875", "0.5848875", "0.5848875", "0.5848875", "0.5840216", "0.57715154", "0.5763655", "0.57531446", "0.570942", "0.57024145", "0.57024145", "0.57024145", "0.567539", "0.5667316", "0.56633806", "0.5640788", "0.5633771", "0.5625247", "0.5618508", "0.5617168", "0.5607678", "0.56058896", "0.5572816", "0.55710167", "0.5557308", "0.5551843", "0.5541466", "0.55392563", "0.5528083", "0.55272", "0.55189466", "0.55001646", "0.549969", "0.5483012", "0.5475777", "0.5474471", "0.545526", "0.5447099", "0.54463303", "0.5445312", "0.5441932", "0.5427974", "0.5424773", "0.54227626", "0.5422634", "0.54208326", "0.54202735", "0.5416474", "0.5414594", "0.54086673", "0.5404016", "0.5398121", "0.53858125", "0.53764486", "0.53759956", "0.5366445", "0.53384316", "0.5337817", "0.5316868", "0.53167474", "0.53157103", "0.52963805", "0.52946436", "0.52915376", "0.5286537", "0.5282007", "0.52751553", "0.52710366", "0.5269397", "0.52685404", "0.52652407", "0.5264008", "0.5260149", "0.5257216", "0.5234725", "0.5233832", "0.5233358", "0.5229314", "0.522089", "0.52200633", "0.52177304", "0.5217674", "0.52126455", "0.5212385", "0.5212385", "0.52068007", "0.51992786", "0.5195335", "0.51934516", "0.51934516" ]
0.6880272
0
Created by themavencoder on 09,April,2019
public interface MovieApiService { @GET("movie/popular") Call<MoviesResponse> getPopularMovies(@Query("page") int page); @GET("movie/top_rated") Call<MoviesResponse> getTopRatedMovies(@Query("page") int page); @GET("movie/{id}") Call<MoviesResponse> getMovieDetails(@Path("id") long id); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void func_104112_b() {\n \n }", "public final void mo51373a() {\n }", "@Override\n public void perish() {\n \n }", "public void mo38117a() {\n }", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "private static void cajas() {\n\t\t\n\t}", "private void m50366E() {\n }", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "public void mo4359a() {\n }", "private void poetries() {\n\n\t}", "private stendhal() {\n\t}", "protected boolean func_70814_o() { return true; }", "@Override\n\tprotected void getExras() {\n\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n public int describeContents() { return 0; }", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n protected void getExras() {\n }", "@Override\n\tpublic int mettreAJour() {\n\t\treturn 0;\n\t}", "public void mo12930a() {\n }", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "public void mo12628c() {\n }", "public void mo6081a() {\n }", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "public void mo21877s() {\n }", "@Override\n\tpublic void anular() {\n\n\t}", "public void mo1531a() {\n }", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "public Pitonyak_09_02() {\r\n }", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "public void mo55254a() {\n }", "@Override\n\tprotected void interr() {\n\t}", "public void m23075a() {\n }", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n public void memoria() {\n \n }", "public void mo9848a() {\n }", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "private void kk12() {\n\n\t}", "protected void mo6255a() {\n }", "public final void mo91715d() {\n }", "private void m50367F() {\n }", "public abstract void mo70713b();", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "public void mo21779D() {\n }", "@Override\n public int retroceder() {\n return 0;\n }", "public void mo21825b() {\n }", "public void mo21878t() {\n }", "Petunia() {\r\n\t\t}", "@Override public int describeContents() { return 0; }", "public void mo115190b() {\n }", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\r\n\t\t\tpublic void func02() {\n\t\t\t\t\r\n\t\t\t}", "@Override\r\n\tprotected void func03() {\n\t\t\r\n\t}", "private Rekenhulp()\n\t{\n\t}", "public void mo23813b() {\n }", "public abstract void mo56925d();", "@Override\n public int getSize() {\n return 1;\n }", "@Override\r\n\tprotected void doF8() {\n\t\t\r\n\t}", "public void mo21794S() {\n }", "@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}", "private zza.zza()\n\t\t{\n\t\t}", "protected MetadataUGWD() {/* intentionally empty block */}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "static void feladat4() {\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "public void mo21792Q() {\n }", "public void mo3749d() {\n }", "public void mo21785J() {\n }", "private MetallicityUtils() {\n\t\t\n\t}", "public void method_4270() {}", "public static void listing5_14() {\n }", "public void mo21795T() {\n }", "public void mo21783H() {\n }", "@Override\n public int getOrder() {\n return 4;\n }", "static void feladat9() {\n\t}", "public void mo21791P() {\n }", "public void mo97908d() {\n }", "@Override\n public void init() {\n\n }", "public void mo21787L() {\n }", "protected boolean func_70041_e_() { return false; }", "public void skystonePos4() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "public void mo3376r() {\n }", "@Override\n\tpublic void emprestimo() {\n\n\t}", "public void mo21782G() {\n }" ]
[ "0.5843323", "0.5718311", "0.567731", "0.551541", "0.54534304", "0.54517305", "0.54476047", "0.5394388", "0.5394388", "0.5382981", "0.5382689", "0.5379455", "0.53704876", "0.5347016", "0.5314963", "0.5314963", "0.5314963", "0.5314963", "0.5314963", "0.5314963", "0.5314963", "0.5299175", "0.529856", "0.5257678", "0.5240606", "0.52344924", "0.52279806", "0.5219796", "0.52195156", "0.52151185", "0.52126", "0.51992583", "0.5190998", "0.5177419", "0.51715505", "0.51625067", "0.51611197", "0.51583034", "0.5143347", "0.51401645", "0.51371413", "0.5136639", "0.5124153", "0.5124071", "0.51190126", "0.51138896", "0.5111846", "0.5111549", "0.5108036", "0.510758", "0.5098991", "0.5087497", "0.5076072", "0.50543165", "0.5048941", "0.5048597", "0.50436795", "0.5035793", "0.50323325", "0.501686", "0.50107145", "0.4997191", "0.4995933", "0.49956295", "0.49847177", "0.4977524", "0.4977093", "0.49695346", "0.4969166", "0.49689665", "0.4965421", "0.4957325", "0.49552143", "0.49539617", "0.49472624", "0.49472624", "0.49472624", "0.49472624", "0.49472624", "0.4943493", "0.49428403", "0.49383715", "0.49368012", "0.49356884", "0.49345353", "0.49344265", "0.49308938", "0.49304426", "0.49201173", "0.49190313", "0.49170715", "0.49161676", "0.49158546", "0.49145752", "0.49144274", "0.49143702", "0.49105763", "0.49093214", "0.4903539", "0.4902427", "0.48937014" ]
0.0
-1
This method initializes sShell
public void createSShell() { GridData gridData = new GridData(); gridData.widthHint = 500; gridData.horizontalAlignment = org.eclipse.swt.layout.GridData.CENTER; gridData.grabExcessHorizontalSpace = true; gridData.heightHint = 80; sShell = new Shell(); sShell.setText("系统管理"); sShell.setSize(new Point(703, 656)); sShell.setLayout(new GridLayout()); cLabel = new CLabel(sShell, SWT.CENTER); cLabel.setImage(new Image(Display.getCurrent(), getClass().getResourceAsStream("/images/news.png"))); cLabel.setFont(new Font(Display.getDefault(), "微软雅黑", 18, SWT.NORMAL)); cLabel.setLayoutData(gridData); cLabel.setText("系统管理"); createTabFolder(); if(SystemMainShell.userType.equals("管理员")){ buttonAddRoom.setEnabled(true); buttonDeleteRoom.setEnabled(true); // buttonAddGoods.setEnabled(true); // buttonDeleteGoods.setEnabled(true); buttonAddStaff.setEnabled(true); buttonDeleteStaff.setEnabled(true); buttonAddUser.setEnabled(true); buttonDeleteUser.setEnabled(true); }else if(SystemMainShell.userType.equals("操作员")){ buttonAddRoom.setEnabled(false); buttonDeleteRoom.setEnabled(false); // buttonAddGoods.setEnabled(false); // buttonDeleteGoods.setEnabled(false); buttonAddStaff.setEnabled(false); buttonDeleteStaff.setEnabled(false); buttonAddUser.setEnabled(false); buttonDeleteUser.setEnabled(false); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private Shell() { }", "private void createSShell(Display display) {\r\n\t\tsShell = new Shell(display, SWT.APPLICATION_MODAL | SWT.DIALOG_TRIM);\r\n\t\t//sShell = new Shell();\r\n\t\tsShell.setText(\"Read\");\r\n\t\tsShell.setLayout(null);\r\n\t\tsShell.setSize(new Point(240, 188));\r\n\t\tlabelTagId = new Label(sShell, SWT.WRAP);\r\n\t\tlabelTagId.setText(\"Tag ID (Hex)\");\r\n\t\tlabelTagId.setFont(new Font(Display.getDefault(), \"Tahoma\", 7, SWT.NORMAL));\r\n\t\tlabelTagId.setBounds(new Rectangle(6, 2, 46, 23));\r\n\t\ttextTagId = new Text(sShell, SWT.BORDER);\r\n\t\ttextTagId.setBounds(new Rectangle(54, 1, 175, 21));\r\n\t\ttextTagId.addModifyListener(new org.eclipse.swt.events.ModifyListener() {\r\n\t\t\tpublic void modifyText(org.eclipse.swt.events.ModifyEvent e) {\r\n\t\t if (textTagId.getText().length() == 0)\r\n\t\t buttonAccessFilter.setEnabled(true);\r\n\t\t else\r\n\t\t buttonAccessFilter.setEnabled(false);\r\n\r\n\t\t\t}\r\n\t\t});\r\n\t\tlabelPassWord = new Label(sShell, SWT.WRAP);\r\n\t\tlabelPassWord.setBounds(new Rectangle(5, 26, 47, 26));\r\n\t\tlabelPassWord.setFont(new Font(Display.getDefault(), \"Tahoma\", 7, SWT.NORMAL));\r\n\t\tlabelPassWord.setText(\"Password (Hex)\");\r\n\t\ttextPassword = new Text(sShell, SWT.BORDER);\r\n\t\ttextPassword.setBounds(new Rectangle(54, 29, 175, 19));\r\n\t\tlabelMemBank = new Label(sShell, SWT.WRAP);\r\n\t\tlabelMemBank.setBounds(new Rectangle(5, 54, 38, 24));\r\n\t\tlabelMemBank.setText(\"Memory Bank\");\r\n\t\tlabelMemBank.setFont(new Font(Display.getDefault(), \"Tahoma\", 7, SWT.NORMAL));\r\n\t\tcreateComboMemBank();\r\n\t\tlabelOffset = new Label(sShell, SWT.WRAP);\r\n\t\tlabelOffset.setBounds(new Rectangle(6, 82, 35, 24));\r\n\t\tlabelOffset.setText(\"Offset (bytes)\");\r\n\t\tlabelOffset.setFont(new Font(Display.getDefault(), \"Tahoma\", 7, SWT.NORMAL));\r\n\t\ttextOffSet = new Text(sShell, SWT.BORDER);\r\n\t\ttextOffSet.setBounds(new Rectangle(54, 82, 61, 19));\r\n\t\tlabelLength = new Label(sShell, SWT.WRAP);\r\n\t\tlabelLength.setBounds(new Rectangle(124, 82, 40, 23));\r\n\t\tlabelLength.setText(\"Length (bytes)\");\r\n\t\tlabelLength.setFont(new Font(Display.getDefault(), \"Tahoma\", 7, SWT.NORMAL));\r\n\t\ttextLength = new Text(sShell, SWT.BORDER);\r\n\t\ttextLength.setBounds(new Rectangle(169, 82, 57, 19));\r\n\t\tlabelDataRead = new Label(sShell, SWT.WRAP);\r\n\t\tlabelDataRead.setBounds(new Rectangle(6, 106, 58, 11));\r\n\t\tlabelDataRead.setText(\"Data Read\");\r\n\t\tlabelDataRead.setFont(new Font(Display.getDefault(), \"Tahoma\", 7, SWT.NORMAL));\r\n\t\ttextDataRead = new Text(sShell, SWT.BORDER | SWT.MULTI | SWT.READ_ONLY | SWT.V_SCROLL);\r\n\t\ttextDataRead.setBounds(new Rectangle(6, 118, 219, 27));\r\n\t\tbuttonAccessFilter = new Button(sShell, SWT.NONE);\r\n\t\tbuttonAccessFilter.setBounds(new Rectangle(7, 146, 66, 16));\r\n\t\tbuttonAccessFilter.setText(\"Access Filter\");\r\n\t\tbuttonRead = new Button(sShell, SWT.NONE);\r\n\t\tbuttonRead.setBounds(new Rectangle(154, 146, 72, 16));\r\n\t\tbuttonRead.setText(\"Read\");\r\n\t\t\r\n\t\tbuttonRead.addSelectionListener(new org.eclipse.swt.events.SelectionListener() { \r\n\t\t\tpublic void widgetSelected(org.eclipse.swt.events.SelectionEvent e) { \r\n\t\t try {\r\n\t\t TagAccess tagAccess = new TagAccess();\r\n\t\t TagAccess.ReadAccessParams readAccessParams = tagAccess.new ReadAccessParams();\r\n\t\t MEMORY_BANK memBank = MEMORY_BANK.MEMORY_BANK_EPC;\r\n\t\t switch (comboMemBank.getSelectionIndex()) {\r\n\t\t case 0:\r\n\t\t memBank = MEMORY_BANK.MEMORY_BANK_RESERVED;\r\n\t\t break;\r\n\t\t case 1:\r\n\t\t memBank = MEMORY_BANK.MEMORY_BANK_EPC;\r\n\t\t break;\r\n\t\t case 2:\r\n\t\t memBank = MEMORY_BANK.MEMORY_BANK_TID;\r\n\t\t break;\r\n\t\t case 3:\r\n\t\t memBank = MEMORY_BANK.MEMORY_BANK_USER;\r\n\t\t break;\r\n\t\t }\r\n\t\t readAccessParams.setMemoryBank(memBank);\r\n\t\t readAccessParams.setByteCount(Integer.parseInt(textLength.getText()));\r\n\t\t readAccessParams.setByteOffset(Integer.parseInt(textOffSet.getText()));\r\n\t\t readAccessParams.setAccessPassword(Long.parseLong(textPassword.getText(), 16));\r\n\r\n\t\t if (textTagId.getText().length() > 0) {\r\n\t\t TagData readTagData = RFIDMainDlg.rfidBase.getMyReader().Actions.TagAccess.readWait(tagID, readAccessParams,\r\n\t\t RFIDMainDlg.rfidBase.antennaInfo.getAntennaID() != null ? RFIDMainDlg.rfidBase.antennaInfo : null);\r\n\t\t textDataRead.setText(readTagData.getMemoryBankData());\r\n\t\t } else {\r\n\t\t \r\n\t\t RFIDMainDlg.rfidBase.getMyReader().Actions.TagAccess.readEvent(readAccessParams, RFIDMainDlg.rfidBase.isAccessFilterSet ? RFIDMainDlg.rfidBase.accessFilter : null,\r\n\t\t RFIDMainDlg.rfidBase.antennaInfo.getAntennaID() != null ? RFIDMainDlg.rfidBase.antennaInfo : null);\r\n\t\t \r\n\r\n\t\t }\r\n\r\n\t\t RFIDMainDlg.rfidBase.postStatusNotification(RFIDBase.API_SUCCESS, null);\r\n\r\n\t\t } catch (InvalidUsageException ex) {\r\n\t\t RFIDMainDlg.rfidBase.postStatusNotification(RFIDBase.PARAM_ERROR, ex.getVendorMessage());\r\n\t\t } catch (OperationFailureException ex) {\r\n\t\t RFIDMainDlg.rfidBase.postStatusNotification(ex.getStatusDescription(), ex.getVendorMessage());\r\n\t\t }\r\n\r\n\t\t\t}\r\n\t\t\r\n\t\t\tpublic void widgetDefaultSelected(org.eclipse.swt.events.SelectionEvent e) {\r\n\t\t\t}\r\n\t\t});\r\n\t}", "public Shell() {\n commandNumber = 0;\n prevPID = -1;\n command = \"\";\n }", "public void init() {\n\t\tregisterFunctions();\n\t\t\t\t\n\t\t//Start it\n\t\tconsole.startUserConsole();\n\t}", "public void init()\n {\n _appContext = SubAppContext.createOMM(System.out);\n _serviceName = CommandLine.variable(\"serviceName\");\n initGUI();\n }", "protected void configureShell(Shell shell) {\n super.configureShell(shell);\n\n shell.setText(mTitle);\n }", "private void initializeConsole() {\n\t\tthis.hydraConsole = new HydraConsole(this.stage, this.commands);\n\t\tthis.splitPane.setBottomComponent(this.hydraConsole);\n\t}", "private void initScriptObjects() {\n BeanShell bsh = BeanShell.get();\n for (Player p : game.getAllPlayers()) {\n String colorName = ColorUtil.toString(p.getColor());\n bsh.set(\"p_\" + colorName, p);\n }\n\n bsh.set(\"game\", game);\n bsh.set(\"map\", map);\n }", "public void openShell()\n\t{\n\t\tif (ConnectionManager.getInstance().connectionState)\n\t\t\tshell.open();\n\t}", "private void initialize() {\n layout = new HorizontalLayout();\n\n workspaceTabs = new TabSheet();\n\n WorkspacePanel panel = new WorkspacePanel(\"Workspace 1\");\n workspaceTabs.addTab(panel).setCaption(\"Workspace 1\");\n DropHandler dropHandler = searchMenu.createDropHandler(panel.getBaseLayout());\n panel.setDropHandler(dropHandler);\n\n layout.addComponent(workspaceTabs);\n\n setContent(layout);\n }", "protected void initialize() {\n\t\tthis.initializeFileMenu();\n\t\tthis.initializeEditMenu();\n\t\tthis.initializeNavigationMenu();\n\t\tthis.initializeHelpMenu();\n\t}", "private void init() {\n\n\t}", "public void init() {\r\n\r\n\t}", "protected void initialize () {\r\n if (initCommand!=null) matlabEng.engEvalString (id,initCommand);\r\n }", "protected void refreshShell() {\n shell.layout();\n }", "private Shell(Session session, IRuntime pluginRuntime) {\n fReadlineStack = new ReadlineStack();\n // no need to listen on session changes since every command\n // explicitly retrieves the current system\n fSession = session;\n \n try {\n\t\t\tsystem().registerPPCHandlerOverride(this);\n\t\t} catch (NoSystemException e) {\n\t\t\t// out of luck...\n\t\t}\n \n\t\tthis.fPluginRuntime = pluginRuntime;\n \n\t\t// integrate plugin commands\n\t\tif (Options.doPLUGIN) {\n\t\t\tthis.shellExtensionPoint = (IPluginShellExtensionPoint) this.fPluginRuntime\n\t\t\t\t\t.getExtensionPoint(\"shell\");\n\n\t\t\tthis.pluginCommands = this.shellExtensionPoint.createPluginCmds(this.fSession, this);\n }\n\t}", "@Override\n\tprotected void createShell() {\n\t\tString shellText = \"Add a New Pharmacy\";\n\t\tRectangle bounds = new Rectangle(25, 0, 800, 680);\n\t\tbuildShell(shellText, bounds);\n\t}", "public static void init() {\n chsrInit();\n configJS();\n }", "private void initialize() {\n\t\tthis.setExtendedState(Frame.MAXIMIZED_BOTH);\n\t\tthis.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tthis.setResizable(true);\n\t\tthis.screenDimensions = Toolkit.getDefaultToolkit().getScreenSize();\n\t\tthis.getContentPane().setLayout(new BorderLayout());\n\t\t// Initialize SubComponents and GUI Commands\n\t\tthis.initializeSplitPane();\n\t\tthis.initializeExplorer();\n\t\tthis.initializeConsole();\n\t\tthis.initializeMenuBar();\n\t\tthis.pack();\n\t\tthis.hydraExplorer.refreshExplorer();\n\t}", "public void init() {\n\n\t}", "public void init() {\n\n\t}", "public void init() {\n\n\t}", "public void init(IWorkbenchWindow window) {\n\t\tshell = window.getShell();\r\n\t\tpage = window.getActivePage();\r\n\t}", "private void init() {\n setText(\"Case Name\");\n createFieldsComp();\n GuiUtil.addSeparator(shell, SWT.HORIZONTAL);\n createBottomActionButtons();\n }", "@Override\n\tprotected void createShell() {\n\t\tRectangle bounds = new Rectangle(100, 50, 600, 510);\n\t\tString shellTxt = \"Cohorts Report\";\n\t\tbuildShell(shellTxt, bounds);\n\t\t// create the composites\n\t\tcreateMyGroups();\n\t}", "private void init() {\n\n\n\n }", "public void init() {\n\t\t}", "public static void initalize(){\n //Add all of the commands here by name and id\n autonomousChooser.addDefault(\"Base Line\", 0);\n // addOption​(String name, int object)\n\n SmartDashboard.putData(\"Auto mode\", autonomousChooser);\n }", "private void initialize()\n {\n this.setTitle( \"SerialComm\" ); // Generated\n this.setSize( 500, 300 );\n this.setContentPane( getJContentPane() );\n }", "private void init() {\n }", "private void init() {\n }", "private void init() {\n }", "private void init() {\n }", "public void init() {\n\t\t\n\t}", "private void init() {\n }", "protected void createContents() {\r\n\t\tshell = new Shell();\r\n\t\tshell.setSize(450, 300);\r\n\t\tshell.setText(\"SWT Application\");\r\n\r\n\t}", "public void init() {\n\t\n\t}", "protected void _init(){}", "private void initialize() {\r\n\t\tthis.setSize(378, 283);\r\n\t\tthis.setJMenuBar(getMenubar());\r\n\t\tthis.setContentPane(getJContentPane());\r\n\t\tthis.setTitle(\"JAVIER\");\r\n\t}", "public static void chsrInit(){\n for(int i = 0; i < chsrDesc.length; i++){\n chsr.addOption(chsrDesc[i], chsrNum[i]);\n }\n chsr.setDefaultOption(chsrDesc[2] + \" (Default)\", chsrNum[2]); //Default MUST have a different name\n SmartDashboard.putData(\"JS/Choice\", chsr);\n SmartDashboard.putString(\"JS/Choosen\", chsrDesc[chsr.getSelected()]); //Put selected on sdb\n }", "private void init() {\n this.currentStatus = false;\n\n // Instantiate both the left & the right panels.\n leftPanel = new LeftListPanel();\n rightPanel = new RightListPanel();\n // Initialize the splitPane with left & right panels.\n splitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, leftPanel, rightPanel);\n\n }", "private void _init() {\n }", "public void init() {\n\r\n\t}", "public void init() {\n\r\n\t}", "private void initialize() {\r\n\t\t// this.setSize(271, 295);\r\n\t\tthis.setSize(495, 392);\r\n\t\tthis.setContentPane(getJContentPane());\r\n\t\tthis.setTitle(ResourceBundle.getBundle(\"Etiquetas\").getString(\"MainTitle\"));\r\n\t}", "public void init() {\n\t}", "public void init() {\n\t}", "public void init() {\n\t}", "public void init() {}", "public void init() {}", "public NewServerConfigDialog(final Shell shell) {\r\n super(shell);\r\n }", "protected void init() {\n\t}", "protected void init() {\n\t}", "public void initialize() {\n while (il == null)\n try {\n Thread.sleep(1);\n } catch (InterruptedException e) {\n continue;\n }\n\n // Set up command manager (undo and redo)\n commandManager = new ModifySongManager(staff, this);\n \n // Set up staff.\n HBox[] staffLedgerLines = { staffExtLinesHighC, staffExtLinesHighA,\n staffExtLinesLowC, staffExtLinesLowA };\n staff = new Staff(staffLedgerLines, this, il, arrangementList);\n controlPanel = new Controls(staff, this, il, arrangementList);\n staff.setControlPanel(controlPanel);\n \n // HACK\n staffInstrumentEventHandler = new StaffInstrumentEventHandler(staff, il, commandManager);\n \n commandManager.setStaff(staff);\n \n // Set up top line.\n instBLine = new ButtonLine(instLine, selectedInst, il, staff);\n selectedInst.setImage(il.getSpriteFX(ImageIndex.MARIO));\n\n topPanel = new PanelButtons(staff, this, il, instBLine);\n staff.setTopPanel(topPanel);\n\n arrangementList.setEditable(true);\n arrangementList.setStyle(\"-fx-font: 8pt \\\"Arial\\\";\");\n // Hide all arranger features for now.\n arrangementList.setVisible(false);\n addButton.setVisible(false);\n deleteButton.setVisible(false);\n upButton.setVisible(false);\n downButton.setVisible(false);\n \n // Set up clipboard.\n rubberBand = new StaffRubberBand();\n clipboard = new StaffClipboard(rubberBand, staff, this, il);\t\n \n // Fix TextField focus problems.\n new SongNameController(songName, this);\n \n }", "@Override\n\tpublic void init() {\n\t\tsetMainWindow(new Window(\"Module Demo Application\", tabs));\n\t\ttabs.setSizeFull();\n\t}", "private void initialize() {\r\n\t\tthis.setBounds(new Rectangle(0, 0, 670, 576));\r\n\t\tthis.setResizable(false);\r\n\t\tthis.setTitle(\"数据入库 \");\r\n\t\tthis.setLocationRelativeTo(getOwner());\r\n\t\tthis.setContentPane(getJContentPane());\r\n\t}", "public static void init() {\n\t\t\n\t}", "private void setup() {\n // Set the shell layout to a Grid layout.\n shell.setLayout(new GridLayout(1, false));\n \n // Read lockedColorMaps.tbl to get the list of locked color maps\n lockedCmaps = ColorMapUtil.readLockedColorMapFile();\n \n availColorMaps = new ArrayList<String>();\n availColorMapCats = ColorMapUtil.getColorMapCategories();\n \n if( seldCmapCat == null ) {\n \tseldCmapCat = availColorMapCats[0];\n }\n \n// for( String cat : availColorMapCats ) {\n for( String cmap : ColorMapUtil.listColorMaps(seldCmapCat) ) {\n \tif( seldCmapName == null ) {\n \t\tseldCmapName = cmap;\n \t\tif( !initColorMap() ) {\n \t\tseldCmapName = null;\n \t\t\tcontinue; // don't add to the list\n \t\t}\n \t}\n \tavailColorMaps.add(cmap);\n }\n// }\n \t\n createSliderData();\n\n // Initialize the components.\n initComponents(); \n \n // Pack the components.\n shell.pack();\n }", "public void init() {\n }", "public void init() {\n }", "public void init() {\n }", "public void init() {\n }", "public void init() {\n\t\ttry {\n\t\t\tfinal IWorkbench workbench = PlatformUI.getWorkbench();\n\t\t\tworkbench.getDisplay().asyncExec(new Runnable() {\n\t\t\t\tpublic void run() {\n\t\t\t\t\tfinal IWorkbenchWindow window = workbench\n\t\t\t\t\t\t\t.getActiveWorkbenchWindow();\n\t\t\t\t\tif (window != null) {\n\t\t\t\t\t\tStatusLineManager sm = ((WorkbenchWindow) PlatformUI\n\t\t\t\t\t\t\t\t.getWorkbench().getActiveWorkbenchWindow())\n\t\t\t\t\t\t\t\t.getStatusLineManager();\n\t\t\t\t\t\tsm.add(new SplitContributionItem(\"SPLIT\"));\n\t\t\t\t\t\tsm.update(true);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "@Override\n\tprotected Shell getShell() {\n\t\treturn super.getShell();\n\t}", "public void init()\n {\n }", "public void init() {\n \n }", "protected void init() {\n }", "public void initDefaultCommand() {\n \n }", "@Override\r\n\tpublic void init(GameContainer c, RunState s) {\n\t\t\r\n\t}", "public void init() {\n\t\t \r\n\t\t }", "@Override public void init()\n\t\t{\n\t\t}", "private void initialize() {\n\ttry {\n\t\t// user code begin {1}\n\t\t// user code end\n\t\tsetName(\"PnlInterlisSyntax\");\n\t\tsetBorder(new javax.swing.border.EtchedBorder());\n\t\tsetLayout(new java.awt.BorderLayout());\n\t\tsetSize(382, 165);\n\t\tadd(getPnlEditor(), \"Center\");\n\t\tadd(getPnlDataSelector(), \"South\");\n\t\tadd(getPnlUsage(), \"North\");\n\t} catch (java.lang.Throwable ivjExc) {\n\t\thandleException(ivjExc);\n\t}\n\t// user code begin {2}\n\tgetPnlEditor().setToolTipText(getResourceString(\"PnlEditor_toolTipText\"));\n\tsetCurrentObject(null);\n\tgetPnlDataSelector().setListener(this);\n\tgetPnlUsage().setVisible(false);\n\t// user code end\n}", "private void initialize() {\n\t}", "private void initialize() {\r\n //this.setVisible(true);\r\n \r\n\t // added pre-set popup menu here\r\n// this.add(getPopupFindMenu());\r\n this.add(getPopupDeleteMenu());\r\n this.add(getPopupPurgeMenu());\r\n\t}", "public void init() {\n\n }", "public void init() {\n\n }", "public void init()\n {\n buildUI(getContentPane());\n }", "private void initialize() {\n\t\t\n\t}", "public void init(){\n System.out.println(\"调用init\");\n }", "private void init() {\n StateManager.setState(new MenuState());\n }", "protected void createContents() {\n\t\tmainShell = new Shell();\n\t\tmainShell.addDisposeListener(new DisposeListener() {\n\t\t\tpublic void widgetDisposed(DisposeEvent arg0) {\n\t\t\t\tLastValueManager manager = LastValueManager.getInstance();\n\t\t\t\tmanager.setLastAppEngineDirectory(mGAELocation.getText());\n\t\t\t\tmanager.setLastProjectDirectory(mAppRootDir.getText());\n\t\t\t\tmanager.setLastPythonBinDirectory(txtPythonLocation.getText());\n\t\t\t\tmanager.save();\n\t\t\t}\n\t\t});\n\t\tmainShell.setSize(460, 397);\n\t\tmainShell.setText(\"Google App Engine Launcher\");\n\t\tmainShell.setLayout(new BorderLayout(0, 0));\n\t\t\n\t\tComposite mainComposite = new Composite(mainShell, SWT.NONE);\n\t\tmainComposite.setLayout(new GridLayout(1, false));\n\t\t\n\t\tComposite northComposite = new Composite(mainComposite, SWT.NONE);\n\t\tnorthComposite.setLayoutData(new GridData(SWT.FILL, SWT.TOP, false, false, 1, 1));\n\t\tGridLayout gl_northComposite = new GridLayout(1, false);\n\t\tgl_northComposite.verticalSpacing = 1;\n\t\tnorthComposite.setLayout(gl_northComposite);\n\t\t\n\t\tComposite pythonComposite = new Composite(northComposite, SWT.NONE);\n\t\tpythonComposite.setLayout(new GridLayout(2, false));\n\t\t\n\t\tLabel lblPython = new Label(pythonComposite, SWT.NONE);\n\t\tlblPython.setText(\"Python : \");\n\t\t\n\t\ttxtPythonLocation = new Text(pythonComposite, SWT.BORDER);\n\t\ttxtPythonLocation.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false, 1, 1));\n\t\ttxtPythonLocation.setText(\"/usr/bin/python2.7\");\n\t\t\n\t\tLabel lblGaeLocation = new Label(pythonComposite, SWT.NONE);\n\t\tlblGaeLocation.setText(\"GAE Location :\");\n\t\t\n\t\tmGAELocation = new Text(pythonComposite, SWT.BORDER);\n\t\tmGAELocation.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false, 1, 1));\n\t\tmGAELocation.setText(\"/home/zelon/Programs/google_appengine\");\n\t\t\n\t\tLabel lblProject = new Label(pythonComposite, SWT.NONE);\n\t\tlblProject.setText(\"Project : \");\n\t\t\n\t\tmAppRootDir = new Text(pythonComposite, SWT.BORDER);\n\t\tmAppRootDir.setSize(322, 27);\n\t\tmAppRootDir.setText(\"/home/zelon/workspaceIndigo/box.wimy.com\");\n\t\t\n\t\tComposite ActionComposite = new Composite(northComposite, SWT.NONE);\n\t\tActionComposite.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));\n\t\tActionComposite.setLayout(new GridLayout(2, true));\n\t\t\n\t\tButton btnTestServer = new Button(ActionComposite, SWT.NONE);\n\t\tGridData gd_btnTestServer = new GridData(SWT.LEFT, SWT.CENTER, false, false, 1, 1);\n\t\tgd_btnTestServer.widthHint = 100;\n\t\tbtnTestServer.setLayoutData(gd_btnTestServer);\n\t\tbtnTestServer.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tmExecuter.startTestServer(getPythonLocation(), mGAELocation.getText(), mAppRootDir.getText(), 8080);\n\t\t\t}\n\t\t});\n\t\tbtnTestServer.setText(\"Test Server\");\n\t\t\n\t\tButton btnDeploy = new Button(ActionComposite, SWT.NONE);\n\t\tGridData gd_btnDeploy = new GridData(SWT.LEFT, SWT.CENTER, false, false, 1, 1);\n\t\tgd_btnDeploy.widthHint = 100;\n\t\tbtnDeploy.setLayoutData(gd_btnDeploy);\n\t\tbtnDeploy.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tmExecuter.deploy(getPythonLocation(), mGAELocation.getText(), mAppRootDir.getText());\n\t\t\t}\n\t\t});\n\t\tbtnDeploy.setText(\"Deploy\");\n\t\tActionComposite.setTabList(new Control[]{btnTestServer, btnDeploy});\n\t\tnorthComposite.setTabList(new Control[]{ActionComposite, pythonComposite});\n\t\t\n\t\tComposite centerComposite = new Composite(mainComposite, SWT.NONE);\n\t\tGridData gd_centerComposite = new GridData(SWT.FILL, SWT.FILL, false, false, 1, 1);\n\t\tgd_centerComposite.heightHint = 200;\n\t\tcenterComposite.setLayoutData(gd_centerComposite);\n\t\tcenterComposite.setLayout(new BorderLayout(0, 0));\n\t\t\n\t\tlog = new StyledText(centerComposite, SWT.BORDER | SWT.V_SCROLL);\n\t\tlog.setAlignment(SWT.CENTER);\n\t}", "public void init(){}", "public void init() { }", "public void init() { }", "@Override\n\tpublic void init(SWTBot bot) {\n\n\t}", "private void initializeExplorer() {\n\t\tthis.hydraExplorer = new HydraExplorer(this.stage);\n\t\tthis.splitPane.setTopComponent(this.hydraExplorer);\n\t\tthis.initializeExplorerCommands();\n\t}", "public PhoneLoader() {\r\n\t\t//Set up our SWT application\r\n\t\tDisplay disp = new Display();\r\n\t\tmainShell = new Shell(disp);\r\n\t\tmainShell.setText(\"XXXXXXXXXXX\");\r\n\t\tFormLayout fl = new FormLayout();\r\n\t\tfl.marginHeight = 6;\r\n\t\tfl.marginWidth = 6;\r\n\t\tmainShell.setLayout(fl);\r\n\t\t\r\n\t\t//Load Images\r\n\t\t//iconRED = new Image(Display.getDefault(), \"ohrrpgce/tool/res/RED.PNG\");\r\n\t\ticonBLUE = new Image(Display.getDefault(), \"ohrrpgce/tool/res/BLUE.PNG\");\r\n\t\t//iconGREEN = new Image(Display.getDefault(), \"ohrrpgce/tool/res/GREEN.PNG\");\r\n\t\t\r\n\t\t//Also\r\n\t\tlibGames = new ArrayList/*<String>*/();\r\n\t\tlibFolders = new ArrayList/*<String>*/();\r\n\t//\tlastUpdatedGame = new GameStatus();\r\n\t\tcurrGame = new GameStatus();\r\n\t\t\r\n\t\t//Add the other components\r\n\t\tloadMenu();\r\n\t\tloadComponents();\r\n\t\tlayoutComponents();\r\n\t\tchangeLanguage(LanguagePack.getDefault());\r\n\t\t\r\n\t\t//Main menu, finally. (This must be last to prevent errors)\r\n\t\tmainShell.setMenuBar(mainMenu);\r\n\t\t//mainShell.pack();\r\n\t\tmainShell.setSize(435, 325); //I like this size.\r\n\t\t\r\n\t\t//For disposing\r\n\t\tmainShell.addDisposeListener(new DisposeListener() {\r\n\t\t\tpublic void widgetDisposed(DisposeEvent e) {\r\n\t\t\t\tdisposeAll();\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\t//For resizing\r\n\t\tmainShell.addControlListener(new ControlAdapter() {\r\n\t\t\tpublic void controlResized(ControlEvent e) {\r\n\t\t\t\t//tView.handleResize();\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\t//Display functionality\r\n\t\tmainShell.open();\r\n\t\t//tView.handleResize();\r\n\t\t \t\t\r\n\t\t//SWT basic loop\r\n\t\twhile (!mainShell.isDisposed()) {\r\n\t\t\tif (!disp.readAndDispatch()) {\r\n\t\t\t\tdisp.sleep();\r\n\t\t\t}\r\n\t\t}\r\n\t\tmainShell.dispose();\r\n\t\tdisp.dispose();\r\n\t}", "protected void initialize() {\n Robot.limelight.setPipeline(0.0);\n }", "private void initialize() {\n this.setLayout(new CardLayout());\n this.setName(this.extension.getMessages().getString(\"spiderajax.options.title\"));\n \t if (Model.getSingleton().getOptionsParam().getViewParam().getWmUiHandlingOption() == 0) {\n \t \tthis.setSize(391, 320);\n \t }\n this.add(getPanelProxy(), getPanelProxy().getName()); \n \t}", "public static void init() {\n }", "public static void init() {\n }", "protected void initialize()\n\t{\n\t\tenable = SmartDashboard.getBoolean(RobotMap.EnableRespoolWinch);\n\t}", "public void init() {\n\t\ttabbed = new JTabbedPane();\n\t\ttabbed.insertTab(\"Sesion\", null, getPanelSesion(), \"Control de la sesion\", 0);\n\t\ttabbed.insertTab(\"Evolución bolsa\", null, new JPanel(), \"Control de los usuarios\", 1);\n\t\ttabbed.insertTab(\"Eventos\", null, new JPanel(), \"Control de los eventos\", 2);\n\t\ttabbed.insertTab(\"Control de Agentes\", null, getPanelAgentes(), \"Control de los agentes\", 3);\n\t\tgetContentPane().add(tabbed);\n\t\ttabbed.setEnabledAt(1, false);\n\t\ttabbed.setEnabledAt(2, false);\n\t\tsetSize(new Dimension(800, 600));\n\t}", "private void init() {\n\r\n\t\tmyTerminal.inputSource.addUserInputEventListener(this);\r\n//\t\ttextSource.addUserInputEventListener(this);\r\n\r\n\t}", "public static void init() {\n\n }", "protected void init(){\n }", "private void init() {\n\t\tinitDesign();\n\t\tinitHandlers();\n\t}", "protected void initialize() {\n\t\tthis.oi = Robot.getInstance().getOI();\n\n }", "private void initialize() {\n\t\tdisenioVentana();\n\n\t\tdisenioMenu();\n\n\t\tdisenio_Cuerpo();\n\n\t}", "private void dynInit()\r\n\t{\t\t\r\n\t\t//\tInfo\r\n\t\tstatusBar.setStatusLine(Msg.getMsg(Env.getCtx(), \"InOutGenerateSel\"));//@@\r\n\t\tstatusBar.setStatusDB(\" \");\r\n\t\t//\tTabbed Pane Listener\r\n\t\ttabbedPane.addChangeListener(this);\r\n\t}" ]
[ "0.6891598", "0.63774985", "0.6322151", "0.6264282", "0.6220932", "0.61967397", "0.616392", "0.610993", "0.60474557", "0.5952093", "0.5934362", "0.5926938", "0.5906768", "0.5902803", "0.58835316", "0.58613217", "0.5844445", "0.58439827", "0.58385843", "0.58285344", "0.58285344", "0.58285344", "0.5824835", "0.5802369", "0.5796251", "0.5795156", "0.57874715", "0.57813615", "0.5775209", "0.57669365", "0.57669365", "0.57669365", "0.57669365", "0.5750081", "0.57407993", "0.5737738", "0.5734885", "0.5731375", "0.57260096", "0.571983", "0.57161057", "0.57157147", "0.5714058", "0.5714058", "0.5705996", "0.57044065", "0.57044065", "0.57044065", "0.56977016", "0.56977016", "0.5688878", "0.56829953", "0.56829953", "0.567469", "0.5669107", "0.56663203", "0.56571394", "0.56521934", "0.56492096", "0.56492096", "0.56492096", "0.56492096", "0.5633853", "0.5632844", "0.56232053", "0.56144553", "0.5607413", "0.560059", "0.55991703", "0.5597745", "0.5592854", "0.5590174", "0.55874664", "0.5579147", "0.5578039", "0.5578039", "0.5576981", "0.5575126", "0.55722064", "0.5571029", "0.5570751", "0.5568391", "0.5567907", "0.5567907", "0.556723", "0.5562902", "0.55627227", "0.55590904", "0.55586493", "0.5555697", "0.5555697", "0.5553443", "0.55507714", "0.5542111", "0.554149", "0.5532053", "0.5531722", "0.55294496", "0.55288965", "0.5527412" ]
0.62881666
3
This method initializes tabFolder
private void createTabFolder() { GridData gridData1 = new GridData(); gridData1.grabExcessHorizontalSpace = true; gridData1.heightHint = 500; gridData1.grabExcessVerticalSpace = true; gridData1.verticalAlignment = org.eclipse.swt.layout.GridData.BEGINNING; gridData1.widthHint = 600; tabFolder = new TabFolder(sShell, SWT.NONE); tabFolder.setLayoutData(gridData1); createCompositeRoomMange(); createCompositeGoodsMange(); createCompositeStaffMange(); createCompositeUserMange(); TabItem tabItem = new TabItem(tabFolder, SWT.NONE); tabItem.setText("房间管理"); tabItem.setControl(compositeRoomMange); TabItem tabItem1 = new TabItem(tabFolder, SWT.NONE); tabItem1.setText("商品管理"); tabItem1.setControl(compositeGoodsMange); TabItem tabItem2 = new TabItem(tabFolder, SWT.NONE); tabItem2.setText("员工管理"); tabItem2.setControl(compositeStaffMange); TabItem tabItem3 = new TabItem(tabFolder, SWT.NONE); tabItem3.setText("系统用户管理"); tabItem3.setControl(compositeUserMange); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void initTab()\n {\n \n }", "private void initFileTab()\n\t{\n\t\t\n\t\tMainApp.getMainController().requestAddTab(fileTab);\n\t\t\n\t\t\n\t\tfileTab.getCodeArea().textProperty().addListener((obs, oldv, newv) -> dirty.set(true));\n\t\t\n\t\tdirty.addListener((obs, oldv, newv) -> {\n\t\t\t\n\t\t\tString tabTitle = fileTab.getText();\n\t\t\t\n\t\t\tif (newv && !tabTitle.endsWith(\"*\"))\n\t\t\t\tfileTab.setText(tabTitle + \"*\");\n\t\t\t\n\t\t\telse if (!newv && tabTitle.endsWith(\"*\"))\n\t\t\t\tfileTab.setText(tabTitle.substring(0, tabTitle.length()-1));\n\t\t});\n\t\t\n\t\t\n\t\tfileTab.setOnCloseRequest(e -> {\n\t\t\t\n\t\t\tboolean success = FileManager.closeFile(this);\n\t\t\t\n\t\t\tif (!success)\n\t\t\t\te.consume();\n\t\t});\n\t\t\n\t\tMainApp.getMainController().selectTab(fileTab);\n\t}", "private void initTabs()\n {\n updateDayTab();\n\n // Set initial time on time tab\n updateTimeTab();\n }", "private void setupTabs() {\n }", "public CTabFolder( final Composite parent, final int style ) {\n super( parent, checkStyle( style ) );\n super.setLayout( new CTabFolderLayout() );\n onBottom = ( super.getStyle() & SWT.BOTTOM ) != 0;\n single = ( super.getStyle() & SWT.SINGLE ) != 0;\n showClose = ( super.getStyle() & SWT.CLOSE ) != 0;\n borderRight = ( style & SWT.BORDER ) != 0 ? 1 : 0;\n borderLeft = borderRight;\n borderTop = onBottom ? borderLeft : 0;\n borderBottom = onBottom ? 0 : borderLeft;\n highlight_header = ( style & SWT.FLAT ) != 0 ? 1 : 3;\n highlight_margin = ( style & SWT.FLAT ) != 0 ? 0 : 2;\n updateTabHeight( false );\n resizeListener = new ControlAdapter() {\n public void controlResized( final ControlEvent event ) {\n onResize();\n }\n };\n addControlListener( resizeListener );\n registerDisposeListener();\n tabFolderAdapter = new CTabFolderAdapter();\n selectionGraphicsAdapter = new WidgetGraphicsAdapter();\n }", "public void init(){\n\t\tm_Folders = new ArrayList<Folder>();\n\t\n\t\tm_Folders.add(new Folder(\"Inbox\"));\n\t\tm_Folders.add(new Folder(\"Today\"));\n\t\tm_Folders.add(new Folder(\"Next\"));\n\t\tm_Folders.add(new Folder(\"Someday/Maybe\"));\t\t\n\t}", "private void initialize() {\n this.setSize(394, 201);\n\n this.addTab(\"看病人基本資料\", null, getSeePatientFoundamentalDataPanel(), null);\n this.addTab(\"看病歷\", null, getSeeCaseHistoryPanel(), null);\n this.addTab(\"查藥品庫存\", null, getSeeMedicinesPanel(), null);\n this.addTab(\"看檢查報告\", null, getSeeInspectionReportPanel(), null);\n this.addTab(\"看掛號病人\", null, getSeeRegisteredPatientFoundamentalDataPanel(), null);\n this.addTab(\"開藥單\", null, getWritePrescriptionPanel(), null);\n this.addTab(\"寫病歷\", null, getWriteCaseHistoryPanel(), null);\n this.addTab(\"決定病人住院\", null, getDecideHospitalizePanel(), null);\n this.addTab(\"急診\", null, getEmergencyTreatmentPanel(), null);\n }", "private void initialize() {\n layout = new HorizontalLayout();\n\n workspaceTabs = new TabSheet();\n\n WorkspacePanel panel = new WorkspacePanel(\"Workspace 1\");\n workspaceTabs.addTab(panel).setCaption(\"Workspace 1\");\n DropHandler dropHandler = searchMenu.createDropHandler(panel.getBaseLayout());\n panel.setDropHandler(dropHandler);\n\n layout.addComponent(workspaceTabs);\n\n setContent(layout);\n }", "public void init() {\n\t\ttabbed = new JTabbedPane();\n\t\ttabbed.insertTab(\"Sesion\", null, getPanelSesion(), \"Control de la sesion\", 0);\n\t\ttabbed.insertTab(\"Evolución bolsa\", null, new JPanel(), \"Control de los usuarios\", 1);\n\t\ttabbed.insertTab(\"Eventos\", null, new JPanel(), \"Control de los eventos\", 2);\n\t\ttabbed.insertTab(\"Control de Agentes\", null, getPanelAgentes(), \"Control de los agentes\", 3);\n\t\tgetContentPane().add(tabbed);\n\t\ttabbed.setEnabledAt(1, false);\n\t\ttabbed.setEnabledAt(2, false);\n\t\tsetSize(new Dimension(800, 600));\n\t}", "private VTabSheet initTabLayout() {\r\n VTabSheet tabs = new VTabSheet();\r\n Map<Component, Integer> tabComponentMap = new HashMap<Component, Integer>();\r\n Binder<Report> binder = new Binder<>(Report.class);\r\n fireEventTypeComponent = new FireEventTypeDataTab(report,userNeedToPrepare, binder, tabComponentMap);\r\n boolean basicEditRight = !report.getStatus().equals(ReportStatus.APPROVED) && (organizationIsCreator || userNeedToPrepare);\r\n tabs.addTab(getTranslation(\"reportView.tab.basicData.label\"), new ReportBasicDataTab(report, binder, basicEditRight, tabComponentMap, addressServiceRef.get(), this));\r\n tabs.addTab(getTranslation(\"reportView.tab.forcesData.label\"), new ReportForcesTab(report, userNeedToPrepare, organizationServiceRef.get(), vechileServiceRef.get(), reportServiceRef.get()));\r\n fireEventTab = tabs.addTab(getTranslation(\"reportView.tab.fireEventData.label\"), fireEventTypeComponent);\r\n tabs.addTab(getTranslation(\"reportView.tab.authorizationData.label\"), new ReportAuthorizationTab(report, binder, userNeedToPrepare, (userNeedToPrepare || userNeedToApprove), tabs, tabComponentMap, organizationServiceRef.get(), reportServiceRef.get(), notificationServiceRef.get()));\r\n return tabs;\r\n }", "@Override\n\tpublic void init() {\n\t\tsetMainWindow(new Window(\"Module Demo Application\", tabs));\n\t\ttabs.setSizeFull();\n\t}", "public void init(){\n tabHost = (TabHost)findViewById(android.R.id.tabhost);\n\n //Creating tab menu.\n TabHost.TabSpec TabMenu1 = tabHost.newTabSpec(\"First tab\");\n TabHost.TabSpec TabMenu2 = tabHost.newTabSpec(\"Second tab\");\n TabHost.TabSpec TabMenu3 = tabHost.newTabSpec(\"Third tab\");\n\n //Setting up tab 1 name.\n TabMenu1.setIndicator(getResources().getString(R.string.map));\n //Set tab 1 activity to tab 1 menu.\n Intent intent = new Intent(this, MapsActivity.class);\n intent.putExtra(\"studentObj\", student);\n TabMenu1.setContent(intent);\n\n\n //Setting up tab 2 name.\n TabMenu2.setIndicator(getResources().getString(R.string.people));\n intent = new Intent(this, PeopleActivity.class);\n TabMenu2.setContent(intent);\n\n //Setting up tab 2 name.\n TabMenu3.setIndicator(getResources().getString(R.string.setting));\n intent = new Intent(this, SettingActivity.class);\n TabMenu3.setContent(intent);\n\n //\n tabHost.addTab(TabMenu1);\n tabHost.addTab(TabMenu2);\n tabHost.addTab(TabMenu3);\n }", "public TabFolder(Composite parent, int style) {\n super(parent, checkStyle(style));\n }", "public TabFolder (Composite parent, int style) {\r\n\tsuper (parent, checkStyle (style));\r\n}", "private void initTabs() {\n\t\tJPanel newTab = new JPanel();\r\n\t\taddTab(\"\", newTab); //$NON-NLS-1$\r\n\t\tsetTabComponentAt(0, new NewPaneButton());\r\n\t\tsetEnabledAt(0, false);\r\n\t\t// Add a new pane\r\n\t\taddPane();\r\n }", "public void initializeTabs() {\n\n\t\tTabHost.TabSpec spec;\n\n\t\tspec = mTabHost.newTabSpec(Const.EVENTS);\n\t\tmTabHost.setCurrentTab(0);\n\t\tspec.setContent(new TabHost.TabContentFactory() {\n\t\t\tpublic View createTabContent(String tag) {\n\t\t\t\treturn findViewById(R.id.realtabcontent);\n\t\t\t}\n\t\t});\n\t\tspec.setIndicator(createTabView(R.drawable.tab_events_selector));\n\t\tmTabHost.addTab(spec);\n\n\t\tmTabHost.setCurrentTab(1);\n\t\tspec = mTabHost.newTabSpec(Const.FEED);\n\t\tspec.setContent(new TabHost.TabContentFactory() {\n\t\t\tpublic View createTabContent(String tag) {\n\t\t\t\treturn findViewById(R.id.realtabcontent);\n\t\t\t}\n\t\t});\n\t\tspec.setIndicator(createTabView(R.drawable.tab_feed_selector));\n\t\tmTabHost.addTab(spec);\n\n\t\tmTabHost.setCurrentTab(2);\n\t\tspec = mTabHost.newTabSpec(Const.INFO);\n\t\tspec.setContent(new TabHost.TabContentFactory() {\n\t\t\tpublic View createTabContent(String tag) {\n\t\t\t\treturn findViewById(R.id.realtabcontent);\n\t\t\t}\n\t\t});\n\t\tspec.setIndicator(createTabView(R.drawable.tab_info_selector));\n\t\tmTabHost.addTab(spec);\n\n\t}", "void init() {\n tabHost = findViewById(android.R.id.tabhost);\n tabHost.setup(this, getSupportFragmentManager(), android.R.id.tabcontent);\n tabHost.addTab(tabHost.newTabSpec(\"Login\").setIndicator(\"Login\", null), LoginFragment.class, null);\n tabHost.addTab(tabHost.newTabSpec(\"Register\").setIndicator(\"Register\", null), RegisterFragment.class, null);\n }", "protected void createContents() {\r\n\t\tshell = new Shell();\r\n\t\tshell.setSize(450, 300);\r\n\t\tshell.setText(\"SWT Application\");\r\n\t\tshell.setLayout(new FillLayout(SWT.HORIZONTAL));\r\n\t\t\r\n\t\tfinal TabFolder tabFolder = new TabFolder(shell, SWT.NONE);\r\n\t\ttabFolder.setToolTipText(\"\");\r\n\t\t\r\n\t\tTabItem tabItem = new TabItem(tabFolder, SWT.NONE);\r\n\t\ttabItem.setText(\"欢迎使用\");\r\n\t\t\r\n\t\tTabItem tabItem_1 = new TabItem(tabFolder, SWT.NONE);\r\n\t\ttabItem_1.setText(\"员工查询\");\r\n\t\t\r\n\t\tMenu menu = new Menu(shell, SWT.BAR);\r\n\t\tshell.setMenuBar(menu);\r\n\t\t\r\n\t\tMenuItem menuItem = new MenuItem(menu, SWT.NONE);\r\n\t\tmenuItem.setText(\"系统管理\");\r\n\t\t\r\n\t\tMenuItem menuItem_1 = new MenuItem(menu, SWT.CASCADE);\r\n\t\tmenuItem_1.setText(\"员工管理\");\r\n\t\t\r\n\t\tMenu menu_1 = new Menu(menuItem_1);\r\n\t\tmenuItem_1.setMenu(menu_1);\r\n\t\t\r\n\t\tMenuItem menuItem_2 = new MenuItem(menu_1, SWT.NONE);\r\n\t\tmenuItem_2.addSelectionListener(new SelectionAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t\tTabItem tbtmNewItem = new TabItem(tabFolder,SWT.NONE);\r\n\t\t\t\ttbtmNewItem.setText(\"员工查询\");\r\n\t\t\t\t//创建自定义组件\r\n\t\t\t\tEmpQueryCmp eqc = new EmpQueryCmp(tabFolder, SWT.NONE);\r\n\t\t\t\t//设置标签显示的自定义组件\r\n\t\t\t\ttbtmNewItem.setControl(eqc);\r\n\t\t\t\t\r\n\t\t\t\t//选中当前标签页\r\n\t\t\t\ttabFolder.setSelection(tbtmNewItem);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t});\r\n\t\tmenuItem_2.setText(\"员工查询\");\r\n\r\n\t}", "@Override\r\n protected Control createContents( final Composite parent ) {\r\n TabFolder folder = new TabFolder( parent, SWT.NONE );\r\n\r\n Tab appearanceTab = new AppearanceTab( overlayStore );\r\n createTab( folder, \"Appeara&nce\", appearanceTab.createControl( folder ) );\r\n\r\n Tab syntaxTab = new SyntaxTab( overlayStore );\r\n createTab( folder, \"Synta&x\", syntaxTab.createControl( folder ) );\r\n\r\n Tab annotationsTab = new AnnotationsTab( overlayStore );\r\n createTab( folder, \"Annotation&s\", annotationsTab.createControl( folder ) );\r\n\r\n Tab typingTab = new TypingTab( overlayStore );\r\n createTab( folder, \"T&yping\", typingTab.createControl( folder ) );\r\n\r\n return folder;\r\n }", "@Override\n public void initialize(URL url, ResourceBundle rb) {\n // TODO\n// MemberPageTab.setResizable(false);\n setNull();\n loadDate();\n \n \n \n \n \n \n }", "public Tabs() {\n initComponents();\n }", "@Override\r\n public void initialize(URL url, ResourceBundle rb) {\r\n Platform.runLater( new Runnable() {\r\n @Override\r\n public void run() {\r\n TabManager tm = TabManager.getInstance();\r\n tm.criar( Telas.Apresentacao );\r\n }\r\n });\r\n \r\n tvListaGerar();\r\n }", "public static TabFolder buildBasicTabFolder(Composite parent) {\r\n\t\treturn new TabFolder(parent, SWT.FLAT | SWT.BORDER);\r\n\t}", "private void initMainWorkspace() throws IOException {\n // THE TOP WORKSPACE PANE WILL ONLY DIRECTLY HOLD 2 THINGS, A LABEL\n // AND A SPLIT PANE, WHICH WILL HOLD 2 ADDITIONAL GROUPS OF CONTROLS\n mainWorkspacePane = new TabPane();\n mainWorkspacePane.setSide(Side.BOTTOM);\n mainWorkspacePane.setTabClosingPolicy(UNAVAILABLE);\n \n initTeamsTab();\n initPlayersTab();\n initStandingTab();\n initDraftTab();\n initMLBTeamTab();\n }", "public DoctorMainTabbedPane() {\n super();\n initialize();\n }", "public void initTab(ArrayList<CircuitUsageModel> modelList) {\n\t\ttabHost = getTabHost();\n\t\tResources res = getResources();\n\n\t\t// energy\n\t\tenergySpec = tabHost.newTabSpec(\"energy\");\n\t\tenergySpec.setIndicator(getString(R.string.energy),\n\t\t\t\tres.getDrawable(R.drawable.ic_tab_energy));\n\t\t// power\n\t\tpowerSpec = tabHost.newTabSpec(\"power\");\n\t\tpowerSpec.setIndicator(getString(R.string.power),\n\t\t\t\tres.getDrawable(R.drawable.ic_tab_power));\n\t\t// credit\n\t\tcreditSpec = tabHost.newTabSpec(\"credit\");\n\t\tcreditSpec.setIndicator(getString(R.string.credit),\n\t\t\t\tres.getDrawable(R.drawable.ic_tab_credit));\n\n\t\t// set tab content\n\t\tsetTabContent(modelList);\n\t\t\n\t\t// auto refresh\n\t\tautoRefresh();\n\t}", "@PostConstruct\r\n public void init() {\n this.tab = false;\r\n this.tabNumber = 0;\r\n\r\n weekdaysItem = new ArrayList<>();\r\n\r\n for (WeekDay wd : WeekDay.values()) {\r\n weekdaysItem.add(new SelectItem(wd, wd.name()));\r\n }\r\n }", "public void init(MapEditorHandler handler) {\n this.handler = handler;\n\n loadAreaIndices();\n\n String nsbtxFolderPath = new File(Utils.removeExtensionFromPath(handler.getMapMatrix().filePath)).getParent();\n if (isFolderPathValid(nsbtxFolderPath)) {\n this.nsbtxFolderPath = nsbtxFolderPath;\n jtfNsbtxFolderPath.setText(nsbtxFolderPath);\n }\n\n }", "private void $$$setupUI$$$() {\n panel1 = new JPanel();\n panel1.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));\n rootTabControl = new JTabbedPane();\n panel1.add(rootTabControl, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, new Dimension(200, 200), null, 0, false));\n }", "private void createContents() {\n shell = new Shell(getParent(), SWT.BORDER | SWT.TITLE | SWT.APPLICATION_MODAL);\n shell.setSize(FORM_WIDTH, 700);\n shell.setText(getText());\n shell.setLayout(new GridLayout(1, false));\n\n TabFolder tabFolder = new TabFolder(shell, SWT.NONE);\n tabFolder.setLayoutData(TAB_GROUP_LAYOUT_DATA);\n\n // STRUCTURE PARAMETERS\n\n TabItem tbtmStructure = new TabItem(tabFolder, SWT.NONE);\n tbtmStructure.setText(\"Structure\");\n\n Composite grpStructure = new Composite(tabFolder, SWT.NONE);\n tbtmStructure.setControl(grpStructure);\n grpStructure.setLayout(TAB_GROUP_LAYOUT);\n grpStructure.setLayoutData(TAB_GROUP_LAYOUT_DATA);\n\n ParmDialogText.load(grpStructure, parms, \"meta\");\n ParmDialogText.load(grpStructure, parms, \"col\");\n ParmDialogText.load(grpStructure, parms, \"id\");\n ParmDialogChoices.load(grpStructure, parms, \"init\", Activation.values());\n ParmDialogChoices.load(grpStructure, parms, \"activation\", Activation.values());\n ParmDialogFlag.load(grpStructure, parms, \"raw\");\n ParmDialogFlag.load(grpStructure, parms, \"batch\");\n ParmDialogGroup cnn = ParmDialogText.load(grpStructure, parms, \"cnn\");\n ParmDialogGroup filters = ParmDialogText.load(grpStructure, parms, \"filters\");\n ParmDialogGroup strides = ParmDialogText.load(grpStructure, parms, \"strides\");\n ParmDialogGroup subs = ParmDialogText.load(grpStructure, parms, \"sub\");\n if (cnn != null) {\n if (filters != null) cnn.setGrouped(filters);\n if (strides != null) cnn.setGrouped(strides);\n if (subs != null) cnn.setGrouped(subs);\n }\n ParmDialogText.load(grpStructure, parms, \"lstm\");\n ParmDialogGroup wGroup = ParmDialogText.load(grpStructure, parms, \"widths\");\n ParmDialogGroup bGroup = ParmDialogText.load(grpStructure, parms, \"balanced\");\n if (bGroup != null && wGroup != null) {\n wGroup.setExclusive(bGroup);\n bGroup.setExclusive(wGroup);\n }\n\n // SEARCH CONTROL PARAMETERS\n\n TabItem tbtmSearch = new TabItem(tabFolder, SWT.NONE);\n tbtmSearch.setText(\"Training\");\n\n ScrolledComposite grpSearch0 = new ScrolledComposite(tabFolder, SWT.V_SCROLL);\n grpSearch0.setLayout(new FillLayout());\n grpSearch0.setLayoutData(TAB_GROUP_LAYOUT_DATA);\n tbtmSearch.setControl(grpSearch0);\n Composite grpSearch = new Composite(grpSearch0, SWT.NONE);\n grpSearch0.setContent(grpSearch);\n grpSearch.setLayout(TAB_GROUP_LAYOUT);\n grpSearch.setLayoutData(TAB_GROUP_LAYOUT_DATA);\n\n Enum<?>[] preferTypes = (this.modelType == TrainingProcessor.Type.CLASS ? RunStats.OptimizationType.values()\n : RunStats.RegressionType.values());\n ParmDialogChoices.load(grpSearch, parms, \"prefer\", preferTypes);\n ParmDialogChoices.load(grpSearch, parms, \"method\", Trainer.Type.values());\n ParmDialogText.load(grpSearch, parms, \"bound\");\n ParmDialogChoices.load(grpSearch, parms, \"lossFun\", LossFunctionType.values());\n ParmDialogText.load(grpSearch, parms, \"weights\");\n ParmDialogText.load(grpSearch, parms, \"iter\");\n ParmDialogText.load(grpSearch, parms, \"batchSize\");\n ParmDialogText.load(grpSearch, parms, \"testSize\");\n ParmDialogText.load(grpSearch, parms, \"maxBatches\");\n ParmDialogText.load(grpSearch, parms, \"earlyStop\");\n ParmDialogChoices.load(grpSearch, parms, \"regMode\", Regularization.Mode.values());\n ParmDialogText.load(grpSearch, parms, \"regFactor\");\n ParmDialogText.load(grpSearch, parms, \"seed\");\n ParmDialogChoices.load(grpSearch, parms, \"start\", WeightInit.values());\n ParmDialogChoices.load(grpSearch, parms, \"gradNorm\", GradientNormalization.values());\n ParmDialogChoices.load(grpSearch, parms, \"updater\", GradientUpdater.Type.values());\n ParmDialogText.load(grpSearch, parms, \"learnRate\");\n ParmDialogChoices.load(grpSearch, parms, \"bUpdater\", GradientUpdater.Type.values());\n ParmDialogText.load(grpSearch, parms, \"updateRate\");\n\n grpSearch.setSize(grpSearch.computeSize(FORM_WIDTH - 50, SWT.DEFAULT));\n\n // BOTTOM BUTTON BAR\n\n Composite grpButtonBar = new Composite(shell, SWT.NONE);\n grpButtonBar.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, true, false, 1, 1));\n grpButtonBar.setLayout(new FillLayout(SWT.HORIZONTAL));\n\n Button btnSave = new Button(grpButtonBar, SWT.NONE);\n btnSave.setText(\"Save\");\n btnSave.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(SelectionEvent evt) {\n try {\n parms.save(parmFile);\n } catch (IOException e) {\n ShellUtils.showErrorBox(getParent(), \"Error Saving Parm File\", e.getMessage());\n }\n }\n });\n\n Button btnClose = new Button(grpButtonBar, SWT.NONE);\n btnClose.setText(\"Cancel\");\n btnClose.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(SelectionEvent evt) {\n shell.close();\n }\n });\n\n Button btnOK = new Button(grpButtonBar, SWT.NONE);\n btnOK.setText(\"Save and Close\");\n btnOK.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(SelectionEvent evt) {\n try {\n parms.save(parmFile);\n shell.close();\n } catch (IOException e) {\n ShellUtils.showErrorBox(getParent(), \"Error Saving Parm File\", e.getMessage());\n }\n }\n });\n\n }", "@Override\n public void init() {\n super.init();\n\n setTheme(\"xtreemfs\");\n\n initLayout();\n initTable();\n initFileDetails();\n initButtons();\n initFilteringControls();\n initUploadState();\n }", "private void initialize() {\r\n\r\n\t\tserverNode = new TreeParent(\"Servers\", \"Servers\", \"AA\", this);\r\n\t\tserverNode.setImageKey(\"System.gif\");\r\n\r\n\t\tnewServerNode = new TreeParent(\"NewServerWizard\", \"New Server\", \"AA\", this);\r\n\t\tnewServerNode.setImageKey(\"ApplicationFilter.gif\");\r\n\t\tnewServerNode.setExpandable(false);\r\n\t\tserverNode.addChild(newServerNode);\r\n\t\tnewServerNode.addChild(new TreeObject(\"Dummy\"));\r\n\t\r\n\t\tloadServers(serverNode);\r\n\r\n\t\tpreferenceNode = new TreeParent(\"Systems\", \"Preferences\", \"BB\", this);\r\n\t\tpreferenceNode.setImageKey(\"preference_page.gif\");\r\n\t\tpreferenceNode.addChild(new TreeObject(\"Dummy\"));\r\n\r\n\t\tinvisibleRoot = new TreeParent(\"\", \"InvisibleRoot\", \"AA\", this);\r\n\t\tinvisibleRoot.addChild(serverNode);\r\n\t\tinvisibleRoot.addChild(preferenceNode);\r\n\r\n\t}", "public void initAccordion() {\n if (this instanceof GenomeDataPanel) {\n Component initialTab = ((GenomeDataPanel) this).createGenomeTab(0);\n datasetAccordion.addTab(initialTab, \"Dataset \" + 1);\n } else {\n Component initialTab = ((ConditionDataPanel) this).createConditionTab(0);\n datasetAccordion.addTab(initialTab, \"Condition \" + 1);\n }\n\n //Tell presenter to refill the grid of available graph files;\n presenter.resetGraphFileGrid();\n //Tell presenter to remove old bindings and set up new ones\n presenter.clearDynamicBindings();\n presenter.initDatasetBindings(0);\n presenter.initReplicateBindings(0, 0);\n\n }", "public void initialize() {\r\n setLayout(new BorderLayout());\r\n add(BorderLayout.CENTER, tabbedPane);\r\n for (Iterator it = widgets.iterator(); it.hasNext();) {\r\n SlotWidget widget = (SlotWidget) it.next();\r\n widget.initialize();\r\n }\r\n }", "public JTabbedPane initTabs() {\n\t\treturn null;\n\t}", "@SuppressWarnings(\"unchecked\")\n\t@Override\n\tpublic void initialize(URL arg0, ResourceBundle arg1) {\n\t\ttabPane.getSelectionModel().selectedItemProperty().addListener(\n \t\t new ChangeListener<Tab>() {\n \t\t @Override\n \t\t public void changed(ObservableValue<? extends Tab> ov, Tab t, Tab t1) {\n \t\t System.out.println(\"Tab Selection changed to: \"+t1.getText());\n \t\t currentTab = t1.getText();\n \t\t }\n \t\t }\n \t\t);\n\t\t//----------------------------------------------------------------------------------\\\\\n\n\t\tDatabaseInterface db = new DatabaseInterface();\n\t\t\n\t\tObservableList<Account> Accounts = FXCollections.observableArrayList(db.getAllAccounts()); //Inneholder ALLE accountene i databasen\n\t\tObservableList<Group> Groups = FXCollections.observableArrayList(db.getAllGroups()); // Inneholder ALLE gruppene i databasen\n\n\t\tObservableList<String> list = FXCollections.observableArrayList(\"--- INGEN ---\");\n\t\tfor(int x = 0; x < Groups.size(); x++){\n\t\t\tlist.add(Groups.get(x).getGroup_name() + \" - ID =\"+Groups.get(x).getGroup_id());\n\n\t\t}\n\t\t\n\t\t// Set up the table data\n FirstName.setCellValueFactory(\n new PropertyValueFactory<Account,String>(\"first_name\")\n );\n LastName.setCellValueFactory(\n new PropertyValueFactory<Account,String>(\"last_name\")\n );\n GroupName.setCellValueFactory(\n \tnew PropertyValueFactory<Group,String>(\"group_name\")\n );\n \n\t\t\n //Sett verdiene inn i tabellen\n\t\tPersonTable.setItems(Accounts);\n\t\tGroupTable.setItems(Groups);\n\t\t\n\t\t\n\t\tsubgroup_menu.getItems().addAll(list);\n\t\tsubgroup_menu.getSelectionModel().select(0);\n\n\t}", "private void initTabComponent(DocumentWrapper file, int i) {\n\t\tpane.setTabComponentAt(i,\n\t\t\t\tnew ButtonTabComponent(pane, file, this));\n\t}", "@Override\r\n public void initialize(URL url, ResourceBundle rb) {\r\n System.out.println(\"Jeste->\"+tabtest);\r\n }", "@Override\n\tpublic JTabbedPane initTabs() {\n\t\treturn null;\n\t}", "@Override\r\n\tprotected void initPage() {\n\t\t\r\n\t\t\r\n\t\tJPanel paneLabel = new JPanel();\r\n\t\t//JPanel panelTabs = new JPanel();\r\n\t\t\r\n\t\t\r\n\t\t//pack.setVisible(false);\r\n\r\n\t\t//setlay out\r\n\t\t//panelTabs.setLayout(new GridLayout(1, 1));\r\n\t\t\r\n\t\t//add label to label panel\r\n\t\tpaneLabel.add(new JLabel(\"Please select Objects To export\"));\r\n\t\t//tabs.setLayout(new GridLayout(1, 1));\r\n\t\t\r\n\t\t//add tabs\r\n\t\ttabs.addTab(\"Packages\", null, pack, \"Packages\");\r\n\t\ttabs.addTab(\"Functions\", null, fun, \"Functions\");\r\n\t\ttabs.addTab(\"Procedures\", null, proc, \"Procedures\");\r\n\t\ttabs.addTab(\"Schemas\", null, sch, \"Schemas\");\r\n\t\t\r\n\t\t\r\n\t\ttabs.setTabPlacement(JTabbedPane.TOP);\r\n\t\t\r\n\t\t//add tabs to tabpanel panel\r\n\t\t//panelTabs.add(tabs);\r\n\t\t\r\n\t\t//add data tables to panels\r\n\t\tpackTbl = new JObjectTable(pack);\r\n\t\tfunTbl = new JObjectTable(fun);\r\n\t\tschTbl = new JObjectTable(sch);\r\n\t\tprocTbl = new JObjectTable(proc);\r\n\t\t\r\n\t\t//set layout\r\n\t\tsetLayout(new GridLayout(1,1));\r\n\t\t\r\n\t\t//add label & tabs to page panel\r\n\t\t//add(paneLabel, BorderLayout.NORTH);\r\n\t\t//add(panelTabs,BorderLayout.CENTER);\r\n\t\tadd(tabs);\r\n\t\t\r\n\t\t//init select all check boxes\r\n\t\tinitChecks();\r\n\t\t\r\n\t\t//add checks to panel\r\n\t\tpack.add(ckPack);\r\n\t\tfun.add(ckFun);\r\n\t\tsch.add(ckSchema);\r\n\t\tproc.add(ckProc);\r\n\t\t\r\n\t}", "public ReportMakerTab() {\r\n\t\tsuper();\r\n\t\tinitialize();\r\n\t}", "private void setupTab() {\n setLayout(new BorderLayout());\n JSplitPane mainSplit = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT);\n mainSplit.setDividerLocation(160);\n mainSplit.setBorder(BorderFactory.createEmptyBorder());\n\n // set up the MBean tree panel (left pane)\n tree = new XTree(this);\n tree.setCellRenderer(new XTreeRenderer());\n tree.getSelectionModel().setSelectionMode(TreeSelectionModel.SINGLE_TREE_SELECTION);\n tree.addTreeSelectionListener(this);\n tree.addTreeWillExpandListener(this);\n tree.addMouseListener(ml);\n JScrollPane theScrollPane = new JScrollPane(tree, JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED,\n JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);\n JPanel treePanel = new JPanel(new BorderLayout());\n treePanel.add(theScrollPane, BorderLayout.CENTER);\n mainSplit.add(treePanel, JSplitPane.LEFT, 0);\n\n // set up the MBean sheet panel (right pane)\n viewer = new XDataViewer(this);\n sheet = new XSheet(this);\n mainSplit.add(sheet, JSplitPane.RIGHT, 0);\n\n add(mainSplit);\n }", "private void createTabs() {\r\n\t\ttabbedPane = new JTabbedPane();\r\n\t\t\r\n\t\t//changes title and status bar \r\n\t\ttabbedPane.addChangeListener((l) -> { \r\n\t\t\tint index = tabbedPane.getSelectedIndex();\r\n\t\t\tif (index < 0) {\r\n\t\t\t\tcurrentFile = \"-\";\r\n\t\t\t} else {\r\n\t\t\t\tcurrentFile = tabbedPane.getToolTipTextAt(index);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif (currentFile.isEmpty()) {\t//file not yet saved\r\n\t\t\t\tcurrentFile = tabbedPane.getTitleAt(tabbedPane.getSelectedIndex());\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tsetTitle(currentFile + \" - JNotepad++\");\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tJTextArea current = getSelectedTextArea();\r\n\t\t\tif (current == null) return;\r\n\t\t\tCaretListener[] listeners = current.getCaretListeners();\r\n\t\t\tlisteners[0].caretUpdate(new CaretEvent(current) {\r\n\t\t\t\t\r\n\t\t\t\t/**\r\n\t\t\t\t * Serial UID.\r\n\t\t\t\t */\r\n\t\t\t\tprivate static final long serialVersionUID = 1L;\r\n\r\n\t\t\t\t@Override\r\n\t\t\t\tpublic int getMark() {\r\n\t\t\t\t\treturn 0;\t//not used\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t@Override\r\n\t\t\t\tpublic int getDot() {\r\n\t\t\t\t\treturn current.getCaretPosition();\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t});\r\n\t\t\r\n\t\tcreateSingleTab(null, null);\r\n\t\tgetContentPane().add(tabbedPane, BorderLayout.CENTER);\t\r\n\t}", "@Override\n public void initialize(URL url, ResourceBundle rb) {\n try {\n model = Model.getInstance();\n setUpTableView();\n setUpIndicator();\n }\n catch (Exception ex) {\n Logger.getLogger(AssignFolderWindowController.class.getName()).log(Level.SEVERE, null, ex);\n EventLogger.log(EventLogger.Level.ERROR, \"An error occured: \" + ex.getMessage());\n }\n }", "private void setTabLayout() {\n View view = LayoutInflater.from(getApplicationContext()).inflate(R.layout.tab_layout_item, null);\n TextView title = (TextView) view.findViewById(R.id.item_tablayout_title_txt);\n ImageView imgIcon = (ImageView) view.findViewById(R.id.item_tablayout_img);\n title.setText(Constants.MOVIES);\n imgIcon.setImageResource(R.mipmap.ic_home);\n mTabLayout.getTabAt(0).setCustomView(view);\n\n view =\n LayoutInflater.from(getApplicationContext()).inflate(R.layout.tab_layout_item, null);\n title = (TextView) view.findViewById(R.id.item_tablayout_title_txt);\n count = (TextView) view.findViewById(R.id.item_tablayout_count_txt);\n imgIcon = (ImageView) view.findViewById(R.id.item_tablayout_img);\n title.setText(Constants.FAVOURITE);\n imgIcon.setImageResource(R.mipmap.ic_favorite);\n count.setVisibility(View.VISIBLE);\n mTabLayout.getTabAt(1).setCustomView(view);\n\n view =\n LayoutInflater.from(getApplicationContext()).inflate(R.layout.tab_layout_item, null);\n title = (TextView) view.findViewById(R.id.item_tablayout_title_txt);\n imgIcon = (ImageView) view.findViewById(R.id.item_tablayout_img);\n title.setText(Constants.SETTINGS);\n imgIcon.setImageResource(R.mipmap.ic_settings);\n mTabLayout.getTabAt(2).setCustomView(view);\n\n view =\n LayoutInflater.from(getApplicationContext()).inflate(R.layout.tab_layout_item, null);\n title = (TextView) view.findViewById(R.id.item_tablayout_title_txt);\n imgIcon = (ImageView) view.findViewById(R.id.item_tablayout_img);\n title.setText(Constants.ABOUT);\n imgIcon.setImageResource(R.mipmap.ic_info);\n mTabLayout.getTabAt(3).setCustomView(view);\n }", "private void initMLBTeamTab() throws IOException {\n // THESE ARE THE CONTROLS FOR THE BASIC SCHEDULE PAGE HEADER INFO\n // WE'LL ARRANGE THEM IN A VBox\n mlbTeamTab = new Tab();\n mlbTeamWorkspacePane = new VBox();\n mlbTeamWorkspacePane.getStyleClass().add(CLASS_DRAFT_PANE);\n \n // ADD LABEL & BUTTON\n Label mlbTeams = new Label();\n mlbTeams = initChildLabel(mlbTeamWorkspacePane, DraftKit_PropertyType.MLB_HEADING_LABEL, CLASS_HEADING_LABEL);\n \n PropertiesManager props = PropertiesManager.getPropertiesManager();\n String imagePath = \"file:\" + PATH_IMAGES + props.getProperty(DraftKit_PropertyType.MLB_ICON);\n Image buttonImage = new Image(imagePath);\n mlbTeamTab.setGraphic(new ImageView(buttonImage));\n \n // CREATE THE COMBOBOX\n HBox mlbTeamHBox = new HBox();\n initHBoxLabel(mlbTeamHBox, DraftKit_PropertyType.MLB_TEAM_LABEL, CLASS_PROMPT_LABEL);\n \n mlbTeamBox = new ComboBox();\n proTeams = new ArrayList<>();\n \n proTeams.add(\"ATL\");\n proTeams.add(\"AZ\");\n proTeams.add(\"CHC\");\n proTeams.add(\"CIN\");\n proTeams.add(\"COL\");\n proTeams.add(\"LAD\");\n proTeams.add(\"MIA\");\n proTeams.add(\"MIL\");\n proTeams.add(\"NYM\");\n proTeams.add(\"PHI\");\n proTeams.add(\"PIT\");\n proTeams.add(\"SD\");\n proTeams.add(\"SF\");\n proTeams.add(\"STL\");\n proTeams.add(\"WAS\");\n \n for (String s : proTeams) {\n mlbTeamBox.getItems().add(s);\n }\n \n mlbTeamBox.setValue(\"Choose a MLB Team\");\n \n mlbTeamHBox.getChildren().add(mlbTeamBox);\n \n mlbTeamBox.valueProperty().addListener(new ChangeListener<String>() {\n @Override public void changed(ObservableValue ov, String t, String t1) {\n ArrayList<Player> tempTeam = new ArrayList<>();\n teamTable.getItems().clear();\n for (Player p : dataManager.getDraft().getPlayerPool()) {\n if (p.getMLBTeam().equals(mlbTeamBox.getSelectionModel().getSelectedItem())) {\n tempTeam.add(p);\n }\n }\n teamTable = resetMLBTable(tempTeam);\n }\n });\n \n // CREATE THE TABLE VIEW FOR THE MLB TEAMS PAGE\n mlbTable = new TableView();\n \n mlbFirst = new TableColumn<>(\"First\");\n mlbFirst.setCellValueFactory(new PropertyValueFactory<>(\"FirstName\"));\n mlbFirst.setSortType(SortType.ASCENDING);\n mlbFirst.setSortable(true);\n mlbLast = new TableColumn<>(\"Last\");\n mlbLast.setSortType(SortType.ASCENDING);\n mlbLast.setSortable(true);\n mlbLast.setCellValueFactory(new PropertyValueFactory<>(\"LastName\"));\n mlbPositions = new TableColumn<>(\"Positions\");\n mlbPositions.setCellValueFactory(new PropertyValueFactory<>(\"Position\"));\n \n mlbTable.getColumns().setAll(mlbFirst, mlbLast, mlbPositions);\n \n mlbTable = resetMLBTable(dataManager.getDraft().getPlayerPool());\n \n // SET TOOL TIP\n Tooltip t = new Tooltip(\"MLB Teams Page\");\n mlbTeamTab.setTooltip(t);\n \n // PUT IN TAB PANE\n mlbTeamWorkspacePane.getChildren().add(mlbTeamHBox);\n mlbTeamWorkspacePane.getChildren().add(mlbTable);\n mlbTeamTab.setContent(mlbTeamWorkspacePane);\n mainWorkspacePane.getTabs().add(mlbTeamTab);\n }", "private void init() {\n\n File folder = new File(MAP_PATH);\n File[] listOfFiles = folder.listFiles();\n\n for (int i = 0; i < Objects.requireNonNull(listOfFiles).length; i++) {\n this.mapFiles.add(new File(MAP_PATH + listOfFiles[i].getName()));\n }\n }", "private void init() {\n setText(\"Case Name\");\n createFieldsComp();\n GuiUtil.addSeparator(shell, SWT.HORIZONTAL);\n createBottomActionButtons();\n }", "private void initTabs() {\n\t\tmContainer.removeAllViews();\n\n\t\tif(mAdapter==null||mViewPager==null){\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tfor(int i=0;i<mViewPager.getAdapter().getCount();i++){\n\t\t\tfinal int index=i;\n\t\t\tButton tabs= (Button) mAdapter.getView(index);\n\t\t\tLayoutParams layoutParams=new LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT);\n\t\t\tlayoutParams.weight=1;\n\t\t\tmContainer.addView(tabs,layoutParams);\n\t\t\t\n\t\t\ttabs.setOnClickListener(new OnClickListener(){\n\n\t\t\t\t@Override\n\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\tif(mViewPager.getCurrentItem()==index){\n\t\t\t\t\t\tselectTab(index);\n\t\t\t\t\t}else{\n\t\t\t\t\t\tmViewPager.setCurrentItem(index, true);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t});\n\t\t}\n\t\tselectTab(0);\n\t}", "private void initView() {\n\t\tmTabHost = (AnimationTabHost) findViewById(android.R.id.tabhost);\n\t\tmTabWidget = (TabWidget) findViewById(android.R.id.tabs);\n\t\tmTabHost.setOnTabChangedListener(this);\n\n\t\tsetIndicator(R.drawable.tab_recommend, 0, new Intent(this,\n\t\t\t\tRecommendActivity.class), R.string.recommend);\n\t\tsetIndicator(R.drawable.tab_channel, 1, new Intent(this,\n\t\t\t\tChannelActivity.class), R.string.channel);\n//\t\tsetIndicator(R.drawable.tab_search, 2, new Intent(this,\n//\t\t\t\tSearchActivity.class), R.string.search);\n\t\tsetIndicator(R.drawable.tab_personal, 3, new Intent(this,\n\t\t\t\tPersonalActivity.class), R.string.peraonal);\n\n\t\tmTabHost.setOpenAnimation(true);\n\n\n\t}", "@Override\n\tpublic Composite createTab(CTabFolder parent) {\n\t\tmIconCache = PowerMan.getSingleton(MainDesigner.class).getIconCache();\n\n\t\tmTree = new Tree(parent, SWT.BORDER | SWT.V_SCROLL | SWT.H_SCROLL | SWT.MULTI);\n\n\t\tmTree.addSelectionListener(new SelectionListener() {\n\t\t\tpublic void widgetSelected(SelectionEvent event) {\n\t\t\t\tfinal TreeItem[] selection = mTree.getSelection();\n\t\t\t\tif (selection != null && selection.length != 0) {\n\t\t\t\t\tTreeItem item = selection[0];\n//\t\t\t\t\titem.setExpanded(!item.getExpanded());\n\t\t\t\t\t\n\t\t\t\t\tfinal String path = getItemData(item, 0);\n\t\t\t\t\tif (ResJudge.isLegalResAndExisted(path)) {\n\t\t\t\t\t\tPreviewPictureTab prev = PowerMan.getSingleton(PreviewPictureTab.class);\n//\t\t\t\t\t\tImageWindow.getSingleton().open(path, mTree);\n\t\t\t\t\t\tprev.setResid(path);\n//\t\t\t\t\t\tmResTree.forceFocus();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tpublic void widgetDefaultSelected(SelectionEvent event) {\n\t\t\t\tfinal TreeItem[] selection = mTree.getSelection();\n\t\t\t\tif (selection != null && selection.length != 0) {\n\t\t\t\t\tTreeItem itemInit = selection[0];\n\t\t\t\t\tif (itemInit != null) {\n\t\t\t\t\t\tfinal String pathInit = getItemData(itemInit, 0);\n\t\t\t\t\t\tTpConfig tpc = ResPackerHelper.readPackerConfig(pathInit);\n\t\t\t\t\t\tif (tpc == null) {\n\t\t\t\t\t\t\ttpc = new TpConfig();\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tfinal TpConfigPanel tpcp = new TpConfigPanel();\n\t\t\t\t\t\tfinal TpConfig newTpc = tpcp.open(tpc, PowerMan.getSingleton(MainDesigner.class).getShell());\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (newTpc != null) {\n\t\t\t\t\t\t\tfor (TreeItem item : selection) {\n\t\t\t\t\t\t\t\tfinal String path = getItemData(item, 0);\n\t\t\t\t\t\t\t\tif (FileHelper.isDir(path)) {\n\t\t\t\t\t\t\t\t\tif (newTpc != null) {\n\t\t\t\t\t\t\t\t\t\tResPackerHelper.writePackerConfig(path, newTpc);\n\t\t\t\t\t\t\t\t\t\titem.setData(\"tpc\", newTpc);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tevent.doit = false;\n\t\t\t}\n\t\t});\n\t\t\n\t\tmTree.addKeyListener(new KeyListener() {\n\t\t\tpublic void keyReleased(KeyEvent e) {\n\t\t\t}\n\t\t\t\n\t\t\tpublic void keyPressed(KeyEvent e) {\n\t\t\t\tswitch (e.keyCode) {\n\t\t\t\tcase 'F':\n\t\t\t\tcase 'f':\n\t\t\t\t\tif ((e.stateMask & PlatformHelper.CTRL) != 0) {\n\t\t\t\t\t\topenSearch();\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\t\n\n\t\tfinal String[] columnTitles = new String[] { \"file\", \"pack\" };\n\n\t\tfor (int i = 0; i < columnTitles.length; i++) {\n\t\t\tTreeColumn treeColumn = new TreeColumn(mTree, SWT.NONE);\n\t\t\ttreeColumn.setText(columnTitles[i]);\n\t\t\ttreeColumn.setMoveable(true);\n\t\t}\n\t\tmTree.setHeaderVisible(true);\n\t\t\n\t\tbuildTree();\n\n\t\tfinal int columnCount = mTree.getColumnCount();\n\t\tfor (int i = 0; i < columnCount; i++) {\n\t\t\tTreeColumn treeColumn = mTree.getColumn(i);\n\t\t\ttreeColumn.pack();\n\t\t\t\n\t\t\ttreeColumn.setWidth(200);\n\t\t}\n\n\t\tsetDND();\n\t\tsetMenu();\n\t\t\n\t\trun();\n\t\t\n\t\treturn mTree;\n\t}", "private void initUI() {\n fileCount = wizard.getFileCount();\n fileByteCount = wizard.getByteCount();\n fileCountLabel.setText(String.valueOf(fileCount));\n updateByteCount(byteCountLabel, byteCountUnit, \"KB\", fileByteCount, 0);\n progressBar.setProgress(0);\n }", "private void createContents() {\r\n\t\tshlFilter = new Shell(getParent(), getStyle());\r\n\t\tshlFilter.setSize(450, 246);\r\n\t\tshlFilter.setText(\"Filter\");\r\n\t\t\r\n\t\tTabFolder tabFolder = new TabFolder(shlFilter, SWT.NONE);\r\n\t\ttabFolder.setBounds(10, 10, 424, 158);\r\n\t\t\r\n\t\tTabItem tbtmByDate = new TabItem(tabFolder, SWT.NONE);\r\n\t\ttbtmByDate.setText(\"by Date\");\r\n\t\t\r\n\t\tGroup group = new Group(tabFolder, SWT.NONE);\r\n\t\ttbtmByDate.setControl(group);\r\n\t\t\r\n\t\tLabel dateLableDayOfMonth = new Label(group, SWT.NONE);\r\n\t\tdateLableDayOfMonth.setBounds(89, 28, 82, 15);\r\n\t\tdateLableDayOfMonth.setText(\"Day of Month\");\r\n\t\t\r\n\t\tdayOfMonthSelector = new Spinner(group, SWT.BORDER);\r\n\t\tdayOfMonthSelector.setEnabled(false);\r\n\t\tdayOfMonthSelector.setMaximum(31);\r\n\t\tdayOfMonthSelector.setMinimum(1);\r\n\t\tdayOfMonthSelector.setBounds(299, 28, 47, 22);\r\n\t\t\r\n\t\tdateEnabler = new Button(group, SWT.CHECK);\r\n\t\tdateEnabler.addSelectionListener(new SelectionAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t\tboolean val = dateEnabler.getSelection();\r\n\t\t\t\tdayOfMonthSelector.setEnabled(val);\r\n\t\t\t}\r\n\t\t});\r\n\t\tdateEnabler.setBounds(20, 30, 63, 16);\r\n\t\tdateEnabler.setText(\"Enable\");\r\n\t\t\r\n\t\tdateSearchMode = new CCombo(group, SWT.BORDER);\r\n\t\tdateSearchMode.setText(\"equals\");\r\n\t\tdateSearchMode.setItems(new String[] {\"equals\", \"contains\", \"not equals\", \"not contains\"});\r\n\t\tdateSearchMode.setEnabled(false);\r\n\t\tdateSearchMode.setBounds(177, 28, 116, 21);\r\n\t\t\r\n\t\tTabItem tbtmByName = new TabItem(tabFolder, SWT.NONE);\r\n\t\ttbtmByName.setText(\"by Name\");\r\n\t\t\r\n\t\tGroup group_1 = new Group(tabFolder, SWT.NONE);\r\n\t\ttbtmByName.setControl(group_1);\r\n\t\t\r\n\t\tnameEnabler = new Button(group_1, SWT.CHECK);\r\n\t\tnameEnabler.addSelectionListener(new SelectionAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t\tboolean val = nameEnabler.getSelection();\r\n\t\t\t\tnameSearchMode.setEnabled(val);\r\n\t\t\t\tnameSearchText.setEnabled(val);\r\n\t\t\t}\r\n\t\t});\r\n\t\tnameEnabler.setBounds(10, 25, 68, 16);\r\n\t\tnameEnabler.setText(\"Enabled\");\r\n\t\t\r\n\t\tnameSearchMode = new CCombo(group_1, SWT.BORDER);\r\n\t\tnameSearchMode.setEnabled(false);\r\n\t\tnameSearchMode.setText(\"equals\");\r\n\t\tnameSearchMode.setItems(new String[] {\"equals\", \"contains\", \"not equals\", \"not contains\"});\r\n\t\tnameSearchMode.setBounds(84, 25, 116, 21);\r\n\t\t\r\n\t\tnameSearchText = new Text(group_1, SWT.BORDER);\r\n\t\tnameSearchText.setEnabled(false);\r\n\t\tnameSearchText.setBounds(206, 25, 200, 21);\r\n\t\t\r\n\t\tButton btnOk = new Button(shlFilter, SWT.NONE);\r\n\t\tbtnOk.addMouseListener(new MouseAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void mouseUp(MouseEvent e) {\r\n//\t\t\t\tif (dateEnabler.getSelection()){\r\n//\t\t\t\t\tString selection = nameSearchMode.getText();\r\n//\t\t\t\t\tomega1001.task_spector_analyzer.gui.filter.impl.DateFilter.Criteria criterium = null;\r\n//\t\t\t\t\tif (selection.equals(\"equals\"))\r\n//\t\t\t\t\t\tcriterium = Criteria.EQUALS;\r\n//\t\t\t\t\telse if (selection.equals(\"contains\"))\r\n//\t\t\t\t\t\tcriterium = Criteria.CONTAINS;\r\n//\t\t\t\t\telse if (selection.equals(\"not equals\"))\r\n//\t\t\t\t\t\tcriterium = Criteria.NOT_EQUALS;\r\n//\t\t\t\t\telse if (selection.equals(\"not contains\"))\r\n//\t\t\t\t\t\tcriterium = Criteria.NOT_CONTAINS;\r\n//\t\t\t\t\telse\r\n//\t\t\t\t\t\tcriterium = Criteria.EQUALS;\r\n//\t\t\t\t\tresult.add(new DateFilter(dayOfMonthSelector.getSelection(),criterium));\r\n//\t\t\t\t}\r\n\t\t\t\tif (nameEnabler.getSelection()){\r\n\t\t\t\t\tString selection = nameSearchMode.getText();\r\n\t\t\t\t\tCriteria criterium = null;\r\n\t\t\t\t\tif (selection.equals(\"equals\"))\r\n\t\t\t\t\t\tcriterium = Criteria.EQUALS;\r\n\t\t\t\t\telse if (selection.equals(\"contains\"))\r\n\t\t\t\t\t\tcriterium = Criteria.CONTAINS;\r\n\t\t\t\t\telse if (selection.equals(\"not equals\"))\r\n\t\t\t\t\t\tcriterium = Criteria.NOT_EQUALS;\r\n\t\t\t\t\telse if (selection.equals(\"not contains\"))\r\n\t\t\t\t\t\tcriterium = Criteria.NOT_CONTAINS;\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\tcriterium = Criteria.EQUALS;\r\n\t\t\t\t\tresult.add(new NameFilter(criterium, nameSearchText.getText()));\r\n\t\t\t\t}\t\r\n\t\t\t\t\r\n\t\t\t\tshlFilter.dispose();\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtnOk.setBounds(10, 183, 75, 25);\r\n\t\tbtnOk.setText(\"OK\");\r\n\r\n\t}", "protected Folder(){\n\t super(\"Folder\");\n\t }", "public static void initialize(final String sFolder) {\n\n GUIResources.addResourcesFromFolder(sFolder);\n _initialize();\n\n\n }", "public void initTabGrades() {\n\n\t\ttabUbuGrades.setOnSelectionChanged(this::setTabGrades);\n\n\t}", "private void init() {\n this.listaObjetos = new ArrayList();\n this.root = null;\n this.objeto = new Tblobjeto();\n this.pagina = new Tblpagina();\n this.selectedObj = null;\n this.menus = null;\n this.subMenus = null;\n this.acciones = null;\n this.nodes = new ArrayList<TreeNode>();\n this.selectedObjeto = null;\n this.selectedTipo = null;\n this.renderPaginaForm = null;\n this.renderGrupoForm = null;\n this.selectedGrupo = null;\n this.populateTreeTable();\n }", "void initialise(){\n tabLayout = findViewById(R.id.tabLayout);\n viewPager = findViewById(R.id.view_pager);\n PageAdapter pagerAdapter = new PageAdapter(getSupportFragmentManager(), 3);\n viewPager.setAdapter(pagerAdapter);\n sharedPreferences = getSharedPreferences(SHARED_PREF, MODE_PRIVATE);\n }", "@Override\n public void initialize() {\n AppContext.getInstance().set(\"tablero\",this);\n tabl = new CasillaController[8][6]; \n SeleccNivel((int)AppContext.getInstance().get(\"lvl\"));\n LlenarCasillas();\n \n }", "@Override\n\tpublic void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\tmFolderDialog = new FolderPicker(this, this, 0);\n\t\tmFolderDialog.show();\n\t}", "public void addCompositeToTab(String tabName){\r\n\t\tTabItem item = new TabItem(folderReference, SWT.NONE);\r\n\t\titem.setText(tabName);\r\n\t\t\r\n\t\tfolderReference.getItem(compositeIndex).setControl(compositeMap.get(compositeIndex));\r\n\t\t++compositeIndex;\r\n\t}", "@Override\n public void initialize(final URL location, final ResourceBundle resources) {\n selectedTreeItem.addListener(a -> handleSelectedElement());\n masterTabPane = tabPane;\n }", "private void setTab() {\n\t\tTabHost.TabSpec showSpec = host.newTabSpec(ShowFragment.TAG);\r\n\t\tshowSpec.setIndicator(showLayout);\r\n\t\tshowSpec.setContent(new Dumm(getBaseContext()));\r\n\t\thost.addTab(showSpec);\r\n\r\n\t\tTabHost.TabSpec addSpec = host.newTabSpec(AddRecordFrag.TAG);\r\n\t\taddSpec.setIndicator(addLayout);\r\n\t\taddSpec.setContent(new Dumm(getBaseContext()));\r\n\t\thost.addTab(addSpec);\r\n\r\n\t\tTabHost.TabSpec chartSpec = host.newTabSpec(ChartShowFrag.TAG);\r\n\t\tchartSpec.setIndicator(chartLayout);\r\n\t\tchartSpec.setContent(new Dumm(getBaseContext()));\r\n\t\thost.addTab(chartSpec);\r\n\t}", "private void initialiseTabHost(Bundle args) {\n\t\tmTabHost = (TabHost)findViewById(android.R.id.tabhost);\n mTabHost.setup();\n TabInfo tabInfo = null;\n MainActivity.addTab(this, this.mTabHost, this.mTabHost.newTabSpec(\"Tab1\").setIndicator(\"Waveform\"), ( tabInfo = new TabInfo(\"Tab1\", DrawFragment.class, args)));\n this.mapTabInfo.put(tabInfo.tag, tabInfo);\n MainActivity.addTab(this, this.mTabHost, this.mTabHost.newTabSpec(\"Tab2\").setIndicator(\"FFT\"), ( tabInfo = new TabInfo(\"Tab2\", DrawFragment.class, args)));\n this.mapTabInfo.put(tabInfo.tag, tabInfo);\n MainActivity.addTab(this, this.mTabHost, this.mTabHost.newTabSpec(\"Tab3\").setIndicator(\"AC\"), ( tabInfo = new TabInfo(\"Tab3\", DrawFragment.class, args)));\n this.mapTabInfo.put(tabInfo.tag, tabInfo);\n MainActivity.addTab(this, this.mTabHost, this.mTabHost.newTabSpec(\"Tab4\").setIndicator(\"Pitch\"), ( tabInfo = new TabInfo(\"Tab4\", DrawFragment.class, args)));\n this.mapTabInfo.put(tabInfo.tag, tabInfo);\n // Default to first tab\n this.onTabChanged(\"Tab1\");\n //\n mTabHost.setOnTabChangedListener(this);\n\t}", "public PathTabView(){\n\t\t\n\t\t//PATH Index directory\n\t\tlblIndexerPath=new JLabel(\"Indexes destination : \");\n\t\ttxtIndexerPath=new JTextField();\n\t\ttxtIndexerPath.setPreferredSize(new Dimension(200,25));\n\t\ttxtIndexerPath.setText(Configuration.getInstance().getIndexPath());\n\t\tpanelIndexer=new JPanel();\n\t\tpanelIndexer.setBorder(BorderFactory.createTitledBorder(\"Indexation\"));\n\t\tbtnBrowserIndexer=new JButton(\"...\");\n\t\tbtnBrowserIndexer.addActionListener(new BrowserClickController(this,1));\n\t\tpanelIndexer.add(lblIndexerPath);\n\t\tpanelIndexer.add(txtIndexerPath);\n\t\tpanelIndexer.add(btnBrowserIndexer);\n\t\t\n\t\t//PATH Data directory\n\t\tlblDataPath=new JLabel(\"Datas directory : \");\n\t\ttxtDataPath=new JTextField();\n\t\ttxtDataPath.setPreferredSize(new Dimension(200,25));\n\t\ttxtDataPath.setText(Configuration.getInstance().getDataPath());\n\t\tpanelData=new JPanel();\n\t\tpanelData.setBorder(BorderFactory.createTitledBorder(\"Data\"));\n\t\tbtnBrowserData=new JButton(\"...\");\n\t\tbtnBrowserData.addActionListener(new BrowserClickController(this,2));\n\t\tpanelData.add(lblDataPath);\n\t\tpanelData.add(txtDataPath);\n\t\tpanelData.add(btnBrowserData);\n\t\t\n\t\t//Init button cancel & save\n\t\tbtnSubmit=new JButton(\"Save\");\n\t\tbtnSubmit.addActionListener(new SubmitPathClickController(this));\n\t\tbtnCancel=new JButton(\"Cancel\");\n\t\tbtnCancel.addActionListener(new CancelPathClickController(this));\n\t\t\n\t\tsplitPath=new JSplitPane(JSplitPane.VERTICAL_SPLIT,panelData,panelIndexer);\n\t\tpanelButton=new JPanel();\n\t\tpanelButton.add(btnSubmit);\n\t\tpanelButton.add(btnCancel);\n\t\t\n\t\tsplitMain=new JSplitPane(JSplitPane.VERTICAL_SPLIT,splitPath,panelButton);\n\t\t\n\t\tthis.add(splitMain);\n\t\trazTextPath();\n\t\tthis.setVisible(true);\n\t}", "private void setupTabLayout() {\n tabLayout = (TabLayout) findViewById(R.id.tabs);\n tabLayout.addOnTabSelectedListener(new TabLayout.OnTabSelectedListener() {\n @Override\n public void onTabSelected(TabLayout.Tab tab) {\n onTabTapped(tab.getPosition());\n }\n\n @Override\n public void onTabUnselected(TabLayout.Tab tab) {\n }\n\n @Override\n public void onTabReselected(TabLayout.Tab tab) {\n onTabTapped(tab.getPosition());\n }\n });\n tabLayout.getTabAt(0).select();\n View root = tabLayout.getChildAt(0);\n //create divider between the tabs\n if (root instanceof LinearLayout) {\n ((LinearLayout) root).setShowDividers(LinearLayout.SHOW_DIVIDER_MIDDLE);\n GradientDrawable drawable = new GradientDrawable();\n drawable.setColorFilter(0xffff0000, PorterDuff.Mode.MULTIPLY);\n drawable.setSize(2, 1);\n ((LinearLayout) root).setDividerPadding(10);\n ((LinearLayout) root).setDividerDrawable(drawable);\n }\n }", "public void init(){\n\t\ttry{\n\t\t\tFile file=new File(\"c:/EasyShare/setting/dir.es\");\n\t\t\tif(!file.exists()){\n\t\t\t\tfile.getParentFile().mkdirs();\n\t\t\t\tfile.createNewFile();\n\n\t\t\t\t\n\t\t\t\t}\n\t\t\t}catch (Exception e) {\n\t\t\t}\n\t}", "private void initList() {\r\n\t\tlist = new JList<>();\r\n\t\tFile rootFile = new File(System.getProperty(\"user.dir\"));\r\n\t\tloadFilesInFolder(rootFile);\r\n\t\tlist.addListSelectionListener(new FileListSelectionListener());\r\n\t}", "private void initialize() {\n\t\tframe = new JFrame(\"DB Filler\");\n\t\tframe.setBounds(100, 100, 700, 500);\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\n\t\tdbc = new DataBaseConnector();\n\t\tcreateFileChooser();\n\n\t\taddTabbedPane();\n\t\tsl_panel = new SpringLayout();\n\t\taddAddFilePanel();\n\t}", "@Override\n public void initialize() {\n sectionsPanel.removeAll();\n \n section1 = new ProgressReportSectionSettingPanel(this);\n section2 = new ProgressReportSectionSettingPanel(this);\n section3 = new ProgressReportSectionSettingPanel(this);\n section4 = new ProgressReportSectionSettingPanel(this);\n addSectionElement(0,section1);\n addSectionElement(1,section2);\n addSectionElement(2,section3);\n addSectionElement(3,section4);\n \n refresh();\n }", "public void init() {\n\t\t\tfor(int i=0; i<DBDef.getINSTANCE().getListeRelDef().size(); i++) {\n\t\t\t\tDBDef.getINSTANCE().getListeRelDef().get(i);\n\t\t\t\tHeapFile hp = new HeapFile(DBDef.getINSTANCE().getListeRelDef().get(i));\n\t\t\t\tthis.heapFiles.add(hp);\n\t\t\t}\n\t\t}", "public KonTabbedPane() {\n // Initialize the ArrayList\n graphInterfaces = new ArrayList<DrawingLibraryInterface>();\n\n DirectedGraph<String, DefaultEdge> graph = CreateTestGraph();\n\n /*\n * Adds a tab\n */\n DrawingLibraryInterface<String, DefaultEdge> graphInterface =\n DrawingLibraryFactory.createNewInterface(graph);\n \n graphInterfaces.add(graphInterface);\n\n // Adds the graph to the tab and adds the tab to the pane\n add(graphInterface.getPanel());\n addTab(\"First Tab\", graphInterface.getPanel());\n\n /*\n * Adds a tab\n */\n graphInterface = DrawingLibraryFactory.createNewInterface(graph);\n graphInterfaces.add(graphInterface);\n\n // Adds the graph to the tab and adds the tab to the pane\n add(graphInterface.getPanel());\n\n graphInterface.getGraphManipulationInterface().highlightNode(graph\n .vertexSet().iterator().next(), true);\n\n addTab(\"Second Tab\", graphInterface.getPanel());\n }", "private void addFolder(){\n }", "@Override\r\n\tprotected void onStart() {\n\t\tadapter = new TabAdapter(this);\r\n\t\tgrid.setAdapter(adapter);\r\n\t\tsuper.onStart();\r\n\t}", "private void initTabImage() {\n firstImage.setImageResource(R.drawable.home);\n secondImage.setImageResource(R.drawable.profile);\n// thirdImage.setImageResource(R.drawable.addcontent);\n fourthImage.setImageResource(R.drawable.channels);\n fifthImage.setImageResource(R.drawable.search);\n }", "private void addAdditionalFieldsTab()\n {\n\t\t// START OF ADDITIONAL FIELDS TAB ///\n\t\t// ////////////////////////\n \twAdditionalFieldsTab = new CTabItem(wTabFolder, SWT.NONE);\n \twAdditionalFieldsTab.setText(BaseMessages.getString(PKG, \"AccessInputDialog.AdditionalFieldsTab.TabTitle\"));\n\n \twAdditionalFieldsComp = new Composite(wTabFolder, SWT.NONE);\n\t\tprops.setLook(wAdditionalFieldsComp);\n\n\t\tFormLayout fieldsLayout = new FormLayout();\n\t\tfieldsLayout.marginWidth = 3;\n\t\tfieldsLayout.marginHeight = 3;\n\t\twAdditionalFieldsComp.setLayout(fieldsLayout);\n\t\t\n\t\t// ShortFileFieldName line\n\t\twlShortFileFieldName = new Label(wAdditionalFieldsComp, SWT.RIGHT);\n\t\twlShortFileFieldName.setText(BaseMessages.getString(PKG, \"AccessInputDialog.ShortFileFieldName.Label\"));\n\t\tprops.setLook(wlShortFileFieldName);\n\t\tfdlShortFileFieldName = new FormData();\n\t\tfdlShortFileFieldName.left = new FormAttachment(0, 0);\n\t\tfdlShortFileFieldName.top = new FormAttachment(wInclRownumField, margin);\n\t\tfdlShortFileFieldName.right = new FormAttachment(middle, -margin);\n\t\twlShortFileFieldName.setLayoutData(fdlShortFileFieldName);\n\n\t\twShortFileFieldName = new TextVar(transMeta, wAdditionalFieldsComp, SWT.SINGLE | SWT.LEFT | SWT.BORDER);\n\t\tprops.setLook(wShortFileFieldName);\n\t\twShortFileFieldName.addModifyListener(lsMod);\n\t\tfdShortFileFieldName = new FormData();\n\t\tfdShortFileFieldName.left = new FormAttachment(middle, 0);\n\t\tfdShortFileFieldName.right = new FormAttachment(100, -margin);\n\t\tfdShortFileFieldName.top = new FormAttachment(wInclRownumField, margin);\n\t\twShortFileFieldName.setLayoutData(fdShortFileFieldName);\n\t\t\n\t\t\n\t\t// ExtensionFieldName line\n\t\twlExtensionFieldName = new Label(wAdditionalFieldsComp, SWT.RIGHT);\n\t\twlExtensionFieldName.setText(BaseMessages.getString(PKG, \"AccessInputDialog.ExtensionFieldName.Label\"));\n\t\tprops.setLook(wlExtensionFieldName);\n\t\tfdlExtensionFieldName = new FormData();\n\t\tfdlExtensionFieldName.left = new FormAttachment(0, 0);\n\t\tfdlExtensionFieldName.top = new FormAttachment(wShortFileFieldName, margin);\n\t\tfdlExtensionFieldName.right = new FormAttachment(middle, -margin);\n\t\twlExtensionFieldName.setLayoutData(fdlExtensionFieldName);\n\n\t\twExtensionFieldName = new TextVar(transMeta, wAdditionalFieldsComp, SWT.SINGLE | SWT.LEFT | SWT.BORDER);\n\t\tprops.setLook(wExtensionFieldName);\n\t\twExtensionFieldName.addModifyListener(lsMod);\n\t\tfdExtensionFieldName = new FormData();\n\t\tfdExtensionFieldName.left = new FormAttachment(middle, 0);\n\t\tfdExtensionFieldName.right = new FormAttachment(100, -margin);\n\t\tfdExtensionFieldName.top = new FormAttachment(wShortFileFieldName, margin);\n\t\twExtensionFieldName.setLayoutData(fdExtensionFieldName);\n\t\t\n\t\t\n\t\t// PathFieldName line\n\t\twlPathFieldName = new Label(wAdditionalFieldsComp, SWT.RIGHT);\n\t\twlPathFieldName.setText(BaseMessages.getString(PKG, \"AccessInputDialog.PathFieldName.Label\"));\n\t\tprops.setLook(wlPathFieldName);\n\t\tfdlPathFieldName = new FormData();\n\t\tfdlPathFieldName.left = new FormAttachment(0, 0);\n\t\tfdlPathFieldName.top = new FormAttachment(wExtensionFieldName, margin);\n\t\tfdlPathFieldName.right = new FormAttachment(middle, -margin);\n\t\twlPathFieldName.setLayoutData(fdlPathFieldName);\n\n\t\twPathFieldName = new TextVar(transMeta, wAdditionalFieldsComp, SWT.SINGLE | SWT.LEFT | SWT.BORDER);\n\t\tprops.setLook(wPathFieldName);\n\t\twPathFieldName.addModifyListener(lsMod);\n\t\tfdPathFieldName = new FormData();\n\t\tfdPathFieldName.left = new FormAttachment(middle, 0);\n\t\tfdPathFieldName.right = new FormAttachment(100, -margin);\n\t\tfdPathFieldName.top = new FormAttachment(wExtensionFieldName, margin);\n\t\twPathFieldName.setLayoutData(fdPathFieldName);\n\t\t\n\n\n \t\t// SizeFieldName line\n\t\twlSizeFieldName = new Label(wAdditionalFieldsComp, SWT.RIGHT);\n\t\twlSizeFieldName.setText(BaseMessages.getString(PKG, \"AccessInputDialog.SizeFieldName.Label\"));\n\t\tprops.setLook(wlSizeFieldName);\n\t\tfdlSizeFieldName = new FormData();\n\t\tfdlSizeFieldName.left = new FormAttachment(0, 0);\n\t\tfdlSizeFieldName.top = new FormAttachment(wPathFieldName, margin);\n\t\tfdlSizeFieldName.right = new FormAttachment(middle, -margin);\n\t\twlSizeFieldName.setLayoutData(fdlSizeFieldName);\n\n\t\twSizeFieldName = new TextVar(transMeta, wAdditionalFieldsComp, SWT.SINGLE | SWT.LEFT | SWT.BORDER);\n\t\tprops.setLook(wSizeFieldName);\n\t\twSizeFieldName.addModifyListener(lsMod);\n\t\tfdSizeFieldName = new FormData();\n\t\tfdSizeFieldName.left = new FormAttachment(middle, 0);\n\t\tfdSizeFieldName.right = new FormAttachment(100, -margin);\n\t\tfdSizeFieldName.top = new FormAttachment(wPathFieldName, margin);\n\t\twSizeFieldName.setLayoutData(fdSizeFieldName);\n\t\t\n\t\t\n\t\t// IsHiddenName line\n\t\twlIsHiddenName = new Label(wAdditionalFieldsComp, SWT.RIGHT);\n\t\twlIsHiddenName.setText(BaseMessages.getString(PKG, \"AccessInputDialog.IsHiddenName.Label\"));\n\t\tprops.setLook(wlIsHiddenName);\n\t\tfdlIsHiddenName = new FormData();\n\t\tfdlIsHiddenName.left = new FormAttachment(0, 0);\n\t\tfdlIsHiddenName.top = new FormAttachment(wSizeFieldName, margin);\n\t\tfdlIsHiddenName.right = new FormAttachment(middle, -margin);\n\t\twlIsHiddenName.setLayoutData(fdlIsHiddenName);\n\n\t\twIsHiddenName = new TextVar(transMeta, wAdditionalFieldsComp, SWT.SINGLE | SWT.LEFT | SWT.BORDER);\n\t\tprops.setLook(wIsHiddenName);\n\t\twIsHiddenName.addModifyListener(lsMod);\n\t\tfdIsHiddenName = new FormData();\n\t\tfdIsHiddenName.left = new FormAttachment(middle, 0);\n\t\tfdIsHiddenName.right = new FormAttachment(100, -margin);\n\t\tfdIsHiddenName.top = new FormAttachment(wSizeFieldName, margin);\n\t\twIsHiddenName.setLayoutData(fdIsHiddenName);\n\t\t\n\t\t// LastModificationTimeName line\n\t\twlLastModificationTimeName = new Label(wAdditionalFieldsComp, SWT.RIGHT);\n\t\twlLastModificationTimeName.setText(BaseMessages.getString(PKG, \"AccessInputDialog.LastModificationTimeName.Label\"));\n\t\tprops.setLook(wlLastModificationTimeName);\n\t\tfdlLastModificationTimeName = new FormData();\n\t\tfdlLastModificationTimeName.left = new FormAttachment(0, 0);\n\t\tfdlLastModificationTimeName.top = new FormAttachment(wIsHiddenName, margin);\n\t\tfdlLastModificationTimeName.right = new FormAttachment(middle, -margin);\n\t\twlLastModificationTimeName.setLayoutData(fdlLastModificationTimeName);\n\n\t\twLastModificationTimeName = new TextVar(transMeta, wAdditionalFieldsComp, SWT.SINGLE | SWT.LEFT | SWT.BORDER);\n\t\tprops.setLook(wLastModificationTimeName);\n\t\twLastModificationTimeName.addModifyListener(lsMod);\n\t\tfdLastModificationTimeName = new FormData();\n\t\tfdLastModificationTimeName.left = new FormAttachment(middle, 0);\n\t\tfdLastModificationTimeName.right = new FormAttachment(100, -margin);\n\t\tfdLastModificationTimeName.top = new FormAttachment(wIsHiddenName, margin);\n\t\twLastModificationTimeName.setLayoutData(fdLastModificationTimeName);\n\t\t\n\t\t// UriName line\n\t\twlUriName = new Label(wAdditionalFieldsComp, SWT.RIGHT);\n\t\twlUriName.setText(BaseMessages.getString(PKG, \"AccessInputDialog.UriName.Label\"));\n\t\tprops.setLook(wlUriName);\n\t\tfdlUriName = new FormData();\n\t\tfdlUriName.left = new FormAttachment(0, 0);\n\t\tfdlUriName.top = new FormAttachment(wLastModificationTimeName, margin);\n\t\tfdlUriName.right = new FormAttachment(middle, -margin);\n\t\twlUriName.setLayoutData(fdlUriName);\n\n\t\twUriName = new TextVar(transMeta, wAdditionalFieldsComp, SWT.SINGLE | SWT.LEFT | SWT.BORDER);\n\t\tprops.setLook(wUriName);\n\t\twUriName.addModifyListener(lsMod);\n\t\tfdUriName = new FormData();\n\t\tfdUriName.left = new FormAttachment(middle, 0);\n\t\tfdUriName.right = new FormAttachment(100, -margin);\n\t\tfdUriName.top = new FormAttachment(wLastModificationTimeName, margin);\n\t\twUriName.setLayoutData(fdUriName);\n\t\t\n\t\t// RootUriName line\n\t\twlRootUriName = new Label(wAdditionalFieldsComp, SWT.RIGHT);\n\t\twlRootUriName.setText(BaseMessages.getString(PKG, \"AccessInputDialog.RootUriName.Label\"));\n\t\tprops.setLook(wlRootUriName);\n\t\tfdlRootUriName = new FormData();\n\t\tfdlRootUriName.left = new FormAttachment(0, 0);\n\t\tfdlRootUriName.top = new FormAttachment(wUriName, margin);\n\t\tfdlRootUriName.right = new FormAttachment(middle, -margin);\n\t\twlRootUriName.setLayoutData(fdlRootUriName);\n\n\t\twRootUriName = new TextVar(transMeta, wAdditionalFieldsComp, SWT.SINGLE | SWT.LEFT | SWT.BORDER);\n\t\tprops.setLook(wRootUriName);\n\t\twRootUriName.addModifyListener(lsMod);\n\t\tfdRootUriName = new FormData();\n\t\tfdRootUriName.left = new FormAttachment(middle, 0);\n\t\tfdRootUriName.right = new FormAttachment(100, -margin);\n\t\tfdRootUriName.top = new FormAttachment(wUriName, margin);\n\t\twRootUriName.setLayoutData(fdRootUriName);\n\t\n\n\t\tfdAdditionalFieldsComp = new FormData();\n\t\tfdAdditionalFieldsComp.left = new FormAttachment(0, 0);\n\t\tfdAdditionalFieldsComp.top = new FormAttachment(wStepname, margin);\n\t\tfdAdditionalFieldsComp.right = new FormAttachment(100, 0);\n\t\tfdAdditionalFieldsComp.bottom = new FormAttachment(100, 0);\n\t\twAdditionalFieldsComp.setLayoutData(fdAdditionalFieldsComp);\n\n\t\twAdditionalFieldsComp.layout();\n\t\twAdditionalFieldsTab.setControl(wAdditionalFieldsComp);\n\n\t\t// ///////////////////////////////////////////////////////////\n\t\t// / END OF ADDITIONAL FIELDS TAB\n\t\t// ///////////////////////////////////////////////////////////\n\n\t\t\n \t\n }", "private void initialize() {\n\t\troot = new Group();\n\t\tgetProperties();\n\t\tsetScene();\n\t\tsetStage();\n\t\tsetGUIComponents();\n\t}", "public void initialize() {\n\t\tLocale.setDefault(new Locale(\"vi\", \"VN\"));\n\t\tframe = new JFrame();\n\t\tframe.setIconImage(Toolkit.getDefaultToolkit().getImage(\"C:\\\\Users\\\\Phuoc Dang\\\\git\\\\pala-finance\\\\src\\\\main\\\\resources\\\\piggy-bank-icon.png\"));\n\t\tframe.setBounds(100, 100, 723, 502);\n\t\t\n\t\tJTabbedPane tabbedPane = new JTabbedPane(JTabbedPane.TOP);\n\t\tframe.getContentPane().add(tabbedPane, BorderLayout.CENTER);\n\t\t\n\t\tJPanel pnlAdmin = new JPanel();\n\t\ttabbedPane.addTab(ResourceBundle.getBundle(\"pala.finance.messages\").getString(\"MainApp.tabAdministration\"), null, pnlAdmin, null);\n\t\tpnlAdmin.setLayout(new BorderLayout(0, 0));\n\t\t\n\t\ttblItem = new JTable();\n\t\ttblItem.setOpaque(false);\n\t\tJScrollPane scrollPane = new JScrollPane(tblItem);\n\t\tscrollPane.setBackground(new Color(255, 0, 0));\n\n\t\t// Add the scroll pane to this panel.\n\t\tpnlAdmin.add(scrollPane, BorderLayout.CENTER);\n\t\t\n\t\tJPanel pnlButtons = new JPanel();\n\t\tpnlButtons.setBackground(new Color(255, 240, 245));\n\t\tFlowLayout fl_pnlButtons = (FlowLayout) pnlButtons.getLayout();\n\t\tfl_pnlButtons.setAlignment(FlowLayout.LEFT);\n\t\tpnlAdmin.add(pnlButtons, BorderLayout.NORTH);\n\t\tJButton btnAdd = new JButton(ResourceBundle.getBundle(\"pala.finance.messages\").getString(\"MainApp.btnAdd.text\")); //$NON-NLS-1$ //$NON-NLS-2$\n\t\tpnlButtons.add(btnAdd);\n\t\tbtnAdd.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tItemDialog dialog = new ItemDialog(frame);\n\t\t\t\tdialog.setVisible(true);\n\t\t\t\tif(dialog.isOk()) {\n\t\t\t\t\titemRepo.addItem(dialog.getName(), dialog.getDescription());\n\t\t\t\t\tItem item = itemRepo.findItemNamed(dialog.getName());\n\t\t\t\t\tif(item != null) {\n\t\t\t\t\t\tloadItemTable();\n\t\t\t\t\t\tUIUtil.initializeInputComboBox(cbxItemByItem, true);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\t\n\t\tJButton btnEdit = new JButton(ResourceBundle.getBundle(\"pala.finance.messages\").getString(\"MainApp.btnEdit.text\")); //$NON-NLS-1$ //$NON-NLS-2$\n\t\tpnlButtons.add(btnEdit);\n\t\tbtnEdit.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tlong selectedID = TableUtil.getSelectedID(tblItem);\n\t\t\t\tif(selectedID != -1) {\n\t\t\t\t\tItem item = itemRepo.findByID(selectedID);\n\t\t\t\t\tItemDialog dialog = new ItemDialog(frame, item);\n\t\t\t\t\tdialog.setVisible(true);\n\t\t\t\t\tif(dialog.isOk()) {\n\t\t\t\t\t\titem.setName(dialog.getName());\n\t\t\t\t\t\titem.setDescription(dialog.getDescription());\n\t\t\t\t\t\titemRepo.saveItem(item);\n\t\t\t\t\t\tloadItemTable();\n\t\t\t\t\t\tUIUtil.initializeInputComboBox(cbxItemByItem, true);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tJOptionPane.showMessageDialog(frame, \"Please selected an item to edit\");\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\t\n\t\tJButton btnDelete = new JButton(ResourceBundle.getBundle(\"pala.finance.messages\").getString(\"MainApp.btnDelete.text\")); //$NON-NLS-1$ //$NON-NLS-2$\n\t\tpnlButtons.add(btnDelete);\n\t\tbtnDelete.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tlong selectedID = TableUtil.getSelectedID(tblItem);\n\t\t\t\titemRepo.deleteItem(selectedID);\n\t\t\t\tloadItemTable();\n\t\t\t}\n\t\t});\n\t\t\n\t\tJPanel pnlInput = new JPanel();\n\t\ttabbedPane.addTab(\"Input\", null, pnlInput, null);\n\t\tpnlInput.setLayout(new BorderLayout(0, 0));\n\t\t\n\t\tJScrollPane scrollBarInput = new JScrollPane((Component) null);\n\t\tpnlInput.add(scrollBarInput, BorderLayout.CENTER);\n\t\t\n\t\ttblInput = new JTable();\n\t\tscrollBarInput.setViewportView(tblInput);\n\t\t\n\t\tJPanel pnlInputButtons = new JPanel();\n\t\tpnlInputButtons.setBackground(new Color(224, 255, 255));\n\t\tFlowLayout flowLayout = (FlowLayout) pnlInputButtons.getLayout();\n\t\tflowLayout.setAlignment(FlowLayout.LEFT);\n\t\tpnlInput.add(pnlInputButtons, BorderLayout.NORTH);\n\t\t\n\t\tJButton btnInputAdd = new JButton(ResourceBundle.getBundle(\"pala.finance.messages\").getString(\"MainApp.btnAdd.text\")); //$NON-NLS-1$ //$NON-NLS-2$\n\t\tpnlInputButtons.add(btnInputAdd);\n\t\t\n\t\tJButton btnEditInputItem = new JButton(ResourceBundle.getBundle(\"pala.finance.messages\").getString(\"MainApp.btnEdit.text\")); //$NON-NLS-1$ //$NON-NLS-2$\n\t\tpnlInputButtons.add(btnEditInputItem);\n\t\tbtnEditInputItem.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tlong selectedID = TableUtil.getSelectedID(tblInput);\n\t\t\t\tif(selectedID != -1) {\n\t\t\t\t\tInputItem item = inputItemRepo.findByID(selectedID);\n\t\t\t\t\tInputItemDialog dialog = new InputItemDialog(frame, item);\n\t\t\t\t\tdialog.setVisible(true);\n\t\t\t\t\tif(dialog.isOk()) {\n\t\t\t\t\t\t\n\t\t\t\t\t\titem = dialog.getInputItem();\n\t\t\t\t\t\tInputItem inputItem = inputItemRepo.saveInputItem(item);\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(inputItem != null) {\n\t\t\t\t\t\t\tloadInputItemTable();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\t\n\t\tJButton btnInputDelete = new JButton(ResourceBundle.getBundle(\"pala.finance.messages\").getString(\"MainApp.btnDelete.text\")); //$NON-NLS-1$ //$NON-NLS-2$\n\t\tpnlInputButtons.add(btnInputDelete);\n\t\tbtnInputDelete.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tlong selectedID = TableUtil.getSelectedID(tblInput);\n\t\t\t\tif(selectedID != -1) {\n\t\t\t\t\tinputItemRepo.deleteInputItem(selectedID);\n\t\t\t\t\tloadInputItemTable();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tbtnInputAdd.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tInputItemDialog dialog = new InputItemDialog(frame, MainApp.this);\n\t\t\t\tdialog.setVisible(true);\n\t\t\t\tif(dialog.isOk()) {\n\t\t\t\t\t//currently, do nothing...\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t\t\n\t\tJPanel pnlIncome = new JPanel();\n\t\ttabbedPane.addTab(\"Income\", null, pnlIncome, null);\n\t\tpnlIncome.setLayout(new BorderLayout(0, 0));\n\t\t\n\t\tincomeTable = new JTable();\n\t\tJScrollPane scrollPaneIncome = new JScrollPane(incomeTable);\n\t\tpnlIncome.add(scrollPaneIncome);\n\t\t\n\t\tJPanel pnlIncomeButtons = new JPanel();\n\t\tpnlIncomeButtons.setBackground(new Color(224, 255, 255));\n\t\tFlowLayout flowLayout_1 = (FlowLayout) pnlIncomeButtons.getLayout();\n\t\tflowLayout_1.setAlignment(FlowLayout.LEFT);\n\t\tpnlIncome.add(pnlIncomeButtons, BorderLayout.NORTH);\n\t\t\n\t\tdateFieldIncome = CalendarFactory.createDateField();\n\t\tdateFieldIncome.setPreferredSize(new Dimension(100, 18));\n\t\tpnlIncomeButtons.add(dateFieldIncome);\n\t\t\n\t\tcbxIncome = new JComboBox();\n\t\tpnlIncomeButtons.add(cbxIncome);\n\t\tcbxIncome.setModel(new DefaultComboBoxModel(IncomeType.values()));\n\t\t\n\t\ttxtIncomeCost = new JFormattedTextField(NumberFormat.getNumberInstance());\n\t\ttxtIncomeCost.setMinimumSize(new Dimension(100, 20));\n\t\ttxtIncomeCost.setPreferredSize(new Dimension(100, 20));\n\t\tpnlIncomeButtons.add(txtIncomeCost);\n\t\t\n\t\tJButton btnAddIncome = new JButton(ResourceBundle.getBundle(\"pala.finance.messages\").getString(\"MainApp.btnAdd.text\")); //$NON-NLS-1$ //$NON-NLS-2$\n\t\tpnlIncomeButtons.add(btnAddIncome);\n\t\t\n\t\tJButton btnIncomeDelete = new JButton(ResourceBundle.getBundle(\"pala.finance.messages\").getString(\"MainApp.btnDelete.text\")); //$NON-NLS-1$ //$NON-NLS-2$\n\t\tpnlIncomeButtons.add(btnIncomeDelete);\n\t\tbtnIncomeDelete.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tlong selectedID = TableUtil.getSelectedID(incomeTable);\n\t\t\t\tif(selectedID != -1) {\n\t\t\t\t\tincomeItemRepo.deleteIncomeItem(selectedID);\n\t\t\t\t\tloadIncomeTable();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tbtnAddIncome.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tlong cost = ((Number)txtIncomeCost.getValue()).longValue();\n\t\t\t\tIncomeItem item = incomeItemRepo.addIncomeItem((IncomeType)cbxIncome.getSelectedItem(), cost, (Date)dateFieldIncome.getValue());\n\t\t\t\tif(item != null) {\n\t\t\t\t\tloadIncomeTable();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\t\n\t\tJPanel pnlReport = new JPanel();\n\t\tpnlReport.setBackground(new Color(255, 0, 255));\n\t\ttabbedPane.addTab(ResourceBundle.getBundle(\"pala.finance.messages\").getString(\"MainApp.tabReportByDay\"), null, pnlReport, null);\n\t\tpnlReport.setLayout(new BorderLayout(0, 0));\n\t\t\n\t\tJScrollPane scrollBarReport = new JScrollPane();\n\t\tscrollBarReport.setBackground(new Color(135, 206, 250));\n\t\tpnlReport.add(scrollBarReport, BorderLayout.CENTER);\n\t\t\n\t\ttblReport = new JTable();\n\t\ttblReport.addMouseListener(new MouseAdapter() {\n\t\t\t@Override\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\tint row = tblReport.rowAtPoint(e.getPoint());\n\t\t\t\tint col = tblReport.columnAtPoint(e.getPoint());\n\t\t\t\tif(row >= 0 && col == 4) {\n\t\t\t\t\tString attachedFile = tblReport.getValueAt(row, col).toString();\n\t\t\t\t\tFile file = new File(\"attachment/\" + attachedFile);\n\t\t\t\t\tDesktop dt = Desktop.getDesktop();\n\t\t\t\t\ttry {\n\t\t\t\t\t\tdt.open(file);\n\t\t\t\t\t} catch (IOException e1) {\n\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\te1.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t\tSystem.out.println(attachedFile);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tscrollBarReport.setViewportView(tblReport);\n\t\t\n\t\tJPanel pnlReportButtons = new JPanel();\n\t\tpnlReportButtons.setBackground(new Color(224, 255, 255));\n\t\tFlowLayout flowLayout_2 = (FlowLayout) pnlReportButtons.getLayout();\n\t\tflowLayout_2.setAlignment(FlowLayout.LEFT);\n\t\tpnlReport.add(pnlReportButtons, BorderLayout.NORTH);\n\t\t\n\t\tdateFieldReport = CalendarFactory.createDateField();\n\t\tdateFieldReport.setPreferredSize(new Dimension(100, 18));\n\t\tpnlReportButtons.add(dateFieldReport);\n\t\t\n\t\tchxByDate = new JCheckBox(ResourceBundle.getBundle(\"pala.finance.messages\").getString(\"MainApp.chxByDate.text\")); //$NON-NLS-1$ //$NON-NLS-2$\n\t\tchxByDate.setBackground(new Color(224, 255, 255));\n\t\tpnlReportButtons.add(chxByDate);\n\t\t\n\t\tJButton btnShow = new JButton(ResourceBundle.getBundle(\"pala.finance.messages\").getString(\"MainApp.btnShow.text\")); //$NON-NLS-1$ //$NON-NLS-2$\n\t\tpnlReportButtons.add(btnShow);\n\t\t\n\t\tJPanel pnlReportSummary = new JPanel();\n\t\tpnlReport.add(pnlReportSummary, BorderLayout.SOUTH);\n\t\tpnlReportSummary.setLayout(new GridLayout(3, 2, 2, 5));\n\t\t\n\t\tJLabel lblTotal = new JLabel(ResourceBundle.getBundle(\"pala.finance.messages\").getString(\"MainApp.lblTotal.text\")); //$NON-NLS-1$ //$NON-NLS-2$\n\t\tlblTotal.setHorizontalAlignment(SwingConstants.RIGHT);\n\t\tpnlReportSummary.add(lblTotal);\n\t\t\n\t\ttxtTotalCost = new JTextField();\n\t\tpnlReportSummary.add(txtTotalCost);\n\t\ttxtTotalCost.setEditable(false);\n\t\ttxtTotalCost.setColumns(10);\n\t\t\n\t\tJLabel lblTotalIncome = new JLabel(ResourceBundle.getBundle(\"pala.finance.messages\").getString(\"MainApp.lblTotalIncome.text\")); //$NON-NLS-1$ //$NON-NLS-2$\n\t\tlblTotalIncome.setHorizontalAlignment(SwingConstants.RIGHT);\n\t\tpnlReportSummary.add(lblTotalIncome);\n\t\t\n\t\ttxtTotalIncome = new JTextField();\n\t\tpnlReportSummary.add(txtTotalIncome);\n\t\ttxtTotalIncome.setEditable(false);\n\t\ttxtTotalIncome.setColumns(10);\n\t\t\n\t\tJLabel lblRemaining = new JLabel(ResourceBundle.getBundle(\"pala.finance.messages\").getString(\"MainApp.lblRemaining.text\")); //$NON-NLS-1$ //$NON-NLS-2$\n\t\tlblRemaining.setHorizontalAlignment(SwingConstants.RIGHT);\n\t\tpnlReportSummary.add(lblRemaining);\n\t\t\n\t\ttxtRemaining = new JTextField();\n\t\tpnlReportSummary.add(txtRemaining);\n\t\ttxtRemaining.setEditable(false);\n\t\ttxtRemaining.setColumns(10);\n\t\tbtnShow.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tDate selectedDate = (Date)dateFieldReport.getValue();\n\t\t\t\ttry {\n\t\t\t\t\tDateTime dt = new DateTime(selectedDate);\n\t\t\t\t\tLocalDate fromDate = dt.toLocalDate();\n\t\t\t\t\tLocalDate toDate = dt.toLocalDate();\n\t\t\t\t\t\n\t\t\t\t\tif(!chxByDate.isSelected()) {\n\t\t\t\t\t\tDate firstDateOfMonth = DateUtil.getFirstDay(selectedDate);\n\t\t\t\t\t\tDate lastDateOfMonth = DateUtil.getLastDay(selectedDate);\n\t\t\t\t\t\tdt = new DateTime(firstDateOfMonth);\n\t\t\t\t\t\tfromDate = dt.toLocalDate();\n\t\t\t\t\t\tdt = new DateTime(lastDateOfMonth);\n\t\t\t\t\t\ttoDate = dt.toLocalDate();\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tloadReportTable(fromDate, toDate);\n\t\t\t\t\t\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t\tJOptionPane.showMessageDialog(frame, e.getMessage());\n\t\t\t\t}\t\t\t\t\n\t\t\t}\n\t\t});\n\t\t\n\t\tJPanel pnlReportByMonth = new JPanel();\n\t\ttabbedPane.addTab(\"Report By Month\", null, pnlReportByMonth, null);\n\t\tpnlReportByMonth.setLayout(new BorderLayout(0, 0));\n\t\t\n\t\ttblReportByMonth = new JTable();\n\t\tJScrollPane scrPnlReportByMonth = new JScrollPane(tblReportByMonth);\n\t\tpnlReportByMonth.add(scrPnlReportByMonth);\n\t\t\n\t\tJPanel pnlReportByMonthButtons = new JPanel();\n\t\tpnlReportByMonthButtons.setBackground(new Color(224, 255, 255));\n\t\tFlowLayout flowLayout_3 = (FlowLayout) pnlReportByMonthButtons.getLayout();\n\t\tflowLayout_3.setAlignment(FlowLayout.LEFT);\n\t\tpnlReportByMonth.add(pnlReportByMonthButtons, BorderLayout.NORTH);\n\t\t\n\t\tJLabel lblMonth = new JLabel(ResourceBundle.getBundle(\"pala.finance.messages\").getString(\"MainApp.lblMonth.text\")); //$NON-NLS-1$ //$NON-NLS-2$\n\t\tpnlReportByMonthButtons.add(lblMonth);\n\t\t\n\t\tfinal JComboBox cbxMonth = new JComboBox();\n\t\tpnlReportByMonthButtons.add(cbxMonth);\n\t\tcbxMonth.setMaximumRowCount(12);\n\t\tcbxMonth.setModel(new DefaultComboBoxModel(Month.values()));\n\t\t\n\t\tJLabel lblYear = new JLabel(ResourceBundle.getBundle(\"pala.finance.messages\").getString(\"MainApp.lblYear.text\")); //$NON-NLS-1$ //$NON-NLS-2$\n\t\tpnlReportByMonthButtons.add(lblYear);\n\t\t\n\t\tfinal JComboBox cbxYear = new JComboBox();\n\t\tpnlReportByMonthButtons.add(cbxYear);\n\t\tcbxYear.setModel(new DefaultComboBoxModel(new String[] {\"2012\", \"2013\", \"2014\", \"2015\", \"2016\", \"2017\", \"2018\", \"2019\", \"2020\"}));\n\t\t\n\t\tJButton btnReportByMonth = new JButton(ResourceBundle.getBundle(\"pala.finance.messages\").getString(\"MainApp.btnShow.text\")); //$NON-NLS-1$ //$NON-NLS-2$\n\t\tpnlReportByMonthButtons.add(btnReportByMonth);\n\t\t\n\t\tJPanel rptReportByItem = new JPanel();\n\t\ttabbedPane.addTab(\"Report By Item\", null, rptReportByItem, null);\n\t\trptReportByItem.setLayout(new BorderLayout(0, 0));\n\t\t\n\t\tJPanel panel = new JPanel();\n\t\tFlowLayout flowLayout_4 = (FlowLayout) panel.getLayout();\n\t\tflowLayout_4.setAlignment(FlowLayout.LEFT);\n\t\tpanel.setBackground(new Color(224, 255, 255));\n\t\trptReportByItem.add(panel, BorderLayout.NORTH);\n\t\t\n\t\tJLabel label = new JLabel(ResourceBundle.getBundle(\"pala.finance.messages\").getString(\"MainApp.lblMonth.text\")); //$NON-NLS-1$ //$NON-NLS-2$\n\t\tpanel.add(label);\n\t\t\n\t\tcbxMonthByItem = new JComboBox();\n\t\tcbxMonthByItem.setModel(new DefaultComboBoxModel(Month.values()));\n\t\tcbxMonthByItem.setMaximumRowCount(12);\n\t\tpanel.add(cbxMonthByItem);\n\t\t\n\t\tJLabel label_1 = new JLabel(ResourceBundle.getBundle(\"pala.finance.messages\").getString(\"MainApp.lblYear.text\")); //$NON-NLS-1$ //$NON-NLS-2$\n\t\tpanel.add(label_1);\n\t\t\n\t\tcbxYearByItem = new JComboBox();\n\t\tcbxYearByItem.setModel(new DefaultComboBoxModel(new String[] {\"2012\", \"2013\", \"2014\", \"2015\", \"2016\", \"2017\", \"2018\", \"2019\", \"2020\"}));\n\t\tpanel.add(cbxYearByItem);\n\t\t\n\t\tJLabel lblItem = new JLabel(ResourceBundle.getBundle(\"pala.finance.messages\").getString(\"MainApp.lblItem.text\")); //$NON-NLS-1$ //$NON-NLS-2$\n\t\tpanel.add(lblItem);\n\t\t\n\t\tcbxItemByItem = new JComboBox();\n\t\tcbxItemByItem.setModel(new DefaultComboBoxModel(new String[] {\"All\"}));\n\t\tpanel.add(cbxItemByItem);\n\t\t\n\t\tUIUtil.initializeInputComboBox(cbxItemByItem, true);\n\t\t\n\t\tJButton btnShowByItem = new JButton(ResourceBundle.getBundle(\"pala.finance.messages\").getString(\"MainApp.btnShow.text\")); //$NON-NLS-1$ //$NON-NLS-2$\n\t\tbtnShowByItem.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tint year = Integer.parseInt(cbxYearByItem.getSelectedItem().toString());\n\t\t\t\tint month = ((Month)cbxMonthByItem.getSelectedItem()).getValue();\n\t\t\t\tDateTime selectedDate = new DateTime(year, month, 1, 0, 0, 0);\n\t\t\t\tDateTime fromDate = selectedDate.dayOfMonth().withMinimumValue();\n\t\t\t\tDateTime toDate = selectedDate.dayOfMonth().withMaximumValue();\n\t\t\t\ttoDate= toDate.plusDays(1);\n\t\t\t\tString sFromDate = String.valueOf(fromDate.getMillis());\n\t\t\t\tString sToDate = String.valueOf(toDate.getMillis());\n\t\t\t\tList<ReportByItemResult> results = inputRep.reportByItem(sFromDate, sToDate);\n\t\t\t\tloadReportByItemTable(results);\n\t\t\t\tdouble totalCost = 0;\n\t\t\t\tfor(ReportByItemResult item : results) {\n\t\t\t\t\ttotalCost += item.getCost();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tNumberFormat nf = NumberFormat.getNumberInstance();\n\t\t\t\ttxtTotalItemCost.setText(nf.format(totalCost));\n\t\t\t}\n\t\t});\n\t\tpanel.add(btnShowByItem);\n\t\t\n\t\tJScrollPane scrollPaneReportByItem = new JScrollPane();\n\t\trptReportByItem.add(scrollPaneReportByItem, BorderLayout.CENTER);\n\t\t\n\t\ttblReportByItem = new JTable();\n\t\tscrollPaneReportByItem.setViewportView(tblReportByItem);\n\t\t\n\t\tJPanel panel_1 = new JPanel();\n\t\trptReportByItem.add(panel_1, BorderLayout.SOUTH);\n\t\tpanel_1.setLayout(new GridLayout(1, 2, 5, 5));\n\t\t\n\t\tJLabel lblTotalItem = new JLabel(ResourceBundle.getBundle(\"pala.finance.messages\").getString(\"MainApp.lblTotal.text\")); //$NON-NLS-1$ //$NON-NLS-2$\n\t\tlblTotalItem.setHorizontalAlignment(SwingConstants.RIGHT);\n\t\tpanel_1.add(lblTotalItem);\n\t\t\n\t\ttxtTotalItemCost = new JTextField();\n\t\ttxtTotalItemCost.setEditable(false);\n\t\tpanel_1.add(txtTotalItemCost);\n\t\ttxtTotalItemCost.setColumns(10);\n\t\tbtnReportByMonth.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tint year = Integer.parseInt(cbxYear.getSelectedItem().toString());\n\t\t\t\tint month = ((Month)cbxMonth.getSelectedItem()).getValue();\n\t\t\t\tDateTime selectedDate = new DateTime(year, month, 1, 0, 0, 0);\n\t\t\t\tDateTime fromDate = selectedDate.dayOfMonth().withMinimumValue();\n\t\t\t\tDateTime toDate = selectedDate.dayOfMonth().withMaximumValue();\n\t\t\t\ttoDate= toDate.plusDays(1);\n\t\t\t\tString sFromDate = String.valueOf(fromDate.getMillis());\n\t\t\t\tString sToDate = String.valueOf(toDate.getMillis());\n\t\t\t\tList<ReportByMonthResult> results = inputRep.reportByMonth(sFromDate, sToDate);\n\t\t\t\tloadReportByMonthTable(results);\n\t\t\t}\n\t\t});\n\t\t\n\t\t//fetch all data\n\t\tloadAllData();\n\t}", "public static void init()\n\t{\n\t\tusername2accesses.clear();\n\t\t//--- adds info.json in ./Home/Administrator for the system admin ---//\n\t\tfinal String adminAccessPath = Hierarchies.getSectionDir() + \"/\" + Hierarchies.getInfoFileName() + \".\" + Directories.getFileExt();\n\t\tfinal File adminAccessFile = new File(adminAccessPath);\n\t\tif (!adminAccessFile.exists())\n\t\t{\n\t\t\tfinal Access[] accesses = new Access[1];\n\t\t\taccesses[0] = new Access(\"admin\", Role.ADMINISTRATOR, null);\n\t\t\tfinal HierarchyItem hierarchyItem = new HierarchyItem(null, null, null, accesses);\n\t\t\tfinal String hierarchyItemAsJson = new Gson().toJson(hierarchyItem);\n\t\t\tFileIO.writeToFile(adminAccessPath, hierarchyItemAsJson);\n\t\t}\n\t\t//--- reads all JSON files recursively in ./Home/Administrator ---//\n\t\t//--- contents of JSON files will be processed to be cached in hash map username2accesses ---//\n\t\tfinal File file = new File(Hierarchies.getSectionDir());\n\t\tfinal Collection<File> jsonFiles = FileUtils.listFiles(file, new String[]{Directories.getFileExt()}, true);\n\t\tfor (File infoFile : jsonFiles) manage(infoFile, Op.STORE);\n\t}", "public Modulo1() {\n initComponents();\n setLocationRelativeTo(null);\n setResizable(false);\n //línea para habilitar o deshabilitar pestañas\n //jTabbedPane.removeTabAt(0);\n \n }", "private void initialize() {\n\t\tframe = new JFrame();\n\t\tframe.setBounds(100, 100, 452, 334);\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\t\n\t\tJTabbedPane tabbedPane = new JTabbedPane(JTabbedPane.TOP);\n\t\tGroupLayout groupLayout = new GroupLayout(frame.getContentPane());\n\t\tgroupLayout.setHorizontalGroup(\n\t\t\tgroupLayout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t.addGroup(groupLayout.createSequentialGroup()\n\t\t\t\t\t.addContainerGap()\n\t\t\t\t\t.addComponent(tabbedPane, GroupLayout.PREFERRED_SIZE, 438, Short.MAX_VALUE)\n\t\t\t\t\t.addContainerGap())\n\t\t);\n\t\tgroupLayout.setVerticalGroup(\n\t\t\tgroupLayout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t.addGroup(groupLayout.createSequentialGroup()\n\t\t\t\t\t.addContainerGap()\n\t\t\t\t\t.addComponent(tabbedPane, GroupLayout.DEFAULT_SIZE, 266, Short.MAX_VALUE)\n\t\t\t\t\t.addContainerGap())\n\t\t);\n\t\t\n\t\tJPanel panel = new JPanel();\n\t\ttabbedPane.addTab(\"面积\", null, panel, null);\n\t\t\n\t\tJTabbedPane tabbedPane_1 = new JTabbedPane(JTabbedPane.TOP);\n\t\tGroupLayout gl_panel = new GroupLayout(panel);\n\t\tgl_panel.setHorizontalGroup(\n\t\t\tgl_panel.createParallelGroup(Alignment.LEADING)\n\t\t\t\t.addGroup(gl_panel.createSequentialGroup()\n\t\t\t\t\t.addContainerGap()\n\t\t\t\t\t.addComponent(tabbedPane_1, GroupLayout.DEFAULT_SIZE, 407, Short.MAX_VALUE)\n\t\t\t\t\t.addContainerGap())\n\t\t);\n\t\tgl_panel.setVerticalGroup(\n\t\t\tgl_panel.createParallelGroup(Alignment.LEADING)\n\t\t\t\t.addGroup(gl_panel.createSequentialGroup()\n\t\t\t\t\t.addGap(5)\n\t\t\t\t\t.addComponent(tabbedPane_1, GroupLayout.DEFAULT_SIZE, 243, Short.MAX_VALUE)\n\t\t\t\t\t.addContainerGap())\n\t\t);\n\t\t\n\t\tJPanel panel_1 = new JPanel();\n\t\ttabbedPane_1.addTab(\"圆面积\", null, panel_1, null);\n\t\t\n\t\ttextField_Cr = new JTextField();\n\t\ttextField_Cr.setColumns(10);\n\t\ttextField_Cr.addKeyListener(new KeyAdapter(){ \n public void keyTyped(KeyEvent e) { \n int keyChar = e.getKeyChar(); \n if((keyChar >= KeyEvent.VK_0 && keyChar <= KeyEvent.VK_9)|| keyChar=='.'){ \n \n }else{ \n e.consume(); \n } \n } \n }); \n\t\t\n\t\tJLabel label_3 = new JLabel(\"半径\");\n\t\t\n\t\tJLabel label_4 = new JLabel(\"圆面积\");\n\t\t\n\t\ttextField_Cs = new JTextField();\n\t\ttextField_Cs.setEditable(false);\n\t\ttextField_Cs.setColumns(10);\n\t\t\n\t\tJButton button = new JButton(\"计算\");\n\t\tbutton.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tdouble r,s;//r圆的半径,s是圆的面积\n\t\t\t\tString tem_r,res_S;\n\t\t\t\tDecimalFormat df = new DecimalFormat(\"####.##\");\n\t\t\t\tCalculator Cal= new Calculator();\n\t\t\t\ttry{\n\t\t\t\t\ttem_r = textField_Cr.getText();\n\t\t\t\t\tif(tem_r.isEmpty()) throw new ReadError(\"圆的半径不能为空!\");\n\t\t\t\t\tr = Double.parseDouble(tem_r);\n\t\t\t\t\tif(r>100) throw new ReadError(\"圆的半径请输入小于100的值\");\n\t\t\t\t\ts = Cal.Shape2DGetS(\"Circle\", r);\n\t\t\t\t\tres_S = df.format(s);\n\t\t\t\t\ttextField_Cs.setText(res_S);\n\t\t\t\t}catch(Exception re){\n\t\t\t\t\tJOptionPane.showMessageDialog(null, re.getMessage(),\"错误\", JOptionPane.ERROR_MESSAGE); //弹出警告窗口\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tGroupLayout gl_panel_1 = new GroupLayout(panel_1);\n\t\tgl_panel_1.setHorizontalGroup(\n\t\t\tgl_panel_1.createParallelGroup(Alignment.LEADING)\n\t\t\t\t.addGroup(gl_panel_1.createSequentialGroup()\n\t\t\t\t\t.addGap(35)\n\t\t\t\t\t.addGroup(gl_panel_1.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t.addGroup(gl_panel_1.createSequentialGroup()\n\t\t\t\t\t\t\t.addGap(38)\n\t\t\t\t\t\t\t.addComponent(label_3, GroupLayout.PREFERRED_SIZE, 26, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t.addGap(67)\n\t\t\t\t\t\t\t.addComponent(textField_Cr, GroupLayout.PREFERRED_SIZE, 130, GroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t.addGroup(gl_panel_1.createSequentialGroup()\n\t\t\t\t\t\t\t.addGap(38)\n\t\t\t\t\t\t\t.addComponent(label_4, GroupLayout.PREFERRED_SIZE, 65, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t.addGap(28)\n\t\t\t\t\t\t\t.addComponent(textField_Cs, GroupLayout.PREFERRED_SIZE, 130, GroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t.addComponent(button, GroupLayout.PREFERRED_SIZE, 305, GroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t.addContainerGap(46, Short.MAX_VALUE))\n\t\t);\n\t\tgl_panel_1.setVerticalGroup(\n\t\t\tgl_panel_1.createParallelGroup(Alignment.LEADING)\n\t\t\t\t.addGroup(gl_panel_1.createSequentialGroup()\n\t\t\t\t\t.addGap(16)\n\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t.addGroup(gl_panel_1.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t.addGroup(gl_panel_1.createSequentialGroup()\n\t\t\t\t\t\t\t.addGap(5)\n\t\t\t\t\t\t\t.addComponent(label_3))\n\t\t\t\t\t\t.addComponent(textField_Cr, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t.addGap(35)\n\t\t\t\t\t.addGroup(gl_panel_1.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t.addGroup(gl_panel_1.createSequentialGroup()\n\t\t\t\t\t\t\t.addGap(5)\n\t\t\t\t\t\t\t.addComponent(label_4))\n\t\t\t\t\t\t.addComponent(textField_Cs, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t.addGap(18)\n\t\t\t\t\t.addComponent(button)\n\t\t\t\t\t.addContainerGap(31, Short.MAX_VALUE))\n\t\t);\n\t\tpanel_1.setLayout(gl_panel_1);\n\t\t\n\t\tJPanel panel_2 = new JPanel();\n\t\ttabbedPane_1.addTab(\"三角形面积\", null, panel_2, null);\n\t\t\n\t\tJLabel label_5 = new JLabel(\"三角形的边长\");\n\t\t\n\t\ttextField_Ta = new JTextField();\n\t\ttextField_Ta.setColumns(10);\n\t\ttextField_Ta.addKeyListener(new KeyAdapter(){ \n public void keyTyped(KeyEvent e) { \n int keyChar = e.getKeyChar(); \n if((keyChar >= KeyEvent.VK_0 && keyChar <= KeyEvent.VK_9)|| keyChar=='.'){ \n \n }else{ \n e.consume(); \n } \n } \n }); \n\t\t\n\t\tJLabel label_6 = new JLabel(\"三角形的面积\");\n\t\t\n\t\ttextField_Ts = new JTextField();\n\t\ttextField_Ts.setEditable(false);\n\t\ttextField_Ts.setColumns(10);\n\t\t\n\t\t\n\t\ttextField_Tb = new JTextField();\n\t\ttextField_Tb.setColumns(10);\n\t\ttextField_Tb.addKeyListener(new KeyAdapter(){ \n public void keyTyped(KeyEvent e) { \n int keyChar = e.getKeyChar(); \n if((keyChar >= KeyEvent.VK_0 && keyChar <= KeyEvent.VK_9)|| keyChar=='.'){ \n \n }else{ \n e.consume(); \n } \n } \n }); \n\t\t\n\t\t\n\t\ttextField_Tc = new JTextField();\n\t\ttextField_Tc.setColumns(10);\n\t\ttextField_Tc.addKeyListener(new KeyAdapter(){ \n public void keyTyped(KeyEvent e) { \n int keyChar = e.getKeyChar(); \n if((keyChar >= KeyEvent.VK_0 && keyChar <= KeyEvent.VK_9)|| keyChar=='.'){ \n \n }else{ \n e.consume(); \n } \n } \n }); \n\t\t\n\t\t\n\t\tJButton button_1 = new JButton(\"计算\");\n\t\tbutton_1.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tdouble a,b,c,s;\n\t\t\t\tCalculator Cal= new Calculator();\n\t\t\t\tString tem_a, tem_b, tem_c, res_S;\n\t\t\t\tDecimalFormat df = new DecimalFormat(\"####.##\");\n\t\t\t\ttry{\n\t\t\t\t\ttem_a = textField_Ta.getText();\n\t\t\t\t\tif(tem_a.isEmpty()) throw new ReadError(\"三角形的边长不能为空!\");\n\t\t\t\t\ttem_b = textField_Tb.getText();\n\t\t\t\t\tif(tem_b.isEmpty()) throw new ReadError(\"三角形的边长不能为空!\");\n\t\t\t\t\ttem_c = textField_Tc.getText();\n\t\t\t\t\tif(tem_c.isEmpty()) throw new ReadError(\"三角形的边长不能为空!\");\n\t\t\t\t\ta = Double.parseDouble(tem_a);\n\t\t\t\t\tb = Double.parseDouble(tem_b);\n\t\t\t\t\tc = Double.parseDouble(tem_c);\n\t\t\t\t\tif(a>100||b>100||c>100) throw new ReadError(\"三角形的边长请输入小于100的值\");\n\t\t\t\t\tif((a+b)<=c||(a+c)<=b||(b+c)<=a) throw new TriangleError();\n\t\t\t\t\ts = Cal.Shape2DGetS(\"Triangle\", a,b,c);\n\t\t\t\t\tres_S = df.format(s);\n\t\t\t\t\ttextField_Ts.setText(res_S);\n\t\t\t\t}catch(Exception re){\n\t\t\t\t\tJOptionPane.showMessageDialog(null, re.getMessage(),\"错误\", JOptionPane.ERROR_MESSAGE); //弹出警告窗口\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tGroupLayout gl_panel_2 = new GroupLayout(panel_2);\n\t\tgl_panel_2.setHorizontalGroup(\n\t\t\tgl_panel_2.createParallelGroup(Alignment.LEADING)\n\t\t\t\t.addGroup(gl_panel_2.createSequentialGroup()\n\t\t\t\t\t.addContainerGap(34, Short.MAX_VALUE)\n\t\t\t\t\t.addGroup(gl_panel_2.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t.addComponent(label_5, GroupLayout.PREFERRED_SIZE, 80, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addGroup(gl_panel_2.createSequentialGroup()\n\t\t\t\t\t\t\t.addComponent(textField_Ta, GroupLayout.PREFERRED_SIZE, 95, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t.addGap(18)\n\t\t\t\t\t\t\t.addComponent(textField_Tb, GroupLayout.PREFERRED_SIZE, 94, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t.addGap(18)\n\t\t\t\t\t\t\t.addComponent(textField_Tc, GroupLayout.PREFERRED_SIZE, 95, GroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t.addGroup(gl_panel_2.createSequentialGroup()\n\t\t\t\t\t\t\t.addComponent(label_6, GroupLayout.PREFERRED_SIZE, 78, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t.addGap(35)\n\t\t\t\t\t\t\t.addGroup(gl_panel_2.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t.addComponent(button_1, GroupLayout.PREFERRED_SIZE, 77, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t.addComponent(textField_Ts, GroupLayout.PREFERRED_SIZE, 130, GroupLayout.PREFERRED_SIZE))))\n\t\t\t\t\t.addGap(32))\n\t\t);\n\t\tgl_panel_2.setVerticalGroup(\n\t\t\tgl_panel_2.createParallelGroup(Alignment.LEADING)\n\t\t\t\t.addGroup(gl_panel_2.createSequentialGroup()\n\t\t\t\t\t.addGap(31)\n\t\t\t\t\t.addComponent(label_5)\n\t\t\t\t\t.addGap(18)\n\t\t\t\t\t.addGroup(gl_panel_2.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t.addComponent(textField_Ta, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(textField_Tb, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(textField_Tc, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t.addGap(18)\n\t\t\t\t\t.addGroup(gl_panel_2.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t.addGroup(gl_panel_2.createSequentialGroup()\n\t\t\t\t\t\t\t.addGap(5)\n\t\t\t\t\t\t\t.addComponent(label_6))\n\t\t\t\t\t\t.addComponent(textField_Ts, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED, 27, Short.MAX_VALUE)\n\t\t\t\t\t.addComponent(button_1)\n\t\t\t\t\t.addContainerGap())\n\t\t);\n\t\tpanel_2.setLayout(gl_panel_2);\n\t\t\n\t\tJPanel panel_3 = new JPanel();\n\t\ttabbedPane_1.addTab(\"长方形面积\", null, panel_3, null);\n\t\t\n\t\tJLabel label_10 = new JLabel(\"长方形的长和宽\");\n\t\t\n\t\ttextField_Ra = new JTextField();\n\t\ttextField_Ra.setColumns(10);\n\t\ttextField_Ra.addKeyListener(new KeyAdapter(){ \n public void keyTyped(KeyEvent e) { \n int keyChar = e.getKeyChar(); \n if((keyChar >= KeyEvent.VK_0 && keyChar <= KeyEvent.VK_9) || keyChar=='.'){ \n \n }else{ \n e.consume(); \n } \n } \n }); \n\t\t\n\t\tJLabel label_11 = new JLabel(\"长方形的面积\");\n\t\t\n\t\ttextField_Rs = new JTextField();\n\t\ttextField_Rs.setEditable(false);\n\t\ttextField_Rs.setColumns(10);\n\t\t\n\t\ttextField_Rb = new JTextField();\n\t\ttextField_Rb.setColumns(10);\n\t\ttextField_Rb.addKeyListener(new KeyAdapter(){ \n public void keyTyped(KeyEvent e) { \n int keyChar = e.getKeyChar(); \n if((keyChar >= KeyEvent.VK_0 && keyChar <= KeyEvent.VK_9)|| keyChar=='.'){ \n \n }else{ \n e.consume(); \n } \n } \n }); \n\t\t\n\t\tJButton button_4 = new JButton(\"计算\");\n\t\tbutton_4.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tdouble a,b,s;\n\t\t\t\tCalculator Cal= new Calculator();\n\t\t\t\tString tem_a, tem_b, res_S;\n\t\t\t\tDecimalFormat df = new DecimalFormat(\"####.##\");\n\t\t\t\ttry{\n\t\t\t\t\ttem_a = textField_Ra.getText();\n\t\t\t\t\tif(tem_a.isEmpty()) throw new ReadError(\"长方形的长不能为空!\");\n\t\t\t\t\ttem_b = textField_Rb.getText();\n\t\t\t\t\tif(tem_b.isEmpty()) throw new ReadError(\"长方形的宽不能为空!\");\n\t\t\t\t\ta = Double.parseDouble(tem_a);\n\t\t\t\t\tb = Double.parseDouble(tem_b);\n\t\t\t\t\tif(a>100||b>100) throw new ReadError(\"长方形的长宽请输入小于100的值\");\n\t\t\t\t\ts = Cal.Shape2DGetS(\"Rectangle\", a,b);\n\t\t\t\t\tres_S = df.format(s);\n\t\t\t\t\ttextField_Rs.setText(res_S);\n\t\t\t\t}catch(Exception re){\n\t\t\t\t\tJOptionPane.showMessageDialog(null, re.getMessage(),\"错误\", JOptionPane.ERROR_MESSAGE); //弹出警告窗口\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tGroupLayout gl_panel_3 = new GroupLayout(panel_3);\n\t\tgl_panel_3.setHorizontalGroup(\n\t\t\tgl_panel_3.createParallelGroup(Alignment.LEADING)\n\t\t\t\t.addGroup(gl_panel_3.createSequentialGroup()\n\t\t\t\t\t.addGroup(gl_panel_3.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t.addGroup(gl_panel_3.createSequentialGroup()\n\t\t\t\t\t\t\t.addGap(62)\n\t\t\t\t\t\t\t.addGroup(gl_panel_3.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t.addGroup(gl_panel_3.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t.addComponent(label_11, GroupLayout.PREFERRED_SIZE, 78, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t.addGap(35)\n\t\t\t\t\t\t\t\t\t.addComponent(textField_Rs, GroupLayout.PREFERRED_SIZE, 130, GroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t.addGroup(gl_panel_3.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t.addGap(113)\n\t\t\t\t\t\t\t\t\t.addComponent(button_4, GroupLayout.PREFERRED_SIZE, 77, GroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t.addComponent(label_10, GroupLayout.PREFERRED_SIZE, 152, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t.addGroup(gl_panel_3.createSequentialGroup()\n\t\t\t\t\t\t\t.addGap(76)\n\t\t\t\t\t\t\t.addComponent(textField_Ra, GroupLayout.DEFAULT_SIZE, 95, Short.MAX_VALUE)\n\t\t\t\t\t\t\t.addGap(45)\n\t\t\t\t\t\t\t.addComponent(textField_Rb, GroupLayout.DEFAULT_SIZE, 94, Short.MAX_VALUE)))\n\t\t\t\t\t.addGap(76))\n\t\t);\n\t\tgl_panel_3.setVerticalGroup(\n\t\t\tgl_panel_3.createParallelGroup(Alignment.LEADING)\n\t\t\t\t.addGroup(Alignment.TRAILING, gl_panel_3.createSequentialGroup()\n\t\t\t\t\t.addGap(22)\n\t\t\t\t\t.addComponent(label_10)\n\t\t\t\t\t.addGap(18)\n\t\t\t\t\t.addGroup(gl_panel_3.createParallelGroup(Alignment.BASELINE)\n\t\t\t\t\t\t.addComponent(textField_Ra, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(textField_Rb, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED, 18, Short.MAX_VALUE)\n\t\t\t\t\t.addGroup(gl_panel_3.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t.addGroup(gl_panel_3.createSequentialGroup()\n\t\t\t\t\t\t\t.addGap(5)\n\t\t\t\t\t\t\t.addComponent(label_11))\n\t\t\t\t\t\t.addComponent(textField_Rs, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t.addGap(27)\n\t\t\t\t\t.addComponent(button_4)\n\t\t\t\t\t.addGap(15))\n\t\t);\n\t\tpanel_3.setLayout(gl_panel_3);\n\t\tpanel.setLayout(gl_panel);\n\t\t\n\t\tJPanel panel_4 = new JPanel();\n\t\ttabbedPane.addTab(\"体积\", null, panel_4, null);\n\t\t\n\t\tJTabbedPane tabbedPane_2 = new JTabbedPane(JTabbedPane.TOP);\n\t\tGroupLayout gl_panel_4 = new GroupLayout(panel_4);\n\t\tgl_panel_4.setHorizontalGroup(\n\t\t\tgl_panel_4.createParallelGroup(Alignment.LEADING)\n\t\t\t\t.addGroup(gl_panel_4.createSequentialGroup()\n\t\t\t\t\t.addContainerGap()\n\t\t\t\t\t.addComponent(tabbedPane_2, GroupLayout.DEFAULT_SIZE, 407, Short.MAX_VALUE)\n\t\t\t\t\t.addContainerGap())\n\t\t);\n\t\tgl_panel_4.setVerticalGroup(\n\t\t\tgl_panel_4.createParallelGroup(Alignment.LEADING)\n\t\t\t\t.addGroup(gl_panel_4.createSequentialGroup()\n\t\t\t\t\t.addContainerGap()\n\t\t\t\t\t.addComponent(tabbedPane_2, GroupLayout.DEFAULT_SIZE, 242, Short.MAX_VALUE)\n\t\t\t\t\t.addContainerGap())\n\t\t);\n\t\t\n\t\tJPanel panel_5 = new JPanel();\n\t\ttabbedPane_2.addTab(\"圆柱体体积\", null, panel_5, null);\n\t\t\n\t\tJLabel label_7 = new JLabel(\"半径\");\n\t\t\n\t\ttextField_r = new JTextField();\n\t\ttextField_r.setColumns(10);\n\t\ttextField_r.addKeyListener(new KeyAdapter(){ \n public void keyTyped(KeyEvent e) { \n int keyChar = e.getKeyChar(); \n if((keyChar >= KeyEvent.VK_0 && keyChar <= KeyEvent.VK_9)|| keyChar=='.'){ \n \n }else{ \n e.consume(); \n } \n } \n }); \n\t\t\n\t\t\n\t\tJLabel label_8 = new JLabel(\"高\");\n\t\t\n\t\ttextField_h = new JTextField();\n\t\ttextField_h.setColumns(10);\n\t\ttextField_h.addKeyListener(new KeyAdapter(){ \n public void keyTyped(KeyEvent e) { \n int keyChar = e.getKeyChar(); \n if((keyChar >= KeyEvent.VK_0 && keyChar <= KeyEvent.VK_9)|| keyChar=='.'){ \n \n }else{ \n e.consume(); \n } \n } \n }); \n\t\t\n\t\t\n\t\ttextField_Cv = new JTextField();\n\t\ttextField_Cv.setEditable(false);\n\t\ttextField_Cv.setColumns(10);\n\t\t\n\t\tJLabel label_9 = new JLabel(\"圆柱体体积\");\n\t\t\n\t\tJButton button_2 = new JButton(\"计算\");\n\t\tbutton_2.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tdouble r,h,v;//r圆的半径,s是圆的面积\n\t\t\t\tCalculator Cal= new Calculator();\n\t\t\t\tString tem_r, tem_h, res_V;\n\t\t\t\tDecimalFormat df = new DecimalFormat(\"####.##\");\n\t\t\t\ttry{\n\t\t\t\t\ttem_r = textField_r.getText();\n\t\t\t\t\tif(tem_r.isEmpty()) throw new ReadError(\"圆柱底面的半径不能为空!\");\n\t\t\t\t\ttem_h = textField_h.getText();\n\t\t\t\t\tif(tem_h.isEmpty()) throw new ReadError(\"圆柱的高不能为空!\");\n\t\t\t\t\tr = Double.parseDouble(tem_r);\n\t\t\t\t\th = Double.parseDouble(tem_h);\n\t\t\t\t\tif(r>100) throw new ReadError(\"圆柱的底面半径请输入小于100的值\");\n\t\t\t\t\tv = Cal.Shape3DGetV(\"Podetium\",\"Circle\",h, r);\n\t\t\t\t\tres_V = df.format(v);\n\t\t\t\t\ttextField_Cv.setText(res_V);\n\t\t\t\t}catch(Exception re){\n\t\t\t\t\tJOptionPane.showMessageDialog(null, re.getMessage(),\"错误\", JOptionPane.ERROR_MESSAGE); //弹出警告窗口\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tGroupLayout gl_panel_5 = new GroupLayout(panel_5);\n\t\tgl_panel_5.setHorizontalGroup(\n\t\t\tgl_panel_5.createParallelGroup(Alignment.LEADING)\n\t\t\t\t.addGroup(gl_panel_5.createSequentialGroup()\n\t\t\t\t\t.addGap(40)\n\t\t\t\t\t.addGroup(gl_panel_5.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t.addGroup(gl_panel_5.createSequentialGroup()\n\t\t\t\t\t\t\t.addGap(4)\n\t\t\t\t\t\t\t.addComponent(label_7, GroupLayout.PREFERRED_SIZE, 26, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t.addGap(134)\n\t\t\t\t\t\t\t.addComponent(label_8, GroupLayout.PREFERRED_SIZE, 13, GroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t.addGroup(gl_panel_5.createSequentialGroup()\n\t\t\t\t\t\t\t.addGap(4)\n\t\t\t\t\t\t\t.addComponent(textField_r, GroupLayout.PREFERRED_SIZE, 130, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t.addGap(30)\n\t\t\t\t\t\t\t.addComponent(textField_h, GroupLayout.PREFERRED_SIZE, 130, GroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t.addGroup(gl_panel_5.createSequentialGroup()\n\t\t\t\t\t\t\t.addGap(36)\n\t\t\t\t\t\t\t.addComponent(label_9, GroupLayout.PREFERRED_SIZE, 65, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t.addGap(28)\n\t\t\t\t\t\t\t.addComponent(textField_Cv, GroupLayout.PREFERRED_SIZE, 130, GroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t.addComponent(button_2, GroupLayout.PREFERRED_SIZE, 305, GroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t.addContainerGap(41, Short.MAX_VALUE))\n\t\t);\n\t\tgl_panel_5.setVerticalGroup(\n\t\t\tgl_panel_5.createParallelGroup(Alignment.LEADING)\n\t\t\t\t.addGroup(Alignment.TRAILING, gl_panel_5.createSequentialGroup()\n\t\t\t\t\t.addContainerGap(21, Short.MAX_VALUE)\n\t\t\t\t\t.addGroup(gl_panel_5.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t.addComponent(label_7)\n\t\t\t\t\t\t.addComponent(label_8))\n\t\t\t\t\t.addGap(12)\n\t\t\t\t\t.addGroup(gl_panel_5.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t.addComponent(textField_r, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(textField_h, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t.addGap(31)\n\t\t\t\t\t.addGroup(gl_panel_5.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t.addGroup(gl_panel_5.createSequentialGroup()\n\t\t\t\t\t\t\t.addGap(5)\n\t\t\t\t\t\t\t.addComponent(label_9))\n\t\t\t\t\t\t.addComponent(textField_Cv, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t.addGap(18)\n\t\t\t\t\t.addComponent(button_2)\n\t\t\t\t\t.addGap(17))\n\t\t);\n\t\tpanel_5.setLayout(gl_panel_5);\n\t\t\n\t\tJPanel panel_6 = new JPanel();\n\t\ttabbedPane_2.addTab(\"三棱柱体积\", null, panel_6, null);\n\t\t\n\t\tJLabel label = new JLabel(\"三棱柱底面三角形的边长\");\n\t\t\n\t\ttextField_a = new JTextField();\n\t\ttextField_a.setColumns(10);\n\t\ttextField_a.addKeyListener(new KeyAdapter(){ \n public void keyTyped(KeyEvent e) { \n int keyChar = e.getKeyChar(); \n if((keyChar >= KeyEvent.VK_0 && keyChar <= KeyEvent.VK_9)|| keyChar=='.'){ \n \n }else{ \n e.consume(); \n } \n } \n }); \n\t\t\n\t\t\n\t\ttextField_b = new JTextField();\n\t\ttextField_b.setColumns(10);\n\t\ttextField_b.addKeyListener(new KeyAdapter(){ \n public void keyTyped(KeyEvent e) { \n int keyChar = e.getKeyChar(); \n if((keyChar >= KeyEvent.VK_0 && keyChar <= KeyEvent.VK_9)|| keyChar=='.'){ \n \n }else{ \n e.consume(); \n } \n } \n }); \n\t\t\n\t\t\n\t\ttextField_c = new JTextField();\n\t\ttextField_c.setColumns(10);\n\t\ttextField_c.addKeyListener(new KeyAdapter(){ \n public void keyTyped(KeyEvent e) { \n int keyChar = e.getKeyChar(); \n if((keyChar >= KeyEvent.VK_0 && keyChar <= KeyEvent.VK_9)|| keyChar=='.'){ \n \n }else{ \n e.consume(); \n } \n } \n }); \n\t\t\n\t\t\n\t\ttextField_Th = new JTextField();\n\t\ttextField_Th.setColumns(10);\n\t\ttextField_Th.addKeyListener(new KeyAdapter(){ \n public void keyTyped(KeyEvent e) { \n int keyChar = e.getKeyChar(); \n if((keyChar >= KeyEvent.VK_0 && keyChar <= KeyEvent.VK_9)|| keyChar=='.'){ \n \n }else{ \n e.consume(); \n } \n } \n }); \n\t\t\n\t\t\n\t\tJLabel label_1 = new JLabel(\"三棱柱的高\");\n\t\t\n\t\tJLabel label_2 = new JLabel(\"三棱柱的体积\");\n\t\t\n\t\ttextField_Tv = new JTextField();\n\t\ttextField_Tv.setEditable(false);\n\t\ttextField_Tv.setColumns(10);\n\t\t\n\t\tJButton button_3 = new JButton(\"计算\");\n\t\tbutton_3.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tdouble a,b,c,h,v;\n\t\t\t\tCalculator Cal= new Calculator();\n\t\t\t\tString tem_a, tem_b, tem_c, tem_h, res_V;\n\t\t\t\tDecimalFormat df = new DecimalFormat(\"####.##\");\n\t\t\t\ttry{\n\t\t\t\t\ttem_a = textField_a.getText();\n\t\t\t\t\tif(tem_a.isEmpty()) throw new ReadError(\"三棱柱底面的边长不能为空!\");\n\t\t\t\t\ttem_b = textField_b.getText();\n\t\t\t\t\tif(tem_b.isEmpty()) throw new ReadError(\"三棱柱底面的边长不能为空!\");\n\t\t\t\t\ttem_c = textField_c.getText();\n\t\t\t\t\tif(tem_c.isEmpty()) throw new ReadError(\"三棱柱底面的边长不能为空!\");\n\t\t\t\t\ttem_h = textField_Th.getText();\n\t\t\t\t\tif(tem_h.isEmpty()) throw new ReadError(\"三棱柱的高不能为空!\");\n\t\t\t\t\ta = Double.parseDouble(tem_a);\n\t\t\t\t\tb = Double.parseDouble(tem_b);\n\t\t\t\t\tc = Double.parseDouble(tem_c);\n\t\t\t\t\th = Double.parseDouble(tem_h);\n\t\t\t\t\tif(a>100||b>100||c>100) throw new ReadError(\"三棱柱底面的边长请输入小于100的值\");\n\t\t\t\t\tif((a+b)<=c||(a+c)<=b||(b+c)<=a) throw new TriangleError();\n\t\t\t\t\tv = Cal.Shape3DGetV(\"Podetium\",\"Triangle\",h, a,b,c);\n\t\t\t\t\tres_V = df.format(v);\n\t\t\t\t\ttextField_Tv.setText(res_V);\n\t\t\t\t}catch(Exception re){\n\t\t\t\t\tJOptionPane.showMessageDialog(null, re.getMessage(),\"错误\", JOptionPane.ERROR_MESSAGE); //弹出警告窗口\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tGroupLayout gl_panel_6 = new GroupLayout(panel_6);\n\t\tgl_panel_6.setHorizontalGroup(\n\t\t\tgl_panel_6.createParallelGroup(Alignment.LEADING)\n\t\t\t\t.addGroup(Alignment.TRAILING, gl_panel_6.createSequentialGroup()\n\t\t\t\t\t.addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n\t\t\t\t\t.addGroup(gl_panel_6.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t.addGroup(gl_panel_6.createSequentialGroup()\n\t\t\t\t\t\t\t.addComponent(textField_a, GroupLayout.PREFERRED_SIZE, 115, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t.addGap(18)\n\t\t\t\t\t\t\t.addComponent(textField_b, GroupLayout.PREFERRED_SIZE, 117, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t.addGap(18)\n\t\t\t\t\t\t\t.addComponent(textField_c, GroupLayout.PREFERRED_SIZE, 117, GroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t.addGroup(gl_panel_6.createSequentialGroup()\n\t\t\t\t\t\t\t.addGap(40)\n\t\t\t\t\t\t\t.addComponent(label_1, GroupLayout.PREFERRED_SIZE, 65, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t.addGap(109)\n\t\t\t\t\t\t\t.addComponent(textField_Th, GroupLayout.PREFERRED_SIZE, 130, GroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t.addGroup(gl_panel_6.createSequentialGroup()\n\t\t\t\t\t\t\t.addGap(40)\n\t\t\t\t\t\t\t.addComponent(label_2, GroupLayout.PREFERRED_SIZE, 140, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t.addGap(34)\n\t\t\t\t\t\t\t.addComponent(textField_Tv, GroupLayout.PREFERRED_SIZE, 130, GroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t.addGroup(gl_panel_6.createSequentialGroup()\n\t\t\t\t\t\t\t.addGap(154)\n\t\t\t\t\t\t\t.addComponent(button_3, GroupLayout.PREFERRED_SIZE, 77, GroupLayout.PREFERRED_SIZE))))\n\t\t\t\t.addGroup(gl_panel_6.createSequentialGroup()\n\t\t\t\t\t.addContainerGap()\n\t\t\t\t\t.addComponent(label, GroupLayout.PREFERRED_SIZE, 145, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t.addContainerGap(240, Short.MAX_VALUE))\n\t\t);\n\t\tgl_panel_6.setVerticalGroup(\n\t\t\tgl_panel_6.createParallelGroup(Alignment.LEADING)\n\t\t\t\t.addGroup(gl_panel_6.createSequentialGroup()\n\t\t\t\t\t.addContainerGap()\n\t\t\t\t\t.addComponent(label)\n\t\t\t\t\t.addPreferredGap(ComponentPlacement.UNRELATED)\n\t\t\t\t\t.addGroup(gl_panel_6.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t.addComponent(textField_a, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(textField_b, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(textField_c, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t.addGap(12)\n\t\t\t\t\t.addGroup(gl_panel_6.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t.addGroup(gl_panel_6.createSequentialGroup()\n\t\t\t\t\t\t\t.addGap(11)\n\t\t\t\t\t\t\t.addComponent(label_1))\n\t\t\t\t\t\t.addComponent(textField_Th, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t.addGap(17)\n\t\t\t\t\t.addGroup(gl_panel_6.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t.addComponent(label_2)\n\t\t\t\t\t\t.addComponent(textField_Tv, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t.addGap(18)\n\t\t\t\t\t.addComponent(button_3)\n\t\t\t\t\t.addContainerGap(7, Short.MAX_VALUE))\n\t\t);\n\t\tpanel_6.setLayout(gl_panel_6);\n\t\t\n\t\tJPanel panel_7 = new JPanel();\n\t\ttabbedPane_2.addTab(\"长方体体积\", null, panel_7, null);\n\t\t\n\t\tJLabel label_12 = new JLabel(\"长方体的底边长和宽\");\n\t\t\n\t\ttextField_La = new JTextField();\n\t\ttextField_La.setColumns(10);\n\t\ttextField_La.addKeyListener(new KeyAdapter(){ \n public void keyTyped(KeyEvent e) { \n int keyChar = e.getKeyChar(); \n if((keyChar >= KeyEvent.VK_0 && keyChar <= KeyEvent.VK_9)|| keyChar=='.'){ \n \n }else{ \n e.consume(); \n } \n } \n }); \n\t\t\n\t\ttextField_Lb = new JTextField();\n\t\ttextField_Lb.setColumns(10);\n\t\ttextField_Lb.addKeyListener(new KeyAdapter(){ \n public void keyTyped(KeyEvent e) { \n int keyChar = e.getKeyChar(); \n if((keyChar >= KeyEvent.VK_0 && keyChar <= KeyEvent.VK_9)|| keyChar=='.'){ \n \n }else{ \n e.consume(); \n } \n } \n }); \n\t\t\n\t\tJLabel label_13 = new JLabel(\"长方体的高\");\n\t\t\n\t\ttextField_Lh = new JTextField();\n\t\ttextField_Lh.setColumns(10);\n\t\ttextField_Lh.addKeyListener(new KeyAdapter(){ \n public void keyTyped(KeyEvent e) { \n int keyChar = e.getKeyChar(); \n if((keyChar >= KeyEvent.VK_0 && keyChar <= KeyEvent.VK_9)|| keyChar=='.'){ \n \n }else{ \n e.consume(); \n } \n } \n }); \n\t\t\n\t\tJLabel label_14 = new JLabel(\"长方体的体积\");\n\t\t\n\t\ttextField_Lv = new JTextField();\n\t\ttextField_Lv.setEditable(false);\n\t\ttextField_Lv.setColumns(10);\n\t\t\n\t\tJButton button_5 = new JButton(\"计算\");\n\t\tbutton_5.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tdouble a,b,h,v;\n\t\t\t\tCalculator Cal= new Calculator();\n\t\t\t\tString tem_a, tem_b,tem_h, res_V;\n\t\t\t\tDecimalFormat df = new DecimalFormat(\"####.##\");\n\t\t\t\ttry{\n\t\t\t\t\ttem_a = textField_La.getText();\n\t\t\t\t\tif(tem_a.isEmpty()) throw new ReadError(\"长方体底面的长不能为空!\");\n\t\t\t\t\ttem_b = textField_Lb.getText();\n\t\t\t\t\tif(tem_b.isEmpty()) throw new ReadError(\"长方体底面的宽不能为空!\");\n\t\t\t\t\ttem_h = textField_Lh.getText();\n\t\t\t\t\tif(tem_h.isEmpty()) throw new ReadError(\"长方体的高不能为空!\");\n\t\t\t\t\ta = Double.parseDouble(tem_a);\n\t\t\t\t\tb = Double.parseDouble(tem_b);\n\t\t\t\t\th = Double.parseDouble(tem_h);\n\t\t\t\t\tif(a>100||b>100) throw new ReadError(\"长方体底面的长宽请输入小于100的值\");\n\t\t\t\t\tv = Cal.Shape3DGetV(\"Podetium\",\"Rectangle\",h, a,b);\n\t\t\t\t\tres_V = df.format(v);\n\t\t\t\t\ttextField_Lv.setText(res_V);\n\t\t\t\t}catch(Exception re){\n\t\t\t\t\tJOptionPane.showMessageDialog(null, re.getMessage(),\"错误\", JOptionPane.ERROR_MESSAGE); //弹出警告窗口\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tGroupLayout gl_panel_7 = new GroupLayout(panel_7);\n\t\tgl_panel_7.setHorizontalGroup(\n\t\t\tgl_panel_7.createParallelGroup(Alignment.LEADING)\n\t\t\t\t.addGroup(Alignment.TRAILING, gl_panel_7.createSequentialGroup()\n\t\t\t\t\t.addGap(25)\n\t\t\t\t\t.addGroup(gl_panel_7.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t.addGroup(gl_panel_7.createSequentialGroup()\n\t\t\t\t\t\t\t.addGap(40)\n\t\t\t\t\t\t\t.addComponent(label_13, GroupLayout.PREFERRED_SIZE, 65, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t.addGap(109)\n\t\t\t\t\t\t\t.addComponent(textField_Lh, GroupLayout.PREFERRED_SIZE, 130, GroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t.addGroup(gl_panel_7.createSequentialGroup()\n\t\t\t\t\t\t\t.addGap(40)\n\t\t\t\t\t\t\t.addComponent(label_14, GroupLayout.PREFERRED_SIZE, 140, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t.addGap(34)\n\t\t\t\t\t\t\t.addComponent(textField_Lv, GroupLayout.PREFERRED_SIZE, 130, GroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t.addGroup(gl_panel_7.createSequentialGroup()\n\t\t\t\t\t\t\t.addGap(154)\n\t\t\t\t\t\t\t.addComponent(button_5, GroupLayout.PREFERRED_SIZE, 77, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t.addGap(22))\n\t\t\t\t.addGroup(gl_panel_7.createSequentialGroup()\n\t\t\t\t\t.addGap(63)\n\t\t\t\t\t.addComponent(label_12, GroupLayout.PREFERRED_SIZE, 145, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t.addContainerGap(183, Short.MAX_VALUE))\n\t\t\t\t.addGroup(gl_panel_7.createSequentialGroup()\n\t\t\t\t\t.addGap(60)\n\t\t\t\t\t.addComponent(textField_La, GroupLayout.DEFAULT_SIZE, 115, Short.MAX_VALUE)\n\t\t\t\t\t.addGap(38)\n\t\t\t\t\t.addComponent(textField_Lb, GroupLayout.DEFAULT_SIZE, 117, Short.MAX_VALUE)\n\t\t\t\t\t.addGap(61))\n\t\t);\n\t\tgl_panel_7.setVerticalGroup(\n\t\t\tgl_panel_7.createParallelGroup(Alignment.LEADING)\n\t\t\t\t.addGroup(Alignment.TRAILING, gl_panel_7.createSequentialGroup()\n\t\t\t\t\t.addContainerGap(7, Short.MAX_VALUE)\n\t\t\t\t\t.addComponent(label_12)\n\t\t\t\t\t.addGap(12)\n\t\t\t\t\t.addGroup(gl_panel_7.createParallelGroup(Alignment.BASELINE)\n\t\t\t\t\t\t.addComponent(textField_La, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(textField_Lb, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t.addGap(12)\n\t\t\t\t\t.addGroup(gl_panel_7.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t.addGroup(gl_panel_7.createSequentialGroup()\n\t\t\t\t\t\t\t.addGap(11)\n\t\t\t\t\t\t\t.addComponent(label_13))\n\t\t\t\t\t\t.addComponent(textField_Lh, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t.addGap(17)\n\t\t\t\t\t.addGroup(gl_panel_7.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t.addComponent(label_14)\n\t\t\t\t\t\t.addComponent(textField_Lv, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t.addGap(18)\n\t\t\t\t\t.addComponent(button_5)\n\t\t\t\t\t.addContainerGap())\n\t\t);\n\t\tpanel_7.setLayout(gl_panel_7);\n\t\tpanel_4.setLayout(gl_panel_4);\n\t\tframe.getContentPane().setLayout(groupLayout);\n\t\t\n\n\t\t\n\t}", "public Tabuada() {\n initComponents();\n }", "private void dynInit()\r\n\t{\t\t\r\n\t\t//\tInfo\r\n\t\tstatusBar.setStatusLine(Msg.getMsg(Env.getCtx(), \"InOutGenerateSel\"));//@@\r\n\t\tstatusBar.setStatusDB(\" \");\r\n\t\t//\tTabbed Pane Listener\r\n\t\ttabbedPane.addChangeListener(this);\r\n\t}", "private void initialize() {\r\n\t\t// Initialize main frame\r\n\t\tframe = new JFrame();\r\n\t\tframe.setBounds(Constants.C_MAIN_PREFERED_POSITION_X_AT_START, Constants.C_MAIN_PREFERED_POSITION_Y_AT_START, \r\n\t\t\t\tConstants.C_MAIN_PREFERED_SIZE_X, Constants.C_MAIN_PREFERED_SIZE_Y);\r\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t\tframe.setTitle(Constants.C_MAIN_WINDOW_TITLE);\r\n\t\t\r\n\t\t// Tab panel and their panels\r\n\t\tmainTabbedPane = new JTabbedPane(JTabbedPane.TOP);\r\n\t\tframe.getContentPane().add(mainTabbedPane, BorderLayout.CENTER);\r\n\t\t\r\n\t\tpanelDecision = new DecisionPanel();\r\n\t\tmainTabbedPane.addTab(Constants.C_TAB_DECISION_TITLE, null, panelDecision, null);\r\n\t\t\r\n\t\tpanelCalculation = new CalculationPanel();\r\n\t\tmainTabbedPane.addTab(Constants.C_TAB_CALCULATION_TITLE, null, panelCalculation, null);\r\n\t\t\r\n\t\tpanelLibrary = new LibraryPanel();\r\n\t\tmainTabbedPane.addTab(Constants.C_TAB_LIBRARY_TITLE, null, panelLibrary, null);\r\n\t\t\r\n\t\t// Menu bar\r\n\t\tmenuBar = new JMenuBar();\r\n\t\tframe.setJMenuBar(menuBar);\r\n\t\tcreateMenus();\r\n\t}", "private void initTeamsTab() throws IOException {\n // THESE ARE THE CONTROLS FOR THE BASIC SCHEDULE PAGE HEADER INFO\n // WE'LL ARRANGE THEM IN A VBox\n teamTab = new Tab();\n teamWorkspacePane = new VBox();\n teamWorkspacePane.getStyleClass().add(CLASS_DRAFT_PANE);\n \n teamScroll = new ScrollPane();\n \n // PAGE LABEL & BUTTON\n Label teams = new Label();\n teams = initChildLabel(teamWorkspacePane, DraftKit_PropertyType.TEAMS_HEADING_LABEL, CLASS_HEADING_LABEL);\n \n PropertiesManager props = PropertiesManager.getPropertiesManager();\n String imagePath = \"file:\" + PATH_IMAGES + props.getProperty(DraftKit_PropertyType.TEAM_ICON);\n Image buttonImage = new Image(imagePath);\n teamTab.setGraphic(new ImageView(buttonImage));\n \n // ADD THINGS TO VBOX HERE\n HBox draftNameControls = new HBox();\n initHBoxLabel(draftNameControls, DraftKit_PropertyType.DRAFT_NAME_LABEL, CLASS_PROMPT_LABEL);\n draftNameText = initHBoxTextField(draftNameControls, \"\", true);\n\n HBox teamControls = new HBox();\n addTeam = initHBoxButton(teamControls, DraftKit_PropertyType.ADD_ICON, DraftKit_PropertyType.ADD_TEAM_TOOLTIP, false);\n removeTeam = initHBoxButton(teamControls, DraftKit_PropertyType.MINUS_ICON, DraftKit_PropertyType.REMOVE_TEAM_TOOLTIP, true);\n editTeam = initHBoxButton(teamControls, DraftKit_PropertyType.EDIT_ICON, DraftKit_PropertyType.EDIT_TEAM_TOOLTIP, true);\n\n initHBoxLabel(teamControls, DraftKit_PropertyType.TEAM_SELECT_LABEL, CLASS_PROMPT_LABEL);\n selectTeam = new ComboBox();\n selectTeam.getItems().clear();\n for (int n = 0; n < dataManager.getDraft().getFantasyTeams().size(); n++) {\n selectTeam.getItems().add(dataManager.getDraft().getFantasyTeams().get(n).getTeamName());\n }\n selectTeam.setValue(\"Choose a team\");\n \n selectTeam.valueProperty().addListener(new ChangeListener<String>() {\n @Override public void changed(ObservableValue ov, String t, String t1) {\n ArrayList<Player> tempTeam = new ArrayList<>();\n ArrayList<Player> tempTaxi = new ArrayList<>();\n teamTable.getItems().clear();\n for (Team tt : dataManager.getDraft().getFantasyTeams()) {\n if (tt.getTeamName().equals(selectTeam.getSelectionModel().getSelectedItem())) {\n tempTeam = tt.getTeamList();\n tempTaxi = tt.getTaxiList();\n }\n }\n teamTable = resetTeamTable(tempTeam);\n teamTaxiTable = resetTaxiTable(tempTaxi);\n }\n });\n \n teamControls.getChildren().add(selectTeam);\n\n // TABLE FOR MAIN PLAYERS IN THE FANTASY TEAMS PAGE\n VBox teamTableBox = new VBox();\n initVBoxLabel(teamTableBox, DraftKit_PropertyType.TEAM_TABLE_LABEL, CLASS_SUBHEADING_LABEL);\n positionCompare = new PositionCompare();\n teamTable = new TableView<>();\n \n posCol = new TableColumn<>(\"Position\");\n posCol.setCellValueFactory(new PropertyValueFactory<>(\"ChosenPosition\"));\n posCol.setComparator(positionCompare);\n posCol.setSortType(SortType.ASCENDING);\n posCol.setSortable(true);\n firstCol = new TableColumn<>(\"First\");\n firstCol.setCellValueFactory(new PropertyValueFactory<>(\"FirstName\"));\n firstCol.setSortable(false);\n lastCol = new TableColumn<>(\"Last\");\n lastCol.setCellValueFactory(new PropertyValueFactory<>(\"LastName\"));\n lastCol.setSortable(false);\n teamCol = new TableColumn<>(\"Pro Team\");\n teamCol.setCellValueFactory(new PropertyValueFactory<>(\"MLBTeam\"));\n teamCol.setSortable(false);\n positionsCol = new TableColumn<>(\"Positions\");\n positionsCol.setCellValueFactory(new PropertyValueFactory<>(\"position\"));\n positionsCol.setSortable(false);\n rwCol = new TableColumn<>(\"R/W\");\n rwCol.setCellValueFactory(new PropertyValueFactory<>(\"RW\"));\n rwCol.setSortable(false);\n hrsvCol = new TableColumn<>(\"HR/SV\");\n hrsvCol.setCellValueFactory(new PropertyValueFactory<>(\"HRSV\"));\n hrsvCol.setSortable(false);\n rbikCol = new TableColumn<>(\"RBI/K\");\n rbikCol.setCellValueFactory(new PropertyValueFactory<>(\"RBIK\"));\n rbikCol.setSortable(false);\n sberaCol = new TableColumn<>(\"SB/ERA\");\n sberaCol.setCellValueFactory(new PropertyValueFactory<>(\"SBERA\"));\n sberaCol.setSortable(false);\n bawhipCol = new TableColumn<>(\"BA/WHIP\");\n bawhipCol.setCellValueFactory(new PropertyValueFactory<>(\"BAWHIP\"));\n bawhipCol.setSortable(false);\n eValueCol = new TableColumn<>(\"Estimated Value\");\n eValueCol.setCellValueFactory(new PropertyValueFactory<>(\"estimatedValue\"));\n eValueCol.setSortable(false);\n contractCol = new TableColumn<>(\"Contract\");\n contractCol.setCellValueFactory(new PropertyValueFactory<>(\"Contract\"));\n contractCol.setSortable(false);\n salaryCol = new TableColumn<>(\"Salary\");\n salaryCol.setCellValueFactory(new PropertyValueFactory<>(\"Salary\"));\n salaryCol.setSortable(false);\n \n teamTable.getColumns().setAll(posCol, firstCol, lastCol, positionsCol,\n rwCol, hrsvCol, rbikCol, sberaCol, bawhipCol, eValueCol, contractCol, salaryCol);\n \n teamTable.getSortOrder().add(posCol);\n \n teamTable.setItems(teamList);\n \n // TABLE FOR TAXI PLAYERS IN THE FANTASY TEAMS PAGE\n VBox teamTaxiBox = new VBox();\n initVBoxLabel(teamTaxiBox, DraftKit_PropertyType.TEAM_TAXI_LABEL, CLASS_SUBHEADING_LABEL);\n teamTaxiTable = new TableView<>();\n \n firstCol2 = new TableColumn<>(\"First\");\n firstCol2.setCellValueFactory(new PropertyValueFactory<>(\"FirstName\"));\n lastCol2 = new TableColumn<>(\"Last\");\n lastCol2.setCellValueFactory(new PropertyValueFactory<>(\"LastName\"));\n teamCol2 = new TableColumn<>(\"Pro Team\");\n teamCol2.setCellValueFactory(new PropertyValueFactory<>(\"MLBTeam\"));\n positionsCol2 = new TableColumn<>(\"Positions\");\n positionsCol2.setCellValueFactory(new PropertyValueFactory<>(\"position\"));\n rwCol2 = new TableColumn<>(\"R/W\");\n rwCol2.setCellValueFactory(new PropertyValueFactory<>(\"RW\"));\n hrsvCol2 = new TableColumn<>(\"HR/SV\");\n hrsvCol2.setCellValueFactory(new PropertyValueFactory<>(\"HRSV\"));\n rbikCol2 = new TableColumn<>(\"RBI/K\");\n rbikCol2.setCellValueFactory(new PropertyValueFactory<>(\"RBIK\"));\n sberaCol2 = new TableColumn<>(\"SB/ERA\");\n sberaCol2.setCellValueFactory(new PropertyValueFactory<>(\"SBERA\"));\n bawhipCol2 = new TableColumn<>(\"BA/WHIP\");\n bawhipCol2.setCellValueFactory(new PropertyValueFactory<>(\"BAWHIP\"));\n eValueCol2 = new TableColumn<>(\"Estimated Value\");\n eValueCol2.setCellValueFactory(new PropertyValueFactory<>(\"EValue\"));\n contractCol2 = new TableColumn<>(\"Contract\");\n contractCol2.setCellValueFactory(new PropertyValueFactory<>(\"Contract\"));\n salaryCol2 = new TableColumn<>(\"Salary\");\n salaryCol2.setCellValueFactory(new PropertyValueFactory<>(\"Salary\"));\n \n teamTaxiTable.getColumns().setAll(firstCol2, lastCol2, positionsCol2,\n rwCol2, hrsvCol2, rbikCol2, sberaCol2, bawhipCol2, eValueCol2, contractCol2, salaryCol2);\n \n teamTaxiTable.setItems(teamTaxiList);\n \n // SET TOOLTIP\n Tooltip t = new Tooltip(\"Fantasy Teams Page\");\n teamTab.setTooltip(t);\n \n // PUT IN TAB PANE\n teamTableBox.getChildren().add(teamTable);\n teamTaxiBox.getChildren().add(teamTaxiTable);\n teamWorkspacePane.getChildren().add(draftNameControls);\n teamWorkspacePane.getChildren().add(teamControls);\n teamWorkspacePane.getChildren().add(teamTableBox);\n teamWorkspacePane.getChildren().add(teamTaxiBox);\n teamScroll.setContent(teamWorkspacePane);\n teamTab.setContent(teamScroll);\n mainWorkspacePane.getTabs().add(teamTab);\n \n ArrayList<Player> tempTeam = new ArrayList<>();\n for (Team tt : dataManager.getDraft().getFantasyTeams()) {\n if (tt.getTeamName().equals(selectTeam.getSelectionModel().getSelectedItem()))\n tempTeam = tt.getTeamList();\n }\n teamTable = resetTeamTable(tempTeam);\n }", "public void newFolder ()\n {\n newNode(null);\n }", "private void init() {\n UsersListAdapter usersListAdapter = new UsersListAdapter(getSupportFragmentManager());\n mViewPagerUserListing.setAdapter(usersListAdapter);\n\n // attach tab layout with view pager\n mTabLayoutUserListing.setupWithViewPager(mViewPagerUserListing);\n\n }", "private void initUI() {\n\t\tStage stage = Stage.createStage();\n\n\t\tControl formPanel = buildFormTestTab();\n\n\t\tControl cellPanel = buildCellTestTab();\n\t\t\n\t\tTabPanel tabbedPane = new TabPanel();\n\t\ttabbedPane.add(\"Form Test\", formPanel);\n\t\ttabbedPane.add(\"Cell Layout Test\", cellPanel);\n\n\t\tstage.setContent(tabbedPane);\n\t}", "private void initUI() {\n\t\tfileInputPanel.setLayout(new GridBagLayout());\n\n\t\tGridBagConstraints gridBagConstraints = new GridBagConstraints();\n\t\tgridBagConstraints.insets = new Insets(10, 5, 10, 5);\n\t\tgridBagConstraints.anchor = GridBagConstraints.NORTH;\n\t\tgridBagConstraints.gridwidth = 2;\n\n\t\tJLabel title = new JLabel(\"Welcome to ANNie\");\n\t\ttitle.setFont(new Font(\"Serif\", Font.BOLD, 36));\n\n\t\tfileInputPanel.add(title, gridBagConstraints);\n\n\t\tgridBagConstraints.gridwidth = 1;\n\t\tgridBagConstraints.insets = new Insets(10, 5, 10, 5);\n\n\t\tfileInputPanel.setBorder(BorderFactory.createLineBorder(Color.black));\n\n\t\tcreateFileDropdownArea(gridBagConstraints);\n\t\tcreateLabelSelectArea(gridBagConstraints);\n\t\tcreateButtons(gridBagConstraints);\n\t}", "private void init() {\n try {\n renderer = new TableNameRenderer(tableHome);\n if (listId != null) {\n model = new DefaultComboBoxModel(listId);\n }\n else {\n Object[] idList = renderer.getTableIdList(step, extraTableRef);\n model = new DefaultComboBoxModel(idList);\n }\n setRenderer(renderer);\n setModel(model);\n }\n catch (PersistenceException ex) {\n ex.printStackTrace();\n }\n }", "@Override\n\tpublic void initialize(URL arg0, ResourceBundle arg1) {\n\n\t\ttab_01.setText(\"授業\");\n\t\ttab_01.addEventHandler(MouseEvent.ANY, tab01Handler);\n\t\ttab_02.setText(\"テスト\");\n\t\ttab_02.addEventHandler(MouseEvent.ANY, tab02Handler);\n\t\ttab_03.setText(\"バス時刻表\");\n\t\ttab_03.addEventHandler(MouseEvent.ANY, tab03Handler);\n\t\ttab_04.setText(\"学内地図\");\n\t\ttab_04.addEventHandler(MouseEvent.ANY, tab04Handler);\n\t\ttab_05.setText(\"自習室\");\n\t\ttab_05.addEventHandler(MouseEvent.ANY, tab05Handler);\n\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\tSystem.out.println(\"main_clock:height = \" + main_clock.getHeight()\n\t\t\t\t+ \", width = \" + main_clock.getWidth());\n\t\tmain_clock.getChildren().add(\n\t\t\t\tnew MainClock());\n\t\tmain_logo.getChildren().add(\n\t\t\t\tnew ImageView(new Image(getClass().getClassLoader()\n\t\t\t\t\t\t.getResourceAsStream(\"mainlayout/ohit101.gif\"), main_logo\n\t\t\t\t\t\t.getHeight(), main_logo.getWidth(), true, true)));\n\n\t}", "private void initialize() {\r\n\t\tthis.setBounds(new Rectangle(0, 0, 670, 576));\r\n\t\tthis.setResizable(false);\r\n\t\tthis.setTitle(\"数据入库 \");\r\n\t\tthis.setLocationRelativeTo(getOwner());\r\n\t\tthis.setContentPane(getJContentPane());\r\n\t}", "public void initialize() {\n sceneSwitch = SceneSwitch.getInstance();\n sceneSwitch.addScene(addPartToJobStackPane, NavigationModel.ADD_PART_TO_JOB_ID);\n usernameLbl.setText(DBLogic.getDBInstance().getUsername());\n usertypeLbl.setText(DBLogic.getDBInstance().getUser_type());\n jobReference = jobReference.getInstance();\n partHashMap = new HashMap<>();\n refreshList();\n }", "private void configure_tabs() {\n Objects.requireNonNull(tabs.getTabAt(0)).setIcon(R.drawable.baseline_map_white_24);\n Objects.requireNonNull(Objects.requireNonNull(tabs.getTabAt(0)).getIcon()).setColorFilter(getResources().getColor(R.color.colorIconSelected), PorterDuff.Mode.SRC_IN);\n Objects.requireNonNull(tabs.getTabAt(1)).setIcon(R.drawable.baseline_view_list_white_24);\n Objects.requireNonNull(Objects.requireNonNull(tabs.getTabAt(1)).getIcon()).setColorFilter(getResources().getColor(R.color.colorIconNotSelected), PorterDuff.Mode.SRC_IN);\n Objects.requireNonNull(tabs.getTabAt(2)).setIcon(R.drawable.baseline_people_white_24);\n Objects.requireNonNull(Objects.requireNonNull(tabs.getTabAt(2)).getIcon()).setColorFilter(getResources().getColor(R.color.colorIconNotSelected), PorterDuff.Mode.SRC_IN);\n swipeRefreshLayout.setEnabled(false);\n\n // Set on Tab selected listener\n tabs.addOnTabSelectedListener(new TabLayout.OnTabSelectedListener() {\n @Override\n public void onTabSelected(TabLayout.Tab tab) {\n // Change color of the tab -> orange\n if (tab.getIcon() != null)\n tab.getIcon().setColorFilter(getApplicationContext().getResources().getColor(R.color.colorIconSelected), PorterDuff.Mode.SRC_IN);\n\n // set the current page position\n current_page = tab.getPosition();\n\n // if the current page is the ListMatesFragment, remove the searchView\n if(mToolbar_navig_utils!=null){\n if(current_page==2)\n mToolbar_navig_utils.getSearchView().setVisibility(View.GONE);\n else\n mToolbar_navig_utils.getSearchView().setVisibility(View.VISIBLE);\n }\n\n // refresh title toolbar (different according to the page selected)\n if(mToolbar_navig_utils !=null)\n mToolbar_navig_utils.refresh_text_toolbar();\n\n // Disable pull to refresh when mapView is displayed\n if(tab.getPosition()==0)\n swipeRefreshLayout.setEnabled(false);\n else\n swipeRefreshLayout.setEnabled(true);\n }\n\n @Override\n public void onTabUnselected(TabLayout.Tab tab) {\n\n // if the searchView is opened, close it\n if(mToolbar_navig_utils !=null) {\n if (mToolbar_navig_utils.getSearchView() != null) {\n if (!mToolbar_navig_utils.getSearchView().isIconified()) {\n mToolbar_navig_utils.getSearchView().setIconified(true);\n\n // Recover the previous list of places nearby generated\n switch (current_page) {\n case 0:\n getPageAdapter().getMapsFragment().recover_previous_state();\n break;\n case 1:\n getPageAdapter().getListRestoFragment().recover_previous_state();\n break;\n }\n }\n }\n }\n\n // Change color of the tab -> black\n if (tab.getIcon() != null)\n tab.getIcon().setColorFilter(getApplicationContext().getResources().getColor(R.color.colorIconNotSelected), PorterDuff.Mode.SRC_IN);\n }\n\n @Override\n public void onTabReselected(TabLayout.Tab tab) {\n }\n });\n }", "private void createTab() {\n tab = new char[tabSize];\n for (int i = 0; i < tabSize; i++) {\n tab[i] = tabChar;\n }\n }", "public void setUpFileMenu() {\n add(fileMenu);\n fileMenu.add(new OpenAction(parent));\n fileMenu.add(new SaveAction(parent));\n fileMenu.add(new SaveAsAction(parent));\n fileMenu.addSeparator();\n fileMenu.add(new ShowWorldPrefsAction(parent.getWorldPanel()));\n fileMenu.add(new CloseAction(parent.getWorkspaceComponent()));\n }", "private void setupLayoutManager() {\n\n setLayout(new BorderLayout());\n add(directoryChooserPanel, BorderLayout.NORTH);\n add(splitPane, BorderLayout.CENTER);\n\n }", "private void initComponents() {\n tabbedPane = new javax.swing.JTabbedPane();\n statusLabel = new javax.swing.JLabel();\n\n statusLabel.setText(\" \");\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(12, 12, 12)\n .addComponent(tabbedPane, javax.swing.GroupLayout.DEFAULT_SIZE, 376, Short.MAX_VALUE))\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(statusLabel, javax.swing.GroupLayout.DEFAULT_SIZE, 376, Short.MAX_VALUE)))\n .addContainerGap())\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(tabbedPane, javax.swing.GroupLayout.DEFAULT_SIZE, 267, Short.MAX_VALUE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(statusLabel))\n );\n }", "private void initialize() {\r\n\r\n // set up EmployeeGUI JPanel\r\n setLayout(new BorderLayout());\r\n setBorder(BorderFactory.createLineBorder(Color.BLACK, 1));\r\n // setBackground(MainGUI.backgroundColor);\r\n\r\n initializeLogInPanel();\r\n\r\n // ** initialize JTabbedPane **\r\n tabbedPane = new JTabbedPane();\r\n tabbedPane.setBackground(MainGUI.backgroundColor);\r\n tabbedPane.setForeground(MainGUI.fontColor);\r\n\r\n initializeAppointmentsTab();\r\n initializePatientInfoTab();\r\n initializeBillingTab();\r\n initializeSearchTab();\r\n initializeCalendarTab();\r\n\r\n // NEW JDialogs\r\n initializePaymentDialog();\r\n initializeSelectPatientDialog();\r\n\r\n // add panels to tabbed pane\r\n tabbedPane.add(\"Search\", searchTab);\r\n tabbedPane.add(\"Patient Information\", patientTab);\r\n tabbedPane.add(\"Appointments\", appTab);\r\n tabbedPane.add(\"Billing\", billingTab);\r\n tabbedPane.add(\"Calendar\", calTab);\r\n\r\n // set up login panel - what is shown first to Employee\r\n add(loginPanel, BorderLayout.CENTER);\r\n\r\n validate();\r\n\r\n // ALL ACTION LISTENERS\r\n\r\n // Login Listeners\r\n loginButton.addActionListener(e -> login());\r\n\r\n // Appointments Tab listeners\r\n app_requestAppointmentButton.addActionListener(e -> app_requestAppointment());\r\n app_lookUpAppointmentButton.addActionListener(e -> app_lookUpAppointment());\r\n app_cancelAppointmentButton.addActionListener(e -> app_cancelAppointment());\r\n\r\n // Patient Info Tab Listeners\r\n pInfo_submitNewInfoButton.addActionListener(e -> pInfo_createNew());\r\n pInfo_updateInfoButton.addActionListener(e -> pInfo_updateExisting());\r\n\r\n // Billing Tab Listeners\r\n billing_calculateButton.addActionListener(e -> billing_calculate());\r\n\r\n // SearchTab Listeners\r\n search_searchButton.addActionListener(e -> searchPatient());\r\n selectPatient_selectPatientFoundButton.addActionListener(e -> search_selectPatientToDisplay());\r\n\r\n // Calendar Tab Listeners\r\n cal_chooseDateButton.addActionListener(e -> search_date());\r\n\r\n // Payment Dialog Listeners\r\n payment_payButton.addActionListener(e -> payment_pay());\r\n\r\n }", "private void initView() {\n List<Fragment> fragmentList = new ArrayList<>();\n fragmentList.add(new FourthFragment());\n fragmentList.add(new FifthFragment(imagePath));\n// set titles\n List<String> title = new ArrayList<>();\n title.add(\"第一页\");\n title.add(\"第二页\");\n// set the adapter\n viewPager.setAdapter(new FragmentPagerAdapter(getChildFragmentManager()) {\n @NonNull\n @NotNull\n @Override\n public Fragment getItem(int position) {\n return fragmentList.get(position);\n }\n\n @Override\n public int getCount() {\n return fragmentList.size();\n }\n\n @Nullable\n @org.jetbrains.annotations.Nullable\n @Override\n public CharSequence getPageTitle(int position) {\n return title.get(position);\n }\n });\n tabLayout.setupWithViewPager(viewPager);\n }" ]
[ "0.7480498", "0.70132715", "0.6877827", "0.67551154", "0.6653755", "0.6606948", "0.6538462", "0.6513692", "0.6430507", "0.6427663", "0.6421947", "0.63708234", "0.6297996", "0.62591463", "0.6232386", "0.62270886", "0.6205204", "0.6190781", "0.6131854", "0.61165786", "0.61042583", "0.6098898", "0.6057173", "0.604664", "0.6045932", "0.6031858", "0.6027841", "0.6008153", "0.59750056", "0.5957414", "0.59511644", "0.5935002", "0.59262794", "0.5922551", "0.5910894", "0.5909383", "0.5905084", "0.5883323", "0.58707476", "0.58632123", "0.58458734", "0.584483", "0.5843869", "0.5841504", "0.58400625", "0.5830327", "0.5829395", "0.5811124", "0.58083427", "0.5798925", "0.5765286", "0.5764039", "0.5762755", "0.57541347", "0.57486326", "0.5736907", "0.5735567", "0.57334894", "0.5730323", "0.57293445", "0.57280964", "0.5705856", "0.57045", "0.57029176", "0.57001036", "0.5686759", "0.5684639", "0.56837064", "0.5672871", "0.5646476", "0.56367916", "0.5634064", "0.5633533", "0.56281936", "0.5623283", "0.56162894", "0.5610217", "0.5610186", "0.5608672", "0.56039643", "0.55807793", "0.557934", "0.5566195", "0.5565721", "0.5554017", "0.5551549", "0.5549626", "0.55381054", "0.55295765", "0.5526035", "0.5525536", "0.5519493", "0.55145705", "0.55066425", "0.55005664", "0.54996264", "0.5498129", "0.54951006", "0.5494259", "0.5493874" ]
0.78748375
0
This method initializes compositeRoomMange
public void createCompositeRoomMange() { compositeRoomMange = new Composite(tabFolder, SWT.V_SCROLL); compositeRoomMange.setLayout(null); compositeRoomMange.setSize(new Point(500, 340)); tableRoom = new Table(compositeRoomMange, SWT.NONE); tableRoom.setHeaderVisible(true); tableRoom.setLocation(new Point(5, 5)); tableRoom.setLinesVisible(true); tableRoom.setSize(new Point(540, 330)); tableViewer = new TableViewer(tableRoom); TableColumn tableColumn = new TableColumn(tableRoom, SWT.NONE); tableColumn.setWidth(60); tableColumn.setText("房间编号"); TableColumn tableColumn1 = new TableColumn(tableRoom, SWT.NONE); tableColumn1.setWidth(60); tableColumn1.setText("房间类型"); TableColumn tableColumn2 = new TableColumn(tableRoom, SWT.NONE); tableColumn2.setWidth(60); tableColumn2.setText("容纳人数"); TableColumn tableColumn3 = new TableColumn(tableRoom, SWT.NONE); tableColumn3.setWidth(60); tableColumn3.setText("包房单价"); TableColumn tableColumn4 = new TableColumn(tableRoom, SWT.NONE); tableColumn4.setWidth(200); tableColumn4.setText("房间评价"); buttonAddRoom = new Button(compositeRoomMange, SWT.NONE); buttonAddRoom.setBounds(new Rectangle(79, 382, 81, 27)); buttonAddRoom.setText("增加房间"); buttonAddRoom .addSelectionListener(new org.eclipse.swt.events.SelectionAdapter() { public void widgetSelected(org.eclipse.swt.events.SelectionEvent e) { //RoomAddWizard roomAddWizard=new RoomAddWizard(); //WizardDialog wDialog=new WizardDialog(sShell,roomAddWizard); RoomAdd ra=new RoomAdd(); ra.getsShell().open(); sShell.setMinimized(true); /*if(ra.flag){ newRoom=ra.getRoom(); tableViewer.add(SystemManageShell.newRoom); }*/ } } ); buttonDeleteRoom = new Button(compositeRoomMange, SWT.NONE); buttonDeleteRoom.setBounds(new Rectangle(324, 381, 96, 27)); buttonDeleteRoom.setText("删除房间"); buttonDeleteRoom .addSelectionListener(new org.eclipse.swt.events.SelectionAdapter() { public void widgetSelected(org.eclipse.swt.events.SelectionEvent e) { int deleteIndex=tableRoom.getSelectionIndex(); Room roomToDel=(Room)tableRoom.getItem(deleteIndex).getData(); tableViewer.remove(roomToDel); RoomFactory.deleteDB(roomToDel); } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void createRooms()//refactored\n {\n currentRoom = RoomCreator.buildCurrentRooms();//new\n }", "public Room() {\r\n\t\troomObjects = new ArrayList<GameObject>();\r\n\t\troom_listener = new RoomListener();\r\n\t\tlisteners = new ListenerContainer(room_listener);\r\n\t}", "public void initRooms(Room room) {\n rooms.add(room);\n internalList.add(room);\n }", "public Room() {\n roomDisplayArray = new String[roomHeight][roomWidth];\n }", "public MyRoom() {\r\n }", "protected void setRoom() {\n\t\tfor(int x = 0; x < xSize; x++) {\n\t\t\tfor (int y = 0; y < ySize; y++) {\n\t\t\t\tif (WALL_GRID[y][x] == 1) {\n\t\t\t\t\tlevelSetup[x][y] = new SimpleRoom();\n\t\t\t\t} else{\n\t\t\t\t\tlevelSetup[x][y] = new ForbiddenRoom();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\n\t\t// put special rooms\n\t\tlevelSetup[6][0] = new RoomWithLockedDoor();\n\t\tlevelSetup[2][6] = new FragileRoom();\n\n\t}", "public Room() {\n\n\t}", "private void setRooms() {\r\n\t\tAccountBean bean = new AccountBean();\r\n\t\tbean.setCf(Session.getSession().getCurrUser().getAccount().getCf());\r\n\t\tRoomController ctrl = RoomController.getInstance();\r\n\t\t\r\n\t\ttry {\r\n\t\t\tthis.myRooms=FXCollections.observableArrayList(ctrl.getMyRooms(bean));\r\n\t\t}\r\n\t\tcatch (DatabaseException ex1) {\r\n\t\t\tJOptionPane.showMessageDialog(null,ex1.getMessage(),ERROR, JOptionPane.ERROR_MESSAGE);\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t}", "public Room() {\n }", "private static void createRooms() {\n// Room airport, beach, jungle, mountain, cave, camp, raft, seaBottom;\n\n airport = new Room(\"airport\");\n beach = new Room(\"beach\");\n jungle = new Room(\"jungle\");\n mountain = new Room(\"mountain\");\n cave = new Room(\"cave\");\n camp = new Room(\"camp\");\n seaBottom = new Room(\"seabottom\");\n\n //Setting the the exits in different rooms\n beach.setExit(\"north\", jungle);\n beach.setExit(\"south\", seaBottom);\n beach.setExit(\"west\", camp);\n\n jungle.setExit(\"north\", mountain);\n jungle.setExit(\"east\", cave);\n jungle.setExit(\"south\", beach);\n\n mountain.setExit(\"south\", jungle);\n\n cave.setExit(\"west\", jungle);\n\n camp.setExit(\"east\", beach);\n\n seaBottom.setExit(\"north\", beach);\n\n // Starting room\n currentRoom = airport;\n }", "public void populateRooms(){\n }", "public ViewRoom(Room r) {\n initComponents();\n this.room = r;\n this.workoutNum = 0;\n updateRoom();\n \n }", "public Room() {\n\t\twall=\"\";\n\t\tfloor=\"\";\n\t\twindows=0;\n\t}", "private void setupRooms() {\n\t\tthis.listOfCoordinates = new ArrayList<Coordinates>();\r\n\t\tthis.rooms = new HashMap<String,Room>();\r\n\t\t\r\n\t\tArrayList<Coordinates> spaEntrances = new ArrayList<Coordinates>();\r\n\t\tspaEntrances.add(grid[5][6].getCoord());\r\n\r\n\t\tArrayList<Coordinates> theatreEntrances = new ArrayList<Coordinates>();\r\n\t\ttheatreEntrances.add(grid[13][2].getCoord());\r\n\t\ttheatreEntrances.add(grid[10][8].getCoord());\r\n\r\n\t\tArrayList<Coordinates> livingRoomEntrances = new ArrayList<Coordinates>();\r\n\t\tlivingRoomEntrances.add(grid[13][5].getCoord());\r\n\t\tlivingRoomEntrances.add(grid[16][9].getCoord());\r\n\r\n\t\tArrayList<Coordinates> observatoryEntrances = new ArrayList<Coordinates>();\r\n\t\tobservatoryEntrances.add(grid[21][8].getCoord());\r\n\r\n\t\tArrayList<Coordinates> patioEntrances = new ArrayList<Coordinates>();\r\n\t\tpatioEntrances.add(grid[5][10].getCoord());\r\n\t\tpatioEntrances.add(grid[8][12].getCoord());\r\n\t\tpatioEntrances.add(grid[8][16].getCoord());\r\n\t\tpatioEntrances.add(grid[5][18].getCoord());\r\n\r\n\t\t// ...\r\n\t\tArrayList<Coordinates> poolEntrances = new ArrayList<Coordinates>();\r\n\t\tpoolEntrances.add(grid[10][17].getCoord());\r\n\t\tpoolEntrances.add(grid[17][17].getCoord());\r\n\t\tpoolEntrances.add(grid[14][10].getCoord());\r\n\r\n\t\tArrayList<Coordinates> hallEntrances = new ArrayList<Coordinates>();\r\n\t\thallEntrances.add(grid[22][10].getCoord());\r\n\t\thallEntrances.add(grid[18][13].getCoord());\r\n\t\thallEntrances.add(grid[18][14].getCoord());\r\n\r\n\t\tArrayList<Coordinates> kitchenEntrances = new ArrayList<Coordinates>();\r\n\t\tkitchenEntrances.add(grid[6][21].getCoord());\r\n\r\n\t\tArrayList<Coordinates> diningRoomEntrances = new ArrayList<Coordinates>();\r\n\t\tdiningRoomEntrances.add(grid[12][18].getCoord());\r\n\t\tdiningRoomEntrances.add(grid[16][21].getCoord());\r\n\r\n\t\tArrayList<Coordinates> guestHouseEntrances = new ArrayList<Coordinates>();\r\n\t\tguestHouseEntrances.add(grid[20][20].getCoord());\r\n\r\n\t\t// setup entrances map\r\n\t\tthis.roomEntrances = new HashMap<Coordinates, Room>();\r\n\t\tfor (LocationCard lc : this.listOfLocationCard) {\r\n\t\t\tString name = lc.getName();\r\n\t\t\tRoom r;\r\n\t\t\tif (name.equals(\"Spa\")) {\r\n\t\t\t\tr = new Room(name, lc, spaEntrances);\r\n\t\t\t\tthis.rooms.put(name, r);\r\n\t\t\t\tfor (Coordinates c : spaEntrances) {\r\n\t\t\t\t\tthis.roomEntrances.put(c, r);\r\n\t\t\t\t\tthis.listOfCoordinates.add(c);\r\n\t\t\t\t}\r\n\t\t\t} else if (name.equals(\"Theatre\")) {\r\n\t\t\t\tr = new Room(name, lc,theatreEntrances);\r\n\t\t\t\tthis.rooms.put(name, r);\r\n\t\t\t\tfor (Coordinates c : theatreEntrances) {\r\n\t\t\t\t\tthis.roomEntrances.put(c, r);\r\n\t\t\t\t\tthis.listOfCoordinates.add(c);\r\n\t\t\t\t}\r\n\t\t\t} else if (name.equals(\"LivingRoom\")) {\r\n\t\t\t\tr = new Room(name, lc,livingRoomEntrances);\r\n\t\t\t\tthis.rooms.put(name, r);\r\n\t\t\t\tfor (Coordinates c : livingRoomEntrances) {\r\n\t\t\t\t\tthis.roomEntrances.put(c, r);\r\n\t\t\t\t\tthis.listOfCoordinates.add(c);\r\n\t\t\t\t}\r\n\t\t\t} else if (name.equals(\"Observatory\")) {\r\n\t\t\t\tr = new Room(name, lc,observatoryEntrances);\r\n\t\t\t\tthis.rooms.put(name, r);\r\n\t\t\t\tfor (Coordinates c : observatoryEntrances) {\r\n\t\t\t\t\tthis.roomEntrances.put(c, r);\r\n\t\t\t\t\tthis.listOfCoordinates.add(c);\r\n\t\t\t\t}\r\n\t\t\t} else if (name.equals(\"Patio\")) {\r\n\t\t\t\tr = new Room(name,lc, patioEntrances);\r\n\t\t\t\tthis.rooms.put(name, r);\r\n\t\t\t\tfor (Coordinates c : patioEntrances) {\r\n\t\t\t\t\tthis.roomEntrances.put(c, r);\r\n\t\t\t\t\tthis.listOfCoordinates.add(c);\r\n\t\t\t\t}\r\n\t\t\t} else if (name.equals(\"Pool\")) {\r\n\t\t\t\tr = new Room(name,lc,poolEntrances);\r\n\t\t\t\tthis.rooms.put(name, r);\r\n\t\t\t\tfor (Coordinates c : poolEntrances) {\r\n\t\t\t\t\tthis.roomEntrances.put(c, r);\r\n\t\t\t\t\tthis.listOfCoordinates.add(c);\r\n\t\t\t\t}\r\n\t\t\t} else if (name.equals(\"Hall\")) {\r\n\t\t\t\tr = new Room(name, lc,hallEntrances);\r\n\t\t\t\tthis.rooms.put(name, r);\r\n\t\t\t\tfor (Coordinates c : hallEntrances) {\r\n\t\t\t\t\tthis.roomEntrances.put(c, r);\r\n\t\t\t\t\tthis.listOfCoordinates.add(c);\r\n\t\t\t\t}\r\n\t\t\t} else if (name.equals(\"Kitchen\")) {\r\n\t\t\t\tr = new Room(name, lc,kitchenEntrances);\r\n\t\t\t\tthis.rooms.put(name, r);\r\n\t\t\t\tfor (Coordinates c : kitchenEntrances) {\r\n\t\t\t\t\tthis.roomEntrances.put(c, r);\r\n\t\t\t\t\tthis.listOfCoordinates.add(c);\r\n\t\t\t\t}\r\n\t\t\t} else if (name.equals(\"DiningRoom\")) {\r\n\t\t\t\tr = new Room(name, lc,diningRoomEntrances);\r\n\t\t\t\tthis.rooms.put(name, r);\r\n\t\t\t\tfor (Coordinates c : diningRoomEntrances) {\r\n\t\t\t\t\tthis.roomEntrances.put(c, r);\r\n\t\t\t\t\tthis.listOfCoordinates.add(c);\r\n\t\t\t\t}\r\n\t\t\t} else if (name.equals(\"GuestHouse\")) {\r\n\t\t\t\tr = new Room(name, lc,guestHouseEntrances);\r\n\t\t\t\tthis.rooms.put(name, r);\r\n\t\t\t\tfor (Coordinates c : guestHouseEntrances) {\r\n\t\t\t\t\tthis.roomEntrances.put(c, r);\r\n\t\t\t\t\tthis.listOfCoordinates.add(c);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "ItcRoom()\r\n\t {\t }", "public EventRoomBuilder(int capacity){\r\n itemFactory = new ItemFactory();\r\n newRoom = new EventRoom(capacity);\r\n eventRoomItems = new EventRoomItems();\r\n }", "public Room() {\n this(\"room\", null);\n }", "public Room(int roomNumber) \n\t{\n\t\tthis.roomNumber=roomNumber;\n\t}", "public void generateRooms(){ //TODO it's public just for testing\n rooms = new ArrayList<>();\n for(Color color : roomsToBuild)\n rooms.add(new Room(color));\n }", "public void initRooms(int numOfRooms) {\n this.numOfRooms = numOfRooms;\n initRooms();\n }", "private void populateRooms(){\n\n for(int i = 0; i<squares.size(); i++){\n for(int j = 0; j<squares.get(i).size(); j++){\n if(squares.get(i).get(j) != null) {\n getRoom(squares.get(i).get(j).getColor()).addSquare(squares.get(i).get(j));\n squares.get(i).get(j).setRoom(getRoom(squares.get(i).get(j).getColor()));\n\n }\n }\n }\n }", "public void initialiseRoomTransition() {\n game.gameSnapshot.setAllUnlocked();\n roomTransition = true;\n }", "private void createRooms()\n {\n Room outside, theatre, pub, lab, office , hallway, backyard,chickenshop;\n \n // create the rooms\n outside = new Room(\"outside the main entrance of the university\");\n theatre = new Room(\"in a lecture theatre\");\n pub = new Room(\"in the campus pub\");\n lab = new Room(\"in a computing lab\");\n office = new Room(\"in the computing admin office\");\n hallway=new Room (\"in the hallway of the university\");\n backyard= new Room( \"in the backyard of the university\");\n chickenshop= new Room(\"in the chicken shop\");\n \n \n \n // initialise room exits\n outside.setExit(\"east\", theatre);\n outside.setExit(\"south\", lab);\n outside.setExit(\"west\", pub);\n\n theatre.setExit(\"west\", outside);\n theatre.setExit(\"north\", backyard);\n\n pub.setExit(\"east\", outside);\n\n lab.setExit(\"north\", outside);\n lab.setExit(\"east\", office);\n \n office.setExit(\"south\", hallway);\n office.setExit(\"west\", lab);\n \n chickenshop.setExit(\"west\", lab);\n\n currentRoom = outside; // start game outside\n \n }", "private void createCompositeStaffMange() {\r\n\t\tGridData gridData2 = new GridData();\r\n\t\tgridData2.horizontalSpan = 14;\r\n\t\tgridData2.heightHint = 300;\r\n\t\tgridData2.widthHint = 500;\r\n\t\tgridData2.grabExcessHorizontalSpace = true;\r\n\t\tGridData gridData8 = new GridData();\r\n\t\tgridData8.widthHint = 100;\r\n\t\tGridLayout gridLayout1 = new GridLayout();\r\n\t\tgridLayout1.numColumns = 18;\r\n\t\tcompositeStaffMange = new Composite(tabFolder, SWT.NONE);\r\n\t\tcompositeStaffMange.setLayout(gridLayout1);\r\n\t\ttextAreaStaff = new Text(compositeStaffMange, SWT.MULTI | SWT.WRAP | SWT.V_SCROLL);\r\n\t\ttextAreaStaff.setLayoutData(gridData2);\r\n\t\tlabel2 = new Label(compositeStaffMange, SWT.NONE);\r\n\t\tlabel2.setText(\"\");\r\n\t\tlabel3 = new Label(compositeStaffMange, SWT.NONE);\r\n\t\tlabel3.setText(\"\");\r\n\t\tlabel3.setLayoutData(gridData8);\r\n\t\tlabel4 = new Label(compositeStaffMange, SWT.NONE);\r\n\t\tlabel4.setText(\"\");\r\n\t\tLabel filler = new Label(compositeStaffMange, SWT.NONE);\r\n\t\ttableViewer.setContentProvider(new IStructuredContentProvider(){\r\n\r\n\t\t\tpublic Object[] getElements(Object arg0) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\tRoomFactory roomFactory=(RoomFactory)arg0;\r\n\t\t\t\treturn roomFactory.getRoomList().toArray();\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t}\r\n\r\n\t\t\tpublic void dispose() {\r\n\t\t\t}\r\n\r\n\t\t\tpublic void inputChanged(Viewer arg0, Object arg1, Object arg2) {\r\n\t\t\t}});\r\n\t\t\t\ttableViewer.setInput(new RoomFactory());\r\n\t\t\t\ttableViewer.setLabelProvider(new ITableLabelProvider(){\r\n\r\n\t\t\tpublic Image getColumnImage(Object arg0, int arg1) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\treturn null;\r\n\t\t\t\t\r\n\t\t\t}\r\n\r\n\t\t\tpublic String getColumnText(Object arg0, int arg1) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\tRoom room=(Room)arg0;\r\n\t\t\t\tCommonADO ado=CommonADO.getCommonADO();\r\n\t\t\t\tString roomInfoQueryStr=\"select * from RoomType where Type='\"+room.getType()+\"'\";\r\n\t\t\t\tResultSet rs;\r\n\t\t\t\trs=ado.executeSelect(roomInfoQueryStr);\r\n\t\t\t\tint peopleNum=0;\r\n\t\t\t\tfloat price=0;\r\n\t\t\t\ttry {\r\n\t\t\t\t\tif(rs.next()){\r\n\t\t\t\t\t\tpeopleNum=rs.getInt(\"PeopleNums\");\r\n\t\t\t\t\t\tprice=rs.getFloat(\"Price\");\r\n\t\t\t\t\t}\r\n\t\t\t\t} catch (SQLException e) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t\tif(arg1==0)\r\n\t\t\t\t\treturn room.getRoomNo();\r\n\t\t\t\tif(arg1==1)\r\n\t\t\t\t\treturn room.getType();\r\n\t\t\t\t\r\n\t\t\t\tif(arg1==2)\r\n\t\t\t\t\treturn peopleNum+\"\";\r\n\t\t\t\tif(arg1==3)\r\n\t\t\t\t\treturn price+\"\";\r\n\t\t\t\tif(arg1==4)\r\n\t\t\t\t\treturn room.getRemarks();\r\n\t\t\t\tSystem.out.println(room.getType()+room.getState()+room.getRoomNo());\r\n\t\t\t\treturn null;\r\n\t\t\t\t\r\n\t\t\t}\r\n\r\n\t\t\tpublic void addListener(ILabelProviderListener arg0) {\r\n\t\t\t}\r\n\r\n\t\t\tpublic void dispose() {\r\n\t\t\t}\r\n\r\n\t\t\tpublic boolean isLabelProperty(Object arg0, String arg1) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\treturn false;\r\n\t\t\t\t\r\n\t\t\t}\r\n\r\n\t\t\tpublic void removeListener(ILabelProviderListener arg0) {\r\n\t\t\t}});\r\n\t\tbuttonAddStaff = new Button(compositeStaffMange, SWT.NONE);\r\n\t\tbuttonAddStaff.setText(\"新增员工\");\r\n\t\tbuttonAddStaff.addSelectionListener(new SelectionListener() {\r\n\t\t\t\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent arg0) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\tInputDialog id1=new InputDialog(sShell,\"新增员工\",\"输入员工信息,用空格分开,例如:001 Manager Tommy f 312039\",\"\",null);\r\n\t\t\t\tif(id1.open()==0){\r\n\t\t\t\t\tinput=id1.getValue();\r\n\t\t\t\t\tif(input.equals(\"\")) return;\r\n\t\t\t\t}\r\n\t\t\t\telse return;\r\n\t\t\t\tString str[]=input.split(\" \");\r\n\t\t\t\tCommonADO ado=CommonADO.getCommonADO();\r\n\t\t\t\tString sql=\"insert into Staff values('\"+str[0]+\"','\"+str[1]+\"','\"+str[2]+\"','\"+str[3]+\"','\"+str[4]+\"')\";\r\n\t\t\t\tado.executeUpdate(sql);\r\n\t\t\t\tshowStaff();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetDefaultSelected(SelectionEvent arg0) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t});\r\n\t\tLabel filler7 = new Label(compositeStaffMange, SWT.NONE);\r\n\t\tLabel filler4 = new Label(compositeStaffMange, SWT.NONE);\r\n\t\tLabel filler1 = new Label(compositeStaffMange, SWT.NONE);\r\n\t\tbuttonDeleteStaff = new Button(compositeStaffMange, SWT.NONE);\r\n\t\tbuttonDeleteStaff.setText(\"删除员工\");\r\n\t\tbuttonDeleteStaff.addSelectionListener(new SelectionListener() {\r\n\t\t\t\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent arg0) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\tInputDialog id1=new InputDialog(sShell,\"删除员工\",\"输入员工编号\",\"\",null);\r\n\t\t\t\tif(id1.open()==0){\r\n\t\t\t\t\tinput=id1.getValue();\r\n\t\t\t\t\tif(input.equals(\"\")) return;\r\n\t\t\t\t}\r\n\t\t\t\telse return;\r\n\t\t\t\t\r\n\t\t\t\tCommonADO ado=CommonADO.getCommonADO();\r\n\t\t\t\tString sql=\"delete from Staff where StaffNo='\"+input+\"'\";\r\n\t\t\t\tado.executeUpdate(sql);\r\n\t\t\t\tshowStaff();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetDefaultSelected(SelectionEvent arg0) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t});\r\n\t\tshowStaff();\r\n\t}", "private Room createRooms(){\n Room inicio, pasilloCeldas, celdaVacia1,celdaVacia2, pasilloExterior,vestuarioGuardias, \n comedorReclusos,enfermeria,ventanaAbierta,salidaEnfermeria,patioReclusos,tunelPatio,salidaPatio;\n\n Item mochila,medicamentos,comida,itemInutil,itemPesado;\n mochila = new Item(\"Mochila\",1,50,true,true);\n medicamentos = new Item(\"Medicamentos\",5,10,true,false);\n comida = new Item(\"Comida\",2,5,true,false);\n itemInutil = new Item(\"Inutil\",10,0,false,false);\n itemPesado = new Item(\"Pesas\",50,0,false,false);\n\n // create the rooms\n inicio = new Room(\"Tu celda de la prision\");\n pasilloCeldas = new Room(\"Pasillo donde se encuentan las celdas\");\n celdaVacia1 = new Room(\"Celda vacia enfrente de la tuya\");\n celdaVacia2 = new Room(\"Celda de tu compaņero, esta vacia\");\n pasilloExterior = new Room(\"Pasillo exterior separado de las celdas\");\n vestuarioGuardias = new Room(\"Vestuario de los guardias de la prision\");\n comedorReclusos = new Room(\"Comedor de reclusos\");\n enfermeria = new Room(\"Enfermeria de la prision\");\n ventanaAbierta = new Room(\"Saliente de ventana de la enfermeria\");\n salidaEnfermeria = new Room(\"Salida de la prision por la enfermeria\");\n patioReclusos = new Room(\"Patio exterior de los reclusos\");\n tunelPatio = new Room(\"Tunel escondido para escapar de la prision\");\n salidaPatio = new Room(\"Salida de la prision a traves del tunel del patio\");\n\n // initialise room items\n\n comedorReclusos.addItem(\"Comida\",comida);\n enfermeria.addItem(\"Medicamentos\",medicamentos);\n pasilloCeldas.addItem(\"Inutil\",itemInutil);\n patioReclusos.addItem(\"Pesas\",itemPesado);\n vestuarioGuardias.addItem(\"Mochila\",mochila);\n\n // initialise room exits\n\n inicio.setExits(\"east\", pasilloCeldas);\n pasilloCeldas.setExits(\"north\",pasilloExterior);\n pasilloCeldas.setExits(\"east\",celdaVacia1);\n pasilloCeldas.setExits(\"south\",patioReclusos);\n pasilloCeldas.setExits(\"west\",inicio);\n pasilloCeldas.setExits(\"suroeste\",celdaVacia2);\n celdaVacia1.setExits(\"west\", pasilloCeldas);\n pasilloExterior.setExits(\"north\",comedorReclusos);\n pasilloExterior.setExits(\"west\",enfermeria);\n pasilloExterior.setExits(\"east\",vestuarioGuardias);\n comedorReclusos.setExits(\"south\", pasilloExterior);\n enfermeria.setExits(\"east\",pasilloExterior);\n enfermeria.setExits(\"south\", ventanaAbierta);\n ventanaAbierta.setExits(\"north\",enfermeria);\n ventanaAbierta.setExits(\"south\", salidaEnfermeria);\n patioReclusos.setExits(\"north\", pasilloCeldas);\n patioReclusos.setExits(\"east\", tunelPatio);\n tunelPatio.setExits(\"east\",salidaPatio);\n tunelPatio.setExits(\"west\", patioReclusos);\n // casilla de salida\n\n return inicio;\n }", "public modGenRoomControl() {\r\n //construct MbModule\r\n super();\r\n roomObjects = new HashMap(32);\r\n gui = new GUI();\r\n //we depend on the RemoteControl-module\r\n addDependency(\"RemoteControl\");\r\n //we depend on the ARNE-module\r\n addDependency(\"ARNE\");\r\n //register our packet data handler\r\n setPacketDataHandler(new PacketDataHandler());\r\n //we have a html-interface, so lets register it\r\n setHTMLInterface(new HTMLInterface());\r\n }", "private void initTestBuildingWithRoomsAndWorkplaces() {\n\t\tinfoBuilding = dataHelper.createPersistedBuilding(\"50.20\", \"Informatik\", new ArrayList<Property>());\n\t\troom1 = dataHelper.createPersistedRoom(\"Seminarraum\", \"-101\", -1, Arrays.asList(new Property(\"WLAN\")));\n\n\t\tworkplace1 = dataHelper.createPersistedWorkplace(\"WP1\",\n\t\t\t\tArrays.asList(new Property(\"LAN\"), new Property(\"Lampe\")));\n\t\tworkplace2 = dataHelper.createPersistedWorkplace(\"WP2\", Arrays.asList(new Property(\"LAN\")));\n\n\t\troom1.addContainedFacility(workplace1);\n\t\troom1.addContainedFacility(workplace2);\n\n\t\tinfoBuilding.addContainedFacility(room1);\n\t}", "private static void performRoomManagement() {\n\t\t\r\n\t\t\r\n\r\n\t}", "private void createRooms()\n {\n Room a1, a2, a3, b1, b2, b3, c1, c2, c3, bridge, outskirts;\n \n // create the rooms\n a1= new Room(\"see a strong river flowing south to the west. The trees seem to be letting up a little to the north.\");\n a2 = new Room(\" are still in a very dense forest. Maybe the trees are clearing up the the north?\");\n a3 = new Room(\"see a 30 foot cliff looming over the forest to the east. No way you could climb that. Every other direction is full of trees.\");\n b1 = new Room(\"see a strong river flowing to the west. Heavily wooded areas are in all other directions.\");\n b2 = new Room(\"see only trees around you.\");\n b3 = new Room(\"see a 30 foot cliff to the east. There might be one spot that is climbable. Trees surround you every other way.\");\n c1 = new Room(\" see the river cuts east here, but there seems to be a small wooden bridge to the south over it. The trees are less the direction that the river flows.\");\n c2 = new Room(\"are on a peaceful riverbank. If you weren't lost, this might be a nice spot for a picnic.\");\n c3 = new Room(\"see a 30 foot cliff to your east and a strong flowing river to the south. Your options are definitely limited.\");\n outskirts = new Room(\"make your way out of the trees and find yourself in an open field.\");\n cliff = new Room(\"managed to climb up the rocks to the top of the cliff. Going down, doesn't look as easy. You have to almost be out though now!\");\n bridge = new Room(\"cross the bridge and find a small trail heading south!\");\n win = new Room(\" manage to spot a road not too far off! Congratulations on finding your way out of the woods! Have a safe ride home! :)\" );\n fail = new Room(\" are entirely lost. It is pitch black out and there is no way that you are getting out of here tonight. I'm sorry, you LOSE.\");\n \n // initialise room exits\n a1.setExit(\"north\", outskirts);\n a1.setExit(\"east\", a2);\n a1.setExit(\"south\", b1);\n \n a2.setExit(\"east\", a3);\n a2.setExit(\"west\", a1);\n a2.setExit(\"south\", b2);\n a2.setExit(\"north\", outskirts);\n \n a3.setExit(\"north\", outskirts);\n a3.setExit(\"west\", a2);\n a3.setExit(\"south\", b3);\n \n b1.setExit(\"north\", a1);\n b1.setExit(\"east\", b2);\n b1.setExit(\"south\", c1);\n \n b2.setExit(\"east\", b3);\n b2.setExit(\"west\", b1);\n b2.setExit(\"south\", c2);\n b2.setExit(\"north\", a2);\n \n b3.setExit(\"north\", a3);\n b3.setExit(\"west\", b2);\n b3.setExit(\"south\", c3);\n b3.setExit(\"up\", cliff);\n \n c1.setExit(\"north\", b1);\n c1.setExit(\"east\", c2);\n c1.setExit(\"south\" , bridge);\n \n c2.setExit(\"east\", c3);\n c2.setExit(\"west\", c1);\n c2.setExit(\"north\", b2);\n \n c3.setExit(\"west\", c2);\n c3.setExit(\"north\", b3);\n \n outskirts.setExit(\"north\", win);\n outskirts.setExit(\"east\", a3);\n outskirts.setExit(\"west\", a1);\n outskirts.setExit(\"south\", a2);\n \n cliff.setExit(\"north\", outskirts);\n cliff.setExit(\"east\", win);\n \n bridge.setExit(\"north\", c1);\n bridge.setExit(\"south\", win);\n \n c3.addItem(new Item (\"shiny stone\", 0.1));\n a1.addItem(new Item (\"sturdy branch\", 2));\n a3.addItem(new Item(\"water bottle\" , 0.5));\n a3.addItem(new Item(\"ripped backpack\" , 1));\n currentRoom = b2; // start game outside\n }", "@Override\n\tpublic void onRoomCreated(RoomData arg0) {\n\t\t\n\t}", "private void createAccess(ArrayList<Room> rooms) {\n\n rooms.get(0).setNorth(rooms.get(1));\n\n rooms.get(1).setEast(rooms.get(2));\n rooms.get(1).setWest(rooms.get(4));\n rooms.get(1).setSouth(rooms.get(0));\n\n rooms.get(2).setWest(rooms.get(1));\n rooms.get(2).setNorth(rooms.get(10));\n rooms.get(2).setEast(rooms.get(3));\n\n rooms.get(3).setWest(rooms.get(2));\n\n rooms.get(4).setWest(rooms.get(5));\n rooms.get(4).setNorth(rooms.get(8));\n rooms.get(4).setEast(rooms.get(1));\n\n rooms.get(5).setNorth(rooms.get(7));\n rooms.get(5).setSouth(rooms.get(6));\n rooms.get(5).setEast(rooms.get(4));\n\n rooms.get(6).setNorth(rooms.get(5));\n\n rooms.get(7).setNorth(rooms.get(13));\n rooms.get(7).setSouth(rooms.get(5));\n\n rooms.get(8).setEast(rooms.get(9));\n rooms.get(8).setSouth(rooms.get(4));\n\n rooms.get(9).setWest(rooms.get(8));\n rooms.get(9).setNorth(rooms.get(15));\n rooms.get(9).setEast(rooms.get(10));\n\n rooms.get(10).setWest(rooms.get(9));\n rooms.get(10).setEast(rooms.get(11));\n rooms.get(10).setSouth(rooms.get(2));\n\n rooms.get(11).setWest(rooms.get(10));\n\n rooms.get(12).setEast(rooms.get(13));\n\n rooms.get(13).setWest(rooms.get(12));\n rooms.get(13).setEast(rooms.get(14));\n rooms.get(13).setSouth(rooms.get(7));\n\n rooms.get(14).setWest(rooms.get(13));\n rooms.get(14).setNorth(rooms.get(18));\n rooms.get(14).setEast(rooms.get(15));\n\n rooms.get(15).setWest(rooms.get(14));\n rooms.get(15).setNorth(rooms.get(19));\n rooms.get(15).setEast(rooms.get(16));\n rooms.get(15).setSouth(rooms.get(9));\n\n rooms.get(16).setWest(rooms.get(15));\n rooms.get(16).setEast(rooms.get(17));\n\n rooms.get(17).setWest(rooms.get(16));\n\n rooms.get(18).setSouth(rooms.get(14));\n\n rooms.get(19).setSouth(rooms.get(13));\n\n }", "public void initialize() {\n\t\tcompartmentName = new SimpleStringProperty(compartment.getName());\t\t\n\t\tcompartmentId = new SimpleStringProperty(compartment.getId());\n\t\tcompartmentSBOTerm = new SimpleStringProperty(compartment.getSBOTermID());\n\t}", "public void createRoom(Rect room) {\n for(int x = room.x1 + 1; x < room.x2; x++) {\n for(int y = room.y1 + 1; y < room.y2; y++ ) {\n dungeon.map[x][y].blocked = false;\n dungeon.map[x][y].blockSight = false;\n }\n }\n }", "public ViewRoom(Customer cust,Room r, int wrkNum) {\n initComponents();\n this.room = r;\n this.workoutNum = wrkNum;\n customer = cust;\n updateRoom();\n \n }", "public void makeTestRoom() {\r\n\t\tthis.boardData = new BoardData();\r\n\t\tthis.boardData.loadLevelOne();\r\n\r\n\t\tif (boardData.getAllRooms().isEmpty()) {\r\n\t\t\tSystem.out.println(\"room list is empty\");\r\n\t\t} else if (boardData.getAllRooms().get(0).getRoomInventory().isEmpty()) {\r\n\t\t\tSystem.out.println(\"room's inventory is empty\");\r\n\t\t}\r\n\t}", "public Room() {\n this.isTable = false;\n this.hasStage = false;\n this.hasTech = false;\n }", "public Room() {\n this(DEFAULT_DESC, DEFAULT_SHORT_DESC);\n }", "public Floor(){\n populateRooms();\n level = new Room[5][5];\n }", "private ArrayList<Room> createRooms() {\n //Adding starting position, always rooms(index0)\n\n rooms.add(new Room(\n \"Du sidder på dit kontor. Du kigger på uret og opdager, at du er sent på den. WTF! FISKEDAG! Bare der er fiskefilet tilbage, når du når kantinen. Du må hellere finde en vej ud herfra og hen til kantinen.\",\n false,\n null,\n null\n ));\n\n //Adding offices to <>officerooms, randomly placed later \n officeRooms.add(new Room(\n \"Du bliver kort blændet af en kontorlampe, som peger lige mod døråbningen. Du ser en gammel dame.\",\n false,\n monsterList.getMonster(4),\n itemList.getItem(13)\n ));\n\n officeRooms.add(new Room(\n \"Der er ingen i rummet, men rodet afslører, at det nok er Phillipas kontor.\",\n false,\n null,\n itemList.getItem(15)\n ));\n\n officeRooms.add(new Room(\n \"Du vader ind i et lokale, som er dunkelt oplyst af små, blinkende lamper og har en stank, der siger så meget spar fem, at det kun kan være IT-lokalet. Du når lige at høre ordene \\\"Rick & Morty\\\".\",\n false,\n monsterList.getMonster(6),\n itemList.getItem(7)\n ));\n\n officeRooms.add(new Room(\n \"Det var ikke kantinen det her, men hvorfor er der så krummer på gulvet?\",\n false,\n null,\n itemList.getItem(1)\n ));\n\n officeRooms.add(new Room(\n \"Tine sidder ved sit skrivebord. Du kan se, at hun er ved at skrive en lang indkøbsseddel. Hun skal nok have gæster i aften.\",\n false,\n monsterList.getMonster(0),\n itemList.getItem(18)\n ));\n\n officeRooms.add(new Room(\n \"Du træder ind i det tekøkken, hvor Thomas plejer at opholde sig. Du ved, hvad det betyder!\",\n false,\n null,\n itemList.getItem(0)\n ));\n\n officeRooms.add(new Room(\n \"Du går ind i det nok mest intetsigende rum, som du nogensinde har set. Det er så intetsigende, at der faktisk ikke er mere at sige om det.\",\n false,\n monsterList.getMonster(1),\n itemList.getItem(9)\n ));\n\n //Adding copyrooms to <>copyrooms, randomly placed later \n copyRooms.add(new Room(\n \"Døren knirker, som du åbner den. Et kopirum! Det burde du have set komme. Især fordi det var en glasdør.\",\n false,\n null,\n itemList.getItem(19)\n ));\n\n copyRooms.add(new Room(\n \"Kopimaskinen summer stadig. Den er åbenbart lige blevet færdig. Du går nysgerrigt over og kigger på alle de udskrevne papirer.\",\n false,\n null,\n itemList.getItem(12)\n ));\n\n //Adding restrooms to <>restrooms, randomly placed later \n restRooms.add(new Room(\n \"Ups! Dametoilettet. Der hænger en klam stank i luften. Det må være Ruth, som har været i gang.\",\n false,\n null,\n itemList.getItem(5)\n ));\n\n restRooms.add(new Room(\n \"Pedersen er på vej ud fra toilettet. Han vasker ikke fingre! Slut med at give ham hånden.\",\n false,\n monsterList.getMonster(7),\n itemList.getItem(11)\n ));\n\n restRooms.add(new Room(\n \"Du kommer ind på herretoilettet. Du skal simpelthen tisse så meget, at fiskefileterne må vente lidt. Du åbner toiletdøren.\",\n false,\n monsterList.getMonster(2),\n null\n ));\n\n restRooms.add(new Room(\n \"Lisette står og pudrer næse på dametoilettet. Hvorfor gik du herud?\",\n false,\n monsterList.getMonster(8),\n itemList.getItem(14)\n ));\n\n //Adding meetingrooms to<>meetingrooms, randomly placed later\n meetingRooms.add(new Room(\n \"Du træder ind i et lokale, hvor et vigtigt møde med en potentiel kunde er i gang. Du bliver nødt til at lade som om, at du er en sekretær.\",\n false,\n monsterList.getMonster(9),\n itemList.getItem(6)\n ));\n\n meetingRooms.add(new Room(\n \"Mødelokalet er tomt, men der står kopper og service fra sidste møde. Sikke et rod!\",\n false,\n null,\n itemList.getItem(3)\n ));\n\n meetingRooms.add(new Room(\n \"Projektgruppen sidder i mødelokalet. Vil du forsøge at forsinke dem i at nå fiskefileterne i kantinen?\",\n false,\n monsterList.getMonster(10),\n itemList.getItem(2)\n ));\n\n //Adding specialrooms to<>specialrooms, randomly placed later\n specialRooms.add(new Room(\n \"Du vader ind på chefens kontor. På hans skrivebord sidder sekretæren Phillipa.\",\n false,\n monsterList.getMonster(5),\n itemList.getItem(8)\n ));\n\n specialRooms.add(new Room(\n \"Det her ligner øjensynligt det kosteskab, Harry Potter boede i.\",\n false,\n monsterList.getMonster(3),\n itemList.getItem(4)\n ));\n\n specialRooms.add(new Room(\n \"OMG! Hvad er det syn?! KANTINEN!! Du klarede det! Du skynder dig op i køen lige foran ham den arrogante fra din afdeling. Da du når frem til fadet er der kun 4 fiskefileter tilbage. Du snupper alle 4!\",\n true,\n null,\n null\n ));\n\n //Adding rooms(Inde1-5)\n addOfficeRoom();\n addRestRoom(rooms, restRooms);\n addMeetingRoom(rooms, meetingRooms);\n addOfficeRoom();\n addRestRoom(rooms, restRooms);\n\n //Adding rooms(Inde6-10)\n addMeetingRoom(rooms, meetingRooms);\n addCopyRoom(rooms, copyRooms);\n addRestRoom(rooms, restRooms);\n addOfficeRoom();\n addCopyRoom(rooms, copyRooms);\n\n //Adding rooms(Inde11-15)\n addOfficeRoom();\n addSpecialRoom(rooms, specialRooms);\n addOfficeRoom();\n addRestRoom(rooms, restRooms);\n addOfficeRoom();\n\n //Adding rooms(Inde16-19)\n addOfficeRoom();\n addSpecialRoom(rooms, specialRooms);\n addSpecialRoom(rooms, specialRooms);\n addMeetingRoom(rooms, meetingRooms);\n\n return rooms;\n }", "private void createComposite1() {\n \t\t\tGridLayout gridLayout2 = new GridLayout();\n \t\t\tgridLayout2.numColumns = 7;\n \t\t\tgridLayout2.makeColumnsEqualWidth = true;\n \t\t\tGridData gridData1 = new org.eclipse.swt.layout.GridData();\n \t\t\tgridData1.horizontalSpan = 3;\n \t\t\tgridData1.horizontalAlignment = org.eclipse.swt.layout.GridData.FILL;\n \t\t\tgridData1.verticalAlignment = org.eclipse.swt.layout.GridData.FILL;\n \t\t\tgridData1.grabExcessVerticalSpace = true;\n \t\t\tgridData1.grabExcessHorizontalSpace = true;\n \t\t\tcalendarComposite = new Composite(this, SWT.BORDER);\n \t\t\tcalendarComposite.setBackground(Display.getDefault().getSystemColor(SWT.COLOR_WHITE));\n \t\t\tcalendarComposite.setLayout(gridLayout2);\n \t\t\tcalendarComposite.setLayoutData(gridData1);\n \t\t}", "private void init()\n\t{\n\t\tsetModel(new Model(Id.model, this, null));\n\t\tsetEnviroment(new Enviroment(Id.enviroment, this, model()));\n\t\tsetVaccinationCenter(new VaccinationCenter(Id.vaccinationCenter, this, model()));\n\t\tsetCanteen(new Canteen(Id.canteen, this, vaccinationCenter()));\n\t\tsetRegistration(new Registration(Id.registration, this, vaccinationCenter()));\n\t\tsetExamination(new Examination(Id.examination, this, vaccinationCenter()));\n\t\tsetVaccination(new Vaccination(Id.vaccination, this, vaccinationCenter()));\n\t\tsetWaitingRoom(new WaitingRoom(Id.waitingRoom, this, vaccinationCenter()));\n\t\tsetSyringes(new Syringes(Id.syringes, this, vaccination()));\n\t}", "public Room(int noOfWindows) {\n\t\tthis.windows = noOfWindows;\n\t\tthis.floor=\"\";\n\t\tthis.wall=\"\";\n\t}", "private void placeRooms() {\n if (roomList.size() == 0) {\n throw new IllegalArgumentException(\"roomList must have rooms\");\n }\n // This is a nice cool square\n map = new int[MAP_SIZE][MAP_SIZE];\n\n for (Room room : roomList) {\n assignPosition(room);\n }\n }", "public void setRoomList (ArrayList<ItcRoom> roomList)\r\n\t {\r\n\t //this.roomList = roomList;\r\n\t }", "public RoomDetailsUpdate() {\n initComponents();\n initExtraComponents();\n }", "public Room( Rectangle r){\n\t\tthis.r = r;\n\t}", "public void createRooms()//Method was given\n { \n \n // create the rooms, format is name = new Room(\"description of the situation\"); ex. desc = 'in a small house' would print 'you are in a small house.'\n outside = new Room(\"outside\", \"outside of a small building with a door straight ahead. There is a welcome mat, a mailbox, and a man standing in front of the door.\", false);\n kitchen = new Room(\"kitchen\", \"in what appears to be a kitchen. There is a sink and some counters with an easter egg on top of the counter. There is a locked door straight ahead, and a man standing next to a potted plant. There is also a delicious looking chocolate bar sitting on the counter... how tempting\", true);\n poolRoom = new Room(\"pool room\", \"in a new room that appears much larger than the first room.You see a table with a flashlight, towel, and scissors on it. There is also a large swimming pool with what looks like a snorkel deep in the bottom of the pool. Straight ahead of you stands the same man as before.\", true);\n library = new Room(\"library\", \"facing east in a new, much smaller room than before. There are endless rows of bookshelves filling the room. All of the books have a black cover excpet for two: one red book and one blue book. The man stands in front of you, next to the first row of bookshelves\", true);\n exitRoom = new Room(\"exit\", \"outside of the building again. You have successfully escaped, congratulations! Celebrate with a non-poisonous chocolate bar\",true);\n \n // initialise room exits, goes (north, east, south, west)\n outside.setExits(kitchen, null, null, null);\n kitchen.setExits(poolRoom, null, outside, null);\n poolRoom.setExits(null, library, kitchen, null);\n library.setExits(null, null, exitRoom, poolRoom);\n exitRoom.setExits(null, null, null, null); \n \n currentRoom = outside; // start game outside\n }", "public static void init() {\n buildings = new HashMap<Long, JSONObject>();\n arr = new ArrayList();\n buildingOfRoom = new HashMap<Long, Long>();\n }", "public Room () {\n humidity = null;\n temperature = null;\n illumination = null;\n }", "public ModifyRoomReservation() {\n initComponents();\n\n btn_search.requestFocus();\n\n getAllIds();\n\n }", "public BossRoom() {\n\t\ttiles = new WorldTiles(width, height, width);\n\t\tbackground = new Sprite(SpriteList.BOSS_ROOM_BACKGROUND);\n\t}", "public void init() {\r\n\t\tsuper.init();\r\n\t\tfor (int i = 0; i < _composites.size(); i++) {\r\n\t\t\t_composites.get(i).init();\t\t\t\r\n\t\t} \r\n\t}", "public SingleRoom(Hotel hotel, String nomor_kamar)\n {\n // initialise instance variables\n super(hotel,nomor_kamar);\n\n }", "public Floor() {\r\n\t\tRoom[][] rooms = new Room[Constants.WIDTH][Constants.LENGTH];\r\n\t\tfor (int i = 0; i < Constants.WIDTH; i++) {\r\n\t\t\tfor (int j = 0; j < Constants.LENGTH; j++) {\r\n\t\t\t\trooms[i][j] = GenerationUtilities.randomRoom(i, j);\r\n\t\t\t\trooms[i][j].setFloor(this);\r\n\t\t\t}\r\n\t\t}\r\n\t\tthis.rooms = rooms;\r\n\t\tthis.length = rooms.length;\r\n\t\tthis.width = rooms[0].length;\r\n\t\tGenerationUtilities.placeRandomItems(this);\r\n\t\tenemies = new ArrayList<>();\r\n\t}", "public void createLevel(){\n for(LevelController rc: rooms ) {\n rc.loadContent();\n rc.setScreenListener(listener);\n rc.setCanvas(canvas);\n }\n }", "public CompositeData()\r\n {\r\n }", "public void initializeGameComponents(){\n\t\tcreateWalls();\n\t}", "public EventRoom getNewRoom(){\r\n newRoom.setRoomItems(eventRoomItems);\r\n return newRoom;\r\n }", "private List<Room> addRooms() {\n List<Room> rooms = new ArrayList<>();\n int numRooms = RandomUtils.uniform(random, MINROOMNUM, MAXROOMNUM);\n int playerRoomNum = RandomUtils.uniform(random, 0, numRooms);\n for (int i = 0; i < numRooms; i++) {\n rooms.add(addRandomRoom(random));\n if (i == playerRoomNum) {\n setPlayerInitialPosition(rooms, playerRoomNum);\n }\n }\n return rooms;\n }", "Composite() {\n\n\t}", "public RoomSchedulerFrame()\n {\n initComponents();\n \n // Load the combo boxes with data.\n rebuildFacultyComboBoxes();\n }", "public void setRoom(Room room) {\n int roomNumber = room.getRoomNumber();\n if (room.getRoomNumber() > internalList.size()) {\n setRoomForRoomNumberLessThanNumberOfRooms(room);\n } else {\n setRoomForRoomNumberMoreThanNumberOfRooms(room);\n }\n }", "public Room(String description) \n {\n this.description = description;\n items = new ArrayList<>();\n exits = new HashMap<>();\n }", "private void createCompositeGoodsShow() {\r\n\t\tGridData gridData4 = new GridData();\r\n\t\tgridData4.grabExcessHorizontalSpace = true;\r\n\t\tgridData4.horizontalSpan = 3;\r\n\t\tgridData4.heightHint = 380;\r\n\t\tgridData4.widthHint = 560;\r\n\t\tgridData4.grabExcessVerticalSpace = true;\r\n\t\tGridLayout gridLayout3 = new GridLayout();\r\n\t\tgridLayout3.numColumns = 3;\r\n\t\tcompositeGoodsShow = new Composite(compositeGoodsMange, SWT.NONE);\r\n\t\tcompositeGoodsShow.setLayout(gridLayout3);\r\n\t\tcompositeGoodsShow.setLayoutData(gridData4);\r\n\t\tdisplayRoom(compositeGoodsShow);\r\n\t}", "private void createRooms()\n {\n Room outside, garden, kitchen, frontyard, garage, livingroom,\n upperhallway, downhallway, bedroom1, bedroom2, toilet,teleporter;\n\n // create the rooms\n outside = new Room(\"outside the house\",\"Outside\");\n garden = new Room(\"in the Garden\", \"Garden\");\n kitchen = new Room(\"in the Kitchen\",\"Kitchen\");\n frontyard = new Room(\"in the Frontyard of the house\", \"Frontyard\");\n garage = new Room(\"in the Garage\", \"Garage\");\n livingroom = new Room(\"in the Living room\", \"Living Room\");\n upperhallway = new Room(\"in the Upstairs Hallway\",\"Upstairs Hallway\");\n downhallway = new Room(\"in the Downstairs Hallway\", \"Downstairs Hallway\");\n bedroom1 = new Room(\"in one of the Bedrooms\", \"Bedroom\");\n bedroom2 = new Room(\"in the other Bedroom\", \"Bedroom\");\n toilet = new Room(\"in the Toilet upstairs\",\"Toilet\");\n teleporter = new Room(\"in the Warp Pipe\", \"Warp Pipe\");\n\n // initialise room exits\n outside.setExit(\"north\", garden);\n outside.setExit(\"east\", frontyard);\n\n garden.setExit(\"south\", outside);\n garden.setExit(\"east\", kitchen);\n\n kitchen.setExit(\"west\", garden);\n kitchen.setExit(\"north\", livingroom);\n kitchen.setExit(\"south\", downhallway);\n\n frontyard.setExit(\"west\", outside);\n frontyard.setExit(\"north\", downhallway);\n frontyard.setExit(\"east\", garage);\n\n garage.setExit(\"west\", frontyard);\n garage.setExit(\"north\", downhallway);\n\n livingroom.setExit(\"west\", kitchen);\n\n downhallway.setExit(\"north\",kitchen);\n downhallway.setExit(\"west\",frontyard);\n downhallway.setExit(\"south\",garage);\n downhallway.setExit(\"east\",upperhallway);\n\n upperhallway.setExit(\"north\", bedroom2);\n upperhallway.setExit(\"east\", bedroom1);\n upperhallway.setExit(\"south\", toilet);\n upperhallway.setExit(\"west\", downhallway);\n\n toilet.setExit(\"north\", upperhallway);\n\n bedroom1.setExit(\"west\",upperhallway);\n\n bedroom2.setExit(\"south\", upperhallway);\n\n rooms.add(outside);\n rooms.add(garden);\n rooms.add(kitchen);\n rooms.add(frontyard);\n rooms.add(garage);\n rooms.add(livingroom);\n rooms.add(upperhallway);\n rooms.add(downhallway);\n rooms.add(bedroom1);\n rooms.add(bedroom2);\n rooms.add(toilet);\n }", "public void initMob() {\n this.lLegGeom.setName(\"Mob/\" + this.id + \"/lLeg\");\n this.rLegGeom.setName(\"Mob/\" + this.id + \"/rLeg\");\n this.bodyGeom.setName(\"Mob/\" + this.id + \"/Body\");\n this.lArmGeom.setName(\"Mob/\" + this.id + \"/lArm\");\n this.rArmGeom.setName(\"Mob/\" + this.id + \"/rArm\");\n this.headGeom.setName(\"Mob/\" + this.id + \"/Head\");\n this.weaponGeom.setName(\"Mob/\" + this.id + \"/Weapon\"); \n \n this.armMat.setColor(\"Color\",ColorRGBA.Black);\n this.legMat.setColor(\"Color\",ColorRGBA.Black);\n this.bodyMat.setColor(\"Color\",ColorRGBA.Black);\n \n //Refactor boss ActorControl into MobControl with MonkeyBrains\n CapsuleCollisionShape capsuleShape = new CapsuleCollisionShape(2.5f,4.5f,1);\n this.mobControl = new CharacterControl(capsuleShape, 3f);//Step size is set in last argument\n this.mobControl.setJumpSpeed(20);\n this.mobControl.setFallSpeed(45);\n this.mobControl.setGravity(50);\n \n }", "public Classroom()\n { \n // Create a new world with 10x6 cells with a cell size of 130x130 pixels.\n super(10, 6, 130); \n prepare();\n }", "public Room(String description) \n {\n exits = new HashMap<>();\n objects = new HashMap<>();\n this.description = description;\n this.requiredOutfit = null;\n this.locked = false;\n }", "public List<Room> initialiseRooms() {\n\n Room mainRoom = new Room(0, \"mainroom.tmx\", \"Main Foyer\");\n\n Room rch037 = new Room(1, \"rch037.tmx\", \"RCH/037 Lecture Theatre\");\n\n Room portersOffice = new Room(2, \"portersoffice.tmx\", \"Porters Office\");\n\n Room kitchen = new Room(3, \"kitchen.tmx\", \"Kitchen\");\n\n Room islandOfInteraction = new Room(4, \"islandofinteraction.tmx\", \"Island of Interaction\");\n\n Room toilet = new Room(5, \"toilet.tmx\", \"Toilet\");\n\n Room computerRoom = new Room(6, \"computerroom.tmx\", \"Computer Room\");\n\n Room lakeHouse = new Room(7, \"lakehouse.tmx\", \"Lakehouse\");\n\n Room outside = new Room(8, \"outside.tmx\", \"Outside Ron Cooke Hub\");\n\n Room pod = new Room(9, \"pod.tmx\", \"Pod\");\n\n\n mainRoom.addTransition(new Room.Transition().setFrom(17, 17).setTo(portersOffice, 1, 5, Direction.EAST)) //To Porters Office\n\n .addTransition(new Room.Transition().setFrom(27, 13).setTo(kitchen, 1, 3, Direction.EAST)) //To Kitchen\n\n .addTransition(new Room.Transition().setFrom(26, 29).setTo(islandOfInteraction, 11, 14, Direction.WEST)) //To Island of Interaction\n\n .addTransition(new Room.Transition().setFrom(18, 2).setTo(toilet, 1, 1, Direction.EAST)) //To Toilet\n\n .addTransition(new Room.Transition().setFrom(2, 8).setTo(computerRoom, 2, 2, Direction.EAST)) //To Computer Room\n\n .addTransition(new Room.Transition().setFrom(3, 5).setTo(outside, 19, 4, Direction.SOUTH)) //To Outside\n .addTransition(new Room.Transition().setFrom(4, 5).setTo(outside, 20, 4, Direction.SOUTH)) //To Outside\n\n .addTransition(new Room.Transition().setFrom(11, 1).setTo(rch037, 2, 5, Direction.SOUTH)) //To RCH/037\n .addTransition(new Room.Transition().setFrom(12, 1).setTo(rch037, 3, 5, Direction.SOUTH)); //To RCH/037\n\n rch037.addTransition(new Room.Transition().setFrom(2, 5).setTo(mainRoom, 11, 1, Direction.NORTH)) //To Main Room\n .addTransition(new Room.Transition().setFrom(3, 5).setTo(mainRoom, 12, 1, Direction.NORTH)) //To Main Room\n\n .addTransition(new Room.Transition().setFrom(11, 17).setTo(computerRoom, 7, 1, Direction.NORTH)) //To Computer Room\n .addTransition(new Room.Transition().setFrom(12, 17).setTo(computerRoom, 8, 1, Direction.NORTH)); //To Computer Room\n\n portersOffice.addTransition(new Room.Transition().setFrom(1, 5).setTo(mainRoom, 17, 17, Direction.WEST)); //To Main Room\n\n kitchen.addTransition(new Room.Transition().setFrom(1, 3).setTo(mainRoom, 27, 13, Direction.WEST)); //To Main Room\n\n islandOfInteraction.addTransition(new Room.Transition().setFrom(11, 14).setTo(mainRoom, 26, 29, Direction.WEST)); //To Main Room\n\n toilet.addTransition(new Room.Transition().setFrom(1, 1).setTo(mainRoom, 18, 2, Direction.WEST)); //To Main Room\n\n computerRoom.addTransition(new Room.Transition().setFrom(13, 11).setTo(lakeHouse, 11, 1, Direction.NORTH)) //To Lakehouse\n\n .addTransition(new Room.Transition().setFrom(7, 1).setTo(rch037, 11, 17, Direction.SOUTH)) //To RCH/037\n .addTransition(new Room.Transition().setFrom(8, 1).setTo(rch037, 12, 17, Direction.SOUTH)) //To RCH/037\n\n .addTransition(new Room.Transition().setFrom(2, 2).setTo(mainRoom, 2, 8, Direction.EAST)); //To Main Room\n\n lakeHouse.addTransition(new Room.Transition().setFrom(11, 1).setTo(computerRoom, 13, 11, Direction.WEST)); //To Computer Room\n\n outside.addTransition(new Room.Transition().setFrom(19, 4).setTo(mainRoom, 3, 5, Direction.NORTH)) //To Main Room\n .addTransition(new Room.Transition().setFrom(20, 4).setTo(mainRoom, 4, 5, Direction.NORTH)) //To Main Room\n\n .addTransition(new Room.Transition().setFrom(9, 11).setTo(pod, 18, 9, Direction.WEST)) //To Pod\n .addTransition(new Room.Transition().setFrom(9, 12).setTo(pod, 18, 10, Direction.WEST)); //To Pod\n\n pod.addTransition(new Room.Transition().setFrom(18, 9).setTo(outside, 9, 11, Direction.EAST)) //To Outside\n .addTransition(new Room.Transition().setFrom(18, 10).setTo(outside, 9, 12, Direction.EAST)); //To Outside\n\n List<Room> rooms = Arrays.asList(mainRoom, rch037, portersOffice, kitchen, islandOfInteraction, toilet, computerRoom, lakeHouse, outside, pod);\n\n /**\n * Assign the murder room\n */\n rooms.get(new Random().nextInt(rooms.size())).setMurderRoom();\n\n this.rooms = rooms;\n\n return rooms;\n }", "public Room(int id, int roomNumber, int persons, int days){\n this.id = id;\n this.roomNumber = roomNumber;\n this.persons = persons;\n this.days = days;\n available = false; //default value, assignment not necessary\n }", "public RoomAreaDoExample() {\n oredCriteria = new ArrayList<Criteria>();\n }", "private void initializeGrid() {\r\n if (this.rowCount > 0 && this.columnCount > 0) {\r\n this.cellViews = new Rectangle[this.rowCount][this.columnCount];\r\n for (int row = 0; row < this.rowCount; row++) {\r\n for (int column = 0; column < this.columnCount; column++) {\r\n Rectangle rectangle = new Rectangle();\r\n rectangle.setX((double)column * CELL_WIDTH);\r\n rectangle.setY((double)row * CELL_WIDTH);\r\n rectangle.setWidth(CELL_WIDTH);\r\n rectangle.setHeight(CELL_WIDTH);\r\n this.cellViews[row][column] = rectangle;\r\n this.getChildren().add(rectangle);\r\n }\r\n }\r\n }\r\n }", "public Room(String color) {\n\t\tthis.wall = color;\n\t\tthis.floor =\"\";\n\t\tthis.windows=0;\n\t}", "public void initialize() {\n sceneSwitch = SceneSwitch.getInstance();\n sceneSwitch.addScene(addPartToJobStackPane, NavigationModel.ADD_PART_TO_JOB_ID);\n usernameLbl.setText(DBLogic.getDBInstance().getUsername());\n usertypeLbl.setText(DBLogic.getDBInstance().getUser_type());\n jobReference = jobReference.getInstance();\n partHashMap = new HashMap<>();\n refreshList();\n }", "public void setRoomCards() {\n List<RoomCard> roomCards = new ArrayList<RoomCard>(); // empty list for the new roomCards\n Data data = new Data(\"data.json\"); // get data from file\n JSONObject roomData = (JSONObject) ((JSONObject) data.getJsonData().get(\"OriginalBoard\")).get(\"Rooms\"); // get the room data from data\n for (String keyStr : roomData.keySet()) {\n String roomName = String.valueOf(((JSONObject) roomData.get(keyStr)).get(\"name\")); // get room name from data\n if (!roomName.equals(\"X\")) {// if room isn't named X\n roomCards.add(new RoomCard(roomName)); // add room to list\n }\n }\n // assign the list into its class variable\n this.roomCards = roomCards;\n }", "Room mo12151c();", "public void setRoom(Room room) {\r\n\t\tthis.room = room;\r\n\t}", "public void createRooms()\n { \n // create the rooms\n //RDC//\n hall = new Room(\"Hall\", \"..\\\\pictures\\\\Rooms\\\\hall.png\");\n banquetinghall = new Room (\"Banqueting hall\", \"..\\\\pictures\\\\Rooms\\\\banquet.png\");\n poolroom = new Room (\"PoolRoom\", \"..\\\\pictures\\\\Rooms\\\\billard.png\");\n dancingroom = new Room (\"Dancing Room\", \"..\\\\pictures\\\\Rooms\\\\bal.png\");\n kitchen = new Room(\"Kitchen\", null);\n garden = new Room(\"Garden\", null);\n well = new Room(\"Well\", null);\n gardenerhut = new Room(\"Gardener hut\", null);\n //Fin RDN //\n \n //-1//\n anteroom = new Room(\"Anteroom\", null);\n ritualroom = new Room(\"Ritual Room\", null);\n cellar = new Room(\"Cellar\", null);\n // FIN -1//\n // +1 //\n livingroom = new Room(\"Living Room\", null); \n library = new Room (\"Library\", null);\n laboratory = new Room(\"Laboratory\", null);\n corridor= new Room(\"Corridor\", null);\n bathroom = new Room(\"Bathroom\", null);\n bedroom = new Room(\"Bedroom\", null);\n guestbedroom = new Room(\"Guest Bedroom\", null); \n //FIN +1 //\n //+2//\n attic = new Room(\"Attic\", null);\n //Fin +2//\n //Fin create room // \n \n // initialise room exits\n //RDC\n hall.setExits(\"north\",garden, false, \"> You must explore the mansion before\");\n hall.setExits(\"south\",banquetinghall, true, null); \n banquetinghall.setExits(\"north\",hall, true, null);\n banquetinghall.setExits(\"south\",dancingroom, false, \"> The door is blocked by Bob's toys\");\n banquetinghall.setExits(\"east\",kitchen, true, null);\n banquetinghall.setExits(\"west\",poolroom, true, null);\n //poolroom.setExits(\"east\",banquetinghall, false, \"> You have not finished examining the crime scene\");\n poolroom.setExits(\"east\",banquetinghall, true, \"> You have not finished examining the crime scene\");\n dancingroom.setExits(\"north\",banquetinghall, true, null);\n dancingroom.setExits(\"up\",livingroom, true, null);\n kitchen.setExits(\"west\",banquetinghall, true, null);\n kitchen.setExits(\"down\",cellar, true, null);\n garden.setExits(\"south\",hall, true, null);\n garden.setExits(\"north\",well, true, null);\n garden.setExits(\"east\",gardenerhut, true, null);\n well.setExits(\"south\",garden, true, null);\n gardenerhut.setExits(\"west\",garden, true, null);\n //gardenerhut.setExits(\"down\",anteroom, false, null);\n //-1// \n anteroom.setExits(\"south\",ritualroom, true, null);\n anteroom.setExits(\"up\",gardenerhut, false, \"> The door is locked. You cannot go backward\");\n anteroom.setExits(\"west\",cellar, true, null);\n ritualroom.setExits(\"north\",anteroom, true, null);\n cellar.setExits(\"up\",kitchen, true, null);\n //cellar.setExits(\"east\", anteroom, false); To unlock\n //+1//\n livingroom.setExits(\"down\",dancingroom, true, null);\n livingroom.setExits(\"north\",library, true, null);\n livingroom.setExits(\"west\",corridor, true, null);\n library.setExits(\"south\",livingroom, true, null);\n //library.setExits(\"north\",laboratory, false); To unlock\n laboratory.setExits(\"south\",library, true, null);\n corridor.setExits(\"north\",bathroom, true, null);\n corridor.setExits(\"south\",bedroom, false, \"> The door is locked. A key may be mandatory\");\n corridor.setExits(\"east\",livingroom, true, null);\n corridor.setExits(\"west\",guestbedroom, true, null);\n corridor.setExits(\"up\",attic, false, \"> You see a weird lock in the ceiling\");\n bathroom.setExits(\"south\",corridor, true, null);\n bedroom.setExits(\"north\",corridor, true, null);\n guestbedroom.setExits(\"east\",corridor, true, null);\n attic.setExits(\"down\",corridor, true, null);\n \n //currentRoom = poolroom; // start game outside\n currentRoom = poolroom;\n }", "public ChatRoom createRoom(String room) {\r\n ChatRoom chatRoom = new ChatRoom(serviceAddress.withLocal(room), null, xmppSession, serviceDiscoveryManager, multiUserChatManager);\r\n chatRoom.initialize();\r\n return chatRoom;\r\n }", "public static void initialize()\n {\n\n for(int i = 0; i < cellViewList.size(); i++)\n cellList.add(new Cell(cellViewList.get(i).getId()));\n for (int i = 76; i < 92; i++)\n {\n if (i < 80)\n {\n cellList.get(i).setChess(PlayerController.getPlayer(0).getChess(i-76));\n }\n else if (i < 84)\n {\n cellList.get(i).setChess(PlayerController.getPlayer(1).getChess(i-80));\n }\n else if (i < 88)\n {\n cellList.get(i).setChess(PlayerController.getPlayer(2).getChess(i-84));\n }\n else\n {\n cellList.get(i).setChess(PlayerController.getPlayer(3).getChess(i-88));\n }\n }\n }", "public void createRoom() {\n int hp = LabyrinthFactory.HP_PLAYER;\n if (hero != null) hp = hero.getHp();\n try {\n labyrinth = labyrinthLoader.createLabyrinth(level, room);\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n try {\n characterLoader.createCharacter(level, room);\n hero = characterLoader.getPlayer();\n if (room > 1) hero.setHp(hp);\n createMonsters();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public RoomAllocationDataSource() {\n this(\"roomAllocation\", \"reserve_rm\");\n }", "public Room createRoom(Room room);", "@Override\n\tpublic void init() {\n\t\t\n\t\t// Set your level dimensions.\n\t\t// Note that rows and columns cannot exceed a size of 16\n\t\tsetDimensions(4, 4);\n\t\t\n\t\t// Select your board type\n\t\tsetBoardType(BoardType.CHECKER_BOARD);\n\n\t\t// Select your grid colors.\n\t\t// You need to specify two colors for checker boards\n\t\tList<Color> colors = new ArrayList<Color>();\n\t\tcolors.add(new Color(255, 173, 179, 250)); // stale blue\n\t\tcolors.add(new Color(255, 255, 255, 255)); // white\n\t\tsetColors(colors);\n\t\t\n\t\t// Specify the level's rules\n\t\taddGameRule(new DemoGameRule());\n\t\t\n\t\t// Retrieve player IDs\n\t\tList<String> playerIds = getContext().getGame().getPlayerIds();\n\t\tString p1 = playerIds.get(0);\n\t\tString p2 = playerIds.get(1);\n\n\t\t// Add your entities to the level's universe\n\t\t// using addEntity(GameEntity) method\n\t\taddEntity(new Pawn(this, p1, EntityType.BLACK_PAWN, new Point(0, 0)));\n\t\taddEntity(new Pawn(this, p2, EntityType.WHITE_PAWN, new Point(3, 3)));\n\t}", "public void onRoomLoad() {\n\n }", "private void initialize() {\n chatLayoutManager = new LinearLayoutManager(this);\n chatView.setLayoutManager(chatLayoutManager);\n for (int i = 0; i < chatMessages.size() - 1; i++) {\n Message currentMsg = chatMessages.get(i);\n Message nextMsg = chatMessages.get(i + 1);\n nextMsg.showMessageTime = nextMsg.getTimestamp() - currentMsg.getTimestamp() >= Message.GROUP_TIME_THRESHOLD;\n nextMsg.showMessageSender = nextMsg.showMessageTime || !nextMsg.getSenderId().equals(currentMsg.getSenderId());\n }\n chatRoomAdapter = new ChatRoomAdapter(this, myId, chatMessages);\n chatView.setAdapter(chatRoomAdapter);\n\n //check if user self has been dropped from chat\n if (!chat.getAttendeeIdList().contains(myId)) {\n Toast.makeText(this, R.string.dropped_from_chat, Toast.LENGTH_LONG).show();\n }\n updateChatAttendeeIdList = new ArrayList<>();\n\n //set up listener for attendee list check boxes\n checkedChangeListener = new CompoundButton.OnCheckedChangeListener() {\n @Override\n public void onCheckedChanged(CompoundButton checkBox, boolean isChecked) {\n String id = (String) checkBox.getTag();\n if (isChecked) {\n if (!updateChatAttendeeIdList.contains(id))\n updateChatAttendeeIdList.add(id);\n } else {\n updateChatAttendeeIdList.remove(id);\n }\n }\n };\n\n //set up contact input and contact picker\n View contactPicker = findViewById(R.id.contact_picker);\n contactPicker.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n Intent intent = new Intent(ChatRoomActivity.this, ContactsActivity.class);\n intent.putExtra(ContactsActivity.EXTRA_MODE, ContactsActivity.MODE_PICKER);\n startActivityForResult(intent, EventDetailsActivity.REQUEST_CONTACT_PICKER);\n }\n });\n\n //\n final LinearLayout messagesLayout = (LinearLayout) findViewById(R.id.all_messages_linearlayout);\n if (messagesLayout != null) {\n messagesLayout.getViewTreeObserver().addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener() {\n @Override\n public void onGlobalLayout() {\n messagesLayout.getViewTreeObserver().removeOnGlobalLayoutListener(this);\n\n int size = chatMessages.size();\n if (chatLayoutManager.findLastCompletelyVisibleItemPosition() < size-1) {\n chatLayoutManager.scrollToPosition(size - 1);\n }\n }\n });\n }\n\n conversationManager.addBroadcastListner(this);\n }", "private void createRooms()\n {\n // create the rooms\n prison = new Room(\"Prison\", \"Prison. You awake in a cold, dark cell. Luckily, the wall next to you has been blown open. \\nUnaware of your current circumstances, you press on... \\n\");\n promenade = new Room(\"Promenade\",\"Promenade. After stumbling upon a ladder, you decided to climb up. \\n\" + \n \"You appear outside a sprawling promenade. There appears to be something shiny stuck in the ground... \\n\");\n sewers = new Room(\"Sewers\",\"Sewers. It smells... interesting. As you dive deeper, you hear something creak\");\n ramparts = new Room(\"Ramparts\", \"Ramparts. You feel queasy as you peer down below. \\nAs you make your way along, you're greated by a wounded soldier.\" +\n \"\\nIn clear agony, he slowly closes his eyes as he says, 'the king... ki.. kil... kill the king..' \\n\");\n depths = new Room(\"Depths\", \"Depths. You can hardly see as to where you're going...\" + \"\\n\");\n ossuary = new Room(\"Ossuary\", \"Ossuary. A chill runs down your spine as you examine the skulls... \\n\" +\n \"but wait... is.. is one of them... moving? \\n\" +\"\\n\" + \"\\n\" + \"There seems to be a chest in this room!\" + \"\\n\");\n bridge = new Room(\"Bridge\", \"Bridge. A LOUD SHREIK RINGS OUT BEHIND YOU!!! \\n\");\n crypt = new Room(\"Crypt\", \"Crypt. An eerire feeling begins to set in. Something about this place doesn't seem quite right...\" + \"\\n\");\n graveyard = new Room(\"Graveyard\", \"Graveyard. The soil looks rather soft. \\n\" +\n \"As you being to dive deeper, you begin to hear moans coming from behind you...\");\n forest = new Room(\"Forest\", \"Forest. It used to be gorgeous, and gleaming with life; that is, until the king came...\" + \"\\n\" +\n \"there's quite a tall tower in front of you... if only you had something to climb it.\" + \"\\n\");\n tower = new Room(\"Tower\", \"Tower. As you look over the land, you're astounded by the ruin and destruction the malice and king have left behind. \\n\");\n castle = new Room(\"Castle\", \"Castle. Used to be the most elegant and awe-inspiring building in the land. \\n\" +\n \"That is, before the king showed up... \\n\" +\n \"wait... is that... is that a chest? \\n\");\n throneRoomEntrance = new Room(\"Throne Entrance\", \"You have made it to the throne room entrance. Press on, if you dare.\");\n throne = new Room(\"Throne Room\", \"You have entered the throne room. As you enter, the door slams shut behind you! \\n\" +\n \"Before you stands, the king of all malice and destruction, Mr. Rusch\" + \"\\n\");\n deathRoom1 = new Room(\"Death Room\", \"THE DOOR SLAMS SHUT BEHIND YOU\");\n deathRoom2 = new Room(\"Death Room\", \"THE DOOR SLAMS SHUT BEHIND YOU\");\n deathRoom3 = new Room(\"Death Room\", \"THE DOOR SLAMS SHUT BEHIND YOU\");\n deathRoom4 = new Room(\"Death Room\", \"depths of the earth... well part of you at least.\" + \"\\n\" + \"You fell off the peaks of the castle to your untimely death\");\n \n // initialise room exits\n\n currentRoom = prison; // start game outside player.setRoom(currentRoom);\n player.setRoom(currentRoom);\n \n }", "public static void createGameRooms()\r\n\t{\r\n\t\tfor(int i = 0; i < MAX_FIREWORKS_ROOMS; i++)\r\n\t\t{\r\n\t\t\taddRoom(\"fireworks_\" + i, new VMKGameRoom(\"fireworks_\" + i, \"Fireworks Game \" + i, \"\"));\r\n\t\t}\r\n\t\t\r\n\t\tfor(int i = 0; i < MAX_PIRATES_ROOMS; i++)\r\n\t\t{\r\n\t\t\taddRoom(\"pirates_\" + i, new VMKGameRoom(\"pirates_\" + i, \"Pirates Game \" + i, \"\"));\r\n\t\t}\r\n\t}", "public void init(){\n\t\tsetSize (800,600);\n\t\t//el primer parametro del rectangulo en el ancho\n\t\t//y el alto\n\t\trectangulo = new GRect(120,80);\n\t\t\n\t}", "public RoomRectangle buildRoom(TETile[][] world, Random r) {\n int w = 0;\n int l = 0;\n if (width > 5) {\n w = r.nextInt(width - 5) + 4;\n }\n if (length > 5) {\n l = r.nextInt(length - 5) + 4;\n }\n // int w = width - 1;\n //int l = length - 1;\n // Coordinate loc = new Coordinate(location.getX() + 1, location.getY() + 1);\n room = new RoomRectangle(w, l, location, direction);\n room.layFloor(world);\n // layBorder(world);\n return room;\n }", "@Override\n public Room makeRoom() {\n return new MagicRoom();\n }", "public void setRoom(Room room) {\n currentRoom = room;\n }", "public Room(roomContents content) {\n contents.add(content);\n\n }", "private void setPlayerRoom(){\n player.setRoom(currentRoom);\n }", "@PostConstruct\n\tprotected void initialize() {\n\t\tzoomMax = 1000L * 60 * 60 * 24 * 30;\n\n\t\t// set initial start / end dates for the axis of the timeline (just for testing)\n\t\tCalendar cal = Calendar.getInstance(TimeZone.getTimeZone(\"UTC\"));\n\t\tcal.set(2015, Calendar.FEBRUARY, 9, 0, 0, 0);\n\t\tstart = cal.getTime();\n\t\tcal.set(2015, Calendar.MARCH, 10, 0, 0, 0);\n\t\tend = cal.getTime();\n\n\t\t// create timeline model\n\t\tmodel = new TimelineModel();\n\n\t\t// Server-side dates should be in UTC. They will be converted to a local dates in UI according to provided TimeZone.\n\t\t// Submitted local dates in UI are converted back to UTC, so that server receives all dates in UTC again.\n\t\tcal = Calendar.getInstance(TimeZone.getTimeZone(\"UTC\"));\n\t\tcal.set(2015, Calendar.JANUARY, 2, 0, 0, 0);\n\t\tmodel.add(new TimelineEvent(new Booking(211, RoomCategory.DELUXE, \"(0034) 987-111\", \"One day booking\"), cal.getTime()));\n\n\t\tcal.set(2015, Calendar.JANUARY, 26, 0, 0, 0);\n\t\tDate begin = cal.getTime();\n\t\tcal.set(2015, Calendar.JANUARY, 28, 23, 59, 59);\n\t\tDate end = cal.getTime();\n\t\tmodel.add(new TimelineEvent(new Booking(202, RoomCategory.EXECUTIVE_SUITE, \"(0034) 987-333\", \"Three day booking\"), begin,\n\t\t end));\n\n\t\tcal.set(2015, Calendar.FEBRUARY, 10, 0, 0, 0);\n\t\tbegin = cal.getTime();\n\t\tcal.set(2015, Calendar.FEBRUARY, 15, 23, 59, 59);\n\t\tend = cal.getTime();\n\t\tmodel.add(new TimelineEvent(new Booking(150, RoomCategory.STANDARD, \"(0034) 987-222\", \"Six day booking\"), begin, end));\n\n\t\tcal.set(2015, Calendar.FEBRUARY, 23, 0, 0, 0);\n\t\tbegin = cal.getTime();\n\t\tcal.set(2015, Calendar.FEBRUARY, 27, 23, 59, 59);\n\t\tend = cal.getTime();\n\t\tmodel.add(new TimelineEvent(new Booking(178, RoomCategory.STANDARD, \"(0034) 987-555\", \"Five day booking\"), begin, end));\n\n\t\tcal = Calendar.getInstance();\n\t\tcal.set(2015, Calendar.MARCH, 6, 0, 0, 0);\n\t\tmodel.add(new TimelineEvent(new Booking(101, RoomCategory.SUPERIOR, \"(0034) 987-999\", \"One day booking\"), cal.getTime()));\n\n\t\tcal.set(2015, Calendar.MARCH, 19, 0, 0, 0);\n\t\tbegin = cal.getTime();\n\t\tcal.set(2015, Calendar.MARCH, 22, 23, 59, 59);\n\t\tend = cal.getTime();\n\t\tmodel.add(new TimelineEvent(new Booking(80, RoomCategory.JUNIOR, \"(0034) 987-444\", \"Four day booking\"), begin, end));\n\n\t\tcal.set(2015, Calendar.APRIL, 3, 0, 0, 0);\n\t\tbegin = cal.getTime();\n\t\tcal.set(2015, Calendar.APRIL, 4, 23, 59, 59);\n\t\tend = cal.getTime();\n\t\tmodel.add(new TimelineEvent(new Booking(96, RoomCategory.DELUXE, \"(0034) 987-777\", \"Two day booking\"), begin, end));\n\n\t\tcal.set(2015, Calendar.APRIL, 22, 0, 0, 0);\n\t\tbegin = cal.getTime();\n\t\tcal.set(2015, Calendar.MAY, 1, 23, 59, 59);\n\t\tend = cal.getTime();\n\t\tmodel.add(new TimelineEvent(new Booking(80, RoomCategory.JUNIOR, \"(0034) 987-444\", \"Ten day booking\"), begin, end));\n\t}", "RoomstlogBean()\n {\n }", "public Room(String roomName) {\n guests = new ArrayList<>();\n roomTier = null;\n this.roomName = roomName;\n this.roomId = RoomId.generate(roomName);\n }", "@Override\n protected void initGame() {\n\n// entityBuilder()\n// .view(new Rectangle(64, 64, Color.BLUE))\n// .buildAndAttach();\n//\n// entityBuilder()\n// .at(getAppWidth() - 64, getAppHeight() - 64)\n// .view(new Rectangle(64, 64, Color.BLUE))\n// .buildAndAttach();\n//\n// entityBuilder()\n// .at(0, getAppHeight() / 2 - 32)\n// .view(new Rectangle(64, 64, Color.BLUE))\n// .with(new ProjectileComponent(new Point2D(1, 0), 150))\n// .buildAndAttach();\n }", "@Override\r\n public void init() {\n \tHouse house = ((Room)getCharacterLocation()).getHouse();\r\n \tboolean freekitchen=false;\r\n \tboolean freestage=false;\r\n \tboolean freearena=false;\r\n \tboolean freebath=false;\r\n \tint chance=0;\r\n\r\n \tfor(Room room: house.getRooms()){\r\n \t\tif(room.getAmountPeople()==0){\r\n \t\t\tif(room.getRoomType()==RoomType.STAGE){freestage=true;}\r\n \t\t\tif(room.getRoomType()==RoomType.KITCHEN){freekitchen=true;}\r\n \t\t\tif(room.getRoomType()==RoomType.ARENA){freearena=true;}\r\n \t\t\tif(room.getRoomType()==RoomType.SPAAREA){freebath=true;}\r\n \t\t}\r\n \t}\r\n \t\r\n \t//List what the character can do\r\n\t\tfinal Map<Occupation, Integer> characterCanDo=new HashMap<Occupation, Integer>();\r\n\t\t\r\n\t\tCharakter character = getCharacters().get(0);\r\n\t\t\r\n\t\t\r\n\t\tfor (Occupation attendType: Occupation.values()) {\r\n\t\t\tcharacterCanDo.put(attendType, 0); \r\n\t\t}\r\n\t\t\r\n\t\tif(character.getFinalValue(EssentialAttributes.ENERGY)<=80){\r\n\t\t\tchance=Util.getInt(1,100);\r\n\t\t\t \r\n\t\t\tcharacterCanDo.put(Occupation.REST, chance);\r\n\t\t}\r\n\t\telse{\r\n\t\t\tcharacterCanDo.put(Occupation.REST, 0);\r\n\t\t}\r\n\t\tif(character.getFinalValue(SpecializationAttribute.CLEANING)>=1 && house.getDirt()>30){\r\n\t\t\tchance=Util.getInt(1,100);\r\n\t\t\t \r\n\t\t\tcharacterCanDo.put(Occupation.CLEAN, chance);\r\n\t\t}\r\n\t\telse{\r\n\t\t\tcharacterCanDo.put(Occupation.CLEAN, 0);\r\n\t\t}\r\n\t\tif(character.getFinalValue(SpecializationAttribute.SEDUCTION)>=1){\r\n\t\t\tchance=Util.getInt(1,100);\r\n\t\t\t \r\n\t\t\tcharacterCanDo.put(Occupation.WHORE, chance);\r\n\t\t\tappeal=character.getFinalValue(SpecializationAttribute.SEDUCTION)/10;\r\n\t\t\tmaxCust=1;\r\n\t\t}\r\n\t\telse{\r\n\t\t\tcharacterCanDo.put(Occupation.WHORE, 0);\r\n\t\t}\r\n\t\tif(character.getFinalValue(SpecializationAttribute.STRIP)>=1 && freestage==true){\r\n\t\t\tchance=Util.getInt(1,100);\r\n\t\t\t \r\n\t\t\tcharacterCanDo.put(Occupation.DANCE, chance);\r\n\t\t\tappeal=character.getFinalValue(SpecializationAttribute.STRIP)/10;\r\n\t\t\tmaxCust=15;\r\n\t\t}\r\n\t\telse{\r\n\t\t\tcharacterCanDo.put(Occupation.DANCE, 0);\r\n\t\t}\r\n\t\tif(character.getFinalValue(SpecializationAttribute.COOKING)>=1 && freekitchen==true){\t\t\r\n\t\t\tchance=Util.getInt(1,100);\r\n\t\t\t \r\n\t\t\tcharacterCanDo.put(Occupation.COOK, chance);\r\n\t\t}\r\n\t\telse{\r\n\t\t\tcharacterCanDo.put(Occupation.COOK, 0);\r\n\t\t}\r\n\t\tif(character.getFinalValue(SpecializationAttribute.WELLNESS)>=1 && freebath==true){\r\n\t\t\tchance=Util.getInt(1,100);\r\n\t\t\t \r\n\t\t\tcharacterCanDo.put(Occupation.BATHATTENDANT, chance);\r\n\t\t\tappeal=character.getFinalValue(SpecializationAttribute.WELLNESS)/10;\r\n\t\t\tmaxCust=15;\r\n\t\t}\r\n\t\telse{\r\n\t\t\tcharacterCanDo.put(Occupation.BATHATTENDANT, 0);\r\n\t\t}\r\n\t\tif(freebath==true){\r\n\t\t\tchance=Util.getInt(1,100);\r\n\t\t\t \r\n\t\t\tcharacterCanDo.put(Occupation.BATHE, chance);\r\n\t\t}\r\n\t\telse{\r\n\t\t\tcharacterCanDo.put(Occupation.BATHE, 0);\r\n\t\t}\r\n\t\tif(character.getFinalValue(Sextype.FOREPLAY)>50 && character.getFinalValue(EssentialAttributes.ENERGY)>80){\r\n\t\t\tchance=Util.getInt(1,100);\r\n\t\t\t \r\n\t\t\tcharacterCanDo.put(Occupation.MASTURBATE, chance);\r\n\t\t}\r\n\t\telse{\r\n\t\t\tcharacterCanDo.put(Occupation.MASTURBATE, 0);\r\n\t\t}\r\n\t\tif(character.getFinalValue(SpecializationAttribute.VETERAN)>=1 && freearena==true){\r\n\t\t\tchance=Util.getInt(1,100);\r\n\t\t\t \r\n\t\t\tcharacterCanDo.put(Occupation.TRAIN, chance);\r\n\t\t}\r\n\t\telse{\r\n\t\t\tcharacterCanDo.put(Occupation.TRAIN, 0);\r\n\t\t}\r\n\t\tif(character.getFinalValue(EssentialAttributes.ENERGY)>80){\r\n\t\t\tchance=Util.getInt(1,100);\r\n\t\t\tcharacterCanDo.put(Occupation.ERRAND, chance);\r\n\t\t\tchance=Util.getInt(1,100);\r\n\t\t\tcharacterCanDo.put(Occupation.BEACH, chance);\r\n\t\t}\r\n\t\telse{\r\n\t\t\tcharacterCanDo.put(Occupation.ERRAND, 0);\r\n\t\t\tcharacterCanDo.put(Occupation.BEACH, 0);\r\n\t\t}\r\n\r\n\t\tint previous=0;\r\n\t\tint actual=0;\r\n\t\tfor (Occupation occupation: Occupation.values()) {\r\n\t\t\tactual=characterCanDo.get(occupation);\r\n\t\t\tif(actual>previous && actual!=0){\r\n\t\t\t\tprevious=actual;\r\n\t\t\t\tcharacterOccupationMap.put(character, occupation);\r\n\t\t\t}\r\n\r\n\t\t}\r\n }", "public void instantiateMeetingRooms(ResultSet resultSet) throws SQLException {\n\n\t\twhile (resultSet.next()) {\n\t\t\t// Instantiate\n\t\t\tMeetingRoom meetingRoom = new MeetingRoom(\n\t\t\t\t\tresultSet.getString(MeetingRoomColumns.RoomNumber.colNr()),\n\t\t\t\t\tresultSet.getInt(MeetingRoomColumns.Capacity.colNr()),\n\t\t\t\t\tresultSet.getString(MeetingRoomColumns.Name.colNr()),\n\t\t\t\t\tresultSet.getString(MeetingRoomColumns.Notes.colNr())\n\t\t\t\t);\n\t\t\t\n\t\t\t// Add to model\n\t\t\tmodel.addMeetingRoom(meetingRoom);\n\t\t}\n\t}" ]
[ "0.6549173", "0.63019127", "0.62850934", "0.6240827", "0.62135464", "0.6167973", "0.61411524", "0.6007615", "0.5967357", "0.5945639", "0.5945627", "0.59368044", "0.59312093", "0.5898291", "0.58809495", "0.5852984", "0.5845729", "0.5841572", "0.58299744", "0.5829583", "0.58055365", "0.57969683", "0.57647645", "0.5753251", "0.57462484", "0.5738366", "0.57358205", "0.571482", "0.57050645", "0.5704943", "0.5694748", "0.56862277", "0.56856626", "0.56755793", "0.56567657", "0.56496173", "0.5641243", "0.56290704", "0.5615092", "0.5592036", "0.5590197", "0.55872947", "0.5577615", "0.5574848", "0.5565642", "0.55628455", "0.5547345", "0.5539736", "0.5538589", "0.55370694", "0.5508467", "0.54837525", "0.54782486", "0.5468945", "0.54581803", "0.54479164", "0.54451275", "0.5427354", "0.539515", "0.53871584", "0.5385323", "0.538046", "0.53746486", "0.53734094", "0.5368605", "0.5364164", "0.53603125", "0.5356757", "0.53552735", "0.53526664", "0.5351883", "0.5349826", "0.53392655", "0.5337636", "0.5317439", "0.53164816", "0.53142333", "0.5306996", "0.52970344", "0.5293719", "0.5285149", "0.52807224", "0.5275781", "0.5266919", "0.526492", "0.526208", "0.5241545", "0.5237578", "0.52267236", "0.5223448", "0.521832", "0.5216182", "0.52143425", "0.5208475", "0.5201491", "0.51992494", "0.5198277", "0.5190267", "0.5184387", "0.51813775" ]
0.6519308
1
RoomAddWizard roomAddWizard=new RoomAddWizard(); WizardDialog wDialog=new WizardDialog(sShell,roomAddWizard);
public void widgetSelected(org.eclipse.swt.events.SelectionEvent e) { RoomAdd ra=new RoomAdd(); ra.getsShell().open(); sShell.setMinimized(true); /*if(ra.flag){ newRoom=ra.getRoom(); tableViewer.add(SystemManageShell.newRoom); }*/ }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setWizard(IWizard newWizard);", "static public Wizard createWizard (){\n System.out.println(\"Enter the name of your wizard : \");\n Scanner sc = new Scanner(System.in);\n String nameCharacter = sc.next();\n\n // enter and get the HP value of the character\n System.out.println(\"Enter the healpoint of your wizard : \");\n Scanner scan = new Scanner(System.in);\n String healPointCharacter = scan.next();\n int hpCharacter = Integer.parseInt(healPointCharacter);\n\n // get the power value\n System.out.println(\"Enter the power of your wizard : \");\n Scanner sca = new Scanner(System.in);\n String powerCharacter = sca.next();\n int pcCharacter = Integer.parseInt(powerCharacter);\n\n\n // get the initiative (turn order)\n System.out.println(\"Enter the initiative of your wizard : \");\n Scanner scann = new Scanner(System.in);\n String initiativeCharacter = scann.next();\n int iniCharacter = Integer.parseInt(initiativeCharacter);\n\n System.out.println(\"Enter the wizard damage value of your wizard : \");\n Scanner scanS = new Scanner(System.in);\n String wizardDamage = scann.next();\n int wiz = Integer.parseInt(wizardDamage);\n\n Wizard createWizard = new Wizard(nameCharacter, pcCharacter, hpCharacter, iniCharacter, wiz);\n System.out.println(\"Your wizard has been created with success!\");\n\n return createWizard;\n }", "public WizardModel(){ \n wp = new HashMap<Object,WizardPanelDescriptor>();\n step = 1;\n }", "public void testRegisterWizardPanel() {\n System.out.println(\"registerWizardPanel\");\n Object id = null;\n WizardPanelDescriptor panel = null;\n Wizard instance = new Wizard();\n instance.registerWizardPanel(id, panel);\n }", "public IWizard getWizard();", "protected abstract AbstractPerfCakeEditWizard createWizard(IStructuredSelection selection);", "public AddValidatorWizard() {\n super();\n initPages();\n setWindowTitle(Messages.title_newValidator);\n }", "public NewEntryWizard()\n {\n setNeedsProgressMonitor( true );\n }", "public CartogramWizard ()\n\t{\n\t\n\t\t// Set the window parameters.\n\t\tthis.setTitle(AppContext.shortProgramName + \" _ Cartogram Wizard\");\n\t\tthis.setSize(640, 480);\n\t\tthis.setLocation(30, 40);\n\t\tthis.setResizable(false);\n\t\tthis.setLayout(null);\n\t\t//this.setModal(true);\n\t\tthis.setDefaultCloseOperation(DO_NOTHING_ON_CLOSE);\n\t\tthis.addWindowListener(new CartogramWizardWindowListener());\n\t\t\n\t\t\n\t\t// Adding the cartogram wizard to the app context.\n\t\tAppContext.cartogramWizard = this;\n\t\t\n\t\t\n\t\t// Add icon panel at the left of the wizard window.\n\t\t// This panel contains the ScapeToad icon.\n\t\tif (mScapeToadIconPanel == null)\n\t\t{\n\t\t\tmScapeToadIconPanel = new ScapeToadIconPanel(this);\n\t\t}\n\t\t\n\t\tmScapeToadIconPanel.setLocation(30, 90);\n\t\tthis.add(mScapeToadIconPanel);\n\t\t\n\t\t\n\t\t\n\t\t// Add title panel.\n\t\tCartogramWizardTitlePanel titlePanel =\n\t\t\tnew CartogramWizardTitlePanel(this);\n\t\t\n\t\ttitlePanel.setLocation(30, 20);\n\t\tthis.add(titlePanel);\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t// Add icon panel at the left of the wizard window.\n\t\t// This panel contains the ScapeToad icon.\n\t\tmWizardStepIconPanel = new WizardStepIconPanel(this);\n\t\tmWizardStepIconPanel.setLocation(380, 20);\n\t\tthis.add(mWizardStepIconPanel);\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t// Ajouter l'introduction au wizard.\n\t\t// Explication des étapes à suivre :\n\t\t// 1. Sélectionner la couche des polygones (master layer).\n\t\t// 2. Sélectionner l'information statistique.\n\t\t// 3. Sélection des couches à transformer simultanément.\n\t\t\n\t\tmPanelZero = new CartogramWizardPanelZero(this);\n\t\tthis.getContentPane().add(mPanelZero);\n\t\t\n\t\tmCurrentStep = 0;\n\t\t\n\t\t\n\t\t\n\t\t// Add the running panel which is already created.\n\t\tmRunningPanel.setVisible(false);\n\t\tthis.add(mRunningPanel);\n\t\t\n\t\t\n\t\t// Add the finished panel which is already created.\n\t\tmFinishedPanel.setVisible(false);\n\t\tthis.add(mFinishedPanel);\n\t\t\n\t\t\t\t\n\t\t// Add the Cancel button.\n\t\tmCancelButton = new JButton(\"Cancel\");\n\t\tmCancelButton.setLocation(30, 404);\n\t\tmCancelButton.setSize(100, 26);\n\t\tmCancelButton.addActionListener(new CartogramWizardCloseAction());\n\t\tthis.getContentPane().add(mCancelButton);\n\t\t\n\t\t\n\t}", "public TableEditorWizard(Table table) {\t\n\t\tcreateDialog(table);\n\t}", "public ButtonWizard(DialogueSystem system) {\n this.system = system;\n currentAction = new JLabel();\n currentJoint = new JLabel();\n }", "public void testGetDialog() {\n System.out.println(\"getDialog\");\n Wizard instance = new Wizard();\n JDialog result = instance.getDialog();\n assertNotNull(result);\n }", "@Override\n\tpublic void create(IWizardEntity entity, WizardRunner runner) {\n\t\t\n\t}", "private void initDialog() {\n }", "public WizardEngine(GameOptions go) {\r\n\t\tsuper();\r\n\t\tthis.go = go;\r\n\t\tcardFinder = new WizardCardFinder();\r\n\t\t//cardFinder = new PokerCardFinder();\r\n\t}", "public NewPageWizard(IXWikiSpace sapce)\n {\n super();\n setWindowTitle(\"Add New Page...\");\n setNeedsProgressMonitor(false);\n this.space = sapce;\n }", "protected void setWizard(BJADWizard<T> wizard)\n {\n this.wizard = wizard;\n }", "public AbstractWizardPage()\n {\n super(true);\n }", "public AAAStepUp()\n {\n display = Display.getDisplay(this);\n stepReciver=new StepReciver(this);\n deamonClient= new DeamonClient(this);\n watch=new Watcher(this);\n watch.notifyWatchertoStart();\n watch.notifyWatchertoStepupDeamon();\n \n\n\n startlist=new List(\"StepUp:\", List.IMPLICIT);\n startlist.append(\"Start\", null);\n startlist.append(\"Progress\", null);\n //$$ startlist.append(\"History\", null);\n \n\n\n\n stepview= new StepsView(this);\n proglistview= new ProgressListView(this);\n historyview=new HistoryView(this);\n profileview=new ProfileView(this);\n newgroupview= new newGroupView(this);\n dailyprogress= new DailyProgress (this);\n weeklyprogress= new WeekProgress(this);\n teamprogress= new TeamProgress(this);\n\n\n\n formRunning = new Form(\"Connecting to StepUp Database\");\n formRunning.append(new Gauge(\"Connecting\",false,Gauge.INDEFINITE,Gauge.CONTINUOUS_RUNNING));\n\ncreateCommands();\naddCommands();\n \n }", "public AddVehicleShowPage() {\n initComponents();\n }", "private Dialogs () {\r\n\t}", "public NeedleholeDlg()\n \t{\n \t\tsuper( \"Needlehole Cherry Blossom\" );\n \t\tinit2();\n \t}", "public void initByEngine( WizardEngine e )\n {\n initDialog();\n\n // Each wizard dialog must contains Next and Back commands\n // A better solution is not to include Back command on the first dialog\n // and not to include Next command on the last dialog\n // This leave as an exercise to readers\n addCommand( NEXT_COMMAND );\n addCommand( BACK_COMMAND );\n\n this.engine = e;\n\n super.setCommandListener( this );\n }", "public abstract void initDialog();", "public GUI_Edit_Tour(){\n init();\n }", "public Dialog() {\n\t}", "private void openCreateAccountDialog()\n {\n testDialog();\n\n }", "public void addRelationshipDialog() { new RelationshipDialog(); }", "@Override\n\t\t\tpublic void handleEvent(Event event) {\n\t\t\t\tAddNotificationWizard wizard = new AddNotificationWizard(humanInteractions,notificationPage,domain,notficationViewer);\n\t\t\t\tWizardDialog wizardDialog = new WizardDialog(Display .getCurrent().getActiveShell(),wizard);\n\t\t\t\twizardDialog.create(); \n\t\t\t\twizardDialog.open();\n\t\t\t}", "CartogramWizardGoToStepAction (CartogramWizard wizard, int step)\n\t{\n\t\tmWizard = wizard;\n\t\tmStep = step;\n\t}", "private void addNewConnection() {\n\t\t IWizard wizard = new NewJmxConnectionWizard();\n\t\t WizardDialog dialog = new WizardDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), wizard);\n\t\t dialog.open();\n\t\t\n\t}", "private void dialog() {\n\t\tGenericDialog gd = new GenericDialog(\"Bildart\");\n\t\t\n\t\tgd.addChoice(\"Bildtyp\", choices, choices[0]);\n\t\t\n\t\t\n\t\tgd.showDialog();\t// generiere Eingabefenster\n\t\t\n\t\tchoice = gd.getNextChoice(); // Auswahl uebernehmen\n\t\t\n\t\tif (gd.wasCanceled())\n\t\t\tSystem.exit(0);\n\t}", "private void createWizard(String persoName, String persoImage, int persoLife, int attack) {\n\t\tpersoList.add(new Wizard(persoName, persoImage, persoLife, attack));\n\t}", "public interface IWizardPage extends IDialogPage {\r\n\t/**\r\n\t * Returns whether the next page could be displayed.\r\n\t *\r\n\t * @return <code>true</code> if the next page could be displayed,\r\n\t * and <code>false</code> otherwise\r\n\t */\r\n\tpublic boolean canFlipToNextPage();\r\n\r\n\t/**\r\n\t * Returns this page's name.\r\n\t *\r\n\t * @return the name of this page\r\n\t */\r\n\tpublic String getName();\r\n\r\n\t/**\r\n\t * Returns the wizard page that would to be shown if the user was to\r\n\t * press the Next button.\r\n\t *\r\n\t * @return the next wizard page, or <code>null</code> if none\r\n\t */\r\n\tpublic IWizardPage getNextPage();\r\n\r\n\t/**\r\n\t * Returns the wizard page that would to be shown if the user was to\r\n\t * press the Back button.\r\n\t *\r\n\t * @return the previous wizard page, or <code>null</code> if none\r\n\t */\r\n\tpublic IWizardPage getPreviousPage();\r\n\r\n\t/**\r\n\t * Returns the wizard that hosts this wizard page.\r\n\t *\r\n\t * @return the wizard, or <code>null</code> if this page has not been\r\n\t * added to any wizard\r\n\t * @see #setWizard\r\n\t */\r\n\tpublic IWizard getWizard();\r\n\r\n\t/**\r\n\t * Returns whether this page is complete or not.\r\n\t * <p>\r\n\t * This information is typically used by the wizard to decide\r\n\t * when it is okay to finish.\r\n\t * </p>\r\n\t *\r\n\t * @return <code>true</code> if this page is complete, and\r\n\t * <code>false</code> otherwise\r\n\t */\r\n\tpublic boolean isPageComplete();\r\n\r\n\t/**\r\n\t * Sets the wizard page that would typically be shown\r\n\t * if the user was to press the Back button.\r\n\t * <p>\r\n\t * This method is called by the container.\r\n\t * </p>\r\n\t *\r\n\t * @param page the previous wizard page\r\n\t */\r\n\tpublic void setPreviousPage(IWizardPage page);\r\n\r\n\t/**\r\n\t * Sets the wizard that hosts this wizard page.\r\n\t * Once established, a page's wizard cannot be changed\r\n\t * to a different wizard.\r\n\t *\r\n\t * @param newWizard the wizard\r\n\t * @see #getWizard\r\n\t */\r\n\tpublic void setWizard(IWizard newWizard);\r\n}", "public LandRYSettingPage() {\n initComponents();\n }", "@Override\r\n\t protected void onPrepareDialog(int id, Dialog dialog) {\n\t switch(id){\r\n\t case(ID_SCREENDIALOG):\r\n\t \tdialog.setTitle(\"Job Details\");\r\n\t \tButton myButton = new Button(this);\r\n\t \tmyButton.setText(\"Cancel\");\r\n\t \tmyButton.setBackgroundColor(Color.parseColor(\"#ff4c67\"));\r\n\t \tmyButton.setTextColor(Color.parseColor(\"#ffffff\"));\r\n\t \tRelativeLayout datlis = (RelativeLayout)screenDialog.findViewById(R.id.datalist01);\r\n\t \tLayoutParams lp = new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT);\r\n\t \tlp.addRule(RelativeLayout.BELOW, list.getId());\r\n\t \tdatlis.addView(myButton, lp);\r\n\t \tmyButton.setOnClickListener(dismissscreen);\r\n\t \t\r\n\t break;\r\n\t }\r\n\t }", "public CreateAccount_GUI() {\n initComponents();\n }", "public void testGenericWizards() {\n // open new project wizard\n NewProjectWizardOperator npwo = NewProjectWizardOperator.invoke();\n npwo.selectCategory(\"Java Web\");\n npwo.selectProject(\"Web Application\");\n npwo.next();\n // create operator for next page\n WizardOperator wo = new WizardOperator(\"Web Application\");\n JTextFieldOperator txtName = new JTextFieldOperator((JTextField) new JLabelOperator(wo, \"Project Name:\").getLabelFor());\n txtName.clearText();\n txtName.typeText(\"MyApp\");\n wo.cancel();\n }", "public NewReviewWizard() {\n super();\n setNeedsProgressMonitor(true);\n setWindowTitle(\"New Review\");\n setHelpAvailable(false);\n }", "public Reqif10ModelWizardInitialObjectCreationPage(String pageId) {\r\n \t\t\tsuper(pageId);\r\n \t\t}", "@Override\n\tpublic void createControl(Composite parent) {\n\t\tComposite container = new Composite(parent, SWT.NULL);\n\n\t\tsetControl(container);\n\n\t\tString username = \"\";\n\t\tString password = \"\";\n\t\ttry {\n\t\t\tString[] array = window.ds.getURI().getUserInfo().split(\":\");\n\t\t\tusername = array[0];\n\t\t\tpassword = array[1];\n\t\t} catch (Exception e) {\n\t\t}\n\n\t\tLabel lblUsername = new Label(container, SWT.NONE);\n\t\tlblUsername.setBounds(10, 52, 75, 13);\n\t\tlblUsername.setText(\"Username\");\n\n\t\tusernameText = new Text(container, SWT.BORDER);\n\t\tusernameText.setText(username);\n\t\tusernameText.addModifyListener(new ModifyListener() {\n\t\t\t@Override\n\t\t\tpublic void modifyText(ModifyEvent arg0) {\n\t\t\t\tgetWizard().getContainer().updateButtons();\n\t\t\t}\n\t\t});\n\n\t\tusernameText.setBounds(10, 71, 187, 19);\n\t\tusernameText.setFocus();\n\n\t\tLabel lblPassword = new Label(container, SWT.NONE);\n\t\tlblPassword.setBounds(10, 96, 75, 13);\n\t\tlblPassword.setText(\"Password\");\n\n\t\tpasswordText = new Text(container, SWT.BORDER | SWT.PASSWORD);\n\t\tpasswordText.setText(password);\n\t\tpasswordText.addModifyListener(new ModifyListener() {\n\t\t\t@Override\n\t\t\tpublic void modifyText(ModifyEvent arg0) {\n\t\t\t\tgetWizard().getContainer().updateButtons();\n\t\t\t}\n\t\t});\n\n\t\tpasswordText.setBounds(10, 115, 187, 19);\n\t\tControl[] list = null;\n\t\t\n\t\tif (window.ds.usesComponent(IUserCreation.class)) {\n\t\t\tbtnCreateAnNew = new Button(container, SWT.NONE);\n\t\t\tbtnCreateAnNew.addSelectionListener(new SelectionAdapter() {\n\t\t\t\t@Override\n\t\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\t\tLOG.info(\"Create an account\");\n\t\t\t\t\tSignInWithAuthenticationWizard wizard = (SignInWithAuthenticationWizard) getWizard();\n\t\t\t\t\twizard.getWizardDialog().close();\n\t\t\t\t\twindow.newUserAction.run();\n\t\t\t\t\tLOG.info(\"Create an account 2\");\n\t\t\t\t}\n\t\t\t});\n\t\t\tbtnCreateAnNew.setBounds(10, 10, 152, 25);\n\t\t\tbtnCreateAnNew.setText(\"Create a new account\");\n\t\t\tlist = new Control[] { btnCreateAnNew, usernameText,\n\t\t\t\t\tpasswordText };\n\t\t\tcontainer.setTabList(list);\n\t\t} else {\n\t\t\tlist = new Control[] { usernameText,\n\t\t\t\t\tpasswordText };\n\t\t\tcontainer.setTabList(list);\n\t\t}\n\n\t\t\n\t\t\n\t}", "@Override\r\n\t\tpublic void create() {\n\t\t\tsuper.create();\r\n\t\t\tsuper.getOKButton().setEnabled(false);\r\n\t\t\tsuper.setTitle(Messages.MoveUnitsWizardPage1_Topolog__2);\r\n\t\t\tsuper.setMessage(Messages.MoveUnitsWizardPage1_Select_a_name_source_folder_and_a_);\r\n\t\t\tsuper.getShell().setText(Messages.MoveUnitsWizardPage1_Topolog__2);\r\n\t\t}", "void makeDialog()\n\t{\n\t\tfDialog = new ViewOptionsDialog(this.getTopLevelAncestor());\n\t}", "public ReorganizeDialog() { }", "public AdminJP() {\n initComponents();\n aplicarTextPrompt();\n }", "private void initComponents() {\n wizardManager = new JPanel();\n\n //======== this ========\n setTitle(\"Create New Event\");\n setResizable(false);\n setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);\n Container contentPane = getContentPane();\n contentPane.setLayout(new CardLayout(10, 10));\n\n //======== wizardManager ========\n {\n wizardManager.setBorder(new EmptyBorder(0, 0, 0, 0));\n wizardManager.setLayout(new CardLayout());\n }\n contentPane.add(wizardManager, \"card1\");\n pack();\n setLocationRelativeTo(getOwner());\n // JFormDesigner - End of component initialization //GEN-END:initComponents\n }", "public EnterDetailsGUI() {\n initComponents();\n }", "@Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n\n View view = getActivity().getLayoutInflater().inflate(R.layout.rollback_detail_dialog, new LinearLayout(getActivity()), false);\n\n initUI(view);\n // clickEvents();\n\n /*\n assert getArguments() != null;\n voucherTypes = (ArrayList<VoucherType>) getArguments().getSerializable(\"warehouses\");\n voucherType=\"\";\n*/\n\n Dialog builder = new Dialog(getActivity());\n builder.requestWindowFeature(Window.FEATURE_NO_TITLE);\n builder.setContentView(view);\n return builder;\n\n\n }", "public void factoryMainScreen()\n\t{\n\t\t\n\t}", "public TutorialStep1() {\n\n }", "public void addPages() {\n //super.addPages(); //<--- notice we're overriding here\n mainPage = new NewTargetWizardPage(\"newFilePage1\", getSelection());//$NON-NLS-1$\n mainPage.setTitle(TITLE);\n mainPage.setDescription(DESCRIPTION); \n addPage(mainPage);\n }", "public NewCZ_DPPHRProcessPage(){ super(); }", "public Doctor_register() {\n initComponents();\n }", "public void createControl(Composite parent) {\r\n \t\tinitializeDialogUnits(parent);\r\n \r\n \t\tComposite root = new Composite(parent, SWT.NONE);\r\n \t\tGridData gd = new GridData();\r\n \r\n \t\tgd.horizontalSpan = 1;\r\n \t\tgd.horizontalAlignment = GridData.FILL;\r\n \t\tgd.grabExcessHorizontalSpace = true;\r\n \t\tgd.grabExcessVerticalSpace = false;\r\n \r\n \t\tGridLayout gridLayout = new GridLayout(1, false);\r\n \t\troot.setLayout(gridLayout);\r\n \t\tGroup generalGroup = new Group(root, SWT.NONE);\r\n \t\tgeneralGroup.setLayoutData(gd);\r\n \t\tgeneralGroup.setText(SeamUIMessages.SEAM_INSTALL_WIZARD_PAGE_GENERAL);\r\n \t\tgridLayout = new GridLayout(3, false);\r\n \r\n \t\tgeneralGroup.setLayout(gridLayout);\r\n \t\tregisterEditor(jBossSeamHomeEditor, generalGroup, 3);\r\n \t\tregisterEditor(jBossAsDeployAsEditor, generalGroup, 3);\r\n \r\n \t\tgd = new GridData();\r\n \t\tgd.horizontalSpan = 1;\r\n \t\tgd.horizontalAlignment = GridData.FILL;\r\n \t\tgd.grabExcessHorizontalSpace = true;\r\n \t\tgd.grabExcessVerticalSpace = false;\r\n \r\n \t\tGroup databaseGroup = new Group(root, SWT.NONE);\r\n \t\tdatabaseGroup.setLayoutData(gd);\r\n \t\tdatabaseGroup.setText(SeamUIMessages.SEAM_INSTALL_WIZARD_PAGE_DATABASE);\r\n \t\tgridLayout = new GridLayout(4, false);\r\n \t\tdatabaseGroup.setLayout(gridLayout);\r\n \t\tregisterEditor(jBossHibernateDbTypeEditor, databaseGroup, 4);\r\n \t\tregisterEditor(connProfileSelEditor, databaseGroup, 4);\r\n \t\tregisterEditor(dbSchemaName, databaseGroup, 4);\r\n \t\tregisterEditor(dbCatalogName, databaseGroup, 4);\r\n \t\tregisterEditor(dbTablesExists, databaseGroup, 4);\r\n \t\tregisterEditor(recreateTablesOnDeploy, databaseGroup, 4);\r\n \t\t// registerEditor(pathToJdbcDriverJar,databaseGroup, 4);\r\n \r\n \t\tGroup generationGroup = new Group(root, SWT.NONE);\r\n \t\tgd = new GridData();\r\n \t\tgd.horizontalSpan = 1;\r\n \t\tgd.horizontalAlignment = GridData.FILL;\r\n \t\tgd.grabExcessHorizontalSpace = true;\r\n \t\tgd.grabExcessVerticalSpace = false;\r\n \r\n \t\tgenerationGroup.setLayoutData(gd);\r\n \t\tgenerationGroup.setText(SeamUIMessages.SEAM_INSTALL_WIZARD_PAGE_CODE_GENERATION);\r\n \t\tgridLayout = new GridLayout(3, false);\r\n \t\tgenerationGroup.setLayout(gridLayout);\r\n \t\tregisterEditor(sessionBeanPkgNameditor, generationGroup, 3);\r\n \t\tregisterEditor(entityBeanPkgNameditor, generationGroup, 3);\r\n \t\tregisterEditor(testsPkgNameditor, generationGroup, 3);\r\n \r\n \t\tsetControl(root);\r\n \t\tNewProjectDataModelFacetWizard wizard = (NewProjectDataModelFacetWizard) getWizard();\r\n \r\n \t\tIDataModel model = wizard.getDataModel();\r\n \r\n \t\tif (validatorDelegate == null) {\r\n \t\t\tvalidatorDelegate = new DataModelValidatorDelegate(this.model, this);\r\n \t\t\tvalidatorDelegate.addValidatorForProperty(jBossSeamHomeEditor\r\n \t\t\t\t\t.getName(),\r\n \t\t\t\t\tValidatorFactory.SEAM_RUNTIME_NAME_VALIDATOR);\r\n \t\t\tvalidatorDelegate.addValidatorForProperty(connProfileSelEditor\r\n \t\t\t\t\t.getName(),\r\n \t\t\t\t\tValidatorFactory.CONNECTION_PROFILE_VALIDATOR);\r\n \t\t\tvalidatorDelegate.addValidatorForProperty(testsPkgNameditor\r\n \t\t\t\t\t.getName(), new PackageNameValidator(testsPkgNameditor\r\n \t\t\t\t\t.getName(), \"tests\")); //$NON-NLS-1$\r\n \t\t\tvalidatorDelegate.addValidatorForProperty(entityBeanPkgNameditor\r\n \t\t\t\t\t.getName(), new PackageNameValidator(entityBeanPkgNameditor\r\n \t\t\t\t\t.getName(), \"entity beans\")); //$NON-NLS-1$\r\n \t\t\tvalidatorDelegate.addValidatorForProperty(sessionBeanPkgNameditor\r\n \t\t\t\t\t.getName(), new PackageNameValidator(\r\n \t\t\t\t\tsessionBeanPkgNameditor.getName(), \"session beans\")); //$NON-NLS-1$\r\n \t\t\tvalidatorDelegate.addValidatorForProperty(\r\n \t\t\t\t\tIFacetDataModelProperties.FACET_PROJECT_NAME, \r\n \t\t\t\t\tnew ProjectNamesDuplicationValidator(\r\n \t\t\t\t\t\t\tIFacetDataModelProperties.FACET_PROJECT_NAME));\r\n \t\t}\r\n \r\n \t\tjBossHibernateDbTypeEditor\r\n \t\t\t\t.addPropertyChangeListener(new PropertyChangeListener() {\r\n \t\t\t\t\tpublic void propertyChange(PropertyChangeEvent evt) {\r\n \t\t\t\t\t\tSeamInstallWizardPage.this.model.setProperty(ISeamFacetDataModelProperties.HIBERNATE_DIALECT,\r\n \t\t\t\t\t\tHIBERNATE_HELPER.getDialectClass(evt.getNewValue().toString()));\r\n \t\t\t\t\t}\r\n \t\t\t\t}\r\n \t\t\t);\r\n \r\n\r\n\r\n Dialog.applyDialogFont(parent);\r\n \t}", "public Successful_Registration() {\n initComponents();\n }", "public Create_Course() {\n initComponents();\n comboBoxLec();\n comboBoxDep();\n }", "private void newGame()\r\n {\r\n //close the current screen\r\n screen.dispose();\r\n //start back at the set up menu\r\n SetupView screen = new SetupView();\r\n SetupController controller = new SetupController(screen);\r\n screen.registerObserver(controller);\r\n }", "public void popupAdd() {\n builder = new AlertDialog.Builder(getView().getContext());\n View views = getLayoutInflater().inflate(R.layout.departmentpopup, (ViewGroup) null);\n DepartmentName = (EditText) views.findViewById(R.id.department_name);\n DepartmentId = (EditText) views.findViewById(R.id.department_id);\n pbar =views.findViewById(R.id.departmentProgress);\n Button button =views.findViewById(R.id.save_depart);\n saveButton = button;\n button.setOnClickListener(new View.OnClickListener() {\n public void onClick(View view) {\n addDeparatments();\n }\n });\n builder.setView(views);\n AlertDialog create =builder.create();\n dialog = create;\n create.show();\n }", "public void initialize(TemplateWizard wiz) {\n this.wizard = wiz;\n }", "public exerciseAddGUI() {\n initComponents();\n }", "public void widgetSelected(SelectionEvent arg0) {\n\t\t\t\tIWorkbenchWizard wizard = new BasicNewProjectResourceWizard();\r\n\t\t\t\twizard.init(PlatformUI.getWorkbench(), new TreeSelection());\r\n\t\t\t\tWizardDialog dialog = new WizardDialog(getShell(), wizard);\r\n\t\t\t\tdialog.open();\r\n\t\t\t\tif (outputChooserTreeViewer.getTree().getItemCount() == 1) {\t\t\t\t\t\r\n\t\t\t\t\tvalidatePage();\r\n\t\t\t\t}\r\n\t\t\t}", "public interface WizardActions {\n\n /**\n * Return the options back to default\n */\n public void returnDefault();\n\n /**\n * Apply the current settings without closing the wizard page\n */\n public void apply();\n\n /**\n * Save the current settings\n */\n public void save();\n\n}", "public CreateAccount() {\n initComponents();\n selectionall();\n }", "public void addPages() {\n\t\t\n\t\tProjectUtils projectUtils = new ProjectUtils();\n\t\tIProject proj = projectUtils.getProject(selection);\n\t\t\n\t\t\n\t\t\n\t\tDb db = loadDBParams();\n\t\tDBConnection dbConn = new DBConnection();\n\t\tConnection connection = null;\n\t\t\n\t\t\n\t\ttry {\n\t\t\tconnection = dbConn.loadDriver(proj.getLocation()+\"/\"+db.getDriverClassPath(), db.getDriverClass(), db.getDatabaseURL(), db.getUserName(), db.getPassWord());\n\t\t} catch (MalformedURLException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (InstantiationException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IllegalAccessException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (ClassNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\t\n\t\tpage = new SmartNewWizardPage(selection, connection, proj.getLocation().toString());\n\t\taddPage(page);\n\n\t}", "NewAccountPage openNewAccountPage();", "public ChoosePagePresenter() {\n// mGetKnowledgeHierarchyDataFromNet = new GetKnowledgeHierarchyDataFromNet();\n dataManager = DataManager.getInstance();\n }", "public RegisterUserDialog(Admin admin) { \n\t\tthis.admin = admin;\n\t\tUserDialog dialog = new UserDialog(this);\n\t\tsetLayout(new FlowLayout()); \n\t\tpack();\n\t\t// Set window location in middle of screen\n\t\tdialog.setLocationRelativeTo(null);\n\t\t// Display window\n\t\tdialog.setVisible(true);\n\t }", "@Override\n protected void done() \n {\n ws.dispose();\n dispose();\n Gender_screen gs=new Gender_screen(ClientSide1);\n gs.addWindowListener(new WindowAdapter() \n {\n public void windowClosing(WindowEvent we) \n {\n int result = JOptionPane.showConfirmDialog(gs,\"Jesteś pewien, że chcesz zamknąc program?\", \"Potwierdzenie\",JOptionPane.YES_NO_OPTION);\n if(result == JOptionPane.YES_OPTION)\n gs.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n else if(result == JOptionPane.NO_OPTION)\n gs.setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);\n }\n });\n gs.setLocationRelativeTo(null);\n gs.setVisible(true);\n }", "public GuidedWizardPanel()\r\n\t{\t\r\n\t\tVerticalPanel panel = new VerticalPanel();\r\n\t\t\r\n\t\twizardPanel = new WizardPanel(panelList, groupLabels);\r\n\t\twizardPanel.addSaveListener(this);\r\n\t\tpanel.add(wizardPanel);\r\n\r\n\t\t// set up listener relationships\r\n\t\tsolvingForPanel.addSolvingForListener(powerPanel);\r\n\t\tsolvingForPanel.addSolvingForListener(perGroupSampleSizePanel);\r\n\t\tsolvingForPanel.addSolvingForListener(resultsPanel);\r\n\t\t// listeners for outcome measures\r\n\t\toutcomesPanel.addOutcomesListener(hypothesisIndependentPanel);\r\n\t\toutcomesPanel.addOutcomesListener(hypothesisRepeatedPanel);\r\n\t\toutcomesPanel.addOutcomesListener(meanDifferencesIndependentPanel);\r\n\t\toutcomesPanel.addOutcomesListener(meanDifferencesPanel);\r\n\t\toutcomesPanel.addOutcomesListener(variabilityIndependentPanel);\r\n\t\toutcomesPanel.addOutcomesListener(variabilityRepeatedPanel);\r\n\t\toutcomesPanel.addOutcomesListener(variabilityCovariateOutcomePanel);\r\n\t\t// listeners for predictor information\r\n\t\tcatPredictorsPanel.addPredictorsListener(relativeGroupSizePanel);\r\n\t\tcatPredictorsPanel.addPredictorsListener(hypothesisIndependentPanel);\r\n\t\tcatPredictorsPanel.addPredictorsListener(hypothesisRepeatedPanel);\r\n\t\tcatPredictorsPanel.addPredictorsListener(meanDifferencesIndependentPanel);\r\n\t\tcatPredictorsPanel.addPredictorsListener(meanDifferencesPanel);\r\n\t\t// listeners for relative group sizes\r\n\t\trelativeGroupSizePanel.addRelativeGroupSizeListener(hypothesisIndependentPanel);\r\n\t\trelativeGroupSizePanel.addRelativeGroupSizeListener(hypothesisRepeatedPanel);\r\n\t\t// listeners for baseline covariates\r\n\t\tcovariatePanel.addCovariateListener(meanDifferencesIndependentPanel);\r\n\t\tcovariatePanel.addCovariateListener(meanDifferencesPanel);\r\n\t\t// TODO: covariatePanel.addCovariateListener(meanDifferencesRepeatedPanel);\r\n\t\tcovariatePanel.addCovariateListener(hypothesisIndependentPanel);\r\n\t\tcovariatePanel.addCovariateListener(hypothesisRepeatedPanel);\r\n\t\tcovariatePanel.addCovariateListener(variabilityIndependentPanel);\r\n\t\t// TODO: covariatePanel.addCovariateListener(variabilityRepeatedPanel);\r\n\t\tcovariatePanel.addCovariateListener(variabilityCovariatePanel);\r\n\t\tcovariatePanel.addCovariateListener(variabilityCovariateOutcomePanel);\r\n\t\tcovariatePanel.addCovariateListener(optionsTestsPanel);\r\n\t\tcovariatePanel.addCovariateListener(optionsPowerMethodsPanel);\r\n\t\t// listeners for repeated measures \r\n\t\trepeatedMeasuresPanel.addRepeatedMeasuresListener(hypothesisIndependentPanel);\r\n\t\trepeatedMeasuresPanel.addRepeatedMeasuresListener(hypothesisRepeatedPanel);\r\n\t\t// listeners for hypotheses\r\n\t\thypothesisIndependentPanel.addHypothesisListener(meanDifferencesIndependentPanel);\r\n\t\thypothesisRepeatedPanel.addHypothesisListener(meanDifferencesRepeatedPanel);\r\n\t\t// group size listeners\r\n\t\trelativeGroupSizePanel.addRelativeGroupSizeListener(hypothesisIndependentPanel);\r\n\t\t// variability listeners\r\n\t\tvariabilityIndependentPanel.addVariabilityListener(variabilityCovariateOutcomePanel);\r\n\t\tvariabilityCovariatePanel.addVariabilityListener(variabilityCovariateOutcomePanel);\r\n\t\toptionsDisplayPanel.addChartOptionsListener(resultsPanel);\r\n\t\t// callbacks to fill in the power curve options screen\r\n\t\talphaPanel.addAlphaListener(optionsDisplayPanel);\r\n\t\toptionsTestsPanel.addTestListener(optionsDisplayPanel);\r\n\t\toptionsPowerMethodsPanel.addPowerMethodListener(optionsDisplayPanel);\r\n\t\toptionsPowerMethodsPanel.addQuantileListener(optionsDisplayPanel);\r\n\t\toptionsPowerMethodsPanel.addQuantileCheckboxListener(optionsDisplayPanel);\r\n\t\toptionsPowerMethodsPanel.addPowerCheckboxListener(optionsDisplayPanel);\r\n\t\tmeanDifferencesScalePanel.addBetaScaleListener(optionsDisplayPanel);\r\n\t\tperGroupSampleSizePanel.addPerGroupSampleSizeListener(optionsDisplayPanel);\r\n\t\trelativeGroupSizePanel.addRelativeGroupSizeListener(optionsDisplayPanel);\r\n\t\tvariabilityScalePanel.addSigmaScaleListener(optionsDisplayPanel);\r\n\t\t// initialize\r\n\t\tinitWidget(panel);\r\n\t}", "public DictAccountRegistrationWizard(WizardContainer wizardContainer)\n {\n this.wizardContainer = wizardContainer;\n }", "public static AddNewScheduleDialog createInstance(int quantity){\n AddNewScheduleDialog frag = new AddNewScheduleDialog();\n frag.quantity = quantity;\n return frag;\n }", "public WizardPanel(String wizardTitle, String wizardDescription, Icon wizardIcon, Icon welcomeIcon, Dimension wizarddimensions,\n\t\t\tJLabel welcomeLabel) {\n\t\tthis.wizardIcon = wizardIcon;\n\t\tthis.welcomeTitle = wizardTitle;\n\t\tthis.welcomeDescription = wizardDescription;\n\t\twelcomePage = new WizardWelcomePanel(welcomeTitle, welcomeDescription, welcomeIcon, welcomeLabel);\n\t\tthis.finishedPage = new WizardFinishPanel();\n\t\tfinishedPage.setIcon(welcomeIcon);\n\t\ttry {\n\t\t\tjbInit();\n\t\t} catch (Exception ex) {\n\t\t\tex.printStackTrace();\n\t\t}\n\t}", "@Override\r\n\t protected Dialog onCreateDialog(int id) {\n\t \r\n\t screenDialog = null;\r\n\t switch(id){\r\n\t case(ID_SCREENDIALOG):\r\n\t screenDialog = new Dialog(this);\r\n\t screenDialog.setContentView(R.layout.message);\r\n\t messageText=(EditText)screenDialog.findViewById(R.id.messagetext1);\r\n\t send=(Button)screenDialog.findViewById(R.id.button1);\r\n\t send.setOnClickListener(sendmessage);\r\n\t cancel=(Button)screenDialog.findViewById(R.id.button2);\r\n\t cancel.setOnClickListener(cancelmessage);\r\n\t }\r\n\t return screenDialog;\r\n\t }", "public StandardDialog() {\n super();\n init();\n }", "protected void setupUI() {\n\n }", "public void testWizards() {\n // open new file wizard\n NewFileWizardOperator nfwo = NewFileWizardOperator.invoke();\n nfwo.selectProject(\"SampleProject\");\n nfwo.selectCategory(\"Java\");\n nfwo.selectFileType(\"Java Class\");\n // go to next page\n nfwo.next();\n // create operator for the next page\n NewJavaFileNameLocationStepOperator nfnlso = new NewJavaFileNameLocationStepOperator();\n nfnlso.txtObjectName().typeText(\"MyNewClass\");\n // finish wizard\n //nfnlso.finish();\n // cancel wizard\n nfnlso.cancel();\n }", "public WCreateExam() {\n initComponents();\n setLocationRelativeTo(null);\n this.setExamID();\n this.updateTable();\n }", "private void initDialog() {\n Window subWindow = new Window(\"Sub-window\");\n \n FormLayout nameLayout = new FormLayout();\n TextField code = new TextField(\"Code\");\n code.setPlaceholder(\"Code\");\n \n TextField description = new TextField(\"Description\");\n description.setPlaceholder(\"Description\");\n \n Button confirm = new Button(\"Save\");\n confirm.addClickListener(listener -> insertRole(code.getValue(), description.getValue()));\n\n nameLayout.addComponent(code);\n nameLayout.addComponent(description);\n nameLayout.addComponent(confirm);\n \n subWindow.setContent(nameLayout);\n \n // Center it in the browser window\n subWindow.center();\n\n // Open it in the UI\n UI.getCurrent().addWindow(subWindow);\n\t}", "public ElegirTipoBienWizard(String locale)\r\n {\r\n \t this.locale=locale;\r\n try{\r\n initComponents();\r\n renombrarComponentes();\r\n \r\n } catch (Exception e){\r\n logger.error(\"Error al importar actividades economicas\",e);\r\n }\r\n }", "public employeeTardinessGUI() {\n initComponents();\n\n }", "public void addPages() {\n\t\tpage = new NewTotoriWizardPage(selection);\n\t\taddPage(page);\n\t}", "private void generateScreen(String form,String text) throws IOException {\r\n \r\n MainScreenController.formName = text;\r\n Stage stage = new Stage();\r\n Parent root = FXMLLoader.load(getClass().getResource(form));\r\n stage.setScene(new Scene(root));\r\n stage.initModality(Modality.APPLICATION_MODAL);\r\n stage.initOwner(partAddBtn.getScene().getWindow());\r\n stage.showAndWait();\r\n \r\n }", "private void createAndShowGUI (){\n\n JustawieniaPowitalne = new JUstawieniaPowitalne();\n }", "public abstract Dialog createDialog(DialogDescriptor descriptor);", "private ShowCreateAnswerPage() {\n this.service = UserService.retrieve();\n this.validator = Validator.retrieve();\n }", "public NewRoomFrame() {\n initComponents();\n }", "@Override\r\n public Dialog onCreateDialog(Bundle savedInstanceState) {\r\n //use the builder class for convenient dialog construction\r\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\r\n //get the layout inflater\r\n LayoutInflater inflater = getActivity().getLayoutInflater();\r\n View rootView = inflater.inflate(R.layout.dialog_room, null);\r\n mRoomNumber = rootView.findViewById(R.id.roomNumberEditText);\r\n mAllergy = rootView.findViewById(R.id.allergyEditText);\r\n mPlateType = rootView.findViewById(R.id.plateTypeEditText);\r\n mChemicalDiet = rootView.findViewById(R.id.chemicalDietEditText);\r\n mTextureDiet = rootView.findViewById(R.id.textureDietEditText);\r\n mLiquidDiet = rootView.findViewById(R.id.liquidDietEditText);\r\n mLikes = rootView.findViewById(R.id.likesEditText);\r\n mDislikes = rootView.findViewById(R.id.dislikesEditText);\r\n mNotes = rootView.findViewById(R.id.notesEditText);\r\n mMeal = rootView.findViewById(R.id.mealEditText);\r\n mDessert = rootView.findViewById(R.id.dessertEditText);\r\n mBeverage = rootView.findViewById(R.id.beverageEditText);\r\n\r\n mBeverage.setOnEditorActionListener(new TextView.OnEditorActionListener() {\r\n @Override\r\n public boolean onEditorAction(TextView textView, int i, KeyEvent keyEvent) {\r\n if (i == EditorInfo.IME_ACTION_DONE || keyEvent.getAction() == KeyEvent.ACTION_DOWN){\r\n addRoom();\r\n }\r\n return true;\r\n }\r\n });\r\n\r\n //inflate and set the layout for the dialog\r\n //pass null as the parent view cause its going in the dialog layout.\r\n builder.setView(rootView).setPositiveButton(R.string.button_done, new DialogInterface.OnClickListener() {\r\n @Override\r\n public void onClick(DialogInterface dialogInterface, int i) {\r\n addRoom();\r\n }\r\n });\r\n\r\n return builder.create();\r\n }", "public CreditsScreen()\n {\n }", "@Override\n public void addPages() {\n super.addPages();\n page1 = new NewReviewWizardPage();\n addPage(page1);\n }", "protected DummyWizardPage()\n {\n super( \"\" ); //$NON-NLS-1$\n setTitle( Messages.getString( \"NewEntryWizard.NoConnectonSelected\" ) ); //$NON-NLS-1$\n setDescription( Messages.getString( \"NewEntryWizard.NoConnectonSelectedDescription\" ) ); //$NON-NLS-1$\n setImageDescriptor( BrowserCommonActivator.getDefault().getImageDescriptor(\n BrowserCommonConstants.IMG_ENTRY_WIZARD ) );\n setPageComplete( true );\n }", "public void onCreate() {\r\n Session session = sessionService.getCurrentSession();\r\n Map<String, Region> items = ControlUtility.createForm(Pc.class);\r\n\r\n ControlUtility.fillComboBox((ComboBox<Kind>) items.get(\"Kind\"), session.getCampaign().getCampaignVariant().getKinds());\r\n ControlUtility.fillComboBox((ComboBox<Race>) items.get(\"Race\"), session.getCampaign().getCampaignVariant().getRaces());\r\n ControlUtility.fillCheckComboBox((CheckComboBox<Ability>) items.get(\"SavingThrows\"), Arrays.asList(Ability.values()));\r\n ControlUtility.fillCheckComboBox((CheckComboBox<Proficiency>) items.get(\"Proficiencies\"), session.getCampaign().getCampaignVariant().getProficiencies());\r\n ControlUtility.fillCheckComboBox((CheckComboBox<Feature>) items.get(\"Features\"), session.getCampaign().getCampaignVariant().getFeatures());\r\n ControlUtility.fillCheckComboBox((CheckComboBox<Trait>) items.get(\"Traits\"), session.getCampaign().getCampaignVariant().getTraits());\r\n ControlUtility.fillCheckComboBox((CheckComboBox<Equipment>) items.get(\"Equipment\"), session.getCampaign().getCampaignVariant().getEquipments());\r\n\r\n Campaign campaign = session.getCampaign();\r\n\r\n Dialog<String> dialog = ControlUtility.createDialog(\"Create Playable Character\", items);\r\n dialog.show();\r\n\r\n dialog.setResultConverter(buttonType -> {\r\n if (buttonType != null) {\r\n Pc pc = null;\r\n try {\r\n pc = ControlUtility.controlsToValues(Pc.class, items);\r\n } catch (NoSuchMethodException | IllegalAccessException | InvocationTargetException | InstantiationException | ClassNotFoundException e) {\r\n e.printStackTrace();\r\n }\r\n if (pc != null) {\r\n try {\r\n characterService.createPlayerCharacter(pc);\r\n } catch (SessionAlreadyExists | IndexAlreadyExistsException sessionAlreadyExists) {\r\n sessionAlreadyExists.printStackTrace();\r\n }\r\n try {\r\n playerManagementService.addOrUpdatePcForRegisteredPlayer(pc);\r\n Player player = playerManagementService.getRegisteredPlayer();\r\n campaign.addPlayer(player);\r\n campaign.addCharacter(pc);\r\n if (campaignListingService.campaignExists(campaign.getId())) {\r\n manipulationService.updateCampaign(campaign);\r\n } else {\r\n manipulationService.createCampaign(campaign);\r\n }\r\n } catch (MultiplePlayersException | EntityNotFoundException | SessionAlreadyExists | IndexAlreadyExistsException e) {\r\n e.printStackTrace();\r\n }\r\n try {\r\n playerManagementService.addOrUpdatePcForRegisteredPlayer(pc);\r\n } catch (MultiplePlayersException | EntityNotFoundException e) {\r\n e.printStackTrace();\r\n }\r\n try {\r\n sessionService.updateParticipant(playerManagementService.getRegisteredPlayer().getId(), pc.getId());\r\n sessionService.updateCampaign(campaign);\r\n } catch (EntityNotFoundException e) {\r\n e.printStackTrace();\r\n }\r\n render();\r\n return pc.toString();\r\n }\r\n }\r\n return null;\r\n });\r\n }", "public addteacher() {\n initComponents();\n }", "public DialogManager() {\n }", "public void testSetModal() {\n System.out.println(\"setModal\");\n boolean b = false;\n Wizard instance = new Wizard();\n instance.setModal(b);\n }", "public Petitioner_Details() {\n initComponents();\n }", "private void startMealToDatabaseAlert() {\n AlertDialog.Builder dialogBuilder = new AlertDialog.Builder(this);\n TextView dialogTitle = new TextView(this);\n int blackValue = Color.parseColor(\"#000000\");\n dialogTitle.setText(R.string.title_dialog_meal);\n dialogTitle.setGravity(Gravity.CENTER_HORIZONTAL);\n dialogTitle.setPadding(0, 30, 0, 0);\n dialogTitle.setTextSize(25);\n dialogTitle.setTextColor(blackValue);\n dialogBuilder.setCustomTitle(dialogTitle);\n View dialogView = getLayoutInflater().inflate(R.layout.dialog_add_meal, null);\n\n this.startEditTexts(dialogView);\n this.startLocationSpinner(dialogView);\n this.startAddPhotoButton(dialogView);\n this.startMealDialogButtonListeners(dialogBuilder);\n\n dialogBuilder.setView(dialogView);\n AlertDialog permission_dialog = dialogBuilder.create();\n permission_dialog.show();\n }", "public WizardContainer getWizardContainer()\n {\n return wizardContainer;\n }", "public Secondpage6() {\n initComponents();\n }", "public PreparePartyWizard(boolean bProvidedPlaylist, Playlist playlist) {\n super(new Wizard.Builder(Messages.getString(\"PreparePartyWizard.1\"),\n bProvidedPlaylist ? PreparePartyWizardGeneralOptionsScreen.class\n : PreparePartyWizardActionSelectionScreen.class, JajukMainWindow.getInstance())\n .hSize(800).vSize(600).locale(LocaleManager.getLocale())\n .icon(IconLoader.getIcon(JajukIcons.PREPARE_PARTY_32X32)));\n if (playlist != null) {\n setPlaylist(playlist);\n }\n restoreProperties();\n }", "public tool() {\n initComponents();\n }", "public Add_E() {\n initComponents();\n this.setTitle(\"Add Engineer\");\n }" ]
[ "0.67116183", "0.65649754", "0.65217614", "0.6445027", "0.64292574", "0.6427119", "0.640502", "0.6376776", "0.63703406", "0.63018876", "0.62722176", "0.62502277", "0.6153948", "0.6125835", "0.6111364", "0.6074977", "0.6028841", "0.5966401", "0.59663427", "0.5957825", "0.5951448", "0.5938749", "0.59344757", "0.59104174", "0.5909286", "0.59039384", "0.58933973", "0.5857081", "0.5838497", "0.5826299", "0.58224285", "0.58061737", "0.57807815", "0.5780554", "0.578019", "0.5740829", "0.57362324", "0.57321495", "0.57194763", "0.57134944", "0.57116675", "0.57058185", "0.56929386", "0.56923187", "0.5690457", "0.5686963", "0.5677829", "0.5670952", "0.5659622", "0.5648197", "0.5636973", "0.5632302", "0.56314653", "0.56310266", "0.5630386", "0.56299996", "0.56156254", "0.56145203", "0.56108105", "0.5603527", "0.5603401", "0.55995214", "0.55982107", "0.5584194", "0.557971", "0.55785537", "0.5576573", "0.55701953", "0.5555954", "0.55463374", "0.5544739", "0.5544157", "0.55404025", "0.55295414", "0.55269927", "0.55246115", "0.55236286", "0.55191463", "0.551723", "0.5508658", "0.5507066", "0.5505901", "0.55026346", "0.55002177", "0.54995924", "0.54941255", "0.5488834", "0.5482334", "0.5480336", "0.54721963", "0.54703844", "0.5470323", "0.54675364", "0.54556537", "0.5452821", "0.5449318", "0.5448714", "0.54421496", "0.5437898", "0.5431426", "0.54199505" ]
0.0
-1
This method initializes compositeGoodsMange
private void createCompositeGoodsMange() { GridLayout gridLayout = new GridLayout(); gridLayout.numColumns = 3; compositeGoodsMange = new Composite(tabFolder, SWT.NONE); compositeGoodsMange.setLayout(gridLayout); compositeGoodsMange.setSize(new Point(500, 400)); buttonAddGoods = new Button(compositeGoodsMange, SWT.NONE); buttonAddGoods.setText("增加商品"); buttonAddGoods.addSelectionListener(new SelectionListener() { @Override public void widgetSelected(SelectionEvent arg0) { // TODO Auto-generated method stub InputDialog id1=new InputDialog(sShell,"新增商品","输入商品信息,用空格分开,例如:001 方便面 6.8","",null); if(id1.open()==0){ input=id1.getValue(); if(input.equals("")) return; } else return; String str[]=input.split(" "); CommonADO ado=CommonADO.getCommonADO(); String sql="insert into Goods values('"+str[0]+"','"+str[1]+"','"+str[2]+"')"; ado.executeUpdate(sql); compositeGoodsShow.dispose(); createCompositeGoodsShow(); compositeGoodsMange.layout(true); //compositeGoodsShow.layout(true); } @Override public void widgetDefaultSelected(SelectionEvent arg0) { // TODO Auto-generated method stub } }); label = new Label(compositeGoodsMange, SWT.NONE); label.setText(" "); buttonDeleteGoods = new Button(compositeGoodsMange, SWT.NONE); buttonDeleteGoods.setText("删除商品"); buttonDeleteGoods.addSelectionListener(new SelectionListener() { @Override public void widgetSelected(SelectionEvent arg0) { // TODO Auto-generated method stub InputDialog id1=new InputDialog(sShell,"删除商品","输入商品编号","",null); if(id1.open()==0){ input=id1.getValue(); if(input.equals("")) return; } else return; CommonADO ado=CommonADO.getCommonADO(); String sql="delete from Goods where GoodsNo='"+input+"'"; ado.executeUpdate(sql); //createCompositeGoodsShow(); compositeGoodsShow.dispose(); createCompositeGoodsShow(); compositeGoodsMange.layout(true); } @Override public void widgetDefaultSelected(SelectionEvent arg0) { // TODO Auto-generated method stub } }); createCompositeGoodsShow(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void createCompositeGoodsShow() {\r\n\t\tGridData gridData4 = new GridData();\r\n\t\tgridData4.grabExcessHorizontalSpace = true;\r\n\t\tgridData4.horizontalSpan = 3;\r\n\t\tgridData4.heightHint = 380;\r\n\t\tgridData4.widthHint = 560;\r\n\t\tgridData4.grabExcessVerticalSpace = true;\r\n\t\tGridLayout gridLayout3 = new GridLayout();\r\n\t\tgridLayout3.numColumns = 3;\r\n\t\tcompositeGoodsShow = new Composite(compositeGoodsMange, SWT.NONE);\r\n\t\tcompositeGoodsShow.setLayout(gridLayout3);\r\n\t\tcompositeGoodsShow.setLayoutData(gridData4);\r\n\t\tdisplayRoom(compositeGoodsShow);\r\n\t}", "public void initialize() {\n\t\tcompartmentName = new SimpleStringProperty(compartment.getName());\t\t\n\t\tcompartmentId = new SimpleStringProperty(compartment.getId());\n\t\tcompartmentSBOTerm = new SimpleStringProperty(compartment.getSBOTermID());\n\t}", "public CompositeData()\r\n {\r\n }", "@PostConstruct\n void init() {\n try {\n parameter = 0;\n inmuebleEntityObj = new InmuebleEntity();\n tipoInmuebleEntityObj = new TipoInmuebleEntity();\n localidadEntityObj = new LocalidadEntity();\n propiedadEntityObj = new PropiedadEntity();\n tipoInmuebleEntityList = selectOptions.cbxTipoInmueble();\n propiedadEntityList = selectOptions.cbxPropiedad(true);\n localidadEntityObj = new LocalidadEntity();\n municipioEntityObj = new MunicipioEntity();\n departamentoEntityObj = new DepartamentoEntity();\n provinciaEntityObj = new ProvinciaEntity();\n tipoInmuebleEntityList = selectOptions.cbxTipoInmueble();\n propiedadEntityList = selectOptions.cbxPropiedad(true);\n departamentoEntityList = selectOptions.cbxDepartamento();\n setEstadoProvincia(true);\n setEstadoMunicipio(true);\n setEstadoLocalidad(true);\n validateParameter = beanApplicationContext.getMapValidateParameters();\n miscParameter = beanApplicationContext.getMapMiscellaneousParameters();\n mapaPropiedades = new MapaGoole(miscParameter.get(EnumParametros.LATITUD_CENTER_MAPA.toString()) + \",\" + miscParameter.get(EnumParametros.LONGITUD_CENTER_MAPA.toString()),\n miscParameter.get(EnumParametros.ZOOM_MAPA.toString()),\n miscParameter.get(EnumParametros.TIPO_MAPA.toString()));\n } catch (Exception e) {\n logger.error(\"[init] Fallo en el init.\", e);\n }\n }", "public void init(){\n\t\tEmployee first = new Employee(\"Diego\", \"Gerente\", \"[email protected]\");\n\t\tHighSchool toAdd = new HighSchool(\"Santiago Apostol\", \"4656465\", \"cra 33a #44-56\", \"3145689879\", 30, 5000, \"Jose\", new Date(1, 3, 2001), 3, \"Servicios educativos\", \"451616\", 15, \"Piedrahita\", 45, 1200, 500);\n\t\ttoAdd.addEmployee(first);\n\t\tProduct pilot = new Product(\"jet\", \"A00358994\", 1.5, 5000);\n\t\tFood firstFood = new Food(\"Colombina\", \"454161\", \"cra 18\", \"454611313\", 565, 60000, \"Alberto\", new Date(1, 8, 2015), 6, \"Manufactura\", 4);\n\t\tfirstFood.addProduct(pilot);\n\t\ttheHolding = new Holding(\"Hertz\", \"15545\", \"cra 39a #30a-55\", \"3147886693\", 80, 500000, \"Daniel\", new Date(1, 2, 2015), 5);\n\t\ttheHolding.addSubordinate(toAdd);\n\t\ttheHolding.addSubordinate(firstFood);\n\t}", "public void inicialisation(){\r\n\t\t\r\n\t\tgoods = new AutoParts[0];\r\n\t\tclient = new Client[0];\r\n\t\t\r\n\t\tshop = new Shopping[0];\r\n\t\tsale = new Sale[0];\r\n\t\ttransaction = new Document[0];\r\n\t\t\r\n\t\tbalancesAutoParts = new BalancesAutoParts[0];\r\n\t\t\r\n\t\tprices = new Prices[0];\r\n\t\t\r\n\t\tagriment = new Agreement[0];\r\n\t\t\r\n\t}", "private void initialize() {\nproductCatalog.add(new ProductStockPair(new Product(100.0, \"SYSC2004\", 0), 76));\nproductCatalog.add(new ProductStockPair(new Product(55.0, \"SYSC4906\", 1), 0));\nproductCatalog.add(new ProductStockPair(new Product(45.0, \"SYSC2006\", 2), 32));\nproductCatalog.add(new ProductStockPair(new Product(35.0, \"MUSI1001\", 3), 3));\nproductCatalog.add(new ProductStockPair(new Product(0.01, \"CRCJ1000\", 4), 12));\nproductCatalog.add(new ProductStockPair(new Product(25.0, \"ELEC4705\", 5), 132));\nproductCatalog.add(new ProductStockPair(new Product(145.0, \"SYSC4907\", 6), 322));\n}", "public ProductoAbm() {\n initComponents();\n }", "@PostConstruct\r\n\tpublic void init() {\n\t\tstockService.create(new Stock(\"PROD 1\", BigDecimal.ONE));\r\n\t\tstockService.create(new Stock(\"PROD 2\", BigDecimal.TEN));\r\n\t\tstockService.create(new Stock(\"PROD 3\", new BigDecimal(12.123)));\r\n\t}", "private void init()\n\t{\n\t\tsetModel(new Model(Id.model, this, null));\n\t\tsetEnviroment(new Enviroment(Id.enviroment, this, model()));\n\t\tsetVaccinationCenter(new VaccinationCenter(Id.vaccinationCenter, this, model()));\n\t\tsetCanteen(new Canteen(Id.canteen, this, vaccinationCenter()));\n\t\tsetRegistration(new Registration(Id.registration, this, vaccinationCenter()));\n\t\tsetExamination(new Examination(Id.examination, this, vaccinationCenter()));\n\t\tsetVaccination(new Vaccination(Id.vaccination, this, vaccinationCenter()));\n\t\tsetWaitingRoom(new WaitingRoom(Id.waitingRoom, this, vaccinationCenter()));\n\t\tsetSyringes(new Syringes(Id.syringes, this, vaccination()));\n\t}", "private void initComponents(inventorycontroller.function.DbInterface dbi) {\n \tdbInterface1=dbi;\n \tpoAmount=\"0\";\n \tpoType=-1;\n \tresetPerforming=false;\n\t selectedBomList=null;\n\t bomList=null;\n\t bomDet=null;\n\t itmList=null;\n\t poDet=null;\n\t vndList=null;\n\t poDetType=new java.lang.Class[] {\n\t \tjava.lang.Short.class,\n\t \tjava.lang.String.class,\n\t \tjava.lang.Long.class,\n\t \tjava.lang.Double.class,\n\t \tjava.lang.Double.class,\n\t \tjava.lang.Double.class,\n\t \tjava.lang.Double.class,\n\t \tjava.lang.Double.class,\n\t \tjava.lang.Double.class,\n\t \tjava.lang.Double.class,\n\t \tjava.lang.Double.class,\n\t \tjava.lang.Double.class,\n\t \tjava.lang.Double.class,\n\t \tjava.lang.Double.class,\n\t \tjava.lang.Double.class,\n\t \tjava.lang.Double.class,\n\t \tjava.lang.Double.class,\n\t \tjava.lang.Double.class,\n\t };\n\t poDetEditableForBM=new boolean[18];\n\t poDetEditableForLP=new boolean[18];\n\t for (int i = 0; i<18; i++){\n\t\t poDetEditableForBM[i]=true;\n\t\t poDetEditableForLP[i]=true;\n\t }\n\t poDetEditableForBM[0]=false;\n\t poDetEditableForBM[1]=false;\n\t poDetEditableForBM[2]=false;\n\t poDetEditableForBM[4]=false;\n\t poDetEditableForBM[17]=false;\n\t poDetEditableForLP[0]=false;\n\t poDetEditableForLP[1]=false;\n\t poDetEditableForLP[4]=false;\n\t poDetEditableForLP[17]=false;\n\t poDetEditable=null;\n\t addedBom=new java.util.Vector<String>(); \n\t addedBomDet=new java.util.Vector<java.util.Vector<String>>(); \n\t \n \t\n jLabel1 = new javax.swing.JLabel();\n jPanel1 = new javax.swing.JPanel();\n jTabbedPane1 = new javax.swing.JTabbedPane();\n jPanel3 = new javax.swing.JPanel();\n buttonGroup1 = new javax.swing.ButtonGroup();\n jRadioButton1 = new javax.swing.JRadioButton();\n jRadioButton2 = new javax.swing.JRadioButton();\n jLabel2 = new javax.swing.JLabel();\n jLabel3 = new javax.swing.JLabel();\n jLabel4 = new javax.swing.JLabel();\n jLabel5 = new javax.swing.JLabel();\n jLabel6 = new javax.swing.JLabel();\n jTextField2 = new javax.swing.JComboBox();\n jSpinner1 = new javax.swing.JSpinner();\n jTextField1 = new javax.swing.JLabel();\n jTextField3 = new javax.swing.JTextField();\n jSpinner2 = new javax.swing.JSpinner();\n jLabel7 = new javax.swing.JLabel();\n jScrollPane2 = new javax.swing.JScrollPane();\n jEditorPane1 = new javax.swing.JEditorPane();\n jLabel8 = new javax.swing.JLabel();\n jButton6 = new javax.swing.JButton();\n jScrollPane1 = new javax.swing.JScrollPane();\n jList1 = new javax.swing.JList();\n jPanel4 = new javax.swing.JPanel();\n jPanel5 = new javax.swing.JPanel();\n jScrollPane3 = new javax.swing.JScrollPane();\n jTable1 = new javax.swing.JTable();\n jLabel9 = new javax.swing.JLabel();\n jLabel10 = new javax.swing.JLabel();\n jLabel12 = new javax.swing.JLabel();\n jScrollPane4 = new javax.swing.JScrollPane();\n jTable2 = new javax.swing.JTable();\n jButton5 = new javax.swing.JButton();\n jButton4 = new javax.swing.JButton();\n jButton7 = new javax.swing.JButton();\n jScrollPane5 = new javax.swing.JScrollPane();\n jScrollPane6 = new javax.swing.JScrollPane();\n jTable3 = new javax.swing.JTable();\n jTable4 = new javax.swing.JTable();\n jButton1 = new javax.swing.JButton();\n jLabel11 = new javax.swing.JLabel();\n jPanel2 = new javax.swing.JPanel();\n jButton2 = new javax.swing.JButton();\n jButton3 = new javax.swing.JButton();\n jXDatePicker1 = new inventorycontroller.display.RDateSpinner(inventorycontroller.display.RDateSpinner.DD_MM_YYYY);\n jXDatePicker2 = new inventorycontroller.display.RDateSpinner(inventorycontroller.display.RDateSpinner.DD_MM_YYYY);\n\n setTitle(\"Purchase Order\");\n \n jTextField2.setMaximumRowCount(8);\n \n jLabel1.setBackground(new java.awt.Color(127, 157, 185));\n jLabel1.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel1.setText(\"jLabel1\");\n jLabel1.setOpaque(true);\n\n jPanel1.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(127, 157, 185)));\n jRadioButton1.setText(\"Purchase against BOM\");\n jRadioButton1.addActionListener(new java.awt.event.ActionListener(){\n \tpublic void actionPerformed(java.awt.event.ActionEvent evt){\n \t\tpoTypeChanged((javax.swing.JRadioButton)evt.getSource());\n \t}\n });\n\n jRadioButton2.setText(\"Local Purchase\");\n jRadioButton2.addActionListener(new java.awt.event.ActionListener(){\n \tpublic void actionPerformed(java.awt.event.ActionEvent evt){\n \t\tpoTypeChanged((javax.swing.JRadioButton)evt.getSource());\n \t}\n });\n \n buttonGroup1.add(jRadioButton1);\n buttonGroup1.add(jRadioButton2);\n\n jLabel2.setText(\"PO No.\");\n\n jLabel3.setText(\"PO Date\");\n\n jLabel4.setText(\"Vendor Name\");\n\n jLabel5.setText(\"Quotation No.\");\n\n jLabel6.setText(\"Quotation Date\");\n\n jLabel7.setText(\"BOM List:\");\n\n jScrollPane2.setViewportView(jEditorPane1);\n\n jLabel8.setText(\"Remarks (if any):\");\n\n jButton6.setText(\"Generate Purchase Requisition\");\n jButton6.addActionListener(new java.awt.event.ActionListener(){\n \tpublic void actionPerformed(java.awt.event.ActionEvent evt){\n \t\tgeneratePurchaseRequition();\n \t}\n });\n\n jScrollPane1.setViewportView(jList1);\n\n javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);\n jPanel3.setLayout(jPanel3Layout);\n jPanel3Layout.setHorizontalGroup(\n jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel3Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel3Layout.createSequentialGroup()\n .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel4)\n .addComponent(jLabel3)\n .addComponent(jLabel2)\n .addComponent(jLabel5)\n .addComponent(jLabel6))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jXDatePicker1, javax.swing.GroupLayout.DEFAULT_SIZE, 140, Short.MAX_VALUE)\n .addComponent(jTextField2, javax.swing.GroupLayout.DEFAULT_SIZE, 140, Short.MAX_VALUE)\n .addComponent(jTextField3, javax.swing.GroupLayout.DEFAULT_SIZE, 140, Short.MAX_VALUE)\n .addComponent(jXDatePicker2, javax.swing.GroupLayout.DEFAULT_SIZE, 140, Short.MAX_VALUE)\n .addComponent(jTextField1, javax.swing.GroupLayout.DEFAULT_SIZE, 140, Short.MAX_VALUE))\n .addGap(16, 16, 16)\n .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addGroup(jPanel3Layout.createSequentialGroup()\n .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel7)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 140, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(16, 16, 16)\n .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel8)\n .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 140, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addComponent(jButton6, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))\n .addGroup(jPanel3Layout.createSequentialGroup()\n .addComponent(jRadioButton1)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jRadioButton2)))\n .addContainerGap())\n );\n jPanel3Layout.setVerticalGroup(\n jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel3Layout.createSequentialGroup()\n .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jRadioButton1)\n .addComponent(jRadioButton2))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel3Layout.createSequentialGroup()\n .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel2)\n .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel3)\n .addComponent(jXDatePicker1, 20, 20, 20))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel4)\n .addComponent(jTextField2, 20, 20, 20))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel5)\n .addComponent(jTextField3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel6)\n .addComponent(jXDatePicker2, 20, 20, 20)))\n .addGroup(jPanel3Layout.createSequentialGroup()\n\t .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)\n\t .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel3Layout.createSequentialGroup()\n\t .addComponent(jLabel8)\n\t .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n\t .addComponent(jScrollPane2))\n\t .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel3Layout.createSequentialGroup()\n\t .addComponent(jLabel7)\n\t .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n\t .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 66, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGap(8, 16, 32)\n .addComponent(jButton6)))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n jTabbedPane1.addTab(\"Purchase Order Detail\", jPanel3);\n\n jTable1.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);\n jTable1.getSelectionModel().addListSelectionListener(new javax.swing.event.ListSelectionListener(){\n \tpublic void valueChanged(javax.swing.event.ListSelectionEvent e) {\n \t\t//Ignore extra messages.\n \t\tif (e.getValueIsAdjusting()) return;\n \t\tjavax.swing.ListSelectionModel lsm =(javax.swing.ListSelectionModel)e.getSource();\n \t\tint selectedRow;\n \t\tif (lsm.isSelectionEmpty()) { //no rows are selected\n \t\t\tselectedRow=-1;\n \t\t} \n \t\telse {\n \t\tselectedRow = lsm.getMinSelectionIndex();\n \t\tbomSelected(selectedRow);\n \t}\n \t}\n\t\t});\n jTable1.setAutoResizeMode(jTable2.AUTO_RESIZE_OFF);\n jTable1.setAutoCreateRowSorter(false);\n jScrollPane3.setViewportView(jTable1);\n\n jLabel9.setText(\"BOM List:\");\n\n jLabel10.setText(\"BOM Details:\");\n\n\t\tjTable2.setAutoResizeMode(jTable2.AUTO_RESIZE_OFF);\n jTable2.setAutoCreateRowSorter(false);\n jScrollPane4.setViewportView(jTable2);\n\n jButton5.setText(\"Add Selected Item/s\");\n jButton5.addActionListener(new java.awt.event.ActionListener(){\n \tpublic void actionPerformed(java.awt.event.ActionEvent evt){\n \t\tselectBom();\n \t}\n });\n\n javax.swing.GroupLayout jPanel5Layout = new javax.swing.GroupLayout(jPanel5);\n jPanel5.setLayout(jPanel5Layout);\n jPanel5Layout.setHorizontalGroup(\n jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel5Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel5Layout.createSequentialGroup()\n .addComponent(jScrollPane3, javax.swing.GroupLayout.PREFERRED_SIZE, 321, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jScrollPane4, javax.swing.GroupLayout.DEFAULT_SIZE, 324, Short.MAX_VALUE)\n .addComponent(jButton5, javax.swing.GroupLayout.DEFAULT_SIZE, 324, Short.MAX_VALUE)\n .addComponent(jLabel10, javax.swing.GroupLayout.Alignment.LEADING)))\n .addComponent(jLabel9))\n .addContainerGap())\n );\n jPanel5Layout.setVerticalGroup(\n jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel5Layout.createSequentialGroup()\n .addComponent(jLabel9)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel5Layout.createSequentialGroup()\n .addComponent(jLabel10)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jScrollPane4, javax.swing.GroupLayout.DEFAULT_SIZE, 74, Short.MAX_VALUE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jButton5))\n .addComponent(jScrollPane3, javax.swing.GroupLayout.DEFAULT_SIZE, 123, Short.MAX_VALUE))\n .addContainerGap())\n );\n jTabbedPane1.addTab(\"BOM Selection\", jPanel5);\n\n jTable4.setAutoCreateRowSorter(false);\n jTable4.setAutoResizeMode(javax.swing.JTable.AUTO_RESIZE_OFF);\n jScrollPane6.setViewportView(jTable4);\n\n jLabel12.setText(\"Material List:\");\n\n jButton7.setText(\"<html><center>Add Selected<br>Material/s</center></html>\");\n jButton7.addActionListener(new java.awt.event.ActionListener(){\n \tpublic void actionPerformed(java.awt.event.ActionEvent evt){\n \t\titemSelected();\n \t}\n });\n\n javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4);\n jPanel4.setLayout(jPanel4Layout);\n jPanel4Layout.setHorizontalGroup(\n jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel4Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel4Layout.createSequentialGroup()\n .addComponent(jScrollPane6, javax.swing.GroupLayout.PREFERRED_SIZE, 511, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jButton7, javax.swing.GroupLayout.DEFAULT_SIZE, 134, Short.MAX_VALUE))\n .addComponent(jLabel12))\n .addContainerGap())\n );\n jPanel4Layout.setVerticalGroup(\n jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel4Layout.createSequentialGroup()\n .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addGroup(jPanel4Layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jButton7))\n .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel4Layout.createSequentialGroup()\n .addComponent(jLabel12)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jScrollPane6, javax.swing.GroupLayout.DEFAULT_SIZE, 123, Short.MAX_VALUE)))\n .addContainerGap())\n );\n jTabbedPane1.addTab(\"Material Selection\", jPanel4);\n \n jTable3.setAutoCreateRowSorter(false);\n jTable3.setAutoResizeMode(javax.swing.JTable.AUTO_RESIZE_OFF);\n jScrollPane5.setViewportView(jTable3);\n\n jButton1.setText(\"Save this Purchase Order\");\n jButton1.addActionListener(new java.awt.event.ActionListener(){\n \tpublic void actionPerformed(java.awt.event.ActionEvent evt){\n \t\tinsertPerform();\n \t}\n });\n \n jButton4.setText(\"Generate Print Preview\");\n jButton4.addActionListener(new java.awt.event.ActionListener(){\n \tpublic void actionPerformed(java.awt.event.ActionEvent evt){\n \t\tshowPrintView();\n \t}\n });\n\n jLabel11.setBackground(new java.awt.Color(255, 255, 255));\n jLabel11.setFont(new java.awt.Font(\"Dialog\", 1, 12));\n jLabel11.setForeground(new java.awt.Color(255, 102, 0));\n jLabel11.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel11.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(127, 157, 185)));\n jLabel11.setOpaque(true);\n\n resetPerform();\n \n javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);\n jPanel1.setLayout(jPanel1Layout);\n jPanel1Layout.setHorizontalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jScrollPane5, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 640, Short.MAX_VALUE)\n .addComponent(jLabel11, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 640, Short.MAX_VALUE)\n .addComponent(jTabbedPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 640, Short.MAX_VALUE)\n .addGroup(jPanel1Layout.createSequentialGroup()\n \t.addGap(0, 0, Short.MAX_VALUE)\n .addComponent(jButton1, 220, 320, 320)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jButton4, 220, 320, 320)\n .addGap(0, 0, Short.MAX_VALUE)))\n .addContainerGap())\n );\n jPanel1Layout.setVerticalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jTabbedPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 182, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jScrollPane5, javax.swing.GroupLayout.DEFAULT_SIZE, 155, Short.MAX_VALUE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jLabel11)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jButton4)\n .addComponent(jButton1))\n .addContainerGap())\n );\n\n jPanel2.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(127, 157, 185)));\n jButton2.setText(\"Reset\");\n jButton2.addActionListener(new java.awt.event.ActionListener(){\n \tpublic void actionPerformed(java.awt.event.ActionEvent evt){\n \t\tresetPerform();\n \t}\n });\n jButton2.setMaximumSize(new java.awt.Dimension(120, 22));\n jButton2.setMinimumSize(new java.awt.Dimension(120, 22));\n jButton2.setPreferredSize(new java.awt.Dimension(120, 22));\n\n jButton3.setText(\"Exit\");\n jButton3.addActionListener(new java.awt.event.ActionListener(){\n \tpublic void actionPerformed(java.awt.event.ActionEvent evt){\n \t\texitPerform();\n \t}\n });\n jButton3.setMaximumSize(new java.awt.Dimension(120, 22));\n jButton3.setMinimumSize(new java.awt.Dimension(120, 22));\n jButton3.setPreferredSize(new java.awt.Dimension(120, 22));\n\n javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);\n jPanel2.setLayout(jPanel2Layout);\n jPanel2Layout.setHorizontalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jButton2)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jButton3)\n .addContainerGap())\n );\n jPanel2Layout.setVerticalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jButton2)\n .addComponent(jButton3))\n .addContainerGap())\n );\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, 540, Short.MAX_VALUE)\n .addContainerGap())\n .addGroup(layout.createSequentialGroup()\n .addContainerGap(0, java.lang.Short.MAX_VALUE)\n .addComponent(jPanel2)\n .addContainerGap(0, java.lang.Short.MAX_VALUE))\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, 720, javax.swing.GroupLayout.DEFAULT_SIZE)\n .addContainerGap())\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jPanel1)\n .addGap(4, 16, 22)\n .addComponent(jPanel2)\n .addGap(4, 16, 22)\n .addComponent(jLabel1)\n .addContainerGap())\n );\n pack();\n setVisible(true);\n setClosable(true);\n setIconifiable(true);\n setMaximizable(true);\n setResizable(true);\n getRootPane().setDefaultButton(jButton1);\n //* ENDING: initComponent()\n }", "public void init() {\r\n\t\tsuper.init();\r\n\t\tfor (int i = 0; i < _composites.size(); i++) {\r\n\t\t\t_composites.get(i).init();\t\t\t\r\n\t\t} \r\n\t}", "protected void entityInit() {}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t\tfecha = new Date();\r\n\t\t\r\n\t\tlistaBancos = new ArrayList<SelectItem>();\r\n\t\tlistaRegiones = new ArrayList<SelectItem>();\r\n\t\tlistaCiudades = new ArrayList<SelectItem>();\r\n\t\tlistaComunas = new ArrayList<SelectItem>();\r\n\t\t\r\n\t\tfor(EmpresaDTO empresa : configJProcessService.selectEmpresasByOrganizacion(1))\r\n\t\t\tlistaBancos.add(new SelectItem(empresa.getId(), empresa.getNombre()));\r\n\t}", "private void init() {\n try {\n renderer = new TableNameRenderer(tableHome);\n if (listId != null) {\n model = new DefaultComboBoxModel(listId);\n }\n else {\n Object[] idList = renderer.getTableIdList(step, extraTableRef);\n model = new DefaultComboBoxModel(idList);\n }\n setRenderer(renderer);\n setModel(model);\n }\n catch (PersistenceException ex) {\n ex.printStackTrace();\n }\n }", "public TGroupGoods() {\n }", "public void initForAddNew() {\r\n\r\n\t}", "private void initcomponent() {\n\r\n\t}", "public void init() {\n\t\t\n\t\t\n\t\tprepareGaborFilterBankConcurrent();\n\t\t\n\t\tprepareGaborFilterBankConcurrentEnergy();\n\t}", "@Override\n @PostConstruct\n protected void init() {\n super.init();\n\n // _HACK_ Attention: you must realize that associations below (when lazy) are fetched from the view, non transactionnally.\n\n if (products == null) {\n products = new SelectableListDataModel<Product>(getPart().getProducts());\n }\n }", "private void initialize() {\r\n //Below are for testing purposes\r\n this.addProductQuantity(new Product(\"1984\", 1, 1.99), 10);\r\n this.addProductQuantity(new Product(\"The Great Gatsby\", 2, 2.45), 25);\r\n this.addProductQuantity(new Product(\"Silent Spring\", 3, 1.86), 3);\r\n this.addProductQuantity(new Product(\"A Room of One's Own\", 4, 3.75), 15);\r\n this.addProductQuantity(new Product(\"Catcher in The Rye\", 5, 2.89), 11);\r\n this.addProductQuantity(new Product(\"The Code Breaker\", 6, 2.50), 26);\r\n this.addProductQuantity(new Product(\"Crime and Punishment\", 7, 2.75), 1);\r\n this.addProductQuantity(new Product(\"Moby Dick\", 8, 2.50), 13);\r\n this.addProductQuantity(new Product(\"The Sixth Extinction\", 9, 3.10), 10);\r\n }", "public void initialize() {\r\n\t\tremoveAllCards();\r\n\t\tfor (int i = 0; i < 4; i++) {\r\n\t\t\tfor (int j = 0; j < 13; j++) {\r\n\t\t\t\tBigTwoCard card = new BigTwoCard(i, j);\r\n\t\t\t\taddCard(card);\r\n\t\t\t}\r\n\t\t}\t\r\n\t}", "protected abstract void initializeBartender();", "public ItemPro() {\n initComponents();\n comboFill();\n }", "@Override\n\tpublic void initEntity() {\n\n\t}", "private void prepare()\n {\n AmbulanceToLeft ambulanceToLeft = new AmbulanceToLeft();\n addObject(ambulanceToLeft,717,579);\n Car2ToLeft car2ToLeft = new Car2ToLeft();\n addObject(car2ToLeft,291,579);\n Car3 car3 = new Car3();\n addObject(car3,45,502);\n CarToLeft carToLeft = new CarToLeft();\n addObject(carToLeft,710,262);\n Car car = new Car();\n addObject(car,37,190);\n AmbulanceToLeft ambulanceToLeft2 = new AmbulanceToLeft();\n addObject(ambulanceToLeft2,161,264);\n }", "@PostConstruct\n protected void initNewEntity() {\n setNewEntity(getService().create());\n }", "@Override\n\tpublic void initParams() {\n\t\tSearchNewResult searchNewResult=Action.getSearchNewResult();\n\t\tint productNum=searchNewResult.Data.ProductList.size();\n\t\tGetCombinedProductPriceCalendarParamModel getCombinedProductPriceCalendarParamModel=new GetCombinedProductPriceCalendarParamModel();\n\t\tgetCombinedProductPriceCalendarParamModel.productID=searchNewResult.Data.ProductList.get(0).ProductID;\n\t\tgetCombinedProductPriceCalendarParamModel.isClubmed=searchNewResult.Data.ProductList.get(0).IsClubmed;\n\t\tgetCombinedProductPriceCalendarParamModel.isCombined=searchNewResult.Data.ProductList.get(0).IsCombined;\n\t\tfor(int i=0;i<productNum;i++){\n\t\t\t//getCombinedProductPriceCalendarParamModel=new GetCombinedProductPriceCalendarParamModel();\t\t\n\t\t\tif(searchNewResult.Data.ProductList.get(i).IsCombined==true){\n\t\t\t\tgetCombinedProductPriceCalendarParamModel.productID=searchNewResult.Data.ProductList.get(i).ProductID;\n\t\t\t\tgetCombinedProductPriceCalendarParamModel.isClubmed=searchNewResult.Data.ProductList.get(i).IsClubmed;\n\t\t\t\tgetCombinedProductPriceCalendarParamModel.isCombined=searchNewResult.Data.ProductList.get(i).IsCombined;\n\t\t\t\tbreak;\n\t\t\t}\t\t\t\n\t\t}\n\t\tthis.paramModel=getCombinedProductPriceCalendarParamModel;\n\t}", "@PostConstruct\r\n private void init() {\n this.ccTypes = new ArrayList<SelectItem>();\r\n this.ccTypes.add(new SelectItem(CreditCardType.CARD_A, getCCTypeLabel(CreditCardType.CARD_A)));\r\n this.ccTypes.add(new SelectItem(CreditCardType.CARD_B, getCCTypeLabel(CreditCardType.CARD_B)));\r\n\r\n // Initialize categories select items\r\n this.categories = new ArrayList<SelectItem>();\r\n this.categories.add(new SelectItem(\"cat_it\", getCategoryLabel(\"cat_it\")));\r\n this.categories.add(new SelectItem(\"cat_gr\", getCategoryLabel(\"cat_gr\")));\r\n this.categories.add(new SelectItem(\"cat_at\", getCategoryLabel(\"cat_at\")));\r\n this.categories.add(new SelectItem(\"cat_mx\", getCategoryLabel(\"cat_mx\")));\r\n }", "private void initData() {\n\t\tcomboBoxInit();\n\t\tinitList();\n\t}", "public void init() {\n entityPropertyBuilders.add(new DefaultEntityComponentBuilder(environment));\n entityPropertyBuilders.add(new FilterTransientFieldComponentBuilder(environment));\n entityPropertyBuilders.add(new MakeAccessibleComponentBuilder(environment));\n entityPropertyBuilders.add(new PrimaryKeyComponentBuilder(environment));\n\n // Field meta property builders\n fieldPropertyBuilders.add(new FilterPrimaryKeyComponentBuilder(environment));\n fieldPropertyBuilders.add(new FilterTransientFieldComponentBuilder(environment));\n fieldPropertyBuilders.add(new MakeAccessibleComponentBuilder(environment));\n fieldPropertyBuilders.add(new TtlFieldComponentBuilder(environment));\n fieldPropertyBuilders.add(new CompositeParentComponentBuilder(environment));\n fieldPropertyBuilders.add(new CollectionFieldComponentBuilder(environment));\n fieldPropertyBuilders.add(new MapFieldComponentBuilder(environment));\n fieldPropertyBuilders.add(new SimpleFieldComponentBuilder(environment));\n }", "@Override\r\n\tpublic void init() {\n\t\tint numOfItems = loader.getNumOfItems();\r\n\t\tsetStoreSize(numOfItems);\r\n\r\n\t\tfor (int i = 0; i < numOfItems; i++) {\r\n DrinksStoreItem item = (DrinksStoreItem) loader.getItem(i);\r\n\t\t\tStoreObject brand = item.getContent();\r\n\t\t\tStoreObject existingBrand = findObject(brand.getName());\r\n\t\t\tif (existingBrand != null) {\r\n\t\t\t item.setContent(existingBrand);\r\n\t\t\t}\r\n\t\t\taddItem(i, item);\t\r\n\t\t}\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "public void InitData() {\n this.mItemTitleIds = new int[]{R.string.can_volvo_cysjysz, R.string.can_volvo_zdsm, R.string.can_door_unlock, R.string.can_volvo_zdhsj, R.string.can_volvo_qxzchsj, R.string.can_volvo_qxychsj, R.string.can_volvo_fxplsz, R.string.can_volvo_dstc, R.string.can_volvo_csaq, R.string.can_volvo_hfqcsz};\n this.mItemTypes = new CanScrollCarInfoView.Item[]{CanScrollCarInfoView.Item.SWITCH, CanScrollCarInfoView.Item.SWITCH, CanScrollCarInfoView.Item.POP, CanScrollCarInfoView.Item.SWITCH, CanScrollCarInfoView.Item.SWITCH, CanScrollCarInfoView.Item.SWITCH, CanScrollCarInfoView.Item.POP, CanScrollCarInfoView.Item.SWITCH, CanScrollCarInfoView.Item.SWITCH, CanScrollCarInfoView.Item.TITLE};\n this.mPopValueIds[2] = new int[]{R.string.can_door_unlock_key2, R.string.can_door_unlock_key1};\n this.mPopValueIds[6] = new int[]{R.string.can_ac_low, R.string.can_ac_mid, R.string.can_ac_high};\n this.mSetData = new CanDataInfo.VolvoXc60_CarSet();\n }", "private void initComposants() {\r\n\t\tselectionMatierePanel = new SelectionMatierePanel(1);\r\n\t\ttableauPanel = new TableauPanel(1);\r\n\t\tadd(selectionMatierePanel, BorderLayout.NORTH);\r\n\t\tadd(tableauPanel, BorderLayout.SOUTH);\r\n\t\t\r\n\t}", "@Override\r\n public void performInitialization(Object model) {\r\n super.performInitialization(model);\r\n richTable.setForceLocalJsonData(true);\r\n\r\n //init binding info\r\n if (bindingInfo != null) {\r\n bindingInfo.setDefaults(ViewLifecycle.getView(), getPropertyName());\r\n }\r\n \r\n List<? extends Component> items = getItems();\r\n \r\n ComponentUtils.clearAndAssignIds(items);\r\n\r\n //iterate over this collections items to initialize\r\n for (Component item : this.getItems()) {\r\n initialComponentIds.add(item.getId());\r\n\r\n //if data field, setup a forced placeholder value\r\n if (item instanceof DataField) {\r\n ((DataField) item).setForcedValue(VALUE_TOKEN + item.getId() + VALUE_TOKEN);\r\n }\r\n\r\n ///populate expression map\r\n expressionConversionMap = buildExpressionMap(item, expressionConversionMap);\r\n }\r\n }", "public void initialize() {\n\n // Calculate the average unit price.\n calculateAvgUnitPrice() ;\n\n // Calculate the realized profit/loss for this stock\n calculateRealizedProfit() ;\n\n this.itdValueCache = ScripITDValueCache.getInstance() ;\n this.eodValueCache = ScripEODValueCache.getInstance() ;\n }", "public void initialization(){\r\n\t\tfinal int w = current.getBounds().width;\r\n\t\tfinal int h = current.getBounds().height;\r\n\t\tcomposite.setBounds(0, 0, w, h);\r\n\t\t\r\n\t\t/**\r\n\t\t * left side navigate\r\n\t\t */\r\n\t\tComposite composite_left = new Composite(composite, SWT.NONE);\r\n//\t\tfinal Color base = new Color(composite.getDisplay(), 255,240,245);\r\n\t\tfinal Color base = new Color(composite.getDisplay(), 0xed, 0xf4, 0xfa);//??\r\n\t\tcomposite_left.setBackground(base);\r\n//\t\tcomposite_left.setBounds(0, 0, (int)(w/5), h);\r\n\t\tcomposite_left.setBounds(0, 0, 200, h);\r\n\t\tcomposite_left.setLayout(new FillLayout());\r\n\t\tComposite comp1 = null;\r\n\t\tComposite comp2 = null;\r\n\r\n\t\t//expand bar\r\n\t\texpandBar = new ExpandBar(composite_left, SWT.V_SCROLL); \t\t\r\n\t\t\r\n\t\titem1 = new ExpandItem(expandBar, SWT.NONE);\r\n\t\titem2 = new ExpandItem(expandBar, SWT.NONE);\r\n\t\t\r\n\t\texpandBar.addExpandListener(new ExpandAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void itemExpanded(ExpandEvent e) {\r\n\t\t\t\tif(e.item == item1){\r\n\t\t\t\t\titem2.setExpanded(false);\r\n\t\t\t\t}else{\r\n\t\t\t\t\titem1.setExpanded(false);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t { \r\n\t \t //shipment expandbar\r\n\t comp1 = new Composite(expandBar, SWT.NONE); \r\n\t GridLayout gd = new GridLayout(1, false);\r\n//\t gd.marginWidth=(int)(w/5/10);\r\n\t gd.marginWidth=10;\r\n\t comp1.setLayout(gd); \r\n\t //used for spacing the controls\r\n//\t Label lbl_space2 = new Label(comp1, SWT.NONE);\r\n//\t lbl_space2.setText(\"\");\r\n//\t lbl_space2.setVisible(false);\r\n\t \r\n\t Label lbl_brand = new Label(comp1, SWT.NONE);\r\n\t lbl_brand.setText(\"品牌\");\r\n\t \r\n\t combo_brand_shipment = new CCombo(comp1, SWT.BORDER|SWT.READ_ONLY);\r\n\t combo_brand_shipment.setVisibleItemCount(5);\r\n\t combo_brand_shipment.setText(AnalyzerConstants.ALL_BRAND);\r\n\t GridData gd_combo_brand = new GridData(SWT.LEFT, SWT.CENTER, false, false, 1, 1);\r\n\t gd_combo_brand.widthHint = 151;\r\n\t combo_brand_shipment.setLayoutData(gd_combo_brand);\r\n\t \r\n\t \r\n\t combo_sub_shipment = new CCombo(comp1, SWT.BORDER|SWT.READ_ONLY);\r\n\t combo_sub_shipment.setText(AnalyzerConstants.ALL_SUB);\r\n\t combo_sub_shipment.setVisibleItemCount(5);\r\n\t GridData gd_combo_sub_brand = new GridData(SWT.LEFT, SWT.CENTER, false, false, 1, 1);\r\n\t gd_combo_sub_brand.widthHint = 151;\r\n\t combo_sub_shipment.setLayoutData(gd_combo_sub_brand);\r\n\t combo_sub_shipment.setEnabled(false);\r\n\t combo_sub_shipment.setVisible(false);\r\n\t \r\n\t combo_brand_shipment.addListener(SWT.MouseDown, new Listener() {\r\n\r\n\t \t\t\t@Override\r\n\t \t\t\tpublic void handleEvent(Event event) {\r\n\t \t\t\t\tList<String> list = Utils.getBrands();\r\n\t \t\t\t\tcombo_brand_shipment.setItems(list.toArray(new String[list.size()]));\r\n\t \t\t\t\tcombo_brand_shipment.add(AnalyzerConstants.ALL_BRAND);\r\n\t \t\t\t}\r\n\t });\r\n\t combo_brand_shipment.addListener(SWT.MouseUp, new Listener() {\r\n\r\n\t\t \t\t\t@Override\r\n\t\t \t\t\tpublic void handleEvent(Event event) {\r\n\t\t \t\t\t\tif(combo_brand_shipment.getText().equals(\"\")){\r\n\t\t \t\t\t\t\tcombo_brand_shipment.setText(AnalyzerConstants.ALL_BRAND);\r\n\t\t \t\t\t\t\tcombo_sub_shipment.setText(AnalyzerConstants.ALL_SUB);\r\n\t\t \t\t\t\t\tcombo_sub_shipment.setVisible(false);\r\n\t\t \t\t\t\t}\t\t \t\t\t\t\r\n\t\t \t\t\t}\r\n\t\t });\r\n\t combo_sub_shipment.addListener(SWT.MouseUp, new Listener() {\r\n\r\n\t\t \t\t\t@Override\r\n\t\t \t\t\tpublic void handleEvent(Event event) {\r\n\t\t \t\t\t\tif(combo_sub_shipment.getText().equals(\"\")){\r\n\t\t \t\t\t\t\tcombo_sub_shipment.setText(AnalyzerConstants.ALL_SUB);\r\n\t\t \t\t\t\t}\t\t \t\t\t\t\r\n\t\t \t\t\t}\r\n\t\t });\r\n\t combo_sub_shipment.addListener(SWT.MouseDown, new Listener() {\r\n\t \t\t\t@Override\r\n\t \t\t\tpublic void handleEvent(Event event) {\r\n\t \t\t\t\tString brand = combo_brand_shipment.getText();\r\n\t \t\t\t\tList<String> list = Utils.getSub_Brands(brand);\t \t\t\t\t\t\t\r\n\t \t\t\t\tcombo_sub_shipment.setItems(list.toArray(new String[list.size()]));\r\n\t \t\t\t\tcombo_sub_shipment.add(AnalyzerConstants.ALL_SUB);\r\n\t \t\t\t}\r\n\t });\r\n\t combo_brand_shipment.addSelectionListener(new SelectionAdapter() {\r\n\t\t \t@Override\r\n\t\t \tpublic void widgetSelected(SelectionEvent e) {\r\n//\t\t \t\tcombo_subbrand.clearSelection();\r\n\t\t \t\tif(!combo_brand_shipment.getText().equals(AnalyzerConstants.ALL_BRAND)){\r\n\t\t \t\t\tcombo_sub_shipment.deselectAll();\r\n\t\t \t\t\tcombo_sub_shipment.setEnabled(true);\r\n\t\t \t\t\tcombo_sub_shipment.setVisible(true);\r\n\t\t \t\t\tcombo_sub_shipment.setText(AnalyzerConstants.ALL_SUB);\r\n\t\t \t\t}else{\r\n\t\t \t\t\tcombo_sub_shipment.setVisible(false);\r\n\t\t \t\t}\r\n\t\t \t}\r\n\t\t });\r\n\t \r\n\t Label lbl_space = new Label(comp1, SWT.NONE);\r\n\t lbl_space.setText(\"\");\r\n\t lbl_space.setVisible(false);\r\n\t \r\n\t Label lbl_area = new Label(comp1, SWT.NONE);\r\n\t lbl_area.setText(\"片区/客户\");\r\n\t \r\n\t combo_area_shipment = new CCombo(comp1, SWT.BORDER|SWT.READ_ONLY);\r\n\t combo_area_shipment.setVisibleItemCount(5);\r\n\t combo_area_shipment.setText(AnalyzerConstants.ALL_AREA);\r\n\t GridData gd_combo_area = new GridData(SWT.LEFT, SWT.CENTER, false, false, 1, 1);\r\n\t gd_combo_area.widthHint = 151;\r\n\t combo_area_shipment.setLayoutData(gd_combo_area);\r\n\t \r\n\t combo_cus_shipment = new CCombo(comp1, SWT.BORDER|SWT.READ_ONLY);\r\n\t combo_cus_shipment.setText(AnalyzerConstants.ALL_CUSTOMER);\r\n\t combo_cus_shipment.setVisible(false);\r\n\t combo_cus_shipment.setVisibleItemCount(5);\r\n\t GridData gd_combo_customer = new GridData(SWT.LEFT, SWT.CENTER, false, false, 1, 1);\r\n\t gd_combo_customer.widthHint = 151;\r\n\t combo_cus_shipment.setLayoutData(gd_combo_customer);\r\n\t combo_cus_shipment.setEnabled(false);\r\n\t \r\n\t combo_area_shipment.addListener(SWT.MouseDown, new Listener() {\r\n\r\n\t\t \t\t\t@Override\r\n\t\t \t\t\tpublic void handleEvent(Event event) {\r\n\t\t \t\t\t\tcombo_area_shipment.setItems(DataCachePool.getCustomerAreas());\t\r\n\t\t \t\t\t\tcombo_area_shipment.add(AnalyzerConstants.ALL_AREA);\r\n\t\t \t\t\t}\r\n\t\t });\t \r\n\t combo_area_shipment.addListener(SWT.MouseUp, new Listener() {\r\n\r\n\t\t \t\t\t@Override\r\n\t\t \t\t\tpublic void handleEvent(Event event) {\r\n\t\t \t\t\t\tif(combo_area_shipment.getText().equals(\"\")){\r\n\t\t \t\t\t\t\tcombo_area_shipment.setText(AnalyzerConstants.ALL_AREA);\r\n\t\t \t\t\t\t\tcombo_cus_shipment.setText(AnalyzerConstants.ALL_CUSTOMER);\r\n\t\t \t\t\t\t\tcombo_cus_shipment.setVisible(false);\r\n\t\t \t\t\t\t}\t\t \t\t\t\t\r\n\t\t \t\t\t}\r\n\t\t });\r\n\t combo_cus_shipment.addListener(SWT.MouseUp, new Listener() {\r\n\r\n\t\t \t\t\t@Override\r\n\t\t \t\t\tpublic void handleEvent(Event event) {\r\n\t\t \t\t\t\tif(combo_cus_shipment.getText().equals(\"\")){\r\n\t\t \t\t\t\t\tcombo_cus_shipment.setText(AnalyzerConstants.ALL_CUSTOMER);\r\n\t\t \t\t\t\t}\t\t \t\t\t\t\r\n\t\t \t\t\t}\r\n\t\t });\r\n\t combo_cus_shipment.addListener(SWT.MouseDown, new Listener() {\r\n\t\t \t\t\t@Override\r\n\t\t \t\t\tpublic void handleEvent(Event event) {\r\n\t\t \t\t\t\tString area = combo_area_shipment.getText();\r\n//\t\t\t\t\t\tSystem.out.println(\"area: \"+area);\r\n\t\t\t\t\t\tString[] names = DataCachePool.getCustomerNames(area);\r\n\t\t\t\t\t\tif(names.length != 0){//no such areas\r\n\t\t\t\t\t\t\tcombo_cus_shipment.setItems(names);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tcombo_sub_shipment.add(AnalyzerConstants.ALL_CUSTOMER);\r\n\t\t \t\t\t}\r\n\t\t });\r\n\t\t \r\n\t combo_area_shipment.addSelectionListener(new SelectionAdapter() {\r\n\t\t \t@Override\r\n\t\t \tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t \t\tif(!combo_area_shipment.getText().equals(AnalyzerConstants.ALL_AREA)){\r\n\t\t \t\tcombo_cus_shipment.deselectAll();\r\n\t\t \t\tcombo_cus_shipment.setEnabled(true);\r\n\t\t \t\tcombo_cus_shipment.setVisible(true);\r\n\t\t \t\tcombo_cus_shipment.setText(AnalyzerConstants.ALL_CUSTOMER);\r\n\t\t \t\t}else{\r\n\t\t \t\t\tcombo_cus_shipment.setVisible(false);\r\n\t\t \t\t}\r\n\t\t \t}\r\n\t\t });\r\n\t \r\n//\t item1 = new ExpandItem(expandBar, SWT.NONE); \r\n\t item1.setText(\"出货量分析\"); \r\n\t item1.setExpanded(true);\r\n\t item1.setHeight((int)(h/3));// 设置Item的高度 \r\n\t comp1.setBackground(new Color(composite.getDisplay(), 240,255,255));\r\n\t item1.setControl(comp1);// setControl方法控制comp1的显现 \t \t \r\n\t } \r\n\t { \r\n\t \t //the profit expandbar\r\n\t comp2 = new Composite(expandBar, SWT.NONE); \r\n\t GridLayout gd = new GridLayout(1, false);\r\n//\t gd.marginWidth=(int)(w/5/10);\r\n\t gd.marginWidth=10;\r\n\t comp2.setLayout(gd); \r\n\r\n//\t Label lbl_space2 = new Label(comp2, SWT.NONE);\r\n//\t lbl_space2.setText(\"\");\r\n//\t lbl_space2.setVisible(false);\r\n\t \r\n\t Label lbl_brand = new Label(comp2, SWT.NONE);\r\n\t lbl_brand.setText(\"品牌\");\r\n\t \r\n\t combo_brand_profit = new CCombo(comp2, SWT.BORDER|SWT.READ_ONLY);\r\n\t GridData gd_combo_brand = new GridData(SWT.LEFT, SWT.CENTER, false, false, 1, 1);\r\n\t gd_combo_brand.widthHint = 151;\r\n\t combo_brand_profit.setText(AnalyzerConstants.ALL_BRAND);\r\n\t combo_brand_profit.setLayoutData(gd_combo_brand);\r\n\t \r\n\t combo_sub_profit = new CCombo(comp2, SWT.BORDER|SWT.READ_ONLY);\r\n\t combo_sub_profit.setText(AnalyzerConstants.ALL_SUB);\r\n\t combo_sub_profit.setVisible(false);\r\n\t GridData gd_combo_sub_brand = new GridData(SWT.LEFT, SWT.CENTER, false, false, 1, 1);\r\n\t gd_combo_sub_brand.widthHint = 151;\r\n\t combo_sub_profit.setLayoutData(gd_combo_sub_brand);\r\n\t \r\n\t combo_brand_profit.addListener(SWT.MouseDown, new Listener() {\r\n\r\n\t\t \t\t\t@Override\r\n\t\t \t\t\tpublic void handleEvent(Event event) {\r\n\t\t \t\t\t\tList<String> list = Utils.getBrands();\r\n\t\t \t\t\t\tcombo_brand_profit.setItems(list.toArray(new String[list.size()]));\r\n\t\t \t\t\t\tcombo_brand_profit.add(AnalyzerConstants.ALL_BRAND);\r\n\t\t \t\t\t}\r\n\t\t });\r\n\t combo_brand_profit.addListener(SWT.MouseUp, new Listener() {\r\n\r\n\t\t\t \t\t\t@Override\r\n\t\t\t \t\t\tpublic void handleEvent(Event event) {\r\n\t\t\t \t\t\t\tif(combo_brand_profit.getText().equals(\"\")){\r\n\t\t\t \t\t\t\t\tcombo_brand_profit.setText(AnalyzerConstants.ALL_BRAND);\r\n\t\t\t \t\t\t\t\tcombo_sub_profit.setText(AnalyzerConstants.ALL_SUB);\r\n\t\t\t \t\t\t\t\tcombo_sub_profit.setVisible(false);\r\n\t\t\t \t\t\t\t}\t\t \t\t\t\t\r\n\t\t\t \t\t\t}\r\n\t\t\t });\r\n\t combo_sub_profit.addListener(SWT.MouseUp, new Listener() {\r\n\r\n\t\t\t \t\t\t@Override\r\n\t\t\t \t\t\tpublic void handleEvent(Event event) {\r\n\t\t\t \t\t\t\tif(combo_sub_profit.getText().equals(\"\")){\r\n\t\t\t \t\t\t\t\tcombo_sub_profit.setText(AnalyzerConstants.ALL_SUB);\r\n\t\t\t \t\t\t\t}\t\t \t\t\t\t\r\n\t\t\t \t\t\t}\r\n\t\t\t });\r\n\t combo_sub_profit.addListener(SWT.MouseDown, new Listener() {\r\n\t\t \t\t\t@Override\r\n\t\t \t\t\tpublic void handleEvent(Event event) {\r\n\t\t \t\t\t\tString brand = combo_brand_profit.getText();\r\n\t\t \t\t\t\tList<String> list = Utils.getSub_Brands(brand);\t \t\t\t\t\t\t\r\n\t\t \t\t\t\tcombo_sub_profit.setItems(list.toArray(new String[list.size()]));\r\n\t\t \t\t\t\tcombo_sub_profit.add(AnalyzerConstants.ALL_SUB);\r\n\t\t \t\t\t}\r\n\t\t });\r\n\t combo_brand_profit.addSelectionListener(new SelectionAdapter() {\r\n\t\t\t \t@Override\r\n\t\t\t \tpublic void widgetSelected(SelectionEvent e) {\r\n//\t\t\t \t\tcombo_subbrand.clearSelection();\r\n\t\t\t \t\tif(!combo_brand_profit.getText().equals(AnalyzerConstants.ALL_BRAND)){\r\n\t\t\t \t\t\tcombo_sub_profit.deselectAll();\r\n\t\t\t \t\t\tcombo_sub_profit.setEnabled(true);\r\n\t\t\t \t\t\tcombo_sub_profit.setVisible(true);\r\n\t\t\t \t\t\tcombo_sub_profit.setText(AnalyzerConstants.ALL_SUB);\r\n\t\t\t \t\t}else{\r\n\t\t\t \t\t\tcombo_sub_profit.setVisible(false);\r\n\t\t\t \t\t}\r\n\t\t\t \t}\r\n\t\t\t });\r\n\t\t \r\n\t Label lbl_space = new Label(comp2, SWT.NONE);\r\n\t lbl_space.setText(\"\");\r\n\t lbl_space.setVisible(false);\r\n\t \r\n\t Label lbl_area = new Label(comp2, SWT.NONE);\r\n\t lbl_area.setText(\"片区/客户\");\r\n\t \r\n\t combo_area_profit = new CCombo(comp2, SWT.BORDER|SWT.READ_ONLY);\r\n\t GridData gd_combo_area = new GridData(SWT.LEFT, SWT.CENTER, false, false, 1, 1);\r\n\t gd_combo_area.widthHint = 151;\r\n\t combo_area_profit.setText(AnalyzerConstants.ALL_AREA);\r\n\t combo_area_profit.setLayoutData(gd_combo_area);\r\n\t \r\n\t combo_cus_profit = new CCombo(comp2, SWT.BORDER|SWT.READ_ONLY);\r\n\t combo_cus_profit.setText(AnalyzerConstants.ALL_CUSTOMER);\r\n\t combo_cus_profit.setVisible(false);\r\n\t GridData gd_combo_customer = new GridData(SWT.LEFT, SWT.CENTER, false, false, 1, 1);\r\n\t gd_combo_customer.widthHint = 151;\r\n\t combo_cus_profit.setLayoutData(gd_combo_customer);\r\n\t \r\n\t combo_area_profit.addListener(SWT.MouseDown, new Listener() {\r\n\r\n\t\t \t\t\t@Override\r\n\t\t \t\t\tpublic void handleEvent(Event event) {\r\n\t\t \t\t\t\tcombo_area_profit.setItems(DataCachePool.getCustomerAreas());\t\r\n\t\t \t\t\t\tcombo_area_profit.add(AnalyzerConstants.ALL_AREA);\r\n\t\t \t\t\t}\r\n\t\t });\t \r\n\t combo_area_profit.addListener(SWT.MouseUp, new Listener() {\r\n\r\n\t\t \t\t\t@Override\r\n\t\t \t\t\tpublic void handleEvent(Event event) {\r\n\t\t \t\t\t\tif(combo_area_profit.getText().equals(\"\")){\r\n\t\t \t\t\t\t\tcombo_area_profit.setText(AnalyzerConstants.ALL_AREA);\r\n\t\t \t\t\t\t\tcombo_cus_profit.setText(AnalyzerConstants.ALL_CUSTOMER);\r\n\t\t \t\t\t\t\tcombo_cus_profit.setVisible(false);\r\n\t\t \t\t\t\t}\t\t \t\t\t\t\r\n\t\t \t\t\t}\r\n\t\t });\r\n\t combo_cus_profit.addListener(SWT.MouseUp, new Listener() {\r\n\r\n\t\t \t\t\t@Override\r\n\t\t \t\t\tpublic void handleEvent(Event event) {\r\n\t\t \t\t\t\tif(combo_cus_profit.getText().equals(\"\")){\r\n\t\t \t\t\t\t\tcombo_cus_profit.setText(AnalyzerConstants.ALL_CUSTOMER);\r\n\t\t \t\t\t\t}\t\t \t\t\t\t\r\n\t\t \t\t\t}\r\n\t\t });\r\n\t combo_cus_profit.addListener(SWT.MouseDown, new Listener() {\r\n\t\t \t\t\t@Override\r\n\t\t \t\t\tpublic void handleEvent(Event event) {\r\n\t\t \t\t\t\tString area = combo_area_profit.getText();\r\n//\t\t\t\t\t\tSystem.out.println(\"area: \"+area);\r\n\t\t\t\t\t\tString[] names = DataCachePool.getCustomerNames(area);\r\n\t\t\t\t\t\tif(names.length != 0){//no such areas\r\n\t\t\t\t\t\t\tcombo_cus_profit.setItems(names);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tcombo_cus_profit.add(AnalyzerConstants.ALL_CUSTOMER);\r\n\t\t \t\t\t}\r\n\t\t });\r\n\t\t \r\n\t combo_area_profit.addSelectionListener(new SelectionAdapter() {\r\n\t\t \t@Override\r\n\t\t \tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t \t\tif(!combo_area_profit.getText().equals(AnalyzerConstants.ALL_AREA)){\r\n\t\t \t\t\tcombo_cus_profit.deselectAll();\r\n\t\t \t\t\tcombo_cus_profit.setEnabled(true);\r\n\t\t \t\t\tcombo_cus_profit.setVisible(true);\r\n\t\t \t\t\tcombo_cus_profit.setText(AnalyzerConstants.ALL_CUSTOMER);\r\n\t\t \t\t}else{\r\n\t\t \t\t\tcombo_cus_profit.setVisible(false);\r\n\t\t \t\t}\r\n\t\t \t}\r\n\t\t });\r\n \t \r\n//\t item2 = new ExpandItem(expandBar, SWT.NONE); \r\n\t \r\n\t item2.setText(\"利润分析\"); \t \r\n\t item2.setHeight((int)(h/3));// 设置Item的高度 \r\n\t comp2.setBackground(new Color(composite.getDisplay(), 240,255,255));\r\n\t item2.setControl(comp2);// setControl方法控制comp1的显现 \r\n\t } \r\n\t expandBar.setBackground(new Color(composite.getDisplay(), 204,255,204));\r\n\t composite_left.layout();\r\n \r\n\t \r\n\t\t//=============================================================================================\r\n\r\n\t /**\r\n\t * right part to show the analyzed result\t\r\n\t */\r\n\t //right part base compoiste\r\n\t\tComposite composite_right = new Composite(composite, SWT.NONE);\r\n\t\tcomposite_right.setBackground(new Color(composite.getDisplay(), 255, 250, 250));\r\n//\t\tcomposite_right.setBounds((int)(w/5), 0, (int)(4*w/5), h);\r\n\t\tcomposite_right.setBounds(200, 0, 760, h);\r\n\t\t\r\n\t\t//text area to show the tips\r\n\t\tstyledText = new StyledText(composite_right, SWT.BORDER|SWT.WRAP);\r\n\t\tstyledText.setEditable(false);\r\n\t\tstyledText.setBounds((int)(4*w/5/50), (int)(4*w/5/50), (int)(6*w/5/4), (int)(h/10));\r\n\t\tstyledText.setText(\"\");//\"五得利最近一个月出货量\\n\"+\"总计:15000包\"\r\n//\t\tStyleRange styleRange = new StyleRange();\r\n//\t\tstyleRange.start = 0;\r\n//\t\tstyleRange.length = \"五得利最近一个月出货量\".length();\r\n//\t\tstyleRange.fontStyle = SWT.BOLD;\r\n//\t\tstyledText.setStyleRange(styleRange);\r\n\t\t\r\n\t\t/**\r\n\t\t * the group buttons, showing the for kind of classification\r\n\t\t */\r\n\t\tComposite composite_group = new Composite(composite_right, SWT.NONE);\r\n\t\tcomposite_group.setBounds((int)(2*4*w/5/3), (int)(2*4*w/5/50/3), (int)(4*w/5/3-h/30), (int)(h/18));\r\n\t\tGridLayout layout = new GridLayout(4, true); \r\n\t\t//put the four button\r\n layout.numColumns = 4; \r\n layout.horizontalSpacing = 0;\r\n layout.verticalSpacing = 0;\r\n layout.marginHeight = 0;\r\n layout.marginWidth = 0;\r\n composite_group.setLayout(layout);\r\n \r\n GridData gd_text = new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1);\r\n\t\tgd_text.heightHint = (int)(h/18);\r\n Button btn_month = new Button(composite_group, SWT.NONE); \r\n btn_month.setText(\"一个月\");\r\n btn_month.setLayoutData(gd_text);\r\n\r\n\t\t\r\n GridData gd_text2 = new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1);\r\n gd_text2.heightHint = (int)(h/18);\r\n Button btn_season = new Button(composite_group, SWT.NONE);\r\n btn_season.setText(\"一个季度\");\r\n btn_season.setLayoutData(gd_text2);\r\n \r\n GridData gd_text3 = new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1);\r\n gd_text3.heightHint = (int)(h/18);\r\n Button btn_year = new Button(composite_group, SWT.NONE);\r\n btn_year.setText(\"一年\");\r\n btn_year.setLayoutData(gd_text3);\r\n\r\n \r\n GridData gd_text4 = new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1);\r\n gd_text4.heightHint = (int)(h/18);\r\n Button btn_all = new Button(composite_group, SWT.NONE);\r\n btn_all.setText(\"全部记录\");\r\n btn_all.setLayoutData(gd_text4); \r\n composite_group.layout();\r\n\r\n /**\r\n * the scroll composite to show the analyzed table result and graph\r\n */\r\n final Composite composite_main = new Composite(composite_right, SWT.NONE);\r\n// composite_main.setBounds(0, (int)(h/8+h/100), (int)(4*w/5), (int)(7*h/8-h/100));\r\n composite_main.setBounds(0, (int)(h/8+h/100), 740, (int)(7*h/8-h/100));\r\n \r\n composite_main.setBackground(new Color(composite.getDisplay(), 255,250,250));\r\n composite_main.setLayout(new FillLayout());\r\n composite_scroll = new ScrolledComposite(composite_main, SWT.NONE|SWT.V_SCROLL);//\r\n//\t\tcomposite_scroll.setVisible(true);\r\n\t\tcomposite_scroll.setExpandHorizontal(true); \r\n\t\tcomposite_scroll.setExpandVertical(true); \r\n\t\tcomposite_scroll.addListener(SWT.Activate, new Listener(){ \r\n\t\t\tpublic void handleEvent(Event e){\r\n\t\t\t\t//need to forceFocus\r\n\t\t\t\tcomposite_scroll.forceFocus();\r\n\t\t\t\t}\r\n\t\t}); \r\n\t\tcomposite_content = new Composite(composite_scroll, SWT.NONE);\r\n\t\tcomposite_scroll.setContent(composite_content);\r\n\t\tcomposite_content.setBackground(new Color(composite.getDisplay(), 255,240,245));\r\n\t\tlayout_content = new GridLayout(1, false); \r\n\t\tlayout_content.numColumns = 1; \r\n\t\tlayout_content.horizontalSpacing = 0;\r\n\t\tlayout_content.verticalSpacing = 0;\r\n\t\tlayout_content.marginHeight = 0;//not recommended\r\n\t\tlayout_content.marginWidth = 10;\r\n composite_content.setLayout(layout_content);\r\n composite_scroll.setMinSize(composite_content.computeSize(SWT.DEFAULT, SWT.DEFAULT));\r\n /**\r\n * add the button listener for the classification\r\n */\r\n btn_month.addSelectionListener(new SelectionAdapter() {\r\n \t@Override\r\n \tpublic void widgetSelected(SelectionEvent e) {\r\n \t\t\r\n \t\tinitialTitle(TYPE.MONTH);\r\n \t\tfor(int i=0;i<alys.size();i++){\r\n \t\t\tComposite c = (Composite)alys.get(i);\r\n \t\t\tc.dispose();\r\n \t\t}\r\n \t\talys.clear();\r\n \t\tshowResult(TYPE.MONTH);\r\n \t}\r\n });\r\n \r\n btn_season.addSelectionListener(new SelectionAdapter() {\r\n \t@Override\r\n \tpublic void widgetSelected(SelectionEvent e) {\r\n \t\tinitialTitle(TYPE.SEASON);\r\n \t\tfor(int i=0;i<alys.size();i++){\r\n \t\t\tComposite c = (Composite)alys.get(i);\r\n \t\t\tc.dispose();\r\n \t\t}\r\n \t\talys.clear();\r\n \t\tshowResult(TYPE.SEASON);\r\n \t}\r\n });\r\n btn_year.addSelectionListener(new SelectionAdapter() {\r\n \t@Override\r\n \tpublic void widgetSelected(SelectionEvent e) {\r\n \t\tinitialTitle(TYPE.YEAR);\r\n \t\tfor(int i=0;i<alys.size();i++){\r\n \t\t\tComposite c = (Composite)alys.get(i);\r\n \t\t\tc.dispose();\r\n \t\t}\r\n \t\talys.clear();\r\n \t\tshowResult(TYPE.YEAR);\r\n \t}\r\n });\r\n \r\n btn_all.addSelectionListener(new SelectionAdapter() {\r\n \t@Override\r\n \tpublic void widgetSelected(SelectionEvent e) {\r\n \t\tinitialTitle(TYPE.ALL);\r\n \t\tfor(int i=0;i<alys.size();i++){\r\n \t\t\tComposite c = (Composite)alys.get(i);\r\n \t\t\tc.dispose();\r\n \t\t}\r\n \t\talys.clear();\r\n \t\tshowResult(TYPE.ALL);\r\n \t}\r\n });\r\n composite_main.layout();\r\n composite_content.layout();\r\n// composite_scroll.layout();\r\n \r\n\t\ttry {\r\n\t\t\tDataCachePool.cacheProductInfo();\r\n\t\t\t DataCachePool.cacheCustomerInfo();\r\n\t\t} catch (Exception e1) {\r\n\t\t\tMessageBox mbox = new MessageBox(MainUI.getMainUI_Instance(Display.getDefault()));\r\n\t\t\tmbox.setMessage(\"连接数据库异常\");\r\n\t\t\tmbox.open();\r\n\t\t}\r\n \r\n\r\n\t}", "public void initialize() {\n fillCombobox();\n }", "private void initCombobox() {\n comboConstructeur = new ComboBox<>();\n comboConstructeur.setLayoutX(100);\n comboConstructeur.setLayoutY(250);\n\n\n BDDManager2 bddManager2 = new BDDManager2();\n bddManager2.start(\"jdbc:mysql://localhost:3306/concession?characterEncoding=utf8\", \"root\", \"\");\n listeConstructeur = bddManager2.select(\"SELECT * FROM constructeur;\");\n bddManager2.stop();\n for (int i = 0; i < listeConstructeur.size(); i++) {\n comboConstructeur.getItems().addAll(listeConstructeur.get(i).get(1));\n\n\n }\n\n\n\n\n\n\n }", "@Override\n public void init() {\n // Perform initializations inherited from our superclass\n super.init();\n // Perform application initialization that must complete\n // *before* managed components are initialized\n // TODO - add your own initialiation code here\n \n // <editor-fold defaultstate=\"collapsed\" desc=\"Managed Component Initialization\">\n // Initialize automatically managed components\n // *Note* - this logic should NOT be modified\n try {\n _init();\n } catch (Exception e) {\n log(\"alterarSenhaCliente Initialization Failure\", e);\n throw e instanceof FacesException ? (FacesException) e: new FacesException(e);\n }\n \n // </editor-fold>\n // Perform application initialization that must complete\n // *after* managed components are initialized\n // TODO - add your own initialization code here\n }", "@PostConstruct\n\tprotected void init() {\n\t\tLOGGER.info(\"GalleryModel init Start\");\n\t\tcharacterList.clear();\n\t\ttry {\n\t\t\tif (resource != null && !resource.getPath().contains(\"conf\")) {\n\t\t\t\t\tresolver = resource.getResourceResolver();\n\t\t\t\t\thomePagePath=TrainingHelper.getHomePagePath(resource);\n\t\t\t\t\tif(homePagePath!=null){\n\t\t\t\t\tlandinggridPath = homePagePath;\n\t\t\t\t\tif (!linkNavigationCheck) {\n\t\t\t\t\t\tlinkNavOption = \"\";\n\t\t\t\t\t}\n\t\t\t\t\tcheckLandingGridPath();\n\t\t\t\t\tif (!\"products\".equals(galleryFor)) {\n\t\t\t\t\t\tcharacterList = tileGalleryAndLandingService.getAllTiles(landinggridPath, galleryFor, \"landing\",\n\t\t\t\t\t\t\t\ttrue);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tLOGGER.error(\"Exception Occured\", e);\n\t\t}\n\t\tLOGGER.info(\"GalleryModel init End\");\n\t}", "public WareHouse()\n\t{\n\t\tsuper() ;\n\t\tprepare() ;\n\t\tsetInitCreateColumn();\n\t}", "private void initList(CartInfo ci) {\n\t\t\t\t\n\t\t\t\t\n\t\t\t}", "@PostConstruct\n\tprivate void init() {\n\t\tEntrada entr = new Entrada(\n\t\t\t\tnew Persona(\"Manuel\",\"Jimenex\",\"52422\",\"100000\",\"Cra 340\"),\n\t\t\t\t(new PreFactura(1l,new Date())), itemsService.lista());\n\t\t\n\t\tlistaEntrada.add(entr);\n\t}", "@PostConstruct\n @Override\n public void init() {\n super.setFacade(ejbFacade);\n newProspects = ejbFacade.findAllNew();\n \n FacesContext fc = FacesContext.getCurrentInstance();\n\tgetIdParam(fc);\n \n }", "public void initialize(IConfiguration config,ModuleInstance module,SmartPrescaleTable smartPrescaleTable)\n {\n\tthis.config = config;\n\tthis.module = module;\n\tprescaleTable = new PrescaleTable(config);\n\tthis.smartPrescaleTable = smartPrescaleTable;\n\tfireTableStructureChanged();\n\tfireTableDataChanged();\n }", "Composite() {\n\n\t}", "@Override\n public void initialize() {\n this.product = new Product(this.productId,this.productName,this.productPrice,this.productInv,this.productMin,this.productMax);\n productTitleLabel.setText(\"Modify Product\");\n }", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "private Offce_item() {\n\n initComponents();\n con = MysqlConnect.getDbCon();\n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n public void init() {\n // Perform initializations inherited from our superclass\n super.init();\n // Perform application initialization that must complete\n // *before* managed components are initialized\n // TODO - add your own initialiation code here\n \n // <editor-fold defaultstate=\"collapsed\" desc=\"Managed Component Initialization\">\n // Initialize automatically managed components\n // *Note* - this logic should NOT be modified\n try {\n _init();\n } catch (Exception e) {\n log(\"ListSemental Initialization Failure\", e);\n throw e instanceof FacesException ? (FacesException) e: new FacesException(e);\n }\n \n // </editor-fold>\n // Perform application initialization that must complete\n // *after* managed components are initialized\n // TODO - add your own initialization code here\n }", "private void initDatas(){\r\n \t\r\n \tjTable1.setModel(ViewUtil.transferBeanList2DefaultTableModel(discountService.getAllDiscountInfo(),\"Discount\"));\r\n }", "private void initElements() {\n unitImplementation = new UnitImplementation(EMF);\n supplierImplementation = new SupplierImplementation(EMF);\n personnelImplementation = new PersonnelImplementation(EMF);\n userImplementation = new UserImplementation(EMF);\n itemImplementation = new ItemImplementation(EMF);\n stockImplementation = new StockImplementation(EMF);\n salesImplementation = new SalesImplementation(EMF);\n dashboardImplementation = new DashboardImplementation(EMF);\n reportsImplementation = new ReportsImplementation(EMF);\n menuB1Active = MENU_B1_DASHBOARD;\n previousB1Button = b1DashboardButton;\n previousB2Button = b2DashboardButton;\n bigDecimalRenderer = new BigDecimalRenderer(new DecimalFormat(\"#,##0.00\"));\n\n // Set to default view.\n w2B2RadioButtonActionPerformed(null);\n b2DashboardButtonActionPerformed(null);\n w1B1RadioButtonActionPerformed(null);\n b1DashboardButtonActionPerformed(null);\n\n // Set reports date.\n reportsSalesFromDateChooser.setDate(DateUtil.current());\n reportsSalesToDateChooser.setDate(DateUtil.current());\n reportsStocksFromDateChooser.setDate(DateUtil.current());\n reportsStocksToDateChooser.setDate(DateUtil.current());\n reportsStockOutFromDateChooser.setDate(DateUtil.current());\n reportsStockOutToDateChooser.setDate(DateUtil.current());\n reportsSalesFromDateChooser1.setDate(DateUtil.current());\n reportsSalesToDateChooser1.setDate(DateUtil.current());\n reportsStocksFromDateChooser1.setDate(DateUtil.current());\n reportsStocksToDateChooser1.setDate(DateUtil.current());\n reportsStockOutFromDateChooser1.setDate(DateUtil.current());\n reportsStockOutToDateChooser1.setDate(DateUtil.current());\n\n // Set combo box.\n salesStockComboBox.setModel(stockImplementation.getComboBoxModel(BODEGA_1));\n stocksStockComboBox.setModel(stockImplementation.getComboBoxModel(BODEGA_1));\n stockOutStockComboBox.setModel(stockImplementation.getComboBoxModel(BODEGA_1));\n salesStockComboBox1.setModel(stockImplementation.getComboBoxModel(BODEGA_2));\n stocksStockComboBox1.setModel(stockImplementation.getComboBoxModel(BODEGA_2));\n stockOutStockComboBox1.setModel(stockImplementation.getComboBoxModel(BODEGA_2));\n\n // Generate default reports.\n b1GenerateSalesReport();\n b1GenerateStocksReport();\n b1GenerateStockOutReport();\n b2GenerateSalesReport();\n b2GenerateStocksReport();\n b2GenerateStockOutReport();\n\n // Set tables.\n b1SetUnitTable();\n b1SetPersonnelTable();\n b1SetUserTable();\n b1SetItemTable();\n b1SetStockTable();\n b1SetDashboardHotTable();\n b1SetDashboardAlmostOutOfStockTable();\n b2SetUnitTable();\n b2SetPersonnelTable();\n b2SetUserTable();\n b2SetItemTable();\n b2SetStockTable();\n b2SetDashboardHotTable();\n b2SetDashboardAlmostOutOfStockTable();\n\n b1UnitXTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);\n b1UnitXTable.setHighlighters(HighlighterFactory.createSimpleStriping(HighlighterFactory.CLASSIC_LINE_PRINTER));\n b1PersonnelXTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);\n b1PersonnelXTable.setHighlighters(HighlighterFactory.createSimpleStriping(HighlighterFactory.CLASSIC_LINE_PRINTER));\n b1UserXTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);\n b1UserXTable.setHighlighters(HighlighterFactory.createSimpleStriping(HighlighterFactory.CLASSIC_LINE_PRINTER));\n b1ItemXTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);\n b1ItemXTable.setHighlighters(HighlighterFactory.createSimpleStriping(HighlighterFactory.CLASSIC_LINE_PRINTER));\n stockXTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);\n stockXTable.setHighlighters(HighlighterFactory.createSimpleStriping(HighlighterFactory.CLASSIC_LINE_PRINTER));\n dashboardHotXTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);\n dashboardHotXTable.setHighlighters(HighlighterFactory.createSimpleStriping(HighlighterFactory.CLASSIC_LINE_PRINTER));\n dashboardAlmostOutOfStockXTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);\n dashboardAlmostOutOfStockXTable.setHighlighters(HighlighterFactory.createSimpleStriping(HighlighterFactory.CLASSIC_LINE_PRINTER));\n b1UnitXTable1.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);\n b1UnitXTable1.setHighlighters(HighlighterFactory.createSimpleStriping(HighlighterFactory.CLASSIC_LINE_PRINTER));\n b1PersonnelXTable1.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);\n b1PersonnelXTable1.setHighlighters(HighlighterFactory.createSimpleStriping(HighlighterFactory.CLASSIC_LINE_PRINTER));\n b1UserXTable1.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);\n b1UserXTable1.setHighlighters(HighlighterFactory.createSimpleStriping(HighlighterFactory.CLASSIC_LINE_PRINTER));\n b1ItemXTable1.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);\n b1ItemXTable1.setHighlighters(HighlighterFactory.createSimpleStriping(HighlighterFactory.CLASSIC_LINE_PRINTER));\n stockXTable1.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);\n stockXTable1.setHighlighters(HighlighterFactory.createSimpleStriping(HighlighterFactory.CLASSIC_LINE_PRINTER));\n dashboardHotXTable1.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);\n dashboardHotXTable1.setHighlighters(HighlighterFactory.createSimpleStriping(HighlighterFactory.CLASSIC_LINE_PRINTER));\n dashboardAlmostOutOfStockXTable1.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);\n dashboardAlmostOutOfStockXTable1.setHighlighters(HighlighterFactory.createSimpleStriping(HighlighterFactory.CLASSIC_LINE_PRINTER));\n }", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\r\n\tprotected void onManagedInitialize(final IEntity pEntity) {\r\n\r\n\t}", "public void initDefaultValues() {\n setOrderActive(1);\n setProductQuantity(1);\n setBillingPhone1Blocked(0);\n setBillingPhone2Blocked(0);\n setOrderAvailabilityStatus(1);\n setDeliveryStatus(1);\n setMailedReminderToVendorStatus(0);\n setOrderCancelRequestStatus(0);\n setOrderCancellationToVendorStatus(0);\n setDisputeRaisedStatus(0);\n setOrderAcceptNewsletter(1);\n setOrderAcceptPromotionalMaterial(1);\n setBillingAdvanceAmount(0);\n setBillingBalanceAmount(0);\n setBillingGrossAmount(0f);\n setBillingMarginAmount(0f);\n setBillingNettCost(0f);\n setBillingPaymentGatewayRate(0f);\n setBillingStateId(0);\n setBillingTaxrate(0f);\n setBillingTotalAmount(0f);\n setCarYear(0);\n setCustomint1(0);\n setCustomint2(0);\n setCustPaymentMode(0);\n setCustPaymentStatus(0);\n setInvoiceId(0);\n setVendorPaymentMode(0);\n setShipmentRate(0);\n setShipmentCountryId(0);\n setShipmentCityId(0);\n setOrderType(0);\n setOrderStatus(0);\n setOrderRefundType(0);\n setOrderPriority(0);\n setOrderBulkType(0);\n setOrderCorporateType(0);\n setShipmentCityId(0);\n setShipmentCountryId(0);\n setShipmentRate(0f);\n setShipmentStateId(0);\n setOrderCancellationType(0);\n }", "public static void init() {\n \n if(stock==null){\n stock=Analyser.stock;\n //for each stock, it price and the time\n// stoc\n// String[] listedCompanies = new NSELoader(20).getAllStocks();\n// \n// for (int i =0; i < listedCompanies.length; i++) {\n// \n// String stockName = listedCompanies[i];\n// float price = 0;\n// int time = 0;\n// ArrayList<String> value = new ArrayList<>();\n// String data = time + \":\" + price;// ':' is used as boundary token\n// value.add(data);\n// stock.put(stockName, value);\n// }\n \n\n }\n }", "void initEsperaMaterialesOrdenDeCompra() {\n try {\n\n HttpServletRequest request = (HttpServletRequest) FacesContext.getCurrentInstance().getExternalContext().getRequest();\n if (request.getParameter(\"nroSolicitud\") != null) {\n codSolicitudMantenimiento = Integer.parseInt(request.getParameter(\"nroSolicitud\"));\n }\n con = (Util.openConnection(con));\n Statement st = con.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);\n\n String consulta = \"\";\n //se lista los componentes a fabricar para programa_produccion\n\n consulta = \" SELECT SM.COD_SOLICITUD_MANTENIMIENTO, M.COD_MATERIAL,M.NOMBRE_MATERIAL, UM.COD_UNIDAD_MEDIDA, UM.NOMBRE_UNIDAD_MEDIDA,SCD.CANT_SOLICITADA FROM SOLICITUDES_MANTENIMIENTO SM \" +\n \" INNER JOIN SOLICITUDES_COMPRA SC ON SM.COD_SOLICITUD_COMPRA = SC.COD_SOLICITUD_COMPRA \" +\n \" INNER JOIN SOLICITUDES_COMPRA_DETALLE SCD ON SC.COD_SOLICITUD_COMPRA = SCD.COD_SOLICITUD_COMPRA \" +\n \" INNER JOIN MATERIALES M ON SCD.COD_MATERIAL=M.COD_MATERIAL \" +\n \" INNER JOIN UNIDADES_MEDIDA UM ON SCD.COD_UNIDAD_MEDIDA = UM.COD_UNIDAD_MEDIDA \" +\n \" WHERE SM.COD_SOLICITUD_MANTENIMIENTO = '\" + codSolicitudMantenimiento + \"'\";\n\n ResultSet rs = st.executeQuery(consulta);\n\n rs.last();\n int filas = rs.getRow();\n //programaProduccionList.clear();\n rs.first();\n materialesEnEsperaOrdenDeCompra.clear();\n for (int i = 0; i < filas; i++) {\n\n itemMateriales = new MaterialesSolicitudMantenimiento();\n itemMateriales.setCodSolicitudMantenimiento(rs.getString(\"COD_SOLICITUD_MANTENIMIENTO\"));\n itemMateriales.setCodMaterial(rs.getString(\"COD_MATERIAL\"));\n itemMateriales.setNombreMaterial(rs.getString(\"NOMBRE_MATERIAL\"));\n itemMateriales.setCodUnidadMedida(rs.getString(\"COD_UNIDAD_MEDIDA\"));\n itemMateriales.setNombreUnidadMedida(rs.getString(\"NOMBRE_UNIDAD_MEDIDA\"));\n itemMateriales.setCantidadSugerida(rs.getString(\"CANT_SOLICITADA\"));\n itemMateriales.setDisponible(this.getDisponible(rs.getString(\"COD_MATERIAL\")));\n\n materialesEnEsperaOrdenDeCompra.add(itemMateriales);\n rs.next();\n }\n if (rs != null) {\n rs.close();\n st.close();\n }\n this.getEstadoSolicitudCompraMateriales();\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "public static void init(){\n\n HELMET_COPPER = new ItemModArmor(COPPERARMOR, 1, EntityEquipmentSlot.HEAD, \"helmet_copper\");\n CHESTPLATE_COPPER = new ItemModArmor(COPPERARMOR, 1, EntityEquipmentSlot.CHEST, \"chestplate_copper\");\n LEGGINGS_COPPER = new ItemModArmor(COPPERARMOR, 2, EntityEquipmentSlot.LEGS, \"leggings_copper\");\n BOOTS_COPPER = new ItemModArmor(COPPERARMOR, 1, EntityEquipmentSlot.FEET, \"boots_copper\");\n\n }", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public MixedInitiativeManager(IndividualDesignManager idm, int[] chosenFF, int[] chosenBMPs, int UserId, int[] regionSubbasinId, int[] tenure_regionSubbasinId) { \n this.idm = idm;\n this.dbm = idm.dbm;\n this.UserId = UserId;\n this.chosenFF = chosenFF;\n this.chosenBMPs = chosenBMPs;\n this.tenure_regionSubbasinId = tenure_regionSubbasinId;\n this.regionSubbasinId = regionSubbasinId;\n im = new IntrospectionManager(idm);\n om = new OptimizationManager(idm);\n setLocalPreferences();//set the local BMP ids\n sdmm = new SDMManager(idm, statm, chosenFF, localSubbasinLoc, useLocalPreference, chosenBMPs, useANFIS);\n this.statm = new StatisticsManager(dbm);\n //sdmm.createNewSDM(type_optimize);\n kendall = new MannKendall();\n }", "private void makeBag(final HashMap<Integer, Integer> legalGoods,\n final HashMap<Integer, Integer> illegalGoods) {\n if (!legalGoods.isEmpty()) {\n this.putLegalGoods(legalGoods);\n } else {\n this.putIllegalGood(illegalGoods);\n this.setDeclaredGood(0);\n }\n }", "public void init() {\r\n\t\tsetModel(new ProductTableModel());\r\n\t}", "public void setCarItems(){\r\n\t\tComboItem[] comboItems;\r\n\t\t//array list is used as interim solution due to the fact that regular arrays size is immutable\r\n\t\tArrayList<ComboItem> itemList = new ArrayList<ComboItem>();\r\n\t\t\r\n\t\ttry {\r\n\t\t\t//Query database and populate array list with values. \r\n\t\t\tResultSet result = COMPANY_CAR_OPTIONS.executeQuery();\r\n\t\t\twhile(result.next()){\r\n\t\t\t\titemList.add(new ComboItem(result.getInt(1), result.getString(2)));\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//Initialise new array with needed size\r\n\t\t\tcomboItems = new ComboItem[itemList.size()];\r\n\t\t\t//convert arraylist object into array\r\n\t\t\tcomboItems = itemList.toArray(comboItems);\r\n\t\t} catch (SQLException e) {\r\n\t\t\t//initialise empty array to be returned\r\n\t\t\tcomboItems = new ComboItem[0];\r\n\t\t\tlogger.log(Level.SEVERE, e.getMessage());\r\n\t\t} \r\n\t\tthis.car_options = comboItems;\r\n\t}", "public JPMetaDados() {\n initComponents();\n postgresElicitedBases = FacadePostgresElicitedBases.getPostgresElicitedBases();\n// MetodosUtil.setCombo(jCSGBD);\n jCSGBD.addItemListener(new ComboListener(this));\n }", "@Override\n public void initialize(URL url, ResourceBundle rb) {\n selectedProduct = MainScreenController.getProductToModify();\n assocParts = selectedProduct.getAllAssociatedParts();\n\n partIdColumn.setCellValueFactory(new PropertyValueFactory<>(\"id\"));\n partNameColumn.setCellValueFactory(new PropertyValueFactory<>(\"name\"));\n partInventoryColumn.setCellValueFactory(new PropertyValueFactory<>(\"stock\"));\n partPriceColumn.setCellValueFactory(new PropertyValueFactory<>(\"price\"));\n partTableView.setItems(Inventory.getAllParts());\n\n assocPartIdColumn.setCellValueFactory(new PropertyValueFactory<>(\"id\"));\n assocPartNameColumn.setCellValueFactory(new PropertyValueFactory<>(\"name\"));\n assocPartInventoryColumn.setCellValueFactory(new PropertyValueFactory<>(\"stock\"));\n assocPartPriceColumn.setCellValueFactory(new PropertyValueFactory<>(\"price\"));\n assocPartTableView.setItems(assocParts);\n\n productIdText.setText(String.valueOf(selectedProduct.getId()));\n productNameText.setText(selectedProduct.getName());\n productInventoryText.setText(String.valueOf(selectedProduct.getStock()));\n productPriceText.setText(String.valueOf(selectedProduct.getPrice()));\n productMaxText.setText(String.valueOf(selectedProduct.getMax()));\n productMinText.setText(String.valueOf(selectedProduct.getMin()));\n }", "public void setEEGroups(){\r\n\t\tComboItem[] comboItems;\r\n\t\t//array list is used as interim solution due to the fact that regular arrays size is immutable\r\n\t\tArrayList<ComboItem> itemList = new ArrayList<ComboItem>();\r\n\t\t\r\n\t\ttry {\r\n\t\t\t//Query database and populate array list with values. \r\n\t\t\tResultSet result = EE_GROUPS.executeQuery();\r\n\t\t\twhile(result.next()){\r\n\t\t\t\titemList.add(new ComboItem(result.getInt(1), result.getString(2)));\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//Initialise new array with needed size\r\n\t\t\tcomboItems = new ComboItem[itemList.size()];\r\n\t\t\t//convert arraylist object into array\r\n\t\t\tcomboItems = itemList.toArray(comboItems);\r\n\t\t} catch (SQLException e) {\r\n\t\t\t//initialise empty array to be returned\r\n\t\t\tcomboItems = new ComboItem[0];\r\n\t\t\tlogger.log(Level.SEVERE, e.getMessage());\r\n\t\t} \r\n\t\tthis.ee_groups = comboItems;\r\n\t}", "abstract void initializeNeededData();", "private void initialize() {\r\n this.setSize(new Dimension(800,600));\r\n this.setContentPane(getJPanel());\r\n\r\n List<String> title = new ArrayList<String>();\r\n title.add(\"Select\");\r\n title.add(\"Field Id\");\r\n title.add(\"Field Name\");\r\n title.add(\"Field Type\");\r\n title.add(\"Image\");\r\n\r\n List<JComponent> componentList = new ArrayList<JComponent>();\r\n componentList.add(checkInit);\r\n componentList.add(fieldIdInit);\r\n componentList.add(filedNameInit);\r\n componentList.add(fieldTypeInit);\r\n componentList.add(imageButton);\r\n\r\n String []arrColumn = {\"SELECT\", \"FIELD_ID\", \"FIELD_NAME\", \"FIELD_TYPE\", \"FIELD_VALUE\"};\r\n String []arrTitle = {\"SELECT\", \"FIELD_ID\", \"FIELD_NAME\", \"FIELD_TYPE\", \"FIELD_VALUE\"};\r\n // init grid\r\n grid = new GridUtils(pageSheet, title, componentList, arrColumn, preButton, afterButton, 5, arrTitle);\r\n // set title\r\n grid.setPageInfo(pageInfoLbl);\r\n \r\n searchDetailList();\r\n \r\n initComboBox();\r\n \r\n setTitle(\"Page Select page\");\r\n\t}", "public void setWorkContractItems(){\r\n\t\tComboItem[] comboItems;\r\n\t\t//array list is used as interim solution due to the fact that regular arrays size is immutable\r\n\t\tArrayList<ComboItem> itemList = new ArrayList<ComboItem>();\r\n\t\t\r\n\t\ttry {\r\n\t\t\t//Query database and populate array list with values. \r\n\t\t\tResultSet result = WORK_CONTRACT_OPTIONS.executeQuery();\r\n\t\t\twhile(result.next()){\r\n\t\t\t\titemList.add(new ComboItem(result.getInt(1), result.getString(2)));\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//Initialise new array with needed size\r\n\t\t\tcomboItems = new ComboItem[itemList.size()];\r\n\t\t\t//convert arraylist object into array\r\n\t\t\tcomboItems = itemList.toArray(comboItems);\r\n\t\t} catch (SQLException e) {\r\n\t\t\t//initialise empty array to be returned\r\n\t\t\tcomboItems = new ComboItem[0];\r\n\t\t\tlogger.log(Level.SEVERE, e.getMessage());\r\n\t\t} \r\n\t\t\r\n\t\tthis.work_contracts = comboItems;\r\n\t}", "public void init() {\n // Perform initializations inherited from our superclass\n super.init();\n // Perform application initialization that must complete\n // *before* managed components are initialized\n // TODO - add your own initialiation code here\n \n // <editor-fold defaultstate=\"collapsed\" desc=\"Managed Component Initialization\">\n // Initialize automatically managed components\n // *Note* - this logic should NOT be modified\n try {\n _init();\n } catch (Exception e) {\n log(\"AnalysisDatasets Initialization Failure\", e);\n throw e instanceof FacesException ? (FacesException) e: new FacesException(e);\n }\n \n // </editor-fold>\n // Perform application initialization that must complete\n // *after* managed components are initialized\n // TODO - add your own initialization code here\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\n protected void initData() {\n }", "@Override\n protected void initData() {\n }", "public void bootstrap() {\n EntityManager em = CONNECTION_FACTORY.getConnection();\n List<CaixaItemTipo> cits = new ArrayList<>();\n cits.add(CaixaItemTipo.LANCAMENTO_MANUAL);\n cits.add(CaixaItemTipo.DOCUMENTO);\n cits.add(CaixaItemTipo.ESTORNO);\n cits.add(CaixaItemTipo.TROCO);\n \n cits.add(CaixaItemTipo.SUPRIMENTO);\n cits.add(CaixaItemTipo.SANGRIA);\n \n cits.add(CaixaItemTipo.CONTA_PROGRAMADA);\n //cits.add(CaixaItemTipo.PAGAMENTO_DOCUMENTO); 2019-06-10 generalizado com tipo 2\n cits.add(CaixaItemTipo.TRANSFERENCIA);\n \n cits.add(CaixaItemTipo.FUNCIONARIO);\n \n \n em.getTransaction().begin();\n for(CaixaItemTipo cit : cits){\n if(findById(cit.getId()) == null){\n em.persist(cit);\n } else {\n em.merge(cit);\n }\n }\n em.getTransaction().commit();\n\n em.close();\n }", "@PostConstruct\r\n\tpublic void init(){\r\n\t\tcom = new Comentarios();\r\n\t\tlistComentarios = comDao.getComentarios();\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void initData() {\n\n\n\n\t}", "@Override\n\tpublic void init(GameContainer gc) throws SlickException {\n\t}", "private void initComponent() {\n\t\taddGrid();\n\t\taddToolBars();\n\t}", "@Override\n\tprotected void initData(){\n\t\tsuper.initData();\n\t}", "@SuppressWarnings(\"unchecked\")\n private void initOthers() {\n resetTable(tblLowSock);\n resetTable(tblReceiptRealization);\n resetTable(tblVoucherRealization);\n loadVoucherRealization();\n loadReceiptRealization();\n loadLowStock();\n tblVoucherRealization.setShowHorizontalLines(false);\n tblReceiptRealization.setShowHorizontalLines(false);\n tblLowSock.setShowHorizontalLines(false);\n }", "public <T extends Creature> void initialize(Evolution evolution)\n\t{\n\t\t// reset the population\n\t\tcreatures.clear();\n\n\t\t// instantiate the creatures\n\t\tfor (int i = 0; i < desiredSize; i++)\n\t\t{\n\t\t\t// instantiate the creature\n\t\t\taddNewCreature(evolution);\n\t\t}\n\n\t}", "public void init() {\n cupDataChangeListener = new CupDataChangeListener(dataBroker);\n }", "@Override\n public void initialize(URL arg0, ResourceBundle arg1) {\n \t\n \tsetColumnProperties();\n \tstatus.getItems().setAll(StatusPedido.values());\n \tcbfornecedores.getItems().setAll(forncedorService.findAll());\n \t\n \tsuper.initialize(arg0, arg1);\n }", "@Override\r\n\tprotected void init() {\n\t\tupdateValues();\r\n\t}", "private void initializeComponents()\n throws Exception\n {\n // get locale.\n Locale locale = httpRequest.getLocale();\n\n // initialize lst_SearchConditionTwoColumn.\n _lcm_lst_SearchConditionTwoColumn = new ListCellModel(lst_SearchConditionTwoColumn, LST_SEARCHCONDITIONTWOCOLUMN_KEYS, locale);\n _lcm_lst_SearchConditionTwoColumn.setToolTipVisible(KEY_LST_SEARCH_CONDITION_1, false);\n _lcm_lst_SearchConditionTwoColumn.setToolTipVisible(KEY_LST_SEARCH_CONDITION_2, false);\n _lcm_lst_SearchConditionTwoColumn.setToolTipVisible(KEY_LST_SEARCH_CONDITION_3, false);\n _lcm_lst_SearchConditionTwoColumn.setToolTipVisible(KEY_LST_SEARCH_CONDITION_4, false);\n\n // initialize pager control.\n _pager = new PagerModel(new Pager[]{pgr_U, pgr_D}, locale);\n\n // initialize lst_PCTItemMasterList.\n _lcm_lst_PCTItemMasterList = new ListCellModel(lst_PCTItemMasterList, LST_PCTITEMMASTERLIST_KEYS, locale);\n _lcm_lst_PCTItemMasterList.setToolTipVisible(KEY_LST_ITEM_CODE, true);\n _lcm_lst_PCTItemMasterList.setToolTipVisible(KEY_LST_ITEM_NAME, true);\n _lcm_lst_PCTItemMasterList.setToolTipVisible(KEY_LST_LOT_QTY, true);\n _lcm_lst_PCTItemMasterList.setToolTipVisible(KEY_LST_JAN, true);\n _lcm_lst_PCTItemMasterList.setToolTipVisible(KEY_LST_ITF, true);\n _lcm_lst_PCTItemMasterList.setToolTipVisible(KEY_LST_LOCATION_NO, true);\n _lcm_lst_PCTItemMasterList.setToolTipVisible(KEY_LST_SINGLE_WEIGHT, true);\n _lcm_lst_PCTItemMasterList.setToolTipVisible(KEY_LST_WEIGHT_DISTINCT_RATE, true);\n _lcm_lst_PCTItemMasterList.setToolTipVisible(KEY_LST_MAX_INSPECTION_QTY, true);\n _lcm_lst_PCTItemMasterList.setToolTipVisible(KEY_LST_LAST_UPDATE_DATE, true);\n _lcm_lst_PCTItemMasterList.setToolTipVisible(KEY_LST_LAST_USED_DATE, true);\n _lcm_lst_PCTItemMasterList.setToolTipVisible(KEY_LST_ITEM_PICTURE_REGIST, true);\n _lcm_lst_PCTItemMasterList.setToolTipVisible(KEY_LST_MESSAGE, true);\n\n }", "@PostConstruct\n public void init() throws Exception {\n List<Merchant> merchantList = merchantDAO.findLatestMerchant(4);\n homeSuggestMerchantVO = new HomeSuggestMerchantVO();\n homeSuggestMerchantVO.setRecommendOfToday(merchantList.get(0));\n homeSuggestMerchantVO.setHottestOfWeek(merchantList.get(1));\n homeSuggestMerchantVO.setHighOfRank(merchantList.get(2));\n homeSuggestMerchantVO.setBestOfToday(merchantList.get(3));\n }", "public void setContractTypeItems(){\r\n\t\tComboItem[] comboItems;\r\n\t\t//array list is used as interim solution due to the fact that regular arrays size is immutable\r\n\t\tArrayList<ComboItem> itemList = new ArrayList<ComboItem>();\r\n\t\t\r\n\t\ttry {\r\n\t\t\t//Query database and populate array list with values. \r\n\t\t\tResultSet result = CONTRACT_TYPE_OPTIONS.executeQuery();\r\n\t\t\twhile(result.next()){\r\n\t\t\t\titemList.add(new ComboItem(result.getInt(1), result.getString(2)));\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//Initialise new array with needed size\r\n\t\t\tcomboItems = new ComboItem[itemList.size()];\r\n\t\t\t//convert arraylist object into array\r\n\t\t\tcomboItems = itemList.toArray(comboItems);\r\n\t\t} catch (SQLException e) {\r\n\t\t\t//initialise empty array to be returned\r\n\t\t\tcomboItems = new ComboItem[0];\r\n\t\t\tlogger.log(Level.SEVERE, e.getMessage());\r\n\t\t} \r\n\t\t\r\n\t\tthis.contract_types = comboItems;\r\n\t}" ]
[ "0.6211954", "0.5889432", "0.58620834", "0.5858343", "0.58029824", "0.57662606", "0.5738368", "0.5704511", "0.56994677", "0.567352", "0.5651787", "0.56512266", "0.5644889", "0.56175774", "0.5616102", "0.56051487", "0.5604899", "0.55881053", "0.5577036", "0.55733323", "0.55690134", "0.5545405", "0.55402327", "0.5525188", "0.55172884", "0.5508498", "0.5492861", "0.5484006", "0.54604053", "0.54562974", "0.5453459", "0.5410506", "0.53993285", "0.53993285", "0.53993285", "0.53993285", "0.53993285", "0.53993285", "0.5396125", "0.5387565", "0.5384907", "0.53819215", "0.53798926", "0.5378872", "0.5372062", "0.53718436", "0.5368375", "0.53524405", "0.533815", "0.5332304", "0.53312236", "0.5330834", "0.53245723", "0.53225446", "0.53220284", "0.5319012", "0.53167546", "0.53162545", "0.53140765", "0.53135115", "0.5313366", "0.5311622", "0.53093106", "0.53076494", "0.5304299", "0.5302024", "0.5288929", "0.5288929", "0.5285701", "0.52813727", "0.5279352", "0.5279121", "0.52767646", "0.5266143", "0.526583", "0.52557313", "0.5255408", "0.52548075", "0.5247144", "0.5235489", "0.5233986", "0.5233236", "0.5233236", "0.52250576", "0.52228117", "0.5222273", "0.5222273", "0.5222273", "0.5221056", "0.5216559", "0.5216196", "0.52157295", "0.52125263", "0.52105397", "0.52037984", "0.52016217", "0.5199262", "0.5194961", "0.5192997", "0.51885825" ]
0.5979621
1
TODO Autogenerated method stub
@Override public void widgetSelected(SelectionEvent arg0) { InputDialog id1=new InputDialog(sShell,"新增商品","输入商品信息,用空格分开,例如:001 方便面 6.8","",null); if(id1.open()==0){ input=id1.getValue(); if(input.equals("")) return; } else return; String str[]=input.split(" "); CommonADO ado=CommonADO.getCommonADO(); String sql="insert into Goods values('"+str[0]+"','"+str[1]+"','"+str[2]+"')"; ado.executeUpdate(sql); compositeGoodsShow.dispose(); createCompositeGoodsShow(); compositeGoodsMange.layout(true); //compositeGoodsShow.layout(true); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
TODO Autogenerated method stub
@Override public void widgetDefaultSelected(SelectionEvent arg0) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
TODO Autogenerated method stub
@Override public void widgetSelected(SelectionEvent arg0) { InputDialog id1=new InputDialog(sShell,"删除商品","输入商品编号","",null); if(id1.open()==0){ input=id1.getValue(); if(input.equals("")) return; } else return; CommonADO ado=CommonADO.getCommonADO(); String sql="delete from Goods where GoodsNo='"+input+"'"; ado.executeUpdate(sql); //createCompositeGoodsShow(); compositeGoodsShow.dispose(); createCompositeGoodsShow(); compositeGoodsMange.layout(true); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "private stendhal() {\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.66708666", "0.65675074", "0.65229905", "0.6481001", "0.64770633", "0.64584893", "0.6413091", "0.63764185", "0.6275735", "0.62541914", "0.6236919", "0.6223816", "0.62017626", "0.61944294", "0.61944294", "0.61920846", "0.61867654", "0.6173323", "0.61328775", "0.61276996", "0.6080555", "0.6076938", "0.6041293", "0.6024541", "0.6019185", "0.5998426", "0.5967487", "0.5967487", "0.5964935", "0.59489644", "0.59404725", "0.5922823", "0.5908894", "0.5903041", "0.5893847", "0.5885641", "0.5883141", "0.586924", "0.5856793", "0.58503157", "0.58464456", "0.5823378", "0.5809384", "0.58089525", "0.58065355", "0.58065355", "0.5800514", "0.57912874", "0.57912874", "0.57912874", "0.57912874", "0.57912874", "0.57912874", "0.57896614", "0.5789486", "0.5786597", "0.5783299", "0.5783299", "0.5773351", "0.5773351", "0.5773351", "0.5773351", "0.5773351", "0.5760369", "0.5758614", "0.5758614", "0.574912", "0.574912", "0.574912", "0.57482654", "0.5732775", "0.5732775", "0.5732775", "0.57207066", "0.57149917", "0.5714821", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57115865", "0.57045746", "0.5699", "0.5696016", "0.5687285", "0.5677473", "0.5673346", "0.56716853", "0.56688815", "0.5661065", "0.5657898", "0.5654782", "0.5654782", "0.5654782", "0.5654563", "0.56536144", "0.5652585", "0.5649566" ]
0.0
-1
TODO Autogenerated method stub
@Override public void widgetDefaultSelected(SelectionEvent arg0) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
This method initializes compositeStaffMange
private void createCompositeStaffMange() { GridData gridData2 = new GridData(); gridData2.horizontalSpan = 14; gridData2.heightHint = 300; gridData2.widthHint = 500; gridData2.grabExcessHorizontalSpace = true; GridData gridData8 = new GridData(); gridData8.widthHint = 100; GridLayout gridLayout1 = new GridLayout(); gridLayout1.numColumns = 18; compositeStaffMange = new Composite(tabFolder, SWT.NONE); compositeStaffMange.setLayout(gridLayout1); textAreaStaff = new Text(compositeStaffMange, SWT.MULTI | SWT.WRAP | SWT.V_SCROLL); textAreaStaff.setLayoutData(gridData2); label2 = new Label(compositeStaffMange, SWT.NONE); label2.setText(""); label3 = new Label(compositeStaffMange, SWT.NONE); label3.setText(""); label3.setLayoutData(gridData8); label4 = new Label(compositeStaffMange, SWT.NONE); label4.setText(""); Label filler = new Label(compositeStaffMange, SWT.NONE); tableViewer.setContentProvider(new IStructuredContentProvider(){ public Object[] getElements(Object arg0) { // TODO Auto-generated method stub RoomFactory roomFactory=(RoomFactory)arg0; return roomFactory.getRoomList().toArray(); } public void dispose() { } public void inputChanged(Viewer arg0, Object arg1, Object arg2) { }}); tableViewer.setInput(new RoomFactory()); tableViewer.setLabelProvider(new ITableLabelProvider(){ public Image getColumnImage(Object arg0, int arg1) { // TODO Auto-generated method stub return null; } public String getColumnText(Object arg0, int arg1) { // TODO Auto-generated method stub Room room=(Room)arg0; CommonADO ado=CommonADO.getCommonADO(); String roomInfoQueryStr="select * from RoomType where Type='"+room.getType()+"'"; ResultSet rs; rs=ado.executeSelect(roomInfoQueryStr); int peopleNum=0; float price=0; try { if(rs.next()){ peopleNum=rs.getInt("PeopleNums"); price=rs.getFloat("Price"); } } catch (SQLException e) { // TODO Auto-generated catch block e.printStackTrace(); } if(arg1==0) return room.getRoomNo(); if(arg1==1) return room.getType(); if(arg1==2) return peopleNum+""; if(arg1==3) return price+""; if(arg1==4) return room.getRemarks(); System.out.println(room.getType()+room.getState()+room.getRoomNo()); return null; } public void addListener(ILabelProviderListener arg0) { } public void dispose() { } public boolean isLabelProperty(Object arg0, String arg1) { // TODO Auto-generated method stub return false; } public void removeListener(ILabelProviderListener arg0) { }}); buttonAddStaff = new Button(compositeStaffMange, SWT.NONE); buttonAddStaff.setText("新增员工"); buttonAddStaff.addSelectionListener(new SelectionListener() { @Override public void widgetSelected(SelectionEvent arg0) { // TODO Auto-generated method stub InputDialog id1=new InputDialog(sShell,"新增员工","输入员工信息,用空格分开,例如:001 Manager Tommy f 312039","",null); if(id1.open()==0){ input=id1.getValue(); if(input.equals("")) return; } else return; String str[]=input.split(" "); CommonADO ado=CommonADO.getCommonADO(); String sql="insert into Staff values('"+str[0]+"','"+str[1]+"','"+str[2]+"','"+str[3]+"','"+str[4]+"')"; ado.executeUpdate(sql); showStaff(); } @Override public void widgetDefaultSelected(SelectionEvent arg0) { // TODO Auto-generated method stub } }); Label filler7 = new Label(compositeStaffMange, SWT.NONE); Label filler4 = new Label(compositeStaffMange, SWT.NONE); Label filler1 = new Label(compositeStaffMange, SWT.NONE); buttonDeleteStaff = new Button(compositeStaffMange, SWT.NONE); buttonDeleteStaff.setText("删除员工"); buttonDeleteStaff.addSelectionListener(new SelectionListener() { @Override public void widgetSelected(SelectionEvent arg0) { // TODO Auto-generated method stub InputDialog id1=new InputDialog(sShell,"删除员工","输入员工编号","",null); if(id1.open()==0){ input=id1.getValue(); if(input.equals("")) return; } else return; CommonADO ado=CommonADO.getCommonADO(); String sql="delete from Staff where StaffNo='"+input+"'"; ado.executeUpdate(sql); showStaff(); } @Override public void widgetDefaultSelected(SelectionEvent arg0) { // TODO Auto-generated method stub } }); showStaff(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public StaffMember(){\r\n\t\tsuper();\r\n\t\tthis.job = \"\";\r\n\t\tthis.staffShows = new ArrayList<ScheduledConcert>();\r\n\t\tthis.setStaffID();\r\n\t}", "private void initStaff(){\n //wake movie staff, maintains ArrayList MovieModel and MovieItem buffers\n mMovieStaff = new MovieStaff(this);\n\n //wake refresh staff, maintains HashMap RefreshItem buffers\n mRefreshStaff = new RefreshStaff(this);\n mRefreshStaff.setRefreshMap(mRefreshValet.getRefreshMap());\n\n //wake house keeper staff, maintains HashMap MyHouseKeeper buffer\n mKeeperStaff = new HouseKeeperStaff(this);\n\n //wake maid staff, maintains HashMap MyMaid buffer\n mMaidStaff = new MaidStaff(this);\n }", "public StaffMember(String fName, String lName, PhoneNumber phone, Address address, String emailAddress, String job, ArrayList<ScheduledConcert>staffShows) {\r\n\t\tsuper(fName, lName, phone, address, emailAddress);\r\n\t\tthis.job = job;\r\n\t\tthis.staffShows = staffShows;\r\n\t\tthis.setStaffID(); \r\n\t\t\r\n\t\t// TODO Auto-generated constructor stub\r\n\t}", "public Staff2 ()\n {\n staffList = new StaffMember2[8];\n\n staffList[0] = new Executive2 (\"Sam\", \"123 Main Line\",\n \"555-0469\", \"123-45-6789\", 2423.07);\n\n staffList[1] = new Employee2 (\"Carla\", \"456 Off Line\",\n \"555-0101\", \"987-65-4321\", 1246.15);\n staffList[2] = new Employee2 (\"Woody\", \"789 Off Rocker\",\n \"555-0000\", \"010-20-3040\", 1169.23);\n\n staffList[3] = new Hourly2 (\"Diane\", \"678 Fifth Ave.\",\n \"555-0690\", \"958-47-3625\", 10.55);\n\n staffList[4] = new Volunteer2 (\"Norm\", \"987 Suds Blvd.\",\n \"555-8374\");\n staffList[5] = new Volunteer2 (\"Cliff\", \"321 Duds Lane\",\n \"555-7282\");\n\n staffList[6] = new Commission (\"Ron\", \"546 Mainland Dr.\",\n \t\"555-8141\", \"547-87-9845\", 11.75, .20);\n staffList[7] = new Commission (\"Sammy\", \"180 Barkley Lane\",\n \t\"555-6256\", \"695-14-3824\", 14.50, .15);\n\n ((Executive2)staffList[0]).awardBonus (500.00);\n\n ((Commission)staffList[6]).addHours(35);\n ((Commission)staffList[6]).addSales(400);\n\n ((Commission)staffList[7]).addHours(40);\n ((Commission)staffList[7]).addSales(950);\n\n ((Hourly2)staffList[3]).addHours (40);\n }", "private void initColumnMaster()\r\n\t{\r\n\t\tstudentaNoMColumn.setCellValueFactory(new PropertyValueFactory<>(\"studendID\"));\r\n\t\tnameMColumn.setCellValueFactory(new PropertyValueFactory<>(\"name\"));\r\n\t\tsurnameMColumn.setCellValueFactory(new PropertyValueFactory<>(\"surname\"));\r\n\t\tsupervisorMColumn.setCellValueFactory(new PropertyValueFactory<>(\"supervisor\"));\r\n\t\temailMColumn.setCellValueFactory(new PropertyValueFactory<>(\"email\"));\r\n\t\tcellphoneMColumn.setCellValueFactory(new PropertyValueFactory<>(\"cellphone\"));\r\n\t\tstationMColumn.setCellValueFactory(new PropertyValueFactory<>(\"station\"));\r\n\t\tcourseMColumn.setCellValueFactory(new PropertyValueFactory<>(\"course\"));\r\n\t}", "public ItemCinderStaff() {\n super(\"staff_ember\", true);\n this.setMaxStackSize(1);\n }", "public StaffMember() {\r\n }", "public Staff() {\n\t\tthis.staffId = null;\n\t\tthis.staffPass = null;\n\t}", "public void setStaffID() {\r\n\t\t\t staffID = IDFactory.getID(\"ST\");\r\n\t\t}", "public StaffBean() {\n try {\n username = SessionController.getInstance().getUser((HttpSession)FacesContext.getCurrentInstance().getExternalContext().getSession(false));\n genders = GBEnvironment.getInstance().getCatalog(GB_CommonStrConstants.CT_GENDER).getAllCatalog();\n id_types= GBEnvironment.getInstance().getCatalog(GB_CommonStrConstants.CT_IDTYPE).getAllCatalog();\n charge_up();\n } catch (GB_Exception ex) {\n LOG.error(ex);\n GBMessage.putMessage(GBEnvironment.getInstance().getError(28), null);\n }\n }", "private void setUp() {\r\n Calendar calendar1 = Calendar.getInstance();\r\n calendar1.set((endDate.get(Calendar.YEAR)), \r\n (endDate.get(Calendar.MONTH)), (endDate.get(Calendar.DAY_OF_MONTH)));\r\n calendar1.roll(Calendar.DAY_OF_YEAR, -6);\r\n \r\n Calendar calendar2 = Calendar.getInstance();\r\n calendar2.set((endDate.get(Calendar.YEAR)), \r\n (endDate.get(Calendar.MONTH)), (endDate.get(Calendar.DAY_OF_MONTH)));\r\n \r\n acceptedDatesRange[0] = calendar1.get(Calendar.DAY_OF_YEAR);\r\n acceptedDatesRange[1] = calendar2.get(Calendar.DAY_OF_YEAR); \r\n \r\n if(acceptedDatesRange[1] < 7) {\r\n acceptedDatesRange[0] = 1; \r\n }\r\n \r\n //MiscStuff.writeToLog(\"Ranges set \" + calendar1.get\r\n // (Calendar.DAY_OF_YEAR) + \" \" + calendar2.get(Calendar.DAY_OF_YEAR));\r\n }", "public StaffMember(String firstname, String surname, int staffID, DepartmentStaff deptStaff, StaffType roleStaff) {\n this.firstname = firstname;\n this.surname = surname;\n this.staffID = staffID;\n this.deptStaff = deptStaff;\n this.roleStaff = roleStaff;\n }", "public Staff() {\n this(DSL.name(\"STAFF\"), null);\n }", "public void init(){\n\t\tEmployee first = new Employee(\"Diego\", \"Gerente\", \"[email protected]\");\n\t\tHighSchool toAdd = new HighSchool(\"Santiago Apostol\", \"4656465\", \"cra 33a #44-56\", \"3145689879\", 30, 5000, \"Jose\", new Date(1, 3, 2001), 3, \"Servicios educativos\", \"451616\", 15, \"Piedrahita\", 45, 1200, 500);\n\t\ttoAdd.addEmployee(first);\n\t\tProduct pilot = new Product(\"jet\", \"A00358994\", 1.5, 5000);\n\t\tFood firstFood = new Food(\"Colombina\", \"454161\", \"cra 18\", \"454611313\", 565, 60000, \"Alberto\", new Date(1, 8, 2015), 6, \"Manufactura\", 4);\n\t\tfirstFood.addProduct(pilot);\n\t\ttheHolding = new Holding(\"Hertz\", \"15545\", \"cra 39a #30a-55\", \"3147886693\", 80, 500000, \"Daniel\", new Date(1, 2, 2015), 5);\n\t\ttheHolding.addSubordinate(toAdd);\n\t\ttheHolding.addSubordinate(firstFood);\n\t}", "public QuotationDetailProStaffManagedBean() {\n }", "public CentreBean() {\r\n if(centreToAdd == null){\r\n centreToAdd = new Centres();\r\n }\r\n \r\n }", "public Managing_Staff_Main_Form() {\n initComponents();\n }", "public MixedInitiativeManager(IndividualDesignManager idm, int[] chosenFF, int[] chosenBMPs, int UserId, int[] regionSubbasinId, int[] tenure_regionSubbasinId) { \n this.idm = idm;\n this.dbm = idm.dbm;\n this.UserId = UserId;\n this.chosenFF = chosenFF;\n this.chosenBMPs = chosenBMPs;\n this.tenure_regionSubbasinId = tenure_regionSubbasinId;\n this.regionSubbasinId = regionSubbasinId;\n im = new IntrospectionManager(idm);\n om = new OptimizationManager(idm);\n setLocalPreferences();//set the local BMP ids\n sdmm = new SDMManager(idm, statm, chosenFF, localSubbasinLoc, useLocalPreference, chosenBMPs, useANFIS);\n this.statm = new StatisticsManager(dbm);\n //sdmm.createNewSDM(type_optimize);\n kendall = new MannKendall();\n }", "public Staff(String username, String password, String firstName, \n String lastName, int id, String position, String department) \n {\n super(username, password, firstName, lastName, id);\n this.position = position;\n this.department = department;\n }", "public RoomSchedulerFrame()\n {\n initComponents();\n \n // Load the combo boxes with data.\n rebuildFacultyComboBoxes();\n }", "public StaffMember(String eName, String eAddress, String ePhone) {\r\n name = eName;\r\n address = eAddress;\r\n phone = ePhone;\r\n }", "public void initialize() {\n allAppointments = DBAppointments.returnAllAppointments();\n allUsers = DBUser.returnAllUsers();\n allContacts = DBContacts.returnAllContacts();\n Contact_Choicebox.setItems(allContacts);\n Contact_Choicebox.setConverter(new StringConverter<Contact>() {\n @Override\n public String toString(Contact contact) {\n return contact.getName();\n }\n\n @Override\n public Contact fromString(String s) {\n return null;\n }\n });\n Contact_Id_Column.setCellValueFactory(new PropertyValueFactory<Appointment, Integer>(\"id\"));\n Contact_Title_Column.setCellValueFactory(new PropertyValueFactory<Appointment, String>(\"title\"));\n Contact_Description_Column.setCellValueFactory(new PropertyValueFactory<Appointment, String>(\"description\"));\n Contact_Start_Column.setCellValueFactory(new PropertyValueFactory<Appointment, String>(\"startString\"));\n Contact_End_Column.setCellValueFactory(new PropertyValueFactory<Appointment, String>(\"endString\"));\n Contact_Customer_Id_Column.setCellValueFactory(new PropertyValueFactory<Appointment, Integer>(\"customerId\"));\n //Lambda\n FilteredList<Appointment> filteredAppointments = new FilteredList<>(allAppointments, a -> true);\n Contact_Table.setItems(filteredAppointments);\n Contact_Choicebox.getSelectionModel().selectedItemProperty().addListener(obs -> {\n filteredAppointments.setPredicate(Appointment -> {\n return Appointment.getContactId() == Contact_Choicebox.getSelectionModel().getSelectedItem().getId();\n });\n });\n Contact_Choicebox.getSelectionModel().selectFirst();\n //Setup Appointment description list\n ObservableList<String> monthData = FXCollections.observableArrayList();\n Month currentMonth = LocalDate.now().getMonth();\n ObservableList<Appointment> monthAppointments = FXCollections.observableArrayList();\n for (Appointment allAppointment : allAppointments) {\n if (currentMonth == allAppointment.getStart().getMonth()) {\n monthAppointments.add(allAppointment);\n }\n }\n for (int i=0; i < monthAppointments.size(); i++) {\n String description = monthAppointments.get(i).getDescription();\n int count = 0;\n for (Appointment monthAppointment : monthAppointments) {\n if (monthAppointment.getDescription().equals(description)) {\n count++;\n }\n }\n monthData.add(description + \" - \" + count);\n }\n Month_Appointment_List.setItems(monthData);\n\n ObservableList<String> userData = FXCollections.observableArrayList();\n for (int i = 0; i < allUsers.size(); i++) {\n int count = 0;\n for(int j = 0; j < allAppointments.size(); j++) {\n if (allUsers.get(i).getId() == allAppointments.get(j).getUserId()) {\n count ++;\n }\n }\n userData.add(allUsers.get(i).getName() + \" - \" + count);\n }\n User_Appointment_List.setItems(userData);\n }", "public Staff() {\n this(\"지팡이\", 2, WeaponType.STAFF, 10, 10);\n }", "public FullTimeStaffHire(int vacancyNumber, String designation, String jobType, int salary, int workingHour) {\n //Super class constructor is invoked.\n super (vacancyNumber, designation, jobType);\n this.salary = salary;\n this.workingHour = workingHour;\n this.staffName = \"\";\n this.joiningDate = \"\";\n this.qualification = \"\";\n this.appointedBy = \"\";\n this.joined = false;\n }", "public HMS_Appointments() {\n initComponents();\n FillDoctorName();\n appointment_table();\n }", "public GroupCreateBean() {\n\t\tsuper();\n\t\tthis.initializeNumbers();\t\t\n\t}", "public void consolidatedDocumentInit(Document doc){ \n setSubject(doc.getSubject()); \n }", "public Staff()\n\t{\n\t\tsuper();\n\t\thourlyRate = 0.0;\n\t}", "@PostConstruct\n\tpublic void init() {\n\t\t/*\n\t\t * Esta parte se usó para añadir alumnos, senseis y cursos de prueba cuando la\n\t\t * base de datos usaba create-drop, ahora que los datos son persitentes no es\n\t\t * necesario, dejo aqui esta parte del código por si os fueran de utilidad para\n\t\t * realizar algunas pruebas durante las correcciones.\n\t\t * \n\t\t * Alumno a = new Alumno(\"Jorge\", \"Garrido\", \"Rodríguez\", \"[email protected]\",\n\t\t * \"20072517A\", \"651666999\", LocalDate.of(1997, 04, 02), \"Cádiz\", 11550,\n\t\t * \"Chipiona\", \"Avd/Almería 74\", \"\", \"Marrón-Negro\", LocalDate.now(), \"Si\",\n\t\t * \"Alergia estacional\"); Alumno b = new Alumno(\"Sara\", \"Clarke\", \"Swuch\",\n\t\t * \"[email protected]\", \"00055521J\", \"000555444\", LocalDate.of(1999, 05, 19),\n\t\t * \"Cádiz\", 12550, \"Jerez\", \"Calle fino\", \"\", \"Azul\", LocalDate.now(), \"Si\",\n\t\t * \"\"); Alumno c = new Alumno(\"Antonio\", \"Peinado\", \"Rodríguez\",\n\t\t * \"[email protected]\", \"01247857H\", \"651666999\", LocalDate.of(1998, 05, 19),\n\t\t * \"Cádiz\", 11550, \"Chipiona\", \"calle girasol,20\", \"\", \"Blanco\",\n\t\t * LocalDate.now(), \"No\", \"Asma\"); Alumno d = new Alumno(\"Marina\", \"Figueroa\",\n\t\t * \"Flores\", \"[email protected]\", \"57489624G\", \"651666999\", LocalDate.of(1994,\n\t\t * 05, 19), \"Cádiz\", 11550, \"Chipiona\", \"AVD/Rosaleda sn\", \"\", \"Marrón\",\n\t\t * LocalDate.now(), \"No\", \"\"); Alumno e = new Alumno(\"Daniel\", \"Villanueva\",\n\t\t * \"Garcia\", \"[email protected]\", \"3333333E\", \"651666999\", LocalDate.of(1988,\n\t\t * 05, 19), \"Cádiz\", 11550, \"Chipiona\", \"Avd/Miguel Cervantes, 52\", \"\", \"Negro\",\n\t\t * LocalDate.now(), \"Si\", \"\"); Alumno f = new Alumno(\"Lorena\", \"Cespedes\",\n\t\t * \"Roman\", \"[email protected]\", \"2222222D\", \"651666999\", LocalDate.of(1989,\n\t\t * 05, 19), \"Cádiz\", 11550, \"Chipiona\", \"Avd/Andalucía,15\", \"\", \"Amarillo\",\n\t\t * LocalDate.now(), \"Si\", \"\"); Alumno g = new Alumno(\"Sergio\", \"Arques\",\n\t\t * \"Tubio\", \"[email protected]\", \"1111111C\", \"651666999\", LocalDate.of(1996,\n\t\t * 05, 19), \"Cádiz\", 11550, \"Chipiona\", \"calle/ Castaño, 10\", \"\", \"Verde\",\n\t\t * LocalDate.now(), \"No\", \"\"); Alumno h = new Alumno(\"Elon\", \"Musk\", \"Ramirez\",\n\t\t * \"[email protected]\", \"0000000B\", \"651666999\", LocalDate.of(2004, 05, 19),\n\t\t * \"Cádiz\", 11550, \"Chipiona\", \"Avd/Neptuno, 7\", \"\", \"Blanco-Amarillo\",\n\t\t * LocalDate.now(), \"No\", \"\");\n\t\t * \n\t\t * alumnoServicio.save(a); alumnoServicio.save(b); alumnoServicio.save(c);\n\t\t * alumnoServicio.save(d); alumnoServicio.save(e); alumnoServicio.save(f);\n\t\t * alumnoServicio.save(g); alumnoServicio.save(h);\n\t\t * \n\t\t * Curso nuevoA = new Curso(2021, \"Juveniles\", 25.00); Curso nuevoB = new\n\t\t * Curso(2021, \"Alevines\", 25.00); Curso nuevoC = new Curso(2021, \"Adultos\",\n\t\t * 30.00);\n\t\t * \n\t\t * cursoServicio.save(nuevoA); cursoServicio.save(nuevoB);\n\t\t * cursoServicio.save(nuevoC);\n\t\t * \n\t\t * Sensei sa = new Sensei(\"Jose María\", null, null, null, null, null, null,\n\t\t * null, 0, null, null, null, \"Negro 1 DAN\", 1150.00); Sensei sb = new\n\t\t * Sensei(\"Ramón\", null, null, null, null, null, null, null, 0, null, null,\n\t\t * null, \"Negro 5 DAN\", 1150.00); Sensei sc = new Sensei(\"Abraham\", null, null,\n\t\t * null, null, null, null, null, 0, null, null, null, \"Negro 3 DAN\", 1150.00);\n\t\t * \n\t\t * senseiServicio.save(sa); senseiServicio.save(sb); senseiServicio.save(sc);\n\t\t * \n\t\t * sa.addCurso(nuevoA); cursoServicio.edit(nuevoA);\n\t\t * \n\t\t * sb.addCurso(nuevoB); cursoServicio.edit(nuevoB);\n\t\t * \n\t\t * sc.addCurso(nuevoC); cursoServicio.edit(nuevoC);\n\t\t * \n\t\t * nuevoC.addAlumno(a); alumnoServicio.edit(a);\n\t\t * \n\t\t * nuevoA.addAlumno(b); alumnoServicio.edit(b);\n\t\t * \n\t\t * nuevoB.addAlumno(c); alumnoServicio.edit(c);\n\t\t * \n\t\t * nuevoC.addAlumno(d); alumnoServicio.edit(d);\n\t\t * \n\t\t * nuevoC.addAlumno(e); alumnoServicio.edit(e);\n\t\t * \n\t\t * nuevoA.addAlumno(f); alumnoServicio.edit(f); nuevoA.addAlumno(g);\n\t\t * alumnoServicio.edit(g);\n\t\t * \n\t\t * nuevoA.addAlumno(h); alumnoServicio.edit(h);\n\t\t */\n\t}", "public StaffMenu() {\n initComponents();\n \n //Init with blank text \n ageLabel.setText(\"\");\n staffNumber.setText(\"\");\n genderLabel.setText(\"\");\n \n //Reading staff list \n ListOfStaff model_staff_list = new ListOfStaff(ListOfStaff.getStaff());\n staffList.setModel(model_staff_list); \n }", "public Staff(Name alias) {\n this(alias, STAFF);\n }", "private void cloneUsersAndStaff(Company company, Company cloneCompany,\n\t Map<Long, Staff> oldIdToNewStaff, Map<Long, SystemUser> oldIdToNewUser) {\n\n\t// If we are randomizing the names, load the names.\n\tClassLoader loader = this.getClass().getClassLoader();\n\tInputStream maleNames = loader.getResourceAsStream(\"hispanic-first-male.names\");\n\tInputStream lastNames = loader.getResourceAsStream(\"hispanic-last.names\");\n\tString[] malesArr = {};\n\tString[] lastsArr = {};\n\n\tboolean randomizeNames = company.isRandomizeNames();\n\tif (randomizeNames) {\n\t try {\n\t\tString males = IOUtils.toString(maleNames);\n\t\tString lasts = IOUtils.toString(lastNames);\n\t\tmalesArr = males.split(\"\\n\");\n\t\tlastsArr = lasts.split(\"\\n\");\n\t\tmaleNames.close();\n\t\tlastNames.close();\n\t } catch (IOException e) {\n\t\te.printStackTrace();\n\t }\n\t}\n\n\t// Get a copy of all the collections.\n\tSet<SystemUser> users = company.getEmployees(); // Clone user and staff.\n\n\t// If staff is already cloned,\n\t// don't do it again.\n\tSet<Staff> staff = company.getStaff();\n\n\t// Set the clone as the new company of the collections,\n\t// set also ID's to zero.\n\n\t// Staff members.\n\tfor (Staff stf : staff) {\n\t Staff cloneStaff = stf.clone();\n\t long oldId = cloneStaff.getId();\n\t cloneStaff.setId(0);\n\t cloneStaff.setCompany(cloneCompany);\n\t cloneStaff.setTasks(null);\n\t cloneStaff.setUser(null);\n\n\t // If we are randomizing the name.\n\t if (randomizeNames) {\n\t\tRandom random = new Random();\n\t\tint maleIndex = random.nextInt(malesArr.length - 1);\n\t\tString randomMale = malesArr[maleIndex];\n\t\tcloneStaff.setFirstName(randomMale);\n\n\t\tint middleNameIndex = random.nextInt(lastsArr.length - 1);\n\t\tString randomMiddleName = lastsArr[middleNameIndex];\n\t\tcloneStaff.setMiddleName(randomMiddleName);\n\n\t\tint lastNameIndex = random.nextInt(lastsArr.length - 1);\n\t\tString randomLastName = lastsArr[lastNameIndex];\n\t\tcloneStaff.setLastName(randomLastName);\n\t }\n\n\t // Create the new staff.\n\t this.staffDAO.create(cloneStaff);\n\t oldIdToNewStaff.put(oldId, cloneStaff);\n\t}\n\n\t// System users.\n\tfor (SystemUser originalUser : users) {\n\t SystemUser cloneUser = originalUser.clone();\n\n\t // If the staff was set in the original object,\n\t // set it here too.\n\t Staff userStaff = originalUser.getStaff();\n\t if (userStaff != null) {\n\n\t\t// Set the staff.\n\t\tlong oldId = userStaff.getId();\n\t\tStaff stf = oldIdToNewStaff.get(oldId);\n\t\tcloneUser.setStaff(stf);\n\n\t\t// Update the user name.\n\t\tString newUserName = String.format(\"%s_%s\", stf.getFirstName(), stf.getLastName())\n\t\t\t.toLowerCase();\n\t\tcloneUser.setUsername(newUserName);\n\t }\n\n\t // Update the password.\n\t String encPassword = this.authHelper.encodePassword(company.getClonePassword(), cloneUser);\n\t cloneUser.setPassword(encPassword);\n\n\t cloneUser.setAuditLogs(null);\n\t cloneUser.setCompany(cloneCompany);\n\t cloneUser.setId(0);\n\t this.systemUserDAO.create(cloneUser);\n\n\t // Add to map.\n\t oldIdToNewUser.put(originalUser.getId(), cloneUser);\n\n\t // Clone the user auxiliaries.\n\t cloneUserAux(cloneCompany, cloneUser, originalUser);\n\t}\n }", "public DisplayStaffMemberFrame() {\n initComponents();\n }", "private void initColumnBtech()\r\n\t{\r\n\t\tstudNoBColumn.setCellValueFactory(new PropertyValueFactory<>(\"studendID\"));\r\n\t\tnameBColumn.setCellValueFactory(new PropertyValueFactory<>(\"name\"));\r\n\t\tsurnameBColumn.setCellValueFactory(new PropertyValueFactory<>(\"surname\"));\r\n\t\tsupervisorBColumn.setCellValueFactory(new PropertyValueFactory<>(\"supervisor\"));\r\n\t\temailBColumn.setCellValueFactory(new PropertyValueFactory<>(\"email\"));\r\n\t\tcellphoneNoBColumn.setCellValueFactory(new PropertyValueFactory<>(\"cellphone\"));\r\n\t\tstationBColumn.setCellValueFactory(new PropertyValueFactory<>(\"station\"));\r\n\t\tcourseBColumn.setCellValueFactory(new PropertyValueFactory<>(\"course\"));\r\n\t}", "public Staff(String[] db) {\n\t\tthis.staffId = db[0];\n\t\tthis.staffPass = db[1];\n\t}", "@PostConstruct\n\tprotected void initialize() {\n\t\tzoomMax = 1000L * 60 * 60 * 24 * 30;\n\n\t\t// set initial start / end dates for the axis of the timeline (just for testing)\n\t\tCalendar cal = Calendar.getInstance(TimeZone.getTimeZone(\"UTC\"));\n\t\tcal.set(2015, Calendar.FEBRUARY, 9, 0, 0, 0);\n\t\tstart = cal.getTime();\n\t\tcal.set(2015, Calendar.MARCH, 10, 0, 0, 0);\n\t\tend = cal.getTime();\n\n\t\t// create timeline model\n\t\tmodel = new TimelineModel();\n\n\t\t// Server-side dates should be in UTC. They will be converted to a local dates in UI according to provided TimeZone.\n\t\t// Submitted local dates in UI are converted back to UTC, so that server receives all dates in UTC again.\n\t\tcal = Calendar.getInstance(TimeZone.getTimeZone(\"UTC\"));\n\t\tcal.set(2015, Calendar.JANUARY, 2, 0, 0, 0);\n\t\tmodel.add(new TimelineEvent(new Booking(211, RoomCategory.DELUXE, \"(0034) 987-111\", \"One day booking\"), cal.getTime()));\n\n\t\tcal.set(2015, Calendar.JANUARY, 26, 0, 0, 0);\n\t\tDate begin = cal.getTime();\n\t\tcal.set(2015, Calendar.JANUARY, 28, 23, 59, 59);\n\t\tDate end = cal.getTime();\n\t\tmodel.add(new TimelineEvent(new Booking(202, RoomCategory.EXECUTIVE_SUITE, \"(0034) 987-333\", \"Three day booking\"), begin,\n\t\t end));\n\n\t\tcal.set(2015, Calendar.FEBRUARY, 10, 0, 0, 0);\n\t\tbegin = cal.getTime();\n\t\tcal.set(2015, Calendar.FEBRUARY, 15, 23, 59, 59);\n\t\tend = cal.getTime();\n\t\tmodel.add(new TimelineEvent(new Booking(150, RoomCategory.STANDARD, \"(0034) 987-222\", \"Six day booking\"), begin, end));\n\n\t\tcal.set(2015, Calendar.FEBRUARY, 23, 0, 0, 0);\n\t\tbegin = cal.getTime();\n\t\tcal.set(2015, Calendar.FEBRUARY, 27, 23, 59, 59);\n\t\tend = cal.getTime();\n\t\tmodel.add(new TimelineEvent(new Booking(178, RoomCategory.STANDARD, \"(0034) 987-555\", \"Five day booking\"), begin, end));\n\n\t\tcal = Calendar.getInstance();\n\t\tcal.set(2015, Calendar.MARCH, 6, 0, 0, 0);\n\t\tmodel.add(new TimelineEvent(new Booking(101, RoomCategory.SUPERIOR, \"(0034) 987-999\", \"One day booking\"), cal.getTime()));\n\n\t\tcal.set(2015, Calendar.MARCH, 19, 0, 0, 0);\n\t\tbegin = cal.getTime();\n\t\tcal.set(2015, Calendar.MARCH, 22, 23, 59, 59);\n\t\tend = cal.getTime();\n\t\tmodel.add(new TimelineEvent(new Booking(80, RoomCategory.JUNIOR, \"(0034) 987-444\", \"Four day booking\"), begin, end));\n\n\t\tcal.set(2015, Calendar.APRIL, 3, 0, 0, 0);\n\t\tbegin = cal.getTime();\n\t\tcal.set(2015, Calendar.APRIL, 4, 23, 59, 59);\n\t\tend = cal.getTime();\n\t\tmodel.add(new TimelineEvent(new Booking(96, RoomCategory.DELUXE, \"(0034) 987-777\", \"Two day booking\"), begin, end));\n\n\t\tcal.set(2015, Calendar.APRIL, 22, 0, 0, 0);\n\t\tbegin = cal.getTime();\n\t\tcal.set(2015, Calendar.MAY, 1, 23, 59, 59);\n\t\tend = cal.getTime();\n\t\tmodel.add(new TimelineEvent(new Booking(80, RoomCategory.JUNIOR, \"(0034) 987-444\", \"Ten day booking\"), begin, end));\n\t}", "public CompositeData()\r\n {\r\n }", "public void initForAddNew() {\r\n\r\n\t}", "public Staff (String firstName, String lastName, String cpr, String type, \n String[] address, String phoneNr, String password, int hours, \n double salary, int vacation, int accessLevel) \n {\n this.firstName = firstName;\n this.lastName = lastName;\n this.cpr = cpr;\n this.type = type;\n this.address = address;\n this.phoneNumber = phoneNr;\n this.password = password;\n this.hours = hours;\n this.salary = salary;\n this.vacation = vacation;\n this.accessLevel = accessLevel;\n }", "public CompositePersonne() {\n\t\tthis.nomGroupe = \" \";\n\t\tthis.personnel = new ArrayList<InterfacePersonne>();\n\n\t}", "private void initCoordLogic() throws SQLException {\n\t\tcoordUsuario = new CoordinadorUsuario();\n\t\tlogicaUsuario = new LogicaUsuario();\n\t\tcoordUsuario.setLogica(logicaUsuario);\n\t\tlogicaUsuario.setCoordinador(coordUsuario);\n\t\t/* Listados de ComboBox*/\n\t\trol = new RolVO();\n\t\templeado = new EmpleadoVO();\n\t}", "@Override\n public void initializeContactsForImportation() {\n if (LOG.isDebugEnabled()) {\n LOG.debug(\"initializeContactsForImportation\");\n }\n\n clearAddPanels();\n setRenderImportContactPanel(true);\n\n List<Person> persons;\n\n contactsForImportation = new ArrayList<Pair<Boolean, Person>>();\n\n if (Role.isLoggedUserAdmin() || Role.isLoggedUserProjectManager()) {\n choosenInstitutionForAdmin = (Institution) Component.getInstance(CHOOSEN_INSTITUTION_FOR_ADMIN);\n\n if (choosenInstitutionForAdmin != null) {\n persons = Person.listAllContactsForCompany(choosenInstitutionForAdmin);\n } else {\n persons = Person.listAllContacts();\n }\n } else {\n persons = Person.listAllContactsForCompany(Institution.getLoggedInInstitution());\n }\n boolean emailAlreadyExists;\n for (Person person : persons) {\n emailAlreadyExists = false;\n\n for (ConnectathonParticipant cp : connectathonParticipantsDataModel().getAllItems(FacesContext.getCurrentInstance())) {\n\n if (person.getEmail().equals(cp.getEmail())) {\n emailAlreadyExists = true;\n }\n }\n\n if (!emailAlreadyExists) {\n contactsForImportation.add(new Pair<Boolean, Person>(false, person));\n }\n }\n\n }", "public Office() {\n\n\t\tthis.departaments = new HashMap<>();\n\t\tthis.documents = new ArrayList<>();\n\t\tthis.employees = 0;\n\t}", "@Test\n public void testStaffFactoryCreate() {\n StaffController staffController = staffFactory.getStaffController();\n staffController.addStaff(STAFF_NAME, STAFF_GENDER, STAFf_ROLE);\n assertEquals(1, staffController.getStaffList().size());\n }", "private void init() {\n setMinutes(new int[] {});\n setHours(new int[] {});\n setDaysOfMonth(new int[] {});\n setMonths(new int[] {});\n setDaysOfWeek(new int[] {});\n }", "private void initActivities(boolean getInactive, boolean callerSuperAdmin)\r\n\t{\n\t\tSecurityContext securityContext = (SecurityContext) _commonCriteria.getSecurityContext();\r\n\t\tUserProfilePermissionSetVO userProfilePermissionSetVO = new UserProfilePermissionSetVO();\r\n\t\tuserProfilePermissionSetVO.setRoleId(get_commonCriteria().getRoleId());\r\n\t\tuserProfilePermissionSetVO.setEntityId(new Integer(1));\r\n\t\tuserProfilePermissionSetVO.setGetInactive(getInactive);\r\n\t\tuserProfilePermissionSetVO.setUserName(securityContext.getUsername());\r\n\t\tuserProfilePermissionSetVO.setVendBuyerResId(securityContext.getVendBuyerResId());\r\n\t\tuserProfilePermissionSetVO.setCallerSuperAdmin(callerSuperAdmin);\r\n\t\tList<PermissionSetVO> permissionSets = manageUsersDelegate.getUserPermissionSets(userProfilePermissionSetVO);\r\n\t\tsetAttribute(\"permissionSets\", permissionSets);\r\n\t}", "private void createCompositeUserMange() {\r\n\t\tGridData gridData3 = new GridData();\r\n\t\tgridData3.grabExcessHorizontalSpace = true;\r\n\t\tgridData3.heightHint = 300;\r\n\t\tgridData3.widthHint = 400;\r\n\t\tgridData3.horizontalSpan = 3;\r\n\t\tGridData gridData11 = new GridData();\r\n\t\tgridData11.horizontalAlignment = org.eclipse.swt.layout.GridData.CENTER;\r\n\t\tgridData11.grabExcessHorizontalSpace = true;\r\n\t\tGridData gridData10 = new GridData();\r\n\t\tgridData10.horizontalAlignment = org.eclipse.swt.layout.GridData.CENTER;\r\n\t\tgridData10.grabExcessHorizontalSpace = true;\r\n\t\tGridLayout gridLayout2 = new GridLayout();\r\n\t\tgridLayout2.numColumns = 3;\r\n\t\tcompositeUserMange = new Composite(tabFolder, SWT.NONE);\r\n\t\tcompositeUserMange.setLayout(gridLayout2);\r\n\t\ttextAreaUser = new Text(compositeUserMange, SWT.MULTI | SWT.WRAP | SWT.V_SCROLL);\r\n\t\ttextAreaUser.setLayoutData(gridData3);\r\n\t\tbuttonAddUser = new Button(compositeUserMange, SWT.NONE);\r\n\t\tbuttonAddUser.setText(\"新增用户\");\r\n\t\tbuttonAddUser.setLayoutData(gridData10);\r\n\t\tbuttonAddUser.addSelectionListener(new SelectionListener() {\r\n\t\t\t\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent arg0) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\tSystem.out.println(\"新增用户\");\r\n\t\t\t\tInputDialog id1=new InputDialog(sShell,\"新增用户\",\"输入用户信息,用空格分开,例如:pdl 666 管理员\",\"\",null);\r\n\t\t\t\tif(id1.open()==0){\r\n\t\t\t\t\tinput=id1.getValue();\r\n\t\t\t\t\tif(input.equals(\"\")) return;\r\n\t\t\t\t}\r\n\t\t\t\telse return;\r\n\t\t\t\tString str[]=input.split(\" \");\r\n\t\t\t\tCommonADO ado=CommonADO.getCommonADO();\r\n\t\t\t\tString sql=\"insert into Users values('\"+str[0]+\"','\"+str[1]+\"','\"+str[2]+\"')\";\r\n\t\t\t\tado.executeUpdate(sql);\r\n\t\t\t\tshowUser();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetDefaultSelected(SelectionEvent arg0) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tbuttonDeleteUser = new Button(compositeUserMange, SWT.NONE);\r\n\t\tbuttonDeleteUser.setText(\"删除用户\");\r\n\t\tbuttonDeleteUser.setLayoutData(gridData11);\r\n\t\tbuttonDeleteUser.addSelectionListener(new SelectionListener() {\r\n\t\t\t\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent arg0) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\tInputDialog id1=new InputDialog(sShell,\"删除用户\",\"输入用户名\",\"\",null);\r\n\t\t\t\tif(id1.open()==0){\r\n\t\t\t\t\tinput=id1.getValue();\r\n\t\t\t\t\tif(input.equals(\"\")) return;\r\n\t\t\t\t}\r\n\t\t\t\telse return;\r\n\t\t\t\t\r\n\t\t\t\tCommonADO ado=CommonADO.getCommonADO();\r\n\t\t\t\tString sql=\"delete from Users where UserName='\"+input+\"'\";\r\n\t\t\t\tado.executeUpdate(sql);\r\n\t\t\t\tshowUser();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetDefaultSelected(SelectionEvent arg0) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tshowUser();\r\n\t\t\t\r\n\t\t\r\n\t}", "public void initialize() {\n\t\tcompartmentName = new SimpleStringProperty(compartment.getName());\t\t\n\t\tcompartmentId = new SimpleStringProperty(compartment.getId());\n\t\tcompartmentSBOTerm = new SimpleStringProperty(compartment.getSBOTermID());\n\t}", "AbsoluteScheduleBuilder(ScheduleSetter schedule_setter)\n {\n super(schedule_setter);\n }", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t\tfecha = new Date();\r\n\t\t\r\n\t\tlistaBancos = new ArrayList<SelectItem>();\r\n\t\tlistaRegiones = new ArrayList<SelectItem>();\r\n\t\tlistaCiudades = new ArrayList<SelectItem>();\r\n\t\tlistaComunas = new ArrayList<SelectItem>();\r\n\t\t\r\n\t\tfor(EmpresaDTO empresa : configJProcessService.selectEmpresasByOrganizacion(1))\r\n\t\t\tlistaBancos.add(new SelectItem(empresa.getId(), empresa.getNombre()));\r\n\t}", "public AgendaMB() {\n GregorianCalendar dtMax = new GregorianCalendar(); \n Date dt = new Date();\n dtMax.setTime(dt); \n GregorianCalendar dtMin = new GregorianCalendar(); \n dtMin.setTime(dt);\n dtMin.add(Calendar.DAY_OF_MONTH, 1);\n dtMax.add(Calendar.DAY_OF_MONTH, 40);\n dataMax = dtMax.getTime();\n dataMin = dtMin.getTime(); \n }", "public void setStaffShows(ArrayList<ScheduledConcert> staffShows) {\r\n\t\t\tthis.staffShows = staffShows;\r\n\t\t}", "@Override\r\n\tprotected void initSelfData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initSelfData() {\n\t\t\r\n\t}", "public RecSupplierListBusiness()\n {\n super();\n }", "public CallCenter(double t0time, DispMeth param, int numstaffA, int numstaffB, Seeds sd)\n\t\t{\t\t\n\t\t // all entity attributes initialised in constructors \n\t\t dispMeth = param;\n\t\t numStaffA=numstaffA;\n\t\t numStaffB=numstaffB;\n\t\t rStaff=new Staff[numStaffA+numStaffB]; \n\t\t\t// Setup Random Variate Procedures\n\t\t rvp = new RVPs(this, sd);\n\t\t dvp = new DVPs(this);\n\t\t\t// Initialise the simulation model\n\t\t\tinitAOSimulModel(t0time); \n\t\t\t\n\t\t\t// Schedule Initialise action\n\t\t\tInitialise init = new Initialise(this);\n\t\t\tscheduleAction(init); // Should always be first one scheduled.\n\n\t\t\t\n\t\t\t// Schedule the first arrivals \n\t\t\t// Create action actionName\n\t\t\tCallArrival arr = new CallArrival(this);\n\t\t scheduleAction(arr);\n\t\t \n\t\t //Schedule BizStateChange\n\t\t BizStateChange bsc=new BizStateChange(this);\n\t\t scheduleAction(bsc);\n\t\t \n\t\t //Schedule StartBiz\n\t\t StartBiz stb=new StartBiz(this);\n\t\t scheduleAction(stb);\n\t\t \n\t\t}", "public void initCalendarFirst() {\n getCurrentDate();\n mCalendar.setOnDateChangedListener(new OnDateSelectedListener() {\n @Override\n public void onDateSelected(@NonNull MaterialCalendarView widget, @NonNull CalendarDay select, boolean selected) {\n mSelectedDate = select.toString();\n String string[] = mSelectedDate.split(\"\\\\{|\\\\}\");\n String s = string[1]; //2017-8-14\n String string1[] = s.split(\"-\");\n int tempMonth = Integer.parseInt(string1[1]);\n String month = Integer.toString(tempMonth + 1);\n mDate1 = string1[0] + \"-\" + month + \"-\" + string1[2];\n }\n });\n }", "public EmployeeSet()\n\t{\n\t\tnumOfEmployees = 0;\n\t\temployeeData = new Employee[10];\n\t}", "public EmployeeSet(Object obj)\n\t{\n\t\tif((obj != null) && (obj instanceof EmployeeSet))\n\t\t{\n\t\t\t//proceed to create a new instance of EmployeeSet\n\t\t\tEmployeeSet copiedEmployeeSet = (EmployeeSet) obj;\n\t\t\tthis.employeeData = copiedEmployeeSet.employeeData;\n\t\t\tthis.numOfEmployees = copiedEmployeeSet.numOfEmployees;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t//throw new IllegalArgumentException(\"Unable to activate copy constructor. Object to be copied from is either a null object or is not an EmployeeSet object\");\n\t\t\tSystem.out.println(\"ERROR: Unable to activate copy constructor. Object to be copied from is either a null object or is not an EmployeeSet object\");\n\t\t}\n\t}", "public StaffDetail(StaffDetail other) {\n __isset_bit_vector.clear();\n __isset_bit_vector.or(other.__isset_bit_vector);\n this.id = other.id;\n if (other.isSetStaffId()) {\n this.staffId = other.staffId;\n }\n if (other.isSetLoginType()) {\n this.loginType = other.loginType;\n }\n if (other.isSetLoginId()) {\n this.loginId = other.loginId;\n }\n if (other.isSetLoginPass()) {\n this.loginPass = other.loginPass;\n }\n if (other.isSetLoginPassEncrypt()) {\n this.loginPassEncrypt = other.loginPassEncrypt;\n }\n if (other.isSetPhoneNumber()) {\n this.phoneNumber = other.phoneNumber;\n }\n if (other.isSetStaffType()) {\n this.staffType = other.staffType;\n }\n if (other.isSetStatus()) {\n this.status = other.status;\n }\n if (other.isSetCertStatus()) {\n this.certStatus = other.certStatus;\n }\n this.avgScore = other.avgScore;\n if (other.isSetTag()) {\n this.tag = other.tag;\n }\n this.finishOrderCount = other.finishOrderCount;\n this.assignOrderCount = other.assignOrderCount;\n if (other.isSetExtraData1()) {\n this.extraData1 = other.extraData1;\n }\n if (other.isSetExtraData2()) {\n this.extraData2 = other.extraData2;\n }\n this.createTime = other.createTime;\n this.updateTime = other.updateTime;\n this.registerTime = other.registerTime;\n this.lastReceptionTime = other.lastReceptionTime;\n }", "@Before\n\tpublic void init() {\n\t\t\n\n\t\tCalendar cal = Calendar.getInstance();\n\t\t\n\t cal.add(Calendar.DATE, -2); \n\t \n\t fechaOperacion = LocalDate.of(cal.get(Calendar.YEAR), cal.get(Calendar.MONTH), cal.get(Calendar.DAY_OF_MONTH));\n\t \n\n\t\t\n\t\tCiudad buenos_aires = new Ciudad(new Provincia(\"Argentina\", \"Buenos Aires\"), \"Capital Federal\");\n\t \t\n \tProvincia prov_buenos_aires = new Provincia(\"Ciudad Autonoma de Buenos Aires\",\"Capital Federal\");\n \t\n \tDireccionPostal direccionPostal = new DireccionPostal( \"lacarra 180\", buenos_aires, prov_buenos_aires, \"argentina\", new Moneda(\"$\",\"Peso argentino\" ));\n\t\n\t\t\n\t\t entidad1 = new EntidadJuridica(\"chacho bros\", \"grupo chacho\", \"202210\", direccionPostal, new Categoria(\"ONG\"),TipoEmpresa.EMPRESA);\n\n\t\t\n\t\t\n\t}", "public CallCenter(double t0time, double tftime, DispMeth param, int numstaffA, int numstaffB, Seeds sd)\n\t\t{\t\t\n\t\t // all entity attributes initialised in constructors \n\t\t dispMeth = param;\n\t\t numStaffA=numstaffA;\n\t\t numStaffB=numstaffB;\n\t\t rStaff=new Staff[numStaffA+numStaffB]; \n\t\t\t// Setup Random Variate Procedures\n\t\t rvp = new RVPs(this, sd);\n\t\t dvp = new DVPs(this);\n\t\t\t// Initialise the simulation model\n\t\t\tinitAOSimulModel(t0time,tftime); \n\t\t\t\n\t\t\t// Schedule Initialise action\n\t\t\tInitialise init = new Initialise(this);\n\t\t\tscheduleAction(init); // Should always be first one scheduled.\n\n\t\t\t\n\t\t\t// Schedule the first arrivals \n\t\t\t// Create action actionName\n\t\t\tCallArrival arr = new CallArrival(this);\n\t\t scheduleAction(arr);\n\t\t \n\t\t //Schedule BizStateChange\n\t\t BizStateChange bsc=new BizStateChange(this);\n\t\t scheduleAction(bsc);\n\t\t \n\t\t //Schedule StartBiz\n\t\t StartBiz stb=new StartBiz(this);\n\t\t scheduleAction(stb);\n\t\t \n\t\t}", "public EntryReeferMuatBean() {\n registration = new Registration();\n registration.setMasterCustomer(new MasterCustomer());\n registration.setPlanningVessel(new PlanningVessel());\n registration.getPlanningVessel().setPreserviceVessel(new PreserviceVessel());\n registration.getPlanningVessel().getPreserviceVessel().setMasterVessel(new MasterVessel());\n }", "private void initTestBuildingWithRoomsAndWorkplaces() {\n\t\tinfoBuilding = dataHelper.createPersistedBuilding(\"50.20\", \"Informatik\", new ArrayList<Property>());\n\t\troom1 = dataHelper.createPersistedRoom(\"Seminarraum\", \"-101\", -1, Arrays.asList(new Property(\"WLAN\")));\n\n\t\tworkplace1 = dataHelper.createPersistedWorkplace(\"WP1\",\n\t\t\t\tArrays.asList(new Property(\"LAN\"), new Property(\"Lampe\")));\n\t\tworkplace2 = dataHelper.createPersistedWorkplace(\"WP2\", Arrays.asList(new Property(\"LAN\")));\n\n\t\troom1.addContainedFacility(workplace1);\n\t\troom1.addContainedFacility(workplace2);\n\n\t\tinfoBuilding.addContainedFacility(room1);\n\t}", "private void _assignFacultyPublications(String author, int min, int max) {\n int num;\n PublicationInfo publication;\n\n num = _getRandomFromRange(min, max);\n for (int i = 0; i < num; i++) {\n publication = new PublicationInfo();\n publication.id = _getId(CS_C_PUBLICATION, i, author);\n publication.name = _getRelativeName(CS_C_PUBLICATION, i);\n publication.authors = new ArrayList();\n publication.authors.add(author);\n publications_.add(publication);\n }\n }", "@PostConstruct\n @Override\n public void init() {\n super.setFacade(ejbFacade);\n newProspects = ejbFacade.findAllNew();\n \n FacesContext fc = FacesContext.getCurrentInstance();\n\tgetIdParam(fc);\n \n }", "@Override\n public void initialize(URL location, ResourceBundle resources) {\n monthCol.setCellValueFactory(cellData -> new SimpleStringProperty(cellData.getValue().getMonth()));\n monthTypeCol.setCellValueFactory(cellData -> new SimpleStringProperty(cellData.getValue().getType()));\n monthNumberCol.setCellValueFactory(cellData -> new SimpleStringProperty(cellData.getValue().getNumber()));\n apptByMonthTableFill();\n\n //Report 2 fill\n consultantsFieldFill();\n apptStartCol.setCellValueFactory(cellData -> new SimpleStringProperty(cellData.getValue().getStart()));\n apptEndCol.setCellValueFactory(cellData -> new SimpleStringProperty(cellData.getValue().getEnd()));\n apptTitleCol.setCellValueFactory(cellData -> new SimpleStringProperty(cellData.getValue().getTitle()));\n apptTypeCol.setCellValueFactory(cellData -> new SimpleStringProperty(cellData.getValue().getType()));\n apptCustomerCol.setCellValueFactory(cellData -> new SimpleStringProperty(cellData.getValue().getCustomer().getCustomerName()));\n //add listener to consultant combo box\n consultantsField.valueProperty().addListener((ov, t, t1) -> onUserSelection());\n consultantsField.setValue(\"All\");\n onUserSelection();\n\n //Report 2 fill\n todCol.setCellValueFactory(cellData -> new SimpleStringProperty(cellData.getValue().getHour()));\n aveApptCol.setCellValueFactory(cellData -> new SimpleStringProperty(cellData.getValue().getCount()));\n aveApptTableFill();\n\n }", "public EmployeBean() {\r\n\t\tpersonneFactory = new PersonneFactoryImpl();\r\n\t\tinitFields();\r\n\t\tidHotel = 0L;\r\n\t\tLOGGER.info(\"<=============== EmployeBean Initialization ===============>\");\r\n\t}", "public void createDropDownListValidateFromSpreadSheet(String range, int firstRow, int lastRow, int firstCol, int lastCol, Sheet shet) {\n Name namedRange = workbook.createName();\n Random rd = new Random();\n String refName = (\"List\" + rd.nextInt()).toString().replace(\"-\", \"\");\n namedRange.setNameName(refName);\n// namedRange.setRefersToFormula(\"'Sheet1'!$A$1:$A$3\");\n namedRange.setRefersToFormula(range);\n DVConstraint dvConstraint = DVConstraint.createFormulaListConstraint(refName);\n CellRangeAddressList addressList = new CellRangeAddressList(\n firstRow, lastRow, firstCol, lastCol);\n HSSFDataValidation dataValidation = new HSSFDataValidation(addressList, dvConstraint);\n dataValidation.setSuppressDropDownArrow(false);\n HSSFSheet sh = (HSSFSheet) shet;\n sh.addValidationData(dataValidation);\n }", "private void initialize(int initialValue, int extent, int minimum, int maximum) {\r\n if ((maximum >= minimum)\r\n && (initialValue >= minimum)\r\n && ((initialValue + extent) >= initialValue)\r\n && ((initialValue + extent) <= maximum)) {\r\n // this.theExtent = extent;\r\n this.min = minimum;\r\n this.max = maximum;\r\n } else {\r\n throw new IllegalArgumentException(\"invalid range properties \" +\r\n \"max = \" + maximum + \" min = \" + minimum + \" initialValue = \" + initialValue + \" extent = \" + extent);\r\n\r\n }\r\n }", "public void setClStaffId(String clStaffId) {\r\n\t\tthis.clStaffId = clStaffId;\r\n\t}", "@Test\n\tpublic void testSetStartDate() {\n\t\tassertNotEquals(calTest, initialJob.getStartDate());\n\t\tinitialJob.setStartDate(calTest.get(Calendar.YEAR), calTest.get(Calendar.MONTH), \n\t\t\t\tcalTest.get(Calendar.DATE), calTest.get(Calendar.HOUR), \n\t\t\t\tcalTest.get(Calendar.MINUTE));\n\t\tassertEquals(calTest, initialJob.getStartDate());\n\t\t\n\t\t// check different dates are not equivalent\n\t\tinitialJob.setStartDate(calTest.get(Calendar.YEAR) + 1, calTest.get(Calendar.MONTH), \n\t\t\t\tcalTest.get(Calendar.DATE), calTest.get(Calendar.HOUR), \n\t\t\t\tcalTest.get(Calendar.MINUTE));\n\t\tassertNotEquals(calTest, initialJob.getStartDate());\n\t}", "private void init(){\n //Get instance of Members to access Members Lists\n Members members = Members.getInstance();\n \n //add to patient members list\n members.getPatients().addMember(this);\n }", "@Test\r\n public void testSetUserOccupation()\r\n {\r\n System.out.println(\"setUserOccupation\");\r\n String userOccupation = \"Nurse\";\r\n String occupation = \"Doctor\";\r\n String[] hobbies = {\"Reading\", \"Cooking\"};\r\n int id = 5;\r\n LifeStyleBean instance = new LifeStyleBean(occupation, hobbies, id);\r\n instance.setUserOccupation(userOccupation);\r\n assertEquals(userOccupation, instance.getUserOccupation());\r\n }", "public SearchSupplierFrm(Staff s) {\n super(\"Tìm kiếm Nhà cung cấp \");\n this.s = s;\n initComponents();\n listSupplier = new ArrayList<>();\n \n\n }", "public SuperUserExample() {\n oredCriteria = new ArrayList<Criteria>();\n }", "public BhiFeasibilityStudyExample() {\r\n\t\toredCriteria = new ArrayList<Criteria>();\r\n\t}", "public void setStaff_surname(String staff_surname) {\n this.staff_surname = staff_surname;\n }", "@Override\n public void setUpSearchFields(Composite searchComposite) {\n this.searchComposite = searchComposite;\n Label lblDateRange = new Label(searchComposite, SWT.NONE);\n lblDateRange.setText(name);\n new Label(searchComposite, SWT.NONE);\n dateTime = new LVSCombo(searchComposite, SWT.BORDER);\n GridData gd_dateTime = new GridData(SWT.FILL, SWT.CENTER, false, false, 1, 1);\n gd_dateTime.widthHint = 304;\n dateTime.setLayoutData(gd_dateTime);\n populateDateCombo();\n dateTime.select(1);\n dateTime.setEditable(false);\n dateTime.addModifyListener(dateModifyListener);\n }", "public void setStaff_name(String staff_name) {\n this.staff_name = staff_name;\n }", "private void setupSpalteAufwand() {\r\n\t\t// legt fest, welches Attribut von Arbeitspaket in dieser Spalte angezeigt wird\r\n\t\tspalteAufwand.setCellValueFactory(new PropertyValueFactory<>(\"aufwand\"));\r\n\r\n\t\t// lässt die Zelle mit Hilfe der Klasse EditCell bei Tastatureingabe bearbeitbar\r\n\t\t// machen\r\n\t\tspalteAufwand.setCellFactory(\r\n\t\t\t\tEditCell.<ArbeitspaketTableData, Integer>forTableColumn(new MyIntegerStringConverter()));\r\n\r\n\t\t// überschreibt den alten Attributwert mit der User-Eingabe\r\n\t\tspalteAufwand.setOnEditCommit(event -> {\r\n\t\t\tfinal Integer value = event.getNewValue() != null ? event.getNewValue() : event.getOldValue();\r\n\t\t\tevent.getTableView().getItems().get(event.getTablePosition().getRow()).setAufwand(value);\r\n\t\t\ttabelle.refresh();\r\n\t\t});\r\n\t}", "@SuppressWarnings(\"unchecked\")\n private void userinitComponents() {\n attendace.home = this;\n \n \n \n }", "private Data initialise() {\n \r\n getRoomsData();\r\n getMeetingTimesData();\r\n setLabMeetingTimes();\r\n getInstructorsData();\r\n getCoursesData();\r\n getDepartmentsData();\r\n getInstructorFixData();\r\n \r\n for (int i=0;i<departments.size(); i++){\r\n numberOfClasses += departments.get(i).getCourses().size();\r\n }\r\n return this;\r\n }", "@BeforeAll\n public static void setUp() {\n\n unsolvedCourseSchedule = new RoomSchedule();\n\n \n // fixed periods I'm defining\n \tRoomPeriods fixedRoomPeriod1=new RoomPeriods(1, 1);\n \tfixedRoomPeriod1.setSessionName(\"Session Fixed 1\");\n \t\n \tRoomPeriods fixedRoomPeriod2=new RoomPeriods(1, 2);\n \tfixedRoomPeriod2.setSessionName(\"Session Fixed 2\");\n \t\n // I'm adding fixed periods to schedule, these are known fixed schedule items\n \tunsolvedCourseSchedule.getLectureList().add(fixedRoomPeriod1);\n \tunsolvedCourseSchedule.getLectureList().add(fixedRoomPeriod2); \n \n /* I'm adding 10 more schedule items which are [null,null] , I'm expecting optoplanner assign period and room numbers. \n * [ THEY ARE LINKED with annotations, @PlanningVariable,\t@ValueRangeProvider(id = \"availablePeriods\", @ProblemFactCollectionProperty]\n */\n for(int i = 0; i < 10; i++){ \t \t\n unsolvedCourseSchedule.getLectureList().add(new RoomPeriods()); \n }\n \n // \n unsolvedCourseSchedule.getPeriodList().addAll(Arrays.asList(new Integer[] { 1, 2, 3 }));\n unsolvedCourseSchedule.getRoomList().addAll(Arrays.asList(new Integer[] { 1, 2 }));\n }", "ConferenceScheduleBuilderService init(List<Presentation> presentationList);", "private void prepareShifts() {\n // set John first shift\n LocalDateTime johnShift1Start = LocalDateTime.of(2017, 6, 23, 9, 0);\n LocalDateTime johnShift1End = LocalDateTime.of(2017, 6, 23, 17, 0);\n // set John second shift\n LocalDateTime johnShift2Start = LocalDateTime.of(2017, 6, 24, 6, 0);\n LocalDateTime johnShift2End = LocalDateTime.of(2017, 6, 24, 14, 0);\n // add John shifts to the list of shifts\n shifts.add(new Shift(\"John\", johnShift1Start, johnShift1End));\n shifts.add(new Shift(\"John\", johnShift2Start, johnShift2End));\n }", "private void initialiseAll() {\n // now that all the BeanDescriptors are in their map\n // we can initialise them which sorts out circular\n // dependencies for OneToMany and ManyToOne etc\n BeanDescriptorInitContext initContext = new BeanDescriptorInitContext(asOfTableMap, draftTableMap, asOfViewSuffix);\n\n // PASS 1:\n // initialise the ID properties of all the beans\n // first (as they are needed to initialise the\n // associated properties in the second pass).\n for (BeanDescriptor<?> d : descMap.values()) {\n d.initialiseId(initContext);\n }\n\n // PASS 2:\n // now initialise all the inherit info\n for (BeanDescriptor<?> d : descMap.values()) {\n d.initInheritInfo();\n }\n\n // PASS 3:\n // now initialise all the associated properties\n for (BeanDescriptor<?> d : descMap.values()) {\n // also look for intersection tables with\n // associated history support and register them\n // into the asOfTableMap\n d.initialiseOther(initContext);\n }\n\n // PASS 4:\n // now initialise document mapping which needs target descriptors\n for (BeanDescriptor<?> d : descMap.values()) {\n d.initialiseDocMapping();\n }\n\n // create BeanManager for each non-embedded entity bean\n for (BeanDescriptor<?> d : descMap.values()) {\n d.initLast();\n if (!d.isEmbedded()) {\n beanManagerMap.put(d.fullName(), beanManagerFactory.create(d));\n checkForValidEmbeddedId(d);\n }\n }\n }", "@Override\n public void initialize(URL location, ResourceBundle resources) {\n allContacts = DBQuery.getAllContacts();\n\n contactComboBox.setPromptText(\"Select Contact\");\n contactComboBox.setItems(allContacts);\n\n appointmentIdColumn.setCellValueFactory(new PropertyValueFactory<>(\"id\"));\n appointmentTitleColumn.setCellValueFactory(new PropertyValueFactory<>(\"title\"));\n appointmentDescriptionColumn.setCellValueFactory(new PropertyValueFactory<>(\"description\"));\n appointmentTypeColumn.setCellValueFactory(new PropertyValueFactory<>(\"type\"));\n appointmentStartTimeColumn.setCellValueFactory(new PropertyValueFactory<>(\"start\"));\n appointmentEndTimeColumn.setCellValueFactory(new PropertyValueFactory<>(\"end\"));\n appointmentCustomerColumn.setCellValueFactory(new PropertyValueFactory<>(\"customerId\"));\n }", "private void createComposite1() {\n \t\t\tGridLayout gridLayout2 = new GridLayout();\n \t\t\tgridLayout2.numColumns = 7;\n \t\t\tgridLayout2.makeColumnsEqualWidth = true;\n \t\t\tGridData gridData1 = new org.eclipse.swt.layout.GridData();\n \t\t\tgridData1.horizontalSpan = 3;\n \t\t\tgridData1.horizontalAlignment = org.eclipse.swt.layout.GridData.FILL;\n \t\t\tgridData1.verticalAlignment = org.eclipse.swt.layout.GridData.FILL;\n \t\t\tgridData1.grabExcessVerticalSpace = true;\n \t\t\tgridData1.grabExcessHorizontalSpace = true;\n \t\t\tcalendarComposite = new Composite(this, SWT.BORDER);\n \t\t\tcalendarComposite.setBackground(Display.getDefault().getSystemColor(SWT.COLOR_WHITE));\n \t\t\tcalendarComposite.setLayout(gridLayout2);\n \t\t\tcalendarComposite.setLayoutData(gridData1);\n \t\t}", "public DBFKRelationPropertySheet ()\r\n {\r\n initComponents ();\r\n }", "protected void createCompaniesContacts() {\n\n log.info(\"CompaniesContactsBean => method : createCompaniesContacts()\");\n\n EntityManager em = EMF.getEM();\n EntityTransaction tx = null;\n\n try {\n tx = em.getTransaction();\n tx.begin();\n for (CompaniesEntity c : selectedCompaniesContacts) {\n CompaniesContactsEntity companiesContactsEntity1 = new CompaniesContactsEntity();\n companiesContactsEntity1.setContactsByIdContacts(contactsBean.getContactsEntity());\n companiesContactsEntity1.setCompaniesByIdCompanies(c);\n companiesContactsDao.update(em, companiesContactsEntity1);\n }\n tx.commit();\n log.info(\"Persist ok\");\n } catch (Exception ex) {\n if (tx != null && tx.isActive()) tx.rollback();\n log.info(\"Persist failed\");\n } finally {\n em.clear();\n em.clear();\n }\n\n }", "public SalesPerson(String firstName, String lastName, String ppsNumber){\r\n //pulls the constructor with parameters from the superclass SalesEmployee\r\n super(firstName, lastName, ppsNumber);\r\n }", "public StaffManagerForm(HomeAppForm homeForm) {\n \n this.homeForm = homeForm;\n \n Locale.setDefault(LocaleBundle.getLocale());\n try {\n UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());\n } catch (ClassNotFoundException | InstantiationException | IllegalAccessException | UnsupportedLookAndFeelException ex) {\n Logger.getLogger(LoginDialog.class.getName()).log(Level.SEVERE, null, ex);\n }\n initDefaultTableModel();\n initComponents();\n resizeTableColumns();\n this.setLocationRelativeTo(null);\n getContentPane().setBackground(GlobalValues.formBackgroundColor);\n getConnectToDataBase();\n homeForm.setVisible(false);\n loadDataBase(connection);\n }", "public StructuraSemestru2() {\n startSemester= Constants.SEMESTER_START2;\n beginHoliday=Constants.HOLIDAY_START2;\n endHoliday=Constants.HOLIDAY_END2;\n endSemester=Constants.SEMESTER_END2;\n\n }", "public void initialize() {\n setThisFacility(null);\n loadData();\n initCols();\n\n }", "public Inscripcion(HashSet<Alumno> listaAlumnos , HashSet<Materia> listaMaterias) {\n initComponents();\n \n this.listaAlumnos = listaAlumnos;\n this.listaMaterias = listaMaterias; \n llenarComboAlumnos();\n llenarComboMaterias();\n }", "public String getClStaffId() {\r\n\t\treturn clStaffId;\r\n\t}", "@Before\n\tpublic void setBatchInfo() {\n\t\t\n\t\tthis.caliberBatch = batchDao.findOneWithDroppedTrainees(2201);\n\t\tthis.caliberBatch.setTrainees(caliberTrainees);\n\t\tlog.debug(\"CaliberBatch: \"+ caliberBatch.getResourceId());\n\t\t\n\t\tthis.salesforceTrainer.setName(\"Tom Riddle\");\n\t\tthis.salesforceTrainer.setEmail(\"[email protected]\");\n\t\tthis.salesforceTrainer.setTitle(\"Trainer\");\n\t\tthis.salesforceTrainer.setTier(TrainerRole.ROLE_TRAINER);\n\t\t\n\t\tthis.salesforceBatch.setResourceId(\"TWO\");\n\t\tthis.salesforceBatch.setTrainer(salesforceTrainer);\n\t\tthis.salesforceBatch.setTrainingName(caliberBatch.getTrainingName());\n\t\tthis.salesforceBatch.setLocation(caliberBatch.getLocation());\n\t\tthis.salesforceBatch.setWeeks(caliberBatch.getWeeks());\n\t\tthis.salesforceBatch.setSkillType(caliberBatch.getSkillType());\n\t\tthis.salesforceBatch.setTrainees(caliberBatch.getTrainees());\n\t\tthis.salesforceBatch.setAddress(caliberBatch.getAddress());\n\t\tthis.salesforceBatch.setEndDate(caliberBatch.getEndDate());\n\t\tthis.salesforceBatch.setStartDate(caliberBatch.getStartDate());\n\t\tthis.salesforceBatch.setBatchId(caliberBatch.getBatchId());\n\t\tthis.salesforceBatch.setTrainees(salesforceTrainees);\n\t}", "public Staff(String alias) {\n this(DSL.name(alias), STAFF);\n }", "public StudentExample() {\n oredCriteria = new ArrayList<Criteria>();\n }" ]
[ "0.62418985", "0.62120837", "0.57805073", "0.57285285", "0.5507891", "0.5499547", "0.5418969", "0.53996843", "0.5387631", "0.5314236", "0.5244517", "0.5194516", "0.51872677", "0.5173453", "0.5160525", "0.5079244", "0.50414276", "0.50390834", "0.50361145", "0.5031575", "0.5029481", "0.49997038", "0.49723852", "0.49629864", "0.49585748", "0.49240255", "0.49092245", "0.49085903", "0.4901698", "0.49015298", "0.48941356", "0.48940116", "0.48697206", "0.48666647", "0.48613736", "0.48593038", "0.4850214", "0.48469365", "0.48466164", "0.4846182", "0.48392716", "0.48377967", "0.4820502", "0.47942483", "0.47923115", "0.478327", "0.47822443", "0.477104", "0.47681862", "0.47635993", "0.47544718", "0.47514382", "0.4749651", "0.4749651", "0.47472167", "0.4741255", "0.47274607", "0.47118077", "0.4702746", "0.47016555", "0.46967024", "0.4688256", "0.46837243", "0.46798405", "0.46730757", "0.46670952", "0.46583357", "0.4654388", "0.46511114", "0.4650521", "0.46494213", "0.46439916", "0.46312496", "0.46245584", "0.46220547", "0.4621496", "0.46183974", "0.4617521", "0.4613779", "0.46117607", "0.46100694", "0.46068668", "0.4606857", "0.46049944", "0.46044165", "0.4603869", "0.46026325", "0.45971602", "0.45928514", "0.45875287", "0.4587026", "0.45804346", "0.45792904", "0.4578863", "0.45731434", "0.45708352", "0.45706856", "0.4569311", "0.45657986", "0.45617595" ]
0.57657164
3
TODO Autogenerated method stub
public Object[] getElements(Object arg0) { RoomFactory roomFactory=(RoomFactory)arg0; return roomFactory.getRoomList().toArray(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
TODO Autogenerated method stub
public Image getColumnImage(Object arg0, int arg1) { return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "private stendhal() {\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.66708666", "0.65675074", "0.65229905", "0.6481001", "0.64770633", "0.64584893", "0.6413091", "0.63764185", "0.6275735", "0.62541914", "0.6236919", "0.6223816", "0.62017626", "0.61944294", "0.61944294", "0.61920846", "0.61867654", "0.6173323", "0.61328775", "0.61276996", "0.6080555", "0.6076938", "0.6041293", "0.6024541", "0.6019185", "0.5998426", "0.5967487", "0.5967487", "0.5964935", "0.59489644", "0.59404725", "0.5922823", "0.5908894", "0.5903041", "0.5893847", "0.5885641", "0.5883141", "0.586924", "0.5856793", "0.58503157", "0.58464456", "0.5823378", "0.5809384", "0.58089525", "0.58065355", "0.58065355", "0.5800514", "0.57912874", "0.57912874", "0.57912874", "0.57912874", "0.57912874", "0.57912874", "0.57896614", "0.5789486", "0.5786597", "0.5783299", "0.5783299", "0.5773351", "0.5773351", "0.5773351", "0.5773351", "0.5773351", "0.5760369", "0.5758614", "0.5758614", "0.574912", "0.574912", "0.574912", "0.57482654", "0.5732775", "0.5732775", "0.5732775", "0.57207066", "0.57149917", "0.5714821", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57115865", "0.57045746", "0.5699", "0.5696016", "0.5687285", "0.5677473", "0.5673346", "0.56716853", "0.56688815", "0.5661065", "0.5657898", "0.5654782", "0.5654782", "0.5654782", "0.5654563", "0.56536144", "0.5652585", "0.5649566" ]
0.0
-1
TODO Autogenerated method stub
public String getColumnText(Object arg0, int arg1) { Room room=(Room)arg0; CommonADO ado=CommonADO.getCommonADO(); String roomInfoQueryStr="select * from RoomType where Type='"+room.getType()+"'"; ResultSet rs; rs=ado.executeSelect(roomInfoQueryStr); int peopleNum=0; float price=0; try { if(rs.next()){ peopleNum=rs.getInt("PeopleNums"); price=rs.getFloat("Price"); } } catch (SQLException e) { // TODO Auto-generated catch block e.printStackTrace(); } if(arg1==0) return room.getRoomNo(); if(arg1==1) return room.getType(); if(arg1==2) return peopleNum+""; if(arg1==3) return price+""; if(arg1==4) return room.getRemarks(); System.out.println(room.getType()+room.getState()+room.getRoomNo()); return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
TODO Autogenerated method stub
public boolean isLabelProperty(Object arg0, String arg1) { return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
TODO Autogenerated method stub
@Override public void widgetSelected(SelectionEvent arg0) { InputDialog id1=new InputDialog(sShell,"新增员工","输入员工信息,用空格分开,例如:001 Manager Tommy f 312039","",null); if(id1.open()==0){ input=id1.getValue(); if(input.equals("")) return; } else return; String str[]=input.split(" "); CommonADO ado=CommonADO.getCommonADO(); String sql="insert into Staff values('"+str[0]+"','"+str[1]+"','"+str[2]+"','"+str[3]+"','"+str[4]+"')"; ado.executeUpdate(sql); showStaff(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
TODO Autogenerated method stub
@Override public void widgetDefaultSelected(SelectionEvent arg0) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "private stendhal() {\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.66708666", "0.65675074", "0.65229905", "0.6481001", "0.64770633", "0.64584893", "0.6413091", "0.63764185", "0.6275735", "0.62541914", "0.6236919", "0.6223816", "0.62017626", "0.61944294", "0.61944294", "0.61920846", "0.61867654", "0.6173323", "0.61328775", "0.61276996", "0.6080555", "0.6076938", "0.6041293", "0.6024541", "0.6019185", "0.5998426", "0.5967487", "0.5967487", "0.5964935", "0.59489644", "0.59404725", "0.5922823", "0.5908894", "0.5903041", "0.5893847", "0.5885641", "0.5883141", "0.586924", "0.5856793", "0.58503157", "0.58464456", "0.5823378", "0.5809384", "0.58089525", "0.58065355", "0.58065355", "0.5800514", "0.57912874", "0.57912874", "0.57912874", "0.57912874", "0.57912874", "0.57912874", "0.57896614", "0.5789486", "0.5786597", "0.5783299", "0.5783299", "0.5773351", "0.5773351", "0.5773351", "0.5773351", "0.5773351", "0.5760369", "0.5758614", "0.5758614", "0.574912", "0.574912", "0.574912", "0.57482654", "0.5732775", "0.5732775", "0.5732775", "0.57207066", "0.57149917", "0.5714821", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57115865", "0.57045746", "0.5699", "0.5696016", "0.5687285", "0.5677473", "0.5673346", "0.56716853", "0.56688815", "0.5661065", "0.5657898", "0.5654782", "0.5654782", "0.5654782", "0.5654563", "0.56536144", "0.5652585", "0.5649566" ]
0.0
-1
TODO Autogenerated method stub
@Override public void widgetSelected(SelectionEvent arg0) { InputDialog id1=new InputDialog(sShell,"删除员工","输入员工编号","",null); if(id1.open()==0){ input=id1.getValue(); if(input.equals("")) return; } else return; CommonADO ado=CommonADO.getCommonADO(); String sql="delete from Staff where StaffNo='"+input+"'"; ado.executeUpdate(sql); showStaff(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
TODO Autogenerated method stub
@Override public void widgetDefaultSelected(SelectionEvent arg0) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
TODO Autogenerated method stub
private void showStaff() { CommonADO ado=CommonADO.getCommonADO(); String sql="select * from Staff"; ResultSet rs=ado.executeSelect(sql); String str=""; str+="员工编号:"+" 职位:"+" 姓名:"+" 性别: "+" 电话号码:"+"\n"; try { while(rs.next()){ String no=rs.getString("StaffNo"); String jobname=rs.getString("JobName"); String name=rs.getString("Name"); String sex=rs.getString("Sex"); String phone=rs.getString("Phone"); if(no.length()<8){ for(int i=no.length();i<=12;i++) no+=" "; } if(jobname.length()<8){ for(int i=jobname.length();i<=8;i++) jobname+=" "; } if(name.length()<8){ for(int i=name.length();i<=8;i++) name+=" "; } if(sex.length()<8){ for(int i=sex.length();i<=8;i++) sex+=" "; } if(phone.length()<12){ for(int i=phone.length();i<=12;i++) phone+=" "; } str+=no+jobname+name+sex+phone+"\n"; } } catch (SQLException e) { // TODO Auto-generated catch block e.printStackTrace(); } textAreaStaff.setText(str); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
This method initializes compositeUserMange
private void createCompositeUserMange() { GridData gridData3 = new GridData(); gridData3.grabExcessHorizontalSpace = true; gridData3.heightHint = 300; gridData3.widthHint = 400; gridData3.horizontalSpan = 3; GridData gridData11 = new GridData(); gridData11.horizontalAlignment = org.eclipse.swt.layout.GridData.CENTER; gridData11.grabExcessHorizontalSpace = true; GridData gridData10 = new GridData(); gridData10.horizontalAlignment = org.eclipse.swt.layout.GridData.CENTER; gridData10.grabExcessHorizontalSpace = true; GridLayout gridLayout2 = new GridLayout(); gridLayout2.numColumns = 3; compositeUserMange = new Composite(tabFolder, SWT.NONE); compositeUserMange.setLayout(gridLayout2); textAreaUser = new Text(compositeUserMange, SWT.MULTI | SWT.WRAP | SWT.V_SCROLL); textAreaUser.setLayoutData(gridData3); buttonAddUser = new Button(compositeUserMange, SWT.NONE); buttonAddUser.setText("新增用户"); buttonAddUser.setLayoutData(gridData10); buttonAddUser.addSelectionListener(new SelectionListener() { @Override public void widgetSelected(SelectionEvent arg0) { // TODO Auto-generated method stub System.out.println("新增用户"); InputDialog id1=new InputDialog(sShell,"新增用户","输入用户信息,用空格分开,例如:pdl 666 管理员","",null); if(id1.open()==0){ input=id1.getValue(); if(input.equals("")) return; } else return; String str[]=input.split(" "); CommonADO ado=CommonADO.getCommonADO(); String sql="insert into Users values('"+str[0]+"','"+str[1]+"','"+str[2]+"')"; ado.executeUpdate(sql); showUser(); } @Override public void widgetDefaultSelected(SelectionEvent arg0) { // TODO Auto-generated method stub } }); buttonDeleteUser = new Button(compositeUserMange, SWT.NONE); buttonDeleteUser.setText("删除用户"); buttonDeleteUser.setLayoutData(gridData11); buttonDeleteUser.addSelectionListener(new SelectionListener() { @Override public void widgetSelected(SelectionEvent arg0) { // TODO Auto-generated method stub InputDialog id1=new InputDialog(sShell,"删除用户","输入用户名","",null); if(id1.open()==0){ input=id1.getValue(); if(input.equals("")) return; } else return; CommonADO ado=CommonADO.getCommonADO(); String sql="delete from Users where UserName='"+input+"'"; ado.executeUpdate(sql); showUser(); } @Override public void widgetDefaultSelected(SelectionEvent arg0) { // TODO Auto-generated method stub } }); showUser(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void initUser() {\n\t}", "public void initialize() {\n\t\tBmoUser bmoUser = new BmoUser();\n\n\t\t// Responsable\n\t\tBmFilter filterLeaderUserActive = new BmFilter();\n\t\tfilterLeaderUserActive.setValueFilter(bmoUser.getKind(), bmoUser.getStatus(), \"\" + BmoUser.STATUS_ACTIVE);\n\t\tleaderUserIdSuggestBox.addFilter(filterLeaderUserActive);\n\t\t\n\t\t// Consultor\n\t\tBmFilter filterAssignedUserActive = new BmFilter();\n\t\tfilterAssignedUserActive.setValueFilter(bmoUser.getKind(), bmoUser.getStatus(), \"\" + BmoUser.STATUS_ACTIVE);\n\t\tassignedUserIdSuggestBox.addFilter(filterAssignedUserActive);\n\t}", "public ApplicationUserBoImpl()\n {\n \t//Initialise the related Object stores\n \n }", "private MsUserInit(Builder builder) {\n super(builder);\n }", "public void initialize() {\n\n list.add(user1);\n list.add(user2);\n list.add(user3);\n }", "private final void initializeAdminUser() throws Exception {\r\n String adminEmail = server.getServerProperties().get(ADMIN_EMAIL_KEY);\r\n String adminPassword = server.getServerProperties().get(ADMIN_PASSWORD_KEY);\r\n // First, clear any existing Admin role property.\r\n for (User user : this.email2user.values()) {\r\n user.setRole(\"basic\");\r\n }\r\n // Now define the admin user with the admin property.\r\n if (this.email2user.containsKey(adminEmail)) {\r\n User user = this.email2user.get(adminEmail);\r\n user.setPassword(adminPassword);\r\n user.setRole(\"admin\");\r\n }\r\n else {\r\n User admin = new User();\r\n admin.setEmail(adminEmail);\r\n admin.setPassword(adminPassword);\r\n admin.setRole(\"admin\");\r\n this.updateCache(admin);\r\n }\r\n }", "public UIUserLogginMangementBean() {\n }", "@Override\n public void initializeUsersForImportation() {\n if (LOG.isDebugEnabled()) {\n LOG.debug(\"initializeUsersForImportation\");\n }\n clearAddPanels();\n setRenderImportUserPanel(true);\n\n List<User> users;\n\n usersForImportation = new ArrayList<Pair<Boolean, User>>();\n\n if (Role.isLoggedUserAdmin() || Role.isLoggedUserProjectManager()) {\n choosenInstitutionForAdmin = (Institution) Component.getInstance(CHOOSEN_INSTITUTION_FOR_ADMIN);\n\n if (choosenInstitutionForAdmin != null) {\n users = User.listUsersForCompany(choosenInstitutionForAdmin);\n } else {\n users = User.listAllUsers();\n }\n } else {\n users = User.listUsersForCompany(Institution.getLoggedInInstitution());\n }\n boolean emailAlreadyExists;\n for (User user : users) {\n emailAlreadyExists = false;\n\n for (ConnectathonParticipant cp : connectathonParticipantsDataModel().getAllItems(FacesContext.getCurrentInstance())) {\n\n if (user.getEmail().equals(cp.getEmail())) {\n emailAlreadyExists = true;\n }\n }\n\n if (!emailAlreadyExists) {\n usersForImportation.add(new Pair<Boolean, User>(false, user));\n }\n }\n }", "@PostConstruct\n public void initUsers() {\n List<MyUser> users = Stream.of(\n new MyUser(\"1\",\"Vaibhav\",\"Vaibhav\"),\n new MyUser(\"2\",\"Abhishek\",\"Abhishek\"),\n new MyUser(\"3\",\"admin\",\"admin\")\n ).collect(Collectors.toList());\n repository.saveAll(users);\n }", "public void initUsers() {\n User user1 = new User(\"Alicja\", \"Grzyb\", \"111111\", \"grzyb\");\n User user2 = new User(\"Krzysztof\", \"Kowalski\", \"222222\", \"kowalski\");\n User user3 = new User(\"Karolina\", \"Nowak\", \"333333\", \"nowak\");\n User user4 = new User(\"Zbigniew\", \"Stonoga \", \"444444\", \"stonoga\");\n User user5 = new User(\"Olek\", \"Michnik\", \"555555\", \"michnik\");\n users.add(user1);\n users.add(user2);\n users.add(user3);\n users.add(user4);\n users.add(user5);\n }", "private final void initializeCache() {\r\n try {\r\n UserIndex index = makeUserIndex(this.dbManager.getUserIndex());\r\n for (UserRef ref : index.getUserRef()) {\r\n String email = ref.getEmail();\r\n String userString = this.dbManager.getUser(email);\r\n User user = makeUser(userString);\r\n this.updateCache(user);\r\n }\r\n }\r\n catch (Exception e) {\r\n server.getLogger().warning(\"Failed to initialize users \" + StackTrace.toString(e));\r\n }\r\n }", "public User() {\n subscribedGroups = new ArrayList<String>();\n readPostIds = new ArrayList<String>();\n }", "private void initObjects() {\n inputValidation = new InputValidation(activity);\n databaseHelper = new DatabaseHelper(activity);\n user = new User();\n }", "public CambioUserN() {\n initComponents();\n }", "protected void init() {\n setUUIDString();\n setNoteCreatedAt();\n setNoteUpdatedAt();\n setCreator(ParseUser.getCurrentUser());\n addAuthor(ParseUser.getCurrentUser());\n setACL(new ParseACL(ParseUser.getCurrentUser()));\n }", "private void setUsersIntoComboBox() {\n if (mainModel.getUserList() != null) {\n try {\n mainModel.loadUsers();\n cboUsers.getItems().clear();\n cboUsers.getItems().addAll(mainModel.getUserList());\n } catch (ModelException ex) {\n alertManager.showAlert(\"Could not get the users.\", \"An error occured: \" + ex.getMessage());\n }\n }\n }", "RemoteUserManager() { }", "@PostConstruct\n\tprivate void InitGroups() {\n\t\tList<Group> groups = identityService.createGroupQuery().groupIdIn(\"READER\", \"BETAREADER\").list();\n\n\t\tif (groups.isEmpty()) {\n\n\t\t\tGroup reader = identityService.newGroup(\"READER\");\n\t\t\tidentityService.saveGroup(reader);\n\n\t\t\tGroup betaReader = identityService.newGroup(\"BETAREADER\");\n\t\t\tidentityService.saveGroup(betaReader);\n\t\t}\n\n\t\tRoles newRole1 = new Roles(\"READER\");\n\t\troleRepository.save(newRole1);\n\t\tRoles newRole2 = new Roles(\"BETAREADER\");\n\t\troleRepository.save(newRole2);\n\t\tRoles newRole3 = new Roles(\"WRITER\");\n\t\troleRepository.save(newRole3);\n\t\tRoles newRole4 = new Roles(\"COMMISSION\");\n\t\troleRepository.save(newRole4);\n\n\t\tBCryptPasswordEncoder encoder = new BCryptPasswordEncoder();\n\n\t\tList<Roles> roles = new ArrayList<Roles>();\n\t\troles.add(newRole4);\n\n\t\tcom.example.app.models.User user1 = new com.example.app.models.User(\"Dejan\", \"Jovanovic\", \"dejan\",\n\t\t\t\tencoder.encode(\"123\").toString(), false, true, roles, \"[email protected]\", \"as2d1as4d5a6s4da6\");\n\t\tuserRepository.save(user1);\n\n\t\tcom.example.app.models.User user2 = new com.example.app.models.User(\"Jovan\", \"Popovic\", \"jovan\",\n\t\t\t\tencoder.encode(\"123\").toString(), false, true, roles, \"[email protected]\", \"as2d1as4d5a6s4da6\");\n\t\tuserRepository.save(user2);\n\t}", "public void onCreationEvent(UserCreateEvent event){\n user = new UserBean(event.getUser());\n }", "public void initUser(ActiveSession user) {\n this.user = user;\n }", "private UserAggregate() {\n userList = new ArrayList<>();\n }", "public LibrarianUser() {\n\t\tsuper();\n\t}", "private UserPrefernce(){\r\n\t\t\r\n\t}", "public AppUser() {\r\n\t\tsuper();\r\n\t}", "@Override\r\n\tprotected final void objectDataMapping() throws BillingSystemException{\r\n\t\tString[][] data=getDataAsArray(USER_DATA_FILE);\r\n\t\tif(validateData(data,\"Authorised User\",COL_LENGTH)){\r\n\t\tList<User> listUser=new ArrayList<User>();\r\n\t\t\r\n\t\tfor(int i=0;i<data.length;i++){\r\n\t \t\r\n\t \tUser usr=new User();\r\n\t \t\t\r\n\t \tusr.setUsername(data[i][0]);\r\n\t \tusr.setPassword(data[i][1]);\r\n\t \tusr.setRole(getRoleByCode(data[i][2]));\r\n\t \t\r\n\t \tlistUser.add(usr);\t\r\n\t }\r\n\r\n\t\t\r\n\t\tthis.listUser=listUser;\r\n\t\t}\r\n\t}", "public CreateUserCommand() {\n userReceiver = new UserReceiver();\n roleReceiver = new RoleReceiver();\n next = new GetRolesCommand();\n result = new CommandResult();\n }", "private void initialize() {\n\t\t\ttry {\n\t\t\t\tprogramId = getSFParams().getProgramId(bmoProject.getProgramCode());\n\t\t\t} catch (SFException e) {\n\t\t\t\tshowErrorMessage(this.getClass().getName() + \"-initialize() ERROR: \" + e.toString());\n\t\t\t}\n\n\t\t\t// Filtrar por vendedores\n\t\t\tuserSuggestBox = new UiSuggestBox(new BmoUser());\n\t\t\tBmoUser bmoUser = new BmoUser();\n\t\t\tBmoProfileUser bmoProfileUser = new BmoProfileUser();\n\t\t\tBmFilter filterSalesmen = new BmFilter();\n\t\t\tint salesGroupId = ((BmoFlexConfig)getUiParams().getSFParams().getBmoAppConfig()).getSalesProfileId().toInteger();\n\t\t\tfilterSalesmen.setInFilter(bmoProfileUser.getKind(), \n\t\t\t\t\tbmoUser.getIdFieldName(),\n\t\t\t\t\tbmoProfileUser.getUserId().getName(),\n\t\t\t\t\tbmoProfileUser.getProfileId().getName(),\n\t\t\t\t\t\"\" + salesGroupId);\t\n\t\t\tuserSuggestBox.addFilter(filterSalesmen);\n\n\n\t\t\t// Filtrar por vendedores activos\n\t\t\tBmFilter filterSalesmenActive = new BmFilter();\n\t\t\tfilterSalesmenActive.setValueFilter(bmoUser.getKind(), bmoUser.getStatus(), \"\" + BmoUser.STATUS_ACTIVE);\n\t\t\tuserSuggestBox.addFilter(filterSalesmenActive);\n\n\t\t\t// Filtrar Responsables de almacen activos\n\t\t\twarehouseManagerIdSuggestBox.addFilter(filterSalesmenActive);\n\n\t\t\t// Filtrar solo usuarios que estan en almacenes\n\t\t\tBmoWarehouse bmoWarehouse = new BmoWarehouse();\n\t\t\tBmFilter filterUserWarehouse = new BmFilter();\n\t\t\tfilterUserWarehouse.setInFilter(bmoWarehouse.getKind(), \n\t\t\t\t\tbmoUser.getIdFieldName(), \n\t\t\t\t\tbmoWarehouse.getUserId().getName(), \"1\" , \"1\");\n\t\t\twarehouseManagerIdSuggestBox.addFilter(filterUserWarehouse);\n\n\t\t\t// Filtrar por tipos de flujos ligados a proyectos\n\t\t\tBmoWFlowType bmoWFlowType = new BmoWFlowType();\n\t\t\tBmFilter bmFilter = new BmFilter();\n\t\t\tbmFilter.setValueFilter(bmoWFlowType.getKind(), bmoWFlowType.getBmoWFlowCategory().getProgramId(), programId);\n\t\t\twFlowTypeListBox = new UiListBox(getUiParams(), new BmoWFlowType(), bmFilter);\n\n\t\t\t// Filtrar por tipos de pedidos de tipo renta\n\t\t\tBmoOrderType bmoOrderType = new BmoOrderType();\n\t\t\tBmFilter rentalFilter = new BmFilter();\n\t\t\trentalFilter.setValueFilter(bmoOrderType.getKind(), bmoOrderType.getType(), \"\" + BmoOrderType.TYPE_RENTAL);\n\t\t\torderTypeListBox = new UiListBox(getUiParams(), new BmoOrderType(), rentalFilter);\n\n\t\t\t// Botón de Enviar encuesta al cliente\n\t\t\tsendPoll.setStyleName(\"formCloseButton\");\n\t\t\tif(newRecord) sendPoll.setVisible(false);\n\t\t\telse sendPoll.setVisible(true);\n\t\t\tsendPoll.addClickHandler(new ClickHandler() {\n\t\t\t\t@Override\n\t\t\t\tpublic void onClick(ClickEvent event) {\n\t\t\t\t\tif (Window.confirm(\"¿Está seguro que desea enviar la Encuesta al Cliente?\")) sendPoll();\n\t\t\t\t}\n\t\t\t});\n\n\t\t}", "private void initObjects() {\n databaseHelper = new DatabaseHelper(activity);\n dbHelper = new DBHelper(activity);\n inputValidation = new InputValidation(activity);\n progress = new ProgressDialog(activity);\n user=new User();\n }", "public User(String username,\n String firstname,\n String lastname) {\n //create userId\n int newID = numOfObjects + 1;\n String userId = username + \"_\" + newID;\n\n this.userId = userId;\n this.username = username;\n this.firstname = firstname;\n this.lastname = lastname;\n this.calendarsOwned = new ArrayList<Calendar_>();\n this.eventsOwned = new ArrayList<Event>();\n\n //update object counter\n numOfObjects++;\n }", "private void setUpUser() {\n Bundle extras = getIntent().getExtras();\n mActiveUser = extras.getString(Helper.USER_NAME);\n mUser = mDbHelper.getUser(mActiveUser, true);\n Log.d(TAG, mUser.toString());\n\n if (mUser == null) {\n Toast.makeText(getBaseContext(), \"Error loading user data\", Toast.LENGTH_SHORT);\n return;\n }\n\n mIsNumPassword = Helper.isNumeric(mUser.getPassword());\n\n mKeyController = new KeyController(getApplicationContext(), mUser);\n }", "public userBean() {\r\n }", "public UserManager() {\n allUsers = new ArrayList<>();\n allUsers.add(new RegularUser(\"Bob\", \"user\",\"pass\", new int[0] , \"email\"));\n allUserNames = new ArrayList<>();\n allUserNames.add(\"user\");\n allPasswords = new ArrayList<>();\n allPasswords.add(\"pass\");\n allEmails = new ArrayList<>();\n }", "@Override\n\tpublic void initialize() {\n\t\thideAdditionElements();\n\t//\tinitializeUserList();\n\t\t// TODO fill list with saved users\n\t\t\n//\t\tif(userList.size() > 0) {\n//\t\t\tuserListView.getSelectionModel().select(0);\n//\t\t}\n\t\t\n\t\tuserListView.getSelectionModel().selectedIndexProperty().addListener((obs, oldVal, newVal) -> selectUser());\n\t\tuserListView.setItems(userList);\n\t}", "private void initializeCollaboratorCheckComboBox()\r\n throws DatabaseException, ConnectionFailedException {\r\n List<User> listOfAllUsers = this.application.loadUsersFromDatabase();\r\n listOfAllUsers.remove(project.getAuthor());\r\n this.viewController.initCollaboratorCheckComboBox(listOfAllUsers);\r\n }", "public void setCreateUser(User createUser)\r\n/* */ {\r\n/* 151 */ this.createUser = createUser;\r\n/* */ }", "@Override\n public synchronized void assignModels() {\n if ( userRecordService != null )\n for ( ChannelsUser user : userRecordService.getAllEnabledUsers() ) {\n CollaborationModel collaborationModel = user.getCollaborationModel();\n if ( collaborationModel == null )\n user.setCollaborationModel( getDefaultModel( user ) );\n else {\n String uri = collaborationModel.getUri();\n if ( collaborationModel.isRetired() ) {\n // User was connected to an old production plan\n user.setCollaborationModel( findProductionModel( uri ) );\n\n } else if ( collaborationModel.isProduction() && user.isDeveloperOrAdmin( uri ) )\n // Plan was put in production\n user.setCollaborationModel( findDevelopmentModel( uri ) );\n }\n }\n\n }", "public void populateUserDetails() {\n\n this.enterprise = system.getOpRegionDirectory().getOperationalRegionList()\n .stream().filter(op -> op.getRegionId() == user.getNetworkId())\n .findFirst()\n .get()\n .getBuDir()\n .getBusinessUnitList()\n .stream()\n .filter(bu -> bu.getUnitType() == BusinessUnitType.CHEMICAL)\n .map(unit -> (ChemicalManufacturingBusiness) unit)\n .filter(chemBusiness -> chemBusiness.getEnterpriseId() == user.getEnterpriseId())\n .findFirst()\n .get();\n\n this.organization = (ChemicalManufacturer) enterprise\n .getOrganizationList().stream()\n .filter(o -> o.getOrgId() == user.getOrganizationId())\n .findFirst()\n .get();\n\n }", "private void init(){\n this.firstNameTF.setText(user.getFirstName());\n this.nameTF.setText(user.getName());\n this.phoneTF.setText(user.getPhone());\n\n this.mailLabel.setText(user.getMail());\n this.roleLabel.setText(user.getFirstName());\n }", "public CompositeData()\r\n {\r\n }", "public ManageUser() {\r\n \t\tinitComponents();\r\n \t\taddActionListener();\r\n \t}", "public void initialize() {\n\n // DO NOT DELETE\n if (userRoleRepository.count() == 0) {\n userRoleRepository.saveAll(List.of(\n userRoleFactory.of(ROLE_USER.name()),\n userRoleFactory.of(ROLE_ADMIN.name())\n ));\n }\n\n // DO NOT DELETE\n if (userRepository.count() == 0) {\n userRepository.saveAll(List.of(\n userFactory.ofSecurity(\n List.of(retrieveAdminRole(), retrieveUserRole()),\n \"[email protected]\",\n new BCryptPasswordEncoder().encode(\"Lens\"),\n \"Lens Huygh\"),\n userFactory.ofSecurity(\n List.of(retrieveAdminRole(), retrieveUserRole()),\n \"[email protected]\",\n new BCryptPasswordEncoder().encode(\"Thomas\"),\n \"Thomas Fontaine\"),\n userFactory.ofSecurity(\n List.of(retrieveAdminRole(), retrieveUserRole()),\n \"[email protected]\",\n new BCryptPasswordEncoder().encode(\"Paul\"),\n \"Paul Gerarts\"),\n userFactory.ofSecurity(\n List.of(retrieveUserRole()),\n \"[email protected]\",\n new BCryptPasswordEncoder().encode(\"user\"),\n \"User McUserson\"),\n userFactory.ofSecurity(\n List.of(retrieveAdminRole()),\n \"[email protected]\",\n new BCryptPasswordEncoder().encode(\"admin\"),\n \"Admin McAdminson\"\n )\n ));\n }\n }", "@Override\n public void initialize(URL url, ResourceBundle rb) {\n getUserNames();\n displayUsers();\n setListListeners();\n \n //checkbox methods\n this.firstNameCheckbox.setOnAction(e->{this.ckbxChanged(this.firstNameCheckbox,this.firstNameInputField);});\n this.lastNameCheckbox.setOnAction(e->{this.ckbxChanged(this.lastNameCheckbox,this.lastNameInputField);});\n this.emailCheckbox.setOnAction(e->{this.ckbxChanged(this.emailCheckbox,this.emailInputField);});\n this.editButton.setOnAction(e->{this.editButtonClicked();});\n this.clearButton.setOnAction(e->{this.clearButtonClicked();});\n this.departmentCheckbox.setOnAction(e->{this.dropdownCheckBoxChanged(this.departmentCheckbox,this.departmentDropdown);});\n this.roleCheckbox.setOnAction(e->{this.dropdownCheckBoxChanged(this.roleCheckbox,this.roleDropdown);});\n this.departmentDropdown.setOnAction(e->{this.dropDownChanged(this.departmentDropdown, \"department\");});\n this.roleDropdown.setOnAction(e->{this.dropDownChanged(this.roleDropdown, \"role\");});\n \n //blur the controllers\n blur(this.firstNameInputField);\n blur(this.lastNameInputField);\n blur(this.emailInputField);\n blur(this.roleDropdown);\n blur(this.departmentDropdown);\n //set editables on controllers\n this.firstNameInputField.setEditable(false);\n this.lastNameInputField.setEditable(false);\n this.emailInputField.setEditable(false);\n this.departmentDropdown.disableProperty().set(true);\n this.roleDropdown.disableProperty().set(true);\n \n //label styling\n this.userNameLabel.textProperty().set(\"User\");\n this.userNameLabel.fontProperty().set(Font.font(\"tahoma\",FontWeight.BOLD,18));\n \n this.departmentTextLabel.textProperty().set(\"Department\");\n this.departmentTextLabel.fontProperty().set(Font.font(\"tahoma\", FontWeight.BOLD, 18));\n \n this.roleTextLabel.textProperty().set(\"Role\");\n this.roleTextLabel.fontProperty().set(Font.font(\"tahoma\",FontWeight.BOLD,18));\n \n //populate the boxes arraylist with all the checkboxes\n boxes.add(this.firstNameCheckbox);\n boxes.add(this.lastNameCheckbox);\n boxes.add(this.emailCheckbox);\n boxes.add(this.departmentCheckbox);\n boxes.add(this.roleCheckbox);\n \n //lock all the checkboxes\n this.lockCheckboxes(boxes);\n \n //populate the arraylists holding the values for the dropdown menus\n this.departmentDropdownValues.add(\"E-Brakes\");\n this.departmentDropdownValues.add(\"General Actuations\");\n this.departmentDropdownValues.add(\"Legacy\");\n this.departmentDropdownValues.add(\"Process Areas\");\n this.departmentDropdownValues.add(\"Tank Units\");\n \n //populate the dropdown for department\n for(String dept:this.departmentDropdownValues){\n this.departmentDropdown.getItems().add(dept);\n }\n \n //populate the role dropdown\n this.roleDropdown.getItems().add(\"Employee\");\n this.roleDropdown.getItems().add(\"Manager\");\n \n //populate the hashmap with the default values\n populateMap();\n }", "User()\n\t{\n\n\t}", "public AppUser() {\n super();\n }", "public UserManager(Server server) {\r\n this.server = server;\r\n this.dbManager = (DbManager)this.server.getContext().getAttributes().get(\"DbManager\");\r\n try {\r\n this.jaxbContext = \r\n JAXBContext.newInstance(\r\n org.hackystat.sensorbase.resource.users.jaxb.ObjectFactory.class);\r\n loadDefaultUsers(); //NOPMD it's throwing a false warning. \r\n initializeCache(); //NOPMD \r\n initializeAdminUser(); //NOPMD\r\n }\r\n catch (Exception e) {\r\n String msg = \"Exception during UserManager initialization processing\";\r\n server.getLogger().warning(msg + \"\\n\" + StackTrace.toString(e));\r\n throw new RuntimeException(msg, e);\r\n }\r\n }", "public UserModel(){\n ID = 0; // The user's ID, largely used in conjuction with a database\n firstName = \"fname\"; //User's first name\n lastName = \"lname\"; // User's last name\n password= \"pass\"; ///User password\n username = \"testuser\"; //Valid email for user\n role = 0; //Whether the user is a typical user or administrator\n status = 0; //Whether the user is active or disabled\n }", "public RegisterUserBean() {\n this.account.setGender(Boolean.TRUE);\n this.roleID = 5;\n }", "public BusinessUser(){\n\n }", "public HashUserRealm()\n {}", "public void initData(Users user){\n \n this.selectedUser = user;\n String idValue = String.valueOf(selectedUser.getId());\n String expiresValue = String.valueOf(selectedUser.getExpires_at());\n String enabledValue = String.valueOf(selectedUser.getEnabled());\n String lastLoginValue = String.valueOf(selectedUser.getLast_login());\n email.setText(selectedUser.getEmail());\n password.setText(selectedUser.getPassword());\n role.setText(selectedUser.getRoles());\n idField.setText(idValue);\n expiresField.setText(expiresValue);\n enabledField.setText(enabledValue);\n lockedTextField.setText(lastLoginValue);\n lastLoginTextField.setText(idValue);\n System.out.println(user.toString());\n }", "public AppUser(Long uin) {\n super(uin);\n }", "public static void initializeUserList() {\r\n\t\tUser newUser1 = new User(1, \"Elijah Hickey\", \"snhuEhick\", \"4255\", \"Admin\");\r\n\t\tuserList.add(newUser1);\r\n\t\t\r\n\t\tUser newUser2 = new User(2, \"Bob Ross\", \"HappyClouds\", \"200\", \"Employee\");\r\n\t\tuserList.add(newUser2);\r\n\t\t\r\n\t\tUser newUser3 = new User(3, \"Jane Doe\", \"unknown person\", \"0\", \"Intern\");\r\n\t\tuserList.add(newUser3);\r\n\t}", "@Override\n public void initialize(URL location, ResourceBundle resources) {\n cnslCmb.setItems(User.users);\n }", "private static void initUsers() {\n\t\tusers = new ArrayList<User>();\n\n\t\tusers.add(new User(\"Majo\", \"abc\", true));\n\t\tusers.add(new User(\"Alvaro\", \"def\", false));\n\t\tusers.add(new User(\"Luis\", \"ghi\", true));\n\t\tusers.add(new User(\"David\", \"jkl\", false));\n\t\tusers.add(new User(\"Juan\", \"mno\", true));\n\t\tusers.add(new User(\"Javi\", \"pqr\", false));\n\t}", "private void initialData() {\n\n// if (MorphiaObject.datastore.createQuery(SecurityRole.class).countAll() == 0) {\n// for (final String roleName : Arrays\n// .asList(controllers.Application.USER_ROLE)) {\n// final SecurityRole role = new SecurityRole();\n// role.roleName = roleName;\n// MorphiaObject.datastore.save(role);\n// }\n// }\n }", "public UserModel()\r\n\t{\r\n\t}", "public UserManagement() {\n initComponents();\n\n formatDate = new SimpleDateFormat(\"dd-MM-yyyy\");\n dc = new DBConnection();\n //dateFormat = new SimpleDateFormat(\"dd-MM-yyyy\");\n SetModel();\n }", "public User() {\n /**\n * default Cto'r\n */\n }", "public User() {\n\t\tsuper(AppEntityCodes.USER);\n\t}", "public NewUsers() {\n initComponents();\n currentTimeDate();\n }", "public AppUserResource() {\r\n }", "public UserManager() {\n\n this.userStore = new UserSet();\n this.communityStore = new CommunitySet();\n\n }", "public CSearchUserPanel() {\r\n\t\tsuper();\r\n\t\tinitialize();\r\n\t}", "private void initializeCurrentUser() {\n if (enableLoginActivity && mAuth.getCurrentUser() != null) {\n try {\n initializeUser();\n refreshGoogleCalendarToken();\n } catch (PetRepeatException e) {\n Toast toast = Toast.makeText(this, getString(R.string.error_pet_already_existing),\n Toast.LENGTH_LONG);\n toast.show();\n }\n\n if (mAuth.getCurrentUser() != null) {\n mAuth.getCurrentUser().getIdToken(false).addOnCompleteListener(task -> {\n user.setToken(Objects.requireNonNull(task.getResult()).getToken());\n });\n }\n }\n }", "public void initializeUser() {\n try {\n Connection connection = connect();\n\n PreparedStatement createCategoryTable = connection.prepareStatement(\"CREATE TABLE IF NOT EXISTS user (\"\n + \"id INTEGER PRIMARY KEY, \"\n + \"username VARCHAR(100),\"\n + \"password VARCHAR(100),\"\n + \"UNIQUE(username, password)\"\n + \");\"\n );\n createCategoryTable.execute();\n createCategoryTable.close();\n\n connection.close();\n } catch (SQLException e) {\n System.out.println(e.getMessage());\n }\n }", "public UserModel() throws IOException {\n userManager = new UserManager();\n }", "public ApplicationUser createUserProfile(ApplicationUser applicationUser){\n int min = 105;\n int max = 200;\n int random_int = (int)Math.floor(Math.random()*(max-min+1)+min);\n applicationUser.setAdminId(Integer.toString(random_int));\n applicationUser.setActive(\"Y\");\n applicationUser = mongoDbConnector.createUserProfile(applicationUser);\n return applicationUser;\n }", "private void initCoordLogic() throws SQLException {\n\t\tcoordUsuario = new CoordinadorUsuario();\n\t\tlogicaUsuario = new LogicaUsuario();\n\t\tcoordUsuario.setLogica(logicaUsuario);\n\t\tlogicaUsuario.setCoordinador(coordUsuario);\n\t\t/* Listados de ComboBox*/\n\t\trol = new RolVO();\n\t\templeado = new EmpleadoVO();\n\t}", "private void initActivities(boolean getInactive, boolean callerSuperAdmin)\r\n\t{\n\t\tSecurityContext securityContext = (SecurityContext) _commonCriteria.getSecurityContext();\r\n\t\tUserProfilePermissionSetVO userProfilePermissionSetVO = new UserProfilePermissionSetVO();\r\n\t\tuserProfilePermissionSetVO.setRoleId(get_commonCriteria().getRoleId());\r\n\t\tuserProfilePermissionSetVO.setEntityId(new Integer(1));\r\n\t\tuserProfilePermissionSetVO.setGetInactive(getInactive);\r\n\t\tuserProfilePermissionSetVO.setUserName(securityContext.getUsername());\r\n\t\tuserProfilePermissionSetVO.setVendBuyerResId(securityContext.getVendBuyerResId());\r\n\t\tuserProfilePermissionSetVO.setCallerSuperAdmin(callerSuperAdmin);\r\n\t\tList<PermissionSetVO> permissionSets = manageUsersDelegate.getUserPermissionSets(userProfilePermissionSetVO);\r\n\t\tsetAttribute(\"permissionSets\", permissionSets);\r\n\t}", "public ListUserBean(){\n \n }", "private void initData() throws Exception {\n runTX(new Callable<Void>() {\n @Override\n public Void call() throws Exception {\n createOrganizationRoles(dm);\n createPaymentTypes(dm);\n createUserRoles(dm);\n supplier = Organizations.createOrganization(dm,\n OrganizationRoleType.SUPPLIER);\n UserGroup defaultGroupSup = new UserGroup();\n defaultGroupSup.setOrganization(supplier);\n defaultGroupSup.setIsDefault(true);\n defaultGroupSup.setName(\"default\");\n dm.persist(defaultGroupSup);\n technologyProvider = Organizations.createOrganization(dm,\n OrganizationRoleType.TECHNOLOGY_PROVIDER);\n UserGroup defaultGroupTP = new UserGroup();\n defaultGroupTP.setOrganization(technologyProvider);\n defaultGroupTP.setIsDefault(true);\n defaultGroupTP.setName(\"default\");\n dm.persist(defaultGroupTP);\n tpAndSup = Organizations.createOrganization(dm,\n OrganizationRoleType.TECHNOLOGY_PROVIDER,\n OrganizationRoleType.SUPPLIER);\n supplierAdminUser = Organizations.createUserForOrg(dm, supplier,\n true, \"admin\");\n supplier2 = Organizations.createOrganization(dm,\n OrganizationRoleType.SUPPLIER);\n UserGroup defaultGroup = new UserGroup();\n defaultGroup.setOrganization(supplier2);\n defaultGroup.setIsDefault(true);\n defaultGroup.setName(\"default\");\n dm.persist(defaultGroup);\n UserGroup defaultGroupTpAndSp = new UserGroup();\n defaultGroupTpAndSp.setOrganization(tpAndSup);\n defaultGroupTpAndSp.setIsDefault(true);\n defaultGroupTpAndSp.setName(\"default\");\n dm.persist(defaultGroupTpAndSp);\n Organizations.createUserForOrg(dm, supplier2, true, \"admin\");\n customer = Organizations.createCustomer(dm, supplier);\n UserGroup defaultGroup1 = new UserGroup();\n defaultGroup1.setOrganization(customer);\n defaultGroup1.setIsDefault(true);\n defaultGroup1.setName(\"default\");\n dm.persist(defaultGroup1);\n customer2 = Organizations.createCustomer(dm, supplier2);\n customerUser = Organizations.createUserForOrg(dm, customer,\n true, \"admin\");\n OrganizationReference onBehalf = new OrganizationReference(\n supplier, customer,\n OrganizationReferenceType.ON_BEHALF_ACTING);\n dm.persist(onBehalf);\n onBehalf = new OrganizationReference(supplier, supplier2,\n OrganizationReferenceType.ON_BEHALF_ACTING);\n dm.persist(onBehalf);\n onBehalf = new OrganizationReference(supplier,\n technologyProvider,\n OrganizationReferenceType.ON_BEHALF_ACTING);\n dm.persist(onBehalf);\n onBehalf = new OrganizationReference(supplier, tpAndSup,\n OrganizationReferenceType.ON_BEHALF_ACTING);\n dm.persist(onBehalf);\n return null;\n }\n });\n }", "@Override\n public void run() {\n try {\n stringOrganizationIds.remove(defaultOrg);\n List<Integer> organizationIds = FluentIterable.from(stringOrganizationIds)\n .transform(Ints.stringConverter()).toList();\n\n newUser.setActive(false);\n UserProfileStruct savedUser = createAccountInternal(conn, newUser, password, resetQuestion,\n resetAnswer, givenName, surname, organizationId);\n for (Integer orgId : organizationIds) {\n Profile profile = new Profile();\n profile.setGivenName(givenName);\n profile.setSurname(surname);\n profile.setOrganizationId(orgId);\n profile.setUserId(savedUser.credentialedUser.getId());\n profile = profilePersister.createProfile(profile, conn);\n\n authService.grantAtLeast(profile.getId(), ROLE_READER, orgId);\n authService.grantAtLeast(orgId, ROLE_ADMIN, profile.getId());\n }\n\n User user = savedUser.credentialedUser.getUser();\n user.setActive(true);\n persistenceService.process(conn, new UserPersister.UpdateUserFunc(user));\n conn.commit();\n } catch (Exception e) {\n closeConnection(conn);\n }\n }", "public DbUser() {\r\n\t}", "@SuppressWarnings(\"unchecked\")\n private void userinitComponents() {\n attendace.home = this;\n \n \n \n }", "public UserCatalog() {\n\t\tthis.userCat = new HashMap<>();\n\t}", "public UserBean() {\n }", "public UserBean() {\n }", "@Before\n public void init() {\n Ebean.deleteAll(userQuery.findList());\n Ebean.deleteAll(userOptionalQuery.findList());\n \n userOptional = new OtoUserOptional();\n Ebean.save(userOptional);\n testUser = new OtoUser();\n testUser.setOptional(userOptional);\n Ebean.save(testUser);\n }", "private void initUI(ActivityUserListBinding binding) {\n\n userHolder = (UserParameterHolder) getIntent().getSerializableExtra(Constants.USER_PARAM_HOLDER_KEY);\n\n // Toolbar\n if(userHolder.return_types.equals(\"follower\")) {\n initToolbar(binding.toolbar, getString(R.string.user_follower_list_toolbar_name));\n }else {\n initToolbar(binding.toolbar, getString(R.string.user_following_list_toolbar_name));\n }\n\n // setup Fragment\n setupFragment(new UserListFragment());\n\n }", "private void myInit() {\n\n// System.setProperty(\"pool_host\", \"localhost\");\n// System.setProperty(\"pool_db\", \"db_cis_cosca\");\n// System.setProperty(\"pool_password\", \"password\");\n\n// MyUser.setUser_id(\"2\");\n tf_search.grabFocus();\n jPanel7.setVisible(false);\n init_key();\n hover();\n search();\n init();\n init_tbl_users();\n\n focus();\n jLabel3.setVisible(false);\n cb_lvl.setVisible(false);\n jPanel2.setVisible(false);\n\n init_tbl_user_default_previleges();\n data_cols_default();\n init_tbl_user_default_priveleges(tbl_user_default_priveleges);\n\n init_tbl_user_previleges();\n init_tbl_user_default_previlege_others(tbl_user_default_previlege_others);\n Field.Combo cb = (Field.Combo) tf_from_location1;\n cb.setText(\"Transactions\");\n cb.setId(\"1\");\n\n data_cols();\n }", "public users() {\n initComponents();\n connect();\n autoID();\n loaduser();\n \n \n }", "public NewUser() {\n initComponents();\n }", "public UserEntity() {\n\t\tsuper();\n\t}", "private void controladorUser(Controlador controlador){\n this.contUserCrearProyecto = controlador.getUserCrearProyecto();\n inicioUser.setControlCrearProyecto(contUserCrearProyecto);\n \n this.contUserCrearColectivo = controlador.getUserCrearColectivo();\n inicioUser.setControlCrearColectivo(contUserCrearColectivo);\n\n this.contInformes = controlador.getInformes();\n inicioUser.setControlSolicitarInformes(contInformes); \n \n this.contFiltrar = controlador.getFiltrar();\n inicioUser.setControlFiltrar(contFiltrar);\n\n this.contLimpiar = controlador.getLimpiarFiltro();\n inicioUser.setControlLimpiarFiltro(contLimpiar);\n }", "private void initView() {\n\t\tuiBinder.createAndBindUi(this);\n\t\tRootPanel.get(\"rolePanelContainer\").add(cpanel);\n\t\t\n\t\tlb.setVisibleItemCount(VISIBLE_ITEM);\n\t\t\n\t\t// Fill the combo\n\t\tList<RoleEnum> comboList = RoleEnum.comboList();\n\t\tfor (int i = 0; i < comboList.size(); i++) {\n\t\t\tlbRoleCombo.addItem(comboList.get(i).value);\t\n\t\t}\n\t}", "public CapUserExample() {\n oredCriteria = new ArrayList<Criteria>();\n }", "@Before\n\tpublic void initialize() {\n\t\tuser_reg = new UserRegistration();\n\t}", "public void setupUser() {\n }", "public BridgingUI() {\n initComponents();\n initUserActions();\n }", "@Override\r\n public void initialize(URL url, ResourceBundle rb) {\n this.db = LoginController.db;\r\n this.loggedInUser = SidePaneController.employeeFullName; \r\n System.out.println(loggedInUser); \r\n refreshTable(); \r\n tblTrainingList.getColumns().get(2).setStyle(\"-fx-alignment: CENTER;\");\r\n initializedComboBox(); \r\n backgroundRefresh(); \r\n }", "public SuperUserExample() {\n oredCriteria = new ArrayList<Criteria>();\n }", "private Users buildLogin( ) {\n\t\t\r\n\t\t return LoginUtil.fillUserData(this.user, this);\r\n\t\t \r\n\t}", "@Override\n public void initialize(URL url, ResourceBundle rb) {\n // TODO\n setAllUsersInComboBox();\n viewUsers();\n setAllRolesInComboBox();\n }", "@PostConstruct\n\tprotected void initialize() throws Exception {\n\t\t// // Create sample roles\n\t\tRole roleAdmin = roleRepository.findByName(\"R_SUPER_ADMIN\");\n\t\tif (roleRepository.findByName(\"R_SUPER_ADMIN\") == null) {\n\t\t\tlogger.debug(\"Creating default admin role ...\");\n\t\t\troleAdmin = new Role(\"Super Admin\", \"R_SUPER_ADMIN\", \"This is a role for super administrator.\");\n\t\t\troleAdmin.setIsRestricted(true);\n\t\t\troleRepository.save(roleAdmin);\n\t\t}\n\t\t// // Create default users\n\t\tif (accountRepository.findByUsername(\"admin\") == null) {\n\t\t\tlogger.debug(\"Creating default admin account ...\");\n\t\t\taccountRepository.save(new Account(\"admin\", passwordEncoder.encode(\"admin\"), \"[email protected]\", \"Kent\",\n\t\t\t\t\troleRepository.findByName(\"R_SUPER_ADMIN\"), true));\n\t\t}\n\n\t}", "@Override\n\tpublic void initUserCreditHistoryDataService() throws RemoteException {\n\t\tconnect = configure.init();\n\t}", "public User_Account() {\r\n\t\tfirstName=middleName=lastName = null;\r\n\t\taddress=city=state=zip=null;\r\n\t\tphone=email=webLinks= new ArrayList <String>(); \r\n\t\tedu = new ArrayList <Education>();\r\n\t\twork = new ArrayList <Work>();\r\n\t}", "private UserBean buildUserBean(HttpServletRequest request) {\n\t\tAccount account = UserManager.getCurrentUser(request.getSession());\n \t\n \tUserBean userBean = new UserBean();\n \tuserBean.setFirstName(account.getGivenName());\n \tuserBean.setLastName(account.getSurname());\n \tString phoneNumber = \"\";\n \tif (account.getCustomData().get(\"phoneNumber\") != null) {\n \t\tphoneNumber = account.getCustomData().get(\"phoneNumber\").toString();\n \t}\n \tuserBean.setPhoneNumber(phoneNumber);\n \tString phoneCarrier = \"\";\n \tif (account.getCustomData().get(\"phoneCarrier\") != null) {\n \t\tphoneCarrier = account.getCustomData().get(\"phoneCarrier\").toString();\n \t}\n \tuserBean.setPhoneCarrier(phoneCarrier);\n \tString uniqueId = \"\";\n \tif (account.getCustomData().get(\"uniqueId\") != null) {\n \t\tuniqueId = account.getCustomData().get(\"uniqueId\").toString();\n \t}\n \tuserBean.setUniqueId(uniqueId);\n \t\n \treturn userBean;\n\t}", "private void initObjects() {\n listUsers = new ArrayList<>();\n usersRecyclerAdapter = new UsersRecyclerAdapter(listUsers,UsersListActivity.this);\n RecyclerView.LayoutManager mLayoutManager = new LinearLayoutManager(getApplicationContext());\n recyclerViewUsers.setLayoutManager(mLayoutManager);\n recyclerViewUsers.setItemAnimator(new DefaultItemAnimator());\n recyclerViewUsers.setHasFixedSize(true);\n recyclerViewUsers.setAdapter(usersRecyclerAdapter);\n\n databaseHelper = new HomeDatabaseHelper(activity);\n Intent extras = getIntent();\n emailFromIntent = extras.getStringExtra(\"EMAIL\");\n textViewRole = this.findViewById(R.id.textViewName);\n textViewRole.setText(emailFromIntent);\n getDataFromSQLite();\n }", "public UserView() {\n initComponents();\n new UserDaoImp().createTable();\n displayDataIntoTable();\n displayDataAtComboBox();\n\n }", "public User() {\n roles = new HashSet<>();\n favorites = new HashSet<>();\n estimates = new HashSet<>();\n }" ]
[ "0.64958686", "0.6372979", "0.613504", "0.59331816", "0.5868309", "0.584865", "0.57636315", "0.57430106", "0.5668942", "0.5653913", "0.56355894", "0.5555834", "0.55503", "0.55446863", "0.5544628", "0.5543505", "0.55208856", "0.55063397", "0.54714376", "0.54605514", "0.54422843", "0.5441664", "0.5424671", "0.5422734", "0.5410155", "0.5407466", "0.5397425", "0.5382253", "0.53821355", "0.5370411", "0.53660166", "0.5364591", "0.53633416", "0.5349937", "0.5335542", "0.5329543", "0.532689", "0.5319689", "0.5308397", "0.5302301", "0.5297441", "0.5290854", "0.52886903", "0.52848613", "0.52600026", "0.5238689", "0.52307963", "0.5229689", "0.5219713", "0.52196896", "0.52190113", "0.52186835", "0.52092046", "0.5195646", "0.51943874", "0.519385", "0.51863694", "0.5182761", "0.5179069", "0.5177479", "0.5175417", "0.517449", "0.5165662", "0.51552224", "0.5153565", "0.5149522", "0.5144311", "0.5142112", "0.513993", "0.5131451", "0.5129148", "0.5125003", "0.5108189", "0.5087275", "0.5076988", "0.5075469", "0.5075469", "0.50724953", "0.5069559", "0.5069191", "0.5068301", "0.5067368", "0.5066819", "0.506448", "0.50585926", "0.5057245", "0.5056382", "0.5055233", "0.50552046", "0.50543964", "0.50525045", "0.5050587", "0.5048284", "0.503741", "0.5033819", "0.50291777", "0.50276995", "0.50244635", "0.5020048", "0.501884" ]
0.66203827
0
TODO Autogenerated method stub
@Override public void widgetSelected(SelectionEvent arg0) { System.out.println("新增用户"); InputDialog id1=new InputDialog(sShell,"新增用户","输入用户信息,用空格分开,例如:pdl 666 管理员","",null); if(id1.open()==0){ input=id1.getValue(); if(input.equals("")) return; } else return; String str[]=input.split(" "); CommonADO ado=CommonADO.getCommonADO(); String sql="insert into Users values('"+str[0]+"','"+str[1]+"','"+str[2]+"')"; ado.executeUpdate(sql); showUser(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
TODO Autogenerated method stub
@Override public void widgetDefaultSelected(SelectionEvent arg0) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
TODO Autogenerated method stub
@Override public void widgetSelected(SelectionEvent arg0) { InputDialog id1=new InputDialog(sShell,"删除用户","输入用户名","",null); if(id1.open()==0){ input=id1.getValue(); if(input.equals("")) return; } else return; CommonADO ado=CommonADO.getCommonADO(); String sql="delete from Users where UserName='"+input+"'"; ado.executeUpdate(sql); showUser(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
TODO Autogenerated method stub
@Override public void widgetDefaultSelected(SelectionEvent arg0) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "private stendhal() {\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.66708666", "0.65675074", "0.65229905", "0.6481001", "0.64770633", "0.64584893", "0.6413091", "0.63764185", "0.6275735", "0.62541914", "0.6236919", "0.6223816", "0.62017626", "0.61944294", "0.61944294", "0.61920846", "0.61867654", "0.6173323", "0.61328775", "0.61276996", "0.6080555", "0.6076938", "0.6041293", "0.6024541", "0.6019185", "0.5998426", "0.5967487", "0.5967487", "0.5964935", "0.59489644", "0.59404725", "0.5922823", "0.5908894", "0.5903041", "0.5893847", "0.5885641", "0.5883141", "0.586924", "0.5856793", "0.58503157", "0.58464456", "0.5823378", "0.5809384", "0.58089525", "0.58065355", "0.58065355", "0.5800514", "0.57912874", "0.57912874", "0.57912874", "0.57912874", "0.57912874", "0.57912874", "0.57896614", "0.5789486", "0.5786597", "0.5783299", "0.5783299", "0.5773351", "0.5773351", "0.5773351", "0.5773351", "0.5773351", "0.5760369", "0.5758614", "0.5758614", "0.574912", "0.574912", "0.574912", "0.57482654", "0.5732775", "0.5732775", "0.5732775", "0.57207066", "0.57149917", "0.5714821", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57115865", "0.57045746", "0.5699", "0.5696016", "0.5687285", "0.5677473", "0.5673346", "0.56716853", "0.56688815", "0.5661065", "0.5657898", "0.5654782", "0.5654782", "0.5654782", "0.5654563", "0.56536144", "0.5652585", "0.5649566" ]
0.0
-1
TODO Autogenerated method stub
private void showUser() { CommonADO ado=CommonADO.getCommonADO(); String sql="select * from Users"; ResultSet rs=ado.executeSelect(sql); String str=""; try { while(rs.next()){ String user=rs.getString("UserName"); String pass=rs.getString("Password"); String type=rs.getString("UserType"); if(type.equals("管理员")) pass="******"; if(user.length()<12){ for(int i=user.length();i<=12;i++) user+=" "; } if(pass.length()<12){ for(int i=pass.length();i<=12;i++) pass+=" "; } if(type.length()<12){ for(int i=type.length();i<=12;i++) type+=" "; } str+="用户名:"+user; str+=" 密码:"+pass; str+=" 用户类型:"+type+"\n"; } } catch (SQLException e) { // TODO Auto-generated catch block e.printStackTrace(); } textAreaUser.setText(str); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
This method initializes compositeGoodsShow
private void createCompositeGoodsShow() { GridData gridData4 = new GridData(); gridData4.grabExcessHorizontalSpace = true; gridData4.horizontalSpan = 3; gridData4.heightHint = 380; gridData4.widthHint = 560; gridData4.grabExcessVerticalSpace = true; GridLayout gridLayout3 = new GridLayout(); gridLayout3.numColumns = 3; compositeGoodsShow = new Composite(compositeGoodsMange, SWT.NONE); compositeGoodsShow.setLayout(gridLayout3); compositeGoodsShow.setLayoutData(gridData4); displayRoom(compositeGoodsShow); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public shopbybrands() {\n initComponents();\n }", "private void initialize() {\r\n this.setSize(new Dimension(800,600));\r\n this.setContentPane(getJPanel());\r\n\r\n List<String> title = new ArrayList<String>();\r\n title.add(\"Select\");\r\n title.add(\"Field Id\");\r\n title.add(\"Field Name\");\r\n title.add(\"Field Type\");\r\n title.add(\"Image\");\r\n\r\n List<JComponent> componentList = new ArrayList<JComponent>();\r\n componentList.add(checkInit);\r\n componentList.add(fieldIdInit);\r\n componentList.add(filedNameInit);\r\n componentList.add(fieldTypeInit);\r\n componentList.add(imageButton);\r\n\r\n String []arrColumn = {\"SELECT\", \"FIELD_ID\", \"FIELD_NAME\", \"FIELD_TYPE\", \"FIELD_VALUE\"};\r\n String []arrTitle = {\"SELECT\", \"FIELD_ID\", \"FIELD_NAME\", \"FIELD_TYPE\", \"FIELD_VALUE\"};\r\n // init grid\r\n grid = new GridUtils(pageSheet, title, componentList, arrColumn, preButton, afterButton, 5, arrTitle);\r\n // set title\r\n grid.setPageInfo(pageInfoLbl);\r\n \r\n searchDetailList();\r\n \r\n initComboBox();\r\n \r\n setTitle(\"Page Select page\");\r\n\t}", "public ProductoAbm() {\n initComponents();\n }", "private void initShowData() {\n /*\n 测试数据\n */\n todayClass.add(new ClassBean(\"操作系统\",\"思源208\",\"邢薇薇\",\"10:00-12:00\"));\n todayClass.add(new ClassBean(\"数据库\",\"逸夫708\",\"王方石\",\"14:00-16:00\"));\n\n nowClass.add(new ClassBean(\"移动应用开发\",\"逸夫513\",\"曾立刚\",\"10:00-12:00\"));\n\n\n\n// if(showList!=null) {\n// showList.clear();\n//// showList.addAll(DBManager.getInstance().getInfoList());\n// }\n }", "public AppliancesInfo() {\n initComponents(); \n }", "public product() {\n initComponents();\n }", "private void initProductDisplay() {\n\t\tif (isScannednAddingFinished()) {\n\t\t\tarticleInqList = new ArrayList<ArticleInq>();\n\t\t\tarticleImageList = new ArrayList<ArticleImage>();\n\t\t}\n\t\tif (isBasketAddingFinished()\n\t\t\t\t&& (CommonBasketValues.getInstance().Basket == null || CommonBasketValues\n\t\t\t\t\t\t.getInstance().Basket.OrderNo == 0)) {\n\t\t\tdisplayArticleList = new ArrayList<ArticleInq>();\n\n\t\t}\n\n\t\tlastScanTime = 0;\n\t\tlastEan = \"\";\n\t\tcurrentEan = \"\";\n\t\tif (light_on) {\n//\t\t\tCameraManager.get().turn_onFlash();\n\t\t\tgetCameraManager().setTorch(true);\n\t\t}\n\t\tif (calledFromCreate) {\n//\t\t\tCameraManager.get().requestAutoFocus(handler, R.id.auto_focus);\n\t\t\tcalledFromCreate = false;\n\t\t}\n\n\t}", "private void createCompositeGoodsMange() {\r\n\t\tGridLayout gridLayout = new GridLayout();\r\n\t\tgridLayout.numColumns = 3;\r\n\t\tcompositeGoodsMange = new Composite(tabFolder, SWT.NONE);\r\n\t\tcompositeGoodsMange.setLayout(gridLayout);\r\n\t\tcompositeGoodsMange.setSize(new Point(500, 400));\r\n\t\t\r\n\t\tbuttonAddGoods = new Button(compositeGoodsMange, SWT.NONE);\r\n\t\tbuttonAddGoods.setText(\"增加商品\");\r\n\t\tbuttonAddGoods.addSelectionListener(new SelectionListener() {\r\n\t\t\t\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent arg0) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\tInputDialog id1=new InputDialog(sShell,\"新增商品\",\"输入商品信息,用空格分开,例如:001 方便面 6.8\",\"\",null);\r\n\t\t\t\tif(id1.open()==0){\r\n\t\t\t\t\tinput=id1.getValue();\r\n\t\t\t\t\tif(input.equals(\"\")) return;\r\n\t\t\t\t}\r\n\t\t\t\telse return;\r\n\t\t\t\tString str[]=input.split(\" \");\r\n\t\t\t\tCommonADO ado=CommonADO.getCommonADO();\r\n\t\t\t\tString sql=\"insert into Goods values('\"+str[0]+\"','\"+str[1]+\"','\"+str[2]+\"')\";\r\n\t\t\t\tado.executeUpdate(sql);\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tcompositeGoodsShow.dispose();\t\t\t\t\r\n\t\t\t\tcreateCompositeGoodsShow();\r\n\t\t\t\t\r\n\t\t\t\tcompositeGoodsMange.layout(true);\r\n\t\t\t\t//compositeGoodsShow.layout(true);\r\n\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetDefaultSelected(SelectionEvent arg0) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t});\r\n\t\tlabel = new Label(compositeGoodsMange, SWT.NONE);\r\n\t\tlabel.setText(\" \");\r\n\t\tbuttonDeleteGoods = new Button(compositeGoodsMange, SWT.NONE);\r\n\t\tbuttonDeleteGoods.setText(\"删除商品\");\r\n\t\tbuttonDeleteGoods.addSelectionListener(new SelectionListener() {\r\n\t\t\t\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent arg0) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\tInputDialog id1=new InputDialog(sShell,\"删除商品\",\"输入商品编号\",\"\",null);\r\n\t\t\t\tif(id1.open()==0){\r\n\t\t\t\t\tinput=id1.getValue();\r\n\t\t\t\t\tif(input.equals(\"\")) return;\r\n\t\t\t\t}\r\n\t\t\t\telse return;\r\n\t\t\t\t\r\n\t\t\t\tCommonADO ado=CommonADO.getCommonADO();\r\n\t\t\t\tString sql=\"delete from Goods where GoodsNo='\"+input+\"'\";\r\n\t\t\t\tado.executeUpdate(sql);\r\n\t\t\t\t//createCompositeGoodsShow();\r\n\t\t\t\tcompositeGoodsShow.dispose();\t\t\t\t\r\n\t\t\t\tcreateCompositeGoodsShow();\r\n\t\t\t\t\r\n\t\t\t\tcompositeGoodsMange.layout(true);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetDefaultSelected(SelectionEvent arg0) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t});\r\n\t\tcreateCompositeGoodsShow();\r\n\t}", "@Override\n public void initialize(URL url, ResourceBundle rb) {\n showPromotion();\n showCombo();\n showComboPart();\n \n }", "public FrmBillDisplay() {\n initComponents();\n }", "private void initComponents() {\n\t\tfiltersPanel = new FiltersPanel(mainView);\n\t\tdetailsPanel = new DetailsPanel();\n\t\t\n\t\tthis.setStylePrimaryName(\"variantdisplay\");\n\t\tthis.addWest(filtersPanel, 240);\n\n\t\tvarTable = new VarTable(this, colModel);\n\n\t\t\n\t\t//details panel listens to variant selection events generated by the varTable\n\t\tvarTable.addVariantSelectionListener(detailsPanel); \n\t\tvarManager.addListener(this);\n\t\tcolModel.addListener(this);\n\t\tfiltersPanel.addListener(this);\n\t\t\n\t\tthis.addSouth(detailsPanel, 300.0);\n\t\tthis.add(varTable);\n\t}", "private void init() {\n dao = new ProductDAO();\n model = new DefaultTableModel();\n \n try {\n showAll();\n } catch (SQLException ex) {\n ex.printStackTrace();\n }\n \n }", "public ExpensesCatagories() {\n initComponents();\n //MySqlConnection1();\n fillTabel();\n }", "public EOProductPanel2() {\n initComponents();\n }", "public ViewProductInfo() {\n initComponents();\n }", "public companyDetails() {\n initComponents();\n showTableData();\n }", "private ProductCatalog() {\n catalogPresenter = new CatalogPresenter(new CatalogRepositoryDb(), this);\n initComponents();\n fillComboBoxes();\n pagesTextField.setText(String.valueOf(currentPage));\n previousPageButton.setEnabled(false);\n setupTable();\n disableButons();\n catalogPresenter.getCategoriesFromDb();\n addRowSelectionListener();\n setupSearchTextFields();\n lockLowerDate();\n }", "public FullDetails() {\n initComponents();\n }", "public void init() {\n initComponents();\n initData();\n }", "public CadastrarProduto() {\n initComponents();\n }", "private void init() {\n List<Contructor> list = servisContructor.getAllContructors();\n for (Contructor prod : list) {\n contructor.add(new ContructorViewer(prod));\n }\n\n Label label = new Label(\"Catalog Contructors\");\n label.setLayoutX(140);\n label.setLayoutY(20);\n label.setStyle(\"-fx-font-size:20px\");\n\n initTable();\n table.setLayoutX(120);\n table.setLayoutY(60);\n table.setStyle(\"-fx-font-size:16px\");\n\n GridPane control = new ControlPanel(this, 2).getPanel();\n control.setLayoutX(120);\n control.setLayoutY(300);\n\n panel.setAlignment(Pos.CENTER);\n panel.add(label, 0, 0);\n panel.add(table, 0, 1);\n panel.add(control, 0, 2);\n }", "public Supplier() {\n initComponents();\n con = DBconnect.connect();\n \n \n getTableDetails();\n \n \n \n }", "private void initMyComponents() {\n this.jPanel1.setLayout(new BoxLayout(this.jPanel1, BoxLayout.Y_AXIS));\n this.jPanel1.add(controller.getPressureController().getEMeasureBasicView());\n this.jPanel1.add(controller.getTemperatureController().getEMeasureBasicView());\n this.controller.getPressureController().getListeners().add(this);\n this.controller.getTemperatureController().getListeners().add(this);\n this.jComboBox1.setModel(new DefaultComboBoxModel(FluidKind.values()));\n this.changeResponce();\n }", "public AdmAddProduct() {\n initComponents();\n }", "public beranda() {\n initComponents();\n koneksi DB = new koneksi();\n DB.config();\n con = DB.con;\n st = DB.stm;\n ShowDataStore();\n ShowPermintaanStore();\n ShowPermintaanGudang();\n ShowDataStoreKurang15();\n }", "public ItemPro() {\n initComponents();\n comboFill();\n }", "public FrmCatalogo() {\n initComponents();\n rdCd.setSelected(true);\n this.setLocationRelativeTo(null);\n volumes = new ArrayList<>();\n }", "@Override\n public void initialize(URL url, ResourceBundle rb) {\n selectedProduct = MainScreenController.getProductToModify();\n assocParts = selectedProduct.getAllAssociatedParts();\n\n partIdColumn.setCellValueFactory(new PropertyValueFactory<>(\"id\"));\n partNameColumn.setCellValueFactory(new PropertyValueFactory<>(\"name\"));\n partInventoryColumn.setCellValueFactory(new PropertyValueFactory<>(\"stock\"));\n partPriceColumn.setCellValueFactory(new PropertyValueFactory<>(\"price\"));\n partTableView.setItems(Inventory.getAllParts());\n\n assocPartIdColumn.setCellValueFactory(new PropertyValueFactory<>(\"id\"));\n assocPartNameColumn.setCellValueFactory(new PropertyValueFactory<>(\"name\"));\n assocPartInventoryColumn.setCellValueFactory(new PropertyValueFactory<>(\"stock\"));\n assocPartPriceColumn.setCellValueFactory(new PropertyValueFactory<>(\"price\"));\n assocPartTableView.setItems(assocParts);\n\n productIdText.setText(String.valueOf(selectedProduct.getId()));\n productNameText.setText(selectedProduct.getName());\n productInventoryText.setText(String.valueOf(selectedProduct.getStock()));\n productPriceText.setText(String.valueOf(selectedProduct.getPrice()));\n productMaxText.setText(String.valueOf(selectedProduct.getMax()));\n productMinText.setText(String.valueOf(selectedProduct.getMin()));\n }", "public ViewStockDetailsJPanel(ArrayList<StockDetails> listStockDetailses, ResourceBundle bundle) {\n initComponents();\n this.bundle = bundle;\n stockDetailsTableModel = (DefaultTableModel) jtbViewStockDetails.getModel();\n addColumnTable();\n this.setDefaultCloseOperation(DISPOSE_ON_CLOSE);\n for (StockDetails sd : listStockDetailses) {\n stockDetailsTableModel.addRow(new Object[]{\n sd.getStockId(), sd.getStockDetailsId(), sd.getProductCode(), sd.getQuantity()\n });\n }\n setUpUILanguage();\n }", "public ConsultaEquipo() {\n initComponents();\n }", "public Store() {\n initComponents();\n selectData();\n cbAddress();\n setTanggal();\n }", "private void initialize() {\nproductCatalog.add(new ProductStockPair(new Product(100.0, \"SYSC2004\", 0), 76));\nproductCatalog.add(new ProductStockPair(new Product(55.0, \"SYSC4906\", 1), 0));\nproductCatalog.add(new ProductStockPair(new Product(45.0, \"SYSC2006\", 2), 32));\nproductCatalog.add(new ProductStockPair(new Product(35.0, \"MUSI1001\", 3), 3));\nproductCatalog.add(new ProductStockPair(new Product(0.01, \"CRCJ1000\", 4), 12));\nproductCatalog.add(new ProductStockPair(new Product(25.0, \"ELEC4705\", 5), 132));\nproductCatalog.add(new ProductStockPair(new Product(145.0, \"SYSC4907\", 6), 322));\n}", "public Display() {\n initComponents();\n }", "public ViewPropertyDetails(Property property) {\n initComponents();\n this.setTitle(\"Property Details\");\n this.property = property;\n customer = property.getCustomer();\n block = property.getBlock();\n type = property.getType();\n filter = property.getFilter();\n images = property.getImages();\n services = property.getServices();\n characteristics = property.getCharacteristics();\n lblBlock.setText(block.getBlockName());\n lblCustomerName.setText(customer.getName());\n SimpleDateFormat sdfDate = new SimpleDateFormat(\"yyyy-MM-dd\");//dd/MM/yyyy\n lblDateOfArrival.setText(sdfDate.format(property.getDateOfEntry()));\n lblDateOfOwnership.setText(sdfDate.format(property.getDateOfOwnerShip()));\n lblDemand.setText(\"\" + property.getDemand());\n lblLoadShed.setText(\"\" + block.getNoOfHourOfLoadShed());\n lblNoOfRooms.setText(\"\" + property.getNoOfRooms());\n lblPropertyFor.setText(filter.getFilterName());\n lblSize.setText(\"\" + property.getSize());\n lblType.setText(type.getTypeName());\n txtAddress.setText(property.getAddress());\n txtAgreement.setText(property.getAgreement());\n String str = \"\";\n for (int i = 0; i < services.size(); i++) {\n str += services.get(i).getServiceName() + \"\\n\";\n }\n txtServices.setText(str);\n DefaultTableModel model = (DefaultTableModel) tblCharacteristics.getModel();\n PropertyCharacteristic characteristic;\n for (int i = 0; i < characteristics.size(); i++) {\n characteristic = characteristics.get(i);\n model.insertRow(tblCharacteristics.getRowCount(), new Object[]{characteristic.getCharacteristicName(), characteristic.getQuantity()});\n }\n tblCharacteristics.setModel(model);\n model = (DefaultTableModel) tblImages.getModel();\n for (int i = 0; i < images.size(); i++) {\n model.insertRow(tblImages.getRowCount(), new Object[]{images.get(i)});\n }\n tblImages.setModel(model);\n }", "public bookDetails() {\n initComponents();\n }", "public BillPopup() {\n initComponents();\n }", "public ElectronicsPage() {\n initComponents();\n }", "public ProductCreate() {\n initComponents();\n }", "public void init(){\n List<Order> orders=DA.getAll();\n ordersList.setPageFactory((Integer pageIndex)->pageController.createPage(pageIndex));\n ordersList.setPageCount(orders.size()/10);\n pageController.setOrders(orders);\n //dataController=new DataController(DA);\n dataController.setDA(DA);\n dataController.setDataBox(data);\n dataController.setInfoList(DA.getData());\n dataController.initBarChart();\n\n }", "@PostConstruct\r\n public void init() {\r\n isShow = false;\r\n externalContext = FacesContext.getCurrentInstance().getExternalContext();\r\n dateCreate = new Date();\r\n pieModel = new PieChartModel();\r\n AllCategory = categoryF.findAll();\r\n AllGroups = groupsF.findAll();\r\n listChooseCategory = new int[AllCategory.size()];\r\n listChooseGroups = new int[AllGroups.size()];\r\n lengthOfLCC = 0;\r\n inputBranchID = 0;\r\n hmNameValue = new HashMap<String, Long>();\r\n pieModel.setTitle(\"Category Stats\");\r\n pieModel.setShowDataLabels(true);\r\n pieModel.setLegendPosition(\"w\");\r\n //autoset\r\n {\r\n firstDate = new Date();\r\n secondDate = new Date();\r\n DateFormat formatter = new SimpleDateFormat(\"dd/MM/yyyy\");\r\n Calendar calendarStartOfDate = Calendar.getInstance();\r\n calendarStartOfDate.setTime(firstDate);\r\n calendarStartOfDate.add(Calendar.MONTH, -1);\r\n calendarStartOfDate.set(Calendar.HOUR_OF_DAY, 0);\r\n calendarStartOfDate.set(Calendar.MINUTE, 0);\r\n calendarStartOfDate.set(Calendar.SECOND, 0);\r\n firstDate = calendarStartOfDate.getTime();\r\n //autosetListChoose\r\n listChooseCategory = new int[]{1, 2, 3, 4, 5, 6};\r\n //autosetyptreport\r\n typeReport = \"system\";\r\n if (typeReport.equalsIgnoreCase(\"branch\")) {\r\n //auto set id\r\n inputBranchID = 1100;\r\n branch = branchF.find(inputBranchID);\r\n }\r\n typeOutput=\"cate\";\r\n typeCalculator=\"no\";\r\n }\r\n }", "public ImageDataSetVisualPanel3() {\n initComponents();\n fillComboBox();\n }", "private void initialiseController() \r\n {\r\n defaultVectors();\r\n if(grantsByPIForm == null) \r\n {\r\n grantsByPIForm = new GrantsByPIForm(); //(Component) parent,modal);\r\n }\r\n grantsByPIForm.descriptionLabel.setText(UnitName);\r\n grantsByPIForm.descriptionLabel.setFont(new Font(\"SansSerif\",Font.BOLD,14));\r\n queryEngine = QueryEngine.getInstance();\r\n coeusMessageResources = CoeusMessageResources.getInstance();\r\n registerComponents();\r\n try {\r\n setFormData(null);\r\n }\r\n catch(Exception e) {\r\n e.printStackTrace(System.out);\r\n }\r\n }", "public ViewGadai() {\n initComponents();\n gc = new GadaiController();\n datas= gc.bindingAll(TBLGadai, header);\n gc.loadCustomer(cmbCust);\n gc.loadBarang(cmbBrg);\n// gc.loadHistory(cmbStatus);\n reset();\n }", "public DetalleProducto() {\n initComponents();\n }", "private void init() {\n try {\n renderer = new TableNameRenderer(tableHome);\n if (listId != null) {\n model = new DefaultComboBoxModel(listId);\n }\n else {\n Object[] idList = renderer.getTableIdList(step, extraTableRef);\n model = new DefaultComboBoxModel(idList);\n }\n setRenderer(renderer);\n setModel(model);\n }\n catch (PersistenceException ex) {\n ex.printStackTrace();\n }\n }", "public ShowDetails() {\n initComponents();\n }", "public JPanel importgoods()\n\t{\n\t\ttry {\n\t\t\thandler =(GoodsControllerInterface) Naming.lookup(Configure.GoodsController);\n\t\t\tgoodsVec = handler.getAllGoods();\n\t\t\tStoreHouseControllerInterface storeHouseService = (StoreHouseControllerInterface) Naming.lookup(Configure.StoreHouseController);\n\t\t\tstoreHouseList = storeHouseService.getAll();\n\t\t\tportInService = (PortControllerInterface) Naming.lookup(Configure.PortInController);\n\t\t} catch (MalformedURLException | RemoteException | NotBoundException e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te1.printStackTrace();\n\t\t\tCommonUtil.showError(\"网络错误\");\n\t\t\treturn null;\n\t\t}\n\t\tJPanel panel = new JPanel();\n\t\t\n\t\tJPanel panel1 = new JPanel();\n\t\tJLabel ID_importlable = new JLabel(\"进货票号:\");\n\t\tID_importtextField = new JTextField(10);\n\t\tJLabel priceLabel = new JLabel(\"进货单价:\");\n\t\tpriceField = new JTextField(10); \n\t\tJLabel numberLabel = new JLabel(\"数量:\");\n\t\tnumberField = new JTextField(10);\n\t\tJLabel customerLabel = new JLabel(\"供应商:\");\n\t\tcustomerField = new JTextField(10);\n\t\tcustomerButton = new JButton(\"...\");\n\t\tcustomerButton.setSize(5, 5);\n\t\tpanel1.add(ID_importlable);\n\t\tpanel1.add(ID_importtextField);\n\t\tpanel1.add(priceLabel);\n\t\tpanel1.add(priceField);\n\t\tpanel1.add(numberLabel);\n\t\tpanel1.add(numberField);\n\t\tpanel1.add(customerLabel);\n\t\tpanel1.add(customerField);\n\t\tpanel1.add(customerButton);\n\t\t\n\t\t\n\t\tJPanel panel2 = new JPanel();\n\t\tJLabel paytypeLabel = new JLabel(\"仓库选择:\");\n\t\tstoreHouseComboBox = new JComboBox();\n\t\tstoreHouseComboBox.setModel(new javax.swing.DefaultComboBoxModel(storeHouseList.toArray()));\n\t\tJLabel importtimeLabel = new JLabel(\"进货时间:\");\n\t\timporttimeField = new JTextField(10);\t\n\t\tJLabel opreaterLabel = new JLabel(\"操作员:\");\n\t\toperaterField = new JTextField(10);\n\t\tpanel2.add(paytypeLabel);\n\t\tpanel2.add(storeHouseComboBox);\n\t\tpanel2.add(importtimeLabel);\n\t\tpanel2.add(importtimeField);\n\t\tpanel2.add(opreaterLabel);\n\t\tpanel2.add(operaterField);\n\t\t\n\t\tJPanel panel3 = new JPanel();\n\t\tgoodScrollPane = new JScrollPane();\n\n\t\t\n\t\tgoodsTable = CommonUtil.createTable(goodsColumns,goodsVec.toArray(),goodsFields);\n\t\t//表格行改变时发生的事件\n\t\tgoodsTable.getSelectionModel().addListSelectionListener(new ListSelectionListener()\n\t\t{\n\t\t\t@Override\n\t\t\tpublic void valueChanged(ListSelectionEvent e)\n\t\t\t{\n\t\t\t\tListSelectionModel model = (ListSelectionModel)e.getSource();\n\t\t\t\tint index = model.getMaxSelectionIndex();\n\t\t\t\tif(index>=0 && goodsVec!=null &&index<goodsVec.size()){\n\t\t\t\t\tselectedGoods = goodsVec.get(index);\n\t\t\t\t\tgoodsField.setText(selectedGoods.getProductCode());\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\t\n\t\t\n\t\tgoodsTable.setPreferredScrollableViewportSize(new Dimension(screenSize.width * 2 / 3-60,\n\t\t\t\tscreenSize.height / 8));\n\t\tgoodScrollPane.setViewportView(goodsTable);\n\t\tpanel3.add(goodScrollPane);\n\t\t\n\t\tJPanel panelSearch = new JPanel();\n\t\tJLabel goodsNameLabel = new JLabel(\"商品名称:\");\n\t\tgoodsNameField = new JTextField(10);\n\t\t\n\t\tJButton searchButton = new JButton(\"查询\");\n\t\tsearchButton.addActionListener(new ActionListener()\n\t\t{\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e)\n\t\t\t{\n\t\t\t\ttry {\n\t\t\t\t\tString goodsName = goodsNameField.getText();\n//\t\t\t\t\tif(goodsName.length()==0){\n//\t\t\t\t\t\tJOptionPane.showMessageDialog(null,\"请输入查询商品的名称\",\"警告\",JOptionPane.WARNING_MESSAGE);\n//\t\t\t\t\t\treturn;\n//\t\t\t\t\t}\t\n\t\t\t\t\tgoodsVec = handler.getAllGoodsByGoodsName(goodsName);\n\t\t\t\t\tCommonUtil.updateJTable(goodsTable, goodsColumns, goodsVec.toArray(), goodsFields);\n\t\t\t\t} catch (RemoteException e1) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t\tCommonUtil.showError(\"网络错误\");\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tpanelSearch.add(goodsNameLabel);\n\t\tpanelSearch.add(goodsNameField);\n\t\tpanelSearch.add(searchButton);\n//\t\tJScrollPane goodScrollPane = new JScrollPane();\n//\n//\t\tfinal JTable goodsTable = new JTable(new MyTableModel());\n//\t\t//表格行改变时发生的事件\n//\t\tgoodsTable.getSelectionModel().addListSelectionListener(new ListSelectionListener()\n//\t\t{\n//\t\t\tpublic void valueChanged(ListSelectionEvent e)\n//\t\t\t{\n//\t\t\t\tListSelectionModel model = (ListSelectionModel)e.getSource();\n//\t\t\t\tint index = model.getMaxSelectionIndex();\n//\t\t\t\tgoodsField.setText(goodsTable.getValueAt(index, 0).toString());\n//\t\t\t\tgoodsPrices=Double.valueOf(goodsTable.getValueAt(index, 8).toString());\n//\t\t\t}\n//\t\t});\n//\t\t\n//\t\t\n//\t\tgoodsTable.setPreferredScrollableViewportSize(new Dimension(screenSize.width * 2 / 3-60,\n//\t\t\t\tscreenSize.height / 3));\n//\t\tgoodScrollPane.setViewportView(goodsTable);\n//\t\tpanel3.add(goodScrollPane);\n\t\t\n\t\tJPanel panel4 = new JPanel();\n\t\tJLabel goodsLabel = new JLabel(\"商品编号:\");\n\t\tgoodsField = new JTextField(10);\n\t\tJLabel explainLabel = new JLabel(\"商品注释:\");\n\t\texplainField = new JTextField(20);\n\t\t\n\t\tJButton addButton = new JButton(\"添加\");\n\t\taddButton.addActionListener(new ActionListener()\n\t\t{\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e)\n\t\t\t{\n\t\t\t\tDate date=new Date();\n\t\t\t\tSimpleDateFormat formate=new SimpleDateFormat(\"yyyyMMddHHmmss\");\n\t\t\t\tID_importtextField.setText(\"PI\"+formate.format(date));\n\t\t\t\tformate=new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\n\t\t\t\timporttimeField.setText(formate.format(date));\n\t\t\t\toperaterField.setText(MainFrame.username);\n\t\t\t\tnumberField.setText(\"\");\n\t\t\t\tsetEnableTrue();\n\t\t\t}\n\t\t});\n\t\tJButton inButton = new JButton(\"入库\");\n\t\tinButton.addActionListener(new ActionListener()\n\t\t{\n\t\t\t\n\t\t\tpublic void actionPerformed(ActionEvent e)\n\t\t\t{\n\t\t\t\tif(selectedGoods == null){\n\t\t\t\t\tCommonUtil.showError(\"请先选择一个商品\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tString inportID=ID_importtextField.getText();\n\t\t\t\tString numberStr=numberField.getText();\n\t\t\t\tint shId=((StoreHouse) storeHouseComboBox.getSelectedItem()).getId();\n\t\t\t\tString inportTime=importtimeField.getText();\n\t\t\t\tString operator=operaterField.getText();\n\t\t\t\tString goodsID=selectedGoods.getId();\n\t\t\t\tString comment=explainField.getText();\n\t\t\t\tdouble goodsPrice = 0;\n\t\t\t\tif(numberStr==null||numberStr.trim().length()==0)\n\t\t\t\t{\n\t\t\t\t\tJOptionPane.showMessageDialog(null,\"请输入商品数量\",\"警告\",JOptionPane.WARNING_MESSAGE);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tint number=0;\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tnumber=Integer.valueOf(numberStr);\n\t\t\t\t\tgoodsPrice = Double.valueOf(priceField.getText());\n\t\t\t\t}\n\t\t\t\tcatch (Exception ex)\n\t\t\t\t{\n\t\t\t\t\tJOptionPane.showMessageDialog(null,\"商品的数量和价格必须为数字\",\"警告\",JOptionPane.WARNING_MESSAGE);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tPortIn portIn=new PortIn(inportID,goodsID,shId,number,\n\t\t\t\t\t\t goodsPrice,inportTime,operator,comment,0);\n\t\t\t\t\n\t\t\t\ttry {\n\t\t\t\t\tif (portInService.addPortIn(portIn)!=null)\n\t\t\t\t\t{\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null,\"入货单添加成功\",\"警告\",JOptionPane.WARNING_MESSAGE);\n\t\t\t\t\t\tnumberField.setText(\"\");\n\t\t\t\t\t\tsetEnableFalse();\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null,\"入货单添加失败,请按要求输入数据\",\"警告\",JOptionPane.WARNING_MESSAGE);\t\n\t\t\t\t\t}\n\t\t\t\t} catch (HeadlessException | RemoteException e1) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t\tCommonUtil.showError(\"网络错误\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t});\n\t\t\n\t\tsetEnableFalse(); \n\t\tpanel4.add(goodsLabel);\n\t\tpanel4.add(goodsField);\n\t\tpanel4.add(explainLabel);\n\t\tpanel4.add(explainField);\n\t\tpanel4.add(addButton);\n\t\tpanel4.add(inButton);\n\t\tpanel.add(panel1);\n\t\tpanel.add(panel2);\n\t\tpanel.add(panelSearch);\n\t\tpanel.add(panel3);\n\t\tpanel.add(panel4);\n\t\treturn panel;\n\t}", "public Sales() {\n\n initComponents();\n //loadSales();\n fillComboTienda();\n fillComboTitulos();\n }", "public ViewBookings() {\n initComponents();\n showCBooking();\n showBookingH();\n \n }", "public FindGoodsByName() {\n initComponents();\n addAvailableGoods();\n }", "private void initComponent() {\n\t\tmlistview=(ClickLoadListview) findViewById(R.id.ListView_hidden_check);\n\t\tChemicals_directory_search=(CustomFAB) findViewById(R.id.company_hidden_search);\n\t\tChemicals_directory_search.setVisibility(View.GONE);\n\t\ttopbar_com_name=(TopBarView) findViewById(R.id.topbar_com_name);\n\t\tsearch_chemical_name=(SearchInfoView) findViewById(R.id.search_chemical_name);\n\t}", "public ConsultaMaterial() {\n initComponents();\n }", "public CadastroProdutoNew() {\n initComponents();\n }", "public SalesReportView() {\n initComponents();\n }", "public void init() {\r\n\t\tsetModel(new ProductTableModel());\r\n\t}", "public OnlineCon() {\n initComponents();\n fillcombo();\n }", "public ViewAllManufacturer() {\n initComponents();\n \n //Make the JFrame run in the center of the screen\n Dimension dim = Toolkit.getDefaultToolkit().getScreenSize();\n this.setLocation(dim.width/2-this.getSize().width/2, dim.height/2-this.getSize().height/2);\n \n try {\n //get database connectin\n connection = (Connection) DBConnection.getConnection();\n } catch (SQLException ex) {\n Logger.getLogger(addBrand.class.getName()).log(Level.SEVERE, null, ex);\n }\n \n loadAllManufacturesTable();\n }", "private void initializeScreenComponents() {\n fabmenu = findViewById(R.id.fabmenu);\n fab = findViewById(R.id.fab);\n noInternetImg = findViewById(R.id.noInternetImg);\n pullToRefresh = findViewById(R.id.pullToRefresh);\n String indicator = getIntent().getStringExtra(Constants.INDICATOR);\n avi = (AVLoadingIndicatorView) findViewById(R.id.avi);\n avi.setIndicator(indicator);\n recyclerView = (RecyclerView) findViewById(R.id.recyclerview);\n recyclerView.setLayoutManager(new LinearLayoutManagerWithSmoothScroller(this.getApplicationContext()));\n shopList = new ArrayList<>();\n gridLayout = new GridLayoutManager(this, 1);\n recyclerView.setLayoutManager(gridLayout);\n adapter = new ShopsInAreaAdapter(this, shopList);\n recyclerView.setAdapter(adapter);\n }", "public PromedioView() {\n initComponents();\n }", "public Product() { \n initComponents();\n table();\n \n }", "@Override public void initialize(URL url, ResourceBundle rb) {\n partTableView.setItems(Inventory.getAllParts());\n partIdCol.setCellValueFactory(new PropertyValueFactory<>(\"id\"));\n partInvCol.setCellValueFactory(new PropertyValueFactory<>(\"stock\"));\n partNameCol.setCellValueFactory(new PropertyValueFactory<>(\"name\"));\n partPriceCol.setCellValueFactory(new PropertyValueFactory<>(\"price\"));\n\n //initialize is called with every button action\n associatedPartIdCol.setCellValueFactory(new PropertyValueFactory<>(\"id\"));\n associatedPartInvCol.setCellValueFactory(new PropertyValueFactory<>(\"stock\"));\n associatedPartNameCol.setCellValueFactory(new PropertyValueFactory<>(\"name\"));\n associatedPartPriceCol.setCellValueFactory(new PropertyValueFactory<>(\"price\"));\n\n }", "@PostConstruct\r\n private void init() {\n this.ccTypes = new ArrayList<SelectItem>();\r\n this.ccTypes.add(new SelectItem(CreditCardType.CARD_A, getCCTypeLabel(CreditCardType.CARD_A)));\r\n this.ccTypes.add(new SelectItem(CreditCardType.CARD_B, getCCTypeLabel(CreditCardType.CARD_B)));\r\n\r\n // Initialize categories select items\r\n this.categories = new ArrayList<SelectItem>();\r\n this.categories.add(new SelectItem(\"cat_it\", getCategoryLabel(\"cat_it\")));\r\n this.categories.add(new SelectItem(\"cat_gr\", getCategoryLabel(\"cat_gr\")));\r\n this.categories.add(new SelectItem(\"cat_at\", getCategoryLabel(\"cat_at\")));\r\n this.categories.add(new SelectItem(\"cat_mx\", getCategoryLabel(\"cat_mx\")));\r\n }", "public New_Product() throws SQLException {\n initComponents();\n this.setLocationRelativeTo(null);\n setIconImage (new ImageIcon(getClass().getResource(\"../img/icono_app.png\")).getImage());\n \n con.AbrirConexion(); //ABRIR LA CONEXIÓN\n \n /**\n * Llamada al método combobox provider\n */\n \n String query = \"SELECT * FROM Providers\";\n ResultSet r;\n Statement s = con.getCon().createStatement(ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_UPDATABLE);\n r = s.executeQuery(query);\n \n DefaultComboBoxModel value = new DefaultComboBoxModel();\n while (r.next()) {\n value.addElement(r.getString(\"Name\"));\n }\n \n ComboBox_provider.setModel(value);\n \n /**\n * Llamada al método combobox category 2\n */\n \n String query2 = \"SELECT * FROM Categories\";\n ResultSet r2;\n Statement s2 = con.getCon().createStatement(ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_UPDATABLE);\n r2 = s2.executeQuery(query2);\n \n DefaultComboBoxModel value2 = new DefaultComboBoxModel();\n while (r2.next()) {\n value2.addElement(r2.getString(\"Name\"));\n }\n \n ComboBox_category.setModel(value2);\n \n /**\n * Llamada al método combobox trademark 3\n */\n \n String query3 = \"SELECT * FROM Trademarks\";\n ResultSet r3;\n Statement s3 = con.getCon().createStatement(ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_UPDATABLE);\n r3 = s3.executeQuery(query3);\n \n DefaultComboBoxModel value3 = new DefaultComboBoxModel();\n while (r3.next()) {\n value3.addElement(r3.getString(\"Name\"));\n }\n \n ComboBox_trademark.setModel(value3);\n \n /**\n * Llamada al método combobox sizes 4\n */\n \n String query4 = \"SELECT * FROM Sizes\";\n ResultSet r4;\n Statement s4 = con.getCon().createStatement(ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_UPDATABLE);\n r4 = s4.executeQuery(query4);\n \n DefaultComboBoxModel value4 = new DefaultComboBoxModel();\n while (r4.next()) {\n value4.addElement(r4.getString(\"Name\"));\n }\n \n ComboBox_size.setModel(value4);\n \n /**\n * Llamada al método combobox colors 5\n */\n \n String query5 = \"SELECT * FROM Colors\";\n ResultSet r5;\n Statement s5 = con.getCon().createStatement(ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_UPDATABLE);\n r5 = s5.executeQuery(query5);\n \n DefaultComboBoxModel value5 = new DefaultComboBoxModel();\n while (r5.next()) {\n value5.addElement(r5.getString(\"Name\"));\n }\n \n ComboBox_color.setModel(value5);\n \n /**\n * Llamada al método combobox material 6\n */\n \n String query6 = \"SELECT * FROM Materials\";\n ResultSet r6;\n Statement s6 = con.getCon().createStatement(ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_UPDATABLE);\n r6 = s6.executeQuery(query6);\n \n DefaultComboBoxModel value6 = new DefaultComboBoxModel();\n while (r6.next()) {\n value6.addElement(r6.getString(\"Name\"));\n }\n \n ComboBox_material.setModel(value6);\n \n }", "public CustomerSummary() {\n initComponents();\n }", "CreateNewCustomerJPanel(JPanel userProcessContainer, Business business, SalesPerson salesPerson) {\n initComponents();\n this.userProcessContainer=userProcessContainer;\n this.business=business;\n this.salesPerson=salesPerson;//To change body of generated methods, choose Tools | Templates.\n \n comboMarket.removeAllItems();\n for(Market market: business.getBusiness_MarketList().getMarketList()){\n comboMarket.addItem(market);\n }\n }", "public PRODUCT_REPORT() {\n initComponents();\n date();\n time();\n table();\n \n pnn2.setEditable(false);\n pc1.setEditable(false);\n pba.setEditable(false);\n pds.setEditable(false);\n }", "@Override\n\tpublic void init() throws Exception {\n\t\tVoodooUtils.voodoo.log.info(\"Init Quoted Line Items...\");\n\t\tsuper.init();\n\n\t\t// Define the columns on the ListView.\n\t\tlistView.addHeader(\"name\");\n\t\tlistView.addHeader(\"account_name\");\n\t\tlistView.addHeader(\"status\");\n\t\tlistView.addHeader(\"quote_name\");\n\t\tlistView.addHeader(\"quantity\");\n\t\tlistView.addHeader(\"discount_price\");\n\t\tlistView.addHeader(\"cost_price\");\n\t\tlistView.addHeader(\"discount_amount\");\n\t\tlistView.addHeader(\"assigned_user_name\");\n\n\t\t// Related Subpanels\n\t\trelatedModulesMany.put(\"contact_products\", sugar().contacts);\n\t\trelatedModulesMany.put(\"documents_products\", sugar().documents);\n\t\trelatedModulesMany.put(\"product_notes\", sugar().notes);\n\n\t\t// Add Subpanels\n\t\trecordView.addSubpanels();\n\n\t\t// Define the columns of the StandardSubpanel\n\t\tStandardSubpanel standardsubpanel = (StandardSubpanel) subpanels.get(\"standard\");\n\t\tstandardsubpanel.addHeader(\"name\");\n\t\tstandardsubpanel.addHeader(\"status\");\n\t\tstandardsubpanel.addHeader(\"account_name\");\n\t\tstandardsubpanel.addHeader(\"contact_name\");\n\t\tstandardsubpanel.addHeader(\"date_purchased\");\n\t\tstandardsubpanel.addHeader(\"discount_price\");\n\t\tstandardsubpanel.addHeader(\"date_support_expires\");\n\n\n\t\t// Account Mass Update Panel\n\t\tmassUpdate = new MassUpdate(this);\n\t}", "public OrganizeItemsPanel() {\n initComponents();\n// lastIndeks = catalogProducts.size();\n }", "public food_drinks() {\n initComponents();\n }", "private void initComponent() {\n\t\taddGrid();\n\t\taddToolBars();\n\t}", "public Kelola_Data_Dokter() {\n initComponents();\n }", "@Override\n @PostConstruct\n protected void init() {\n super.init();\n\n // _HACK_ Attention: you must realize that associations below (when lazy) are fetched from the view, non transactionnally.\n\n if (products == null) {\n products = new SelectableListDataModel<Product>(getPart().getProducts());\n }\n }", "public DesigningSec() {\n initComponents();\n }", "private void initCards() {\n\t\tArrayList<Card> cardsChart = new ArrayList<Card>();\n\t\tCard card = init_info_card(tmp.getFull(), tmp.getStatus(), tmp.getDue_date());\n\t\tcardsChart.add(card);\n\t\tcard = init_fulfilled_card();\n\t\tcardsChart.add(card);\n\t\tcard = init_proof_card();\n\t\tcardsChart.add(card);\n\t\tcard = init_chart_detail_card();\n\t\tcardsChart.add(card);\n\t\t\n\t\t/*for (int i = 0; i < 5; i++) {\n\t\t\tcard = init_chart_card();\n\t\t\tcardsChart.add(card);\n\t\t}*/\n\t\tCardArrayAdapter mCardArrayAdapterGrades = new CardArrayAdapter(getActivity(), cardsChart);\n\n\t\tCardListView listView = (CardListView) getActivity().findViewById(R.id.card_list);\n\t\tif (listView != null) {\n\t\t\tlistView.setAdapter(mCardArrayAdapterGrades);\n\t\t}\n\t}", "public ProductListJPanel() {\n initComponents();\n }", "private void initComposants() {\r\n\t\tselectionMatierePanel = new SelectionMatierePanel(1);\r\n\t\ttableauPanel = new TableauPanel(1);\r\n\t\tadd(selectionMatierePanel, BorderLayout.NORTH);\r\n\t\tadd(tableauPanel, BorderLayout.SOUTH);\r\n\t\t\r\n\t}", "public companyview() {\n initComponents();\n }", "public SalesView() {\n initComponents();\n salesDetailTable.setAutoCreateColumnsFromModel(false);\n jdcTransaksi.setDate(new Date());\n enableForm(false);\n buttonConfig();\n salesDetailTable.getTableHeader().setFont(new Font(\"Segoe UI\", 0, 18)); \n }", "public CatProveedores() {\n initComponents();\n cargartabla();\n }", "public Petitioner_Details() {\n initComponents();\n }", "private void initComponents(inventorycontroller.function.DbInterface dbi) {\n \tdbInterface1=dbi;\n \tpoAmount=\"0\";\n \tpoType=-1;\n \tresetPerforming=false;\n\t selectedBomList=null;\n\t bomList=null;\n\t bomDet=null;\n\t itmList=null;\n\t poDet=null;\n\t vndList=null;\n\t poDetType=new java.lang.Class[] {\n\t \tjava.lang.Short.class,\n\t \tjava.lang.String.class,\n\t \tjava.lang.Long.class,\n\t \tjava.lang.Double.class,\n\t \tjava.lang.Double.class,\n\t \tjava.lang.Double.class,\n\t \tjava.lang.Double.class,\n\t \tjava.lang.Double.class,\n\t \tjava.lang.Double.class,\n\t \tjava.lang.Double.class,\n\t \tjava.lang.Double.class,\n\t \tjava.lang.Double.class,\n\t \tjava.lang.Double.class,\n\t \tjava.lang.Double.class,\n\t \tjava.lang.Double.class,\n\t \tjava.lang.Double.class,\n\t \tjava.lang.Double.class,\n\t \tjava.lang.Double.class,\n\t };\n\t poDetEditableForBM=new boolean[18];\n\t poDetEditableForLP=new boolean[18];\n\t for (int i = 0; i<18; i++){\n\t\t poDetEditableForBM[i]=true;\n\t\t poDetEditableForLP[i]=true;\n\t }\n\t poDetEditableForBM[0]=false;\n\t poDetEditableForBM[1]=false;\n\t poDetEditableForBM[2]=false;\n\t poDetEditableForBM[4]=false;\n\t poDetEditableForBM[17]=false;\n\t poDetEditableForLP[0]=false;\n\t poDetEditableForLP[1]=false;\n\t poDetEditableForLP[4]=false;\n\t poDetEditableForLP[17]=false;\n\t poDetEditable=null;\n\t addedBom=new java.util.Vector<String>(); \n\t addedBomDet=new java.util.Vector<java.util.Vector<String>>(); \n\t \n \t\n jLabel1 = new javax.swing.JLabel();\n jPanel1 = new javax.swing.JPanel();\n jTabbedPane1 = new javax.swing.JTabbedPane();\n jPanel3 = new javax.swing.JPanel();\n buttonGroup1 = new javax.swing.ButtonGroup();\n jRadioButton1 = new javax.swing.JRadioButton();\n jRadioButton2 = new javax.swing.JRadioButton();\n jLabel2 = new javax.swing.JLabel();\n jLabel3 = new javax.swing.JLabel();\n jLabel4 = new javax.swing.JLabel();\n jLabel5 = new javax.swing.JLabel();\n jLabel6 = new javax.swing.JLabel();\n jTextField2 = new javax.swing.JComboBox();\n jSpinner1 = new javax.swing.JSpinner();\n jTextField1 = new javax.swing.JLabel();\n jTextField3 = new javax.swing.JTextField();\n jSpinner2 = new javax.swing.JSpinner();\n jLabel7 = new javax.swing.JLabel();\n jScrollPane2 = new javax.swing.JScrollPane();\n jEditorPane1 = new javax.swing.JEditorPane();\n jLabel8 = new javax.swing.JLabel();\n jButton6 = new javax.swing.JButton();\n jScrollPane1 = new javax.swing.JScrollPane();\n jList1 = new javax.swing.JList();\n jPanel4 = new javax.swing.JPanel();\n jPanel5 = new javax.swing.JPanel();\n jScrollPane3 = new javax.swing.JScrollPane();\n jTable1 = new javax.swing.JTable();\n jLabel9 = new javax.swing.JLabel();\n jLabel10 = new javax.swing.JLabel();\n jLabel12 = new javax.swing.JLabel();\n jScrollPane4 = new javax.swing.JScrollPane();\n jTable2 = new javax.swing.JTable();\n jButton5 = new javax.swing.JButton();\n jButton4 = new javax.swing.JButton();\n jButton7 = new javax.swing.JButton();\n jScrollPane5 = new javax.swing.JScrollPane();\n jScrollPane6 = new javax.swing.JScrollPane();\n jTable3 = new javax.swing.JTable();\n jTable4 = new javax.swing.JTable();\n jButton1 = new javax.swing.JButton();\n jLabel11 = new javax.swing.JLabel();\n jPanel2 = new javax.swing.JPanel();\n jButton2 = new javax.swing.JButton();\n jButton3 = new javax.swing.JButton();\n jXDatePicker1 = new inventorycontroller.display.RDateSpinner(inventorycontroller.display.RDateSpinner.DD_MM_YYYY);\n jXDatePicker2 = new inventorycontroller.display.RDateSpinner(inventorycontroller.display.RDateSpinner.DD_MM_YYYY);\n\n setTitle(\"Purchase Order\");\n \n jTextField2.setMaximumRowCount(8);\n \n jLabel1.setBackground(new java.awt.Color(127, 157, 185));\n jLabel1.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel1.setText(\"jLabel1\");\n jLabel1.setOpaque(true);\n\n jPanel1.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(127, 157, 185)));\n jRadioButton1.setText(\"Purchase against BOM\");\n jRadioButton1.addActionListener(new java.awt.event.ActionListener(){\n \tpublic void actionPerformed(java.awt.event.ActionEvent evt){\n \t\tpoTypeChanged((javax.swing.JRadioButton)evt.getSource());\n \t}\n });\n\n jRadioButton2.setText(\"Local Purchase\");\n jRadioButton2.addActionListener(new java.awt.event.ActionListener(){\n \tpublic void actionPerformed(java.awt.event.ActionEvent evt){\n \t\tpoTypeChanged((javax.swing.JRadioButton)evt.getSource());\n \t}\n });\n \n buttonGroup1.add(jRadioButton1);\n buttonGroup1.add(jRadioButton2);\n\n jLabel2.setText(\"PO No.\");\n\n jLabel3.setText(\"PO Date\");\n\n jLabel4.setText(\"Vendor Name\");\n\n jLabel5.setText(\"Quotation No.\");\n\n jLabel6.setText(\"Quotation Date\");\n\n jLabel7.setText(\"BOM List:\");\n\n jScrollPane2.setViewportView(jEditorPane1);\n\n jLabel8.setText(\"Remarks (if any):\");\n\n jButton6.setText(\"Generate Purchase Requisition\");\n jButton6.addActionListener(new java.awt.event.ActionListener(){\n \tpublic void actionPerformed(java.awt.event.ActionEvent evt){\n \t\tgeneratePurchaseRequition();\n \t}\n });\n\n jScrollPane1.setViewportView(jList1);\n\n javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);\n jPanel3.setLayout(jPanel3Layout);\n jPanel3Layout.setHorizontalGroup(\n jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel3Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel3Layout.createSequentialGroup()\n .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel4)\n .addComponent(jLabel3)\n .addComponent(jLabel2)\n .addComponent(jLabel5)\n .addComponent(jLabel6))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jXDatePicker1, javax.swing.GroupLayout.DEFAULT_SIZE, 140, Short.MAX_VALUE)\n .addComponent(jTextField2, javax.swing.GroupLayout.DEFAULT_SIZE, 140, Short.MAX_VALUE)\n .addComponent(jTextField3, javax.swing.GroupLayout.DEFAULT_SIZE, 140, Short.MAX_VALUE)\n .addComponent(jXDatePicker2, javax.swing.GroupLayout.DEFAULT_SIZE, 140, Short.MAX_VALUE)\n .addComponent(jTextField1, javax.swing.GroupLayout.DEFAULT_SIZE, 140, Short.MAX_VALUE))\n .addGap(16, 16, 16)\n .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addGroup(jPanel3Layout.createSequentialGroup()\n .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel7)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 140, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(16, 16, 16)\n .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel8)\n .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 140, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addComponent(jButton6, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))\n .addGroup(jPanel3Layout.createSequentialGroup()\n .addComponent(jRadioButton1)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jRadioButton2)))\n .addContainerGap())\n );\n jPanel3Layout.setVerticalGroup(\n jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel3Layout.createSequentialGroup()\n .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jRadioButton1)\n .addComponent(jRadioButton2))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel3Layout.createSequentialGroup()\n .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel2)\n .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel3)\n .addComponent(jXDatePicker1, 20, 20, 20))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel4)\n .addComponent(jTextField2, 20, 20, 20))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel5)\n .addComponent(jTextField3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel6)\n .addComponent(jXDatePicker2, 20, 20, 20)))\n .addGroup(jPanel3Layout.createSequentialGroup()\n\t .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)\n\t .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel3Layout.createSequentialGroup()\n\t .addComponent(jLabel8)\n\t .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n\t .addComponent(jScrollPane2))\n\t .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel3Layout.createSequentialGroup()\n\t .addComponent(jLabel7)\n\t .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n\t .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 66, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGap(8, 16, 32)\n .addComponent(jButton6)))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n jTabbedPane1.addTab(\"Purchase Order Detail\", jPanel3);\n\n jTable1.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);\n jTable1.getSelectionModel().addListSelectionListener(new javax.swing.event.ListSelectionListener(){\n \tpublic void valueChanged(javax.swing.event.ListSelectionEvent e) {\n \t\t//Ignore extra messages.\n \t\tif (e.getValueIsAdjusting()) return;\n \t\tjavax.swing.ListSelectionModel lsm =(javax.swing.ListSelectionModel)e.getSource();\n \t\tint selectedRow;\n \t\tif (lsm.isSelectionEmpty()) { //no rows are selected\n \t\t\tselectedRow=-1;\n \t\t} \n \t\telse {\n \t\tselectedRow = lsm.getMinSelectionIndex();\n \t\tbomSelected(selectedRow);\n \t}\n \t}\n\t\t});\n jTable1.setAutoResizeMode(jTable2.AUTO_RESIZE_OFF);\n jTable1.setAutoCreateRowSorter(false);\n jScrollPane3.setViewportView(jTable1);\n\n jLabel9.setText(\"BOM List:\");\n\n jLabel10.setText(\"BOM Details:\");\n\n\t\tjTable2.setAutoResizeMode(jTable2.AUTO_RESIZE_OFF);\n jTable2.setAutoCreateRowSorter(false);\n jScrollPane4.setViewportView(jTable2);\n\n jButton5.setText(\"Add Selected Item/s\");\n jButton5.addActionListener(new java.awt.event.ActionListener(){\n \tpublic void actionPerformed(java.awt.event.ActionEvent evt){\n \t\tselectBom();\n \t}\n });\n\n javax.swing.GroupLayout jPanel5Layout = new javax.swing.GroupLayout(jPanel5);\n jPanel5.setLayout(jPanel5Layout);\n jPanel5Layout.setHorizontalGroup(\n jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel5Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel5Layout.createSequentialGroup()\n .addComponent(jScrollPane3, javax.swing.GroupLayout.PREFERRED_SIZE, 321, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jScrollPane4, javax.swing.GroupLayout.DEFAULT_SIZE, 324, Short.MAX_VALUE)\n .addComponent(jButton5, javax.swing.GroupLayout.DEFAULT_SIZE, 324, Short.MAX_VALUE)\n .addComponent(jLabel10, javax.swing.GroupLayout.Alignment.LEADING)))\n .addComponent(jLabel9))\n .addContainerGap())\n );\n jPanel5Layout.setVerticalGroup(\n jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel5Layout.createSequentialGroup()\n .addComponent(jLabel9)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel5Layout.createSequentialGroup()\n .addComponent(jLabel10)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jScrollPane4, javax.swing.GroupLayout.DEFAULT_SIZE, 74, Short.MAX_VALUE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jButton5))\n .addComponent(jScrollPane3, javax.swing.GroupLayout.DEFAULT_SIZE, 123, Short.MAX_VALUE))\n .addContainerGap())\n );\n jTabbedPane1.addTab(\"BOM Selection\", jPanel5);\n\n jTable4.setAutoCreateRowSorter(false);\n jTable4.setAutoResizeMode(javax.swing.JTable.AUTO_RESIZE_OFF);\n jScrollPane6.setViewportView(jTable4);\n\n jLabel12.setText(\"Material List:\");\n\n jButton7.setText(\"<html><center>Add Selected<br>Material/s</center></html>\");\n jButton7.addActionListener(new java.awt.event.ActionListener(){\n \tpublic void actionPerformed(java.awt.event.ActionEvent evt){\n \t\titemSelected();\n \t}\n });\n\n javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4);\n jPanel4.setLayout(jPanel4Layout);\n jPanel4Layout.setHorizontalGroup(\n jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel4Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel4Layout.createSequentialGroup()\n .addComponent(jScrollPane6, javax.swing.GroupLayout.PREFERRED_SIZE, 511, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jButton7, javax.swing.GroupLayout.DEFAULT_SIZE, 134, Short.MAX_VALUE))\n .addComponent(jLabel12))\n .addContainerGap())\n );\n jPanel4Layout.setVerticalGroup(\n jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel4Layout.createSequentialGroup()\n .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addGroup(jPanel4Layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jButton7))\n .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel4Layout.createSequentialGroup()\n .addComponent(jLabel12)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jScrollPane6, javax.swing.GroupLayout.DEFAULT_SIZE, 123, Short.MAX_VALUE)))\n .addContainerGap())\n );\n jTabbedPane1.addTab(\"Material Selection\", jPanel4);\n \n jTable3.setAutoCreateRowSorter(false);\n jTable3.setAutoResizeMode(javax.swing.JTable.AUTO_RESIZE_OFF);\n jScrollPane5.setViewportView(jTable3);\n\n jButton1.setText(\"Save this Purchase Order\");\n jButton1.addActionListener(new java.awt.event.ActionListener(){\n \tpublic void actionPerformed(java.awt.event.ActionEvent evt){\n \t\tinsertPerform();\n \t}\n });\n \n jButton4.setText(\"Generate Print Preview\");\n jButton4.addActionListener(new java.awt.event.ActionListener(){\n \tpublic void actionPerformed(java.awt.event.ActionEvent evt){\n \t\tshowPrintView();\n \t}\n });\n\n jLabel11.setBackground(new java.awt.Color(255, 255, 255));\n jLabel11.setFont(new java.awt.Font(\"Dialog\", 1, 12));\n jLabel11.setForeground(new java.awt.Color(255, 102, 0));\n jLabel11.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel11.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(127, 157, 185)));\n jLabel11.setOpaque(true);\n\n resetPerform();\n \n javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);\n jPanel1.setLayout(jPanel1Layout);\n jPanel1Layout.setHorizontalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jScrollPane5, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 640, Short.MAX_VALUE)\n .addComponent(jLabel11, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 640, Short.MAX_VALUE)\n .addComponent(jTabbedPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 640, Short.MAX_VALUE)\n .addGroup(jPanel1Layout.createSequentialGroup()\n \t.addGap(0, 0, Short.MAX_VALUE)\n .addComponent(jButton1, 220, 320, 320)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jButton4, 220, 320, 320)\n .addGap(0, 0, Short.MAX_VALUE)))\n .addContainerGap())\n );\n jPanel1Layout.setVerticalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jTabbedPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 182, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jScrollPane5, javax.swing.GroupLayout.DEFAULT_SIZE, 155, Short.MAX_VALUE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jLabel11)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jButton4)\n .addComponent(jButton1))\n .addContainerGap())\n );\n\n jPanel2.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(127, 157, 185)));\n jButton2.setText(\"Reset\");\n jButton2.addActionListener(new java.awt.event.ActionListener(){\n \tpublic void actionPerformed(java.awt.event.ActionEvent evt){\n \t\tresetPerform();\n \t}\n });\n jButton2.setMaximumSize(new java.awt.Dimension(120, 22));\n jButton2.setMinimumSize(new java.awt.Dimension(120, 22));\n jButton2.setPreferredSize(new java.awt.Dimension(120, 22));\n\n jButton3.setText(\"Exit\");\n jButton3.addActionListener(new java.awt.event.ActionListener(){\n \tpublic void actionPerformed(java.awt.event.ActionEvent evt){\n \t\texitPerform();\n \t}\n });\n jButton3.setMaximumSize(new java.awt.Dimension(120, 22));\n jButton3.setMinimumSize(new java.awt.Dimension(120, 22));\n jButton3.setPreferredSize(new java.awt.Dimension(120, 22));\n\n javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);\n jPanel2.setLayout(jPanel2Layout);\n jPanel2Layout.setHorizontalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jButton2)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jButton3)\n .addContainerGap())\n );\n jPanel2Layout.setVerticalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jButton2)\n .addComponent(jButton3))\n .addContainerGap())\n );\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, 540, Short.MAX_VALUE)\n .addContainerGap())\n .addGroup(layout.createSequentialGroup()\n .addContainerGap(0, java.lang.Short.MAX_VALUE)\n .addComponent(jPanel2)\n .addContainerGap(0, java.lang.Short.MAX_VALUE))\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, 720, javax.swing.GroupLayout.DEFAULT_SIZE)\n .addContainerGap())\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jPanel1)\n .addGap(4, 16, 22)\n .addComponent(jPanel2)\n .addGap(4, 16, 22)\n .addComponent(jLabel1)\n .addContainerGap())\n );\n pack();\n setVisible(true);\n setClosable(true);\n setIconifiable(true);\n setMaximizable(true);\n setResizable(true);\n getRootPane().setDefaultButton(jButton1);\n //* ENDING: initComponent()\n }", "public CutiView() {\n initComponents();\n this.cutiController = new CutiController(new MyConnection().getConnection());\n bindingTable();\n reset();\n }", "private void initialize() {\n\t\tjLabel3 = new JLabel();\n\t\tjLabel = new JLabel();\n\t\tthis.setLayout(null);\n\t\tthis.setBounds(new java.awt.Rectangle(0, 0, 486, 377));\n\t\tjLabel.setText(PluginServices.getText(this,\n\t\t\t\t\"Areas_de_influencia._Introduccion_de_datos\") + \":\");\n\t\tjLabel.setBounds(5, 20, 343, 21);\n\t\tjLabel3.setText(PluginServices.getText(this, \"Cobertura_de_entrada\")\n\t\t\t\t+ \":\");\n\t\tjLabel3.setBounds(6, 63, 190, 21);\n\t\tthis.add(jLabel, null);\n\t\tthis.add(jLabel3, null);\n\t\tthis.add(getLayersComboBox(), null);\n\t\tthis.add(getSelectedOnlyCheckBox(), null);\n\t\tthis.add(getMethodSelectionPanel(), null);\n\t\tthis.add(getResultSelectionPanel(), null);\n\t\tthis.add(getExtendedOptionsPanel(), null);\n\t\tconfButtonGroup();\n\t\tlayersComboBox.setSelectedIndex(0);\n\t\tinitSelectedItemsJCheckBox();\n\t\tdistanceBufferRadioButton.setSelected(true);\n\t\tlayerFieldsComboBox.setEnabled(false);\n\t\tverifyTypeBufferComboEnabled();\n\t}", "public Datamanagement() {\n initComponents();\n }", "private void myInit() {\n\n// System.setProperty(\"pool_host\", \"localhost\");\n// System.setProperty(\"pool_db\", \"db_cis_cosca\");\n// System.setProperty(\"pool_password\", \"password\");\n\n// MyUser.setUser_id(\"2\");\n tf_search.grabFocus();\n jPanel7.setVisible(false);\n init_key();\n hover();\n search();\n init();\n init_tbl_users();\n\n focus();\n jLabel3.setVisible(false);\n cb_lvl.setVisible(false);\n jPanel2.setVisible(false);\n\n init_tbl_user_default_previleges();\n data_cols_default();\n init_tbl_user_default_priveleges(tbl_user_default_priveleges);\n\n init_tbl_user_previleges();\n init_tbl_user_default_previlege_others(tbl_user_default_previlege_others);\n Field.Combo cb = (Field.Combo) tf_from_location1;\n cb.setText(\"Transactions\");\n cb.setId(\"1\");\n\n data_cols();\n }", "public void InitData() {\n this.mItemTitleIds = new int[]{R.string.can_volvo_cysjysz, R.string.can_volvo_zdsm, R.string.can_door_unlock, R.string.can_volvo_zdhsj, R.string.can_volvo_qxzchsj, R.string.can_volvo_qxychsj, R.string.can_volvo_fxplsz, R.string.can_volvo_dstc, R.string.can_volvo_csaq, R.string.can_volvo_hfqcsz};\n this.mItemTypes = new CanScrollCarInfoView.Item[]{CanScrollCarInfoView.Item.SWITCH, CanScrollCarInfoView.Item.SWITCH, CanScrollCarInfoView.Item.POP, CanScrollCarInfoView.Item.SWITCH, CanScrollCarInfoView.Item.SWITCH, CanScrollCarInfoView.Item.SWITCH, CanScrollCarInfoView.Item.POP, CanScrollCarInfoView.Item.SWITCH, CanScrollCarInfoView.Item.SWITCH, CanScrollCarInfoView.Item.TITLE};\n this.mPopValueIds[2] = new int[]{R.string.can_door_unlock_key2, R.string.can_door_unlock_key1};\n this.mPopValueIds[6] = new int[]{R.string.can_ac_low, R.string.can_ac_mid, R.string.can_ac_high};\n this.mSetData = new CanDataInfo.VolvoXc60_CarSet();\n }", "private void initData() {\n\t\tcomboBoxInit();\n\t\tinitList();\n\t}", "public CrearProductos() {\n initComponents();\n }", "public InvoiceCreate() {\n initComponents();\n }", "private void createUIComponents() {\n this.removeAll();\n this.setLayout(new GridBagLayout());\n\n selectionListener = e -> update();\n\n categorySet_panel = new DataObject_DisplayList<>(database.getSchema(), CategorySet.class, new Full_Set<>(database, CategorySet.class), false, this);\n categorySet_panel.addControlButtons(new CategorySet_ElementController(database, this));\n categorySet_panel.getMainPanel().getListSelectionModel().addListSelectionListener(selectionListener);\n\n virtualCategory_set = new OneParent_Children_Set<>(VirtualCategory.class, null);\n virtualCategory_elementController = new VirtualCategory_ElementController(database, this);\n virtualCategory_panel = new DataObject_DisplayList<>(database.getSchema(), VirtualCategory.class, virtualCategory_set, false, this);\n virtualCategory_panel.addControlButtons(virtualCategory_elementController);\n virtualCategory_panel.getMainPanel().getListSelectionModel().addListSelectionListener(selectionListener);\n\n categoryToCategorySet_set = new OneParent_Children_Set<>(CategoryToCategorySet.class, null);\n categoryToCategorySet_elementController = new CategoryToCategorySet_ElementController(database, this);\n categoryToCategorySet_panel = new DataObject_DisplayList<>(database.getSchema(), CategoryToCategorySet.class, categoryToCategorySet_set, false, this);\n categoryToCategorySet_panel.addControlButtons(categoryToCategorySet_elementController);\n\n categoryToVirtualCategory_set = new OneParent_Children_Set<>(CategoryToVirtualCategory.class, null);\n categoryToVirtualCategory_elementController = new CategoryToVirtualCategory_ElementController(database, this);\n categoryToVirtualCategory_panel = new DataObject_DisplayList<>(database.getSchema(), CategoryToVirtualCategory.class, categoryToVirtualCategory_set, false, this);\n categoryToVirtualCategory_panel.addControlButtons(categoryToVirtualCategory_elementController);\n\n GridBagConstraints gridBagConstraints = new GridBagConstraints();\n gridBagConstraints.fill = GridBagConstraints.BOTH;\n gridBagConstraints.weightx = 1;\n gridBagConstraints.weighty = 1;\n gridBagConstraints.gridheight = 2;\n\n gridBagConstraints.gridx = 0;\n this.add(categorySet_panel, gridBagConstraints);\n\n gridBagConstraints.gridheight = 1;\n gridBagConstraints.gridx = 1;\n this.add(virtualCategory_panel, gridBagConstraints);\n\n gridBagConstraints.weighty = 2;\n this.add(categoryToCategorySet_panel, gridBagConstraints);\n\n gridBagConstraints.gridheight = 2;\n gridBagConstraints.weighty = 1;\n gridBagConstraints.gridx = 2;\n this.add(categoryToVirtualCategory_panel, gridBagConstraints);\n }", "public ManageSupplier() {\n initComponents();\n }", "public kart() {\n initComponents();\n }", "public BusinessClass() {\n initComponents();\n }", "private void initializeComponents()\n throws Exception\n {\n // get locale.\n DfkUserInfo ui = (DfkUserInfo)getUserInfo();\n Locale locale = httpRequest.getLocale();\n\n // initialize pul_Area.\n _pdm_pul_Area = new WmsAreaPullDownModel(pul_Area, locale, ui);\n\n // initialize pul_WorkFlag.\n _pdm_pul_WorkFlag = new DefaultPullDownModel(pul_WorkFlag, locale, ui);\n\n // initialize pager control.\n _pager = new PagerModel(new Pager[]{pgr_U, pgr_D}, locale);\n\n // initialize lst_StorageRetrievalResultList.\n _lcm_lst_StorageRetrievalResultList = new ListCellModel(lst_StorageRetrievalResultList, LST_STORAGERETRIEVALRESULTLIST_KEYS, locale);\n _lcm_lst_StorageRetrievalResultList.setToolTipVisible(KEY_LST_REGIST_DATE, true);\n _lcm_lst_StorageRetrievalResultList.setToolTipVisible(KEY_LST_REGIST_TIME, true);\n _lcm_lst_StorageRetrievalResultList.setToolTipVisible(KEY_LST_ITEM_CODE, true);\n _lcm_lst_StorageRetrievalResultList.setToolTipVisible(KEY_LST_ITEM_NAME, true);\n _lcm_lst_StorageRetrievalResultList.setToolTipVisible(KEY_LST_LOT_NO, true);\n _lcm_lst_StorageRetrievalResultList.setToolTipVisible(KEY_LST_INC_DEC_TYPE, true);\n _lcm_lst_StorageRetrievalResultList.setToolTipVisible(KEY_LST_JOB_TYPE, true);\n _lcm_lst_StorageRetrievalResultList.setToolTipVisible(KEY_LST_AREA_NO, true);\n _lcm_lst_StorageRetrievalResultList.setToolTipVisible(KEY_LST_LOCATION_NO, true);\n _lcm_lst_StorageRetrievalResultList.setToolTipVisible(KEY_LST_INC_DEC_QTY, true);\n _lcm_lst_StorageRetrievalResultList.setToolTipVisible(KEY_LST_STORAGE_DATE, true);\n _lcm_lst_StorageRetrievalResultList.setToolTipVisible(KEY_LST_STORAGE_TIME, true);\n _lcm_lst_StorageRetrievalResultList.setToolTipVisible(KEY_LST_USER_NAME, true);\n }", "private void init() {\n CardHeader header = new CardHeader(getContext());\n header.setButtonOverflowVisible(true);\n header.setTitle(TestBook.getTitle());\n header.setPopupMenu(R.menu.card_menu_main, new CardHeader.OnClickCardHeaderPopupMenuListener() {\n @Override\n public void onMenuItemClick(BaseCard card, MenuItem item) {\n Toast.makeText(getContext(), item.getTitle(), Toast.LENGTH_SHORT).show();\n }\n });\n\n addCardHeader(header);\n\n BookCardThumb bookthumbnail = new BookCardThumb(getContext());\n bookthumbnail.setDrawableResource(R.drawable.pngbook_cover);\n addCardThumbnail(bookthumbnail);\n\n }", "private void initializeComponents() {\n\t\tplantDAO = new PlantDAOStub();\r\n\t\t\r\n\t\ttry {\r\n\t\t\tList<String> plantNames = plantDAO.getPlantNames();\r\n\t\t\tArrayAdapter<String> plantNamesAdapter = new ArrayAdapter<String>(this, android.R.layout.simple_expandable_list_item_1, plantNames);\r\n\t\t\t\r\n\t\t\tactPlantName = (AutoCompleteTextView) findViewById(R.id.actPlantName);\r\n\t\t\t\r\n\t\t\tactPlantName.setAdapter(plantNamesAdapter);\r\n\t\t\t\r\n\t\t\tbtnPlantSearch = (Button) findViewById(R.id.btnSearchPlants);\r\n\t\t\t\r\n\t\t\tbtnPlantSearch.setOnClickListener(new View.OnClickListener() {\r\n\t\t\t\t\r\n\t\t\t\tpublic void onClick(View v) {\r\n\t\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\t\tinvokeResults();\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\t\r\n\t\t} catch (Exception e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t}", "public Returnbook() {\n initComponents();\n Connect();\n ReturnBook_Load();\n }", "public Prisoner_details() {\n initComponents();\n fetch();\n }", "public void initPageComponents() {\n\t\t\n\t\tboolean showMeterID \t= false;\n\t\tboolean showBillerID \t= false;\n\t\tboolean showRegID\t\t= false;\n\t\tboolean fillMeterID\t\t= false;\n\t\tboolean fillBillerID \t= false;\n\t\tboolean fillRegID\t\t= false;\n\t\tif(billPayBean.getBillerId().equals(\"91901\")) { //prepaid\n\t\t\tshowMeterID \t= true;\n\t\t\tshowBillerID \t= true;\n\t\t\tfillMeterID\t\t= true;\n\t\t\tfillBillerID\t= true;\n\t\t} else if(billPayBean.getBillerId().equals(\"91951\")) { //postpaid\n\t\t\tshowBillerID \t= true;\n\t\t\tfillBillerID\t= true;\n\t\t} else if(billPayBean.getBillerId().equals(\"91999\")) { //nontaglis\n\t\t\tshowRegID\t\t= true;\n\t\t\tfillRegID\t\t= true;\n\t\t}\n\t\t\n\t\tfinal Form<BankBillPaymentConfirmPage> form = new Form<BankBillPaymentConfirmPage>(\"confirmBillPay\", \n\t\t\t\tnew CompoundPropertyModel<BankBillPaymentConfirmPage>(this));\n\t\tform.add(new FeedbackPanel(\"errorMessages\"));\n\t\tform.add(new Label(\"billPayBean.billerLabel\")); \n\t\tform.add(new Label(\"billPayBean.productLabel\"));\n\t\tform.add(new Label(\"billPayBean.billAmount\"));\n\t\tform.add(new AmountLabel(\"billPayBean.feeAmount\"));\n\t\tfinal boolean showNameandBillNumber = billPayBankNameList.contains(billPayBean.getBillerId());\n\t\tform.add(new Label(\"label.customer.name\", getLocalizer().getString(\"label.customer.name\", this)).setVisible(showNameandBillNumber)); \n\t\tform.add(new Label(\"billPayBean.customerName\").setVisible(showNameandBillNumber));\n\t\tform.add(new Label(\"label.meter.number\", getLocalizer().getString(\"label.meter.number\", this)).setVisible(showMeterID));\n\t\tform.add(new Label(\"billPayBean.meterNumber\").setVisible(fillMeterID));\n\t\tform.add(new Label(\"label.bill.number\", getLocalizer().getString(\"label.bill.number\", this)).setVisible(showBillerID));\n\t\tform.add(new Label(\"billPayBean.billNumber\").setVisible(fillBillerID));\n\t\tform.add(new Label(\"label.reg.number\", getLocalizer().getString(\"label.reg.number\", this)).setVisible(showRegID));\n\t\tform.add(new Label(\"billPayBean.regNumber\").setVisible(fillRegID));\n\t\t\n\t\tform.add(new PasswordTextField(\"billPayBean.pin\").add(new ErrorIndicator()));\n\t\t\n\t\taddSubmitButton(form);\n\t\t\n\t\tadd(form);\n\t}", "private void initializeWidgets() {\n\t\timg_home = (ImageView) findViewById(R.id.img_home);\n\t\tlv_customer_info = (ListView) findViewById(R.id.lv_customer_info);\n\t\tmc_ed_search = (AutoCompleteTextView) findViewById(R.id.mc_ed_search);\n\t\ttxv_invisible = (TextView) findViewById(R.id.txv_invisible);\n\t\ttxv_invisible.setVisibility(View.GONE);\n\t\tbtn_mc_genrate_invoice = (Button) findViewById(R.id.btn_mc_genrate_invoice);\n\t}" ]
[ "0.6268289", "0.62127656", "0.6103518", "0.60814214", "0.6074058", "0.60722154", "0.6064909", "0.60466766", "0.60322493", "0.6022396", "0.598013", "0.59518033", "0.5939173", "0.59241706", "0.59162617", "0.5888461", "0.58863455", "0.5879996", "0.5850768", "0.5838169", "0.5838052", "0.582957", "0.58229923", "0.5816443", "0.5816212", "0.58136094", "0.5812365", "0.5796321", "0.5789329", "0.5782415", "0.5780893", "0.5780017", "0.57777315", "0.5770844", "0.57706", "0.5763712", "0.5760722", "0.5752709", "0.5751181", "0.57497454", "0.5746615", "0.5745927", "0.5742711", "0.57425165", "0.57317746", "0.5729216", "0.57203263", "0.572004", "0.57138383", "0.57119375", "0.5711288", "0.5706154", "0.570036", "0.569528", "0.569166", "0.5684712", "0.5683957", "0.56811225", "0.56716096", "0.5664972", "0.5664048", "0.5663513", "0.5663009", "0.56608313", "0.56603503", "0.56580323", "0.5656127", "0.5654831", "0.56542724", "0.5644966", "0.5644137", "0.563977", "0.5637427", "0.5637279", "0.56358665", "0.56334865", "0.56328064", "0.5625245", "0.56213665", "0.56203717", "0.5617958", "0.5613833", "0.5604874", "0.5601082", "0.55981785", "0.5597756", "0.55974513", "0.5595081", "0.5594577", "0.55933833", "0.5591914", "0.5589674", "0.5589417", "0.5587773", "0.5586504", "0.5569388", "0.5562269", "0.5561072", "0.5560568", "0.55538607" ]
0.7407896
0
When data changes, this method updates the list of clipEntries and notifies the adapter to use the new values on it
public void setClips(List<Countries> mCountries) { countries = mCountries; notifyDataSetChanged(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setClipBoardData() {\n }", "public void refershData(ArrayList<SquareLiveModel> contents) {\n\t\tlistData = contents;\n\t\tnotifyDataSetChanged();\n\t}", "public void clipCompleted(){\n // unbind service\n getApplicationContext().unbindService(mConnection);\n mIsBound = false;\n\n // disabled and enable the specified buttons\n startButton.setEnabled(false);\n stopButton.setEnabled(true);\n resumeButton.setEnabled(false);\n pauseButton.setEnabled(false);\n stopPlayback.setEnabled(false);\n playButton.setEnabled(false);\n\n //reset items in list to default state\n adapter = new ListAdapter(this, audioList, durationList);\n mRecyclerView.setAdapter(adapter);\n findViewById(R.id.overlay).setVisibility(View.GONE);\n }", "@Override\n\t\t\tpublic void onPrimaryClipChanged() {\n\t\t\t\tClipData data = mClipboard.getPrimaryClip();\n\t\t\t\tItem item = data.getItemAt(0);\n\t\t\t\tLog.e(ClientSocketThread.TAG, \"复制文字========:\"+item.getText());\t\n \t\t\t\tsendSocketDataTotalLen = item.getText().toString().getBytes().length+4;\n\t\t\t\tsendTotalLen = FileUtil.intToByte(sendSocketDataTotalLen);\n\t\t\t\tsendSocketDataCategories =7;\n\t\t\t\tsendCategories = FileUtil.intToByte(sendSocketDataCategories);\n\t\t\t\tbyte[] sendDataBuffer = new byte[sendSocketDataTotalLen+4];\n\t\t\t\tSystem.arraycopy(sendTotalLen, 0, sendDataBuffer, 0, 4);\n\t\t\t\tSystem.arraycopy(sendCategories, 0, sendDataBuffer, 4, 4);\n\t\t\t\tSystem.arraycopy(item.getText().toString().getBytes(), 0, sendDataBuffer, 8, item.getText().toString().getBytes().length);\n\t\t\t\tThreadReadWriterIOSocket.writeDataToSocket(sendDataBuffer);\n\t\t\t}", "public void reload() {\r\n\t\tif(amount > (amountPerClip - currentClip)) {\r\n\t\t\tamount -= (amountPerClip - currentClip);\r\n\t\t\tcurrentClip += (amountPerClip - currentClip);\r\n\t\t}else if(amount > 0) {\r\n\t\t\tcurrentClip += amount;\r\n\t\t\tamount = 0;\r\n\t\t}\r\n\t}", "@Override\n public void refreshDataEntries() {\n }", "void reportPrimaryClipChanged() {\n synchronized (this.mPrimaryClipChangedListeners) {\n if (this.mPrimaryClipChangedListeners.size() <= 0) {\n return;\n }\n Object[] listeners = this.mPrimaryClipChangedListeners.toArray();\n }\n }", "public void dataChanged() {\n // get latest data\n runs = getLatestRuns();\n wickets = getLatestWickets();\n overs = getLatestOvers();\n\n currentScoreDisplay.update(runs, wickets, overs);\n averageScoreDisplay.update(runs, wickets, overs);\n }", "@UnsupportedAppUsage\n void reportPrimaryClipChanged() {\n Object[] arrobject;\n ArrayList<OnPrimaryClipChangedListener> arrayList = this.mPrimaryClipChangedListeners;\n synchronized (arrayList) {\n if (this.mPrimaryClipChangedListeners.size() <= 0) {\n return;\n }\n arrobject = this.mPrimaryClipChangedListeners.toArray();\n }\n int n = 0;\n while (n < arrobject.length) {\n ((OnPrimaryClipChangedListener)arrobject[n]).onPrimaryClipChanged();\n ++n;\n }\n return;\n }", "private void update() {\n if (_dirty) {\n _fmin = _clips.getClipMin();\n _fmax = _clips.getClipMax();\n _fscale = 256.0f/(_fmax-_fmin);\n _flower = _fmin;\n _fupper = _flower+255.5f/_fscale;\n _dirty = false;\n }\n }", "public void update() {\r\n\t\tremoveAll();\r\n\t\tdrawGrid();\r\n\t\tplotDecades();\r\n\t\tgetEntries();\r\n\t}", "private void updateCollectedView() {\n mCollectedCoins = Data.getCollectedCoins();\n mRecyclerViewRec.setVisibility(View.INVISIBLE);\n mRecyclerViewCol.setVisibility(View.VISIBLE);\n mCollectedAdapter.notifyDataSetChanged();\n }", "@Override\n protected void onDataChanged() {\n }", "private void onDataChanged() {\n // When the data changes, we have to recalculate\n // all of the angles.\n int currentAngle = 0;\n int itemAngle = Math.round(360.0f / mData.size());\n for (int i = 0; i < mData.size(); i++) {\n Item it = mData.get(i);\n // change item angles\n it.mStartAngle = currentAngle;\n it.mEndAngle = it.mStartAngle + itemAngle;\n currentAngle = it.mEndAngle;\n // where put the icon\n it.mCenterAngle = it.mStartAngle + (it.mEndAngle - it.mStartAngle) / 2;\n }\n // if free space left in chart\n mData.get(mData.size() - 1).mEndAngle = 360;\n// calcSelectedItem();\n }", "@Override\r\n\tpublic void updateData() {\n\t\t\r\n\t}", "public void update(){\r\n\t\tList<Point> list = new ArrayList<Point>();\r\n\t\t\r\n\t\tlist.addAll(Arrays.asList(points));\r\n\t\t\r\n\t\tsetPoints(list);\r\n\t}", "public void notifyDataSetChanged() {\n if (noxItemCatalog != null) {\n noxItemCatalog.recreate();\n createShape();\n initializeScroller();\n refreshView();\n }\n }", "public void updateDataComp() {\n\t\tdataEntryDao.updateDataComp();\n\t}", "private void updateFilteredData() {\n mainApp.getFilteredData().clear();\n\n for (FilmItem p : mainApp.getFilmData()) {\n if (matchesFilter(p)) {\n \tmainApp.getFilteredData().add(p);\n }\n }\n }", "@Override\n public void onDataSetChanged() {\n final long identityToken = Binder.clearCallingIdentity();\n mPresenter.getStocksData();\n Binder.restoreCallingIdentity(identityToken);\n }", "private void adjustMessierData()\n\t{\n\t\tfor(int i = 0; i < messierList.size(); i++)\n\t\t{\n\t\t\tMessier aMessier = messierList.get(i);\n\t\t\tdouble rightAsc = aMessier.getRADecimalHour();\n\t\t\tdouble hourAngle = theCalculator.findHourAngle(rightAsc, userLocalTime);\n\t\t\taMessier.setHourAngle(hourAngle);\n\t\t\tmessierList.set(i, aMessier);\n\t\t}\n\t}", "public void update() {\n\t\tif (c.getResamplingFactor() != 1) return;\n\t\trenderer.getVolume().updateData();\n\t}", "@Override\n public void onDataChanged() {\n\n }", "void setData(OrderedRealmCollection<LessonData> lessons)\n {\n if (filteredLessons == lessons)\n return;\n this.filteredLessons = lessons;\n notifyDataSetChanged();\n }", "private void dataFilterChanged() {\n\n\t\t// save prefs:\n\t\tappPrefes.SaveData(\"power_show_power\", mShowPower ? \"on\" : \"off\");\n\t\tappPrefes.SaveData(\"power_show_energy\", mShowEnergy ? \"on\" : \"off\");\n\n\t\t// check data status:\n\t\tif (!isPackValid())\n\t\t\treturn;\n\n\t\t// update charts:\n\t\tupdateCharts();\n\n\t\t// sync viewports:\n\t\tchartCoupler.syncCharts();\n\t}", "@Override\n protected void publishResults(CharSequence charSequence, FilterResults results) {\n\n liftList = (ArrayList<Lift>) results.values;\n notifyDataSetChanged();\n }", "private void updateMatches(){\n getContext().getContentResolver().delete(MatchesContract.BASE_CONTENT_URI, null, null);\n\n // Fetch new data\n new FetchScoreTask(getContext()).execute();\n }", "public static void setEntry(PortabilityKnowhowListViewOperation entry) {\n ClipBoardEntryFacade.LOGGER.debug(\"[entry]\" + entry);\n ClipBoardEntryFacade.clipBoard.setEntry(PluginUtil.deepCopy(entry));\n }", "@Override\n public void onDataSetChanged() {\n mStocks = readAllStocks();\n }", "private void updateCards(ListView cardMenu) {\n ObservableList<String> scoresList = FXCollections.observableArrayList();\n for (int i = 0; i < customDeck.size(); i++) {\n scoresList.add(customDeck.get(i).toString());\n }\n cardMenu.setItems(scoresList);\n setCellFormat(cardMenu);\n }", "public void updateData() {}", "public void refreshClipboard() {\n BufferedReader reader;\n ArrayList<String> paths = new ArrayList<>();\n try {\n reader = new BufferedReader(new FileReader(this.clipboardPath));\n String path = reader.readLine();\n while (path != null) {\n paths.add(path);\n path = reader.readLine();\n }\n reader.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n // Sorts the paths by length\n Collections.sort(paths, new Comparator<String>() {\n @Override\n public int compare(String o1, String o2) {\n return o1.length() - o2.length();\n }\n });\n\n paths = checkSubDir(paths);\n\n this.numberOfItems = paths.size();\n this.paths = paths;\n\n }", "private void updateArrayListCoordinates() {\n this.coordinates = makeCoordinatesFromCenterCoordinate(centerPointCoordinate);\n }", "public void AndUpdateCards() {\n String[] projection = {\n PanelingLampContract.FormEntry._ID,\n PanelingLampContract.FormEntry.COLUMN_NAME_TITLE,\n mCategory,\n mPos,\n PanelingLampContract.FormEntry.COLUMN_ACTIVE,\n PanelingLampContract.FormEntry.COLUMN_IS_STANDARD,\n PanelingLampContract.FormEntry.COLUMN_FAV,\n PanelingLampContract.FormEntry.COLUMN_PATH_THUMBNAIL,\n PanelingLampContract.FormEntry.COLUMN_POS_MOTOR_0,\n PanelingLampContract.FormEntry.COLUMN_POS_MOTOR_1,\n PanelingLampContract.FormEntry.COLUMN_POS_MOTOR_2,\n PanelingLampContract.FormEntry.COLUMN_POS_MOTOR_3,\n PanelingLampContract.FormEntry.COLUMN_POS_MOTOR_4,\n PanelingLampContract.FormEntry.COLUMN_LED_0,\n PanelingLampContract.FormEntry.COLUMN_LED_1,\n PanelingLampContract.FormEntry.COLUMN_LED_2,\n PanelingLampContract.FormEntry.COLUMN_LED_3,\n PanelingLampContract.FormEntry.COLUMN_LED_4,\n PanelingLampContract.FormEntry.COLUMN_LED_5,\n PanelingLampContract.FormEntry.COLUMN_LED_6\n };\n\n // How you want the results sorted in the resulting Cursor\n String sortOrder = mPos + \" ASC\";\n\n // Which row to update, based on the ID\n String selection = mCategory + \" LIKE ?\";\n // is true\n String v = mCategoryValue ? \"1\" : \"0\";\n String[] selectionArgs = {v};\n\n\n mCursor = mDB.query(\n PanelingLampContract.FormEntry.TABLE_NAME, // The table to query\n projection, // The columns to return\n selection, // The columns for the WHERE clause\n selectionArgs, // The values for the WHERE clause\n null, // don't group the rows\n null, // don't filter by row groups\n sortOrder // The sort order\n );\n\n mCards = CardHolder.createListfrom(mCursor, mCategory, mPos);\n notifyDataSetChanged();\n }", "protected void audioDataChanged() {\r\n\t\tpv.update();\r\n\t\trepaint(); // is asynchronous\r\n\t}", "public static void syncItems() {\n ArrayList<Contest> keep = null;\n if (contestItems.size() > CONTEST_LIST_SIZE) {\n keep = new ArrayList<>(contestItems.subList(0, CONTEST_LIST_SIZE));\n keep = removeDups(keep);\n // sort and redraw\n Collections.sort(keep, new ContestComparator());\n adapter.clear();\n adapter.addAll(keep);\n //adapter = new ContestItemsAdapter(mCtx, keep);\n }\n\n adapter.notifyDataSetChanged();\n }", "@Override\n public void onDataChanged() {\n }", "@Override\n public void onDataChanged() {\n }", "private void updateFilteredData() {\n\t\tswitch (currentTabScreen) {\n\t\tcase INVENTORY:\n\t\t\tpresentationInventoryData.clear();\n\n\t\t\tfor (RecordObj record: masterInventoryData) {\n\t\t\t\tif (matchesFilter(record)) {\n\t\t\t\t\tpresentationInventoryData.add(record);\n\t\t\t\t} // End if statement\n\t\t\t} // End for loop \n\t\t\tbreak;\n\t\tcase INITIAL:\n\t\t\tpresentationInitialData.clear();\n\n\t\t\tfor (RecordObj record: masterInitialData) {\n\t\t\t\tif (matchesFilter(record)) {\n\t\t\t\t\tpresentationInitialData.add(record);\n\t\t\t\t} // End if statement\n\t\t\t} // End for loop \n\t\t\tbreak;\n\t\tcase SEARCH:\n\t\t\tpresentationSearchData.clear();\n\n\t\t\tfor (RecordObj record: masterSearchData) {\n\t\t\t\tif (matchesFilter(record)) {\n\t\t\t\t\tpresentationSearchData.add(record);\n\t\t\t\t} // End if statement\n\t\t\t} // End for loop \n\t\t\tbreak;\n\t\tdefault:\n\t\t\tbreak;\n\t\t}// End switch statement\n\t}", "@Override\r\n public void onDataSetChanged() {\n }", "public void setUpdateData() {\n positionFenceToUpdateinController = Controller.getPositionFenceInArrayById(this.idFenceToUpdate);\n if(positionFenceToUpdateinController >= 0) {\n Fence fence = Controller.fences.get(positionFenceToUpdateinController);\n ((MainActivity)getActivity()).getSupportActionBar().setTitle(Constant.TITLE_VIEW_UPDATE_FENCE + \": \" + fence.getName());\n this.nameFence.setText(fence.getName());\n this.addressFence.setText(fence.getAddress());\n this.cityFence.setText(fence.getCity());\n this.provinceFence.setText(fence.getProvince());\n this.numberFence.setText(fence.getNumber());\n this.textSMSFence.setText(fence.getTextSMS());\n int index = (int)Constant.SPINNER_RANGE_POSITIONS.get(fence.getRange());\n this.spinnerRange.setSelection(index);\n this.spinnerEvent.setSelection(fence.getEvent());\n }\n }", "public void dataChanged() {\n\t\tif (wijzigInfo)\n\t\t\twijzigInfo();\n\n\t\tsetChanged();\n\t\tnotifyObservers(\"dataChanged\");\n\t}", "public void updateMarks() {\n this.marks.addAll(thisTurnMarks);\n thisTurnMarks.clear();\n if(game != null)\n game.notifyUpdateMarks(this);\n }", "private void update() {\n setPieceType();\n initBackground(pieceIndex);\n }", "@Override\n public boolean onDrag(View v, DragEvent event) {\n final int action = event.getAction();\n\n // Handles each of the expected events\n switch(action) {\n\n case DragEvent.ACTION_DRAG_STARTED:\n // Determines if this View can accept the dragged data\n if (event.getClipDescription().hasMimeType(ClipDescription.MIMETYPE_TEXT_PLAIN)) {\n v.invalidate();\n return true;\n }\n return false;\n case DragEvent.ACTION_DRAG_ENTERED:\n\n v.setBackgroundColor(Color.parseColor(\"#dbdbdb\"));\n v.invalidate();\n return true;\n\n case DragEvent.ACTION_DRAG_LOCATION:\n return true;\n\n case DragEvent.ACTION_DRAG_EXITED:\n v.setBackgroundColor(Color.TRANSPARENT);\n v.invalidate();\n return true;\n\n case DragEvent.ACTION_DROP:\n\n v.setBackgroundColor(Color.TRANSPARENT);\n // Gets the item containing the dragged data\n ClipData.Item item1 = event.getClipData().getItemAt(0);\n ClipData.Item item2 = event.getClipData().getItemAt(1);\n String source_criteriaName = item1.getText().toString();\n int source_criteriaIndex = Integer.parseInt(item2.getText().toString());\n\n\n int whichList = findWhichCriteriaList_itbelongs(source_criteriaName);\n switch (whichList)\n {\n case 0:\n Criteria criteria_Temporary = defaultCriteriaList.get(source_criteriaIndex);\n defaultCriteriaList.remove(source_criteriaIndex);\n project.getCommentList().add(criteria_Temporary);\n break;\n case 1:\n Criteria criteria_Temporary2 = project.getCriteria().get(source_criteriaIndex);\n project.getCriteria().remove(source_criteriaIndex);\n project.getCommentList().add(criteria_Temporary2);\n break;\n case 2:\n break;\n default:\n ;\n }\n\n init();\n\n // Invalidates the view to force a redraw\n v.invalidate();\n\n // Returns true. DragEvent.getResult() will return true.\n return true;\n\n case DragEvent.ACTION_DRAG_ENDED:\n\n // Turns off any color tinting\n // Invalidates the view to force a redraw\n v.invalidate();\n\n // returns true; the value is ignored.\n return true;\n // An unknown action type was received.\n default:\n Log.e(\"DragDrop Example\",\"Unknown action type received by OnDragListener.\");\n break;\n }\n return false;\n }", "public void notifyDataSetChanged() {\n\t\tthis.mModelRssItems = mBusinessRss.getModelRssItem(mRssName,\n\t\t\t\tmOnlyViewUnRead);\n\t\tsuper.notifyDataSetChanged();\n\t}", "private void adjustStarData()\n\t{\n\t\tfor(int i = 0; i < starList.size(); i++)\n\t\t{\n\t\t\tStar aStar = starList.get(i);\n\t\t\tdouble rightAsc = aStar.getRA();\n\t\t\tdouble hourAngle = theCalculator.findHourAngle(rightAsc, userLocalTime);\n\t\t\taStar.setHourAngle(hourAngle);\n\t\t\tstarList.set(i, aStar);\n\t\t}\n\t}", "public void update() {\n\t\tremoveAll();\n\t\tdrawGraph();\n\t\tplotEntries();\n\t}", "public void updateOnMaskChange() {\n if(maskList != null) {\n int[] displayMaskData = resolveMasks();\n maskRaster.setDataElements(0, 0, imgWidth, imgHeight, displayMaskData);\n maskImage.setData(maskRaster);\n }\n }", "@Override\r\n\tpublic void notifyDataSetChanged() {\n\t\tsuper.notifyDataSetChanged();\r\n\t\tLog.v(\"DEBUG\", \"CHANGE\");\r\n\t}", "public void update_list_view() {\n\n Collections.sort(mA.alarms);\n\n // make array adapter to bind arraylist to listview with new custom item layout\n AlarmsAdapter aa = new AlarmsAdapter(mA, R.layout.alarm_entry, mA.alarms);\n alarm_list_view.setAdapter(aa);\n registerForContextMenu(alarm_list_view);\n aa.notifyDataSetChanged(); // to refresh items in the list\n }", "@Override\n public boolean onDrag(View v, DragEvent event) {\n final int action = event.getAction();\n\n // Handles each of the expected events\n switch(action) {\n\n case DragEvent.ACTION_DRAG_STARTED:\n // Determines if this View can accept the dragged data\n if (event.getClipDescription().hasMimeType(ClipDescription.MIMETYPE_TEXT_PLAIN)) {\n v.invalidate();\n return true;\n }\n return false;\n case DragEvent.ACTION_DRAG_ENTERED:\n\n v.setBackgroundColor(Color.parseColor(\"#dbdbdb\"));\n v.invalidate();\n return true;\n\n case DragEvent.ACTION_DRAG_LOCATION:\n return true;\n\n case DragEvent.ACTION_DRAG_EXITED:\n v.setBackgroundColor(Color.TRANSPARENT);\n v.invalidate();\n return true;\n\n case DragEvent.ACTION_DROP:\n\n v.setBackgroundColor(Color.TRANSPARENT);\n // Gets the item containing the dragged data\n ClipData.Item item1 = event.getClipData().getItemAt(0);\n ClipData.Item item2 = event.getClipData().getItemAt(1);\n String source_criteriaName = item1.getText().toString();\n int source_criteriaIndex = Integer.parseInt(item2.getText().toString());\n\n\n int whichList = findWhichCriteriaList_itbelongs(source_criteriaName);\n switch (whichList)\n {\n case 0:\n Criteria criteria_Temporary = defaultCriteriaList.get(source_criteriaIndex);\n defaultCriteriaList.remove(source_criteriaIndex);\n project.getCriteria().add(criteria_Temporary);\n break;\n case 1:\n break;\n case 2:\n Criteria criteria_Temporary2 = project.getCommentList().get(source_criteriaIndex);\n project.getCommentList().remove(source_criteriaIndex);\n project.getCriteria().add(criteria_Temporary2);\n break;\n default:\n ;\n }\n\n init();\n\n // Invalidates the view to force a redraw\n v.invalidate();\n\n // Returns true. DragEvent.getResult() will return true.\n return true;\n\n case DragEvent.ACTION_DRAG_ENDED:\n\n // Turns off any color tinting\n // Invalidates the view to force a redraw\n v.invalidate();\n\n // returns true; the value is ignored.\n return true;\n // An unknown action type was received.\n default:\n Log.e(\"DragDrop Example\",\"Unknown action type received by OnDragListener.\");\n break;\n }\n return false;\n }", "private void refreshDataPopup() {\n ObservableList<TblCompanyBalanceBankAccount> companyBalanceBankAccountSourceItems = FXCollections.observableArrayList(loadAllDataCompanyBalanceBankAccount(selectedBalance));\r\n cbpCompanyBalanceBankAccountSource.setItems(companyBalanceBankAccountSourceItems);\r\n\r\n //Company Balance - Bank Account (destination)\r\n ObservableList<TblCompanyBalanceBankAccount> companyBalanceBankAccountDestinationItems = FXCollections.observableArrayList(loadAllDataCompanyBalanceBankAccount(selectedBalance));\r\n cbpCompanyBalanceBankAccountDestination.setItems(companyBalanceBankAccountDestinationItems);\r\n }", "private void updateReceivedCoinsInBackground() {\n Log.d(TAG, \"[updateReceivedCoinsInBackground] updating...\");\n Data.retrieveAllCoinsFromCollection(Data.RECEIVED, new OnEventListener<String>() {\n @Override\n public void onSuccess(String object) {\n // If received coins view is currently visible, update the view (which also updates\n // the data), otherwise just update the data\n if (mRecyclerViewRec.getVisibility() == View.VISIBLE) {\n updateReceivedView();\n } else {\n mReceivedCoins = Data.getReceivedCoins();\n }\n Log.d(TAG, \"[updateReceivedCoinsInBackground] updated\");\n }\n @Override\n public void onFailure(Exception e) {\n Log.d(TAG, \"[updateReceivedCoinsInBackground] failed to retrieve coins: \", e);\n }\n });\n }", "private void updateGameDescriptorAfterUndo() {\n roundNumber = roundsHistory.peek().getRoundNumber();\n gameDescriptor.setTerritoryMap(roundsHistory.peek().getCopyOfMap()); //This Set the gameDescriptor Territories as copy\n gameDescriptor.setPlayersList(roundsHistory.peek().getCopyOfPlayersList()); //This Set the gameDescriptor players as copy\n updateTurnsObjectQueue();\n }", "public void onDataChanged(IData data) {\r\n\t this.data = data;\r\n\t repaint();\r\n\t}", "@Override\r\n\tpublic void notifyObservers(){\n\t\tfor (Observer o : ol){\r\n\t\t\t//iterate through GameCollection to avoid passing iterator to views\r\n\t\t\tIterator iterator = gc.getIterator();\r\n\t\t\t//if MapView, iterate through game list and provide new state information\r\n\t\t\tif (o instanceof MapView){\r\n\t\t\t\twhile(iterator.hasNext()){\r\n\t\t \t\tGameObject g = iterator.getNext();\r\n\t\t\t\t\to.update(gwp, g);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t//if PointsView, get all point values from GameCollection and provide values\r\n\t\t\telse if (o instanceof PointsView){\r\n\t\t\t\t//cast as PointsView to use overloaded update methods\r\n\t\t\t\tPointsView p = (PointsView)o;\r\n\t\t\t\t//update all point values using overloaded update method, providing string tag to PointsView to differentiate which value is which\r\n\t\t\t\t//also pass in \"hard\" values accessed from GameCollection to avoid giving views access directly to GameCollection\r\n\t\t\t\tp.update(gwp, \"time\", (600-gc.getElapsedTime())/10);\r\n\t\t\t\tp.update(gwp, \"pointsForFish\", gc.getPointsForFish());\r\n\t\t\t\tp.update(gwp, \"pointsFishInNet\", tempPointsFishInNet);\r\n\t\t\t\tp.update(gwp, \"totalPoints\", gc.getTotalPoints());\r\n\t\t\t\tp.update(gwp, \"sharksScooped\", gc.getSharksScooped());\r\n\t\t\t\t//use 2nd overloaded update() method in PointsView to pass sound as a boolean\r\n\t\t\t\tp.update(gwp,gc.getSound());\r\n\t\t\t}\r\n\t\t}\r\n\t}", "@Override\n\tpublic void update(Observable observable, Object data) {\n\t\tIGameWorld gw = (IGameWorld) data;\n\t\tthis.pointsValueLabel.setText(\"\" + gw.getPlayerScore());\n\t\tthis.missileValueLabel.setText(\"\" + gw.getPSMissileCount());\n\t\tthis.gameTickValueLabel.setText(\"\" + gw.getRealTime());\n\t\tthis.lifeValueLabel.setText(\"\" + gw.getLife());\n\t\t\n\t\t//If sound flag dont match\n\t\tif(gw.getSound() != this.sound) {\n\t\t\tif(gw.getSound() == true) {\n\t\t\t\tthis.soundValueLabel.setText(\"ON\");\n\t\t\t\tthis.sound = true;\n\t\t\t\t//new BGSound(\"bgm.mp3\").play();\n\t\t\t//\tbgm.play();\n\t\t\t\tSystem.out.println(\"Sound ON\");\n\t\t\t\t\n\t\t\t}else {\n\t\t\t\tthis.soundValueLabel.setText(\"OFF\");\n\t\t\t\tthis.sound = false;\n\t\t\t//\tbgm.pause();\n\t\t\t}\n\t\t}\n\n\t\tthis.repaint(); //Redraw PointsView\n\t}", "public void updateComponents(){\n adapter.updateItems();\n }", "@Override\n\tprotected void onResume() {\n\t\tsuper.onResume();\n\t\tfigures.clear();\n\t\tfillData();\n\t\tboxAdapter.notifyDataSetChanged();\n\n\t}", "void refreshParts() {\n refreshParts(filter.getValue());\n }", "@Override\n protected void updateItem(Podcast podcast, boolean empty) {\n boolean wasEmpty = isEmpty();\n super.updateItem(podcast, empty);\n\n //Stores the podcast so it can be used later\n this.podcast = podcast;\n\n //Will be used to monitor settings to display icons etc.\n final ChangeListener<Boolean> changeListener =(observableValue, oldValue, newValue) -> {\n if(model.DEBUG)\n System.out.println(\"[\"+getClass().getName()+\"] The observableValue has \" + \"changed: oldValue = \" + oldValue + \", newValue = \" + newValue);\n };\n //if empty || null hides the libcell components\n if (empty || podcast == null) {\n podCastTitle.setVisible(false);\n podcastDuration.setVisible(false);\n podcastPubDate.setVisible(false);\n podcastDuration.setVisible(false);\n HBox temp = new HBox();\n temp.setPrefHeight(55.0);\n setGraphic(temp);\n } else {\n\n //Checks if the file is downloaded to the directory\n if(!this.podcast.isDownloaded()){\n queueBtn.setText(\"Download & Queue\");\n queueBtn.setWrapText(true);\n }\n\n //Fills in the information of the podcast into the cell\n podCastTitle.setVisible(true);\n podCastTitle.setText(podcast.getTitle());\n podcastCover.setImage(new Image(podcast.getImgPath()));\n podcastPubDate.setVisible(true);\n podcastPubDate.setText(\"Published: \"+podcast.getPubDate());\n podcastDuration.setVisible(true);\n podcastDuration.setText(podcast.getDuration());\n\n //Adds tooltip to remove button\n Tooltip.install(removeBtn, new Tooltip(\"Click for more options\"));\n\n //If this cell was just added, assign listeners\n //Only done once to prevent wasted resources\n if(wasEmpty != empty){\n this.podcast.hasNotesProperty().addListener(changeListener);\n this.podcast.isQueuedProperty().addListener(changeListener);\n queueBtn.disableProperty().bind(this.podcast.isQueuedProperty());\n viewNotes.disableProperty().bind(this.podcast.hasNotesProperty());\n }\n\n /*\n\n Following if statements adds tooltips based on properties\n of the podcast being displayed\n\n */\n if(podcast.hasNotes()){\n Tooltip.install(viewNotes, new Tooltip(\"View the notes for this podcast\"));\n }\n\n if(!podcast.isQueued()){\n Tooltip.install(queueBtn, new Tooltip(\"Add this podcast to your queue!\"));\n }\n\n setGraphic(container);\n }\n\n\n }", "void notifyPrisonerDataChanged();", "void setAllData()\n {\n this.filteredLessons = allLessons;\n notifyDataSetChanged();\n }", "private void setDataOnList() {\r\n if (SharedPref.getSecureTab(MediaVaultController.getSharedPreferencesInstance()).equals(Constant.SECURE_TAB)) {\r\n dataModelArrayList.addAll(secureMediaFileDb.getSecureUnarchiveFileList());\r\n Collections.sort(dataModelArrayList);\r\n position = dataModelArrayList.indexOf(imageDataModel);\r\n } else if (SharedPref.getListType(MediaVaultController.getSharedPreferencesInstance()).equals(Constant.LIST_VIEW)) {\r\n if (Constant.ALL_VIEW.equalsIgnoreCase(SharedPref.getAllType(sharedPreferences))) {\r\n dataModelArrayList.addAll(GalleryHelper.imageDataModelList);\r\n } else if (Constant.VIDEO_VIEW.equalsIgnoreCase(SharedPref.getVideoType(sharedPreferences))) {\r\n dataModelArrayList.addAll(VideoViewData.imageDataModelList);\r\n } else if (Constant.AUDIO_VIEW.equalsIgnoreCase(SharedPref.getAudioType(sharedPreferences))) {\r\n dataModelArrayList.addAll(AudioViewData.imageDataModelList);\r\n } else if (Constant.PHOTO_VIEW.equalsIgnoreCase(SharedPref.getPhotoType(sharedPreferences))) {\r\n dataModelArrayList.addAll(PhotoViewData.imageDataModelList);\r\n }\r\n Collections.sort(dataModelArrayList);\r\n position = dataModelArrayList.indexOf(imageDataModel);\r\n } else if (SharedPref.getAlbumType(MediaVaultController.getSharedPreferencesInstance()).equals(Constant.ALBUM_VIEW)) {\r\n if (Constant.ALL_VIEW.equalsIgnoreCase(SharedPref.getAllType(sharedPreferences))) {\r\n dataModelArrayList.addAll(GalleryHelperBaseOnId.dataModelArrayList);\r\n } else if (Constant.VIDEO_VIEW.equalsIgnoreCase(SharedPref.getVideoType(sharedPreferences))) {\r\n dataModelArrayList.addAll(VideoViewDataOnIdBasis.dataModelArrayList);\r\n } else if (Constant.AUDIO_VIEW.equalsIgnoreCase(SharedPref.getAudioType(sharedPreferences))) {\r\n dataModelArrayList.addAll(AudioViewDataOnIdBasis.dataModelArrayList);\r\n } else if (Constant.PHOTO_VIEW.equalsIgnoreCase(SharedPref.getPhotoType(sharedPreferences))) {\r\n dataModelArrayList.addAll(PhotoViewDataOnIdBasis.dataModelArrayList);\r\n }\r\n Collections.sort(dataModelArrayList);\r\n }\r\n }", "@Override\n protected void publishResults(CharSequence constraint, FilterResults results) {\n itemsToAdapt.clear();\n itemsToAdapt.addAll((List) results.values);\n notifyDataSetChanged();\n }", "void updateData();", "public void onDataSetChanged();", "@Override \n\t\tprotected void publishResults(CharSequence constraint, FilterResults results)\n\t\t{\n\t\t\t\n \n filteredData = (ArrayList<IndexEntry>) results.values;\n notifyDataSetChanged();\n \n if (callback != null){\n \tcallback.valuesFiltered();\n \tcallback = null;\n }\n \n\t\t}", "public void update() {\r\n\t\tif (firstRow > maxRows) {\r\n\t\t\tfirstRow = maxRows;\r\n\t\t\tfromRowField.setText(firstRow + \"\");\r\n\t\t}\r\n\t\tif (lastRow > maxRows) {\r\n\t\t\tlastRow = maxRows;\r\n\t\t\ttoRowField.setText(lastRow + \"\");\r\n\t\t}\r\n\t\tif (firstColumn > maxColumns) {\r\n\t\t\tfirstColumn = maxColumns;\r\n\t\t\tfromColumnField.setText(firstColumn + \"\");\r\n\t\t}\r\n\t\tif (lastColumn > maxColumns) {\r\n\t\t\tlastColumn = maxColumns;\r\n\t\t\ttoColumnField.setText(lastColumn + \"\");\r\n\t\t}\r\n\r\n\t\tIterator i = listeners.iterator();\r\n\t\twhile (i.hasNext()) {\r\n\t\t\t((DataControlListener) i.next()).update(firstRow, lastRow, firstColumn, lastColumn, fractionDigits);\r\n\t\t}\r\n\t}", "public void dataSetChanged() {\n int count = this.mAdapter.getCount();\n this.mExpectedAdapterCount = count;\n boolean z = this.mItems.size() < (this.mOffscreenPageLimit * 2) + 1 && this.mItems.size() < count;\n int i = this.mCurItem;\n this.mChangeData = true;\n boolean z2 = z;\n int i2 = i;\n int i3 = 0;\n boolean z3 = false;\n while (i3 < this.mItems.size()) {\n ItemInfo itemInfo = this.mItems.get(i3);\n int itemPosition = this.mAdapter.getItemPosition(itemInfo.object);\n if (itemPosition != -1) {\n if (itemPosition == -2) {\n this.mItems.remove(i3);\n i3--;\n if (!z3) {\n this.mAdapter.startUpdate((ViewGroup) this);\n z3 = true;\n }\n this.mAdapter.destroyItem((ViewGroup) this, itemInfo.position, itemInfo.object);\n if (this.mCurItem == itemInfo.position) {\n i2 = Math.max(0, Math.min(this.mCurItem, count - 1));\n }\n } else if (itemInfo.position != itemPosition) {\n if (itemInfo.position == this.mCurItem) {\n i2 = itemPosition;\n }\n itemInfo.position = itemPosition;\n }\n z2 = true;\n }\n i3++;\n }\n if (z3) {\n this.mAdapter.finishUpdate((ViewGroup) this);\n }\n if (z2) {\n int childCount = getChildCount();\n for (int i4 = 0; i4 < childCount; i4++) {\n LayoutParams layoutParams = (LayoutParams) getChildAt(i4).getLayoutParams();\n if (!layoutParams.isDecor) {\n layoutParams.widthFactor = 0.0f;\n }\n }\n setCurrentItemInternal(i2, false, true);\n requestLayout();\n }\n }", "public void notifyDataSetChanged() {\n generateDataList();\n mSectionedExpandableGridAdapter.notifyDataSetChanged();\n }", "public void update() {\n\tfireContentsChanged(this, 0, getSize());\n }", "public void onDataChanged(){}", "private void updateData() {\n // store if checkbox is enabled and update the label accordingly\n updateOneItem(jcbMaxTracks, jsMaxTracks, jnMaxTracks, Variable.MAXTRACKS,\n Variable.MAXTRACKS_ENABLED);\n updateOneItem(jcbMaxSize, jsMaxSize, jnMaxSize, Variable.MAXSIZE, Variable.MAXSIZE_ENABLED);\n updateOneItem(jcbMaxLength, jsMaxLength, jnMaxLength, Variable.MAXLENGTH,\n Variable.MAXLENGTH_ENABLED);\n if (jcbOneMedia.isSelected()) {\n data.put(Variable.ONE_MEDIA, jcbMedia.getSelectedItem());\n data.put(Variable.ONE_MEDIA_ENABLED, Boolean.TRUE);\n } else {\n // keep old value... data.remove(Variable.KEY_MEDIA);\n data.put(Variable.ONE_MEDIA_ENABLED, Boolean.FALSE);\n }\n data.put(Variable.CONVERT_MEDIA, jcbConvertMedia.isSelected());\n data.put(Variable.RATING_LEVEL, jsRatingLevel.getValue());\n data.put(Variable.NORMALIZE_FILENAME, jcbNormalizeFilename.isSelected());\n }", "public void notifyDataSetChanged() {\n viewState.setShouldRefreshEvents(true);\n invalidate();\n }", "private void updateWhereItemListData() {\n ModelWhereItem itemDB = new ModelWhereItem(database);\n ArrayList<WhereItem> itemList = itemDB.WSfindItemsByFields(selectedCityId,selectedDistrictId,selectedStreetId,selectedCategoryId);\n RecyclerViewAdapter recyclerViewAdapter = new RecyclerViewAdapter(getContext(),itemList,gridViewMenuAdapter,viewPagerSlideAdapter);\n recyclerView.setAdapter(recyclerViewAdapter);\n\n // tweaks cho recycler view\n recyclerView.setHasFixedSize(true);\n //recyclerView.setItemViewCacheSize(20);\n recyclerView.setDrawingCacheEnabled(true);\n //recyclerView.setDrawingCacheQuality(View.DRAWING_CACHE_QUALITY_HIGH);\n\n changeTab(0);\n }", "private synchronized void update() {\n int numberOfPoints = buffer.get(0).size();\n if (numberOfPoints == 0) return;\n\n for (int i = 0; i < getNumberOfSeries(); i++) {\n final List<Double> bufferSeries = buffer.get(i);\n final List<Double> dataSeries = data.get(i);\n dataSeries.clear();\n dataSeries.addAll(bufferSeries);\n bufferSeries.clear();\n }\n\n //D.info(SineSignalGenerator.this, \"Update triggered, ready: \" + getNumberOfSeries() + \" series, each: \" + data[0].length + \" points\");\n bufferIdx = 0;\n\n // Don't want to create event, just \"ping\" listeners\n setDataReady(true);\n setDataReady(false);\n }", "@Override\n public void onDataChanged(DataEventBuffer dataEventBuffer) {\n for (DataEvent event : dataEventBuffer) {\n if (event.getType() == DataEvent.TYPE_CHANGED) {\n // DataItem changed\n DataItem item = event.getDataItem();\n if (item.getUri().getPath().compareTo(\"/latlnglist\") == 0) {\n\n DataMap dataMap = DataMapItem.fromDataItem(item).getDataMap();\n\n Log.d(\"hudwear\", \"new data, sending message to handler\");\n\n Message m = new Message();\n Bundle b = new Bundle();\n b.putDouble(\"latitude\", dataMap.getDouble(\"latitude\"));\n b.putDouble(\"longitude\", dataMap.getDouble(\"longitude\"));\n m.setData(b);\n handler.sendMessage(m);\n }\n\n } else if (event.getType() == DataEvent.TYPE_DELETED) {\n // DataItem deleted\n }\n }\n }", "void onDataChanged();", "public void onDataChanged();", "public void updateData(List<Track> tracks) {\n mTracks = tracks;\n notifyDataSetChanged();\n }", "private void updateUI() {\n mLatestFeedsAdapter.notifyDataSetChanged();\n }", "void setClip(Boolean[][] clip)\n {\n this.clip = clip;\n }", "private void setData() {\n\n if (id == NO_VALUE) return;\n MarketplaceItem item = ControllerItems.getInstance().getModel().getItemById(id);\n if (item == null) return;\n\n ControllerAnalytics.getInstance().logItemView(id, item.getTitle());\n\n if (item.getPhotos() != null\n && item.getPhotos().size() > 0 &&\n !TextUtils.isEmpty(item.getPhotos().get(0).getSrc_big(this)))\n Picasso.with(this).load(item.getPhotos().get(0).getSrc_big(this)).into((ImageView) findViewById(R.id.ivItem));\n else if (!TextUtils.isEmpty(item.getThumb_photo()))\n Picasso.with(this).load(item.getThumb_photo()).into((ImageView) findViewById(R.id.ivItem));\n\n adapter.updateData(item, findViewById(R.id.rootView));\n }", "private void expensesUpdateWaterfallChart() {\n\n waterfallData.clear();\n waterfallData = DBGetExpenses.forEachDayChallengeWasRunning(key1OfActiveChallenge, goal);\n //waterfall.data(waterfallData);\n //waterfallView.invalidate();\n }", "public void setData1(ArrayList<CurrencyModel> currencyModelArrayList){\n if (items != null) {\n CurrDiffCallback postDiffCallback = new CurrDiffCallback(currencyModelArrayList, items);\n DiffUtil.DiffResult diffResult = DiffUtil.calculateDiff(postDiffCallback);\n\n items.clear();\n items.addAll(currencyModelArrayList);\n diffResult.dispatchUpdatesTo(this);\n Log.d(TAG, \"setData: dispatched to adapter\");\n } else {\n // first initialization\n items = currencyModelArrayList;\n }\n }", "private void refreshList() {\n\n Requester.getInstance().cancelPendingRequests(BrowseCoursesNew.TAG);\n mWishListAdapter.clearData();\n\n refreshView();\n\n wishCourses = new WishCourses(mHandler);\n wishCourses.sendWishlistCoursesRequest();\n }", "@Override\n protected void onContentsChanged(int slot) {\n setChanged();\n }", "public void updateCardList(List<Entry> activityFeed) {\n\n List<Entry> newEntrytoAddList = new ArrayList<>();\n List<Entry> entriesToRemove = new ArrayList<>();\n\n //check if it is first run or refreshing list\n\n\n if (messagesHistory != null) {\n //remove deleted projects\n for (Entry entry : messagesHistory) {\n boolean stillExist = false;\n for (Entry entryFeed : activityFeed) {\n\n if (Objects.equals(entryFeed.getUpdated(), entry.getUpdated())) {\n stillExist = true;\n }\n }\n if (!stillExist) {\n entriesToRemove.add(entry);\n }\n }\n\n //add only new project\n for (Entry newEntry : activityFeed) {\n boolean duplicate = false;\n for (Entry currentEntry : messagesHistory) {\n if (Objects.equals(currentEntry.getUpdated(), newEntry.getUpdated())) {\n duplicate = true;\n }\n }\n if (!duplicate) {\n newEntrytoAddList.add(newEntry);\n }\n }\n\n\n //delete entries\n for (Entry toDelete : entriesToRemove) {\n cardView.remove(toDelete);\n }\n //add new entries\n for (Entry item : newEntrytoAddList) {\n cardView.add(0, item);\n new Handler().postDelayed(() -> {\n cardView.notifyInserted(0);\n rv.scrollToPosition(0);\n }, 500);\n\n }\n\n\n }\n boolean toNotify = false;\n if (cardView.getItemCount() == 0) {\n\n toNotify = true;\n messages.addAll(activityFeed);\n }\n\n //save cards history for later comparing if old entry were deleted or new were added\n messagesHistory = new ArrayList<>(messages);\n Handler handler = new Handler();\n boolean finalToNotify = toNotify;\n handler.postDelayed(() -> {\n if (finalToNotify) {\n cardView.notifyDataSetChanged();\n }\n AnimationUtil.stopRefreshAnimation(swipeRefreshLayout);\n }, 1000);\n }", "public void updateTempList() {\n if (disableListUpdate == 0) {\n tempAdParts.clear();\n LatLngBounds bounds = mapboxMap.getProjection().getVisibleRegion().latLngBounds;\n iterator = AdParts.listIterator();\n while (iterator.hasNext()) {\n current = iterator.next();\n if (bounds.contains(current.getLatLng())) {\n tempAdParts.add(current);\n }\n }\n AdAdapter adapter = new AdAdapter(MainActivity.this, tempAdParts);\n listView.setAdapter(adapter);\n }\n }", "public void updateData() {\n\t\tcal = eventsData.getCalendar();\n\t\tfirstDayOfWeek = eventsData.getFirstDayOfWeek();\n\t\tcurrentDayOfMonth = eventsData.getDayNumber();\n\t\tnumberOfDays = eventsData.getNumberOfDays();\n\t\tnumberOfWeeks = eventsData.getNumberOfWeeks();\n\t\tyear = eventsData.getYearNumber();\n\t\tmonth = eventsData.getMonthNumber();\n\t\tday = eventsData.getDayNumber();\n\t\tweek = eventsData.getDayOfWeek();\n\t}", "public void onDataChanged(IData data) {\r\n setData(data);\r\n }", "public void applyUpdates() {\r\n synchronized (visualItemMap) {\r\n adder.execute(parentGroup);\r\n for (VisualItem3D item : visualItemMap.values()) {\r\n item.applyTransform();\r\n }\r\n }\r\n }", "public void updatePositioningData(PositioningData data);", "public void updateDataSet(ArrayList<BiddingResources> biddingPeringkatList)\n {\n this.biddingPeringkatList = biddingPeringkatList;\n notifyDataSetChanged();\n }", "public void update()\n\t{\n\t\t//update the view's list of movies...\n\t\tthis.getRemoveButton().setEnabled((this.database.getNumberOfMovies()>0));\n\t\tthis.movieList.setListData(this.database.toList());\n\t}", "private void refreshData() {\n // Prevent unnecessary refresh.\n if (mRefreshDataRequired) {\n // Mark all entries in the contact info cache as out of date, so\n // they will be looked up again once being shown.\n mAdapter.invalidateCache();\n fetchCalls();\n mRefreshDataRequired = false;\n }\n }", "@Override\n\tpublic void notifyDataSetChanged() {\n\t\tsuper.notifyDataSetChanged();\n\t\tsetIndexer(list);\n\t}", "@Override\r\n public final void update() {\r\n\r\n logger.entering(this.getClass().getName(), \"update\");\r\n\r\n setFilterMap();\r\n\r\n logger.exiting(this.getClass().getName(), \"update\");\r\n\r\n }", "public void updateDataSet(ArrayList<JobSpecBean> dataList) {\n\t\tthis.dataList = dataList;\n\t\tnotifyDataSetChanged();\n\t}" ]
[ "0.59372103", "0.5736694", "0.56753266", "0.55703", "0.55004424", "0.5449395", "0.5394818", "0.536567", "0.5344344", "0.5333108", "0.53279996", "0.5304046", "0.5299881", "0.52896565", "0.52604014", "0.5249059", "0.5229612", "0.5223233", "0.5155945", "0.5131103", "0.5127063", "0.5111922", "0.5111097", "0.5100653", "0.5093557", "0.50842494", "0.50589204", "0.50530845", "0.50267863", "0.50249076", "0.50136036", "0.5010439", "0.50093293", "0.4998169", "0.49960476", "0.4994904", "0.49915728", "0.49915728", "0.49858212", "0.49725688", "0.4959916", "0.49527967", "0.4949978", "0.4936849", "0.49261123", "0.49193895", "0.49192223", "0.4904626", "0.49037346", "0.4901071", "0.48966756", "0.48878035", "0.48809066", "0.48791274", "0.48742932", "0.48665547", "0.48647267", "0.48521203", "0.48515773", "0.48411465", "0.48364544", "0.48315057", "0.48284417", "0.4826928", "0.482685", "0.48266527", "0.48253316", "0.48246115", "0.4822141", "0.48149273", "0.48007092", "0.47930115", "0.47922269", "0.4788282", "0.4787139", "0.47866017", "0.47796312", "0.4776378", "0.4760962", "0.47589552", "0.475811", "0.47578752", "0.47525686", "0.47493303", "0.47440144", "0.47290027", "0.47118232", "0.47082648", "0.47015205", "0.4701021", "0.46977112", "0.4691046", "0.46882236", "0.46881726", "0.46862382", "0.46804795", "0.4672592", "0.46625844", "0.4659524", "0.4659048", "0.46552163" ]
0.0
-1
Filter Class utilised in v2
public void filter(String charText) { charText = charText.toLowerCase(); //countries.clear(); //countries = DashboardFragment.countriesList; CountryFragment.countriesList.clear(); if (charText.length() == 0) { CountryFragment.countriesList.addAll(countries); // countries.addAll(DashboardFragment.countriesList); } else { for (Countries wp : countries) { if (wp.getCountry().toLowerCase().contains(charText)) { CountryFragment.countriesList.add(wp); //countries.add(wp); } } } notifyDataSetChanged(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Filter getFilter();", "public Filter () {\n\t\tsuper();\n\t}", "public String getFilter();", "String getFilter();", "FeatureHolder filter(FeatureFilter filter);", "public interface Filter {\n\n}", "public Filter() {\n }", "public abstract Filter<T> filter();", "java.lang.String getFilter();", "@SuppressWarnings(\"unused\")\n\tprivate Filter() {\n\n\t}", "@Override public Filter getFilter() { return null; }", "public abstract void filter();", "BuildFilter defaultFilter();", "@Override\n public int filterOrder() {\n return 1;\n }", "@Override\n public int filterOrder() {\n return 1;\n }", "@Override\n\tpublic void filterChange() {\n\t\t\n\t}", "private ProductFilterUtils(){}", "public ConcatFilter() {\n super();\n }", "private static Filter newFilter()\r\n {\r\n Filter filter = new Filter(\"filter1\", new Source(\"display1\", \"name1\", \"server\", \"key1\"));\r\n filter.getOtherSources().add(filter.getSource());\r\n Group group = new Group();\r\n group.addFilterCriteria(new Criteria(\"field1\", Conditional.EQ, \"123\"));\r\n Group group2 = new Group();\r\n group2.addFilterCriteria(new Criteria(\"field1\", Conditional.EQ, \"124\"));\r\n group.addFilterGroup(group2);\r\n filter.setFilterGroup(group);\r\n return filter;\r\n }", "@Override\n public boolean shouldFilter() {\n return true;\n }", "public interface iFilter {\n\n /**\n * method to add a value to datastructure.\n *\n * @param value\n */\n void add(String value);\n\n /**\n * method to check whether datastructure has value.\n *\n * @param value\n * @return boolean\n */\n boolean contains(String value);\n}", "public abstract String getDefaultFilter ();", "@DISPID(-2147412069)\n @PropGet\n java.lang.Object onfilterchange();", "public ObjectFilter()\n\t{\n\t}", "@Override\n public Filter getFilter() {\n\n return new Filter() {\n @Override\n protected FilterResults performFiltering(CharSequence charSequence) {\n\n String charString = charSequence.toString();\n\n if (charString.isEmpty()) {\n\n mDataset = mArrayList;\n } else {\n\n ArrayList<DataObject> filteredList = new ArrayList<>();\n\n for (DataObject data : mArrayList) {\n\n if (data.getid().toLowerCase().contains(charString.toLowerCase()) || data.getname().toLowerCase().contains(charString.toLowerCase())) {\n\n filteredList.add(data);\n }\n }\n\n mDataset = filteredList;\n }\n\n FilterResults filterResults = new FilterResults();\n filterResults.values = mDataset;\n return filterResults;\n }\n\n @Override\n protected void publishResults(CharSequence charSequence, FilterResults filterResults) {\n mDataset = (ArrayList<DataObject>) filterResults.values;\n notifyDataSetChanged();\n }\n };\n }", "public PipelineFilter()\n {\n }", "protected FilterImpl() {\n this(SparkUtils.ALL_PATHS);\n }", "public GroupsOnlySenseFilter() {\n \n }", "@Override\n public Filter getFilter() {\n if(filter == null)\n {\n filter=new CustomFilter();\n }\n return filter;\n }", "public Filters() {\n }", "public ValidatorFilter() {\n\n\t}", "CompiledFilter() {\n }", "@Override\n\tpublic int filterOrder() {\n\t\treturn 1;\n\t}", "public FilterData() {\n }", "@Override\n\tpublic boolean shouldFilter() {\n\t\treturn true;\n\t}", "public FalseFilter() {\n\t\t//can be ignored\n\t}", "interface Filter extends Mutator {\n\n }", "public static NodeFilter makeFilter()\n\t{\n\t\tNodeFilter[] fa = new NodeFilter[3];\n\t\tfa[0] = new HasAttributeFilter(\"HREF\");\n\t\tfa[1] = new TagNameFilter(\"A\");\n\t\tfa[2] = new HasParentFilter(new TagNameFilter(\"H3\"));\n\t\tNodeFilter filter = new AndFilter(fa);\n\t\treturn filter;\n\t}", "public Filter getContactFilter();", "StandardFilterBuilder standardFilter(int count);", "void setFilter(Filter f);", "public HttpFilter() { }", "private Filter ssoFilter() {\n\t\tCompositeFilter filter = new CompositeFilter();\n\t\tList<Filter> filters = new ArrayList<>();\n\t\tfilters.add(ssoFilter(facebook(), \"/login/facebook\"));\n\t\tfilters.add(ssoFilter(github(), \"/login/github\"));\n//\t\tfilters.add(ssoFilter(twitter(), \"/login/twitter\"));\n\t\tfilters.add(ssoFilter(linkedin(), \"/login/linkedin\"));\n\t\tfilter.setFilters(filters);\n\t\treturn filter;\n\t}", "void setFilter(String filter);", "protected AbstractJoSQLFilter ()\n {\n\n }", "IViewFilter getViewFilter();", "PropertiedObjectFilter<O> getFilter();", "protected NullFilterImpl() {\n }", "public abstract void updateFilter();", "public Filter condition();", "public FileFilter() {\n this.filterExpression = \"\";\n }", "FeedbackFilter getFilter();", "FilterInfo addFilter(String filtercode, String filter_type, String filter_name, String disableFilterPropertyName, String filter_order);", "public interface FilterService {\n\n /**Method that will getFilteredItems the filter and return the result as a JSONArray\n * @return the filtered result as a JSONArray*/\n List<JSONObject> getFilteredItems();\n\n /**Method that returns the name of the class\n * @return class simple name*/\n String getFilterName();\n\n /**Method that prints all items on the list*/\n void printFilteredItems();\n\n /**Method that prints the number of the items on the list*/\n void printNumberOfFilteredItems();\n\n // TODO IMPLEMENTED WITH OSGI Method that will return the number of the selected number, used for managing the filters\n //int getFilterNumber();\n}", "@Override\r\n\t public Filter getFilter() {\n\t return null;\r\n\t }", "@Override\n public Filter getFilter() {\n return main_list_filter;\n }", "public Filter (Filter filter) {\n this.name = filter.name;\n this.type = filter.type;\n this.pred = new FilterPred(filter.pred);\n this.enabled = filter.enabled;\n }", "public ExtensibleMatchFilter()\n {\n super();\n }", "public LogFilter() {}", "public static interface KeyValueFilter {\r\n\t}", "public DDataFilter() {\n filters = new ArrayList<>();\n operator = null;\n value = null;\n externalData = false;\n valueTo = null;\n attribute = ROOT_FILTER;\n }", "@Override\n\t public String filterType() {\n\t return \"pre\";\n\t }", "public static interface Filter\n\t\t{\n\t\t/**\n\t\t * Accept a frame? if false then all particles will be discarded\n\t\t */\n\t\tpublic boolean acceptFrame(EvDecimal frame);\n\t\t\n\t\t/**\n\t\t * Accept a particle?\n\t\t */\n\t\tpublic boolean acceptParticle(int id, ParticleInfo info);\n\t\t}", "public LSPFilter getFilter () {\r\n return filter;\r\n }", "static ObjectInputFilter createFilter(String param2String, boolean param2Boolean) {\n/* 448 */ Global global = new Global(param2String, param2Boolean);\n/* 449 */ return global.isEmpty() ? null : global;\n/* */ }", "public abstract INexusFilterDescriptor getFilterDescriptor();", "Map<String, String> getFilters();", "public interface SearchFilter {\n String getFilter();\n}", "protected IUIFilterable createFilterable() {\n \t\treturn new UIFilterable();\n \t}", "void filterChanged(Filter filter);", "static ObjectInputFilter createFilter(String param2String, boolean param2Boolean) {\n/* 446 */ Global global = new Global(param2String, param2Boolean);\n/* 447 */ return global.isEmpty() ? null : global;\n/* */ }", "private LogFilter() {\n\t\tacceptedEventTypes = new HashMap<String, Integer>();\n\t}", "String getFilterName();", "interface WithFilter {\n /**\n * Specifies the filter property: Information about the filter for the event channel..\n *\n * @param filter Information about the filter for the event channel.\n * @return the next definition stage.\n */\n WithCreate withFilter(EventChannelFilter filter);\n }", "public void addFilterToMethods(ViewerFilter filter);", "@Override\n public String filterType() {\n return \"pre\";\n }", "@Override\n public String filterType() {\n return \"pre\";\n }", "private interface FilterFunction\n\t{\n\t\tpublic Boolean filter(Review review);\n\t}", "public static FilterBuilder filters()\n {\n return new FilterBuilder();\n }", "public String getFilter() {\n\t\treturn filter;\n\t}", "com.google.protobuf.ByteString\n getFilterBytes();", "@Override\n public List runFilter(String filter) {\n return runFilter(\"\", filter);\n }", "public RTTIClass select(ClassFilter filter);", "public Expression getFilter() {\n return this.filter;\n }", "public Input filterBy(Filter filter) {\n JsonArray filters = definition.getArray(FILTERS);\n if (filters == null) {\n filters = new JsonArray();\n definition.putArray(FILTERS, filters);\n }\n filters.add(Serializer.serialize(filter));\n return this;\n }", "private FilterPriorities() {\n // hiding implicit public constructor\n }", "public QuoteFilter(){\n this.sentenceTagger = new SentenceTagger();\n }", "java.lang.String getDataItemFilter();", "public InvertFilter(String name)\n {\n super(name);\n }", "void onFilterChanged(ArticleFilter filter);", "public boolean shouldFilter() {\n return true;\n }", "@Override\n public Filter getFilter(String filterId) {\n return null;\n }", "protected FileExtensionFilter()\n\t{\n\t}", "private FilterByAllCompiler() {\n }", "interface WithFilter {\n /**\n * Specifies the filter property: Information about the filter for the event channel..\n *\n * @param filter Information about the filter for the event channel.\n * @return the next definition stage.\n */\n Update withFilter(EventChannelFilter filter);\n }", "public interface ContentModelFilter {\n\n\n boolean isAttributeDatastream(String dsid, List<String> types);\n\n\n boolean isChildRel(String predicate, List<String> types);\n}", "public static ObjectInputFilter createFilter2(String param1String) {\n/* 394 */ Objects.requireNonNull(param1String, \"pattern\");\n/* 395 */ return Global.createFilter(param1String, false);\n/* */ }", "public EnvelopedSignatureFilter(){\n\n }", "protected Filter getFilter() {\n/* 631 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "public void addBusinessFilterToMethods(ViewerFilter filter);", "@Override\n\tpublic String filterType() {\n\t\treturn FilterConstants.PRE_TYPE;\n\t}" ]
[ "0.76653594", "0.731847", "0.7309096", "0.7297366", "0.71729505", "0.7165262", "0.7118643", "0.70919526", "0.7063161", "0.70459855", "0.70286757", "0.6963095", "0.694132", "0.6938744", "0.6938744", "0.69290024", "0.69172966", "0.6916018", "0.6824074", "0.6814873", "0.67212445", "0.67081136", "0.67042613", "0.6681509", "0.66711706", "0.66672206", "0.66551876", "0.665448", "0.66403615", "0.66345847", "0.66271603", "0.6624641", "0.6604627", "0.6603517", "0.65909195", "0.65716976", "0.6569251", "0.6550783", "0.6542883", "0.6509117", "0.65048814", "0.6495977", "0.6489976", "0.6482001", "0.647951", "0.6473019", "0.64724", "0.646707", "0.646229", "0.6458248", "0.6457481", "0.64520824", "0.6450539", "0.64503515", "0.64483076", "0.6445446", "0.643939", "0.64384437", "0.64167196", "0.640857", "0.63697934", "0.6365057", "0.63561535", "0.6346219", "0.6318355", "0.6309784", "0.6294018", "0.62913847", "0.62864316", "0.6284998", "0.62719774", "0.6270769", "0.6259947", "0.6255277", "0.6250383", "0.6249077", "0.6249077", "0.6247319", "0.6232415", "0.62255204", "0.62220037", "0.6218699", "0.6213338", "0.62060755", "0.61959916", "0.61947334", "0.6194725", "0.61923945", "0.61890304", "0.6180913", "0.6180532", "0.6179013", "0.61781895", "0.61747533", "0.61600107", "0.6159698", "0.6159079", "0.61583686", "0.61582613", "0.6154566", "0.615123" ]
0.0
-1
Find the top 1 of digital news by id The object will appear with the same id it have.
@Override public Digital getNews(int id) throws Exception { Connection con = null; ResultSet rs = null; PreparedStatement ps = null; String s = "select * from digital where id = ?"; // check connection of db if cannot connect, it will throw an object of Exception try { con = getConnection(); ps = con.prepareCall(s); ps.setInt(1, id); rs = ps.executeQuery(); while (rs.next()) { Digital d = new Digital(rs.getInt("id"), rs.getString("title"), rs.getString("description"), rs.getString("images"), rs.getString("author"), rs.getTimestamp("timePost"), rs.getString("shortDes")); return d; } } catch (Exception e) { throw e; } finally { // close ResultSet, PrepareStatement, Connection closeResultSet(rs); closePrepareStateMent(ps); closeConnection(con); } return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic NewsCollection findOne(Integer id) {\n\t\treturn newsCollectionMapper.findOne(id);\n\t}", "public News getByid(News news);", "Article findLatestArticle();", "@Override\r\n\tpublic News getNewsById(int id) {\n\t\tConnection conn =null;\r\n\t\tPreparedStatement pstmt = null;\r\n\t\tResultSet rs = null;\r\n\t\tNews aNews = null;\r\n\t\ttry {\r\n\t\t\t\r\n\t\t\tString sql=\"select * from news where id = ?\";\r\n\t\t\tconn = SimpleDBUtil.getConnection();\r\n\t\t\tpstmt = conn.prepareStatement(sql);\r\n\t\t\tpstmt.setInt(1, id);\r\n\t\t\trs = pstmt.executeQuery();\r\n\t\t\t\r\n\t\t\tif (rs.next()) {\r\n\t\t\t\taNews = new News();\r\n\t\t\t\taNews.setId(rs.getInt(1));\r\n\t\t\t\taNews.setTitle(rs.getString(2));\r\n\t\t\t\taNews.setContent(rs.getString(\"content\"));\r\n\t\t\t\taNews.setCreateTime(rs.getDate(\"createTime\"));\r\n\t\t\t\taNews.setFk_topic_id(rs.getInt(\"fk_topic_id\"));\r\n\t\t\t}\r\n\r\n\t\t\t\t\t\r\n\t\t} catch (Exception e) {\r\n\t\t\t// TODO: handle exception\r\n\t\t\te.printStackTrace();\r\n\t\t}finally {\r\n\t\t\tSimpleDBUtil.closeAll(rs, pstmt, conn);\r\n\t\t}\r\n\t\treturn aNews;\r\n\t}", "NewsItem obtainNewsItemById(long id) throws ObjectRetrievalFailureException;", "public BlogArticle gainOne(Integer id) {\n\t\treturn blogArticleDao.gainOne(id);\n\t}", "@Override\r\n\tpublic ENews findNewsById(int id) {\n\t\treturn new ENDaoImpl().findNewsById(id);\r\n\t}", "News selectByPrimaryKey(Integer id);", "@Override\n public News getNewsById(int id) throws Exception {\n Connection conn = null;\n PreparedStatement statement = null;\n ResultSet result = null;\n String query = \"select * from news where id = ?\";\n try {\n conn = getConnection();\n statement = conn.prepareStatement(query);\n statement.setInt(1, id);\n result = statement.executeQuery();\n while (result.next()) {\n News news = new News(result.getInt(\"ID\"),\n result.getString(\"title\"),\n result.getString(\"description\"),\n result.getString(\"image\"),\n result.getString(\"author\"),\n result.getDate(\"timePost\"),\n result.getString(\"shortDes\"));\n return news;\n }\n } catch (ClassNotFoundException | SQLException e) {\n throw e;\n } finally {\n closeResultSet(result);\n closePreparedStatement(statement);\n closeConnection(conn);\n }\n return null;\n }", "NewsInfo selectByPrimaryKey(Integer id);", "public List<News> getNewsList(Integer id) {\n List<News> newsList = newsMapper.selectByAuthorId(id);\n newsList.sort((dt1,dt2) -> {\n if (dt1.getPubdate().getTime() < dt2.getPubdate().getTime()) {\n return 1;\n } else if (dt1.getPubdate().getTime() > dt2.getPubdate().getTime()) {\n return -1;\n } else {\n return 0;\n }\n });\n return newsList;\n }", "@Override\n\tpublic News getNewsById(Integer id) throws Exception {\n\t\treturn null;\n\t}", "@RequestMapping(value = \"/news/{id}\" , method = RequestMethod.GET)\n public Optional<News> findOneNews(@PathVariable String id){\n return newsService.findNewsDetails(id);\n }", "public WebElement getArticleById(int id) {\n LOGGER.info(\"Getting article Nr.\" + (id + 1));\n // if we use assertions better to initialize \"articles\" before assertions;\n List<WebElement> articles = baseFunc.findElements(ARTICLE);\n\n //if list is not empty, everything is ok;\n Assertions.assertFalse(articles.isEmpty(), \"There are no articles!\");\n //if article count > searched article, everything is ok;\n Assertions.assertTrue(articles.size() > id, \"Article amount is less than id\");\n\n return articles.get(id);\n }", "private List<NewsArticle> getMostPopular() {\n LOGGER.log(Level.INFO, \"getMostPopular\");\n return newsService.getMostPopular();\n }", "@Override\n public List<News> getTop(int top) throws Exception {\n Connection conn = null;\n PreparedStatement statement = null;\n ResultSet result = null;\n List<News> list = new ArrayList<>();\n String query = \"select top (?) * from news\\n\"\n + \"order by timePost desc\";\n try {\n conn = getConnection();\n statement = conn.prepareStatement(query);\n statement.setInt(1, top);\n result = statement.executeQuery();\n while (result.next()) {\n News news = new News(result.getInt(\"ID\"),\n result.getString(\"title\"),\n result.getString(\"description\"),\n result.getString(\"image\"),\n result.getString(\"author\"),\n result.getDate(\"timePost\"),\n result.getString(\"shortDes\"));\n list.add(news);\n }\n } catch (ClassNotFoundException | SQLException e) {\n throw e;\n } finally {\n closeResultSet(result);\n closePreparedStatement(statement);\n closeConnection(conn);\n }\n return list;\n }", "public Pago findTopByOrderByIdDesc();", "WxNews selectByPrimaryKey(Integer id);", "@Override\n public List<Digital> getTop(int top) throws Exception {\n Connection con = null;\n ResultSet rs = null;\n PreparedStatement ps = null;\n List<Digital> list = new ArrayList<>();\n // check connection of db if cannot connect, it will throw an object of Exception\n try {\n\n String query = \"select top \" + top + \" * from digital order by timePost desc\";\n con = getConnection();\n ps = con.prepareCall(query);\n rs = ps.executeQuery();\n while (rs.next()) {\n Digital d = new Digital(rs.getInt(\"id\"),\n rs.getString(\"title\"),\n rs.getString(\"description\"),\n rs.getString(\"images\"),\n rs.getString(\"author\"),\n rs.getTimestamp(\"timePost\"),\n rs.getString(\"shortDes\"));\n list.add(d);\n }\n\n } catch (Exception e) {\n throw e;\n } finally {\n // close ResultSet, PrepareStatement, Connection\n closeResultSet(rs);\n closePrepareStateMent(ps);\n closeConnection(con);\n }\n return list;\n }", "public Post findOne(long id) {\n return postsDao.findById(id);\n }", "@Override\n\tpublic News selectByPrimaryKey(Integer id) {\n\t\treturn null;\n\t}", "public Karton findOne(Integer id) {\n\t\treturn kartonRepository.findById(id).orElseGet(null);\n\t}", "@Override\r\n\tpublic Article select(Integer id) {\n\t\treturn dao.select(id);\r\n\t}", "@Override\n\tpublic NewsVO findByPrimaryKey(String news_id) {\n\t\tNewsVO newsVO = null;\n\t\tConnection con = null;\n\t\tPreparedStatement pstmt = null;\n\t\tResultSet rs = null;\n\n\t\ttry {\n\n\t\t\tClass.forName(driver);\n\t\t\tcon = DriverManager.getConnection(url, userid, passwd);\n\t\t\tpstmt = con.prepareStatement(GET_ONE_STMT);\n\n\t\t\tpstmt.setString(1, news_id);\n\n\t\t\trs = pstmt.executeQuery();\n\n\t\t\twhile (rs.next()) {\n\t\t\t\t// empVo 也稱為 Domain objects\n\t\t\t\tnewsVO = new NewsVO();\n\t\t\t\tnewsVO.setNews_id(rs.getString(\"news_id\"));\n\t\t\t\tnewsVO.setNews_content(rs.getString(\"news_content\"));\n\t\t\t\tnewsVO.setNews_date(rs.getTimestamp(\"news_date\"));\n\t\t\t}\n\n\t\t\t// Handle any driver errors\n\t\t} catch (ClassNotFoundException e) {\n\t\t\tthrow new RuntimeException(\"Couldn't load database driver. \"\n\t\t\t\t\t+ e.getMessage());\n\t\t\t// Handle any SQL errors\n\t\t} catch (SQLException se) {\n\t\t\tthrow new RuntimeException(\"A database error occured. \"\n\t\t\t\t\t+ se.getMessage());\n\t\t\t// Clean up JDBC resources\n\t\t} finally {\n\t\t\tif (rs != null) {\n\t\t\t\ttry {\n\t\t\t\t\trs.close();\n\t\t\t\t} catch (SQLException se) {\n\t\t\t\t\tse.printStackTrace(System.err);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (pstmt != null) {\n\t\t\t\ttry {\n\t\t\t\t\tpstmt.close();\n\t\t\t\t} catch (SQLException se) {\n\t\t\t\t\tse.printStackTrace(System.err);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (con != null) {\n\t\t\t\ttry {\n\t\t\t\t\tcon.close();\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\te.printStackTrace(System.err);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn newsVO;\n\t}", "@Override\n public Lekar findOne(Long id) {\n return lekarRepozitorijum.getOne(id);\n }", "public abstract T findOne(int id);", "public Voto find(int id ) { \n\t\treturn em.find(Voto.class, id);\n\t}", "public Aluguel read(int id) {\n MongoCursor<Document> cursor = collection.find().iterator();\r\n Aluguel aluguel = null;\r\n List<Aluguel> alugueis = new ArrayList<>();\r\n if (cursor.hasNext()) {\r\n aluguel = new Aluguel().fromDocument(cursor.next());\r\n alugueis.add(aluguel);\r\n }\r\n alugueis.forEach(a -> System.out.println(a.getId()));\r\n return aluguel;\r\n }", "@Override\r\n\tpublic StnLooseMt findOne(int id) {\n\t\treturn stnLooseMtRepository.findOne(id);\r\n\t}", "Coach findById(long id);", "public Partida getFirstPartida(Integer idPartida){\n String consulta = \"SELECT p FROM Partida p WHERE p.id = \" +idPartida;\n return em.createQuery(consulta, Partida.class).setMaxResults(1).getResultList().get(0);\n }", "CMSObject getFirstNodeById(String id, ConnectionInfo connectionInfo) throws RepositoryAccessException;", "CMSObject getFirstNodeById(String id, Object session) throws RepositoryAccessException;", "public Pessoa find(Long id){\n\t\treturn db.findOne(id);\n\t}", "public Order findOne(Integer id) {\r\n\t\tlog.info(\"Request to finde Order : \" + id);\r\n\t\treturn orders.stream().filter(order -> order.getOrderId().equals(id)).findFirst().get();\r\n\t}", "public EscherRecord findFirstWithId(short id) {\n \treturn findFirstWithId(id, getEscherRecords());\n }", "@Override\r\n\tpublic LookMast findOne(int id) {\n\t\treturn lookMastRepository.findOne(id);\r\n\t}", "public Matiere findById(Integer id){\n return matiereRepository.getOne(id);\n }", "@Override\n @Transactional(readOnly = true)\n public Optional<Kontrachent> findOne(Long id) {\n log.debug(\"Request to get Kontrachent : {}\", id);\n return kontrachentRepository.findById(id);\n }", "@Override\r\n\tpublic Food getFoodById(int id) {\n\t\tString sql=\"select * from food where id=?\";\r\n\t\tList<Food> list=(List<Food>) BaseDao.select(sql, Food.class,id);\r\n\t\tif(list.size()>0) {\r\n\t\t\treturn list.get(0);\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "@Override\n\tpublic Food findFoodById(int id) {\n\t\treturn fb.findFoodById(id);\n\t}", "@Override\n\tpublic Item findItemById(Long id) {\n\t\tCriteriaBuilder cb=entityManager.getCriteriaBuilder();\n\t\t\n\t\tCriteriaQuery<Item> q = cb.createQuery(Item.class);\n\t\t Root<Item> c = q.from(Item.class);\n\t\t ParameterExpression<Long> p = cb.parameter(Long.class);\n\t\t q.select(c).where(cb.equal(c.get(\"id\"), p));\n\t\t TypedQuery<Item> query = entityManager.createQuery(q);\n\t\t query.setParameter(p, id);\n\t\t Item i = query.getSingleResult();\n\t\treturn i;\n\t}", "public Proveedor findTopByOrderByIdDesc();", "@Transactional(readOnly = true)\n public SubCategory findOne(Long id) {\n log.debug(\"Request to get SubCategory : {}\", id);\n SubCategory subCategory = subCategoryRepository.findOne(id);\n return subCategory;\n }", "@SuppressWarnings(\"unchecked\")\r\n\tpublic T findOne(final int id) {\r\n\t\tEntityManager manager = factory.createEntityManager();\r\n\t\tEntityTransaction transaction = manager.getTransaction();\r\n\t Object obj = null;\r\n\t \r\n\t try {\r\n\t \t transaction.begin();\r\n\t obj = (T) manager.find(genericClass, id);\r\n\t transaction.commit();\r\n\t } catch (HibernateException e) {\r\n\t \t if(transaction != null)\r\n\t \t\t transaction.rollback();\r\n\t e.printStackTrace(); \r\n\t } finally {\r\n\t manager.close(); \r\n\t }\r\n\t\treturn (T) obj;\r\n\t}", "T findOne(Long id);", "@Override\r\n\tpublic TopicContent findById(Serializable id) {\n\t\treturn topicContentDao.findById(id);\r\n\t}", "@Override\n public CerereDePrietenie findOne(Long aLong) {\n// String SQL = \"SELECT id,id_1,id_2,status,datac\"\n// + \"FROM cereredeprietenie \"\n// + \"WHERE id = ?\";\n//\n// try (Connection conn = connect();\n// PreparedStatement pstmt = conn.prepareStatement(SQL)) {\n//\n// pstmt.setInt(1, Math.toIntExact(aLong));\n// ResultSet rs = pstmt.executeQuery();\n//\n// while(rs.next()) {\n// Long id = rs.getLong(\"id\");\n// Long id_1 = rs.getLong(\"id_1\");\n// Long id_2 = rs.getLong(\"id_2\");\n//\n// String status = rs.getString(\"status\");\n// LocalDateTime data = rs.getObject( 5,LocalDateTime.class);\n//\n// Utilizator u1=repository.findOne(id_1);\n// Utilizator u2=repository.findOne(id_2);\n//\n// CerereDePrietenie u =new CerereDePrietenie(u1,u2);\n// u.setId(id);\n// u.setStatus(status);\n// u.setData(data);\n// return u;\n// }\n//\n//\n// } catch (SQLException ex) {\n// System.out.println(ex.getMessage());\n// }\n//\n// return null;\n List<CerereDePrietenie> list=new ArrayList<>();\n findAll().forEach(list::add);\n for(CerereDePrietenie cerere: list){\n if(cerere.getId() == aLong)\n return cerere;\n }\n return null;\n }", "public BlogEntry findBlogEntry(Long id);", "Blog read(int id);", "@Override\n @Transactional(readOnly = true)\n public Fund findOne(Long id) {\n log.debug(\"Request to get Fund : {}\", id);\n Fund fund = fundRepository.findOneWithEagerRelationships(id);\n return fund;\n }", "public Objet getObjetById(int id){\n \n Objet ob=null;\n String query=\" select * from objet where id_objet=\"+id;\n \n try { \n Statement state = Connect.getInstance().createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);\n ResultSet res = state.executeQuery(query);\n while(res.next()) ob=new Objet(res.getInt(\"id_objet\"),res.getInt(\"id_user\"),res.getInt(\"qte\"),res.getString(\"types\"),res.getString(\"description\"));\n res.close();\n state.close();\n \n } catch (SQLException e) {\n e.printStackTrace();\n }\n \n return ob;\n }", "public static Article getById(final int id) {\n\t\treturn (Article)getById(currentClass, id, true);\n\t}", "T findOne(I id);", "@Transactional(readOnly = true) \n public ShortLink findOne(Long id) {\n log.debug(\"Request to get ShortLink : {}\", id);\n ShortLink shortLink = shortLinkRepository.findOne(id);\n return shortLink;\n }", "public PerformanceReview getSinglePerformanceReview(Integer id) {\n\n /*\n * Use the ConnectionFactory to retrieve an open\n * Hibernate Session.\n *\n */\n Session session = ConnectionFactory.getInstance().getSession();\n List results = null;\n try {\n\n results = session.find(\"from PerformanceReview as performanceReview where performanceReview.performanceReviewId = ?\",\n new Object[]{id},\n new Type[]{Hibernate.INTEGER});\n\n\n\n } /*\n * If the object is not found, i.e., no Item exists with the\n * requested id, we want the method to return null rather\n * than throwing an Exception.\n *\n */ catch (ObjectNotFoundException onfe) {\n return null;\n } catch (HibernateException e) {\n /*\n * All Hibernate Exceptions are transformed into an unchecked\n * RuntimeException. This will have the effect of causing the\n * user's request to return an error.\n *\n */\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n } /*\n * Regardless of whether the above processing resulted in an Exception\n * or proceeded normally, we want to close the Hibernate session. When\n * closing the session, we must allow for the possibility of a Hibernate\n * Exception.\n *\n */ finally {\n if (session != null) {\n try {\n session.close();\n } catch (HibernateException e) {\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n }\n\n }\n }\n if (results.isEmpty()) {\n return null;\n } else {\n return (PerformanceReview) results.get(0);\n }\n\n }", "@Override\r\n\tpublic Person findbyid(int id) {\n\t\tQuery query=em.createQuery(\"Select p from Person p where p.id= \"+id);\r\n\t\tPerson p=(Person) query.getSingleResult();\r\n\t\treturn p;\r\n\t\r\n\t}", "@Override\r\n\tpublic ConsigMetalDt findOne(int id) {\n\t\treturn consigMetalDtRepository.findOne(id);\r\n\t}", "public AsxDataVO findOne(String id) {\n\t\t return (AsxDataVO) mongoTemplate.findOne(new Query(Criteria.where(\"id\").is(id)), AsxDataVO.class); \r\n\t}", "public Curso find(Long id) {\n\t\tfor (Curso curso : cursos) {\n\t\t\tif(curso.getId() == id) {\n\t\t\t\treturn curso;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "@Override\n public Article getArticleById(@PathVariable(\"id\") int id) {\n CacheKey key= new CacheKey(id);\n Article article = cacheArticles.get(key);\n if (article==null){\n article=articleDAO.getArticleById(id);\n cacheArticles.put(key,article);\n }\n return article;\n }", "public Usinas findOne(String id) {\n log.debug(\"Request to get Usinas : {}\", id);\n return usinasRepository.findOne(id);\n }", "@Override\n\tpublic Document find(int id) {\n\t\treturn null;\n\t}", "@Override\n\tpublic Optional<MedioPago> findbyid(Integer id) {\n\t\treturn null;\n\t}", "T findById(ID id) ;", "@Override\n @Transactional(readOnly = true)\n @Cacheable\n public Category findOne(Long id) {\n log.debug(\"Request to get Category : {}\", id);\n return categoryRepository.findOne(id);\n }", "@Override\r\n\tpublic Object findById(long id) {\n\t\treturn null;\r\n\t}", "public TipoRetencion findTopByOrderByIdDesc();", "Cemetery findOne(Long id);", "public Cat findById(int id) {\n\t\tString HQL = \"FROM Animal WHERE id = :id\";\n\t\t\n\t\t@SuppressWarnings(\"unchecked\")\n\t\tCat result = (Cat) session.createQuery(HQL)\n\t\t\t.setParameter(\"id\", id)\n\t\t\t.setMaxResults(1)\n\t\t\t.getSingleResult();\t\t\n\t\treturn result;\n\t}", "@Override\r\n\tpublic Product showOne(int id) throws Exception {\n\t\treturn this.dao.showOne(id);\r\n\t}", "priorizedListObject find( int id ) throws DAOException;", "@Override\n @Transactional(readOnly = true)\n public Optional<MuseumDTO> findOne(Long id) {\n log.debug(\"Request to get Museum : {}\", id);\n return museumRepository.findById(id)\n .map(museumMapper::toDto);\n }", "Corretor findOne(Long id);", "@Override\n @Transactional(readOnly = true)\n public CollectionDTO findOne(Long id) {\n log.debug(\"Request to get Collection : {}\", id);\n Collection collection = collectionRepository.findOne(id);\n return collectionMapper.toDto(collection);\n }", "Categorie findOne(Long id);", "@PostMapping(\"/search\")\n public Object fetchNews(@RequestParam(\"id\") String id, @RequestParam(name = \"page\", required = false) Integer page) {\n return newsService.getNewsData(id, page);\n }", "@Transactional\r\n\tpublic Blog findById(String id) {\n\t\tString hql = \"from Blog where id=\" + \"'\" + id + \"'\";\r\n\t\tQuery query =(Query) sessionFactory.getCurrentSession().createQuery(hql);\r\n\t\tList<Blog> listBlog= (List<Blog>) query.getResultList();\r\n\t\tif (listBlog!= null && !listBlog.isEmpty()) {\r\n\t\t\treturn listBlog.get(0);\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "public Community findById(Long id);", "public Feed findFeedByFeedID(Integer fid);", "@Override\n\tprotected Model fetchOne(int id) {\n\t\treturn null;\n\t}", "@Override\n\tpublic SortBean selectSortById(int id) {\n\t\tsql=\"select * from news_sort where sort_id=?\";\n\t\tDBUtil db = new DBUtil(sql);\n\t\ttry {\n\t\t\tdb.ps.setInt(1,id);\n\t\t\trs=db.ps.executeQuery();\n\t\t\twhile(rs.next()){\n\t\t\t\tint s_id = rs.getInt(1);\n\t\t\t\tString s_name = rs.getString(2);\n\t\t\t\tString s_rss = rs.getString(3);\n\t\t\t\treturn new SortBean(s_id, s_name, s_rss);\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}finally{\n\t\t\ttry {\n\t\t\t\trs.close();\n\t\t\t} catch (SQLException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\tdb.close();\n\t\t}\n\t\t\n\t\treturn null;\n\t}", "@Override\r\n\tpublic Personne find(int id) {\n\t\treturn null;\r\n\t}", "public TEntity getById(int id){\n String whereClause = String.format(\"Id = %1$s\", id);\n Cursor cursor = db.query(tableName, columns, whereClause, null, null, null, null);\n\n if (cursor.getCount() == 1) {\n cursor.moveToFirst();\n return fromCursor(cursor);\n }\n return null;\n }", "public T find(int id) {\n\t \treturn getEntityManager().find(getEntityClass(), id);\n\t }", "Article findArticleById(String id);", "public New getObject(long id);", "ContentSum findOne(Long id);", "public Post findById(Integer i) {\n\t\tSession session;\n\t\ttry {\n\t\t\tsession = sessfact.getCurrentSession();\n\t\t} catch (HibernateException e) {\n\t\t\tsession = sessfact.openSession();\n\t\t}\n\t\tTransaction trans = session.beginTransaction();\n\t\tPost p = session.get(Post.class, i);\n\t\ttrans.commit();\n\t\treturn p;\n\t}", "public Money find(long id) {\n\t\tif (treeMap.containsKey(id))\n\t\t\treturn treeMap.get(id).price;\n\t\treturn new Money();\n\t}", "@Override\n\tpublic Product findOne(int a) {\n\t\tProduct p = productRepository.findOne(a);\n\t\treturn p;\n\t}", "public T findById(int id) {\n\t\tConnection connection = null;\n\t\tPreparedStatement st = null;\n\t\tResultSet rs = null;\n\t\tString query = createSelectQuery(\"id\");\n\t\ttry {\n\t\t\tconnection = ConnectionFactory.createCon();\n\t\t\tst = connection.prepareStatement(query);\n\t\t\tst.setInt(1, id);\n\t\t\trs = st.executeQuery();\n\t\t\t\n\t\t\treturn createObjects(rs).get(0);\n\t\t}catch(SQLException e) {\n\t\t\tLOGGER.fine(type.getName() + \"DAO:findBy\" + e.getMessage());\n\t\t}\n\t\treturn null;\n\t}", "public CyPoj findById(Integer id) {\n\t\treturn d.findById(id);\r\n\t}", "@Override\r\n\tpublic ReportAndSummary findById(int id) {\n\t\tReportAndSummary result = reportAndSummaryDao.findById(id);\r\n\t\treturn result;\r\n\t}", "@Nullable\n public DBObject findOne(final Object id) {\n return findOne(new BasicDBObject(\"_id\", id), new DBCollectionFindOptions());\n }", "public Personne find(int id) {\n\t\tPersonne p= null;\n\t\ttry {\n\t\t\t\tString req = \"SELECT id,nom, prenom, evaluation FROM PERSONNE_1 WHERE ID=?\";\n\t\t\t\tPreparedStatement ps= connect.prepareStatement(req);\n\t\t\t\tps.setInt(1, id);\n\t\t\t\tResultSet rs = ps.executeQuery();\n\t\t\t\tp =new Personne (id, rs.getString(1),rs.getString(2));\n\t\t\t}catch (SQLException e) {e.printStackTrace();}\n\t\t\t\t\n\t\treturn p;\n\t\t\n\t}", "public ClassItem find(Long id) {\n return (ClassItem)find(ClassItem.class, id);\n }", "@Override\n @Transactional(readOnly = true)\n public Optional<Goods> findOne(Long id) {\n log.debug(\"Request to get Goods : {}\", id);\n return goodsRepository.findById(id);\n }", "public void getDetail(int id) {\n\t\t\n\t}", "Article selectByPrimaryKey(String id);" ]
[ "0.7161551", "0.662444", "0.6559261", "0.6465206", "0.64186907", "0.64182407", "0.6353288", "0.6137013", "0.6108487", "0.60650676", "0.6060688", "0.6059803", "0.6020251", "0.60049653", "0.59848315", "0.5978958", "0.5909912", "0.5891013", "0.5857839", "0.5798615", "0.57945037", "0.5794405", "0.5788036", "0.5770956", "0.57707906", "0.5750491", "0.57456183", "0.5722876", "0.570058", "0.56932944", "0.5678931", "0.56556827", "0.5634579", "0.563069", "0.55995727", "0.55963635", "0.55772644", "0.5577072", "0.5572032", "0.55535877", "0.55531764", "0.5549515", "0.554729", "0.55386835", "0.5523077", "0.55191684", "0.55146974", "0.5512789", "0.5499419", "0.54973197", "0.54961765", "0.54865307", "0.54862595", "0.5483743", "0.5478726", "0.5477588", "0.5476974", "0.54753447", "0.546054", "0.54488015", "0.5441618", "0.54393774", "0.543907", "0.5438382", "0.54380816", "0.54316205", "0.54265076", "0.5423533", "0.5423411", "0.5419998", "0.5417739", "0.5416262", "0.54152477", "0.5404572", "0.5398174", "0.5396348", "0.53954756", "0.53932536", "0.5393034", "0.53892744", "0.5388404", "0.53837603", "0.53832734", "0.5378376", "0.5374123", "0.53732145", "0.5368759", "0.5367058", "0.5363267", "0.5357971", "0.53563", "0.53465223", "0.534568", "0.5344504", "0.5342382", "0.53411293", "0.5335254", "0.53306586", "0.5329604", "0.5324965" ]
0.6318674
7
Find list of digital news All the digital news will card listed returned the result contain a list of entity.Digital objects with id, title, description, images, author, timePost,shortDes
@Override public List<Digital> getSearch(String txt, int pageIndex, int pageSize) throws Exception { Connection con = null; ResultSet rs = null; PreparedStatement ps = null; List<Digital> list = new ArrayList<>(); String query = "select *from(" + "select ROW_NUMBER() over (order by ID ASC) as rn, *\n" + "from digital where title \n" + "like ?" + ")as x\n" + "where rn between ?*?-2" + "and ?*?"; // check connection of db if cannot connect, it will throw an object of Exception try { con = getConnection(); ps = con.prepareStatement(query); ps.setString(1, "%" + txt + "%"); ps.setInt(2, pageIndex); ps.setInt(3, pageSize); ps.setInt(4, pageIndex); ps.setInt(5, pageSize); rs = ps.executeQuery(); while (rs.next()) { Digital d = new Digital(rs.getInt("id"), rs.getString("title"), rs.getString("description"), rs.getString("images"), rs.getString("author"), rs.getTimestamp("timePost"), rs.getString("shortDes")); list.add(d); } } catch (Exception e) { throw e; } finally { // close ResultSet, PrepareStatement, Connection closeResultSet(rs); closePrepareStateMent(ps); closeConnection(con); } return list; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public Digital getNews(int id) throws Exception {\n Connection con = null;\n ResultSet rs = null;\n PreparedStatement ps = null;\n String s = \"select * from digital where id = ?\";\n // check connection of db if cannot connect, it will throw an object of Exception\n try {\n con = getConnection();\n ps = con.prepareCall(s);\n ps.setInt(1, id);\n rs = ps.executeQuery();\n while (rs.next()) {\n Digital d = new Digital(rs.getInt(\"id\"),\n rs.getString(\"title\"),\n rs.getString(\"description\"),\n rs.getString(\"images\"),\n rs.getString(\"author\"),\n rs.getTimestamp(\"timePost\"),\n rs.getString(\"shortDes\"));\n return d;\n }\n } catch (Exception e) {\n throw e;\n } finally {\n // close ResultSet, PrepareStatement, Connection\n closeResultSet(rs);\n closePrepareStateMent(ps);\n closeConnection(con);\n }\n return null;\n }", "@Override\r\n\tpublic List<News> findAllNews() {\n\t\tConnection conn = null;\r\n\t\tPreparedStatement pstmt = null;\r\n\t\tResultSet rs = null;\r\n\t\tList<News> newsList = null;\r\n\t\t\r\n\t\ttry {\r\n\t\t\t\r\n\t\t\tString sql = \"select * from news\";\r\n\t\t\tconn = SimpleDBUtil.getConnection();\r\n\t\t\tpstmt = conn.prepareStatement(sql);\r\n\t\t\trs = pstmt.executeQuery();\r\n\t\t\tnewsList = new ArrayList<>();\r\n\t\t\twhile (rs.next()) {\r\n\t\t\t\tNews aNews = new News();\r\n\t\t\t\taNews.setId(rs.getInt(1));\r\n\t\t\t\taNews.setTitle(rs.getString(2));\r\n\t\t\t\taNews.setContent(rs.getString(\"content\"));\r\n\t\t\t\taNews.setCreateTime(rs.getDate(\"createTime\"));\r\n\t\t\t\taNews.setFk_topic_id(rs.getInt(\"fk_topic_id\"));\r\n\t\t\t\t\r\n\t\t\t\tnewsList.add(aNews);\r\n\t\t\t}\r\n\r\n\t\t} catch (Exception ex) {\r\n\t\t\tex.printStackTrace();\r\n\t\t} finally {\r\n\t\t\tSimpleDBUtil.closeAll(rs, pstmt, conn);\r\n\t\t}\r\n\t\t\r\n\t\treturn newsList;\r\n\t}", "public static ArrayList<DigitalNewspapers> getDigitalNewsSources(){\n\n Uri builtUri = Uri.parse(BASE_NEWSAPI_SOURCES_EP).buildUpon()\n .build();\n\n URL url = null;\n\n try {\n url = new URL(builtUri.toString());\n return doCall(url);\n\n } catch (MalformedURLException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n return null;\n }", "@Override\r\n\tpublic List<Product> findNews() throws Exception {\n\t\treturn null;\r\n\t}", "public List<DIS001> findAll_DIS001();", "public List<NewsBaseInfo> getNewsListByDate(Date date) throws DataAccessException {\n return null;\n }", "public List<News> getAll()\n {\n\n return newsRepository.findAllByOrderByIdAsc();\n }", "public List<Article> findAll();", "java.util.List<com.gw.ps.pbbean.PbNewsRes.NewsIndResDetail> \n getNewsindentifydetailList();", "ArrayList<News> findByDate(String date) throws DAOException, ConnectionPoolDataSourceException;", "@Override\n\tpublic List<News> queryNewsList(News params) throws Exception {\n\t\treturn null;\n\t}", "public void listArticles() {\n\t\tSystem.out.println(\"\\nArticles llegits desde la base de dades\");\n\n\t\tObjectSet<Article> articles = db.query(Article.class);\n\t\tarticles.stream()\n\t\t\t.forEach(System.out::println);\n\t}", "public List<News> getNewsList(Integer id) {\n List<News> newsList = newsMapper.selectByAuthorId(id);\n newsList.sort((dt1,dt2) -> {\n if (dt1.getPubdate().getTime() < dt2.getPubdate().getTime()) {\n return 1;\n } else if (dt1.getPubdate().getTime() > dt2.getPubdate().getTime()) {\n return -1;\n } else {\n return 0;\n }\n });\n return newsList;\n }", "List<TagDto> getByNewsId(Long newsId);", "@Override\n\tpublic List<NewsVO> getAll() {\n\t\tList<NewsVO> list = new ArrayList<NewsVO>();\n\t\tNewsVO newsVO = null;\n\n\t\tConnection con = null;\n\t\tPreparedStatement pstmt = null;\n\t\tResultSet rs = null;\n\n\t\ttry {\n\n\t\t\tClass.forName(driver);\n\t\t\tcon = DriverManager.getConnection(url, userid, passwd);\n\t\t\tpstmt = con.prepareStatement(GET_ALL_STMT);\n\t\t\trs = pstmt.executeQuery();\n\n\t\t\twhile (rs.next()) {\n\t\t\t\t// empVO 也稱為 Domain objects\n\t\t\t\tnewsVO = new NewsVO();\n\t\t\t\tnewsVO.setNews_id(rs.getString(\"news_id\"));\n\t\t\t\tnewsVO.setNews_content(rs.getString(\"news_content\"));\n\t\t\t\tnewsVO.setNews_date(rs.getTimestamp(\"news_date\"));\n\t\t\t\tlist.add(newsVO); // Store the row in the list\n\t\t\t}\n\n\t\t\t// Handle any driver errors\n\t\t} catch (ClassNotFoundException e) {\n\t\t\tthrow new RuntimeException(\"Couldn't load database driver. \"\n\t\t\t\t\t+ e.getMessage());\n\t\t\t// Handle any SQL errors\n\t\t} catch (SQLException se) {\n\t\t\tthrow new RuntimeException(\"A database error occured. \"\n\t\t\t\t\t+ se.getMessage());\n\t\t\t// Clean up JDBC resources\n\t\t} finally {\n\t\t\tif (rs != null) {\n\t\t\t\ttry {\n\t\t\t\t\trs.close();\n\t\t\t\t} catch (SQLException se) {\n\t\t\t\t\tse.printStackTrace(System.err);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (pstmt != null) {\n\t\t\t\ttry {\n\t\t\t\t\tpstmt.close();\n\t\t\t\t} catch (SQLException se) {\n\t\t\t\t\tse.printStackTrace(System.err);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (con != null) {\n\t\t\t\ttry {\n\t\t\t\t\tcon.close();\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\te.printStackTrace(System.err);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn list;\n\t}", "List<NewsFile> selectAll();", "public List<MTSDocumentVO> getArticles(String cat, String pubId, int count, boolean isPagePreview) {\n\t\t// Create the structure\n\t\tList<Object> vals = new ArrayList<>();\n\t\tvals.add(cat);\n\n\t\tStringBuilder sql = new StringBuilder(464);\n\t\tsql.append(\"select action_nm, action_desc, a.action_id, document_id, \");\n\t\tsql.append(\"unique_cd, publication_id, direct_access_pth, publish_dt, c.sponsor_id \");\n\t\tsql.append(\"from widget_meta_data_xr a \");\n\t\tsql.append(\"inner join sb_action b on a.action_id = b.action_id and b.pending_sync_flg = 0 \");\n\t\tsql.append(\"inner join document doc on b.action_id = doc.action_id \");\n\t\tsql.append(DBUtil.INNER_JOIN).append(getCustomSchema()).append(\"mts_document c on b.action_group_id = c.document_id \");\n\t\tsql.append(DBUtil.INNER_JOIN).append(getCustomSchema()).append(\"mts_issue d on c.issue_id = d.issue_id \");\n\t\tsql.append(\"where d.approval_flg=1 and widget_meta_data_id=? \"); \n\t\tif (!isPagePreview) {\n\t\t\tsql.append(\" and (c.publish_dt < CURRENT_TIMESTAMP or c.publish_dt is null) and (d.issue_dt < CURRENT_TIMESTAMP or d.issue_dt is null) \");\n\t\t\tsql.append(\"and c.publish_dt > current_date-730 \"); //only show articles newer than 2yrs old - MTS-i36\n\t\t}\n\t\tif (!StringUtil.isEmpty(pubId)) {\n\t\t\tsql.append(\"and publication_id = ? \");\n\t\t\tvals.add(pubId);\n\t\t}\n\t\tsql.append(\"order by random() limit ? \");\n\t\tvals.add(count);\n\t\tlog.debug(sql.length() + \"|\" + sql + \"|\" + vals);\n\n\t\tDBProcessor db = new DBProcessor(getDBConnection(), getCustomSchema());\n\t\tList<MTSDocumentVO> docs = db.executeSelect(sql.toString(), vals, new MTSDocumentVO());\n\t\ttry {\n\t\t\tassignDocumentAsset(docs, cat);\n\t\t} catch (SQLException e) {\n\t\t\tlog.error(\"Unabel to load assets\", e);\n\t\t}\n\n\t\treturn docs;\n\t}", "@Override\n\tpublic List<News> getList() {\n\t\topenCurrentSession();\n\t\t@SuppressWarnings(\"unchecked\")\n\t\tList<News> list = (List<News>)getCurrentSession().createQuery(\"FROM News\").list();\n\t\tcloseCurrentSession();\n\t\treturn list;\n\t}", "List<NovedadAdapter> getAll();", "@Override\r\n\tpublic List<News> getNewsList(String pId, String size, String query) {\n\t\tString hql=\" WHERE 1=1 AND o.lm.id=\"+pId+query;\r\n\t\treturn this.findAll(News.class, hql, 0, Integer.valueOf(size));\r\n\t}", "public List<Articles> listArticlesService();", "private static List<Article> createArticleList() {\n List<Article> articles = new ArrayList();\n articles.add(new Article(1l, \"Ball\", new Double(5.5), Type.TOY));\n articles.add(new Article(2l, \"Hammer\", new Double(250.0), Type.TOOL));\n articles.add(new Article(3l, \"Doll\", new Double(12.75), Type.TOY));\n return articles;\n }", "public List<BlogEntity> findAll() {\r\n LOGGER.log(Level.INFO, \"Consultando todas los Blog\");\r\n // Se crea un query para buscar todas las grupoDeIntereses en la base de datos.\r\n TypedQuery query = em.createQuery(\"select u from Blog u\", BlogEntity.class);\r\n // Se hace uso del método getResultList() que obtiene una lista de grupoDeIntereses.\r\n return query.getResultList();\r\n }", "public List<SiteNoticia> listarPorData() {\n List<SiteNoticia> result = new ArrayList<SiteNoticia>();\n EntityManager em1 = getEM();\n em1.getTransaction().begin();\n CriteriaBuilder builder = em1.getCriteriaBuilder();\n CriteriaQuery query = builder.createQuery(SiteNoticia.class);\n //EntityType type = em1.getMetamodel().entity(SiteNoticia.class);\n Root root = query.from(SiteNoticia.class);\n query.orderBy(builder.desc(root.get(\"hora2\")));\n result = em1.createQuery(query).getResultList();\n em1.close();\n return result;\n }", "@Override\n\tpublic List<NewsCollection> findAllList(Map<String, Object> param) {\n\t\treturn newsCollectionMapper.findAllList(param);\n\t}", "public java.util.List<VcmsArticleType> findAll();", "public Digital(int id, String title, String description, String image, String author, Date timePost, String shortDes) {\n this.id = id;\n this.title = title;\n this.description = description;\n this.image = image;\n this.author = author;\n this.timePost = timePost;\n this.shortDes = shortDes;\n }", "@Override\n\tpublic List<DvdCd> getAll() {\n\t\tlogger.info(\"Listando todos os DVDs/CDs\");\n\t\treturn itemRepository.findAll(UserServiceImpl.authenticated().getId());\n\t}", "public ArrayList<ListArt> PrintWikiArticles()\r\n\t{\r\n\t\t//----- Declare variables----------//\r\n\t\tfinal String Art = \"Article\";\r\n\t\tint NumberCross = 0;\r\n\t\tfinal Label recordClassLabel = DynamicLabel.label(Art); \r\n\t\tListArt aux = null;\r\n\t\t//---------------------------------//\r\n\r\n\t\ttry (Transaction tx = graphDb.beginTx()) {\r\n\t\t\tResourceIterator<Node> it = graphDb.findNodes(recordClassLabel, \"wikiid\", \"1395966\"); // Node representing a component\r\n\t\t\tNode next = null; \r\n\t\t\twhile( it.hasNext() ) { \r\n\t\t\t\tnext = it.next(); \r\n\t\t\t\tString lang = (String)next.getProperty(\"lang\");\r\n\t\t\t\tif ( lang.equals(\"en\") ) // language of the node\r\n\t\t\t\t\tbreak; \r\n\t\t\t} \r\n\r\n\t\t\tvisit(graphDb, next, /*visited,*/ NumberCross, aux, ListNode);\r\n\t\t\ttx.success(); \r\n\r\n\t\t}\r\n\t\treturn ListNode;\r\n\r\n\t}", "@GET\r\n public List<DocumentoDTO> obtenerDocumento(){\r\n List<DocumentoEntity> documento= logic.obtenerDocumento(); \r\n return DocumentoDTO.toZooList(documento);\r\n }", "@GET(\"user-news-article-content?expand=newsArticle,newsArticle.newsArticleType,newsArticle.translations,newsArticle.like,newsArticle.liked,newsArticle.comments_count&per-page=1000\")\n Call<UserNewsResponse>getUserNews();", "private List<NewsArticle> getMostPopular() {\n LOGGER.log(Level.INFO, \"getMostPopular\");\n return newsService.getMostPopular();\n }", "List<ContentSum> findAll();", "public List<Blog> list();", "List<NewsInfo> selectByExample(NewsInfoExample example);", "public List<Post> retriveAllPosts()\n\t {\n\t\t List<Post> Posts =(List<Post>) Postrepository.findAll();\n\t\t \n\t\t for(Post Post :Posts)\n\t\t {\n\t\t\t //l.info(\"Post +++ :\" +Post);\n\t\t }\n\t\t return Posts;\n\t\t\t \n\t }", "public List<MedioDePagoEntity> findAll() {\n LOGGER.log(Level.INFO, \"Consultando todos los medios de pago\");\n TypedQuery query = em.createQuery(\"select u from MedioDePagoEntity u\", MedioDePagoEntity.class);\n return query.getResultList();\n }", "@RequestMapping(value = \"/newsfeed/\", method = RequestMethod.GET)\r\n public ResponseEntity<List<NewsFeed>> listAllNewsFeed() {\r\n List<NewsFeed> newsFeeds = newsFeedService.findAllNewsFeeds();\r\n if(newsFeeds.isEmpty()){\r\n return new ResponseEntity<List<NewsFeed>>(HttpStatus.NO_CONTENT);//You many decide to return HttpStatus.NOT_FOUND\r\n }\r\n return new ResponseEntity<List<NewsFeed>>(newsFeeds, HttpStatus.OK);\r\n }", "public News getByid(News news);", "public List<DBObject> getNews(List<ObjectId> userStories, int skip) \n throws InputException, MongoException;", "@GetMapping(\"/api/article\")\n\tpublic MedicineArticle fetchJson() {\n\t\tfinal String hackerNewsUrl = \"https://hn.algolia.com/api/v1/search?query=medicine&tags=story&hitsPerPage=40\";\n\n\t\t// **Use the unsplash api to randomly pick an image about medicine and use it\n\t\t// for the returned JSON imageUrl field.\n\t\tfinal String unsplashUrl = \"https://api.unsplash.com/photos/random?count=1&query=medicine&client_id=w3l5_QBR_ohoKklyM7Hhy-uo5BGgO6cG0-is4aKEnZY\";\n\n\t\t// using jackson API\n\t\tObjectMapper objectMapper = new ObjectMapper();\n\t\tObjectMapper objectMapper1 = new ObjectMapper();\n\n\t\tList<MedicineArticle> medArticle = new ArrayList<MedicineArticle>();\n\t\tHits medicineArticleHolder = new Hits();\n\n\t\tUnsplashImage[] unsplashImageHolder;\n\t\tUnsplashImage unsplashImageHolder1 = new UnsplashImage();\n\n\t\ttry {\n\t\t\t// json deserialization\n\t\t\tmedicineArticleHolder = objectMapper.readValue(new URL(hackerNewsUrl), Hits.class);\n\t\t\tmedArticle = medicineArticleHolder.getMedArticle(); /* get the element from hackerNews response json */\n\n\t\t\t// json deserialization\n\t\t\tunsplashImageHolder = objectMapper1.readValue(new URL(unsplashUrl), UnsplashImage[].class);\n\t\t\tunsplashImageHolder1 = unsplashImageHolder[0];\t/* get the element from unsplash response json */\n\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\t// **For the duration of 1 hour return the same JSON content\n\t\tLocalTime now = LocalTime.now();\n\n\t\ttry {\n\t\t\tmedArticle.get(now.getHour()).setImageUrl(unsplashImageHolder1.getUnsplashImageUrl().getThumbUrl());\n\t\t} catch (IndexOutOfBoundsException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn medArticle.get(now.getHour());\n\t}", "ch.crif_online.www.webservices.crifsoapservice.v1_00.PublicationList getPublicationList();", "@RequestMapping(\"/news\")\n public List<NewsVO> getRelatedNewsVO(String code){\n return analyseService.getRelatedNewsVO(code);\n }", "public List<Articleimage> getArticleImageList(Article article){\n \n UrlGenerator urlGen = new UrlGenerator();\n String imageKeyIdTemp = urlGen.getNewURL();\n \n List<Articleimage> articleimageList = new ArrayList<>();\n Document doc = Jsoup.parse(article.getArtContent());\n Elements elements = doc.getElementsByTag(\"img\");\n \n \n for(int i=0; i< elements.size(); i++){ \n String artImagekeyid = String.valueOf(i)+imageKeyIdTemp;\n \n String artImgsrc=elements.get(i).attr(\"src\");\n String artImgalt=elements.get(i).attr(\"alt\");\n String artImgcssclass=elements.get(i).attr(\"class\");\n String artImgcssstyle=elements.get(i).attr(\"style\");\n \n Articleimage articleimage = new Articleimage( artImgsrc, artImgcssclass,\n \t\t\t artImgcssstyle, artImgalt, artImagekeyid);\n articleimageList.add(articleimage);\n }\n return articleimageList;\n }", "@Override\n public List<Digital> getTop(int top) throws Exception {\n Connection con = null;\n ResultSet rs = null;\n PreparedStatement ps = null;\n List<Digital> list = new ArrayList<>();\n // check connection of db if cannot connect, it will throw an object of Exception\n try {\n\n String query = \"select top \" + top + \" * from digital order by timePost desc\";\n con = getConnection();\n ps = con.prepareCall(query);\n rs = ps.executeQuery();\n while (rs.next()) {\n Digital d = new Digital(rs.getInt(\"id\"),\n rs.getString(\"title\"),\n rs.getString(\"description\"),\n rs.getString(\"images\"),\n rs.getString(\"author\"),\n rs.getTimestamp(\"timePost\"),\n rs.getString(\"shortDes\"));\n list.add(d);\n }\n\n } catch (Exception e) {\n throw e;\n } finally {\n // close ResultSet, PrepareStatement, Connection\n closeResultSet(rs);\n closePrepareStateMent(ps);\n closeConnection(con);\n }\n return list;\n }", "public List<Card> findAllCards();", "@Override\n\tpublic List<Image> findByIdArticles(long idArticles) {\n\t\treturn imageRepository.findByIdArticles(idArticles);\n\t}", "public List getJpmProductSaleNews(JpmProductSaleNew jpmProductSaleNew);", "public List<Article> getList() {\n return list;\n }", "@Query(\"SELECT new com.rentit.project.pojo.query.CustomArticle(a.articleId, a.name, a.description, a.stockLevel, a.price, im.imageLink) \"\n\t\t\t+ \"FROM ArticleEntity a, ImageEntity im WHERE im.art = a.articleId and im.imageType = 'titel' and a.articleId=?1\")\n\tCustomArticle findByIds(Long id);", "List<BlogDetails> selectAll();", "public Iterable<Content> findAllFeaturedContent(){\n\n return contentRepository.findByIsFeatured(true);\n }", "private void ListForeignDatei () {\n\n ForeignDataDbSource foreignDataDbSource = new ForeignDataDbSource();\n\n List<ForeignData> foreignDataList= foreignDataDbSource.getAllForeignData();\n Log.d(LOG_TAG,\"=============================================================\");\n\n for (int i= 0; i < foreignDataList.size(); i++){\n String output = \"Foreign_ID_Node: \"+ foreignDataList.get(i).getUid() +\n //\"\\n Status: \"+ foreignDataList.get(i).isChecked() +\n \"\\n Foto ID: \"+ foreignDataList.get(i).getFotoId() +\n \"\\n Punkt X: \"+ foreignDataList.get(i).getPunktX() +\n \"\\n Punkt Y: \"+ foreignDataList.get(i).getPunktY() +\n \"\\n IP: \"+ foreignDataList.get(i).getForeignIp() ;\n\n Log.d(LOG_TAG, output);\n }\n Log.d(LOG_TAG,\"=============================================================\");\n }", "public java.util.List<VcmsDiscussion> findAll();", "public MainList getDetailForcast(String date) {\n\t\t\t\n\t\t\tMainList mainLists = new MainList();\n\t\t\tList<Forcast> forcasts = new ArrayList<>();\n\t\t\tList<Forcast> forcastLists = this.mainList.getListItem();\n\t\t\t\n\t\t\tSystem.out.println(\"date>> \"+date);\n\t\t\t\n\t\t\tforcasts = forcastLists.stream().filter(p -> (formatData(p.getDt_txt())).equals(formatData(date))).collect(Collectors.toList());\n\t\t\t\n\t\t\tmainLists.setListItem(forcasts);\n\t\t\tmainLists.setCity(this.mainList.getCity());\n\t\t\t\n\t\t\treturn mainLists;\n\t\t}", "@Override\n\tpublic List<String> getAllImages() {\n\t\t\n\t\treturn jdbcTemplate.query(\"select * from news\", new BeanPropertyRowMapper<News>());\n\t}", "@Select({\n \"select\",\n \"NEWS_ID, TITLE, BODY, IMG_URL, URL, CREATE_TIME\",\n \"from NEWS\",\n \"where NEWS_ID = #{newsId,jdbcType=INTEGER}\"\n })\n @Results({\n @Result(column=\"NEWS_ID\", property=\"newsId\", jdbcType=JdbcType.INTEGER, id=true),\n @Result(column=\"TITLE\", property=\"title\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"BODY\", property=\"body\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"IMG_URL\", property=\"imgUrl\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"URL\", property=\"url\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"CREATE_TIME\", property=\"createTime\", jdbcType=JdbcType.TIMESTAMP)\n })\n News selectByPrimaryKey(Integer newsId);", "List<Article> selectAll();", "List<NotificacionInfo> findAll();", "@Override\n public List<Article> getArticles() {\n List<Article> articles=articleDAO.getArticles();\n knownArticles.addAll(articles);\n return articles;\n }", "public ArrayList<Article> getUnpublishedArticle(int authorID) throws SQLException {\r\n\t\tConnectionManager conn=null;\r\n\t\tArrayList<Integer> intArtID = new ArrayList<Integer>();\r\n\t\tArrayList<Integer> finalselectedArticleID = new ArrayList<Integer>();\r\n\t\tArrayList<Article> unpubArticle = new ArrayList<Article>();\r\n\t\tString queryArticle = \"select ArticleAuthor.articleID from ArticleAuthor where ArticleAuthor.authorID =\" + authorID;\r\n\t\ttry {\r\n\t\t\tconn = new ConnectionManager();\r\n\t\t\tStatement st = conn.getInstance().getConnection().createStatement();\r\n\t\t\tResultSet rs = st.executeQuery(queryArticle);\r\n\t\t\twhile (rs.next()) {\r\n\t\t\t\tint articleId=rs.getInt(\"ArticleAuthor.articleID\");\r\n\t\t\t\tSystem.out.println(\"articleIDs aayi:\"+articleId);\r\n\t\t\t\tintArtID.add(articleId);\r\n\t\t\t}\r\n\t\t\tSystem.out.println(intArtID);\r\n\t\t\trs.close();\r\n\t\t\tfor(int a: intArtID){\r\n\t\t\t\tStatement st1 = conn.getInstance().getConnection().createStatement();\r\n\t\t\t\tString selectQuery2 = \"Select articleID from Article where articleID!=\"+a;\r\n\t\t\t\tResultSet rs1 = st1.executeQuery(selectQuery2);\r\n\t\t\t\twhile(rs1.next()){\r\n\t\t\t\t\tint articleId=rs1.getInt(\"articleID\");\r\n\t\t\t\t\tif(!intArtID.contains(articleId)){\r\n\t\t\t\t\t\tif(!finalselectedArticleID.contains(articleId)){\r\n\t\t\t\t\t\t\tfinalselectedArticleID.add(articleId);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tSystem.out.println(\"Final ids:\"+finalselectedArticleID);\r\n\t\t\tfor(int autID : finalselectedArticleID ){\r\n\t\t\t\tStatement st2 = conn.getInstance().getConnection().createStatement();\r\n\t\t\t\tString q = \"select articleID, title, summary from Article where articleID=\"+autID;\r\n\t\t\t\tResultSet rs2 = st2.executeQuery(q);\r\n\t\t\t\twhile (rs2.next()) {\r\n\t\t\t\t\tString unpublishedTitle = (String) rs2.getObject(\"title\");\r\n\t\t\t\t\tString unpublishedSummary = (String) rs2.getObject(\"summary\");\r\n\t\t\t\t\tint articeIde=rs2.getInt(\"articleID\");\r\n\t\t\t\t\tArticle article2 = new Article(articeIde, unpublishedTitle, unpublishedSummary);\r\n\t\t\t\t\tunpubArticle.add(article2);\r\n\t\t\t\t}\r\n\t\t\t\tSystem.out.println(unpubArticle);\r\n\t\t\t\trs2.close();\r\n\t\t\t\tst2.close();\r\n\t\t\t}\r\n\t\t\tst.close();\r\n\t\t} catch (ClassNotFoundException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}finally{\r\n\t\t\tif (conn!=null){\r\n\t\t\t\tconn.close();\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn unpubArticle;\r\n\t}", "List<Medicine> getAllMedicines();", "void fetchFactFeeds();", "@RequestMapping(value = \"/newsbulletin\", method = RequestMethod.GET)\n public ResponseEntity<Object> fetchArticles(@RequestParam String sortBy, @RequestParam String sortDirection) {\n return new ResponseEntity<Object>( newsDelivery.findAll(sortBy,sortDirection), HttpStatus.OK);\n }", "public List<NewsItem> getNewsItemDataFromDB() throws SQLException;", "@Override\r\n\tpublic List<Disease> findAll() {\r\n\t\t// setting logger info\r\n\t\tlogger.info(\"Find the details of the disease\");\r\n\t\treturn diseaseRepo.findAll();\r\n\t}", "List<News> selectByExample(NewsExample example);", "@SkipValidation\n public String getAllImportantNews() {\n impList = impService.getAllImportantNews();\n return SUCCESS;\n }", "public List<Artigo> getArtigos(String idRevista){\n List<Artigo> artigos = new ArrayList<>();\n Artigo a;\n String id, revistaID, titulo, corpo, nrConsultas,categoria;\n LocalDate data;\n\n try{\n connection = con.connect();\n PreparedStatement\n stm = connection.prepareStatement(\"SELECT * FROM Artigo \" +\n \"INNER JOIN Revista ON Artigo.Revista_ID = Revista.ID \" +\n \"WHERE Artigo.Revista_ID = \" + idRevista);\n ResultSet rs = stm.executeQuery();\n while(rs.next()){\n id = rs.getString(\"ID\");\n revistaID = rs.getString(\"Revista_ID\");\n data = rs.getDate(\"Data\").toLocalDate();\n titulo = rs.getString(\"Titulo\");\n corpo = rs.getString(\"Corpo\");\n nrConsultas = rs.getString(\"NrConsultas\");\n categoria = rs.getString(\"Categoria\");\n a = new Artigo(id,revistaID,data,titulo,corpo,nrConsultas, categoria);\n artigos.add(a);\n }\n }\n catch (Exception e) {\n e.printStackTrace();\n }\n finally {\n con.close(connection);\n }\n return artigos;\n }", "public void listNens() {\n\t\t\tEntityManager em = emf.createEntityManager();\n\t\t\tem.getTransaction().begin();\n\t\t\tList<Nen> result = em.createQuery(\"from nen\", Nen.class)\n\t\t\t\t\t.getResultList();\n\t\t\tfor (Nen a : result) {\n\t\t\t\tSystem.out.println(a.toString());\n\t\t\t}\n\t\t\tem.getTransaction().commit();\n\t\t\tem.close();\t\n\t\t}", "@Override\n public String getDescription() {\n return \"Digital goods listing\";\n }", "public static List<Image> findImagesByNewsId(Integer newsId){\n return finder.where().eq(\"news_id\", newsId).findList();\n }", "@Override\r\n\tpublic List<News> getNewsTjList(String pId, String size, String query) {\n\t\treturn null;\r\n\t}", "public List<DishItem> getDish(){\n \tList<DishItem> dish = new ArrayList<DishItem>();\n\t\t\n\t\t//User user = userDao.find();\n\t\t//String tokenString = user.getToken();\n\t\t\n\t\tString dishResult;\t\t\n\t\tString urlString=\"/service/dish/getalldishs\";\n\t\ttry {\n\t\t\tdishResult = connect.testURLConn1(urlString);\n\t\t\tJSONObject jsonObject = new JSONObject(dishResult);System.out.println(\"jsonObject==\"+jsonObject);\n\t\t\tJSONArray jsonArray = jsonObject.getJSONArray(\"date\");System.out.println(\"jsonArray==\"+jsonArray);\n\t\t\t//userJSON = jsonObject.getJSONObject(\"user\");\n\t\t\t\n\t\t\tfor(int i=0;i<jsonArray.length();i++){ \n\t\t\t\t JSONObject jo = (JSONObject)jsonArray.opt(i);\n\t\t String id = jo.getString(\"_id\");\n\t\t String dishName = jo.getString(\"dishName\");\n\t\t String desc = jo.getString(\"desc\");\n\t\t int pic=jo.getInt(\"pic\");\n\t\t int col=jo.getInt(\"col\");\n\t\t DishItem dishitem = new DishItem(id, dishName, desc,pic,col);\n\t dish.add(dishitem);\n\t }\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\t\n\t \n\t\treturn dish;\n\t\t\n\t}", "@Override\n public List<Disease> findDiseaseByInfo(Disease diseaseInfo) {\n List<Disease> list = diseaseRepository.findByInfo(diseaseInfo.getDname(),diseaseInfo.getNickName(),\n diseaseInfo.getLevel(),diseaseInfo.getSymptom(),diseaseInfo.getCure());\n return list;\n }", "public List<Article> generateArticles(Data data) {\n List<Article> articles = new ArrayList<>();\n for (int i = 0; i < Integer.parseInt(data.getArticleNumber()); i++) {\n articles.add(new Article(\n data.getArticle().getTitle() + RandomStringUtils.random(5, false, true),\n data.getArticle().getDescription() + RandomStringUtils.random(5, false, true),\n data.getArticle().getBody(),\n data.getArticle().getTags() + RandomStringUtils.random(5, false, true)\n ));\n }\n return articles;\n }", "@Override\r\n\tpublic DataWrapperDiy<List<CommonNotice>> getAllNoticeList(String token, Integer pageSize, Integer pageIndex) {\n\t\tDataWrapperDiy<List<CommonNotice>> result = new DataWrapperDiy<List<CommonNotice>>();\r\n\t\tList<CommonNotice> resultList = new ArrayList<CommonNotice>();\r\n\t\tUser user = SessionManager.getSession(token); \r\n\t\tif(user!=null){\r\n\t\t\tDataWrapper<List<Notice>> gets = noticeDao.getListByUserId(pageSize,pageIndex,user.getId());\r\n\t\t\tInteger totalNotRead=0;\r\n\t\t\ttotalNotRead= noticeDao.getListNotRead(user.getId());\r\n\t\t\tif(gets.getData()!=null){\r\n\t\t\t\tif(!gets.getData().isEmpty()){\r\n\t\t\t\t\tresult.setCurrentPage(gets.getCurrentPage());\r\n\t\t\t\t\tresult.setNumberPerPage(gets.getNumberPerPage());\r\n\t\t\t\t\tresult.setTotalNumber(gets.getTotalNumber());\r\n\t\t\t\t\tresult.setTotalPage(gets.getTotalPage());\r\n\t\t\t\t\tfor(Notice no:gets.getData()){\r\n\t\t\t\t\t\t//0 质量问题、 1 安全问题、 2 施工任务单、 3 预付单 、4 留言\r\n\t\t\t\t\t\tswitch(no.getNoticeType()){\r\n\t\t\t\t case 0:\r\n\t\t\t\t {\r\n\t\t\t\t \tCommonNotice commonNotice = new CommonNotice();\r\n\t\t\t\t\t\t\t\tcommonNotice.setCreateDate(Parameters.getSdf().format(no.getCreateDate()));\r\n\t\t\t\t\t\t\t\tcommonNotice.setNoticeType(no.getNoticeType());\r\n\t\t\t\t\t\t\t\tcommonNotice.setReadState(no.getReadState());\r\n\t\t\t\t\t\t\t\tcommonNotice.setAboutId(no.getAboutId());\r\n\t\t\t\t \tQualityQuestion qualityQuestion = new QualityQuestion();\r\n\t\t\t\t \tqualityQuestion=qualityQuestionDao.getById(no.getAboutId());\r\n\t\t\t\t \tif(qualityQuestion!=null){\r\n\t\t\t\t \t\tcommonNotice.setAboutCreateUserId(qualityQuestion.getUserId());\r\n\t\t\t\t \t\tUser createUser=userDao.getById(qualityQuestion.getUserId());\r\n\t\t\t\t\t\t\t\t\tif(createUser!=null){\r\n\t\t\t\t\t\t\t\t\t\tcommonNotice.setCreateUserName(createUser.getRealName());\r\n\t\t\t\t\t\t\t\t\t\tif(createUser.getUserIcon()!=null){\r\n\t\t\t\t\t\t\t\t\t\t\tFiles urlfiles = fileDao.getById(createUser.getUserIcon());\r\n\t\t\t\t\t\t\t\t\t\t\tif(urlfiles!=null){\r\n\t\t\t\t\t\t\t\t\t\t\t\tcommonNotice.setUserIconUrl(urlfiles.getUrl());\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t}else if(createUser.getUserIconUrl()!=null){\r\n\t\t\t\t\t\t\t\t\t\t\tcommonNotice.setUserIconUrl(createUser.getUserIconUrl());\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\tif(qualityQuestion.getState()==0){\r\n\t\t\t\t\t\t\t\t\t\tif(createUser!=null){\r\n\t\t\t\t\t \t\t\tcommonNotice.setTitle(createUser.getRealName()+\"提交了一个质量问题已完成\");\r\n\t\t\t\t\t \t\t}\r\n\t\t\t \t\t\t}\r\n\t\t\t \t\t\tif(qualityQuestion.getState()==1){\r\n\t\t\t \t\t\t\tcommonNotice.setTitle(createUser.getRealName()+\"提交了一个安全问题已完成\");\r\n\t\t\t \t\t\t}\r\n\t\t\t\t \t\t\r\n\t\t\t\t \t\tcommonNotice.setContent(qualityQuestion.getIntro());\r\n\t\t\t\t \t\tProject project = projectDao.getById(qualityQuestion.getProjectId());\r\n\t\t\t\t \t\tif(project!=null){\r\n\t\t\t\t \t\t\tcommonNotice.setProjectName(project.getName());\r\n\t\t\t\t \t\t}\r\n\t\t\t\t \t\tif(createUser.getUserIconUrl()!=null){\r\n\t\t\t\t \t\t\tcommonNotice.setUserIconUrl(createUser.getUserIconUrl());\r\n\t\t\t\t \t\t}\r\n\t\t\t\t \t\tif(createUser.getUserIcon()!=null){\r\n\t\t\t\t \t\t\tFiles userIcon = fileDao.getById(createUser.getUserIcon());\r\n\t\t\t\t \t\t\tif(userIcon!=null){\r\n\t\t\t\t \t\t\t\tcommonNotice.setUserIconUrl(userIcon.getUrl());\r\n\t\t\t\t \t\t\t}\r\n\t\t\t\t \t\t}\r\n\t\t\t\t \t\tDataWrapper<List<QuestionFile>> images = questionFileDao.getQuestionFileByQualityId(qualityQuestion.getId());\r\n\t\t\t\t\t\t\t\t\tif(images.getData()!=null){\r\n\t\t\t\t\t\t\t\t\t\tif(!images.getData().isEmpty()){\r\n\t\t\t\t\t\t\t\t\t\t\tFiles files = fileDao.getById(images.getData().get(0).getFileId());\r\n\t\t\t\t\t\t\t\t\t\t\tif(files!=null){\r\n\t\t\t\t\t\t\t\t\t\t\t\tcommonNotice.setImagUrl(files.getUrl());\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\tcommonNotice.setName(qualityQuestion.getName());\r\n\t\t\t\t\t\t\t\t\tif(qualityQuestion.getUserList()!=null){\r\n\t\t\t\t\t\t\t\t\t\tString[] strs = qualityQuestion.getUserList().split(\",\");\r\n\t\t\t\t\t\t\t\t\t\tList<String> nameList = new ArrayList<String>();\r\n\t\t\t\t\t\t\t\t\t\tfor(int q=0;q<strs.length;q++){\r\n\t\t\t\t\t\t\t\t\t\t\tUser sendUser = userDao.getById(Long.valueOf(strs[q]));\r\n\t\t\t\t\t\t\t\t\t\t\tif(sendUser!=null){\r\n\t\t\t\t\t\t\t\t\t\t\t\tnameList.add(sendUser.getRealName());\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\tcommonNotice.setSendUserList(nameList);\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\tresultList.add(commonNotice);\r\n\t\t\t\t \t}\r\n\t\t\t\t \tbreak;\r\n\t\t\t\t }\r\n\t\t\t\t case 1:\r\n\t\t\t\t {\r\n\t\t\t\t \tCommonNotice commonNotice = new CommonNotice();\r\n\t\t\t\t\t\t\tcommonNotice.setCreateDate(Parameters.getSdf().format(no.getCreateDate()));\r\n\t\t\t\t\t\t\tcommonNotice.setNoticeType(no.getNoticeType());\r\n\t\t\t\t\t\t\tcommonNotice.setAboutId(no.getAboutId());\r\n\t\t\t\t\t\t\tcommonNotice.setReadState(no.getReadState());\r\n\t\t\t\t \tQuestion question = new Question();\r\n\t\t\t\t \tquestion=questionDao.getById(no.getAboutId());\r\n\t\t\t \tif(question!=null){\r\n\t\t\t \t\tcommonNotice.setAboutCreateUserId(question.getUserId());\r\n\t\t\t \t\tUser createUser=userDao.getById(question.getUserId());\r\n\t\t\t\t\t\t\t\tif(createUser!=null){\r\n\t\t\t\t\t\t\t\t\tcommonNotice.setCreateUserName(createUser.getRealName());\r\n\t\t\t\t\t\t\t\t\tif(createUser.getUserIcon()!=null){\r\n\t\t\t\t\t\t\t\t\t\tFiles urlfiles = fileDao.getById(createUser.getUserIcon());\r\n\t\t\t\t\t\t\t\t\t\tif(urlfiles!=null){\r\n\t\t\t\t\t\t\t\t\t\t\tcommonNotice.setUserIconUrl(urlfiles.getUrl());\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t}else if(createUser.getUserIconUrl()!=null){\r\n\t\t\t\t\t\t\t\t\t\tcommonNotice.setUserIconUrl(createUser.getUserIconUrl());\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t \t\tif(createUser!=null){\r\n\t\t\t \t\t\tif(question.getState()==0){\r\n\t\t\t \t\t\t\tcommonNotice.setTitle(createUser.getRealName()+\"提交了一个安全问题待处理\");\r\n\t\t\t \t\t\t}\r\n\t\t\t \t\t\tif(question.getState()==1){\r\n\t\t\t \t\t\t\tcommonNotice.setTitle(createUser.getRealName()+\"提交了一个安全问题已完成\");\r\n\t\t\t \t\t\t}\r\n\t\t\t \t\t}\r\n\t\t\t \t\tcommonNotice.setContent(question.getIntro());\r\n\t\t\t \t\tProject project = projectDao.getById(question.getProjectId());\r\n\t\t\t \t\tif(project!=null){\r\n\t\t\t \t\t\tcommonNotice.setProjectName(project.getName());\r\n\t\t\t \t\t}\r\n\t\t\t \t\tDataWrapper<List<QuestionFile>> images = questionFileDao.getQuestionFileByQuestionId(question.getId());\r\n\t\t\t\t\t\t\t\tif(images.getData()!=null){\r\n\t\t\t\t\t\t\t\t\tif(!images.getData().isEmpty()){\r\n\t\t\t\t\t\t\t\t\t\tFiles files = fileDao.getById(images.getData().get(0).getFileId());\r\n\t\t\t\t\t\t\t\t\t\tif(files!=null){\r\n\t\t\t\t\t\t\t\t\t\t\tcommonNotice.setImagUrl(files.getUrl());\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tif(question.getUserList()!=null){\r\n\t\t\t\t\t\t\t\t\tString[] strs = question.getUserList().split(\",\");\r\n\t\t\t\t\t\t\t\t\tList<String> nameList = new ArrayList<String>();\r\n\t\t\t\t\t\t\t\t\tfor(int q=0;q<strs.length;q++){\r\n\t\t\t\t\t\t\t\t\t\tUser sendUser = userDao.getById(Long.valueOf(strs[q]));\r\n\t\t\t\t\t\t\t\t\t\tif(sendUser!=null){\r\n\t\t\t\t\t\t\t\t\t\t\tnameList.add(sendUser.getRealName());\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\tcommonNotice.setSendUserList(nameList);\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tcommonNotice.setName(question.getName());\r\n\t\t\t\t\t\t\t\tresultList.add(commonNotice);\r\n\t\t\t \t}\r\n\t\t\t\t break;\r\n\t\t\t\t }\r\n\t\t\t\t case 2:\r\n\t\t\t\t {\r\n\t\t\t\t \tCommonNotice commonNotice = new CommonNotice();\r\n\t\t\t\t\t\t\tcommonNotice.setCreateDate(Parameters.getSdf().format(no.getCreateDate()));\r\n\t\t\t\t\t\t\tcommonNotice.setNoticeType(no.getNoticeType());\r\n\t\t\t\t\t\t\tcommonNotice.setAboutId(no.getAboutId());\r\n\t\t\t\t\t\t\tcommonNotice.setReadState(no.getReadState());\r\n\t\t\t\t\t\t\tConstructionTaskNew ct = constructionTaskNewDao.getById(no.getAboutId());\r\n\t\t\t\t\t\t\tif(ct!=null){\r\n\t\t\t\t\t\t\t\tcommonNotice.setAboutCreateUserId(ct.getCreateUser());\r\n\t\t\t\t\t\t\t\tcommonNotice.setContent(ct.getConstructContent());\r\n\t\t\t\t\t\t\t\tProject project = projectDao.getById(ct.getProjectId());\r\n\t\t\t\t\t\t\t\tif(project!=null){\r\n\t\t\t\t\t\t\t\t\tcommonNotice.setProjectName(project.getName());\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tif(ct.getImgs()!=null){\r\n\t\t\t\t\t\t\t\t\tcommonNotice.setImagUrl(ct.getImgs().split(\",\")[0]);\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tUser createUser=userDao.getById(ct.getCreateUser());\r\n\t\t\t\t\t\t\t\tif(createUser!=null){\r\n\t\t\t\t\t\t\t\t\tcommonNotice.setCreateUserName(createUser.getRealName());\r\n\t\t\t\t\t\t\t\t\tif(createUser.getUserIcon()!=null){\r\n\t\t\t\t\t\t\t\t\t\tFiles urlfiles = fileDao.getById(createUser.getUserIcon());\r\n\t\t\t\t\t\t\t\t\t\tif(urlfiles!=null){\r\n\t\t\t\t\t\t\t\t\t\t\tcommonNotice.setUserIconUrl(urlfiles.getUrl());\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t}else if(createUser.getUserIconUrl()!=null){\r\n\t\t\t\t\t\t\t\t\t\tcommonNotice.setUserIconUrl(createUser.getUserIconUrl());\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tif(createUser!=null){\r\n\t\t\t\t\t\t\t\t\tcommonNotice.setTitle(createUser.getRealName()+\"提交了一个施工任务单\");\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t/////任务单下面的流程节点的所有信息\r\n\t\t\t\t\t\t\t\tList<AllItemData> itemDataList = constructionTaskNewDao.getAllItemData(ct.getId());\t\r\n\t\t\t\t\t\t\t\tif(!itemDataList.isEmpty()){\r\n\t\t\t\t\t\t\t\t\tList<String> nameList = new ArrayList<String>();\r\n\t\t\t\t\t\t\t\t\tUser senduser = userDao.getById(itemDataList.get(0).getApprove_user());\r\n\t\t\t\t\t\t\t\t\tnameList.add(senduser.getRealName());\r\n\t\t\t\t\t\t\t\t\tcommonNotice.setSendUserList(nameList);\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tcommonNotice.setName(ct.getName());\r\n\t\t\t\t\t\t\t\tresultList.add(commonNotice);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t }\r\n\t\t\t\t case 3:\r\n\t\t\t\t {\r\n\t\t\t\t \tCommonNotice commonNotice = new CommonNotice();\r\n\t\t\t\t \tcommonNotice.setReadState(no.getReadState());\r\n\t\t\t\t\t\t\tcommonNotice.setCreateDate(Parameters.getSdf().format(no.getCreateDate()));\r\n\t\t\t\t\t\t\tcommonNotice.setNoticeType(no.getNoticeType());\r\n\t\t\t\t\t\t\tcommonNotice.setAboutId(no.getAboutId());\r\n\t\t\t\t \tAdvancedOrder ct = advancedOrderDao.getById(no.getAboutId());\r\n\t\t\t\t\t\t\tif(ct!=null){\r\n\t\t\t\t\t\t\t\tcommonNotice.setAboutCreateUserId(ct.getSubmitUserId());\r\n\t\t\t\t\t\t\t\tcommonNotice.setContent(ct.getQuantityDes());\r\n\t\t\t\t\t\t\t\tProject project = projectDao.getById(ct.getProjectId());\r\n\t\t\t\t\t\t\t\tif(project!=null){\r\n\t\t\t\t\t\t\t\t\tcommonNotice.setProjectName(project.getName());\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tif(ct.getContentFilesId()!=null){\r\n\t\t\t\t\t\t\t\t\tFiles files = fileDao.getById(Long.valueOf(ct.getContentFilesId().split(\",\")[0]));\r\n\t\t\t\t\t\t\t\t\tif(files!=null){\r\n\t\t\t\t\t\t\t\t\t\tcommonNotice.setImagUrl(files.getUrl());\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tUser createUser=userDao.getById(ct.getSubmitUserId());\r\n\t\t\t\t\t\t\t\tif(createUser!=null){\r\n\t\t\t\t\t\t\t\t\tcommonNotice.setCreateUserName(createUser.getRealName());\r\n\t\t\t\t\t\t\t\t\tif(createUser.getUserIcon()!=null){\r\n\t\t\t\t\t\t\t\t\t\tFiles urlfiles = fileDao.getById(createUser.getUserIcon());\r\n\t\t\t\t\t\t\t\t\t\tif(urlfiles!=null){\r\n\t\t\t\t\t\t\t\t\t\t\tcommonNotice.setUserIconUrl(urlfiles.getUrl());\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t}else if(createUser.getUserIconUrl()!=null){\r\n\t\t\t\t\t\t\t\t\t\tcommonNotice.setUserIconUrl(createUser.getUserIconUrl());\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tif(createUser!=null){\r\n\t\t\t\t\t\t\t\t\tcommonNotice.setTitle(createUser.getRealName()+\"提交了一个预付单\");\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tif(ct.getNextReceivePeopleId()!=null){\r\n\t\t\t\t\t\t\t\t\tList<String> nameList = new ArrayList<String>();\r\n\t\t\t\t\t\t\t\t\tnameList.add(ct.getNextReceivePeopleId());\r\n\t\t\t\t\t\t\t\t\tcommonNotice.setSendUserList(nameList);\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tcommonNotice.setName(ct.getConstructPart());\r\n\t\t\t\t\t\t\t\tresultList.add(commonNotice);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t \tbreak;\r\n\t\t\t\t }\r\n\t\t\t\t case 4:\r\n\t\t\t\t {\r\n\t\t\t\t \tCommonNotice commonNotice = new CommonNotice();\r\n\t\t\t\t\t\t\tcommonNotice.setCreateDate(Parameters.getSdf().format(no.getCreateDate()));\r\n\t\t\t\t\t\t\tcommonNotice.setNoticeType(no.getNoticeType());\r\n\t\t\t\t\t\t\tcommonNotice.setReadState(no.getReadState());\r\n\t\t\t\t \tMessage ct = messageDao.getById(no.getAboutId());\r\n\t\t\t\t\t\t\tif(ct!=null){\r\n\t\t\t\t\t\t\t\tif(ct.getQuestionType()==0){\r\n\t\t\t\t\t\t\t\t\tcommonNotice.setAboutId(ct.getAboutId());\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tif(ct.getQuestionType()==1){\r\n\t\t\t\t\t\t\t\t\tcommonNotice.setAboutId(ct.getAboutId());\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tcommonNotice.setAboutCreateUserId(ct.getUserId());\r\n\t\t\t\t\t\t\t\tcommonNotice.setContent(ct.getContent());\r\n\t\t\t\t\t\t\t\tProject project = projectDao.getById(ct.getProjectId());\r\n\t\t\t\t\t\t\t\tif(project!=null){\r\n\t\t\t\t\t\t\t\t\tcommonNotice.setProjectName(project.getName());\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tMessageFile mf = messageFileDao.getMessageFileByMessageId(ct.getId());\r\n\t\t\t\t\t\t\t\tif(mf!=null){\r\n\t\t\t\t\t\t\t\t\tif(mf.getFileId()!=null){\r\n\t\t\t\t\t\t\t\t\t\tFiles file = fileDao.getById(mf.getFileId());\r\n\t\t\t\t\t\t\t\t\t\tif(file!=null){\r\n\t\t\t\t\t\t\t\t\t\t\tcommonNotice.setImagUrl(file.getUrl());\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tUser createUser=userDao.getById(ct.getUserId());\r\n\t\t\t\t\t\t\t\tif(createUser!=null){\r\n\t\t\t\t\t\t\t\t\tcommonNotice.setCreateUserName(createUser.getRealName());\r\n\t\t\t\t\t\t\t\t\tif(createUser.getUserIcon()!=null){\r\n\t\t\t\t\t\t\t\t\t\tFiles urlfiles = fileDao.getById(createUser.getUserIcon());\r\n\t\t\t\t\t\t\t\t\t\tif(urlfiles!=null){\r\n\t\t\t\t\t\t\t\t\t\t\tcommonNotice.setUserIconUrl(urlfiles.getUrl());\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t}else if(createUser.getUserIconUrl()!=null){\r\n\t\t\t\t\t\t\t\t\t\tcommonNotice.setUserIconUrl(createUser.getUserIconUrl());\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tif(createUser!=null){\r\n\t\t\t\t\t\t\t\t\tcommonNotice.setTitle(createUser.getRealName()+\"提交了一条留言\");\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tcommonNotice.setMessageType(ct.getQuestionType());\r\n\t\t\t\t\t\t\t\tcommonNotice.setName(ct.getContent());\r\n\t\t\t\t\t\t\t\tresultList.add(commonNotice);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t \tbreak;\r\n\t\t\t\t }\r\n\t\t\t\t }\r\n\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tresult.setData(resultList);\r\n\t\t\tresult.setCurrentPage(gets.getCurrentPage());\r\n\t\t\tresult.setNotRead(totalNotRead);\r\n\t\t\tresult.setTotalNumber(gets.getTotalNumber());\r\n\t\t\tresult.setTotalPage(gets.getTotalPage());\r\n\t\t\tresult.setNumberPerPage(gets.getNumberPerPage());\r\n\t\t}else{\r\n\t\t\tresult.setErrorCode(ErrorCodeEnum.User_Not_Logined);\r\n\t\t}\r\n\t\treturn result;\r\n\t}", "@GetMapping(\"/news\")\n public List<NewsServiceModel> getNewsById(Sort sort, @RequestParam(required = false) String date, String title) {\n\n if (date != null && title == null) {\n return newsService.getNewsByDate(date);\n } else if (title != null && date == null) {\n return newsService.getNewsByTitle(title);\n } else if (date != null) {\n return newsService.getAllNewsByDateAndTitle(date, title);\n }\n return newsService.getAllNews(sort);\n }", "@PostMapping(\"/search\")\n public Object fetchNews(@RequestParam(\"id\") String id, @RequestParam(name = \"page\", required = false) Integer page) {\n return newsService.getNewsData(id, page);\n }", "public List<DaftarhunianDtl> getDaftarhunianDtl(int no) {\n //return daftarhunianDtls.stream().filter(t -> t.getId().equals(id)).findFirst().get();\n String s = String.valueOf(no);\n// String[] as = {s};\n// return daftarhunianDtlRepository.findOne(s); //ambil banyak row: bukan satu row.\n List<DaftarhunianDtl> daftarhunianDtls = new ArrayList<>();\n// daftarhunianDtlRepository.findByNoTrx(as).forEach(daftarhunianDtls::add);\n daftarhunianDtlRepository.findByNoTrx(s).forEach(daftarhunianDtls::add); \n //\n //Query query = createNamedQuery(\"DaftarhunianDtl.findByNoTrx\");\n //\n \n return daftarhunianDtls;\n }", "LiveData<List<MainEntity>> getAllNews() {\n\t\treturn mainListLiveData;\n\t}", "@Override\n public ArrayList<News> findByDate(String foundDate) throws DAOException, ConnectionPoolDataSourceException {\n ArrayList<News> news = new ArrayList<>();\n PreparedStatement preparedStatement = null;\n ResultSet resultSet = null;\n Connection connection = connectionPool.takeConnection();\n try {\n preparedStatement = connection.prepareStatement(SQL_SELECT_BY_DATE);\n preparedStatement.setString(1, foundDate);\n resultSet = preparedStatement.executeQuery();\n while (resultSet.next()) {\n String category = resultSet.getString(2);\n String title = resultSet.getString(3);\n String author = resultSet.getString(4);\n String date = resultSet.getString(5);\n news.add(new News(category, title, author, date));\n }\n if (news == null) {\n throw new DAOException(\"Error in findByDate.\");\n }\n connectionPool.closeConnection(connection, preparedStatement, resultSet);\n } catch (SQLException e) {\n throw new DAOException(e);\n }\n return news;\n }", "public void listarDocDaDisciplina(){\r\n for(int i=0;i<docentes.size();i++){\r\n System.out.println(docentes.get(i).toString());\r\n }\r\n }", "public List<PedidoMaterialModel> findAll(){\n \n List<PedidoMaterialModel> pedidosM = new ArrayList<>();\n \n return pedidosM = pedidoMaterialConverter.entitiesToModels(pedidoMaterialRepository.findAll());\n }", "public static ArrayList<NewsItem> loadNews(int descending) throws JSONException{\n \t\t\n \t\t//Get JSON string from server\n \t\tString result = getJSON(Constants.NEWSFEED + descending); \n \t\t\n \t\tList<NewsItem> posts = new ArrayList<NewsItem>();\n \t\t\n \t\t//Parse JSON string\n \t\t\tJSONObject json_obj = new JSONObject(result);\n \t\t\tJSONArray json_arr = json_obj.getJSONArray(\"data\");\n \t\t\t\n \t\t\tfor (int i = 0; i < json_arr.length(); i++){\n \t\t\t\t//Get post message\n \t\t\t\tString message = json_arr.getJSONObject(i).optString(\"message\");\n \t\t\t\t\n \t\t\t\t//Get date\n \t\t\t\tString[] date = json_arr.getJSONObject(i).optString(\"created_time\").split(\"T\");\n \t\t\t\t\n \t\t\t\t//Get image url\n \t\t\t\tString image = json_arr.getJSONObject(i).optString(\"picture\");\n \t\t\t\t\n \t\t\t\tif(!image.equals(\"\")){\n \t\t\t\t\timage = image.replace(\"s.jpg\", \"n.jpg\");\n\t\t\t\t\timage = image.replace(\"s.png\", \"n.png\");\n \t\t\t\t}\n \t\t\t\t\n \t\t\t\t//Add to posts if valid content\n \t\t\t\tif ((!message.equals(\"\")) && (!date.equals(\"\"))){\n \t\t\t\t\tposts.add(new NewsItem(message, date[0], image));\n \t\t\t\t}\n \t\t\t}\n \t\t\n \t\treturn (ArrayList<NewsItem>) posts;\n \t}", "public List<Goods> selectByDate(int page,int maxResults);", "@GetMapping(\"/listAllDirectors\")\n public String showAllDirectors(Model model) {\n\n// Director director = directorRepo.findOne(new Long(1));\n Iterable <Director> directorlist = directorRepo.findAll();\n\n model.addAttribute(\"alldirectors\", directorlist);\n return \"listAllDirectors\";\n }", "static public List<InlineResponse2002> articlesFeedIdGet(String id)\n {\n ArrayList<InlineResponse2002> l = new ArrayList<>();\n\n for (int i = 0; i < 512; i += (i % 2 == 0) ? 3 : 7)\n {\n InlineResponse2002 a = new InlineResponse2002();\n\n a.setId(i);\n a.setTitle(\"Some random [\" + i + \"] article\");\n l.add(a);\n }\n return l;\n }", "List<Goods> getGoodsList();", "public List<Dishes> select(Dishes book){\n StringBuilder sql=new StringBuilder(\"select * from REAPER.\\\"Dish\\\" where 1=1 \");\n //sqlÓï¾ä\n System.out.println(sql); \n List<Object> list=new ArrayList<Object>();\n if(book!=null){\n \tSystem.out.println(sql); \n if(book.getDishid()!=null){\n sql.append(\" and dishid=? \");\n System.out.println(book.getDishid()); \n list.add(book.getDishid());\n }\n /*list.add(book.getBookname());\n list.add(book.getPrice());\n list.add(book.getAuthor());\n list.add(book.getPic());\n list.add(book.getPublish());*/\n }\n return dao.select(sql.toString(), list.toArray());\n }", "private void getNewsList() {\n // While the app fetched data we are displaying a progress dialog\n\n if (isOnline(mContext)) {\n showProgressDialog();\n\n ApiInterface apiService = ApiRequest.getClient().create(ApiInterface.class);\n\n Call<News> call = apiService.loadNewsList();\n call.enqueue(new Callback<News>() {\n @Override\n public void onResponse(Call<News> call, retrofit2.Response<News> response) {\n dismissProgressDialog();\n\n news.setTitle(response.body().getTitle());\n\n newsList.addAll(response.body().getRows());\n showList();\n ActionBar actionBar = getActionBar();\n actionBar.setDisplayHomeAsUpEnabled(true);\n actionBar.setDisplayShowHomeEnabled(false);\n actionBar.setDisplayShowTitleEnabled(true);\n actionBar.setTitle(news.getTitle());\n actionBar.setDisplayUseLogoEnabled(false);\n }\n\n @Override\n public void onFailure(Call<News> call, Throwable t) {\n dismissProgressDialog();\n displayMessage(t.getMessage());\n setTextMessage();\n\n }\n });\n } else {\n\n displayMessage(getString(R.string.no_network));\n setTextMessage();\n }\n\n }", "private void fetchDenuncia() {\n //CRIA UMA REFERENCIA PARA A COLEÇÃO DE POSTOS\n FirebaseFirestore.getInstance().collection(\"/denuncias\")\n .addSnapshotListener(new EventListener<QuerySnapshot>() {\n @Override\n public void onEvent(@Nullable QuerySnapshot queryDocumentSnapshots, @Nullable FirebaseFirestoreException e) {\n //VERIFICANDO SE ENCONTROU ALGUMA EXCEÇÃO CAPAZ DE IMPEDIR A EXECUÇÃO, CASO ENCONTRE, PARE A APLICAÇÃO\n if (e != null) {\n Log.e(\"TESTE\", \"Erro: \", e);\n return;\n }\n\n //REFERÊNCIA PARA TODOS POSTOS DA BASE\n List<DocumentSnapshot> documentos = queryDocumentSnapshots.getDocuments();\n\n\n for (DocumentSnapshot doc : documentos) {\n Denuncia denuncia = doc.toObject(Denuncia.class);\n Log.d(\"TESTE\", denuncia.getPosto() + \"denunciado!\");\n denunciasNaBase.add(denuncia);\n }\n }\n });\n }", "public List<EspecieEntity> encontrarTodos(){\r\n Query todos =em.createQuery(\"select p from EspecieEntity p\");\r\n return todos.getResultList();\r\n }", "public void fetchArticles(int page, boolean newSearch) {\n if(newSearch) { articles.clear(); }\n\n AsyncHttpClient client = new AsyncHttpClient();\n String url;\n RequestParams params = new RequestParams();\n params.put(\"api-key\", \"ed5753fe0329424883b2a07a7a7b4817\");\n params.put(\"page\", page);\n\n // If top stories, different parameters\n if(topStories) {\n url = \"https://api.nytimes.com/svc/topstories/v2/home.json\";\n } else {\n url = \"https://api.nytimes.com/svc/search/v2/articlesearch.json\";\n params.put(\"q\",filter.getQuery());\n if(filter.getSort() != null) {\n params.put(\"sort\",filter.getSort());\n }\n if(filter.getBegin_date() != null) {\n params.put(\"begin_date\",filter.getBegin_date());\n }\n if(filter.getNewsDeskOpts().size() > 0) {\n for(int i=0; i<filter.getNewsDeskOpts().size(); i++) {\n params.put(\"fq\",String.format(\"news_desk:(%s)\",filter.getNewsDeskOpts().get(i)));\n }\n }\n Log.d(\"DEBUG\",params.toString());\n }\n\n client.get(url, params, new JsonHttpResponseHandler() {\n @Override\n public void onSuccess(int statusCode, Header[] headers, JSONObject response) {\n Log.d(\"DEBUG\",response.toString());\n JSONArray articleJsonResults = null;\n try {\n if(!topStories) {\n articleJsonResults = response.getJSONObject(\"response\").getJSONArray(\"docs\");\n } else {\n articleJsonResults = response.getJSONArray(\"results\");\n }\n\n // Every time data is changed, notify adapter; can also do by article.addAll and use adapter.notifyDataSetChanged\n articles.addAll(Article.fromJsonArray(articleJsonResults, topStories));\n adapter.notifyDataSetChanged();\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }\n\n @Override\n public void onFailure(int statusCode, Header[] headers, Throwable throwable, JSONObject errorResponse) {\n Log.d(\"DEBUG\",\"JSON response failed\");\n super.onFailure(statusCode, headers, throwable, errorResponse);\n }\n });\n }", "List<NewsInfo> selectByExampleWithBLOBs(NewsInfoExample example);", "@ModelAttribute(\"imageList\")\r\n\tpublic List<ProductTO> getData(){\r\n\t\treturn searchService.getAllImage();\r\n\t}", "private static List<ArticleBean> transactionSearchSuggestedArticles(Transaction tx, String username, int limit)\n {\n List<ArticleBean> articles = new ArrayList<>();\n HashMap<String,Object> parameters = new HashMap<>();\n int quantiInflu = 0;\n parameters.put(\"username\", username);\n parameters.put(\"role\", \"influencer\");\n parameters.put(\"limit\", limit);\n\n String conInflu = \"MATCH (u:User{username:$username})-[f:FOLLOW]->(i:User{role:$role})-[p:PUBLISHED]-(a:Article) \" +\n \" RETURN a, i, p ORDER BY p.timestamp LIMIT $limit\";\n\n String nienteInflu = \"MATCH (i:User)-[p:PUBLISHED]->(a:Article)-[r:REFERRED]->(g:Game), (u:User) \" +\n \" WHERE NOT(i.username = u.username) AND \" +\n \" u.username=$username AND ((g.category1 = u.category1 OR g.category1 = u.category2) \" +\n \" OR (g.category2 = u.category1 OR g.category2 = u.category2))\" +\n \" RETURN distinct(a),i,p ORDER BY p.timestamp LIMIT $limit \";\n\n Result result;\n quantiInflu = UsersDBManager.transactionCountUsers(tx,username,\"influencer\");\n if(quantiInflu < 3)\n {\n result = tx.run(nienteInflu, parameters);\n }\n else\n {\n result = tx.run(conInflu, parameters);\n }\n while(result.hasNext())\n {\n Record record = result.next();\n List<Pair<String, Value>> values = record.fields();\n ArticleBean article = new ArticleBean();\n String author;\n String title;\n for (Pair<String,Value> nameValue: values) {\n if (\"a\".equals(nameValue.key())) {\n Value value = nameValue.value();\n title = value.get(\"title\").asString();\n article.setTitle(title);\n article.setId(value.get(\"idArt\").asInt());\n\n }\n if (\"i\".equals(nameValue.key())) {\n Value value = nameValue.value();\n author = value.get(\"username\").asString();\n article.setAuthor(author);\n\n }\n if (\"p\".equals(nameValue.key())) {\n Value value = nameValue.value();\n String timestamp = value.get(\"timestamp\").asString();\n article.setTimestamp(Timestamp.valueOf(timestamp));\n\n }\n }\n articles.add(article);\n }\n\n return articles;\n\n }", "List<CommunityInform> selectAll();", "public List<Movie> dVD() {\n String url = \"http://api.rottentomatoes.com/api/public/v1.0/lists/dvds/new_releases.json?\"\n + \"apikey=yedukp76ffytfuy24zsqk7f5\";\n apicall(url);\n Gson gson = new Gson();\n MovieResponse response = gson.fromJson(data, MovieResponse.class);\n List<Movie> movies = response.getMovies();\n movieData = movies;\n System.out.println(url);\n return movieData;\n }", "private void fetchPostos() {\n //CRIA UMA REFERENCIA PARA A COLEÇÃO DE POSTOS\n\n FirebaseFirestore.getInstance().collection(\"/postos\")\n .addSnapshotListener(new EventListener<QuerySnapshot>() {\n @Override\n public void onEvent(@Nullable QuerySnapshot queryDocumentSnapshots, @Nullable FirebaseFirestoreException e) {\n //VERIFICANDO SE ENCONTROU ALGUMA EXCEÇÃO CAPAZ DE IMPEDIR A EXECUÇÃO, CASO ENCONTRE, PARE A APLICAÇÃO\n if (e != null) {\n Log.e(\"TESTE\", \"Erro: \", e);\n return;\n }\n //REFERÊNCIA PARA TODOS POSTOS DA BASE\n List<DocumentSnapshot> documentos = queryDocumentSnapshots.getDocuments();\n\n\n for (DocumentSnapshot doc : documentos) {\n Posto posto = doc.toObject(Posto.class);\n int cont = 0;\n for (int i = 0; i < denunciasNaBase.size(); i++) {\n\n if (denunciasNaBase.get(i).getPosto().equalsIgnoreCase(posto.getCnpj())) {\n Log.d(\"TESTE\", \"Posto \" + posto.getCnpj() + \"denuncia \" + denunciasNaBase.get(i).getPosto());\n cont++;\n }\n }\n if (cont > 0) {\n adapter.add(new DenunciaItem(posto, cont));\n }\n }\n\n }\n });\n }" ]
[ "0.6452437", "0.61660653", "0.6162173", "0.6079599", "0.60448927", "0.6007034", "0.5964042", "0.5857159", "0.5766077", "0.5717256", "0.5703867", "0.5682538", "0.5618", "0.5614663", "0.5601224", "0.5569107", "0.55394435", "0.548333", "0.5474398", "0.54572636", "0.5452037", "0.5446725", "0.54287404", "0.5427327", "0.54206294", "0.5405938", "0.54004574", "0.5387296", "0.53867126", "0.5370452", "0.5360032", "0.5357184", "0.53528386", "0.5351602", "0.53439647", "0.5328505", "0.5325696", "0.53089553", "0.5306705", "0.53056896", "0.5290976", "0.5281008", "0.52808315", "0.52800375", "0.5279288", "0.5250528", "0.5248067", "0.52443767", "0.52273965", "0.5224737", "0.5218146", "0.52173936", "0.52149254", "0.5209483", "0.5209256", "0.519565", "0.5195114", "0.5192571", "0.518581", "0.5184609", "0.517504", "0.51725096", "0.5172483", "0.5161858", "0.5154045", "0.51475346", "0.5146366", "0.51413405", "0.5140231", "0.5125628", "0.5125308", "0.5120975", "0.51190567", "0.51167", "0.5115787", "0.51156205", "0.510525", "0.5098246", "0.5098034", "0.50964665", "0.5094474", "0.50930077", "0.5090668", "0.50814164", "0.5078342", "0.50769037", "0.50764614", "0.5075927", "0.5075147", "0.5065956", "0.5061806", "0.5057945", "0.50523996", "0.5050758", "0.50392175", "0.5038797", "0.5031294", "0.5027811", "0.5023852", "0.50147337" ]
0.5630575
12
Find number page of digital news.
@Override public int count(String txt) throws Exception { Connection con = null; ResultSet rs = null; PreparedStatement ps = null; // check connection of db if cannot connect, it will throw an object of Exception try { String query = "select count(*) from digital \n" + "where title like ?"; con = getConnection(); ps = con.prepareStatement(query); ps.setString(1, "%" + txt + "%"); rs = ps.executeQuery(); int count = 0; while (rs.next()) { count = rs.getInt(1); } return count; } catch (Exception e) { throw e; } finally { // close ResultSet, PrepareStatement, Connection closeResultSet(rs); closePrepareStateMent(ps); closeConnection(con); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int getPageNumber();", "Integer getPage();", "int getPage();", "public int getActualPageNumber() {\n try {\n return (int) this.webView.getEngine().executeScript(\"PDFViewerApplication.page;\");\n } catch (RuntimeException e) {\n e.printStackTrace();\n return 0;\n }\n }", "public int getPageNo() {\n return pageNo;\n }", "public int getPageNumber ()\n {\n try {\n if (!isOfType (\"Page\"))\n throw new RuntimeException (\"invalid page reference\");\n return ((PDFDictionary) get (\"Parent\")).getPageOffset (this);\n } catch (Exception e) {\n Options.warn (e.getMessage ());\n return -1;\n }\n }", "static int getPageNumber(String value){\n int pageNumber = 1;\n if(!TextUtils.isEmpty(value)){\n pageNumber = Integer.getInteger(value, pageNumber);\n }\n return pageNumber;\n }", "public int getPage() {\n return page;\n }", "public int getPage() {\n return page;\n }", "public int getPage() {\n return page;\n }", "public int getPage() {\n return page;\n }", "public static int getPageTo(String info) {\n/* 816 */ int pageNum = 0;\n/* */ \n/* 818 */ if (!Utils.isNullOrEmpty(info)) {\n/* */ try {\n/* 820 */ JSONObject jsonObj = new JSONObject(info);\n/* 821 */ pageNum = jsonObj.getInt(\"To\");\n/* 822 */ } catch (Exception e) {\n/* 823 */ AnalyticsHandlerAdapter.getInstance().sendException(e);\n/* */ } \n/* */ }\n/* */ \n/* 827 */ return pageNum;\n/* */ }", "public static int getPageFrom(String info) {\n/* 793 */ int pageNum = 0;\n/* */ \n/* 795 */ if (!Utils.isNullOrEmpty(info)) {\n/* */ try {\n/* 797 */ JSONObject jsonObj = new JSONObject(info);\n/* 798 */ pageNum = jsonObj.getInt(\"From\");\n/* 799 */ } catch (Exception e) {\n/* 800 */ AnalyticsHandlerAdapter.getInstance().sendException(e);\n/* */ } \n/* */ }\n/* */ \n/* 804 */ return pageNum;\n/* */ }", "public int getPageNumber() {\n return mPageNumber;\n }", "public int getPageNumber() {\n return mPageNumber;\n }", "public int getPageNumber() {\r\n\t\t\t\treturn currentPage;\r\n\t\t\t}", "public String getPageNum() {\r\n return pageNum;\r\n }", "int getCurrentPage();", "static int pageCount(int n, int p) {\n \tint i=1;\n int count=0,mid=0,t=0;\n if(n%2==0)\n {\n t=n;\n\n }\n else\n {\n t=n-1;\n\n }\n \tmid=n/2;\n\n if(n==p)\n return 0;\n if(mid>=p){\n while(i<p){\n i=i+2;\n count++;\n }\n }else{\n while(t>p){\n t=t-2;\n count++;\n }\n }\n return count;\n }", "int getPagesAmount();", "public Integer getPage() {\n return page;\n }", "@Override\r\n\tpublic int nombrePage() {\n\t\treturn 0;\r\n\t}", "boolean hasPageNo();", "boolean hasPageNo();", "public int getOpenPageNumber ( Player player ) {\n\t\tfor ( int i = 0; i < getPages ( ).length; i++ ) {\n\t\t\tif ( getPage ( i ).isMenuOpen ( player ) ) {\n\t\t\t\treturn getPage ( i ).getPageNumber ( );\n\t\t\t}\n\t\t}\n\t\treturn -1;\n\t}", "public int getPageIncrement() {\n \tcheckWidget();\n \treturn pageIncrement;\n }", "public int getPageTotalNumber(int totalNumber) {\n/* 70 */ int fullPage = totalNumber / 25;\n/* 71 */ return (totalNumber % 25 > 0) ? (fullPage + 1) : ((fullPage == 0) ? 1 : fullPage);\n/* */ }", "public io.dstore.values.IntegerValue getPageNo() {\n return pageNo_ == null ? io.dstore.values.IntegerValue.getDefaultInstance() : pageNo_;\n }", "int getNumPages();", "public int getCurrentPage();", "public int getNumberOfPages(Document doc) {\n Elements elements = doc.select(\"table.sort_options\");\n Element table = elements.get(1);\n Elements columns = table.select(\"td\");\n Element column = columns.get(0);\n String str = column.text();\n String[] arr = str.split(\" \");\n int numberOfpages = Integer.valueOf(arr[arr.length - 1]);\n return numberOfpages;\n }", "public io.dstore.values.IntegerValue getPageNo() {\n return pageNo_ == null ? io.dstore.values.IntegerValue.getDefaultInstance() : pageNo_;\n }", "io.dstore.values.IntegerValue getPageNo();", "io.dstore.values.IntegerValue getPageNo();", "public io.dstore.values.IntegerValue getPageNo() {\n if (pageNoBuilder_ == null) {\n return pageNo_ == null ? io.dstore.values.IntegerValue.getDefaultInstance() : pageNo_;\n } else {\n return pageNoBuilder_.getMessage();\n }\n }", "public Integer getCurrentPage();", "public Integer getPageCount();", "public io.dstore.values.IntegerValue getPageNo() {\n if (pageNoBuilder_ == null) {\n return pageNo_ == null ? io.dstore.values.IntegerValue.getDefaultInstance() : pageNo_;\n } else {\n return pageNoBuilder_.getMessage();\n }\n }", "int getPagesize();", "int getNewsindentifydetailCount();", "int getFirstItemOnPage();", "public io.dstore.values.IntegerValueOrBuilder getPageNoOrBuilder() {\n return getPageNo();\n }", "short getPageStart();", "public io.dstore.values.IntegerValueOrBuilder getPageNoOrBuilder() {\n return getPageNo();\n }", "public int getCurrentPage(String url) {\n Document doc;\n int result = 0;\n try {\n doc = Jsoup.connect(url).get();\n String position = doc.body().select(TABLE_SORT_OPTIONS)\n .last()\n .select(TR_TAG)\n .select(TD_TAG)\n .select(B_TAG)\n .text();\n result = Integer.parseInt(position);\n } catch (IOException e) {\n LOG.error(e, e.fillInStackTrace());\n }\n return result;\n }", "public String getPageNumber(String id)\n { \n if ( doesIDExist(id) ) {\n IDNode node=(IDNode)idReferences.get(id); \n return node.getPageNumber(); \n }\n else {\n addToIdValidationList(id);\n return null;\n }\n }", "@Override\r\n\t\tpublic int getCurrentpage() throws Exception\r\n\t\t\t{\n\t\t\t\treturn 0;\r\n\t\t\t}", "public static int getTotalPage() {\n List<WebElement> PAGINATION = findElements(pagination);\n int size = PAGINATION.size() - 1;\n //Get the number of the second-last item which next to the \">\" icon\n WebElement lastPage = findElement(By.xpath(String.format(last_page, size)));\n return Integer.parseInt(lastPage.getText());\n }", "public static int getPageCount(PDDocument doc) {\n\tint pageCount = doc.getNumberOfPages();\n\treturn pageCount;\n\t\n}", "public int getNumber() {\r\n\t\treturn page.getNumberOfElements();\r\n\t}", "public io.dstore.values.IntegerValueOrBuilder getPageNoOrBuilder() {\n if (pageNoBuilder_ != null) {\n return pageNoBuilder_.getMessageOrBuilder();\n } else {\n return pageNo_ == null ?\n io.dstore.values.IntegerValue.getDefaultInstance() : pageNo_;\n }\n }", "public io.dstore.values.IntegerValueOrBuilder getPageNoOrBuilder() {\n if (pageNoBuilder_ != null) {\n return pageNoBuilder_.getMessageOrBuilder();\n } else {\n return pageNo_ == null ?\n io.dstore.values.IntegerValue.getDefaultInstance() : pageNo_;\n }\n }", "public int getPages()\n {\n return pages;\n }", "long getAmountPage();", "public SQLInteger getPage() {\n\t\treturn page;\n\t}", "public int getPages() {\n return pages;\n }", "public static int pageCount(int n, int p) {\n // Write your code here\n int pagesToCover = 0;\n int midPage = n/2;\n\n if(p>midPage){\n if(n%2==0){\n pagesToCover = n-p+1;\n }else{\n pagesToCover = n-p;\n }\n }else{\n pagesToCover = p;\n }\n int pagesToTurn = 0;\n for(int i=2, j=1; i<=pagesToCover; i=i+2, j++){\n pagesToTurn = j;\n }\n return pagesToTurn;\n }", "private static int lastPage(PdfReader pdfFile){\n int pages;\n\n pages = pdfFile.getNumberOfPages();\n\n return(pages);\n }", "public int getPageStart(){\r\n\t\treturn (this.page -1) * perPageNum;\r\n\t}", "public int getNumPages()\n {\n return numPages;\n }", "io.dstore.values.IntegerValueOrBuilder getPageNoOrBuilder();", "io.dstore.values.IntegerValueOrBuilder getPageNoOrBuilder();", "public int getPages() {\n return pages;\n }", "public int getPages() {\n return pages;\n }", "@Override\n\tpublic int findPageCount(Invoice invoice) {\n\t\treturn invoiceDao.findPageCount(invoice);\n\t}", "public abstract int getChapterNumber(XMLObject xml);", "Optional<Integer> getPageCount();", "private int getBookmarkStartPage(PDOutlineItem bookmark, PDDocument document) throws IOException {\n if (bookmark.getDestination() instanceof PDPageDestination)\n {\n PDPageDestination pd = (PDPageDestination) bookmark.getDestination();\n return pd.retrievePageNumber() + 1;\n }\n else if (bookmark.getDestination() instanceof PDNamedDestination)\n {\n PDPageDestination pd = document.getDocumentCatalog().findNamedDestinationPage((PDNamedDestination) bookmark.getDestination());\n if (pd != null)\n {\n return pd.retrievePageNumber() + 1;\n }\n }\n\n if (bookmark.getAction() instanceof PDActionGoTo)\n {\n PDActionGoTo gta = (PDActionGoTo) bookmark.getAction();\n if (gta.getDestination() instanceof PDPageDestination)\n {\n PDPageDestination pd = (PDPageDestination) gta.getDestination();\n return pd.retrievePageNumber() + 1;\n }\n else if (gta.getDestination() instanceof PDNamedDestination)\n {\n PDPageDestination pd = document.getDocumentCatalog().findNamedDestinationPage((PDNamedDestination) gta.getDestination());\n if (pd != null)\n {\n return pd.retrievePageNumber() + 1;\n }\n }\n }\n\n return -1;\n }", "public Integer getPageIdx() {\n return pageIdx;\n }", "public int getPages(){\n return pages;\n }", "public int getPageCount() { return _pages.size(); }", "protected int getSkipPage(){\n\t\tint pageNum = 0;\n\t\tfor (Integer p : mPageNum){\n\t\t\tpageNum *= 10;\n\t\t\tpageNum += p.intValue();\n\t\t}\n\t\tif (pageNum > Integer.MAX_VALUE){\n\t\t\tpageNum = Integer.MAX_VALUE;\n\t\t}\n\t\tif (pageNum <= getTotalPage()){\n\t\t\tmSkipPage = pageNum;\n\t\t}\n\t\treturn mSkipPage;\n\t}", "public static int getPagesCount(int s) {\n if(s>10)\n return (s + ((s-6)/5));\n else\n return s;\n }", "@Override\n\tpublic Long getNbInstance(Page<Company,Long> page) {\n\t\treturn dao.getNb(companyPageMapper.pageToDaoRequestParameter(page));\n\t}", "private static int getFirstResultRelativeToPageNumber(int pageNumber, int pageSize) {\n\t\treturn (pageNumber - 1) * pageSize;\n\t}", "@Test(priority = 4, description = \"To get Number of Location\")\n\tpublic void GetNumberofLocation() throws Exception {\n\t\tdata = new TPSEE_Syndication_Status_Page(CurrentState.getDriver());\n\t\tdata.getNumofLoc();\n\t\taddEvidence(CurrentState.getDriver(), \"To get Number of Location\", \"yes\");\n\t}", "public int getNumberOfPages(HttpServletRequest request,\n SubmissionInfo subInfo) throws ServletException\n {\n // always just one page of initial questions\n return 1;\n }", "public int numPages() {\n return numPages;\n }", "public int getDefaultPage()\n\t{\n\t\treturn defaultPage;\n\t}", "public long pageNumber(MemRef r) {\n return r.addr >> mPageBits;\n }", "String getStartpage();", "private int paperExtractorV1(Printer printer) {\n Document document;\n if(debug)\n document = getDocument(printer.getUrl() + \"Filer_for_counter/topPage.htm\") ;\n else\n document = getDocument(printer.getUrl() + \"/web/guest/en/websys/status/getUnificationCounter.cgi\");\n\n String text = document.text();\n String status;\n if(\"Aficio SP 8200DN\".equals(printer.getModel()))\n status = text.substring(text.indexOf(\"Total :\")+8,text.indexOf(\"Printer\")-1);\n else\n status = text.substring(text.indexOf(\"Total :\")+8,text.indexOf(\"Copier\")-1);\n\n try {\n int count = Integer.parseInt(status);\n return count;\n }catch (NumberFormatException exception) {\n exception.printStackTrace();\n return -1;\n }\n }", "private int countPaging(final int commonCount, final int offsetLine) {\n\t\tint result = commonCount % offsetLine > 0 ? Math.floorDiv(commonCount, offsetLine) + 1\n\t\t\t\t: Math.floorDiv(commonCount, offsetLine);\n\t\treturn result;\n\t}", "public int actualPageCount() {\n\t\tTestLog.log.info(\"get actual page count\");\n\t\tint actualpageNumbers = 0;\n\t\ttry{\n\t\t\tactualpageNumbers = driver.findElements(By.xpath(\"//div[@id='example_paginate']/span/a\")).size();\n\t\t\t\n\t\t}catch (Exception ex) {\n\t\t\tex.printStackTrace();\n\t\t\tTestLog.log.info(\"Could not find page count\" + ex);\n\t\t}\n\t\treturn actualpageNumbers;\n\t}", "final int computePage(int rowsCount, Page page) {\r\n\r\n int rowsPerPage = page.getRowsPerPage();\r\n int pages = rowsCount / rowsPerPage + ((rowsCount % rowsPerPage) == 0 ? 0 : 1);\r\n int start = 1;\r\n\r\n\r\n if (page.isLast()) { //goto the last page directly;\r\n start = (pages - 1) * rowsPerPage + 1;\r\n page.setLast(true);\r\n page.setCurrent(pages);\r\n } else { //goto a specific page;\r\n int current = page.getCurrent();\r\n if (current < 1) {\r\n page.setCurrent(current = 1);\r\n }\r\n start = (current - 1) * rowsPerPage + 1;\r\n if (start > rowsCount) {\r\n start = (pages - 1) * rowsPerPage + 1;\r\n page.setLast(true);\r\n page.setCurrent(pages);\r\n } else {\r\n page.setLast(false);\r\n }\r\n }\r\n return start;\r\n }", "public int queryPageNumberByDate(Date start, Date end, int pageSize) {\n\t\treturn ld.getPageNumberByDate(start,end,pageSize);\n\t}", "public int getTotalPages()\r\n {\r\n return pageNames.size()-1;\r\n }", "String getDocumentNumber();", "public Integer getPerPage();", "public int getStartIndex() {\n int cacheRange = 100 / numResultsPerPage;\n int base = pageNumber % cacheRange;\n if (base == 0) {\n return 100 - numResultsPerPage;\n } else {\n return (base - 1) * numResultsPerPage;\n }\n }", "public int getTotalArticle() {\n int listLimit;\n int total;\n int totalPage;\n listLimit = getArticleRowCount();\n clickGoToLastPageBtn();\n // Has to used this method instead of goToPageBtn().size() since the maximum size of the goToPageBtn list is always 10\n totalPage = Integer.parseInt(goToPageBtn().get(goToPageBtn().size() - 1).getText().trim());\n total = getArticleRowCount() + listLimit * totalPage;\n return total;\n }", "int getPostNum();", "private int getRecordsCount(final HtmlPage resultPage) {\n if (resultPage == null) {\n return 0;\n }\n \n DomElement countElement = resultPage.getElementById(\"K66\");\n if (countElement == null) {\n return 0;\n }\n \n return Integer.parseInt(countElement.getTextContent().replaceAll(\"[^0-9]\", \"\"), 10);\n }", "public int getPageFrameNum(PageFrame pageFrame) {\n int frameNumber = -1;\n for (int x = 0; x < 16; x++) {\n if (ram[x][0] == pageFrame) {\n frameNumber = x;\n }\n }\n return frameNumber;\n }", "public int numPages() {\n \t//numOfPages = (int)(this.fileName.length()/BufferPool.PAGE_SIZE);\n return numOfPages;\n }", "public int getPageEntityIndex() {\n return this.pagenum * this.pagesize;\n }", "public String getPageno() {\r\n return pageno;\r\n }", "public int indexOf(PDFPage aPage) { return _pages.indexOf(aPage); }", "@ApiModelProperty(value = \"Index of the page\")\n public Integer getPage() {\n return page;\n }", "public int getPageId() {\n return this.page_id;\n }", "public int getTotalPage() {\n return getSize() == 0 ? 1 : (int) Math.ceil((double) total / (double) getSize());\n }" ]
[ "0.7746502", "0.7120118", "0.7054791", "0.68950665", "0.68685067", "0.67633724", "0.66409314", "0.65690386", "0.65690386", "0.65690386", "0.65690386", "0.65122724", "0.6386757", "0.63841933", "0.63841933", "0.6357709", "0.63322055", "0.62743443", "0.62350464", "0.6234752", "0.6218619", "0.6208946", "0.620792", "0.620792", "0.6195339", "0.6172554", "0.61441135", "0.61414444", "0.6132195", "0.6128105", "0.61140347", "0.6104508", "0.60974133", "0.60974133", "0.60856545", "0.6084216", "0.60638726", "0.6049384", "0.60309553", "0.5970198", "0.59390247", "0.5931662", "0.5925978", "0.5923694", "0.5907424", "0.59044373", "0.5890917", "0.5881393", "0.5870799", "0.5847501", "0.58364904", "0.5828144", "0.58253556", "0.58148897", "0.5794218", "0.5780993", "0.5761832", "0.5759173", "0.5757878", "0.57396513", "0.57207805", "0.57207805", "0.5715467", "0.5715467", "0.57128954", "0.5698019", "0.56966144", "0.5681456", "0.56746656", "0.56735826", "0.5664414", "0.5661354", "0.5649367", "0.56401163", "0.56249565", "0.56057906", "0.55833644", "0.5573461", "0.5570843", "0.5559123", "0.5549849", "0.55420756", "0.5536965", "0.5536281", "0.55286855", "0.5510392", "0.55062836", "0.55002975", "0.5468699", "0.5467738", "0.5451494", "0.5419655", "0.54188037", "0.54167444", "0.5403716", "0.5402097", "0.54005694", "0.5389949", "0.5385794", "0.53836614", "0.535172" ]
0.0
-1
Find top of digital news All the digital news will card listed returned the result contain a list of entity.Digital objects with id, title, description, images, author, timePost,shortDes
@Override public List<Digital> getTop(int top) throws Exception { Connection con = null; ResultSet rs = null; PreparedStatement ps = null; List<Digital> list = new ArrayList<>(); // check connection of db if cannot connect, it will throw an object of Exception try { String query = "select top " + top + " * from digital order by timePost desc"; con = getConnection(); ps = con.prepareCall(query); rs = ps.executeQuery(); while (rs.next()) { Digital d = new Digital(rs.getInt("id"), rs.getString("title"), rs.getString("description"), rs.getString("images"), rs.getString("author"), rs.getTimestamp("timePost"), rs.getString("shortDes")); list.add(d); } } catch (Exception e) { throw e; } finally { // close ResultSet, PrepareStatement, Connection closeResultSet(rs); closePrepareStateMent(ps); closeConnection(con); } return list; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private List<NewsArticle> getMostPopular() {\n LOGGER.log(Level.INFO, \"getMostPopular\");\n return newsService.getMostPopular();\n }", "@Override\n public List<News> getTop(int top) throws Exception {\n Connection conn = null;\n PreparedStatement statement = null;\n ResultSet result = null;\n List<News> list = new ArrayList<>();\n String query = \"select top (?) * from news\\n\"\n + \"order by timePost desc\";\n try {\n conn = getConnection();\n statement = conn.prepareStatement(query);\n statement.setInt(1, top);\n result = statement.executeQuery();\n while (result.next()) {\n News news = new News(result.getInt(\"ID\"),\n result.getString(\"title\"),\n result.getString(\"description\"),\n result.getString(\"image\"),\n result.getString(\"author\"),\n result.getDate(\"timePost\"),\n result.getString(\"shortDes\"));\n list.add(news);\n }\n } catch (ClassNotFoundException | SQLException e) {\n throw e;\n } finally {\n closeResultSet(result);\n closePreparedStatement(statement);\n closeConnection(conn);\n }\n return list;\n }", "@Override\n public Digital getNews(int id) throws Exception {\n Connection con = null;\n ResultSet rs = null;\n PreparedStatement ps = null;\n String s = \"select * from digital where id = ?\";\n // check connection of db if cannot connect, it will throw an object of Exception\n try {\n con = getConnection();\n ps = con.prepareCall(s);\n ps.setInt(1, id);\n rs = ps.executeQuery();\n while (rs.next()) {\n Digital d = new Digital(rs.getInt(\"id\"),\n rs.getString(\"title\"),\n rs.getString(\"description\"),\n rs.getString(\"images\"),\n rs.getString(\"author\"),\n rs.getTimestamp(\"timePost\"),\n rs.getString(\"shortDes\"));\n return d;\n }\n } catch (Exception e) {\n throw e;\n } finally {\n // close ResultSet, PrepareStatement, Connection\n closeResultSet(rs);\n closePrepareStateMent(ps);\n closeConnection(con);\n }\n return null;\n }", "Article findLatestArticle();", "List<Article> findTop3ByOrderByPostTimeDesc();", "public ArrayList<Article> getTopNumberArticles(int number) throws Exception {\n String sql = \"SELECT TOP(?) * FROM dbo.Article\\n\"\n + \"ORDER BY [time] DESC\";\n ArrayList<Article> articles = new ArrayList<>();\n Connection con = null;\n PreparedStatement st = null;\n ResultSet rs = null;\n try {\n con = getConnection();\n st = con.prepareStatement(sql);\n st.setInt(1, number);\n rs = st.executeQuery();\n while (rs.next()) {\n Article a = new Article();\n a.setId(rs.getInt(\"id\"));\n a.setTitle(rs.getString(\"title\"));\n a.setContent(rs.getString(\"content\"));\n a.setDescription(rs.getString(\"description\"));\n a.setImage(getImgPath() + rs.getString(\"image\"));\n a.setTime(rs.getTimestamp(\"time\"));\n a.setAuthor(rs.getString(\"author\"));\n articles.add(a);\n }\n } catch (Exception ex) {\n throw ex;\n } finally {\n closeResultSet(rs);\n closePreparedStatement(st);\n closeConnection(con);\n }\n return articles;\n }", "public List<News> getAll()\n {\n\n return newsRepository.findAllByOrderByIdAsc();\n }", "@Override\r\n\tpublic List<Product> findNews() throws Exception {\n\t\treturn null;\r\n\t}", "public List<News> getNewsList(Integer id) {\n List<News> newsList = newsMapper.selectByAuthorId(id);\n newsList.sort((dt1,dt2) -> {\n if (dt1.getPubdate().getTime() < dt2.getPubdate().getTime()) {\n return 1;\n } else if (dt1.getPubdate().getTime() > dt2.getPubdate().getTime()) {\n return -1;\n } else {\n return 0;\n }\n });\n return newsList;\n }", "List<Article> findTop4ByStatusOrderByClickDesc(Boolean status);", "public static ArrayList<NewsItem> loadNews(int descending) throws JSONException{\n \t\t\n \t\t//Get JSON string from server\n \t\tString result = getJSON(Constants.NEWSFEED + descending); \n \t\t\n \t\tList<NewsItem> posts = new ArrayList<NewsItem>();\n \t\t\n \t\t//Parse JSON string\n \t\t\tJSONObject json_obj = new JSONObject(result);\n \t\t\tJSONArray json_arr = json_obj.getJSONArray(\"data\");\n \t\t\t\n \t\t\tfor (int i = 0; i < json_arr.length(); i++){\n \t\t\t\t//Get post message\n \t\t\t\tString message = json_arr.getJSONObject(i).optString(\"message\");\n \t\t\t\t\n \t\t\t\t//Get date\n \t\t\t\tString[] date = json_arr.getJSONObject(i).optString(\"created_time\").split(\"T\");\n \t\t\t\t\n \t\t\t\t//Get image url\n \t\t\t\tString image = json_arr.getJSONObject(i).optString(\"picture\");\n \t\t\t\t\n \t\t\t\tif(!image.equals(\"\")){\n \t\t\t\t\timage = image.replace(\"s.jpg\", \"n.jpg\");\n\t\t\t\t\timage = image.replace(\"s.png\", \"n.png\");\n \t\t\t\t}\n \t\t\t\t\n \t\t\t\t//Add to posts if valid content\n \t\t\t\tif ((!message.equals(\"\")) && (!date.equals(\"\"))){\n \t\t\t\t\tposts.add(new NewsItem(message, date[0], image));\n \t\t\t\t}\n \t\t\t}\n \t\t\n \t\treturn (ArrayList<NewsItem>) posts;\n \t}", "public static ArrayList<DigitalNewspapers> getDigitalNewsSources(){\n\n Uri builtUri = Uri.parse(BASE_NEWSAPI_SOURCES_EP).buildUpon()\n .build();\n\n URL url = null;\n\n try {\n url = new URL(builtUri.toString());\n return doCall(url);\n\n } catch (MalformedURLException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n return null;\n }", "public List<MTSDocumentVO> getArticles(String cat, String pubId, int count, boolean isPagePreview) {\n\t\t// Create the structure\n\t\tList<Object> vals = new ArrayList<>();\n\t\tvals.add(cat);\n\n\t\tStringBuilder sql = new StringBuilder(464);\n\t\tsql.append(\"select action_nm, action_desc, a.action_id, document_id, \");\n\t\tsql.append(\"unique_cd, publication_id, direct_access_pth, publish_dt, c.sponsor_id \");\n\t\tsql.append(\"from widget_meta_data_xr a \");\n\t\tsql.append(\"inner join sb_action b on a.action_id = b.action_id and b.pending_sync_flg = 0 \");\n\t\tsql.append(\"inner join document doc on b.action_id = doc.action_id \");\n\t\tsql.append(DBUtil.INNER_JOIN).append(getCustomSchema()).append(\"mts_document c on b.action_group_id = c.document_id \");\n\t\tsql.append(DBUtil.INNER_JOIN).append(getCustomSchema()).append(\"mts_issue d on c.issue_id = d.issue_id \");\n\t\tsql.append(\"where d.approval_flg=1 and widget_meta_data_id=? \"); \n\t\tif (!isPagePreview) {\n\t\t\tsql.append(\" and (c.publish_dt < CURRENT_TIMESTAMP or c.publish_dt is null) and (d.issue_dt < CURRENT_TIMESTAMP or d.issue_dt is null) \");\n\t\t\tsql.append(\"and c.publish_dt > current_date-730 \"); //only show articles newer than 2yrs old - MTS-i36\n\t\t}\n\t\tif (!StringUtil.isEmpty(pubId)) {\n\t\t\tsql.append(\"and publication_id = ? \");\n\t\t\tvals.add(pubId);\n\t\t}\n\t\tsql.append(\"order by random() limit ? \");\n\t\tvals.add(count);\n\t\tlog.debug(sql.length() + \"|\" + sql + \"|\" + vals);\n\n\t\tDBProcessor db = new DBProcessor(getDBConnection(), getCustomSchema());\n\t\tList<MTSDocumentVO> docs = db.executeSelect(sql.toString(), vals, new MTSDocumentVO());\n\t\ttry {\n\t\t\tassignDocumentAsset(docs, cat);\n\t\t} catch (SQLException e) {\n\t\t\tlog.error(\"Unabel to load assets\", e);\n\t\t}\n\n\t\treturn docs;\n\t}", "public static TopLista getTopLista(Date datum){\n TopLista topLista=null;\n try {\n PreparedStatement ps= FConnection.getInstance()\n .prepareStatement(\"select datumGlasanja,id from TopLista where datumGlasanja=? and obrisano=false\");\n ps.setDate(1, datum);\n ResultSet rs=ps.executeQuery();\n if(rs.next()){\n topLista=new TopLista();\n topLista.setDatumGlasanja(rs.getDate(1));\n topLista.setId(rs.getInt(2));\n }\n rs.close();\n ps.close();\n } catch (SQLException e) {\n e.printStackTrace();\n }\n\n return topLista;\n }", "public List<NewsBaseInfo> getNewsListByDate(Date date) throws DataAccessException {\n return null;\n }", "java.util.List<com.gw.ps.pbbean.PbNewsRes.NewsIndResDetail> \n getNewsindentifydetailList();", "@GET(\"user-news-article-content?expand=newsArticle,newsArticle.newsArticleType,newsArticle.translations,newsArticle.like,newsArticle.liked,newsArticle.comments_count&per-page=1000\")\n Call<UserNewsResponse>getUserNews();", "@GetMapping(\"/bestof\")\n public ResponseEntity<List<ArticleLister>> getTopTen(){\n return new ResponseEntity<>(articleService.getTopTen(), HttpStatus.OK);\n }", "public void fetchArticles(int page, boolean newSearch) {\n if(newSearch) { articles.clear(); }\n\n AsyncHttpClient client = new AsyncHttpClient();\n String url;\n RequestParams params = new RequestParams();\n params.put(\"api-key\", \"ed5753fe0329424883b2a07a7a7b4817\");\n params.put(\"page\", page);\n\n // If top stories, different parameters\n if(topStories) {\n url = \"https://api.nytimes.com/svc/topstories/v2/home.json\";\n } else {\n url = \"https://api.nytimes.com/svc/search/v2/articlesearch.json\";\n params.put(\"q\",filter.getQuery());\n if(filter.getSort() != null) {\n params.put(\"sort\",filter.getSort());\n }\n if(filter.getBegin_date() != null) {\n params.put(\"begin_date\",filter.getBegin_date());\n }\n if(filter.getNewsDeskOpts().size() > 0) {\n for(int i=0; i<filter.getNewsDeskOpts().size(); i++) {\n params.put(\"fq\",String.format(\"news_desk:(%s)\",filter.getNewsDeskOpts().get(i)));\n }\n }\n Log.d(\"DEBUG\",params.toString());\n }\n\n client.get(url, params, new JsonHttpResponseHandler() {\n @Override\n public void onSuccess(int statusCode, Header[] headers, JSONObject response) {\n Log.d(\"DEBUG\",response.toString());\n JSONArray articleJsonResults = null;\n try {\n if(!topStories) {\n articleJsonResults = response.getJSONObject(\"response\").getJSONArray(\"docs\");\n } else {\n articleJsonResults = response.getJSONArray(\"results\");\n }\n\n // Every time data is changed, notify adapter; can also do by article.addAll and use adapter.notifyDataSetChanged\n articles.addAll(Article.fromJsonArray(articleJsonResults, topStories));\n adapter.notifyDataSetChanged();\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }\n\n @Override\n public void onFailure(int statusCode, Header[] headers, Throwable throwable, JSONObject errorResponse) {\n Log.d(\"DEBUG\",\"JSON response failed\");\n super.onFailure(statusCode, headers, throwable, errorResponse);\n }\n });\n }", "public List<Entry> show10MostRecentEntries() {\n\t\tList<Entry> subList;\n\t\tif (entries.isEmpty()){\n\t\t\tSystem.out.println(\"The blog doesn't have any entries yet\");\n\t\t\treturn entries.getList();\n\t\t}\n\t\telse {\n\t\t\tif (entries.getSize()>= 10){\n\t\t\t\tsubList= entries.getSubList(0,10);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tsubList= entries.getSubList(0,entries.getSize());\n\t\t\t}\n\t\t\tIterator<Entry> it = subList.listIterator();\n\t\t\twhile (it.hasNext()) {\n\t\t\t\tEntry entry = it.next();\n\t\t\t\tSystem.out.println(\"Entry Title: \" + entry.getTitle());\n\t\t\t\tSystem.out.println(\"Entry Content: \" + entry.getContent());\n\t\t\t}\n\t\t\t\n\t\t\treturn subList;\n\t\t}\n\t}", "public Page<Post> getNewPosts(){\n Pageable page = new PageRequest(0, 3, Sort.Direction.DESC, \"createdAt\");\n System.out.println(\"getNewPosts\");\n // Page<Post> posts = postRepository.findTop10OrderByCreatedAtOrderByCreatedAtDesc(page);\n // List<Post> p = postRepository.getNewestPosts();\n\n Page<Post> pp = postRepository.findAll(page);\n\n for (Post p :pp){\n logger.info(\"getNewPosts -> \" + p);\n }\n return pp;\n/* for (Post p :posts){\n System.out.println(\"p->\" + p);\n }\n if (posts != null)\n return posts;\n return null;*/\n }", "public List<Goods> selectByDate(int page,int maxResults);", "public List<SiteNoticia> listarPorData() {\n List<SiteNoticia> result = new ArrayList<SiteNoticia>();\n EntityManager em1 = getEM();\n em1.getTransaction().begin();\n CriteriaBuilder builder = em1.getCriteriaBuilder();\n CriteriaQuery query = builder.createQuery(SiteNoticia.class);\n //EntityType type = em1.getMetamodel().entity(SiteNoticia.class);\n Root root = query.from(SiteNoticia.class);\n query.orderBy(builder.desc(root.get(\"hora2\")));\n result = em1.createQuery(query).getResultList();\n em1.close();\n return result;\n }", "List<TagDto> getByNewsId(Long newsId);", "@Override\r\n\tpublic List<News> findAllNews() {\n\t\tConnection conn = null;\r\n\t\tPreparedStatement pstmt = null;\r\n\t\tResultSet rs = null;\r\n\t\tList<News> newsList = null;\r\n\t\t\r\n\t\ttry {\r\n\t\t\t\r\n\t\t\tString sql = \"select * from news\";\r\n\t\t\tconn = SimpleDBUtil.getConnection();\r\n\t\t\tpstmt = conn.prepareStatement(sql);\r\n\t\t\trs = pstmt.executeQuery();\r\n\t\t\tnewsList = new ArrayList<>();\r\n\t\t\twhile (rs.next()) {\r\n\t\t\t\tNews aNews = new News();\r\n\t\t\t\taNews.setId(rs.getInt(1));\r\n\t\t\t\taNews.setTitle(rs.getString(2));\r\n\t\t\t\taNews.setContent(rs.getString(\"content\"));\r\n\t\t\t\taNews.setCreateTime(rs.getDate(\"createTime\"));\r\n\t\t\t\taNews.setFk_topic_id(rs.getInt(\"fk_topic_id\"));\r\n\t\t\t\t\r\n\t\t\t\tnewsList.add(aNews);\r\n\t\t\t}\r\n\r\n\t\t} catch (Exception ex) {\r\n\t\t\tex.printStackTrace();\r\n\t\t} finally {\r\n\t\t\tSimpleDBUtil.closeAll(rs, pstmt, conn);\r\n\t\t}\r\n\t\t\r\n\t\treturn newsList;\r\n\t}", "List<TagDto> getOrderedByNewsCount(int offset, int limit, boolean desc);", "public Pago findTopByOrderByIdDesc();", "@GetMapping(\"/api/article\")\n\tpublic MedicineArticle fetchJson() {\n\t\tfinal String hackerNewsUrl = \"https://hn.algolia.com/api/v1/search?query=medicine&tags=story&hitsPerPage=40\";\n\n\t\t// **Use the unsplash api to randomly pick an image about medicine and use it\n\t\t// for the returned JSON imageUrl field.\n\t\tfinal String unsplashUrl = \"https://api.unsplash.com/photos/random?count=1&query=medicine&client_id=w3l5_QBR_ohoKklyM7Hhy-uo5BGgO6cG0-is4aKEnZY\";\n\n\t\t// using jackson API\n\t\tObjectMapper objectMapper = new ObjectMapper();\n\t\tObjectMapper objectMapper1 = new ObjectMapper();\n\n\t\tList<MedicineArticle> medArticle = new ArrayList<MedicineArticle>();\n\t\tHits medicineArticleHolder = new Hits();\n\n\t\tUnsplashImage[] unsplashImageHolder;\n\t\tUnsplashImage unsplashImageHolder1 = new UnsplashImage();\n\n\t\ttry {\n\t\t\t// json deserialization\n\t\t\tmedicineArticleHolder = objectMapper.readValue(new URL(hackerNewsUrl), Hits.class);\n\t\t\tmedArticle = medicineArticleHolder.getMedArticle(); /* get the element from hackerNews response json */\n\n\t\t\t// json deserialization\n\t\t\tunsplashImageHolder = objectMapper1.readValue(new URL(unsplashUrl), UnsplashImage[].class);\n\t\t\tunsplashImageHolder1 = unsplashImageHolder[0];\t/* get the element from unsplash response json */\n\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\t// **For the duration of 1 hour return the same JSON content\n\t\tLocalTime now = LocalTime.now();\n\n\t\ttry {\n\t\t\tmedArticle.get(now.getHour()).setImageUrl(unsplashImageHolder1.getUnsplashImageUrl().getThumbUrl());\n\t\t} catch (IndexOutOfBoundsException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn medArticle.get(now.getHour());\n\t}", "@Override\r\n\tpublic DataWrapperDiy<List<CommonNotice>> getAllNoticeList(String token, Integer pageSize, Integer pageIndex) {\n\t\tDataWrapperDiy<List<CommonNotice>> result = new DataWrapperDiy<List<CommonNotice>>();\r\n\t\tList<CommonNotice> resultList = new ArrayList<CommonNotice>();\r\n\t\tUser user = SessionManager.getSession(token); \r\n\t\tif(user!=null){\r\n\t\t\tDataWrapper<List<Notice>> gets = noticeDao.getListByUserId(pageSize,pageIndex,user.getId());\r\n\t\t\tInteger totalNotRead=0;\r\n\t\t\ttotalNotRead= noticeDao.getListNotRead(user.getId());\r\n\t\t\tif(gets.getData()!=null){\r\n\t\t\t\tif(!gets.getData().isEmpty()){\r\n\t\t\t\t\tresult.setCurrentPage(gets.getCurrentPage());\r\n\t\t\t\t\tresult.setNumberPerPage(gets.getNumberPerPage());\r\n\t\t\t\t\tresult.setTotalNumber(gets.getTotalNumber());\r\n\t\t\t\t\tresult.setTotalPage(gets.getTotalPage());\r\n\t\t\t\t\tfor(Notice no:gets.getData()){\r\n\t\t\t\t\t\t//0 质量问题、 1 安全问题、 2 施工任务单、 3 预付单 、4 留言\r\n\t\t\t\t\t\tswitch(no.getNoticeType()){\r\n\t\t\t\t case 0:\r\n\t\t\t\t {\r\n\t\t\t\t \tCommonNotice commonNotice = new CommonNotice();\r\n\t\t\t\t\t\t\t\tcommonNotice.setCreateDate(Parameters.getSdf().format(no.getCreateDate()));\r\n\t\t\t\t\t\t\t\tcommonNotice.setNoticeType(no.getNoticeType());\r\n\t\t\t\t\t\t\t\tcommonNotice.setReadState(no.getReadState());\r\n\t\t\t\t\t\t\t\tcommonNotice.setAboutId(no.getAboutId());\r\n\t\t\t\t \tQualityQuestion qualityQuestion = new QualityQuestion();\r\n\t\t\t\t \tqualityQuestion=qualityQuestionDao.getById(no.getAboutId());\r\n\t\t\t\t \tif(qualityQuestion!=null){\r\n\t\t\t\t \t\tcommonNotice.setAboutCreateUserId(qualityQuestion.getUserId());\r\n\t\t\t\t \t\tUser createUser=userDao.getById(qualityQuestion.getUserId());\r\n\t\t\t\t\t\t\t\t\tif(createUser!=null){\r\n\t\t\t\t\t\t\t\t\t\tcommonNotice.setCreateUserName(createUser.getRealName());\r\n\t\t\t\t\t\t\t\t\t\tif(createUser.getUserIcon()!=null){\r\n\t\t\t\t\t\t\t\t\t\t\tFiles urlfiles = fileDao.getById(createUser.getUserIcon());\r\n\t\t\t\t\t\t\t\t\t\t\tif(urlfiles!=null){\r\n\t\t\t\t\t\t\t\t\t\t\t\tcommonNotice.setUserIconUrl(urlfiles.getUrl());\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t}else if(createUser.getUserIconUrl()!=null){\r\n\t\t\t\t\t\t\t\t\t\t\tcommonNotice.setUserIconUrl(createUser.getUserIconUrl());\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\tif(qualityQuestion.getState()==0){\r\n\t\t\t\t\t\t\t\t\t\tif(createUser!=null){\r\n\t\t\t\t\t \t\t\tcommonNotice.setTitle(createUser.getRealName()+\"提交了一个质量问题已完成\");\r\n\t\t\t\t\t \t\t}\r\n\t\t\t \t\t\t}\r\n\t\t\t \t\t\tif(qualityQuestion.getState()==1){\r\n\t\t\t \t\t\t\tcommonNotice.setTitle(createUser.getRealName()+\"提交了一个安全问题已完成\");\r\n\t\t\t \t\t\t}\r\n\t\t\t\t \t\t\r\n\t\t\t\t \t\tcommonNotice.setContent(qualityQuestion.getIntro());\r\n\t\t\t\t \t\tProject project = projectDao.getById(qualityQuestion.getProjectId());\r\n\t\t\t\t \t\tif(project!=null){\r\n\t\t\t\t \t\t\tcommonNotice.setProjectName(project.getName());\r\n\t\t\t\t \t\t}\r\n\t\t\t\t \t\tif(createUser.getUserIconUrl()!=null){\r\n\t\t\t\t \t\t\tcommonNotice.setUserIconUrl(createUser.getUserIconUrl());\r\n\t\t\t\t \t\t}\r\n\t\t\t\t \t\tif(createUser.getUserIcon()!=null){\r\n\t\t\t\t \t\t\tFiles userIcon = fileDao.getById(createUser.getUserIcon());\r\n\t\t\t\t \t\t\tif(userIcon!=null){\r\n\t\t\t\t \t\t\t\tcommonNotice.setUserIconUrl(userIcon.getUrl());\r\n\t\t\t\t \t\t\t}\r\n\t\t\t\t \t\t}\r\n\t\t\t\t \t\tDataWrapper<List<QuestionFile>> images = questionFileDao.getQuestionFileByQualityId(qualityQuestion.getId());\r\n\t\t\t\t\t\t\t\t\tif(images.getData()!=null){\r\n\t\t\t\t\t\t\t\t\t\tif(!images.getData().isEmpty()){\r\n\t\t\t\t\t\t\t\t\t\t\tFiles files = fileDao.getById(images.getData().get(0).getFileId());\r\n\t\t\t\t\t\t\t\t\t\t\tif(files!=null){\r\n\t\t\t\t\t\t\t\t\t\t\t\tcommonNotice.setImagUrl(files.getUrl());\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\tcommonNotice.setName(qualityQuestion.getName());\r\n\t\t\t\t\t\t\t\t\tif(qualityQuestion.getUserList()!=null){\r\n\t\t\t\t\t\t\t\t\t\tString[] strs = qualityQuestion.getUserList().split(\",\");\r\n\t\t\t\t\t\t\t\t\t\tList<String> nameList = new ArrayList<String>();\r\n\t\t\t\t\t\t\t\t\t\tfor(int q=0;q<strs.length;q++){\r\n\t\t\t\t\t\t\t\t\t\t\tUser sendUser = userDao.getById(Long.valueOf(strs[q]));\r\n\t\t\t\t\t\t\t\t\t\t\tif(sendUser!=null){\r\n\t\t\t\t\t\t\t\t\t\t\t\tnameList.add(sendUser.getRealName());\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\tcommonNotice.setSendUserList(nameList);\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\tresultList.add(commonNotice);\r\n\t\t\t\t \t}\r\n\t\t\t\t \tbreak;\r\n\t\t\t\t }\r\n\t\t\t\t case 1:\r\n\t\t\t\t {\r\n\t\t\t\t \tCommonNotice commonNotice = new CommonNotice();\r\n\t\t\t\t\t\t\tcommonNotice.setCreateDate(Parameters.getSdf().format(no.getCreateDate()));\r\n\t\t\t\t\t\t\tcommonNotice.setNoticeType(no.getNoticeType());\r\n\t\t\t\t\t\t\tcommonNotice.setAboutId(no.getAboutId());\r\n\t\t\t\t\t\t\tcommonNotice.setReadState(no.getReadState());\r\n\t\t\t\t \tQuestion question = new Question();\r\n\t\t\t\t \tquestion=questionDao.getById(no.getAboutId());\r\n\t\t\t \tif(question!=null){\r\n\t\t\t \t\tcommonNotice.setAboutCreateUserId(question.getUserId());\r\n\t\t\t \t\tUser createUser=userDao.getById(question.getUserId());\r\n\t\t\t\t\t\t\t\tif(createUser!=null){\r\n\t\t\t\t\t\t\t\t\tcommonNotice.setCreateUserName(createUser.getRealName());\r\n\t\t\t\t\t\t\t\t\tif(createUser.getUserIcon()!=null){\r\n\t\t\t\t\t\t\t\t\t\tFiles urlfiles = fileDao.getById(createUser.getUserIcon());\r\n\t\t\t\t\t\t\t\t\t\tif(urlfiles!=null){\r\n\t\t\t\t\t\t\t\t\t\t\tcommonNotice.setUserIconUrl(urlfiles.getUrl());\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t}else if(createUser.getUserIconUrl()!=null){\r\n\t\t\t\t\t\t\t\t\t\tcommonNotice.setUserIconUrl(createUser.getUserIconUrl());\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t \t\tif(createUser!=null){\r\n\t\t\t \t\t\tif(question.getState()==0){\r\n\t\t\t \t\t\t\tcommonNotice.setTitle(createUser.getRealName()+\"提交了一个安全问题待处理\");\r\n\t\t\t \t\t\t}\r\n\t\t\t \t\t\tif(question.getState()==1){\r\n\t\t\t \t\t\t\tcommonNotice.setTitle(createUser.getRealName()+\"提交了一个安全问题已完成\");\r\n\t\t\t \t\t\t}\r\n\t\t\t \t\t}\r\n\t\t\t \t\tcommonNotice.setContent(question.getIntro());\r\n\t\t\t \t\tProject project = projectDao.getById(question.getProjectId());\r\n\t\t\t \t\tif(project!=null){\r\n\t\t\t \t\t\tcommonNotice.setProjectName(project.getName());\r\n\t\t\t \t\t}\r\n\t\t\t \t\tDataWrapper<List<QuestionFile>> images = questionFileDao.getQuestionFileByQuestionId(question.getId());\r\n\t\t\t\t\t\t\t\tif(images.getData()!=null){\r\n\t\t\t\t\t\t\t\t\tif(!images.getData().isEmpty()){\r\n\t\t\t\t\t\t\t\t\t\tFiles files = fileDao.getById(images.getData().get(0).getFileId());\r\n\t\t\t\t\t\t\t\t\t\tif(files!=null){\r\n\t\t\t\t\t\t\t\t\t\t\tcommonNotice.setImagUrl(files.getUrl());\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tif(question.getUserList()!=null){\r\n\t\t\t\t\t\t\t\t\tString[] strs = question.getUserList().split(\",\");\r\n\t\t\t\t\t\t\t\t\tList<String> nameList = new ArrayList<String>();\r\n\t\t\t\t\t\t\t\t\tfor(int q=0;q<strs.length;q++){\r\n\t\t\t\t\t\t\t\t\t\tUser sendUser = userDao.getById(Long.valueOf(strs[q]));\r\n\t\t\t\t\t\t\t\t\t\tif(sendUser!=null){\r\n\t\t\t\t\t\t\t\t\t\t\tnameList.add(sendUser.getRealName());\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\tcommonNotice.setSendUserList(nameList);\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tcommonNotice.setName(question.getName());\r\n\t\t\t\t\t\t\t\tresultList.add(commonNotice);\r\n\t\t\t \t}\r\n\t\t\t\t break;\r\n\t\t\t\t }\r\n\t\t\t\t case 2:\r\n\t\t\t\t {\r\n\t\t\t\t \tCommonNotice commonNotice = new CommonNotice();\r\n\t\t\t\t\t\t\tcommonNotice.setCreateDate(Parameters.getSdf().format(no.getCreateDate()));\r\n\t\t\t\t\t\t\tcommonNotice.setNoticeType(no.getNoticeType());\r\n\t\t\t\t\t\t\tcommonNotice.setAboutId(no.getAboutId());\r\n\t\t\t\t\t\t\tcommonNotice.setReadState(no.getReadState());\r\n\t\t\t\t\t\t\tConstructionTaskNew ct = constructionTaskNewDao.getById(no.getAboutId());\r\n\t\t\t\t\t\t\tif(ct!=null){\r\n\t\t\t\t\t\t\t\tcommonNotice.setAboutCreateUserId(ct.getCreateUser());\r\n\t\t\t\t\t\t\t\tcommonNotice.setContent(ct.getConstructContent());\r\n\t\t\t\t\t\t\t\tProject project = projectDao.getById(ct.getProjectId());\r\n\t\t\t\t\t\t\t\tif(project!=null){\r\n\t\t\t\t\t\t\t\t\tcommonNotice.setProjectName(project.getName());\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tif(ct.getImgs()!=null){\r\n\t\t\t\t\t\t\t\t\tcommonNotice.setImagUrl(ct.getImgs().split(\",\")[0]);\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tUser createUser=userDao.getById(ct.getCreateUser());\r\n\t\t\t\t\t\t\t\tif(createUser!=null){\r\n\t\t\t\t\t\t\t\t\tcommonNotice.setCreateUserName(createUser.getRealName());\r\n\t\t\t\t\t\t\t\t\tif(createUser.getUserIcon()!=null){\r\n\t\t\t\t\t\t\t\t\t\tFiles urlfiles = fileDao.getById(createUser.getUserIcon());\r\n\t\t\t\t\t\t\t\t\t\tif(urlfiles!=null){\r\n\t\t\t\t\t\t\t\t\t\t\tcommonNotice.setUserIconUrl(urlfiles.getUrl());\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t}else if(createUser.getUserIconUrl()!=null){\r\n\t\t\t\t\t\t\t\t\t\tcommonNotice.setUserIconUrl(createUser.getUserIconUrl());\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tif(createUser!=null){\r\n\t\t\t\t\t\t\t\t\tcommonNotice.setTitle(createUser.getRealName()+\"提交了一个施工任务单\");\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t/////任务单下面的流程节点的所有信息\r\n\t\t\t\t\t\t\t\tList<AllItemData> itemDataList = constructionTaskNewDao.getAllItemData(ct.getId());\t\r\n\t\t\t\t\t\t\t\tif(!itemDataList.isEmpty()){\r\n\t\t\t\t\t\t\t\t\tList<String> nameList = new ArrayList<String>();\r\n\t\t\t\t\t\t\t\t\tUser senduser = userDao.getById(itemDataList.get(0).getApprove_user());\r\n\t\t\t\t\t\t\t\t\tnameList.add(senduser.getRealName());\r\n\t\t\t\t\t\t\t\t\tcommonNotice.setSendUserList(nameList);\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tcommonNotice.setName(ct.getName());\r\n\t\t\t\t\t\t\t\tresultList.add(commonNotice);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t }\r\n\t\t\t\t case 3:\r\n\t\t\t\t {\r\n\t\t\t\t \tCommonNotice commonNotice = new CommonNotice();\r\n\t\t\t\t \tcommonNotice.setReadState(no.getReadState());\r\n\t\t\t\t\t\t\tcommonNotice.setCreateDate(Parameters.getSdf().format(no.getCreateDate()));\r\n\t\t\t\t\t\t\tcommonNotice.setNoticeType(no.getNoticeType());\r\n\t\t\t\t\t\t\tcommonNotice.setAboutId(no.getAboutId());\r\n\t\t\t\t \tAdvancedOrder ct = advancedOrderDao.getById(no.getAboutId());\r\n\t\t\t\t\t\t\tif(ct!=null){\r\n\t\t\t\t\t\t\t\tcommonNotice.setAboutCreateUserId(ct.getSubmitUserId());\r\n\t\t\t\t\t\t\t\tcommonNotice.setContent(ct.getQuantityDes());\r\n\t\t\t\t\t\t\t\tProject project = projectDao.getById(ct.getProjectId());\r\n\t\t\t\t\t\t\t\tif(project!=null){\r\n\t\t\t\t\t\t\t\t\tcommonNotice.setProjectName(project.getName());\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tif(ct.getContentFilesId()!=null){\r\n\t\t\t\t\t\t\t\t\tFiles files = fileDao.getById(Long.valueOf(ct.getContentFilesId().split(\",\")[0]));\r\n\t\t\t\t\t\t\t\t\tif(files!=null){\r\n\t\t\t\t\t\t\t\t\t\tcommonNotice.setImagUrl(files.getUrl());\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tUser createUser=userDao.getById(ct.getSubmitUserId());\r\n\t\t\t\t\t\t\t\tif(createUser!=null){\r\n\t\t\t\t\t\t\t\t\tcommonNotice.setCreateUserName(createUser.getRealName());\r\n\t\t\t\t\t\t\t\t\tif(createUser.getUserIcon()!=null){\r\n\t\t\t\t\t\t\t\t\t\tFiles urlfiles = fileDao.getById(createUser.getUserIcon());\r\n\t\t\t\t\t\t\t\t\t\tif(urlfiles!=null){\r\n\t\t\t\t\t\t\t\t\t\t\tcommonNotice.setUserIconUrl(urlfiles.getUrl());\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t}else if(createUser.getUserIconUrl()!=null){\r\n\t\t\t\t\t\t\t\t\t\tcommonNotice.setUserIconUrl(createUser.getUserIconUrl());\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tif(createUser!=null){\r\n\t\t\t\t\t\t\t\t\tcommonNotice.setTitle(createUser.getRealName()+\"提交了一个预付单\");\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tif(ct.getNextReceivePeopleId()!=null){\r\n\t\t\t\t\t\t\t\t\tList<String> nameList = new ArrayList<String>();\r\n\t\t\t\t\t\t\t\t\tnameList.add(ct.getNextReceivePeopleId());\r\n\t\t\t\t\t\t\t\t\tcommonNotice.setSendUserList(nameList);\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tcommonNotice.setName(ct.getConstructPart());\r\n\t\t\t\t\t\t\t\tresultList.add(commonNotice);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t \tbreak;\r\n\t\t\t\t }\r\n\t\t\t\t case 4:\r\n\t\t\t\t {\r\n\t\t\t\t \tCommonNotice commonNotice = new CommonNotice();\r\n\t\t\t\t\t\t\tcommonNotice.setCreateDate(Parameters.getSdf().format(no.getCreateDate()));\r\n\t\t\t\t\t\t\tcommonNotice.setNoticeType(no.getNoticeType());\r\n\t\t\t\t\t\t\tcommonNotice.setReadState(no.getReadState());\r\n\t\t\t\t \tMessage ct = messageDao.getById(no.getAboutId());\r\n\t\t\t\t\t\t\tif(ct!=null){\r\n\t\t\t\t\t\t\t\tif(ct.getQuestionType()==0){\r\n\t\t\t\t\t\t\t\t\tcommonNotice.setAboutId(ct.getAboutId());\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tif(ct.getQuestionType()==1){\r\n\t\t\t\t\t\t\t\t\tcommonNotice.setAboutId(ct.getAboutId());\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tcommonNotice.setAboutCreateUserId(ct.getUserId());\r\n\t\t\t\t\t\t\t\tcommonNotice.setContent(ct.getContent());\r\n\t\t\t\t\t\t\t\tProject project = projectDao.getById(ct.getProjectId());\r\n\t\t\t\t\t\t\t\tif(project!=null){\r\n\t\t\t\t\t\t\t\t\tcommonNotice.setProjectName(project.getName());\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tMessageFile mf = messageFileDao.getMessageFileByMessageId(ct.getId());\r\n\t\t\t\t\t\t\t\tif(mf!=null){\r\n\t\t\t\t\t\t\t\t\tif(mf.getFileId()!=null){\r\n\t\t\t\t\t\t\t\t\t\tFiles file = fileDao.getById(mf.getFileId());\r\n\t\t\t\t\t\t\t\t\t\tif(file!=null){\r\n\t\t\t\t\t\t\t\t\t\t\tcommonNotice.setImagUrl(file.getUrl());\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tUser createUser=userDao.getById(ct.getUserId());\r\n\t\t\t\t\t\t\t\tif(createUser!=null){\r\n\t\t\t\t\t\t\t\t\tcommonNotice.setCreateUserName(createUser.getRealName());\r\n\t\t\t\t\t\t\t\t\tif(createUser.getUserIcon()!=null){\r\n\t\t\t\t\t\t\t\t\t\tFiles urlfiles = fileDao.getById(createUser.getUserIcon());\r\n\t\t\t\t\t\t\t\t\t\tif(urlfiles!=null){\r\n\t\t\t\t\t\t\t\t\t\t\tcommonNotice.setUserIconUrl(urlfiles.getUrl());\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t}else if(createUser.getUserIconUrl()!=null){\r\n\t\t\t\t\t\t\t\t\t\tcommonNotice.setUserIconUrl(createUser.getUserIconUrl());\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tif(createUser!=null){\r\n\t\t\t\t\t\t\t\t\tcommonNotice.setTitle(createUser.getRealName()+\"提交了一条留言\");\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tcommonNotice.setMessageType(ct.getQuestionType());\r\n\t\t\t\t\t\t\t\tcommonNotice.setName(ct.getContent());\r\n\t\t\t\t\t\t\t\tresultList.add(commonNotice);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t \tbreak;\r\n\t\t\t\t }\r\n\t\t\t\t }\r\n\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tresult.setData(resultList);\r\n\t\t\tresult.setCurrentPage(gets.getCurrentPage());\r\n\t\t\tresult.setNotRead(totalNotRead);\r\n\t\t\tresult.setTotalNumber(gets.getTotalNumber());\r\n\t\t\tresult.setTotalPage(gets.getTotalPage());\r\n\t\t\tresult.setNumberPerPage(gets.getNumberPerPage());\r\n\t\t}else{\r\n\t\t\tresult.setErrorCode(ErrorCodeEnum.User_Not_Logined);\r\n\t\t}\r\n\t\treturn result;\r\n\t}", "public Digital(int id, String title, String description, String image, String author, Date timePost, String shortDes) {\n this.id = id;\n this.title = title;\n this.description = description;\n this.image = image;\n this.author = author;\n this.timePost = timePost;\n this.shortDes = shortDes;\n }", "public List<DBObject> getNews(List<ObjectId> userStories, int skip) \n throws InputException, MongoException;", "@RequestMapping(value = \"/newsbulletin\", method = RequestMethod.GET)\n public ResponseEntity<Object> fetchArticles(@RequestParam String sortBy, @RequestParam String sortDirection) {\n return new ResponseEntity<Object>( newsDelivery.findAll(sortBy,sortDirection), HttpStatus.OK);\n }", "List<ShopItem> findAllByInTopPageTrue();", "public List<Integer> findTopGenesByPaperCnt( Integer n ) throws DAOException;", "public ArrayList<ListArt> PrintWikiArticles()\r\n\t{\r\n\t\t//----- Declare variables----------//\r\n\t\tfinal String Art = \"Article\";\r\n\t\tint NumberCross = 0;\r\n\t\tfinal Label recordClassLabel = DynamicLabel.label(Art); \r\n\t\tListArt aux = null;\r\n\t\t//---------------------------------//\r\n\r\n\t\ttry (Transaction tx = graphDb.beginTx()) {\r\n\t\t\tResourceIterator<Node> it = graphDb.findNodes(recordClassLabel, \"wikiid\", \"1395966\"); // Node representing a component\r\n\t\t\tNode next = null; \r\n\t\t\twhile( it.hasNext() ) { \r\n\t\t\t\tnext = it.next(); \r\n\t\t\t\tString lang = (String)next.getProperty(\"lang\");\r\n\t\t\t\tif ( lang.equals(\"en\") ) // language of the node\r\n\t\t\t\t\tbreak; \r\n\t\t\t} \r\n\r\n\t\t\tvisit(graphDb, next, /*visited,*/ NumberCross, aux, ListNode);\r\n\t\t\ttx.success(); \r\n\r\n\t\t}\r\n\t\treturn ListNode;\r\n\r\n\t}", "public List<Goods> selectByCatelogOrderByDate(@Param(\"catelogId\")Integer catelogId,@Param(\"limit\")Integer limit);", "@Override\r\n\tpublic List<News> getNewsList(String pId, String size, String query) {\n\t\tString hql=\" WHERE 1=1 AND o.lm.id=\"+pId+query;\r\n\t\treturn this.findAll(News.class, hql, 0, Integer.valueOf(size));\r\n\t}", "public List<Song> findTopTen(){\n\t\treturn this.songRepo.findTop10ByOrderByRatingDesc();\n\t}", "int getNewsindentifydetailCount();", "@Override\n\tpublic List<News> queryNewsList(News params) throws Exception {\n\t\treturn null;\n\t}", "@Override\n public List<Digital> getSearch(String txt, int pageIndex, int pageSize) throws Exception {\n\n Connection con = null;\n ResultSet rs = null;\n PreparedStatement ps = null;\n List<Digital> list = new ArrayList<>();\n String query = \"select *from(\"\n + \"select ROW_NUMBER() over (order by ID ASC) as rn, *\\n\"\n + \"from digital where title \\n\"\n + \"like ?\"\n + \")as x\\n\"\n + \"where rn between ?*?-2\"\n + \"and ?*?\";\n // check connection of db if cannot connect, it will throw an object of Exception\n try {\n con = getConnection();\n ps = con.prepareStatement(query);\n ps.setString(1, \"%\" + txt + \"%\");\n ps.setInt(2, pageIndex);\n ps.setInt(3, pageSize);\n ps.setInt(4, pageIndex);\n ps.setInt(5, pageSize);\n rs = ps.executeQuery();\n while (rs.next()) {\n Digital d = new Digital(rs.getInt(\"id\"),\n rs.getString(\"title\"),\n rs.getString(\"description\"),\n rs.getString(\"images\"),\n rs.getString(\"author\"),\n rs.getTimestamp(\"timePost\"),\n rs.getString(\"shortDes\"));\n list.add(d);\n }\n } catch (Exception e) {\n throw e;\n } finally {\n // close ResultSet, PrepareStatement, Connection\n closeResultSet(rs);\n closePrepareStateMent(ps);\n closeConnection(con);\n }\n return list;\n }", "ArrayList<News> findByDate(String date) throws DAOException, ConnectionPoolDataSourceException;", "List<NewsInfo> selectByExample(NewsInfoExample example);", "@Override\n public String getDescription() {\n return \"Digital goods listing\";\n }", "public ArrayList<String[]> recommendByArticle(int articleId, int topN) {\n ArrayList<String[]> recommendations = new ArrayList<String[]>();\n try {\n if (connection != null) {\n String query = \"SELECT TOP \" + topN + \" [tblPatterns].[ePrintID], [Title], SUM([patternRating])\\n\"\n + \"FROM [capstone].[dbo].[tblPatterns]\\n\"\n + \"INNER JOIN [capstone].[dbo].[OriginaltblArticleInfo]\\n\"\n + \"ON [tblPatterns].[ePrintID] = [OriginaltblArticleInfo].[ePrintID]\\n\"\n + \"WHERE [patternID] IN\\n\"\n + \"(SELECT patternID FROM [capstone].[dbo].[tblPatterns]\\n\"\n + \"WHERE [ePrintID] = \" + articleId + \")\\n\"\n + \"AND [tblPatterns].[ePrintID] <> \" + articleId + \"\\n\"\n + \"GROUP BY [tblPatterns].[ePrintID], [Title]\\n\"\n + \"ORDER BY SUM([patternRating]) DESC;\";\n Statement statement = connection.createStatement();\n ResultSet rs = statement.executeQuery(query);\n while (rs.next()) {\n String[] recommendation = {\n rs.getString(1),\n rs.getString(2),\n rs.getString(3)\n };\n recommendations.add(recommendation);\n }\n rs.close();\n } else {\n System.out.print(\"No database connection\");\n }\n } catch (SQLException e) {\n System.out.print(e.getMessage());\n } catch (NullPointerException e) {\n System.out.print(e.getMessage());\n }\n return recommendations;\n }", "@GetMapping(\"/news\")\n public List<NewsServiceModel> getNewsById(Sort sort, @RequestParam(required = false) String date, String title) {\n\n if (date != null && title == null) {\n return newsService.getNewsByDate(date);\n } else if (title != null && date == null) {\n return newsService.getNewsByTitle(title);\n } else if (date != null) {\n return newsService.getAllNewsByDateAndTitle(date, title);\n }\n return newsService.getAllNews(sort);\n }", "@RequestMapping(path = \"/newLinks\", method = RequestMethod.GET)\n public ArrayList<Link> getNewYadas() {\n\n return links.findTop10ByOrderByTimeOfCreationDesc();\n }", "@Override\r\n\tpublic List<News> getNewsTtList(String pId, String size, String query) {\n\t\treturn null;\r\n\t}", "@Override\r\n\tpublic List<News> getNewsTjList(String pId, String size, String query) {\n\t\treturn null;\r\n\t}", "public List<NewsNotifications> getNewsFeed(int limit);", "@PostMapping(\"/search\")\n public Object fetchNews(@RequestParam(\"id\") String id, @RequestParam(name = \"page\", required = false) Integer page) {\n return newsService.getNewsData(id, page);\n }", "public News getByid(News news);", "@Override\n\tpublic List<PositionData> getLatest10PostionInfo(String terminalId) {\n\t\ttry {\n\t\t\tList<PositionData> returnData = new ArrayList<PositionData>();\n\t\t\tList<PositionData> tempData = new ArrayList<PositionData>();\n\t\t\tList<PositionData> position_list = positionDataDao.findByHQL(\"from PositionData where tid = '\" + terminalId + \"' order by date desc\");\n\t\t\tfor(int i=0;i<(position_list.size()>10?10:position_list.size());i++){\n\t\t\t\ttempData.add(position_list.get(i));\n\t\t\t}\n\t\t\tfor(int i=tempData.size()-1;i>=0;i--)\n\t\t\t\treturnData.add(tempData.get(i));\n\t\t\treturn returnData;\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\treturn null;\n\t\t}\n\t}", "@Override\n\tpublic Page showChargeCarByPage() {\n\t\tList<CarInfoDto> carInfolist = chargeCarMapper.selectCarInfoByPage();\n//\t\tint count = chargeCarMapper.selectCarInfoCount();\n\t\t\n\t\tString count = chargeCarMapper.selectCarInfoCount();\n\t\t//要有一个查询总数的sql\n\t\tSystem.out.println(\"----count----\"+count);\n\t\tPage page = new Page(Integer.parseInt(count), 10,\n\t\t\t\t1);\n\t\tpage.setList(carInfolist);\n\t\tSystem.out.println(carInfolist);\n\t\treturn page;\n\t}", "static void callNews(String key, Scanner sc) {\n\t\tSystem.out.print(\"Enter stock symbol: \");\n\t\tString symbol = sc.next().toUpperCase();\n\t\tsc.nextLine();\n\t\t\n\t\tHttpResponse<String> response = Unirest.get(\"https://yahoo-finance-low-latency.p.rapidapi.com/v2/finance/news?symbols=\" + symbol)\n\t\t\t\t.header(\"x-rapidapi-key\", key)\n\t\t\t\t.header(\"x-rapidapi-host\", \"yahoo-finance-low-latency.p.rapidapi.com\")\n\t\t\t\t.asString();\n\t\t\t\t\t\n\t\t/* You can get a summary of the stories as well - summary\n\t\t * URL of story - url\n\t\t * Author - author_name\n\t\t * Time - provider_publish_time\n\t\t * Source - provider_name\n\t\t * Time zone - timeZoneShortName\n\t\t * \n\t\t */\n\t\tJSONObject obj = new JSONObject(response.getBody());\t// Get the response, store it in JSON object\n\t\tobj = obj.getJSONObject(\"Content\");\t\t\n\t\tJSONArray arr = new JSONArray(obj.get(\"result\").toString());\n\t\t \n\t\tfor(int i = 0; i < arr.length(); i++) {\n\t\t\tobj = new JSONObject(arr.opt(i).toString());\n\t\t\tLocalDateTime date = LocalDateTime.ofEpochSecond(Long.parseLong(obj.get(\"provider_publish_time\").toString()), 0, ZoneOffset.MIN);\n\t\t\tSystem.out.println(\"(\" + (i + 1) + \") \"+ obj.get(\"title\") + \n\t\t\t\t\t\" - \" + date.toLocalDate() + \" \" + date.toLocalTime() + \n\t\t\t\t\t\" \" + obj.get(\"timeZoneShortName\"));\n\t\t\tSystem.out.println();\n\t\t}\n\t\t\n\t\tSystem.out.print(\"Read story summary? Y or N\\n\");\n\t\tboolean readSummary = (sc.next().toUpperCase().matches(\"Y\")) ? true : false;\n\t\t\n\t\tif(readSummary) {\n\t\t\tSystem.out.print(\"Select a number to select a story: \");\n\t\t\tint selection = sc.nextInt();\n\t\t\tobj = new JSONObject(arr.opt(selection - 1).toString());\n\t\t\tSystem.out.println(obj.get(\"summary\") + \"\\n\");\n\t\t\t/* Maybe add the ability to select the story \n\t\t\t * and visit the webpage\n\t\t\t */\n\t\t}\n\t\t\n\t\tsc.nextLine();\t// clear scanner\n\t\t\t\n\t\tUnirest.shutDown();\n\t}", "public List<Goods> selectOrderByDate(@Param(\"limit\")Integer limit);", "private void fetchNews() {\n if (isOnline(mContext)) {\n // showing refresh animation before making http call\n swipeRefreshLayout.setRefreshing(true);\n\n // appending offset to url\n // String url = URL_TOP_250 + offSet;\n ApiInterface apiService = ApiRequest.getClient().create(ApiInterface.class);\n\n Call<News> call = apiService.loadNewsList();\n call.enqueue(new Callback<News>() {\n @Override\n public void onResponse(Call<News> call, retrofit2.Response<News> response) {\n\n if (response.body().getRows().size() > 0) {\n\n newsList.addAll(response.body().getRows());\n showList();\n // stopping swipe refresh\n swipeRefreshLayout.setRefreshing(false);\n }\n }\n\n @Override\n public void onFailure(Call<News> call, Throwable t) {\n displayMessage(t.getMessage());\n setTextMessage();\n // stopping swipe refresh\n swipeRefreshLayout.setRefreshing(false);\n\n }\n });\n } else {\n setTextMessage();\n }\n\n }", "private static List<ArticleBean> transactionSearchSuggestedArticles(Transaction tx, String username, int limit)\n {\n List<ArticleBean> articles = new ArrayList<>();\n HashMap<String,Object> parameters = new HashMap<>();\n int quantiInflu = 0;\n parameters.put(\"username\", username);\n parameters.put(\"role\", \"influencer\");\n parameters.put(\"limit\", limit);\n\n String conInflu = \"MATCH (u:User{username:$username})-[f:FOLLOW]->(i:User{role:$role})-[p:PUBLISHED]-(a:Article) \" +\n \" RETURN a, i, p ORDER BY p.timestamp LIMIT $limit\";\n\n String nienteInflu = \"MATCH (i:User)-[p:PUBLISHED]->(a:Article)-[r:REFERRED]->(g:Game), (u:User) \" +\n \" WHERE NOT(i.username = u.username) AND \" +\n \" u.username=$username AND ((g.category1 = u.category1 OR g.category1 = u.category2) \" +\n \" OR (g.category2 = u.category1 OR g.category2 = u.category2))\" +\n \" RETURN distinct(a),i,p ORDER BY p.timestamp LIMIT $limit \";\n\n Result result;\n quantiInflu = UsersDBManager.transactionCountUsers(tx,username,\"influencer\");\n if(quantiInflu < 3)\n {\n result = tx.run(nienteInflu, parameters);\n }\n else\n {\n result = tx.run(conInflu, parameters);\n }\n while(result.hasNext())\n {\n Record record = result.next();\n List<Pair<String, Value>> values = record.fields();\n ArticleBean article = new ArticleBean();\n String author;\n String title;\n for (Pair<String,Value> nameValue: values) {\n if (\"a\".equals(nameValue.key())) {\n Value value = nameValue.value();\n title = value.get(\"title\").asString();\n article.setTitle(title);\n article.setId(value.get(\"idArt\").asInt());\n\n }\n if (\"i\".equals(nameValue.key())) {\n Value value = nameValue.value();\n author = value.get(\"username\").asString();\n article.setAuthor(author);\n\n }\n if (\"p\".equals(nameValue.key())) {\n Value value = nameValue.value();\n String timestamp = value.get(\"timestamp\").asString();\n article.setTimestamp(Timestamp.valueOf(timestamp));\n\n }\n }\n articles.add(article);\n }\n\n return articles;\n\n }", "@RequestMapping(path = \"/topLinks\", method = RequestMethod.GET)\n public ArrayList<Link> getTopLinks() {\n\n return links.findTop10ByOrderByKarmaDesc();\n }", "public ArrayList<Article> getUnpublishedArticle(int authorID) throws SQLException {\r\n\t\tConnectionManager conn=null;\r\n\t\tArrayList<Integer> intArtID = new ArrayList<Integer>();\r\n\t\tArrayList<Integer> finalselectedArticleID = new ArrayList<Integer>();\r\n\t\tArrayList<Article> unpubArticle = new ArrayList<Article>();\r\n\t\tString queryArticle = \"select ArticleAuthor.articleID from ArticleAuthor where ArticleAuthor.authorID =\" + authorID;\r\n\t\ttry {\r\n\t\t\tconn = new ConnectionManager();\r\n\t\t\tStatement st = conn.getInstance().getConnection().createStatement();\r\n\t\t\tResultSet rs = st.executeQuery(queryArticle);\r\n\t\t\twhile (rs.next()) {\r\n\t\t\t\tint articleId=rs.getInt(\"ArticleAuthor.articleID\");\r\n\t\t\t\tSystem.out.println(\"articleIDs aayi:\"+articleId);\r\n\t\t\t\tintArtID.add(articleId);\r\n\t\t\t}\r\n\t\t\tSystem.out.println(intArtID);\r\n\t\t\trs.close();\r\n\t\t\tfor(int a: intArtID){\r\n\t\t\t\tStatement st1 = conn.getInstance().getConnection().createStatement();\r\n\t\t\t\tString selectQuery2 = \"Select articleID from Article where articleID!=\"+a;\r\n\t\t\t\tResultSet rs1 = st1.executeQuery(selectQuery2);\r\n\t\t\t\twhile(rs1.next()){\r\n\t\t\t\t\tint articleId=rs1.getInt(\"articleID\");\r\n\t\t\t\t\tif(!intArtID.contains(articleId)){\r\n\t\t\t\t\t\tif(!finalselectedArticleID.contains(articleId)){\r\n\t\t\t\t\t\t\tfinalselectedArticleID.add(articleId);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tSystem.out.println(\"Final ids:\"+finalselectedArticleID);\r\n\t\t\tfor(int autID : finalselectedArticleID ){\r\n\t\t\t\tStatement st2 = conn.getInstance().getConnection().createStatement();\r\n\t\t\t\tString q = \"select articleID, title, summary from Article where articleID=\"+autID;\r\n\t\t\t\tResultSet rs2 = st2.executeQuery(q);\r\n\t\t\t\twhile (rs2.next()) {\r\n\t\t\t\t\tString unpublishedTitle = (String) rs2.getObject(\"title\");\r\n\t\t\t\t\tString unpublishedSummary = (String) rs2.getObject(\"summary\");\r\n\t\t\t\t\tint articeIde=rs2.getInt(\"articleID\");\r\n\t\t\t\t\tArticle article2 = new Article(articeIde, unpublishedTitle, unpublishedSummary);\r\n\t\t\t\t\tunpubArticle.add(article2);\r\n\t\t\t\t}\r\n\t\t\t\tSystem.out.println(unpubArticle);\r\n\t\t\t\trs2.close();\r\n\t\t\t\tst2.close();\r\n\t\t\t}\r\n\t\t\tst.close();\r\n\t\t} catch (ClassNotFoundException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}finally{\r\n\t\t\tif (conn!=null){\r\n\t\t\t\tconn.close();\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn unpubArticle;\r\n\t}", "@Override\n\tpublic PageBean<AnimalHelp> findAnimal(Integer page, AnimalFindHelp AnimalFindHelp) {\n\t\tPageBean<AnimalHelp> pageBean = new PageBean<AnimalHelp>();\n\t\t\n\t\tSystem.out.println(\"pageBean : \" + pageBean + \";\" + page);\n\t\tpageBean.setPage(page);\n\t\tpageBean.setLimit(com.bs.constant.Constant.PAGE_LIMIT);\n\t\t//int totalCount = animalDao.findCountFeed();\n\t\tint totalCount = 0;\n\t\ttotalCount = animaldao.findCountByInformation(AnimalFindHelp);\n\t\tSystem.out.println(\"totalCount = \" + totalCount);\n\t\tpageBean.setTotalCount(totalCount);\n\t\tint totalPage = (int)Math.ceil((double)totalCount/(double)Constant.PAGE_LIMIT);\n\t\tSystem.out.println(\"totalPage = \" + totalPage);\n\t\tpageBean.setTotalPage(totalPage);\n\t\tint start = pageBean.getLimit()*(pageBean.getPage() - 1) + 1;\n\t\tSystem.out.println(\"start = \" + start);\n\t\tList<?> primarylist = animaldao.findAllFeedByPage(start,AnimalFindHelp);\n\t\tSystem.out.println(\"primarylist == null : \" + primarylist == null);\n\t\tif (primarylist != null && primarylist.size() > 0) {\n\t\t\tSystem.out.println(\"查到的list的长度\" + primarylist.size());\n\t\t\tSystem.out.println(primarylist.get(0));\n\t\t\tAnimal findAnimal = new Animal();\n\t\t\tAnimalInformation findAnimalInformation = new AnimalInformation();\n\t\t\t\n\t\t\tList<AnimalHelp> animalFindHelps = new ArrayList<AnimalHelp>();\n\t\t\tSystem.out.println(\"animalFindHelps 长度 =\" + animalFindHelps.size());\n\t\t\tfor (int i = 0; i < primarylist.size(); i++) {\n\t\t\t\tAnimalHelp animalHelp = new AnimalHelp();\n\t\t\t\tAnimalFindHelp feedlisAnimalFindHelp = new AnimalFindHelp();\n\t\t\t\tSystem.out.println(\"i = \" + i);\n\t\t\t\tObject[] object = (Object[]) primarylist.get(i);\n\t\t\t\tSystem.out.println(\"获取到object,长度为:\" + object.length);\n\t\t\t\tfindAnimal = (Animal) object[0];\n\t\t\t\tSystem.out.println(\"成功获取到findAnimal对象:\" + findAnimal.getAnimalId() );\n\t\t\t\tfindAnimalInformation = (AnimalInformation) object[1];\n\t\t\t\tSystem.out.println(\"成功获取到findAnimalInformation对象:\" + findAnimalInformation.getAnimal().getAnimalId());\n\t\t\t\tanimalHelp.setAnimal(findAnimal);\n\t\t\t\tSystem.out.println(\"animalHelp中成功添加了findAnimal对象:\" + animalHelp.getAnimal().getAnimalId());\n\t\t\t\tanimalHelp.setAnimalInformation(findAnimalInformation);\n\t\t\t\tSystem.out.println(\"animalHelp中成功添加了findAnimalInformation对象:\" + animalHelp.getAnimalInformation().getNumber());\n\t\t\t\tanimalFindHelps.add(animalHelp);\n\t\t\t\tSystem.out.println(\"animalFindHelps成功添加了feedlistAnimalFindHelp对象:\"+animalFindHelps.size());\n\t\t\t\tSystem.out.println(\"animalFindHelps:\"\n\t\t\t\t\t\t+ animalFindHelps.get(i)\n\t\t\t\t\t\t);\n\t\t\t}\n\t\t\tpageBean.setList(animalFindHelps);\n\t\t\treturn pageBean;\n\t\t}\nelse {\n\treturn null;\n}\n}", "private void getNewsList() {\n // While the app fetched data we are displaying a progress dialog\n\n if (isOnline(mContext)) {\n showProgressDialog();\n\n ApiInterface apiService = ApiRequest.getClient().create(ApiInterface.class);\n\n Call<News> call = apiService.loadNewsList();\n call.enqueue(new Callback<News>() {\n @Override\n public void onResponse(Call<News> call, retrofit2.Response<News> response) {\n dismissProgressDialog();\n\n news.setTitle(response.body().getTitle());\n\n newsList.addAll(response.body().getRows());\n showList();\n ActionBar actionBar = getActionBar();\n actionBar.setDisplayHomeAsUpEnabled(true);\n actionBar.setDisplayShowHomeEnabled(false);\n actionBar.setDisplayShowTitleEnabled(true);\n actionBar.setTitle(news.getTitle());\n actionBar.setDisplayUseLogoEnabled(false);\n }\n\n @Override\n public void onFailure(Call<News> call, Throwable t) {\n dismissProgressDialog();\n displayMessage(t.getMessage());\n setTextMessage();\n\n }\n });\n } else {\n\n displayMessage(getString(R.string.no_network));\n setTextMessage();\n }\n\n }", "public interface InfoRepository extends JpaRepository<Info, String> {\n Info findTop1ByUserIdOrderByIdDesc(Long userId);\n List<Info> findTop5ByUserIdOrderByIdDesc(Long usedId);\n}", "public List<Element> monitorMainPage(){\n\t\tSystem.out.println(\"monitor main Page\");\n\t\tDocument document;\n\t\tList<Element> results = new ArrayList<Element>();\n\t\t// se connecte au site\n\t\tdocument = connectToPage(\"https://www.supremenewyork.com/shop/all\");\n\t\t// liste tous les éléments de la classe inner-article (i.e. tout ce qu'il y a sur la page\n\t\tElements elements = document.getElementsByClass(\"inner-article\");\n\t\tList<Element> articlesGeneral = new ArrayList<Element>();\n\t\tfor (Element element : elements) {\n\t\t\t// extrait chaque link a des articles \n\t\t\tElement link = element.select(\"a\").first();\n\t\t\tarticlesGeneral.add(link);\n\t\t}\n\t\tresults = articlesGeneral;\t\t\n\n\t\treturn results;\n\n\t}", "public List<PosPay> listPosPay(PosPay posPay,int firstResult ,int maxResults)throws DataAccessException;", "public MainList getDetailForcast(String date) {\n\t\t\t\n\t\t\tMainList mainLists = new MainList();\n\t\t\tList<Forcast> forcasts = new ArrayList<>();\n\t\t\tList<Forcast> forcastLists = this.mainList.getListItem();\n\t\t\t\n\t\t\tSystem.out.println(\"date>> \"+date);\n\t\t\t\n\t\t\tforcasts = forcastLists.stream().filter(p -> (formatData(p.getDt_txt())).equals(formatData(date))).collect(Collectors.toList());\n\t\t\t\n\t\t\tmainLists.setListItem(forcasts);\n\t\t\tmainLists.setCity(this.mainList.getCity());\n\t\t\t\n\t\t\treturn mainLists;\n\t\t}", "private void fetchTopHeadlines() {\n ApiNewsMethods newsTopHeadlines = retrofit.create(ApiNewsMethods.class);\n newsTopHeadlines.getTopHeadlines(\"in\"/*country through voice command*/, newsApiKey).enqueue(new Callback<NewsModelClass>() {\n @Override\n public void onResponse(Call<NewsModelClass> call, Response<NewsModelClass> response) {\n if(response.isSuccessful()) {\n newsModelBody = response.body();\n //change UI\n newsUIChanges();\n //Prepare speech\n StringBuilder newsText = new StringBuilder();\n String[] numbers = {\"First\",\"Second\",\"Third\",\"Fourth\",\"Fifth\",\"Sixth\",\"Seventh\",\"Eighth\",\"Ninth\",\"Tenth\",};\n int i = 0,j=newsModelBody.getArticles().size()>10?10:newsModelBody.getArticles().size();\n newsText.append(\"Headlines fetched successfully\\n\\n\\n\");\n while(i<j){\n newsText.append(numbers[i]+\"\\n\"+newsModelBody.getArticles().get(i).getTitle()+\"\\n\\n\\n\");\n i++;\n }\n newsText.append(\"Swipe Right to go back\\n\\n\\n\");\n constants.speak(newsText.toString(),mTextToSpeechHelper);\n } else {\n Log.d(\"mySTRING\", \"DID NOT OCCUR\");\n }\n }\n\n @Override\n public void onFailure(Call<NewsModelClass> call, Throwable t) {\n }\n });\n }", "public String top10Filmes() {\r\n\t\tString top10 = \"Nenhum ingresso vendido ate o momento\";\r\n\t\tint contador = 0;\r\n\t\tif (listaIngresso.isEmpty() == false) {\r\n\t\tfor (int i = 0; i < listaIngresso.size(); i++) {\r\n\t\tcontador = 0;\r\n\t\tfor(int j = 0; j < listaIngresso.size() - 1; j++){\r\n\t\tif(listaIngresso.get(i).getSessao().getFilme() == listaIngresso.get(j).getSessao().getFilme()){\r\n\t\tcontador++;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\r\n\t\t\t\r\n\t\t}\r\n\t\treturn top10;\r\n\t}", "@Override\n\tpublic List<BoardVO> getArticle() {\n\t\tString sql = \"SELECT * FROM board ORDER BY board_id ASC\";\n\t\t\n\t\treturn template.query(sql, new BoardMapper());\n\t}", "private static List<Article> createArticleList() {\n List<Article> articles = new ArrayList();\n articles.add(new Article(1l, \"Ball\", new Double(5.5), Type.TOY));\n articles.add(new Article(2l, \"Hammer\", new Double(250.0), Type.TOOL));\n articles.add(new Article(3l, \"Doll\", new Double(12.75), Type.TOY));\n return articles;\n }", "public List<Post> getAllPublic() throws SQLException {\r\n\tString sql = \"SELECT * FROM posts WHERE isPublic = 1 ORDER BY date DESC LIMIT ?\";\r\n\tPreparedStatement st = db.prepareStatement(sql);\r\n\tst.setQueryTimeout(TIMEOUT);\r\n\tst.setInt(1, LIMIT);\r\n\t\r\n\tResultSet results = st.executeQuery();\r\n\tList<Post> parsed = parseResults(results);\r\n\treturn parsed;\r\n }", "public List<DIS001> findAll_DIS001();", "public void getPostWithMostComments(){\n Map<Integer, Integer> postCommentCount = new HashMap<>();\n Map<Integer, Post> posts = DataStore.getInstance().getPosts();\n \n for(Post p: posts.values()){\n for(Comment c : p.getComments()){\n int commentCount = 0;\n if(postCommentCount.containsKey(p.getPostId())){\n commentCount = postCommentCount.get(p.getPostId());\n \n }\n commentCount += 1;\n postCommentCount.put(p.getPostId(), commentCount);\n \n }\n }\n int max = 0;\n int maxId = 0;\n for (int id : postCommentCount.keySet()) {\n if (postCommentCount.get(id) > max) {\n max = postCommentCount.get(id);\n maxId = id;\n }\n }\n System.out.println(\"\\nPost with most Comments \");\n System.out.println(posts.get(maxId));\n \n }", "public Proveedor findTopByOrderByIdDesc();", "public ArrayList<String[]> getArticlesByCategory(Integer category, Integer topN) {\n ArrayList<String[]> articles = new ArrayList<String[]>();\n try {\n\n // find all child categories (at all levels) of specified category\n ArrayList<Integer> categories = new ArrayList<Integer>();\n categories.add(category);\n for (int i = 0; i < categories.size(); i++) {\n String query = \"SELECT [CatID]\\n\"\n + \"FROM [capstone].[dbo].[tblCategoryID]\\n\"\n + \"WHERE [ParentID] = \" + categories.get(i) + \";\";\n Statement statement = connection.createStatement();\n ResultSet rs = statement.executeQuery(query);\n while (rs.next()) {\n categories.add(rs.getInt(1));\n }\n }\n String categoriesString = String.valueOf(categories.get(0));\n for (int i = 1; i < categories.size(); i++) {\n categoriesString += \", \" + String.valueOf(categories.get(i));\n }\n\n // return category's name first\n String query = \"SELECT [Category]\\n\"\n + \"FROM [capstone].[dbo].[tblCategoryID]\\n\"\n + \"WHERE [CatID] = \" + category + \";\";\n Statement statement = connection.createStatement();\n ResultSet rs = statement.executeQuery(query);\n if (rs.next()) {\n String[] firstRow = {\n rs.getString(1)\n };\n articles.add(firstRow);\n\n // get articles in category and child categories\n query = \"SELECT DISTINCT b.[ePrintID], b.[Title], b.[Abstract]\\n\"\n + \"FROM [capstone].[dbo].[tblSplitSubject] a\\n\"\n + \"INNER JOIN [capstone].[dbo].[tblArticleInfo] b\\n\"\n + \"ON a.[ePrintID] = b.[ePrintID]\\n\"\n + \"WHERE a.[CatID] IN (\" + categoriesString + \")\\n\"\n + \"ORDER BY [ePrintID]\\n\"\n + \"OFFSET 0 ROWS\\n\"\n + \"FETCH NEXT \" + topN + \" ROWS ONLY;\";\n statement = connection.createStatement();\n rs = statement.executeQuery(query);\n while (rs.next()) {\n String[] row = {\n String.valueOf(rs.getInt(1)),\n new String(rs.getString(2).getBytes()),\n new String(rs.getString(3).getBytes())\n };\n articles.add(row);\n }\n }\n } catch (SQLException e) {\n System.out.print(e.getMessage());\n } catch (NullPointerException e) {\n System.out.print(e.getMessage());\n }\n return articles;\n }", "@Override\r\n\tpublic List<DrankB> findCommodityByTop() {\n\t\treturn pageMapper.findCommodityByTop();\r\n\t}", "public void getNewsFromIDataAPIByPageToken2(String pageToken,String catId) {\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\tString url = \"http://api01.bitspaceman.com:8000/news/toutiao?apikey=np5SpQ7QGzm7HgvX8Aw8APA5NDq6Bpj5m4eo4hX5qJFLm0G0Oqt31xJzjIEeJFTv&catid=\"+catId+\"&pageToken=\"+pageToken;\r\n\t\t\t\t\tString json = IDataAPI.getRequestFromUrl(url);\r\n\t\t\t\t\tlog.info(json);\r\n\t\t\t\t\tGson gson=new Gson();\r\n\t\t\t\t\t\r\n\t\t\t\t\tToutiaoResponseDto toutiaoResponseDto=gson.fromJson(json, ToutiaoResponseDto.class);\r\n\t\t\t\t\tList<NewsInfo> newsInfoArray=new ArrayList<NewsInfo>();\r\n\t\t\t\t\tfor(ToutiaoDataResponseDto toutiao :toutiaoResponseDto.getData()) {\r\n\t\t\t\t\t\tnewsInfoArray.add(new NewsInfo(toutiao,catId));\r\n\t\t\t\t\t}\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\tList<NewsInfo> iter=(List<NewsInfo>) newsInfoRepository.saveAll(newsInfoArray);\r\n\t\t\t\t\t}catch(Exception e) {\r\n\t\t\t\t\t\tlog.info(e.getMessage());\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(\"true\".equals(toutiaoResponseDto.getHasNext())) {\r\n\t\t\t\t\t\tgetNewsFromIDataAPIByPageToken(toutiaoResponseDto.getPageToken(),catId);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t}", "List<Invoice> getByDebtorIdOrderByDateDesc(int debtorId, Pageable page);", "public synchronized List<Post> getGroupPostsWithMoreInfo(int count, int start) {\n try {\n this.connect();\n Group.GroupPosts groupPosts = linkedin.restOperations().getForObject(\n \"http://api.linkedin.com/v1/groups/{group-id}/posts\" +\n \":(creation-timestamp,title,summary,id,\" +\n \"creator:(first-name,last-name))?\" +\n \"count=\" + count +\n \"&start=\" + start +\n \"&order=recency\",\n Group.GroupPosts.class, groupId);\n return groupPosts.getPosts();\n } catch (Exception e) {\n log.debug(\"Exception occured when reading posts from group: \" + groupId);\n }\n return null;\n }", "public List<Song> topTen() {\n\t\treturn lookifyRepository.findTop10ByOrderByRatingDesc();\n\t}", "public List<Orderdetail> findOrderdetailListByRest(int currentPage, int pageSize, int restid) {\n\t\tString sql = \"select `user`.username,greens.greensname,t.count,t.orderstatus,ordersummary.ordertime from ordersummary JOIN\"\n\t\t\t\t+\" (select orderdetail.greensid,orderdetail.orderid,orderdetail.count,orderdetail.orderstatus\" \n\t\t\t\t+\" from orderdetail\" \n\t\t\t\t+\" where orderdetail.greensid in\"\n\t\t\t\t+\" (select greensid from greens where restid = ?)) as t\" \n\t\t\t\t+\" on ordersummary.orderid = t.orderid\" \n\t\t\t\t+\" JOIN user on ordersummary.userid=`user`.userid\"\n\t\t\t\t+\" JOIN greens on t.greensid = greens.greensid limit ?,?\";\n\t\t\n\t\tResultSet rs = dbManager.execQuery(sql, restid, (currentPage - 1) * pageSize, pageSize);\n\n\t\tList<Orderdetail> list = new ArrayList<Orderdetail>();\n\n\t\ttry {\n\t\t\twhile (rs.next()) {\n\t\t\t\tOrderdetail orderdetail = new Orderdetail();\n\t\t\t\tOrdersummary ordersummary = new Ordersummary();\n\t\t\t\tGreens greens = new Greens();\n\t\t\t\tUser user = new User();\n\t\t\t\t\n\t\t\t\tuser.setUsername(rs.getString(1));\n\t\t\t\tordersummary.setUser(user);\n\t\t\t\t\n\t\t\t\tgreens.setGreensname(rs.getString(2));\n\t\t\t\torderdetail.setGreens(greens);\n\t\t\t\t\n\t\t\t\torderdetail.setCount(rs.getInt(3));\n\t\t\t\torderdetail.setOrderstatus(rs.getInt(4));\n\t\t\t\t\n\t\t\t\tordersummary.setOrdertime(rs.getTimestamp(5));\n\t\t\t\torderdetail.setOrdersummary(ordersummary);\n\t\t\t\t\n\t\t\t\tlist.add(orderdetail);\n\t\t\t}\n\t\t\treturn list;\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\tdbManager.closeConnection();\n\t\t}\n\n\t\treturn null;\n\t}", "@Override\r\n\tpublic void getNewsList(Page page, String query) {\n\t\t\r\n\t}", "List<News> selectByExample(NewsExample example);", "@CrossOrigin()\r\n @GetMapping(\"/products/discover\")\r\n Stream<ProductEntity> getDiscoveryProducts() {\n return productRepository\r\n .findAll(PageRequest.of(0, 3, Sort.by(\"numberOfPurchases\").descending()))\r\n .get();\r\n }", "LiveData<List<MainEntity>> getAllNews() {\n\t\treturn mainListLiveData;\n\t}", "public Card getTopCard(){\n\t\treturn getCard(4);\n\t\t\n\t}", "public interface ArticleDao extends JpaRepository<Article,Integer> {\n int countByTitleAndUrl(String title,String url);\n\n Page<Article> findByTitleContainingAndChannelContainingOrderByPublishTimeDesc(String title,String channel, Pageable pageable);\n}", "List<NovedadAdapter> getAll();", "@Override\n public List<Produto> filtrarProdutos() {\n\n Query query = em.createQuery(\"SELECT p FROM Produto p ORDER BY p.id DESC\");\n\n// query.setFirstResult(pageRequest.getPageNumber() * pageRequest.getPageSize());\n// query.setMaxResults(pageRequest.getPageSize());\n return query.getResultList();\n }", "public List<Document> findByDateDescending(int limit) {\n\n // XXX HW 3.2, Work Here\n // Return a list of DBObjects, each one a post from the posts collection\n\n // Want to get ALL the documents, so don't really need a filter. Add a sort to get the posts in order\n List<Document> posts = new LinkedList<Document>();;\n Document theSort=new Document(\"date\",-1);\n// Document theFltr=new Document(\"author\",\"bob\");\n\n // Empty filter and sort to get the first relevant post (and we can then step through the list using iterator)\n MongoCursor<Document> cursor=postsCollection.find().sort(theSort).limit(limit).iterator();\n\n // Step through and to our list (makes little odds if it's array or linked list)\n while(cursor.hasNext()) {\n posts.add(cursor.next());\n }\n\n // pass list back\n return posts;\n }", "@RequestMapping(\"/top-posts\")\n public List<PostEntity> topPostsByUser(Principal principal) {\n List<PostEntity> fullList = postService.topPostsByUser(principal.getName());\n List<PostEntity> top15List = new ArrayList<>();\n int counterMax;\n\n if (fullList.size() < 15) {\n counterMax = fullList.size();\n } else {\n counterMax = 14;\n }\n\n for (int i = 0; i < counterMax; i++) {\n top15List.add(fullList.get(i));\n }\n\n return top15List;\n }", "private void getFirsTopRatedMovies() {\n\t\ttry {\n\t\t\tMovieApiClient movieApiClient = MovieDbApi.getRetrofitClient().create(MovieApiClient.class);\n\t\t\tCall<TopRatedMovies> call = movieApiClient.getTopRatedMovies(getString(R.string.api_key), \"en_US\", currentPage);\n\t\t\tcall.enqueue(new Callback<TopRatedMovies>() {\n\t\t\t\t@Override\n\t\t\t\tpublic void onResponse(Call<TopRatedMovies> call, Response<TopRatedMovies> response) {\n\t\t\t\t\tif (response.isSuccessful()) {\n\t\t\t\t\t\tTopRatedMovies topRatedMovies = response.body();\n\t\t\t\t\t\tList<TopRatedMovieResults> topRatedMovieResults = topRatedMovies.getResults();\n\t\t\t\t\t\tprogress.setVisibility(View.GONE);\n\t\t\t\t\t\tadapter.addAll(topRatedMovieResults);\n\n\t\t\t\t\t\tif (currentPage <= TotalPages)\n\t\t\t\t\t\t\tadapter.addLoadingFooter();\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tisLastPage = true;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tprogress.setVisibility(View.GONE);\n\t\t\t\t\t\tlayout_nothing_to_show.setVisibility(View.VISIBLE);\n\t\t\t\t\t\tToast.makeText(getApplicationContext(), getString(R.string.error), Toast.LENGTH_SHORT).show();\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t@Override\n\t\t\t\tpublic void onFailure(Call<TopRatedMovies> call, Throwable t) {\n\t\t\t\t\tif (t instanceof SocketTimeoutException || t instanceof IOException) {\n\t\t\t\t\t\tToast.makeText(getApplicationContext(), getString(R.string.no_netowrk), Toast.LENGTH_SHORT).show();\n\t\t\t\t\t\tLog.e(\"ERROR\", getString(R.string.no_netowrk), t);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tLog.e(\"ERROR\", getString(R.string.error), t);\n\t\t\t\t\t\tToast.makeText(getApplicationContext(), getString(R.string.error), Toast.LENGTH_SHORT).show();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public List getJpmProductSaleNews(JpmProductSaleNew jpmProductSaleNew);", "public void listArticles() {\n\t\tSystem.out.println(\"\\nArticles llegits desde la base de dades\");\n\n\t\tObjectSet<Article> articles = db.query(Article.class);\n\t\tarticles.stream()\n\t\t\t.forEach(System.out::println);\n\t}", "public void loadStoriesUrl(int lastN) {\r\n\t\tfin.clear();\r\n\t\tList<Reel> reels = new ArrayList<>();\r\n new FeedReelsTrayRequest().execute(client)\r\n \t.thenAccept(response -> {\r\n \t\treels.addAll(response.getTray()); \r\n }).join();\r\n String s = \"\";\r\n\t\t\r\n for(int y=0;y<lastN;y++) {\r\n \tReel reel = reels.get(y);\r\n \t\tfor(int j = 0; j<reel.getMedia_count(); j++) { \r\n \t\t\ts = reel.getMedia_ids()[j]+\"_\"+reel.getUser().getPk(); \t\t\r\n new MediaInfoRequest(s).execute(client)\r\n .thenAccept(r -> {\r\n \t//check if video or img\r\n \tswitch(textBetweenWords(r.toString(), \"media_type=\", \", code\")) {\r\n \t\t//image\r\n \t\tcase \"1\":\r\n \t\t\tfin.add(new Story(textBetweenWords(r.toString().substring(1000), \"candidates=[ImageVersionsMeta(url=\", \", width=\"), 1, reel.getUser()));\r\n \t\t\tbreak; \t\t\r\n \t\t//video\r\n \t\tcase \"2\":\r\n \t\t\tfin.add(new Story(textBetweenWords(r.toString(), \"type=101, url=\", \"), VideoVersionsMeta(height=\"), 2, reel.getUser()));\r\n \t\t\tbreak;\r\n \t} \t\r\n }).join();\r\n \t\t}\t\r\n }\r\n \t\r\n \t \r\n\t}", "public List<Article> findAll();", "@SuppressWarnings(\"unchecked\")\n\tpublic List<Post> getPostsOf(int postId){\n \t\tList<Post> postList = null;\n\t\tCriteria query = null;\n\t\ttry {\n\t\t\t\n\t\t\t query = getCurrentSession().createCriteria(Post.class);\n\t\t\t \n\t\t\t query.createAlias(\"this.orgperson\", \"author\") \n\t\t\t .createAlias(\"author.personid\",\"authorPerson\")\n\t\t\t \t .createAlias(\"this.postcategories\", \"postcategories\")\n\t\t\t \t .createAlias(\"postcategories.category\", \"category\")\n\t\t\t \t .createAlias(\"this.postskills\", \"postskills\")\n\t\t\t \t .createAlias(\"postskills.skill\", \"skill\")\n\t\t\t \t .createAlias(\"this.posttags\", \"posttags\")\n\t\t\t \t .createAlias(\"posttags.tag\", \"tag\");\n\t\t\t \n\t\t\t query.add(Restrictions.eq(\"this.status\", \"A\"))\n\t\t\t \t .add(Restrictions.eq(\"author.orgpersonstatus\", 'A'))\n\t\t\t \t .add(Restrictions.eq(\"authorPerson.personstatus\", 'A'))\n\t\t\t \t .add(Restrictions.eq(\"postcategories.status\", \"A\"))\n\t\t\t \t .add(Restrictions.eq(\"category.status\", \"A\"))\n\t\t\t \t .add(Restrictions.eq(\"postskills.status\", \"A\"))\n\t\t\t \t .add(Restrictions.eq(\"skill.status\", \"A\"))\n\t\t\t \t .add(Restrictions.eq(\"posttags.status\", \"A\"))\n\t\t\t \t .add(Restrictions.eq(\"tag.status\", \"A\")) \n\t\t\t \t .add(Restrictions.eq(\"this.id\", postId));\n\t\t\t \n\t\t\t query.setProjection(Projections.projectionList()\n\t\t\t\t\t \n\t\t\t\t\t //post\n\t\t\t\t\t .add(Projections.property(\"this.id\").as(\"post_id\"))\n\t\t\t\t\t .add(Projections.property(\"this.title\").as(\"post_title\"))\n\t\t\t\t\t .add(Projections.property(\"this.content\").as(\"post_content\")) \n\t\t\t\t\t .add(Projections.property(\"this.bannerpath\").as(\"post_bannerpath\"))\n\t\t\t\t\t .add(Projections.property(\"this.commentable\").as(\"post_commentable\"))\n\t\t\t\t\t .add(Projections.property(\"this.date\").as(\"post_date\"))\n\t\t\t\t\t .add(Projections.property(\"this.media\").as(\"post_media\")) \n\t\t\t\t\t .add(Projections.property(\"this.status\").as(\"post_status\")) \n\t\t\t\t\t //authorperson\n\t\t\t\t\t .add(Projections.property(\"authorPerson.personid\").as(\"authorPersonPersonId\"))\n\t\t\t\t\t .add(Projections.property(\"authorPerson.firstName\").as(\"authorPersonFirstName\"))\n\t\t\t\t\t .add(Projections.property(\"authorPerson.lastName\").as(\"authorPersonLastName\"))\n\t\t\t\t\t .add(Projections.property(\"authorPerson.middleName\").as(\"authorPersonmiddleName\")) \n\t\t\t\t\t //category\n\t\t\t\t\t .add(Projections.property(\"category.id\").as(\"categoryId\")) \n\t\t\t\t\t .add(Projections.property(\"category.name\").as(\"categoryName\")) \n\t\t\t\t\t //skill\n\t\t\t\t\t .add(Projections.property(\"skill.id\").as(\"skillId\")) \n\t\t\t\t\t .add(Projections.property(\"skill.name\").as(\"skillName\")) \n\t\t\t\t\t//tag\n\t\t\t\t\t .add(Projections.property(\"tag.id\").as(\"tagId\")) \n\t\t\t\t\t .add(Projections.property(\"tag.name\").as(\"tagName\")) \n\t\t\t\t\t \n\t\t\t\t\t ); \n\t\t\t \n\t\t\t postList = query.setResultTransformer(Criteria.ALIAS_TO_ENTITY_MAP).list(); \n\t\t\t \t \t \n\t\t} catch (Exception e) {\n\t\t\tpostServiceLogger.error(\"error in PostService for getPostsOf()\",e);\n\t\t} \n\t\treturn postList;\n\t}", "@Override\n\tpublic List<News> getList() {\n\t\topenCurrentSession();\n\t\t@SuppressWarnings(\"unchecked\")\n\t\tList<News> list = (List<News>)getCurrentSession().createQuery(\"FROM News\").list();\n\t\tcloseCurrentSession();\n\t\treturn list;\n\t}", "@Override\n\tpublic List<NewsVO> getAll() {\n\t\tList<NewsVO> list = new ArrayList<NewsVO>();\n\t\tNewsVO newsVO = null;\n\n\t\tConnection con = null;\n\t\tPreparedStatement pstmt = null;\n\t\tResultSet rs = null;\n\n\t\ttry {\n\n\t\t\tClass.forName(driver);\n\t\t\tcon = DriverManager.getConnection(url, userid, passwd);\n\t\t\tpstmt = con.prepareStatement(GET_ALL_STMT);\n\t\t\trs = pstmt.executeQuery();\n\n\t\t\twhile (rs.next()) {\n\t\t\t\t// empVO 也稱為 Domain objects\n\t\t\t\tnewsVO = new NewsVO();\n\t\t\t\tnewsVO.setNews_id(rs.getString(\"news_id\"));\n\t\t\t\tnewsVO.setNews_content(rs.getString(\"news_content\"));\n\t\t\t\tnewsVO.setNews_date(rs.getTimestamp(\"news_date\"));\n\t\t\t\tlist.add(newsVO); // Store the row in the list\n\t\t\t}\n\n\t\t\t// Handle any driver errors\n\t\t} catch (ClassNotFoundException e) {\n\t\t\tthrow new RuntimeException(\"Couldn't load database driver. \"\n\t\t\t\t\t+ e.getMessage());\n\t\t\t// Handle any SQL errors\n\t\t} catch (SQLException se) {\n\t\t\tthrow new RuntimeException(\"A database error occured. \"\n\t\t\t\t\t+ se.getMessage());\n\t\t\t// Clean up JDBC resources\n\t\t} finally {\n\t\t\tif (rs != null) {\n\t\t\t\ttry {\n\t\t\t\t\trs.close();\n\t\t\t\t} catch (SQLException se) {\n\t\t\t\t\tse.printStackTrace(System.err);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (pstmt != null) {\n\t\t\t\ttry {\n\t\t\t\t\tpstmt.close();\n\t\t\t\t} catch (SQLException se) {\n\t\t\t\t\tse.printStackTrace(System.err);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (con != null) {\n\t\t\t\ttry {\n\t\t\t\t\tcon.close();\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\te.printStackTrace(System.err);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn list;\n\t}", "public TipoRetencion findTopByOrderByIdDesc();" ]
[ "0.66386276", "0.6403873", "0.6147981", "0.5731571", "0.5722923", "0.5674937", "0.5638402", "0.56222695", "0.55872685", "0.5545453", "0.5522578", "0.5521411", "0.5513936", "0.5484382", "0.5464482", "0.5429761", "0.5423852", "0.537246", "0.53317064", "0.5331053", "0.5306271", "0.5294742", "0.52914464", "0.5267989", "0.5243551", "0.5212731", "0.51822627", "0.515449", "0.5145404", "0.51452804", "0.5132675", "0.5119353", "0.51013947", "0.50905174", "0.50873005", "0.50871456", "0.5086208", "0.5072781", "0.5071299", "0.5066146", "0.50565124", "0.5042905", "0.5016259", "0.5005169", "0.5003665", "0.5003593", "0.50027585", "0.4990796", "0.49783006", "0.49765694", "0.4966717", "0.4965255", "0.49648857", "0.49609026", "0.49577588", "0.49552467", "0.495455", "0.4939288", "0.4933977", "0.49315315", "0.49242797", "0.49215993", "0.49207792", "0.49140662", "0.49112505", "0.49078727", "0.4907433", "0.49006677", "0.48871395", "0.48812053", "0.48694578", "0.4867528", "0.4863206", "0.48600695", "0.48571628", "0.4849629", "0.4848165", "0.48442984", "0.4843812", "0.48426247", "0.48327014", "0.4832177", "0.48294216", "0.4828882", "0.48286468", "0.4826891", "0.48195797", "0.48187816", "0.48108983", "0.48106274", "0.48082632", "0.48013818", "0.47856414", "0.4784631", "0.47807327", "0.4779234", "0.47752854", "0.47732037", "0.47701657", "0.4768593" ]
0.7282294
0
Check the exist id of Digital
@Override public boolean checkExistId(int id) throws Exception { Connection con = null; ResultSet rs = null; PreparedStatement ps = null; try { String query = "select id from digital where id like ?"; con = getConnection(); ps = con.prepareCall(query); ps.setString(1, "%" + id + "%"); rs = ps.executeQuery(); int count = 0; while (rs.next()) { count = rs.getInt(1); } return count != 0; } catch (Exception e) { throw e; } finally { // close ResultSet, PrepareStatement, Connection closeResultSet(rs); closePrepareStateMent(ps); closeConnection(con); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean hasID();", "boolean hasID();", "boolean hasID();", "boolean hasID();", "boolean hasID();", "boolean hasID();", "boolean hasID();", "boolean hasID();", "boolean hasID();", "public abstract boolean isNatureExist(long id);", "@Override\n\tpublic boolean existId(String id) {\n\t\treturn false;\n\t}", "boolean existeId(Long id);", "public boolean exists( Integer idConge ) ;", "boolean hasId();", "boolean hasId();", "boolean hasId();", "boolean hasId();", "boolean hasId();", "boolean hasId();", "boolean hasId();", "boolean hasId();", "boolean hasId();", "boolean hasId();", "boolean hasId();", "boolean hasId();", "boolean hasId();", "boolean hasId();", "boolean hasId();", "boolean hasId();", "boolean hasId();", "boolean hasId();", "boolean hasId();", "boolean hasId();", "boolean hasId();", "boolean hasId();", "boolean hasId();", "boolean hasId();", "boolean hasId();", "boolean hasId();", "boolean hasId();", "boolean hasId();", "boolean hasId();", "boolean isSetID();", "public boolean IsExistById(Department d) {\n\t\treturn false;\n\t}", "boolean hasAdId();", "@Override\n\tpublic boolean existe(Long id) {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean existe(Long id) {\n\t\treturn false;\n\t}", "boolean hasMoneyID();", "boolean hasMoneyID();", "boolean hasMoneyID();", "public boolean checkId(String id){\r\n\t\treturn motorCycleDao.checkId(id);\r\n\t}", "public boolean checkDating(int id);", "public boolean checkExistenceId(int id) {\n\t\tfor (int i=0; i<getDataLength(); i++) {\n\t\t\tif (this.dataList.get(i).getId()==id)\n\t\t\t\treturn true;\n\t\t}\n\t\t\n\t\treturn false;\n\t}", "public boolean isExist(Serializable id);", "boolean existePorId(Long id);", "@Override\r\n\tpublic boolean exists(String id) {\n\t\treturn false;\r\n\t}", "boolean hasTerminalId();", "boolean hasFromId();", "boolean hasStaticDataId();", "@Override\n\tpublic boolean existsById(UUID id) {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean existsById(Integer id) {\n\t\treturn false;\n\t}", "@Override\n public boolean exists(Long id) {\n return false;\n }", "@Override\n public boolean exists(Long id) {\n return false;\n }", "boolean hasDeviceId();", "boolean hasDeviceId();", "public static boolean isDigital(byte[] edid) {\n // Byte 20 is Video input params\n return 1 == (edid[20] & 0xff) >> 7;\n }", "public boolean doesDataExist(String repository,String id){\n boolean result = true;\n\n //Check if the repository is there\n HashMap<String,Data> repositoryData = storage.get(repository);\n\n if(repositoryData!=null){\n\n //Try to get the data with that id\n Data temp = repositoryData.get(id);\n\n if(temp==null){\n //Object doesn't exist\n result = false;\n }\n\n } else {\n //Repository doesn't exist\n result = false;\n }\n\n return result;\n }", "private boolean userIDExists( String idCedulaNit, Connection con ) \n {\n ClassConnection cc = new ClassConnection();\n \n //System.out.println( idCedulaNit );\n //System.out.print( idCedulaNit );\n Boolean presente = (Boolean) cc.execute( \"SELECT idcedulanit FROM usuario WHERE idcedulanit = \" + Long.parseLong( idCedulaNit ) , 2, con);\n \n return presente;\n }", "private void verificaIdade() {\r\n\t\thasErroIdade(idade.getText());\r\n\t\tisCanSave();\r\n\t}", "public boolean isExist(int conId) throws AppException;", "private boolean checkId() {\n int sum = 0;\n int id;\n\n try\n {\n id = Integer.parseInt(ID.getText().toString());\n }\n catch (Exception e)\n {\n return false;\n }\n\n if (id >= 1000000000)\n return false;\n\n for (int i = 1; id > 0; i = (i % 2) + 1) {\n int digit = (id % 10) * i;\n sum += digit / 10 + digit % 10;\n\n id=id/10;\n }\n\n if (sum % 10 != 0)\n return false;\n\n return true;\n }", "public boolean exists(String id);", "public boolean doesIDExist(String id)\n {\n return idReferences.containsKey(id);\n }", "boolean isSetId();", "Boolean findExistsCampania(GestionPrecioID id) ;", "public boolean hasId(long id)\r\n \t{ \r\n \t\tlogger.debug(\"calling hasId(\"+id+\") was called...\");\r\n \t\treturn(externalFileMgrDao.hasId(id));\r\n \t}", "public boolean isIdExist(int projectId) throws EmployeeManagementException;", "@Override\n\tpublic Boolean exists(Integer id) {\n\t\treturn null;\n\t}", "boolean isNilID();", "@Override\npublic boolean existsById(String id) {\n\treturn false;\n}", "@Test\r\n public void testGetExist() throws PAException {\r\n Ii studyDiseaseIi = IiConverter.convertToStudyDiseaseIi(TestSchema.studyDiseaseIds.get(0));\r\n StudyDiseaseDTO studyDiseaseDTO = bean.get(studyDiseaseIi);\r\n assertNotNull(\"studyDiseaseDTO not found\", studyDiseaseDTO);\r\n assertEquals(\"Wrong studyDiseaseDTO returned\", studyDiseaseIi, studyDiseaseDTO.getIdentifier());\r\n }", "@Override\n\tprotected boolean isExist(AbnormalDevice record) {\n\t\treturn false;\n\t}", "void checkNotFound(Integer id);", "private boolean estaId(int id){\n boolean estaId;\n Cursor c = getContentResolver().query(PostContract.getContentUri(),\n null,\n PostContract.Columnas._ID + \"=?\",\n new String[]{String.valueOf(id)},\n null);\n if(c.moveToFirst()){\n //String a = c.getString(c.getColumnIndex(PostContract.Columnas._ID));\n return estaId = true;\n }else {//Se puede insertar, ya que no hay un id que aparezca en la base de datos.\n estaId = false;\n }\n c.close();\n return estaId;\n }", "private int isDesigNameExist(String desigName) {\n\t\treturn adminServiceRef.isDesigNameExist(desigName);\r\n\t}", "boolean hasUUID();", "boolean exists(Integer id);", "boolean hasBidid();", "private boolean hasMapping(Identifier pid) throws DataAccessException {\n\n boolean mapped = false;\n int countReturned = 0;\n\n if (pid.getValue() == null) {\n throw new DataAccessException(new Exception(\"The given identifier was null\"));\n }\n\n // query the identifier table\n String sqlStatement = \"SELECT guid FROM \" + IDENTIFIER_TABLE + \"where guid = ?\";\n\n countReturned = this.jdbcTemplate\n .queryForInt(sqlStatement, new Object[] { pid.getValue() });\n\n if (countReturned > 0) {\n mapped = true;\n }\n\n return mapped;\n }", "boolean hasUnitId();", "public boolean IDUsed(int id){\n for (int i = 0 ; i< IDList.size();i++){\n if (IDList.get(i) == id){\n return true;\n }\n }\n return false;\n }", "public boolean existsById(Integer id) {\n\t\treturn false;\n\t}", "public Boolean existInvoice(int id_drain) throws NotFoundDBException, SQLException {\n String sql = \"SELECT COUNT(*) AS tot FROM invoice where id_drain=? AND active=1\";\r\n String[] pars = new String[1];\r\n pars[0] = \"\" + id_drain;\r\n ResultSet rs = this.db.PreparedStatement(sql, pars);\r\n int occ = 0;\r\n while (rs.next()) {\r\n occ = rs.getInt(\"tot\");\r\n }\r\n if (occ > 0) {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n }", "@Override\n\tpublic boolean exist(String id, String code) {\n\t\tStringBuilder qString = new StringBuilder(\"SELECT COUNT(id_required_nomenclature) FROM required_nomenclature \")\n\t\t\t\t\t.append(\"WHERE id_required_nomenclature=? and code=?\");\n\t\tLong nbRes = jdbcTemplate.queryForObject(qString.toString(), new Object[]{id,code}, Long.class);\n\t\treturn nbRes>0;\n\t}", "public abstract boolean isValidID(long ID);", "boolean hasRecognitionId();", "public boolean exists(String id) {\n\t\treturn false;\n\t}", "boolean hasUuid();", "boolean hasUuid();", "boolean hasResMineID();" ]
[ "0.69691193", "0.69691193", "0.69691193", "0.69691193", "0.69691193", "0.69691193", "0.69691193", "0.69691193", "0.69691193", "0.67264414", "0.67103475", "0.66014665", "0.65533864", "0.6544984", "0.6544984", "0.6544984", "0.6544984", "0.6544984", "0.6544984", "0.6544984", "0.6544984", "0.6544984", "0.6544984", "0.6544984", "0.6544984", "0.6544984", "0.6544984", "0.6544984", "0.6544984", "0.6544984", "0.6544984", "0.6544984", "0.6544984", "0.6544984", "0.6544984", "0.6544984", "0.6544984", "0.6544984", "0.6544984", "0.6544984", "0.6544984", "0.6544984", "0.6523137", "0.6420701", "0.6419741", "0.63654137", "0.63654137", "0.63549817", "0.63549817", "0.63549817", "0.63407654", "0.63392967", "0.6327733", "0.63053346", "0.6303651", "0.6262453", "0.61940455", "0.6182171", "0.6159132", "0.61563635", "0.6118522", "0.609966", "0.609966", "0.6098883", "0.6098883", "0.6097766", "0.6097447", "0.6095826", "0.60747343", "0.60745466", "0.607157", "0.6065594", "0.6060628", "0.60597885", "0.60477954", "0.60358876", "0.6017436", "0.60136956", "0.6012491", "0.6008409", "0.6005606", "0.6004678", "0.6001505", "0.59851664", "0.5979494", "0.59672755", "0.596124", "0.5951643", "0.5938248", "0.59349805", "0.5930754", "0.5919717", "0.5919509", "0.5917337", "0.59170014", "0.5889269", "0.58876455", "0.58741623", "0.58741623", "0.5847143" ]
0.72117585
0
Can be used to get a clone of the current position of the robot
public abstract Position getPosition();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected RobotCoordinates getRobotCoordinates() { return currentPos; }", "Position getNewPosition();", "Robot getRobot(Position pos);", "@Override\r\n\tpublic MotionStrategy Clone() {\n\t\tMotionStrategy move = new RandomAndInvisible(mLifetime);\r\n\t\treturn move;\r\n\t}", "@Override\r\n\tpublic Point clone() {\r\n\t\tPoint p = new RotatedPoint(this.geoObjectLabel, this.originalPoint, this.centerOfRotation, this.degAngleMeasure);\r\n\t\t\r\n\t\tif (this.getX() != null)\r\n\t\t\tp.setX((UXVariable) this.getX().clone());\r\n\t\tif (this.getY() != null)\r\n\t\t\tp.setY((UXVariable) this.getY().clone());\r\n\t\tp.setInstanceType(this.instanceType);\r\n\t\tp.setPointState(this.pointState);\r\n\t\tp.setConsProtocol(this.consProtocol);\r\n\t\tp.setIndex(this.index);\r\n\t\t\r\n\t\treturn p;\r\n\t}", "Point clone ();", "public Point getRobotLocation();", "public Position getRobotPadPosition();", "@Override\n public Position getPosition() {\n return new Position(this.x, this.y);\n }", "public Point getPosition(){\r\n return new Point(this.position);\r\n }", "@Override\n public MovePath clone() {\n final MovePath copy = new MovePath(getGame(), getEntity());\n copy.steps = new Vector<MoveStep>(steps);\n copy.careful = careful;\n return copy;\n }", "private Vector2 getNewBombPosition() {\n float xx=heroBody.getBody().getPosition().x*16, yy=heroBody.getBody().getPosition().y*16;\n if(heroBody.getCurrentState() == HeroBody.State.STAND_UP || heroBody.getCurrentState() == HeroBody.State.WALK_UP)\n yy+=16;\n else if(heroBody.getCurrentState() == HeroBody.State.STAND_DOWN || heroBody.getCurrentState() == HeroBody.State.WALK_DOWN)\n yy-=16;\n else if(heroBody.getCurrentState() == HeroBody.State.STAND_RIGHT || heroBody.getCurrentState() == HeroBody.State.WALK_RIGHT)\n xx+=16;\n else if(heroBody.getCurrentState() == HeroBody.State.STAND_LEFT || heroBody.getCurrentState() == HeroBody.State.WALK_LEFT)\n xx-=16;\n return new Vector2(xx,yy);\n }", "@Override\n public GeoPoint clone() {\n return new GeoPoint(this.latitude, this.longitude);\n }", "public Position getCurrentPosion() {\n Position position = new Position();\n position.x = getLeft() + getWidth() / 2;\n position.y = getTop() + getHeight() / 2;\n return position;\n }", "void copyPosition (DVector3 pos);", "Square getCurrentPosition();", "void setPosition(){\n Random random =new Random();\n position = new Position(random.nextInt(maxrows),random.nextInt(maxcols));\n\n }", "Position getOldPosition();", "public Object clone() {\n return new PointImpl( this );\n }", "public static byte[] getMirrorPosition() {\n return MIRROR_POSITION.clone();\n }", "@Override\n\t\t\tpublic Vector getPosition() {\n\t\t\t\treturn new Vector(-2709.487, -4281.02, 3861.564); //-4409.0, 2102.0, -4651.0);\n\t\t\t}", "@Override\r\n public Object clone() {\r\n\r\n Coordinate c = new Coordinate( this );\r\n return c;\r\n }", "public Vector3f copyLocation() {\r\n Vector3f result = location.clone();\r\n return result;\r\n }", "public MovableObject lightClone()\n\t\t{\n\t\t\tfinal MovableObject clone = new MovableObject();\n\t\t\tclone.assCount = this.assCount;\n\t\t\tclone.associatable = this.associatable;\n\t\t\tclone.bound = this.bound;\n\t\t\tclone.coords = new int[this.coords.length];\n\t\t\tfor(int i=0; i < this.coords.length; i++)\n\t\t\t\tclone.coords[i] = this.coords[i];\n\t\t\tclone.highlighted = this.highlighted;\n\t\t\tclone.hotSpotLabel = this.hotSpotLabel;\n\t\t\tclone.keyCode = this.keyCode;\n\t\t\tclone.label = this.label;\n\t\t\tclone.maxAssociations = this.maxAssociations;\n\t\t\tif(shape.equals(\"rect\"))\n\t\t\t{\n\t\t\t\tclone.obj = new Rectangle(coords[0]-3,coords[1]-3,coords[2]+6,coords[3]+6);\n\t\t\t}\n\t\t\tif(shape.equals(\"circle\"))\n\t\t\t{\n\t\t\t\tclone.obj = new Ellipse2D.Double((coords[0]-coords[2])-4,(coords[1]-coords[2])-4,(coords[2]+2)*2,(coords[2]+2)*2);\n\t\t\t}\n\t\t\tif(shape.equals(\"ellipse\"))\n\t\t\t{\n\t\t\t\tclone.obj = new Ellipse2D.Double((coords[0]-coords[2])-4,(coords[1]-coords[2])-4,(coords[2]+2)*2,(coords[3]+2)*2);\n\t\t\t}\n\t\t\tif(shape.equals(\"poly\"))\n\t\t\t{\n\t\t\t\tfinal int xArr[] = new int[coords.length/2];\n\t\t\t\tfinal int yArr[] = new int[coords.length/2];\n\t\t\t\tint xCount = 0;\n\t\t\t\tint yCount = 0;\n\t\t\t\tfor(int i=0; i < coords.length; i++)\n\t\t\t\t{\n\t\t\t\t\tif((i%2) == 0)\n\t\t\t\t\t{\n\t\t\t\t\t\txArr[xCount] = coords[i];\n\t\t\t\t\t\txCount++;\n\t\t\t\t\t}else\n\t\t\t\t\t{\n\t\t\t\t\t\tyArr[yCount] = coords[i];\n\t\t\t\t\t\tyCount++;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t//TODO calculate the centre of mass\n\n\t\t\t\tclone.obj = new Polygon(xArr,yArr,xArr.length);\n\t\t\t}\n\t\t\tclone.pos = new Point(this.pos.x,this.pos.y);\n\t\t\tclone.shape = this.shape;\n\t\t\tclone.startPos = this.startPos;\n\t\t\tclone.value = this.value;\n\n\t\t\treturn clone;\n\t\t}", "godot.wire.Wire.Vector3 getPosition();", "godot.wire.Wire.Vector2 getPosition();", "@Override\n\tprotected ArrayList<ModulePosition> buildRobot() {\n\t\tArrayList<ModulePosition> mPos = new ArrayList<ModulePosition>();\n\t\tmPos.add(new ModulePosition(\"custom 0\", new VectorDescription(0*ATRON.UNIT, -5*ATRON.UNIT, 0*ATRON.UNIT), new RotationDescription(0, 0, -eigth)));\n\t\tmPos.add(new ModulePosition(\"custom 1\", new VectorDescription(1*ATRON.UNIT, -5*ATRON.UNIT, 1*ATRON.UNIT), ATRON.ROTATION_EW));\n\t\tmPos.add(new ModulePosition(\"custom 2\", new VectorDescription(1*ATRON.UNIT, -5*ATRON.UNIT, -1*ATRON.UNIT), ATRON.ROTATION_EW));\n\t\tmPos.add(new ModulePosition(\"custom 3\", new VectorDescription(2*ATRON.UNIT, -5*ATRON.UNIT, 0*ATRON.UNIT), new RotationDescription(0, 0, -eigth)));\n\t\tmPos.add(new ModulePosition(\"custom 4\", new VectorDescription(3*ATRON.UNIT, -5*ATRON.UNIT, 1*ATRON.UNIT), ATRON.ROTATION_EW));\n\t\tmPos.add(new ModulePosition(\"custom 5\", new VectorDescription(3*ATRON.UNIT, -5*ATRON.UNIT, -1*ATRON.UNIT), ATRON.ROTATION_EW));\n\t\tmPos.add(new ModulePosition(\"custom 6\", new VectorDescription(4*ATRON.UNIT, -5*ATRON.UNIT, 0*ATRON.UNIT), new RotationDescription(0, 0, -eigth)));\n\t\treturn mPos;\t\n\n\t\t\n\t\t/*\n\t\tArrayList<ModulePosition> mPos = new ArrayList<ModulePosition>();\n\t\tdouble x0 = 1;\n\t\tdouble y0 = 0;\n\t\tdouble z0 = 0;\n\t\tdouble angle = Math.PI/2 + Math.PI;\n\t\tVector3f moduleOrientationVector = new Vector3f(0, 0, 1);\n\t\tDouble moduleOrientationAngle = 0d;\n\t\tQuaternion moduleOrientationQuaternion = new Quaternion( (float)(moduleOrientationVector.x*Math.sin((moduleOrientationAngle)/2)), (float)(moduleOrientationVector.y*Math.sin((moduleOrientationAngle)/2)), (float)(moduleOrientationVector.z*Math.sin((moduleOrientationAngle)/2)), (float)(Math.cos((moduleOrientationAngle)/2)));\n\t\t//System.out.println(moduleOrientation.x + \" \" + moduleOrientation.y + \" \" + moduleOrientation.z);\n\t\tQuaternion rotation = new Quaternion( (float)(x0*Math.sin((angle)/2)), (float)(y0*Math.sin((angle)/2)), (float)(z0*Math.sin((angle)/2)), (float)(Math.cos((angle)/2)));\n\t\t//Vector3f newModuleOrientation = rotation.mult(moduleOrientation);\n\t\t//System.out.println(newModuleOrientation.x + \" \" + newModuleOrientation.y + \" \" + newModuleOrientation.z);\n\t\t//mPos.add(new ModulePosition(\"custom 0\", new VectorDescription(0*ATRON.UNIT, 0*ATRON.UNIT, 0*ATRON.UNIT), new RotationDescription(rotation)));\n\t\tmPos.add(new ModulePosition(\"custom 0\", new VectorDescription(0*ATRON.UNIT, 0*ATRON.UNIT, 0*ATRON.UNIT), new RotationDescription(new Quaternion( (float)(0), (float)(0), (float)(0), (float)(1)))));\n\t\t//x0 = 1; y0 = 0; z0 = 0; angle = 0;\n\t\t//mPos.add(new ModulePosition(\"custom 1\", new VectorDescription(1*ATRON.UNIT, 1*ATRON.UNIT, 0*ATRON.UNIT), new RotationDescription(new Quaternion( (float)(x0*Math.sin(angle/2)), (float)(y0*Math.sin(angle/2)), (float)(z0*Math.sin(angle/2)), (float)(Math.cos(angle/2))))));\n\t\treturn mPos;\n*/\n\t}", "@Override\n public PosDeg getPosition() {\n return tracker.getPosition();\n }", "Object getPosition();", "public Point getPosition() {\n return new Point(position);\n }", "public Node clone() {\n Node n = new Node((float) this.getSimPos().getX(), (float) this.getSimPos().getY(), radius*2, isStationary, this.renderColor);\n n.node_uuid = this.node_uuid;\n return n;\n }", "public PVector getPosition() { return position; }", "public Position randposition()\r\n\t{\n\t\tRandom random = new Random();\r\n\t\tPosition position = new Position(random.nextInt(7680), random.nextInt(4320), random.nextDouble());\r\n\t\treturn position;\r\n\t}", "public Position copy() {\n return new Position(values.clone());\n }", "public Vector2fc getPosition(){\n return position.toImmutable();\n }", "public Position getCurrentPosition(){return this.currentPosition;}", "public Vector3D getCurrentPosition() throws ManipulatorException;", "@Override \n public Door clone()\n {\n try\n {\n Door copy = (Door)super.clone();\n \n //a copy of the location class\n copy.room = room.clone(); \n \n return copy;\n }\n catch(CloneNotSupportedException e)\n {\n throw new InternalError();\n }\n }", "public LinkedList<Location> cloneBody() {\n LinkedList<Location> clone = new LinkedList<>();\n for (Location loc : body) {\n clone.add(new Location(loc.locX, loc.locY, loc.direction));\n }\n return clone;\n }", "private static Position fetchRandomPosition(){\n return new Position(0,0).returnRandomPosition();\n }", "public MowerPosition getPosition() {\n return position;\n }", "public CurrentRobotState() {\r\n currentPos = new RobotCoordinates();\r\n motorState = new Motor();\r\n reInitialize();\r\n }", "public Location getOrigin() {\n/* 1094 */ Location origin = (getHandle()).origin;\n/* 1095 */ return (origin == null) ? null : origin.clone();\n/* */ }", "public double getNewXPosition() {\n return newPosX;\n }", "@Override\n public Point3D getLocation() {\n return myMovable.getLocation();\n }", "Object clone();", "Object clone();", "Position getPosition();", "Position getPosition();", "public Position2D getPosition()\n {\n return position;\n }", "public Coordinates copy() {\n\t\treturn new Coordinates(this);\n\t}", "private Position getTestPos1() {\r\n Grid grid = GridBuilder.builder()\r\n .withMaxX(10)\r\n .withMaxY(10)\r\n .withMinY(-20)\r\n .withMinY(-20)\r\n .build();\r\n Moveable moveable = MoveableBuilder.builder()\r\n .withGrid(grid)\r\n .withShape(PositionShapeBuilder.builder()\r\n .withPosition(Positions.of(Directions.S, 0, 0, 0))\r\n .build())\r\n .withVelocity(100)\r\n .build();\r\n moveable.moveForward();\r\n moveable.turnRight();\r\n moveable = MoveableBuilder.builder()\r\n .withGrid(grid)\r\n .withShape(PositionShapeBuilder.builder()\r\n .withPosition(moveable.getPosition())\r\n .build())\r\n .withVelocity(50)\r\n .build();\r\n moveable.moveForward();\r\n PositionImpl position = (PositionImpl) moveable.getPosition();\r\n moveable.makeTurn(position.calcAbsoluteAngle() - position.getDirection().getAngle());\r\n return moveable.getPosition();\r\n }", "@Override\n\tpublic PhyphoxBuffer clone() {\n\t\treturn new PhyphoxBuffer(this, 0);\n\t}", "@Override\n\tpublic Box clone()\n\t{\n\t\treturn new Box(center.clone(), xExtent, yExtent, zExtent);\n\t}", "@Override\n\tpublic GameUnit clone() throws CloneNotSupportedException {\n\t\t// this is a shallow copy, because of the Point3D properties and that is the only property of this class (GameUnit) a shallow copy is enough\n\t\tGameUnit unit = (GameUnit)super.clone();\n\t\t// reset the position property state before returning the cloned class\n\t\tunit.initialize();\n\t\treturn unit;\n\t}", "public Object clone();", "public Object clone();", "public Object clone();", "public Object clone();", "public Piece clone() {\n return new Pawn(new Point(this.location.x, this.location.y),\n this.color, this.numMoves, this.enPassantOk);\n }", "protected abstract VerifiableSensorOperation doClone();", "public void newCoord() {\n\t\tx = Data.generateRandomX();\n\t\ty = Data.generateRandomY();\n\t}", "public Position getPosition() {\r\n\t\treturn new Position(this.position.getX(), this.position.getY());\r\n\t}", "public Point.Double getPosition(){\r\n return new Point.Double(x, y);\r\n }", "@Override \n public Vector getLocation() {\n return this.getR();\n }", "@Override\n\tpublic Position getPosition() \n\t{\n\t\treturn currentPosition;\n\t}", "public Function clone();", "public int getOriginalPos() {\n return originalPos;\n }", "public Position position();", "public abstract GameObject clone();", "public void Duplicate()\n {\n\n tacc2 = tacc.clone();\n px2 = px.clone();\n py2 = py.clone();\n pz2 = pz.clone();\n\n tgyro2 = tgyro.clone();\n\n accx2 = accx.clone();\n accy2 = accy.clone();\n accz2 = accz.clone();\n\n lng2 = lng.clone();\n lat2 = lat.clone();\n }", "@Override\n public Position getPosition() {\n return position;\n }", "public TurtleState copy() {\n\t\treturn new TurtleState(position.copy(), direction.copy(), color, shift);\n\t}", "public Point getPosition(){\n\t\treturn position;\n\t}", "public PVector getPosition(){\n\t\treturn position;\n\t}", "@Override\n public MapPoint clone(){\n MapPoint pl = new MapPoint();\n pl.setId(this.pointId);\n pl.setX(this.pointX);\n pl.setY(this.pointY);\n pl.setTags(this.tags);\n return pl;\n }", "public static void new_position( Body body, double t ){\r\n body.lastState.copyStateVectors( body.currentState );\r\n body.currentState.x = body.currentState.x + body.currentState.vx * t; // new x\r\n body.currentState.y = body.currentState.y + body.currentState.vy * t; // new y\r\n body.currentState.z = body.currentState.z + body.currentState.vz * t; // new z\r\n }", "public Point[] getLocation()\n {\n return shipLocation.clone();\n }", "public Point[] clone(){\n\t\tPoint[] test = new Point[currentPiece.length];\n\t\tfor(int i = 0; i < currentPiece.length; i ++){\n\t\t\ttest[i] = new Point(currentPiece[i]);\n\t\t}\n\t\treturn test;\n\t}", "public DoubleSolenoid.Value getPosition() {\n return m_ballholder.get();\n }", "public void setRobotLocation(Point p);", "@Override\n\tpublic Point getLocation() {\n\t\treturn position;\n\t}", "public final Vector2D getPosition() {\n return position;\n }", "public Position getPosition();", "public Position getPosition();", "public Position getPosition();", "public void resetRobotPositionOnUI() {\r\n\t\tthis.x = checkValidX(1);\r\n\t\tthis.y = checkValidY(1);\r\n\t\ttoggleValid();\r\n\t\trobotImage.setLocation(Constant.MARGINLEFT + (Constant.GRIDWIDTH * 3 - Constant.ROBOTWIDTH)/2 + (x-1) * Constant.GRIDWIDTH, Constant.MARGINTOP + (Constant.GRIDHEIGHT * 3 - Constant.ROBOTHEIGHT)/2 + (y-1) * Constant.GRIDHEIGHT);\r\n\t\t\r\n\t}", "Vector getPos();", "public Point getLocation(){\n\t\tint x = widgetchild.getAbsoluteX();\n\t\tint y = widgetchild.getAbsoluteY();\n\t\tint rx = Random.nextInt(0, widgetchild.getWidth());\n\t\tint ry = Random.nextInt(0, widgetchild.getHeight());\n\t\treturn new Point(x+rx,y+ry);\n\t}", "public Site getSiteClone() {\n\t\tSite newSite = new Site(new Location(((Double) latitude.getValue())\n\t\t\t\t.doubleValue(), ((Double) longitude.getValue()).doubleValue()));\n\t\tIterator it = site.getParametersIterator();\n\n\t\t// clone the paramters\n\t\twhile (it.hasNext())\n\t\t\tnewSite.addParameter((Parameter) ((Parameter) it.next())\n\t\t\t\t\t.clone());\n\t\treturn site;\n\t}", "public Pos getPos()\r\n\t{\r\n\t\treturn position;\r\n\t}", "Point getPosition();", "Point getPosition();", "@Override\n public Vector3 clone()\n {\n return new Vector3(this);\n }", "public void go_to_base_position() {\n stop_hold_arm();\n Dispatcher.get_instance().add_job(new JMoveArm(RobotMap.Arm.pot_value_base, 0.9, 0.7, 0.7, 0.2, 0.8, false, false));\n // Extend the arm after getting to the base position\n Dispatcher.get_instance().add_job(new JRunnable(() -> Pneumatics.get_instance().set_solenoids(true), this));\n hold_arm();\n }", "public Object clone() {\n View v2;\n try {\n v2 = (View) super.clone();\n } catch (CloneNotSupportedException cnse) {\n v2 = new View();\n }\n v2.center = (Location) center.clone();\n v2.zoom = zoom;\n v2.size = (Dimension) size.clone();\n return v2;\n }", "public Coordinate getPosition();", "public Vector2 getPosition () {\n\t\tVec2 pos = body.getPosition();\n\t\tposition.set(pos.x, pos.y);\n\t\treturn position;\n\t}", "Position createPosition();", "public Vector2D getPosition() {\n\t\treturn position;\n\t}", "public Point2D getPosition()\n {\n return mPosition;\n }" ]
[ "0.72154164", "0.6890811", "0.6687968", "0.66807854", "0.6632441", "0.65777826", "0.64962053", "0.64833057", "0.6434292", "0.64123213", "0.6284639", "0.6226738", "0.6190268", "0.6170603", "0.61594695", "0.61448294", "0.6142297", "0.6133725", "0.61264974", "0.61250556", "0.61223096", "0.611905", "0.61097294", "0.61082214", "0.6080991", "0.6078109", "0.6076163", "0.6053556", "0.60515815", "0.6045942", "0.60436785", "0.60012484", "0.59984255", "0.5989226", "0.5988424", "0.5972814", "0.597096", "0.59577507", "0.594564", "0.5945047", "0.5934782", "0.59123296", "0.5899933", "0.58841133", "0.588252", "0.5878349", "0.5878349", "0.5875224", "0.5875224", "0.586473", "0.58644074", "0.58578163", "0.5851593", "0.58378005", "0.5832103", "0.58297735", "0.58297735", "0.58297735", "0.58297735", "0.58297294", "0.58272904", "0.58271486", "0.58207065", "0.58090484", "0.58037645", "0.5802327", "0.58013254", "0.58010787", "0.579976", "0.5793668", "0.5791002", "0.57861495", "0.57853323", "0.57834524", "0.5780349", "0.57771116", "0.57720125", "0.57718766", "0.5770107", "0.57672256", "0.5759347", "0.5756943", "0.57450813", "0.5742023", "0.5742023", "0.5742023", "0.5732236", "0.57279944", "0.5727675", "0.5727208", "0.57218313", "0.57141644", "0.57141644", "0.5710915", "0.5709652", "0.56986266", "0.5696631", "0.56948125", "0.5692976", "0.56906337", "0.5686132" ]
0.0
-1
returns the current Orientation relative to the original orientation.
public abstract double getOrientation();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getNewOrientation() {\n return newOrientation;\n }", "public float getOrientation() {\n return this.orientation + this.baseRotation;\n }", "public final Orientation getOrientation() {\n return orientation == null ? Orientation.HORIZONTAL : orientation.get();\n }", "public Orientation getOrientation() {\n return this.orientation;\n }", "public final Orientation getOrientation() {\n\n return this.getWrappedControl().getOrientation();\n }", "public IOrientation getOrientation();", "public Orientation getOrientation() {\n\t\treturn mOrientation;\n\t}", "public Orientation orientation() {\n return this.orientation;\n }", "public double getOrientation()\r\n\t{\r\n\t\treturn Math.atan2(-end.getY()+start.getY(), end.getX()-start.getX());\r\n\t}", "public int getOrientation()\n\t{\n\t\treturn orientation;\n\t}", "public final Vector2D getOrientation() {\n return orientation;\n }", "public int getOrientation()\n {\n return m_orientation;\n }", "public java.lang.Integer getOrientation () {\n\t\treturn orientation;\n\t}", "private int getOrientation() {\n return getContext().getResources().getConfiguration().orientation;\n }", "public int getParentLayoutOrientation()\n {\n return parentOrientation;\n }", "@Override // com.android.server.wm.WindowContainer\n public int getOrientation() {\n WindowManagerPolicy policy = this.mWmService.mPolicy;\n if (this.mIgnoreRotationForApps && !HwFoldScreenState.isFoldScreenDevice()) {\n return 2;\n }\n if (!this.mWmService.mDisplayFrozen) {\n int orientation = this.mAboveAppWindowsContainers.getOrientation();\n if (orientation != -2) {\n return orientation;\n }\n } else if (this.mLastWindowForcedOrientation != -1) {\n if (WindowManagerDebugConfig.DEBUG_ORIENTATION) {\n Slog.v(TAG, \"Display id=\" + this.mDisplayId + \" is frozen, return \" + this.mLastWindowForcedOrientation);\n }\n return this.mLastWindowForcedOrientation;\n } else if (policy.isKeyguardLocked()) {\n if (WindowManagerDebugConfig.DEBUG_ORIENTATION) {\n Slog.v(TAG, \"Display id=\" + this.mDisplayId + \" is frozen while keyguard locked, return \" + this.mLastOrientation);\n }\n return this.mLastOrientation;\n }\n return this.mTaskStackContainers.getOrientation();\n }", "public String orientation() {\n\t\tif (orientation == null)\n\t\t\tarea();\n\t\treturn orientation;\n\t}", "public int getOrientationOnly() {\n return (int) this.orientation;\n }", "public final ObjectProperty<Orientation> orientationProperty() {\n\n return this.getWrappedControl().orientationProperty();\n }", "public int getOrientation(){ return mOrientation; }", "public Orientation getOrientation(){return this.orientation;}", "public int getLastOrientation() {\n return this.mLastOrientation;\n }", "public int getOrientation() {\n\t\treturn m_nOrientation;\n\t}", "public String getOrientation() {\n\n if(getResources().getDisplayMetrics().widthPixels > \n getResources().getDisplayMetrics().heightPixels) { \n return \"LANDSCAPE\";\n } else {\n return \"PORTRAIT\";\n } \n \n }", "public ImageOrientation getOrientation()\n\t{\n\t\treturn ImageOrientation.None;\n\t}", "public final ObjectProperty<Orientation> orientationProperty() {\n return orientation;\n }", "public double currentAngle() {\n return imu.getAngularOrientation(AxesReference.INTRINSIC, AxesOrder.ZYX, AngleUnit.DEGREES).firstAngle;\r\n }", "@Override // com.android.server.wm.WindowContainer\n public int getOrientation() {\n WindowManagerPolicy policy = this.mWmService.mPolicy;\n WindowState win = getWindow(this.mGetOrientingWindow);\n if (win != null) {\n int req = win.mAttrs.screenOrientation;\n if (policy.isKeyguardHostWindow(win.mAttrs)) {\n DisplayContent.this.mLastKeyguardForcedOrientation = req;\n if (this.mWmService.mKeyguardGoingAway) {\n DisplayContent.this.mLastWindowForcedOrientation = -1;\n return -2;\n }\n }\n if (WindowManagerDebugConfig.DEBUG_ORIENTATION) {\n Slog.v(DisplayContent.TAG, win + \" forcing orientation to \" + req + \" for display id=\" + DisplayContent.this.mDisplayId);\n }\n return DisplayContent.this.mLastWindowForcedOrientation = req;\n }\n DisplayContent.this.mLastWindowForcedOrientation = -1;\n boolean isUnoccluding = DisplayContent.this.mAppTransition.getAppTransition() == 23 && DisplayContent.this.mUnknownAppVisibilityController.allResolved();\n if (policy.isKeyguardShowingAndNotOccluded() || isUnoccluding) {\n return DisplayContent.this.mLastKeyguardForcedOrientation;\n }\n return -2;\n }", "@Override\r\n public Orientation getOrientation() {\r\n return this.route.getOrientation();\r\n }", "@PersistField(contained = true)\n public Orientation getOrientation()\n {\n return orientation;\n }", "public String getOrientation(){\n\n if(robot.getRotation()%360 == 0){\n return \"NORTH\";\n } else if(robot.getRotation()%360 == 90\n ||robot.getRotation()%360 == -270){\n return \"EAST\";\n } else if(robot.getRotation()%360 == 180\n ||robot.getRotation()%360 == -180){\n return \"SOUTH\";\n } else if(robot.getRotation()%360 == 270\n ||robot.getRotation()%360 == -90){\n return \"WEST\";\n } else\n\n errorMessage(\"Id:10T error\");\n return null;\n }", "@Override // com.android.server.wm.WindowContainer\n public int getOrientation() {\n int orientation;\n if (DisplayContent.this.isStackVisible(3) || ((!HwFreeFormUtils.isFreeFormEnable() && DisplayContent.this.isStackVisible(5)) || (this.mDisplayContent != null && this.mWmService.mAtmService.mHwATMSEx.isSplitStackVisible(this.mDisplayContent.mAcitvityDisplay, -1)))) {\n TaskStack taskStack = this.mHomeStack;\n if (taskStack == null || !taskStack.isVisible() || !DisplayContent.this.mDividerControllerLocked.isMinimizedDock() || ((DisplayContent.this.mDividerControllerLocked.isHomeStackResizable() && this.mHomeStack.matchParentBounds()) || (orientation = this.mHomeStack.getOrientation()) == -2)) {\n return -1;\n }\n return orientation;\n }\n int orientation2 = super.getOrientation();\n if (this.mWmService.mContext.getPackageManager().hasSystemFeature(\"android.hardware.type.automotive\")) {\n if (WindowManagerDebugConfig.DEBUG_ORIENTATION) {\n Slog.v(DisplayContent.TAG, \"Forcing UNSPECIFIED orientation in car for display id=\" + DisplayContent.this.mDisplayId + \". Ignoring \" + orientation2);\n }\n return -1;\n } else if (orientation2 == -2 || orientation2 == 3) {\n if (WindowManagerDebugConfig.DEBUG_ORIENTATION) {\n Slog.v(DisplayContent.TAG, \"No app is requesting an orientation, return \" + DisplayContent.this.mLastOrientation + \" for display id=\" + DisplayContent.this.mDisplayId);\n }\n return DisplayContent.this.mLastOrientation;\n } else {\n if (WindowManagerDebugConfig.DEBUG_ORIENTATION) {\n Slog.v(DisplayContent.TAG, \"App is requesting an orientation, return \" + orientation2 + \" for display id=\" + DisplayContent.this.mDisplayId);\n }\n return orientation2;\n }\n }", "public char getOrientation() {\n return orientation;\n }", "@Override\r\n\tpublic int getOrientation(Robot robot)\r\n\t{\r\n\t\treturn robot.getOrientation().ordinal();\r\n\t}", "public String orientation()\n {\n int height = cat.getWidth();\n int width = cat.getHeight();\n\n if (height >= width)\n {\n return \"landscape\";\n }\n else \n {\n return \"portrait\";\n\n }\n }", "public double getAngle() {\n synchronized (this.angleLock) {\n return this.movementComposer.getOrientationAngle();\n }\n }", "private void normalizeOrientation() {\n\t\twhile (this.orientation >= 2 * Math.PI) {\n\t\t\torientation -= 2 * Math.PI;\n\t\t}\n\t\twhile (this.orientation < 0) {\n\t\t\torientation += 2 * Math.PI;\n\t\t}\n\t}", "@Generated\n @Selector(\"orientation\")\n @NInt\n public native long orientation();", "public float getBaseRotation() {\n return this.baseRotation;\n }", "@Override\n\tpublic float getOrientation() {\n\t\treturn body.getAngle();\n\t}", "public Quaternion getCurrentRotation() {\n long currentTimeMillis = System.currentTimeMillis();\n\n if (currentTimeMillis > finishTimeMillis) {\n return finishRotation;\n } else {\n float percent = ((float)(currentTimeMillis-startTimeMillis)) / ((float)(finishTimeMillis-startTimeMillis));\n Quaternion interpolatedRotation = new Quaternion();\n \n // Not sure if slerp is right, but you never know !\n interpolatedRotation.slerp(startRotation, finishRotation, percent);\n return interpolatedRotation;\n }\n }", "public int getScreenOrientation() {\n Display getOrient = getWindowManager().getDefaultDisplay();\n int orientation = Configuration.ORIENTATION_UNDEFINED;\n if (getOrient.getWidth() == getOrient.getHeight()) {\n orientation = Configuration.ORIENTATION_SQUARE;\n } else {\n if (getOrient.getWidth() < getOrient.getHeight()) {\n orientation = Configuration.ORIENTATION_PORTRAIT;\n } else {\n orientation = Configuration.ORIENTATION_LANDSCAPE;\n }\n }\n return orientation;\n }", "private double getAngle(){\n //Get a new angle measurement\n angles = imu.getAngularOrientation(AxesReference.INTRINSIC, AxesOrder.ZYX, AngleUnit.DEGREES);\n //Get the difference between current angle measurement and last angle measurement\n double deltaAngle = angles.firstAngle - lastAngles.firstAngle;\n\n //Process the angle to keep it within (-180,180)\n //(Once angle passes +180, it will rollback to -179, and vice versa)\n if (deltaAngle < -180)\n deltaAngle += 360;\n else if (deltaAngle > 180)\n deltaAngle -= 360;\n\n //Add the change in angle since last measurement (deltaAngle)\n //to the change in angle since last reset (globalAngle)\n globalAngle += deltaAngle;\n //Set last angle measurement to current angle measurement\n lastAngles = angles;\n\n return globalAngle;\n }", "@Override\n public int getCameraOrientation() {\n return characteristics_sensor_orientation;\n }", "static int correctOrientation(final Context context, final CameraCharacteristics characteristics) {\n final Integer lensFacing = characteristics.get(CameraCharacteristics.LENS_FACING);\n final boolean isFrontFacing = lensFacing != null && lensFacing == CameraCharacteristics.LENS_FACING_FRONT;\n TermuxApiLogger.info((isFrontFacing ? \"Using\" : \"Not using\") + \" a front facing camera.\");\n\n Integer sensorOrientation = characteristics.get(CameraCharacteristics.SENSOR_ORIENTATION);\n if (sensorOrientation != null) {\n TermuxApiLogger.info(String.format(\"Sensor orientation: %s degrees\", sensorOrientation));\n } else {\n TermuxApiLogger.info(\"CameraCharacteristics didn't contain SENSOR_ORIENTATION. Assuming 0 degrees.\");\n sensorOrientation = 0;\n }\n\n int deviceOrientation;\n final int deviceRotation =\n ((WindowManager) context.getSystemService(Context.WINDOW_SERVICE)).getDefaultDisplay().getRotation();\n switch (deviceRotation) {\n case Surface.ROTATION_0:\n deviceOrientation = 0;\n break;\n case Surface.ROTATION_90:\n deviceOrientation = 90;\n break;\n case Surface.ROTATION_180:\n deviceOrientation = 180;\n break;\n case Surface.ROTATION_270:\n deviceOrientation = 270;\n break;\n default:\n TermuxApiLogger.info(\n String.format(\"Default display has unknown rotation %d. Assuming 0 degrees.\", deviceRotation));\n deviceOrientation = 0;\n }\n TermuxApiLogger.info(String.format(\"Device orientation: %d degrees\", deviceOrientation));\n\n int jpegOrientation;\n if (isFrontFacing) {\n jpegOrientation = sensorOrientation + deviceOrientation;\n } else {\n jpegOrientation = sensorOrientation - deviceOrientation;\n }\n // Add an extra 360 because (-90 % 360) == -90 and Android won't accept a negative rotation.\n jpegOrientation = (jpegOrientation + 360) % 360;\n TermuxApiLogger.info(String.format(\"Returning JPEG orientation of %d degrees\", jpegOrientation));\n return jpegOrientation;\n }", "private int getOrientation(int rotation) {\n // Sensor orientation is 90 for most devices, or 270 for some devices (eg. Nexus 5X)\n // We have to take that into account and rotate JPEG properly.\n // For devices with orientation of 90, we simply return our mapping from ORIENTATIONS.\n // For devices with orientation of 270, we need to rotate the JPEG 180 degrees.\n if (isFrontFacing && INVERSE_ORIENTATIONS.get(rotation) == 180) {\n return (ORIENTATIONS.get(rotation) + mSensorOrientation + 90) % 360;\n } else {\n return (ORIENTATIONS.get(rotation) + mSensorOrientation + 270) % 360;\n }\n\n }", "public static double getRelativeOrient(Position oldPos, Position newPos, double corient){\n\t\tdouble orient360 = getOrient(oldPos, newPos);\n\t\tdouble relOrient = getOrientDel(orient360, corient);\n\t\treturn relOrient;\n\t}", "public float getOrientacion() { return orientacion; }", "protected int getExifOrientation(final File imageFile) {\n try {\n final ImageMetadata metadata = Imaging.getMetadata(imageFile);\n TiffImageMetadata tiffImageMetadata;\n\n if (metadata instanceof JpegImageMetadata) {\n tiffImageMetadata = ((JpegImageMetadata) metadata).getExif();\n } else if (metadata instanceof TiffImageMetadata) {\n tiffImageMetadata = (TiffImageMetadata) metadata;\n } else {\n return TiffTagConstants.ORIENTATION_VALUE_HORIZONTAL_NORMAL;\n }\n if(tiffImageMetadata==null){\n return TiffTagConstants.ORIENTATION_VALUE_HORIZONTAL_NORMAL;\n }\n TiffField field = tiffImageMetadata.findField(TiffTagConstants.TIFF_TAG_ORIENTATION);\n if (field != null) {\n return field.getIntValue();\n } else {\n TagInfo tagInfo = new TagInfoShort(\"Orientation\", 0x115, TiffDirectoryType.TIFF_DIRECTORY_IFD0); // MAGIC_NUMBER\n field = tiffImageMetadata.findField(tagInfo);\n if (field != null) {\n return field.getIntValue();\n } else {\n return TiffTagConstants.ORIENTATION_VALUE_HORIZONTAL_NORMAL;\n }\n }\n } catch (ImageReadException | IOException e) {\n return TiffTagConstants.ORIENTATION_VALUE_HORIZONTAL_NORMAL;\n }\n }", "public int getLastWindowForcedOrientation() {\n return this.mLastWindowForcedOrientation;\n }", "public double getAngle()\n {\n // We experimentally determined the Z axis is the axis we want to use for heading angle.\n // We have to process the angle because the imu works in euler angles so the Z axis is\n // returned as 0 to +180 or 0 to -180 rolling back to -179 or +179 when rotation passes\n // 180 degrees. We detect this transition and track the total cumulative angle of rotation.\n\n Orientation angles = imu.getAngularOrientation(AxesReference.INTRINSIC, AxesOrder.ZYX, AngleUnit.DEGREES);\n\n double deltaAngle = angles.firstAngle - lastAngles.firstAngle;\n\n if (deltaAngle < -180)\n deltaAngle += 360;\n else if (deltaAngle > 180)\n deltaAngle -= 360;\n\n globalAngle += deltaAngle;\n\n lastAngles = angles;\n\n return globalAngle;\n }", "public double getRotation();", "private XYMultipleSeriesRenderer.Orientation getOrientation() {\n String orientation = mData.getConfiguration(\"bar-orientation\", \"\");\r\n if (orientation.equalsIgnoreCase(\"vertical\")) {\r\n return XYMultipleSeriesRenderer.Orientation.HORIZONTAL;\r\n } else {\r\n return XYMultipleSeriesRenderer.Orientation.VERTICAL;\r\n }\r\n }", "private double getAngle()\n {\n // We experimentally determined the Z axis is the axis we want to use for heading angle.\n // We have to process the angle because the imu works in euler angles so the Z axis is\n // returned as 0 to +180 or 0 to -180 rolling back to -179 or +179 when rotation passes\n // 180 degrees. We detect this transition and track the total cumulative angle of rotation.\n\n Orientation angles = imu.getAngularOrientation(AxesReference.INTRINSIC, AxesOrder.ZYX, AngleUnit.DEGREES);\n\n double deltaAngle = angles.firstAngle - lastAngles.firstAngle;\n\n if (deltaAngle < -180)\n deltaAngle += 360;\n else if (deltaAngle > 180)\n deltaAngle -= 360;\n\n globalAngle += deltaAngle;\n\n lastAngles = angles;\n\n return globalAngle;\n }", "private double getAngle() {\n // We experimentally determined the Z axis is the axis we want to use for\n // heading angle. We have to process the angle because the imu works in\n // euler angles so the Z axis is returned as 0 to +180 or 0 to -180\n // rolling back to -179 or +179 when rotation passes 180 degrees. We\n // detect this transition and track the total cumulative angle of rotation.\n\n Orientation angles = imu.getAngularOrientation(AxesReference.INTRINSIC,\n AxesOrder.ZYX, AngleUnit.DEGREES);\n\n double deltaAngle = angles.firstAngle - lastAngles.firstAngle;\n\n if (deltaAngle < -180)\n deltaAngle += 360;\n else if (deltaAngle > 180)\n deltaAngle -= 360;\n\n globalAngle += deltaAngle;\n\n lastAngles = angles;\n\n return globalAngle;\n }", "public float getBaseHorizontalViewAngle() {\n \treturn mCamera.getParameters().getHorizontalViewAngle();\n }", "public PieceOrientation previous() {\n PieceOrientation[] PieceOrientations = this.values();\n int current = value;\n int previousIndex = (current + PieceOrientations.length - 1) % PieceOrientations.length;\n return PieceOrientations[previousIndex];\n }", "private double getAngle()\n {\n Orientation angles = imu.getAngularOrientation(AxesReference.INTRINSIC, AxesOrder.ZYX, AngleUnit.DEGREES);\n return angles.firstAngle;\n }", "public final double getPatternOrientation()\r\n\t{\r\n\t\treturn _orientation;\r\n\t}", "private int getOrientation(int rotation) {\n // Sensor orientation is 90 for most devices, or 270 for some devices (eg. Nexus 5X)\n // We have to take that into account and rotate JPEG properly.\n // For devices with orientation of 90, we simply return our mapping from ORIENTATIONS.\n // For devices with orientation of 270, we need to rotate the JPEG 180 degrees.\n return (ORIENTATIONS.get(rotation) + mSensorOrientation + 270) % 360;\n }", "public static int getOrientation(@CheckForNull Context context) {\n /*\n * Display display = ((WindowManager) context.getSystemService(Context.WINDOW_SERVICE\n * )).getDefaultDisplay(); int orientation = display.getOrientation(); if (orientation ==\n * ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE) return Configuration.ORIENTATION_LANDSCAPE; else\n * if (orientation == ActivityInfo.SCREEN_ORIENTATION_PORTRAIT) return\n * Configuration.ORIENTATION_PORTRAIT; else if (orientation ==\n * ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED) return Configuration.ORIENTATION_UNDEFINED;\n * return orientation;\n */\n if (context == null)\n context = CardManager.getApplicationContext();\n return context.getResources().getConfiguration().orientation;\n\n }", "public static int getOrientation(File in) throws IOException {\r\n\r\n\t\tint orientation = 1;\r\n\r\n\t\tMetadata metadata;\r\n\r\n\t\tDirectory directory;\r\n\r\n\t\ttry {\r\n\r\n\t\t\tmetadata = ImageMetadataReader.readMetadata(in);\r\n\r\n\t\t\tdirectory = metadata.getFirstDirectoryOfType(ExifIFD0Directory.class);\r\n\r\n\t\t\t\r\n\r\n\t\t\tif(directory != null){\r\n\r\n\t\t\t\torientation = directory.getInt(ExifIFD0Directory.TAG_ORIENTATION);\r\n\r\n\t\t\t}\r\n\r\n\t\t} catch (ImageProcessingException e) {\r\n\r\n\t\t\t//System.err.println(\"[ImgUtil] could not process image\");\r\n\r\n\t\t\t//e.printStackTrace();\r\n\r\n\t\t} catch (MetadataException e) {\r\n\r\n\t\t\t//System.err.println(\"[ImgUtil] could not get orientation from image\");\r\n\r\n\t\t\t//e.printStackTrace();\r\n\r\n\t\t}\r\n\r\n\t\t\r\n\r\n\t\treturn getDegreeForOrientation(orientation);\r\n\r\n\t}", "public double getAngle() {\n\t\treturn armMotor.getEncPosition();\n\t}", "public float getOrientedWidth() {\n return (this.orientation + this.baseRotation) % 180.0f != 0.0f ? this.height : this.width;\n }", "public int getDeviceRotation();", "public int getAngle(){\n\t\tif(!resetCoordinates()&&robot.imu1.isGyroCalibrated()){\n\t\t\trobot.angles=robot.imu1.getAngularOrientation(AxesReference.INTRINSIC, AxesOrder.ZYX, AngleUnit.DEGREES);\n\t\t\tdouble currentAngle=robot.angles.firstAngle;\n\t\t\tint finalAngle= robot.startingAngle+(int)Math.round(currentAngle);\n\t\t\tif(finalAngle<0){\n\t\t\t\treturn 360+finalAngle;\n\t\t\t}\n\t\t\treturn finalAngle;\n\n\t\t}\n\t\telse if(!resetCoordinates()&&robot.imu.isGyroCalibrated()){\n\t\t\trobot.angles=robot.imu.getAngularOrientation(AxesReference.INTRINSIC, AxesOrder.YZX, AngleUnit.DEGREES);\n\t\t\tdouble currentAngle=robot.angles.firstAngle;\n\t\t\tint finalAngle= robot.startingAngle+(int)Math.round(currentAngle);\n\t\t\tif(finalAngle<0){\n\t\t\t\treturn 360+finalAngle;\n\t\t\t}\n\t\t\treturn finalAngle;\n\n\t\t}\n\t\telse if(resetCoordinates()){\n\t\t\tdouble oldAngle = robot.rotation.thirdAngle;\n\t\t\tdouble posAngle = oldAngle;\n\t\t\tint finalAngle;\n\t\t\tif (oldAngle < 0) posAngle = 360 - Math.abs(oldAngle);\n\t\t\tif((int) (Math.round(posAngle)) - 45 < 0){\n\t\t\t\tfinalAngle = 360-(int)Math.round(posAngle);\n\t\t\t}\n\t\t\telse{\n\t\t\t\tfinalAngle = (int) (Math.round(posAngle)) - 45;\n\t\t\t}\n\t\t\treturn finalAngle;\n\t\t}\n\t\telse{\n\t\t\treturn 10000;\n\t\t}\n\t}", "String getLockOrientationPref();", "public float getRotation() {\n return pm.pen.getLevelValue(PLevel.Type.ROTATION);\n }", "int getSensorRotationDegrees();", "@Override\n\tpublic float getRotation() {\n\t\treturn player.getRotation();\n\t}", "public Matrix getCurrentRotation() throws ManipulatorException;", "public double getRotation()\n\t{\n\t\tdouble determinant = this.basisDeterminant();\n\t\tTransform2D m = orthonormalized();\n\t\tif (determinant < 0) \n\t\t{\n\t\t\tm.scaleBasis(new Vector2(1, -1)); // convention to separate rotation and reflection for 2D is to absorb a flip along y into scaling.\n\t\t}\n\t\treturn Math.atan2(m.matrix[0].y, m.matrix[0].x);\n\t}", "public double getRotation() {\n return Degrees.atan2(y, x);\n }", "public float getSavedRotation() {\n return pm.pen.getLevelValue(PLevel.Type.ROTATION);\n }", "public String getAxisOrientation() {\n return axisOrientation;\n }", "public int getRotation() {\n\treturn rotation;\n\t//return rotation;\n}", "AxisOrientation getAxisOrientation();", "public java.lang.Object getRobotOrientation() throws CallError, InterruptedException {\n return (java.lang.Object)service.call(\"getRobotOrientation\").get();\n }", "public Orientation rotate(int amount) {\r\n\t\tint newValue = (value + amount) % 4;\r\n\r\n\t\tif (newValue == 0) {\r\n\t\t\treturn North;\r\n\t\t} else if (newValue == 1) {\r\n\t\t\treturn East;\r\n\t\t} else if (newValue == 2) {\r\n\t\t\treturn South;\r\n\t\t} else {\r\n\t\t\treturn West;\r\n\t\t}\r\n\t}", "public static double rotation()\r\n\t{\r\n\t\treturn -(mxp.getAngle()/45);\r\n\t}", "public double getAngle2() {\n\n // We experimentally determined the Z axis is the axis we want to use for heading angle.\n // We have to process the angle because the imu works in euler angles so the Z axis is\n // returned as 0 to +180 or 0 to -180 rolling back to -179 or +179 when rotation passes\n // 180 degrees. We detect this transition and track the total cumulative angle of rotation.\n\n Orientation angles = imu.getAngularOrientation(AxesReference.INTRINSIC, AxesOrder.ZYX, AngleUnit.DEGREES);\n\n\n\n double deltaAngle = angles.firstAngle - lastAngles.firstAngle;\n\n if (deltaAngle < -180)\n deltaAngle += 360;\n else if (deltaAngle > 180)\n deltaAngle -= 360;\n\n\n globalAngle += deltaAngle;\n\n lastAngles = angles;\n\n return (globalAngle);\n\n }", "@Override\n\tpublic Rotation3 GetRotation() {\n\t\treturn new Rotation3(0f);\n\t}", "public float getOrientation(int angleorder) {\n float orient_angle;\n switch (angleorder) {\n case 1:\n orient_angle = Orientation.getOrientation(lastRobotLocation, AxesReference.EXTRINSIC, AxesOrder.XYZ, AngleUnit.DEGREES).firstAngle;\n break;\n case 2:\n orient_angle = Orientation.getOrientation(lastRobotLocation, AxesReference.EXTRINSIC, AxesOrder.XYZ, AngleUnit.DEGREES).secondAngle;\n break;\n default:\n orient_angle = Orientation.getOrientation(lastRobotLocation, AxesReference.EXTRINSIC, AxesOrder.XYZ, AngleUnit.DEGREES).thirdAngle;\n }\n return orient_angle;\n }", "public double getRawAngle()\n {\n double Angle = 0.0;\n\n switch (MajorAxis)\n {\n case X:\n Angle = getAngleX();\n break;\n case Y:\n Angle = getAngleY();\n break;\n case Z:\n Angle = getAngleZ();\n break;\n }\n\n return(Angle);\n }", "public float getTargetRotation ()\n {\n return _targetRotation;\n }", "public static int roundOrientation(int orientation, int orientationHistory) {\n boolean changeOrientation;\n if (orientationHistory == OrientationEventListener.ORIENTATION_UNKNOWN) {\n changeOrientation = true;\n } else {\n int dist = Math.abs(orientation - orientationHistory);\n dist = Math.min(dist, 360 - dist);\n changeOrientation = (dist >= 45 + ORIENTATION_HYSTERESIS);\n }\n if (changeOrientation) {\n return ((orientation + 45) / 90 * 90) % 360;\n }\n return orientationHistory;\n }", "public static double getOrientDel(double currentOrient, double nextOrient){\n\t return (currentOrient + 180 - nextOrient) % 360 - 180;\n\t}", "public int getRotation() {\r\n\t\treturn rotation;\r\n\t}", "public int orientation(Location p, Location q, Location r) {\n\t\tdouble ret = (q.getY() - p.getY()) * (r.getX() - q.getX())\n\t\t\t\t- (q.getX() - p.getX()) * (r.getY() - q.getY());\n\t\tif (ret == 0) {\n\t\t\treturn 0;\n\t\t}\n\n\t\tif (ret > 0) {\n\t\t\t// clockwise\n\t\t\treturn 1;\n\t\t} else {\n\t\t\t// counterclockwise\n\t\t\treturn 2;\n\t\t}\n\t}", "@Override\n public Orientation getInitialValue(SegmentedBar node) {\n return node.getOrientation();\n }", "public int getNaturalOrientation() {\n if ((!this.mIsLandScapeDefault || this.mBaseDisplayWidth >= this.mBaseDisplayHeight) && this.mBaseDisplayWidth < this.mBaseDisplayHeight) {\n return 1;\n }\n return 2;\n }", "public float getRawRotationAngle() {\n return this.mRawRotationAngle;\n }", "public double getRelativeRotation(Vector2 referenceVector) {\n return Degrees.normalize(getRotation() - referenceVector.getRotation());\n }", "public Rotation2d getHeading() {\n return Rotation2d.fromDegrees(Math.IEEEremainder(gyro.getAngle(), 360) * (Const.kGyroReversed ? -1.0 : 1.0));\n }", "public float getOrientedHeight() {\n return (this.orientation + this.baseRotation) % 180.0f != 0.0f ? this.width : this.height;\n }", "public float getRotation() {\n return this.rotation;\n }", "int getMinRotation();", "private Orientation() {\n }", "int getRotationDegrees() {\n return rotationDegrees;\n }", "public boolean isOrientationCorrected() {\n\t\treturn orientationCorrection;\n\t}" ]
[ "0.7574596", "0.7568137", "0.74372697", "0.71378696", "0.7130304", "0.71275926", "0.71189064", "0.70913285", "0.7089725", "0.7062196", "0.701604", "0.7015564", "0.70143455", "0.6952368", "0.6903211", "0.6863588", "0.6765561", "0.67478925", "0.67143863", "0.66762185", "0.6669916", "0.6660251", "0.66575927", "0.65487486", "0.6548686", "0.6543572", "0.6526183", "0.65168697", "0.65105855", "0.64592487", "0.63900894", "0.6385509", "0.6317125", "0.62863576", "0.62863356", "0.6250975", "0.6229705", "0.6173642", "0.6149554", "0.61317945", "0.6116744", "0.60972446", "0.6078185", "0.6065765", "0.60643125", "0.6057609", "0.60474527", "0.60353607", "0.6004623", "0.5990843", "0.59877163", "0.59660727", "0.5959226", "0.59579", "0.5946579", "0.5946267", "0.59394944", "0.59264326", "0.5918103", "0.59038216", "0.5903192", "0.58928233", "0.58914936", "0.5874104", "0.5867269", "0.58643633", "0.58336747", "0.5833535", "0.5820251", "0.58129376", "0.58108795", "0.5784887", "0.57813674", "0.57560796", "0.5740022", "0.5724588", "0.5710024", "0.5687966", "0.56789243", "0.5677318", "0.56714904", "0.5668486", "0.5654298", "0.5649988", "0.56476986", "0.5632695", "0.56260896", "0.5618715", "0.5608702", "0.5603188", "0.55989456", "0.5587989", "0.5587691", "0.5581381", "0.5569255", "0.5561339", "0.5560527", "0.55601966", "0.554009", "0.5538186" ]
0.7200039
3
Method for testing whether the robot can move with takin into account the walls and otherobstructions.
public abstract boolean canMove();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean canMove(Tile t);", "public static boolean isValidMove(Robot robot) {\r\n\t\t\r\n\t\tint x = robot.getX();\r\n\t\tint y = robot.getY();\r\n\t\t\r\n\t\t//Make sure the next move won't out\r\n\t\t//of bound to the east\r\n\t\tif(robot.facingEast()) {\r\n\t\t\tif(x + 1 < 10) {\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t//Make sure the next move won't hit\r\n\t\t//the wall to the west\r\n\t\tif(robot.facingWest()) {\r\n\t\t\tif(x - 1 > 0) {\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\t\t\r\n\t\t\r\n\t\t//Make sure the next move won't hit\r\n\t\t//the wall to the south\r\n\t\tif(robot.facingSouth()) {\r\n\t\t\tif(y - 1 > 0) {\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\t\t\r\n\t\t\r\n\t\t//Make sure the next move won't out\r\n\t\t//of the bound to the north\r\n\t\tif(robot.facingNorth()) {\r\n\t\t\tif(y + 1 < 10) {\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\t\t\t\r\n\t\treturn false;\r\n\t}", "public boolean canMoveBackward()\n {\n boolean ans = true;\n\n Iterator<WallMulti> walls = this.walls.iterator();\n\n while(walls.hasNext ())\n {\n WallMulti wall = walls.next();\n\n if(wall.getType ().equals (\"H\"))\n {\n if(locX>=wall.getX()-15 && locX<=wall.getX()+wall.getLength()+15)\n {\n //tank upper than wall\n if(wall.getY()-locY<=60 && wall.getY()-locY>=0 && degree>=270 && degree<=360)\n {\n ans=false;\n }\n //tank lower than wall\n if(locY-wall.getY()<=8 && locY-wall.getY()>=0 && degree>=0 && degree<=180)\n {\n ans=false;\n }\n }\n }\n\n if(wall.getType ().equals (\"V\"))\n {\n if(locY>=wall.getY()-15 &&locY<=wall.getY()+wall.getLength()+15)\n {\n //tank at the left side of the wall\n if(wall.getX()-locX<=60 && wall.getX()-locX>=0 &&\n (degree>=90 && degree<=270) )\n {\n ans=false;\n }\n //tank at the right side of the wall\n if(locX-wall.getX()<=8 && locX-wall.getX()>=0 &&\n ((degree>=0 && degree<=90)||(degree>=270 && degree<=360)) )\n {\n ans=false;\n }\n }\n }\n }\n return ans;\n }", "public boolean canMove(int forX , int forY)\n {\n\n\n int tankX = locX + width/2;\n int tankY = locY + height/2;\n\n\n for(WallMulti wall : walls)\n {\n if(wall.getType().equals(\"H\"))\n {\n\n int disStart = (wall.getX()-tankX)*(wall.getX()-tankX) + (wall.getY()-tankY)*(wall.getY()-tankY);\n if(disStart<=700)\n {\n int dis2 = (wall.getX()-(tankX+forX))*(wall.getX()-(tankX+forX)) + (wall.getY()-(tankY+forY))*(wall.getY()-(tankY+forY));\n if(dis2<disStart)\n return false;\n }\n\n int disEnd = ((wall.getX()+wall.getLength())-tankX)*((wall.getX()+wall.getLength())-tankX) + (wall.getY()-tankY)*(wall.getY()-tankY);\n if(disEnd<=1700)\n {\n int dis2 = ((wall.getX()+wall.getLength())-(tankX+forX))*((wall.getX()+wall.getLength())-(tankX+forX)) + (wall.getY()-(tankY+forY))*(wall.getY()-(tankY+forY));\n if(dis2<disEnd)\n return false;\n }\n\n if(tankX >= wall.getX() && tankX <= (wall.getX() + wall.getLength()))\n {\n //tank upper than wall\n if( tankY+20 < wall.getY() && wall.getY()-(tankY+40)<=20 )\n {\n if( wall.getY() <= (tankY+20 + forY) )\n {\n return false;\n }\n }\n\n //tank lower than wall\n if( (tankY-35) > wall.getY() && (tankY-35)-wall.getY()<=25 )\n {\n if( wall.getY() >= (tankY - 35 + forY) )\n {\n return false;\n }\n }\n }\n }\n\n if(wall.getType().equals(\"V\"))\n {\n\n int disStart = (wall.getX()-tankX)*(wall.getX()-tankX) + (wall.getY()-tankY)*(wall.getY()-tankY);\n if(disStart<=700)\n {\n int dis2 = (wall.getX()-(tankX+forX))*(wall.getX()-(tankX+forX)) + (wall.getY()-(tankY+forY))*(wall.getY()-(tankY+forY));\n if(dis2<disStart)\n return false;\n }\n\n int disEnd = (wall.getX()-tankX)*(wall.getX()-tankX) + ((wall.getY()+wall.getLength())-tankY)*((wall.getY()+wall.getLength())-tankY);\n if(disEnd<=3600)\n {\n int dis2 = (wall.getX()-(tankX+forX))*(wall.getX()-(tankX+forX)) + ((wall.getY()+wall.getLength())-(tankY+forY))*((wall.getY()+wall.getLength())-(tankY+forY));\n if(dis2<disEnd)\n return false;\n }\n\n\n if(tankY >= wall.getY() && tankY <= (wall.getY() + wall.getLength()))\n {\n //tank at the left side of the wall\n if( tankX+20 < wall.getX() && wall.getX()-(tankX+40)<=20 )\n {\n if( wall.getX() <= (tankX+20 + forX) )\n {\n return false;\n }\n }\n\n //tank lower than wall\n if( (tankX-35) > wall.getX() && (tankX-35)-wall.getX()<=25 )\n {\n if( wall.getX() >= (tankX - 35 + forX) )\n {\n return false;\n }\n }\n }\n }\n }\n return true;\n }", "private void checkWalls() {\n\t\tcheckSideWalls();\n\t\tcheckTopWall();\n\t\tcheckBottomWall();\n\t}", "private boolean canMove() {\n\t\tif (System.currentTimeMillis() - lastTrunTime < 300) {// move time is\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// 300ms before\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// last move\n\t\t\treturn false;\n\t\t}\n\t\tboolean status = false;\n\t\tif(stage == 1){\n\t\t\tmap = GameView.map;\n\t\t}else if(stage == 2){\n\t\t\tmap = GameViewStage2.map;\n\t\t}else {\n\t\t\tmap = GameViewStage3.map;\n\t\t}\n\t\tif (direction == UP) {// when tank moves up\n\t\t\tif (centerPoint.getY() - speed >= 0) {\n\t\t\t\tif (map[(centerPoint.getY() - speed) / UNIT][centerPoint\n\t\t\t\t\t\t.getX() / UNIT] == 0\n\t\t\t\t\t\t&& map[(centerPoint.getY() - speed) / UNIT][(centerPoint\n\t\t\t\t\t\t\t\t.getX() + UNIT) / UNIT] == 0\n\t\t\t\t\t\t&& map[(centerPoint.getY() - speed) / UNIT][(centerPoint\n\t\t\t\t\t\t\t\t.getX() + 2 * UNIT) / UNIT] == 0) {\n\t\t\t\t\tstatus = true;\n\t\t\t\t}\n\t\t\t}\n\t\t} else if (direction == DOWN) {\n\t\t\tif (centerPoint.getY() + tankBmp.getHeight() + speed < screenHeight) {\n\t\t\t\tif (map[(centerPoint.getY() + 2 * UNIT + speed) / UNIT][centerPoint\n\t\t\t\t\t\t.getX() / UNIT] == 0\n\t\t\t\t\t\t&& map[(centerPoint.getY() + 2 * UNIT + speed)\n\t\t\t\t\t\t\t\t/ UNIT][(centerPoint.getX() + UNIT) / UNIT] == 0\n\t\t\t\t\t\t&& map[(centerPoint.getY() + 2 * UNIT + speed)\n\t\t\t\t\t\t\t\t/ UNIT][(centerPoint.getX() + 2 * UNIT) / UNIT] == 0) {\n\t\t\t\tstatus = true;\n\t\t\t\t}\n\t\t\t}\n\t\t} else if (direction == LEFT) {\n\n\t\t\tif (centerPoint.getX() - speed >= 0) {\n\t\t\t\tif (map[centerPoint.getY() / UNIT][(centerPoint.getX() - speed)\n\t\t\t\t\t\t/ UNIT] == 0\n\t\t\t\t\t\t&& map[(centerPoint.getY() + UNIT) / UNIT][(centerPoint\n\t\t\t\t\t\t\t\t.getX() - speed) / UNIT] == 0\n\t\t\t\t\t\t&& map[(centerPoint.getY() + 2 * UNIT) / UNIT][(centerPoint\n\t\t\t\t\t\t\t\t.getX() - speed) / UNIT] == 0) {\n\t\t\t\t\tstatus = true;\n\t\t\t\t}\n\t\t\t}\n\t\t} else if (direction == RIGHT) {\n\t\t\tif (centerPoint.getX() + tankBmp.getWidth() + speed < screenWidth) {\n\t\t\t\tif (map[centerPoint.getY() / UNIT][(centerPoint.getX()\n\t\t\t\t\t\t+ 2 * UNIT + speed)\n\t\t\t\t\t\t/ UNIT] == 0\n\t\t\t\t\t\t&& map[(centerPoint.getY() + UNIT) / UNIT][(centerPoint\n\t\t\t\t\t\t\t\t.getX() + 2 * UNIT + speed)\n\t\t\t\t\t\t\t\t/ UNIT] == 0\n\t\t\t\t\t\t&& map[(centerPoint.getY() + 2 * UNIT) / UNIT][(centerPoint\n\t\t\t\t\t\t\t\t.getX() + 2 * UNIT + speed)\n\t\t\t\t\t\t\t\t/ UNIT] == 0) {\n\t\t\t\t\tstatus = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (status)\n\t\t\tlastTrunTime = System.currentTimeMillis();\n\t\treturn status;\n\t}", "@SuppressWarnings(\"unchecked\")\n\tpublic boolean canSeeBadRobot() {\n\t\tboolean isVisible= false;\n\t\tList<Wall> walls = (List<Wall>) (List<?>) getEngine()\n\t\t\t\t.requestSimObject(simo -> (simo instanceof Wall) && ((Wall) simo).getType() == 2);\n\t\tList<Bounds> bounds = new ArrayList<Bounds>();\n\t\tfor (Wall w : walls) {\n\t\t\tbounds.addAll(w.getBounds());\n\t\t}\n\n\t\t\n\t\tRobot bad = null;\n\t\tList<Robot> objets = (List<Robot>) (List<?>) getEngine().requestSimObject(simo -> (simo instanceof Robot) && (simo != getParent()));\n\n\t\tif (objets.size() == 1) {\n\t\t\tbad = objets.get(0);\n\t\t\t\n\t\t\t//on cr�e donc un cylindre entre les deux positions\n\t\t\t//on pourra afficher le cylindre dans la vue 3D\n\t\t\tCylinder lineOfSight = BorderAndPathGenerator.generateCylinderBetween(bad.getPosition(), Util.rectifi(positionR()));\n\t\t\tlineOfSight.setMaterial(new PhongMaterial(Color.AQUA));\n\n\t\t\t//le robot gentil ne peut pas voire le mauvais robot à plus de 15m \n\t\t\tif(lineOfSight.getHeight() < 15){\n\t\t\t\t\n\t\t\t\tisVisible = BorderAndPathGenerator.intervisibilityBetween(bad.getPosition(), Util.rectifi(positionR()),bounds);\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\treturn isVisible;\n\t\t} else\n\t\t\treturn false;\n\n\t}", "protected boolean isWall2()\n {\n\n if(isTouching(Wall.class)) //&&!isTouching(Door.class))\n return true;\n /*else if(isTouching(Door.class))\n {\n Door d = (Door)getOneIntersectingObject(Door.class);\n if(d.alreadyOpened==false)\n return true;\n else\n return false;\n }*/\n else\n return false;\n }", "@Test\n public void testTankMovingOutsideBoundaries() {\n tank.moveRight();\n tank.notMoveLeft();\n\n for (int i = 0; i < 480; i++) {\n tank.tick();\n }\n assertEquals(tank.x(), 460);\n\n tank.moveLeft();\n tank.notMoveRight();\n\n for (int i = 0; i < 480; i++) {\n tank.tick();\n }\n\n assertEquals(tank.x(), 180);\n }", "@SuppressWarnings(\"unchecked\")\n\tpublic boolean canSeeNemesisRobot() {\n\t\tboolean isVisible= false;\n\t\tList<Wall> walls = (List<Wall>) (List<?>) getEngine()\n\t\t\t\t.requestSimObject(simo -> (simo instanceof Wall) && (((Wall) simo).getType() == 2||((Wall) simo).getType() == 3));\n\t\tList<Bounds> bounds = new ArrayList<Bounds>();\n\t\tfor (Wall w : walls) {\n\t\t\tbounds.addAll(w.getBounds());\n\t\t}\n\n\t\t\n\t\tRobot bad = null;\n\t\tList<Robot> objets = (List<Robot>) (List<?>) getEngine().requestSimObject(simo -> (simo instanceof Robot) && (simo != getParent()));\n\n\t\tif (objets.size() == 1) {\n\t\t\tbad = objets.get(0);\n\t\t\t\n\t\t\t//on cr�e donc un cylindre entre les deux positions\n\t\t\t//on pourra afficher le cylindre dans la vue 3D\n\t\t\tCylinder lineOfSight = BorderAndPathGenerator.generateCylinderBetween(bad.getPosition(), Util.rectifi(positionR()));\n\t\t\tlineOfSight.setMaterial(new PhongMaterial(Color.AQUA));\n\n\t\t\t//le robot gentil ne peut pas voire le mauvais robot à plus de 15m \n\t\t\tif(lineOfSight.getHeight() < 10){\n\t\t\t\t\n\t\t\t\tisVisible = BorderAndPathGenerator.intervisibilityBetween(bad.getPosition(), Util.rectifi(positionR()),bounds);\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\treturn isVisible;\n\t\t} else\n\t\t\treturn false;\n\n\t}", "public boolean canMoveForward()\n {\n boolean ans = true;\n\n Iterator<WallMulti> walls = this.walls.iterator();\n\n while(walls.hasNext ())\n {\n WallMulti wall = walls.next();\n\n if(wall.getType ().equals (\"H\"))\n {\n if(locX>=wall.getX()-15 && locX<=wall.getX()+wall.getLength()+15)\n {\n if(wall.getY()-locY<=50 && wall.getY()-locY>=0 && degree>=0 && degree<=150)\n {\n ans=false;\n }\n if(locY-wall.getY()<=8 && locY-wall.getY()>=0 && degree>=180 && degree<=360)\n {\n ans=false;\n }\n }\n }\n\n if(wall.getType ().equals (\"V\"))\n {\n if(locY>=wall.getY()-15 &&locY<=wall.getY()+wall.getLength()+15)\n {\n if(wall.getX()-locX<=50 && wall.getX()-locX>=0 &&\n ((degree>=0 && degree<=90)||(degree>=270 && degree<=360)) )\n {\n ans=false;\n }\n if(locX-wall.getX()<=8 && locX-wall.getX()>=0 &&\n degree>=90 && degree<=270 )\n {\n ans=false;\n }\n }\n }\n }\n return ans;\n }", "private boolean checkFollowingWall(Coordinate carPos,\n\t\t\t\t\t\t\t\t\t\t WorldSpatial.Direction orientation) {\n\t\t// If it's a traversable trap return false\n\t\tif (map.tileAtRelative(carPos, orientation, -1, 0).isTrap() &&\n\t\t\t!map.tileAtRelative(carPos, orientation, -2, 0).blocking()) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Return true if there are any blocking tiles in specific range ahead\n\t\tfor (int i = 1; i <= WALL_THRESHOLD; i++) {\n\t\t\tif (map.tileAtRelative(carPos, orientation, -i, 0).blocking()) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "boolean canMove();", "public boolean checkWallCollision(){\n\t\tif(Physics.hitWall(this, game.getBrickList())!=-1){\n\t\t\treturn true;\n\t\t}\n\t\tif(Physics.hitPlaceHolder(this, game.getPlaceHolderList())!=-1){\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public boolean isWall();", "@Test\n public void testTankMoving() {\n tank.moveRight();\n assertEquals(tank.getMovingRight(), true);\n\n tank.moveLeft();\n assertEquals(tank.getMovingLeft(), true);\n\n tank.notMoveLeft();\n assertEquals(tank.getMovingLeft(), false);\n\n tank.notMoveRight();\n assertEquals(tank.getMovingRight(), false);\n }", "@Test\n\tpublic void testPlayerAndWallCollision() {\n\t\tEngine engine = new Engine(20);\n\t\tint x = engine.getMoveableObject(0).getX() + 14;\n\t\tint y = engine.getMoveableObject(0).getY();\n\t\tfor (int i = 0; i < 18; i++) {\n\t\t\tengine.update();\n\t\t}\n\t\tassertEquals(\"failure - player did not invert from wall correctly (x coord incorrect)\", x, engine.getMoveableObject(0).getX(), 0.0);\n\t\tassertEquals(\"failure - player did not invert from wall correctly (y coord incorrect)\", y, engine.getMoveableObject(0).getY(), 0.0);\n\t}", "@Test\n\tpublic void testMonsterAndWallCollision() {\n\t\tEngine engine = new Engine(20);\n\t\tint x = engine.getMoveableObject(3).getX();\n\t\tint y = engine.getMoveableObject(3).getY() - 1;\n\t\tfor (int i = 0; i < 3; i ++) {\n\t\t\tengine.update();\n\t\t}\n\t\tassertEquals(\"failure - monster did not invert from wall correctly (x coord incorrect)\", x, engine.getMoveableObject(3).getX(), 0.0);\n\t\tassertEquals(\"failure - monster did not invert from wall correctly (y coord incorrect)\", y, engine.getMoveableObject(3).getY(), 0.0);\n\t}", "void nearingTheWallBefore(){\n robot.absgyroRotation(0, \"absolute\");\n\n //alligning with the wall before going for the toy\n while(robot.leftDistanceSensor.getDistance(DistanceUnit.CM) > 15 && !isStopRequested()){\n if(robot.leftDistanceSensor.getDistance(DistanceUnit.CM) < 30)\n robot.mecanumMovement(0, .3, 0);\n else\n robot.mecanumMovement(0, .7, 0);\n\n telemetry.addLine(\"Distance from sensor: \" + robot.leftDistanceSensor.getDistance(DistanceUnit.CM));\n telemetry.update();\n }\n robot.mecanumMovement(0, 0, 0);\n\n robot.absgyroRotation(45, \"absolute\");\n }", "private boolean atLeastOneNonWallLocation() {\n\t\tfor (int x = 0; x < this.map.getMapWidth(); x++) {\n\t\t\tfor (int y = 0; y < this.map.getMapHeight(); y++) {\n\n\t\t\t\tif (this.map.getMapCell(new Location(x, y)).isWalkable()) {\n\t\t\t\t\t// If it's not a wall then we can put them there\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}", "public boolean moveable() {\n //check reach border\n if (reachBorder()) {\n return false;\n }\n //get the location of the next spot to move to\n //move up\n Point nextLocation = this.getCenterLocation();\n if (direction == 12) {\n nextLocation = new Point(this.getCenterX(),\n this.getCenterY() - speed);\n }\n //move right\n if (direction == 3) {\n nextLocation = new Point(this.getCenterX() + speed,\n this.getCenterY());\n\n }\n //move down\n if (direction == 6) {\n nextLocation = new Point(this.getCenterX(),\n this.getCenterY() + speed);\n\n }\n //move left\n if (direction == 9) {\n nextLocation = new Point(this.getCenterX() - speed,\n this.getCenterY());\n }\n\n // get all objects in a circle of radius tileSize * 2 around the players\n //these objects are those which can possibly colide with the players\n int checkRadius = GameUtility.GameUtility.TILE_SIZE * 2;\n for (GameObject gameObject : GameManager.getGameObjectList()) {\n if (GameUtility.GameUtility.distance(gameObject.getCenterLocation(),\n this.getCenterLocation()) < checkRadius) {\n if ((GameUtility.GameUtility.dectectCollision(\n gameObject.getCenterLocation(),\n nextLocation)) && !(GameUtility.GameUtility.dectectCollision(\n gameObject.getCenterLocation(),\n this.getCenterLocation())) && gameObject.getType() != GameObjectType.POWER_UP && gameObject.getType() != GameObjectType.MONSTER && gameObject.getType() != GameObjectType.PLAYER) {\n return false;\n }\n }\n }\n return true;\n\n }", "public boolean canWalk() {\n\t\treturn rangeBottomLeft != null && !rangeBottomLeft.equals(location)\n\t\t\t\t&& rangeTopRight != null && !rangeTopRight.equals(location);\n\t}", "public boolean isWalkable() {\n return type != CellType.WALL && isInBoundaries();\n }", "boolean testIsTouchingIGamePiece(Tester t) {\n return t.checkExpect(los2.isTouching(ship2), false)\n && t.checkExpect(los3.isTouching(bullet8), true)\n && t.checkExpect(lob2.isTouching(ship2), true)\n && t.checkExpect(lob3.isTouching(ship11), false)\n && t.checkExpect(lob3.isTouching(ship3), true)\n && t.checkExpect(mt.isTouching(ship6), false);\n }", "@Test\n void checkDoMove() {\n abilities.doMove(turn, board.getCellFromCoords(1, 1));\n assertEquals(turn.getWorker().getCell(), board.getCellFromCoords(1, 1));\n Worker forcedWorker = turn.getWorker();\n for (Worker other : turn.getOtherWorkers()) {\n if (other.getCell() == board.getCellFromCoords(2, 2)) {\n forcedWorker = other;\n }\n }\n\n assertEquals(forcedWorker.getCell(), board.getCellFromCoords(2, 2));\n\n // Can't move anymore after having already moved\n assertFalse(abilities.checkCanMove(turn, board.getCellFromCoords(0, 0)));\n }", "public abstract boolean canMove(Board board, Spot from, Spot to);", "public boolean checkNorth(HashMap<Coordinate,MapTile> currentView){\n\t\tCoordinate currentPosition = new Coordinate(getPosition());\n\t\tfor(int i = 0; i <= wallSensitivity; i++){\n\t\t\tMapTile tile = currentView.get(new Coordinate(currentPosition.x, currentPosition.y+i));\n\t\t\tif(tile.isType(MapTile.Type.WALL)){\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "private boolean legalMove() {\n\n\t\t// empty landing spot\n\t\tif (tilePath.size() == 0) {\n\t\t\tdebug(\"illegal, empty landing spot\");\n\t\t\treturn false;\n\t\t}\n\n\t\tif (!mBoard.tileIsEmpty(tilePath.get(tilePath.size() - 1))) {\n\t\t\tdebug(\"illegal, tile not empty\");\n\t\t\treturn false;\n\t\t}\n\n\t\t// start doesn't equal end\n\t\tif (tilePath.get(0).equals(tilePath.get(tilePath.size() - 1))) {\n\t\t\tdebug(\"illegal, start doesn't equal end\");\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}", "public boolean isLegalJump(MoveDirection dir){\r\n GamePosition curPos = currentGame.getCurrentPosition();\n\t\t\tPlayer white = currentGame.getWhitePlayer();\n\t\t\tint whiteCol = curPos.getWhitePosition().getTile().getColumn();\n\t\t\tint whiteRow = curPos.getWhitePosition().getTile().getRow();\n\t\t\tint blackCol = curPos.getBlackPosition().getTile().getColumn();\n\t\t\tint blackRow = curPos.getBlackPosition().getTile().getRow();\n\t\t\t\n\t\t\tint rChange = 0, cChange = 0;\n\t\t\tif(dir == MoveDirection.North) rChange = -2;\n\t\t\telse if(dir == MoveDirection.South) rChange = 2;\n\t\t\telse if(dir == MoveDirection.East) cChange = 2;\n\t\t\telse if(dir == MoveDirection.West) cChange = -2;\n\t\t\telse return false;\n\t\t\t\n\t\t\tif(curPos.getPlayerToMove().equals(white)) {\n\t\t\t\t\n\t\t\t\t//Moving left or right wall check\n\t\t\t\tif(cChange != 0) {\n\t\t\t\t\tif(blackRow != whiteRow || blackCol != (whiteCol + (cChange / 2) ) ) return false;\n\t\t\t\t\twhiteCol += cChange;\n\t\t\t\t\tif(whiteCol < 1 || whiteCol > 9) return false;\n\t\t\t\t\tfor(WallMove w : QuoridorController.getWalls()) {\n\t\t\t\t\t\tif(w.getWallDirection() == Direction.Vertical) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//If left- check col -1, -2. If right- check col +0, +1\n\t\t\t\t\t\t\tint tmp;\n\t\t\t\t\t\t\tif(cChange < 0) tmp = -2;\n\t\t\t\t\t\t\telse tmp = 0;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tint checkCol = (whiteCol -cChange) + tmp;\n\t\t\t\t\t\t\tif((w.getTargetTile().getColumn() == checkCol ||w.getTargetTile().getColumn() == checkCol + 1) && \n\t\t\t\t\t\t\t (w.getTargetTile().getRow() == whiteRow || w.getTargetTile().getRow() == whiteRow - 1)) {\n\t\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t//Horizontal Wall can't block right/left path\n\t\t\t\t\t}\t\n\t\t\t\t}\n\t\t\t\t//Moving up or down wall check\n\t\t\t\telse if(rChange != 0) {\n\t\t\t\t\tif(blackCol != whiteCol || blackRow != (whiteRow + (rChange / 2) ) ) return false;\n\t\t\t\t\twhiteRow += rChange;\n\t\t\t\t\tif(whiteRow < 1 || whiteRow > 9) return false;\n\t\t\t\t\tfor(WallMove w : QuoridorController.getWalls()) {\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(w.getWallDirection() == Direction.Horizontal) {\n\t\t\t\t\t\t\t//If up- check row -1, -2. If down- check row +0, +1\n\t\t\t\t\t\t\tint tmp;\n\t\t\t\t\t\t\tif(rChange < 0) tmp = -2;\n\t\t\t\t\t\t\telse tmp = 0;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tint checkRow = (whiteRow -rChange) + tmp;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif((w.getTargetTile().getRow() == checkRow || w.getTargetTile().getRow() == checkRow + 1)\n\t\t\t\t\t\t\t\t&& (w.getTargetTile().getColumn() == whiteCol || w.getTargetTile().getColumn() == whiteCol - 1)) {\n\t\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t//Vertical Wall can't block up/down path\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif((blackRow == whiteRow) && (blackCol == whiteCol)) return false;\n\t\t\t} else {\n\n\t\t\t\t//Moving left or right wall check\n\t\t\t\tif(cChange != 0) {\n\t\t\t\t\tif(blackRow != whiteRow || whiteCol != (blackCol + (cChange / 2) ) ) return false;\n\t\t\t\t\tblackCol += cChange;\n\t\t\t\t\tif(blackCol < 1 || blackCol > 9) return false;\n\t\t\t\t\tfor(WallMove w : QuoridorController.getWalls()) {\n\t\t\t\t\t\tif(w.getWallDirection() == Direction.Vertical) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//If left- check col -1, -2. If right- check col +0, +1\n\t\t\t\t\t\t\tint tmp;\n\t\t\t\t\t\t\tif(cChange < 0) tmp = -2;\n\t\t\t\t\t\t\telse tmp = 0;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tint checkCol = (blackCol -cChange) + tmp;\n\n\t\t\t\t\t\t\tif((w.getTargetTile().getColumn() == checkCol ||w.getTargetTile().getColumn() == checkCol + 1) && \n\t\t\t\t\t\t\t (w.getTargetTile().getRow() == blackRow || w.getTargetTile().getRow() == blackRow - 1)) {\n\t\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\t//Horizontal Wall can't block right/left path\n\t\t\t\t\t}\t\n\t\t\t\t}\n\t\t\t\t//Moving up or down wall check\n\t\t\t\telse if(rChange != 0) {\n\t\t\t\t\tif(blackCol != whiteCol || whiteRow != (blackRow + (rChange / 2) ) ) return false;\n\t\t\t\t\tblackRow += rChange;\n\t\t\t\t\tif(blackRow < 1 || blackRow > 9) return false;\n\t\t\t\t\tfor(WallMove w : QuoridorController.getWalls()) {\n\t\t\t\t\t\tif(w.getWallDirection() == Direction.Horizontal) {\n\t\t\t\t\t\t\t//If up- check row -1, -2. If down- check row +0, +1\n\t\t\t\t\t\t\tint tmp;\n\t\t\t\t\t\t\tif(rChange < 0) tmp = -2;\n\t\t\t\t\t\t\telse tmp = 0;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tint checkRow = (blackRow -rChange) + tmp;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif((w.getTargetTile().getRow() == checkRow || w.getTargetTile().getRow() == checkRow + 1)\n\t\t\t\t\t\t\t\t&& (w.getTargetTile().getColumn() == blackCol || w.getTargetTile().getColumn() == blackCol - 1)) {\n\t\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t}\n\t\t\t\t\t\t//Vertical Wall can't block up/down path\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif((blackRow == whiteRow) && (blackCol == whiteCol)) return false;\n\t\t\t}\n\t\t\treturn true;\r\n }", "public boolean checkNorth(HashMap<Coordinate,MapTile> currentView){\n\t\t\tCoordinate currentPosition = new Coordinate(getPosition());\n\t\t\tfor(int i = 0; i <= wallSensitivity; i++){\n\t\t\t\tMapTile tile = currentView.get(new Coordinate(currentPosition.x, currentPosition.y+i));\n\t\t\t\tif(tile.isType(MapTile.Type.WALL)){\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false;\n\t\t}", "@Test\n public void isMoveActionLegalFor()\n {\n // Setup.\n final CheckersGameInjector injector = new CheckersGameInjector();\n final List<Agent> agents = createAgents(injector);\n final CheckersEnvironment environment = createEnvironment(injector, agents);\n final CheckersAdjudicator adjudicator = injector.injectAdjudicator();\n\n // Agent white can move his token to an adjacent empty space.\n assertTrue(adjudicator.isMoveActionLegalFor(environment, CheckersTeam.WHITE, CheckersPosition.P09,\n CheckersPosition.P13));\n\n // Agent white cannot move backwards.\n assertFalse(adjudicator.isMoveActionLegalFor(environment, CheckersTeam.WHITE, CheckersPosition.P09,\n CheckersPosition.P05));\n\n // Agent white cannot move to an occupied space.\n assertFalse(adjudicator.isMoveActionLegalFor(environment, CheckersTeam.WHITE, CheckersPosition.P04,\n CheckersPosition.P08));\n\n // Agent white cannot move a red token.\n assertFalse(adjudicator.isMoveActionLegalFor(environment, CheckersTeam.WHITE, CheckersPosition.P21,\n CheckersPosition.P17));\n\n // Agent white cannot move too far.\n assertFalse(adjudicator.isMoveActionLegalFor(environment, CheckersTeam.WHITE, CheckersPosition.P09,\n CheckersPosition.P18));\n }", "public boolean canMove() {\n\n\tArrayList<Location> moveLocs = getValid(getLocation());\n\n\tif (isEnd == true) {\n\t return false;\n\t} \n\tif (!moveLocs.isEmpty()) {\n\t \n\t randomSelect(moveLocs);\n\t // selectMoveLocation(moveLocs);\n\t return true;\n\n\t} else {\n\t return false;\n\t}\n }", "protected boolean canTriggerWalking() {\n/* 140 */ return false;\n/* */ }", "@Test\n public void canMoveTest() {\n assertTrue(cp1.canMove(5, 3));\n assertTrue(cp1.canMove(1, 5));\n assertTrue(cp2.canMove(4, 6));\n assertTrue(cp2.canMove(6, 5));\n\n assertFalse(cp1.canMove(0, 5));\n assertFalse(cp1.canMove(3, 4));\n assertFalse(cp2.canMove(2, 6));\n assertFalse(cp2.canMove(7, 4));\n }", "public abstract boolean canMoveTo(Case Location);", "@Test\n void checkCannotForceWithForcedCellOccupied() {\n assertFalse(abilities.checkCanMove(turn, board.getCellFromCoords(1, 0)));\n }", "public boolean liesOnWall() {\n return getBaseParameters().getWorld()[this.getX()][this.getY()] == getBaseParameters().getWall();\n }", "private boolean hitMyPaddle() {\n if (b.numX - 60 <= 0) {\n if ((b.numY <= (this.touchedY + 260)) && (b.numY >= (this.touchedY - 260))) {\n } else {\n this.wentOffWall();\n }\n return true;\n } else {\n return false;\n }\n }", "public void checkCubeInRobot() {\n\t\tRobotMap.pinThree.set(!RobotMap.cubeInRobot.get());\n\t}", "private void testForWallCollision() {\n\t\tVector2 n1 = temp;\n\t\tVector2 hitPoint = temp2;\n\t\t\n\t\tArrayList<Vector2> list;\n\t\tdouble angleOffset;\n\t\t\n\t\tfor (int w=0; w < 2; w++) {\n\t\t\tif (w == 0) {\n\t\t\t\tlist = walls1;\n\t\t\t\tangleOffset = Math.PI/2;\n\t\t\t} else {\n\t\t\t\tlist = walls2;\n\t\t\t\tangleOffset = -Math.PI/2;\n\t\t\t}\n\t\t\tn1.set(list.get(0));\n\t\t\t\n\t\t\tfor (int i=1; i < list.size(); i++) {\n\t\t\t\tVector2 n2 = list.get(i);\n\t\t\t\tif (Intersector.intersectSegments(n1, n2, oldPos, pos, hitPoint)) {\n\t\t\t\t\t// bounceA is technically the normal. angleOffset is used\n\t\t\t\t\t// here to get the correct side of the track segment.\n\t\t\t\t\tfloat bounceA = (float) (Math.atan2(n2.y-n1.y, n2.x-n1.x) + angleOffset);\n\t\t\t\t\tVector2 wall = new Vector2(1, 0);\n\t\t\t\t\twall.setAngleRad(bounceA).nor();\n\t\t\t\t\t\n\t\t\t\t\t// move the car just in front of the wall.\n\t\t\t\t\tpos.set(hitPoint.add((float)Math.cos(bounceA)*0.05f, (float)Math.sin(bounceA)*0.05f));\n\t\t\t\t\t\n\t\t\t\t\t// Lower the speed depending on which angle you hit the wall in.\n\t\t\t\t\ttemp2.setAngleRad(angle).nor();\n\t\t\t\t\tfloat wallHitDot = wall.dot(temp2);\n\t\t\t\t\tspeed *= (1 - Math.abs(wallHitDot)) * 0.85;\n\t\t\t\t\t\n\t\t\t\t\t// calculate the bounce using the reflection formula.\n\t\t\t\t\tfloat dot = vel.dot(wall);\n\t\t\t\t\tvel.sub(wall.scl(dot*2));\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tn1.set(n2);\n\t\t\t}\n\t\t}\n\t}", "public abstract boolean interactionPossible(Robot robot);", "@Test\n\tpublic void testCanJump() {\n\t\tActorWorld world = new ActorWorld();\n\t\t/* case1:\n\t\t * next location is a Rock, next two cells location is empty.\n\t\t */\n\t\tworld.add(new Location(5, 1), alice);\n\t\tworld.add(new Location(4, 1), new Rock());\n\t\tassertEquals(true, alice.canJump());\n\n\t\t/* case2:\n\t\t * next location is Rock. next two cells location is flower. \n\t\t */\n\t\talice.moveTo(new Location(5, 2));\n\t\tworld.add(new Location(4, 2), new Rock());\n\t\tworld.add(new Location(3, 2), new Flower());\n\t\tassertEquals(true, alice.canJump());\n\n\t\t/* case2:\n\t\t * next location is Rock. next two cells location is Rock. \n\t\t */\n\t\talice.moveTo(new Location(5, 3));\n\t\tworld.add(new Location(4, 3), new Rock());\n\t\tworld.add(new Location(3, 3), new Rock());\n\t\tassertEquals(false, alice.canJump());\n\t}", "boolean testMoveAll(Tester t) {\n return t.checkExpect(this.lob3.moveAll(), new ConsLoGamePiece(\n new Bullet(2, Color.PINK, new MyPosn(51, 50), this.p6, 1),\n new ConsLoGamePiece(new Bullet(2, Color.PINK, new MyPosn(51, 50), this.p6, 1),\n new ConsLoGamePiece(\n new Bullet(2, Color.PINK, new MyPosn(250, 292), new MyPosn(0, -8), 1), this.mt))))\n && t.checkExpect(this.mt.moveAll(), this.mt);\n }", "@Test\n public void isJumpActionLegalFor()\n {\n // Setup.\n final CheckersGameInjector injector = new CheckersGameInjector();\n final List<Agent> agents = createAgents(injector);\n final Agent agentRed = agents.get(0);\n final Agent agentWhite = agents.get(1);\n final CheckersEnvironment environment = createEnvironment(injector, agents);\n {\n final CheckersMoveAction action = new CheckersMoveAction(environment, agentRed, CheckersPosition.P21,\n CheckersPosition.P17);\n action.doIt();\n }\n {\n final CheckersMoveAction action = new CheckersMoveAction(environment, agentWhite, CheckersPosition.P09,\n CheckersPosition.P14);\n action.doIt();\n }\n {\n final CheckersMoveAction action = new CheckersMoveAction(environment, agentRed, CheckersPosition.P22,\n CheckersPosition.P18);\n action.doIt();\n }\n final CheckersAdjudicator adjudicator = injector.injectAdjudicator();\n\n // Agent white can jump his token over a red token to an empty space.\n assertTrue(adjudicator.isJumpActionLegalFor(environment, CheckersTeam.WHITE, CheckersPosition.P14,\n CheckersPosition.P21));\n\n // Agent white cannot jump his token to an occupied space.\n assertFalse(adjudicator.isJumpActionLegalFor(environment, CheckersTeam.WHITE, CheckersPosition.P14,\n CheckersPosition.P23));\n\n // Agent white cannot jump his token to an adjacent empty space.\n assertFalse(adjudicator.isJumpActionLegalFor(environment, CheckersTeam.WHITE, CheckersPosition.P10,\n CheckersPosition.P15));\n\n // Agent white cannot jump his own token.\n assertFalse(adjudicator.isJumpActionLegalFor(environment, CheckersTeam.WHITE, CheckersPosition.P08,\n CheckersPosition.P15));\n }", "protected boolean canTriggerWalking()\n {\n return false;\n }", "private static boolean canMove() {\n return GameManager.getCurrentTurn();\r\n }", "private boolean checkM(){\n if(currentLocation.x == previousLocation.x && currentLocation.y == previousLocation.y) {\n return false;\n }\n // Is outside the border\n if(currentLocation.x < size || currentLocation.y < size || currentLocation.x > map.numRows - size || currentLocation.y > map.numCols - size) {\n return false;\n }\n // Is on the land\n double angle2 = 0;\n while (angle2 < 6.3) {\n if (map.getTerrainGrid()[currentLocation.x + (int) (size/2 * cos(angle2))][currentLocation.y + (int) (size/2 * sin(angle2))] == Colors.OCEAN) {\n return false;\n }\n angle2 += 0.3;\n }\n return true;\n }", "public boolean canMove() {\n return (Math.abs(getDist())>=50);\n }", "protected boolean didHitWall() {\n return hitWall && !SnakeGame.getHasWarpWalls();\n\n }", "public boolean isMoveLegal() {\n if (!getGame().getBoard().contains(getFinalCoords())) {\n return false;\n }\n\n // for aero units move must use up all their velocity\n if (getEntity() instanceof Aero) {\n Aero a = (Aero) getEntity();\n if (getLastStep() == null) {\n if ((a.getCurrentVelocity() > 0) && !getGame().useVectorMove()) {\n return false;\n }\n } else {\n if ((getLastStep().getVelocityLeft() > 0) && !getGame().useVectorMove()\n && !(getLastStep().getType() == MovePath.MoveStepType.FLEE\n || getLastStep().getType() == MovePath.MoveStepType.EJECT)) {\n return false;\n }\n }\n }\n\n if (getLastStep() == null) {\n return true;\n }\n\n if (getLastStep().getType() == MoveStepType.CHARGE) {\n return getSecondLastStep().isLegal();\n }\n if (getLastStep().getType() == MoveStepType.RAM) {\n return getSecondLastStep().isLegal();\n }\n return getLastStep().isLegal();\n }", "@Test\n public void moreThanOneCheckerOnToLocation() {\n\n assertTrue(game.move(Location.R1, Location.R2));\n assertTrue(game.move(Location.R1, Location.R3));\n game.nextTurn();\n // to der gerne skulle vaere lovlige og stemme med terningerne\n assertTrue(game.move(Location.R6, Location.R5));\n assertTrue(game.move(Location.R8, Location.R6));\n game.nextTurn();\n assertTrue(game.move(Location.R2, Location.R5));\n assertTrue(game.move(Location.R3, Location.R7));\n game.nextTurn();\n // der staar nu to sorte paa R4\n assertFalse(game.move(Location.R6, Location.R3));\n }", "@Test\n\tpublic void testTRight1() {\n\t\ttank.InabilityToMoveRight();\n\t\ttank.goRight();\n\t\tassertEquals(0, tank.getX());\n\t}", "@Override\r\n public boolean canMove() {\r\n Grid<Actor> gr = getGrid();\r\n int dirs[] = {\r\n Location.AHEAD, Location.HALF_CIRCLE, Location.LEFT,\r\n Location.RIGHT };\r\n // 当终点在周围时,不能移动且isEnd应当为true\r\n for (int i = 0; i < dirs.length; i++) {\r\n Location tarLoc = getLocation().getAdjacentLocation(dirs[i]);\r\n if (gr.isValid(tarLoc) && gr.get(tarLoc) != null) {\r\n // Color直接用==计算竟然不可行(真是哔了dog...\r\n if (gr.get(tarLoc) instanceof Rock\r\n && gr.get(tarLoc).getColor().equals(Color.RED)) {\r\n isEnd = true;\r\n return false;\r\n }\r\n }\r\n }\r\n ArrayList<Location> nextLocs = getValid(getLocation());\r\n // 当附近没有可以移动的位置时,不能移动\r\n if (nextLocs.size() == 0) {\r\n return false;\r\n }\r\n // 当可以移动的位置>1时,说明存在一个节点,这个节点应当被新建一个arraylist入栈\r\n if (nextLocs.size() > 1) {\r\n ArrayList<Location> newStackElem = new ArrayList<Location>();\r\n newStackElem.add(getLocation());\r\n crossLocation.push(newStackElem);\r\n }\r\n // 有可以移动的位置时,向概率最高的方向移动\r\n int maxProbLoc = 0;\r\n // 由于nextLocs不一定有4个location,所以只好循环判断取最大值\r\n for (int i = 0; i < nextLocs.size(); i++) {\r\n Location loc = nextLocs.get(i);\r\n int dirNum = getLocation().getDirectionToward(loc) / 90;\r\n if (probablyDir[dirNum] > probablyDir[maxProbLoc]) {\r\n maxProbLoc = i;\r\n }\r\n }\r\n next = nextLocs.get(maxProbLoc);\r\n return true;\r\n }", "@Test\n void checkCanForcePush() {\n assertTrue(abilities.checkCanMove(turn, board.getCellFromCoords(1, 1)));\n }", "private boolean canMove() {\n return !(bestMove[0].getX() == bestMove[1].getX() && bestMove[0].getY() == bestMove[1].getY());\n }", "public boolean canTeleport(Entity t) {\r\n if (getDirection() == Direction.EAST && (t.getLocation().getX() - getLocation().getX()) < 4 && (t.getLocation().getX() - getLocation().getX()) > -1 && (t.getLocation().getY() - getLocation().getY()) == 0) {\r\n return true;\r\n }\r\n if (getDirection() == Direction.WEST && (getLocation().getX() - t.getLocation().getX()) < 4 && (getLocation().getX() - t.getLocation().getX()) > -1 && (t.getLocation().getY() - getLocation().getY()) == 0) {\r\n return true;\r\n }\r\n if (getDirection() == Direction.NORTH && (t.getLocation().getY() - getLocation().getY()) < 4 && (t.getLocation().getY() - getLocation().getY()) > -1 && (t.getLocation().getX() - getLocation().getX()) == 0) {\r\n return true;\r\n }\r\n if (getDirection() == Direction.SOUTH && (getLocation().getY() - t.getLocation().getY()) < 4 && (getLocation().getY() - t.getLocation().getY()) > -1 && (t.getLocation().getX() - getLocation().getX()) == 0) {\r\n return true;\r\n }\r\n return false;\r\n }", "public boolean isWall()\n\t{\n\t\treturn block == Block.HORIZONTAL_WALL || block == Block.VERTICAL_WALL\n\t\t\t\t|| block == Block.BOT_LEFT_TOP_RIGHT_WALL\n\t\t\t\t|| block == Block.BOT_RIGHT_TOP_LEFT_WALL || isGhostGate();\n\t}", "boolean canBuildDome(Tile t);", "@Test\n public void testCanJump() {\n world.add(new Location(2, 2), jumper);\n world.add(new Location(0, 2), rock);\n assertEquals(false, jumper.canJump());\n jumper.turn();\n world.add(new Location(0, 4), flower);\n assertEquals(true, jumper.canJump());\n jumper.jump();\n assertEquals(false, jumper.canJump());\n jumper.turn();\n jumper.turn();\n jumper.turn();\n world.add(new Location(2, 4), jumper2); \n assertEquals(false, jumper.canJump());\n jumper.turn();\n world.add(new Location(2, 2), bug);\n assertEquals(false, jumper.canJump());\n }", "boolean canMoveTo(Vector2d position);", "private boolean verifyBounds() {\r\n\t if((x>RobotController.BOUNDS_X || y>RobotController.BOUNDS_Y)\r\n\t || x<0 || y<0){\r\n\t return false;\r\n\t }\r\n\t return true;\r\n\t }", "boolean testMoveBullet(Tester t) {\n return t.checkExpect(bullet1.move(),\n new Bullet(2, Color.PINK, new MyPosn(250, 292), new MyPosn(0, -8), 1))\n && t.checkExpect(bullet2.move(),\n new Bullet(2, Color.PINK, new MyPosn(650, 650), new MyPosn(50, 50), 1));\n }", "public boolean canMove() {\r\n return (state == State.VULNERABLE || state == State.INVULNERABLE);\r\n\r\n }", "public boolean canMove()\n\t{\n\t\tif(delayMove>compareSpeed())\n\t\t{\n\t\t\tdelayMove=0;\n\t\t\treturn true;\n\t\t\t\n\t\t}else\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t}", "public boolean canMove (Location loc) {\n Grid<Actor> gr = getGrid();\n if (gr == null)\n return false;\n if (!gr.isValid(loc))\n return false;\n Actor neighbor = gr.get(loc);\n return !(neighbor instanceof Wall);\n }", "boolean isMoving();", "private boolean collisionWithHorizontalWall() {\n return (xPos + dx > RIGHT_BORDER || xPos + dx < 0);\n }", "public boolean canGoCurrentTile(String currentObjectName, Direction dir) {\n if (currentObjectName.contains(\"Wall\")) {\n return !currentObjectName.toUpperCase().contains(dir.toString().toUpperCase());\n }\n return true;\n }", "private boolean isLegalPositon(Position checkPosition){\n if (checkPosition.equalPosition(start)||checkPosition.equalPosition(end))\n return true;\n if(checkPosition.getRow()<0 || checkPosition.getCol()<0 || checkPosition.getRow()>=this.rows || checkPosition.getCol() >= this.cols){\n return false;\n }\n\n if(maze[checkPosition.getRow()][checkPosition.getCol()]== WallType.wall){\n return false;\n }\n return true;\n }", "void toyPlacingfStuff(){\n //nu stiu daca asta ramane\n gettingBackToInitial();\n nearingTheWallBefore();\n parallelToTheWall();\n actualToyPlacing();\n }", "@Test\n public void testIsActionable_SecondCornerCase() {\n board.getCell(3, 3).setDome(true);\n board.getCell(4, 3).setDome(true);\n assertFalse(godPower.isActionable(board, player.getWorker1()));\n }", "public boolean canGo(Vector2 pos, Direction dir) {\n String objectName = getObjectNameOnPos(tiledMap, pos);\n if (canGoCurrentTile(objectName, dir)) {\n Vector2 nextPos = getPosInDirection(pos,dir);\n objectName = getObjectNameOnPos(tiledMap, nextPos);\n\n if (objectName.contains(\"Wall\")) {\n return !objectName.toUpperCase().contains(oppositeOf(dir).toString().toUpperCase());\n }\n }\n else {\n return false;\n }\n return true;\n }", "public void checkWallBounce(){\n // Bounce the ball back when it hits the top of screen\n if (getRect().top < 0) {\n reverseYVelocity();\n clearObstacleY(40);\n }\n\n // If the ball hits left wall bounce\n if (getRect().left < 0) {\n reverseXVelocity();\n clearObstacleX(2);\n }\n\n // If the ball hits right wall Velocity\n if (getRect().right > screenX) {\n reverseXVelocity();\n clearObstacleX(screenX - 57);\n }\n }", "public boolean canTravelFromWorld(Player p, MultiverseWorld w) {\n List<String> blackList = w.getWorldBlacklist();\n \n boolean returnValue = true;\n \n for (String s : blackList) {\n if (s.equalsIgnoreCase(p.getWorld().getName())) {\n returnValue = false;\n break;\n }\n }\n \n return returnValue;\n }", "boolean testIsTouchingILoGamePieceShip(Tester t) {\n return t.checkExpect(ship2.isTouching(los2), false)\n && t.checkExpect(ship2.isTouching(lob2), true)\n && t.checkExpect(ship3.isTouching(lob3), true)\n && t.checkExpect(ship3.isTouching(mt), false);\n }", "private boolean isNextToWall(Direction direction){\n switch (direction) {\n case LEFT:\n for (int i = 0; i < walls.size(); i++) {\n Wall wall = walls.get(i);\n if (player.isLeftCollision(wall)) {\n return true;\n }\n }\n return false;\n\n case RIGHT:\n for (int i = 0; i < walls.size(); i++) {\n Wall wall = walls.get(i);\n if (player.isRightCollision(wall)) {\n return true;\n }\n }\n return false;\n\n case UP:\n for (int i = 0; i < walls.size(); i++) {\n Wall wall = walls.get(i);\n if (player.isUpCollision(wall)) {\n return true;\n }\n }\n return false;\n\n case DOWN:\n for (int i = 0; i < walls.size(); i++) {\n Wall wall = walls.get(i);\n if (player.isDownCollision(wall)) {\n return true;\n }\n }\n return false;\n\n default:\n return false;\n\n }\n }", "private boolean isNothingBehind(Direction direction, Box box){\n //TODO wall detection not only boxes\n for(Box temp : boxes){\n switch (direction){\n case DOWN:\n if(temp.getDestinationX()==box.getDestinationX() && box.getDestinationY()+DISTANCE == temp.getDestinationY())\n return false;\n break;\n case UP:\n if(temp.getDestinationX()==box.getDestinationX() && box.getDestinationY()-DISTANCE == temp.getDestinationY())\n return false;\n break;\n case LEFT:\n if(temp.getDestinationY()==box.getDestinationY() && box.getDestinationX()-DISTANCE == temp.getDestinationX())\n return false;\n break;\n case RIGHT:\n if(temp.getDestinationY()==box.getDestinationY() && box.getDestinationX()+DISTANCE == temp.getDestinationX())\n return false;\n break;\n }\n }\n for(Wall temp : walls){\n switch (direction){\n case DOWN:\n if(temp.getDestinationX()==box.getDestinationX() && box.getDestinationY()+DISTANCE == temp.getDestinationY())\n return false;\n break;\n case UP:\n if(temp.getDestinationX()==box.getDestinationX() && box.getDestinationY()-DISTANCE == temp.getDestinationY())\n return false;\n break;\n case LEFT:\n if(temp.getDestinationY()==box.getDestinationY() && box.getDestinationX()-DISTANCE == temp.getDestinationX())\n return false;\n break;\n case RIGHT:\n if(temp.getDestinationY()==box.getDestinationY() && box.getDestinationX()+DISTANCE == temp.getDestinationX())\n return false;\n break;\n }\n }\n return true;\n }", "private boolean seesWall() {\n\t\treturn getFilteredData() <= WALL_DIST;\n\t}", "@Override\n public boolean canMove(double x, double y) {\n double xRec=rectangle.getX();\n double yRec=rectangle.getY();\n rectangle.setLocation((int)(xRec+x*1),(int)(yRec+y*1));\n\n List<Rectangle> staticRectangles= board.getStaticRectangles();\n List<Creature> creatures=board.getCreatures();\n Iterator<Rectangle> itr1=staticRectangles.iterator();\n\n while(itr1.hasNext()){\n Rectangle tmpRectangle =itr1.next();\n if(rectangle.intersects(tmpRectangle)) {\n return false;\n }\n }\n Iterator<Creature> itr2=creatures.iterator();\n while(itr2.hasNext()){\n Creature creature=itr2.next();\n if(creature==this){\n continue;\n }\n else{\n if(rectangle.intersects(creature.getRectangle()))\n return false;\n }\n\n }\n\n return true;\n }", "Boolean can_travel_to(Character character, Town town);", "public boolean canMoveUpIn(GameBoard b) {\n boolean checker = true;\n\n if(this.topLeftY==0) //wall\n checker = false;\n\n if(this.topLeftY>0){//not hitting top wall\n for (int i = 0; i < b.getNumGamePieces(); i++) {//go through game pieces\n if(b.getGamePieces()[i].topLeftY< this.topLeftY){//only checking pieces on above of this.\n if(b.getGamePieces()[i].topLeftY + b.getGamePieces()[i].height == this.topLeftY){//checking if y-axis line up\n if(this.topLeftX>=b.getGamePieces()[i].topLeftX){\n if(b.getGamePieces()[i].topLeftX+ b.getGamePieces()[i].width>this.topLeftX){//checking if x blocks\n checker=false;//then cant move\n break;\n }\n }\n }\n }\n\n\n }\n }return checker;\n\n }", "@Test\n\tpublic void planeCanTakeOff() {\n\t\ttry {\n\t\t\theathrow.landing(tap);\n\t\t} catch (Exception exception) {\n\n\t\t}\n\n\t\ttry {\n\t\t\theathrow.takeoff(tap);\n\t\t} catch (Exception exception) {\n\n\t\t}\n\n\t\tassertEquals(expectedPlanes, heathrow.hangar);\n\t\tassertTrue(heathrow.hangar.isEmpty());\n\t}", "@Test\n\tpublic void testIfForbriddenSelfKillAdvanced(){\n\t\tboard.commitMove(new Point(2,1), 1);\n\t\tboard.commitMove(new Point(3,1), 1);\n\t\tboard.commitMove(new Point(4,2), 1);\n\t\tboard.commitMove(new Point(3,3), 1);\n\t\tboard.commitMove(new Point(3,4), 1);\n\t\tboard.commitMove(new Point(2,5), 1);\n\t\tboard.commitMove(new Point(1,4), 1);\n\t\tboard.commitMove(new Point(1,3), 1);\n\t\tboard.commitMove(new Point(1,2), 1);\n\t\t\n\t\tboard.commitMove(new Point(2,4), 0);\n\t\tboard.commitMove(new Point(2,3), 0);\n\t\tassertEquals(0, board.commitMove(new Point(2,2), 0));\n\t\tassertNotEquals(0,board.commitMove(new Point(3,2), 0));\n//\t\tboard.printBoard();\n\t}", "boolean testIsTouchingShip(Tester t) {\n return t.checkExpect(\n this.ship1.isTouching(new Bullet(7, Color.PINK, new MyPosn(1, 150), this.p7, 2)), true)\n && t.checkExpect(ship4.isTouching(bullet3), true)\n && t.checkExpect(ship5.isTouching(bullet3), true)\n && t.checkExpect(ship6.isTouching(bullet3), true)\n && t.checkExpect(ship7.isTouching(bullet3), true)\n && t.checkExpect(ship7.isTouching(bullet1), false)\n && t.checkExpect(ship8.isTouching(bullet1), false)\n && t.checkExpect(ship9.isTouching(bullet4), true)\n && t.checkExpect(ship9.isTouching(bullet5), false)\n && t.checkExpect(ship9.isTouching(ship9), false);\n }", "@Test\n\tpublic void testTCannotMoveLeft() {\n\t\ttank.InabilityToMoveLeft();\n\t\tassertEquals(false, tank.getLeft());\n\t}", "@Override\n\tpublic boolean CheckMovingRules(Board testBoard,int target_x_pos, int target_y_pos) {\n\t\treturn ((target_x_pos-cur_x_pos==1)&&(target_y_pos-cur_y_pos==2))||((target_x_pos-cur_x_pos==2)&&(target_y_pos-cur_y_pos==1))||\n\t\t\t\t((target_x_pos-cur_x_pos==2)&&(target_y_pos-cur_y_pos==-1))||((target_x_pos-cur_x_pos==1)&&(target_y_pos-cur_y_pos==-2))||\n\t\t\t\t((target_x_pos-cur_x_pos==-1)&&(target_y_pos-cur_y_pos==2))||((target_x_pos-cur_x_pos==-1)&&(target_y_pos-cur_y_pos==-2))||\n\t\t\t\t((target_x_pos-cur_x_pos==-2)&&(target_y_pos-cur_y_pos==1))||((target_x_pos-cur_x_pos==-2)&&(target_y_pos-cur_y_pos==-1));\n\t}", "private boolean checkWallAhead(WorldSpatial.Direction orientation, HashMap<Coordinate, MapTile> currentView){\n\t\t\tswitch(orientation){\n\t\t\tcase EAST:\n\t\t\t\treturn checkEast(currentView);\n\t\t\tcase NORTH:\n\t\t\t\treturn checkNorth(currentView);\n\t\t\tcase SOUTH:\n\t\t\t\treturn checkSouth(currentView);\n\t\t\tcase WEST:\n\t\t\t\treturn checkWest(currentView);\n\t\t\tdefault:\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}", "boolean testHandleCollisions(Tester t) {\n return t.checkExpect(new NBullets(10).handleCollisions(), new NBullets(10))\n && t.checkExpect(new NBullets(this.mt, this.los3, 3, 2, 40).handleCollisions(),\n new NBullets(this.mt, this.los3, 3, 2, 40))\n && t.checkExpect(new NBullets(this.lob3, this.mt, 3, 2, 40).handleCollisions(),\n new NBullets(this.lob3, this.mt, 3, 2, 40))\n && t.checkExpect(new NBullets(this.lob4, this.los4, 5, 5, 0).handleCollisions(),\n new NBullets(this.lob4.explodeTouchers(this.los4),\n new ConsLoGamePiece(this.ship1, this.mt), 5, 8, 0));\n }", "private boolean checkWallAhead(WorldSpatial.Direction orientation, HashMap<Coordinate, MapTile> currentView){\n\t\tswitch(orientation){\n\t\tcase EAST:\n\t\t\treturn checkEast(currentView);\n\t\tcase NORTH:\n\t\t\treturn checkNorth(currentView);\n\t\tcase SOUTH:\n\t\t\treturn checkSouth(currentView);\n\t\tcase WEST:\n\t\t\treturn checkWest(currentView);\n\t\tdefault:\n\t\t\treturn false;\n\t\t\n\t\t}\n\t}", "public void explore() {\n\t\t\tif(getSpeed() < CAR_MAX_SPEED){ // Need speed to turn and progress toward the exit\n\t\t\t\tapplyForwardAcceleration(); // Tough luck if there's a wall in the way\n\t\t\t}\n\t\t\tif (isFollowingWall) {\n\t\t\t\t// if already been to this tile, stop following the wall\n\t\t\t\tif (travelled.contains(new Coordinate(getPosition()))) {\n\t\t\t\t\tisFollowingWall = false;\n\t\t\t\t} else {\n\t\t\t\t\tif(!checkFollowingWall(getOrientation(), map)) {\n\t\t\t\t\t\tturnLeft();\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// If wall on left and wall straight ahead, turn right\n\t\t\t\t\t\tif(checkWallAhead(getOrientation(), map)) {\n\t\t\t\t\t\t\tif (!checkWallRight(getOrientation(), map))\t{\n\t\t\t\t\t\t\t\tturnRight();\n\t\t\t\t\t\t\t\tisFollowingWall = true;\n\t\t\t\t\t\t\t} else if (!checkWallLeft(getOrientation(), map)){\n\t\t\t\t\t\t\t\tturnLeft();\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tapplyReverseAcceleration();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// Start wall-following (with wall on left) as soon as we see a wall straight ahead\n\t\t\t\tif(checkWallAhead(getOrientation(), map)) {\n\t\t\t\t\tif (!checkWallRight(getOrientation(), map) && !checkWallLeft(getOrientation(), map)) {\n\t\t\t\t\t\t// implementing some randomness so doesn't get stuck in loop\n\t\t\t\t\t\tRandom rand = new Random();\n\t\t\t\t\t\tint n = rand.nextInt(2);\n\t\t\t\t\t\tif (n==0) {\n\t\t\t\t\t\t\tturnLeft();\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tturnRight();\n\t\t\t\t\t\t\tisFollowingWall = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if (!checkWallRight(getOrientation(), map))\t{\n\t\t\t\t\t\tturnRight();\n\t\t\t\t\t\tisFollowingWall = true;\n\t\t\t\t\t} else if (!checkWallLeft(getOrientation(), map)){\n\t\t\t\t\t\tturnLeft();\n\t\t\t\t\t} else {\n\t\t\t\t\t\tapplyReverseAcceleration();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}", "private void checkBulletWallCollision() {\n\t\tArrayList<Missile> heroMissiles = hero.getMissiles();\n\t\tArrayList<Missile> hero2Missile = computer.getMissiles();\n\n\t\tdouble x1Wall, y1Wall, x2Wall, y2Wall, x1Bullet, y1Bullet, x2Bullet, y2Bullet;\n\t\tboolean left, right, top, bottom;\n\n\t\t// tank 1 bullets and wall collision\n\t\tfor (int i = 0; i < heroMissiles.size(); i++) {\n\t\t\tMissile m1 = heroMissiles.get(i);\n\t\t\tif (m1 == null) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tRectangle r2b = m1.getBounds();\n\t\t\tfor (int j = 0; j < wallArray.size(); j++) {\n\t\t\t\tWall w1 = wallArray.get(j);\n\t\t\t\tRectangle r2w = w1.getBounds();\n\n\t\t\t\tx1Wall = r2w.getMinX();\n\t\t\t\ty1Wall = r2w.getMinY();\n\t\t\t\tx2Wall = r2w.getMaxX();\n\t\t\t\ty2Wall = r2w.getMaxY();\n\n\t\t\t\tx1Bullet = r2b.getMinX();\n\t\t\t\ty1Bullet = r2b.getMinY();\n\t\t\t\tx2Bullet = r2b.getMaxX();\n\t\t\t\ty2Bullet = r2b.getMaxY();\n\n\t\t\t\tleft = (x2Bullet < x1Wall);\n\t\t\t\tright = (x2Wall < x1Bullet);\n\t\t\t\ttop = (y2Bullet < y1Wall);\n\t\t\t\tbottom = (y2Wall < y1Bullet);\n\n\t\t\t\tif ((left && !right && top && !bottom) || (!left && right && top && !bottom)\n\t\t\t\t\t\t|| (left && !right && !top && bottom) || (!left && right && !top && bottom)) {\n\t\t\t\t} else if (left && !right && !top && !bottom) {\n\t\t\t\t\tdouble leftDist = x1Wall - x2Bullet;\n\t\t\t\t\tif (leftDist < 2) {\n\t\t\t\t\t\tm1.setAngle(180 - (m1.getAngle()));\n\t\t\t\t\t\tm1.setReflected(true);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t} else if (!left && right && !top && !bottom) {\n\t\t\t\t\tdouble rightDist = x1Bullet - x2Wall;\n\t\t\t\t\tif (rightDist < 2) {\n\t\t\t\t\t\tm1.setAngle(180 - (m1.getAngle()));\n\t\t\t\t\t\tm1.setReflected(true);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t} else if (!left && !right && top && !bottom) {\n\t\t\t\t\tdouble topDist = y1Wall - y2Bullet;\n\t\t\t\t\tif (topDist < 2) {\n\t\t\t\t\t\tm1.setAngle(-(m1.getAngle()));\n\t\t\t\t\t\tm1.setReflected(true);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t} else if (!left && !right && !top && bottom) {\n\t\t\t\t\tdouble bottomDist = y1Bullet - y2Wall;\n\t\t\t\t\tif (bottomDist < 2) {\n\t\t\t\t\t\tm1.setAngle(-(m1.getAngle()));\n\t\t\t\t\t\tm1.setReflected(true);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// tank 2 bullets and wall collision\n\t\tfor (int i = 0; i < hero2Missile.size(); i++) {\n\t\t\tMissile m1 = hero2Missile.get(i);\n\t\t\tif (m1 == null) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tRectangle r2b = m1.getBounds();\n\t\t\tfor (int j = 0; j < wallArray.size(); j++) {\n\t\t\t\tWall w1 = wallArray.get(j);\n\t\t\t\tRectangle r2w = w1.getBounds();\n\n\t\t\t\tx1Wall = r2w.getMinX();\n\t\t\t\ty1Wall = r2w.getMinY();\n\t\t\t\tx2Wall = r2w.getMaxX();\n\t\t\t\ty2Wall = r2w.getMaxY();\n\n\t\t\t\tx1Bullet = r2b.getMinX();\n\t\t\t\ty1Bullet = r2b.getMinY();\n\t\t\t\tx2Bullet = r2b.getMaxX();\n\t\t\t\ty2Bullet = r2b.getMaxY();\n\n\t\t\t\tleft = (x2Bullet < x1Wall);\n\t\t\t\tright = (x2Wall < x1Bullet);\n\t\t\t\ttop = (y2Bullet < y1Wall);\n\t\t\t\tbottom = (y2Wall < y1Bullet);\n\n\t\t\t\tif ((left && !right && top && !bottom) || (!left && right && top && !bottom)\n\t\t\t\t\t\t|| (left && !right && !top && bottom) || (!left && right && !top && bottom)) {\n\t\t\t\t} else if (left && !right && !top && !bottom) {\n\t\t\t\t\tdouble leftDist = x1Wall - x2Bullet;\n\t\t\t\t\tif (leftDist < 2) {\n\t\t\t\t\t\tm1.setAngle(180 - (m1.getAngle()));\n\t\t\t\t\t\tm1.setReflected(true);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t} else if (!left && right && !top && !bottom) {\n\t\t\t\t\tdouble rightDist = x1Bullet - x2Wall;\n\t\t\t\t\tif (rightDist < 2) {\n\t\t\t\t\t\tm1.setAngle(180 - (m1.getAngle()));\n\t\t\t\t\t\tm1.setReflected(true);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t} else if (!left && !right && top && !bottom) {\n\t\t\t\t\tdouble topDist = y1Wall - y2Bullet;\n\t\t\t\t\tif (topDist < 2) {\n\t\t\t\t\t\tm1.setAngle(-(m1.getAngle()));\n\t\t\t\t\t\tm1.setReflected(true);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t} else if (!left && !right && !top && bottom) {\n\t\t\t\t\tdouble bottomDist = y1Bullet - y2Wall;\n\t\t\t\t\tif (bottomDist < 2) {\n\t\t\t\t\t\tm1.setAngle(-(m1.getAngle()));\n\t\t\t\t\t\tm1.setReflected(true);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public void checkWallCollision(Wall wall) {\n\t\t// check to see if enemy is colliding with wall.\n\t\t// Log.d(TAG,\"Front of character: \" + (x+xSpeed+width) +\n\t\t// \", edge of wall: \" + wall.getX());\n\t\t// check if at wall only when checking isDestroyed (for true value). if\n\t\t// moving and wall is destroyed won't pass first if check and won't ever\n\t\t// get set to atWall\n\t\tif (Rect.intersects(new Rect(x + xSpeed, y - (height + ySpeed), x\n\t\t\t\t+ width + xSpeed, y - ySpeed), wall.getStructure())\n\t\t\t\t&& enemyState == EnemyState.moving && !wall.isDestroyed()) {\n\t\t\tLog.d(TAG, \"Enemy x: \" + x);\n\t\t\tint diff = (x + xSpeed) - (wall.getX() + wall.getWidth());\n\t\t\tLog.d(TAG, \"Difference: \" + diff);\n\t\t\tx += xSpeed - diff;\n\t\t\tLog.d(TAG, \"Enemy new x: \" + x);\n\t\t\tLog.d(TAG, \"Edge of wall: \" + (wall.getX() + wall.getWidth()));\n\t\t\tthis.setEnemyState(EnemyState.atWall);\n\t\t} else if (Rect.intersects(new Rect(x + xSpeed, y - (height + ySpeed),\n\t\t\t\tx + width + xSpeed, y - ySpeed), wall.getStructure())\n\t\t\t\t&& enemyState == EnemyState.atWall && wall.isDestroyed()) {\n\t\t\tthis.setEnemyState(EnemyState.moving);\n\t\t}\n\t}", "public int canPoseBombAndStillBeSafe() {\n Player currentPlayer = state.getCurrentPlayer();\n List<Player> players = state.getPlayers();\n Maze maze = state.getMaze();\n Cell[][] tabcells = maze.getCells();\n for (Player p : players) {\n if (!p.equals(currentPlayer)) {\n if (canBombThisEnemyAndRunSafe(currentPlayer,p)) {\n return 1;\n }\n }\n }\n return 0;\n }", "public boolean isWallDetected(Block block, Player player) {\n if (TownyAPI.getInstance().getTownBlock(block.getLocation()) == null) {\n if (player != null) {\n player.sendMessage(ChatColor.RED + \"The wall must be built in claimed territory.\");\n }\n return false; // Exit if it's not within a claimed territory\n }\n\n int count = 0;\n int maxCount = 384;\n boolean checked = false;\n while (count <= maxCount) {\n if (block.getY() + count <= 300) {\n Block targetAbove = block.getWorld().getBlockAt(block.getX(), block.getY() + count, block.getZ());\n if (isValidWallBlock(targetAbove)) return true;\n checked = true;\n }\n\n if (block.getY() - count >= -64) {\n Block targetBelow = block.getWorld().getBlockAt(block.getX(), block.getY() - count, block.getZ());\n if (isValidWallBlock(targetBelow)) return true;\n checked = true;\n }\n\n if(!checked) return false;\n count += 2;\n }\n return false;\n }", "public boolean canMoveCondition(Coordinates coordinates) {\n Tile tile = TextRpg.currentRoom().getTile(coordinates);\n return !tile.isSolid();\n }", "public boolean canMove(Location loc){\n if(loc.getX() >= theWorld.getX() || loc.getX() < 0){\n System.out.println(\"cant move1\");\n return false;\n }else if(loc.getY() >= theWorld.getY() || loc.getY() < 0){\n System.out.println(\"cant move2\");\n return false;\n }else{\n System.out.println(\"can move\");\n return true;\n }\n }", "public boolean candrawandstep(){\n if(y<Main.frame.getHeight()/7 && mass>2) yspeed *= -1;\n x += 2*xspeed;\n y += 2*yspeed;\n if((x<0 || x>2*Main.game.getWidth()) || (y<0 || y>Main.game.getHeight()))\n return false;\n else\n return true;\n }", "public boolean didHitMazeWall() {\n if (!SnakeGame.getHasMazeWalls()) { return false; }\n // AMD: has the snake hit the maze wall?\n boolean didHit = false;\n //MazeWall mw = DrawSnakeGamePanel.mw1;\n for (MazeWall mw : DrawSnakeGamePanel.getGameWalls()) {\n // AMD: our decision depends partly on the snake's direction & partly on the line's orientation\n switch (currentHeading) {\n case DIRECTION_UP: {\n if (mw.getV_or_h() == 'h' && mw.getGridX() == this.snakeHeadX && mw.getGridY() == this.snakeHeadY) {\n didHit = true;\n }\n break;\n }\n case DIRECTION_DOWN: {\n if (mw.getV_or_h() == 'h' && mw.getGridX() == this.snakeHeadX && mw.getGridY() == this.snakeHeadY + 1) {\n didHit = true;\n }\n break;\n }\n case DIRECTION_LEFT: {\n if (mw.getV_or_h() == 'v' && mw.getGridX() == this.snakeHeadX && mw.getGridY() == this.snakeHeadY) {\n didHit = true;\n }\n break;\n }\n case DIRECTION_RIGHT: {\n if (mw.getV_or_h() == 'v' && mw.getGridX() == this.snakeHeadX + 1 && mw.getGridY() == this.snakeHeadY) {\n didHit = true;\n }\n break;\n }\n default: {\n //FINDBUGS: another switch case with no default. This one is fine, four clear situations.\n // Ultimately, shouldn't get here: leave something here that can be turned on for debugging:\n // System.out.println(\"Invalid direction detected in Snake.didhitmazewall()!\");\n break;\n }\n }\n // if the current wall under consideration has been hit, we need to exit the loop.\n if (didHit) { break; }\n }\n return didHit;\n }", "private final boolean isInsideWorld() {\n\t\t// Check it is inside the world\n\t\tif (x<=0 || y<=0 || x+width>=_world.getWidth() || y+height>=_world.getHeight()) {\n\t\t\tif (_mass == 0 && alive && x == 0 && y == 0)\n\t\t\t\tdie(this);\n\t\t\t// Adjust direction\n\t\t\tif (x <= 0 || x + width >= _world.getWidth())\n\t\t\t\tdx = -dx;\n\t\t\tif (y <= 0 || y + height >= _world.getHeight())\n\t\t\t\tdy = -dy;\n\t\t\tdtheta = 0;\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "public boolean isLegalStep(MoveDirection dir){\r\n GamePosition curPos = currentGame.getCurrentPosition();\n\t\tPlayer white = currentGame.getWhitePlayer();\n\t\tint[] toCheckPos = new int[2];\n\t\tint[] existingPos = new int[2];\n\t\tif(curPos.getPlayerToMove().equals(white)) {\n\t\t\ttoCheckPos[0] = curPos.getWhitePosition().getTile().getColumn();\n\t\t\ttoCheckPos[1] = curPos.getWhitePosition().getTile().getRow();\n\t\t\t\n\t\t\texistingPos[0] = curPos.getBlackPosition().getTile().getColumn();\n\t\t\texistingPos[1] = curPos.getBlackPosition().getTile().getRow();\n\t\t\t\n\t\t} else {\n\t\t\ttoCheckPos[0] = curPos.getBlackPosition().getTile().getColumn();\n\t\t\ttoCheckPos[1] = curPos.getBlackPosition().getTile().getRow();\n\t\t\t\n\t\t\texistingPos[0] = curPos.getWhitePosition().getTile().getColumn();\n\t\t\texistingPos[1] = curPos.getWhitePosition().getTile().getRow();\n\t\t}\n\t\t//0 = column, 1 = row\n\t\tif(dir == MoveDirection.North) {\n\t\t\tif(toCheckPos[1] == 1) return false;\n\t\t\tif(toCheckPos[1] - 1 == existingPos[1] && toCheckPos[0] == existingPos[0]) return false;\n\t\t\treturn QuoridorController.noWallBlock(curPos.getPlayerToMove(), -1, 0);\n\t\t} else if(dir == MoveDirection.South) {\n\t\t\tif(toCheckPos[1] == 9) return false;\n\t\t\tif(toCheckPos[1] + 1 == existingPos[1] && toCheckPos[0] == existingPos[0]) return false;\n\t\t\treturn QuoridorController.noWallBlock(curPos.getPlayerToMove(), 1, 0);\n\t\t} else if(dir == MoveDirection.East) {\n\t\t\tif(toCheckPos[0] == 9) return false;\n\t\t\tif(toCheckPos[0] + 1 == existingPos[0] && toCheckPos[1] == existingPos[1]) return false;\n\t\t\treturn QuoridorController.noWallBlock(curPos.getPlayerToMove(), 0, 1);\n\t\t} else if(dir == MoveDirection.West) {\n\t\t\tif(toCheckPos[0] == 1) return false;\n\t\t\tif(toCheckPos[0] - 1 == existingPos[0] && toCheckPos[1] == existingPos[1]) return false;\n\t\t\treturn QuoridorController.noWallBlock(curPos.getPlayerToMove(), 0, -1);\n\t\t}\n\t\t\n\t\treturn false;\r\n }" ]
[ "0.6568437", "0.64619356", "0.6418483", "0.63583666", "0.6306924", "0.6303836", "0.6299335", "0.62828255", "0.6272086", "0.6249702", "0.62389207", "0.61633205", "0.6102159", "0.6090448", "0.60867757", "0.6054542", "0.60428876", "0.6005512", "0.5965378", "0.5963322", "0.59376395", "0.5927515", "0.59238744", "0.5917527", "0.59001637", "0.5863667", "0.58427423", "0.584218", "0.5836847", "0.5830395", "0.5823252", "0.58232456", "0.58204913", "0.58097196", "0.5800804", "0.57950985", "0.57836336", "0.57803726", "0.577948", "0.5773305", "0.5755605", "0.57470995", "0.57436436", "0.574195", "0.5729549", "0.5724865", "0.57185334", "0.57129836", "0.5707898", "0.5706277", "0.57008797", "0.56930244", "0.568237", "0.56783634", "0.56769025", "0.56674385", "0.5660969", "0.5644196", "0.5625398", "0.56199616", "0.56176054", "0.56143993", "0.5596911", "0.55966526", "0.55909985", "0.5578489", "0.55752873", "0.5559964", "0.55528307", "0.55480254", "0.55395216", "0.55354446", "0.5520152", "0.5519653", "0.5515502", "0.55144674", "0.5514121", "0.5513626", "0.5512016", "0.55055916", "0.5502606", "0.5498484", "0.5494479", "0.54926145", "0.5488282", "0.5483911", "0.54734886", "0.54732877", "0.54710674", "0.5463846", "0.5463278", "0.54581255", "0.5454228", "0.54530185", "0.54478514", "0.5445826", "0.5442656", "0.54425704", "0.5441256", "0.54376966" ]
0.5722863
46
public abstract boolean isTouching();
public abstract double readLightValue();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Boolean isTouchable();", "public final boolean isTouching(Shape shape) {\n\t\t// TODO: write this function.\n\t\treturn false;\n\t}", "public boolean getIsTouchEnabled() {\r\n\t\treturn isTouchEnabled;\r\n\t}", "@Override\n public boolean onTouchEvent(MotionEvent e) {\n return gestureDetector.onTouchEvent(e);\n }", "@Override\n public boolean onTouchEvent( MotionEvent event )\n {\n if ( gesture_detector.onTouchEvent( event ) )\n {\n return true;\n }\n else\n {\n return super.onTouchEvent( event );\n }\n }", "@Override\n\t\t\tpublic boolean onTouch(View arg0, MotionEvent arg1) {\n\t\t\t\treturn true;\n\t\t\t}", "@Override\n public boolean onTouchEvent(MotionEvent event)\n {\n return gestureDetector.onTouchEvent(event);\n }", "@Override\r\n public boolean onTouch(View v, MotionEvent event) {\n\treturn mGestureDetector.onTouchEvent(event);\r\n }", "@Override\n public boolean dispatchTouchEvent(MotionEvent ev) {\n return DefaultApplication.isWaiting() ? false : super.dispatchTouchEvent(ev);\n }", "public abstract boolean isTarget();", "@Override\r\n\tpublic boolean onTouchEvent(final MotionEvent e) {\n\t\t\r\n\t\treturn true;\r\n\t}", "public abstract boolean isHit(int x, int y);", "boolean wasHit();", "boolean onGestureStarted();", "@Override\n public boolean onTouchEvent(MotionEvent ev) {\n return mDetector.onTouchEvent(ev) || super.onTouchEvent(ev);\n }", "@Override\r\n\t\tpublic boolean onTouchEvent(MotionEvent event) {\n\r\n\t\t\treturn true;\r\n\t\t}", "boolean isShutterPressed();", "@Override\r\n public boolean onTouchEvent(MotionEvent event) {\n return super.onTouchEvent(event);\r\n }", "boolean testTouching(Tester t) {\n return t.checkExpect(this.p5.touching(p6, 8), false)\n && t.checkExpect(new MyPosn(13, 6).touching(new MyPosn(6, 6), 7), true)\n && t.checkExpect(new MyPosn(6, 13).touching(new MyPosn(6, 6), 7), true)\n && t.checkExpect(new MyPosn(5, 6).touching(new MyPosn(6, 6), 5), true)\n && t.checkExpect(new MyPosn(6, 3).touching(new MyPosn(6, 6), 8), true)\n && t.checkExpect(new MyPosn(6, 6).touching(new MyPosn(13, 6), 7), true)\n && t.checkExpect(new MyPosn(6, 6).touching(new MyPosn(6, 13), 7), true);\n }", "@Override\n\tpublic boolean onTouchEvent(MotionEvent event) {\n\n\t\treturn super.onTouchEvent(event);\n\t}", "@Override\n public boolean onTouch(View view, MotionEvent motionEvent) {\n return true;\n }", "@Override\n public boolean onTouch(View view, MotionEvent motionEvent) {\n return true;\n }", "void setTouchable(Boolean touchable);", "@Override\n public boolean onTouchEvent (MotionEvent me){\n detector.onTouchEvent(me);\n return super.onTouchEvent(me);\n }", "public boolean onTouchEvent(MotionEvent event) {\n if (gestureDetector.onTouchEvent(event))\n return true;\n else\n return false;\n }", "@Override\n public boolean isTouching(Sprite other)\n {\n return Rect.intersects(other.spriteBounds, this.spriteBounds);\n }", "@Override\n public boolean onTouch(View view, MotionEvent motionEvent) {\n return true;\n }", "protected boolean checkTouch(){\n\t\ttouchPixelX = getTouchPixelX();\n\t\ttouchPixelY = getTouchPixelY();\n\t\n\t\t/*for (int i=0; i<itemsAll.size(); i++){\n\t\t\t//currentTouch pointer used to mark Item2D we will be testing against\n\t\t\tcheckTouchObject = itemsAll.get(i);\n\t\t\t//Call GUIItem's checkTouch method to see if the GUIItem has been touched\n\t\t\tif (checkTouchObject.checkTouch(touchPixelX,touchPixelY)){\n\t\t\t\t//Warning. Warning. GUIItem is hit. All hands on deck\n\t\t\t\t\n\t\t\t\t//Set the touchedObject pointer for future reference\n\t\t\t\ttouchObject = checkTouchObject;\n\t\t\t\t\n\t\t\t\tcheckTouchObject = null;\n\t\t\t\t\n\t\t\t\t//Set boolean to indicate that a GUIItem is touched\n\t\t\t\tonTouch = true;\n\t\t\t\t\n\t\t\t\t//Return true, a GUIItem has been touched\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}*/\n\t\t\n\t\tcheckTouchObject = null;\n\t\t\n\t\t//Return false, a GUIItem has not been touched\n\t\treturn false;\n\t}", "public boolean isTouched() {\n return touched;\n }", "@Override\n public boolean onTouchEvent(MotionEvent event) {\n int action = event.getActionMasked(); // event type\n int actionIndex = event.getActionIndex(); // pointer (i.e., finger)\n\n // determine which type of action the given MotionEvent\n // represents, then call the corresponding handling method\n if (action == MotionEvent.ACTION_DOWN ||\n action == MotionEvent.ACTION_POINTER_DOWN)\n {\n touchStarted(event.getX(actionIndex), event.getY(actionIndex),\n event.getPointerId(actionIndex));\n } // end if\n else if (action == MotionEvent.ACTION_UP ||\n action == MotionEvent.ACTION_POINTER_UP)\n {\n touchEnd(event.getPointerId(actionIndex));\n } // end else if\n else\n {\n touchMoved(event);\n } // end else\n\n invalidate(); // redraw\n return true; // consume the touch event\n }", "@Override\r\n\tpublic boolean onTouch(View v, MotionEvent event) {\n\t\t\r\n\t\treturn this.mGestureDetector.onTouchEvent( event );\r\n\t}", "@Override\n\tpublic boolean onTouch(View v, MotionEvent event) {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean onTouch(View v, MotionEvent event) {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean onTouch(View v, MotionEvent event) {\n\t\treturn false;\n\t}", "private boolean isTouching(Coord c1, Coord c2) {\n\t\tif (Math.abs(c1.x-c2.x) <=2 && Math.abs(c1.y-c2.y) <=2) {\n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t\treturn false;\n\t}", "@Override\n\t\t\tpublic boolean onTouch(View v, MotionEvent event) {\n\t\t\t\treturn false;\n\t\t\t}", "@Override\r\n\tpublic boolean onTouchEvent(MotionEvent event) {\n\t\treturn false;\r\n\t}", "@Override\n public boolean onTouchEvent(final MotionEvent event) {\n final Scene scene = mScene;\n if (!mEnabled || scene == null) {\n return false;\n }\n\n final int action = event.getActionMasked();\n final int pointerIndex = (event.getAction() & MotionEvent.ACTION_POINTER_INDEX_MASK) >> MotionEvent.ACTION_POINTER_INDEX_SHIFT;\n final PointF touchedPoint = scene.getTouchedPoint(pointerIndex);\n\n if (action == MotionEvent.ACTION_DOWN || action == MotionEvent.ACTION_POINTER_DOWN) {\n if (!mFocus && hitTest(touchedPoint.x, touchedPoint.y)) {\n // keep pointer id\n mTouchPointerID = event.getPointerId(pointerIndex);\n // flag focus\n mFocus = true;\n setState(STATE_DOWN);\n\n // event\n if (mTouchListener != null) {\n mTouchListener.onTouchDown(this);\n }\n\n // take control\n return true;\n }\n } else if (action == MotionEvent.ACTION_UP || action == MotionEvent.ACTION_POINTER_UP) {\n if (mFocus && event.getPointerId(pointerIndex) == mTouchPointerID) {\n mTouchPointerID = -1;\n // unflag focus\n mFocus = false;\n\n // hit test\n final boolean hit = hitTest(touchedPoint.x, touchedPoint.y);\n // local callback\n onTouchUp(hit);\n\n setState(STATE_UP);\n\n // event\n if (mTouchListener != null) {\n mTouchListener.onTouchUp(this, hit);\n }\n if (hit) {\n // take control\n return true;\n }\n }\n } else if (action == MotionEvent.ACTION_MOVE) {\n final int touchPointerIndex = event.findPointerIndex(mTouchPointerID);\n if (mFocus && touchPointerIndex >= 0) {\n final PointF movePoint = scene.getTouchedPoint(touchPointerIndex);\n if (hitTest(movePoint.x, movePoint.y)) {\n setState(STATE_DOWN);\n } else {\n setState(STATE_UP);\n }\n }\n }\n\n return false;\n }", "@Override\n public boolean onGenericMotionEvent(MotionEvent event) {\n return mGestureDetector.onMotionEvent(event)\n || super.onGenericMotionEvent(event);\n }", "@Override\n public boolean onTouch(View v, MotionEvent event) {\n return timerActive;\n }", "@Override\n public boolean onTouch(View v, MotionEvent event) {\n return false;\n }", "public interface AidTouchListener {\n public void start();\n}", "@SuppressLint(\"ClickableViewAccessibility\")\n @Override\n public boolean onTouchEvent(MotionEvent event) {\n return true;\n }", "@Override\n\tpublic boolean onTouchEvent(MotionEvent event) {\n\t\treturn false;\n\t}", "@Override\r\n\tpublic boolean isTouchLeftDown() {\n\t\treturn false;\r\n\t}", "@Override\r\n\t\t\t\t\tpublic boolean onTouch(View v, MotionEvent event) {\n\t\t\t\t\t\t\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t}", "@Override\n\tpublic boolean onTouchEvent(MotionEvent event) {\n\t\treturn this.gdDetector.onTouchEvent(event);\n\t}", "@Override\n public boolean onTouchEvent(MotionEvent event) {\n return false;\n }", "@Override\n public boolean onTouchEvent(MotionEvent event) {\n return false;\n }", "public interface TouchAware {\n\n /**\n * Is this component touch enabled?\n *\n * @return false to disable\n */\n Boolean isTouchable();\n\n /**\n * Enable/disable touch support for this component.\n *\n * @param touchable true for touch support\n */\n void setTouchable(Boolean touchable);\n\n}", "@SuppressLint(\"ClickableViewAccessibility\")\n @Override\n public boolean onTouchEvent(MotionEvent event) {\n return gestureHandler.onTouchEvent(event);\n }", "public boolean isShooting()\r\n\t{\r\n\t\treturn false;\r\n\t}", "public boolean isTouchOnTargetView(MotionEvent event) {\n return this.mTargetTouchable && this.mTarget.getBounds().contains((int) event.getX(), (int) event.getY());\n }", "public boolean onTouchEvent(MotionEvent event) {\n\n int action = MotionEventCompat.getActionMasked(event);\n\n switch (action) {\n case (MotionEvent.ACTION_DOWN):\n\n return true;\n case (MotionEvent.ACTION_MOVE):\n\n return true;\n case (MotionEvent.ACTION_UP):\n\n return true;\n case (MotionEvent.ACTION_CANCEL):\n\n return true;\n case (MotionEvent.ACTION_OUTSIDE):\n\n return true;\n default:\n return super.onTouchEvent(event);\n }\n }", "@Override\n public boolean onTouchEvent(MotionEvent event) {\n manager.receiveTouch(event);\n\n return true;\n }", "@Override\n public boolean onTouchEvent(MotionEvent event) {\n\n if (!isEnabled())\n return false;\n\n int pointerIndex;\n\n final int action = event.getAction();\n switch (action & MotionEvent.ACTION_MASK) {\n\n case MotionEvent.ACTION_DOWN:\n // Remember where the motion event started\n mActivePointerId = event.getPointerId(event.getPointerCount() - 1);\n pointerIndex = event.findPointerIndex(mActivePointerId);\n mDownMotionX = event.getX(pointerIndex);\n mDownMotionY = event.getY(pointerIndex);\n\n hotspotPressed = evalPressedHotspot(mDownMotionX, mDownMotionY);\n\n // Only handle hotspot presses.\n if (hotspotPressed == null)\n return super.onTouchEvent(event);\n\n setPressed(true);\n onStartTrackingTouch();\n trackTouchEvent(event, MotionState.DOWN);\n attemptClaimDrag();\n invalidate();\n break;\n case MotionEvent.ACTION_MOVE:\n if (hotspotPressed != null) {\n if (mIsDragging) {\n trackTouchEvent(event, MotionState.MOVING);\n } else {\n // Scroll to follow the motion event\n pointerIndex = event.findPointerIndex(mActivePointerId);\n final double x = event.getX(pointerIndex);\n\n if (Math.abs(x - mDownMotionX) > mScaledTouchSlop) {\n setPressed(true);\n onStartTrackingTouch();\n trackTouchEvent(event, MotionState.MOVING);\n attemptClaimDrag();\n }\n }\n invalidate();\n }\n break;\n case MotionEvent.ACTION_UP:\n if (mIsDragging) {\n trackTouchEvent(event, MotionState.UP);\n onStopTrackingTouch();\n setPressed(false);\n } else {\n // Touch up when we never crossed the touch slop threshold\n // should be interpreted as a tap-seek to that location.\n onStartTrackingTouch();\n trackTouchEvent(event, MotionState.UP);\n onStopTrackingTouch();\n }\n\n invalidate();\n hotspotPressed = null;\n break;\n case MotionEvent.ACTION_POINTER_DOWN: {\n final int index = event.getPointerCount() - 1;\n // final int index = ev.getActionIndex();\n mDownMotionX = event.getX(index);\n mActivePointerId = event.getPointerId(index);\n invalidate();\n break;\n }\n case MotionEvent.ACTION_POINTER_UP:\n onSecondaryPointerUp(event);\n invalidate();\n break;\n case MotionEvent.ACTION_CANCEL:\n if (mIsDragging) {\n onStopTrackingTouch();\n setPressed(false);\n }\n invalidate(); // see above explanation\n break;\n }\n return true;\n }", "@Override\n public boolean onTouchEvent(MotionEvent event) {\n int action = event.getAction();\n tb.tbOnTouch(action);\n return true;\n }", "@Override\r\n\t\tpublic boolean onTouchPen(View arg0, MotionEvent arg1) {\n\t\t\treturn false;\r\n\t\t}", "@Override\n public boolean onTouch(View v, MotionEvent event) {\n return false;\n }", "@Override\n\tpublic boolean takeControl() {\n\t\treturn (touch_r.isPressed() || touch_l.isPressed());\n\t}", "@Override\n public void touch()\n {\n\n }", "abstract boolean getIsDragging();", "@Override\n public boolean onTouch(View view, MotionEvent me){\n game.onTouch(me);\n return false;\n }", "public interface TouchHandler extends View.OnTouchListener {\n public boolean isTouchDown(int pointer);\n public int getTouchX(int pointer);\n public int getTouchY(int pointer);\n public List<Input.TouchEvent> getTouchEvents();\n}", "@Override\n\tpublic boolean touchDown(float x, float y, int pointer, int button) {\n\t\treturn false;\n\t}", "public abstract boolean pointerInside(int iPosX, int iPosY);", "@Override\r\n\tpublic boolean onTouchEvent(MotionEvent event) {\n\t\tthis.mGestureDetector.onTouchEvent( event );\r\n\t\t\r\n\t\t\r\n\t\treturn true;\r\n\t}", "public abstract boolean isTrigger();", "@Override\n\tpublic boolean onTouch(View view, MotionEvent event) {\n\t\treturn this._gestureDetector.onTouchEvent(event);\n\t}", "public boolean isHit() { return hit; }", "protected boolean canApplyTouchFeedback(@NonNull KrollDict props)\n\t\t{\n\t\t\treturn false;\n\t\t}", "boolean getTouched() {\n return touched;\n }", "void touchEvent(MotionEvent event);", "@Override public boolean onTouchEvent(MotionEvent event) {\n super.onTouchEvent(event);\n boolean clickCaptured = processTouchEvent(event);\n boolean scrollCaptured = scroller != null && scroller.onTouchEvent(event);\n boolean singleTapCaptured = getGestureDetectorCompat().onTouchEvent(event);\n return clickCaptured || scrollCaptured || singleTapCaptured;\n }", "@Override\n public boolean onTouchEvent(double deltaTime, MotionEvent motionEvent) {\n if (gameState == GameState.START) {\n this.setGameState(GameState.LIVE);\n } else {\n if (motionEvent.getY() < screenHeight * 0.3) {\n if (motionEvent.getY() < screenHeight * 0.1) {\n this.quit();\n }\n return false;\n }\n else {\n List<Interactable> interactables = this.getInteractableObjects();\n for (Interactable i : interactables) {\n i.onTouchEvent(deltaTime, motionEvent);\n }\n return true;\n }\n }\n return true;\n }", "@Override\n public boolean dispatchTouchEvent(MotionEvent me){\n this.detector.onTouchEvent(me);\n return super.dispatchTouchEvent(me);\n }", "@Override\n\t\t\tpublic boolean onTouch(View v, MotionEvent event) {\n\t\t\t\treturn gestureScanner.onTouchEvent(event);\n\n\t\t\t}", "@Override\n\t\tpublic boolean dispatchTouchEvent(MotionEvent ev) {\n\t\t\ttry {\n\t\t\t\treturn super.dispatchTouchEvent(ev);\n\t\t\t} catch (IndexOutOfBoundsException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}", "public boolean touches(Rectangle r) {\n\t\tif (r.getX1() - getX2() >= 0 || r.getY1() - getY2() >= 0)\n\t\t\treturn false;\n\t\tif (getX1() - r.getX2() >= 0 || getY1() - r.getY2() >= 0)\n\t\t\treturn false;\n\t\treturn true;\n\t}", "@Override\n public boolean dispatchTouchEvent(MotionEvent event){\n checkGestureForSwipe(event);\n return super.dispatchTouchEvent(event);\n }", "@Override\n\tpublic boolean onTouch(View v, MotionEvent event) {\n\n\t\tx = event.getX();\n\t\ty = event.getY();\n\t\tif (event.getActionMasked() == MotionEvent.ACTION_UP)\n\t\t\tnot_pressed = true;\n\t\telse\n\t\t\tnot_pressed = false;\n\n\t\tinvalidate();\n\t\treturn true;\n\t}", "public boolean onTouchEvent(MotionEvent event) {\n\tif(state==MAIN_MENU || state==RESUME)\n\t{ags.onTouchEvent(event);}\n\t\n\telse if(state==GAME_SCREEN){\n\t//\tat= new AndroidTouch(ag);\n\t\tag.onTouchEvent(event);\n\t}\n\t\n\t\n\treturn super.onTouchEvent(event);\n\t\n}", "@Override\n\t\t\tpublic boolean onTouch(View v, MotionEvent event) {\n\t\t\t\treturn DetailTreasureChestActivity.this.detector.onTouchEvent(event);\n\t\t\t}", "@Override\n public boolean onGenericMotionEvent(MotionEvent event) {\n if (mGestureDetector != null) {\n return mGestureDetector.onMotionEvent(event);\n }\n return false;\n }", "@Override\n\tpublic boolean onTouchEvent(MotionEvent event) {\n\t\tif( _fingerTouch == null )\n\t\t\treturn false;\n\n\t\tint touchAction = event.getAction();\n\t\tswitch(touchAction)\n\t\t{\n\t\t\tcase MotionEvent.ACTION_DOWN :\n\t\t\t\tif( _fingerTouch.getPositions().size() > 0 )\n\t\t\t\t\treturn false;\n\t\t\tcase MotionEvent.ACTION_MOVE:\n\t\t\t\t_fingerTouch.Touching(event.getX(), event.getY());\n\t\t\t\tbreak;\n\t\t\tcase MotionEvent.ACTION_UP:\n\t\t\t\t//get the resulting word\n\t\t\t\tString result = _fingerTouch.NotTouching(event.getX(), event.getY());\n\t\t\t\tif( result == null )\n\t\t\t\t\tbreak;\n\t\t\t\tif( _game.goodWord(result.toLowerCase()) == true && _game.isAlready(result) == false)\n\t\t\t\t{\n\t\t\t\t\t//_goodCells.addAll(_fingerTouch.getPositions());\n\t\t\t\t\t_goodWord = true;\n\t\t\t\t\t_game.increaseWordCounter();\n\t\t\t\t\t_game.appendToWordsFound(result);\n\t\t\t\t\t//invalidate();\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t_game.appendToBadWords(result);\n\t\t\t\t\t_goodWord = false;\n\t\t\t\t}\n\t\t\t\t_goodCells.addAll(_fingerTouch.getPositions());\n\t\t\t\t_fingerTouch.reset();\n\t\t\t\tinvalidate();\n\t\t\t\tbreak;\n\t\t}\n\t\t\n\t\t//invalidate();\n\t\t\n\t\treturn true;\n\t}", "@Override\n\tpublic boolean dispatchTouchEvent(MotionEvent ev) {\n\t\tsuper.dispatchTouchEvent(ev);\n\t\treturn gdDetector.onTouchEvent(ev);\n\t}", "@Override\n public boolean touchDragged(int screenX, int screenY, int pointer) {\n return false;\n }", "@Override\n public boolean touchDragged(int screenX, int screenY, int pointer) {\n return false;\n }", "public boolean isTouched(float x1, float x2, float y1, float y2){\n input.set(Gdx.input.getX(),Gdx.input.getY(),0);\n camera.unproject(input);\n if ( input.x >= x1 && input.x <= x2 && input.y >= y1 && input.y <=y2){\n if(Gdx.input.justTouched())\n return true;\n }\n return false;\n }", "@Override\n\t\t\tpublic boolean onTouch(View v, MotionEvent event) {\n\t\t\t\tif(event.getAction() == MotionEvent.ACTION_DOWN){\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\telse if(event.getAction() == MotionEvent.ACTION_MOVE)\n\t\t\t\t{\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\telse if(event.getAction() == MotionEvent.ACTION_UP)\n\t\t\t\t{\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\treturn false;\n\t\t\t}", "@Override\n\tpublic boolean onTouchEvent(MotionEvent event) {\n\t\tint action = event.getActionMasked();\n\t\t// action point status\n\t\tint actionIndex = event.getActionIndex();\n\t\t// event的id直接對應到pointer的id\n\t\tint actionPointIndex = event.getPointerId(actionIndex);\n\t\tfloat actionPointX = event.getX(actionIndex);\n\t\tfloat actionPointY = event.getY(actionIndex);\n\t\tfloat actionPointPressure = event.getPressure(actionIndex);\n\t\tfloat actionPointSize = event.getSize(actionIndex);\n\t\tlong time = System.currentTimeMillis();\n\t\tpointers = event.getPointerCount();\n\n\t\tswitch (action) {\n\t\t// 更新pointer的內容\n\t\tcase MotionEvent.ACTION_DOWN:\n\t\t\t// if (flagIsLighting && flagcnt < 100) {\n\t\t\tflagTouching = true;\n\t\t\t// }\n\t\t\tpointer[actionPointIndex].touchDown(actionPointIndex, actionPointX,\n\t\t\t\t\tactionPointY, actionPointPressure, actionPointSize, time);\n\n\t\t\tbreak;\n\t\tcase MotionEvent.ACTION_POINTER_DOWN:\n\t\t\t// if (flagIsLighting && flagcnt < 100) {\n\t\t\tflagTouching = true;\n\t\t\t// }\n\t\t\tpointer[actionPointIndex].touchDown(actionPointIndex, actionPointX,\n\t\t\t\t\tactionPointY, actionPointPressure, actionPointSize, time);\n\n\t\t\tbreak;\n\t\tcase MotionEvent.ACTION_POINTER_UP:\n\t\t\tpointer[actionPointIndex].touchUp();\n\t\t\tbreak;\n\t\tcase MotionEvent.ACTION_UP:\n\t\t\tpointer[actionPointIndex].touchUp();\n\t\t\t((Circle) circle).tapping = 0;\n\t\t\trgb = 100;\n\t\t\t((Circle) circle).flagIsLighting = false;\n\t\t\tflagIsLighting = false;\n\t\t\t// Log.e(\"tap0\", ((Circle) circle).tapping + \"\");\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tfor (int i = 0; i < event.getPointerCount(); ++i) {\n\n\t\t\t\tpointer[event.getPointerId(i)].touchDown(event.getPointerId(i),\n\t\t\t\t\t\tevent.getX(i), event.getY(i), event.getPressure(i),\n\t\t\t\t\t\tevent.getSize(i), time);\n\n\t\t\t\tint hz = 100;\n\t\t\t\tint e = 0;\n\t\t\t\tString s = \"! \";\n\t\t\t\tfor (int j = 0; j < 10; j++) {\n\n\t\t\t\t\tif (pointer[j].exist) {\n//\t\t\t\t\t\tint tmp = (int) ((pointer[j].nowHz + 5) / 10);\n\t\t\t\t\t\tif (hz > pointer[j].showHz && pointer[j].showHz != 0) {\n\t\t\t\t\t\t\t// if (hz > tmp && tmp != 0) {\n\t\t\t\t\t\t\thz = pointer[j].showHz;\n//\t\t\t\t\t\t\thz = tmp;\n\t\t\t\t\t\t\ts = s + hz + \" \";\n\t\t\t\t\t\t\trgb = hz;\n\t\t\t\t\t\t\t((Circle) circle).id = e;\n\t\t\t\t\t\t\tid = j;\n\t\t\t\t\t\t}\n\t\t\t\t\t\te++;\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t\t// Log.e(\"hz\", s);\n\t\t\t\tif (flagIsLighting) {\n\t\t\t\t\tif (hz > 6 && hz < 11 && hzcnt < 10) {\n\t\t\t\t\t\thza[hzcnt] = hz;\n\t\t\t\t\t\thzcnt++;\n\t\t\t\t\t\t// flagcnt = 0;\n\t\t\t\t\t\tLog.e(\"+hz\", hz + \"\");\n\t\t\t\t\t}\n\t\t\t\t\t// else if (hz > 15 || hz < 4) {\n\t\t\t\t\t// Log.e(\"cnt\", flagcnt + \"\");\n\t\t\t\t\t// flagcnt++;\n\t\t\t\t\t// if (flagcnt > 100) {\n\t\t\t\t\t//\n\t\t\t\t\t// flagTouching = false;\n\t\t\t\t\t// }\n\t\t\t\t\t// }\n\t\t\t\t}\n\t\t\t\t// if (rgb > hz) {\n\t\t\t\t//\n\t\t\t\t// rgb = hz;\n\t\t\t\t// }\n\t\t\t\tif (e == 2 || e == 3) {\n\t\t\t\t\tint k = 0;\n\t\t\t\t\tfor (int j = 0; j < 10; j++) {\n\t\t\t\t\t\tif (pointer[j].exist) {\n\t\t\t\t\t\t\tif (j != id) {\n\t\t\t\t\t\t\t\t((Circle) circle).tri[k][0] = pointer[j].x;\n\t\t\t\t\t\t\t\t((Circle) circle).tri[k][1] = pointer[j].y;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tk++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tint k = 0;\n\t\t\t\tif (hz >= 6 && hz <= 10) {\n\t\t\t\t\t((Circle) circle).tapping = 1;\n\t\t\t\t\t// Log.e(\"tap1\", ((Circle) circle).tapping + \"\");\n\t\t\t\t\tfor (int j = 0; j < 10; j++) {\n\n\t\t\t\t\t\tpointer[j].hzCnt = 0;\n\t\t\t\t\t\tpointer[j].showHz = 0;\n\t\t\t\t\t}\n\t\t\t\t\tif (flagIsLighting == false) {\n\t\t\t\t\t\t// Log.e(\"fa\", hz + \" \" + flagIsLighting);\n\t\t\t\t\t\t// Log.e(\"rgb\", (hz - 5) + \"\");\n\t\t\t\t\t\tflagIsLighting = true;\n\t\t\t\t\t\tLog.e(\"+hz\", hz + \"\");\n\t\t\t\t\t\tif (hzcnt < 10) {\n\t\t\t\t\t\t\thza[hzcnt] = hz;\n\t\t\t\t\t\t\thzcnt++;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// ((Circle) circle).showRGB = hz - 5;\n\t\t\t\t\t\t// Log.e(\"fa\", \"\" + flagIsLighting);\n\t\t\t\t\t\tmyHandler.sendEmptyMessage(0x102);\n\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tbreak;\n\t\t}\n\n\t\t// 重新繪圖\n\t\tcircle.invalidate();\n\t\treturn super.onTouchEvent(event);\n\t}", "@Override\n\tpublic boolean onTouchEvent(MotionEvent event) {\n\t\tint action = event.getAction();\n\t\tswitch (action) {\n\t\t\tcase MotionEvent.ACTION_DOWN:\n\t\t\t\t//Log.i(\"MainActivity\", \"MainActivity-onTouchEvent action = action down\");\n\t\t\t\tbreak;\n\n\t\t\tcase MotionEvent.ACTION_UP:\n\t\t\t\t//Log.i(\"MainActivity\", \"MainActivity-onTouchEvent action = action up\");\n\t\t\t\tbreak;\n\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t}\n\n\t\treturn super.onTouchEvent(event);\n\t}", "@Override\n public boolean onTouchEvent(MotionEvent event) {\n\n boolean spend = needTouch;\n switch (event.getAction()) {\n case MotionEvent.ACTION_DOWN:\n dx = event.getX();\n dy = event.getY();\n rdx = event.getRawX();\n rdy = event.getRawY();\n spend = touchDown(dx, dy);\n break;\n case MotionEvent.ACTION_MOVE:\n float cx = event.getX();\n float cy = event.getY();\n rcx = event.getRawX();\n rcy = event.getRawY();\n spend = touchMove(cx, cy);\n break;\n case MotionEvent.ACTION_UP:\n rcx = event.getRawX();\n rcy = event.getRawY();\n touchUp();\n break;\n case MotionEvent.ACTION_CANCEL:\n rcx = event.getRawX();\n rcy = event.getRawY();\n touchCancel();\n break;\n }\n if(mOnClickListener != null){\n return super.onTouchEvent(event);\n }\n\n invalidate();\n return spend;\n }", "public boolean touches(MyShape c) {\n\t\tint deltaX = Math.abs((c.x + c.width / 2) - (x + width / 2)),\n\t\t\t\tdeltaY = Math.abs((c.y + c.height / 2) - (y + height / 2)), \n\t\t\t\toverlapX = c.width / 2 + width / 2, \n\t\t\t\toverlapY = c.height / 2 + height / 2; // this would simply be\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// height if both were\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// the same size\n\t\t\tif (deltaX >= overlapX)\n\t\t\t\treturn false;\n\t\t\tif (deltaY >= overlapY)\n\t\t\t\treturn false;\n\t\t\treturn true;\n\t\t}", "@Override\n public boolean onTouchEvent(MotionEvent event) {\n // Pass activity on touch event to the gesture detector.\n gestureDetectorCompat.onTouchEvent(event);\n // Return true to tell android OS that event has been consumed, do not pass it to other event listeners.\n return true;\n }", "@Override\n public boolean onGenericMotionEvent(MotionEvent event) {\n if (mGestureDetector != null) {\n return mGestureDetector.onMotionEvent(event);\n }\n return super.onGenericMotionEvent(event);\n }", "@Override\n\t\t\t\tpublic boolean touchDown(com.badlogic.gdx.scenes.scene2d.InputEvent event, float x, float y, int pointer, int button) {\n\t\t\t\t\treturn true;\n\t\t\t\t}", "@Override\r\n\tpublic boolean isTouchRightDown() {\n\t\treturn false;\r\n\t}", "@Override\n public boolean onTouchEvent(MotionEvent event) {\n return mHandleView.dispatchTouchEvent(event);\n }", "@SuppressLint(\"ClickableViewAccessibility\")\n\t\t\t@Override\n\t\t\tpublic boolean onTouch(View v, MotionEvent event) {\n\t\t\t\treturn false;\n\t\t\t}", "public abstract boolean isPassable();" ]
[ "0.8646122", "0.79613954", "0.76957005", "0.72126377", "0.7183674", "0.7157271", "0.71471876", "0.7139767", "0.7134134", "0.7133473", "0.71260154", "0.710025", "0.7098938", "0.70888674", "0.7082532", "0.70819396", "0.7054542", "0.7041228", "0.7036605", "0.70255435", "0.7018505", "0.7018505", "0.69992983", "0.6977984", "0.6977081", "0.6936779", "0.6924794", "0.6916427", "0.6909569", "0.69058746", "0.6866304", "0.68623817", "0.68623817", "0.68623817", "0.68501365", "0.6848265", "0.68454826", "0.68350077", "0.68286437", "0.6813925", "0.68025666", "0.6798244", "0.6794548", "0.67922425", "0.6760213", "0.6748111", "0.6727378", "0.67203087", "0.67203087", "0.67173594", "0.67108256", "0.6707964", "0.67026055", "0.6699921", "0.66996205", "0.6692913", "0.6691459", "0.66837406", "0.6668071", "0.66650194", "0.6660356", "0.6658611", "0.6647636", "0.66384846", "0.66311777", "0.6610336", "0.65933686", "0.659244", "0.65863657", "0.6576848", "0.65730155", "0.65714896", "0.65686035", "0.656488", "0.6563659", "0.6555252", "0.65499395", "0.6542842", "0.65122795", "0.6510798", "0.6497405", "0.6487626", "0.6485867", "0.6480318", "0.6476505", "0.64759314", "0.64745486", "0.64745486", "0.6467539", "0.6467073", "0.6466665", "0.64659786", "0.6459388", "0.6455686", "0.6454278", "0.6448435", "0.6440402", "0.643826", "0.6438102", "0.64372164", "0.64289117" ]
0.0
-1
Makes the robot make an arc of the specified angle. This method does not return immediately.
public abstract void steer(double angle);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void arc(int centerX, int centerY, float angle) {\n tail(centerX, centerY, getSize() - (MARGIN / 2), getSize() - (MARGIN / 2), angle);\n }", "public void fillArc(float x, float y, float radius, float startAngle, float endAngle);", "public void strokeArc(float x, float y, float radius, float startAngle, float endAngle);", "void setAngle(double angle);", "public void setAngle(final float angle);", "boolean needToAim(double angle);", "Angle createAngle();", "public void angleTurn(float angle, int timeout){\n\t\tcalculateAngles();\n\n\t\t// Get the current program time and starting encoder position before we start our drive loop\n\t\tfloat StartTime = data.time.currentTime();\n\t\tfloat StartPosition = data.drive.leftDrive.getCurrentPosition();\n\n\t\t// Reset our Integral and Derivative data.\n\t\tdata.PID.integralData.clear();\n\t\tdata.PID.derivativeData.clear();\n\n\n\t\t// Manually calculate our first target\n\t\tdata.PID.target = (calculateAngles() + (data.PID.IMURotations * 360)) + angle;\n\n\t\t// We need to keep track of how much time passes between a loop.\n\t\tfloat LoopTime = data.time.currentTime();\n\n\t\t// This is the main loop of our straight drive.\n\t\t// We use encoders to form a loop that corrects rotation until we reach our target.\n\t\twhile(StartTime + timeout > data.time.currentTime()){\n\n\t\t\t// Record the time since the previous loop.\n\t\t\tLoopTime = data.time.timeFrom(LoopTime);\n\t\t\t// Calculate our angles. This method may modify the input Rotations.\n\t\t\t//IMURotations =\n\t\t\tcalculateAngles();\n\t\t\t// Calculate our PID\n\t\t\tcalculatePID(LoopTime);\n\n\t\t\t// Calculate the Direction to travel to correct any rotational errors.\n\t\t\tfloat Direction = ((data.PID.I * data.PID.ITuning) / 2000) + ((data.PID.P * data.PID.PTuning) / 2000) + ((data.PID.D * data.PID.DTuning) / 2000);;\n\n\t\t\tif(Math.abs(Direction) <= 0.03f) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tdata.drive.rightDrive.setPower(data.drive.POWER_CONSTANT - (Direction));\n\t\t\tdata.drive.leftDrive.setPower(data.drive.POWER_CONSTANT + (Direction));\n\t\t}\n\t\t// Our drive loop has completed! Stop the motors.\n\t\tdata.drive.rightDrive.setPower(0);\n\t\tdata.drive.leftDrive.setPower(0);\n\t}", "public void execute() {\n RobotContainer.drive.turnToAngle(this.angle, turnSpeed);\n }", "void turn(double angle) {\n double absoluteAngle = angle * 0.05;\n\n drive(TURN_SPEED, angle, -angle, 0);\n\n }", "public void setAngle( double a ) { angle = a; }", "private static void arcTo(\n float rx, float ry, float rotation, boolean outer, boolean clockwise, float x, float y) {\n float tX = mPenX;\n float tY = mPenY;\n\n ry = Math.abs(ry == 0 ? (rx == 0 ? (y - tY) : rx) : ry);\n rx = Math.abs(rx == 0 ? (x - tX) : rx);\n\n if (rx == 0 || ry == 0 || (x == tX && y == tY)) {\n lineTo(x, y);\n return;\n }\n\n float rad = (float) Math.toRadians(rotation);\n float cos = (float) Math.cos(rad);\n float sin = (float) Math.sin(rad);\n x -= tX;\n y -= tY;\n\n // Ellipse Center\n float cx = cos * x / 2 + sin * y / 2;\n float cy = -sin * x / 2 + cos * y / 2;\n float rxry = rx * rx * ry * ry;\n float rycx = ry * ry * cx * cx;\n float rxcy = rx * rx * cy * cy;\n float a = rxry - rxcy - rycx;\n\n if (a < 0) {\n a = (float) Math.sqrt(1 - a / rxry);\n rx *= a;\n ry *= a;\n cx = x / 2;\n cy = y / 2;\n } else {\n a = (float) Math.sqrt(a / (rxcy + rycx));\n\n if (outer == clockwise) {\n a = -a;\n }\n float cxd = -a * cy * rx / ry;\n float cyd = a * cx * ry / rx;\n cx = cos * cxd - sin * cyd + x / 2;\n cy = sin * cxd + cos * cyd + y / 2;\n }\n\n // Rotation + Scale Transform\n float xx = cos / rx;\n float yx = sin / rx;\n float xy = -sin / ry;\n float yy = cos / ry;\n\n // Start and End Angle\n float sa = (float) Math.atan2(xy * -cx + yy * -cy, xx * -cx + yx * -cy);\n float ea = (float) Math.atan2(xy * (x - cx) + yy * (y - cy), xx * (x - cx) + yx * (y - cy));\n\n cx += tX;\n cy += tY;\n x += tX;\n y += tY;\n\n setPenDown();\n\n mPenX = mPivotX = x;\n mPenY = mPivotY = y;\n\n if (rx != ry || rad != 0f) {\n arcToBezier(cx, cy, rx, ry, sa, ea, clockwise, rad);\n } else {\n\n float start = (float) Math.toDegrees(sa);\n float end = (float) Math.toDegrees(ea);\n float sweep = Math.abs((start - end) % 360);\n\n if (outer) {\n if (sweep < 180) {\n sweep = 360 - sweep;\n }\n } else {\n if (sweep > 180) {\n sweep = 360 - sweep;\n }\n }\n\n if (!clockwise) {\n sweep = -sweep;\n }\n\n RectF oval =\n new RectF((cx - rx) * mScale, (cy - rx) * mScale, (cx + rx) * mScale, (cy + rx) * mScale);\n\n mPath.arcTo(oval, start, sweep);\n elements.add(\n new PathElement(\n ElementType.kCGPathElementAddCurveToPoint, new Point[] {new Point(x, y)}));\n }\n }", "private static void arcToBezier(\n float cx, float cy, float rx, float ry, float sa, float ea, boolean clockwise, float rad) {\n float cos = (float) Math.cos(rad);\n float sin = (float) Math.sin(rad);\n float xx = cos * rx;\n float yx = -sin * ry;\n float xy = sin * rx;\n float yy = cos * ry;\n\n // Bezier Curve Approximation\n float arc = ea - sa;\n if (arc < 0 && clockwise) {\n arc += Math.PI * 2;\n } else if (arc > 0 && !clockwise) {\n arc -= Math.PI * 2;\n }\n\n int n = (int) Math.ceil(Math.abs(round(arc / (Math.PI / 2))));\n\n float step = arc / n;\n float k = (float) ((4 / 3.0) * Math.tan(step / 4));\n\n float x = (float) Math.cos(sa);\n float y = (float) Math.sin(sa);\n\n for (int i = 0; i < n; i++) {\n float cp1x = x - k * y;\n float cp1y = y + k * x;\n\n sa += step;\n x = (float) Math.cos(sa);\n y = (float) Math.sin(sa);\n\n float cp2x = x + k * y;\n float cp2y = y - k * x;\n\n float c1x = (cx + xx * cp1x + yx * cp1y);\n float c1y = (cy + xy * cp1x + yy * cp1y);\n float c2x = (cx + xx * cp2x + yx * cp2y);\n float c2y = (cy + xy * cp2x + yy * cp2y);\n float ex = (cx + xx * x + yx * y);\n float ey = (cy + xy * x + yy * y);\n\n mPath.cubicTo(\n c1x * mScale, c1y * mScale, c2x * mScale, c2y * mScale, ex * mScale, ey * mScale);\n elements.add(\n new PathElement(\n ElementType.kCGPathElementAddCurveToPoint,\n new Point[] {new Point(c1x, c1y), new Point(c2x, c2y), new Point(ex, ey)}));\n }\n }", "public void turn(int angle)\n {\n setRotation(getRotation() + angle);\n }", "public void turn(int angle)\n {\n setRotation(getRotation() + angle);\n }", "public void rotateToAngle(double angle) {\n controlState = ControlState.POSITION;\n outputPosition = -angle * TurretConstants.TICKS_PER_DEGREE;\n }", "public void setAngle(double angle) {\n this.angle = angle;\n }", "public AutoRotateCommand(double angle){\r\n\t\tAHRS ahrs = new AHRS(Port.kMXP);\r\n\t\trequires(Robot.driveSys);\r\n\t\tdouble gangle = ahrs.getAngle();\t\r\n\t\tif(gangle < angle)\r\n\t\t\tspeed = -DEFAULT_SPEED;\r\n\t\telse\r\n\t\t\tspeed = DEFAULT_SPEED;\r\n\t}", "@Override\n public void setTurtleAngle(double angle) {\n screenCreator.updateCommandQueue(\"Angles\", Collections.singletonList(angle));\n }", "public void rotate(float angle);", "public void setAngle(int angle) {\r\n\t\tthis.angle = angle;\r\n\t}", "public void moveToAngle(double angle) {\n\t\tangleSetpoint = angle;\n\t}", "public void setAngle(double angle)\n\t{\n\t\tthis.angle = angle;\n\t}", "public void arcDrive (double inches, float degreesToTurn, double basePower, boolean clockwise, double p_coeff) throws InterruptedException {\n\n int target = (int) (inches * ticksPerInch);\n double correction;\n double leftPower = basePower;\n double rightPower = basePower;\n double max;\n int lastEncoder;\n int currentEncoder = 0;\n int deltaEncoder;\n double proportionEncoder;\n float lastHeading;\n float currentHeading = zRotation;\n float deltaHeading;\n double proportionHeading;\n double proportionArc;\n long loops = 0;\n\n if(basePower<0){\n clockwise = !clockwise;\n degreesToTurn *= -1;\n }\n\n double P_ARC_COEFF = p_coeff;\n\n setEncoderBase();\n\n frontRight.setPower(basePower);\n backRight.setPower(basePower);\n frontLeft.setPower(basePower);\n backLeft.setPower(basePower);\n\n Thread.sleep(10);\n\n while (((LinearOpMode) callingOpMode).opModeIsActive()) {\n\n lastEncoder = currentEncoder;\n currentEncoder = getCurrentAveragePosition();\n\n deltaEncoder = currentEncoder - lastEncoder;\n\n lastHeading = currentHeading;\n currentHeading = zRotation;\n\n deltaHeading = currentHeading - lastHeading;\n deltaHeading = normalize360two(deltaHeading);\n\n proportionEncoder = (double) deltaEncoder / target;\n proportionHeading = (double) deltaHeading / degreesToTurn;\n\n proportionArc = proportionEncoder - proportionHeading;\n\n correction = proportionArc * P_ARC_COEFF;\n\n if(clockwise) {\n leftPower += correction;\n rightPower -= correction;\n } else {\n leftPower -= correction;\n rightPower += correction;\n }\n\n max = Math.max(Math.abs(leftPower), Math.abs(rightPower));\n if (max > 1.0) {\n leftPower /= max;\n rightPower /= max;\n }\n frontRight.setPower(rightPower);\n backRight.setPower(rightPower);\n frontLeft.setPower(leftPower);\n backLeft.setPower(leftPower);\n\n if (((loops + 10) % 10) == 0) {\n callingOpMode.telemetry.addData(\"TARGET\", target);\n callingOpMode.telemetry.addData(\"gyro\", zRotation);\n callingOpMode.telemetry.addData(\"encoder\", currentEncoder);\n callingOpMode.telemetry.addData(\"heading\", currentHeading);\n callingOpMode.telemetry.addData(\"dEncoder\", deltaEncoder);\n callingOpMode.telemetry.addData(\"dHeading\", deltaHeading);\n callingOpMode.telemetry.addData(\"pEncoder\", proportionEncoder);\n callingOpMode.telemetry.addData(\"pHeading\", proportionHeading);\n callingOpMode.telemetry.addData(\"arc\", proportionArc);\n callingOpMode.telemetry.addData(\"correction\", correction);\n callingOpMode.telemetry.addData(\"leftPower\", leftPower);\n callingOpMode.telemetry.addData(\"rightPower\", rightPower);\n callingOpMode.telemetry.addData(\"loops\", loops);\n callingOpMode.telemetry.update();\n }\n\n loops++;\n\n updateGlobalPosition();\n\n Thread.sleep(10);\n\n if(Math.abs(target) <= Math.abs(getCurrentAveragePosition())) {\n callingOpMode.telemetry.addData(\"TARGET\", target);\n callingOpMode.telemetry.addData(\"gyro\", zRotation);\n callingOpMode.telemetry.addData(\"encoder\", currentEncoder);\n callingOpMode.telemetry.addData(\"heading\", currentHeading);\n callingOpMode.telemetry.addData(\"dEncoder\", deltaEncoder);\n callingOpMode.telemetry.addData(\"dHeading\", deltaHeading);\n callingOpMode.telemetry.addData(\"pEncoder\", proportionEncoder);\n callingOpMode.telemetry.addData(\"pHeading\", proportionHeading);\n callingOpMode.telemetry.addData(\"arc\", proportionArc);\n callingOpMode.telemetry.addData(\"correction\", correction);\n callingOpMode.telemetry.addData(\"leftPower\", leftPower);\n callingOpMode.telemetry.addData(\"rightPower\", rightPower);\n callingOpMode.telemetry.addData(\"loops\", loops);\n callingOpMode.telemetry.update();\n break;\n }\n }\n }", "public void setAngle(double angle) {\n\t\tthis.angle = angle;\n\t}", "public void setAngle(double a) {\n\t\tangle= a;\n\t}", "@Override\n protected void execute() {\n headingPID.setSetpoint(-angle); //should be -angle \n Robot.driveBase.DriveAutonomous();\n }", "public void addSuccessor(HmmArc arc) {\n }", "public void setAngle(double angle) {\n if (!isReset) {\n System.out.println(\"ARM NOT RESETTED. ROBOT WILL NOT MOVE ARM AS PID WILL DESTROY IT.\");\n armMotor.set(ControlMode.PercentOutput, 0);\n return;\n }\n double targetPositionRotations = angle * Const.kArmDeg2Talon4096Unit * Const.kArmGearRatioArm2Encoder;\n System.out.println(\"setting PID setpoint \" + targetPositionRotations);\n armMotor.set(ControlMode.Position, targetPositionRotations);\n }", "public void turn(double angle){\n updateUndoBuffers(new LinkedList<>());\n myAngle += angle;\n }", "@Override\n public void rotate(double angle) {\n graphicsEnvironmentImpl.rotate(canvas, angle);\n }", "public void setAngle(float angle){\n\n\t}", "@Override\n public void execute() {\n mShooter.setAngle(mServoAngle);\n }", "public LabelBuilder setArc(boolean arc) {\n\t\tIsBuilder.checkIfValid(getOptionsBuilder());\n\t\tlabel.setArc(arc);\n\t\treturn this;\n\t}", "public void turretAngleToExecute(double angle) {\n double pidOutput = turretPIDController.calculate(angle);\n double currentPower = MathUtil.clamp(pidOutput, -1.0, 1.0) * maxPower;\n rawTurret(currentPower);\n lastAngle = angle;\n }", "@Override\n public void mouseDragged(MouseEvent dragEvent) {\n int currentX = dragEvent.getX() - originX;\n int currentY = originY - dragEvent.getY();\n\n // Get the distance from the circle's center to the mouse current position : √(x² + y²)\n double currentDist = Math.sqrt(Math.pow(currentX, 2) + Math.pow(currentY, 2));\n\n // Get the current angle : arccos(currentX / currentDist)\n double angle = Math.toDegrees(Math.acos(currentX / currentDist));\n if (currentY < 0) {\n angle = 360 - angle;\n }\n\n // Update the view\n view.setDefaultStartAngle((angle + initialAngle) % 360);\n view.computeArcs(controller.getModel());\n view.repaint();\n }", "public void rotateTo(double angle) {\n\t\t\n\t\tangleCache = angle;\n\t\tupdateGyro();\n\t\t\n\t\t//int goTo = angleCache; //lazy programming at its finest lmao //okay yeah no I'm fixing this\n\t\t//clockwise degrees to goTo angle\n\t\tdouble ccw = (angleCache - angleToForward < 0) ? (angleCache - angleToForward + 360) : (angleCache - angleToForward);\n\t\t\n\t\t//counter-clockwise degrees to goTo angle\n\t\tdouble cw = (angleToForward - angleCache < 0) ? (angleToForward - angleCache + 360) : (angleToForward - angleCache);\n\t\t\n\t\t//rotates the fastest way until within +- 5 of goTo angle\n\t\t\n\t\tif (angleCache >= angleToForward + 5 || angleCache <= angleToForward - 5) { //TODO Breaks when any button is pressed (continues spinning indefinitely)\n\t\t\tupdateGyro();\n\t\t\tif (cw <= ccw) {\n\t\t\t\tupdateGyro();\n\t\t\t\tmotorRB.set(-0.25);\n\t\t\t\tmotorRF.set(-0.25);\n\t\t\t\tmotorLB.set(-0.25);\n\t\t\t\tmotorLF.set(-0.25);\n\t\t\t} else {\n\t\t\t\tupdateGyro();\n\t\t\t\tmotorRB.set(0.25);\n\t\t\t\tmotorRF.set(0.25);\n\t\t\t\tmotorLB.set(0.25);\n\t\t\t\tmotorLF.set(0.25);\n\t\t\t}\n\t\t\tupdateGyro();\n\t\t}\n\t\t\n\t}", "public void calling() {\n\t\tCircle tc = new Circle(new Coordinate(-73, 42), 0);\n\t\tif (PaintShapes.painting && logger.isDebugEnabled()) {\n\t\t\tPaintShapes.paint.color = PaintShapes.paint.redTranslucence;\n\t\t\tPaintShapes.paint.addCircle(tc);\n\t\t\tPaintShapes.paint.myRepaint();\n\t\t}\n\t\t\n//\t\tMap<Double, Coordinate>angle_coordinate=new HashMap<Double, Coordinate>();\n//\t\tLinkedList<double[]>coverangle=new LinkedList<double[]>();\n//\t\tMap<Double[], Coordinate[]>uncoverArc=new HashMap<Double[], Coordinate[]>();\n//\t\tdouble a1[]=new double[2];\n//\t\ta1[0]=80;\n//\t\ta1[1]=100;\n//\t\tangle_coordinate.put(a1[0], new Coordinate(1, 0));\n//\t\tangle_coordinate.put(a1[1], new Coordinate(0, 1));\n//\t\tcoverangle.add(a1);\n//\t\tdouble a2[]=new double[2];\n//\t\ta2[0]=0;\n//\t\ta2[1]=30;\n//\t\tangle_coordinate.put(a2[0], new Coordinate(2, 0));\n//\t\tangle_coordinate.put(a2[1], new Coordinate(0, 2));\n//\t\tcoverangle.add(a2);\n//\t\tdouble a3[]=new double[2];\n//\t\ta3[0]=330;\n//\t\ta3[1]=360;\n//\t\tangle_coordinate.put(a3[0], new Coordinate(3, 0));\n//\t\tangle_coordinate.put(a3[1], new Coordinate(7, 7));\n//\t\tcoverangle.add(a3);\n//\t\tdouble a4[]=new double[2];\n//\t\ta4[0]=20;\n//\t\ta4[1]=90;\n//\t\tangle_coordinate.put(a4[0], new Coordinate(4, 0));\n//\t\tangle_coordinate.put(a4[1], new Coordinate(0, 4));\n//\t\tcoverangle.add(a4);\n//\t\tdouble a5[]=new double[2];\n//\t\ta5[0]=180;\n//\t\ta5[1]=240;\n//\t\tangle_coordinate.put(a5[0], new Coordinate(5, 0));\n//\t\tangle_coordinate.put(a5[1], new Coordinate(0, 5));\n//\t\tcoverangle.add(a5);\n//\t\tdouble a6[]=new double[2];\n//\t\ta6[0]=270;\n//\t\ta6[1]=300;\n//\t\tangle_coordinate.put(a6[0], new Coordinate(6, 0));\n//\t\tangle_coordinate.put(a6[1], new Coordinate(0, 6));\n//\t\tcoverangle.add(a6);\n//\t\tdouble a7[]=new double[2];\n//\t\ta7[0]=360;\n//\t\ta7[1]=360;\n//\t\tangle_coordinate.put(a7[0], new Coordinate(7, 7));\n//\t\tangle_coordinate.put(a7[1], new Coordinate(7, 7));\n//\t\tcoverangle.add(a7);\n//\t\t// sort the cover arc\n//\t\tint minindex = 0;\n//\t\tfor (int j = 0; j < coverangle.size() - 1; j++) {\n//\t\t\tminindex = j;\n//\t\t\tfor (int k = j + 1; k < coverangle.size(); k++) {\n//\t\t\t\tif (coverangle.get(minindex)[0] > coverangle.get(k)[0]) {\n//\t\t\t\t\tminindex = k;\n//\t\t\t\t}\n//\t\t\t}\n//\t\t\tdouble tem[] = new double[2];\n//\t\t\ttem = coverangle.get(j);\n//\t\t\tcoverangle.set(j, coverangle.get(minindex));\n//\t\t\tcoverangle.set(minindex, tem);\n//\t\t}\n//\t\tfor(int ii=0;ii<coverangle.size();ii++){\n//\t\t\tdouble aa[]=coverangle.get(ii);\n//\t\t\tSystem.out.println(aa[0]+\" \"+aa[1]);\n//\t\t}\n//\t\tSystem.out.println(\"----------------------------\");\n//\t\t// find the uncover arc\n//\t\tint startposition = 0;\n//\t\twhile (startposition < coverangle.size() - 1) {\n//\t\t\tdouble coverArc[] = coverangle.get(startposition);\n//\t\t\tboolean stop = false;\n//\t\t\tint m = 0;\n//\t\t\tfor (m = startposition + 1; m < coverangle.size() && !stop; m++) {\n//\t\t\t\tdouble bb[] = coverangle.get(m);\n//\t\t\t\tif (bb[0] <= coverArc[1]) {\n//\t\t\t\t\tcoverArc[0] = Math.min(coverArc[0], bb[0]);\n//\t\t\t\t\tcoverArc[1] = Math.max(coverArc[1], bb[1]);\n//\t\t\t\t} else {\n//\t\t\t\t\tCoordinate uncover[]=new Coordinate[2];\n//\t\t\t\t\t//record the consistant uncover angle\n//\t\t\t\t\tDouble[] uncoverA=new Double[2];\n//\t\t\t\t\tuncoverA[0]=coverArc[1];\n//\t\t\t\t\tuncoverA[1]=bb[0];\n//\t\t\t\t\tIterator<Map.Entry<Double, Coordinate>> entries = angle_coordinate\n//\t\t\t\t\t\t\t.entrySet().iterator();\n//\t\t\t\t\twhile (entries.hasNext()) {\n//\t\t\t\t\t\tMap.Entry<Double, Coordinate> entry = entries.next();\n//\t\t\t\t\t\tif (entry.getKey() == coverArc[1])\n//\t\t\t\t\t\t\tuncover[0] = entry.getValue();\n//\t\t\t\t\t\telse if (entry.getKey() == bb[0])\n//\t\t\t\t\t\t\tuncover[1] = entry.getValue();\n//\t\t\t\t\t}\n//\t\t\t\t\tuncoverArc.put(uncoverA, uncover);\n//\t\t\t\t\tstartposition = m;\n//\t\t\t\t\tstop = true;\n//\t\t\t\t}\n//\t\t\t}\n//\t\t\tif(m==coverangle.size()){\n//\t\t\t\tstartposition=m;\n//\t\t\t}\n//\t\t}\n//\t\n//\t\tSystem.out.println(uncoverArc.entrySet().size());\n//\t\tint n=uncoverArc.entrySet().size();\n//\t\tint k=2;\n//\t\twhile(n>0){\n//\t\t\tIterator<Map.Entry<Double[],Coordinate[]>>it=uncoverArc.entrySet().iterator();\n//\t\t\tMap.Entry<Double[], Coordinate[]>newneighbor=it.next();\n//\t\t\tSystem.out.println(newneighbor.getKey()[0]+\" \"+newneighbor.getValue()[0]);\n//\t\t\tSystem.out.println(newneighbor.getKey()[1]+\" \"+newneighbor.getValue()[1]);\n//\t\t uncoverArc.remove(newneighbor.getKey());\n//\t\t \n//\t\tif(k==2){\n//\t\tDouble[] a8=new Double[2];\n//\t\ta8[0]=(double)450;\n//\t\ta8[1]=(double)500;\n//\t\tCoordinate a9[]=new Coordinate[2];\n//\t\ta9[0]=new Coordinate(9, 0);\n//\t\ta9[1]=new Coordinate(0, 9);\n//\t\tuncoverArc.put(a8, a9);\n//\t\tk++;\n//\t\t}\n//\t\tn=uncoverArc.entrySet().size();\n//\t\tSystem.out.println(\"new size=\"+uncoverArc.entrySet().size());\n//\t\t}\n//\t\t\t\n\t\t\t\n\t\t\n\t\t/***************new test*************************************/\n//\t\tCoordinate startPoint=new Coordinate(500, 500);\n//\t\tLinkedList<VQP>visitedcircle_Queue=new LinkedList<VQP>();\n//\t\tvisitedcircle_Queue.add(new VQP(new Coordinate(500, 500), 45));\n//\t\tvisitedcircle_Queue.add(new VQP(new Coordinate(589, 540), 67));\n//\t\tvisitedcircle_Queue.add(new VQP(new Coordinate(500, 550), 95));\n//\t\tvisitedcircle_Queue.add(new VQP(new Coordinate(439, 560), 124));\n//\t\tvisitedcircle_Queue.add(new VQP(new Coordinate(460, 478), 69));\n//\t\tvisitedcircle_Queue.add(new VQP(new Coordinate(580, 580), 70));\n//\t\tIterator<VQP>testiterator=visitedcircle_Queue.iterator();\n//\t\twhile(testiterator.hasNext()){\n//\t\t\tVQP m1=testiterator.next();\n//\t\t\tCircle tm=new Circle(m1.getCoordinate(), m1.getRadius());\n//\t\t\tif (PaintShapes.painting && logger.isDebugEnabled()) {\n//\t\t\t\tPaintShapes.paint.color = PaintShapes.paint.redTranslucence;\n//\t\t\t\tPaintShapes.paint.addCircle(tm);\n//\t\t\t\tPaintShapes.paint.myRepaint();\n//\t\t\t}\n//\t\t\t\n//\t\t}\n//\t\tdouble coverradius=calculateIncircle(startPoint, visitedcircle_Queue);\n//\t\tCircle incircle=new Circle(startPoint, coverradius);\n//\t\tif (PaintShapes.painting && logger.isDebugEnabled()) {\n//\t\t\tPaintShapes.paint.color = PaintShapes.paint.blueTranslucence;\n//\t\t\tPaintShapes.paint.addCircle(incircle);\n//\t\t\tPaintShapes.paint.myRepaint();\n//\t\t}\n//\t\t/***************end test*************************************/\n\t\tEnvelope envelope = new Envelope(-79.76259, -71.777491,\n\t\t\t\t40.477399, 45.015865);\n\t\tdouble area=envelope.getArea();\n\t\tdouble density=57584/area;\n\t\tSystem.out.println(\"density=\"+density);\n\t\tSystem.out.println(\"end calling!\");\n\t}", "public final void setAngle(int angle) {\r\n\t\tgetState().setAngle(angle);\r\n\t}", "public double calculateArcSine(double angle);", "@Override\n\tfinal public void rotate(double angle, Axis axis)\n\t{\n\t\t//center.setDirection(angle);\n\t}", "void resetAngle();", "public static float headingToArc(float pHeading, boolean pTurnRight){\n pHeading %= 360;\n pHeading = pHeading < 0 ? 360 + pHeading : pHeading;\n pHeading = 360 - pHeading;\n pHeading = pTurnRight ? pHeading - 90 : pHeading + 90;\n return pHeading;\n }", "public void turnTo(double angle){\n updateUndoBuffers(new LinkedList<>());\n myAngle = angle+STARTING_ANGLE;\n }", "public void setAngle(float angle) {\n this.angle = angle;\n cosAngle = (float) Math.cos(angle);\n sinAngle = 1 - cosAngle * cosAngle;\n }", "@Override\n public void reAngle() {\n }", "@Test\n public void rotateCommand() {\n ICommand cmd = Commands.getComand(\"rotate\");\n Robot robot = new Robot(0, 0);\n Vector2Di dir = robot.getDir();\n int rot_amount = 90;\n double orig_angle = dir.angle();\n cmd.exec(rot_amount, robot, null);\n assertEquals(orig_angle + rot_amount, dir.angle(), 0.1);\n }", "void increaseAngle() {\n this.strokeAngle += 3;\n this.updateAcc();\n this.updateStick();\n }", "@Test\r\n public void testCalculateAngle5() {\r\n System.out.println(\"calculateAngle5\");\r\n DialDraw instance = new TachometerDraw();\r\n instance.setValue(50);\r\n double expResult = Math.toRadians(90);\r\n double result = instance.calculateAngle();\r\n assertEquals(result, expResult, 0.0001);\r\n }", "public ResetArc(){}", "public void setAngle(float angle) {\n mAngle = angle;\n }", "public void driveCurve(int angle, double speed) {\r\n \tdrivetrain.drive(speed, angle);\r\n }", "double getAngle();", "double getAngle();", "private void tail(int centerX, int centerY, int radiusX, int radiusY, float angle) {\n Arc arc = new Arc();\n arc.setFill(getColor());\n arc.setType(ArcType.ROUND);\n arc.setRadiusX(radiusX);\n arc.setRadiusY(radiusY);\n arc.setCenterX(centerX);\n arc.setCenterY(centerY);\n arc.setStartAngle(angle);\n arc.setLength(90.0F);\n add(arc);\n }", "public void setAngle(double angleRad) {\n synchronized (this.angleLock) {\n this.movementComposer.setOrientationAngle(angleRad);\n }\n }", "public void rotateToAngle(int newAngle) {\n\t\tint diff = newAngle - getAngle();\n\t\tint diff1=Math.abs(diff-360);\n\t\tif (newAngle == getAngle()) {\n\t\t\tstopMotors();\n\t\t\treturn;\n\t\t}\n\t\twhile (Math.abs(getAngle() - newAngle) > 3&&opModeIsActive()) {\n\t\t\ttelemetry.addData(\"newangle\", newAngle);\n\t\t\ttelemetry.addData(\"getangle()\", getAngle());\n\t\t\ttelemetry.update();\n\t\t\tdiff = newAngle - getAngle();\n\t\t\tdiff1=Math.abs(getAngle() - newAngle);\n\t\t\tif ((diff > 0 && diff < 180) || (diff < 0 && Math.abs(diff) > 180)) {\n\n\t\t\t\tif(Math.abs(diff1)<13)\n\t\t\t\t\trotate(-0.06);\n\t\t\t\telse if(Math.abs(diff1)<50)\n\t\t\t\t\trotate(-0.1);\n\t\t\t\telse if(Math.abs(diff1)<160)\n\t\t\t\t\trotate(-0.5);\n\t\t\t\telse\n\t\t\t\t\trotate(-(0.00928571*Math.abs(diff1))+0.128571);\n\t\t\t} else {\n\n\t\t\t\tif(Math.abs(diff1)<13)\n\t\t\t\t\trotate(0.06);\n\t\t\t\telse if(Math.abs(diff1)<50)\n\t\t\t\t\trotate(0.1);\n\t\t\t\telse if(Math.abs(diff1)<160)\n\t\t\t\t\trotate(0.5);\n\t\t\t\telse\n\t\t\t\t\trotate((0.00928571*Math.abs(diff1))+0.128571);\n\t\t\t}\n\n\t\t}\n\t\tstopMotors();\n\n\t}", "@Test\r\n public void testCalculateAngle1() {\r\n System.out.println(\"calculateAngle1\");\r\n DialDraw instance = new TachometerDraw();\r\n instance.setValue(36);\r\n double expResult = Math.toRadians(115.2);\r\n double result = instance.calculateAngle();\r\n assertEquals(result, expResult, 0.0001);\r\n }", "public void setAngle(int angle) {\n this.angle = angle;\n notifyViews();\n }", "public void arcadeDrive(double fwd, double rot){\n m_drive.arcadeDrive(fwd, rot);\n }", "@SuppressWarnings(\"deprecation\")\n\tpublic void carAction(int linearSpeed, int angle, int angularSpeed)\n\t{\n\t\tif(angularSpeed == 0)\n\t\t\tpilot.moveStraight(linearSpeed, (int) angle);\n\t\telse\n\t\t\tpilot.spinningMove(linearSpeed, angularSpeed, angle);\n\t\t\n//\t\tpilot.spinningMove(0, angularSpeed, 0);\n//\t\tpilot.moveStraight(linearSpeed, (int) angle);\n\t\t\n\t\t// The spinning move method is more sophisticated but difficult to control\n\t\t//pilot.spinningMove(linearSpeed, angularSpeed, angle);\n\t}", "public double calculateArcSine(double angle, String angleType);", "public void updateAngle(){\n\t\tif (turnUp && (angle < 180) ){\n\t\t\tangle+=1;\n\t\t}\n\t\tif (turnDown && (angle > 0)){\n\t\t\tangle-=1;\n\t\t}\n\t}", "void frontAngle(float degrees) {\n float newFront = radians(degrees);\n \n // movement done from this direction from now on\n _rotVector.rotate(newFront - _front);\n \n _front = newFront;\n }", "public static void setAngle1(int angle){\r\n\t\tlaunchAngle1 = angle;\r\n\t\ttry {\r\n\t\t\tmanager1.setLaunchAngle(angle);\r\n\t\t} catch (EmitterException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "public void rotate(double angle) {\t\t\n\t\t// precompute values\n\t\tVector t = new Vector(this.a14, this.a24, this.a34);\n\t\tif (t.length() > 0) t = t.norm();\n\t\t\n\t\tdouble x = t.x();\n\t\tdouble y = t.y();\n\t\tdouble z = t.z();\n\t\t\n\t\tdouble s = Math.sin(angle);\n\t\tdouble c = Math.cos(angle);\n\t\tdouble d = 1 - c;\n\t\t\n\t\t// precompute to avoid double computations\n\t\tdouble dxy = d*x*y;\n\t\tdouble dxz = d*x*z;\n\t\tdouble dyz = d*y*z;\n\t\tdouble xs = x*s;\n\t\tdouble ys = y*s;\n\t\tdouble zs = z*s;\n\t\t\n\t\t// update matrix\n\t\ta11 = d*x*x+c; a12 = dxy-zs; a13 = dxz+ys;\n\t\ta21 = dxy+zs; a22 = d*y*y+c; a23 = dyz-xs;\n\t\ta31 = dxz-ys; a32 = dyz+xs; a33 = d*z*z+c;\n\t}", "public static void drawArc(MapLocation start, MapLocation end, MapLocation[] arc) throws GameActionException {\n\t\tint len = arc.length;\n\t\tif (len < 1) {\n\t\t\tdebug_print(\"Arc is screwed up!!!\");\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tint r = 120, g = 120, b = 120;\n\t\tdebug_line(start, arc[0], r, g, b);\t\t// first seg\n\t\tdebug_line(arc[len-1], end, r, g, b);\t// last seg\n\t\tfor (int s = 1; s < len; s++) {\n\t\t\tdebug_line(arc[s-1], arc[s], r, g, b);\t// middle seg\n\t\t}\n\t\t\n\t\tdebug_print(\"Arc sucessfully drawn.\");\n\t\t\n\t}", "public void rotate(double theta, boolean waitLeft, boolean waitRight) {\n\t\tint angle = LengthConverter.convertAngle(MotorConstants.WIDTH, theta);\n\t\tleftMotor.rotate(-angle, waitLeft);\n\t\trightMotor.rotate(angle, waitRight);\n\t}", "public AccelerometerTurn(double angle) {\n\tthis(angle, 0.7);\n }", "public void arcadeDrive(double fwd, double rot) {\n m_drive.arcadeDrive(fwd, rot);\n }", "public static double conicalAngle(double angle) \r\n {\r\n return (angle < 0.0 ? 2.0 * Math.PI + angle % (2.0 * Math.PI) : angle) % (2.0 * Math.PI);\r\n }", "public void rotateArms(int angle) {\n\t\tleftArmMotor.setSpeed(8);\n\t\trightArmMotor.setSpeed(8);\n\t\t\n\t\tleftArmMotor.rotate(angle, true);\n\t\trightArmMotor.rotate(angle, true);\n\t}", "void turnTo(double theta){\n\t\tdouble currT = odometer.getTheta();\n\t\tdouble deltaT = theta-currT;\n\t\t//makes sure smallest angle\n\t\tif(deltaT>180){\n\t\t\tdeltaT=deltaT-360;\n\t\t}\n\t\telse if(deltaT <-180){\n\t\t\tdeltaT= deltaT+360;\n\t\t}\n\t\t// set motors here \n\t\tleftMotor.setSpeed(LocalizationLab.ROTATE_SPEED);\n\t\trightMotor.setSpeed(LocalizationLab.ROTATE_SPEED);\n\t\tleftMotor.rotate(convertAngle(LocalizationLab.WHEEL_RADIUS, LocalizationLab.TRACK, deltaT), true);\n\t\trightMotor.rotate(-convertAngle(LocalizationLab.WHEEL_RADIUS, LocalizationLab.TRACK, deltaT), false);\n\n\t}", "public ShooterHoodAngleCommand(ShooterSubsystem shoot, double angle) {\n mServoAngle = angle;\n mShooter = shoot;\n addRequirements(mShooter);\n // Use addRequirements() here to declare subsystem dependencies.\n }", "@Override\n public void mousePressed(MouseEvent e) {\n\n final View view = controller.getView();\n final int originX = view.getOriginX();\n final int originY = view.getOriginY();\n\n if (view.getDragCircle().contains(e.getX(), e.getY()) && !view.getBlankCircle().contains(e.getX(), e.getY())) {\n\n // Get the mouse initial position\n int initialX = e.getX() - originX;\n int initialY = originY - e.getY();\n\n // Get the distance from the circle's center to the mouse initial position : √(x² + y²)\n double initialDist = Math.sqrt(Math.pow(initialX, 2) + Math.pow(initialY, 2));\n\n // Get the initial angle : arccos(initialX / initialDist)\n double initialA = Math.toDegrees(Math.acos(initialX / initialDist));\n if (initialY < 0) {\n initialA = 360 - initialA;\n }\n final double initialAngle = view.getDefaultStartAngle() - initialA;\n\n view.addMouseMotionListener(new MouseMotionListener() {\n\n @Override\n public void mouseDragged(MouseEvent dragEvent) {\n\n // Get the mouse current position\n int currentX = dragEvent.getX() - originX;\n int currentY = originY - dragEvent.getY();\n\n // Get the distance from the circle's center to the mouse current position : √(x² + y²)\n double currentDist = Math.sqrt(Math.pow(currentX, 2) + Math.pow(currentY, 2));\n\n // Get the current angle : arccos(currentX / currentDist)\n double angle = Math.toDegrees(Math.acos(currentX / currentDist));\n if (currentY < 0) {\n angle = 360 - angle;\n }\n\n // Update the view\n view.setDefaultStartAngle((angle + initialAngle) % 360);\n view.computeArcs(controller.getModel());\n view.repaint();\n }\n\n @Override\n public void mouseMoved(MouseEvent mouseEvent) {\n\n }\n });\n }\n }", "@Override\n protected void initialize() {\n\n /* System clock starts */\n baseTime = System.currentTimeMillis();\n /* Determines time that robot has to timeout after */\n thresholdTime = baseTime + duration;\n\n /* Convert the starting angle */\n if (Robot.drivetrain.getGyroYaw() < 0.0f) {\n /* Negative turn to 180-360 */\n startingAngle = Robot.drivetrain.getGyroYaw() + 360.0f;\n } else {\n /* Positives stay 0-180 */\n startingAngle = Robot.drivetrain.getGyroYaw();\n }\n\n /* The total angle needed to turn */\n totalAngleTurn = startingAngle + inputAngle;\n\n /* Declare the turning direction of special cases when the angle passes over 0 or 360 */\n if (totalAngleTurn < 0.0f) { \n /* If the angle is negative, convert it */\n totalAngleTurn += 360.0f;\n /* Trigger special case */\n specialCase = true;\n /* Trigger counterclockwise */\n clockwise = false;\n }\n if (totalAngleTurn > 360.0f) {\n /* If the angle is above 360, subtract 360 */\n totalAngleTurn -= 360.0f;\n /* Trigger special case */\n specialCase = true;\n /* Trigger clockwise */\n clockwise = true;\n }\n /* Only run if the special cases do not already declare a turning direction */\n if (!specialCase) {\n /* If the input angle is bigger, turn clockwise */\n if (totalAngleTurn > startingAngle) {\n clockwise = true;\n }\n /* If the input angle is smaller, turn counterclockwise */\n if (totalAngleTurn < startingAngle) {\n clockwise = false;\n }\n }\n }", "public void arcadeDrive(double moveValue, double rotateValue, boolean squaredInputs) {\n // local variables to hold the computed PWM values for the motors\n double leftMotorSpeed;\n double rightMotorSpeed;\n\n if (squaredInputs) {\n // square the inputs (while preserving the sign) to increase fine control while permitting full power\n if (moveValue >= 0.0) {\n moveValue = (moveValue * moveValue);\n } else {\n moveValue = -(moveValue * moveValue);\n }\n if (rotateValue >= 0.0) {\n rotateValue = (rotateValue * rotateValue);\n } else {\n rotateValue = -(rotateValue * rotateValue);\n }\n }\n\n if (moveValue > 0.0) {\n if (rotateValue > 0.0) {\n leftMotorSpeed = moveValue - rotateValue;\n rightMotorSpeed = Math.max(moveValue, rotateValue);\n } else {\n leftMotorSpeed = Math.max(moveValue, -rotateValue);\n rightMotorSpeed = moveValue + rotateValue;\n }\n } else {\n if (rotateValue > 0.0) {\n leftMotorSpeed = -Math.max(-moveValue, rotateValue);\n rightMotorSpeed = moveValue + rotateValue;\n } else {\n leftMotorSpeed = moveValue - rotateValue;\n rightMotorSpeed = -Math.max(-moveValue, -rotateValue);\n }\n }\n\n tankDrive(leftMotorSpeed, rightMotorSpeed);\n }", "@Test\r\n public void testCalculateAngle4() {\r\n System.out.println(\"calculateAngle4\");\r\n DialDraw instance = new TachometerDraw();\r\n instance.setValue(90);\r\n double expResult = Math.toRadians(18);\r\n double result = instance.calculateAngle();\r\n assertEquals(result, expResult, 0.0001);\r\n }", "@Test\r\n public void testCalculateAngle2() {\r\n System.out.println(\"calculateAngle2\");\r\n DialDraw instance = new TachometerDraw();\r\n instance.setValue(0);\r\n double expResult = Math.toRadians(180);\r\n double result = instance.calculateAngle();\r\n assertEquals(result, expResult, 0.0001);\r\n }", "public AutoRotateCommand(double angle, double speed){\r\n\t\tAHRS ahrs = new AHRS(Port.kMXP);\r\n\t\trequires(Robot.driveSys);\r\n\t\tangle = ahrs.getAngle();\r\n\t\tthis.speed = speed;\r\n\t}", "public void updateAngle() {\n\t\tfloat ak = 0;\n\t\tfloat gk = 0;\n\t\tak = (float) (pathBoardRectangles.get(curTargetPathCellIndex).getCenterX() - x);\n\t\tgk = (float) (pathBoardRectangles.get(curTargetPathCellIndex).getCenterY() - y);\n\t\tangleDesired = (float) Math.toDegrees(Math.atan2(ak*-1, gk));\n\t\t// if the angle and the angleDesired are opposites the Vector point into the opposite direction\n\t\t// this means the angle will be the angle of the longer vector which is always angle\n\t\t// so if that happens the angleDesired is offset so this won't happen\n\t\tangle = Commons.calculateAngleAfterRotation(angle, angleDesired, rotationDelay);\n\t}", "public void setAngle(float angle) {\n this.angle = angle;\n float cos = (float) Math.cos(angle);\n float sin = (float) Math.sin(angle);\n m00 = cos;\n m01 = sin;\n m10 = -sin;\n m11 = cos;\n }", "@Test\r\n public void testCalculateAngle3() {\r\n System.out.println(\"calculateAngle3\");\r\n DialDraw instance = new TachometerDraw();\r\n instance.setValue(100);\r\n double expResult = Math.toRadians(0);\r\n double result = instance.calculateAngle();\r\n assertEquals(result, expResult, 0.0001);\r\n }", "public void turnTo(double theta){//takes theta in degrees\r\n\t\t\t//set the motor speeds to the rotate speed\r\n\t\t\tleftMotor.setSpeed(ROTATE_SPEED);\r\n\t\t\trightMotor.setSpeed(ROTATE_SPEED);\r\n\r\n\t\t\t//makes the left wheel rotate forward theta\r\n\t\t\t//and the right wheel rotate backwards theta\r\n\t\t\tleftMotor.rotate(convertAngle(wheelRadius, wheelBase, theta), true);\r\n\t\t\trightMotor.rotate(-convertAngle(wheelRadius, wheelBase, theta), false);\r\n\t\t\t\r\n\t\t}", "void drawLauncher(double angle)\n {\n \tlauncherCanvas.rotateProperty().set(angle);\n \tlauncher.setFill(Color.GREY);\n launcher.fillRect(0,0,launcherCanvas.getWidth(),launcherCanvas.getHeight());\n }", "@Override\n\tpublic LSystemBuilder setAngle(double angle) {\n\t\tthis.angle = angle;\n\t\treturn this;\n\t}", "public double getAngle();", "void setAngle(int id, double value);", "@Override\n\tpublic void action() {\n\t\tsuppressed = false;\n\t\t//if (Settings.motorAAngle == -90) Settings.motorAAngle = -95;\n\n\t\tMotor.A.rotateTo(Settings.motorAAngle, true);\n\n\t\twhile (Motor.A.isMoving() && !Motor.A.isStalled() && !suppressed);\t\t\t\n\t\t\n\t\tMotor.A.stop();\n\t}", "ActionType(int x,int y,int rad,Circle crl,boolean isC){\n oldX=x;\n oldY=y;\n radius=rad;\n circleObj=crl;\n wasCreated=isC;\n }", "private void generateAngles( boolean constrained ) {\n System.out.println( dataset_name + \" \" + constrained );\n\n CartesianPoint[] eucs_array = new CartesianPoint[0];\n eucs_array = getData().toArray( eucs_array ); // count * count + count\n int len = eucs_array.length;\n\n Metric<CartesianPoint> metric = getMetric();\n\n for (int i = 0; i < count; i++) {\n\n double d_viewpoint_q = getMetric().distance(viewpoint, eucs_array[i]);\n for (int j = count + (count * i); j < ( 2 * count ) + (count * i); j++ ) {\n\n CartesianPoint query = eucs_array[i];\n CartesianPoint some_point;\n if( constrained ) {\n some_point = new CartesianPoint(getRandomVolumePoint(query.getPoint(), thresh));\n while( ! insideSpace( query ) ) {\n some_point = new CartesianPoint(getRandomVolumePoint(query.getPoint(), thresh));\n }\n } else {\n some_point = eucs_array[j];\n }\n\n double dqpi = metric.distance( query,some_point );\n double p1pi = metric.distance( viewpoint,some_point );\n\n double theta = Math.acos( ( square(dqpi) + square(d_viewpoint_q) - square(p1pi) ) / (2 * dqpi * d_viewpoint_q ) );\n\n System.out.println(theta);\n }\n }\n }", "AngleAdd createAngleAdd();", "Point rotate (double angle);", "public void addArc(Arc arc){\n\t\tArc[] oldArc = outArcs;\n\t\t\n\t\toutArcs = new Arc[oldArc.length+1];\n\t\tfor(int i=0;i<oldArc.length;i++){\n\t\t\toutArcs[i] = oldArc[i];\n\t\t}\n\t\toutArcs[oldArc.length] = arc;\n\t}", "@SuppressLint({\"NewApi\"})\n /* */ public void spin(int durationmillis, float fromangle, float toangle, Easing.EasingOption easing) {\n /* 482 */\n if (Build.VERSION.SDK_INT < 11) {\n /* */\n return;\n /* */\n }\n /* 485 */\n setRotationAngle(fromangle);\n /* */\n /* 487 */\n ObjectAnimator spinAnimator = ObjectAnimator.ofFloat(this, \"rotationAngle\", new float[]{fromangle, toangle});\n /* */\n /* 489 */\n spinAnimator.setDuration(durationmillis);\n /* 490 */\n spinAnimator.setInterpolator(Easing.getEasingFunctionFromOption(easing));\n /* */\n /* 492 */\n spinAnimator.addUpdateListener(new ValueAnimator.AnimatorUpdateListener()\n /* */ {\n /* */\n public void onAnimationUpdate(ValueAnimator animation)\n /* */ {\n /* 496 */\n PieRadarChartBase.this.postInvalidate();\n /* */\n }\n /* */\n });\n /* 499 */\n spinAnimator.start();\n /* */\n }", "public MoverToAngle(\n final double aTarget,\n final double aTargetTolerance,\n final PIDController aDistanceController,\n final PIDController aAngleController\n ) {\n mTargetAngle = aTarget;\n mTargetTolerance = aTargetTolerance;\n mDistanceController = aDistanceController;\n mDistanceController.reset();\n mAngleController = aAngleController;\n mAngleController.reset();\n \n mSpeed = 0;\n mTurnRate = 0;\n }", "public MilfordAuton(DriveSubsystem drive, Shooter shooter, ShooterAngle angle, Elevator elevator, double direction) {\n /*\n 1. Set angle to 45\n 2. Tune angle for 1 second\n 3. Rev shooter at 6000 RPM for 1 second\n 4. Shoot at 6000 for 4 seconds\n 5. Wait for 0.5 seconds\n 6. Drive forward for 3 seconds\n */\n super(new SetAngle(angle, 45), new HoldAngle(angle).withTimeout(1), new ShootAt(shooter).withTimeout(1),\n (new ShootAt(shooter).alongWith((new Elevate(elevator)))).withTimeout(4),\n (new NOP().withTimeout(0.5)).andThen(new DriveToWall(drive, direction).withTimeout(3)));\n }", "@Override\n protected void execute() {\n /*\n * Keep the angle read from the gyro constantly converted as long as currentAngle is \n * referenced compared to always reading raw values from the getGyroYaw.\n */\n if (Robot.drivetrain.getGyroYaw() < 0.0f) {\n currentAngle = Robot.drivetrain.getGyroYaw() + 360.0f;\n } else {\n currentAngle = Robot.drivetrain.getGyroYaw();\n\n }\n if (!clockwise) {\n /* Counterclockwise turning */\n Robot.drivetrain.arcadeDrive(speedY, -speedZ);\n } else if (clockwise) {\n /* Clockwise turning */\n Robot.drivetrain.arcadeDrive(speedY, speedZ);\n }\n }", "public void testEquals() {\r\n\t\t// direct circle\r\n\t\tCircleArc2D arc0 = new CircleArc2D();\r\n\t\tCircle2D circle = new Circle2D(0, 0, 1, true);\r\n\t\tCircleArc2D arc1 = new CircleArc2D(circle, 0, PI/2);\r\n\t\tCircleArc2D arc2 = new CircleArc2D(circle, 0, PI/2, true);\r\n\t\tCircleArc2D arc3 = new CircleArc2D(0, 0, 1, 0, PI/2);\r\n\t\tCircleArc2D arc4 = new CircleArc2D(0, 0, 1, 0, PI/2, true);\r\n\t\tassertTrue(arc1.equals(arc0));\r\n\t\tassertTrue(arc1.equals(arc2));\r\n\t\tassertTrue(arc1.equals(arc3));\r\n\t\tassertTrue(arc1.equals(arc4));\r\n\r\n\t\t// direct circle, with different angles\r\n\t\tcircle = new Circle2D(0, 0, 1, true);\r\n\t\tarc1 = new CircleArc2D(circle, PI/2, PI/2);\r\n\t\tarc2 = new CircleArc2D(circle, PI/2, PI, true);\r\n\t\tarc3 = new CircleArc2D(0, 0, 1, PI/2, PI/2);\r\n\t\tarc4 = new CircleArc2D(0, 0, 1, PI/2, PI, true);\r\n\t\tassertTrue(arc1.equals(arc2));\r\n\t\tassertTrue(arc1.equals(arc3));\r\n\t\tassertTrue(arc1.equals(arc4));\r\n\t\t\r\n\t\t// indirect circle, with different angles\r\n\t\tcircle = new Circle2D(0, 0, 1, true);\r\n\t\tarc1 = new CircleArc2D(circle, PI/2, -PI/2);\r\n\t\tarc2 = new CircleArc2D(circle, PI/2, 2*PI, false);\r\n\t\tarc3 = new CircleArc2D(0, 0, 1, PI/2, -PI/2);\r\n\t\tarc4 = new CircleArc2D(0, 0, 1, PI/2, 2*PI, false);\r\n\t\tassertTrue(arc1.equals(arc2));\r\n\t\tassertTrue(arc1.equals(arc3));\r\n\t\tassertTrue(arc1.equals(arc4));\r\n\t}", "@Override\n public void execute() {\n double output = controller.calculate(driveSubsystem.getHeading(), setPoint);\n driveSubsystem.driveCartesan(0.0, 0.0, output / 180);\n }" ]
[ "0.6743635", "0.62701106", "0.6192377", "0.61260974", "0.6015281", "0.6000632", "0.594723", "0.5929112", "0.5910208", "0.58669806", "0.58269703", "0.58245236", "0.5823925", "0.58126926", "0.58126926", "0.5771627", "0.5735055", "0.5718298", "0.56931335", "0.5630374", "0.5615234", "0.5606209", "0.55967927", "0.55942374", "0.55865973", "0.5567327", "0.5566617", "0.5566122", "0.55551916", "0.55516726", "0.55474716", "0.5538716", "0.55320317", "0.55130625", "0.54948443", "0.5481138", "0.547889", "0.54675484", "0.54566586", "0.54463804", "0.54347795", "0.5433957", "0.54145145", "0.5405661", "0.5401282", "0.53994113", "0.5396521", "0.5376352", "0.53571475", "0.53469455", "0.534674", "0.5342686", "0.5331876", "0.5331876", "0.53297645", "0.53237337", "0.53077924", "0.53012437", "0.5296593", "0.52919495", "0.5288535", "0.5287324", "0.52824134", "0.5264891", "0.52627474", "0.52533317", "0.5241879", "0.5238378", "0.52376896", "0.52183044", "0.52069217", "0.51820725", "0.5176273", "0.51738715", "0.5170282", "0.51638335", "0.51610786", "0.5148365", "0.51447", "0.51416403", "0.51365083", "0.5135965", "0.51351947", "0.512732", "0.51212573", "0.51073265", "0.50987095", "0.50971204", "0.5086696", "0.50844866", "0.508259", "0.50753176", "0.5054959", "0.5048456", "0.50478673", "0.50456333", "0.50411487", "0.5037412", "0.50360656", "0.5017284" ]
0.5254904
65
de check van infrarood is reeds gebeurd als deze methode wordt aangeroepen!
public abstract int getInfraredValue();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void checkeoDeBateria() {\n\n\t}", "protected boolean func_70814_o() { return true; }", "private void verificaData() {\n\t\t\n\t}", "public void checkIn() {\n\t}", "@Override\n\tpublic void check() {\n\t\t\n\t}", "@Override\n\tpublic void check() {\n\t\t\n\t}", "private boolean checkListino() {\n /* variabili e costanti locali di lavoro */\n boolean ok = false;\n Date dataInizio;\n Date dataFine;\n AddebitoFissoPannello panServizi;\n\n try { // prova ad eseguire il codice\n dataInizio = this.getDataInizio();\n dataFine = this.getDataFine();\n panServizi = this.getPanServizi();\n ok = panServizi.checkListino(dataInizio, dataFine);\n } catch (Exception unErrore) { // intercetta l'errore\n Errore.crea(unErrore);\n } // fine del blocco try-catch\n\n /* valore di ritorno */\n return ok;\n }", "@Override\n\tpublic boolean istBerechtigt() {\n\t\treturn true;\n\t}", "protected boolean func_70041_e_() { return false; }", "private boolean Verific() {\n\r\n\treturn true;\r\n\t}", "public void verifyBugerList()\n\t{\n\t\t\n\t}", "protected boolean colaVacia() {\r\n return ini == -1;\r\n }", "private void validateData() {\n }", "private boolean OK() {\r\n return in == saves[save-1];\r\n }", "private void strin() {\n\n\t}", "final void checkForComodification() {\n\t}", "void checkValid();", "private void validCheck ()\n\t{\n\t\tassert allButLast != null || cachedFlatListOrMore != null;\n\t}", "private boolean correcto() {\r\n return (casillas.size()>numCasillaCarcel); //&&tieneJuez\r\n }", "protected boolean isValid()\r\n {\r\n \treturn true;\r\n }", "@Override\n\tpublic boolean checkData() {\n\t\treturn false;\n\t}", "@Override\n\tpublic void verificar() {\n\t\tsuper.verificar();\n\t}", "void berechneFlaeche() {\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "public void checkData(){\n\n }", "@Override\n\tpublic void einkaufen() {\n\t}", "private boolean estPlein() {\n return (nbAssoc == associations.length);\n }", "private boolean checkLegbarkeit(Stein pStein){\n\n if (spielfeld.isEmpty()) //erster Stein, alles ist moeglich\n return true;\n\n //liegt schon ein Stein im Feld?\n spielfeld.toFirst();\n while(spielfeld.hasAccess()){\n Stein stein = spielfeld.getContent();\n if (pStein.gibZeile()==stein.gibZeile() && pStein.gibSpalte()==stein.gibSpalte())\n return false;\n spielfeld.next();\n }\n\n //bestimme alle Nachbarsteine\n java.util.List<Stein> oben = new ArrayList<>();\n java.util.List<Stein> rechts = new ArrayList<>();\n java.util.List<Stein> links = new ArrayList<>();\n java.util.List<Stein> unten = new ArrayList<>();\n\n findeNachbarSteine(pStein,oben, Richtung.oben);\n findeNachbarSteine(pStein,rechts, Richtung.rechts);\n findeNachbarSteine(pStein,unten, Richtung.unten);\n findeNachbarSteine(pStein,links, Richtung.links);\n\n if (oben.size()==0 && rechts.size()==0 && links.size()==0 && unten.size()==0) //keine Nachbar, Stein ins Nirvana gelegt\n return false;\n\n if(pruefeAufKonflikt(pStein,oben)) return false;\n if(pruefeAufKonflikt(pStein,rechts)) return false;\n if(pruefeAufKonflikt(pStein,unten)) return false;\n if(pruefeAufKonflikt(pStein,links)) return false;\n\n return true;\n }", "private void validateInputParameters(){\n\n }", "private int cantFantasmasRestantes() {\n // TODO implement here\n return 0;\n }", "public boolean method_2453() {\r\n return false;\r\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "boolean judgeValid()\r\n\t{\r\n\t\tif(loc.i>=0 && loc.i<80 && loc.j>=0 && loc.j<80 && des.i>=0 && des.i<80 && des.j>=0 && des.j<80)\r\n\t\t{\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t\t\r\n\t}", "private void correctError()\r\n\t{\r\n\t\t\r\n\t}", "public void smell() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\n\tpublic boolean erTom() {\n\t\treturn (bak == null);\n\t}", "private void peliLoppuuUfojenTuhoamiseen() {\n if (tuhotut == Ufolkm) {\n ingame = false;\n Loppusanat = \"STEVE HOLT!\";\n }\n }", "private boolean isValidInput() {\n\t\treturn true;\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\n\tpublic boolean checkInput() {\n\t\treturn true;\n\t}", "public boolean method_218() {\r\n return false;\r\n }", "boolean valid() {\n return true;\n }", "boolean valid() {\n return true;\n }", "boolean valid() {\n return true;\n }", "public void checkParameters() {\n }", "public void verliesLeven() {\r\n\t\t\r\n\t}", "public void verificar_que_se_halla_creado() {\n\t\t\n\t}", "private void checkRep() {\n\t\tassert (this != null) : \"this Edge cannot be null\";\n\t\tassert (this.label != null) : \"this Edge's label cannot be null\";\n\t\tassert (this.child != null) : \"this Edge's child cannot be null\";\n\t}", "private boolean solutionChecker() {\n\t\t// TODO\n\t\treturn false;\n\n\t}", "public void checkRep()\n {\n assert (x>=0 && x<=19 && y >=0 && y<=19 && (orientation == 0 || orientation == 90 || orientation == 180 || orientation == 270));\n }", "public boolean method_2434() {\r\n return false;\r\n }", "private boolean isInputValid() {\n return true;\n }", "public void checkFields(){\n }", "@Override\n\tpublic boolean paie() {\n\t\treturn false;\n\t}", "public boolean method_4088() {\n return false;\n }", "public final void nonRedefinissableParEnfant(){\n\n }", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n protected void validaRegras(ArquivoLoteVO entity) {\n\n }", "void checkRep() {\n\t\tassert this.clauses != null : \"SATProblem, Rep invariant: clauses non-null\";\n\t}", "protected boolean laufEinfach(){ \r\n\r\n\t\tint groessteId=spieler.getFigur(0).getPosition().getId();\r\n\t\tint figurId=0; // Figur mit der gr��ten ID\r\n\t\t\r\n\t\t\r\n\t\tfor(int i=1; i<4; i++)\r\n\t\t{ \r\n\t\t\tint neueId;\r\n\t\t\tneueId = spieler.getFigur(i).getPosition().getId() + spiel.getBewegungsWert();\r\n\t\t\tif(spieler.getFigur(i).getPosition().getTyp() != FeldTyp.Startfeld && groessteId<spieler.getFigur(i).getPosition().getId()){\r\n\t\t\t\tgroessteId=spieler.getFigur(i).getPosition().getId();\r\n\t\t\t\tfigurId=i;\r\n\t\t\t}\r\n\t\t\tneueId = spiel.ueberlauf(neueId, i);\r\n\t\t\tif (spieler.getFigur(i).getPosition().getTyp() == FeldTyp.Endfeld) {\r\n\t\t\t\tif (!spiel.zugGueltigAufEndfeld(neueId, i)) {\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tneueId = spieler.getFigur(i).getPosition().getId() + spiel.getBewegungsWert();\r\n\t\t\t\tif(spieler.getFigur(i).getPosition().getId() == spieler.getFigur(i).getFreiPosition()){\r\n\t\t\t\t\tif(!spiel.userIstDumm(neueId, i)){\r\n\t\t\t\t\t\tfigurId = i;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tfor(int j = 0; j < 4; j++){\r\n\t\t\t\t\t\t\tif(spieler.getFigur(j).getPosition().getId() == neueId){\r\n\t\t\t\t\t\t\t\tif(!spiel.userIstDumm(neueId+spiel.getBewegungsWert(), j)){\r\n\t\t\t\t\t\t\t\t\tfigurId = j;\r\n\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tspiel.bewege(figurId);\r\n\t\treturn true;\r\n\t}", "@Override\n protected void checkLocation() {\n // nothing\n }", "boolean checkVerification();", "public abstract boolean istAusgeliefert();", "public boolean method_108() {\r\n return false;\r\n }", "@Override\n\tpublic boolean datiUscitaImpegno() {\n\t\treturn false;\n\t}", "protected boolean isValidData() {\n return true;\n }", "@Override\n\tpublic boolean faelltAuf(TetrominoSpielstein tetrominoSpielstein) {\n\t\treturn false;\n\t}", "public boolean sucheMitspieler();", "void check();", "void check();", "public boolean method_216() {\r\n return false;\r\n }", "private static void check(boolean bedingung, String msg) throws IllegalArgumentException\n {\n if (!bedingung)\n throw new IllegalArgumentException(msg);\n }", "@Override\n\tpublic void erstellen() {\n\t\t\n\t}", "@Override\r\n\tpublic boolean validaObj() {\n\t\treturn false;\r\n\t}", "@Override\r\n\tpublic void validate() {\n\t\tsuper.validate();\r\n\t\tif(nofck == null)\r\n\t\t\tnofck = false;\r\n\t}", "@Override\r\n\tpublic boolean checkValidity() {\n\t\treturn false;\r\n\t}", "private Boolean precond() {\r\n\t\tcalculoCantidadSacar(grupoPuestosController.getIdConcursoPuestoAgr());\r\n\t\t/**\r\n\t\t * fin incidencia 0001649\r\n\t\t */\r\n\t\tBoolean respuesta = validacionesIteracion();\r\n\t\treturn respuesta;\r\n\t}", "@Override\n\t\tpublic boolean isValid() {\n\t\t\treturn false;\n\t\t}", "public boolean estavacia(){\n return inicio==null;\n }", "private void remplirUtiliseData() {\n\t}", "private boolean checkFields() {\n\t\tboolean status = true;\n\n\t\treturn status;\n\t}", "@Override\n\tpublic boolean livre() {\n\t\treturn true;\n\t}", "@Override\n\tpublic void verkaufen() {\n\t}", "public void checkData2019() {\n\n }", "@Override\r\n\tpublic boolean isValid() {\n\t\treturn false;\r\n\t}", "protected void validate() {\n // no op\n }", "@Override\n\tprotected void logic() {\n\n\t}", "private void poetries() {\n\n\t}", "@Test\n\tpublic void testGehituErabiltzaile() {\n\t\tErabiltzaileLista.getErabiltzaileLista().erreseteatuErabiltzaileLista();\t\t\n\t\tErabiltzaileLista.getErabiltzaileLista().gehituErabiltzaile(\"Martin\", \"123456\",\"123456\");\n\t\tassertEquals(1, ErabiltzaileLista.getErabiltzaileLista().erabiltzaileKop());\n\t\tErabiltzaileLista.getErabiltzaileLista().gehituErabiltzaile(\"Mikel\", \"123456\",\"123456\");\n\t\tassertEquals(2,ErabiltzaileLista.getErabiltzaileLista().erabiltzaileKop());\n\t\tErabiltzaileLista.getErabiltzaileLista().gehituErabiltzaile(\"Martin\", \"123456\",\"123456\");\n\t\tassertEquals(2, ErabiltzaileLista.getErabiltzaileLista().erabiltzaileKop());\n\t}", "@Override\r\n\tpublic void validate() {\n\t\t\r\n\t}", "public boolean whiteCheck() {\n\t\treturn false;\n\t}", "public void inquiryError() {\n\t\t\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "public boolean method_4132() {\n return false;\n }", "public void nastaviIgru() {\r\n\t\t// nastavi igru poslije pobjede\r\n\t\tigrajPoslijePobjede = true;\r\n\t}", "@Override\r\n\tprotected void validate() {\n\t}", "private void remplirPrestaraireData() {\n\t}", "public void ValidandoPerfil()\r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic boolean isValid() {\n\t\treturn false;\n\t}" ]
[ "0.65236163", "0.63959956", "0.63746756", "0.6255718", "0.6245349", "0.6245349", "0.60841024", "0.60740346", "0.60683256", "0.60609436", "0.6042531", "0.6038318", "0.6003", "0.59939706", "0.59497124", "0.5912024", "0.5879579", "0.5873249", "0.5851158", "0.58470726", "0.5846861", "0.58334947", "0.5827862", "0.5817711", "0.5814852", "0.58039755", "0.58038133", "0.5802907", "0.57884043", "0.5788104", "0.5768635", "0.5763276", "0.57604325", "0.5754703", "0.57366145", "0.57317746", "0.5723404", "0.5722134", "0.5694564", "0.569019", "0.5679197", "0.5670946", "0.56660813", "0.56660813", "0.56660813", "0.5661993", "0.565194", "0.56483495", "0.5638698", "0.5636803", "0.5631508", "0.5627526", "0.56268495", "0.561943", "0.5618205", "0.5611676", "0.5611331", "0.5610538", "0.56038755", "0.55940723", "0.5592411", "0.5584404", "0.55718553", "0.5570311", "0.55657655", "0.55648994", "0.55583864", "0.5556141", "0.55545956", "0.5553777", "0.5553777", "0.55518687", "0.5550231", "0.55477685", "0.5547384", "0.5545851", "0.5543442", "0.5540223", "0.55381775", "0.55361974", "0.55334604", "0.5532787", "0.5531931", "0.55317295", "0.5524046", "0.5518401", "0.5514026", "0.5510402", "0.55082643", "0.55076873", "0.5502489", "0.54904675", "0.54859096", "0.5484297", "0.5484297", "0.5483838", "0.5479967", "0.54768395", "0.5476266", "0.54733163", "0.54691917" ]
0.0
-1
//////////////////////////////////////////////////////////////////////////// VANAF HIER IMPLEMENTATIE PLAYER HANDLER// ////////////////////////////////////////////////////////////////////////////
@Override public void playerReady(String playerID, boolean isReady) { //printMessage("ph.playerReady: "+playerID+" is ready"); //moeten wij niets met doen }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void handleServer(EntityPlayerMP player) {\n\n\t}", "public static void handleDream(Player player) {\n\t\t\n\t}", "public void OnPlayer(Joueur joueur);", "@Override\n public void handle(Event event) {\n secondPlayer();\n }", "void handleKeyboard(KeyboardHandler kh, Player player) throws IOException {\n\n if (kh.wPressed()) {\n if (player.checkCollisionHorizWall(90) == 1) {\n player.setDeltaY(-7);\n }\n else {\n player.setDeltaY(0);\n }\n }\n if (kh.sPressed()) {\n if (player.checkCollisionHorizWall(height-220) == 0) {\n player.setDeltaY(7);\n }\n else {\n player.setDeltaY(0);\n }\n }\n if (kh.aPressed()) {\n if (player.checkCollisionVerticalWall(150) == 1) {\n player.setDeltaX(-7);\n }\n else {\n player.setDeltaX(0);\n }\n }\n if (kh.dPressed()) {\n if (player.checkCollisionVerticalWall(width-200) == 0) {\n player.setDeltaX(7);\n }\n else {\n player.setDeltaX(0);\n }\n }\n\n if (kh.shiftPressed()) {\n shiftPress = 1;\n }\n else {\n if (shiftPress == 1) {\n\n player.meleeAttack();\n }\n shiftPress = 0;\n }\n\n if (kh.onePressed()) {\n onePress = 1;\n }\n else {\n if (onePress == 1) {\n\n player.shootArrow();\n }\n onePress = 0;\n }\n\n if (!kh.wPressed() && !kh.sPressed()) {\n player.setDeltaY(0);\n }\n\n if (!kh.aPressed() && !kh.dPressed()) {\n player.setDeltaX(0);\n }\n\n if (kh.escapePressed()) {\n escapePress = 1;\n }\n else {\n if (escapePress == 1) {\n \tingamemenu = new Menuingame(window, kh, level.getLevelNum());\n }\n escapePress = 0;\n }\n\n /*\n End keyboard handling block\n */\n }", "public static void handleMagicImbue(Player player) {\n\t\t\n\t}", "@Override\r\n\tpublic void onPlayerHit(Player p) {\n\r\n\t}", "@Override\n public void landedOn(Player player) {}", "public void initPlayer();", "@Override\r\n\tpublic void onPlayerHit(Player p) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void onPlayerHit(Player p) {\n\t\t\r\n\t}", "protected Player getPlayer() { return player; }", "@Override\n\tpublic void loadPlayer() {\n\t\t\n\t}", "Player getCurrentPlayer();", "Player getCurrentPlayer();", "Player currentPlayer();", "void playerAdded();", "void makePlay(int player) {\n }", "@Override\n\tpublic void updatePlayer(Joueur joueur) {\n\t\t\n\t}", "@Override\n public void processPlayer(Player sender, CDPlayer playerData, String[] args) {\n }", "public void playerWon()\r\n {\r\n \r\n }", "public void presentPlayer( CoinFlipper theHandle, String theName );", "Player getPlayer();", "abstract void updatePlayer();", "public static void handleHunterKit(Player player) {\n\t\t\n\t}", "Player() {\r\n setPlayerType(\"HUMAN\");\r\n\t}", "public void onAction(Player player) {\n }", "@Override\n\tpublic void play() {\n\t\t\n\t}", "public Player getPlayer() { return player;}", "void updatePlayer(Player player);", "@Override\n\tpublic void play() {\n\n\t}", "interface Player {\n /**\n * player playing as hare\n */\n int PLAYER_TYPE_HARE = 100;\n\n /**\n * player playing as hound\n */\n int PLAYER_TYPE_HOUND = 101;\n }", "@Override\r\npublic void Play() {\n\t\r\n}", "@Override\r\n public void play()\r\n {\n\r\n }", "void initializePlayer();", "public void play(){\n\t\t\n\t}", "Player getSelectedPlayer();", "public void use(Player player) {\n\n\t}", "@Override\n\tpublic void setPlayer(Player player) {\n\n\t}", "public void playerLost()\r\n {\r\n \r\n }", "@Override\n\tpublic void onPlayerMove(PlayerMoveEvent e) {\n\t\t\n\t}", "void playerPositionChanged(Player player);", "void win(Player player);", "public Player getPlayer() { return player; }", "public abstract void accept(Player player, String component);", "public Player getPlayer();", "public Player getPlayer();", "public Player updatePlayer(Player player);", "public void welcomePlayer(Player p);", "Player createPlayer();", "@Override\n\tpublic void requestHandle(IPlayer player, IMessage message) {\n\t\t\n\t}", "public abstract void info(Player p);", "@Override\r\n\t\t\tpublic void seeEvent(Player p, String s) {\n\t\t\t\t\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void seeEvent(Player p, String s) {\n\t\t\t\t\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void seeEvent(Player p, String s) {\n\t\t\t\t\r\n\t\t\t}", "@Override\n\tpublic void onRun(PlatformPlayer player) {\n\t\t\n\t}", "public Player getPlayer()\r\n {\r\n return player;\r\n }", "@Override\n\tpublic void nowPlaying() {\n\t}", "private void createHandler() {\r\n playerAHandler = new Handler() {\r\n @Override\r\n public void handleMessage(Message msg) {\r\n switch(msg.what) {\r\n case Constants.MADE_MOVE:\r\n makeMove();\r\n break;\r\n default: break;\r\n }\r\n }\r\n };\r\n }", "public Player getPlayer(){\r\n return player;\r\n }", "public abstract CardAction play(Player p);", "public abstract boolean isPlayer();", "@Override\n\tpublic void onLookUp(PlatformPlayer player) {\n\t\t\n\t}", "public void setPlayer(Player player) {\r\n this.player = player;\r\n }", "@Override\n\tpublic void playCard() {\n\t\t\n\t}", "void playerPassedStart(Player player);", "public void setPlayer(String player) {\r\n this.player = player;\r\n }", "public void play() {\n\t\t\r\n\t}", "public Player getPlayer() {\r\n return player;\r\n }", "@Override\n public boolean isPlayer() {\n return super.isPlayer();\n }", "public void createPlayer() {\n mainHandler = new Handler();\n videoTrackSelectionFactory = new AdaptiveTrackSelection.Factory(bandwidthMeter);\n trackSelector = new DefaultTrackSelector(videoTrackSelectionFactory);\n player = ExoPlayerFactory.newSimpleInstance(this, trackSelector);\n }", "public final static PlayerHandler getPlayerHandler() {\r\n\t\treturn playerHandler;\r\n\t}", "private void setPlayer() {\n player = Player.getInstance();\n }", "public EpicPlayer getEpicPlayer(){ return epicPlayer; }", "@Override\r\n\tpublic void playCard() {\n\t\t\r\n\t}", "String getPlayer();", "public void gestionDeSonido() {\n if (surface.escenas == 0) {\n if (surface.sonido.players[1].isPlaying()) {\n surface.sonido.players[1].pause();\n surface.sonido.players[0].start();\n } else {\n surface.sonido.players[0].start();\n }\n\n } else if (surface.escenas >= 1 && surface.escenas < 21 && surface.escenas != 8) {\n if (!surface.sonido.players[1].isPlaying() || surface.sonido.players[2].isPlaying()) {\n surface.sonido.players[2].pause();\n surface.sonido.players[0].pause();\n surface.sonido.players[1].start();\n\n }else if(surface.sonido.players[0].isPlaying()){\n surface.sonido.players[0].pause();\n surface.sonido.players[1].start();\n\n }else{\n if(!surface.sonido.players[1].isPlaying()) {\n surface.sonido.players[1].start();\n }\n }\n } else if (surface.escena instanceof Batalla || surface.escena instanceof BatallaFinal) {\n /*if (!surface.sonido.players[2].isPlaying()) {\n surface.sonido.players[1].pause();\n\n surface.sonido.players[2] = new MediaPlayer();\n try {\n surface.sonido.players[2] = MediaPlayer.create(surface.getContext(), R.raw.darkambienceloop);\n } catch (NullPointerException e) {\n\n }\n surface.sonido.players[2].setOnPreparedListener(new MediaPlayer.OnPreparedListener() {\n\n public void onPrepared(MediaPlayer mp) {\n surface.sonido.players[2].start();\n }\n });\n }*/\n if(surface.sonido.players[1].isPlaying()&&!surface.sonido.players[2].isPlaying()){\n surface.sonido.players[1].pause();\n surface.sonido.players[2] = new MediaPlayer();\n try {\n surface.sonido.players[2] = MediaPlayer.create(surface.getContext(), R.raw.darkambienceloop);\n } catch (NullPointerException e) {\n\n }\n surface.sonido.players[2].setOnPreparedListener(new MediaPlayer.OnPreparedListener() {\n\n public void onPrepared(MediaPlayer mp) {\n surface.sonido.players[2].start();\n }\n });\n }else if(!surface.sonido.players[2].isPlaying()){\n surface.sonido.players[2].start();\n }\n\n }\n }", "public void setPlayer(Player player) {\n this.player = player;\n }", "protected abstract void internalPlay();", "@Override\n\tpublic void attiva(Player player) {\n\n\t}", "@Override\r\n\tpublic void playMonumentCard() {\n\t\t\r\n\t}", "@Override\n\tpublic void keyPressed(KeyEvent e){\n\t\tint key = e.getKeyCode();\n\t\tfor (int i=0; i<handler.objects.size(); i++){\n\t\t\tGameObject tempObj = handler.objects.get(i);\n\t\t\tif(tempObj.getId()== ID.Player){\n\t\t\t\t// all key events are handled here for player 1\n\t\t\t\tif (key == KeyEvent.VK_UP){ tempObj.setVelY(-4); keyPressed[0] = true;}\n\t\t\t\tif (key == KeyEvent.VK_DOWN){ tempObj.setVelY(4); keyPressed[1] = true;}\n\t\t\t\tif (key == KeyEvent.VK_RIGHT){ tempObj.setVelX(4);keyPressed[2] = true;}\n\t\t\t\tif (key == KeyEvent.VK_LEFT){ tempObj.setVelX(-4);keyPressed[3] = true;}\n\t\t\t}\n\t\t\t\n//\t\t\telse if (tempObj.getId()== ID.Player2){\n//\t\t\t\t// all key events are handled here for player 2\n//\t\t\tif (key == KeyEvent.VK_W) tempObj.setVelY(-4);\n//\t\t\tif (key == KeyEvent.VK_S) tempObj.setVelY(4);\n//\t\t\tif (key == KeyEvent.VK_D) tempObj.setVelX(4);\n//\t\t\tif (key == KeyEvent.VK_A) tempObj.setVelX(-4);\n//\t\t\t}\n\t\t}\n\t\tif (key == KeyEvent.VK_P) {\n\t\t\tif (game.gameState == STATE.Game) {\n\t\t\t\tGame.paused = !Game.paused;\n\t\t\t}\n\t\t}\n\t\tif (key == KeyEvent.VK_ESCAPE) System.exit(0);\n\t}", "public void setPlayer(Player player) {\n this.player = player;\n }", "@Override\r\n public void handle(KeyEvent event){\n if (event.getCode() == KeyCode.LEFT) {\r\n //rotate counter-clockwise by one degree\r\n L = false;\r\n //Moves player right\r\n } else if (event.getCode() == KeyCode.RIGHT) {\r\n \r\n R = false;\r\n \r\n \r\n //Moves player up\r\n } else if (event.getCode() == KeyCode.UP) {\r\n Forward = false;\r\n deltaX5 = 0;\r\n deltaY5 = 0; \r\n \r\n }\r\n }", "public void update(Player player) {\n\t\t\n\t}", "public EventHandler<KeyEvent> getPlayerKeyPressedHandler(Player player) {\n return new EventHandler<KeyEvent>() {\n @Override\n public void handle(KeyEvent event) {\n if (event.getCode() == fireWeapon) {\n player.fireWeapon();\n }\n \n if (event.getCode() == moveLeft) {\n player.setDirection(Direction.LEFT);\n }\n \n if (event.getCode() == moveRight) {\n player.setDirection(Direction.RIGHT);\n }\n \n if (event.getCode() == aimUp) {\n player.setAim(Direction.UP);\n }\n \n if (event.getCode() == aimDown) {\n player.setAim(Direction.DOWN);\n }\n \n if (event.getCode() == jetpackOn) {\n player.setJetpackState(true);\n }\n }\n };\n }", "public interface Player {\n abstract void setVideoUri(String path);\n abstract void playVideo();\n abstract void pauseVideo();\n abstract void initVideo();\n abstract void ffwd();\n abstract void frwd();\n abstract void release();\n abstract void setFirstSubtitle(String path);\n abstract void setSecoundSubtitle(String path);\n abstract void seekTo(int millisec);\n abstract void sinkSubtitle();\n abstract void toggleTopPanel();\n abstract boolean isPlaying();\n abstract int getCurrentPosition();\n}", "public abstract void activatedBy(Player player);", "@Override\r\n public void handleMessage (Message inputMessage) {\n OnUpdatePlayerSubscription.OnUpdatePlayer updatePlayer = response.data().onUpdatePlayer();\r\n\r\n Log.i(TAG, \"updated user is \" + updatePlayer.toString() + \" session id is \" + sessionId);\r\n //checking if the updated player is in this session\r\n if(updatePlayer.session().id().equals(sessionId)){\r\n boolean contains = false;\r\n\r\n //checking if the updated player is in the current player list\r\n for(Player player : players){\r\n\r\n // if we have a match update players lat/long\r\n if(updatePlayer.id().equals(player.getId())){\r\n List<LatLng> bananasList = new LinkedList<>();\r\n bananasList.add(new LatLng(response.data().onUpdatePlayer().lat(),\r\n response.data().onUpdatePlayer().lon()));\r\n player.setLocations(bananasList); // sets location for the player\r\n player.setIt(updatePlayer.isIt());\r\n contains = true;\r\n }\r\n }\r\n\r\n //if the player is in the session, but not in the player list, then make a new player and add them to the players list and add a marker\r\n if(contains == false){\r\n Marker marker = mMap.addMarker(new MarkerOptions()\r\n .position(new LatLng(updatePlayer.lat(), updatePlayer.lon()))\r\n .title(updatePlayer.username()));\r\n Circle circle = mMap.addCircle(new CircleOptions()\r\n .center(new LatLng(updatePlayer.lat(), updatePlayer.lon()))\r\n .radius(tagDistance)\r\n .fillColor(Color.TRANSPARENT)\r\n .strokeWidth(3));\r\n\r\n marker.setIcon(playerpin);\r\n circle.setStrokeColor(notItColor);\r\n\r\n Player newPlayer = new Player();\r\n newPlayer.setId(updatePlayer.id());\r\n newPlayer.setIt(false);\r\n newPlayer.setMarker(marker);\r\n newPlayer.setCircle(circle);\r\n newPlayer.setUsername(updatePlayer.username());\r\n List<LatLng> potatoes = new LinkedList<>();\r\n potatoes.add(new LatLng(updatePlayer.lat(), updatePlayer.lon()));\r\n newPlayer.setLocations(potatoes);\r\n\r\n //adding player to the list of players in the game\r\n players.add(newPlayer);\r\n }\r\n }\r\n// for(Player player : players) {\r\n// if(response.data().onUpdatePlayer().id().equals(player.getId())) {\r\n// // if true (we have a match) update players lat/long\r\n// List<LatLng> bananasList = new LinkedList<>();\r\n// bananasList.add(new LatLng(response.data().onUpdatePlayer().lat(),\r\n// response.data().onUpdatePlayer().lon()));\r\n// player.setLocations(bananasList); // sets location for the player\r\n// //Might have been causing the starting point to move\r\n//// player.getCircle().setCenter(player.getLastLocation());\r\n//// player.getMarker().setPosition(player.getLastLocation());\r\n// }\r\n// }\r\n }", "public void onClickPlayer() {\n carIcon.setOpacity(1);\n playerIcon.setOpacity(1);\n playerList.getSelectionModel().selectedItemProperty().addListener((observable, oldValue, newValue) -> {\n displayUserInfo(newValue);\n });\n MAIN_MENU_AUDIO.play(Double.parseDouble(getInitData().get(\"SFXVol\")));\n }", "public void switchPlayer(){\n // Menukar giliran player dalam bermain\n Player temp = this.currentPlayer;\n this.currentPlayer = this.oppositePlayer;\n this.oppositePlayer = temp;\n }", "@Override\n\tpublic void keyPressed(KeyEvent e) {\n\t\tif(e.getKeyCode() == KeyEvent.VK_RIGHT) {\n\t\t\tplayer.right = true; \n\t\t}\n\t\telse if(e.getKeyCode() == KeyEvent.VK_LEFT) {\n\t\t\tplayer.left = true; \n\t\t}\n\t\t\n\t\tif(e.getKeyCode() == KeyEvent.VK_Z) {\n\t\t\tplayer.shoot = true;\n\t\t}\n\t\t\n\t\tif(e.getKeyCode() == KeyEvent.VK_UP) {\n\t\t\tplayer.up = true; \n\t\t}\n\t\telse if(e.getKeyCode() == KeyEvent.VK_DOWN) {\n\t\t\tplayer.down = true; \n\t\t}\n}", "@Override\n public void keyUp(KeyEvent e){\n super.keyUp(e);\n// if(e.getKeyCode() == KeyEvent.VK_S)\n// spawnControl.spawnNow();\n// if(e.getKeyCode() == KeyEvent.VK_D)\n// player.sleep();\n// if(e.getKeyCode() == KeyEvent.VK_E)\n// player.invincibility();\n// if(e.getKeyCode() == KeyEvent.VK_F)\n// player.fast();\n }", "boolean InitialisePlayer (String path_name);", "void doAction(Player player);", "@Override\n public void onStarted(EasyVideoPlayer player) {\n }", "public Player getPlayer() {\n return player;\n }", "public abstract void isUsedBy(Player player);", "private void handleInput(){\n if(\"W\".charCodeAt(0) in this.keypressed) {\n this.player1SpeedY = this.playerSpeed * -1;\n } else if (\"S\".charCodeAt(0) in this.keypressed){\n this.player1SpeedY = this.playerSpeed;\n } else {\n this.player1SpeedY = 0;\n }\n // player 2 (on the right) uses 'I' to move up and 'K' to move down\n if(\"I\".charCodeAt(0) in this.keypressed) {\n this.player2SpeedY = this.playerSpeed * -1;\n } else if (\"K\".charCodeAt(0) in this.keypressed){\n this.player2SpeedY = this.playerSpeed;\n } else {\n this.player2SpeedY = 0;\n }\n }", "@Override\n public void handle(ForwardEvent event) {\n if (isPlayerAlive()) {\n player.dispose();\n }\n playlist.next();\n player = new MediaPlayer(playlist.getCurrentMedia());\n initPlay();\n }", "public Player getPlayer() {\n return player;\n }" ]
[ "0.71373504", "0.71135616", "0.69244784", "0.685429", "0.6848974", "0.6845427", "0.6838431", "0.6796018", "0.6784967", "0.6746137", "0.6746137", "0.6729264", "0.6703956", "0.6693106", "0.6693106", "0.66629094", "0.6655055", "0.6654865", "0.6631584", "0.6609854", "0.6590904", "0.6587099", "0.657809", "0.6568866", "0.65685034", "0.6545803", "0.65393704", "0.65084285", "0.6502608", "0.6487419", "0.6481566", "0.64659876", "0.64614433", "0.6460993", "0.64587677", "0.64570683", "0.6430263", "0.643002", "0.64267313", "0.64123416", "0.64038914", "0.6369573", "0.6365462", "0.6358157", "0.6347588", "0.6336475", "0.6336475", "0.63109267", "0.63063294", "0.6290243", "0.6277942", "0.6272513", "0.62648547", "0.62648547", "0.62648547", "0.6256645", "0.6251101", "0.6248948", "0.6248931", "0.6202118", "0.62006366", "0.61956155", "0.6194228", "0.619048", "0.6177578", "0.61750686", "0.61749154", "0.61662894", "0.6156572", "0.6153692", "0.61500317", "0.6148086", "0.61480653", "0.61473393", "0.6143399", "0.61386997", "0.6131636", "0.61294717", "0.61274457", "0.61240935", "0.6118008", "0.61140436", "0.610453", "0.60997313", "0.6099469", "0.60965496", "0.6095728", "0.6086574", "0.60856575", "0.60762566", "0.60722816", "0.6068235", "0.60677105", "0.6066018", "0.60599357", "0.6041791", "0.6032124", "0.60243857", "0.6012885", "0.6011627", "0.6010742" ]
0.0
-1
printMessage("ph.playerJoining: "+playerID+" is joining"); moeten wij niets met doen
@Override public void playerJoining(String playerID) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void playerJoined(String playerID) {\n\t}", "public void sendJoiningPlayer() {\r\n Player p = nui.getPlayerOne();\r\n XferJoinPlayer xfer = new XferJoinPlayer(p);\r\n nui.notifyJoinConnected();\r\n networkPlayer.sendOutput(xfer);\r\n }", "GameJoinResult join(Player player);", "@EventHandler\r\n public void onPlayerJoinEvent(PlayerJoinEvent event) {\r\n Player p = event.getPlayer();\r\n plugin.sendStatusMsg(p);\r\n }", "@Override\r\n public void onPlayerJoin(PlayerJoinEvent event) {\r\n Player player = event.getPlayer();\r\n \r\n // Play back messages stored in this player's maildir (if any)\r\n String[] messages = plugin.getMessages(player);\r\n if (messages.length > 0) {\r\n \tfor (String message : messages) {\r\n \t\tplayer.sendMessage(message);\r\n \t}\r\n \tplayer.sendMessage(\"[Pe] §7Use /petition to view, comment or close\");\r\n }\r\n }", "@SuppressWarnings(\"deprecation\")\n @EventHandler(ignoreCancelled = true, priority = EventPriority.HIGHEST)\n\tvoid onPlayerJoin(PlayerJoinEvent event)\n\t{\n\t\tPlayer player = event.getPlayer();\n\t\tUUID playerID = player.getUniqueId();\n\t\t\n\t\t//note login time\n\t\tDate nowDate = new Date();\n long now = nowDate.getTime();\n\n\t\t//if player has never played on the server before...\n\t\tif(!player.hasPlayedBefore())\n\t\t{\n\t\t //if in survival claims mode, send a message about the claim basics video (except for admins - assumed experts)\n\t\t if(instance.config_claims_worldModes.get(player.getWorld()) == ClaimsMode.Survival && !player.hasPermission(\"griefprevention.adminclaims\") && this.dataStore.claims.size() > 10)\n\t\t {\n\t\t WelcomeTask task = new WelcomeTask(player);\n\t\t Bukkit.getScheduler().scheduleSyncDelayedTask(instance, task, instance.config_claims_manualDeliveryDelaySeconds * 20L);\n\t\t }\n\t\t}\n\n\t\t//in case player has changed his name, on successful login, update UUID > Name mapping\n\t\tinstance.cacheUUIDNamePair(player.getUniqueId(), player.getName());\n\t}", "@EventHandler(priority = EventPriority.HIGHEST)\r\n\tpublic void onPlayerJoin(PlayerJoinEvent pje) {\n\t\t\r\n\t\tPlayer p = pje.getPlayer();\r\n\t\tLocation loc = (Location)plugin.getCorrectedSpawns().get(p.getName());\r\n\t\tif (loc != null)\r\n\t\t{\r\n\t\t\tpje.getPlayer().teleport(loc);\r\n\t\t\tpje.getPlayer().sendMessage(ChatColor.RED+\"[Prisonbeds]\"+ChatColor.WHITE+\" You are imprisoned.\");\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t}", "void joinGame(String playeruuid);", "@EventHandler\r\n\tpublic void onJoin(final PlayerJoinEvent e){\n\t\tBukkit.getScheduler().runTaskLater(QuickShop.instance, new Runnable(){\r\n\t\t\t@Override\r\n\t\t\tpublic void run(){\r\n\t\t\t\tMsgUtil.flush(e.getPlayer());\r\n\t\t\t}\r\n\t\t}, 60);\r\n\t}", "public void playerWon()\r\n {\r\n \r\n }", "@EventHandler\n public void onPlayerJoin(PlayerJoinEvent event) {\n Player player = event.getPlayer();\n String motd = config.getString(\"motd\");\n if (motd != null && !motd.trim().isEmpty()) {\n motd = ChatColor.translateAlternateColorCodes('&', motd);\n player.sendMessage(motd.split(\"\\\\\\\\n\"));\n }\n }", "void notifyPlayerJoined(String username);", "@EventHandler\r\n\tpublic void onJoin(PlayerJoinEvent e) {\r\n\t\tBukkit.broadcastMessage(ChatColor.GRAY + \"Fellow Gamer \" +\r\n\t\t\t\t\t\t\t\tChatColor.YELLOW + e.getPlayer().getDisplayName() + \r\n\t\t\t\t\t\t\t\tChatColor.GRAY + \" has joined.\");\r\n\t}", "public void executeJoiningPlayer(Player player) {\r\n nui.setupNetworkPlayer(player);\r\n }", "@EventHandler\n\tpublic void OnPlayerJoin (PlayerJoinEvent e) throws SQLException{\n\t\tPlayer p = e.getPlayer();\n\t\te.setJoinMessage(null);\n\t\tJoinedServer(p);\n\t}", "@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)\n public void onPlayerJoin(PlayerJoinEvent ev) {\n ObjectiveSender.handleLogin(ev.getPlayer().getUniqueId());\n }", "void onJoin(String joinedNick);", "@EventHandler\n public void onPlayerJoinEvent(PlayerJoinEvent e)\n {\n Player player = e.getPlayer();\n String playerName = player.getName();\n \n this.afkPlayers.put(playerName, false);\n this.afkPlayersAuto.put(playerName, false);\n this.afkLastSeen.put(playerName, new GregorianCalendar());\n \n player.sendMessage(this.getListMessage());\n }", "public void handleJoin()\n {\n String n = name.getText();\n if(n.isEmpty())\n {\n setStatus(\"Bitte Namen eingeben!\",Color.RED);\n return;\n }\n if(n.contains(\";\"))\n {\n setStatus(\"Bitte keine ; verwenden!\",Color.RED);\n return;\n }if(n.contains(\"'\"))\n {\n setStatus(\"Bitte keine ' verwenden!\",Color.RED);\n return;\n }if(n.contains(\",\"))\n {\n setStatus(\"Bitte keine , verwenden!\",Color.RED);\n return;\n }\n String ip = ip_text.getText();\n if(ip.isEmpty())\n {\n setStatus(\"Bitte IP eingeben!\",Color.RED);\n return;\n }\n if(ip.contains(\";\"))\n {\n setStatus(\"Bitte kiene ; verwenden!\",Color.RED);\n return;\n }if(ip.contains(\"|\"))\n {\n setStatus(\"Bitte kiene | verwenden!\",Color.RED);\n return;\n }if(ip.contains(\",\"))\n {\n setStatus(\"Bitte kiene , verwenden!\",Color.RED);\n return;\n }\n\n matchup.joinGame(n,color_snake.getValue(),color_head.getValue(),ip);\n }", "public void join(Player player) {\n\t\tGamePlayer gamePlayer = new GamePlayer(player);\n\t\tthis.gamePlayers.add(gamePlayer);\n\n\t\tif (getEmptyPad() != null) ß{\n\t\t\tPad pad = getEmptyPad();\n\t\t\tgamePlayer.setPad(pad);\n\t\t\tpad.setFree(false);\n\t\t\tLocation loc = pad.getLocation();\n\n\t\t\tplayer.teleport(new Location(loc.getWorld(), loc.getX(), loc.getY(), loc.getZ()));\n\t\t\tsetupPlayerInventory(player);\n\t\t\tplayer.sendMessage(\"You have joined the game\");\n\t\t} else {\n\t\t\tSystem.out.println(\"Not enough room for \" + player.getName() + \" to join. Kicking...\");\n\t\t\tplayer.kickPlayer(\"Game Full\");\n\t\t}\n\t}", "@EventHandler(ignoreCancelled = true, priority = EventPriority.HIGHEST)\r\n public void onJoin(PlayerJoinEvent joinEvent) {\n Player player = joinEvent.getPlayer();\r\n\r\n String health = String.valueOf(player.getHealth());\r\n String ping = String.valueOf(player.getPing());\r\n\r\n if (config.getBoolean(\"JoinEnabled\")) {\r\n joinEvent.setJoinMessage(config.getString(\"JoinMessage\").\r\n replace(\"%player%\", player.getDisplayName()).\r\n replace(\"%server%\", getServer().getMotd()).\r\n replace(\"%ping%\", ping).\r\n replace(\"%health%\", health));\r\n\r\n // Checks if the user has put a join message or not\r\n if (config.getString(\"JoinMessage\").trim().isEmpty() || config.getString(\"JoinMessage\").equals(\"\")) {\r\n this.getLogger().info(\"Couldn't define any join message.\");\r\n }\r\n }\r\n else this.getLogger().info(\"Join messages are disabled.\");\r\n }", "@EventHandler\n\tpublic void onJoin(PlayerJoinEvent event) {\n\t\t\n\t\tif (PlaytimeConfig.getPlaytimeConfig().get(\"players.\" + event.getPlayer().getUniqueId()) == null) {\n\t\t\treturn;\n\t\t} else {\n\t\t\tint ticks = PlaytimeConfig.getPlaytimeConfig().getInt(\"players.\" + event.getPlayer().getUniqueId() + \".playtime\");\n\t\t\tevent.getPlayer().setStatistic(Statistic.PLAY_ONE_TICK, ticks);\n\t\t}\n\t}", "@EventHandler(priority = EventPriority.MONITOR)\n\tvoid onPlayerJoin(PlayerJoinEvent event)\n\t{\n\t\t//Add the player to the correct permissions groups for their professions\n\t\tPlayer player = event.getPlayer();\n\t\tUUID uuid = player.getUniqueId();\n\t\tProfessionStats prof = new ProfessionStats(perms, data, config, uuid);\n\t\tfor (String pr: prof.getProfessions())\n\t\t\tperms.playerAdd(null, player, config.getString(\"permission_prefix\") + \".\" + pr + \".\"\n\t\t\t\t\t+ prof.getTierName(prof.getTier(pr)));\n\t\t\n\t\t//Add the player's name and UUID to file.\n\t\tdata.set(\"data.\" + uuid + \".name\", player.getName());\n\t}", "private String waitPrint(){return \"waiting for other players...\";}", "public void printVictoryMessage() { //main playing method\r\n System.out.println(\"Congrats \" + name + \" you won!!!\");\r\n }", "public String callPlayer() {\n\t\treturn \"OVER HERE!!\";\n\t}", "@EventHandler(priority = EventPriority.HIGHEST)\n public void onPlayerJoin(PlayerJoinEvent playerJoinEvent) {\n final Player player = playerJoinEvent.getPlayer();\n\n // Checks if the update notify setting was enabled and if the player has permission to see update notifications\n if(configFile.getBoolean(\"Update_Notify\") && Utilities.checkPermissions(player, true, \"omegavision.update\", \"omegavision.admin\")) {\n // Check the plugins version against the spigotMC and see if it is up-to-date\n new SpigotUpdater(pluginInstance, 73013).getVersion(version -> {\n int spigotVersion = Integer.parseInt(version.replace(\".\", \"\"));\n int pluginVersion = Integer.parseInt(pluginInstance.getDescription().getVersion().replace(\".\", \"\"));\n\n if(pluginVersion >= spigotVersion) {\n Utilities.message(player, \"#00D4FFYou are already running the latest version\");\n return;\n }\n\n PluginDescriptionFile pdf = pluginInstance.getDescription();\n Utilities.message(player,\n \"#00D4FFA new version of #FF4A4A\" + pdf.getName() + \" #00D4FFis avaliable!\",\n \"#00D4FFCurrent Version: #FF4A4A\" + pdf.getVersion() + \" #00D4FF> New Version: #FF4A4A\" + version,\n \"#00D4FFGrab it here:#FF4A4A https://www.spigotmc.org/resources/omegavision.73013/\"\n );\n });\n }\n\n // Add the user to the user data map if they aren't currently in it.\n if(player.getFirstPlayed() == System.currentTimeMillis()) {\n userDataHandler.getUserDataMap().putIfAbsent(player.getUniqueId(), new ConcurrentHashMap<>());\n } else {\n userDataHandler.addUserToMap(player.getUniqueId());\n }\n\n // Check if the Night Vision Login setting was enabled and the player has a\n // true night vision status in the map and permission for night vision long.\n // If so, Apply night vision to them once they have logged in. Otherwise, remove it.\n if(configFile.getBoolean(\"Night_Vision_Settings.Night_Vision_Login\") && (boolean) userDataHandler.getEffectStatus(player.getUniqueId(), UserDataHandler.NIGHT_VISION) && Utilities.checkPermissions(player, true, \"omegavision.nightvision.login\", \"omegavision.nightvision.admin\", \"omegavision.admin\")) {\n Utilities.addPotionEffect(player, PotionEffectType.NIGHT_VISION, 60 * 60 * 24 * 100 ,1, particleEffects, ambientEffects, nightvisionIcon);\n } else {\n userDataHandler.setEffectStatus(player.getUniqueId(), false, UserDataHandler.NIGHT_VISION);\n Utilities.removePotionEffect(player, PotionEffectType.NIGHT_VISION);\n }\n\n if(configFile.getBoolean(\"Night_Vision_Limit.Enabled\")) {\n if((boolean) userDataHandler.getEffectStatus(player.getUniqueId(), UserDataHandler.LIMIT_REACHED)) {\n NightVisionToggle nightVisionToggle = new NightVisionToggle(pluginInstance, player);\n nightVisionToggle.limitResetTimer(player);\n }\n }\n }", "@EventHandler(ignoreCancelled = true, priority = EventPriority.MONITOR)\n\tprivate void onPlayerJoin(PlayerJoinEvent event)\n\t{\n\t\t\n\t\tif(!event.getPlayer().hasPermission(\"quests.quests\"))\n\t\t{\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tfinal Player entity = event.getPlayer();\n\t\t\n\t\tQuestPlayer player = getQuestPlayer(entity);\n\n\t\t// Let the player know if his last (current) quest wasn't completed before it expired.\n\t\tif(player.getCurrentQuest().getPlayerQuestModel().Status == QuestStatus.Incomplete)\n\t\t{\n\t\t\tgetLogger().info(entity.getName() + \" didn't complete their last quest in time.\");\n\t\t\t\n\t\t\tif(!PluginConfig.SOFT_LAUNCH)\n\t\t\t{\n\t\t\t\tgetServer().getScheduler().scheduleSyncDelayedTask(this, new Runnable()\n\t\t\t\t{\n\t\t\t\t\tpublic void run()\n\t\t\t\t\t{\n\t\t\t\t\t\tString msg = \" \" + ChatColor.AQUA + \"Aaawww! You didn't manage to complete your last quest in time.\";\n\t\t\t\t\t\tmsg += \"\\n A new quest will be created for you shortly..\";\n\t\t\t\t\n\t\t\t\t\t\tentity.sendMessage(msg);\n\t\t\t\t\t}\n\t\t\t\t}, 60);\n\t\t\t}\n\t\t\t\n\t\t\t// And give him a new quest.\n\t\t\tplayer.giveRandomQuest();\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// If last/current quest is processed, create a new one.\n\t\t\tif(player.getCurrentQuest().getPlayerQuestModel().Processed == 1)\n\t\t\t{\n\t\t\t\tplayer.giveRandomQuest();\n\t\t\t}\n\t\t}\n\n\t\tif(!PluginConfig.SOFT_LAUNCH)\n\t\t\tnotifyPlayerOfQuest(entity, player.getCurrentQuest().getPlayerQuestModel().Status, 160);\n\t}", "@EventHandler\n public void onPlayerConnect(PlayerJoinEvent e){\n Player p = e.getPlayer();\n GuildMCFunctions functions = new GuildMCFunctions();\n if (p.hasPlayedBefore()){\n functions.displayGuildInfo(p);\n GuildPlayer gp = GuildPlayer.getGuildPlayer(p);\n if(gp.getRole() != GuildRole.NONGUILDED) {\n Guild guild = Guild.getGuildByName(gp.getGuild());\n String[] messages = {\"§6§l[§a§lGuildMC§6§l] §r§e==-==-==-==-==-==-==-==-==-==-==\", ChatColor.BLUE + \"-= \" + guild.getName() + \" =-\", ChatColor.AQUA + \"Your role: \" + gp.getRole(), ChatColor.GREEN + \"Guild Level: \" + guild.getExperience()};\n for (String i : messages) {\n p.sendMessage(i);\n }\n } else {\n p.sendMessage(\"§f[§aGuildMC§f] You don't have guild.\");\n }\n } else {\n GuildPlayer newgplayer = new GuildPlayer(p.getName(),GuildRole.NONGUILDED,false, \"default\");\n SerializationManager serializationManager = new SerializationManager();\n String json = serializationManager.serializeGuildProfile(newgplayer);\n File file = new File(Main.savePlayerDir, p.getName()+\".json\");\n FileUtils.save(file,json);\n }\n\n }", "private void joinGame(int gameId){\n\n }", "@EventHandler\n public void onPlayerJoin(PlayerJoinEvent e) {\n plugin.getPlayer(e.getPlayer()).forceStopAFK();\n }", "public void logGameWinner(Player p){\n\t\t\n\t\tif(p instanceof HumanPlayer) {\n\t\t\tlog += String.format(\"%nUSER WINS GAME\");\n\t\t\twinName =\"Human\";\n\t\t}\n\t\telse\n\t\t{\n\t\t\tAIPlayer ai = (AIPlayer) p;\n\t\t\tlog += String.format(\"%n%s WINS GAME\", ai.getName().toUpperCase());\n\t\t\twinName = ai.getName();\n\t\t}\n\t\tlineBreak();\n\t}", "@EventHandler(ignoreCancelled = true)\n public void onPlayerJoin(PlayerJoinEvent event) {\n new AtlasTask() {\n @Override\n public void run() {\n if (event.getPlayer().isOnline()) {\n update(event.getPlayer());\n }\n }\n }.later(20);\n }", "public void welcomePlayer(Player p);", "@Override\n\tpublic void tellPlayer(String message) {\n\t\tSystem.out.println(message);\n\t}", "public abstract boolean onPreJoinGame(INetHandler netHandler, S01PacketJoinGame joinGamePacket);", "@EventHandler\r\n\tpublic void onPlayerJoin(PlayerJoinEvent event) {\r\n\t\tUUID uuid = event.getPlayer().getUniqueId();\r\n\t\tmain.getPlayers().put(uuid, new RPGPlayer(uuid));\r\n\t\tmain.getPlayers().get(event.getPlayer().getUniqueId()).loadInventory();\r\n\t}", "@EventHandler\n\tpublic void onPlayerJoin(PlayerJoinEvent e) {\n\t\tfinal Player p = e.getPlayer();\n\t\t\n\t\tif (UpdateListener.isAnewUpdateAvailable()) {\n\t\t\tif (p.hasPermission(\"AlmostFlatLandsReloaded.UpdateMessage\")) {\n\t\t\t\tp.sendMessage(Options.msg.get(\"[AlmostFlatLandsReloaded]\") + Options.msg.get(\"msg.3\"));\n\t\t\t}\n\t\t}\n\t}", "@EventHandler\n public void onPlayerJoin(PlayerJoinEvent event){\n if(!Settings.exServers.contains(Settings.pluginServerName)){\n // Give selector item\n Selector.giveSelector(event.getPlayer());\n }\n }", "public void sendNameInfoToAll(){\r\n\t\t\r\n\t\tVector<Player> players = lobby.getLobbyPlayers();\t\r\n\t\tString message = \"UDNM\" + lobby.getNameString();\r\n\t\t\r\n\t\tif(!players.isEmpty()){\r\n\t \tfor(int i=0; i<players.size(); i++){\t \t\t\r\n\t \t\tsendOnePlayer(players.get(i), message);\t \t\t\r\n\t \t}\r\n\t\t}\r\n\t}", "public void receiveMessage(String line)\n \t{\n \t\t\tString[] msg = line.split(\" \", 4);\n \t\t\tString user = \"#UFPT\";\n \n \t\t\t//this is kind of a nasty solution...\n \n \t\t\tif(msg[0].indexOf(\"!\")>1)\n \t\t\t\tuser = msg[0].substring(1,msg[0].indexOf(\"!\"));\n \t\t\t\n \t\t\tPlayer temp = new Player(user);\n \t\t\tint index = players.indexOf(temp);\n \t\t\t\n \t\t\tString destination = msg[2];\n \t\t\tString command = msg[3].toLowerCase();\n \t\t\tif(command.equalsIgnoreCase(\":!start\"))\n \t\t\t{\n \t\t\t\tif(user.equals(startName))\t\t\n \t\t\t\t{\n \t\t\t\t\tinputThread.sendMessage(destination, \"The game has begun!\");\n\t\t\t\t\treturn;\n \t\t\t\t}\n \t\t\t\telse\n \t\t\t\t\tinputThread.sendMessage(destination, \"Only \" + startName + \" can start the game!\");\n \t\t\t}\t\n \t\t\tif(command.equalsIgnoreCase(\":!join\"))\n \t\t\t{\n \t\t\t\tSystem.out.println(index);\n \t\t\t\tif(index == -1)\n \t\t\t\t{\n \t\t\t\t\tplayers.add(new Player(user));\n \t\t\t\t\tinputThread.sendMessage(destination, user + \" has joined the game!\");\n \t\t\t\t}\n \t\t\t\telse\n \t\t\t\t\tinputThread.sendMessage(destination, user + \" has already joined the game!\");\n \t\t\t}\n \t\t\t\n \t\t\tif(command.equalsIgnoreCase(\":!quit\"))\n \t\t\t{\n \t\t\t\tSystem.out.println(index);\n \t\t\t\tif(index == -1)\n \t\t\t\t\tinputThread.sendMessage(destination, user + \" is not part of the game!\");\n \t\t\t\telse\n \t\t\t\t{\n \t\t\t\t\tplayers.remove(index);\n \t\t\t\t\tinputThread.sendMessage(destination, user + \" has quit the game!\");\n \t\t\t\t}\n \t\t\t\t\n \t\t\t}\t\n \t\t\t\n \t\t\tif (command.equalsIgnoreCase(\":!end\"))\n \t\t\t{\n \t\t\t\tif (user.equals(startName))\n \t\t\t\t{\n \t\t\t\t\tinputThread.sendMessage(destination, user + \" has ended the game. Aww :(\");\n \t\t\t\t\treturn;\n \t\t\t\t\t//does this acceptably end the game? I think so but not positive\n \t\t\t\t}\n \t\t\t\telse\n \t\t\t\t\tinputThread.sendMessage(destination, \"Only \" + startName + \" can end the game!\");\n \t\t\t}\n\t\t\n\t\n \t\n \t\t//assigning roles\n \t\tint numMafia = players.size()/3;\n \t\t//create the Mafia team\n \t\tfor(int a = 0; a < numMafia; ++a)\n \t\t{\n \t\t\tmafiaRoles.add(new Mafia(new MafiaTeam()));\n \t\t}\n \t\t\n \t\t//create the Town team\n \t\tfor(int a = 0; a < (players.size() - numMafia); ++a)\n \t\t{\n \t\t\ttownRoles.add(new Citizen(new Town()));\n \t\t}\n \t\tCollections.shuffle(mafiaRoles);\n \t\tCollections.shuffle(townRoles);\n \t\tfor(int a = 0; a < numMafia; ++a)\n \t\t{\n \t\t\troles.add(mafiaRoles.get(a));\n \t\t}\n \t\tfor(int a = 0; a < players.size() - numMafia; ++a)\n \t\t{\n \t\t\troles.add(townRoles.get(a));\n \t\t}\n \t\tfor(int a = 0; a < players.size(); ++a)\n \t\t{\n \t\t\tplayers.get(a).role = roles.get(a);\n \t\t\tinputThread.sendMessage(players.get(a).name, \"your role is \" + roles.get(a).name);\n \t\t}\n \t\t\n \t\t//TODO tell game that a day or night needs to start? should this method have a return type?\n \t\t\n \t}", "public String playerWon() {\n\t\tString message = \"Congratulations \"+name+ \"! \";\n\t\tRandom rand = new Random();\n\t\tswitch(rand.nextInt(3)) {\n\t\t\tcase 0:\n\t\t\t\tmessage+=\"Can you stop now? You're too good at this!\";\n\t\t\t\tbreak;\n\t\t\tcase 1:\n\t\t\t\tmessage+=\"You OBLITERATED the opponent!\";\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\tmessage+=\"You sent them to the Shadow Realm\";\n\t\t}\n\t\treturn message;\n\t}", "@Override\n\tpublic void joinLobby(int playerID, int sessionID){\n\t\tif(sessionID == NO_LOBBY_ID)\n\t\t\treturn;\n\t\t//check if the player is already in an other lobby\n\t\tint playerSession = getSessionFromClient(playerID);\n\n\t\tif(playerSession == NO_LOBBY_ID){\n\t\t\tlobbyMap.get(sessionID).addPlayer(getPlayerMap().get(playerID));\n\t\t\tDebugOutputHandler.printDebug(\"Player \"+getPlayerMap().get(playerID).getName()+\" now is in lobby \" + getPlayerMap().get(playerID).getSessionID());\n\t\t}\n\t}", "public void sendGameInfoToAll(){\r\n\t\t\r\n\t\tVector<Player> players = lobby.getLobbyPlayers();\t\r\n\t\tString message = \"UDGM\" + lobby.getGameString();\r\n\t\t\r\n\t\tif(!players.isEmpty()){\r\n\t \tfor(int i=0; i<players.size(); i++){\t \t\t\r\n\t \t\tsendOnePlayer(players.get(i), message);\t \t\t\r\n\t \t}\r\n\t\t}\r\n\t}", "public void join(Player player) {\n if (this.stored.contains(player.getName()) ^ !this.optInEnable) {\n if (Trivia.wrapper.permission(player, PermissionTypes.PLAY) && this.running) {\n if (!this.active.contains(player)) {\n this.active.add(player);\n player.sendMessage(\"Qukkiz is now \" + ChatColor.GREEN + \"enabled\" + ChatColor.WHITE + \".\");\n }\n }\n }\n }", "@Override\n\tpublic void onJoinLobbyDone(LobbyEvent arg0) {\n\t\tMain.log(getClass(), \"onJoinLobbyDone\");\n\t}", "public void playHoomans() {\r\n System.out.println(\"Thanks for killing each other, human!\");\r\n }", "public void playerJoins(final SonicPlayer sP) {\n\t\t_T.run_ASync(new Runnable() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\tif (!checkConnection()) {\n\t\t\t\t\t//Something is wrong, kick the player\n\t\t\t\t\t_.badMsg(sP.getPlayer(), \"Something is wrong with the game.. Sorry! Contact Stoux if he is online!\");\n\t\t\t\t\tsonic.playerQuit(sP);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}", "@Override\n public void sendChatMessage(EntityPlayer player) {\n }", "public static void privateMessage(Player fromPlayer, Player toPlayer, String[] message) {\n PlayerDataObject fromPDO = PlayerManager.getPlayerDataObject(fromPlayer);\n PlayerDataObject toPDO = PlayerManager.getPlayerDataObject(toPlayer);\n //target.sendMessage(ChatColor.DARK_GRAY + \"[\" + player.getFriendlyName() + ChatColor.DARK_GRAY + \" > you]: \" + ChatColor.WHITE + String.join(\" \", Arrays.copyOfRange(arg3, 1, arg3.length)).trim());\n //player.sendMessage(ChatColor.DARK_GRAY + \"[You > \" + target.getDisplayName() + ChatColor.DARK_GRAY + \"]: \" + ChatColor.WHITE + String.join(\" \", Arrays.copyOfRange(arg3, 1, arg3.length)).trim());\n ComponentBuilder toComp = new ComponentBuilder(ChatColor.DARK_GRAY + \"[\" + fromPDO.getFriendlyName() + ChatColor.DARK_GRAY + \" > you]\" + ChatColor.WHITE + \":\");\n toComp.event(new HoverEvent(HoverEvent.Action.SHOW_TEXT, new ComponentBuilder(\"PM \" + fromPDO.getPlainNick()).create()));\n toComp.event(new ClickEvent(ClickEvent.Action.SUGGEST_COMMAND, \"/pm \" + fromPDO.getName() + \" \"));\n toComp.append(\" \").reset();\n \n ComponentBuilder fromComp = new ComponentBuilder(ChatColor.DARK_GRAY + \"[You > \" + toPDO.getDisplayName() + ChatColor.DARK_GRAY + \"]\" + ChatColor.WHITE + \":\");\n fromComp.event(new HoverEvent(HoverEvent.Action.SHOW_TEXT, new ComponentBuilder(\"PM \" + toPDO.getPlainNick()).create()));\n fromComp.event(new ClickEvent(ClickEvent.Action.SUGGEST_COMMAND, \"/pm \" + toPDO.getName() + \" \"));\n fromComp.append(\" \").reset();\n \n TextComponent messageComp = new TextComponent();\n for (String part : message) {\n if (part.matches(\"^.*(https?)://[-a-zA-Z0-9+&@#/%?=~_|!:,.;]*[-a-zA-Z0-9+&@#/%=~_|].*$\")) {\n messageComp.addExtra(assembleURLComponent(part));\n messageComp.addExtra(\" \");\n } else {\n messageComp.addExtra(part + \" \");\n }\n }\n \n BaseComponent[] toMSG = toComp\n .append(messageComp)\n .create();\n BaseComponent[] fromMsg = fromComp\n .append(messageComp)\n .create();\n \n toPDO.sendMessageIf(toMSG);\n fromPDO.sendMessageIf(fromMsg);\n }", "public void joinChannel() {\n String userId = AuthenticationSingleton.getAdaptedInstance().getUid();\n String token1 = generateToken(userId);\n mRtcEngine.setAudioProfile(Constants.AUDIO_SCENARIO_SHOWROOM, Constants.AUDIO_SCENARIO_GAME_STREAMING);\n int joinStatus = mRtcEngine.joinChannelWithUserAccount(token1, appointment.getId(), userId);\n if (joinStatus == SUCCESS_CODE) {\n appointment.addInCallUser(new DatabaseUser(userId));\n }\n }", "private boolean joinGame() throws RemoteException{\n\t\tgui.showLoginWindow(playerDetails);\n\n\t\twhile(!gui.isUserDataAvailable()){\n\t\t\t// wait for user to enter details\n\t\t\tDebug.log(\"MainMenu\", \"waiting for player details\");\n\t\t\ttry{\n\t\t\t\tThread.sleep(1000);\n\t\t\t}catch(InterruptedException e){\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\tSystem.err.println(e.toString());\n\t\t\t}\n\t\t}\n\t\tplayerDetails = gui.getPlayerDetails();\n\t\tDebug.log(\"MainMenu\", \"player details received!\");\n\n\t\tif(playerDetails == null) quitGame(false); // quit if player declined/cancelled to enter details\n\n\t\t/* Get preferred position */\n\t\tpreferredPosition = gui.getPreferredPosition();\n\n\t\t/* Register this client as Callback */\n\t\treturn server.connect(this, myHost, myPort, preferredPosition, false, playerDetails.getFirstName(), playerDetails.getSurname(),\n\t\t\t\tplayerDetails.getAddress(), playerDetails.getPhone(), playerDetails.getUsername(), playerDetails.getPassword());\n\t}", "@EventHandler\n public void onJoin(PlayerJoinEvent event) {\n Player player = event.getPlayer();\n\n if (plugin.getCheckManager().isCheckEnabled(Check.SMALLFIX_LEAVEVEHICLEONJOIN)) {\n if (player.getVehicle() != null) {\n player.leaveVehicle();\n }\n }\n }", "protected void onJoin(String channel, String sender, String login, String hostname) {}", "static private void TalkTo() {\n if (BSChristiansen.getCurrentRoom() == currentRoom) {\n System.out.println(BSChristiansen.getDescription() + \", yet he still gives you good advice:\\n\");\n System.out.println(BSChristiansen.getDialog(0));\n System.out.println(\"\");\n woundedSurvivor();\n } else if (mysteriousCrab.getCurrentRoom() == currentRoom && inventory.getInventory().containsKey(\"Shroom\")) {\n System.out.println(mysteriousCrab.getDescription() + \"\\n\" + mysteriousCrab.getDialog(0));\n } else {\n System.out.println(\"There is nobody to communicate with in this Room\");\n }\n\n }", "private void sendWinnerMessage(RaceTrackMessage playerDisconnectsMessage) {\n\t\tif(playerDisconnectsMessage != null)\n\t\t\ttry{\n\n\t\t\t\tint playerWhoWon = getPlayerWhoWonByPlayerID(((DisconnectMessage) playerDisconnectsMessage).getNextPlayerToMove()); \n\t\t\t\tint playerWhoWonID = getPlayerIDWhoWonByPlayerID(((DisconnectMessage) playerDisconnectsMessage).getNextPlayerToMove());\n\t\t\t\tif(playerWhoWon != -1){\n\t\t\t\t\tPoint2D lastVec = null;\n\t\t\t\t\tif(getPlayerMap().get(playerWhoWonID) != null)\n\t\t\t\t\t\tlastVec = getPlayerMap().get(playerWhoWonID).getCurrentPosition();\n\n\n\t\t\t\t\tPlayerWonMessage answer;\n\n\t\t\t\t\tanswer = VectorMessageServerHandler.generatePlayerWonMessage(playerWhoWon, playerWhoWon, lastVec);\n\n\t\t\t\t\tcloseGameByPlayerID(playerWhoWon);\n\n\t\t\t\t\tanswer.addClientID(playerWhoWonID);\n\n\t\t\t\t\tsendMessage(answer);\n\t\t\t\t\t\n\t\t\t\t\t//inform the AIs that game is over!!\n\n\t\t\t\t}\n\t\t\t}catch(ClassCastException e){\n\n\t\t\t}\n\t}", "public void playerLost()\r\n {\r\n \r\n }", "public boolean joinGame(){\n\t\tJoinGameBean resultBean = new JoinGameBean();\n\t\tresultBean.setTo(jid);\n\t resultBean.setFrom(fromJID);\n\t resultBean.setType(XMPPBean.TYPE_RESULT);\n\t connection.sendPacket(new BeanIQAdapter(resultBean));\n//\t System.out.println(\"JoinGameBean vom typ RESULT an \" + jid + \" gesendet\");\n\t return true;\n\t}", "public static void handleEntityJoin(World world, Entity entity) {\n\t\tif(entity instanceof EntityPlayerMP) {\n\t\t\tTaleCraft.network.sendTo(new PlayerNBTDataMerge(entity.getEntityData()), (EntityPlayerMP) entity);\n\t\t\t// PlayerList.playerJoin((EntityPlayerMP)entity);\n\t\t}\n\t}", "public void join(LobbyPlayer player) {\n if (listener == null) listener = Firebase.registerListener(\"lobbies/\" + player.getLobbyCode(), onLobbyChange);\n DocumentReference doc = Firebase.docRefFromPath(\"lobbies/\" + player.getLobbyCode());\n ObjectMapper mapper = new ObjectMapper();\n Map<String, Object> kv = mapper.convertValue(LobbyPlayerDTO.fromModel(player), new TypeReference<Map<String, Object>>() {});\n doc.update(\"players.\" + player.getUsername(), kv);\n }", "@EventHandler\n public void onPlayerJoinGameEvent(GameJoinEvent event) {\n this.plugin.getServer().getScheduler().runTaskAsynchronously(this.plugin, () -> {\n synchronized (this.statsController) {\n final Stats stats = GameListener.this.statsController.getByPlayer(event.getPlayer());\n stats.setAmountOfGamesPlayed(stats.getAmountOfGamesPlayed() + 1);\n this.statsController.store(stats);\n this.updateStats(event.getPlayer(), stats);\n }\n });\n }", "private void joinGame(String server, int port, String playername) throws UnknownHostException, IOException, ClassNotFoundException, UnableToStartGameException\n\t{\n\t\tsocket = new Socket(server, port);\n\t\tobjectInputStream = new ObjectInputStream(socket.getInputStream());\n\t\tObject object = objectInputStream.readObject();\n\t\t//Spielerid empfangen\n\t\tif (object instanceof ClientId)\n\t\t{\n\t\t\tClientId clientId = (ClientId) object;\n\t\t\tplayerId = clientId.getClientId();\n\t\t}\n\t\telse\n\t\t{\n\t\t\tthrow new UnableToStartGameException(\"Konnte die Spielerid nicht empfangen.\");\n\t\t}\n\t\t\n\t\t//Dem Server unseren Namen mitteilen\n\t\tthis.objectOutputStream = new ObjectOutputStream(socket.getOutputStream());\n\t\tobjectOutputStream.writeObject(new PlayerName(playername, playerId));\n\t\t\n\t}", "@EventHandler(priority = EventPriority.HIGH, ignoreCancelled = true)\n public void onPlayerLogin(PlayerLoginEvent event) {\n String playerName = event.getPlayer().getName();\n \n if(plugin.bannedPlayers.contains(playerName)){\n \t event.setKickMessage(\"You are banned from this server!\");\n \t event.setResult(Result.KICK_BANNED);\n \t \n }\n \n \n }", "public void playerSuccess(Player player, String message){\n\t\tplayer.sendMessage(ChatColor.GREEN + message);\n\t}", "@Override\n\tpublic void onUserJoinedLobby(LobbyData arg0, String arg1) {\n\t\t\n\t}", "public void sendNameInfo(Player plr){\r\n\t\t\r\n\t\tString message = \"UDNM\" + lobby.getNameString();\r\n\t\tsendOnePlayer(plr, message);\r\n\t}", "public void displayWinner(Player player) {\n System.out.println(\"Partie terminée !\");\n System.out.println(player.getPlayerName()+\" remporte la partie avec les billes \"+player.getColor().toString(true));\n System.out.println(\"――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――\");\n }", "@Override\n public String getMessage(int player) {\n if (player == 0) {\n return \"Player\";\n }\n return \"CPU\";\n }", "public static void neverJoined(Command command, String player) {\n\t\tString str = command.getSender().getAsMention() + \",\\n\";\n\t\t\n\t\tstr += ConfigManager.getMessage(\"never joined\").replace(\"%player%\", player);\n\t\tcommand.getChannel().sendMessage(str).complete();\n\t}", "private void sendMessagetoRespectivePlayer(int num) {\n Message msg1;\n if(flag == \"player1\"){\n prevP1 = num;\n int newPositionGroup = num / 10;\n if(winningHoleGroup == newPositionGroup){\n msg1 = p1Handler.obtainMessage(3);\n }\n else if((winningHoleGroup == newPositionGroup-1) || (winningHoleGroup == newPositionGroup+1)){\n msg1 = p1Handler.obtainMessage(4);\n }\n else{\n msg1 = p1Handler.obtainMessage(5);\n }\n p1Handler.sendMessage(msg1);\n }\n else{\n prevP2 = num;\n int newPositionGroup = num / 10;\n if(winningHoleGroup == newPositionGroup){\n msg1 = p2Handler.obtainMessage(3);\n }\n else if((winningHoleGroup == newPositionGroup-1) || (winningHoleGroup == newPositionGroup+1)){\n msg1 = p2Handler.obtainMessage(4);\n }\n else{\n msg1 = p2Handler.obtainMessage(5);\n }\n p2Handler.sendMessage(msg1);\n }\n }", "protected void emit(Player p, String message) {\n }", "@Override\r\n\tpublic void showDoTimeMessage(Player player) {\n\t}", "public void addPlayer(String playerID) {\r\n\t\tplayerCount++;\r\n\t\tString name = guild.getMemberById(playerID).getEffectiveName();\r\n\t\t// Set up each player uniquely\r\n\t\tif (p2 == null) {\r\n\t\t\tp2 = new Player(1,playerID,GlobalVars.pieces.get(\"blue\"));\r\n\t\t\tp2.getPiece().setX(GlobalVars.playerCoordsPerRoom[0][0]+GlobalVars.playersOffset[1][0]);\r\n\t\t\tp2.getPiece().setY(GlobalVars.playerCoordsPerRoom[0][1]+GlobalVars.playersOffset[1][1]);\r\n\t\t\tplayers.add(p2);\r\n\t\t\tp1.setNextPlayer(p2);\r\n\t\t\tp2.setNextPlayer(p1);\r\n\t\t\tgameChannel.sendMessage(\"**\"+name+\"** has reincarnated as the BLUE adventurer\").queue();\r\n\t\t} else if (p3 == null) {\r\n\t\t\tp3 = new Player(2,playerID,GlobalVars.pieces.get(\"yellow\"));\r\n\t\t\tp3.getPiece().setX(GlobalVars.playerCoordsPerRoom[0][0]+GlobalVars.playersOffset[2][0]);\r\n\t\t\tp3.getPiece().setY(GlobalVars.playerCoordsPerRoom[0][1]+GlobalVars.playersOffset[2][1]);\r\n\t\t\tplayers.add(p3);\r\n\t\t\tp2.setNextPlayer(p3);\r\n\t\t\tp3.setNextPlayer(p1);\r\n\t\t\tgameChannel.sendMessage(\"**\"+name+\"** has reincarnated as the YELLOW adventurer\").queue();\r\n\t\t} else if (p4 == null) {\r\n\t\t\tp4 = new Player(3,playerID,GlobalVars.pieces.get(\"green\"));\r\n\t\t\tp4.getPiece().setX(GlobalVars.playerCoordsPerRoom[0][0]+GlobalVars.playersOffset[3][0]);\r\n\t\t\tp4.getPiece().setY(GlobalVars.playerCoordsPerRoom[0][1]+GlobalVars.playersOffset[3][1]);\r\n\t\t\tplayers.add(p4);\r\n\t\t\tp3.setNextPlayer(p4);\r\n\t\t\tp4.setNextPlayer(p1);\r\n\t\t\tgameChannel.sendMessage(\"**\"+name+\"** has reincarnated as the GREEN adventurer\").queue();\r\n\t\t}\r\n\t}", "public\tvoid\tuserJoined(UIRosterEntry user)\n\t{\n\t\t\n\t\tNewChatPanel panel = this.getDiscussionPanel();\n\t\n\t\tString joinedUserName = user.getDisplayName();\n\t\tString joinedUserId = user.getUserId();\n\t\t\n\t\tString senderId = this.rosterModel.getCurrentActivePresenter().getUserId();\n\t\tString senderName = this.rosterModel.getCurrentActivePresenter().getDisplayName();\n\t\t\n\t\t//Window.alert(\"senderId = \"+senderId+\":senderName:\"+senderName);\n\t\t//Window.alert(\"User Joined:joinedUserName :\"+joinedUserName+\":joinedUser Status:\"+user.getJoinedStatus());\n\t\t//Window.alert(\"lastUserJoined = \"+lastUserJoined);\n\t\tif((joinedUserId != senderId ) && (joinedUserId != lastUserJoined ) && (senderName != \"Not Available\") && (joinedUserId != me.getUserId()) && (!user.getJoinedStatus()))\n\t\t{\n\t\t//\tpanel.receiveChatMessage(\"\", sender,joinedUser + \" has joined the conference\");\n\t \t String s = ConferenceGlobals.getDisplayString(\"user_joined_message\",\"has joined the dimdim web meeting.\");\n\t \t //Window.alert(\"adding \"+s);\n\t\t\tpanel.receiveWelcomeMessage(joinedUserName + \" \"+s);\n\t\t\tlastUserJoined = joinedUserId;\n\t\t}\n\t\telse if((joinedUserId == senderId) && lastUserJoined == null && (joinedUserId != lastUserJoined))\n\t\t{\n\t \t String s = ConferenceGlobals.getDisplayString(\"user_welcome_message\",\"Welcome to the Dimdim Web Meeting.\");\n\t \t //Window.alert(\"adding welcom message...\");\n\t\t\tpanel.receiveWelcomeMessage(s);\n\t\t\tlastUserJoined = joinedUserId;\n\t\t}\n\t}", "public void sendRequest() {\r\n\t\t\r\n\t\tclient.join(this, isHost, gameCode, playerName, playerNumber);\r\n\t\t\r\n\t}", "public void joinWave(String roomID) {\n\t\t\r\n\t}", "@Override\n public void youWin(Map<String, Integer> rankingMap) {\n try {\n if (getClientInterface() != null)\n getClientInterface().gameEnded(\"YOU WON, CONGRATS BUDDY!!\", rankingMap);\n }\n catch (RemoteException e) {\n System.out.println(\"remote sending you won error\");\n }\n }", "private void joinLobby(ActionEvent actionEvent, String name) throws ExecutionException, InterruptedException {\n FireStoreController fireStoreController = (FireStoreController) ControllerRegistry.get(FireStoreController.class);\n PlayerController playerController = (PlayerController) ControllerRegistry.get(PlayerController.class);\n if(!fireStoreController.checkExistence(token)){\n JoinLobbyViewTokenTextField.setText(\"This lobby does not exist\");\n }\n\n if(fireStoreController.getLobbySize(token) >= 8){\n LobbyAlreadyFullPopup.setVisible(true);\n }\n\n }", "@Override\n public void onGuildMemberJoin(@NotNull GuildMemberJoinEvent event) {\n super.onGuildMemberJoin(event);\n event.getMember().getUser().openPrivateChannel().queue((channel) -> {\n channel.sendMessage(Settings.WELCOME_MESSAGE).queue();\n });\n }", "private void UserJoinChannel(ClientData d)\n\t{\n\t\tApplicationManager.textChat.writeLog(d.ClientName + \" Join to \" + currentChannel.ChannelName);\n\t\tSendMessage(null, MessageType.channelInfo);\n\n\t}", "static String enter(Player player, Room room) {\n if (player.moveTo(room)) {\n return \"-Charlie Bot: You have entered \" + player.getLocation();\n } else {\n return \"That way appears to be blocked.\";\n }\n }", "public void sendGameInfo(Player plr){\r\n\t\t\r\n\t\tString message = \"UDGM\" + lobby.getGameString();\r\n\t\tsendOnePlayer(plr, message);\r\n\t}", "private void reportWinner (Player player) {\n System.out.println();\n System.out.println(\"Player \" + player.name() +\n \" wins.\");\n System.out.println();\n }", "public static void playerWonInc(){\r\n\t\t_playerWon++;\r\n\t}", "void endSinglePlayerGame(String message);", "void playerPassedStart(Player player);", "private static void handleJoin(DatagramPacket packet){\n byte[] packetData = packet.getData();\n InetAddress packetAddr = packet.getAddress();\n if(packetData[0]== (byte)'W') {\n if (!map.containsKey(packetAddr)) {\n byte[] bytes = new byte[8];\n for (int i = 0; i < 8; i++) {\n bytes[i] = packetData[i + 1];\n }\n String name = \"\";\n for (int i = 9; i < packetData.length; i++) {\n name += (char) packetData[i];\n }\n System.out.println(\"Adding \"+name+\":\"+packetAddr.getHostAddress());\n DH dh = new DH(BigInteger.valueOf('&'));\n BigInteger[] bigs = dh.generateRandomKeys(BigInteger.valueOf(77));\n// DH.getSharedSecretKey(bigs[0],BigInteger.valueOf(77),new BigInteger(bytes));\n map.put(packetAddr, new Client(DH.getSharedSecretKey(bigs[0], BigInteger.valueOf(77), new BigInteger(bytes)),name));\n map.get(packetAddr).setB(new BigInteger(bytes));\n map.get(packetAddr).setAddress(packetAddr);\n map.get(packetAddr).lives=5;\n System.out.println(Arrays.toString(bigs) + \":\" + new BigInteger(bytes));\n sendWRQResponse(bigs[1], packet);\n }\n }\n }", "public void join() {\n FacesContext fc = FacesContext.getCurrentInstance();\n try {\n UbikeUser current = (UbikeUser) BaseBean.getSessionAttribute(\"user\");\n ExternalContext exctx = fc.getExternalContext();\n HttpServletRequest request = (HttpServletRequest) exctx.getRequest();\n long groupId = Long.parseLong(request.getParameter(\"groupId\"));\n long userId = current.getId();\n MemberShip m = memberShipService.getMemberShip(userId, groupId);\n\n if (m != null) {\n fc.addMessage(\"join:join_status\", new FacesMessage(FacesMessage.SEVERITY_ERROR,\n \"You are already member of this group\",\n \"You are already member of this group\"));\n return;\n }\n\n UbikeGroup group = groupService.find(groupId);\n m = new MemberShip(current, group, Role.Member);\n memberShipService.create(m);\n fc.addMessage(\"join:join_status\", new FacesMessage(FacesMessage.SEVERITY_INFO,\n \"You joined the group \" + group.getName() + \" successfully\",\n \"You joined the group \" + group.getName() + \" successfully\"));\n\n List<MemberShip> members = (List<MemberShip>) BaseBean.getSessionAttribute(\"tmp_members\");\n if (members == null) {\n members = new ArrayList<MemberShip>();\n BaseBean.setSessionAttribute(\"tmp_members\", members);\n }\n members.add(m);\n } catch (Exception exp) {\n logger.log(Level.SEVERE, \"An error occurs while joinning group\", exp);\n fc.addMessage(\"join:join_status\", new FacesMessage(FacesMessage.SEVERITY_ERROR,\n \"An error occurs while processing your request\",\n \"An error occurs while processing your request\"));\n }\n }", "void playerAdded();", "private void sendPlayerChat1(String s) {\n\t\tc.getPA().sendFrame200(969, 591);\n\t\tc.getPA().sendFrame126(c.playerName, 970);\n\t\tc.getPA().sendFrame126(s, 971);\n\t\tc.getPA().sendFrame185(969);\n\t\tc.getPA().sendFrame164(968);\n\t}", "public void sendStartGame (){\n connect();\n try{\n doStream.writeUTF(\"GAME_START\");\n doStream.writeUTF(currentUser.getUserName());\n\n } catch (IOException e){\n e.printStackTrace();\n }\n disconnect();\n }", "protected String getLeftMessage() {\n\t\treturn player2.getName() + \": \" + player2.getScore();\n\t}", "private static Player getThroughWhomSendMessage() {\n\t\treturn Remain.getOnlinePlayers().isEmpty() ? null : Remain.getOnlinePlayers().iterator().next();\n\t}", "void sendJoinWorld(String worldName);", "@Override\n\tpublic void execute() {\n\t\t\n\t\tif (GamesHandler.test) {\n\t\t\tserverModel = ServerFacadeTest.getSingleton().getGameModel(gameID);\n\t\t} else {\n\t\t\tserverModel = ServerFacade.getSingleton().getGameModel(gameID);\n\t\t}\n\t\t\n\t\tPlayer player = serverModel.getPlayers().get(sender);\n\t\tDevCardList playerOldDevCards = player.getOldDevCards();\n\t\t\n\t\tplayerOldDevCards.setRoadBuilding(playerOldDevCards.getRoadBuilding() - 1);\n\t\t\n\t\tserverModel.getMap().addRoad(new Road(sender, spot1));\n\t\tserverModel.getMap().addRoad(new Road(sender, spot2));\n\t\t\n\t\tplayer.setRoads(player.getRoads() - 2);\n\t\t\n\t\tplayer.setPlayedDevCard(true);\n\t\t\n\t\tMessageLine line = new MessageLine();\n\t\tString username = player.getName();\n\t\tif(username.toLowerCase().equals(\"ife\") || username.toLowerCase().equals(\"ogeorge\")){\n\t\t\tline.setMessage(\"Ife built a couple of roads to try to catch up with Paul, but Daniel always wins anyway\");\n\t\t}\n\t\telse{\n\t\t\tline.setMessage(username + \" built a couple roads with a road building development card\");\n\t\t}\n//\t\tline.setMessage(username + \" built a couple roads with a road building development card\");\n\t\tline.setSource(username);\n\t\tserverModel.getLog().addLine(line);\n\t}", "public void joinChatRoom(IChatroom room) {\n\t\tview.append(\"Join ChatRoom\" + room.getName());\n\t\tcountRoom++;\n\t\tIChatroom chatroom = new Chatroom(\"Chatroom\" + countRoom);\n\t\tIChatServer chatServer = new ChatServer(user, chatroom);\n\t\ttry {\n\t\t\tview.append(\"Start joining..\");\n\t\t\tIChatServer chatStub = (IChatServer) UnicastRemoteObject.exportObject(chatServer,\n\t\t\t\t\tIChatServer.BOUND_PORT + countRoom);\n\t\t\tfor (IChatServer members : room.getChatServers()) {\n\t\t\t\tchatroom.addChatServer(members);\n\t\t\t\tmembers.joinChatroom(chatStub);\n\t\t\t}\n\t\t\tchatroom.addChatServer(chatStub);\n\t\t\tuser.addRoom(chatroom);\n\t\t\tregistry.rebind(IChatServer.BOUND_NAME + chatroom.hashCode(), chatStub);\n\t\t\tHashSet<IChatServer> proxyChatServers = new HashSet<IChatServer>();\n\t\t\tfor (IChatServer stub : chatroom.getChatServers()) {\n\t\t\t\tProxyIChatServer proxyChatServer = new ProxyIChatServer(stub);\n\t\t\t\tproxyChatServers.add(proxyChatServer);\n\t\t\t}\n\t\t\tIMain2MiniAdpt miniMVCAdpt = view.makeMini(chatServer, proxyChatServers);\n\t\t\tminiMVCAdpts.put(chatroom, miniMVCAdpt);\n\t\t\tcountRoom++;\n\t\t\tview.append(\"Success!\");\n\t\t\t//\t\t\tminiMVCAdpt.refresh();\n\t\t} catch (Exception e) {\n\t\t\tview.append(\"Fail to join the room!\");\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "@Override\n\tpublic boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {\n\t\tif (sender instanceof ConsoleCommandSender){\n\t\t\t\n\t\t\tsender.sendMessage(\"§r ARRETE DE FAIRE LE CON\");\n\t\t\t\n\t\t}\n\t\t//si c'est un joueur on gère la commandes\n\t\telse if(sender instanceof Player){\n\t\t\t\n\t\t\tPlayer player = (Player) sender;\n\t\t\t\n\t\t\t//on verifie que la commende est la bonne\n\t\t\tif(cmd.getName().equalsIgnoreCase(\"castejoin\")){\n\t\t\t\t\n\t\t\t\t//on verifie que l'on a bien des arguments\n\t\t\t\tif(args.length != 0){\n\t\t\t\t\t\n\t\t\t\t\t//on recupère la caste en argument\n\t\t\t\t\tString caste = args[0];\n\t\t\t\t\t\n\t\t\t\t\t//le message que le joueur recevra s'il ne peut pas rejoindre la caste au cas ou il y aurais plusieur raison\n\t\t\t\t\tString message = \"\"; \n\t\t\t\t\t\n\t\t\t\t\t//si le joueur peut rejoindre une caste\n\t\t\t\t\tif( (message = playerCanJoinCaste(player,caste)).equals(\"ok\")){\n\t\t\t\t\t\t\n\t\t\t\t\t\tint indexCaste = -1;\n\t\t\t\t\t\t//si la caste existe elle nous renvoie l'id de la position dans la liste des Caste sinon -1\n\t\t\t\t\t\tif( (indexCaste = isCasteExiste(caste)) != -1){\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//on recupère la class caste qui correspond pour la mettre dans la hashmap\n\t\t\t\t\t\t\tCaste casteClass = Caste.castes.get(indexCaste);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//on l'ajoute a la liste des joueur et des caste qui leur corespond\n\t\t\t\t\t\t\tMain.playerCaste.put(player, casteClass);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//on ecrit le changement dans le fichier player .yml\n\t\t\t\t\t\t\tPlayerManager.createEntryYml(player);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//message de confirmation\n\t\t\t\t\t\t\tplayer.sendMessage(\"vous avez rejoins la caste : \"+caste);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\t//la caste demander n'existe pas\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tplayer.sendMessage(\"la caste : \"+caste+\" n'existe pas\");\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t//le joueur ne peut pas pretendre a aller dans cette caste\n\t\t\t\t\telse{\n\t\t\t\t\t\t\n\t\t\t\t\t\tplayer.sendMessage(message);\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tplayer.sendMessage(\"/casteJoin <nom_de_la_caste>\");\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t}\n\t\telse{\n\t\t\tsender.sendMessage(\"impossible Oo\");\n\t\t}\n\t\treturn true;\n\t\t\n\t}", "boolean hasSendPlayerName();", "void join(User user);", "private void reportPlay (Player player) {\n System.out.println(\"Player \" + player.name() +\n \" takes \" + player.numberTaken() +\n \" stick(s), leaving \" + game.sticksLeft()\n + \".\");\n }" ]
[ "0.74850947", "0.7324614", "0.7125524", "0.71172637", "0.7112299", "0.7099869", "0.70561284", "0.70085436", "0.69471455", "0.6941269", "0.69189334", "0.6908394", "0.68998325", "0.68219167", "0.6809442", "0.6804609", "0.67661536", "0.675912", "0.67531", "0.673185", "0.6630969", "0.66309655", "0.6617467", "0.65724593", "0.6546371", "0.6511056", "0.64901036", "0.646804", "0.64504504", "0.6431617", "0.6410928", "0.63915277", "0.62978584", "0.6293742", "0.6279808", "0.6278897", "0.62753576", "0.62506676", "0.6246222", "0.62378645", "0.61979026", "0.6194647", "0.61779904", "0.617562", "0.6175145", "0.6175111", "0.6169166", "0.6164086", "0.61310464", "0.60997343", "0.6055385", "0.60545665", "0.60445803", "0.6043815", "0.6023595", "0.6022183", "0.6011612", "0.6011137", "0.5995267", "0.5977437", "0.5965127", "0.5929295", "0.5924844", "0.5917775", "0.59143823", "0.5903996", "0.5902285", "0.5887054", "0.5875558", "0.5871483", "0.58653724", "0.58650833", "0.5861792", "0.5855891", "0.5850137", "0.58497566", "0.5847141", "0.58464986", "0.5832805", "0.5831338", "0.5824492", "0.5815149", "0.5808877", "0.5805872", "0.5805111", "0.5798126", "0.5786268", "0.57755464", "0.5771086", "0.57701135", "0.57531255", "0.574805", "0.5747968", "0.5747677", "0.57387245", "0.57315326", "0.57300234", "0.5729821", "0.57295495", "0.57259655" ]
0.7906767
0
printMessage("ph.playerJoined: "+playerID+" joined"); moeten wij niets met doen
@Override public void playerJoined(String playerID) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void playerJoining(String playerID) {\n\t}", "void notifyPlayerJoined(String username);", "public void playerWon()\r\n {\r\n \r\n }", "@Override\r\n public void onPlayerJoin(PlayerJoinEvent event) {\r\n Player player = event.getPlayer();\r\n \r\n // Play back messages stored in this player's maildir (if any)\r\n String[] messages = plugin.getMessages(player);\r\n if (messages.length > 0) {\r\n \tfor (String message : messages) {\r\n \t\tplayer.sendMessage(message);\r\n \t}\r\n \tplayer.sendMessage(\"[Pe] §7Use /petition to view, comment or close\");\r\n }\r\n }", "public void sendJoiningPlayer() {\r\n Player p = nui.getPlayerOne();\r\n XferJoinPlayer xfer = new XferJoinPlayer(p);\r\n nui.notifyJoinConnected();\r\n networkPlayer.sendOutput(xfer);\r\n }", "public void logGameWinner(Player p){\n\t\t\n\t\tif(p instanceof HumanPlayer) {\n\t\t\tlog += String.format(\"%nUSER WINS GAME\");\n\t\t\twinName =\"Human\";\n\t\t}\n\t\telse\n\t\t{\n\t\t\tAIPlayer ai = (AIPlayer) p;\n\t\t\tlog += String.format(\"%n%s WINS GAME\", ai.getName().toUpperCase());\n\t\t\twinName = ai.getName();\n\t\t}\n\t\tlineBreak();\n\t}", "@EventHandler\r\n public void onPlayerJoinEvent(PlayerJoinEvent event) {\r\n Player p = event.getPlayer();\r\n plugin.sendStatusMsg(p);\r\n }", "@EventHandler\r\n\tpublic void onJoin(PlayerJoinEvent e) {\r\n\t\tBukkit.broadcastMessage(ChatColor.GRAY + \"Fellow Gamer \" +\r\n\t\t\t\t\t\t\t\tChatColor.YELLOW + e.getPlayer().getDisplayName() + \r\n\t\t\t\t\t\t\t\tChatColor.GRAY + \" has joined.\");\r\n\t}", "@SuppressWarnings(\"deprecation\")\n @EventHandler(ignoreCancelled = true, priority = EventPriority.HIGHEST)\n\tvoid onPlayerJoin(PlayerJoinEvent event)\n\t{\n\t\tPlayer player = event.getPlayer();\n\t\tUUID playerID = player.getUniqueId();\n\t\t\n\t\t//note login time\n\t\tDate nowDate = new Date();\n long now = nowDate.getTime();\n\n\t\t//if player has never played on the server before...\n\t\tif(!player.hasPlayedBefore())\n\t\t{\n\t\t //if in survival claims mode, send a message about the claim basics video (except for admins - assumed experts)\n\t\t if(instance.config_claims_worldModes.get(player.getWorld()) == ClaimsMode.Survival && !player.hasPermission(\"griefprevention.adminclaims\") && this.dataStore.claims.size() > 10)\n\t\t {\n\t\t WelcomeTask task = new WelcomeTask(player);\n\t\t Bukkit.getScheduler().scheduleSyncDelayedTask(instance, task, instance.config_claims_manualDeliveryDelaySeconds * 20L);\n\t\t }\n\t\t}\n\n\t\t//in case player has changed his name, on successful login, update UUID > Name mapping\n\t\tinstance.cacheUUIDNamePair(player.getUniqueId(), player.getName());\n\t}", "public void printVictoryMessage() { //main playing method\r\n System.out.println(\"Congrats \" + name + \" you won!!!\");\r\n }", "@Override\n\tpublic void tellPlayer(String message) {\n\t\tSystem.out.println(message);\n\t}", "void joinGame(String playeruuid);", "@EventHandler\n public void onPlayerConnect(PlayerJoinEvent e){\n Player p = e.getPlayer();\n GuildMCFunctions functions = new GuildMCFunctions();\n if (p.hasPlayedBefore()){\n functions.displayGuildInfo(p);\n GuildPlayer gp = GuildPlayer.getGuildPlayer(p);\n if(gp.getRole() != GuildRole.NONGUILDED) {\n Guild guild = Guild.getGuildByName(gp.getGuild());\n String[] messages = {\"§6§l[§a§lGuildMC§6§l] §r§e==-==-==-==-==-==-==-==-==-==-==\", ChatColor.BLUE + \"-= \" + guild.getName() + \" =-\", ChatColor.AQUA + \"Your role: \" + gp.getRole(), ChatColor.GREEN + \"Guild Level: \" + guild.getExperience()};\n for (String i : messages) {\n p.sendMessage(i);\n }\n } else {\n p.sendMessage(\"§f[§aGuildMC§f] You don't have guild.\");\n }\n } else {\n GuildPlayer newgplayer = new GuildPlayer(p.getName(),GuildRole.NONGUILDED,false, \"default\");\n SerializationManager serializationManager = new SerializationManager();\n String json = serializationManager.serializeGuildProfile(newgplayer);\n File file = new File(Main.savePlayerDir, p.getName()+\".json\");\n FileUtils.save(file,json);\n }\n\n }", "public String callPlayer() {\n\t\treturn \"OVER HERE!!\";\n\t}", "@Override\n public void sendChatMessage(EntityPlayer player) {\n }", "@EventHandler\n public void onPlayerJoin(PlayerJoinEvent event) {\n Player player = event.getPlayer();\n String motd = config.getString(\"motd\");\n if (motd != null && !motd.trim().isEmpty()) {\n motd = ChatColor.translateAlternateColorCodes('&', motd);\n player.sendMessage(motd.split(\"\\\\\\\\n\"));\n }\n }", "@EventHandler(priority = EventPriority.HIGHEST)\r\n\tpublic void onPlayerJoin(PlayerJoinEvent pje) {\n\t\t\r\n\t\tPlayer p = pje.getPlayer();\r\n\t\tLocation loc = (Location)plugin.getCorrectedSpawns().get(p.getName());\r\n\t\tif (loc != null)\r\n\t\t{\r\n\t\t\tpje.getPlayer().teleport(loc);\r\n\t\t\tpje.getPlayer().sendMessage(ChatColor.RED+\"[Prisonbeds]\"+ChatColor.WHITE+\" You are imprisoned.\");\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t}", "@EventHandler\r\n\tpublic void onJoin(final PlayerJoinEvent e){\n\t\tBukkit.getScheduler().runTaskLater(QuickShop.instance, new Runnable(){\r\n\t\t\t@Override\r\n\t\t\tpublic void run(){\r\n\t\t\t\tMsgUtil.flush(e.getPlayer());\r\n\t\t\t}\r\n\t\t}, 60);\r\n\t}", "public void welcomePlayer(Player p);", "void onJoin(String joinedNick);", "@EventHandler\n\tpublic void OnPlayerJoin (PlayerJoinEvent e) throws SQLException{\n\t\tPlayer p = e.getPlayer();\n\t\te.setJoinMessage(null);\n\t\tJoinedServer(p);\n\t}", "private void reportWinner (Player player) {\n System.out.println();\n System.out.println(\"Player \" + player.name() +\n \" wins.\");\n System.out.println();\n }", "GameJoinResult join(Player player);", "private void sendWinnerMessage(RaceTrackMessage playerDisconnectsMessage) {\n\t\tif(playerDisconnectsMessage != null)\n\t\t\ttry{\n\n\t\t\t\tint playerWhoWon = getPlayerWhoWonByPlayerID(((DisconnectMessage) playerDisconnectsMessage).getNextPlayerToMove()); \n\t\t\t\tint playerWhoWonID = getPlayerIDWhoWonByPlayerID(((DisconnectMessage) playerDisconnectsMessage).getNextPlayerToMove());\n\t\t\t\tif(playerWhoWon != -1){\n\t\t\t\t\tPoint2D lastVec = null;\n\t\t\t\t\tif(getPlayerMap().get(playerWhoWonID) != null)\n\t\t\t\t\t\tlastVec = getPlayerMap().get(playerWhoWonID).getCurrentPosition();\n\n\n\t\t\t\t\tPlayerWonMessage answer;\n\n\t\t\t\t\tanswer = VectorMessageServerHandler.generatePlayerWonMessage(playerWhoWon, playerWhoWon, lastVec);\n\n\t\t\t\t\tcloseGameByPlayerID(playerWhoWon);\n\n\t\t\t\t\tanswer.addClientID(playerWhoWonID);\n\n\t\t\t\t\tsendMessage(answer);\n\t\t\t\t\t\n\t\t\t\t\t//inform the AIs that game is over!!\n\n\t\t\t\t}\n\t\t\t}catch(ClassCastException e){\n\n\t\t\t}\n\t}", "public void executeJoiningPlayer(Player player) {\r\n nui.setupNetworkPlayer(player);\r\n }", "public void sendGameInfoToAll(){\r\n\t\t\r\n\t\tVector<Player> players = lobby.getLobbyPlayers();\t\r\n\t\tString message = \"UDGM\" + lobby.getGameString();\r\n\t\t\r\n\t\tif(!players.isEmpty()){\r\n\t \tfor(int i=0; i<players.size(); i++){\t \t\t\r\n\t \t\tsendOnePlayer(players.get(i), message);\t \t\t\r\n\t \t}\r\n\t\t}\r\n\t}", "@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)\n public void onPlayerJoin(PlayerJoinEvent ev) {\n ObjectiveSender.handleLogin(ev.getPlayer().getUniqueId());\n }", "public String playerWon() {\n\t\tString message = \"Congratulations \"+name+ \"! \";\n\t\tRandom rand = new Random();\n\t\tswitch(rand.nextInt(3)) {\n\t\t\tcase 0:\n\t\t\t\tmessage+=\"Can you stop now? You're too good at this!\";\n\t\t\t\tbreak;\n\t\t\tcase 1:\n\t\t\t\tmessage+=\"You OBLITERATED the opponent!\";\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\tmessage+=\"You sent them to the Shadow Realm\";\n\t\t}\n\t\treturn message;\n\t}", "public void sendGameInfo(Player plr){\r\n\t\t\r\n\t\tString message = \"UDGM\" + lobby.getGameString();\r\n\t\tsendOnePlayer(plr, message);\r\n\t}", "public void displayWinner(Player player) {\n System.out.println(\"Partie terminée !\");\n System.out.println(player.getPlayerName()+\" remporte la partie avec les billes \"+player.getColor().toString(true));\n System.out.println(\"――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――\");\n }", "@Override\r\n\tpublic void showDoTimeMessage(Player player) {\n\t}", "@Override\n public String getMessage(int player) {\n if (player == 0) {\n return \"Player\";\n }\n return \"CPU\";\n }", "private String waitPrint(){return \"waiting for other players...\";}", "void otherPlayerMoved()\r\n {\r\n socketWriter.println(\"OPPONENT_MOVED ,\" + getCurrentBoard());\r\n }", "public void printPlayerStat(Player player);", "@EventHandler\n public void onPlayerJoinEvent(PlayerJoinEvent e)\n {\n Player player = e.getPlayer();\n String playerName = player.getName();\n \n this.afkPlayers.put(playerName, false);\n this.afkPlayersAuto.put(playerName, false);\n this.afkLastSeen.put(playerName, new GregorianCalendar());\n \n player.sendMessage(this.getListMessage());\n }", "protected void emit(Player p, String message) {\n }", "public void join(Player player) {\n\t\tGamePlayer gamePlayer = new GamePlayer(player);\n\t\tthis.gamePlayers.add(gamePlayer);\n\n\t\tif (getEmptyPad() != null) ß{\n\t\t\tPad pad = getEmptyPad();\n\t\t\tgamePlayer.setPad(pad);\n\t\t\tpad.setFree(false);\n\t\t\tLocation loc = pad.getLocation();\n\n\t\t\tplayer.teleport(new Location(loc.getWorld(), loc.getX(), loc.getY(), loc.getZ()));\n\t\t\tsetupPlayerInventory(player);\n\t\t\tplayer.sendMessage(\"You have joined the game\");\n\t\t} else {\n\t\t\tSystem.out.println(\"Not enough room for \" + player.getName() + \" to join. Kicking...\");\n\t\t\tplayer.kickPlayer(\"Game Full\");\n\t\t}\n\t}", "@EventHandler\n\tpublic void onJoin(PlayerJoinEvent event) {\n\t\t\n\t\tif (PlaytimeConfig.getPlaytimeConfig().get(\"players.\" + event.getPlayer().getUniqueId()) == null) {\n\t\t\treturn;\n\t\t} else {\n\t\t\tint ticks = PlaytimeConfig.getPlaytimeConfig().getInt(\"players.\" + event.getPlayer().getUniqueId() + \".playtime\");\n\t\t\tevent.getPlayer().setStatistic(Statistic.PLAY_ONE_TICK, ticks);\n\t\t}\n\t}", "public void sendNameInfoToAll(){\r\n\t\t\r\n\t\tVector<Player> players = lobby.getLobbyPlayers();\t\r\n\t\tString message = \"UDNM\" + lobby.getNameString();\r\n\t\t\r\n\t\tif(!players.isEmpty()){\r\n\t \tfor(int i=0; i<players.size(); i++){\t \t\t\r\n\t \t\tsendOnePlayer(players.get(i), message);\t \t\t\r\n\t \t}\r\n\t\t}\r\n\t}", "public void playerSuccess(Player player, String message){\n\t\tplayer.sendMessage(ChatColor.GREEN + message);\n\t}", "public void playerLost()\r\n {\r\n \r\n }", "protected String getLeftMessage() {\n\t\treturn player2.getName() + \": \" + player2.getScore();\n\t}", "@Override\n\tpublic void onUserJoinedLobby(LobbyData arg0, String arg1) {\n\t\t\n\t}", "public static void neverJoined(Command command, String player) {\n\t\tString str = command.getSender().getAsMention() + \",\\n\";\n\t\t\n\t\tstr += ConfigManager.getMessage(\"never joined\").replace(\"%player%\", player);\n\t\tcommand.getChannel().sendMessage(str).complete();\n\t}", "@EventHandler(priority = EventPriority.HIGHEST)\n public void onPlayerJoin(PlayerJoinEvent playerJoinEvent) {\n final Player player = playerJoinEvent.getPlayer();\n\n // Checks if the update notify setting was enabled and if the player has permission to see update notifications\n if(configFile.getBoolean(\"Update_Notify\") && Utilities.checkPermissions(player, true, \"omegavision.update\", \"omegavision.admin\")) {\n // Check the plugins version against the spigotMC and see if it is up-to-date\n new SpigotUpdater(pluginInstance, 73013).getVersion(version -> {\n int spigotVersion = Integer.parseInt(version.replace(\".\", \"\"));\n int pluginVersion = Integer.parseInt(pluginInstance.getDescription().getVersion().replace(\".\", \"\"));\n\n if(pluginVersion >= spigotVersion) {\n Utilities.message(player, \"#00D4FFYou are already running the latest version\");\n return;\n }\n\n PluginDescriptionFile pdf = pluginInstance.getDescription();\n Utilities.message(player,\n \"#00D4FFA new version of #FF4A4A\" + pdf.getName() + \" #00D4FFis avaliable!\",\n \"#00D4FFCurrent Version: #FF4A4A\" + pdf.getVersion() + \" #00D4FF> New Version: #FF4A4A\" + version,\n \"#00D4FFGrab it here:#FF4A4A https://www.spigotmc.org/resources/omegavision.73013/\"\n );\n });\n }\n\n // Add the user to the user data map if they aren't currently in it.\n if(player.getFirstPlayed() == System.currentTimeMillis()) {\n userDataHandler.getUserDataMap().putIfAbsent(player.getUniqueId(), new ConcurrentHashMap<>());\n } else {\n userDataHandler.addUserToMap(player.getUniqueId());\n }\n\n // Check if the Night Vision Login setting was enabled and the player has a\n // true night vision status in the map and permission for night vision long.\n // If so, Apply night vision to them once they have logged in. Otherwise, remove it.\n if(configFile.getBoolean(\"Night_Vision_Settings.Night_Vision_Login\") && (boolean) userDataHandler.getEffectStatus(player.getUniqueId(), UserDataHandler.NIGHT_VISION) && Utilities.checkPermissions(player, true, \"omegavision.nightvision.login\", \"omegavision.nightvision.admin\", \"omegavision.admin\")) {\n Utilities.addPotionEffect(player, PotionEffectType.NIGHT_VISION, 60 * 60 * 24 * 100 ,1, particleEffects, ambientEffects, nightvisionIcon);\n } else {\n userDataHandler.setEffectStatus(player.getUniqueId(), false, UserDataHandler.NIGHT_VISION);\n Utilities.removePotionEffect(player, PotionEffectType.NIGHT_VISION);\n }\n\n if(configFile.getBoolean(\"Night_Vision_Limit.Enabled\")) {\n if((boolean) userDataHandler.getEffectStatus(player.getUniqueId(), UserDataHandler.LIMIT_REACHED)) {\n NightVisionToggle nightVisionToggle = new NightVisionToggle(pluginInstance, player);\n nightVisionToggle.limitResetTimer(player);\n }\n }\n }", "public static void playerWonInc(){\r\n\t\t_playerWon++;\r\n\t}", "@EventHandler(priority = EventPriority.MONITOR)\n\tvoid onPlayerJoin(PlayerJoinEvent event)\n\t{\n\t\t//Add the player to the correct permissions groups for their professions\n\t\tPlayer player = event.getPlayer();\n\t\tUUID uuid = player.getUniqueId();\n\t\tProfessionStats prof = new ProfessionStats(perms, data, config, uuid);\n\t\tfor (String pr: prof.getProfessions())\n\t\t\tperms.playerAdd(null, player, config.getString(\"permission_prefix\") + \".\" + pr + \".\"\n\t\t\t\t\t+ prof.getTierName(prof.getTier(pr)));\n\t\t\n\t\t//Add the player's name and UUID to file.\n\t\tdata.set(\"data.\" + uuid + \".name\", player.getName());\n\t}", "public void sendNameInfo(Player plr){\r\n\t\t\r\n\t\tString message = \"UDNM\" + lobby.getNameString();\r\n\t\tsendOnePlayer(plr, message);\r\n\t}", "public void receiveMessage(String line)\n \t{\n \t\t\tString[] msg = line.split(\" \", 4);\n \t\t\tString user = \"#UFPT\";\n \n \t\t\t//this is kind of a nasty solution...\n \n \t\t\tif(msg[0].indexOf(\"!\")>1)\n \t\t\t\tuser = msg[0].substring(1,msg[0].indexOf(\"!\"));\n \t\t\t\n \t\t\tPlayer temp = new Player(user);\n \t\t\tint index = players.indexOf(temp);\n \t\t\t\n \t\t\tString destination = msg[2];\n \t\t\tString command = msg[3].toLowerCase();\n \t\t\tif(command.equalsIgnoreCase(\":!start\"))\n \t\t\t{\n \t\t\t\tif(user.equals(startName))\t\t\n \t\t\t\t{\n \t\t\t\t\tinputThread.sendMessage(destination, \"The game has begun!\");\n\t\t\t\t\treturn;\n \t\t\t\t}\n \t\t\t\telse\n \t\t\t\t\tinputThread.sendMessage(destination, \"Only \" + startName + \" can start the game!\");\n \t\t\t}\t\n \t\t\tif(command.equalsIgnoreCase(\":!join\"))\n \t\t\t{\n \t\t\t\tSystem.out.println(index);\n \t\t\t\tif(index == -1)\n \t\t\t\t{\n \t\t\t\t\tplayers.add(new Player(user));\n \t\t\t\t\tinputThread.sendMessage(destination, user + \" has joined the game!\");\n \t\t\t\t}\n \t\t\t\telse\n \t\t\t\t\tinputThread.sendMessage(destination, user + \" has already joined the game!\");\n \t\t\t}\n \t\t\t\n \t\t\tif(command.equalsIgnoreCase(\":!quit\"))\n \t\t\t{\n \t\t\t\tSystem.out.println(index);\n \t\t\t\tif(index == -1)\n \t\t\t\t\tinputThread.sendMessage(destination, user + \" is not part of the game!\");\n \t\t\t\telse\n \t\t\t\t{\n \t\t\t\t\tplayers.remove(index);\n \t\t\t\t\tinputThread.sendMessage(destination, user + \" has quit the game!\");\n \t\t\t\t}\n \t\t\t\t\n \t\t\t}\t\n \t\t\t\n \t\t\tif (command.equalsIgnoreCase(\":!end\"))\n \t\t\t{\n \t\t\t\tif (user.equals(startName))\n \t\t\t\t{\n \t\t\t\t\tinputThread.sendMessage(destination, user + \" has ended the game. Aww :(\");\n \t\t\t\t\treturn;\n \t\t\t\t\t//does this acceptably end the game? I think so but not positive\n \t\t\t\t}\n \t\t\t\telse\n \t\t\t\t\tinputThread.sendMessage(destination, \"Only \" + startName + \" can end the game!\");\n \t\t\t}\n\t\t\n\t\n \t\n \t\t//assigning roles\n \t\tint numMafia = players.size()/3;\n \t\t//create the Mafia team\n \t\tfor(int a = 0; a < numMafia; ++a)\n \t\t{\n \t\t\tmafiaRoles.add(new Mafia(new MafiaTeam()));\n \t\t}\n \t\t\n \t\t//create the Town team\n \t\tfor(int a = 0; a < (players.size() - numMafia); ++a)\n \t\t{\n \t\t\ttownRoles.add(new Citizen(new Town()));\n \t\t}\n \t\tCollections.shuffle(mafiaRoles);\n \t\tCollections.shuffle(townRoles);\n \t\tfor(int a = 0; a < numMafia; ++a)\n \t\t{\n \t\t\troles.add(mafiaRoles.get(a));\n \t\t}\n \t\tfor(int a = 0; a < players.size() - numMafia; ++a)\n \t\t{\n \t\t\troles.add(townRoles.get(a));\n \t\t}\n \t\tfor(int a = 0; a < players.size(); ++a)\n \t\t{\n \t\t\tplayers.get(a).role = roles.get(a);\n \t\t\tinputThread.sendMessage(players.get(a).name, \"your role is \" + roles.get(a).name);\n \t\t}\n \t\t\n \t\t//TODO tell game that a day or night needs to start? should this method have a return type?\n \t\t\n \t}", "void playerAdded();", "public String toString() {\n\t\treturn \"player \" + player.id + \"\\n\";\n\t}", "public void addPlayer(String playerID) {\r\n\t\tplayerCount++;\r\n\t\tString name = guild.getMemberById(playerID).getEffectiveName();\r\n\t\t// Set up each player uniquely\r\n\t\tif (p2 == null) {\r\n\t\t\tp2 = new Player(1,playerID,GlobalVars.pieces.get(\"blue\"));\r\n\t\t\tp2.getPiece().setX(GlobalVars.playerCoordsPerRoom[0][0]+GlobalVars.playersOffset[1][0]);\r\n\t\t\tp2.getPiece().setY(GlobalVars.playerCoordsPerRoom[0][1]+GlobalVars.playersOffset[1][1]);\r\n\t\t\tplayers.add(p2);\r\n\t\t\tp1.setNextPlayer(p2);\r\n\t\t\tp2.setNextPlayer(p1);\r\n\t\t\tgameChannel.sendMessage(\"**\"+name+\"** has reincarnated as the BLUE adventurer\").queue();\r\n\t\t} else if (p3 == null) {\r\n\t\t\tp3 = new Player(2,playerID,GlobalVars.pieces.get(\"yellow\"));\r\n\t\t\tp3.getPiece().setX(GlobalVars.playerCoordsPerRoom[0][0]+GlobalVars.playersOffset[2][0]);\r\n\t\t\tp3.getPiece().setY(GlobalVars.playerCoordsPerRoom[0][1]+GlobalVars.playersOffset[2][1]);\r\n\t\t\tplayers.add(p3);\r\n\t\t\tp2.setNextPlayer(p3);\r\n\t\t\tp3.setNextPlayer(p1);\r\n\t\t\tgameChannel.sendMessage(\"**\"+name+\"** has reincarnated as the YELLOW adventurer\").queue();\r\n\t\t} else if (p4 == null) {\r\n\t\t\tp4 = new Player(3,playerID,GlobalVars.pieces.get(\"green\"));\r\n\t\t\tp4.getPiece().setX(GlobalVars.playerCoordsPerRoom[0][0]+GlobalVars.playersOffset[3][0]);\r\n\t\t\tp4.getPiece().setY(GlobalVars.playerCoordsPerRoom[0][1]+GlobalVars.playersOffset[3][1]);\r\n\t\t\tplayers.add(p4);\r\n\t\t\tp3.setNextPlayer(p4);\r\n\t\t\tp4.setNextPlayer(p1);\r\n\t\t\tgameChannel.sendMessage(\"**\"+name+\"** has reincarnated as the GREEN adventurer\").queue();\r\n\t\t}\r\n\t}", "@Override\n public void youWin(Map<String, Integer> rankingMap) {\n try {\n if (getClientInterface() != null)\n getClientInterface().gameEnded(\"YOU WON, CONGRATS BUDDY!!\", rankingMap);\n }\n catch (RemoteException e) {\n System.out.println(\"remote sending you won error\");\n }\n }", "public static void getStatus( Player player ) {\n Tools.Prt( player, ChatColor.GREEN + \"=== Premises Messages ===\", programCode );\n Messages.PlayerMessage.keySet().forEach ( ( gn ) -> {\n String mainStr = ChatColor.YELLOW + Messages.PlayerMessage.get( gn );\n mainStr = mainStr.replace( \"%player%\", ChatColor.AQUA + \"%player%\" + ChatColor.YELLOW );\n mainStr = mainStr.replace( \"%message%\", ChatColor.AQUA + \"%message%\" + ChatColor.YELLOW );\n mainStr = mainStr.replace( \"%tool%\", ChatColor.AQUA + \"%tool%\" + ChatColor.YELLOW );\n mainStr = mainStr.replace( \"%digs%\", ChatColor.AQUA + \"%digs%\" + ChatColor.YELLOW );\n mainStr = mainStr.replace( \"%nowDurability%\", ChatColor.AQUA + \"%nowDurability%\" + ChatColor.YELLOW );\n mainStr = mainStr.replace( \"%targetDurability%\", ChatColor.AQUA + \"%targetDurability%\" + ChatColor.YELLOW );\n mainStr = mainStr.replace( \"%score%\", ChatColor.AQUA + \"%score%\" + ChatColor.YELLOW );\n mainStr = mainStr.replace( \"%AreaCode%\", ChatColor.AQUA + \"%AreaCode%\" + ChatColor.YELLOW );\n Tools.Prt( player, ChatColor.WHITE + gn + \" : \" + mainStr, programCode );\n } );\n Tools.Prt( player, ChatColor.GREEN + \"=========================\", programCode );\n }", "private void reportPlay (Player player) {\n System.out.println(\"Player \" + player.name() +\n \" takes \" + player.numberTaken() +\n \" stick(s), leaving \" + game.sticksLeft()\n + \".\");\n }", "private void out(String otherplayermsg, int commandlength) {\n\n // decode variable that came with message\n int varlength = 0;\n for (int n = commandlength + 1; n < otherplayermsg.length(); n++) {\n char extract = otherplayermsg.charAt(n);\n if (extract == (':')) {\n varlength = n;\n break;\n }\n }\n String positionString = otherplayermsg.substring(commandlength + 1, varlength);\n int playerPosition = 0;\n try {\n playerPosition = Integer.parseInt(positionString);\n } catch (NumberFormatException b) {\n sh.addMsg(\"Otherplayer - out - variable to Int error: \" + b);\n }\n\n boolean gameover = playerPosition == 4;\n sh.addMsg(FINISHED_MESSAGE[playerPosition - 1]);\n\n outofgame[3] = true;\n\n score.addScore(playersName, position);\n\n if (playerPosition == 4) score.display();\n else position++;\n\n if (whosturn == 3 && !gameover) {\n nextTurn();\n displayTable();\n }\n }", "public void playHoomans() {\r\n System.out.println(\"Thanks for killing each other, human!\");\r\n }", "public String whoWon()\n { \n String win=\"\";\n if (player1Hand.isEmpty())\n {\n win=(\"player 2 wins!\");\n }\n \n if(player2Hand.isEmpty())\n {\n win=(\"player 1 wins\");\n } \n \n return win;\n }", "public static void privateMessage(Player fromPlayer, Player toPlayer, String[] message) {\n PlayerDataObject fromPDO = PlayerManager.getPlayerDataObject(fromPlayer);\n PlayerDataObject toPDO = PlayerManager.getPlayerDataObject(toPlayer);\n //target.sendMessage(ChatColor.DARK_GRAY + \"[\" + player.getFriendlyName() + ChatColor.DARK_GRAY + \" > you]: \" + ChatColor.WHITE + String.join(\" \", Arrays.copyOfRange(arg3, 1, arg3.length)).trim());\n //player.sendMessage(ChatColor.DARK_GRAY + \"[You > \" + target.getDisplayName() + ChatColor.DARK_GRAY + \"]: \" + ChatColor.WHITE + String.join(\" \", Arrays.copyOfRange(arg3, 1, arg3.length)).trim());\n ComponentBuilder toComp = new ComponentBuilder(ChatColor.DARK_GRAY + \"[\" + fromPDO.getFriendlyName() + ChatColor.DARK_GRAY + \" > you]\" + ChatColor.WHITE + \":\");\n toComp.event(new HoverEvent(HoverEvent.Action.SHOW_TEXT, new ComponentBuilder(\"PM \" + fromPDO.getPlainNick()).create()));\n toComp.event(new ClickEvent(ClickEvent.Action.SUGGEST_COMMAND, \"/pm \" + fromPDO.getName() + \" \"));\n toComp.append(\" \").reset();\n \n ComponentBuilder fromComp = new ComponentBuilder(ChatColor.DARK_GRAY + \"[You > \" + toPDO.getDisplayName() + ChatColor.DARK_GRAY + \"]\" + ChatColor.WHITE + \":\");\n fromComp.event(new HoverEvent(HoverEvent.Action.SHOW_TEXT, new ComponentBuilder(\"PM \" + toPDO.getPlainNick()).create()));\n fromComp.event(new ClickEvent(ClickEvent.Action.SUGGEST_COMMAND, \"/pm \" + toPDO.getName() + \" \"));\n fromComp.append(\" \").reset();\n \n TextComponent messageComp = new TextComponent();\n for (String part : message) {\n if (part.matches(\"^.*(https?)://[-a-zA-Z0-9+&@#/%?=~_|!:,.;]*[-a-zA-Z0-9+&@#/%=~_|].*$\")) {\n messageComp.addExtra(assembleURLComponent(part));\n messageComp.addExtra(\" \");\n } else {\n messageComp.addExtra(part + \" \");\n }\n }\n \n BaseComponent[] toMSG = toComp\n .append(messageComp)\n .create();\n BaseComponent[] fromMsg = fromComp\n .append(messageComp)\n .create();\n \n toPDO.sendMessageIf(toMSG);\n fromPDO.sendMessageIf(fromMsg);\n }", "@EventHandler(ignoreCancelled = true, priority = EventPriority.HIGHEST)\r\n public void onJoin(PlayerJoinEvent joinEvent) {\n Player player = joinEvent.getPlayer();\r\n\r\n String health = String.valueOf(player.getHealth());\r\n String ping = String.valueOf(player.getPing());\r\n\r\n if (config.getBoolean(\"JoinEnabled\")) {\r\n joinEvent.setJoinMessage(config.getString(\"JoinMessage\").\r\n replace(\"%player%\", player.getDisplayName()).\r\n replace(\"%server%\", getServer().getMotd()).\r\n replace(\"%ping%\", ping).\r\n replace(\"%health%\", health));\r\n\r\n // Checks if the user has put a join message or not\r\n if (config.getString(\"JoinMessage\").trim().isEmpty() || config.getString(\"JoinMessage\").equals(\"\")) {\r\n this.getLogger().info(\"Couldn't define any join message.\");\r\n }\r\n }\r\n else this.getLogger().info(\"Join messages are disabled.\");\r\n }", "private void sendMessagetoRespectivePlayer(int num) {\n Message msg1;\n if(flag == \"player1\"){\n prevP1 = num;\n int newPositionGroup = num / 10;\n if(winningHoleGroup == newPositionGroup){\n msg1 = p1Handler.obtainMessage(3);\n }\n else if((winningHoleGroup == newPositionGroup-1) || (winningHoleGroup == newPositionGroup+1)){\n msg1 = p1Handler.obtainMessage(4);\n }\n else{\n msg1 = p1Handler.obtainMessage(5);\n }\n p1Handler.sendMessage(msg1);\n }\n else{\n prevP2 = num;\n int newPositionGroup = num / 10;\n if(winningHoleGroup == newPositionGroup){\n msg1 = p2Handler.obtainMessage(3);\n }\n else if((winningHoleGroup == newPositionGroup-1) || (winningHoleGroup == newPositionGroup+1)){\n msg1 = p2Handler.obtainMessage(4);\n }\n else{\n msg1 = p2Handler.obtainMessage(5);\n }\n p2Handler.sendMessage(msg1);\n }\n }", "public void printDetailedPlayer(Player player);", "private static Player getThroughWhomSendMessage() {\n\t\treturn Remain.getOnlinePlayers().isEmpty() ? null : Remain.getOnlinePlayers().iterator().next();\n\t}", "private void sendPlayerChat1(String s) {\n\t\tc.getPA().sendFrame200(969, 591);\n\t\tc.getPA().sendFrame126(c.playerName, 970);\n\t\tc.getPA().sendFrame126(s, 971);\n\t\tc.getPA().sendFrame185(969);\n\t\tc.getPA().sendFrame164(968);\n\t}", "public static void displayWelcomeMessage(Player player) {\r\n\t\t\r\n\t\t//Insert Blank lines to clear previous chat from other servers\r\n\t\t//or the players last session.\r\n\t\tplayer.sendMessage(\"\");\r\n\t\tplayer.sendMessage(\"\");\r\n\t\tplayer.sendMessage(\"\");\r\n\t\tplayer.sendMessage(\"\");\r\n\t\tplayer.sendMessage(\"\");\r\n\t\tplayer.sendMessage(\"\");\r\n\t\tplayer.sendMessage(\"\");\r\n\t\tplayer.sendMessage(\"\");\r\n\t\tplayer.sendMessage(\"\");\r\n\t\tplayer.sendMessage(\"\");\r\n\t\tplayer.sendMessage(\"\");\r\n\t\tplayer.sendMessage(\"\");\r\n\t\tplayer.sendMessage(\"\");\r\n\t\tplayer.sendMessage(\"\");\r\n\t\t\r\n\t\tString welcomeMessage = \" \\n\" + \" \\n\" + ChatColor.GOLD + \" \" + ChatColor.BOLD \r\n\t\t\t\t+ \"MinePile: \" + ChatColor.WHITE + \"\" + ChatColor.BOLD + \"RPGMMO \" + plugin.getPluginVersion() + \" \\n\" + \r\n\t\t\t\tChatColor.RESET + ChatColor.GRAY + \" http://www.MinePile.com/\" + \" \\n\" + \r\n\t\t\t\t\" \\n\" + \" \\n\";\r\n\t\tplayer.sendMessage(welcomeMessage);\r\n\t}", "public String getDeathMessage(Player player);", "@Override\n public void declareWinner(){\n //only the not-dead player is the winner\n for (Player p : super.getPlayers()) {\n if (!(p.isDead())) {\n System.out.printf(\"%s IS THE WINNER!\", p.getPlayerID());\n break;\n }\n }\n }", "public void playerJoins(final SonicPlayer sP) {\n\t\t_T.run_ASync(new Runnable() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\tif (!checkConnection()) {\n\t\t\t\t\t//Something is wrong, kick the player\n\t\t\t\t\t_.badMsg(sP.getPlayer(), \"Something is wrong with the game.. Sorry! Contact Stoux if he is online!\");\n\t\t\t\t\tsonic.playerQuit(sP);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}", "public void otherSentence()\n {\n // Receive the string from the other player\n if (other == 1)\n {\n record.append(\"Red: \" + theClientChat.recvString() + \"\\n\");\n }\n else\n {\n record.append(\"Yellow: \" + theClientChat.recvString() + \"\\n\");\n }\n }", "@Override\r\n\t\t\tpublic void seeEvent(Player p, String s) {\n\t\t\t\t\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void seeEvent(Player p, String s) {\n\t\t\t\t\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void seeEvent(Player p, String s) {\n\t\t\t\t\r\n\t\t\t}", "void endSinglePlayerGame(String message);", "public void handleJoin()\n {\n String n = name.getText();\n if(n.isEmpty())\n {\n setStatus(\"Bitte Namen eingeben!\",Color.RED);\n return;\n }\n if(n.contains(\";\"))\n {\n setStatus(\"Bitte keine ; verwenden!\",Color.RED);\n return;\n }if(n.contains(\"'\"))\n {\n setStatus(\"Bitte keine ' verwenden!\",Color.RED);\n return;\n }if(n.contains(\",\"))\n {\n setStatus(\"Bitte keine , verwenden!\",Color.RED);\n return;\n }\n String ip = ip_text.getText();\n if(ip.isEmpty())\n {\n setStatus(\"Bitte IP eingeben!\",Color.RED);\n return;\n }\n if(ip.contains(\";\"))\n {\n setStatus(\"Bitte kiene ; verwenden!\",Color.RED);\n return;\n }if(ip.contains(\"|\"))\n {\n setStatus(\"Bitte kiene | verwenden!\",Color.RED);\n return;\n }if(ip.contains(\",\"))\n {\n setStatus(\"Bitte kiene , verwenden!\",Color.RED);\n return;\n }\n\n matchup.joinGame(n,color_snake.getValue(),color_head.getValue(),ip);\n }", "protected String getRightMessage() {\n\t\treturn player1.getName() + \": \" + player1.getScore();\n\t}", "public boolean sendSonicTime(final CommandSender p, final String playername) {\n\t\tif (doingCommand.contains(p.getName())) { //Check if already doing command\n\t\t\treturn false;\n\t\t}\n\t\tdoingCommand.add(p.getName());\n\t\t_.msg(p, GameMode.Sonic, \"Gathering \" + playername + \"'s stats...\");\n\t\t_T.run_ASync(new Runnable() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\ttry {\n\t\t\t\t\tif (con.isClosed() || !isAlive) {\n\t\t\t\t\t\tif (!connect()) {\n\t\t\t\t\t\t\tthrow new SQLException(\"Failed to connect with SQL.\");\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tString[] messages = new String[7];\n\t\t\t\t\tResultSet allScoresRS = con.createStatement().executeQuery( //Gather all scores\n\t\t\t\t\t\t\"SELECT `player`, `finish`, `checkpoint1`, `checkpoint2`, `checkpoint3`, `checkpoint4`, `checkpoint5` \" +\n\t\t\t\t\t\t\"FROM `sonicleaderboard` \" +\n\t\t\t\t\t\t\"ORDER BY `sonicleaderboard`.`finish` ASC;\"\n\t\t\t\t\t);\n\t\t\t\t\tboolean playerFound = false;\n\t\t\t\t\tHashSet<String> foundPlayers = new HashSet<>();\n\t\t\t\t\tint rank = 0;\n\t\t\t\t\twhile (allScoresRS.next()) { //Loop thru scores\n\t\t\t\t\t\tString foundPlayer = allScoresRS.getString(1).toLowerCase(); //Get the player\n\t\t\t\t\t\tif (foundPlayers.contains(foundPlayer)) { //If player already found\n\t\t\t\t\t\t\tcontinue; //Skip\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfoundPlayers.add(foundPlayer);\n\t\t\t\t\t\trank++;\n\t\t\t\t\t\tif (foundPlayer.equals(playername.toLowerCase())) { //Requested player found\n\t\t\t\t\t\t\tplayerFound = true; //Send player's time\n\t\t\t\t\t\t\tmessages[0] = playername + \"'s All-Time High Score = \" + ChatColor.GREEN + _.getGameController().getTimeString(0, allScoresRS.getLong(2)) + ChatColor.WHITE + \" | Ranked \" + ChatColor.GREEN + \"#\" + rank;\n\t\t\t\t\t\t\tmessages[1] = checkpointString(1, allScoresRS.getLong(3));\n\t\t\t\t\t\t\tmessages[2] = checkpointString(2, allScoresRS.getLong(4));\n\t\t\t\t\t\t\tmessages[3] = checkpointString(3, allScoresRS.getLong(5));\n\t\t\t\t\t\t\tmessages[4] = checkpointString(4, allScoresRS.getLong(6)); \n\t\t\t\t\t\t\tmessages[5] = checkpointString(5, allScoresRS.getLong(7));\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif (!playerFound) { //Player hasn't been found\n\t\t\t\t\t\tsendMessage(p, playername + \" hasn't finished Sonic yet.\");\n\t\t\t\t\t\tdoingCommand.remove(p.getName());\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t//Get monthly time\n\t\t\t\t\tPreparedStatement prep = con.prepareStatement(\n\t\t\t\t\t\t\"SELECT `player`, `finish` \" +\n\t\t\t\t\t\t\"FROM `sonicleaderboard` \" +\n\t\t\t\t\t\t\"WHERE `finish_timestamp` BETWEEN ? AND ? \" +\n\t\t\t\t\t\t\"ORDER BY `sonicleaderboard`.`finish` ASC;\"\n\t\t\t\t\t);\n\t\t\t\t\t//Set dates\n\t\t\t\t\tprep.setDate(1, startDateSQL);\n\t\t\t\t\tprep.setDate(2, endDateSQL);\n\t\t\t\t\t\n\t\t\t\t\tplayerFound = false; rank = 0; foundPlayers.clear();\n\t\t\t\t\tResultSet monthlyRS = prep.executeQuery();\n\t\t\t\t\twhile (monthlyRS.next()) { //Loop thru all monthly scores\n\t\t\t\t\t\tString monthlyPlayer = monthlyRS.getString(1).toLowerCase();\n\t\t\t\t\t\tif (foundPlayers.contains(monthlyPlayer)) { //Player already found\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfoundPlayers.add(monthlyPlayer);\n\t\t\t\t\t\trank++;\n\t\t\t\t\t\tif (monthlyPlayer.equals(playername.toLowerCase())) { //If the player\n\t\t\t\t\t\t\tplayerFound = true;\n\t\t\t\t\t\t\tmessages[6] = playername + \"'s Monthly (\" + monthString + \") High Score = \" + ChatColor.GREEN + _.getGameController().getTimeString(0, monthlyRS.getLong(2)) + ChatColor.WHITE + \" | Ranked \" + ChatColor.GREEN + \"#\" + rank;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif (!playerFound) {\n\t\t\t\t\t\tmessages[6] = playername + \" hasn't raced in this month (\" + monthString + \") yet.\";\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tfor (String msg : messages) { //Send strings\n\t\t\t\t\t\tif (msg == null) continue;\n\t\t\t\t\t\tsendMessage(p, msg);\n\t\t\t\t\t}\n\t\t\t\t} catch (SQLException e) {\n\t\t\t\t\t_.log(Level.SEVERE, GameMode.Sonic, \"Failed to get \" + playername + \"'s time! SQLException: \" + e.getMessage());\n\t\t\t\t\t_.badMsg(p, \"Something went wrong gathering \" + playername + \"'s time. Contact Stoux!\");\n\t\t\t\t}\n\t\t\t\tdoingCommand.remove(p.getName());\n\t\t\t}\n\t\t});\n\t\treturn true;\n\t}", "@EventHandler(ignoreCancelled = true, priority = EventPriority.MONITOR)\n\tprivate void onPlayerJoin(PlayerJoinEvent event)\n\t{\n\t\t\n\t\tif(!event.getPlayer().hasPermission(\"quests.quests\"))\n\t\t{\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tfinal Player entity = event.getPlayer();\n\t\t\n\t\tQuestPlayer player = getQuestPlayer(entity);\n\n\t\t// Let the player know if his last (current) quest wasn't completed before it expired.\n\t\tif(player.getCurrentQuest().getPlayerQuestModel().Status == QuestStatus.Incomplete)\n\t\t{\n\t\t\tgetLogger().info(entity.getName() + \" didn't complete their last quest in time.\");\n\t\t\t\n\t\t\tif(!PluginConfig.SOFT_LAUNCH)\n\t\t\t{\n\t\t\t\tgetServer().getScheduler().scheduleSyncDelayedTask(this, new Runnable()\n\t\t\t\t{\n\t\t\t\t\tpublic void run()\n\t\t\t\t\t{\n\t\t\t\t\t\tString msg = \" \" + ChatColor.AQUA + \"Aaawww! You didn't manage to complete your last quest in time.\";\n\t\t\t\t\t\tmsg += \"\\n A new quest will be created for you shortly..\";\n\t\t\t\t\n\t\t\t\t\t\tentity.sendMessage(msg);\n\t\t\t\t\t}\n\t\t\t\t}, 60);\n\t\t\t}\n\t\t\t\n\t\t\t// And give him a new quest.\n\t\t\tplayer.giveRandomQuest();\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// If last/current quest is processed, create a new one.\n\t\t\tif(player.getCurrentQuest().getPlayerQuestModel().Processed == 1)\n\t\t\t{\n\t\t\t\tplayer.giveRandomQuest();\n\t\t\t}\n\t\t}\n\n\t\tif(!PluginConfig.SOFT_LAUNCH)\n\t\t\tnotifyPlayerOfQuest(entity, player.getCurrentQuest().getPlayerQuestModel().Status, 160);\n\t}", "@Override\n\tpublic void joinLobby(int playerID, int sessionID){\n\t\tif(sessionID == NO_LOBBY_ID)\n\t\t\treturn;\n\t\t//check if the player is already in an other lobby\n\t\tint playerSession = getSessionFromClient(playerID);\n\n\t\tif(playerSession == NO_LOBBY_ID){\n\t\t\tlobbyMap.get(sessionID).addPlayer(getPlayerMap().get(playerID));\n\t\t\tDebugOutputHandler.printDebug(\"Player \"+getPlayerMap().get(playerID).getName()+\" now is in lobby \" + getPlayerMap().get(playerID).getSessionID());\n\t\t}\n\t}", "public void onPlayerLoggedIn() {\n\t\tshowPlayerButtons();\n\t}", "public void sendStartGame (){\n connect();\n try{\n doStream.writeUTF(\"GAME_START\");\n doStream.writeUTF(currentUser.getUserName());\n\n } catch (IOException e){\n e.printStackTrace();\n }\n disconnect();\n }", "@EventHandler(priority = EventPriority.HIGH, ignoreCancelled = true)\n public void onPlayerLogin(PlayerLoginEvent event) {\n String playerName = event.getPlayer().getName();\n \n if(plugin.bannedPlayers.contains(playerName)){\n \t event.setKickMessage(\"You are banned from this server!\");\n \t event.setResult(Result.KICK_BANNED);\n \t \n }\n \n \n }", "private static void debugMessage(GuildMessageReceivedEvent event) {\n String preface = \"[Discord IDs] \";\n\n System.out.println(\"====== PING COMMAND ======\");\n System.out.println(preface + \"`!ping` SENDER:\");\n System.out.println(\n \"\\t{USER} ID: \" + event.getAuthor().getId() +\n \"\\tName: \" + event.getMember().getEffectiveName() +\n \" (\" + event.getAuthor().getAsTag() + \")\");\n\n System.out.println(preface + \"BOT ID:\\t\" + event.getJDA().getSelfUser().getId());\n System.out.println(preface + \"GUILD ID:\\t\" + event.getGuild().getId());\n\n System.out.println(preface + \"ROLES:\");\n event.getGuild().getRoles().forEach(role -> {\n System.out.println(\"\\t{ROLES} ID: \" + role.getId() + \"\\tName: \" + role.getName());\n });\n\n System.out.println(preface + \"MEMBERS:\");\n event.getGuild().getMembers().forEach(member -> {\n System.out.println(\n \"\\t{MEMEBERS} ID: \" + member.getUser().getId() +\n \"\\tName: \" + member.getEffectiveName() +\n \" (\" + member.getUser().getAsTag() + \")\");\n });\n\n System.out.println(preface + \"Categories:\");\n event.getGuild().getCategories().forEach(category -> {\n System.out.println(\"\\t{CATEGORY} ID: \" + category.getId() + \"\\tName: \" + category.getName());\n category.getChannels().forEach(guildChannel -> {\n System.out.println(\n \"\\t\\t:\" + guildChannel.getType().name().toUpperCase() + \":\" +\n \"\\tID: \" + guildChannel.getId() +\n \"\\tName: \" + guildChannel.getName() +\n \"\\tlink: \" + \"https://discord.com/channels/\" + Settings.GUILD_ID + \"/\" + guildChannel.getId());\n });\n });\n System.out.println(\"==== PING COMMAND END ====\");\n }", "public void OnPlayer(Joueur joueur);", "void notifyPlayerHasAnotherTurn();", "@EventHandler(ignoreCancelled = true)\n public void onPlayerJoin(PlayerJoinEvent event) {\n new AtlasTask() {\n @Override\n public void run() {\n if (event.getPlayer().isOnline()) {\n update(event.getPlayer());\n }\n }\n }.later(20);\n }", "public void print()\n\t{\n\t\tif(gameObj[1].size() > 0)\n\t\t{\n\t\t\tSystem.out.println(\"*********************Player Info*******************************\");\n\t\t\tSystem.out.println(\"[Lives: \" + lives + \"][Score: \" + score + \n\t\t\t\t\t\t\t\"][Time: \" + gameTime + \"]\");\n\t\t\tSystem.out.println(\"*********************Player Info*******************************\");\n\t\t}else\n\t\t\tSystem.out.println(\"Spawn a player ship to view game info\");\n\t}", "@Inject(at = @At(\"TAIL\"), method = \"onPlayerConnect\")\n\tprivate void onPlayerConnect(ClientConnection connection, ServerPlayerEntity player, CallbackInfo info) {\n\t\tShipItComponents.MAIL.get(player.getServerWorld().getLevelProperties()).getMailInfo(player).tryNameUpdate(player);\n\t}", "public void sendPlayer(Player p) {\n\t\tp.sendMessage(ChatColor.GREEN + \"Welcome to the \" + ChatColor.GOLD + \"Tregmine Network\" + ChatColor.GREEN + \" Lobby!\");\n\t\tByteArrayDataOutput out = ByteStreams.newDataOutput();\n\t\tout.writeUTF(\"Connect\");\n\t\tout.writeUTF(\"Hub\");\n\t\tp.sendPluginMessage(this, \"BungeeCord\", out.toByteArray());\n\t}", "@Override\r\n\tpublic void showGetPrisonCardMessage(Player player) {\n\t\t\r\n\t}", "@Override\n\tpublic void onMessage(String arg0, String arg1) {\n\t\tSystem.out.print(arg0+arg1);\n\t}", "public void getScores(){\n String p1 = \"Player 1 has \" + Integer.toString(player1.getWins());\n String p2 = \"Player 2 has \" + Integer.toString(player2.getWins());\n String winner = \"tie\";\n if(player1.getWins()>player2.getWins()){\n winner = player1.getName() + \" wins!!!!\";\n }\n else if(player2.getWins()>player1.getWins()){\n winner = player2.getName() + \" Wins!!!\";\n }\n JOptionPane.showMessageDialog(null, (p1 + \"\\n\" + p2 + \"\\n\" + winner));\n }", "@Override\n\tpublic void onUserJoinedRoom(RoomData arg0, String arg1) {\n\t\t\n\t}", "private void joinGame(int gameId){\n\n }", "void sendPacketToPlayer(Player player, Object packet);", "public\tvoid\tuserJoined(UIRosterEntry user)\n\t{\n\t\t\n\t\tNewChatPanel panel = this.getDiscussionPanel();\n\t\n\t\tString joinedUserName = user.getDisplayName();\n\t\tString joinedUserId = user.getUserId();\n\t\t\n\t\tString senderId = this.rosterModel.getCurrentActivePresenter().getUserId();\n\t\tString senderName = this.rosterModel.getCurrentActivePresenter().getDisplayName();\n\t\t\n\t\t//Window.alert(\"senderId = \"+senderId+\":senderName:\"+senderName);\n\t\t//Window.alert(\"User Joined:joinedUserName :\"+joinedUserName+\":joinedUser Status:\"+user.getJoinedStatus());\n\t\t//Window.alert(\"lastUserJoined = \"+lastUserJoined);\n\t\tif((joinedUserId != senderId ) && (joinedUserId != lastUserJoined ) && (senderName != \"Not Available\") && (joinedUserId != me.getUserId()) && (!user.getJoinedStatus()))\n\t\t{\n\t\t//\tpanel.receiveChatMessage(\"\", sender,joinedUser + \" has joined the conference\");\n\t \t String s = ConferenceGlobals.getDisplayString(\"user_joined_message\",\"has joined the dimdim web meeting.\");\n\t \t //Window.alert(\"adding \"+s);\n\t\t\tpanel.receiveWelcomeMessage(joinedUserName + \" \"+s);\n\t\t\tlastUserJoined = joinedUserId;\n\t\t}\n\t\telse if((joinedUserId == senderId) && lastUserJoined == null && (joinedUserId != lastUserJoined))\n\t\t{\n\t \t String s = ConferenceGlobals.getDisplayString(\"user_welcome_message\",\"Welcome to the Dimdim Web Meeting.\");\n\t \t //Window.alert(\"adding welcom message...\");\n\t\t\tpanel.receiveWelcomeMessage(s);\n\t\t\tlastUserJoined = joinedUserId;\n\t\t}\n\t}", "@Override\n\tpublic void onJoinLobbyDone(LobbyEvent arg0) {\n\t\tMain.log(getClass(), \"onJoinLobbyDone\");\n\t}", "@EventHandler\r\n\tpublic void onPlayerJoin(PlayerJoinEvent event) {\r\n\t\tUUID uuid = event.getPlayer().getUniqueId();\r\n\t\tmain.getPlayers().put(uuid, new RPGPlayer(uuid));\r\n\t\tmain.getPlayers().get(event.getPlayer().getUniqueId()).loadInventory();\r\n\t}", "@EventHandler\n public void OnPlayerChatEvent(PlayerChatEvent e)\n {\n this.setLastSeen(e.getPlayer());\n }", "public void join(Player player) {\n if (this.stored.contains(player.getName()) ^ !this.optInEnable) {\n if (Trivia.wrapper.permission(player, PermissionTypes.PLAY) && this.running) {\n if (!this.active.contains(player)) {\n this.active.add(player);\n player.sendMessage(\"Qukkiz is now \" + ChatColor.GREEN + \"enabled\" + ChatColor.WHITE + \".\");\n }\n }\n }\n }" ]
[ "0.7328164", "0.7252421", "0.700241", "0.6940685", "0.69317853", "0.6913074", "0.6822056", "0.67986107", "0.6784806", "0.6769775", "0.6762565", "0.6607544", "0.6601682", "0.6589922", "0.65855104", "0.65773517", "0.65366703", "0.6519188", "0.6484245", "0.64668274", "0.6448486", "0.64473724", "0.6427774", "0.6368328", "0.63648635", "0.6350056", "0.6348526", "0.63421047", "0.63283247", "0.6312401", "0.6303771", "0.6303625", "0.62896186", "0.62862545", "0.62705064", "0.6258021", "0.6252887", "0.6249046", "0.62382895", "0.6237126", "0.62140775", "0.6203324", "0.61869496", "0.6186458", "0.6186294", "0.6183303", "0.61773354", "0.61725354", "0.6168436", "0.6136525", "0.61354876", "0.61249477", "0.61041284", "0.6085168", "0.60569286", "0.6051428", "0.6050653", "0.6032977", "0.60230637", "0.60168844", "0.6009457", "0.60081136", "0.60012716", "0.5988582", "0.5983446", "0.5975537", "0.5955225", "0.5920966", "0.5918471", "0.59120685", "0.5905863", "0.5905863", "0.5905863", "0.5904478", "0.5896396", "0.58960754", "0.58945984", "0.58943266", "0.5890989", "0.5881658", "0.5874512", "0.5873763", "0.5868392", "0.5867955", "0.5866919", "0.58564544", "0.5854528", "0.58502173", "0.58467245", "0.58401537", "0.5832864", "0.58328575", "0.58244437", "0.58215946", "0.58182144", "0.58180076", "0.5812778", "0.58114576", "0.58106405", "0.5810357" ]
0.78393924
0
printMessage("ph.playerFoundObj: "+playerID+" number:"+playerNumber+" found object"); moeten we zelf checken of dit teammate is?
@Override public void playerFoundObject(String playerID, int playerNumber) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void printPlayerStat(Player player);", "private void showMatch() {\n System.out.println(\"Player 1\");\n game.getOne().getField().showField();\n System.out.println(\"Player 2\");\n game.getTwo().getField().showField();\n }", "@Test\n public void searchFindsPlayer() {\n Player jari = stats.search(\"Kurri\");\n assertEquals(jari.getName(), \"Kurri\");\n\n }", "public void printDetailedPlayer(Player player);", "private static void testPlayer() {\r\n\t\t\tnew AccessChecker(Player.class).pM(\"getName\").pM(\"getMark\").pM(\"toString\").checkAll();\r\n\t\t\tPlayer p = new Player(\"Test\", 'X');\r\n\t\t\tcheckEq(p.getName(), \"Test\", \"Player.getName\");\r\n\t\t\tcheckEq(p.getMark(), 'X', \"Player.getMark\");\r\n\t\t\tcheckEqStr(p, \"Test(X)\", \"Player.toString\");\t\t\r\n\t\t}", "public void printOtherPlayersInfo(Match match, String nickname) {\n try {\n ArrayList<Player> otherPlayers = match.getOtherPlayers(nickname);\n for (Player player : otherPlayers) {\n System.out.println(player.getNickname());\n System.out.println(player.getNumOfToken());\n ShowScheme scheme = new ShowScheme(player.getScheme());\n System.out.println(\"\");\n chooseAction(match, nickname);\n }\n } catch (NullPointerException e) {\n } catch (NumberFormatException e) {\n System.out.println(\"Digita un carattere valido\");\n } catch (IndexOutOfBoundsException e) {\n }\n\n }", "public void printVictoryMessage() { //main playing method\r\n System.out.println(\"Congrats \" + name + \" you won!!!\");\r\n }", "public void playerWon()\r\n {\r\n \r\n }", "public String callPlayer() {\n\t\treturn \"OVER HERE!!\";\n\t}", "public void print()\n\t{\n\t\tif(gameObj[1].size() > 0)\n\t\t{\n\t\t\tSystem.out.println(\"*********************Player Info*******************************\");\n\t\t\tSystem.out.println(\"[Lives: \" + lives + \"][Score: \" + score + \n\t\t\t\t\t\t\t\"][Time: \" + gameTime + \"]\");\n\t\t\tSystem.out.println(\"*********************Player Info*******************************\");\n\t\t}else\n\t\t\tSystem.out.println(\"Spawn a player ship to view game info\");\n\t}", "void playMatch() {\n while (!gameInformation.checkIfSomeoneWonGame() && gameInformation.roundsPlayed() < 3) {\n gameInformation.setMovesToZeroAfterSmallMatch();\n playSmallMatch();\n }\n String winner = gameInformation.getWinner();\n if(winner.equals(\"DRAW!\")){\n System.out.println(messageProvider.provideMessage(\"draw\"));\n }else {\n System.out.println(messageProvider.provideMessage(\"winner\")+\" \"+winner+\"!\");\n }\n }", "private void BlueEatsPlayer(Player player)\n {\n Player player_to_be_eaten = null;\n try\n {\n BluePlayer player_to_eat = (BluePlayer) player;\n player_to_be_eaten = checkIfEatsRedPlayer(player_to_eat);\n if (player_to_be_eaten == null)\n {\n player_to_be_eaten = checkIfEatsGreenPlayer(player_to_eat);\n if (player_to_be_eaten == null)\n {\n player_to_be_eaten = checkIfEatsYellowPlayer(player_to_eat);\n }\n }\n //player_to_be_eaten.println(\"blue_player_to_be_eaten\" + player_to_be_eaten.toString());\n if (player_to_be_eaten != null)\n {\n playPersonEatenMusic();\n returnPlayerHome(player_to_be_eaten);\n }\n }\n catch (Exception e)\n {\n \n }\n return;\n }", "public abstract void info(Player p);", "private void reportWinner (Player player) {\n System.out.println();\n System.out.println(\"Player \" + player.name() +\n \" wins.\");\n System.out.println();\n }", "private void RedEatsPlayer(Player player)\n {\n Player player_to_be_eaten = null;\n try\n {\n RedPlayer player_to_eat = (RedPlayer) player;\n player_to_be_eaten = checkIfEatsBluePlayer(player_to_eat);\n if (player_to_be_eaten == null)\n {\n player_to_be_eaten = checkIfEatsGreenPlayer(player_to_eat);\n if (player_to_be_eaten == null)\n {\n player_to_be_eaten = checkIfEatsYellowPlayer(player_to_eat);\n }\n }\n\n //player_to_be_eaten.println(\"red_player_to_be_eaten\" + player_to_be_eaten.toString());\n if (player_to_be_eaten != null)\n {\n playPersonEatenMusic();\n returnPlayerHome(player_to_be_eaten);\n }\n }\n catch (Exception e)\n {\n \n }\n return;\n }", "public void printPoliticCards(Player player);", "public void tellPlayerResult(int winner) {\n\t}", "SoccerPlayer find(Integer number);", "private String waitPrint(){return \"waiting for other players...\";}", "public void printAssistants(Player player);", "@Test\n public final void testPlayer1Win() {\n checkPlayerWin(player1);\n }", "@Override\r\n\tpublic void showGetPrisonCardMessage(Player player) {\n\t\t\r\n\t}", "void win(Player player);", "private void YellowEatsPlayer(Player player)\n {\n Player player_to_be_eaten = null;\n try\n {\n YellowPlayer player_to_eat = (YellowPlayer) player;\n player_to_be_eaten = checkIfEatsGreenPlayer(player_to_eat);\n if (player_to_be_eaten == null)\n {\n player_to_be_eaten = checkIfEatsBluePlayer(player_to_eat);\n if (player_to_be_eaten == null)\n {\n player_to_be_eaten = checkIfEatsRedPlayer(player_to_eat);\n }\n }\n //println(\"yellow_player_to_be_eaten=\" + player_to_be_eaten.toString());\n if (player_to_be_eaten != null)\n {\n playPersonEatenMusic();\n returnPlayerHome(player_to_be_eaten);\n }\n }\n catch (Exception e)\n {\n \n }\n return;\n }", "void printPlayersActionInfo(Player p) {\n }", "void gameWin(Player player);", "public void printPermitCards(Player player);", "private void sendMessagetoRespectivePlayer(int num) {\n Message msg1;\n if(flag == \"player1\"){\n prevP1 = num;\n int newPositionGroup = num / 10;\n if(winningHoleGroup == newPositionGroup){\n msg1 = p1Handler.obtainMessage(3);\n }\n else if((winningHoleGroup == newPositionGroup-1) || (winningHoleGroup == newPositionGroup+1)){\n msg1 = p1Handler.obtainMessage(4);\n }\n else{\n msg1 = p1Handler.obtainMessage(5);\n }\n p1Handler.sendMessage(msg1);\n }\n else{\n prevP2 = num;\n int newPositionGroup = num / 10;\n if(winningHoleGroup == newPositionGroup){\n msg1 = p2Handler.obtainMessage(3);\n }\n else if((winningHoleGroup == newPositionGroup-1) || (winningHoleGroup == newPositionGroup+1)){\n msg1 = p2Handler.obtainMessage(4);\n }\n else{\n msg1 = p2Handler.obtainMessage(5);\n }\n p2Handler.sendMessage(msg1);\n }\n }", "public Player isMatchWon(final String matchId) throws MatchNotFoundException {\r\n LOGGER.debug(\"--> isMatchWon: matchId=\" + matchId);\r\n Match match = getMatchById(matchId);\r\n Player player1 = match.getPlayer1();\r\n Player player2 = match.getPlayer2();\r\n int sunkBoatsP1 = countOfStatus(player1, FIELD_SUNK);\r\n int sunkBoatsP2 = countOfStatus(player2, FIELD_SUNK);\r\n if(sunkBoatsP1 == 30){\r\n return player2;\r\n }else if(sunkBoatsP2 == 30){\r\n return player1;\r\n } else {\r\n return null;\r\n }\r\n}", "void printWinner() {\n }", "static void look(Player player) {\n String stuff = player.getLocation().whatStuff();\n if (!stuff.equals(\"\")) {\n System.out.println(\"You see:\\n\" + stuff);\n }\n else {\n System.out.println(\"You see an empty room.\");\n }\n }", "pb4server.FindAllPlayerAskReq getFindAllPlayerAskReq();", "private void GreenEatsPlayer(Player player)\n {\n Player player_to_be_eaten = null;\n try\n {\n Player player_to_eat = player;\n player_to_be_eaten = checkIfEatsYellowPlayer(player_to_eat);\n if (player_to_be_eaten == null)\n {\n player_to_be_eaten = checkIfEatsBluePlayer(player_to_eat);\n if (player_to_be_eaten == null)\n {\n player_to_be_eaten = checkIfEatsRedPlayer(player_to_eat);\n }\n }\n //println(\"green_player_to_be_eaten=\" + player_to_be_eaten.toString());\n if (player_to_be_eaten != null)\n {\n playPersonEatenMusic();\n returnPlayerHome(player_to_be_eaten);\n }\n }\n catch (Exception e)\n {\n \n }\n return;\n }", "static void pickup(Player player, String what) {\n if (player.getLocation().contains(what)) {\n Thing thing = player.pickup(what);\n if (thing != null) {\n System.out.println(\"You now have \" + thing);\n }\n else {\n System.out.println(\"You can't carry that. You may need to drop something first.\");\n }\n }\n else {\n System.out.println(\"I don't see a \" + what);\n }\n }", "void robPlayer(HexLocation location, int victimIndex);", "@Test\n public void testGetOtherPlayer1Player() {\n Player p = new Player();\n List<Player> pL = new ArrayList<>();\n pL.add(p);\n Jeux j = new Jeux(ModeDeJeux.MONO_JOUEUR, pL);\n\n Player l = j.getOtherPlayer(p);\n\n assertEquals(\"Le player devrai etre le même\", p, l);\n }", "public void playerDetailedInfo(Player p){\n System.out.println(\"Indicator: \" + indicator + \"\\nJoker: \"+joker);\n System.out.println(\"Winner: Player\" + p.getPlayerNo());\n System.out.println(\"Tile size: \" + p.getTiles().size());\n System.out.println(\"Joker count: \" + p.getJokerCount());\n System.out.println(\"Double score: \" + p.getDoubleCount()*2);\n System.out.println(\"All tiles in ascending order:\\t\" + p.getTiles());\n System.out.println(\"Clustered according to number: \\t\" + p.getNoClus());\n System.out.println(\"Total number clustering score: \" + p.totalNoClustering());\n System.out.println(\"Clustered according to color: \\t\" + p.getColClus());\n System.out.println(\"Total color clustering score: \" + p.totalColCluster());\n System.out.println(\"Final score of Player\"+p.getPlayerNo()+\": \" + p.getPlayerScore());\n }", "private String run(String[] args) {\n\n\t\tif (args.length < 1) {\n\n\t\t\treturn match.getPlayerStatusReport();\n\t\t\t\n\t\t}\n\t\tif (args[0].equalsIgnoreCase(\"add\")) {\n\t\t\tif (args.length < 2)\n\t\t\t\treturn ERROR_COLOR + \"Specify player to add!\";\n\t\t\t\n\t\t\tString response = \"\";\n\t\t\t\n\t\t\tUhcPlayer pl = match.getPlayer(args[1]);\n\t\t\t\n\t\t\tif (!pl.isOnline())\n\t\t\t\tresponse += WARN_COLOR + \"Warning: adding a player who is not currently online\\n\";\n\n\t\t\t\n\t\t\t\n\t\t\tif (config.isFFA()) {\n\t\t\t\tif (!match.addSoloParticipant(pl))\n\t\t\t\t\treturn ERROR_COLOR + \"Failed to add player\";\n\t\t\t\t\n\t\t\t\treturn response + OK_COLOR + \"Player added\";\n\t\t\t} else {\n\t\t\t\tif (args.length < 3)\n\t\t\t\t\treturn ERROR_COLOR + \"Please specify the team! /players add NAME TEAM\";\n\t\t\t\tif (!match.addParticipant(pl, args[2]))\n\t\t\t\t\treturn ERROR_COLOR + \"Failed to add player \" + args[1] + \" to team \" + args[2];\n\t\t\t\t\n\t\t\t\treturn response + OK_COLOR + \"Player added\";\n\t\t\t}\n\t\t\t\t\n\t\t} else if (args[0].equalsIgnoreCase(\"addall\")) {\n\t\t\tif (!config.isFFA())\n\t\t\t\treturn ERROR_COLOR + \"Cannot auto-add players in a team match\";\n\t\t\t\n\t\t\tint added = 0;\n\t\t\tfor (UhcPlayer pl : match.getOnlinePlayers()) {\n\t\t\t\tif (!pl.isSpectator())\n\t\t\t\t\tif (match.addSoloParticipant(pl)) added++;\n\t\t\t}\n\t\t\tif (added > 0)\n\t\t\t\treturn \"\" + OK_COLOR + added + \" player\" + (added == 1? \"\" : \"s\") + \" added\";\n\t\t\telse\n\t\t\t\treturn ERROR_COLOR + \"No players to add!\";\n\t\t\t\n\t\t\t\n\t\t} else if (args[0].equalsIgnoreCase(\"remove\") || args[0].equalsIgnoreCase(\"rm\")) {\n\t\t\tif (args.length < 2)\n\t\t\t\treturn ERROR_COLOR + \"Specify player to remove!\";\n\t\t\tif (!match.removeParticipant(args[1]))\n\t\t\t\treturn ERROR_COLOR + \"Player could not be removed!\";\n\n\t\t\treturn OK_COLOR + \"Player removed\";\n\t\t}\n\t\treturn null;\n\t}", "public static void checkResult() {\n\t\tint sum = PlayerBean.PLAYERONE - PlayerBean.PLAYERTWO;\n\n\t\tif (sum == 1 || sum == -2) {\n\t\t\tScoreBean.addWin();\n\t\t\tresult = \"player one wins\";\n\t\t} else {\n\t\t\tScoreBean.addLoss();\n\t\t\tresult = \"player two wins\";\n\t\t}\n\t}", "public void act()\r\n {\r\n if(worldTimer == 1)\r\n {\r\n if(wildPokemon)\r\n {\r\n textInfoBox.displayText(\"Wild \" + enemyPokemon.getName() + \" appeared!\", true, false);\r\n }\r\n else\r\n {\r\n textInfoBox.displayText(\"Enemy trainer sent out \" + enemyPokemon.getName() + \"!\", true, false);\r\n }\r\n textInfoBox.displayText(\"Go \" + playerPokemon.getName() + \"!\", true, false);\r\n textInfoBox.updateImage();\r\n\r\n worldTimer++;\r\n }\r\n else if(worldTimer == 0)\r\n {\r\n worldTimer++;\r\n }\r\n\r\n if(getObjects(Pokemon.class).size() < 2)\r\n {\r\n ArrayList<Pokemon> pokemon = (ArrayList<Pokemon>) getObjects(Pokemon.class);\r\n for(Pokemon pkmn : pokemon)\r\n {\r\n if(pkmn.getIsPlayers() == true)\r\n {\r\n textInfoBox.displayText(\"Enemy \" + enemyPokemonName.toUpperCase() + \" fainted!\", true, false);\r\n\r\n int expGain = StatCalculator.experienceGainCalc(playerPokemon.getName(), playerPokemon.getLevel());\r\n textInfoBox.displayText(playerPokemon.getName().toUpperCase() + \" gained \" + expGain + \"\\nEXP. Points!\", true, false);\r\n playerPokemon.addEXP(expGain);\r\n if(playerPokemon.getCurrentExperience() >= StatCalculator.experienceToNextLevel(playerPokemon.getLevel()))\r\n {\r\n int newEXP = playerPokemon.getCurrentExperience() - StatCalculator.experienceToNextLevel(playerPokemon.getLevel());\r\n playerPokemon.setEXP(newEXP);\r\n playerPokemon.levelUp();\r\n playerPokemon.newPokemonMoves();\r\n\r\n textInfoBox.displayText(playerPokemonName.toUpperCase() + \" grew to level \" + playerPokemon.getLevel() + \"!\", true, false);\r\n }\r\n savePokemonData(playerPokemon, currentPlayerPokemon);\r\n\r\n textInfoBox.updateImage();\r\n isPlayersTurn = true;\r\n battleOver();\r\n }\r\n else\r\n {\r\n textInfoBox.displayText(playerPokemonName.toUpperCase() + \" fainted!\", true, false);\r\n\r\n String playerName = Reader.readStringFromFile(\"gameInformation\", 0, 0);\r\n textInfoBox.displayText(playerName + \" blacked out!\", true, false);\r\n\r\n addObject(new Blackout(\"Fade\"), getWidth() / 2, getHeight() / 2);\r\n removeAllObjects();\r\n\r\n String newWorld = Reader.readStringFromFile(\"gameInformation\", 0, 4);\r\n int newX = Reader.readIntFromFile(\"gameInformation\", 0, 5);\r\n int newY = Reader.readIntFromFile(\"gameInformation\", 0, 6);\r\n\r\n GameWorld gameWorld = new GameWorld(newWorld, newX, newY, \"Down\");\r\n gameWorld.healPokemon();\r\n Greenfoot.setWorld(gameWorld);\r\n\r\n isPlayersTurn = true;\r\n battleOver();\r\n }\r\n }\r\n } \r\n\r\n if(isBattleOver)\r\n {\r\n isPlayersTurn = true;\r\n savePokemonData(playerPokemon, currentPlayerPokemon);\r\n newGameWorld();\r\n }\r\n }", "public void welcomePlayer(Player p);", "public void getScores(){\n String p1 = \"Player 1 has \" + Integer.toString(player1.getWins());\n String p2 = \"Player 2 has \" + Integer.toString(player2.getWins());\n String winner = \"tie\";\n if(player1.getWins()>player2.getWins()){\n winner = player1.getName() + \" wins!!!!\";\n }\n else if(player2.getWins()>player1.getWins()){\n winner = player2.getName() + \" Wins!!!\";\n }\n JOptionPane.showMessageDialog(null, (p1 + \"\\n\" + p2 + \"\\n\" + winner));\n }", "public void displayWinner(Player player) {\n System.out.println(\"Partie terminée !\");\n System.out.println(player.getPlayerName()+\" remporte la partie avec les billes \"+player.getColor().toString(true));\n System.out.println(\"――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――\");\n }", "private static void checkForKnockout()\n\t{\n\t\tif (playerOneHealth <= 0 && opponentHealth <= 0)\n\t\t{\n\t\t\tSystem.out.println(playerOneName + \" and \" + opponentName + \" both go down for the count!\");\n\t\t\t\n\t\t\t// Prints one to ten because fighter is knocked out\n\t\t\tfor (int i = 1; i <= 10; i++)\n\t\t\t{\n\t\t\t\tif (i < 6) System.out.println(i);\n\t\t\t\telse System.out.println(i + \"!\");\n\t\t\n\t\t\t\t// Delays count – from StackOverflow\n\t\t\t\ttry \n\t\t\t\t{\n\t\t\t\t\tThread.sleep(500);\n\t\t\t\t} \n\t\t\t\tcatch (InterruptedException e) \n\t\t\t\t{\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.println(\"\\n*DING* *DING* *DING* The match is over in round number \" + roundNumber + \"!!\\n\" + playerOneName + \" and \" + opponentName + \" knocked each other out at the same time.\\nWhat a weird ending!!!\");\n\t\t}\n\t\n\t\t// Check if Player One Lost\n\t\telse if (playerOneHealth <= 0)\n\t\t{\n\t\t\t// Prints one to ten because player one is knocked out\n\t\t\tSystem.out.println(playerOneName + \" is down for the count!\");\n\t\t\tfor (int i = 1; i <= 10; i++)\n\t\t\t{\n\t\t\t\tif (i < 6) System.out.println(i);\n\t\t\t\telse System.out.println(i + \"!\");\n\t\t\t\n\t\t\t\t// Delays count – from StackOverflow\n\t\t\t\ttry \n\t\t\t\t{\n\t\t\t\t\tThread.sleep(500);\n\t\t\t\t} \n\t\t\t\tcatch (InterruptedException exception) \n\t\t\t\t{\n\t\t\t\t\texception.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// Game Over\n\t\t\tSystem.out.println(\"\\n*DING* *DING* *DING* The match is over in round number \" + roundNumber + \"!!\\n\" + playerOneName + \" was knocked out, and \" + opponentName + \" still had \" + opponentHealth + \" health left. \\nBetter luck next time player one!!!\");\n\t\t}\n\t\n\t\t// Check if Player Two Lost\n\t\telse if (opponentHealth <= 0)\n\t\t{\n\t\t\tSystem.out.println(opponentName + \" is down for the count!\");\n\n\t\t\t// Prints one to ten because fighter is knocked out\n\t\t\tfor (int i = 1; i <= 10; i++)\n\t\t\t{\n\t\t\t\tif(i < 6)System.out.println(i);\n\t\t\t\telse System.out.println(i + \"!\");\n\t\t\t\n\t\t\t\ttry \n\t\t\t\t{\n\t\t\t\t\tThread.sleep(500);\n\t\t\t\t} \n\t\t\t\tcatch (InterruptedException exception) \n\t\t\t\t{\n\t\t\t\t\texception.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\n\t\t\t// Game Over\n\t\t\tSystem.out.println(\"\\n*DING* *DING* *DING* The match is over in round number \" + roundNumber + \"!! \\n\" + opponentName + \" was knocked out, and \" + playerOneName + \" still had \" + playerOneHealth + \" health left.\\nCONGRATULATIONS PLAYER ONE!!!\");\n\t\t}\n\t}", "@Test\n public void testGetOtherPlayer2Player() {\n Player p = new Player();\n Player p2 = new Player();\n List<Player> pL = new ArrayList<>();\n pL.add(p);\n pL.add(p2);\n Jeux j = new Jeux(ModeDeJeux.MONO_JOUEUR, pL);\n\n Player l = j.getOtherPlayer(p);\n\n assertEquals(\"Le player ne devrai pas etre le même que celui mis dans la fonction\", p2, l);\n }", "boolean hasPlayer(String player);", "@Test\n public final void testPlayer2Win() {\n checkPlayerWin(player2);\n }", "@Override\n\tpublic void tellPlayer(String message) {\n\t\tSystem.out.println(message);\n\t}", "@Override\r\n public void processMessage(INTENT intent, Object... parameters) {\n if(parameters[0] instanceof UUID){\r\n Entity e = EntityManager.getInstance().getEntity((UUID)parameters[0]);\r\n if(e.has(TeamComponent.class)){\r\n teamCaptures[e.get(TeamComponent.class).getTeamNumber() - 1]++;\r\n System.out.println(e.getName() + \" captured the flag for TEAM \" + e.get(TeamComponent.class).getTeamNumber() +\r\n \"\\r\\n\" + \"The score is \" + Arrays.toString(teamCaptures));\r\n if(numCaps == teamCaptures[e.get(TeamComponent.class).getTeamNumber() -1]){\r\n System.out.println(\"******************** WINNER WINNER CHICKEN DINNER ********************\");\r\n MessageManager.getInstance().addMessage(INTENT.WIN_COND_MET);\r\n }\r\n }else{\r\n //requires team component\r\n return;\r\n }\r\n }\r\n }", "private static Player getThroughWhomSendMessage() {\n\t\treturn Remain.getOnlinePlayers().isEmpty() ? null : Remain.getOnlinePlayers().iterator().next();\n\t}", "public String toString() {\n\t\treturn \"player \" + player.id + \"\\n\";\n\t}", "static String look(Player player) {\n String stuff = player.getLocation().whatStuff();\n if (!stuff.equals(\"\")) {\n if(player.getLocation().contains(\"Charlie McDowell\")){\n return \"-You hear the sound of typing echoing throughout room...\\n\" +\n \"Charlie Bot: Oh my word is that...is that ME? It seems that the mysterious intruder was\\n\" +\n \"simply a robotic copy of myself. On the other hand, I see the transmitter, 525!\\n\" +\n \"However, it appears that it has fallen into the intruder's clutches.\\n\" +\n \"More specifically, it seems to be in his back pocket.\\n\" +\n \"Great. He looks like an ordinary human, but I would brace yourself for battle, 525.\\n\\n\" +\n \"He hasn't noticed you...arm yourself and attempt to take the transmitter from him.\\n\\n\" +\n \"-You see:\\n\" + stuff;\n } else {\n return \"-You see:\\n\" + stuff;\n }\n } else {\n return \"The room is empty.\";\n }\n }", "private void extractParseWithObjectId(String selected_Object_id) {\n ParseQuery<ParseObject> query = ParseQuery.getQuery(\"Match\");\n query.getInBackground(selected_Object_id, new GetCallback<ParseObject>() {\n public void done(ParseObject object, ParseException e) {\n if (e == null) {\n System.out.println(\"Object has been found!!\");\n System.out.println(object.get(\"FromPlayer\"));\n SMA_FromPlayer.setText(object.get(\"FromPlayerToDisp\").toString());\n SMA_ToPlayer.setText(object.get(\"ToPlayerToDisp\").toString());\n SMA_Time.setText(object.get(\"Time\").toString());\n SMA_Location.setText(object.get(\"Location\").toString());\n if (object.get(\"Status\").toString().equals(\"Pending\")) {\n SMA_Label_Pending.setVisibility(View.VISIBLE);\n }\n\n } else {\n System.out.println(\"Object has not been found!!\");\n }\n }\n });\n }", "public void mainkan(){\n System.out.println();\n //System.out.printf(\"Waktu: %1.2f\\n\", this.oPlayer.getWaktu());\n System.out.println(\"Nama : \" + this.oPlayer.nama);\n System.out.println(\"Senjata : \" + this.oPlayer.getNamaSenjataDigunakan());\n System.out.println(\"Kesehatan : \" + this.oPlayer.getKesehatan());\n// System.out.println(\"Daftar Efek : \" + this.oPlayer.getDaftarEfekDiri());\n System.out.println(\"Nama Tempat : \" + this.namaTempat);\n System.out.println(\"Narasi : \" + this.narasi);\n }", "public void presentPlayer( CoinFlipper theHandle, String theName );", "String getPlayer();", "public void displayPlayerWinnings()\n {\n for(int card = 0; card < playerCardsWon; card++)\n {\n System.out.println(playerWinnings[card].toString());\n }\n }", "void sendPacketToPlayer(Player player, Object packet);", "public void receiveMessage(String line)\n \t{\n \t\t\tString[] msg = line.split(\" \", 4);\n \t\t\tString user = \"#UFPT\";\n \n \t\t\t//this is kind of a nasty solution...\n \n \t\t\tif(msg[0].indexOf(\"!\")>1)\n \t\t\t\tuser = msg[0].substring(1,msg[0].indexOf(\"!\"));\n \t\t\t\n \t\t\tPlayer temp = new Player(user);\n \t\t\tint index = players.indexOf(temp);\n \t\t\t\n \t\t\tString destination = msg[2];\n \t\t\tString command = msg[3].toLowerCase();\n \t\t\tif(command.equalsIgnoreCase(\":!start\"))\n \t\t\t{\n \t\t\t\tif(user.equals(startName))\t\t\n \t\t\t\t{\n \t\t\t\t\tinputThread.sendMessage(destination, \"The game has begun!\");\n\t\t\t\t\treturn;\n \t\t\t\t}\n \t\t\t\telse\n \t\t\t\t\tinputThread.sendMessage(destination, \"Only \" + startName + \" can start the game!\");\n \t\t\t}\t\n \t\t\tif(command.equalsIgnoreCase(\":!join\"))\n \t\t\t{\n \t\t\t\tSystem.out.println(index);\n \t\t\t\tif(index == -1)\n \t\t\t\t{\n \t\t\t\t\tplayers.add(new Player(user));\n \t\t\t\t\tinputThread.sendMessage(destination, user + \" has joined the game!\");\n \t\t\t\t}\n \t\t\t\telse\n \t\t\t\t\tinputThread.sendMessage(destination, user + \" has already joined the game!\");\n \t\t\t}\n \t\t\t\n \t\t\tif(command.equalsIgnoreCase(\":!quit\"))\n \t\t\t{\n \t\t\t\tSystem.out.println(index);\n \t\t\t\tif(index == -1)\n \t\t\t\t\tinputThread.sendMessage(destination, user + \" is not part of the game!\");\n \t\t\t\telse\n \t\t\t\t{\n \t\t\t\t\tplayers.remove(index);\n \t\t\t\t\tinputThread.sendMessage(destination, user + \" has quit the game!\");\n \t\t\t\t}\n \t\t\t\t\n \t\t\t}\t\n \t\t\t\n \t\t\tif (command.equalsIgnoreCase(\":!end\"))\n \t\t\t{\n \t\t\t\tif (user.equals(startName))\n \t\t\t\t{\n \t\t\t\t\tinputThread.sendMessage(destination, user + \" has ended the game. Aww :(\");\n \t\t\t\t\treturn;\n \t\t\t\t\t//does this acceptably end the game? I think so but not positive\n \t\t\t\t}\n \t\t\t\telse\n \t\t\t\t\tinputThread.sendMessage(destination, \"Only \" + startName + \" can end the game!\");\n \t\t\t}\n\t\t\n\t\n \t\n \t\t//assigning roles\n \t\tint numMafia = players.size()/3;\n \t\t//create the Mafia team\n \t\tfor(int a = 0; a < numMafia; ++a)\n \t\t{\n \t\t\tmafiaRoles.add(new Mafia(new MafiaTeam()));\n \t\t}\n \t\t\n \t\t//create the Town team\n \t\tfor(int a = 0; a < (players.size() - numMafia); ++a)\n \t\t{\n \t\t\ttownRoles.add(new Citizen(new Town()));\n \t\t}\n \t\tCollections.shuffle(mafiaRoles);\n \t\tCollections.shuffle(townRoles);\n \t\tfor(int a = 0; a < numMafia; ++a)\n \t\t{\n \t\t\troles.add(mafiaRoles.get(a));\n \t\t}\n \t\tfor(int a = 0; a < players.size() - numMafia; ++a)\n \t\t{\n \t\t\troles.add(townRoles.get(a));\n \t\t}\n \t\tfor(int a = 0; a < players.size(); ++a)\n \t\t{\n \t\t\tplayers.get(a).role = roles.get(a);\n \t\t\tinputThread.sendMessage(players.get(a).name, \"your role is \" + roles.get(a).name);\n \t\t}\n \t\t\n \t\t//TODO tell game that a day or night needs to start? should this method have a return type?\n \t\t\n \t}", "static void startMatch()\n {\n // suggests that we should first use the pokedex menu\n if (Player.current.pokedex.isEmpty())\n {\n System.out.println(\"\\nYou have no pokemon to enter the match with kid. Use your pokedex and get some pokemon first.\");\n pause();\n return;\n }\n\n // print stuff\n clrscr();\n System.out.println(title());\n\n // print more stuff\n System.out.println(Player.opponent.name.toUpperCase() + \" IS PREPARING HIS POKEMON FOR BATTLE!\");\n \n // initialises the opponent logic - pokemon often enter evolved states\n Pokemon two = Opponent.init();\n\n System.out.println(\"\\n\"\n + Player.opponent.name.toUpperCase() + \" HAS CHOSEN \" + two +\"\\n\"\n + Player.current.name.toUpperCase() + \"! CHOOSE A POKEMON!!\");\n\n // displays the list of pokemon available for battle\n Player.current.showNamesPokedex();\n System.out.print(\"Gimme an index (Or type anything else to return)! \");\n int option = input.hasNextInt()? input.nextInt() - 1 : Player.current.pokedex.size();\n\n // sends back to mainMenu if option is out of bounds \n if (option >= Player.current.pokedex.size() || option < 0)\n {\n mainMenu();\n }\n\n // definitions, aliases for the two combatting pokemon\n Pokemon one = Player.current.pokedex.get(option);\n Pokemon.Move oneMove1 = one.listMoves.get(0);\n Pokemon.Move oneMove2 = one.listMoves.get(1);\n\n // if there's a bit of confusion regarding why two pokemon have the same nickname ...\n if (one.nickname.equals(two.nickname))\n System.out.println(one.nickname.toUpperCase() + \" vs ... \" + two.nickname.toUpperCase() + \"?? Okey-dokey, LET'S RUMBLE!!\");\n else // ... handle it\n System.out.println(one.nickname.toUpperCase() + \" vs \" + two.nickname.toUpperCase() + \"!! LET'S RUMBLE!!\");\n\n pause();\n clrscr();\n\n // Battle start!\n Pokemon winner = new Pokemon();\n // never give up!\n // unless it's addiction to narcotics \n boolean giveUp = false;\n while (one.getHp() > 0 && two.getHp() > 0 && !giveUp)\n {\n // returns stats of the pokemon\n System.out.println(\"\\nBATTLE STATS\\n\" + one + \"\\n\" + two);\n\n // 30% chance dictates whether the pokemon recover in a battle, but naturally so\n if (random.nextInt(101) + 1 < 30 && one.getHp() < one.maxHp)\n ++one.hp;\n\n if (random.nextInt(101) + 1 < 30 && two.getHp() < two.maxHp)\n ++two.hp;\n\n // the in-game selection menu\n System.out.print(\"\\n\"\n + Player.current.name.toUpperCase() + \"! WHAT WILL YOU HAVE \" + one.getFullName().toUpperCase() + \" DO?\\n\"\n + \"(a) Attack\\n\"\n + (oneMove1.isUsable? \"(1) Use \" + oneMove1.name.toUpperCase() + \"\\n\" : \"\")\n + (oneMove2.isUsable? \"(2) Use \" + oneMove2.name.toUpperCase() + \"\\n\" : \"\")\n + \"(f) Flee\\n\"\n + \"Enter the index from the brackets (E.g. (a) -> 'A' key): \");\n\n char choice = input.hasNext(\"[aAfF12]\")? input.next().charAt(0) : 'a';\n\n // a switch to handle the options supplied\n switch (choice)\n {\n case 'a': case 'A': default:\n one.attack(two);\n break;\n\n case 'f': case 'F':\n winner = two;\n giveUp = true;\n break;\n\n case '1':\n one.attack(two, oneMove1.name);\n break;\n\n case '2':\n one.attack(two, oneMove2.name);\n break;\n }\n\n // Opponent's turn, always second\n pause();\n clrscr();\n\n System.out.println(\"\\nBATTLE STATS\\n\" + one + \"\\n\" + two);\n Opponent.fight(one);\n pause();\n clrscr();\n }\n\n // find out the winner from combat or withdrawal\n winner = giveUp? two : one.getHp() > 0? one : two;\n System.out.println(\"\\nWINNER: \" + winner.getFullName() + \" of \" + winner.owner.name + \"!\\n\");\n\n if (winner == one)\n {\n // register the victory\n Player.current.gems += 100;\n System.out.println(\"You got 100 gems as a reward!\\n\");\n ++Player.current.wins;\n }\n else\n {\n // register the defeat\n ++Player.current.losses;\n System.out.println(\"Tough luck. Do not be worried! There's always a next time!\\n\");\n }\n\n pause();\n }", "public void printAllPlayers(){\n for (Player player : players){\n player.printPlayerInfo();\n }\n }", "protected void info(String token, TextToken<BasicTextTokenType> object) {\n switch (object.getType()){\n case INVENTORY:\n if (player.getInventory().isEmpty()) {\n output.println(\"You have nothing in your inventory\");\n } else {\n output.println(player.inventoryOverview());\n }\n break;\n case MONEY:\n output.println(player.getMoney());\n break;\n case HEALTH:// this is used to for displaying the entire dictionary of the game\n String out = \"Here are all words in the system's current syntax: \";\n Set<String> words = gameData.getDictionary();\n for(String s : words) {\n if(!s.equals(\"\")) {\n out = out.concat(s).concat(\", \");\n }\n }\n out = out.substring(0, out.length() - 2);\n out = out.concat(\".\");\n output.println(out);\n break;\n case MAX_HEALTH:\n output.println(player.getMaxHealth());\n break;\n default:\n output.println(\"Nothing by that name was found\");\n }\n\n }", "private void reportPlay (Player player) {\n System.out.println(\"Player \" + player.name() +\n \" takes \" + player.numberTaken() +\n \" stick(s), leaving \" + game.sticksLeft()\n + \".\");\n }", "public void logGameWinner(Player p){\n\t\t\n\t\tif(p instanceof HumanPlayer) {\n\t\t\tlog += String.format(\"%nUSER WINS GAME\");\n\t\t\twinName =\"Human\";\n\t\t}\n\t\telse\n\t\t{\n\t\t\tAIPlayer ai = (AIPlayer) p;\n\t\t\tlog += String.format(\"%n%s WINS GAME\", ai.getName().toUpperCase());\n\t\t\twinName = ai.getName();\n\t\t}\n\t\tlineBreak();\n\t}", "@Override\r\n public String toString(){\n \r\n for(Player player: players){\r\n if(player == null){\r\n continue;\r\n }\r\n System.out.println(player.toString());\r\n }\r\n return \"\";\r\n }", "public static void main(String[] args) throws IOException \r\n\t{\n\t\tString bowlerName = null;\r\n\t\tString wicket;\r\n\t\tString name;\r\n\t\tint wicketCount = 0;\r\n\t\tString ans,ans1;\r\n\t\tPlayer p=new Player(bowlerName, wicketCount);\r\n\t\tHashMap<String, Integer> hmap=new HashMap<String, Integer>();\r\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\r\n\t\tdo\r\n\t\t{\r\n\t\tSystem.out.println(\"Enter the player name\");\r\n\t\tbowlerName=br.readLine();\r\n\t\tSystem.out.println(\"Enter wickets - seperated by \\\"|\\\" symbol.\");\r\n\t\twicket=br.readLine();\r\n\t\tString[] arr=wicket.split(\"\\\\|\");\r\n\t\twicketCount=arr.length;\r\n\t\tSystem.out.println(\"Do you want to add another player (yes/no)\");\r\n\t\tans=br.readLine();\r\n\t\thmap.put(bowlerName, wicketCount);\r\n\t\t}\r\n\t\twhile(ans.equalsIgnoreCase(\"yes\"));\r\n\t\tdo\r\n\t\t{\r\n\t\tSystem.out.println(\"Enter the player name to search\");\r\n\t\tname=br.readLine();\r\n\t\tif(hmap.containsKey(name))\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Player name : \"+name);\r\n\t\t\tSystem.out.println(\"Wicket Count : \"+hmap.getOrDefault(name, wicketCount));\r\n\t\t}\r\n\t\telse\r\n\t\t\tSystem.out.println(\"No player found with the name \"+name);\r\n\t\tSystem.out.println(\"Do you want to search another player (yes/no)\");\r\n\t\tans1=br.readLine();\r\n\t\t}\r\n\t\twhile(ans1.equalsIgnoreCase(\"yes\"));\r\n\t}", "@Override\n public String getMessage(int player) {\n if (player == 0) {\n return \"Player\";\n }\n return \"CPU\";\n }", "public void playerLost()\r\n {\r\n \r\n }", "private static void print(Object msg){\n if (WAMClient.Debug){\n System.out.println(msg);\n }\n\n }", "@Override\r\n//displays the property of defensive players to console\r\npublic String toString() {\r\n\t\r\n\tdouble feet = getHeight()/12;\r\n\tdouble inches = getHeight()%12;\r\n\t\r\n\treturn \"\\n\" + \"\\nDefensive Player: \\n\" + getName() \r\n\t+ \"\\nCollege: \" + getCollege() \r\n\t+ \"\\nHighschool: \" + getHighschool() \r\n\t+ \"\\nAge: \" + getAge() \r\n\t+ \"\\nWeight: \" + getWeight() \r\n\t+ \"\\nHeight: \" + feet + \" ft\" + \" \" + inches + \" in\" \r\n\t+ \"\\nTeam Number: \" + getNumber() \r\n\t+ \"\\nExperience: \" + getExperience()\r\n\t+ \"\\nTeam: \" + getTeam() \r\n\t+ \"\\nPosition: \" +getPosition() \r\n\t+ \"\\nTackles : \" + getTackles() \r\n\t+ \"\\nSacks: \" +getSacks() \r\n\t+ \"\\nInterceptions: \" + getInterceptions();\r\n}", "public static void main(String[] args) \n {\n BaseballStats player1 = new BaseballStats(\"Daeho Kim\",\"Giants\"); \n FootballStats player2 = new FootballStats(\"Doug Baldwin\",\"Seahawks\"); \n \n player1.score();\n player1.hit();\n player1.setError();\n player1.hit();\n player2.score();\n player2.gainYard(10);\n \n System.out.println(player1);\n System.out.println(player2);\n }", "void sendPacket(Player player, Object packet);", "private void displayMsg(Object o) {\n Message msg = ((Datapacket)o).getMsg();\n client.printMessage(msg);\n }", "protected boolean findObject(Object obj){\n \n }", "public static void main(String[] args) {\n String player1 = displayHighScorePosition(\"aldi\") + calculateHighScorePosition(1500);\n System.out.println(player1);\n\n String player2 = displayHighScorePosition(\"nana\") + calculateHighScorePosition(900);\n System.out.println(player2);\n\n String player3 = displayHighScorePosition(\"muhrim\") + calculateHighScorePosition(400);\n System.out.println(player3);\n\n String player4 = displayHighScorePosition(\"ununu\") + calculateHighScorePosition(50);\n System.out.println(player4);\n\n }", "void oppInCheck(Piece[] B,Player J2,boolean moveFound);", "@Test(timeout = 4000)\n public void test15() throws Throwable {\n FileSystemHandling.shouldThrowIOException((EvoSuiteFile) null);\n Player player0 = new Player(4906);\n FileSystemHandling.appendLineToFile((EvoSuiteFile) null, \"Qw_WlDP-TE\");\n Player player1 = new Player((short)4919);\n player0.setJoinOK(player1, false);\n boolean boolean0 = player0.isJoinOK(player1, false);\n assertTrue(boolean0);\n assertEquals(0L, player1.getTimeOfDeath());\n assertFalse(player1.isDead());\n assertEquals(10.0F, player1.getX(), 0.01F);\n assertTrue(player1.isConnected());\n assertEquals(0.0F, player1.getY(), 0.01F);\n assertEquals(1, player1.getStrength());\n assertEquals(0, player1.getPictureId());\n assertEquals(\"Player4919\", player1.toString());\n assertEquals(\"0.0.0.0\", player1.getIP());\n }", "@Override\n protected String checkIfGameOver() {\n if(pgs.getP0Score() >= 50){\n return playerNames[0] + \" \" + pgs.getP0Score();\n }else if(pgs.getP1score() >= 50){\n return playerNames[1] + \" \" + pgs.getP1score();\n }\n\n return null;\n }", "public static void main(String[] args) \n {\n \n Team j = new Team(\"SaPKo\"); \n Player p = new Player(\"Sasf\"); \n Player a = new Player (\"gds\");\n Player s = new Player (\"asjkdh\");\n j.addPlayer(p);\n j.addPlayer(a);\n j.addPlayer(s);\n \n// System.out.println(\"array size: \" + j.getArraySize());\n \n j.printPlayers();\n }", "public void showResult(NimPlayer player1, NimPlayer player2) {\n String g1 = \"game\";\n String g2 = \"game\";\n\n // check the sigular\n if (player1.getWinTimes() >= 2) {\n g1 = \"games\";\n }\n if (player2.getWinTimes() >= 2) {\n g2 = \"games\";\n }\n System.out.println(player1.getName() + \" won \" +\n player1.getWinTimes() + \" \" + g1 + \" out of \" +\n player1.getTotalTimes() + \" played\");\n System.out.println(player2.getName() + \" won \" +\n player2.getWinTimes() + \" \" + g2 + \" out of \" +\n player2.getTotalTimes() + \" played\");\n }", "void fireShellAtOpponent(int playerNr);", "public String getPlayerName() {\n/* 100 */ return this.scorePlayerName;\n/* */ }", "public void OnPlayer(Joueur joueur);", "private Player checkIfEatsRedPlayer(Player player)\n {\n int x_cord = getMidPoint(player.x_cordinate);//player.x_cordinate;\n int y_cord = getMidPoint(player.y_cordinate);//player.y_cordinate;\n int redx1 = getMidPoint(getRed_player1().x_cordinate);\n int redx2 = getMidPoint(getRed_player2().x_cordinate);\n int redx3 = getMidPoint(getRed_player3().x_cordinate);\n int redx4 = getMidPoint(getRed_player4().x_cordinate);\n int redy1 = getMidPoint(getRed_player1().y_cordinate);\n int redy2 = getMidPoint(getRed_player2().y_cordinate);\n int redy3 = getMidPoint(getRed_player3().y_cordinate);\n int redy4 = getMidPoint(getRed_player4().y_cordinate);\n if (collisionDetection(x_cord, y_cord, redx1, redy1) == 1)\n {\n return getRed_player1();\n }\n else if (collisionDetection(x_cord, y_cord, redx2, redy2) == 1)\n {\n return getRed_player2();\n }\n else if (collisionDetection(x_cord, y_cord, redx3, redy3) == 1)\n {\n return getRed_player3();\n }\n else if (collisionDetection(x_cord, y_cord, redx4, redy4) == 1)\n {\n return getRed_player4();\n }\n else\n {\n return null;\n }\n }", "public void testLang(){\n\t\tSystem.out.println(\"Player Num: \" + player.getNum());\n//\t\tSystem.out.println(\"Diplayed na^^\");\n\t}", "@Test(timeout = 4000)\n public void test14() throws Throwable {\n FileSystemHandling.shouldThrowIOException((EvoSuiteFile) null);\n Player player0 = new Player(4906);\n FileSystemHandling.appendLineToFile((EvoSuiteFile) null, \"Qw_WlDP-TE\");\n Player player1 = new Player(4906);\n Player player2 = new Player((-1098));\n player0.setJoinOK(player2, false);\n player1.setJoinOK(player0, true);\n player0.isJoinOK(player2, true);\n System.setCurrentTimeMillis(4906);\n }", "@Test\n public void testWhoIsOnTurn() {\n Assertions.assertEquals('O', GameUtil.whoIsOnTurn(0), \"Test - 0 returns player O\");\n Assertions.assertEquals('X', GameUtil.whoIsOnTurn(1), \"Test - 1 returns player X\");\n Assertions.assertEquals('O', GameUtil.whoIsOnTurn(2), \"Test - 2 returns player O\");\n Assertions.assertEquals('X', GameUtil.whoIsOnTurn(3), \"Test - 3 returns player X\");\n Assertions.assertEquals('O', GameUtil.whoIsOnTurn(4), \"Test - 4 returns player O\");\n Assertions.assertEquals('X', GameUtil.whoIsOnTurn(5), \"Test - 5 returns player X\");\n Assertions.assertEquals('O', GameUtil.whoIsOnTurn(6), \"Test - 6 returns player O\");\n Assertions.assertEquals('X', GameUtil.whoIsOnTurn(7), \"Test - 7 returns player X\");\n Assertions.assertEquals('O', GameUtil.whoIsOnTurn(8), \"Test - 8 returns player O\");\n }", "public static void printf(ArrayList<Vkladi> foundVkladi) {\r\n\r\n\t\tfor (Vkladi s : foundVkladi) {\r\n\t\t\tif (s != null) {\r\n\t\t\t\tSystem.out.println(\"Vklad : \" + s.getId() + \" \" + s.getMoney() + \"$ \" + s.getProcent() + \"%\"\r\n\t\t\t\t\t\t+ \" Pribil \" + s.getPribil() + \"$\" + \" \" + s.getStat());\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public PlayerMatches(String player1) {\n this.player1 = player1;\n }", "public void examine (Player player) {\n\t\tString desc = getType().getDescription()+\" (id=\"+id+\", amount=\"+amount+\")\";\n\t\tplayer.getDispatcher().sendGameMessage(desc);\n\t\tint value = Virtue.getInstance().getExchange().lookupPrice(id);\n\t\tif (value != -1) {\n\t\t\tplayer.getDispatcher().sendGameMessage(\"This item is worth: \"+StringUtility.formatNumber(value)\n\t\t\t\t\t+\"gp on the Grand Exchange.\");\n\t\t}\n\t}", "public Player performShot(String currentPlayerId, Match match, Box boxShot, boolean showShips) {\r\n LOGGER.debug(\"--> performShot: match=\" + match + \", box=\" + boxShot);\r\n\r\n Player currentPlayer = match.getPlayerById(currentPlayerId);\r\n Player opponentPlayer = match.getOpponent(currentPlayer);\r\n\r\n GameField opponentGameField = JsonConverter.convertStringToGamefield(opponentPlayer.getGamefield());\r\n GameField currentGameField = JsonConverter.convertStringToGamefield(currentPlayer.getGamefield());\r\n\r\n Box fieldBox = opponentGameField.getBox(boxShot.getId());\r\n if (fieldBox.getContent().getId() != null) {\r\n\r\n LOGGER.info(\"Treffer! -> \" + fieldBox.getContent());\r\n fieldBox.setStatus(BoxStatus.FIELD_HIT);\r\n updateOpponentPlayerAfterShot(opponentPlayer, opponentGameField);\r\n sendUpdateMessage(currentPlayer,opponentPlayer,currentGameField,opponentGameField, showShips);\r\n\r\n if(isShipSunk(getFieldsOfShip(opponentGameField, fieldBox))){\r\n updateOpponentPlayerAfterShot(opponentPlayer, opponentGameField);\r\n sendUpdateMessage(currentPlayer,opponentPlayer,currentGameField,opponentGameField, showShips);\r\n }\r\n\r\n } else {\r\n fieldBox.setStatus(BoxStatus.FIELD_SHOT);\r\n LOGGER.info(\"daneben :/\");\r\n\r\n updateOpponentPlayerAfterShot(opponentPlayer, opponentGameField);\r\n sendUpdateMessage(currentPlayer,opponentPlayer,currentGameField,opponentGameField, showShips);\r\n }\r\n\r\n\r\n //finally increase shot counter:\r\n increaseShotCounter(match); \r\n \r\n String matchID = match.getMatchId();\r\n Player winnerPlayer = new Player();\r\n try {\r\n winnerPlayer = isMatchWon(matchID);\r\n } catch (MatchNotFoundException ex) {\r\n LOGGER.error(\"Error: \" + ex.getMessage());\r\n }\r\n \r\n switchPlayer(opponentPlayer, match);\r\n\r\n LOGGER.debug(\"--> performShot\");\r\n return winnerPlayer;\r\n \r\n }", "public static void checkPlayer()\n\t{\n\t\ttry {\n\t\t\t\n\t\t\tscenarioResults = new String[127];\n\t\t\tArrayList<Integer> differences = new ArrayList<Integer>();\n\t\t\t//set scenarioResults to current result or player's bracket when not impossible\n\t\t\tfor(int i=0; i < 127; i++)\n\t\t\t{\n\t\t\t\tif(i < nextMatch){\n\t\t\t\t\tscenarioResults[i] = results[i];\n\t\t\t\t}else{\n\t\t\t\t\t//check if a pick has been disqualified by previous results. \n\t\t\t\t\t//If it is still possible, assume it happens, else add the match number to the list to iterate through.\n\t\t\t\t\tif(isValid(allPicks.get(checkIndex)[i],i)){\n\t\t\t\t\t\tscenarioResults[i] = allPicks.get(checkIndex)[i];\n\t\t\t\t\t}else{\n\t\t\t\t\t\tscenarioResults[i] = \"\";\n\t\t\t\t\t\tdifferences.add(i);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t//if there aren't any matches to check specifically (i.e. no picked winners that lost in previous rounds)\n\t\t\t//\tjust check to see if they win if everything breaks right.\n\t\t\tif(differences.size() == 0)\n\t\t\t{\n\t\t\t\tif(outputScenarioWinner(\"any combination+\"))\n\t\t\t\t{\n\t\t\t\t\twriter.write(\"\\t\"+entrants[checkIndex]+\" is ALIVE\");\n\t\t\t\t}else{\n\t\t\t\t\tSystem.out.println(entrants[checkIndex]);\n\t\t\t\t\twriter.write(\"\\t\"+entrants[checkIndex]+\" is DEAD\");\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\t//find later round matches to iterate through, where the player is already guaranteed to be wrong\n\t\t\t\twrongMatches = new int[differences.size()];\n\n\n\t\t\t\tfor(int i = 0; i < wrongMatches.length; i++)\n\t\t\t\t{\n\t\t\t\t\twrongMatches[i] = differences.get(i).intValue();\n\t\t\t\t}\n\n\t\t\t\t//recurse through results, checking from left-most first. When you reach the end of the list of matches, check scores\n\t\t\t\t//\tand print the winner for the given combination.\n\t\t\t\tboolean isAlive = checkPlayerHelper(0,\"\");\n\n\t\t\t\t//if player is the winner, end execution\n\t\t\t\tif(isAlive)\n\t\t\t\t{\n\t\t\t\t\twriter.write(\"\\t\"+entrants[checkIndex]+\" is ALIVE\");\n\t\t\t\t}else{\n\t\t\t\t\twriter.write(\"\\t\"+entrants[checkIndex]+\" is DEAD\");\n\t\t\t\t\tSystem.out.println(entrants[checkIndex]);\n\t\t\t\t}\n\t\t\t}\n\t\t\twriter.write(\"\\n\");\n\t\t\t\n\t\t}\t\n\t\tcatch (IOException e) {\n\t\t\tSystem.out.println(\"problem with output\");\n\t\t\tSystem.exit(1);\n\t\t}\n\t}", "public void txtResponse(String response , Player player);", "boolean addPlayer(String player);", "static String showPlayerGemsAndPokeballs()\n {\n return \"\\nYou have \" + Player.current.gems + \" gems and \" + Player.current.pokeballs + \" pokeball(s).\\n\";\n }", "public void addPlayer(String playerID) {\r\n\t\tplayerCount++;\r\n\t\tString name = guild.getMemberById(playerID).getEffectiveName();\r\n\t\t// Set up each player uniquely\r\n\t\tif (p2 == null) {\r\n\t\t\tp2 = new Player(1,playerID,GlobalVars.pieces.get(\"blue\"));\r\n\t\t\tp2.getPiece().setX(GlobalVars.playerCoordsPerRoom[0][0]+GlobalVars.playersOffset[1][0]);\r\n\t\t\tp2.getPiece().setY(GlobalVars.playerCoordsPerRoom[0][1]+GlobalVars.playersOffset[1][1]);\r\n\t\t\tplayers.add(p2);\r\n\t\t\tp1.setNextPlayer(p2);\r\n\t\t\tp2.setNextPlayer(p1);\r\n\t\t\tgameChannel.sendMessage(\"**\"+name+\"** has reincarnated as the BLUE adventurer\").queue();\r\n\t\t} else if (p3 == null) {\r\n\t\t\tp3 = new Player(2,playerID,GlobalVars.pieces.get(\"yellow\"));\r\n\t\t\tp3.getPiece().setX(GlobalVars.playerCoordsPerRoom[0][0]+GlobalVars.playersOffset[2][0]);\r\n\t\t\tp3.getPiece().setY(GlobalVars.playerCoordsPerRoom[0][1]+GlobalVars.playersOffset[2][1]);\r\n\t\t\tplayers.add(p3);\r\n\t\t\tp2.setNextPlayer(p3);\r\n\t\t\tp3.setNextPlayer(p1);\r\n\t\t\tgameChannel.sendMessage(\"**\"+name+\"** has reincarnated as the YELLOW adventurer\").queue();\r\n\t\t} else if (p4 == null) {\r\n\t\t\tp4 = new Player(3,playerID,GlobalVars.pieces.get(\"green\"));\r\n\t\t\tp4.getPiece().setX(GlobalVars.playerCoordsPerRoom[0][0]+GlobalVars.playersOffset[3][0]);\r\n\t\t\tp4.getPiece().setY(GlobalVars.playerCoordsPerRoom[0][1]+GlobalVars.playersOffset[3][1]);\r\n\t\t\tplayers.add(p4);\r\n\t\t\tp3.setNextPlayer(p4);\r\n\t\t\tp4.setNextPlayer(p1);\r\n\t\t\tgameChannel.sendMessage(\"**\"+name+\"** has reincarnated as the GREEN adventurer\").queue();\r\n\t\t}\r\n\t}", "public static void getStatus( Player player ) {\n Tools.Prt( player, ChatColor.GREEN + \"=== Premises Messages ===\", programCode );\n Messages.PlayerMessage.keySet().forEach ( ( gn ) -> {\n String mainStr = ChatColor.YELLOW + Messages.PlayerMessage.get( gn );\n mainStr = mainStr.replace( \"%player%\", ChatColor.AQUA + \"%player%\" + ChatColor.YELLOW );\n mainStr = mainStr.replace( \"%message%\", ChatColor.AQUA + \"%message%\" + ChatColor.YELLOW );\n mainStr = mainStr.replace( \"%tool%\", ChatColor.AQUA + \"%tool%\" + ChatColor.YELLOW );\n mainStr = mainStr.replace( \"%digs%\", ChatColor.AQUA + \"%digs%\" + ChatColor.YELLOW );\n mainStr = mainStr.replace( \"%nowDurability%\", ChatColor.AQUA + \"%nowDurability%\" + ChatColor.YELLOW );\n mainStr = mainStr.replace( \"%targetDurability%\", ChatColor.AQUA + \"%targetDurability%\" + ChatColor.YELLOW );\n mainStr = mainStr.replace( \"%score%\", ChatColor.AQUA + \"%score%\" + ChatColor.YELLOW );\n mainStr = mainStr.replace( \"%AreaCode%\", ChatColor.AQUA + \"%AreaCode%\" + ChatColor.YELLOW );\n Tools.Prt( player, ChatColor.WHITE + gn + \" : \" + mainStr, programCode );\n } );\n Tools.Prt( player, ChatColor.GREEN + \"=========================\", programCode );\n }", "@Override\n public String toString() {\n newPlayer.addPoints(players[0].getPoints());\n WarPlayer winner = players[mostNumOfCards(players)];\n\n if (winner.getPoints() == players[0].getPoints())\n return \"YOU WON!!! With a score of \" + players[0].getPoints();\n return \"Player\" + mostNumOfCards(players) + \" won!!! With a score of \" + winner.getPoints();\n }", "public synchronized void announceWinner(Team team) {\n\n String[] gameStats = new String[players.length];\n for(int i = 0; i < players.length; i++){\n\n String s = players[i].getName() + \": \" + players[i].getCorrectAnswers();\n gameStats[i] = s;\n System.err.println(s);\n }\n\n for (PlayerHandler playerHandler : players) {\n\n if (playerHandler.getTeam() == team) {\n playerHandler.getOutputStream().println(\n GFXGenerator.drawYouWon(playerHandler.getTeam().getColor(), score, teams[0], teams[1]) +\n \"\\n\" + GFXGenerator.drawTable(gameStats, 4, \"GAME STATS (CORRECT ANSWERS)\"));\n\n continue;\n }\n\n playerHandler.getOutputStream().println(\n GFXGenerator.drawGameOver(playerHandler.getTeam().getColor(), score, teams[0], teams[1])+\n \"\\n\" + GFXGenerator.drawTable(gameStats, 4, \"GAME STATS (CORRECT ANSWERS)\"));\n }\n\n }", "public static void main(String[] args)\n {\n Pokeball pokeball = new Pokeball();\n Pokeball greatball = new Greatball();\n Pokeball ultraball = new Ultraball();\n Pokeball masterball = new Masterball();\n ArrayList<AbstractPokemon> ashPokemon = new ArrayList<AbstractPokemon>();\n ashPokemon.add(new Charmander());\n ashPokemon.add(new Squirtle());\n ashPokemon.add(new Bulbasaur());\n PokemonTrainer ash = new PokemonTrainer(\"Ash\", ashPokemon, AbstractPokemon.Type.ANY_TYPE, masterball);\n ActorWorld world = new ActorWorld();\n AbstractPokemon charmander = new Charmander();\n AbstractPokemon squirtle = new Squirtle();\n AbstractPokemon bulbasaur = new Bulbasaur();\n AbstractPokemon vulpix = new Vulpix();\n AbstractPokemon poliwhirl = new Poliwhirl();\n AbstractPokemon sunkern = new Sunkern();\n AbstractPokemon magby = new Magby();\n AbstractPokemon magikarp = new Magikarp();\n AbstractPokemon oddish = new Oddish();\n String[] worldChoices = {\"Randomly Generated\", \"Blank\", \"Cancel\"};\n int worldSelection = JOptionPane.showOptionDialog(null, \"Please select the world template:\", \"World Selection\",\n JOptionPane.YES_NO_CANCEL_OPTION, JOptionPane.PLAIN_MESSAGE, null, worldChoices, worldChoices[0]);\n if (worldSelection == 2)\n {\n JOptionPane.showMessageDialog(null, \"No world chosen. Program will terminate.\", \"World Selection\", JOptionPane.PLAIN_MESSAGE);\n System.exit(0);\n }\n else if (worldSelection == 0)\n {\n spawn(charmander, world);\n spawn(squirtle, world);\n spawn(bulbasaur, world);\n spawn(vulpix, world);\n spawn(poliwhirl, world);\n spawn(sunkern, world);\n spawn(magby, world);\n spawn(magikarp, world);\n spawn(oddish, world);\n spawn(ash, world);\n }\n world.show();\n }" ]
[ "0.62346256", "0.6173756", "0.61727965", "0.6130125", "0.61133903", "0.609373", "0.60442805", "0.59585243", "0.5940507", "0.5890478", "0.58627874", "0.5859385", "0.5858103", "0.5851851", "0.58197695", "0.5802882", "0.5799619", "0.5794353", "0.5790319", "0.5764488", "0.5758298", "0.57575697", "0.5744307", "0.5737728", "0.5726079", "0.5714375", "0.5693444", "0.56764394", "0.5675222", "0.5657858", "0.56544185", "0.5642844", "0.5642516", "0.56327826", "0.56237394", "0.5608052", "0.5599162", "0.55964154", "0.5584244", "0.55837667", "0.5579448", "0.5563109", "0.55549824", "0.5541219", "0.5525246", "0.5522703", "0.55177104", "0.55146223", "0.550792", "0.55061483", "0.5504468", "0.5503169", "0.5500147", "0.5495571", "0.5488137", "0.5487", "0.548619", "0.54839015", "0.54829437", "0.5482137", "0.5481854", "0.5458092", "0.54339397", "0.54266953", "0.5426375", "0.5425427", "0.54138166", "0.54051805", "0.5400038", "0.539493", "0.5387854", "0.53874665", "0.5385839", "0.53745776", "0.537184", "0.5365305", "0.5364084", "0.5356695", "0.5348905", "0.5343741", "0.5337219", "0.53364325", "0.533572", "0.531393", "0.53118014", "0.53117895", "0.53072983", "0.53061175", "0.5304165", "0.53040946", "0.53014195", "0.52902305", "0.5288501", "0.5284052", "0.5284003", "0.52836937", "0.52792466", "0.5274152", "0.52728134", "0.5272283" ]
0.7458327
0
printMessage("ph.playerdisc: "+playerID+" disconnected, reason: "+reason); moeten wij niets met doen
@Override public void playerDisconnected(String playerID, DisconnectReason reason) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void disconnectedPlayerMessage(String name);", "public void disconnected(String reason) {}", "void disconnect(String reason);", "public static String getPlayerDisconnect(ClientController game_client){\n\t\treturn \"DISC \" + (int)game_client.getPlayerInfo()[0];\n\t}", "protected abstract void disconnect(UUID[] players, String reason, IntConsumer response);", "void onDisconnect( String errorMsg );", "private void disconnect() {\n System.out.println(String.format(\"連線中斷,%s\",\n clientSocket.getRemoteSocketAddress()));\n final int delete = thisPlayer.id - 1;\n player[delete] = null;\n empty.push(delete);\n }", "void notifyPlayerDisconnected(String username);", "public void disconnectFromAudio() {\n String json = new Gson().toJson(new TelevisionModel(TelevisionModel.Action.DISCONNECT));\n String a = sendMessage(json);\n TelevisionModel teleM = new Gson().fromJson(a, TelevisionModel.class);\n System.out.println(\"Client Received \" + json);\n\n if (teleM.getAction() == TelevisionModel.Action.DISCONNECT) {\n isDisconnecting = teleM.getValue();\n ui.updateArea(teleM.getMessage());\n };\n }", "void onDisconnect(DisconnectReason reason, String errorMessage);", "@DSComment(\"Private Method\")\n @DSBan(DSCat.PRIVATE_METHOD)\n @DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2013-12-30 12:59:45.597 -0500\", hash_original_method = \"6CA7282E928AA840C6D25E995C5EBFEA\", hash_generated_method = \"EE2364AE0179C423F2BD973FF5B92F49\")\n \nprivate void replyDisconnected(int status) {\n Message msg = mSrcHandler.obtainMessage(CMD_CHANNEL_DISCONNECTED);\n msg.arg1 = status;\n msg.obj = this;\n msg.replyTo = mDstMessenger;\n mSrcHandler.sendMessage(msg);\n }", "public void socketDisconnected(PacketChannel pc, boolean failed);", "public String getDeathMessage(Player player);", "public void sendDisconnect() {\n\t\tString bye = (username + \": :Disconnect\");\n\n\t\ttry {\n\n\t\t\t// print string\n\t\t\twriter.println(bye);\n\n\t\t\t// flush the stream\n\t\t\twriter.flush();\n\n\t\t} catch (Exception e) {\n\t\t\t// print if exception is caught\n\t\t\ttextAreaChat.append(\"Could not send Disconnect message.\\n\");\n\n\t\t}\n\t}", "public void onDisconnect(IChatComponent reason) {\n\t\tlogger.info(this.getConnectionInfo() + \" lost connection: \" + reason.getUnformattedText());\n\t}", "@Override\r\n\t\t\t\tpublic void onClientDisconnect(ServerConnection sc) {\n\t\t\t\t\tSystem.out.println(\"CLIENT DISCONNECTED FROM SERVER.\");\r\n\t\t\t\t}", "public void disconnect(){\n\t\tif(player!=null){\n\t\t\tplayer.getConnection().close();\n\t\t\t\n\t\t\t// we get no disconnect signal if we close the connection ourself\n\t\t\tnotifyHandlers(MessageFlag.DISCONNECTED);\n\t\t}\n\t}", "private void lost(String otherplayermsg, int commandlength) {\n\n // decode variable that came with message\n int varlength = 0;\n for (int n = commandlength + 1; n < otherplayermsg.length(); n++) {\n char extract = otherplayermsg.charAt(n);\n if (extract == (':')) {\n varlength = n;\n break;\n }\n }\n String name = otherplayermsg.substring(commandlength + 1, varlength);\n\n sh.addMsg(name + \" is the ShitHead\");\n sh.addMsg(\"Game Over\");\n\n score.addScore(name, 4);\n\n for (int n = 0; n < 3; n++) if (otherNames[n].equals(name)) outofgame[n] = true;\n\n score.display();\n }", "public void disconnect(String message);", "public void disconnect(){\n if(out != null) {\n out.println(\"IDisconnect:\" + username);\n }\n }", "public void showDisconnectedFoeMessage() {\n\t\tsetStatusBar(FOE_DISC_MSG);\n\t}", "private void disconnected() {\n m_connectionLabel.setBackground(Color.RED);\n m_connectionLabel.setText(\"Disconnected\");\n }", "void clientDisconnected(Client client, DisconnectInfo info);", "public void connectionLost(String channelID);", "public void disconnectedPlayer(List<String> playerId){\n disconnectedPlayerController.updateDisconnectedPlayer(playerId);\n disconnectedPlayerPane.setVisible(true);\n PauseTransition delay = new PauseTransition(Duration.seconds(3));\n delay.setOnFinished( event -> disconnectedPlayerPane.setVisible(false) );\n delay.play();\n }", "public void onIceDisconnected();", "@Override\n\tpublic void disconnected(String text) {\n\t\t\n\t}", "@Override\r\n\t\t\t\tpublic void onServerDisconnect() {\n\t\t\t\t\tSystem.out.println(\"CONNECTION HAS BEEN LOST.\");\r\n\t\t\t\t}", "abstract protected void onDisconnection();", "void onDisconnectFailure();", "public String _websocket_disconnected() throws Exception{\n__c.Log(\"Disconnected\");\r\n //BA.debugLineNum = 56;BA.debugLine=\"End Sub\";\r\nreturn \"\";\r\n}", "void firePeerDisconnected(ConnectionKey connectionKey);", "@Override\n public String getMessage(int player) {\n if (player == 0) {\n return \"Player\";\n }\n return \"CPU\";\n }", "private RaceTrackMessage generateDisconnectMessage(int playerToDisconnect,int session, List<Integer> playersInSameSession){\n\t\tRaceTrackMessage answer = null;\n\t\tDebugOutputHandler.printDebug(\"Player: \"+ playerToDisconnect+\" disconnected, sending now a message to each client\");\n\n\t\tif(session != NO_LOBBY_ID && lobbyMap.get(session)!=null){\n\t\t\t//\t\t\tlobbyMap.get(session).playerDisconnected(playerToDisconnect);\n\t\t\tint nextPlayer = lobbyMap.get(session).getNextPlayer();\n\t\t\tanswer = new DisconnectMessage(playerToDisconnect, nextPlayer);\n\n\t\t\tfor(int i : playersInSameSession){\n\t\t\t\tanswer.addClientID(i);\n\t\t\t}\t\n\n\t\t}\n\n\t\treturn answer;\n\t}", "public void handleDisconnect(){\r\n consoleAppend(this.getName() + \" disconnected.\");\r\n clientThreads.remove(getIndex(this.getName()));\r\n sendToAll(this.getName() + \" disconnected.\");\r\n sendCTToAll(new ControlToken(ControlToken.REMOVECODE, this.getName()));\r\n }", "public void opponentDisconnected() {\n \t\tif (lobbyManager.getHostedGame() != null) { // we haven't actually started a game yet\n \t\t\thostWaitScreen.setPotentialOpponent(null);\n \t\t}\n \t\t\n \t\tif (gameInProgress) {\n \t\t\tJOptionPane.showMessageDialog(gameMain, \n \t\t\t\t\t\"Your opponent disconnected unexpectedly (they're probably scared of you)\", \"Disconnection\", JOptionPane.ERROR_MESSAGE);\n \t\t\tquitNetworkGame();\n \t\t}\n \t\t\n \t\tgameInProgress = false;\n \t\tlobbyManager.resetOpponentConnection();\n \t}", "protected void processDisconnection(){}", "private static void debugMessage(GuildMessageReceivedEvent event) {\n String preface = \"[Discord IDs] \";\n\n System.out.println(\"====== PING COMMAND ======\");\n System.out.println(preface + \"`!ping` SENDER:\");\n System.out.println(\n \"\\t{USER} ID: \" + event.getAuthor().getId() +\n \"\\tName: \" + event.getMember().getEffectiveName() +\n \" (\" + event.getAuthor().getAsTag() + \")\");\n\n System.out.println(preface + \"BOT ID:\\t\" + event.getJDA().getSelfUser().getId());\n System.out.println(preface + \"GUILD ID:\\t\" + event.getGuild().getId());\n\n System.out.println(preface + \"ROLES:\");\n event.getGuild().getRoles().forEach(role -> {\n System.out.println(\"\\t{ROLES} ID: \" + role.getId() + \"\\tName: \" + role.getName());\n });\n\n System.out.println(preface + \"MEMBERS:\");\n event.getGuild().getMembers().forEach(member -> {\n System.out.println(\n \"\\t{MEMEBERS} ID: \" + member.getUser().getId() +\n \"\\tName: \" + member.getEffectiveName() +\n \" (\" + member.getUser().getAsTag() + \")\");\n });\n\n System.out.println(preface + \"Categories:\");\n event.getGuild().getCategories().forEach(category -> {\n System.out.println(\"\\t{CATEGORY} ID: \" + category.getId() + \"\\tName: \" + category.getName());\n category.getChannels().forEach(guildChannel -> {\n System.out.println(\n \"\\t\\t:\" + guildChannel.getType().name().toUpperCase() + \":\" +\n \"\\tID: \" + guildChannel.getId() +\n \"\\tName: \" + guildChannel.getName() +\n \"\\tlink: \" + \"https://discord.com/channels/\" + Settings.GUILD_ID + \"/\" + guildChannel.getId());\n });\n });\n System.out.println(\"==== PING COMMAND END ====\");\n }", "protected void onDisconnected(long hconv)\n {\n }", "@Override\n public void onPeerDisconnected(Node peer) {\n Log.i(TAG, \"Disconnected: \" + peer.getDisplayName() + \" (\" + peer.getId() + \")\");\n super.onPeerDisconnected(peer);\n SmartWatch.getInstance().sendDisconnectedWear();\n }", "void onDisconnect();", "void onDisconnect();", "private void UserDisconnectChannel(ClientData d)\n\t{\n\t\tApplicationManager.textChat.writeLog(d.ClientName + \" Quit \" + currentChannel.ChannelName);\n\t\tSendMessage(null, MessageType.channelInfo);\n\n\t}", "public void playerLost()\r\n {\r\n \r\n }", "public abstract void OnDisconnect(int sock);", "public void disconnect(String var1)\n {\n try\n {\n logger.info(\"Disconnecting \" + this.getName() + \": \" + var1);\n this.networkManager.queue(new Packet255KickDisconnect(var1));\n this.networkManager.d();\n this.c = true;\n }\n catch (Exception var3)\n {\n var3.printStackTrace();\n }\n }", "@Override\r\n\tpublic void packetLost(Connection connection, BaseDatagram lostDatagram)\r\n\t{\n\t\t\r\n\t}", "public void clientLoss(int playerID){\n\t\tfinal Player winner = this.players.get(playerID);\n\t\tfor(Player player : this.players){\n\t\t\tif(player!=winner){\n\t\t\t\tplayer.sendLossMessage();\n\t\t\t}\r\n\t\t}\n\t\t\r\n\t}", "public void disconnect(Player p) {\n \tif (p.getState() == PlayerState.Disconnecting)\r\n \t{\r\n\t\t\tremovePlayer(p);\r\n\t\t\ttry\r\n\t\t\t{\r\n\t\t\t\tp.getChannel().close();\r\n\t\t\t}\r\n\t\t\tcatch(IOException e)\r\n\t\t\t{\r\n\t\t\t\tSystem.out.println(\"disconnect error: \" + e.getMessage());\r\n\t\t\t}\r\n \t}\r\n \t\r\n \tif (p != null)\r\n \t\tp.setSocketChannel(null);\t// set to null to show they disconnected\r\n \t\r\n \t// to do: have a time limit they can be disconnected before they are removed from the player list?\r\n }", "static String drop(Player player, String what) {\n if (player.drop(what)) {\n return \"-Charlie Bot: You have dropped the \" + what;\n } else {\n return \"-Charlie Bot: You aren't carrying \" + what + \", 525.\\n\" +\n \"Has the cryostasis affected your sense of weight?\";\n }\n }", "public void peerQuitting(Packet packet) {\r\n\t\t// Search for client in peerClientNodeConnectionList and remove them from the ArrayList\r\n\t\tint peerPosition = peerSearch(packet.packetSenderID);\r\n\t\tpeerClientNodeConnectionList.remove(peerPosition);\r\n\t\tsendPeerListToAll();\r\n\t\tjava.util.Date date = new java.util.Date();\r\n\t\tSystem.out.println(date + \": Peer Node \" + packet.packetSenderID + \" has left the network\");\r\n\t\t//printNodeConnections();\r\n\t\tcloseConnections();\r\n\t}", "@Override\r\n\t\t\t\tpublic void onClientDisconnect(ServerConnection sc) {\n\t\t\t\t}", "public void notifyDisconnection(Player player) {\n for (PlayerController controller : playerControllers) {\n if (controller == null) continue;\n try {\n controller.getClient().notifyDisconnection(player);\n } catch (IOException e) {\n // no need to handle disconnection, game is over\n }\n }\n }", "@Override\n\tprotected void onNetworkDisConnected() {\n\n\t}", "@Override\r\n\tpublic void showGetPrisonCardMessage(Player player) {\n\t\t\r\n\t}", "@Override\n public void onDisconnect(BinaryLogClient client) {\n }", "protected void onDisconnect() {}", "@Override\n\tpublic void disconnect() {\n\t\t\n\t}", "@Override\n\tpublic void disconnect() {\n\t\t\n\t}", "public void onUnhandledPacket(Packet var1)\n {\n this.disconnect(\"Protocol error\");\n }", "public void onDisconnect(Controller controller) {\n\t\tSystem.out.println(\"Disconnected\");\r\n\t}", "public void onDisconnect(Controller controller) {\n\t\tSystem.out.println(\"Disconnected\");\r\n\t}", "interface Disconnect extends RconConnectionEvent {}", "public void sendEndGame (){\n connect();\n try{\n doStream.writeUTF(\"GAME_STOP\");\n doStream.writeUTF(currentUser.getUserName());\n } catch (IOException e){\n e.printStackTrace();\n }\n disconnect();\n }", "public void disconnect( ) {\n disconnect( \"\" );\n }", "public void onPeerConnectionClosed();", "public void playerWon()\r\n {\r\n \r\n }", "public void disconnect() {\n\t\t\n\t}", "@Override\n public void messageReceived(ChannelHandlerContext ctx, MessageEvent e) {\n Channel ch = ctx.getChannel();\n //Player player = (Player) ch.getAttachment();\n Client client = (Client) ch.getAttachment();\n \n if (ch.isConnected()) { // && !client.getPlayer().destroyed() \n RSCPacket packet = (RSCPacket) e.getMessage();\n //player.addPacket(p); // Used to log packets for macro detection\n //engine.addPacket(p); // This one actually results in the packet being processed!\n client.pushToMessageQueue(packet);\n }\n }", "@Override\r\n\t\t\t\tpublic void onServerDisconnect() {\n\t\t\t\t}", "public void disconnectedFrom(ServerDescriptor desc);", "public void onNetDisConnect() {\n\n\t}", "void onDisconnectSuccess();", "public static void unknownPlayer(Command command, String player) {\n\t\tString str = command.getSender().getAsMention() + \",\\n\";\n\t\t\n\t\tstr += ConfigManager.getMessage(\"unknown player\").replace(\"%player%\", player);\n\t\tcommand.getChannel().sendMessage(str).complete();\n\t}", "void disconnected(MqttClient client, Throwable cause, boolean reconnecting);", "private void disconnect(int ID, boolean status) {\n ServerClient client = null;\n for (int i = 0; i < clients.size(); i++) {\n if (clients.get(i).getID() == ID) {\n client = clients.get(i);\n clients.remove(i);\n break;\n }\n }\n assert client != null;\n if (status) {\n System.out.println(\"Client: \" + client.getName() + \" (\" + client.getID() + \") @ \" + client.getAddress() + \":\" + client.getPort() + \" disconnected.\");\n } else {\n System.out.println(\"Client: \" + client.getName() + \" (\" + client.getID() + \") @ \" + client.getAddress() + \":\" + client.getPort() + \" timed out.\");\n }\n }", "public void onPlayerDisconnect(Player player)\r\n \t{\r\n \t\tPlayerData data = plugin.getPlayerDataCache().getData(player);\r\n \r\n \t\tdata.setFrenzyEnabled(false);\r\n \t\tdata.setSuperPickaxeEnabled(false);\r\n \t\tdata.setUnlimitedAmmoEnabled(false);\r\n \t}", "public void sendDisconnectToServer(){\n try {\n if (socket == null){\n JOptionPane.showMessageDialog(null, \"SSLSocket is not connected to server. Connect before sending username.\",Env.ChatClientMessageBoxTitle, JOptionPane.ERROR_MESSAGE);\n return;\n }\n PrintWriter writer = new PrintWriter(new OutputStreamWriter(socket.getOutputStream(), \"UTF-8\"), true);\n writer.println(passUtil.toHexString(\"disconnect-me\"));\n writer.flush();\n System.out.println(\"Sent disconnect message to server\");\n } catch (Exception ex){\n ex.printStackTrace();\n if (ex.toString().toLowerCase().contains(\"socket output is already shutdown\")){\n disconnectFromServer(false);\n }\n JOptionPane.showMessageDialog(null, \"Error sending disconnect message: \" + ex.toString(),Env.ChatClientMessageBoxTitle, JOptionPane.ERROR_MESSAGE);\n }\n }", "protected void processDisconnect() {\n\t\tconnected.set(false);\n\t\tsenderChannel = null;\n\t}", "void endSinglePlayerGame(String message);", "public static void printGoodbye() {\n botSpeak(Message.GOODBYE);\n }", "@Override\n\tpublic void onDisconnectDone(ConnectEvent arg0) {\n\t\t\n\t}", "@Override\n\t\t\tpublic void disconnected() {\n\t\t\t\ttoast(\"IOIO disconnected\");\n\t\t\t}", "default void onDisconnect(SessionID sessionID) {\n }", "public void OnKickConfCallback(int nReason);", "@Override\n\tpublic void disconnect() {\n\n\t}", "@Override\n\tpublic void disconnect() {\n\n\t}", "void otherPlayerMoved()\r\n {\r\n socketWriter.println(\"OPPONENT_MOVED ,\" + getCurrentBoard());\r\n }", "private void sendWinnerMessage(RaceTrackMessage playerDisconnectsMessage) {\n\t\tif(playerDisconnectsMessage != null)\n\t\t\ttry{\n\n\t\t\t\tint playerWhoWon = getPlayerWhoWonByPlayerID(((DisconnectMessage) playerDisconnectsMessage).getNextPlayerToMove()); \n\t\t\t\tint playerWhoWonID = getPlayerIDWhoWonByPlayerID(((DisconnectMessage) playerDisconnectsMessage).getNextPlayerToMove());\n\t\t\t\tif(playerWhoWon != -1){\n\t\t\t\t\tPoint2D lastVec = null;\n\t\t\t\t\tif(getPlayerMap().get(playerWhoWonID) != null)\n\t\t\t\t\t\tlastVec = getPlayerMap().get(playerWhoWonID).getCurrentPosition();\n\n\n\t\t\t\t\tPlayerWonMessage answer;\n\n\t\t\t\t\tanswer = VectorMessageServerHandler.generatePlayerWonMessage(playerWhoWon, playerWhoWon, lastVec);\n\n\t\t\t\t\tcloseGameByPlayerID(playerWhoWon);\n\n\t\t\t\t\tanswer.addClientID(playerWhoWonID);\n\n\t\t\t\t\tsendMessage(answer);\n\t\t\t\t\t\n\t\t\t\t\t//inform the AIs that game is over!!\n\n\t\t\t\t}\n\t\t\t}catch(ClassCastException e){\n\n\t\t\t}\n\t}", "private void eliminatePlayer(Player player, String reason) throws IOExceptionFromController {\n player.setLost();\n ArrayList<Player> activePlayers = new ArrayList<Player>();\n for (Player activePlayer : players) {\n if (!activePlayer.hasLost()) activePlayers.add(activePlayer);\n }\n if (activePlayers.size() == 1) {\n setWinner(activePlayers.get(0), reason);\n return;\n }\n for (Card modifier : game.getActiveModifiers()) {\n if (modifier.getController().getPlayer().equals(player))\n game.removeModifier(modifier);\n }\n for (Worker worker : player.getWorkers()) {\n player.removeWorker(worker);\n }\n PlayerController controller = playerControllers.get(players.indexOf(player));\n if (controller != null) {\n try {\n playerControllers.get(players.indexOf(player)).getClient().notifyLoss(reason, null);\n } catch (IOException e) {\n checkDisconnection(e, controller);\n }\n }\n broadcastGameInfo(reason);\n }", "public boolean onError(MediaPlayer mediaPlayer, int what, int extra) {\n \tif(what == -4){\r\n \t\tservrsideErrorCnt++;\r\n \t\t\r\n \t\tbufferingAddMsg = \"(서버 접속장애.. \"+servrsideErrorCnt+\"/\"+maxServersideError+\")\";\r\n \t\t\r\n \t\t//Serverside error, e.g.) settop error\r\n \t\ttry {\r\n\t\t\t\tThread.sleep(1000);\r\n\t\t\t} catch (InterruptedException e) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(servrsideErrorCnt == maxServersideError){\r\n\t\t\t\t//메인 창으로..\r\n\t\t\t\tservrsideErrorCnt = 0;\r\n\t\t\t\t\r\n\t\t\t\tshowDialog(DIALOG_SERVER_ERR_EXPIRE);\r\n\t\t\t}else{\r\n\t\t\t\tloadMediaPlayer();\r\n\t\t\t}\r\n \t}else{\r\n \t\tbufferingAddMsg = \"(재시도 중)\";\r\n \t\ttry {\r\n\t\t\t\tThread.sleep(1000);\r\n\t\t\t} catch (InterruptedException e) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n \t\tloadMediaPlayer();\r\n \t}\r\n\t\treturn false;\r\n\t}", "private void msgNoServerConnection() {\r\n\thandler.sendEmptyMessage(1); // enviar error al cargar\r\n }", "public void logEliminatedPlayer(Player p)\n\t{\n\t\tif(p instanceof HumanPlayer)\n\t\t\tlog += String.format(\"%nUSER ELIMINATED\");\n\t\telse\n\t\t{\n\t\t\tAIPlayer player = (AIPlayer) p;\n\t\t\tlog += String.format(\"%n%s ELIMINATED\", player.getName().toUpperCase());\n\t\t}\n\t\tlineBreak();\n\t}", "public void onUnknown(String mes) {\n\t\tlong time = System.currentTimeMillis();\n\t\t//Ignores configuration messages\n\t\tif (mes.equals(\":tmi.twitch.tv CAP * ACK :twitch.tv/membership\")\n\t\t\t\t|| mes.equals(\":tmi.twitch.tv CAP * ACK :twitch.tv/tags\")\n\t\t\t\t|| mes.equals(\":tmi.twitch.tv CAP * ACK :twitch.tv/commands\"))\n\t\t\treturn;\n\t\tString tempChan = mes.substring(mes.indexOf(val) + count - 1);\n\t\tString channel = null;\n\t\tif(tempChan.indexOf(\" :\") == -1)\n\t\t\tchannel = tempChan;\n\t\telse\n\t\t\tchannel = tempChan.substring(0, tempChan.indexOf(\" :\"));\n\t\tChatConnection connection = ConnectionList.getChannel(channel);\n\t\tfinal String tags = mes.substring(1, mes.indexOf(\" \" + connection.getChannelName()) + (\" \" + connection.getChannelName()).length());\n\t\t// Private Message, Will implement later!\n\t\tif (mes.indexOf(\" \" + connection.getChannelName()) == -1) \n\t\t\treturn;\n\t\tHashMap<String, String> data = new HashMap<String, String>();\n\t\textractData(connection, data, tags);\n\t\t// ERROR PARSING MESSAGE\n\t\tif (data == null || !data.containsKey(\"tag\")) \n\t\t\treturn;\n\t\tString tag = data.get(\"tag\");\n\t\tString msgSplit = \":tmi.twitch.tv \" + tag + \" \" + connection.getChannelName();\n\t\tUser user = null;\n\t\tMessage message = null;\n\t\t/*\n\t\t * BAN TIMEOUT CLEAR CHAT\n\t\t */\n\t\tif (tag.equalsIgnoreCase(\"CLEARCHAT\")) {\n\t\t\tString username = null;\n\t\t\tif (mes.indexOf(msgSplit) + msgSplit.length() + 2 <= mes.length()) {\n\t\t\t\tusername = mes.substring(mes.indexOf(msgSplit) + msgSplit.length() + 2);\n\t\t\t\tuser = getUser(connection, username);\n\t\t\t}\n\t\t\tif (username != null && data.containsKey(\"ban-reason\")) {\n\t\t\t\tif (data.containsKey(\"ban-duration\") && data.get(\"ban-duration\").length() != 0) \n\t\t\t\t\tmessage = new BanMessage(connection, time, user, Integer.parseInt(data.get(\"ban-duration\")));\n\t\t\t\telse \n\t\t\t\t\tmessage = new BanMessage(connection, time, user);\n\t\t\t} else \n\t\t\t\tmessage = new ClearChatMessage(connection, time);\n\t\t\t\n\t\t}\n\t\t/*\n\t\t * CHANGE CHAT MODE\n\t\t */\n\t\telse if (tag.equalsIgnoreCase(\"NOTICE\")) {\n\t\t\tString messagePrint = mes.substring(mes.indexOf(msgSplit) + msgSplit.length());\n\t\t\tString id = data.get(\"msg-id\");\n\t\t\tboolean enabled = true;\n\t\t\tChatMode mode = ChatMode.OTHER;\n\t\t\tif (id.contains(\"off\")) \n\t\t\t\tenabled = false;\n\t\t\t\n\t\t\t// SUB MODE\n\t\t\tif (id.contains(\"subs_\")) \n\t\t\t\tmode = ChatMode.SUB_ONLY;\n\t\t\t\n\t\t\t// EMOTE ONLY MODE\n\t\t\telse if (id.contains(\"emote_only_\")) \n\t\t\t\tmode = ChatMode.EMOTE_ONLY;\n\t\t\t\n\t\t\t// FOLLOWERS ONLY MODE\n\t\t\telse if (id.contains(\"followers_\")) \n\t\t\t\tmode = ChatMode.FOLLOWER_ONLY;\n\t\t\t\n\t\t\t// SLOW MODE\n\t\t\telse if (id.contains(\"slow_\")) \n\t\t\t\tmode = ChatMode.SLOW;\n\t\t\t\n\t\t\t// R9K MODE\n\t\t\telse if (id.contains(\"r9k_\")) \n\t\t\t\tmode = ChatMode.R9K;\n\t\t\t\n\t\t\tmessage = new ChatModeMessage(connection, time, mode, messagePrint, enabled);\n\t\t}\n\t\t/*\n\t\t * NORMAL CHAT MESSAGE\n\t\t */\n\t\telse if (tag.equalsIgnoreCase(\"PRIVMSG\")) {\n\t\t\t// GETS SENDER\n\t\t\tString temp = \"\";\n\t\t\tString username = data.get(\"display-name\").toLowerCase();\n\t\t\t// no display name\n\t\t\tif (username == null || username.equals(\"\")) {\n\t\t\t\ttemp = data.get(\"user-type\");\n\t\t\t\tusername = temp.substring(temp.indexOf(':') + 1, temp.indexOf('!')).toLowerCase();\n\t\t\t}\n\t\t\tuser = getUser(connection, username);\n\n\t\t\t// BADGES\n\t\t\tString badges = data.get(\"badges\");\n\t\t\tif (!badges.equals(\"\")) {\n\t\t\t\tArrayList<String> badgeList = new ArrayList<String>(Arrays.asList(badges.split(\",\")));\n\t\t\t\tfor (String badge : badgeList) {\n\t\t\t\t\tint splitLoc = badge.indexOf('/');\n\t\t\t\t\tBadgeType type = connection.getBadge(badge.substring(0, splitLoc), badge.substring(splitLoc + 1));\n\t\t\t\t\tif (type == null) \n\t\t\t\t\t\tcontinue;\n\t\t\t\t\tuser.addType(type);\n\t\t\t\t}\n\t\t\t}\n\t\t\t// COLOR\n\t\t\tif (data.get(\"color\").length() != 0) \n\t\t\t\tuser.setDisplayColor(data.get(\"color\"));\n\t\t\t\n\t\t\t// DISPLAY NAME\n\t\t\tif (!data.get(\"display-name\").equals(\"\")) \n\t\t\t\tuser.setDisplayName(data.get(\"display-name\"));\n\t\t\t\n\t\t\t// USER ID\n\t\t\tif (!data.get(\"user-id\").equals(\"\")) \n\t\t\t\tuser.setUserID(Long.parseLong(data.get(\"user-id\")));\n\t\t\t\n\t\t\t// CHECKS IF BITS WERE SENT\n\t\t\tChatMessage finalMessage = null;\n\t\t\tif (data.containsKey(\"bits\")) \n\t\t\t\tfinalMessage = new BitMessage(connection, time, user, mes.substring(tags.length() + 3),\n\t\t\t\t\t\tInteger.parseInt(data.get(\"bits\")));\n\t\t\telse\n\t\t\t\tfinalMessage = new ChatMessage(connection, time, user, mes.substring(tags.length() + 3));\n\t\t\t\n\t\t\t// EMOTES\n\t\t\tHashSet<String> set = new HashSet<String>();\n\t\t\t//TWITCH\n\t\t\tif (!data.get(\"emotes\").equals(\"\")) {\n\t\t\t\tString[] emotes = data.get(\"emotes\").split(\"/\");\n\t\t\t\tfor (String emote : emotes) {\n\t\t\t\t\tint id = Integer.parseInt(emote.substring(0, emote.indexOf(\":\")));\n\t\t\t\t\tString[] occur = emote.substring(emote.indexOf(\":\") + 1).split(\",\");\n\t\t\t\t\tfor (String occure : occur) {\n\t\t\t\t\t\tString[] index = occure.split(\"-\");\n\t\t\t\t\t\tfinalMessage.addEmote(new ChatEmote(finalMessage.getMessage(), EmoteType.TWITCH, id+\"\", Integer.parseInt(index[0]), Integer.parseInt(index[1])));\n\t\t\t\t\t\tset.add(mes.substring(tags.length() + 3).substring(Integer.parseInt(index[0]), Integer.parseInt(index[1])+1));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t//OTHER\n\t\t\tfor(EmoteType type : EmoteType.values()){\n\t\t\t\tif(type!=EmoteType.TWITCH){\n\t\t\t\t\tfor(Emote emote : emoteManager.getEmoteList(type).values()){\n\t\t\t\t\t\tif(!set.contains(emote.getName())){\n\t\t\t\t\t\t\tfinalMessage.addEmotes(findChatEmote(mes.substring(tags.length() + 3), emote));\n\t\t\t\t\t\t\tset.add(emote.getName());\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tmessage = finalMessage;\n\t\t} else if (tag.equalsIgnoreCase(\"ROOMSTATE\")) {\n\n\t\t}\n\t\t// SUB NOTIFICATIONS\n\t\telse if (tag.equalsIgnoreCase(\"USERNOTICE\")) {\n\t\t\tString sys_msg = replaceSpaces(data.get(\"system-msg\"));\n\t\t\tString messagePrint = \"\", plan = data.get(\"msg-param-sub-plan\"), type = data.get(\"msg-id\");\n\t\t\tint loc = mes.indexOf(msgSplit) + msgSplit.length() + 2;\n\t\t\tif (loc < mes.length() && loc > 0) \n\t\t\t\tmessagePrint = mes.substring(loc);\n\t\t\tuser = getUser(connection, data.get(\"login\"));\n\t\t\tint length = -1;\n\t\t\tif (data.get(\"msg-param-months\").length() == 1) \n\t\t\t\tlength = Integer.parseInt(data.get(\"msg-param-months\"));\n\t\t\tmessage = new SubscriberMessage(connection, user, time, sys_msg, messagePrint, length, plan, type);\n\t\t} else if (tag.equalsIgnoreCase(\"USERSTATE\")) {\n\n\t\t} else {\n\n\t\t}\n\t\t//If message was successfully parsed, process the message too the GUI\n\t\tif (message != null) {\n\t\t\tconnection.getMessageProcessor().process(message);\n\t\t\tfinished(message);\n\t\t}\n\t}", "public void disconnect() {\n try {\n Socket socket = new Socket(\"127.0.0.1\",33333);\n ObjectOutputStream outputStream = new ObjectOutputStream(socket.getOutputStream());\n clientMain.clientData[1] = \"no\";\n outputStream.writeObject(clientMain.clientData);\n\n clientMain.showConnectionPage();\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "public void otherSentence()\n {\n // Receive the string from the other player\n if (other == 1)\n {\n record.append(\"Red: \" + theClientChat.recvString() + \"\\n\");\n }\n else\n {\n record.append(\"Yellow: \" + theClientChat.recvString() + \"\\n\");\n }\n }", "public void onClientDisconnected(Channel channel);", "@EventHandler\n public void onPlayerDeath(PlayerDeathEvent e) {\n Player player = e.getEntity();\n PvPPlayer p = plugin.getAccount(e.getEntity().getName());\n\n if (p.bg != null) {\n\n ChatColor playerColor;\n ChatColor killerColor;\n\n String deathMessage = e.getDeathMessage();\n e.setDeathMessage(\"\");\n\n if (plugin.lastDamageCause.containsKey(p.name)) {\n deathMessage = parseDeath(p.name);\n }\n\n Battleground bg = plugin.getBG(p.bg);\n\n if (player.getKiller() != null) {\n PvPPlayer killer = plugin.getAccount(player.getKiller().getName());\n if (bg != null) {\n\n if (bg.redTeam.containsKey(p.name) && bg.blueTeam.containsKey(killer.name)) {\n playerColor = ChatColor.RED;\n killerColor = ChatColor.BLUE;\n deathMessage = deathMessage.replace(p.name, playerColor + p.name + ChatColor.WHITE);\n deathMessage = deathMessage.replace(killer.name, killerColor + killer.name + ChatColor.WHITE);\n\n bg.messageAllPlayers(deathMessage, null);\n\n //Only kills in VotA contribute to team score\n if (bg instanceof VotA) {\n bg.blueScore++;\n ((VotA) bg).updateScore();\n ((VotA) bg).checkScoreResult();\n }\n } else if (bg.blueTeam.containsKey(p.name) && bg.redTeam.containsKey(killer.name)) {\n playerColor = ChatColor.BLUE;\n killerColor = ChatColor.RED;\n deathMessage = deathMessage.replace(p.name, playerColor + p.name + ChatColor.WHITE);\n deathMessage = deathMessage.replace(killer.name, killerColor + killer.name + ChatColor.WHITE);\n bg.messageAllPlayers(deathMessage, null);\n\n //Only kills in VotA contribute to team score\n if (bg instanceof VotA) {\n bg.redScore++;\n ((VotA) bg).updateScore();\n ((VotA) bg).checkScoreResult();\n }\n }\n //Increment player's kill count\n bg.updatePlayerScore(killer.name, 1);\n\n if (bg instanceof VotA) {\n p.valleyDeaths++;\n p.increment(\"valleyDeaths\");\n killer.increment(\"valleyKills\");\n }\n }\n\n checkVictimAchievements(p, killer);\n checkKillerActiveTalent(killer);\n\n //If they have the sword damage talent, activate the speed buff\n if (killer.hasTalent(Talent.SWORD_DAMAGE)) {\n killer.activateTalent(Talent.SWORD_DAMAGE);\n }\n } else {\n if (bg != null) {\n if (bg.blueTeam.containsKey(p.name)) {\n deathMessage = deathMessage.replace(p.name, ChatColor.BLUE + p.name + ChatColor.WHITE);\n bg.messageAllPlayers(deathMessage, null);\n } else if (bg.redTeam.containsKey(p.name)) {\n deathMessage = deathMessage.replace(p.name, ChatColor.RED + p.name + ChatColor.WHITE);\n bg.messageAllPlayers(deathMessage, null);\n }\n }\n }\n\n stripDeathDrops(e);\n }\n\n p.grooveStacks = 0;\n }", "@SubscribeEvent\n public void onFMLNetworkClientDisconnectionFromServer(ClientDisconnectionFromServerEvent event) {\n hypixel = false;\n bedwars = false;\n }", "private void disconnect() {\n\t\t\n\t\ttry { \n\t\t\tif(sInput != null) sInput.close();\n\t\t} catch(Exception e) {} \n\t\t\n\t\t\n\t\ttry {\n\t\t\tif(sOutput != null) sOutput.close();\n\t\t} catch(Exception e) {} \n\t\t\n\t\t\n try{\n\t\t\tif(socket != null) socket.close();\n\t\t} catch(Exception e) {}\n\t\t\n // informa ao Gui\n if(clientGui != null) clientGui.connectionFailed();\n\t\t\t\n\t}" ]
[ "0.7601615", "0.72396576", "0.70161724", "0.6790395", "0.6710423", "0.6666483", "0.6654886", "0.6623333", "0.6549863", "0.6479112", "0.6429383", "0.640353", "0.6322266", "0.6322026", "0.63092875", "0.62984866", "0.62968165", "0.6147973", "0.6117565", "0.61164486", "0.6110999", "0.60955906", "0.6081795", "0.60535043", "0.6050117", "0.6039502", "0.6036874", "0.60340476", "0.59924656", "0.5983302", "0.5968081", "0.59482175", "0.594778", "0.5946417", "0.59417975", "0.59346426", "0.59315234", "0.5929293", "0.59243315", "0.5891774", "0.5890731", "0.5890731", "0.5861014", "0.58557105", "0.58362263", "0.5833032", "0.5817625", "0.5815506", "0.5800355", "0.57902825", "0.57808346", "0.5776859", "0.57689965", "0.5750356", "0.5749195", "0.574707", "0.574439", "0.57414377", "0.57414377", "0.5738941", "0.57323647", "0.57323647", "0.5729818", "0.5725744", "0.57216007", "0.5720402", "0.57165825", "0.5711633", "0.5704954", "0.5702603", "0.5701294", "0.57001853", "0.5696815", "0.5694799", "0.56841344", "0.5682404", "0.5675865", "0.56729174", "0.56646913", "0.56558454", "0.5653438", "0.5646035", "0.5645587", "0.5641182", "0.56409466", "0.56360734", "0.56360734", "0.56262904", "0.561818", "0.56154245", "0.5604515", "0.56030864", "0.5597929", "0.5596352", "0.5594528", "0.5591828", "0.5590821", "0.5585457", "0.5584777", "0.557986" ]
0.74432427
1
printMessage("ph.gameStopped"); htttpImplementation.getController().cancel(); TODO: ik zou reset doen
@Override public void gameStopped() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void stopGame() {\n ((MultiplayerHostController) Main.game).stopGame();\n super.stopGame();\n }", "private void stopGame() {\n\t\ttimer.cancel();\n\t\tboard.stopGame();\n\t\treplayButton.setEnabled(true);\n\t\t// to do - stopGame imp\n\t}", "private void stopGame() {\r\n gameThread.interrupt();\r\n gameWindow.getStartButton().setText(\"Start\");\r\n gameRunning = false;\r\n }", "public void sendStop(){\n if (isNetworkGame()){\n sender.println(\"stop\");\n sender.flush();\n }\n }", "public static void stopCurrentGamePlay() {\r\n\t\tif(!STATUS.equals(Gamestatus.RUNNING) && !STATUS.equals(Gamestatus.PREPARED)) return;\r\n\t\tif(STATUS.equals(Gamestatus.RUNNING)) clock.stop();\r\n\t\tSTATUS = Gamestatus.STOPPED;\r\n\t\tgui.setMenu(new LoseMenu(), false);\r\n\t}", "public static void stop(){\n printStatic(\"Stopped vehicle\");\n }", "@Override\n public void stop() {\n GameManager.getInstance().stopTimer();\n }", "public void stopping();", "public void endGame()\n\t{\n\t\tbuttonPanel.endGameButton.setEnabled(false);\n\t\tstopThreads();\n\t\tsendScore();\n\t}", "public void stop() {}", "void stop();", "void stop();", "void stop();", "void stop();", "void stop();", "void stop();", "void stop();", "void stop();", "void stop();", "void stop();", "void stop();", "void stop();", "void stop();", "void stop();", "void stop();", "void stop();", "void stop();", "public void stop(){\n\t\t\n\t}", "public void stop();", "public void stop();", "public void stop();", "public void stop();", "public void stop();", "public void stop();", "public void stop();", "public void stop();", "public void stop();", "public void stop();", "public void stop();", "public void stop();", "public void stop();", "public void stop();", "public void stop();", "public void stopGame()\r\n\t{\r\n\t\tthis.inProgress = false;\r\n\t\tif(this.round == 0)\r\n\t\t{\r\n\t\t\t++this.round;\r\n\t\t}\r\n\t}", "public synchronized void stopGame(){\n \t\tif (running){\n \t\t\trunning = false;\n \t\t}\n \t}", "public void stopHostingGame() {\n \t\tgameSetup.reset();\n \t\tlobbyManager.stopHostingGame();\n \t\tlobby.updateGameListPane();\n \t\tgameMain.showScreen(lobby);\n \t}", "public void stop() {\n\t\t\n\t\tif(stop){\n\t\t\tGameError error=new GameError(\"The game already has been stopped\");\n\t\t\t\t\n\t\t\t\tnotifyObservers(new GameEvent<S, A>(EventType.Stop,null,currentState,\n\t\t\t\t\terror,\"The game already has been stopped\"));\n\t\t\t\n\t\t\tthrow error;\n\t\t}else{\n\t\t\tstop=true;\n\t\t\tnotifyObservers(new GameEvent<S, A>(EventType.Stop,null,currentState,null,\"The game has been stopped\"));\n\t\t}\n\t\t\n\t}", "public void stopGame() {\n\t\tgetGameThread().stop();\n\t\tgetRenderer().stopRendering();\n\t}", "public void endTurn() {\n controller.endTurn();\n }", "public void stopped();", "public void stop(){\n }", "private void pauseGame() {\n\t\ttimer.cancel();\n\t}", "public abstract void stop();", "public abstract void stop();", "public abstract void stop();", "public abstract void stop();", "public abstract void stop();", "public void stop() { \r\n\t if (remoteControlClient != null) {\r\n\t remoteControlClient\r\n\t .setPlaybackState(RemoteControlClient.PLAYSTATE_STOPPED);\r\n\t } \r\n\t }", "public abstract void stopped();", "void robotStop();", "private void stop(){ player.stop();}", "void stopGame() {\n leader.disconnect();\n opponent.disconnect();\n }", "public void halt();", "public void stopEngine(){\r\n isEngineRunning = false;\r\n System.out.println(\"[i] Engine is no longer running.\");\r\n }", "public void endGame() {\n\r\n\t\tplaying = false;\r\n\t\tstopShip();\r\n\t\tstopUfo();\r\n\t\tstopMissle();\r\n\t}", "@Override\r\n\tpublic void stop() {\n\t\tthis.controller.stop();\r\n\t}", "void beforeStop();", "public void stopGame() {\r\n\t\tif (logger.isDebugEnabled())\r\n\t\t\tlogger.debug(\"Stop\");\r\n\t\t\r\n\t\tif (state != GameState.STOPPED) {\r\n\t\t\tlogger.info(\"Game ended by user\");\r\n\t\t\t\r\n\t\t\t// Change state\r\n\t\t\tstate = GameState.STOPPED;\r\n\t\t\t\r\n\t\t\t// Wake scheduling thread up\r\n\t\t\twakeUp();\r\n\t\t}\r\n\t}", "public void stop()\n {\n }", "void endGame () {\n gameOver = true;\n System.out.println(\"Game over\");\n timer.cancel();\n }", "@Callable\n public static void stopGame() {\n Blockchain.require(Blockchain.getCaller().equals(owner));\n Blockchain.require(isGameOnGoing);\n\n requireNoValue();\n\n isGameOnGoing = false;\n BettingEvents.gameStopped();\n }", "@Override\npublic String stop() {\n\treturn \"the Truck has stopped\";\n}", "private void endGame() {\r\n\t\t// Change state (if not already done)\r\n\t\tstate = GameState.STOPPED;\r\n\t\t\r\n\t\t// End simulator\r\n\t\tsimulator.endGame();\r\n\t}", "public void stop() {\r\n isRunning = false;\r\n System.out.println(\"Stop sim\");\r\n }", "public void halt ( )\n\t{\n\t\tthis.running = false;\n\t}", "public void stop() {\n }", "public void stop() {\n }", "void gameResumed();", "public void stop() {\n\t\t\n\t}", "public void stop() {\n\t}", "abstract public void stop();", "private void stop()\r\n {\r\n player.stop();\r\n }", "@Override\n\tprotected void onStop() {\n\t\tsuper.onStop();\n\t\tif(!gameOverBool){\n\t\t\ttry{\n\t\t\t\tsoundHandler.getSoundPool().autoPause();\n\t\t\t\tsoundHandler.getSoundPool().release();\n\t\t\t\tgarbagegame.stopGame();\n\t\t\t\tLog.d(\"On Stop\", \"Called cancel timers\");\n\t\t\t} catch(Exception e) {\n\t\t\t\tLog.d(\"On Stop\", \"exception caught\");\n\t\t\t}\n\t\t}else{\n\t\t\toverDialog.dismiss();\n\t\t}\n\t\tfinish();\n\t\t\n\t\t\n\t}", "@Override\n public void stop() {}", "public static void endGameSequence()\n\t{\n\t\ttfBet.setEnabled(false);\n\t\tbtnPlay.setEnabled(false);\n\t\tbtnHit.setEnabled(false);\n\t\tbtnStay.setEnabled(false);\n\t\tbtnDouble.setEnabled(false);\n\t\tlblUpdate.setText(\"Game over! You are out of money!\");\n\t}", "public void stop() {\n System.out.println(\"STOP!\");\n xp.stop();\n }", "public void stopGame() {\n\t\t\tif (extended)\n\t\t\t\textendTimer.stop();//stops the extend timer\n\t\t\tpause=true;//waits for other stimuli to unpause.\n\t\t\tstopped = true;//set the stopped flag to true\n\t\t\trepaint();//repaint once to indicate user said to pause\n\t\t\t\n\t\t}", "public void stop() {\n\t\tSystem.out.println(\"结束系统1\");\r\n\t}", "void stop() {\n }", "@Override\r\n public void stop() {\r\n\r\n }", "@Override\r\n\tpublic void stop() {\n\t\t\r\n\t}", "protected void end() {\n \tRobot.conveyor.stop();\n }", "@Override\r\n public void stop() {\r\n }", "@Override\r\n public void stop() {\r\n }", "public void stop(){\n return;\n }", "public void cancel() {\r\n\t\tbStop = true;\r\n\t}", "@Override\n protected void onStop() {\n status = 0;\n super.onStop();\n }", "@Override\n\tpublic void gameWon(int teamNumber) {\n\t\tController.setStopped(true);\n\t}", "public void onStop();", "public void stop() {\n\t\tthis.controller.terminate();\n\t}" ]
[ "0.73222387", "0.71086407", "0.7098756", "0.7052279", "0.69900197", "0.6810006", "0.68082184", "0.679805", "0.67827773", "0.6757101", "0.6716121", "0.6716121", "0.6716121", "0.6716121", "0.6716121", "0.6716121", "0.6716121", "0.6716121", "0.6716121", "0.6716121", "0.6716121", "0.6716121", "0.6716121", "0.6716121", "0.6716121", "0.6716121", "0.6716121", "0.6707351", "0.670258", "0.670258", "0.670258", "0.670258", "0.670258", "0.670258", "0.670258", "0.670258", "0.670258", "0.670258", "0.670258", "0.670258", "0.670258", "0.670258", "0.670258", "0.6694275", "0.6663701", "0.6660979", "0.6660306", "0.6638592", "0.66261566", "0.66199166", "0.660882", "0.6601869", "0.66004366", "0.66004366", "0.66004366", "0.66004366", "0.66004366", "0.65925163", "0.6590627", "0.6585945", "0.65857303", "0.6579685", "0.65726376", "0.65723974", "0.6562111", "0.6555215", "0.6554522", "0.65528774", "0.6538564", "0.6536863", "0.65263367", "0.65186197", "0.65132654", "0.65092194", "0.6509", "0.6504239", "0.6504239", "0.6502918", "0.64998317", "0.64962363", "0.6485965", "0.64765817", "0.64724386", "0.6452804", "0.6444961", "0.6443706", "0.6435254", "0.6426271", "0.6420734", "0.6415085", "0.6407519", "0.6407177", "0.6406799", "0.6406799", "0.63961333", "0.63957477", "0.63757104", "0.637434", "0.63728374", "0.63721186" ]
0.72014916
1
printMessage("ph.gameStarted, starting to send position");
@Override public void gameStarted() { updatePosition(0,0,0); // startSendingPositionsThread(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void sendGameCommand(){\n\n }", "@Override\n\tpublic void tellPlayer(String message) {\n\t\tSystem.out.println(message);\n\t}", "void sendStartMessage();", "void sendStartMessage();", "public void printVictoryMessage() { //main playing method\r\n System.out.println(\"Congrats \" + name + \" you won!!!\");\r\n }", "void sendMessage() {\n\n\t}", "public void sendMessage() {\n\t\tString myPosition=this.agent.getCurrentPosition();\n\t\tif (myPosition!=null){\n\t\t\t\n\t\t\tList<String> wumpusPos = ((CustomAgent)this.myAgent).getStenchs();\n\t\t\t\n\t\t\tif(!wumpusPos.isEmpty()) {\n\t\t\t\tList<String> agents =this.agent.getYellowpage().getOtherAgents(this.agent);\n\t\t\t\t\n\t\t\t\tACLMessage msg=new ACLMessage(ACLMessage.INFORM);\n\t\t\t\tmsg.setSender(this.myAgent.getAID());\n\t\t\t\tmsg.setProtocol(\"WumpusPos\");\n\t\t\t\tmsg.setContent(wumpusPos.get(0)+\",\"+myPosition);\n\t\t\t\t\n\t\t\t\tfor(String a:agents) {\n\t\t\t\t\tif(this.agent.getConversationID(a)>=0) {\n\t\t\t\t\t\tif(a!=null) msg.addReceiver(new AID(a,AID.ISLOCALNAME));\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tthis.agent.sendMessage(msg);\n\t\t\t\tthis.lastPos=myPosition;\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}\n\n\t}", "public void outputMessage(String gameMessage){\n System.out.println(gameMessage);\n }", "public void sendStartGame (){\n connect();\n try{\n doStream.writeUTF(\"GAME_START\");\n doStream.writeUTF(currentUser.getUserName());\n\n } catch (IOException e){\n e.printStackTrace();\n }\n disconnect();\n }", "private String waitPrint(){return \"waiting for other players...\";}", "public void sendStartGame() {\n \t\tclient.sendTCP(new StartGame());\n \t}", "@Override\n\tpublic void msgAtHomePos() {\n\t\t\n\t}", "@Override\n\tpublic void msgAtBed() {\n\t\t\n\t}", "public String callPlayer() {\n\t\treturn \"OVER HERE!!\";\n\t}", "void messageSent();", "@Override\n\tpublic void onMessage(String arg0, String arg1) {\n\t\tSystem.out.print(arg0+arg1);\n\t}", "public void welcomeToGame() {\r\n System.out.println(\" _____ _____ _ \\n\" +\r\n\" / ____| / ____| | | \\n\" +\r\n\" | (___ _ __ __ _ ___ ___ | | _ __ __ _ __ __ | | ___ _ __ \\n\" +\r\n\" \\\\___ \\\\ | '_ \\\\ / _` | / __| / _ \\\\ | | | '__| / _` | \\\\ \\\\ /\\\\ / / | | / _ \\\\ | '__|\\n\" +\r\n\" ____) | | |_) | | (_| | | (__ | __/ | |____ | | | (_| | \\\\ V V / | | | __/ | | \\n\" +\r\n\" |_____/ | .__/ \\\\__,_| \\\\___| \\\\___| \\\\_____| |_| \\\\__,_| \\\\_/\\\\_/ |_| \\\\___| |_| \\n\" +\r\n\" | | \\n\" +\r\n\" |_| \\n\\n\");\r\n System.out.println(\"=== WELCOME ===\\n\");\r\n System.out.println(\"Welcome to the game\\n\");\r\n System.out.println(\"Intro Blah blah blah\");\r\n System.out.println(\"Intro Blah blah blah\");\r\n System.out.println(\"Intro Blah blah blah\");\r\n System.out.println(\"Intro Blah blah blah\");\r\n }", "void printMsg(){\n\tdisplay();\n }", "private void startGame(){\n try{\n Thread.sleep(500); \n }catch(Exception e){\n System.out.println(e);\n }\n\n this.gameThread = new Thread(new GameHandler());\n this.town.sendMessage(\"<s>\");\n this.town.sendMessage(\"t\");\n this.town.sendMessage(this.scp.getUsername());\n System.out.println(\"SCP: \" + this.scp.getUsername());\n this.town.sendMessage(\"\" + game.getMoney());\n this.town.sendMessage(\"\" + game.getFood());\n this.scp.sendMessage(\"<s>\");\n this.scp.sendMessage(\"s\");\n this.scp.sendMessage(this.town.getUsername());\n System.out.println(\"TOWN: \" + this.town.getUsername());\n this.scp.sendMessage(\"\" + game.getHume());\n this.gameThread.start();\n }", "private static void print(Object msg){\n if (WAMClient.Debug){\n System.out.println(msg);\n }\n\n }", "public void sendMsg(){\r\n\t\tsuper.getPPMsg(send);\r\n\t}", "void gameStarted();", "void gameStarted();", "public void display_game_start_text() {\n\n fill(150, 100);\n rect(0, 0, displayW, displayH);\n\n textFont(myFont);\n textAlign(CENTER);\n textSize(displayH/30);\n fill(255);\n text(\"Get Ready!\", displayW/2, displayH/2);\n\n mySound.play_opening_song();\n\n isKeyInputAllowed = false;\n }", "private void printWelcomeMessage() {\r\n\t\tthis.printSeparator();\r\n\t\tSystem.out.println(\"-- Welcome to the JumpIN game --\\n\");\r\n\t\tSystem.out.println(\"Currently five levels are developed.\");\r\n\t\tSystem.out.println(\"Playing level 2\");\r\n\t\tSystem.out.println(\"To move a piece:\"); \r\n\t\tSystem.out.println(\"-Enter the piece's location\");\r\n\t\tSystem.out.println(\"-Wait for validation\");\r\n\t\tSystem.out.println(\"-Enter the location you want to move the piece to\\n\");\r\n\t\tthis.printSeparator();\r\n\t}", "void message(){\n\t\tSystem.out.println(\"Hello dude as e dey go \\\\ we go see for that side\");\n\t\tSystem.out.print (\" \\\"So it is what it is\\\" \");\n\n\t}", "void waitStartGameString();", "@Override\n\tpublic void SendMessage() {\n\t\tSystem.out.println( phoneName+\"'s SendMessage.\" );\n\t}", "public void printMessage(String message) {\n\r\n\t}", "private void sendMessage(String message){\n\t\ttry{\n\t\t\toutput.writeObject(\"Punk Ass Server: \" + message);\n\t\t\toutput.flush();\n\t\t\tshowMessage(\"\\nPunk Ass Server: \" + message); \n\t\t}catch(IOException ioe){\n\t\t\tchatWindow.append(\"\\n Message not sent, try again or typing something else\");\n\t\t\t\n\t\t}\n\t\t\n\t}", "public void speak() {\r\n\t\tSystem.out.print(\"This Goose speaks\");\r\n\t}", "public void printMessage() {\n\t\tSystem.out.println(this.greeting + \" \" + this.message);\n\t}", "public void print()\n\t{\n\t\tif(gameObj[1].size() > 0)\n\t\t{\n\t\t\tSystem.out.println(\"*********************Player Info*******************************\");\n\t\t\tSystem.out.println(\"[Lives: \" + lives + \"][Score: \" + score + \n\t\t\t\t\t\t\t\"][Time: \" + gameTime + \"]\");\n\t\t\tSystem.out.println(\"*********************Player Info*******************************\");\n\t\t}else\n\t\t\tSystem.out.println(\"Spawn a player ship to view game info\");\n\t}", "public void playerTurnStart() {\n\r\n\t}", "public abstract void tellStarting();", "public void MessageInvitCommand(String msg)\n {\n System.out.println(\"> \"+msg);\n }", "@Override\n\tpublic void sendMessage() {\n\t\t\n\t}", "void gameSaved() {\n\t\tSystem.out.println(\"\\n\\nGame saved.\");\n\t}", "@Override\n public void handleMessage(Message msg) {\n super.handleMessage(msg);\n DrawPoint(msg.arg1,msg.arg2);\n }", "@Override\r\n\t\t\tpublic void playGame() {\n\t\t\t\tSystem.out.println(\"调用打游戏的功能\");\r\n\t\t\t}", "public void onBattleMessage(BattleMessageEvent e) {\n System.out.println(\"Msg> \" + e.getMessage());\n }", "public void print(String message);", "public static void displayMsg() {\n\t}", "@Override\r\n\tpublic void playGame() {\n\t\tSystem.out.println(\"SmartPhone具有玩游戏的功能\");\r\n\t}", "protected abstract void displayStartMsg();", "protected void emit(Player p, String message) {\n }", "public void playerWon()\r\n {\r\n \r\n }", "private void msg(String name, String message) {\n System.out.println(\"[\" + (System.currentTimeMillis() - system_start_time) + \"] \" + name + \": \" + message);\n }", "@Override\n public void execute() {\n vars.setState(\"Teleporting...\");\n Methods.teleToFlameKing();\n }", "void onEDHGameStart();", "@Override\n\tpublic void onMessage(CommandMessage msg) {\n\t}", "void otherPlayerMoved()\r\n {\r\n socketWriter.println(\"OPPONENT_MOVED ,\" + getCurrentBoard());\r\n }", "public static void printGame(){\n System.out.println(\"Spielrunde \" + GameController.AKTUELLE_RUNDE);\n System.out.println(GameController.AKTUELLER_SPIELER +\" ist an der Reihe.\");\n System.out.println(\"Er attackiert \" +\n GameController.AKTUELLER_VERTEIDIGER + \" und verursacht \"\n + GameController.SCHADEN +\" Schaden. \");\n System.out.println();\n }", "private void createPosition() {\n\n switch (new Random().nextInt(4)) {\n\n case 0:\n sendString = enemyPositionX.nextInt(Window.WIDTH) + \":-90\";\n break;\n\n case 1:\n sendString = enemyPositionX.nextInt(Window.WIDTH) + \":\" + (Window.HEIGHT + 90);\n break;\n\n case 2:\n sendString = \"-90:\" + enemyPositionY.nextInt(Window.HEIGHT);\n break;\n\n case 3:\n sendString = (Window.WIDTH + 90) + \":\" + enemyPositionY.nextInt(Window.HEIGHT);\n break;\n }\n sendString += \":\" + new Random().nextInt(4);\n sendString += \":\" + new Random().nextInt(2);\n }", "@Test\n public void play() {\n System.out.println(client.botBegin());\n }", "public void speak(){\n System.out.println(\"Shark bait oooh ha haa!\");\n }", "private void printWelcome()\n {\n System.out.println();\n System.out.println(\"Welcome to the World of Zuul!\");\n System.out.println(\"World of Zuul is a new, incredibly boring adventure game.\");\n System.out.println(\"Type 'help' if you need help.\");\n System.out.println();\n player.look();\n }", "public void winMessage() {\r\n\t\tSystem.out.print(\"\\n\\nCongratulations! You've won the game! :D\");\r\n\t\tSystem.exit(0);\r\n\t}", "@Override\n public void move() {\n System.out.println(\"I roam here and there\");\n }", "@Override\n\tpublic void say() {\n\t\tSystem.out.println(\"¸Û¸Û\");\n\n\t}", "@Override\n public void updateDebugText(MiniGame game) {\n }", "void drawMessage(String message);", "@Override\n public void updateDebugText(MiniGame game)\n {\n }", "private void printWelcome()//refactored\n {\n System.out.println();\n waitTime(0.5);\n System.out.println(\"Let´s play a game...\");\n waitTime(0.5);\n System.out.println(\"Welcome to the awesome Adventure Game 'Magic Quest'!\");\n waitTime(0.5);\n System.out.println(\"If you want to become a mighty madican - you have to play.\");\n waitTime(0.5);\n System.out.println(\"Type 'help' if you need help.\");\n waitTime(0.5);\n System.out.println();\n waitTime(0.5);\n System.out.println(currentRoom.getDescription() + \"\\n\");//new\n waitTime(0.5);\n System.out.println(currentRoom.getExitDescription() + \"\\n\");//new\n waitTime(0.5);\n System.out.println();\n }", "@Override\r\n public void playGame() {\r\n printInvalidCommandMessage();\r\n }", "void sendMessage(String msg);", "public void playGame() {\t\t\r\n\t\tthis.printWelcomeMessage();\r\n\r\n\t\t// While the game hasn't finished yet. \r\n\t\twhile (!board.isGameWon()) {\r\n\t\t\tthis.printMoveText(\"What piece would you like to move: \", \"\\n-- PLEASE ENTER A VALID PIECE --\", true);\r\n\t\t\tthis.printSeparator();\r\n\t\t\tthis.printMoveText(\"Where would you like to move this piece: \", \"\\n-- PLEASE ENTER A VALID LOCATION --\",\r\n\t\t\t\t\tfalse);\r\n\t\t\tthis.printSeparator();\r\n\t\t}\r\n\t\tSystem.out.println(board.toString());\r\n\t\tSystem.out.println(\"Level Complete - Congratulations!\");\r\n\t}", "public abstract void displayMsgBeforeRun();", "public void speak() {\r\n\t\tSystem.out.print(\"This Tiger speaks\");\r\n\t}", "public static void main(String[] args){\n\t\tint port = 6677;\n\t\tboolean done = false;\n\t\tboolean connected = false;\n\t\tboolean ourTurnToSend = true;\n\t\tString clientTextSent = new String();\n\t\tString emptyString = new String();\n\t\tString ip = new String(\"\");\n\t\tScanner in;\n\t\tScanner terminalText = new Scanner(System.in);\n\t\tPrintWriter out;\n\t\ttry{\n\t\t\tSocket chatSocket;\n\t\t\tchatSocket = new Socket(ip,3000);\n\t//------------------------------------------------------------------------I have a chat socket, HOHOHO--------------------------\n\t\t\tin = new Scanner(chatSocket.getInputStream());\n\t\t\tout = new PrintWriter(chatSocket.getOutputStream());\n\t//------------------------------------------------------------------------Fully initialised, front-back chat possible------------\n\t\t\twhile(done == false){\n\t\t\t\tout.println(\"{\\\"PLAYER_NUMBER\\\":\\\"P1\\\",\\\"PROTOCOL\\\":\\\"PADDLE_MOVEMENT\\\",\\\"X\\\":-293.3333333333334,\\\"Y\\\":-230}\");out.flush();\n\t\t\t}\n\n\t\t}\n\t\tcatch(Exception e){\n\t\t\tSystem.out.println(\"Shit be whack Yo\");\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void onBattleMessage(BattleMessageEvent e) {\n//\t\tSystem.out.println(\"Msg> \" + e.getMessage());\n\t}", "@Override\n\tvoid showMsg() {\n\t\tSystem.out.println(\"Sample\");\n\t}", "void win() {\n if (_game.isWon()) {\n showMessage(\"Congratulations you win!!\", \"WIN\", \"plain\");\n }\n }", "public void speak(){\n System.out.println(\"Smile and wave boys. Smile and wave.\");\n }", "@Override\n\tpublic void onGameStarted(String arg0, String arg1, String arg2) {\n\t\t\n\t}", "public void talking(){\n System.out.println(\"PetOwner : *says something*\");\n }", "public abstract void sendTraceTime(Player p);", "public void gameRunning()\n{\n}", "public String getGameString(){\n\treturn printString;\n }", "private void displayGameHeader()\n {\n System.out.println(\"########Welcome to Formula 9131 Championship########\");\n }", "public void howToPlay() {\r\n // An item has been added to the ticket. Fire an event and let everyone know.\r\n System.out.println(\"Step 1: Have no life. \\nStep 2: Deal cards\\nStep 3: Cry yourself to sleep.\");\r\n }", "public void gameOver(){ // will be more complex in processing (like a fadey screen or whatever, more dramatic)\n System.out.println();\n System.out.println(\"Three strikes and you're out! You're FIRED!\");\n gameOver = true;\n }", "@Override\n public void printMessage(String msg) {\n if (msg.contains(\"Turno di :\")) {\n inTurno = false;\n for (boolean b : pawnEnabled) {\n b = true;\n }\n }\n final String msgapp = editString(msg);\n Platform.runLater(() -> {\n if (textArea != null) {\n textArea.appendText(msgapp + \"\\n\");\n }\n });\n\n }", "@Override\r\n\tpublic void move() {\n\t\tSystem.out.println(name+\"fly in the sky\");\r\n\t}", "public void showMessage(int x, int y, String message) {\n }", "private void print(String message) {\n\n //System.out.println(LocalDateTime.now() + \" \" + message);\n System.out.println(message);\n }", "public void say (String txt) {\n\t\tApp.addBlueInfo(npc.getName() + \" : \"+txt);\n\t}", "@Override\n\tpublic void execute() {\n\t\tlog.info(\"running...\");\n\n\n\t\t/* example for finding the server agent */\n\t\tIAgentDescription serverAgent = thisAgent.searchAgent(new AgentDescription(null, \"ServerAgent\", null, null, null, null));\n\t\tif (serverAgent != null) {\n\t\t\tthis.server = serverAgent.getMessageBoxAddress();\n\n\t\t\t// TODO\n\t\t\tif (!hasGameStarted) {\n\t\t\t\tStartGameMessage startGameMessage = new StartGameMessage();\n\t\t\t\tstartGameMessage.brokerId = thisAgent.getAgentId();\n\t\t\t\tstartGameMessage.gridFile = \"/grids/h_01.grid\";\n\t\t\t\t// Send StartGameMessage(BrokerID)\n\t\t\t\tsendMessage(server, startGameMessage);\n\t\t\t\treward = 0;\n\t\t\t\tthis.hasGameStarted = true;\n\t\t\t}\n\n\t\t} else {\n\t\t\tSystem.out.println(\"SERVER NOT FOUND!\");\n\t\t}\n\n\n\t\t/* example of handling incoming messages without listener */\n\t\tfor (JiacMessage message : memory.removeAll(new JiacMessage())) {\n\t\t\tObject payload = message.getPayload();\n\n\t\t\tif (payload instanceof StartGameResponse) {\n\t\t\t\t/* do something */\n\n\t\t\t\t// TODO\n\t\t\t\tStartGameResponse startGameResponse = (StartGameResponse) message.getPayload();\n\n\t\t\t\tthis.maxNum = startGameResponse.initialWorkers.size();\n\t\t\t\tthis.agentDescriptions = getMyWorkerAgents(this.maxNum);\n\t\t\t\tthis.gameId = startGameResponse.gameId;\n\n\t\t\t\t/**\n\t\t\t\t *\n\t\t\t\t * DEBUGGING\n\t\t\t\t *\n\t\t\t\t */\n\t\t\t\tSystem.out.println(\"SERVER SENDING \" + startGameResponse.toString());\n\n\t\t\t\t// TODO handle movements and obstacles\n\t\t\t\tthis.gridworldGame = new GridworldGame();\n\t\t\t\tthis.gridworldGame.obstacles.addAll(startGameResponse.obstacles);\n\n\n\n\t\t\t\t// TODO nicht mehr worker verwenden als zur Verfügung stehen\n\n\t\t\t\t/**\n\t\t\t\t * Initialize the workerIdMap to get the agentDescription and especially the\n\t\t\t\t * MailBoxAdress of the workerAgent which we associated with a specific worker\n\t\t\t\t *\n\n\t\t\t\tfor (Worker worker: startGameResponse.initialWorkers) {\n\t\t\t\t\tworkerIdMap.put(worker.id, this.agentDescriptions.get(startGameResponse.initialWorkers.indexOf(worker)));\n\t\t\t\t\tworkerIdReverseAId.put(this.agentDescriptions.get(startGameResponse.initialWorkers.indexOf(worker)).getAid(), worker.id);\n\t\t\t\t} */\n\n\t\t\t\t/**\n\t\t\t\t * Send the Position messages to each Agent for a specific worker\n\t\t\t\t * PositionMessages are sent to inform the worker where it is located\n\t\t\t\t * additionally put the position of the worker in the positionMap\n\t\t\t\t */\n\t\t\t\tfor (Worker worker: startGameResponse.initialWorkers) {\n\t\t\t\t\tpositionMap.put(worker.id, worker.position);\n\n\t\t\t\t\tworkerIdMap.put(worker.id, this.agentDescriptions.get(startGameResponse.initialWorkers.indexOf(worker)));\n\t\t\t\t\tworkerIdReverseAID.put(this.agentDescriptions.get(startGameResponse.initialWorkers.indexOf(worker)).getAid(), worker.id);\n\n\t\t\t\t\tIAgentDescription agentDescription = workerIdMap.get(worker.id);\n\t\t\t\t\tICommunicationAddress workerAddress = agentDescription.getMessageBoxAddress();\n\n\t\t\t\t\t// Send each Agent their current position\n\t\t\t\t\tPositionMessage positionMessage = new PositionMessage();\n\t\t\t\t\tpositionMessage.workerId = agentDescription.getAid();\n\t\t\t\t\tpositionMessage.gameId = startGameResponse.gameId;\n\t\t\t\t\tpositionMessage.position = worker.position;\n\t\t\t\t\tpositionMessage.workerIdForServer = worker.id;\n\t\t\t\t\t//System.out.println(\"ADDRESS IS \" + workerAddress);\n\n\t\t\t\t\tsendMessage(workerAddress, positionMessage);\n\t\t\t\t\t//break;\n\t\t\t\t}\n\n\t\t\t\thasAgents = true;\n\n\t\t\t\tfor (Order order: savedOrders) {\n\t\t\t\t\t// 3 Runden anfangs zum Initialisieren\n\t\t\t\t\tICommunicationAddress workerAddress = decideOrderAssigment(order);\n\t\t\t\t\tPosition workerPosition = null;\n\t\t\t\t\tfor (IAgentDescription agentDescription: agentDescriptions) {\n\t\t\t\t\t\tif (agentDescription.getMessageBoxAddress().equals(workerAddress)) {\n\t\t\t\t\t\t\tString workerId = workerIdReverseAID.get(agentDescription.getAid());\n\t\t\t\t\t\t\tworkerPosition = positionMap.get(workerId);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tint steps = workerPosition.distance(order.position) + 2;\n\t\t\t\t\tint rewardMove = (steps > order.deadline)? 0 : order.value - steps * order.turnPenalty;\n\n\t\t\t\t\tSystem.out.println(\"REWARD: \" + rewardMove);\n\n\t\t\t\t\tif(rewardMove > 0) {\n\t\t\t\t\t\tTakeOrderMessage takeOrderMessage = new TakeOrderMessage();\n\t\t\t\t\t\ttakeOrderMessage.orderId = order.id;\n\t\t\t\t\t\ttakeOrderMessage.brokerId = thisAgent.getAgentId();\n\t\t\t\t\t\ttakeOrderMessage.gameId = gameId;\n\t\t\t\t\t\tsendMessage(server, takeOrderMessage);\n\n\t\t\t\t\t\t// Save order into orderMap\n\t\t\t\t\t\tthis.orderMap.put(order.id, order);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (payload instanceof PositionConfirm) {\n\t\t\t\tPositionConfirm positionConfirm = (PositionConfirm) message.getPayload();\n\t\t\t\tif(positionConfirm.state == Result.FAIL) {\n\t\t\t\t\tString workerId = workerIdReverseAID.get(positionConfirm.workerId);\n\t\t\t\t\tIAgentDescription agentDescription = workerIdMap.get(workerId);\n\t\t\t\t\tICommunicationAddress workerAddress = agentDescription.getMessageBoxAddress();\n\n\t\t\t\t\tPositionMessage positionMessage = new PositionMessage();\n\n\t\t\t\t\tpositionMessage.workerId = agentDescription.getAid();\n\t\t\t\t\tpositionMessage.gameId = positionConfirm.gameId;\n\t\t\t\t\tpositionMessage.position = positionMap.get(workerId);\n\t\t\t\t\tpositionMessage.workerIdForServer = workerId;\n\n\t\t\t\t\tsendMessage(workerAddress, positionMessage);\n\t\t\t\t} else {\n\t\t\t\t\tactiveWorkers.add(message.getSender());\n\t\t\t\t\tfor (String orderId: orderMessages) {\n\t\t\t\t\t\tICommunicationAddress workerAddress = decideOrderAssigment(this.orderMap.get(orderId));\n\t\t\t\t\t\tif(workerAddress.equals(message.getSender())){\n\t\t\t\t\t\t\tAssignOrderMessage assignOrderMessage = new AssignOrderMessage();\n\t\t\t\t\t\t\tassignOrderMessage.order = this.orderMap.get(orderId);\n\t\t\t\t\t\t\tassignOrderMessage.gameId = gameId;\n\t\t\t\t\t\t\tassignOrderMessage.server = this.server;\n\t\t\t\t\t\t\tif(activeWorkers.contains(workerAddress)){\n\t\t\t\t\t\t\t\tsendMessage(workerAddress, assignOrderMessage);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t}\n\n\n\t\t\tif (payload instanceof OrderMessage) {\n\n\t\t\t\t// TODO entscheide, ob wir die Order wirklich annehmen wollen / können\n\n\t\t\t\tOrderMessage orderMessage = (OrderMessage) message.getPayload();\n\n\t\t\t\tif (!hasAgents){\n\t\t\t\t\tsavedOrders.add(orderMessage.order);\n\t\t\t\t\tcontinue;\n\t\t\t\t}else {\n\t\t\t\t\tOrder thisOrder = orderMessage.order;\n\n\t\t\t\tICommunicationAddress workerAddress = decideOrderAssigment(thisOrder);\n\t\t\t\tPosition workerPosition = null;\n\t\t\t\tfor (IAgentDescription agentDescription: agentDescriptions) {\n\t\t\t\t\tif (agentDescription.getMessageBoxAddress().equals(workerAddress)) {\n\t\t\t\t\t\tString workerId = workerIdReverseAID.get(agentDescription.getAid());\n\t\t\t\t\t\tworkerPosition = positionMap.get(workerId);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// 3 Runden anfangs zum Initialisieren\n\t\t\t\t\tint steps = workerPosition.distance(thisOrder.position) + 1;\n\t\t\t\t\tint rewardMove = (steps > thisOrder.deadline)? 0 : thisOrder.value - steps * thisOrder.turnPenalty;\n\n\n\t\t\t\t\tSystem.out.println(\"REWARD: \" + rewardMove);\n\n\t\t\t\tif(rewardMove > 0) {\n\t\t\t\t\tTakeOrderMessage takeOrderMessage = new TakeOrderMessage();\n\t\t\t\t\ttakeOrderMessage.orderId = orderMessage.order.id;\n\t\t\t\t\ttakeOrderMessage.brokerId = thisAgent.getAgentId();\n\t\t\t\t\ttakeOrderMessage.gameId = orderMessage.gameId;\n\t\t\t\t\tsendMessage(server, takeOrderMessage);\n\n\t\t\t\t\t// Save order into orderMap\n\t\t\t\t\tOrder order = ((OrderMessage) message.getPayload()).order;\n\t\t\t\t\tthis.orderMap.put(order.id, order);\n\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t/**\n\t\t\t\t *\n\t\t\t\t * DEBUGGING\n\t\t\t\t *\n\t\t\t\t */\n\t\t\t\tSystem.out.println(\"SERVER SENDING \" + orderMessage.toString());\n\n\t\t\t\t// Save order into orderMap\n\n\t\t\t}\n\n\t\t\tif (payload instanceof TakeOrderConfirm) {\n\n\t\t\t\t// TODO\n\t\t\t\t// Got Order ?!\n\t\t\t\tTakeOrderConfirm takeOrderConfirm = (TakeOrderConfirm) message.getPayload();\n\t\t\t\tResult result = takeOrderConfirm.state;\n\n\t\t\t\t/**\n\t\t\t\t *\n\t\t\t\t * DEBUGGING\n\t\t\t\t *\n\t\t\t\t */\n\t\t\t\tSystem.out.println(\"SERVER SENDING \" + takeOrderConfirm.toString());\n\n\t\t\t\tif (result == Result.FAIL) {\n\t\t\t\t\t// Handle failed confirmation\n\n\t\t\t\t\t// Remove order from orderMap as it was rejected by the server\n\t\t\t\t\tthis.orderMap.remove(takeOrderConfirm.orderId);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\n\t\t\t\t// TODO send serverAddress\n\t\t\t\t// Assign order to Worker(Bean)\n\t\t\t\t// Send the order to the first agent\n\t\t\t\tAssignOrderMessage assignOrderMessage = new AssignOrderMessage();\n\t\t\t\tassignOrderMessage.order = this.orderMap.get(takeOrderConfirm.orderId);\n\t\t\t\tassignOrderMessage.gameId = takeOrderConfirm.gameId;\n\t\t\t\tassignOrderMessage.server = this.server;\n\t\t\t\tICommunicationAddress workerAddress = decideOrderAssigment(assignOrderMessage.order);\n\t\t\t\tif(activeWorkers.contains(workerAddress)){\n\t\t\t\t\tsendMessage(workerAddress, assignOrderMessage);\n\t\t\t\t} else {\n\t\t\t\t\torderMessages.add(takeOrderConfirm.orderId);\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tif (payload instanceof AssignOrderConfirm) {\n\n\t\t\t\t// TODO\n\t\t\t\tAssignOrderConfirm assignOrderConfirm = (AssignOrderConfirm) message.getPayload();\n\t\t\t\tResult result = assignOrderConfirm.state;\n\n\t\t\t\tif (result == Result.FAIL) {\n\t\t\t\t\t// Handle failed confirmation\n\t\t\t\t\t// TODO\n\t\t\t\t\tICommunicationAddress alternativeWorkerAddress = getAlternativeWorkerAddress(((AssignOrderConfirm) message.getPayload()).workerId);\n\t\t\t\t\treassignOrder(alternativeWorkerAddress, assignOrderConfirm);\n\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\torderMessages.remove(assignOrderConfirm.orderId);\n\n\t\t\t\t// TODO Inform other workers that this task is taken - notwendig??\n\n\t\t\t}\n\n\t\t\tif (payload instanceof OrderCompleted) {\n\n\t\t\t\tOrderCompleted orderCompleted = (OrderCompleted) message.getPayload();\n\t\t\t\tResult result = orderCompleted.state;\n\n\t\t\t\tif (result == Result.FAIL) {\n\t\t\t\t\t// TODO Handle failed order completion -> minus points for non handled rewards\n\t\t\t\t\treward += orderCompleted.reward;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\treward += orderCompleted.reward;\n\t\t\t\t// TODO remove order from the worker specific order queues\n\n\t\t\t}\n\n\t\t\tif (payload instanceof PositionUpdate) {\n\n\t\t\t\tPositionUpdate positionUpdate = (PositionUpdate) message.getPayload();\n\t\t\t\tupdateWorkerPosition(positionUpdate.position, positionUpdate.workerId);\n\n\t\t\t}\n\n\t\t\tif (payload instanceof EndGameMessage) {\n\n\t\t\t\tEndGameMessage endGameMessage = (EndGameMessage) message.getPayload();\n\t\t\t\t// TODO lernen lernen lernen lol\n\t\t\t\tSystem.out.println(\"Reward: \" + endGameMessage.totalReward);\n\t\t\t}\n\n\t\t}\n\t}", "protected void printWelcome() {\n System.out.println(\"Slot machine game!\");\n System.out.println(\"- - - - - - - - - -\");\n }", "@Override\n\tpublic void send() {\n\t\tSystem.out.println(\"this is send\");\n\t}", "private void pique() {\n\t\ttry {\n\t\t\tThread.sleep(5000); // espera, para dar tempo de ver as mensagens iniciais\n\t\t} catch (InterruptedException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tint xInit = -38;\n\t\tint yInit = 0;\n\t\tEFieldSide side = selfPerception.getSide();\n\t\tVector2D initPos = new Vector2D(xInit * side.value(), yInit * side.value());\n\t\tplayerDeafaultPosition = initPos;\n\t\tVector2D ballPos;\n\t\tdouble ballX = 0, ballY = 0;\n\t\t\n\t\tRectangle area = side == EFieldSide.LEFT ? new Rectangle(-52, -25, 32, 50) : new Rectangle(25, -25, 32, 50);\n\t\t\n\t\twhile (commander.isActive()) {\n\t\t\tupdatePerceptions(); // deixar aqui, no começo do loop, para ler o resultado do 'move'\n\t\t\tballPos = fieldPerception.getBall().getPosition();\n\t\t\tswitch (matchPerception.getState()) {\n\t\t\tcase BEFORE_KICK_OFF:\t\t\t\t\n\t\t\t\tcommander.doMoveBlocking(-38, 0);\t\t\t\t\n\t\t\t\tbreak;\n\t\t\tcase PLAY_ON:\n\t\t\t\tballX = fieldPerception.getBall().getPosition().getX();\n\t\t\t\tballY = fieldPerception.getBall().getPosition().getY();\n\t\t\t\tif (arrivedAtBall()) { // chutar\n\t\t\t\t\tcommander.doKickBlocking(100.0d, 0.0d);\n\t\t\t\t} else if (area.contains(ballX, ballY)) { // defender\n\t\t\t\t\tdashBall(ballPos);\n\t\t\t\t} else if (!isCloseTo(initPos)) { // recuar\t\t\t\t\t\n\t\t\t\t\tdash(initPos);\n\t\t\t\t} else { // olhar para a bola\n\t\t\t\t\tturnTo(ballPos);\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase KICK_OFF_LEFT:\n\t\t\t\tif (selfPerception.getSide() == EFieldSide.LEFT) {\n\t\t\t\t\tstate = State.PASSING_BALL;\n\t\t\t\t\texecuteStateMachine();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase KICK_OFF_RIGHT:\n\t\t\t\tif (selfPerception.getSide() == EFieldSide.RIGHT) {\n\t\t\t\t\tstate = State.PASSING_BALL;\n\t\t\t\t\texecuteStateMachine();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase CORNER_KICK_LEFT: // escanteio time esquerdo\n\t\t\t\tif (selfPerception.getSide() == EFieldSide.LEFT) {\n\t\t\t\t\tstate = State.PASSING_BALL;\n\t\t\t\t\texecuteStateMachine();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase CORNER_KICK_RIGHT: // escanteio time direito\n\t\t\t\tif (selfPerception.getSide() == EFieldSide.RIGHT) {\n\t\t\t\t\tstate = State.PASSING_BALL;\n\t\t\t\t\texecuteStateMachine();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase KICK_IN_LEFT: // lateral time esquerdo\n\t\t\t\tif (selfPerception.getSide() == EFieldSide.LEFT) {\n\t\t\t\t\tstate = State.PASSING_BALL;\n\t\t\t\t\texecuteStateMachine();\n\t\t\t\t}\n\t\t\tcase KICK_IN_RIGHT: // lateal time direito\n\t\t\t\tif (selfPerception.getSide() == EFieldSide.RIGHT) {\n\t\t\t\t\tstate = State.PASSING_BALL;\n\t\t\t\t\texecuteStateMachine();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase FREE_KICK_LEFT: // Tiro livre time esquerdo\n\t\t\t\tif (selfPerception.getSide() == EFieldSide.LEFT) {\n\t\t\t\t\tstate = State.PASSING_BALL;\n\t\t\t\t\texecuteStateMachine();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase FREE_KICK_RIGHT: // Tiro Livre time direito\n\t\t\t\tif (selfPerception.getSide() == EFieldSide.RIGHT) {\n\t\t\t\t\tstate = State.PASSING_BALL;\n\t\t\t\t\texecuteStateMachine();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase FREE_KICK_FAULT_LEFT:\n\t\t\t\tif (selfPerception.getSide() == EFieldSide.LEFT) {\n\t\t\t\t\tstate = State.PASSING_BALL;\n\t\t\t\t\texecuteStateMachine();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase FREE_KICK_FAULT_RIGHT:\n\t\t\t\tif (selfPerception.getSide() == EFieldSide.RIGHT) {\n\t\t\t\t\tstate = State.PASSING_BALL;\n\t\t\t\t\texecuteStateMachine();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase GOAL_KICK_LEFT:\n\t\t\t\tif (selfPerception.getSide() == EFieldSide.LEFT) {\n\t\t\t\t\texecuteStateMachine();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase GOAL_KICK_RIGHT:\n\t\t\t\tif (selfPerception.getSide() == EFieldSide.RIGHT) {\n\t\t\t\t\texecuteStateMachine();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase AFTER_GOAL_LEFT:\n\t\t\t\tcommander.doMoveBlocking(-38, 0);\n\t\t\t\tbreak;\n\t\t\tcase AFTER_GOAL_RIGHT:\n\t\t\t\tcommander.doMoveBlocking(-38, 0);\n\t\t\t\tbreak;\t\t\t\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}", "public void message() {\n OscMessage myMessage = new OscMessage(\"/test\");\n \n myMessage.add(cf.freqModulation);\n myMessage.add(cf.reverb);\n myMessage.add(cf.neighbordist);\n myMessage.add(cf.sizemod);\n myMessage.add(cf.sweight);\n myMessage.add(cf.panmod);\n myMessage.add(cf.separationforce);\n myMessage.add(cf.alignmentforce);\n myMessage.add(cf.cohesionforce);\n myMessage.add(cf.maxspeed);\n myMessage.add(cf.separationdistance);\n myMessage.add(cf.soundmodevar);\n myMessage.add(cf.visualsize);\n myMessage.add(cf.hue);\n myMessage.add(cf.saturation);\n myMessage.add(cf.brightness);\n myMessage.add(cf.alpha);\n myMessage.add(cf.mode);\n myMessage.add(cf.startedval);\n myMessage.add(cf.exitval);\n myMessage.add(cf.forexport);\n myMessage.add(cf.backgroundalpha);\n myMessage.add(cf.savescreen);\n\n\n //send the message to the \n for(int i=0; i<cf.addresslist.size(); i++){\n oscP5.send(myMessage, cf.addresslist.get(i));\n }\n}", "@Override\n public void move() {\n System.out.println(\"I like to burrow around in the ground and avoid rocky areas.\");\n }", "void sendFinishMessage();", "@Override\n\tpublic void msgAtFrige() {\n\t\t\n\t}", "private void out(String otherplayermsg, int commandlength) {\n\n // decode variable that came with message\n int varlength = 0;\n for (int n = commandlength + 1; n < otherplayermsg.length(); n++) {\n char extract = otherplayermsg.charAt(n);\n if (extract == (':')) {\n varlength = n;\n break;\n }\n }\n String positionString = otherplayermsg.substring(commandlength + 1, varlength);\n int playerPosition = 0;\n try {\n playerPosition = Integer.parseInt(positionString);\n } catch (NumberFormatException b) {\n sh.addMsg(\"Otherplayer - out - variable to Int error: \" + b);\n }\n\n boolean gameover = playerPosition == 4;\n sh.addMsg(FINISHED_MESSAGE[playerPosition - 1]);\n\n outofgame[3] = true;\n\n score.addScore(playersName, position);\n\n if (playerPosition == 4) score.display();\n else position++;\n\n if (whosturn == 3 && !gameover) {\n nextTurn();\n displayTable();\n }\n }", "public void receiveMessage(String line)\n \t{\n \t\t\tString[] msg = line.split(\" \", 4);\n \t\t\tString user = \"#UFPT\";\n \n \t\t\t//this is kind of a nasty solution...\n \n \t\t\tif(msg[0].indexOf(\"!\")>1)\n \t\t\t\tuser = msg[0].substring(1,msg[0].indexOf(\"!\"));\n \t\t\t\n \t\t\tPlayer temp = new Player(user);\n \t\t\tint index = players.indexOf(temp);\n \t\t\t\n \t\t\tString destination = msg[2];\n \t\t\tString command = msg[3].toLowerCase();\n \t\t\tif(command.equalsIgnoreCase(\":!start\"))\n \t\t\t{\n \t\t\t\tif(user.equals(startName))\t\t\n \t\t\t\t{\n \t\t\t\t\tinputThread.sendMessage(destination, \"The game has begun!\");\n\t\t\t\t\treturn;\n \t\t\t\t}\n \t\t\t\telse\n \t\t\t\t\tinputThread.sendMessage(destination, \"Only \" + startName + \" can start the game!\");\n \t\t\t}\t\n \t\t\tif(command.equalsIgnoreCase(\":!join\"))\n \t\t\t{\n \t\t\t\tSystem.out.println(index);\n \t\t\t\tif(index == -1)\n \t\t\t\t{\n \t\t\t\t\tplayers.add(new Player(user));\n \t\t\t\t\tinputThread.sendMessage(destination, user + \" has joined the game!\");\n \t\t\t\t}\n \t\t\t\telse\n \t\t\t\t\tinputThread.sendMessage(destination, user + \" has already joined the game!\");\n \t\t\t}\n \t\t\t\n \t\t\tif(command.equalsIgnoreCase(\":!quit\"))\n \t\t\t{\n \t\t\t\tSystem.out.println(index);\n \t\t\t\tif(index == -1)\n \t\t\t\t\tinputThread.sendMessage(destination, user + \" is not part of the game!\");\n \t\t\t\telse\n \t\t\t\t{\n \t\t\t\t\tplayers.remove(index);\n \t\t\t\t\tinputThread.sendMessage(destination, user + \" has quit the game!\");\n \t\t\t\t}\n \t\t\t\t\n \t\t\t}\t\n \t\t\t\n \t\t\tif (command.equalsIgnoreCase(\":!end\"))\n \t\t\t{\n \t\t\t\tif (user.equals(startName))\n \t\t\t\t{\n \t\t\t\t\tinputThread.sendMessage(destination, user + \" has ended the game. Aww :(\");\n \t\t\t\t\treturn;\n \t\t\t\t\t//does this acceptably end the game? I think so but not positive\n \t\t\t\t}\n \t\t\t\telse\n \t\t\t\t\tinputThread.sendMessage(destination, \"Only \" + startName + \" can end the game!\");\n \t\t\t}\n\t\t\n\t\n \t\n \t\t//assigning roles\n \t\tint numMafia = players.size()/3;\n \t\t//create the Mafia team\n \t\tfor(int a = 0; a < numMafia; ++a)\n \t\t{\n \t\t\tmafiaRoles.add(new Mafia(new MafiaTeam()));\n \t\t}\n \t\t\n \t\t//create the Town team\n \t\tfor(int a = 0; a < (players.size() - numMafia); ++a)\n \t\t{\n \t\t\ttownRoles.add(new Citizen(new Town()));\n \t\t}\n \t\tCollections.shuffle(mafiaRoles);\n \t\tCollections.shuffle(townRoles);\n \t\tfor(int a = 0; a < numMafia; ++a)\n \t\t{\n \t\t\troles.add(mafiaRoles.get(a));\n \t\t}\n \t\tfor(int a = 0; a < players.size() - numMafia; ++a)\n \t\t{\n \t\t\troles.add(townRoles.get(a));\n \t\t}\n \t\tfor(int a = 0; a < players.size(); ++a)\n \t\t{\n \t\t\tplayers.get(a).role = roles.get(a);\n \t\t\tinputThread.sendMessage(players.get(a).name, \"your role is \" + roles.get(a).name);\n \t\t}\n \t\t\n \t\t//TODO tell game that a day or night needs to start? should this method have a return type?\n \t\t\n \t}", "public void handFinished(int position, GameState gs) {\r\n }", "@Override\n\tpublic String tick(Point2D myPosition, Set<Observation> whatYouSee,\n\t\t\tSet<iSnorkMessage> incomingMessages,\n\t\t\tSet<Observation> playerLocations) {\n\t\tSystem.out.println(\"Hello World\");\n\t\tSystem.out.println(commPrototype.createMessage(myPosition, whatYouSee, incomingMessages, playerLocations));\n\t\treturn commPrototype.createMessage(myPosition, whatYouSee, incomingMessages, playerLocations);\n\t\t\n\t}", "void sendUpdatePlayer(int x, int y, int color, byte tool);" ]
[ "0.69687355", "0.6952749", "0.68383485", "0.68383485", "0.68245894", "0.67095345", "0.66758794", "0.6671943", "0.66098404", "0.66062766", "0.65578747", "0.647584", "0.64593124", "0.6440365", "0.6426094", "0.64038587", "0.6385889", "0.6370257", "0.63605785", "0.6321443", "0.6279812", "0.6272247", "0.6272247", "0.6253609", "0.62072396", "0.6199715", "0.61900115", "0.6172204", "0.61692446", "0.6142982", "0.6133299", "0.6132965", "0.6119186", "0.6108765", "0.60990846", "0.6065665", "0.6058647", "0.60524017", "0.60515606", "0.6049356", "0.6042375", "0.6041361", "0.6034365", "0.6033459", "0.60314834", "0.60302085", "0.6025779", "0.60209054", "0.6019416", "0.6011295", "0.5984439", "0.5983501", "0.59819585", "0.59755075", "0.5975497", "0.597285", "0.5971907", "0.597172", "0.5968148", "0.5967246", "0.5965906", "0.5965684", "0.5963268", "0.5951681", "0.59472036", "0.5946708", "0.5935039", "0.5933955", "0.59332323", "0.59307295", "0.59283227", "0.5926709", "0.59240896", "0.5922768", "0.5912561", "0.5910242", "0.59029526", "0.5899828", "0.58972335", "0.58967686", "0.5896018", "0.5894315", "0.5890757", "0.58850133", "0.58841336", "0.58815634", "0.5881521", "0.5880872", "0.5880378", "0.58788824", "0.5876258", "0.58754617", "0.58724886", "0.58685094", "0.5865041", "0.585707", "0.5854017", "0.5849958", "0.5848887", "0.5845587" ]
0.70889866
0
printMessage("ph.GameWon by Team " + teamNumber);
@Override public void gameWon(int teamNumber) { Controller.setStopped(true); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void printWinner() {\n }", "public void printVictoryMessage() { //main playing method\r\n System.out.println(\"Congrats \" + name + \" you won!!!\");\r\n }", "public String playerWon() {\n\t\tString message = \"Congratulations \"+name+ \"! \";\n\t\tRandom rand = new Random();\n\t\tswitch(rand.nextInt(3)) {\n\t\t\tcase 0:\n\t\t\t\tmessage+=\"Can you stop now? You're too good at this!\";\n\t\t\t\tbreak;\n\t\t\tcase 1:\n\t\t\t\tmessage+=\"You OBLITERATED the opponent!\";\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\tmessage+=\"You sent them to the Shadow Realm\";\n\t\t}\n\t\treturn message;\n\t}", "public void playerWon()\r\n {\r\n \r\n }", "public synchronized void announceWinner(Team team) {\n\n String[] gameStats = new String[players.length];\n for(int i = 0; i < players.length; i++){\n\n String s = players[i].getName() + \": \" + players[i].getCorrectAnswers();\n gameStats[i] = s;\n System.err.println(s);\n }\n\n for (PlayerHandler playerHandler : players) {\n\n if (playerHandler.getTeam() == team) {\n playerHandler.getOutputStream().println(\n GFXGenerator.drawYouWon(playerHandler.getTeam().getColor(), score, teams[0], teams[1]) +\n \"\\n\" + GFXGenerator.drawTable(gameStats, 4, \"GAME STATS (CORRECT ANSWERS)\"));\n\n continue;\n }\n\n playerHandler.getOutputStream().println(\n GFXGenerator.drawGameOver(playerHandler.getTeam().getColor(), score, teams[0], teams[1])+\n \"\\n\" + GFXGenerator.drawTable(gameStats, 4, \"GAME STATS (CORRECT ANSWERS)\"));\n }\n\n }", "public void outputMessage(String gameMessage){\n System.out.println(gameMessage);\n }", "private String waitPrint(){return \"waiting for other players...\";}", "public String callPlayer() {\n\t\treturn \"OVER HERE!!\";\n\t}", "private void gameWonDialog() {\n Toast makeText;\n makeText = Toast.makeText(this.getContext(), getResources().getString(R.string.game_won), Toast.LENGTH_LONG);\n makeText.show();\n makeText = Toast.makeText(this.getContext(), getResources().getString(R.string.final_score) + score, Toast.LENGTH_LONG);\n makeText.show();\n }", "void win() {\n if (_game.isWon()) {\n showMessage(\"Congratulations you win!!\", \"WIN\", \"plain\");\n }\n }", "public void winMessage() {\r\n\t\tSystem.out.print(\"\\n\\nCongratulations! You've won the game! :D\");\r\n\t\tSystem.exit(0);\r\n\t}", "public void logGameWinner(Player p){\n\t\t\n\t\tif(p instanceof HumanPlayer) {\n\t\t\tlog += String.format(\"%nUSER WINS GAME\");\n\t\t\twinName =\"Human\";\n\t\t}\n\t\telse\n\t\t{\n\t\t\tAIPlayer ai = (AIPlayer) p;\n\t\t\tlog += String.format(\"%n%s WINS GAME\", ai.getName().toUpperCase());\n\t\t\twinName = ai.getName();\n\t\t}\n\t\tlineBreak();\n\t}", "void printWinner(String winner) throws IOException;", "public void welcomeToGame() {\r\n System.out.println(\" _____ _____ _ \\n\" +\r\n\" / ____| / ____| | | \\n\" +\r\n\" | (___ _ __ __ _ ___ ___ | | _ __ __ _ __ __ | | ___ _ __ \\n\" +\r\n\" \\\\___ \\\\ | '_ \\\\ / _` | / __| / _ \\\\ | | | '__| / _` | \\\\ \\\\ /\\\\ / / | | / _ \\\\ | '__|\\n\" +\r\n\" ____) | | |_) | | (_| | | (__ | __/ | |____ | | | (_| | \\\\ V V / | | | __/ | | \\n\" +\r\n\" |_____/ | .__/ \\\\__,_| \\\\___| \\\\___| \\\\_____| |_| \\\\__,_| \\\\_/\\\\_/ |_| \\\\___| |_| \\n\" +\r\n\" | | \\n\" +\r\n\" |_| \\n\\n\");\r\n System.out.println(\"=== WELCOME ===\\n\");\r\n System.out.println(\"Welcome to the game\\n\");\r\n System.out.println(\"Intro Blah blah blah\");\r\n System.out.println(\"Intro Blah blah blah\");\r\n System.out.println(\"Intro Blah blah blah\");\r\n System.out.println(\"Intro Blah blah blah\");\r\n }", "public void tellPlayerResult(int winner) {\n\t}", "public void winner(){\n System.out.println();\n System.out.println(\"You are the winner.!!!CONGRATULATIONS!!!.\");\n System.exit(1); // Close the game\n }", "MatchWonMessage(String playerName, String teamName) {\r\n super(playerName);\r\n this.teamName = teamName;\r\n }", "public void gameOver(){ // will be more complex in processing (like a fadey screen or whatever, more dramatic)\n System.out.println();\n System.out.println(\"Three strikes and you're out! You're FIRED!\");\n gameOver = true;\n }", "public void playHoomans() {\r\n System.out.println(\"Thanks for killing each other, human!\");\r\n }", "@Override\n\tpublic void tellPlayer(String message) {\n\t\tSystem.out.println(message);\n\t}", "public void thankYouVet(){\n System.out.println(\"PetOwner says ... thank you Vet!\");\n }", "public void talking(){\n System.out.println(\"PetOwner : *says something*\");\n }", "private void popUpWin(String whoWon) {\r\n\t\tJOptionPane.showMessageDialog(gameView, \"Congrats \" + whoWon + \" WINS! Go to the Options Pane to start a New Game!\", \"WIN!\",\r\n\t\t\t\tJOptionPane.INFORMATION_MESSAGE);\r\n\t}", "public void announceWinners(String winners) {\n JOptionPane.showMessageDialog(frame, winners + \" won the game!\");\n }", "static void cuddle(String petType) {\n\thappinessLevel = happinessLevel+2;\n\tJOptionPane.showMessageDialog(null,\"You cuddled your \"+petType+\"\\nPet Happiness Level:\"+happinessLevel);\n}", "private static void checkForKnockout()\n\t{\n\t\tif (playerOneHealth <= 0 && opponentHealth <= 0)\n\t\t{\n\t\t\tSystem.out.println(playerOneName + \" and \" + opponentName + \" both go down for the count!\");\n\t\t\t\n\t\t\t// Prints one to ten because fighter is knocked out\n\t\t\tfor (int i = 1; i <= 10; i++)\n\t\t\t{\n\t\t\t\tif (i < 6) System.out.println(i);\n\t\t\t\telse System.out.println(i + \"!\");\n\t\t\n\t\t\t\t// Delays count – from StackOverflow\n\t\t\t\ttry \n\t\t\t\t{\n\t\t\t\t\tThread.sleep(500);\n\t\t\t\t} \n\t\t\t\tcatch (InterruptedException e) \n\t\t\t\t{\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.println(\"\\n*DING* *DING* *DING* The match is over in round number \" + roundNumber + \"!!\\n\" + playerOneName + \" and \" + opponentName + \" knocked each other out at the same time.\\nWhat a weird ending!!!\");\n\t\t}\n\t\n\t\t// Check if Player One Lost\n\t\telse if (playerOneHealth <= 0)\n\t\t{\n\t\t\t// Prints one to ten because player one is knocked out\n\t\t\tSystem.out.println(playerOneName + \" is down for the count!\");\n\t\t\tfor (int i = 1; i <= 10; i++)\n\t\t\t{\n\t\t\t\tif (i < 6) System.out.println(i);\n\t\t\t\telse System.out.println(i + \"!\");\n\t\t\t\n\t\t\t\t// Delays count – from StackOverflow\n\t\t\t\ttry \n\t\t\t\t{\n\t\t\t\t\tThread.sleep(500);\n\t\t\t\t} \n\t\t\t\tcatch (InterruptedException exception) \n\t\t\t\t{\n\t\t\t\t\texception.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// Game Over\n\t\t\tSystem.out.println(\"\\n*DING* *DING* *DING* The match is over in round number \" + roundNumber + \"!!\\n\" + playerOneName + \" was knocked out, and \" + opponentName + \" still had \" + opponentHealth + \" health left. \\nBetter luck next time player one!!!\");\n\t\t}\n\t\n\t\t// Check if Player Two Lost\n\t\telse if (opponentHealth <= 0)\n\t\t{\n\t\t\tSystem.out.println(opponentName + \" is down for the count!\");\n\n\t\t\t// Prints one to ten because fighter is knocked out\n\t\t\tfor (int i = 1; i <= 10; i++)\n\t\t\t{\n\t\t\t\tif(i < 6)System.out.println(i);\n\t\t\t\telse System.out.println(i + \"!\");\n\t\t\t\n\t\t\t\ttry \n\t\t\t\t{\n\t\t\t\t\tThread.sleep(500);\n\t\t\t\t} \n\t\t\t\tcatch (InterruptedException exception) \n\t\t\t\t{\n\t\t\t\t\texception.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\n\t\t\t// Game Over\n\t\t\tSystem.out.println(\"\\n*DING* *DING* *DING* The match is over in round number \" + roundNumber + \"!! \\n\" + opponentName + \" was knocked out, and \" + playerOneName + \" still had \" + playerOneHealth + \" health left.\\nCONGRATULATIONS PLAYER ONE!!!\");\n\t\t}\n\t}", "public void displayMessage()\n {\n // getCourseName gets the name of the course\n System.out.printf( \"Welcome to the grade book for\\n%s!\\n\\n\",\n getCourseName() );\n }", "public void quitGame() {\r\n System.out.println(\"Thanks for playing!\");\r\n }", "public void playerLost()\r\n {\r\n \r\n }", "public void getScores(){\n String p1 = \"Player 1 has \" + Integer.toString(player1.getWins());\n String p2 = \"Player 2 has \" + Integer.toString(player2.getWins());\n String winner = \"tie\";\n if(player1.getWins()>player2.getWins()){\n winner = player1.getName() + \" wins!!!!\";\n }\n else if(player2.getWins()>player1.getWins()){\n winner = player2.getName() + \" Wins!!!\";\n }\n JOptionPane.showMessageDialog(null, (p1 + \"\\n\" + p2 + \"\\n\" + winner));\n }", "public void gameWon()\n {\n ScoreBoard endGame = new ScoreBoard(\"You Win!\", scoreCounter.getValue());\n addObject(endGame, getWidth()/2, getHeight()/2);\n }", "public String hello(int pno) {\n\t\treturn \"GOLD: \" + (map.getWin() - collectedGold.get(pno));\n\t}", "void gameWon(Piece piece);", "void gameWin(Player player);", "private String getTurnMessage(){\n if (board.turn ==0)\n return \"Black's turn\";\n else\n return \"White's turn\";\n }", "private void reportWinner (Player player) {\n System.out.println();\n System.out.println(\"Player \" + player.name() +\n \" wins.\");\n System.out.println();\n }", "private void sendGameCommand(){\n\n }", "public static void announceWinner() {\n\t\tArrayList<String> data = new ArrayList<String>();\n\n\t\tfor (int index = 0; index < LotteryDatabase.lotteryDatabase.size(); index++) {\n\t\t\tLotteryDatabase lotteryData = LotteryDatabase.lotteryDatabase.get(index);\n\t\t\tfor (int i = 0; i < lotteryData.getTicketsPurchased(); i++) {\n\t\t\t\tdata.add(lotteryData.getPlayerName());\n\t\t\t}\n\t\t}\n\t\tif (data.isEmpty()) {\n\t\t\tAnnouncement.announce(\"No one has entered the lottery.\", ServerConstants.RED_COL);\n\t\t\treturn;\n\t\t}\n\t\tString lotteryWinnerName = data.get(Misc.random(data.size() - 1));\n\t\tAnnouncement.announce(\"<img=27><col=a36718> \" + lotteryWinnerName + \" has won the lottery worth \" + getTotalPotString() + \" with \" + getWinningPercentage(lotteryWinnerName)\n\t\t + \"% chance of winning!\");\n\t\tPlayer winner = Misc.getPlayerByName(lotteryWinnerName);\n\t\tif (winner != null) {\n\t\t\twinner.getPA().sendScreenshot(\"Lottery \" + getTotalPotString(), 2);\n\t\t}\n\t\tNpc npc = NpcHandler.npcs[lotteryNpcIndex];\n\t\tnpc.forceChat(\"Congratulations \" + lotteryWinnerName + \" has won the lottery worth \" + getTotalPotString() + \"!\");\n\t\tItemAssistant.addItemReward(null, lotteryWinnerName, ServerConstants.getMainCurrencyId(), getTotalPotNumber(), false, -1);\n\t\tint moneySink = getTotalPotNumber() / 85;\n\t\tmoneySink *= COMMISION_PERCENTAGE;\n\t\tCoinEconomyTracker.addSinkList(null, \"LOTTERY \" + moneySink);\n\t\ttotalTicketsPurchased = 0;\n\t\tLotteryDatabase.lotteryDatabase.clear();\n\t}", "private void showEndMessage()\n {\n showText(\"Time is up - you win!\", 390, 150);\n showText(\"Your final score: \" + healthLevel + \" points\", 390, 170);\n }", "void fireShellAtOpponent(int playerNr);", "public String play(GameBooth game)\n {\n String newPrize;\n \n if (game.getCost() > spendingMoney)\n {\n return ( \"Sorry, not enough money to play.\");\n }\n else\n {\n spendingMoney -= game. getCost () ; //pay for game\n newPrize = game.start (); //play game\n prizesWon = newPrize +\" \"+ prizesWon;\n return (\"prize won: \" + newPrize);\n }\n }", "void gameOver();", "void gameOver();", "@Override\n public String getMessage(int player) {\n if (player == 0) {\n return \"Player\";\n }\n return \"CPU\";\n }", "public abstract String getGameOverText();", "public void display_game_over_text () {\n\n fill(150, 100);\n rect(0, 0, displayW, displayH);\n\n textFont(myFont);\n textAlign(CENTER);\n textSize(displayH/20);\n fill(255);\n text(\"Game Over\", displayW/2, 3*displayH/7);\n\n if (score.winnerName == \"Pacmax\") {\n text(\"Winner is Pacmax! Your score is \" + score.score, displayW/2, 4*displayH/7);\n } else {\n text(\"Winner is Blinky!\", displayW/2, 4*displayH/7);\n }\n\n mySound.play_game_over_song();\n\n isKeyInputAllowed = false;\n }", "public void gameOver() {\n\t}", "void endSinglePlayerGame(String message);", "public void gameOver(int gameOver);", "public static void displayMsg() {\n\t}", "public String whoWon()\n { \n String win=\"\";\n if (player1Hand.isEmpty())\n {\n win=(\"player 2 wins!\");\n }\n \n if(player2Hand.isEmpty())\n {\n win=(\"player 1 wins\");\n } \n \n return win;\n }", "private void sendMessagetoRespectivePlayer(int num) {\n Message msg1;\n if(flag == \"player1\"){\n prevP1 = num;\n int newPositionGroup = num / 10;\n if(winningHoleGroup == newPositionGroup){\n msg1 = p1Handler.obtainMessage(3);\n }\n else if((winningHoleGroup == newPositionGroup-1) || (winningHoleGroup == newPositionGroup+1)){\n msg1 = p1Handler.obtainMessage(4);\n }\n else{\n msg1 = p1Handler.obtainMessage(5);\n }\n p1Handler.sendMessage(msg1);\n }\n else{\n prevP2 = num;\n int newPositionGroup = num / 10;\n if(winningHoleGroup == newPositionGroup){\n msg1 = p2Handler.obtainMessage(3);\n }\n else if((winningHoleGroup == newPositionGroup-1) || (winningHoleGroup == newPositionGroup+1)){\n msg1 = p2Handler.obtainMessage(4);\n }\n else{\n msg1 = p2Handler.obtainMessage(5);\n }\n p2Handler.sendMessage(msg1);\n }\n }", "String getWonTeam() {\r\n return this.teamName;\r\n }", "private void showWon( String mark ) {\n\tJOptionPane.showMessageDialog( null, mark + \" won!\" );\t\n }", "static void feedPet() {\r\n\t\tJOptionPane.showMessageDialog(null, \"Your \" + pet + \" is happy and full.\");\r\n\t\thappinessLevel+=3;\r\n\t}", "public static void endingOutput(int totalTurns, int totalGames, int largestNum, String playerName) {\n double turnAvg = totalTurns/totalGames;\n double optimalGuesses = Math.log(largestNum - 1) / Math.log(2);\n if(turnAvg < optimalGuesses - 2){\n System.out.println(\"Wow, you really rocked it!!\");\n System.out.printf(\"An optimal game would have taken %.1f guesses and you averaged\\n\", optimalGuesses);\n System.out.printf(\"%.1f guesses over your %d games.\\n\", turnAvg, totalGames);\n } else if(turnAvg < optimalGuesses){\n System.out.println(\"Great job! You definitely know what you're doing.\");\n System.out.printf(\"An optimal game would have taken %.1f guesses and you averaged\\n\", optimalGuesses);\n System.out.printf(\"%.1f guesses over your %d games.\\n\", turnAvg, totalGames);\n } else if(turnAvg > optimalGuesses + 2) {\n System.out.println(\"Jeez, the goal of the game is to find the number in as few guesses as possible.\");\n System.out.println(\"You know that right?\");\n System.out.printf(\"An optimal game would have taken %.1f guesses and you averaged\\n\", optimalGuesses);\n System.out.printf(\"%.1f guesses over your %d games.\\n\", turnAvg, totalGames);\n } else {\n System.out.println(\"It's clear you understand how to play the game, now work on your luck a bit.\");\n System.out.printf(\"An optimal game would have taken %.1f guesses and you averaged\\n\", optimalGuesses);\n System.out.printf(\"%.1f guesses over your %d games.\\n\", turnAvg, totalGames);\n }\n System.out.printf(\"Thanks for playing %s, see you next time!\\n\", playerName);\n }", "@Override\n public void youWin(Map<String, Integer> rankingMap) {\n try {\n if (getClientInterface() != null)\n getClientInterface().gameEnded(\"YOU WON, CONGRATS BUDDY!!\", rankingMap);\n }\n catch (RemoteException e) {\n System.out.println(\"remote sending you won error\");\n }\n }", "public static void displayGrandWinner(Player player1, Player player2) {\r\n JOptionPane JO = new JOptionPane();\r\n String message;\r\n System.out.println(\"----------------------------\");\r\n\r\n if (player1.getPoints() > player2.getPoints())\r\n message = player1.getName() + \" is the grand winner!\";\r\n else if (player2.getPoints() > player1.getPoints())\r\n message = player2.getName() + \" is the grand winner!\";\r\n else\r\n message = \"Both players are tied!\";\r\n\r\n JOptionPane.showMessageDialog(null, \"Game over. Here are the results:\\n\" + player1.getName() + \": \" + player1.getPoints() + \" points.\\n\" + player2.getName() + \": \" + player2.getPoints() + \" points.\\n\" + message);\r\n\r\n }", "public static void printGame(){\n System.out.println(\"Spielrunde \" + GameController.AKTUELLE_RUNDE);\n System.out.println(GameController.AKTUELLER_SPIELER +\" ist an der Reihe.\");\n System.out.println(\"Er attackiert \" +\n GameController.AKTUELLER_VERTEIDIGER + \" und verursacht \"\n + GameController.SCHADEN +\" Schaden. \");\n System.out.println();\n }", "@Override\n public void run() {\n Player winner = game.getWinner();\n String result = winner.getName() + \" won the game!\";\n\n // pass the string referred by \"result\" to make an alert window\n // check the bottom of page 9 of the PA description for the appearance of this alert window\n Alert alert = new Alert(AlertType.CONFIRMATION, result, ButtonType.YES, ButtonType.NO);\n alert.showAndWait();\n if (alert.getResult() == ButtonType.YES)\n {\n Platform.exit();\n }\n }", "public void youWin();", "@Override\n\tpublic void msgAtKitchen() {\n\t\t\n\t}", "private void displayGameHeader()\n {\n System.out.println(\"########Welcome to Formula 9131 Championship########\");\n }", "void message(){\n\t\tSystem.out.println(\"Hello dude as e dey go \\\\ we go see for that side\");\n\t\tSystem.out.print (\" \\\"So it is what it is\\\" \");\n\n\t}", "public void announceWinner() {\r\n Piece winer;\r\n if (_board.piecesContiguous(_board.turn().opposite())) {\r\n winer = _board.turn().opposite();\r\n } else {\r\n winer = _board.turn();\r\n }\r\n if (winer == WP) {\r\n _command.announce(\"White wins.\", \"Game Over\");\r\n System.out.println(\"White wins.\");\r\n } else {\r\n _command.announce(\"Black wins.\", \"Game Over\");\r\n System.out.println(\"Black wins.\");\r\n }\r\n }", "void playMatch() {\n while (!gameInformation.checkIfSomeoneWonGame() && gameInformation.roundsPlayed() < 3) {\n gameInformation.setMovesToZeroAfterSmallMatch();\n playSmallMatch();\n }\n String winner = gameInformation.getWinner();\n if(winner.equals(\"DRAW!\")){\n System.out.println(messageProvider.provideMessage(\"draw\"));\n }else {\n System.out.println(messageProvider.provideMessage(\"winner\")+\" \"+winner+\"!\");\n }\n }", "void displayMessage(String message);", "private void gameOverDialog() {\n Toast makeText;\n makeText = Toast.makeText(this.getContext(), getResources().getString(R.string.game_over), Toast.LENGTH_LONG);\n makeText.show();\n makeText = Toast.makeText(this.getContext(), getResources().getString(R.string.final_score) + score, Toast.LENGTH_LONG);\n makeText.show();\n }", "private void gameOver() {\n\t\t\n\t}", "public void displayMessage(){\n //getCouseName obtém o nome do curso\n System.out.printf(\"Welcome to the grade book for \\n%s!\\n\\n\", getCouseName());\n }", "public String getWinner()\n\t{\n\n\n\n\n\n\n\n\n\n\n\n\n\t\treturn \"\";\n\t}", "String getWinner();", "public String toString() {\r\n return \"\\n\\nTrainer: \"+ name + \", Wins: \" + win + \", team:\" + team;\r\n }", "private void joinGame(int gameId){\n\n }", "protected abstract void displayEndMsg(int resultGame);", "public String gameTie(){\n return points[player1Score] + \"-All\";\n }", "public static void farewell(int num1, int num2, int num3){\n \n JOptionPane.showMessageDialog(null,\"The player won \"+ num2+ \"time(s).\"+\n \"\\nThe computer won \"+ num3+ \"time(s).\"+\n \"\\nYou tied with the computer \"+ num1+ \"time(s).\");\n \n }", "private void whoIsTheWinner() {\n\t\t// at first we say let the number for winner and the maximal score be 0.\n\t\tint winnerName = 0;\n\t\tint maxScore = 0;\n\t\t// then, for each player, we check if his score is more than maximal\n\t\t// score, and if it is we let that score to be our new maximal score and\n\t\t// we generate the player number by it and we let that player number to\n\t\t// be the winner, in other way maximal scores doen't change.\n\t\tfor (int i = 1; i <= nPlayers; i++) {\n\t\t\tif (totalScore[i] > maxScore) {\n\t\t\t\tmaxScore = totalScore[i];\n\t\t\t\twinnerName = i - 1;\n\t\t\t}\n\t\t}\n\t\t// finally, program displays on screen who is the winner,and what score\n\t\t// he/she/it got.\n\t\tdisplay.printMessage(\"Congratulations, \" + playerNames[winnerName]\n\t\t\t\t+ \", you're the winner with a total score of \" + maxScore + \"!\");\n\t}", "public void say (String txt) {\n\t\tApp.addBlueInfo(npc.getName() + \" : \"+txt);\n\t}", "public void sayText(String msg);", "public void printPlayerStat(Player player);", "void checkWinner() {\n\t}", "public void welcomePlayer(Player p);", "public void sentence(){\n \n System.out.println(\"Your first boyfriend's name was \" + getName() + \".\\n\");\n }", "@Override\n public void playFootball() {\n System.out.println(this.name+ \" is \"+this.age+ \" years old and plays as Midfielder.\");\n System.out.println(\"The Midfielder controls the game by passing the ball to the forward players to score!\");\n }", "public void winTheGame(boolean userGuessed) {\n this.setGuessed(true); //updating the isGuessed to true\n //dispalying winning message and the name of the picked movie\n System.out.println(\"Congratulation .. You Win!:)\");\n System.out.println(\"You have Guessed '\" + this.replacedMovie + \"' Correctly.\");\n }", "public String getGameString(){\n\treturn printString;\n }", "public static void decidedWinner(){\n if(playerOneWon == true ){\n//\n// win.Fill(\"Player One Has Won !\");\n// new WinnerWindow().setVisible(true);\n }\n else if (playerTwoWon == true){\n// win.Fill(\"Player Two Has Won !\");\n// new WinnerWindow().setVisible(true);\n }\n else\n {\n// win.Fill(\"Match Has been Tied !\");\n// new WinnerWindow().setVisible(true);\n }\n }", "void win() {\n String name = score.getName();\n if (Time.getSecondsPassed() < 1) {\n calculateMissionScore();\n setHighscoreName(name);\n int totalSum = score.getCurrentScore() + (10000 / 1);\n System.out.println(\"You have won the game!\" + \"\\n\" + \"You spend: \" + 1 + \" seconds playing the game!\");\n System.out.println(\"Your score is: \" + totalSum);\n System.out.println(\"your score has been added to highscore\");\n data.addHighscore(score.getName(), totalSum);\n System.out.println(\"\");\n System.out.println(\"Current highscore list is: \");\n System.out.println(data.printHighscore());\n } else {\n calculateMissionScore();\n setHighscoreName(name);\n int totalSum = score.getCurrentScore() + (10000 / Time.getSecondsPassed());\n System.out.println(\"You have won the game!\" + \"\\n\" + \"You spend: \" + Time.getSecondsPassed() + \" seconds playing the game!\");\n System.out.println(\"Your score is: \" + totalSum);\n System.out.println(\"your score has been added to highscore\");\n data.addHighscore(score.getName(), totalSum);\n System.out.println(\"\");\n System.out.println(\"Current highscore list is: \");\n System.out.println(data.printHighscore());\n }\n }", "@Override\n\tpublic void msgGotHungry() {\n\t\t\n\t}", "public void setGamesWon(int number) {\n\t\tthis.gamesWon = number;\n\t}", "public void incGamesPlayed() {\n gamesPlayed++;\n }", "public String winCondition() {\r\n\t\tif (hasOneOfEach()) {\r\n\t\t\treturn \"Congratulations! You've won the Safari Game! You caught one of each type of Pokémon!\";\r\n\t\t}\r\n\t\tif (hasFiveOfTwo()) {\r\n\t\t\treturn \"Congratulations! You've won the Safari Game! You caught two each of five types of Pokémon!\";\r\n\t\t}\r\n\t\tif (hasTwoOfFive()) {\r\n\t\t\treturn \"Congratulations! You've won the Safari Game! You caught five each of two types Pokémon!\";\r\n\t\t}\r\n\t\treturn \"You did not win yet! Keep trying!\";\r\n\t}", "public void announceWinner(){\n gameState = GameState.HASWINNER;\n notifyObservers();\n }", "static private void TalkTo() {\n if (BSChristiansen.getCurrentRoom() == currentRoom) {\n System.out.println(BSChristiansen.getDescription() + \", yet he still gives you good advice:\\n\");\n System.out.println(BSChristiansen.getDialog(0));\n System.out.println(\"\");\n woundedSurvivor();\n } else if (mysteriousCrab.getCurrentRoom() == currentRoom && inventory.getInventory().containsKey(\"Shroom\")) {\n System.out.println(mysteriousCrab.getDescription() + \"\\n\" + mysteriousCrab.getDialog(0));\n } else {\n System.out.println(\"There is nobody to communicate with in this Room\");\n }\n\n }", "void win(Player player);", "private void decideWinner() {\n String winnerAnnouncement;\n if(player1Choice.equalsIgnoreCase(\"rock\") && player2Choice.equalsIgnoreCase(\"scissors\")) {\n winnerAnnouncement = \"Player: ROCK vs Computer: SCISSORS ----- PLAYER WINS\";\n } else if(player1Choice.equalsIgnoreCase(\"scissors\") && player2Choice.equalsIgnoreCase(\"rock\")) {\n winnerAnnouncement = \"Player: SCISSORS vs Computer: ROCK ----- COMPUTER WINS\";\n } else if(player1Choice.equalsIgnoreCase(\"paper\") && player2Choice.equalsIgnoreCase(\"rock\")) {\n winnerAnnouncement = \"Player: PAPER vs Computer: ROCK ----- PLAYER WINS\";\n } else if(player1Choice.equalsIgnoreCase(\"rock\") && player2Choice.equalsIgnoreCase(\"paper\")) {\n winnerAnnouncement = \"Player: ROCK vs Computer: PAPER ----- COMPUTER WINS\";\n } else if(player1Choice.equalsIgnoreCase(\"scissors\") && player2Choice.equalsIgnoreCase(\"paper\")) {\n winnerAnnouncement = \"Player: SCISSORS vs Computer: PAPER ----- PLAYER WINS\";\n } else if(player1Choice.equalsIgnoreCase(\"paper\") && player2Choice.equalsIgnoreCase(\"scissors\")) {\n winnerAnnouncement = \"Player: PAPER vs Computer: SCISSORS ----- COMPUTER WINS\";\n } else {\n winnerAnnouncement = \"Its a TIE ---- EVERYONE IS A LOSER\";\n }\n // Print out who won in this format: \"Player: ROCK vs Computer: SCISSORS ----- PLAYER WINS\"\n System.out.println(winnerAnnouncement);\n }", "public String Winner() {\r\n if(Main.player1.SuaVida()==0)\r\n return \"player2\";\r\n else\r\n return \"player1\";\r\n }", "void printMsg(){\n\tdisplay();\n }", "public static void win()\n\t{\n\t\tGame.setMoney(Game.getMoney()+bet);\n\t\tremainingMoneyN.setText(String.valueOf(Game.getMoney()));\n\t\tbet=0;\n\t\ttfBet.setText(\"0\");\n\t\tif(Game.getMoney()>Game.getHighScore())\n\t\t{\n\t\t\tGame.setHighScore(Game.getMoney());\n\t\t\tlblHighScore.setText(String.valueOf(Game.getHighScore()));\n\t\t}\n\t\tlblUpdate.setText(\"You win!\");\n\n\t}" ]
[ "0.7173399", "0.7153381", "0.686019", "0.6765002", "0.67349744", "0.66966325", "0.6674697", "0.66314995", "0.6616413", "0.6576702", "0.65316576", "0.6491715", "0.6459404", "0.6434995", "0.6422902", "0.6420533", "0.6417613", "0.64077973", "0.6404487", "0.63926136", "0.6335962", "0.6307602", "0.6275602", "0.6264296", "0.6251844", "0.62470007", "0.6240241", "0.62306756", "0.6212315", "0.62044567", "0.6201139", "0.6194041", "0.6187623", "0.6171628", "0.61625415", "0.6152055", "0.6132725", "0.6125191", "0.6095896", "0.60633945", "0.60430586", "0.60417473", "0.60417473", "0.6038569", "0.6028267", "0.6025157", "0.6018823", "0.60175496", "0.601117", "0.6008271", "0.60056925", "0.60053366", "0.5984786", "0.5979805", "0.5979369", "0.5978439", "0.5976477", "0.5965418", "0.59589607", "0.59587926", "0.5957545", "0.5940066", "0.5937327", "0.5936171", "0.59267324", "0.59245837", "0.59233433", "0.59230465", "0.5920776", "0.59058", "0.58986485", "0.5889455", "0.58828276", "0.58783567", "0.58780795", "0.58749735", "0.5871267", "0.5871231", "0.5871228", "0.58659834", "0.5849258", "0.58457595", "0.5841823", "0.5839833", "0.5834402", "0.58292806", "0.582825", "0.58197415", "0.58188045", "0.581095", "0.58034706", "0.5800932", "0.5798197", "0.5795789", "0.5793919", "0.57926404", "0.57882905", "0.57864696", "0.57859194", "0.5783519" ]
0.58695596
79
ATtention This method is not used for the simrobot, only has an effect on the real robot
public abstract void snapPoseToTileMid();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void robotInit() {\n }", "@Override\n public void robotInit() {\n }", "@Override\n public void robotInit() {\n }", "public abstract void interagir (Robot robot);", "public void robotInit() {\n\n }", "public void robotInit() {\n\n }", "public abstract void interagir(Robot robot);", "@Override\n public void robotPeriodic() {\n }", "@Override\n public void robotPeriodic() {\n }", "@Override\n public void robotPeriodic() {\n }", "@Override\n public void robotPeriodic() {\n }", "@Override\n public void robotPeriodic() {\n }", "@Override\n public void robotPeriodic() {\n }", "@Override\n public void robotPeriodic() {\n // m_driveTrain.run(gulce);\n\n\n\n // workingSerialCom.StringConverter(ros_string, 2);\n // RoboticArm.run( workingSerialCom.StringConverter(ros_string, 2));\n }", "@Override\n\tpublic void execute(Robot robot) {\n\t}", "@Override\r\n\tpublic void simulate() {\n\t\t\r\n\t}", "@Override\r\n \tprotected Robot getRobot() {\t\t\r\n \t\treturn null;\r\n \t}", "@Override\n public void robotInit() {\n m_oi = new OI();\n m_chooser.setDefaultOption(\"Default Auto\", new ExampleCommand());\n // chooser.addOption(\"My Auto\", new MyAutoCommand());\n SmartDashboard.putData(\"Auto mode\", m_chooser);\n\n Comp = new Compressor();\n\n //ClimbBack = new DoubleSolenoid(PCM_COMP_24V, 0, 1);\n //ClimbFront = new DoubleSolenoid(PCM_COMP_24V, 2, 3);\n LegFrontL = new VictorSPX(30);\n LegFrontR = new Spark(9);\n LegBackL = new VictorSPX(31);\n LegBackR = new VictorSPX(32);\n\n BackFootMover = new VictorSP(1);\n FrontFootMover = new Spark(2);\n //FeetMovers = new SpeedControllerGroup(BackFootMoverFootMover);\n\n MainRight = new CANSparkMax(9, MotorType.kBrushless);\n AltRight = new CANSparkMax(10, MotorType.kBrushless);\n MainLeft = new CANSparkMax(11, MotorType.kBrushless);\n AltLeft = new CANSparkMax(12, MotorType.kBrushless);\n\n MainRight.setIdleMode(IdleMode.kCoast);\n AltRight.setIdleMode(IdleMode.kCoast);\n MainLeft.setIdleMode(IdleMode.kCoast);\n AltLeft.setIdleMode(IdleMode.kCoast);\n\n AltLeft.follow(MainLeft);\n AltRight.follow(MainRight);\n\n Drive = new DifferentialDrive(MainLeft, MainRight);\n\n Lifter = new TalonSRX(6);\n Lifter.setNeutralMode(NeutralMode.Brake);\n Lifter.enableCurrentLimit(false);\n /*Lifter.configContinuousCurrentLimit(40);\n Lifter.configPeakCurrentLimit(50);\n Lifter.configPeakCurrentDuration(1500);*/\n //Lifter.configReverseSoftLimitEnable(true);\n //Lifter.configReverseSoftLimitThreshold(-27000);\n //Lifter.configForwardLimitSwitchSource(LimitSwitchSource.FeedbackConnector, LimitSwitchNormal.NormallyOpen);\n //Lifter.configClearPositionOnLimitF(true, 0);\n Lifter.selectProfileSlot(0, 0);\n LiftSetpoint = 0;\n\n LiftFollower = new TalonSRX(5);\n LiftFollower.follow(Lifter);\n LiftFollower.setNeutralMode(NeutralMode.Brake);\n\n ArmExtender = new Solenoid(0);\n ArmOpener = new Solenoid(1);\n ArmGrippers = new Spark(0);\n\n HatchSwitch0 = new DigitalInput(0);\n HatchSwitch1 = new DigitalInput(1);\n\n Accel = new BuiltInAccelerometer(Range.k2G);\n\n //Diagnostics = new DiagnosticsLogger();\n // Uncomment this line to enable diagnostics. Warning: this may\n // cause the robot to be slower than it is supposed to be because of lag.\n //Diagnostics.start();\n\n xbox = new XboxController(0);\n joystick = new Joystick(1);\n \n LiftRamp = new SRamp();\n SpeedRamp = new SRamp();\n\n NetworkTableInstance nt = NetworkTableInstance.getDefault();\n\n VisionTable = nt.getTable(\"ChickenVision\");\n TapeDetectedEntry = VisionTable.getEntry(\"tapeDetected\");\n TapePitchEntry = VisionTable.getEntry(\"tapePitch\");\n TapeYawEntry = VisionTable.getEntry(\"tapeYaw\");\n\n LedTable = nt.getTable(\"LedInfo\");\n LedScript = LedTable.getEntry(\"CurrentScript\");\n LedScriptArgument = LedTable.getEntry(\"ScriptArgument\");\n LedArmsClosed = LedTable.getEntry(\"ArmsClosed\");\n\n UsbCamera cam = CameraServer.getInstance().startAutomaticCapture();\n cam.setPixelFormat(PixelFormat.kMJPEG);\n cam.setResolution(320, 240);\n cam.setFPS(15);\n \n\n LedScript.setString(\"ColorWaves\");\n LedScriptArgument.setString(\"\");\n\n limits = new DigitalInput[8];\n\n for (int i = 0; i < limits.length; i++) {\n limits[i] = new DigitalInput(i + 2);\n }\n }", "@Override\n public void robotInit() {\n m_driveTrain = new DriveTrain();\n m_oi = new OI(); \n encoder = new Encoder();\n JoystickDrive = new JoystickDrive();\n RoboticArm = new RoboticArm();\n Science = new Science();\n pid = new PID();\n inverse = new Inverse();\n\n // workingSerialCom = new serialComWorking();\n\n\n // while(true){\n // // ros_string = workingSerialCom.read();\n // // System.out.println(ros_string);\n // LeftFront = Robot.m_driveTrain.dr+iveTrainLeftFrontMotor.getSelectedSensorVelocity()*(10/4096);\n // RightFront = Robot.m_driveTrain.driveTrainRightFrontMotor.getSelectedSensorVelocity()*(10/4096);\n // LeftFront_ros = workingSerialCom.floattosString(LeftFront);\n // RigthFront_ros = workingSerialCom.floattosString(RightFront);\n\n // ros_string = workingSerialCom.read();\n // gulce = workingSerialCom.StringConverter(ros_string, 1);\n // System.out.println(gulce);\n // workingSerialCom.write(LeftFront_ros+RigthFront_ros+\"\\n\");\n // }\n // workingSerialCom.write(\"Yavuz\\n\");\n // // RoboticArm.run();\n // // m_driveTrain.run();\n // // workingSerialCom.StringConverter(ros_string, 3);\n }", "@Override\n\tpublic void robotPeriodic() {\n\t}", "@Override\n\tpublic void robotPeriodic() {\n\t}", "public void autonomous() {\n robot.drive(0.5); //Drives in a square\n Timer.delay(0.5);\n robot.tankDrive(0.5, -0.5);\n Timer.delay(0.25);\n robot.drive(0.5);\n Timer.delay(0.5);\n robot.tankDrive(0.5, -0.5);\n Timer.delay(0.25);\n robot.drive(0.5);\n Timer.delay(0.5);\n robot.tankDrive(0.5, -0.5);\n Timer.delay(0.25);\n robot.drive(0.5);\n Timer.delay(0.5);\n robot.tankDrive(0.5, -0.5);\n Timer.delay(0.25);\n }", "public void robotInit() {\n chooser = new SendableChooser();\n chooser.addDefault(\"Default Auto\", defaultAuto);\n chooser.addObject(\"My Auto\", customAuto);\n SmartDashboard.putData(\"Auto choices\", chooser);\n \n // camera stuff\n robotCamera = CameraServer.getInstance();\n robotCamera.setQuality(50);\n robotCamera.startAutomaticCapture(\"cam0\");\n\n //our robot stuff\n // myChassis\t= new RobotDrive(0,1);\n leftSide\t= new VictorSP(1);\n rightSide\t= new VictorSP(0);\n spinWheels\t= new TalonSRX(2);\n armLifty\t= new TalonSRX(3);\n drivePad\t= new Joystick(0);\n statesPad\t= new Joystick(1);\n LiveWindow.addActuator(\"stud\", \"talonsrx\", armLifty);\n \n //arm position stuff\n armPosition\t\t= new AnalogInput(0);\n armPortSwitch\t= new DigitalInput(0);\n \n //solenoid stuff\n //solenoidThing = new Solenoid(1);\n \n //init button states\n lBPX\t\t\t= false;\n bIPX\t\t\t= false;\n \n //driver buttons\n ballSpitButton\t= 4;\n ballSuckButton\t= 2;\n \n //state machine variables\n defaultState\t\t= 0;\n portState\t\t\t= 1;\n chevellState\t\t= 2;\n ballGrabState\t\t= 10;\n driveState\t\t\t= 11;\n lowBarState\t\t\t= 8;\n rockState\t\t\t= driveState;\n roughState\t\t\t= driveState;\n moatState\t\t\t= driveState;\n rampartState\t\t= driveState;\n drawState\t\t\t= driveState;\n sallyState\t\t\t= driveState;\n liftOverride\t\t= 0.09;\n terrainStates\t\t= 0;\n autoLiftSpeed\t\t= 1.0;\n armLiftBuffer\t\t= 0.01;\n //port state variables\n portPosition1\t\t= 1.7;\n portPosition2\t\t= 0.9;\n portSwitch\t\t\t= 0;\n //chevell state variables\n chevellPosition1\t= 1.135;\n chevellPosition2\t= 2.0;\n chevellSwitch \t\t= 0;\n chevellWheelSpeed\t= 0.3;\n //ball grab state variables\n ballGrabPosition1\t= 1.35;\n ballGrabSwitch\t\t= 0;\n ballGrabWheelSpeed\t= -0.635;\n ballSpitWheelSpeed\t= 1.0;\n //lowbar state variables\n lowBarPosition\t\t= 1.6;\n lowBarSwitch\t\t= 0;\n //drive state variables\n driveSwitch\t\t\t= 1;\n \n }", "void deployRobot(){\n\n //Robot going down\n //Can be omitted if for test purposes\n if(!autonomonTesting) {\n while (robot.mechLiftLeft.getCurrentPosition() < robot.MAX_LIFT_POSITION &&\n robot.mechLiftRight.getCurrentPosition() < robot.MAX_LIFT_POSITION && !isStopRequested()) {\n robot.liftMovement(robot.LIFT_SPEED, false);\n }\n telemetry.addData(\"Lift Position\", robot.mechLiftLeft.getCurrentPosition());\n }\n else{\n telemetry.addLine(\"Tesint mode, without lift\");\n }\n robot.liftMovement(0, false);\n telemetry.update();\n\n\n //tensor activation\n if (tfod != null) {\n tfod.activate();\n }\n\n //moving to get in position for TensorFlow scan\n\n //out of the hook\n robot.setDrivetrainPosition(-300, \"translation\", .6);\n\n //away from the lander\n robot.setDrivetrainPosition(800, \"strafing\", .3);\n\n //back to initial\n robot.setDrivetrainPosition(300, \"translation\", .6);\n\n }", "@Override\r\n protected void executeCommand(MyRobot robot) {\n }", "@Override\n public void robotInit() {\n\n // BEGIN AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=CONSTRUCTORS\n drive = new Drive();\n pDP = new PDP();\n\n // END AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=CONSTRUCTORS\n // OI must be constructed after subsystems. If the OI creates Commands\n //(which it very likely will), subsystems are not guaranteed to be\n // constructed yet. Thus, their requires() statements may grab null\n // pointers. Bad news. Don't move it.\n oi = new OI();\n camera1 = CameraServer.getInstance().startAutomaticCapture(0);\n camera2 = CameraServer.getInstance().startAutomaticCapture(1);\n camera1.setConnectionStrategy(VideoSource.ConnectionStrategy.kKeepOpen);\n camera2.setConnectionStrategy(VideoSource.ConnectionStrategy.kKeepOpen);\n server = CameraServer.getInstance().getServer();\n flipped = true;\n server.setSource(camera1);\n vexGyro = new AnalogGyro(0);\n vexGyro.setSensitivity(.00175);\n //rightEncoder = new Encoder(0, 1, false);\n //leftEncoder = new Encoder(2, 3, true);\n // Add commands to Autonomous Sendable Chooser\n // BEGIN AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=AUTONOMOUS\n\n chooser.setDefaultOption(\"Autonomous Command\", new AutonomousCommand());\n PixyCamBlock centerBlock = PixyCam2.GetCentermostBlock();\n if(centerBlock == null)\n {\n SmartDashboard.putString(\"target good? \", \"no, is null\");\n }\n else{\n String out = \"Center Block, X: \"+centerBlock.xCenter + \" Y: \"+centerBlock.yCenter;\n SmartDashboard.putString(\"center block data \", out);\n if (centerBlock.yCenter < 200){\n SmartDashboard.putString(\"target good?\", \"YES!!! ycenter less than 200\");\n }\n }\n \n \n\n\n \n \n // END AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=AUTONOMOUS\n SmartDashboard.putData(\"Auto mode\", chooser);\n SmartDashboard.putBoolean(\"isFlipped\", flipped);\n SmartDashboard.putNumber(\"right encoder\", drive.getRightEncoder());\n SmartDashboard.putNumber(\"left encoder\", drive.getLeftEncoder());\n }", "@Override\n\tpublic void robotInit() {\n\t\t\n\t\t//CameraServer.getInstance().startAutomaticCapture(); //Minimum required for camera\n\t\t\n\t\t//new Thread(() -> {\n UsbCamera camera = CameraServer.getInstance().startAutomaticCapture();\n camera.setResolution(640, 480);\n camera.setWhiteBalanceAuto();\n camera.setFPS(20);\n \n //CvSink cvSink = CameraServer.getInstance().getVideo();\n //CvSource outputStream = CameraServer.getInstance().putVideo(\"Blur\", 640, 480);\n /* \n Mat source = new Mat();\n Mat output = new Mat();\n \n while(!Thread.interrupted()) {\n cvSink.grabFrame(source);\n Imgproc.cvtColor(source, output, Imgproc.COLOR_BGR2GRAY);\n outputStream.putFrame(output);\n }*/\n //}).start();\n\t\t\n\t\t\n\t\t\n\t\t/**\n\t\t * 7780 long run\n\t\t */\n\t\t\n\t\tdriverStation = DriverStation.getInstance();\n\t\t// Initialize all subsystems\n\t\tm_drivetrain = new DriveTrain();\n\t\tm_pneumatics = new Pneumatics();\n\t\t\n\t\tm_pneumatics.createSolenoid(RobotMap.PNEUMATICS.GEARSHIFT_SOLENOID, \n\n\t\t\t\tRobotMap.PNEUMATICS.SOLENOID_ID_1, \n\n\t\t\t\tRobotMap.PNEUMATICS.SOLENOID_ID_2);\n\t\t\n\t\tm_pneumatics.createSolenoid(RobotMap.PNEUMATICS.FORKLIFT_SOLENOID, RobotMap.PNEUMATICS.SOLENOID_ID_3, RobotMap.PNEUMATICS.SOLENOID_ID_4);\n\t\t\n\t\tm_forklift = new ForkLift();\n\t\tm_intake = new Intake();\n\t\tm_oi = new OI();\n\n\t\t// instantiate the command used for the autonomous period\n\t\tm_autonomousCommand = new Autonomous();\n\t\tdriverXbox = m_oi.getDriverXboxControl();\n\t\toperatorXbox = m_oi.getDriverXboxControl();\n\t\tsetupAutoCommands();\n\t\t\n\t\t//chooser.addDefault(\"Left Long\",new LeftLong());\n\t\t\n\t\t//SmartDashboard.putData(\"Auto\",chooser);\n\n\t\t// Show what command your subsystem is running on the SmartDashboard\n\t\tSmartDashboard.putData(m_drivetrain);\n\t\tSmartDashboard.putData(m_forklift);\n\t\t\n\t}", "public void robotInit(){\n\t\tSmartDashboard.putNumber(\"Climber Arm Speed: \", 0.5);\n\t\tSmartDashboard.putNumber(\"Climber Winch Speed: \", 0.25);\n\t}", "public void teleopPeriodic() \n {\n // NIVision.Rect rect = new NIVision.Rect(10, 10, 100, 100);\n /*\n NIVision.IMAQdxGrab(session, frame, 1);\n //NIVision.imaqDrawShapeOnImage(frame, frame, rect,\n // DrawMode.DRAW_VALUE, ShapeMode.SHAPE_OVAL, 0.0f);\n */\n \n //cam.getImage(frame);\n //camServer.setImage(frame);\n \n //CameraServer.getInstance().setImage(frame);\n \n if(verticalLift.limitSwitchHit())\n verticalLift.resetEnc();\n \n Scheduler.getInstance().run();\n }", "@Override\n public void robotPeriodic() {\n\n SmartDashboard.putString(\"DB/String 0\", \": \" + ControllerMap.driverMode);\n SmartDashboard.putString(\"DB/String 3\",\n \"pot value: \" + String.valueOf(Intake.getInstance().potentiometer.getVoltage()));\n SmartDashboard.putString(\"DB/String 7\", \"Zero position: \" + Intake.getInstance().getStartingWristEncoderValue());\n SmartDashboard.putString(\"DB/String 8\",\n \"wrist encoder: \" + String.valueOf(Hardware.intakeWrist.getSensorCollection().getQuadraturePosition()));\n SmartDashboard.putString(\"DB/String 9\",\n \"Corrected wrist: \" + String.valueOf(Intake.getInstance().getCorrectedWristEncoderValue()));\n // SmartDashboard.putString(\"DB/String 4\", \"pot value: \" +\n // String.valueOf(intake.potentiometer.getValue()));\n // SmartDashboard.putString(\"DB/String 9\", \"pot voltage: \" +\n // String.valueOf(intake.potentiometer.getVoltage()));\n }", "public void shape() {\n\t\tSystem.out.println(\"super robot입니다. 팔, 다리, 몸통, 머리가 있습니다.\");\r\n\t}", "@Override\n public void runOpMode() {\n hw = new RobotHardware(robotName, hardwareMap);\n rd = new RobotDrive(hw);\n rs=new RobotSense(hw, telemetry);\n /*rd.moveDist(RobotDrive.Direction.FORWARD, .5, .3);\n rd.moveDist(RobotDrive.Direction.REVERSE, .5, .3);\n rd.moveDist(RobotDrive.Direction.FORWARD, .5, 1);\n rd.moveDist(RobotDrive.Direction.REVERSE, .5, 1);*/\n telemetry.addData(\"Ready! \", \"Go Flamangos!\"); \n telemetry.update();\n\n //Starting the servos in the correct starting position\n /*hw.armRight.setPosition(1-.3);\n hw.armLeft.setPosition(.3);\n hw.level.setPosition(.3+.05);*/\n hw.f_servoLeft.setPosition(1);\n hw.f_servoRight.setPosition(0.5);\n \n rd.moveArm(hw.startPos());\n waitForStart();\n while (opModeIsActive()) {\n \n /*Starting close to the bridge on the building side\n Move under the bridge and push into the wall*/\n rd.moveDist(RobotDrive.Direction.LEFT,2,.5);\n rd.moveDist(RobotDrive.Direction.FORWARD, 10, .5);\n break;\n }\n }", "protected AutonomousMode() {\n driveMotions = new Vector();\n auxMotions = new Vector();\n }", "@Override\n public void robotInit() {\n m_chooser.setDefaultOption(\"Default Auto\", kDefaultAuto);\n m_chooser.addOption(\"My Auto\", kCustomAuto);\n SmartDashboard.putData(\"Auto choices\", m_chooser);\n SmartDashboard.putData(leftMotor1);\n SmartDashboard.putData(leftMotor2);\n SmartDashboard.putData(rightMotor1);\n SmartDashboard.putData(rightMotor2);\n SmartDashboard.putData(firstMotor);\n SmartDashboard.putData(secondMotor);\n \n\n\n\n }", "@Override\n public void runOpMode() {\n telemetry.addData(\"Status\", \"Simple Ready to run\"); //\n telemetry.update();\n telemetry.addData(\"Status\", \"Initialized\");\n\n /**\n * Initializes the library functions\n * Robot hardware and motor functions\n */\n robot = new Robot_1617(hardwareMap);\n motorFunctions = new MotorFunctions(-1, 1, 0, 1, .05);\n\n //servo wheels are flipped in configuration file\n robot.servoLeftWheel.setPosition(.45);\n robot.servoRightWheel.setPosition(.25);\n\n robot.servoLeftArm.setPosition(0);\n robot.servoRightArm.setPosition(0.7);\n\n robot.servoFlyAngle.setPosition(1);\n\n robot.servoElbow.setPosition(0.95);\n robot.servoShoulder.setPosition(0.1);\n\n robot.servoFeed.setPosition(.498);\n\n robot.servoPlaid.setPosition(.85);\n\n telemetry.addData(\"Servos: \", \"Initialized\");\n // Wait for the game to start (driver presses PLAY)\n waitForStart();\n\n sleep(5000);\n robot.motorLift.setPower(0);\n robot.servoFlyAngle.setPosition(0);\n sleep(500);\n robot.motorFlyLeft.setPower(.9);\n robot.motorFlyRight.setPower(1);\n sleep(250);\n robot.motorIntakeElevator.setPower(1);\n robot.servoFeed.setPosition(-1);\n telemetry.addData(\"Status\", \"Shooting\"); //\n telemetry.update();\n sleep(5000);\n robot.motorFlyLeft.setPower(0);\n robot.motorFlyRight.setPower(0);\n// sleep(5000); //no idea why this is here\n robot.motorIntakeElevator.setPower(0);\n robot.servoFeed.setPosition(.1);\n sleep(250);\n\n telemetry.addData(\"Status\", \"Driving\");\n telemetry.update();\n encoderDrive(1.0, 30, 30, 1);\n\n encoderDrive(1.0, 35, 35, 1);\n }", "public Atendiendo(Robot robot){\n this.robot = robot;\n }", "public void autonomous() {\n /*myRobot.setSafetyEnabled(false);\n myRobot.drive(-0.5, 0.0);\t// drive forwards half speed\n Timer.delay(2.0);\t\t// for 2 seconds\n myRobot.drive(0.0, 0.0);\t// stop robot\n */\n \t/*gyro.reset();\n \twhile(isAutonomous()){\n \t\tdouble angle = gyro.getAngle();\n \tmyRobot.drive(0, -angle * Kp);\t\n \tTimer.delay(.004);\n \t}\n \tmyRobot.drive(0.0, 0.0);\n \t*/\n }", "@Override\n\tpublic void testPeriodic(IRobot robot) {\n\t}", "@Override\npublic void teleopPeriodic() {\nm_robotDrive.arcadeDrive(m_stick.getRawAxis(5)* (-0.5), m_stick.getRawAxis(4)*0.5);\n}", "@Override\n\tpublic void robotInit() {\n\t\toi = new OI();\n\t\t\n\t\t// chooser.addObject(\"My Auto\", new MyAutoCommand());\n\t\tSmartDashboard.putData(\"Auto mode\", chooser);\n\t\tSystem.out.println(\"I am here\");\n\t\ttopRight = new CANTalon(1);\n\t\tmiddleRight = new CANTalon(3);\n\t\tbottomRight = new CANTalon(2);\n\t\ttopLeft = new CANTalon(5);\n\t\tmiddleLeft = new CANTalon(6);\n\t\tbottomLeft = new CANTalon(7);\n\t\tclimber = new CANTalon(4);\n\t\tshifter = new DoubleSolenoid(2,3);\n\t\tshifter.set(Value.kForward);\n\t\tbucket= new DoubleSolenoid(0, 1);\n\t\tclimber.reverseOutput(true);\n\t\t//Setting Followers\n\t\t//topRight is Right Side Master (TalonSRX #1)0.062, 0.00062, 0.62)\n\t\t//middleRight.reset();\n//\t\tmiddleRight.setProfile(0);\n//\t\tmiddleRight.setPID( 0.0, 0.0, 0.0);//TODO: make multiple profiles\n\t\t\n//\t\tmiddleRight.setFeedbackDevice(FeedbackDevice.CtreMagEncoder_Absolute);\n//\t\tmiddleRight.setEncPosition(0);\n//\t\tmiddleRight.setAllowableClosedLoopErr(10);\n\t\tmiddleRight.reverseSensor(true);\n//\t\tmiddleRight.configNominalOutputVoltage(+0f, -0f);\n//\t\tmiddleRight.configPeakOutputVoltage(+12f, -12f);\n\t\ttopRight.changeControlMode(TalonControlMode.Follower);\n\t\ttopRight.set(middleRight.getDeviceID());\n\t\ttopRight.reverseOutput(true);\n\t\tbottomRight.changeControlMode(TalonControlMode.Follower); //TalonSRX #3\n\t\tbottomRight.set(middleRight.getDeviceID());\n//\t\tmiddleRight.setProfile(1);\n//\t\tmiddleRight.setPID( 0.0, 0.0, 0.0);\n\t\t//climber is the climber Motor (TalonSRX #4)\n\t\t//TopLeft is Right Side Master (TalonSRX #5)\n\t\t//middleLeft.reset();\n\t\t//middleLeft.setProfile(0);\n//\t\tmiddleLeft.setPID(0.0, 0.00, 0.0);\n//\t\tmiddleLeft.setEncPosition(0);\n//\t\tmiddleLeft.setFeedbackDevice(FeedbackDevice.CtreMagEncoder_Absolute);\n//\t\tmiddleLeft.configNominalOutputVoltage(+0f, -0f);\n//\t\tmiddleLeft.configPeakOutputVoltage(+12f, -12f);\n\t\tmiddleLeft.reverseSensor(false);\n//\t\tmiddleLeft.setAllowableClosedLoopErr(10);\n\t\ttopLeft.changeControlMode(TalonControlMode.Follower); //TalonSRX #6\n\t\ttopLeft.set(middleLeft.getDeviceID());\n\t\ttopLeft.reverseOutput(true);\n\t\tbottomLeft.changeControlMode(TalonControlMode.Follower); //TalonSRX #7\n\t\tbottomLeft.set(middleLeft.getDeviceID());\n//\t\tmiddleLeft.setProfile(1);\n//\t\tmiddleLeft.setPID(0, 0, 0);\n\t\t//Sensors\n\t\timu = new ADIS16448IMU();\n\t\tclimberSubsystem = new ClimberSubsystem();\n\t\tbucketSubsystem = new BucketSubsystem();\n\t\tdriveSubsystem = new DriveSubsystem();\n\t}", "protected void initialize() {\n \t starttime = Timer.getFPGATimestamp();\n \tthis.startAngle = RobotMap.navx.getAngle();\n \tangleorientation.setSetPoint(RobotMap.navx.getAngle());\n \t\n \tRobotMap.motorLeftTwo.enableControl();\n \tRobotMap.motorRightTwo.enableControl();\n \tRobotMap.motorLeftTwo.enableControl();\n \tRobotMap.motorRightTwo.enableControl();\n \n //settting talon control mode\n \tRobotMap.motorLeftTwo.changeControlMode(TalonControlMode.MotionMagic);\t\t\n\t\tRobotMap.motorLeftOne.changeControlMode(TalonControlMode.Follower);\t\n\t\tRobotMap.motorRightTwo.changeControlMode(TalonControlMode.MotionMagic);\t\n\t\tRobotMap.motorRightOne.changeControlMode(TalonControlMode.Follower);\n\t\t//setting peak and nominal output voltage for the motors\n\t\tRobotMap.motorLeftTwo.configPeakOutputVoltage(+12.0f, -12.0f);\n\t\tRobotMap.motorLeftTwo.configNominalOutputVoltage(0.00f, 0.0f);\n\t\tRobotMap.motorRightTwo.configPeakOutputVoltage(+12.0f, -12.0f);\n\t\tRobotMap.motorRightTwo.configNominalOutputVoltage(0.0f, 0.0f);\n\t\t//setting who is following whom\n\t\tRobotMap.motorLeftOne.set(4);\n\t\tRobotMap.motorRightOne.set(3);\n\t\t//setting pid value for both sides\n\t//\tRobotMap.motorLeftTwo.setCloseLoopRampRate(1);\n\t\tRobotMap.motorLeftTwo.setProfile(0);\n\t RobotMap.motorLeftTwo.setP(0.000014f);\n \tRobotMap.motorLeftTwo.setI(0.00000001);\n\t\tRobotMap.motorLeftTwo.setIZone(0);//325);\n\t\tRobotMap.motorLeftTwo.setD(1.0f);\n\t\tRobotMap.motorLeftTwo.setF(this.fGainLeft+0.014);//0.3625884);\n\t\tRobotMap.motorLeftTwo.setAllowableClosedLoopErr(0);//300);\n\t\t\n\t RobotMap.motorRightTwo.setCloseLoopRampRate(1);\n\t RobotMap.motorRightTwo.setProfile(0);\n\t\tRobotMap.motorRightTwo.setP(0.000014f);\n\t\tRobotMap.motorRightTwo.setI(0.00000001);\n\t\tRobotMap.motorRightTwo.setIZone(0);//325);\n\t\tRobotMap.motorRightTwo.setD(1.0f);\n\t\tRobotMap.motorRightTwo.setF(this.fGainRight);// 0.3373206);\n\t\tRobotMap.motorRightTwo.setAllowableClosedLoopErr(0);//300);\n\t\t\n\t\t//setting Acceleration and velocity for the left\n\t\tRobotMap.motorLeftTwo.setMotionMagicAcceleration(125);\n\t\tRobotMap.motorLeftTwo.setMotionMagicCruiseVelocity(250);\n\t\t//setting Acceleration and velocity for the right\n\t\tRobotMap.motorRightTwo.setMotionMagicAcceleration(125);\n\t\tRobotMap.motorRightTwo.setMotionMagicCruiseVelocity(250);\n\t\t//resets encoder position to 0\t\t\n\t\tRobotMap.motorLeftTwo.setEncPosition(0);\n\t\tRobotMap.motorRightTwo.setEncPosition(0);\n\t //Set Allowable error for the loop\n\t\tRobotMap.motorLeftTwo.setAllowableClosedLoopErr(300);\n\t\tRobotMap.motorRightTwo.setAllowableClosedLoopErr(300);\n\t\t\n\t\t//sets desired endpoint for the motors\n RobotMap.motorLeftTwo.set(motionMagicEndPoint);\n RobotMap.motorRightTwo.set(-motionMagicEndPoint );\n \t\n }", "@Override\n\tpublic void robotInit() //starts once when the code is started\n\t{\n\t\tm_oi = new OI(); //further definition of OI\n\t\t\n\t\t// chooser.addObject(\"My Auto\", new MyAutoCommand());\n\t\t//SmartDashboard.putData(\"Auto mode\", m_chooser);\n\t\t\n\t\tnew Thread(() -> {\n\t\t\tUsbCamera camera1 = CameraServer.getInstance().startAutomaticCapture();\n\t\t\tcamera1.setResolution(640, 480);\n\t\t\tcamera1.setFPS(30);\n\t\t\tcamera1.setExposureAuto();\n\t\t\t\n\t\t\tCvSink cvSink = CameraServer.getInstance().getVideo();\n\t\t\tCvSource outputStream = CameraServer.getInstance().putVideo(\"Camera1\", 640, 480); \n\t\t\t//set up a new camera with this name in SmartDashboard (Veiw->Add->CameraServer Stream Viewer)\n\t\t\t\n\t\t\tMat source = new Mat();\n\t\t\tMat output = new Mat();\n\t\t\t\n\t\t\twhile(!Thread.interrupted())\n\t\t\t{\n\t\t\t\tcvSink.grabFrame(source);\n\t\t\t\tImgproc.cvtColor(source, output, Imgproc.COLOR_BGR2RGB);//this will show the video in black and white \n\t\t\t\toutputStream.putFrame(output);\n\t\t\t}\t\t\t\t\t\n\t\t}).start();//definition of camera, runs even when disabled\n\t\t\n\t\tdriveStick = new Joystick(0); //further definition of joystick\n\t\tgyroRotate.gyroInit(); //initializing the gyro - in Rotate_Subsystem\n\t\tultrasonic = new Ultrasonic_Sensor(); //further definition of ultrasonic\n\t\tRobotMap.encoderLeft.reset();\n\t\tRobotMap.encoderRight.reset();\n\t\tdriveToDistance.controllerInit();\n\t}", "Lift(final Robot ROBOT)\n {\n _robot = ROBOT;\n }", "public static void IAmFalconBot() {\n // How many encoder clicks per revolution (change to 2048 for falcon 500\n // encoders)\n encoderUnitsPerShaftRotation = 2048;\n // with 6 in wheels estimate 10 feet = 13038 encoder ticks\n\n // The difference between the left and right side encoder values when the robot\n // is rotated 180 degrees\n encoderUnitsPerRobotRotation = 3925;// thats the SUM of the two (this is just a rough guess)\n //these values are just guesses at the moment\n cruiseVelocity = 2250;\n acceleration = 2250;\n // Allowable error to exit movement methods\n defaultAcceptableError = 250;\n\n shooterPanMotorEncoderTicksPerRotation = 3977;\n //TODO: may need to be negative if turns the wrong way\n shooterPanSpeed = 1;\n System.out.println(\"I AM FALCONBOT! CACAW! CACAAAAAWWWWW!\");\n }", "public void robotInit() {\n System.out.println(\"Default robotInit() method... Override me!\");\n }", "@Override\n public void robotInit() {\n // Instantiate our RobotContainer. This will perform all our button bindings, and put our\n // autonomous chooser on the dashboard.\n m_robotContainer = new RobotContainer();\n \n left_motor_1= new CANSparkMax(2,MotorType.kBrushless);\n left_motor_2=new CANSparkMax(3,MotorType.kBrushless);\n right_motor_1=new CANSparkMax(5,MotorType.kBrushless);\n right_motor_2=new CANSparkMax(6,MotorType.kBrushless);\n ball_collection_motor=new CANSparkMax(4,MotorType.kBrushless);\n left_high_eject=new CANSparkMax(1, MotorType.kBrushless);\n right_high_eject=new CANSparkMax(7,MotorType.kBrushless);\n left_belt=new TalonSRX(9);\n right_belt=new TalonSRX(11);\n left_low_eject=new TalonSRX(8);\n right_low_eject=new TalonSRX(12);\n double_solenoid_1=new DoubleSolenoid(0,1);\n joystick=new Joystick(1);\n servo=new Servo(0);\n if_correted=false;\n xbox_controller=new XboxController(0);\n servo_angle=1;\n eject_speed=0;\n go_speed=0;\n turn_speed=0;\n high_eject_run=false;\n clockwise=false;\n left_motor_1.restoreFactoryDefaults();\n left_motor_2.restoreFactoryDefaults();\n right_motor_1.restoreFactoryDefaults();\n right_motor_2.restoreFactoryDefaults();\n \n left_motor_2.follow(left_motor_1);\n right_motor_1.follow(right_motor_2);\n servo.set(0);\n currentServoAngle = 0;\n factor = 0.01;\n pushed = false;\n //right_high_eject.follow(left_high_eject);\n //right_low_eject.follow(left_low_eject);\n\n }", "@Override\n public void teleopPeriodic() {\n Scheduler.getInstance().run();\n // ros_string = workingSerialCom.read();\n // yavuz = workingSerialCom.StringConverter(ros_string, 2);\n // Inverse.Inverse(yavuz);\n\n // JoystickDrive.execute();\n\n\n\n // ros_string = workingSerialCom.read();\n // alt_yurur = workingSerialCom.StringConverter(ros_string, 1);\n // robot_kol = workingSerialCom.StringConverter(ros_string, 2);\n Full.Full(yavuz);\n \n }", "@Override\n public void robotInit() {\n SmartDashboard.putBoolean(\"CLIMB\", false);\n SmartDashboard.putNumber(\"servo\", 0);\n // Instantiate our RobotContainer. This will perform all our button bindings, and put our\n // autonomous chooser on the dashboard.\n m_robotContainer = new RobotContainer();\n //coast.\n if (RobotMap.DRIVE_TRAIN_DRAGON_FLY_IS_AVAILABLE)\n getRobotContainer().getDriveTrain().setCANSparkMaxMotorsState(false, RobotMap.DRIVE_TRAIN_MIDDLE_WHEEL_PORT);\n\n getRobotContainer().configureButtonBindings();\n getRobotContainer().getTecbotSensors().initializeAllSensors();\n getRobotContainer().getTecbotSensors().getTecbotGyro().reset();\n\n Robot.getRobotContainer().getDriveTrain().setCANSparkMaxMotorsState(true, RobotMap.DRIVE_TRAIN_MIDDLE_WHEEL_PORT);\n Robot.getRobotContainer().getDriveTrain().setCANSparkMaxMotorsState(true, RobotMap.DRIVE_TRAIN_LEFT_CHASSIS_PORTS);\n Robot.getRobotContainer().getDriveTrain().setCANSparkMaxMotorsState(true, RobotMap.DRIVE_TRAIN_RIGHT_CHASSIS_PORTS);\n\n UsbCamera camera = CameraServer.getInstance().startAutomaticCapture();\n camera.setResolution(640, 480);\n\n m_chooser.addOption(\"Move 3 m\", new SpeedReductionStraight(3, .75, 0));\n m_chooser.addOption(\"Rotate 90 degrees\", new SpeedReductionTurn(90, .5));\n m_chooser.setDefaultOption(\"El chido\", new DR01D3K4());\n m_chooser.addOption(\"Collect, go back and shoot\", new CollectPowerCellsGoBackShoot());\n m_chooser.addOption(\"Transport\", new SequentialCommandGroup(new FrontIntakeSetRaw(.75),\n new TransportationSystemSetRaw(.5)));\n m_chooser.addOption(\"Shoot 3PCs n' Move\", new SHOOT_3_PCs_N_MOVE());\n SmartDashboard.putData(\"Auto Mode\", m_chooser);\n\n //camera.setExposureManual(79);\n\n\n }", "@Override\n\tpublic void robotInit() {\n\t\tdrive = new Drive();\n\t\tintake = new Intake();\n\t\tshooter = new Shooter();\n\t\taimShooter = new AimShooter();\n\t\tvision = new Vision();\n\t\tintakeRoller = new IntakeRoller();\n\t\taManipulators = new AManipulators();\n\t\tshooterLock = new ShooterLock();\n\n\t\t// autochooser\n\t\t// autoChooser = new SendableChooser();\n\n\t\toi = new OI();\n\t\t// instantiate the command used for the autonomous period\n\t\tlowGearCommand = new LowGear();\n\n\t\t// auto chooser commands\n\t\t// autoChooser.addDefault(\"FarLeftAuto\", new FarLeftAuto());\n\t\t// autoChooser.addObject(\"MidLeftAuto\", new MidLeftAuto());\n\t\t// autoChooser.addObject(\"MidAuto\", new MidAuto());\n\t\t// autoChooser.addObject(\"MidRightAuto\", new MidRightAuto());\n\t\t// autoChooser.addObject(\"FarRightAuto\", new FarRightAuto());\n\t\t// autoChooser.addObject(\"Uber Auto\", new UberAuto());\n\t\t// autoChooser.addObject(\"Paper Weight\", new PaperWeightAuto());\n\t\t//\n\t\t// SmartDashboard.putData(\"Autonomous\", autoChooser);\n\n\t\t// autonomousCommand = (Command) autoChooser.getSelected();\n\t\tautonomousCommand = new FarLeftAuto();\n\t\t// autonomousCommand = new MidAuto();\n\t\t// CameraServer.getInstance().startAutomaticCapture(\"cam3\");\n\t\t// autonomousCommand = new FarLeftAuto\n\n\t\tpovUpTrigger.whenActive(new MoveActuatorsUp());\n\t\tpovDownTrigger.whenActive(new MoveActuatorsDown());\n\t}", "public GetInRangeAndAimCommand() {\n xController = new PIDController(0.1, 1e-4, 1);\n yController = new PIDController(-0.1, 1e-4, 1);\n xController.setSetpoint(0);\n yController.setSetpoint(0);\n // xController.\n drive = DrivetrainSubsystem.getInstance();\n limelight = Limelight.getInstance();\n // Use addRequirements() here to declare subsystem dependencies.\n addRequirements(drive);\n\n }", "@Override\n\tpublic void teleopPeriodic() {\n\t\tSmartDashboard.putString(\"DT Current Command\", \" \");\n\t\tSmartDashboard.putString(\"SHOOTER Current Command\", \" \");\n\t\tSmartDashboard.putString(\"SHOOTERPIVOT Current Command\", \" \");\n\t\tSmartDashboard.putString(\"INTAKE Current Command\", \" \");\n\t\t\n\t\tScheduler.getInstance().run();\n//\t\t\n//\t\tRobot.drivetrain.leftLED.set(true);\n//\t\tRobot.drivetrain.rightLED.set(false);\n\n\t\tif(!autoAiming) {\n\t\t\tnew DriveForwardRotate(correctForDeadZone(oi.driver.getForward()), correctForDeadZone(oi.driver.getRotation())).start();\n\t\t}\n\t\t//new DriveForwardRotate(oi.driver.getForward(), oi.driver.getRotation()).start();\n\t\t\n\t\tif(oi.autoAim() && !prevStateAutoAim){\n\t\t\t//new SetPivotPosition(PivotPID.AUTO_CAMERA_AIM_POSITION).start(\n//\t\t\tnew AutoAim().start();\n\t\t\tnew AutoAim(TurnConstants.AIM_VELOCITY).start(); //this is a press and hold button 3 on joystick\n\t\t\t\n\t\t}\n\t\t\n\t\tif (readyToShoot && oi.operator.shootBallFlywheels() && oi.operator.shoot()){\n//\t\t\tSystem.out.println(\"SHOOT THE SHOOTER -- ready to shoot\");\n\t\t\tnew ShootTheShooter().start();\n\t\t}\n\t\t\n\t\t\n\t\t//INTAKE ------2 button\n\t\tif (oi.operator.intakeUp() && !prevStateIntakeUp){\n\t\t\tnew SetIntakePosition(IntakeSubsystem.UP).start();\n\t\t}\n\t\tif (oi.operator.intakeDeploy() && !prevStateIntakeDeployed){\n\t\t\tnew SetIntakePosition(!IntakeSubsystem.UP).start();\n\t\t}\n\t\t\n\t\t//CAMERA PISTON\n\t\t\n\t\t//move up\n\t\tif (oi.driver.isCameraUpPressed()){\n\t\t\tnew SetCameraPiston(CameraSubsystem.CAM_UP).start();\n\t\t}\n\t\telse{\n\t\t\tnew SetCameraPiston(!CameraSubsystem.CAM_UP).start();\n\t\t}\n\t\t\n//\t\tif (oi.driver.isCameraUpPressed() && !prevStateCameraUp){\n//\t\t\tnew SetCameraPiston(cameraUp ? !CameraSubsystem.CAM_UP : CameraSubsystem.CAM_UP).start();\n//\t\t\tcameraUp = !cameraUp;\n//\t\t}\n//\t\telse{\n//\t\t\tnew SetCameraPiston(cameraUp ? CameraSubsystem.CAM_UP : !CameraSubsystem.CAM_UP).start();\n//\t\t}\n\t\t\n\t\t\n\t\tif (oi.operator.isSemiAutonomousIntakePressed() && !prevStateSemiAutoIntake){\n\t\t\tnew SemiAutoLoadBall().start();\n\t\t}\n//\t\t\n\t\t\n\t\t//pivot state\n//\t\tif (oi.operator.pivotShootState() && !prevStatePivotUp){\n//\t\t\tnew SetPivotState(ShooterPivotSubsystem.PivotPID.FAR_SHOOT_STATE).start();\n//\t\t}\n//\t\telse if(oi.operator.resetPivot() && !prevStateResetButton) {\n//\t\t\t new ResetPivot().start();\n//\t\t}\n//\t\telse if (oi.operator.pivotStoreState() && !prevStatePivotMiddle){\n//\t\t\tnew SetPivotState(ShooterPivotSubsystem.PivotPID.STORING_STATE).start();\n//\t\t}\n\t\t\n\t\t//PIVOT\n\t\t\n\t\t//if going up\n\t\tif (oi.operator.pivotCloseShot() && !prevStatePivotCloseShot){\n\t\t\tnew SetPivotState(ShooterPivotSubsystem.PivotPID.CLOSE_SHOOT_STATE).start();\t\t\n\t\t}\n\t\t//if going down\n\t\telse if(oi.operator.pivotFarShot() && !prevStatePivotFarShot) {\n\t\t\tnew SetPivotState(ShooterPivotSubsystem.PivotPID.FAR_SHOOT_STATE).start();\n\t\t}\n\t\telse if (oi.operator.pivotStoreState()&& !prevStateStore){\n\t\t\tnew SetPivotState(ShooterPivotSubsystem.PivotPID.STORING_STATE).start();\n\t\t}\n\t\telse if (oi.operator.pivotReset() && !prevStateResetSafety){\n\t\t\tnew ResetPivot().start();\n\t\t}\n\t\telse if (oi.driver.isDefenseShot() && prevStateDefenseShot){\n\t\t\tnew SetPivotPosition(ShooterPivotSubsystem.PivotPID.ANTI_DEFENSE_POSITION).start();\n\t\t}\n\t\n\t\t\n\t\tif (!semiAutoIsRunning){\n//\t\t\n\t\t\t//intake purging/running\n\t\t\tif(oi.operator.purgeIntake()) {\n\t\t\t\t//new SetIntakeSpeed(IntakeSubsystem.FORWARD_ROLLER_PURGE_SPEED, IntakeSubsystem.CENTERING_MODULE_PURGE_SPEED).start(); \n\t\t\t\tnew RunAllRollers(ShooterSubsystem.OUT, !ShooterSubsystem.UNTIL_IR).start();\n\t\t\t\tallIntakeRunning = true;\n\t\t\t} else if (oi.operator.runIntake()) {\n\t\t\t\t//new SetIntakeSpeed(IntakeSubsystem.FORWARD_ROLLER_INTAKE_SPEED, IntakeSubsystem.CENTERING_MODULE_INTAKE_SPEED).start();\n\t\t\t\tnew RunAllRollers(ShooterSubsystem.IN, ShooterSubsystem.UNTIL_IR).start();\n//\t\t\t\tnew SemiAutoLoadBall().start();\n\t\t\t\tallIntakeRunning = true;\n\t\t\t} else {\n\t\t\t\t//just the intakes off here to avoid conflicts\n\t\t\t\tnew SetIntakeSpeed(IntakeSubsystem.INTAKE_OFF_SPEED, IntakeSubsystem.INTAKE_OFF_SPEED).start();\n\t\t\t\t//new EndSemiAuto(true).start();\n\t\t\t\t//new RunAllRollers(ShooterSubsystem.OFF, !ShooterSubsystem.UNTIL_IR).start();\n\t\t\t\tallIntakeRunning = false;\n\t\t\t}\n\t\t\t\n\t\t\t//flywheel control\n\t\t\tif (!allIntakeRunning){\n//\t\t\t\tif(oi.operator.loadBallFlywheels()){\n//\t\t\t\t\tnew SetFlywheels(ShooterSubsystem.FLYWHEEL_INTAKE_POWER, -ShooterSubsystem.FLYWHEEL_INTAKE_POWER).start();;\n//\t\t\t\t\tflywheelShootRunning = true;\n//\t\t\t\t} else \n\t\t\t\tif(oi.operator.shootBallFlywheels()) {\n\t\t\t\t\t//new SetFlywheels(0.7, -0.7).start();\n\t\t\t\t\tnew BangBangFlywheels(true).start();\n\t\t\t\t\tflywheelShootRunning = true;\n\t\t\t\t} else {\n\t\t\t\t\t//new SetFlywheels(0, 0).start();//BangBangFlywheels(false).start();\n\t\t\t\t\tflywheelShootRunning = false;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n//\t\t\tif(oi.operator.shoot()){\n//\t\t\t\tnew ShooterSet(DoubleSolenoid.Value.kForward).start();\n//\t\t\t} else {\n//\t\t\t\tnew ShooterSet(DoubleSolenoid.Value.kReverse).start();\n//\t\t\t}\n//\t\t\t\n\t\t\tif (!allIntakeRunning && !flywheelShootRunning){\n\t\t\t\tnew SetFlywheels(0, 0).start();\n\t\t\t}\n\t\t\t\n\t\t\t//DEFENSE STATE\n\t\t\tif (oi.operator.isDefenseState() && !prevStateDefenseMode){\n\t\t\t\tnew SetDefenseMode().start();\n\t\t\t}\n\t\t}\n\t\t//tells us if bang bang works\n\t\treadyToShoot = ((Math.abs(shooter.getRightFlywheelRPM() - ShooterSubsystem.flywheelTargetRPM) < ShooterSubsystem.flywheelTolerance)\n\t\t\t\t&& (Math.abs(shooter.getLeftFlywheelRPM() - ShooterSubsystem.flywheelTargetRPM) < ShooterSubsystem.flywheelTolerance));\n\t\t\n\t\t\n\t\tif (oi.operator.isManualFirePiston() && !prevStateManualFirePiston){\n//\t\t\tSystem.out.println(\"SHOOT THE SHOOTER -- manual\");\n\t\t\tnew ShootTheShooter().start();\n\t\t}\n\t\t\n\t\t\n\t\tif(oi.driver.isDrivetrainHighGearButtonPressed()){\n\t\t\tdrivetrain.shift(DrivetrainSubsystem.HIGH_GEAR);\n\t\t\tcurrentGear = DrivetrainSubsystem.HIGH_GEAR;\n\t\t} else {\n\t\t\tdrivetrain.shift(!DrivetrainSubsystem.HIGH_GEAR);\n\t\t\tcurrentGear = !DrivetrainSubsystem.HIGH_GEAR;\n\t\t}\n\t\t\n\t\tisManualPressed = oi.operator.isManualOverrideOperator();\n\t\t\n\t\tif (!shooterPIDIsRunning){\n\t\t\tif(isManualPressed) {\n\t\t\t\tdouble pivotPower = oi.operator.getManualPower()/2.0;\n\t\t\t\t//shooterPivot.engageBrake(false);\n\t\t\t\tif (pivotPower > 0 && shooterPivot.pastMax() || pivotPower < 0 && shooterPivot.lowerLimitsTriggered()){\n\t\t\t\t\tpivotPower = 0;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tnew SetPivotPower(pivotPower).start();\n\t\t\t}\n\t\t\telse{\n\t\t\t\tnew SetPivotPower(0).start();\n\t\t\t}\n\t\t}\n\t\t\n//\t\tSystem.out.println(\"Left: \" + Robot.drivetrain.motors[2].get() + \", Right: \" + (-Robot.drivetrain.motors[0].get()));\n//\t\tSystem.out.println(\"Left V: \" + Robot.drivetrain.leftEncoder.getRate() + \", Right V: \" + Robot.drivetrain.rightEncoder.getRate());\n//\t\tSystem.out.println(\"Accel z: \" + Robot.drivetrain.accel.getZ());\n\t\t\n\t\t\n\t\t//PREV STATES\n\t\tprevStateIntakeUp = oi.operator.intakeUp();\n\t\tprevStateIntakeDeployed = oi.operator.intakeDeploy();\n\t\tprevStateDriveShifter = oi.driver.isDrivetrainHighGearButtonPressed();\n\t\tprevStateShootButton = oi.operator.shoot();\n\t\t\n\t\tprevStatePivotCloseShot = oi.operator.pivotCloseShot();\n\t\tprevStatePivotFarShot = oi.operator.pivotFarShot();\n\t\tprevStateStore = oi.operator.pivotStoreState();\n\t\tprevStateResetSafety = oi.operator.pivotReset();\n\t\t\n\t\tprevStateSemiAutoIntake = oi.operator.isSemiAutonomousIntakePressed();\n\t\tprevStateDefenseMode = oi.operator.isDefenseState();\n\t\t\n\t\tprevStateManualFirePiston = oi.operator.isManualFirePiston();\n\t\tprevStateCameraUp = oi.driver.isCameraUpPressed();\n\t\tprevStateAutoAim = oi.autoAim();\n\t\tprevStateDefenseShot = oi.driver.isDefenseShot();\n\n\t\t\n\t\t//********updating subsystem*******//\n\t\t\n\t\t//shooter hal effect counter\n\t\t//shooterPivot.updateHalEffect();\n\t\t\n\t\t//update the flywheel speed constants\n\t\tshooter.updateShooterConstants();\n\t\t\n\t\t\n\t\t//brake\n\t\tif (!isManualPressed){ //if manual override isn't running\n\t\t\tif (!shooterPIDIsRunning && shooterPivot.motorLeft.get() < DEAD_ZONE_TOLERANCE && shooterPivot.motorRight.get() < DEAD_ZONE_TOLERANCE){\n\t\t\t\t\n\t\t\t\tif (pivotTimer.get() > MIN_STOPPED_TIME){\n\t\t\t\t\tnew EngageBrakes().start();\n\t\t\t\t}\n\t\t\t\t//if motor is 0 for the first time, start the timer\n\t\t\t\tif (!prevStateMotorPowerIs0){\n\t\t\t\t\tpivotTimer.reset();\n\t\t\t\t\tpivotTimer.start();\n\t\t\t\t}\n\t\t\t\t//keep this at the end\n\t\t\t\tprevStateMotorPowerIs0 = true;\n\t\t\t}\n\t\t\telse{\n\t\t\t\tshooterPivot.engageBrake(false);\n\t\t\t\t//keep this at the end\n\t\t\t\tpivotTimer.reset();\n\t\t\t\tprevStateMotorPowerIs0 = false;\n\t\t\t}\n\t\t}\n\t\telse{\n\t\t\tshooterPivot.engageBrake(false);\n\t\t\tpivotTimer.reset();\n\t\t}\n\t\t//System.out.println(shooterPivot.motorLeft.get());\n\t\t\n\t\t//LOGGING AND DASHBOARD\n\t\tlogAndDashboard();\n\t}", "public static void init() {\n driveLeft = new VictorSP(1);\r\n LiveWindow.addActuator(\"Drive\", \"Left\", (VictorSP) driveLeft);\r\n \r\n driveRight = new VictorSP(0);\r\n LiveWindow.addActuator(\"Drive\", \"Right\", (VictorSP) driveRight);\r\n \r\n driveMotors = new RobotDrive(driveLeft, driveRight);\r\n \r\n driveMotors.setSafetyEnabled(false);\r\n driveMotors.setExpiration(0.1);\r\n driveMotors.setSensitivity(0.5);\r\n driveMotors.setMaxOutput(1.0);\r\n\r\n driveEncoderLeft = new Encoder(0, 1, true, EncodingType.k1X);\r\n LiveWindow.addSensor(\"Drive\", \"EncoderLeft\", driveEncoderLeft);\r\n driveEncoderLeft.setDistancePerPulse(0.053855829);\r\n driveEncoderLeft.setPIDSourceType(PIDSourceType.kRate);\r\n driveEncoderRight = new Encoder(2, 3, false, EncodingType.k1X);\r\n LiveWindow.addSensor(\"Drive\", \"EncoderRight\", driveEncoderRight);\r\n driveEncoderRight.setDistancePerPulse(0.053855829);\r\n driveEncoderRight.setPIDSourceType(PIDSourceType.kRate);\r\n driveFrontSonar = new Ultrasonic(4, 5);\r\n LiveWindow.addSensor(\"Drive\", \"FrontSonar\", driveFrontSonar);\r\n \r\n shooterMotor = new VictorSP(3);\r\n LiveWindow.addActuator(\"Shooter\", \"Motor\", (VictorSP) shooterMotor);\r\n \r\n climberMotor = new Spark(2);\r\n LiveWindow.addActuator(\"Climber\", \"Motor\", (Spark) climberMotor);\r\n \r\n gearGrabReleaseSolonoid = new DoubleSolenoid(0, 0, 1);\r\n LiveWindow.addActuator(\"Gear\", \"GrabReleaseSolonoid\", gearGrabReleaseSolonoid);\r\n \r\n powerPanel = new PowerDistributionPanel(0);\r\n LiveWindow.addSensor(\"Power\", \"Panel\", powerPanel);\r\n \r\n cameraMountpan = new Servo(4);\r\n LiveWindow.addActuator(\"CameraMount\", \"pan\", cameraMountpan);\r\n \r\n cameraMounttilt = new Servo(5);\r\n LiveWindow.addActuator(\"CameraMount\", \"tilt\", cameraMounttilt);\r\n \r\n\r\n // END AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=CONSTRUCTORS\r\n\t\tdriveSonarFront = new SonarMB1010(0);\r\n\t\tLiveWindow.addSensor(\"Drive\", \"SonarFront\", driveSonarFront);\r\n\r\n\t\t//driveGyro = new GyroADXRS453();\r\n\t\tdriveGyro = new ADXRS450_Gyro();\r\n\t\tLiveWindow.addSensor(\"Drive\", \"Gyro\", driveGyro);\r\n\t\tdriveGyro.calibrate();\r\n\t}", "@Override\n public void robotPeriodic() {\n putTelemetry();\n }", "public void action() {\n\t\tsuppressed = false;\r\n\t\tpilot.setLinearSpeed(8);\r\n\t\tpilot.setLinearAcceleration(4);\r\n\t\tColorThread.updatePos = false;\r\n\t\tColorThread.updateCritical = false;\r\n\t\t//create a array to save the map information\r\n\t\tfor (int a = 0; a < 8; a++) {\r\n\t\t\tfor (int b = 0; b < 8; b++) {\r\n\t\t\t\trobot.probability[a][b] = -1;\r\n\t\t\t}\r\n\t\t}\r\n\t\tfor (int a = 0; a < 8; a++) {\r\n\t\t\tfor (int b = 0; b < 8; b++) {\r\n\t\t\t\tif (a == 0 || a == 7 || b == 0 || b == 7) {\r\n\t\t\t\t\trobot.probability[a][b] = 100;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tfor (int a = 0; a < 6; a++) {\r\n\t\t\tfor (int b = 0; b < 6; b++) {\r\n\t\t\t\tif (robot.map[a][b].getOccupied() == 1) {\r\n\t\t\t\t\trobot.probability[a + 1][b + 1] = 100;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t// Step1: use ArrayList to save all of the probability situation.\r\n\t\tfloat front, left, right, back;\r\n\t\tfront = USThread.disSample[0];\r\n\t\trobot.setmotorM(90);\r\n\t\tDelay.msDelay(1000);\r\n\t\tleft = USThread.disSample[0];\r\n\t\trobot.setmotorM(-180);\r\n\t\tDelay.msDelay(1000);\r\n\t\tright = USThread.disSample[0];\r\n\t\trobot.setmotorM(90);\r\n\t\tDelay.msDelay(1000);\r\n\t\trobot.correctHeading(180);\r\n\t\tDelay.msDelay(1000);\r\n\t\tback = USThread.disSample[0];\r\n\t\trobot.correctHeading(180);\r\n\t\tfor (int a = 1; a < 7; a++) {\r\n\t\t\tfor (int b = 1; b < 7; b++) {\r\n\t\t\t\tif (robot.probability[a][b] == -1) {\r\n\t\t\t\t\tif (((robot.probability[a][b + 1] == 100 && front < 0.25)\r\n\t\t\t\t\t\t\t|| (robot.probability[a][b + 1] == -1 && front > 0.25))\r\n\t\t\t\t\t\t\t&& ((robot.probability[a + 1][b] == 100 && right < 0.25)\r\n\t\t\t\t\t\t\t\t\t|| (robot.probability[a + 1][b] == -1 && right > 0.25))\r\n\t\t\t\t\t\t\t&& ((robot.probability[a][b - 1] == 100 && back < 0.25)\r\n\t\t\t\t\t\t\t\t\t|| (robot.probability[a][b - 1] == -1 && back > 0.25))\r\n\t\t\t\t\t\t\t&& ((robot.probability[a - 1][b] == 100 && left < 0.25)\r\n\t\t\t\t\t\t\t\t\t|| (robot.probability[a - 1][b] == -1 && left > 0.25))) {\r\n\t\t\t\t\t\t//direction is north\r\n\t\t\t\t\t\trobot.listOfPro.add(new ProPoint(0, 0, a, b));\r\n\t\t\t\t\t\t//System.out.println(\"0 \"+a+\" \"+b);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (((robot.probability[a + 1][b] == 100 && front < 0.25)\r\n\t\t\t\t\t\t\t|| (robot.probability[a + 1][b] == -1 && front > 0.25))\r\n\t\t\t\t\t\t\t&& ((robot.probability[a][b - 1] == 100 && right < 0.25)\r\n\t\t\t\t\t\t\t\t\t|| (robot.probability[a][b - 1] == -1 && right > 0.25))\r\n\t\t\t\t\t\t\t&& ((robot.probability[a - 1][b] == 100 && back < 0.25)\r\n\t\t\t\t\t\t\t\t\t|| (robot.probability[a - 1][b] == -1 && back > 0.25))\r\n\t\t\t\t\t\t\t&& ((robot.probability[a][b + 1] == 100 && left < 0.25)\r\n\t\t\t\t\t\t\t\t\t|| (robot.probability[a][b + 1] == -1 && left > 0.25))) {\r\n\t\t\t\t\t\t// direction is east\r\n\t\t\t\t\t\trobot.listOfPro.add(new ProPoint(1, 0, a, b));\r\n\t\t\t\t\t\t//System.out.println(\"1 \"+a+\" \"+b);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (((robot.probability[a][b - 1] == 100 && front < 0.25)\r\n\t\t\t\t\t\t\t|| (robot.probability[a][b - 1] == -1 && front > 0.25))\r\n\t\t\t\t\t\t\t&& ((robot.probability[a - 1][b] == 100 && right < 0.25)\r\n\t\t\t\t\t\t\t\t\t|| (robot.probability[a - 1][b] == -1 && right > 0.25))\r\n\t\t\t\t\t\t\t&& ((robot.probability[a][b + 1] == 100 && back < 0.25)\r\n\t\t\t\t\t\t\t\t\t|| (robot.probability[a][b + 1] == -1 && back > 0.25))\r\n\t\t\t\t\t\t\t&& ((robot.probability[a + 1][b] == 100 && left < 0.25)\r\n\t\t\t\t\t\t\t\t\t|| (robot.probability[a + 1][b] == -1 && left > 0.25))) {\r\n\t\t\t\t\t\t// direction is sourth\r\n\t\t\t\t\t\trobot.listOfPro.add(new ProPoint(2, 0, a, b));\r\n\t\t\t\t\t\t//System.out.println(\"2 \"+a+\" \"+b);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (((robot.probability[a - 1][b] == 100 && front < 0.25)\r\n\t\t\t\t\t\t\t|| (robot.probability[a - 1][b] == -1 && front > 0.25))\r\n\t\t\t\t\t\t\t&& ((robot.probability[a][b + 1] == 100 && right < 0.25)\r\n\t\t\t\t\t\t\t\t\t|| (robot.probability[a][b + 1] == -1 && right > 0.25))\r\n\t\t\t\t\t\t\t&& ((robot.probability[a + 1][b] == 100 && back < 0.25)\r\n\t\t\t\t\t\t\t\t\t|| (robot.probability[a + 1][b] == -1 && back > 0.25))\r\n\t\t\t\t\t\t\t&& ((robot.probability[a][b - 1] == 100 && left < 0.25)\r\n\t\t\t\t\t\t\t\t\t|| (robot.probability[a][b - 1] == -1 && left > 0.25))) {\r\n\t\t\t\t\t\t// direction is west\r\n\t\t\t\t\t\trobot.listOfPro.add(new ProPoint(3, 0, a, b));\r\n\t\t\t\t\t\t//System.out.println(\"3 \"+a+\" \"+b);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t//Step 2: use loop to take control of robot walk and check the location correction\r\n\t\tboolean needLoop = true;\r\n\t\tint loopRound = 0;\r\n\t\twhile (needLoop) {\r\n\t\t\t// One of way to leave the loop is at the hospital\r\n\t\t\tif ((ColorThread.leftColSample[0] >= 0.2 && ColorThread.leftColSample[1] < 0.2\r\n\t\t\t\t\t&& ColorThread.leftColSample[1] >= 0.14 && ColorThread.leftColSample[2] <= 0.8)\r\n\t\t\t\t\t&& (ColorThread.rightColSample[0] >= 0.2 && ColorThread.rightColSample[1] < 0.2\r\n\t\t\t\t\t\t\t&& ColorThread.rightColSample[1] >= 0.11 && ColorThread.rightColSample[2] <= 0.08)) {\r\n\t\t\t\trobot.updatePosition(0, 0);\r\n\t\t\t\tint numOfAtYellow = 0;\r\n\t\t\t\tfor (int i = 0; i < robot.listOfPro.size(); i++) {\r\n\t\t\t\t\tif (robot.listOfPro.get(i).getNowX() == 1 && robot.listOfPro.get(i).getNowY() == 1) {\r\n\t\t\t\t\t\tnumOfAtYellow++;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tif(numOfAtYellow == 1) {\r\n\t\t\t\tfor (int i = 0; i < robot.listOfPro.size(); i++) {\r\n\t\t\t\t\tif (robot.listOfPro.get(i).getNowX() == 1 && robot.listOfPro.get(i).getNowY() == 1) {\r\n\t\t\t\t\t\tif (robot.listOfPro.get(i).getNowHeading() == 1) {\r\n\t\t\t\t\t\t\trobot.setDirection(false);\r\n\t\t\t\t\t\t} else if (robot.listOfPro.get(i).getNowHeading() == 2) {\r\n\t\t\t\t\t\t\trobot.setDirection(true);\r\n\t\t\t\t\t\t\trobot.setDirection(true);\r\n\t\t\t\t\t\t} else if (robot.listOfPro.get(i).getNowHeading() == 3) {\r\n\t\t\t\t\t\t\trobot.setDirection(true);\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t// do not to set the heading, because the default value is 0.\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t}else {\r\n\t\t\t\t\t//have two way to go to the yellow part\r\n\t\t\t\t\tfront = USThread.disSample[0];\r\n\t\t\t\t\trobot.setmotorM(90);\r\n\t\t\t\t\tDelay.msDelay(1000);\r\n\t\t\t\t\tleft = USThread.disSample[0];\r\n\t\t\t\t\trobot.setmotorM(-180);\r\n\t\t\t\t\tDelay.msDelay(1000);\r\n\t\t\t\t\tright = USThread.disSample[0];\r\n\t\t\t\t\trobot.setmotorM(90);\r\n\t\t\t\t\tDelay.msDelay(1000);\r\n\t\t\t\t\trobot.correctHeading(180);\r\n\t\t\t\t\tDelay.msDelay(1000);\r\n\t\t\t\t\tback = USThread.disSample[0];\r\n\t\t\t\t\trobot.correctHeading(180);\r\n\t\t\t\t\tDelay.msDelay(1000);\r\n\t\t\t\t\tif(front<0.25 && right<0.25 && left>0.25 && back>0.25) {\r\n\t\t\t\t\t\trobot.setDirection(true);\r\n\t\t\t\t\t\trobot.setDirection(true);\r\n\t\t\t\t\t}else if(front<0.25 && right>0.25 && back>0.25 && left<0.25) {\r\n\t\t\t\t\t\trobot.setDirection(true);\r\n\t\t\t\t\t}else if(front>0.25 && right>0.25 && back<0.25 && left<0.25) {\r\n\t\t\t\t\t\t// do not to set the heading, because the default value is 0.\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\trobot.setDirection(false);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tneedLoop = false;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\t//Another way to leave the loop is the robot arrive the green cell.\r\n\t\t\tif ((ColorThread.leftColSample[0] <= 0.09 && ColorThread.leftColSample[1] >= 0.17\r\n\t\t\t\t\t&& ColorThread.leftColSample[2] <= 0.09)\r\n\t\t\t\t\t&& (ColorThread.rightColSample[0] <= 0.09 && ColorThread.rightColSample[1] >= 0.014\r\n\t\t\t\t\t\t\t&& ColorThread.rightColSample[2] <= 0.11)) {\r\n\t\t\t\trobot.updatePosition(5, 0);\r\n\t\t\t\tint numOfAtGreen = 0;\r\n\t\t\t\tfor (int i = 0; i < robot.listOfPro.size(); i++) {\r\n\t\t\t\t\tif (robot.listOfPro.get(i).getNowX() == 6 && robot.listOfPro.get(i).getNowY() == 1) {\r\n\t\t\t\t\t\tnumOfAtGreen++;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tif(numOfAtGreen==1) {\r\n\t\t\t\t\tfor (int i = 0; i < robot.listOfPro.size(); i++) {\r\n\t\t\t\t\t\tif (robot.listOfPro.get(i).getNowX() == 6 && robot.listOfPro.get(i).getNowY() == 1) {\r\n\t\t\t\t\t\t\tif (robot.listOfPro.get(i).getNowHeading() == 1) {\r\n\t\t\t\t\t\t\t\trobot.setDirection(false);\r\n\t\t\t\t\t\t\t} else if (robot.listOfPro.get(i).getNowHeading() == 2) {\r\n\t\t\t\t\t\t\t\trobot.setDirection(true);\r\n\t\t\t\t\t\t\t\trobot.setDirection(true);\r\n\t\t\t\t\t\t\t} else if (robot.listOfPro.get(i).getNowHeading() == 3) {\r\n\t\t\t\t\t\t\t\trobot.setDirection(true);\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t// do not to set the heading, because the default value is 0.\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}else {\r\n\t\t\t\t\tfront = USThread.disSample[0];\r\n\t\t\t\t\trobot.setmotorM(90);\r\n\t\t\t\t\tDelay.msDelay(1000);\r\n\t\t\t\t\tleft = USThread.disSample[0];\r\n\t\t\t\t\trobot.setmotorM(-180);\r\n\t\t\t\t\tDelay.msDelay(1000);\r\n\t\t\t\t\tright = USThread.disSample[0];\r\n\t\t\t\t\trobot.setmotorM(90);\r\n\t\t\t\t\tDelay.msDelay(1000);\r\n\t\t\t\t\trobot.correctHeading(180);\r\n\t\t\t\t\tDelay.msDelay(1000);\r\n\t\t\t\t\tback = USThread.disSample[0];\r\n\t\t\t\t\trobot.correctHeading(180);\r\n\t\t\t\t\tDelay.msDelay(1000);\r\n\t\t\t\t\tif(front<0.25 && right<0.25 && left>0.25 && back>0.25) {\r\n\t\t\t\t\t\trobot.setDirection(false);\r\n\t\t\t\t\t}else if(front<0.25 && right>0.25 && back>0.25 && left<0.25) {\r\n\t\t\t\t\t\trobot.setDirection(true);\r\n\t\t\t\t\t\trobot.setDirection(true);\r\n\t\t\t\t\t}else if(front>0.25 && right>0.25 && back<0.25 && left<0.25) {\r\n\t\t\t\t\t\trobot.setDirection(true);\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\t// do not to set the heading, because the default value is 0.\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tneedLoop = false;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\t//The third way of leave the loop is the robot have already know his position and direction.\r\n\t\t\tint maxStepNumber = 0;\r\n\t\t\tint numberOfMaxSteps = 0;\r\n\t\t\tfor (int i = 0; i < robot.listOfPro.size(); i++) {\r\n\t\t\t\tif (robot.listOfPro.get(i).getSteps() > maxStepNumber) {\r\n\t\t\t\t\tmaxStepNumber = robot.listOfPro.get(i).getSteps();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tfor (int i = 0; i < robot.listOfPro.size(); i++) {\r\n\t\t\t\tif (robot.listOfPro.get(i).getSteps() == maxStepNumber) {\r\n\t\t\t\t\tnumberOfMaxSteps++;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (numberOfMaxSteps == 1) {\r\n\t\t\t\tfor (int i = 0; i < robot.listOfPro.size(); i++) {\r\n\t\t\t\t\tif (robot.listOfPro.get(i).getSteps() == maxStepNumber) {\r\n\t\t\t\t\t\trobot.updatePosition(robot.listOfPro.get(i).getNowX() - 1,\r\n\t\t\t\t\t\t\t\trobot.listOfPro.get(i).getNowY() - 1);\r\n\t\t\t\t\t\tif (robot.listOfPro.get(i).getNowHeading() == 1) {\r\n\t\t\t\t\t\t\trobot.setDirection(false);\r\n\t\t\t\t\t\t} else if (robot.listOfPro.get(i).getNowHeading() == 2) {\r\n\t\t\t\t\t\t\trobot.setDirection(true);\r\n\t\t\t\t\t\t\trobot.setDirection(true);\r\n\t\t\t\t\t\t} else if (robot.listOfPro.get(i).getNowHeading() == 3) {\r\n\t\t\t\t\t\t\trobot.setDirection(true);\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t// do not to set the heading, because the default value is 0.\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tneedLoop = false;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\t//The below part are the loops.\r\n\t\t\tfront = USThread.disSample[0];\r\n\t\t\trobot.setmotorM(90);\r\n\t\t\tDelay.msDelay(1000);\r\n\t\t\tleft = USThread.disSample[0];\r\n\t\t\trobot.setmotorM(-180);\r\n\t\t\tDelay.msDelay(1000);\r\n\t\t\tright = USThread.disSample[0];\r\n\t\t\trobot.setmotorM(90);\r\n\t\t\tDelay.msDelay(1000);\r\n\t\t\trobot.correctHeading(180);\r\n\t\t\tDelay.msDelay(1000);\r\n\t\t\tback = USThread.disSample[0];\r\n\t\t\trobot.correctHeading(180);\r\n\t\t\tDelay.msDelay(1000);\r\n\t\t\t// move\r\n\t\t\t\r\n\t\t\tif (front > 0.25) {\r\n\t\t\t\trobot.getPilot().travel(25);\r\n\t\t\t\tfor (int i = 0; i < robot.listOfPro.size(); i++) {\r\n\t\t\t\t\tif(robot.listOfPro.get(i).getSteps()==loopRound) {\r\n\t\t\t\t\t\tif (robot.listOfPro.get(i).getNowHeading() == 0) {\r\n\t\t\t\t\t\t\trobot.listOfPro.get(i).setNowY(robot.listOfPro.get(i).getNowY() + 1);\r\n\t\t\t\t\t\t} else if (robot.listOfPro.get(i).getNowHeading() == 1) {\r\n\t\t\t\t\t\t\trobot.listOfPro.get(i).setNowX(robot.listOfPro.get(i).getNowX() + 1);\r\n\t\t\t\t\t\t} else if (robot.listOfPro.get(i).getNowHeading() == 2) {\r\n\t\t\t\t\t\t\trobot.listOfPro.get(i).setNowY(robot.listOfPro.get(i).getNowY() - 1);\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\trobot.listOfPro.get(i).setNowX(robot.listOfPro.get(i).getNowX() - 1);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t} else if (left > 0.25) {\r\n\t\t\t\trobot.correctHeading(-90);\r\n\t\t\t\trobot.getPilot().travel(25);\r\n\t\t\t\tfor (int i = 0; i < robot.listOfPro.size(); i++) {\r\n\t\t\t\t\tif(robot.listOfPro.get(i).getSteps()==loopRound) {\r\n\t\t\t\t\t\tif (robot.listOfPro.get(i).getNowHeading() == 0) {\r\n\t\t\t\t\t\t\trobot.listOfPro.get(i).setNowHeading(3);\r\n\t\t\t\t\t\t\trobot.listOfPro.get(i).setNowX(robot.listOfPro.get(i).getNowX() - 1);\r\n\t\t\t\t\t\t} else if (robot.listOfPro.get(i).getNowHeading() == 1) {\r\n\t\t\t\t\t\t\trobot.listOfPro.get(i).setNowHeading(0);\r\n\t\t\t\t\t\t\trobot.listOfPro.get(i).setNowY(robot.listOfPro.get(i).getNowY() + 1);\r\n\t\t\t\t\t\t} else if (robot.listOfPro.get(i).getNowHeading() == 2) {\r\n\t\t\t\t\t\t\trobot.listOfPro.get(i).setNowHeading(1);\r\n\t\t\t\t\t\t\trobot.listOfPro.get(i).setNowX(robot.listOfPro.get(i).getNowX() + 1);\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\trobot.listOfPro.get(i).setNowHeading(2);\r\n\t\t\t\t\t\t\trobot.listOfPro.get(i).setNowY(robot.listOfPro.get(i).getNowY() - 1);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t} else if (right > 0.25) {\r\n\t\t\t\trobot.correctHeading(90);\r\n\t\t\t\trobot.getPilot().travel(25);\r\n\t\t\t\tfor (int i = 0; i < robot.listOfPro.size(); i++) {\r\n\t\t\t\t\tif(robot.listOfPro.get(i).getSteps()==loopRound) {\r\n\t\t\t\t\t\tif (robot.listOfPro.get(i).getNowHeading() == 0) {\r\n\t\t\t\t\t\t\trobot.listOfPro.get(i).setNowHeading(1);\r\n\t\t\t\t\t\t\trobot.listOfPro.get(i).setNowX(robot.listOfPro.get(i).getNowX() + 1);\r\n\t\t\t\t\t\t} else if (robot.listOfPro.get(i).getNowHeading() == 1) {\r\n\t\t\t\t\t\t\trobot.listOfPro.get(i).setNowHeading(2);\r\n\t\t\t\t\t\t\trobot.listOfPro.get(i).setNowY(robot.listOfPro.get(i).getNowY() - 1);\r\n\t\t\t\t\t\t} else if (robot.listOfPro.get(i).getNowHeading() == 2) {\r\n\t\t\t\t\t\t\trobot.listOfPro.get(i).setNowHeading(3);\r\n\t\t\t\t\t\t\trobot.listOfPro.get(i).setNowX(robot.listOfPro.get(i).getNowX() - 1);\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\trobot.listOfPro.get(i).setNowHeading(0);\r\n\t\t\t\t\t\t\trobot.listOfPro.get(i).setNowY(robot.listOfPro.get(i).getNowY() + 1);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\trobot.correctHeading(180);\r\n\t\t\t\trobot.getPilot().travel(25);\r\n\t\t\t\tfor (int i = 0; i < robot.listOfPro.size(); i++) {\r\n\t\t\t\t\tif(robot.listOfPro.get(i).getSteps()==loopRound) {\r\n\t\t\t\t\t\tif (robot.listOfPro.get(i).getNowHeading() == 0) {\r\n\t\t\t\t\t\t\trobot.listOfPro.get(i).setNowHeading(2);\r\n\t\t\t\t\t\t\trobot.listOfPro.get(i).setNowY(robot.listOfPro.get(i).getNowY() - 1);\r\n\t\t\t\t\t\t} else if (robot.listOfPro.get(i).getNowHeading() == 1) {\r\n\t\t\t\t\t\t\trobot.listOfPro.get(i).setNowHeading(3);\r\n\t\t\t\t\t\t\trobot.listOfPro.get(i).setNowX(robot.listOfPro.get(i).getNowX() - 1);\r\n\t\t\t\t\t\t} else if (robot.listOfPro.get(i).getNowHeading() == 2) {\r\n\t\t\t\t\t\t\trobot.listOfPro.get(i).setNowHeading(0);\r\n\t\t\t\t\t\t\trobot.listOfPro.get(i).setNowY(robot.listOfPro.get(i).getNowY() + 1);\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\trobot.listOfPro.get(i).setNowHeading(1);\r\n\t\t\t\t\t\t\trobot.listOfPro.get(i).setNowX(robot.listOfPro.get(i).getNowX() + 1);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t// It time to check the around situation\r\n\t\t\tfront = USThread.disSample[0];\r\n\t\t\trobot.setmotorM(90);\r\n\t\t\tDelay.msDelay(1000);\r\n\t\t\tleft = USThread.disSample[0];\r\n\t\t\trobot.setmotorM(-180);\r\n\t\t\tDelay.msDelay(1000);\r\n\t\t\tright = USThread.disSample[0];\r\n\t\t\trobot.setmotorM(90);\r\n\t\t\tDelay.msDelay(1000);\r\n\t\t\trobot.correctHeading(180);\r\n\t\t\tDelay.msDelay(1000);\r\n\t\t\tback = USThread.disSample[0];\r\n\t\t\trobot.correctHeading(180);\r\n\t\t\tDelay.msDelay(1000);\r\n\t\t\tfor (int i = 0; i < robot.listOfPro.size(); i++) {\r\n\t\t\t\t//System.out.println(robot.listOfPro.get(i).getSteps());\r\n\t\t\t\t\tif (robot.listOfPro.get(i).getNowHeading() == 0) {\r\n\t\t\t\t\t\tif (((front < 0.25\r\n\t\t\t\t\t\t\t\t&& robot.probability[robot.listOfPro.get(i).getNowX()][robot.listOfPro.get(i).getNowY()\r\n\t\t\t\t\t\t\t\t\t\t+ 1] == 100)\r\n\t\t\t\t\t\t\t\t|| (front > 0.25 && robot.probability[robot.listOfPro.get(i).getNowX()][robot.listOfPro\r\n\t\t\t\t\t\t\t\t\t\t.get(i).getNowY() + 1] == -1))\r\n\t\t\t\t\t\t\t\t\t\t&& ((left < 0.25 && robot.probability[robot.listOfPro.get(i).getNowX()\r\n\t\t\t\t\t\t\t\t\t\t\t\t- 1][robot.listOfPro.get(i).getNowY()] == 100)\r\n\t\t\t\t\t\t\t\t|| (left > 0.25\r\n\t\t\t\t\t\t\t\t\t\t&& robot.probability[robot.listOfPro.get(i).getNowX() - 1][robot.listOfPro\r\n\t\t\t\t\t\t\t\t\t\t\t\t.get(i).getNowY()] == -1))\r\n\t\t\t\t\t\t\t\t\t\t&& ((right < 0.25 && robot.probability[robot.listOfPro.get(i).getNowX()\r\n\t\t\t\t\t\t\t\t\t\t\t\t+ 1][robot.listOfPro.get(i).getNowY()] == 100)\r\n\t\t\t\t\t\t\t\t|| (right > 0.25\r\n\t\t\t\t\t\t\t\t\t\t&& robot.probability[robot.listOfPro.get(i).getNowX() + 1][robot.listOfPro\r\n\t\t\t\t\t\t\t\t\t\t\t\t.get(i).getNowY()] == -1))\r\n\t\t\t\t\t\t\t\t\t\t&& ((back < 0.25 && robot.probability[robot.listOfPro.get(i)\r\n\t\t\t\t\t\t\t\t\t\t\t\t.getNowX()][robot.listOfPro.get(i).getNowY() - 1] == 100)\r\n\t\t\t\t\t\t\t\t|| (back > 0.25 && robot.probability[robot.listOfPro.get(i).getNowX()][robot.listOfPro\r\n\t\t\t\t\t\t\t\t\t\t.get(i).getNowY() - 1] == -1))) {\r\n\t\t\t\t\t\t\t//It is correct when the robot have the same data information with estimate information\r\n\t\t\t\t\t\t\trobot.listOfPro.get(i).setSteps(robot.listOfPro.get(i).getSteps() + 1);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else if (robot.listOfPro.get(i).getNowHeading() == 1) {\r\n\t\t\t\t\t\tif (((left < 0.25\r\n\t\t\t\t\t\t\t\t&& robot.probability[robot.listOfPro.get(i).getNowX()][robot.listOfPro.get(i).getNowY()\r\n\t\t\t\t\t\t\t\t\t\t+ 1] == 100)\r\n\t\t\t\t\t\t\t\t|| (left > 0.25 && robot.probability[robot.listOfPro.get(i).getNowX()][robot.listOfPro\r\n\t\t\t\t\t\t\t\t\t\t.get(i).getNowY() + 1] == -1))\r\n\t\t\t\t\t\t\t\t\t\t&& ((back < 0.25 && robot.probability[robot.listOfPro.get(i).getNowX()\r\n\t\t\t\t\t\t\t\t\t\t\t\t- 1][robot.listOfPro.get(i).getNowY()] == 100)\r\n\t\t\t\t\t\t\t\t|| (back > 0.25\r\n\t\t\t\t\t\t\t\t\t\t&& robot.probability[robot.listOfPro.get(i).getNowX() - 1][robot.listOfPro\r\n\t\t\t\t\t\t\t\t\t\t\t\t.get(i).getNowY()] == -1))\r\n\t\t\t\t\t\t\t\t\t\t&& ((front < 0.25 && robot.probability[robot.listOfPro.get(i).getNowX()\r\n\t\t\t\t\t\t\t\t\t\t\t\t+ 1][robot.listOfPro.get(i).getNowY()] == 100)\r\n\t\t\t\t\t\t\t\t|| (front > 0.25\r\n\t\t\t\t\t\t\t\t\t\t&& robot.probability[robot.listOfPro.get(i).getNowX() + 1][robot.listOfPro\r\n\t\t\t\t\t\t\t\t\t\t\t\t.get(i).getNowY()] == -1))\r\n\t\t\t\t\t\t\t\t\t\t&& ((right < 0.25 && robot.probability[robot.listOfPro.get(i)\r\n\t\t\t\t\t\t\t\t\t\t\t\t.getNowX()][robot.listOfPro.get(i).getNowY() - 1] == 100)\r\n\t\t\t\t\t\t\t\t|| (right > 0.25 && robot.probability[robot.listOfPro.get(i).getNowX()][robot.listOfPro\r\n\t\t\t\t\t\t\t\t\t\t.get(i).getNowY() - 1] == -1))) {\r\n\t\t\t\t\t\t\t//It is correct when the robot have the same data information with estimate information\r\n\t\t\t\t\t\t\trobot.listOfPro.get(i).setSteps(robot.listOfPro.get(i).getSteps() + 1);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else if (robot.listOfPro.get(i).getNowHeading() == 2) {\r\n\t\t\t\t\t\tif (((back < 0.25\r\n\t\t\t\t\t\t\t\t&& robot.probability[robot.listOfPro.get(i).getNowX()][robot.listOfPro.get(i).getNowY()\r\n\t\t\t\t\t\t\t\t\t\t+ 1] == 100)\r\n\t\t\t\t\t\t\t\t|| (back > 0.25 && robot.probability[robot.listOfPro.get(i).getNowX()][robot.listOfPro\r\n\t\t\t\t\t\t\t\t\t\t.get(i).getNowY() + 1] == -1))\r\n\t\t\t\t\t\t\t\t\t\t&& ((right < 0.25 && robot.probability[robot.listOfPro.get(i).getNowX()\r\n\t\t\t\t\t\t\t\t\t\t\t\t- 1][robot.listOfPro.get(i).getNowY()] == 100)\r\n\t\t\t\t\t\t\t\t|| (right > 0.25\r\n\t\t\t\t\t\t\t\t\t\t&& robot.probability[robot.listOfPro.get(i).getNowX() - 1][robot.listOfPro\r\n\t\t\t\t\t\t\t\t\t\t\t\t.get(i).getNowY()] == -1))\r\n\t\t\t\t\t\t\t\t\t\t&& ((left < 0.25 && robot.probability[robot.listOfPro.get(i).getNowX()\r\n\t\t\t\t\t\t\t\t\t\t\t\t+ 1][robot.listOfPro.get(i).getNowY()] == 100)\r\n\t\t\t\t\t\t\t\t|| (left > 0.25\r\n\t\t\t\t\t\t\t\t\t\t&& robot.probability[robot.listOfPro.get(i).getNowX() + 1][robot.listOfPro\r\n\t\t\t\t\t\t\t\t\t\t\t\t.get(i).getNowY()] == -1))\r\n\t\t\t\t\t\t\t\t\t\t&& ((front < 0.25 && robot.probability[robot.listOfPro.get(i)\r\n\t\t\t\t\t\t\t\t\t\t\t\t.getNowX()][robot.listOfPro.get(i).getNowY() - 1] == 100)\r\n\t\t\t\t\t\t\t\t|| (front > 0.25 && robot.probability[robot.listOfPro.get(i).getNowX()][robot.listOfPro\r\n\t\t\t\t\t\t\t\t\t\t.get(i).getNowY() - 1] == -1))) {\r\n\t\t\t\t\t\t\t//It is correct when the robot have the same data information with estimate information\r\n\t\t\t\t\t\t\trobot.listOfPro.get(i).setSteps(robot.listOfPro.get(i).getSteps() + 1);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tif (((right < 0.25\r\n\t\t\t\t\t\t\t\t&& robot.probability[robot.listOfPro.get(i).getNowX()][robot.listOfPro.get(i).getNowY()\r\n\t\t\t\t\t\t\t\t\t\t+ 1] == 100)\r\n\t\t\t\t\t\t\t\t|| (right > 0.25 && robot.probability[robot.listOfPro.get(i).getNowX()][robot.listOfPro\r\n\t\t\t\t\t\t\t\t\t\t.get(i).getNowY() + 1] == -1))\r\n\t\t\t\t\t\t\t\t\t\t&& ((front < 0.25 && robot.probability[robot.listOfPro.get(i).getNowX()\r\n\t\t\t\t\t\t\t\t\t\t\t\t- 1][robot.listOfPro.get(i).getNowY()] == 100)\r\n\t\t\t\t\t\t\t\t|| (front > 0.25\r\n\t\t\t\t\t\t\t\t\t\t&& robot.probability[robot.listOfPro.get(i).getNowX() - 1][robot.listOfPro\r\n\t\t\t\t\t\t\t\t\t\t\t\t.get(i).getNowY()] == -1))\r\n\t\t\t\t\t\t\t\t\t\t&& ((back < 0.25 && robot.probability[robot.listOfPro.get(i).getNowX()\r\n\t\t\t\t\t\t\t\t\t\t\t\t+ 1][robot.listOfPro.get(i).getNowY()] == 100)\r\n\t\t\t\t\t\t\t\t|| (back > 0.25\r\n\t\t\t\t\t\t\t\t\t\t&& robot.probability[robot.listOfPro.get(i).getNowX() + 1][robot.listOfPro\r\n\t\t\t\t\t\t\t\t\t\t\t\t.get(i).getNowY()] == -1))\r\n\t\t\t\t\t\t\t\t\t\t&& ((left < 0.25 && robot.probability[robot.listOfPro.get(i)\r\n\t\t\t\t\t\t\t\t\t\t\t\t.getNowX()][robot.listOfPro.get(i).getNowY() - 1] == 100)\r\n\t\t\t\t\t\t\t\t|| (left > 0.25 && robot.probability[robot.listOfPro.get(i).getNowX()][robot.listOfPro\r\n\t\t\t\t\t\t\t\t\t\t.get(i).getNowY() - 1] == -1))) {\r\n\t\t\t\t\t\t\t//It is correct when the robot have the same data information with estimate information\r\n\t\t\t\t\t\t\trobot.listOfPro.get(i).setSteps(robot.listOfPro.get(i).getSteps() + 1);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\tloopRound++;\r\n\t\t}\r\n\t\t// if is out the while loop, it will find the heading and the position of robot right now.\r\n\t\t//Step 3: It is time to use wavefront to come back to the hospital\r\n\t\trobot.restoreDefault();\r\n\t\trobot.RunMode = 1;\r\n\t\tColorThread.updatePos = true;\r\n\t\tColorThread.updateCritical = true;\r\n\t}", "@Override\n protected void execute() {\n Robot.tapeAlignSys.enable();\n Robot.lidarAlignSys.enable();\n if (Robot.useDrive) {\n double joy_vals[] = Robot.oi.getJoyXYZ(joy);\n\n double x = joy_vals[0];\n double y = joy_vals[1] * m_forward_speed_limit;\n double z = joy_vals[2] * .5;\n\n if (!joy.getRawButton(5)) { // Button 5 is pid override\n // Get sensor feedback for strafe\n x = .5 * x + Robot.tapeAlignSys.get_pid_output();\n if (x > 1) { x = 1; }\n if (x < -1) { x= -1; }\n\n double distance = Robot.stormNetSubsystem.getLidarDistance();\n SmartDashboard.putNumber(\"Lidar distance (cm)\",distance);\n\n // Get Lidar alignment for Z axis\n// if (z < 100) { // only align if close\n// z = z + Robot.lidarAlignSys.get_pid_output();\n// if (z > 1) { z = 1; }\n// if (z < -1) { z= -1; }\n// }\n\n if (distance < m_distance_scale_factor) {\n // Modulate driver forward input\n if (y > 0 && distance < (m_target_distance + m_distance_scale_factor)) {\n y = y * ((distance - m_target_distance)/(m_distance_scale_factor)) ;\n if (y<0) y = 0;\n } \n }\t\n }\n Robot.drive.driveArcade(x,y,z);\n }\n }", "public static void main(String[] args){\n Robot robot = new DifferentialWheels();\n\n // Get the time step of the current world.\n int timeStep = (int) Math.round(robot.getBasicTimeStep());\n\n // Get references to, and enable, all required devices on the robot.\n Lidar lidar = robot.getLidar(\"lms291\");\n lidar.enable(timeStep);\n lidar.enablePointCloud();\n\n GPS gps = robot.getGPS(\"gps\");\n gps.enable(timeStep);\n\n Emitter emitter = robot.getEmitter(\"emitter\");\n emitter.setChannel(0);\n\n Compass compass = robot.getCompass(\"compass\");\n compass.enable(timeStep);\n\n Motor frontLeft = robot.getMotor(\"front_left_wheel\");\n frontLeft.setPosition(Double.POSITIVE_INFINITY);\n Motor frontRight = robot.getMotor(\"front_right_wheel\");\n frontRight.setPosition(Double.POSITIVE_INFINITY);\n Motor backLeft = robot.getMotor(\"back_left_wheel\");\n backLeft.setPosition(Double.POSITIVE_INFINITY);\n Motor backRight = robot.getMotor(\"back_right_wheel\");\n backRight.setPosition(Double.POSITIVE_INFINITY);\n\n TestTurnPB turnPBController = new TestTurnPB(gps, compass, emitter, frontLeft, frontRight, backLeft, backRight);\n System.out.println(\"current param : \" + turnPBController.toString());\n\n //Initialise Start and Goal Coordinates\n robot.step(timeStep);\n turnPBController.updateObstacleReadings(lidar.getPointCloud());\n turnPBController.isRunning = true;\n turnPBController.initMetrics();\n turnPBController.initPositions();\n //potBugController.initAlgorithm();\n turnPBController.runInit();\n\n //Iteration Count\n int itCount = 0;\n\n while (robot.step(timeStep*100) != -1) {\n //Check max iteration\n //while (itCount<DEFAULT_MAX_ITERATION_COUNT){\n //Update Turn Angles\n turnPBController.updateAngles();\n\n //Update Sensor Information\n turnPBController.updateObstacleReadings(lidar.getPointCloud());\n\n //Check if goal is reached and terminate as appropriate\n if (turnPBController.isGoalReached()){\n turnPBController.isRunning = false;\n turnPBController.setRobotSpeed(0,0);\n turnPBController.terminatePotBug();\n System.out.println(\"Goal Reached Successfully!\");\n }\n\n if(!turnPBController.isGoalReached() && turnPBController.isRunning){\n //Check for goal direction on forwards semi-circle\n if (!turnPBController.isObstruction()){\n\n turnPBController.setDriveMode(DEFAULT_DRIVE_MODE_TOWARDS_GOAL);\n //Move 'freely' to the next sample point, towards goal\n turnPBController.updateMetrics();\n\n } else {\n\n if (turnPBController.isClearToLeave()){\n\n if (turnPBController.isProgressAttained() &&\n turnPBController.isClearToLeave()){\n\n turnPBController.setDriveMode(DEFAULT_DRIVE_MODE_TOWARDS_GOAL);\n turnPBController.updateMetrics();\n\n }\n } else {\n\n if (turnPBController.hitPoint == null){\n\n turnPBController.setHitPoint();\n turnPBController.setDriveMode(DEFAULT_DRIVE_MODE_TOWARDS_CONTOUR);\n turnPBController.updateMetrics();\n\n } else {\n\n // engaged mode\n turnPBController.setDriveMode(DEFAULT_DRIVE_MODE_ALONG_CONTOUR);\n turnPBController.updateMetrics();\n\n }\n }\n }\n }\n //}\n }\n }", "void robotPeriodic();", "@Override\n\tpublic void testInit(IRobot robot) {\n\t}", "protected void execute() {\n \tRobot.gearIntake.setGearRollerSpeed(-.7);\n }", "@Override\n\tpublic void robotInit() {\n\t\toi = new OI();\n\t\tdrivebase.calibrateGyro();\n\t\tSmartDashboard.putData(\"Zero Gyro\", new ZeroGyro());\n\t\tSmartDashboard.putData(\"Calibrate Gyro - WHILE ROBOT NOT MOVING\", new CalibrateGyro());\n\t\tchooser.addDefault(\"Default Prepare Gear Auto\", new PrepareGearManipulator());\n\t\t//shooterModeChooser.addDefault(\"Shooter at Nominal Preset when Pressed\", object);\n\t\t/*chooser.addObject(\"Left Gear Auto\", new LeftGearGroup());\n\t\tchooser.addObject(\"Center Gear Auto\", new CenterGearGroup());*/\n\t//\tchooser.addObject(\"Test Vision Auto\", new TurnTillPerpVision(true));\n\t//\tchooser.addObject(\"Testing turn gyro\", new RotateToGyroAngle(90,4));\n\t\t//chooser.addObject(\"DriveStraightTest\", new GoAndReturn());\n\t\t //UNNECESSARY AUTOS FOR TESTING ^\n\t\tchooser.addObject(\"Center Gear Encoder Auto (place)\", new DriveStraightCenter());\n\t\tchooser.addObject(\"Vision center TESTING!!!\", new TurnTillPerpVision());\n\t\tchooser.addObject(\"Boiler Auto RED\", new BoilerAuto(true));\n\t\tchooser.addObject(\"Boiler Auto BLUE\", new BoilerAuto(false));\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t//\tchooser.addObject(\"Center Gear Encoder Auto (do not place )\", new DriveToFace(false, false, false));\n\t\tchooser.addObject(\"Baseline\", new DriveToLeftRightFace(false,false,false,false));\n\t\tchooser.addObject(\"TEST DRIVETANK AUTO\", new DriveTimedTank(0.7,0.7,5));\n\t\tchooser.addObject(\"Side Gear Auto RIGHT (manual straight lineup)(place)(TURN AFTER AND START CYCLE)\", new DriveStraightSide(true,false));\n\n\t\tchooser.addObject(\"Side Gear Auto LEFT (manual straight lineup)(place)(TURN AFTER AND START CYCLE)\", new DriveStraightSide(true,true));\n\t\t//chooser.addObject(\"Side Gear Auto (place)\", new DriveToLeftRightFace(true,false,false,false));\n\t\t//chooser.addObject(\"Test DriveStraight Auto\", new DriveStraightPosition(10,5));\n\t\t//chooser.addObject(\"Center Gear Encoder Auto (place)\", new DriveStraightCenter());\n\t\t/*InterpreterGroup interp = new InterpreterGroup();\n\t\t(interp.init()){\n\t\t\tchooser.addObject(\"Interpreter\",interp);\n\t\t}*/\n\t\t// chooser.addObject(\"My Auto\", new MyAutoCommand());\n\t\tSmartDashboard.putData(\"Auto Chooser\", chooser);\n\n\t\tRobot.drivebase.leftDrive1.setPosition(0);\n \tRobot.drivebase.rightDrive1.setPosition(0);\n \t\n\t\t\n \tRobot.leds.initializei2cBus();\n \tbyte mode = 0;\n \tRobot.leds.setMode(mode);\n \tgearcamera = CameraServer.getInstance();\n\t\t\n \tUsbCamera gearUsb = gearcamera.startAutomaticCapture();\n \tgearUsb.setFPS(25);\n \tgearUsb.setResolution(256, 144);\n\n\t\t//NetworkTable.setClientMode();\n \t//NetworkTable.setIPAddress(\"raspberrypi.local\");\n\t\t\n\t\t\n\t\t/*\n\t\t * new Thread(() -> { UsbCamera goalcamera =\n\t\t * CameraServer.getInstance().startAutomaticCapture();\n\t\t * goalcamera.setResolution(320, 240); goalcamera.setFPS(30);\n\t\t * goalcamera.setBrightness(1); goalcamera.setExposureManual(1);\n\t\t * \n\t\t * CvSink goalCvSink = CameraServer.getInstance().getVideo();\n\t\t * \n\t\t * Mat source = new Mat();\n\t\t * \n\t\t * while(!Thread.interrupted()) { goalCvSink.grabFrame(source);\n\t\t * goaloutputmat = source; } }).start();\n\t\t * goalPipeline.process(goaloutputmat);\n\t\t * \n\t\t * new Thread(() -> { UsbCamera gearcamera =\n\t\t * CameraServer.getInstance().startAutomaticCapture();\n\t\t * gearcamera.setResolution(320, 240); gearcamera.setFPS(30);\n\t\t * gearcamera.setBrightness(1); gearcamera.setExposureManual(1);\n\t\t * \n\t\t * CvSink gearCvSink = CameraServer.getInstance().getVideo();\n\t\t * \n\t\t * Mat source = new Mat();\n\t\t * \n\t\t * while(!Thread.interrupted()) { gearCvSink.grabFrame(source);\n\t\t * gearoutputmat = source; } }).start();\n\t\t * gearPipeline.process(gearoutputmat);\n\t\t */\n\t}", "protected void execute() {\n \n \t\n \t \n \t\n \n System.out.println((Timer.getFPGATimestamp()- starttime ) + \",\" + (RobotMap.motorLeftTwo.getEncPosition()) + \",\"\n + (RobotMap.motorLeftTwo.getEncVelocity()*600)/-4096 + \",\" + RobotMap.motorRightTwo.getEncPosition() + \",\" + (RobotMap.motorRightTwo.getEncVelocity()*600)/4096);\n \n /*if(endpoint > 0){\n cruiseVelocityLeft = (float) (this.initCruiseVelocityLeft+ angleorientation.getResult());\n cruiseVelocityRight = (float) (this.initCruiseVelocityRight - angleorientation.getResult());\n }\n if(endpoint <= 0){\n cruiseVelocityLeft = (float) (this.initCruiseVelocityLeft- angleorientation.getResult());\n cruiseVelocityRight = (float) (this.initCruiseVelocityRight + angleorientation.getResult());\n }*/\n System.out.println(this.motionMagicEndPoint*4096 + RobotMap.motorLeftTwo.getEncPosition() + \"l\");\n System.out.println(this.motionMagicEndPoint*4096 - RobotMap.motorRightTwo.getEncPosition() + \"r\");\n \n \n \t if(RobotMap.motorLeftTwo.getEncVelocity()!= velocityLeft)\n velocityLeft = RobotMap.motorLeftTwo.getEncVelocity(); \n velocityRight = RobotMap.motorRightTwo.getEncVelocity();\n SmartDashboard.putNumber(\"LeftWheelError\", (this.motionMagicEndPoint*4096 + RobotMap.motorLeftTwo.getEncPosition()));\n SmartDashboard.putNumber(\"RightWheelError\",(this.motionMagicEndPoint*4096 - RobotMap.motorRightTwo.getEncPosition()));\n SmartDashboard.putNumber(\"LeftWheelVelocity\", (RobotMap.motorLeftTwo.getEncVelocity())*600/4096);\n SmartDashboard.putNumber(\"RightWheelVelocity\",(RobotMap.motorRightTwo.getEncVelocity()*600)/4096);\n \n \n count++;\n \tangleorientation.updatePID(RobotMap.navx.getAngle());\n }", "@Override\n public void robotPeriodic() {\n /*count++;\n\n if (count < 0) {\n count = 0;\n }\n\n int scriptIdx = count / SCRIPT_LENGTH;\n\n String[] script = LED_SCRIPTS[scriptIdx % (LED_SCRIPTS.length)];\n\n LedScript.setString(script[0]);\n \n if (script.length > 1) {\n LedScriptArgument.setString(script[1]);\n }*/\n\n // Hatch 0 has to be inverted because it is normally closed\n //SmartDashboard.putBoolean(\"HatchSwitch0\", !HatchSwitch0.get());\n //SmartDashboard.putBoolean(\"HatchSwitch1\", HatchSwitch1.get());\n\n //for (int i = 0; i < limits.length; i++) {\n // SmartDashboard.putBoolean(\"Switch\" + (i + 2), limits[i].get());\n //}\n\n\n final int MAX_TEMP = 100;\n if (MainLeft.getMotorTemperature() >= MAX_TEMP || AltLeft.getMotorTemperature() >= MAX_TEMP) {\n xbox.setRumble(RumbleType.kLeftRumble, 0.5);\n } else {\n xbox.setRumble(RumbleType.kLeftRumble, 0);\n }\n \n if (MainRight.getMotorTemperature() >= MAX_TEMP || AltRight.getMotorTemperature() >= MAX_TEMP) {\n xbox.setRumble(RumbleType.kRightRumble, 0.5);\n } else {\n xbox.setRumble(RumbleType.kRightRumble, 0);\n }\n\n //SmartDashboard.putNumber(\"DaTa\", NetworkTableInstance.getDefault().getTable(\"VisionTable\").getEntry(\"THIS IS A RANDOM NUMBER\").getNumber(-1).doubleValue());\n //SmartDashboard.putNumber(\"LiftSetpoint\", LiftSetpoint);\n //SmartDashboard.putNumber(\"LiftEncoderPos\", Lifter.getSelectedSensorPosition());\n //SmartDashboard.putNumber(\"LiftVoltageOut\", Lifter.getMotorOutputVoltage());\n //SmartDashboard.putNumber(\"LiftCurrentOut\", Lifter.getOutputCurrent());\n //SmartDashboard.putString(\"ControlMode\", Lifter.getControlMode().toString());\n //SmartDashboard.putNumber(\"ClosedLoopError\", Lifter.getClosedLoopError());\n //SmartDashboard.putNumber(\"LiftRampOutput\", liftRamp.getOutput());\n\n /*Diagnostics.writeDouble(\"DrivePosLeft\", MainLeft.getEncoder().getPosition());\n Diagnostics.writeDouble(\"DrivePosRight\", MainRight.getEncoder().getPosition());\n Diagnostics.writeDouble(\"DrivePosLeftAlt\", AltLeft.getEncoder().getPosition());\n Diagnostics.writeDouble(\"DrivePosRightAlt\", AltRight.getEncoder().getPosition());\n Diagnostics.writeDouble(\"LiftVoltageOut\", Lifter.getMotorOutputVoltage());\n Diagnostics.writeDouble(\"LiftCurrentOut\", Lifter.getOutputCurrent());\n Diagnostics.writeInteger(\"LiftEncoderPos\", Lifter.getSelectedSensorPosition());\n Diagnostics.writeInteger(\"LiftSetpoint\", LiftSetpoint);\n Diagnostics.writeInteger(\"LiftRampOutput\", liftRamp.getOutput());\n \n Diagnostics.timestamp();*/\n }", "public void robotInit() \n {\n RobotMap.init();\n\n driveTrain = new DriveTrain();\n gripper = new Gripper();\n verticalLift = new VerticalLift();\n\n // OI must be constructed after subsystems. If the OI creates Commands \n //(which it very likely will), subsystems are not guaranteed to be \n // constructed yet. Thus, their requires() statements may grab null \n // pointers. Bad news. Don't move it.\n\n oi = new OI();\n\n autonomousChooser = new SendableChooser();\n autonomousChooser.addDefault( \"Auto: Do Nothing\" , new DoNothing () );\n autonomousChooser.addObject ( \"Auto: Drive To Auto Zone\" , new DriveToAutoZone () );\n autonomousChooser.addObject ( \"Auto: Drive To Auto Zone (Bump)\" , new DriveToAutoZoneBump () );\n //autonomousChooser.addObject ( \"Auto: Get One (Long)\" , new GetOneLong () );\n //autonomousChooser.addObject ( \"Auto: Get One (Short)\" , new GetOneShort () );\n //autonomousChooser.addObject ( \"Auto: Get One Recycle Bin (Bump)\" , new GetOneRecycleBin () );\n autonomousChooser.addObject ( \"Auto: Get One Recycle Bin (Side)\" , new GetRecycleBinSide () );\n //autonomousChooser.addObject ( \"Auto: Get One Recycle Bin (Backwards)\" , new GetOneRecycleBinBackwards () );\n //autonomousChooser.addObject ( \"Auto: Get One Recycle Bin (Backwards, Bump)\", new GetOneRecycleBinBackwardsBump() );\n //autonomousChooser.addObject ( \"Auto: Get Two (Short)\" , new GetTwoShort () );\n //autonomousChooser.addObject ( \"Auto: Get Two Short (Special)\" , new GetTwoShortSpecial () );\n //autonomousChooser.addObject ( \"Auto: Get Two (Long, From left)\" , new TwoLongFromLeft () );\n //autonomousChooser.addObject ( \"Auto: Get Two (Long, From right)\" , new TwoLongFromRight () );\n autonomousChooser.addObject ( \"Auto: Get One Tote and Recycle Bin\" , new OneRecycleBinAndTote () );\n autonomousChooser.addObject ( \"Auto: Get One Tote and Recycle Bin (Bump)\" , new OneRecycleBinAndToteBump () );\n SmartDashboard.putData( \"Autonomous\", autonomousChooser );\n\n // instantiate the command used for the autonomous period\n //autonomousCommand = new RunAutonomousCommand();\n\n m_USBVCommand = new UpdateSBValuesCommand();\n m_USBVCommand.start();\n \n frame = NIVision.imaqCreateImage(NIVision.ImageType.IMAGE_RGB, 0);\n /*\n // the camera name (ex \"cam0\") can be found through the roborio web interface\n session = NIVision.IMAQdxOpenCamera(\"cam1\",\n NIVision.IMAQdxCameraControlMode.CameraControlModeController);\n NIVision.IMAQdxConfigureGrab(session);\n \n NIVision.IMAQdxStartAcquisition(session);\n */\n /*\n camServer = CameraServer.getInstance();//.startAutomaticCapture(\"cam1\");\n camServer.setQuality(30);\n \n cam = new USBCamera(\"cam1\");\n cam.openCamera();\n cam.setFPS(60);\n \n cam.setSize(320, 240);\n cam.updateSettings();\n */\n }", "public void mo6081a() {\n }", "@Override\n public void robotInit() {\n m_chooser.setDefaultOption(\"Default Auto\", kDefaultAuto);\n m_chooser.addOption(\"My Auto\", kCustomAuto);\n SmartDashboard.putData(\"Auto choices\", m_chooser);\n \n //Initialize Drive Train Motors/\n LeftFront = new WPI_TalonSRX(11);\n RightFront = new WPI_TalonSRX(13);\n LeftBack = new WPI_TalonSRX(10);\n RightBack = new WPI_TalonSRX(12);\n RobotDT = new MecanumDrive(LeftFront, LeftBack, RightFront, RightBack);\n \n //Initialize Xbox Controller or Joystick/\n xcontroller1 = new XboxController(0);\n xcontroller2 = new XboxController(1);\n \n //Initialize Cameras/\n RoboCam = CameraServer.getInstance();\n FrontCamera = RoboCam.startAutomaticCapture(0);\n BackCamera = RoboCam.startAutomaticCapture(1);\n\n //GPM Init/\n mGPM = new GPM();\n \n }", "public void agregarRobot(Robot robot);", "@Override\n\tpublic void robotInit() {\n\t\tleftDriveBack = new VictorSP(0); // PWM Port, madke sure this is set correctly.\n\t\tleftDriveFront = new VictorSP(1);\n\t\t\n\t\trightDriveFront = new VictorSP(2);\n\t\trightDriveBack = new VictorSP(3);\n\t\t\n\t\tleftIntake = new Spark(5);\n\t\trightIntake = new Spark(6);\n\t\t\n\t\tarmMotor = new TalonSRX(10);\n\t\tarmMotor.setNeutralMode(NeutralMode.Brake);\n\t\tarmMotor.configSelectedFeedbackSensor(FeedbackDevice.CTRE_MagEncoder_Absolute, 0, 0);\n\t\tarmMotor.configPeakCurrentLimit(30, 0);\n\t\tarmMotor.configPeakCurrentDuration(250, 0);\n\t\tarmMotor.configContinuousCurrentLimit(20, 0);\n\t\tarmMotor.configClosedloopRamp(0.25, 0);\n\t\tarmMotor.configOpenloopRamp(0.375, 0);\n\t\tarmMotor.enableCurrentLimit(true);\n\t\t\n\t\tarmMotor.configPeakOutputForward(1.0, 0);\n\t\tarmMotor.configPeakOutputReverse(-1.0, 0);\n\t\t\n\t\tarmMotor.config_kP(0, 0.0, 0);\n\t\t\n\t\tarmSetpoint = armMotor.getSelectedSensorPosition(0);\n\t\t\n\t\tstick = new Joystick(0);\n\t\tstickReversed = false;\n\t\txbox = new XboxController(1); // USB port, set in driverstation.\n\t\t\n\t\tdriveCamera = CameraServer.getInstance().startAutomaticCapture(0);\n\t}", "@Override\n public void giveCommands(Robot robot) {\n super.giveCommands(robot);\n\n arcadeDrive(robot.getDrivetrain());\n\n }", "@Override\n\tpublic void teleopPeriodic() {\n\t\tRobot.intakeSubsystem._getSpeed();\n\n\t\tRobot.driveSubsystem.operatorOverride();\n\t\tScheduler.getInstance().run();\n\n\t\tTargetRegion boilerTarget = Robot.navigator.getBoilerTarget();\n\t\tif (boilerTarget != null) {\n\t\t\tSmartDashboard.putNumber(\"Target Center X\", boilerTarget.m_centerTop);\n\t\t\tSmartDashboard.putNumber(\"Target Center Y\", boilerTarget.m_bounds.m_top);\n\t\t} else {\n\t\t\tSmartDashboard.putNumber(\"Target Center X\", -1);\n\t\t\tSmartDashboard.putNumber(\"Target Center Y\", -1);\n\t\t}\n\t}", "@Override\n public void execute() {\n drivetrain.set(ControlMode.MotionMagic, targetDistance, targetDistance);\n }", "@Override\n\tpublic void robotInit() {\n\t\tdt = new DriveTrain();\n\t\t//Initialize drive Talons\n\t\tRobotMap.vspLeft = new WPI_TalonSRX(RobotMap.dtLeft);\n\t\tRobotMap.vspRight = new WPI_TalonSRX(RobotMap.dtRight);\n\t\t//Initialize drive slave Victors\n\t\t//RobotMap.slaveLeft = new WPI_VictorSPX(RobotMap.slaveDriveLeft);\n\t\t//RobotMap.slaveRight = new WPI_VictorSPX(RobotMap.slaveDriveRight);\n\t\t//Set drive slaves to follower mode\n\t\t//RobotMap.slaveLeft.follow(RobotMap.vspLeft);\n\t\t//RobotMap.slaveRight.follow(RobotMap.vspRight);\n\t\t//Initialize drive train\n\t\tRobotMap.rd = new DifferentialDrive(RobotMap.vspLeft, RobotMap.vspRight);\n\t\t//Initialize drive joystick\n\t\tRobotMap.stick = new Joystick(RobotMap.joystickPort);\n\t\t//Disabled drive safety\n\t\tRobotMap.vspLeft.setSafetyEnabled(false);\n\t\tRobotMap.vspRight.setSafetyEnabled(false);\n\t\tRobotMap.rd.setSafetyEnabled(false);\n\t\t//Initialize lift Talon\n\t\tRobotMap.liftTalon = new WPI_TalonSRX(5);\n\t\t//Initialize operator controller\n\t\tRobotMap.controller = new Joystick(RobotMap.controllerPort);\n\t\t//Initialize intake Victors\n\t\tRobotMap.intakeVictorLeft = new WPI_VictorSPX(RobotMap.intakeMaster);\n\t\tRobotMap.intakeVictorRight = new WPI_VictorSPX(RobotMap.intakeSlave);\n\t\t//Set right intake Victor to follow left intake Victor\n\t\tRobotMap.intakeVictorRight.follow(RobotMap.intakeVictorLeft);\n\t\t\n\t\tRobotMap.climberVictorLeft = new WPI_VictorSPX(RobotMap.climberLeftAddress);\n\t\tRobotMap.climberVictorRight = new WPI_VictorSPX(RobotMap.climberRightAddress);\n\t\t\n\t\tRobotMap.climberVictorRight.follow(RobotMap.climberVictorLeft);\n\t\t\n\t\tRobotMap.piston = new DoubleSolenoid(RobotMap.inChannel, RobotMap.outChannel);\n\t\t\n\t\tRobotMap.intakeLifter = new WPI_VictorSPX(2);\n\t\t\n\t\tRobotMap.liftTalon = new WPI_TalonSRX(RobotMap.liftTalonAddress);\n\t\t\n\t\tautoChooser = new SendableChooser();\n\t\tautoChooser.addDefault(\"Drive to baseline\" , new DriveToBaseline());\n\t\tautoChooser.addObject(\"Null auto\", new NullAuto());\n\t\tautoChooser.addObject(\"Switch from right\", new SwitchFromRight());\n\t\tautoChooser.addObject(\"Switch from left\", new SwitchFromLeft());\n\t\tautoChooser.addObject(\"PID from left\", new PIDfromLeft());\n\t\tautoChooser.addObject(\"PID from right\", new PIDfromRight());\n\t\tautoChooser.addObject(\"Scale from right\", new ScaleAutoRight());\n\t\tautoChooser.addObject(\"Scale from left\", new ScaleAutoLeft());\n\t\tautoChooser.addObject(\"PID tester\", new PIDTESTER());\n\t\tautoChooser.addObject(\"Joe use this one\", new leftOnly());\n\t\tSmartDashboard.putData(\"Autonomous mode chooser\", autoChooser);\n\t\t\n\t\t//RobotMap.liftVictor.follow(RobotMap.climberTalon);\n\t\t\n\t\tRobotMap.vspLeft.configSelectedFeedbackSensor(FeedbackDevice.CTRE_MagEncoder_Relative, 0, 0);\n\t\tRobotMap.vspRight.configSelectedFeedbackSensor(FeedbackDevice.CTRE_MagEncoder_Relative, 0, 0);\n\t\t\n\t\tRobotMap.intakeLifted = new DigitalInput(1);\n\t\tRobotMap.isAtTop = new DigitalInput(2);\n\t\tRobotMap.isAtBottom = new DigitalInput(0);\n\t\t\n\t\tRobotMap.vspLeft.configVelocityMeasurementPeriod(VelocityMeasPeriod.Period_100Ms, 1);\n\t\tRobotMap.vspRight.configVelocityMeasurementWindow(64, 1); \n\t\t\n\t\toi = new OI();\n\t}", "protected void setup() {\n DFAgentDescription dfd = new DFAgentDescription();\n dfd.setName(getAID());\n ServiceDescription sd = new ServiceDescription();\n sd.setName(\"Storage Agent\");\n sd.setType(\"Storage\");\n dfd.addServices(sd);\n try {\n DFService.register(this, dfd);\n } catch (FIPAException fe) {\n fe.printStackTrace();\n }\n waitForAgents = new waitAgents();\n receiveAgents = new receiveFromAgents();\n operate = new opMicrogrid();\n decision = new takeDecision();\n\n addBehaviour(waitForAgents);\n\n //add a ticker behavior to monitor PV production, disable PLay button in the meanwhile\n addBehaviour(new TickerBehaviour(this, 5000) {\n protected void onTick() {\n if (AgentsUp == 0) {\n appletVal.playButton.setEnabled(false);\n ACLMessage msg = new ACLMessage(ACLMessage.INFORM);\n msg.addReceiver(new AID(AgentAIDs[2].getLocalName(), AID.ISLOCALNAME));\n msg.setContent(\"Inform!!!\");\n send(msg);\n String stripedValue = \"\";\n msg = receive();\n if (msg != null) {\n // Message received. Process it\n String val = msg.getContent().toString();\n stripedValue = (val.replaceAll(\"[\\\\s+a-zA-Z :]\", \"\"));\n //PV\n if (val.contains(\"PV\")) {\n System.out.println(val);\n PV = Double.parseDouble(stripedValue);\n appletVal.playButton.setEnabled(true);\n appletVal.SetAgentData(PV, 0, 2);\n }\n\n } else {\n block();\n }\n\n }\n }\n });\n\n }", "void nearingTheWallBefore(){\n robot.absgyroRotation(0, \"absolute\");\n\n //alligning with the wall before going for the toy\n while(robot.leftDistanceSensor.getDistance(DistanceUnit.CM) > 15 && !isStopRequested()){\n if(robot.leftDistanceSensor.getDistance(DistanceUnit.CM) < 30)\n robot.mecanumMovement(0, .3, 0);\n else\n robot.mecanumMovement(0, .7, 0);\n\n telemetry.addLine(\"Distance from sensor: \" + robot.leftDistanceSensor.getDistance(DistanceUnit.CM));\n telemetry.update();\n }\n robot.mecanumMovement(0, 0, 0);\n\n robot.absgyroRotation(45, \"absolute\");\n }", "void think() {\n //get the output of the neural network\n decision = brain.output(vision);\n\n if (decision[0] > 0.8) {//output 0 is boosting\n boosting = true;\n } else {\n boosting = false;\n }\n if (decision[1] > 0.8) {//output 1 is turn left\n spin = -0.08f;\n } else {//cant turn right and left at the same time\n if (decision[2] > 0.8) {//output 2 is turn right\n spin = 0.08f;\n } else {//if neither then dont turn\n spin = 0;\n }\n }\n //shooting\n if (decision[3] > 0.8) {//output 3 is shooting\n shoot();\n }\n }", "@Override\n public void robotPeriodic() {\n double high = m_filter.calculate(m_photoHigh.getValue());// * kValueToInches;\n double low = m_filter.calculate(m_photoLow.getValue()); //* kValueToInches;\n if (low<=6){\n BallPresent = true;\n //stop motor if ultrasonic sensor median falls below 6 inches indicating a ball is blocking the sensor\n m_RightMotor.set(ControlMode.PercentOutput, 0);\n } else {\n BallPresent = false;\n //stop motor if ultrasonic sensor median falls below 6 inches indicating a ball is blocking the sensor\n m_RightMotor.set(ControlMode.PercentOutput, 0.5);\n }\n /*Shuffleboard.getTab(\"Shooter\").add(\"Ball Present\", BallPresent)\n .withWidget(BuiltInWidgets.kBooleanBox)\n .withPosition(0, 0)\n .withSize(1, 1)\n .withProperties(Map.of(\"colorWhenTrue\",\"green\",\"colorWhenFalse\",\"black\"));*/\n SmartDashboard.putNumber(\"High\", high);\n SmartDashboard.putNumber(\"Low\", low); \n /*Shuffleboard.getTab(\"Shooter\").add(\"Ultrasonic 1\", currentDistance)\n .withWidget(BuiltInWidgets.kGraph)\n .withPosition(0, 2)\n .withSize(4, 4);*/\n // convert distance error to a motor speed\n //double currentSpeed = (kHoldDistance - currentDistance) * kP;\n\n // drive robot\n //m_robotDrive.arcadeDrive(currentSpeed, 0);\n }", "protected void execute() {\n//\t\tRobot.chassis.drive(0, .5, 0);\n//\t\tRobotMap.chassisfrontLeft.set(50);\n\t\tLiquidCrystal lcd = RobotMap.lcd;\n\n\t\t\n\t\t\n\n\t\t\n\t\tif(talonNum == 2){\n\t\t\tRobotMap.chassisfrontLeft.set(150);\n\t\t\tlcd.setCursor(0, 1);\n\t\t\tlcd.print(\"\" + RobotMap.chassisfrontLeft.getEncVelocity());\n\t\t\tlcd.setCursor(0, 2);\n\t\t\tlcd.print(\"\" + RobotMap.chassisfrontLeft.getEncPosition());\n\t\t\t\n\t\t\t\n\n\t\t}else if(talonNum == 3){\n\t\t\tRobotMap.chassisfrontRight.set(150);\n\t\t\tlcd.setCursor(0, 1);\n\t\t\tlcd.print(\"\" + RobotMap.chassisfrontRight.getEncVelocity());\n\t\t\tlcd.setCursor(0, 2);\n\t\t\tlcd.print(\"\" + RobotMap.chassisfrontRight.getEncPosition());\n\t\t\t\n\n\t\t}else if(talonNum == 4){\n\t\t\tRobotMap.chassisrearLeft.set(150);\t\n\t\t\tlcd.setCursor(0, 1);\n\t\t\tlcd.print(\"\" + RobotMap.chassisrearLeft.getEncVelocity());\n\t\t\tlcd.setCursor(0, 2);\n\t\t\tlcd.print(\"\" + RobotMap.chassisrearLeft.getEncPosition());\n\n\t\t}else if(talonNum == 5){\n\t\t\tRobotMap.chassisrearRight.set(150);\t\n\t\t\tlcd.setCursor(0, 1);\n\t\t\tlcd.print(\"\" + RobotMap.chassisrearRight.getEncVelocity());\n\t\t\tlcd.setCursor(0, 2);\n\t\t\tlcd.print(\"\" + RobotMap.chassisrearRight.getEncPosition());\n\n\t\t}else if(talonNum == 11){\n\t\t\tRobotMap.climberclimbMotor.set(.5);\t\n\n\t\t}else if(talonNum == 12){\n\t\t\tRobotMap.floorfloorLift.set(.75);\t\n\n\t\t}else if(talonNum == 13){\n\t\t\tRobotMap.acquisitionacquisitionMotor.set(.25);\t\n\n\t\t}\n\t\t\n\t\t\n\t}", "public void autonomousInit() {\n\t\ttimer.start();\n\t\tautonomousCommand = autoChooser.getSelected();\n\t\t//This outputs what we've chosen in the SmartDashboard as a string.\n\t\tSystem.out.println(autonomousCommand);\n\t\tif (DriverStation.getInstance().isFMSAttached()) {\n\t\t\tgameData = DriverStation.getInstance().getGameSpecificMessage();\n\t\t}\n\t\telse {\n\t\t\tgameData=\"RLR\";\n\t\t}\n\t\t//armSwing.setAngle(90); //hopefully this will swing the arms down. not sure what angle it wants though\n\t}", "public void robotInit() {\n\t\toi = new OI();\n chooser = new SendableChooser();\n chooser.addDefault(\"Default Auto\", new ExampleCommand());\n// chooser.addObject(\"My Auto\", new MyfAutoCommand());\n SmartDashboard.putData(\"Auto mode\", chooser);\n \n //Drive\n //this.DriveTrain = new DriveTrain();\n \t//RobotMap.robotDrive1.arcadeDrive(oi.stickLeft);\n \n //Buttons\n // oi.button1.whenPressed(new SetMaxMotorOutput());\n \n //Ultrasonic\n sonic1 = new Ultrasonic(0,1);\n sonic1.setAutomaticMode(true);\n \n }", "public void setRobot(Robot robot) {\n this.robot = robot;\n }", "void gettingBackToInitial(){\n robot.setDrivetrainPosition(-hittingMineralDistance, \"translation\", 1.0);\n }", "@Override\n public void robotInit() {\n // Hardware.getInstance().init();\n hardware.init();\n\n controllerMap = ControllerMap.getInstance();\n controllerMap.controllerMapInit();\n\n controllerMap.intake.IntakeInit();\n\n m_chooser.setDefaultOption(\"Default Auto\", kDefaultAuto);\n m_chooser.addOption(\"My Auto\", kCustomAuto);\n SmartDashboard.putData(\"Auto choices\", m_chooser);\n\n intakeCam = CameraServer.getInstance().startAutomaticCapture(\"Driver Camera :)\", 0);\n intakeCam.setPixelFormat(PixelFormat.kMJPEG);\n intakeCam.setResolution(160, 120);\n intakeCam.setFPS(15);\n // climberCam = CameraServer.getInstance().startAutomaticCapture(1);\n\n }", "@Override\n\tpublic void play(int robot) {\n\t\tSystem.out.println(\"Robot\"+ robot+ \" is Defending!\");\n\t}", "public void robotInit() {\r\n\r\n shootstate = down;\r\n try {\r\n Components.shootermotorleft.setX(0);\r\n Components.shootermotorleft2.setX(0);\r\n } catch (CANTimeoutException ex) {\r\n ex.printStackTrace();\r\n }\r\n try {\r\n Components.shootermotorright.setX(0);\r\n Components.shootermotorright2.setX(0);\r\n } catch (CANTimeoutException ex) {\r\n ex.printStackTrace();\r\n }\r\n initialpot = Components.ShooterPot.getAverageVoltage();\r\n //shootpotdown +=initialpot;\r\n //shootpotlow+= initialpot;\r\n //shootpotmiddle+= initialpot;\r\n //shootpothigh+=initialpot;\r\n\r\n }", "public void waitForStart(final boolean autonomous, boolean runCamera){\n // Will it throw a null pointer exception???\n Robot.init(this, autonomous);\n\n telemetry.setMsTransmissionInterval(autonomous ? 50:1000);\n\n // Start of Auto Code for Camera and the like\n if(autonomous && runCamera){\n //Auto Transitioning\n // Will it throw a null pointer exception???\n AutoTransitioner.transitionOnStop(this, \"Teleop\");\n\n //Autonomous Settings\n getAutonomousPrefs();\n\n // Setup Vuforia\n vuMark.setup(VuforiaLocalizer.CameraDirection.FRONT, false);\n ElapsedTime t = new ElapsedTime();\n\n while(isInInitLoop()) {\n // Update VuMark\n vuMark.update();\n\n if(vuMark.getOuputVuMark()!= RelicRecoveryVuMark.UNKNOWN)\n test = vuMark.getOuputVuMark();\n\n // Value of all pixels\n int redValue = 0;\n int blueValue = 0;\n\n // Get current bitmap from Vuforia\n Bitmap bm = vuMark.getBm(20);\n\n if(bm != null){\n // Scan area for red and blue pixels\n for (int x = 0; x < bm.getWidth()/5 && isInInitLoop(); x++) {\n for (int y = (bm.getHeight()/4)+(bm.getHeight()/2); y < bm.getHeight() && isInInitLoop(); y++) {\n int pixel = bm.getPixel(x,y);\n redValue += red(pixel);\n blueValue += blue(pixel);\n\n if(redValue>blueValue)\n redVotes++;\n else if(blueValue>redValue)\n blueVotes++;\n idle();\n }\n }\n bm.recycle();\n }\n\n // Cut off\n if (redVotes>300) {\n redVotes = 50;\n blueVotes = 0;\n } else if(blueVotes > 300){\n redVotes = 0;\n blueVotes = 50;\n }\n\n // Calculate FPS\n double fps = 1/t.seconds();\n t.reset();\n\n // Output Telemetry\n telemetry.addData(\"FPS\", fps);\n telemetry.addData(\"VuMark\", WhatColumnToScoreIn());\n if(jewel_Color != null)\n telemetry.addData(\"Color\", jewel_Color.toString());\n telemetry.addData(\"Red Votes\", redVotes);\n telemetry.addData(\"Blue Votes\", blueVotes);\n telemetry.update();\n idle();\n }\n\n // Voting system\n if(redVotes>blueVotes)\n jewel_Color = JewelColor.Red;\n else if(blueVotes>redVotes)\n jewel_Color = JewelColor.Blue;\n\n t.reset();\n\n }// End of Auto Code for Camera and the like\n else{\n driver_station.init(this); // New Driver station\n while (isInInitLoop()){\n telemetry.addData(\"Waiting for Start\", \"\");\n telemetry.update();\n }\n }\n }", "public ConfigureRobot()\n {\n Scheduler.getInstance().removeAll(); //remove all running commands\n addSequential(new BrakeOpen(),2);\n addSequential(new WaitCommand(1));\n addSequential(new LiftToBottom(),3);\n }", "public void robotInit() {\n\t\t\n\t\tupdateDashboard();\n\t\t\n \tautoChooser = new SendableChooser();\n \tautoChooser.addDefault(\"Default Autonomous does nothing!\", new Default());\n \t// Default Autonomous does nothing\n \tautoChooser.addObject(\"Cross the Low Bar Don't Run This it doesn't work\", new LowBar());\n \tautoChooser.addObject(\"Cross Rough Patch/Stone Wall\", new Main());\n \tautoChooser.addObject(\"Cross the Low Bar, Experimental!\", new LowBarEx());\n \t//autoChooser.addObject(\"If Jonathan lied to us and we can cross twice\", new RoughPatch());\n \tCameraServer server = CameraServer.getInstance();\n\n \tserver.setQuality(50);\n \t\n \tSmartDashboard.putData(\"Autonomous\", autoChooser);\n\n \tserver.startAutomaticCapture(\"cam0\");\n \tLowBar.gyro.reset();\n \t\n \tDriverStation.reportWarning(\"The Robot is locked and loaded. Time to kick some ass guys!\", !(server.isAutoCaptureStarted()));\n\n\t}", "@Override\n public void runOpMode() throws InterruptedException {\n distanceSensorInRange = false;\n myGlyphLift = new glyphLift(hardwareMap.dcMotor.get(\"glyph_lift\"));\n myColorSensorArm = new colorSensorArm(hardwareMap.servo.get(\"color_sensor_arm\"),hardwareMap.colorSensor.get(\"sensor_color\"), hardwareMap.servo.get(\"color_sensor_arm_rotate\"));\n myMechDrive = new mechDriveAuto(hardwareMap.dcMotor.get(\"front_left_motor\"), hardwareMap.dcMotor.get(\"front_right_motor\"), hardwareMap.dcMotor.get(\"rear_left_motor\"), hardwareMap.dcMotor.get(\"rear_right_motor\"));\n myGlyphArms = new glyphArms(hardwareMap.servo.get(\"top_left_glyph_arm\"), hardwareMap.servo.get(\"bottom_left_glyph_arm\"), hardwareMap.servo.get(\"top_left_glyph_arm\"), hardwareMap.servo.get(\"bottom_right_glyph_arm\"));\n myBoardArm = new boardArm(hardwareMap.dcMotor.get(\"board_arm\"));\n myRevColorDistanceSensor = new revColorDistanceSensor(hardwareMap.get(ColorSensor.class, \"rev_sensor_color_distance\"), hardwareMap.get(DistanceSensor.class, \"rev_sensor_color_distance\"));\n\n\n myColorSensorArm.colorSensorArmUpSlow();\n myColorSensorArm.colorRotateResting();\n //myGlyphArms.openRaisedGlyphArms(); //ensures robot is wihin 18\" by 18\" parameters\n\n int cameraMonitorViewId = hardwareMap.appContext.getResources().getIdentifier(\"cameraMonitorViewId\", \"id\", hardwareMap.appContext.getPackageName());\n VuforiaLocalizer.Parameters parameters = new VuforiaLocalizer.Parameters(cameraMonitorViewId);\n parameters.vuforiaLicenseKey = \"ASmjss3/////AAAAGQGMjs1d6UMZvrjQPX7J14B0s7kN+rWOyxwitoTy9i0qV7D+YGPfPeeoe/RgJjgMLabjIyRXYmDFLlJYTJvG9ez4GQSI4L8BgkCZkUWpAguRsP8Ah/i6dXIz/vVR/VZxVTR5ItyCovcRY+SPz3CP1tNag253qwl7E900NaEfFh6v/DalkEDppFevUDOB/WuLZmHu53M+xx7E3x35VW86glGKnxDLzcd9wS1wK5QhfbPOExe97azxVOVER8zNNF7LP7B+Qeticfs3O9pGXzI8lj3zClut/7aDVwZ10IPVk4oma6CO8FM5UtNLSb3sicoKV5QGiNmxbbOlnPxz9qD38UAHshq2/y0ZjI/a8oT+doCr\";\n parameters.cameraDirection = VuforiaLocalizer.CameraDirection.BACK;\n this.vuforia = ClassFactory.createVuforiaLocalizer(parameters);\n VuforiaTrackables relicTrackables = this.vuforia.loadTrackablesFromAsset(\"RelicVuMark\");\n VuforiaTrackable relicTemplate = relicTrackables.get(0);\n relicTemplate.setName(\"relicVuMarkTemplate\"); // can help in debugging; otherwise not necessary\n\n waitForStart();\n\n relicTrackables.activate();\n\n while (opModeIsActive()) {\n myGlyphArms.closeGlyphArms();\n sleep(2000);\n myMechDrive.vuforiaLeft(myGlyphArms);\n sleep(1000);\n requestOpModeStop();\n }\n }", "@Override\n\tpublic void teleopPeriodic() {\n\t\tScheduler.getInstance().run();\n\t\tisAutonomous = false;\n\t\tisTeleoperated = true;\n\t\tisEnabled = true;\n\t\tupdateLedState();\n\t\t//SmartDashboard.putNumber(\"Gyro\", Robot.drivebase.driveGyro.getAngle());\n\t\tSmartDashboard.putNumber(\"Climber Current Motor 1\", Robot.climber.climberTalon.getOutputCurrent());\n\t\tSmartDashboard.putNumber(\"Climber Current motor 2\", Robot.climber.climberTalon2.getOutputCurrent());\n\t\t//visionNetworkTable.getGearData();\n\t//\tvisionNetworkTable.showGearData();\n\t\tSmartDashboard.putNumber(\"GM ACTUAL POSITION\", Robot.gearManipulator.gearManipulatorPivot.getPosition());\n\n\t\tif(Robot.debugging){\t\t\t\n\t\t\tSmartDashboard.putNumber(\"Shooter1RPM Setpoint\", shooter.shooter1.getSetpoint());\n\t \tSmartDashboard.putNumber(\"Intake Pivot Encoder Position\", Robot.gearManipulator.gearManipulatorPivot.getPosition());\n\t\n\t\t\tSmartDashboard.putNumber(\"Gear Manipulator Setpoint\", gearManipulator.gearManipulatorPivot.getSetpoint());\n\t\t}\n\t\t//\tvisionNetworkTable.getGearData();\n\t\t//visionNetworkTable.getHighData();\n\t}", "public abstract boolean interactionPossible(Robot robot);", "public void robotInit() {\n // North.registerCommand(\"setSetpoint\", (params) -> ??, [\"Setpoint\"]);\n // North.registerCondition(\"atSetpoint\", elevator::atSetpoint);\n\n //NOTE: init(name, size, logic provider, drive & nav)\n North.init(/*NorthUtils.readText(\"name.txt\")*/ \"lawn chair\", 24/12, 24/12, drive);\n North.default_drive_controller = HoldController.I;\n\n UsbCamera camera = CameraServer.getInstance().startAutomaticCapture();\n camera.setResolution(640, 480);\n }", "@Override\n public void walk() {\n System.out.println(\"the robot is walking ... \");\n }", "public void teleopPeriodic() {\n\n \t//NetworkCommAssembly.updateValues();\n \t\n\t\t// both buttons pressed simultaneously, time to cal to ground\n\t\tif (gamepad.getRawButton(FRONT_ARM_GROUND_CAL_BUTTON1) && gamepad.getRawButton(FRONT_ARM_GROUND_CAL_BUTTON2)) {\n\t\t\tprocessGroundCal();\n\t\t}\n\n\t\t// PID CONTROL ONLY\n\t\tdouble armDeltaPos = gamepad.getRawAxis(1);\n\t\tif (Math.abs(armDeltaPos) < ARM_DEADZONE) {\n\t\t\tarmDeltaPos = 0.0f;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tarmDeltaPos *= ARM_POS_MULTIPLIER;\n\t\t\tdouble currPos = testMotor.getPosition();\n\t\t\t\n\t\t\tif (((currPos > SOFT_ENCODER_LIMIT_MAX) && armDeltaPos > 0.0) || ((currPos < SOFT_ENCODER_LIMIT_FLOOR) && armDeltaPos < 0.0)) {\n\t\t\t\tSystem.out.println(\"SOFT ARM LIMIT HIT! Setting armDeltaPos to zero\");\n\t\t\t\tarmDeltaPos = 0.0;\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\tdouble newPos = currPos + armDeltaPos;\n\t\t\ttestMotor.set(newPos);\n\t\t\tSystem.out.println(\"Setting new front arm pos = \" + newPos);\t\n\t\t}\t\t\n\n \t/*\n\t\tdouble newArmPos = gamepad.getRawAxis(1);\n\t\tif(Math.abs(newArmPos) <= ARM_DEADZONE) {\n\t\t\tnewArmPos = 0.0;\n\t\t}\n\t\tdouble newMotorPos = (newArmPos * ARM_SPEED_MULTIPLIER) + testMotor.getPosition();\n\t\tpositionMoveByCount(newMotorPos);\n\t\tSystem.out.println(\"input = \" + newArmPos + \" target pos = \" + newMotorPos + \" enc pos = \" + testMotor.getPosition());\n \t*/\n \t\n\t\t// PercentVbus test ONLY!!\n \t/*\n\t\tdouble armSpeed = gamepad.getRawAxis(1);\n\t\tif (Math.abs(armSpeed) < ARM_DEADZONE) {\n\t\t\tarmSpeed = 0.0f;\n\t\t}\t\n\t\tarmSpeed *= ARM_MULTIPLIER;\n\t\t\n\t\tdouble pos= testMotor.getPosition();\n\t\tif (((pos > SOFT_ENCODER_LIMIT_1) && armSpeed < 0.0) || ((pos < SOFT_ENCODER_LIMIT_2) && armSpeed > 0.0))\n\t\t\tarmSpeed = 0.0;\n\t\ttestMotor.set(armSpeed);\n\t\t\n\t\tSystem.out.println(\"armSpeed = \" + armSpeed + \" enc pos = \" + testMotor.getPosition());\n\t\t */ \n }", "@Override\n public void runOpMode() throws InterruptedException {\n super.runOpMode();\n // LeftServo.setPosition(0.4);\n // RightServo.setPosition(0.5);\n\n waitForStart();\n telemetry.addData(\"Angles\", MyDriveTrain.getAngle());\n telemetry.update();\n telemetry.addData(\"Mikum:\", Mikum);\n telemetry.update();\n LF.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.FLOAT);\n RF.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.FLOAT);\n LB.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.FLOAT);\n RB.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.FLOAT);\n\n MyDriveTrain.encoderDrive(0.8, -30, 30, 30, -30, 1);\n MyDriveTrain.Rotate(0,0.1,10);\n// Mikum = MyVuforiaStone.ConceptVuforiaSkyStoneNavigationWebcam();\n// Mikum = 3;\n LF.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n RF.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n LB.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n RB.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n\n\n if (Mikum > 2) {\n telemetry.addLine(\"you're on the right\");\n telemetry.update();\n MyDriveTrain.encoderDrive(0.8, -84, 84, 84, -84, 1);\n MyIntake.maxIntake();\n MyDriveTrain.encoderDrive(0.8, -25, -25, -25, -25, 2);\n sleep(500);\n// MyDriveTrain.Verification(cubeIn,cubeNotInMM);\n\n MyIntake.ShutDown();\n MyDriveTrain.encoderDrive(0.8, 45, -45, -45, 45, 1);\n MyDriveTrain.Rotate(0,0.1,10);\n MyDriveTrain.encoderDrive(0.8, 100, 100, 100, 100, 2);\n }\n\n else if (Mikum < -2) {\n telemetry.addLine(\"you're on the left\");\n telemetry.update();\n MyDriveTrain.encoderDrive(0.8, 15, 15, 15, 15, 2);\n MyDriveTrain.encoderDrive(0.8, -86, 86, 86, -86, 1);\n MyIntake.maxIntake();\n MyDriveTrain.encoderDrive(0.8, -25, -25, -25, -25, 2);\n sleep(500);\n// MyDriveTrain.Verification(cubeIn,cubeNotInMM);\n\n MyIntake.ShutDown();\n MyDriveTrain.encoderDrive(0.8, 50, -50, -50, 50, 1);\n MyDriveTrain.Rotate(0,0.1,10);\n MyDriveTrain.encoderDrive(1, 85, 85, 85, 85, 2);\n\n\n\n } else {\n telemetry.addLine(\"You are on the center!\");\n telemetry.update();\n MyDriveTrain.encoderDrive(0.8, 30, 30, 30, 30, 2);\n MyDriveTrain.encoderDrive(0.5, -82, 82, 82, -82, 1);\n MyIntake.maxIntake();\n MyDriveTrain.encoderDrive(0.8, -25, -25, -25, -25, 2);\n sleep(500);\n// MyDriveTrain.Verification(cubeIn,cubeNotInMM);\n\n MyIntake.ShutDown();\n MyDriveTrain.encoderDrive(0.8, 45, -45, -45, 45, 1);\n MyDriveTrain.Rotate(0,0.1,10);\n MyDriveTrain.encoderDrive(1, 80, 80, 80, 80, 2);\n\n }\n\n MyDriveTrain.Rotate(0,0.2,10);\n MyIntake.maxIntake();\n sleep(500);\n MyIntake.ShutDown();\n Output.setPosition(OutputDown);\n MyDriveTrain.encoderDrive(1, 130, 130, 130, 130, 2);\n MyDriveTrain.encoderDrive(0.8, -5, 5, 5, -5, 1);\n\n MyDriveTrain.RotateP(90,1,10,0.0108);\n sleep(500);\n MyDriveTrain.encoderDrive(0.2,29,29,29,29,2);\n MyDriveTrain.Rotate(90,0.1,10);\n LeftServo.setPosition(0.15);\n RightServo.setPosition(0.2);\n MyDriveTrain.encoderDrive(0.1,10,10,10,10,2);\n LeftServo.setPosition(LeftServoDown);\n RightServo.setPosition(RightServoDown);\n sleep(500);\n MyDriveTrain.encoderDrive(1,-90,-90,-90,-90,2);\n MyDriveTrain.Rotate(-0,0.5,10);\n MyDriveTrain.encoderDrive(1,40,40,40,40,2);\n\n MyElevator.ElevateWithEncoder(-450, 0.8, 0.5);\n sleep(500);\n Arm.setPosition(1);\n sleep(1500);\n MyElevator.ElevateWithEncoder(0, 0.3, 0.0035);\n sleep(700);\n Output.setPosition(OutputUp);\n sleep(500);\n MyElevator.ElevateWithEncoder(-500, 0.3, 0.5);\n Arm.setPosition(0.135);\n sleep(1000);\n MyElevator.ElevateWithEncoder(0, 0.5, 0.003);\n\n LeftServo.setPosition(LeftServoUp);\n RightServo.setPosition(RightServoUp);\n MyDriveTrain.Rotate(0,0.4,10);\n MyDriveTrain.encoderDrive(0.3,-30,30,30,-30,2);\n ParkingMot.setPosition(ParkingMotIn);\n sleep(500);\n MyDriveTrain.encoderDrive(0.8, -5, 5, 5, -5, 1);\n MyDriveTrain.encoderDrive(0.5,-43,-43, -43,-43,1);\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void onScannedRobot(ScannedRobotEvent e ) {\n\t\t// Replace the next line with any behavior you would like\n \n \n \n if (target==e.getName()) {\n \tdouble absBearing = e.getBearingRadians() + getHeadingRadians();\n \tsetTurnGunRightRadians(\n \t Utils.normalRelativeAngle(absBearing - \n \t getGunHeadingRadians())\n \t );\n \tfire(1);\n } else if (target==\"NULLNULLNULL\" ) {\n \ttarget=e.getName();\n }\n \n\t\tout.println(\"\\ntarget \"+target+\n\t\t\t\t\t\"\\nmy change \"+\n\t\t\t\t\t\"\\nmy radar \"+getRadarHeadingRadians());\n\t\t\n\t\t\n\t}" ]
[ "0.7055639", "0.7055639", "0.7055639", "0.6855842", "0.67863035", "0.67863035", "0.6782274", "0.67736286", "0.67736286", "0.67736286", "0.67736286", "0.67736286", "0.67736286", "0.6763968", "0.67063296", "0.662317", "0.6610946", "0.6603239", "0.6603077", "0.65345514", "0.65345514", "0.64953357", "0.64670175", "0.6465645", "0.64218503", "0.6418091", "0.64086926", "0.6381618", "0.6377833", "0.63673913", "0.63315207", "0.63090456", "0.63072354", "0.6306959", "0.62765217", "0.6270884", "0.6270428", "0.62572116", "0.62549007", "0.62382567", "0.62276524", "0.62247473", "0.6222245", "0.6215327", "0.6213627", "0.6192725", "0.6187645", "0.6171537", "0.6168279", "0.6159704", "0.6156897", "0.6151959", "0.6150921", "0.61401653", "0.61305666", "0.612884", "0.6125918", "0.6110648", "0.61089545", "0.6108783", "0.60957485", "0.609161", "0.6090736", "0.6090317", "0.60902756", "0.6087592", "0.60827154", "0.6081999", "0.6066601", "0.60579", "0.60568357", "0.60532486", "0.6037102", "0.60365194", "0.603441", "0.6030458", "0.60278636", "0.60274094", "0.6023569", "0.6022464", "0.6016397", "0.6014617", "0.60135627", "0.60087395", "0.60062224", "0.60054654", "0.5999999", "0.59991896", "0.5997833", "0.59896624", "0.59875834", "0.5984715", "0.59783274", "0.59767926", "0.59767926", "0.59767926", "0.59767926", "0.59767926", "0.59767926", "0.59767926", "0.5975938" ]
0.0
-1
String startOrEnd = intent.getStringExtra("START_OR_END"); String channel = intent.getStringExtra("NOTIFICATION_CHANNEL");
@Override public void onReceive(Context context, Intent intent) { String type = intent.getStringExtra("NOTIFICATION_TYPE"); String channelId = intent.getStringExtra("CHANNEL_ID"); NotificationManagerCompat notificationManager = NotificationManagerCompat.from(context); Notification notification = null; if (type.contains("course")) { String content = (type.contains("start")) ? "Your course starts today!" : "Your course ends today!"; notification = new NotificationCompat.Builder(context, App.CHANNEL_COURSE_ID).setSmallIcon(R.drawable.ic_notifications_white_24dp).setContentTitle("New Course Information").setContentText(content).build(); } else { notification = new NotificationCompat.Builder(context, App.CHANNEL_ASSESSMENT_ID).setSmallIcon(R.drawable.ic_notifications_white_24dp).setContentTitle("New Assessment Information").setContentText("Your assessment is due today!").build(); } notificationManager.notify(Integer.parseInt(channelId), notification); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void getIncomingIntent()\n {\n if(getIntent().hasExtra(\"Title\")\n && getIntent().hasExtra(\"Time\")\n && getIntent().hasExtra(\"Date\")\n && getIntent().hasExtra(\"Duration\")\n && getIntent().hasExtra(\"Location\")\n && getIntent().hasExtra(\"EventDetails\"))\n {\n Title = getIntent().getStringExtra(\"Title\");\n Time = getIntent().getStringExtra(\"Time\");\n Date = getIntent().getStringExtra(\"Date\");\n Duration = getIntent().getStringExtra(\"Duration\");\n Location = getIntent().getStringExtra(\"Location\");\n EventDetails = getIntent().getStringExtra(\"EventDetails\");\n\n setData(Title,Time,Date,Duration,Location,EventDetails);\n }\n }", "@Override\n public void onReceive(Context context, Intent intent) {\n\n NotificationChannel notificationChannel = new NotificationChannel(\"CHANNELID\", \"name\", NotificationManager.IMPORTANCE_HIGH );\n NotificationManager notificationManager = context.getSystemService(NotificationManager.class);\n\n notificationManager.createNotificationChannel(notificationChannel);\n\n Intent i = new Intent(context, DisplayMedication.class);\n\n // FIXME - hardcoded values\n i.putExtra(\"MedicationName\",\"Vicodin\" + \"\");\n i.putExtra(\"DoseAmount\",\"1\" + \"\");\n i.putExtra(\"HourlyFrequency\",\"2\" + \"\");\n i.putExtra(\"DaysBetweenDose\",\"7\" + \"\");\n /* <--- above this line ---> */\n\n\n PendingIntent pendingIntent = PendingIntent.getActivity(context, 0, i, PendingIntent.FLAG_UPDATE_CURRENT);\n\n\n NotificationCompat.Builder builder = new NotificationCompat.Builder(context, \"CHANNELID\")\n .setSmallIcon(R.drawable.icon)\n .setContentTitle(\"Medication Time\")\n .setContentText(\"Time to take a medication\")\n .setPriority(NotificationManager.IMPORTANCE_HIGH)\n .setContentIntent(pendingIntent);\n NotificationManagerCompat notificationManagerCompat = NotificationManagerCompat.from(context);\n notificationManagerCompat.notify(0, builder.build());\n\n\n }", "public NotificationCompat.Builder getChannel1Notification(String message){\n\n Intent confirmIntent = new Intent(this, Alarm2Activity.class); //can create an activity here that simply says \"Take med\"\n confirmIntent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP);\n confirmIntent.setAction(YES_ACTION);\n\n Intent openAppIntent = new Intent(this, MedicineActivity.class); //can create an activity here that simply says \"Take med\"\n openAppIntent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP);\n\n //processIntentAction(getIntent()); //where to put this???\n\n NotificationCompat.Builder notificationBuilder = new NotificationCompat.Builder(getApplicationContext(), Channel1_ID)\n .setContentTitle(getString(R.string.med_notif_title))\n .setContentText(message)\n .setContentIntent(PendingIntent.getActivity(this, REQUEST_CODE, openAppIntent, PendingIntent.FLAG_UPDATE_CURRENT))\n .setSmallIcon(R.drawable.ic_blur_circular_black_24dp) //setLargeIcon as a picture of a pill\n .addAction(new NotificationCompat.Action(\n R.drawable.ic_blur_circular_black_24dp,\n getString(R.string.confirm_med_taken),\n PendingIntent.getActivity(this, REQUEST_CODE, confirmIntent, PendingIntent.FLAG_UPDATE_CURRENT)))\n .setCategory(NotificationCompat.CATEGORY_REMINDER)\n .setAutoCancel(true);\n //.setTimeOutAfter()\n //.setStyle(new NotificationCompat.BigTextStyle().bigText(context.getString(message)))\n //.setColor(ContextCompat.getColor(context, R.color.colorPrimary))\n //.setTimeOutAfter();\n\n if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT && Build.VERSION.SDK_INT < Build.VERSION_CODES.O){\n notificationBuilder.setPriority(NotificationCompat.PRIORITY_HIGH);\n }\n\n return notificationBuilder;\n }", "private void getIntentData() {\n\t\ttry{\n\t\t\tIN_CATEGORYID = getIntent().getStringExtra(CATEGORY_ID) == null ? \"0\" : getIntent().getStringExtra(CATEGORY_ID);\n\t\t\tIN_ARTICLENAME = getIntent().getStringExtra(ARTICLENAME) == null ? \"\" : getIntent().getStringExtra(ARTICLENAME) ;\n\t\t\tIN_ARTICLEID = getIntent().getStringExtra(ARTICLEID) == null ? \"\" : getIntent().getStringExtra(ARTICLEID);\n\t\t}catch(Exception e){\n\t\t}\n\t}", "private void sendNotification(Bundle extra) {\n\n if(CMAppGlobals.DEBUG) Logger.i(TAG, \":: GCMIntentService.sendNotification : extra : \" + extra);\n\n// int message = R.string.gcm_message;\n String message = extra.getString(\"message\");\n String status = extra.getString(\"status\");\n String orderId = extra.getString(\"order_id\");\n\n if(CMAppGlobals.DEBUG) Logger.i(TAG, \":: GCMIntentService.sendNotification : message : \" + message);\n if(CMAppGlobals.DEBUG) Logger.i(TAG, \":: GCMIntentService.sendNotification : status : \" + status);\n\n\n GCMMessages receivedStatus = GCMMessages.NONE;\n\n String type = extra.getString(\"type\");\n if (type != null && type.equals(\"webview\")){\n\n String subtitle = extra.getString(\"subtitle\");\n String title = extra.getString(\"title\");\n String url = extra.getString(\"url\");\n if (url != null && !url.isEmpty())\n EventBus.getDefault().post(new WebViewDialogMessage(url));\n\n GCMUtils.GCMNotifyWebViewNews(this, title, subtitle, GCMMessages.WEB_VIEW_NEWS.ordinal(), new WebViewDialogMessage(url));\n }\n\n if (status != null) {\n if (TextUtils.equals(status, \"AM\")) {\n receivedStatus = GCMMessages.AM;\n GCMUtils.GCMNotifyUI(this, message, receivedStatus.ordinal(),\n orderId);\n } else if (TextUtils.equals(status, \"R\")) {\n receivedStatus = GCMMessages.R;\n GCMUtils.GCMNotifyUI(this, message, receivedStatus.ordinal(),\n orderId);\n } else if (TextUtils.equals(status, \"A\")) {\n receivedStatus = GCMMessages.A;\n GCMUtils.GCMNotifyUI(this, message, receivedStatus.ordinal(),\n orderId);\n } else if (TextUtils.equals(status, \"CC\")) {\n receivedStatus = GCMMessages.CC;\n GCMUtils.GCMNotifyUI(this, message, receivedStatus.ordinal(),\n orderId);\n } else if (TextUtils.equals(status, \"NC\")) {\n receivedStatus = GCMMessages.NC;\n GCMUtils.GCMNotifyUI(this, message, receivedStatus.ordinal(),\n orderId);\n } else if (TextUtils.equals(status, \"SC\")) {\n receivedStatus = GCMMessages.SC;\n GCMUtils.GCMNotifyUI(this, message, receivedStatus.ordinal(),\n orderId);\n } else if (TextUtils.equals(status, \"BR\")) {\n receivedStatus = GCMMessages.BR;\n GCMUtils.GCMNotifyUI(this, message, receivedStatus.ordinal(),\n orderId);\n } else if (TextUtils.equals(status, \"RC\")) {\n receivedStatus = GCMMessages.RC;\n GCMUtils.GCMNotifyUI(this, message, receivedStatus.ordinal(),\n orderId);\n } else if (TextUtils.equals(status, \"OW\")) {\n receivedStatus = GCMMessages.OW;\n GCMUtils.GCMNotifyUI(this, message, receivedStatus.ordinal(),\n orderId);\n }\n\n else {\n if(CMAppGlobals.DEBUG)Logger.i(TAG, \":: GCMIntentService : JSON CASE \");\n try {\n JSONObject json = new JSONObject(status);\n if(CMAppGlobals.DEBUG)Logger.i(TAG, \":: GCMIntentService : json : \" + json.toString());\n\n if (json != null) {\n String orderStatus = JsonParser.getString(json,\n \"status\");\n if (orderStatus != null\n && TextUtils.equals(orderStatus, \"CP\")) {\n receivedStatus = GCMMessages.CP;\n String price = json.optString(\"price\");\n String bonus = json.optString(\"bonus\");\n String time = json.optString(\"time\");\n\n GCMUtils.GCMNotifyUIEx(this, message,\n receivedStatus.ordinal(), orderId, price,\n time, bonus);\n } else if (TextUtils.equals(orderStatus, \"AR\")) {\n return;\n } else if (TextUtils.equals(orderStatus, \"AM\")) {\n receivedStatus = GCMMessages.AM;\n GCMUtils.GCMNotifyUI(this, message, receivedStatus.ordinal(),\n orderId);\n } else if (TextUtils.equals(orderStatus, \"R\")) {\n receivedStatus = GCMMessages.R;\n GCMUtils.GCMNotifyUI(this, message, receivedStatus.ordinal(),\n orderId);\n } else if (TextUtils.equals(orderStatus, \"A\")) {\n receivedStatus = GCMMessages.A;\n GCMUtils.GCMNotifyUI(this, message, receivedStatus.ordinal(),\n orderId);\n } else if (TextUtils.equals(orderStatus, \"CC\")) {\n receivedStatus = GCMMessages.CC;\n GCMUtils.GCMNotifyUI(this, message, receivedStatus.ordinal(),\n orderId);\n } else if (TextUtils.equals(orderStatus, \"NC\")) {\n receivedStatus = GCMMessages.NC;\n GCMUtils.GCMNotifyUI(this, message, receivedStatus.ordinal(),\n orderId);\n } else if (TextUtils.equals(orderStatus, \"SC\")) {\n receivedStatus = GCMMessages.SC;\n GCMUtils.GCMNotifyUI(this, message, receivedStatus.ordinal(),\n orderId);\n } else if (TextUtils.equals(orderStatus, \"BR\")) {\n receivedStatus = GCMMessages.BR;\n GCMUtils.GCMNotifyUI(this, message, receivedStatus.ordinal(),\n orderId);\n } else if (TextUtils.equals(orderStatus, \"RC\")) {\n receivedStatus = GCMMessages.RC;\n GCMUtils.GCMNotifyUI(this, message, receivedStatus.ordinal(),\n orderId);\n } else if (TextUtils.equals(orderStatus, \"OW\")) {\n receivedStatus = GCMMessages.OW;\n GCMUtils.GCMNotifyUI(this, message, receivedStatus.ordinal(),\n orderId);\n }\n }\n } catch (JSONException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n }\n }\n\n // notifies user\n if (LocServicePreferences.getAppSettings().getString(\n LocServicePreferences.Settings.NEWS_WEBVIEW_MESSAGE.key(), \"\") != null\n && !LocServicePreferences.getAppSettings()\n .getString(LocServicePreferences.Settings.NEWS_WEBVIEW_MESSAGE.key(), \"\")\n .isEmpty()) {\n NotificationManager mNotificationManager = (NotificationManager) CMApplication\n .getAppContext().getSystemService(\n Context.NOTIFICATION_SERVICE);\n Class<?> startClass = MainActivity.class;\n Intent resultIntent = new Intent(CMApplication.getAppContext(), startClass);\n resultIntent.putExtra(\"WEBVIEW\", \"WEBVIEW\");\n TaskStackBuilder stackBuilder = TaskStackBuilder.create(CMApplication.getAppContext());\n // Adds the back stack\n stackBuilder.addParentStack(startClass);\n // Adds the Intent to the top of the stack\n stackBuilder.addNextIntent(resultIntent);\n // Gets a PendingIntent containing the entire back stack\n PendingIntent resultPendingIntent = PendingIntent.getActivity(\n getApplicationContext(), 0, resultIntent,\n PendingIntent.FLAG_UPDATE_CURRENT);\n\n NotificationCompat.Builder mBuilder = new NotificationCompat.Builder(\n CMApplication.getAppContext())\n .setSmallIcon(R.drawable.ic_nf_small)\n .setDefaults(Notification.DEFAULT_SOUND)\n .setAutoCancel(true)\n .setContentTitle(\n CMApplication.getAppContext().getString(\n R.string.app_name))\n .setStyle(\n new NotificationCompat.BigTextStyle()\n .bigText(LocServicePreferences\n .getAppSettings()\n .getString(\n LocServicePreferences.Settings.NEWS_WEBVIEW_MESSAGE\n .key(), \"\")\n .toString()))\n .setContentText(\n LocServicePreferences.getAppSettings().getString(\n LocServicePreferences.Settings.NEWS_WEBVIEW_MESSAGE.key(), \"\"));\n LocServicePreferences.getAppSettings().setSetting(\n LocServicePreferences.Settings.NEWS_WEBVIEW_MESSAGE, \"\");\n\n mBuilder.setContentIntent(resultPendingIntent);\n mNotificationManager.notify(0, mBuilder.build());\n\n } else if ((receivedStatus != GCMMessages.NONE)\n && TextUtils.isEmpty(orderId)) {\n// Utils.generateNotification(this, receivedStatus, orderId, -1);\n }\n\n }", "@Override\n public void onMessageReceived(MessageEvent messageEvent) {\n\n if( messageEvent.getPath().equalsIgnoreCase(\"/0\")) {\n String value = new String(messageEvent.getData(), StandardCharsets.UTF_8);\n Intent intent = new Intent(this, MainActivity.class );\n\n intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n //you need to add this flag since you're starting a new activity from a service\n String string = value;\n String[] parts = string.split(\",\");\n String part1 = parts[0];\n String part2 = parts[1];\n String part3 = parts[2];\n\n\n intent.putExtra(\"0\", part1);\n intent.putExtra(\"1\", part2);\n intent.putExtra(\"2\", part3);\n startActivity(intent);\n } else {\n super.onMessageReceived( messageEvent );\n }\n\n }", "@Override\n public void onReceive(Context context, Intent intent) {\n if (intent.getAction().equals(Config.REGISTRATION_COMPLETE)) {\n // gcm successfully registered\n // now subscribe to `global` topic to receive app wide notifications\n String token = intent.getStringExtra(\"token\");\n\n //Toast.makeText(getContext().getApplicationContext(), \"GCM registration token: \" + token, Toast.LENGTH_LONG).show();\n\n } else if (intent.getAction().equals(Config.SENT_TOKEN_TO_SERVER)) {\n // gcm registration id is stored in our server's MySQL\n\n //Toast.makeText(getContext().getApplicationContext(), \"GCM registration token is stored in server!\", Toast.LENGTH_LONG).show();\n\n } else if (intent.getAction().equals(Config.PUSH_NOTIFICATION)) {\n // new push notification is received\n NotificationUtils notificationUtils = new NotificationUtils();\n notificationUtils.playNotificationSound();\n String message = intent.getStringExtra(\"message\");\n String from = intent.getStringExtra(\"from\");\n String time = intent.getStringExtra(\"time\");\n String other = intent.getStringExtra(\"otherId\");\n\n getHistory();\n\n //Toast.makeText(getApplicationContext(), from + \": \" + message + \" \" + other, Toast.LENGTH_LONG).show();\n //saveToPreferences(MainActivity.this,KEY_NOTIFICATIONS,null);\n }\n }", "@Override\n public void onReceive(Context context, Intent intent) {\n\n Uri alarmsound = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_ALARM);\n\n Intent intent1 = new Intent(context, Reminderku.class);\n intent1.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n\n TaskStackBuilder taskStackBuilder = TaskStackBuilder.create(context);\n taskStackBuilder.addParentStack(Reminderku.class);\n taskStackBuilder.addNextIntent(intent1);\n\n PendingIntent intent2 = taskStackBuilder.getPendingIntent(1,PendingIntent.FLAG_UPDATE_CURRENT);\n\n NotificationCompat.Builder builder = new NotificationCompat.Builder(context);\n\n NotificationChannel channel = null;\n if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.O) {\n channel = new NotificationChannel(\"my_channel_01\",\"hello\", NotificationManager.IMPORTANCE_HIGH);\n }\n\n Notification notification = builder.setContentTitle(\"KitaFit\")\n .setContentText(intent.getStringExtra(\"Message\")).setAutoCancel(true)\n .setSound(alarmsound).setSmallIcon(R.mipmap.ic_launcher_round)\n .setContentIntent(intent2)\n .setChannelId(\"my_channel_01\")\n .build();\n\n NotificationManager notificationManager = (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE);\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {\n notificationManager.createNotificationChannel(channel);\n }\n notificationManager.notify(1, notification);\n\n }", "@Override\n \tpublic void onReceive(Context context, Intent intent)\n \t{\n \tMediaInfoArtist = intent.getStringExtra(\"artist\");\n \tMediaInfoAlbum = intent.getStringExtra(\"album\");\n \tMediaInfoTrack = intent.getStringExtra(\"track\");\n \tMediaInfoNeedsUpdate = true;\n \tLog.d(\"OLV Music\",\"Artist: \"+MediaInfoArtist+\", Album: \"+MediaInfoAlbum+\" and Track: \"+MediaInfoTrack);\n \t}", "private void getExtrasFromCallingActivity() {\n extras = getIntent().getExtras();\n if (extras != null) {\n testIdString = extras.getString(\"TEST_ID_FOR_QUESTIONS\");\n } else {\n testIdString = \"-1\";\n }\n }", "protected JSONObject parseNotificationIntent(Intent intent) {\n\t\tJSONObject result = null;\n\t\tif (intent != null && intent.hasExtra(Notificare.INTENT_EXTRA_NOTIFICATION)) {\n\t\t\tLog.d(TAG, \"Launched with Notification\");\n\t\t\ttry {\n\t\t\t\tNotificareNotification notification = intent.getParcelableExtra(Notificare.INTENT_EXTRA_NOTIFICATION);\n\t\t\t\tresult = notification.toJSONObject();\n\t\t\t\tif (intent.hasExtra(Notificare.INTENT_EXTRA_INBOX_ITEM_ID)) {\n\t\t\t\t\tresult.put(\"itemId\", intent.getStringExtra(Notificare.INTENT_EXTRA_INBOX_ITEM_ID));\n\t\t\t\t}\n\t\t\t\tresult.put(\"foreground\", false);\n\t\t\t} catch (JSONException e) {\n\t\t\t\tLog.w(TAG, \"JSON parse error\");\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}", "private void getIntentValues() {\n\n// itemname= getIntent().getExtras().getString(IntentsConstants.item_name);\n// itemPrice = getIntent().getExtras().getDouble(IntentsConstants.item_price);\n Bundle bundle = getArguments();\n menusItem= (MenusItem) bundle.getSerializable(\"Item\");\n itemname=menusItem.getName();\n itemPrice=menusItem.getPrice();\n\n}", "@Override\n protected void getFromIntent() {\n this.groupID = getIntent().getStringExtra(\"groupId\");\n this.groupName = getIntent().getStringExtra(\"groupName\");\n }", "private void handleNotification() {\r\n\r\n Intent intent = getIntent();\r\n\r\n if (intent == null)\r\n return;\r\n\r\n fromNotification = intent.getBooleanExtra(Constants.FROM_NOTIFICATION, false);\r\n\r\n if (isFromNotification())\r\n sendNotificationAnalytics(feedId);\r\n\r\n }", "@Override\n public void onReceive(Context context, Intent intent) {\n NotificationCompat.Builder builder = new NotificationCompat.Builder(context, \"channel\")\n .setSmallIcon(R.drawable.ic_baseline_message_24)\n .setContentTitle(\"You have an upcoming event!!\")\n .setContentText(\"Click on the message to view more\")\n .setPriority(NotificationCompat.PRIORITY_HIGH);\n NotificationManagerCompat notificationManager = NotificationManagerCompat.from( context);\n notificationManager.notify(200,builder.build());\n }", "void processIntent(Intent intent) {\n Parcelable[] rawMsgs = intent.getParcelableArrayExtra(\n NfcAdapter.EXTRA_NDEF_MESSAGES);\n // only one message sent during the beam\n NdefMessage msg = (NdefMessage) rawMsgs[0];\n // record 0 contains the MIME type, record 1 is the AAR, if present\n String payload = new String(msg.getRecords()[0].getPayload());\n Toast.makeText(this, payload, Toast.LENGTH_LONG).show();\n Log.i(TAG, payload);\n }", "@Override\r\n public void onReceive(Context context, Intent intent) {\n Log.d(TAG, \"onReceive: -->\");\r\n String str = intent.getDataString();\r\n Toast.makeText(context, \"Got brocastcast\" + intent.getStringExtra(\"Extra\"), Toast.LENGTH_SHORT).show();\r\n }", "private void getDataFromMainActivity(){\n Intent intent = getIntent();\n Bundle bundle = intent.getExtras();\n site = bundle.getString(\"site\");\n }", "private void showNotificationCourse(Bundle data) {\n\n/* try {\n int unreadNotificationCount = Integer.valueOf(data.getString(\"total_unread_notification\"));\n NotificationCountEventBus.Event event = new NotificationCountEventBus.Event(unreadNotificationCount);\n NotificationCountEventBus.getInstance().post(event);\n } catch (Exception ignored) {\n\n }*/\n\n // check the type_push from data and navigate to activity\n Intent intent = navigateNotification(data);\n\n PendingIntent pendingIntent = PendingIntent.getActivity(this, notificationId, intent,\n PendingIntent.FLAG_UPDATE_CURRENT | PendingIntent.FLAG_ONE_SHOT);\n\n\n Uri defaultSoundUri = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION);\n NotificationCompat.Builder notificationBuilder = new NotificationCompat.Builder(this)\n .setSmallIcon(getNotificationIcon())\n .setContentTitle(data.getString(\"title\"))\n .setContentText(data.getString(\"body\"))\n .setAutoCancel(true)\n .setSound(defaultSoundUri)\n .setContentIntent(pendingIntent);\n\n NotificationManager notificationManager =\n (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);\n\n notificationManager.notify(notificationId++, notificationBuilder.build());\n }", "protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n if(resultCode==RESULT_OK&&requestCode==ACTIVITY_DOS){\n\n String nom=data.getExtras().getString(\"nombreIntent\");\n String loc=data.getExtras().getString(\"localidadIntent\");\n String pro=data.getExtras().getString(\"provinciaIntent\");\n boolean bueno = data.getExtras().getBoolean(\"eleccionIntent\");\n if(bueno==true) {\n notificationExtendida(nom, \"De \" + loc + \", (\"+pro+\")\",nom,loc,pro,1);\n }else{\n msg1.setText(nom);\n msg2.setText(loc);\n msg3.setText(pro);\n }\n }\n else{\n Toast.makeText(getApplicationContext(),\"ERROR EN LA APLICACION\", Toast.LENGTH_SHORT).show();\n }\n }", "public void onReceive(Context context, Intent intent) {\n\t\t\tSystem.out.println(\"接收到信息了=======act===============\");\n\t\t\tString extra = intent.getExtras().getString(Constant.PUSHTYPE);\n\t\t\tSystem.out.println(\"接收到信息了=======act===============\" + extra);\n\t\t\ttry {\n\t\t\t\tJSONObject extraJson = new JSONObject(extra);\n//\t\t\t\tJSONObject android = extraJson.getJSONObject(\"android\");\n\t\t\t\tint msgtype = Integer.parseInt(extraJson.getString(\"msgtype\"));\n\t\t\t\tswitch (msgtype) {\n\t\t\t\t\tcase 0: //来新抢单了\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 31: //来新消息了\n\t\t\t\t\t\tConstant.PUSH_MSG_NUM += 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t//{\"android\":{\"msgtype\":\"0\",\"sound\":\"happy\",\"badge\":1}}\n\n// if (msgtype.equals(Constant.ENTRUSTDISABLED)) {\n// ToastUtils.getInstance(MyApplication.getIntence().getApplicationContext()).show(\"您的账号已经被禁用,请联系客服!\");\n// UserInfoUtil.quiteAccount(MyApplication.getIntence().getApplicationContext());\n// UserInfoUtil.setExitAccount(MyApplication.getIntence().getApplicationContext(), true);\n// SharePreferenceUtil.getInstance(MyApplication.getIntence().getApplicationContext())\n// .setString(SharePreferenceConstant.ENTRUST_MOBLIEPHONE, \"\");\n// MyApplication.getIntence().isBackToMain = true;\n// Intent intentLogin = new Intent(getActivity(), LoginActivity.class);\n// startActivity(intentLogin);\n// new ActivityAnimation(getActivity(), Constant.RIGHT_ENTER);\n// JPushInterface.stopPush(MyApplication.getIntence().getApplicationContext());\n// }\n\t\t\t\t /*\n * msgtype 类型\n * 0 您有一条新的抢单\n * 1 抢单成功\n * 2 抢单失败\n * 3 结算成功\n * 4 承运商禁用\n * 14 委托方禁用\n * 11 您有一条新的委托已成立\n * 12 您有一条订单已送达\n * 31 新的公告\n */\n//\t\t\t\tif(msgtype.equals(\"0\")){\n//\n//\t\t\t\t}else if(msgtype.equals(\"31\")){\n//\n//\t\t\t\t}\n\t\t\t} catch (JSONException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\n\n\t\t}", "public void onMessageReceived(RemoteMessage remoteMessage) {\n Log.d(TAG, \"FCM Message Id: \" + remoteMessage.getMessageId());\n Log.d(TAG, \"FCM Notification Message: \" + remoteMessage.getNotification());\n Log.d(TAG, \"FCM Data Message: \" + remoteMessage.getData());\n\n Map<String, String> payload = remoteMessage.getData();\n\n if (payload != null) {\n String payloadType = payload.get(\"type\");\n\n switch (payloadType) {\n case \"invitation\":\n Intent inviteIntent = new Intent();\n inviteIntent.setAction(BroadcastHelper.INVITE_REQUEST);\n inviteIntent.putExtra(BroadcastHelper.ADMIN, payload.get(\"sender\"));\n inviteIntent.putExtra(BroadcastHelper.GAME_NAME, payload.get(\"game\"));\n inviteIntent.putExtra(BroadcastHelper.PLAYER_NAME, payload.get(\"receiver\"));\n sendBroadcast(inviteIntent);\n break;\n case \"game_start\":\n Intent gameStartIntent = new Intent();\n gameStartIntent.setAction(BroadcastHelper.GAME_START);\n gameStartIntent.putExtra(BroadcastHelper.ADMIN, payload.get(\"admin\"));\n gameStartIntent.putExtra(BroadcastHelper.GAME_NAME, payload.get(\"game\"));\n// gameStartIntent.putExtra(BroadcastHelper.SENDER, payload.get(\"sender\"));\n// gameStartIntent.putExtra(BroadcastHelper.PLAYER_NAME, payload.get(\"player\"));\n sendBroadcast(gameStartIntent);\n break;\n case \"invite_response\":\n Intent inviteResponseIntent = new Intent();\n inviteResponseIntent.setAction(BroadcastHelper.INVITE_RESPONSE);\n inviteResponseIntent.putExtra(BroadcastHelper.PLAYER_NAME, payload.get(\"player_name\")); // TODO: Complete Cloud Fxn\n sendBroadcast(inviteResponseIntent);\n break;\n case \"new_player_joined\":\n Intent newPlayerJoinedIntent = new Intent();\n newPlayerJoinedIntent.setAction(BroadcastHelper.NEW_PLAYER_JOINED);\n newPlayerJoinedIntent.putExtra(BroadcastHelper.PLAYER_NAME, payload.get(\"player_name\")); // TODO: Complete Cloud Fxn\n // newPlayerJoinedIntent.putExtra(BroadcastHelper.LOCATION, payload.get(\"location\")); // TODO: Complete Cloud Fxn\n sendBroadcast(newPlayerJoinedIntent);\n break;\n case \"game_end_message\":\n Intent gameEndIntent = new Intent();\n gameEndIntent.setAction(BroadcastHelper.GAME_ENDS);\n gameEndIntent.putExtra(BroadcastHelper.WINNING_TEAM, payload.get(\"winner\"));\n gameEndIntent.putExtra(BroadcastHelper.RESULT_MESSAGE, payload.get(\"message\"));\n sendBroadcast(gameEndIntent);\n // TODO: PASS NAME OF WINNING TEAM AND THE GAME MESSAGE (SEE FXN)\n break;\n default:\n Log.d(TAG, \"Intent error\");\n }\n }\n\n }", "private void receiveData()\n {\n Intent i = getIntent();\n loginStatus = i.getIntExtra(\"Login_Status\", 0);\n deviceStatus = i.getIntExtra(\"Device_Status\", 0);\n }", "@Override\n public void onReceive(Context context, Intent intent){\n NotificationCompat.Builder builder = new NotificationCompat.Builder(context, \"myCalendar\")\n .setSmallIcon(R.mipmap.ic_launcher_round)\n .setContentTitle(\"Calendar App\")\n .setContentText(\"Event Reminder!\")\n .setAutoCancel(true)\n .setPriority(NotificationCompat.PRIORITY_DEFAULT);\n\n NotificationManagerCompat notificationManager = NotificationManagerCompat.from(context);\n\n notificationManager.notify(154, builder.build()); //building the notification with the info\n }", "private void sendNotification(String title, String messageBody, Map<String, String> extra) {\n Intent intent = new Intent(this, MainActivity.class);\n intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n PendingIntent pendingIntent;\n if (extra != null) {\n String type = extra.get(\"type\") != null ? extra.get(\"type\") : \"\";\n switch (type) {\n case \"page\":\n // for background, foreground can get this message directly without intent.putExtra()\n intent.putExtra(\"type\", type);\n if (extra.get(\"page\") != null) {\n intent.putExtra(\"page\", extra.get(\"page\"));\n }\n if (extra.get(\"id\") != null) {\n Log.i(TAG, \"sendNotification: payload page id \" + extra.get(\"id\"));\n intent.putExtra(\"id\", extra.get(\"id\"));\n }\n pendingIntent = PendingIntent.getActivity(this, 0, intent,\n PendingIntent.FLAG_ONE_SHOT);\n break;\n case \"link\":\n // only for foreground, without sending extra\n if (extra.get(\"link\") != null) {\n Uri uri = Uri.parse(LauUtil.getLegalURL(extra.get(\"link\")));\n intent = new Intent(Intent.ACTION_VIEW, uri);\n intent.putExtra(\"link\", extra.get(\"link\"));\n }\n pendingIntent = PendingIntent.getActivity(this, 2, intent,\n PendingIntent.FLAG_ONE_SHOT);\n break;\n case \"alarm_alert\":\n pendingIntent = getPendingIntentForAlertSystem(this, 0, 0, 0);\n break;\n default:\n pendingIntent = PendingIntent.getActivity(this, 0, intent,\n PendingIntent.FLAG_ONE_SHOT);\n break;\n }\n } else {\n pendingIntent = PendingIntent.getActivity(this, 0, intent,\n PendingIntent.FLAG_ONE_SHOT);\n }\n\n String channelId = getString(R.string.default_notification_channel_id);\n Uri defaultSoundUri = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION);\n\n NotificationCompat.BigTextStyle bigTextStyle = new NotificationCompat.BigTextStyle();\n bigTextStyle.setBigContentTitle(title).bigText(messageBody);\n\n NotificationCompat.Builder notificationBuilder =\n new NotificationCompat.Builder(this, channelId)\n .setSmallIcon(R.drawable.young_icon_192x192)\n .setLargeIcon(BitmapFactory.decodeResource(getResources(), R.drawable.young_icon_192x192))\n .setContentTitle(title)\n .setContentText(messageBody)\n .setStyle(bigTextStyle)\n .setAutoCancel(true)\n .setPriority(Notification.PRIORITY_HIGH)\n .setDefaults(Notification.DEFAULT_ALL)\n// .setSound(defaultSoundUri)\n .setContentIntent(pendingIntent);\n\n NotificationManager notificationManager =\n (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);\n\n // Since android Oreo notification channel is needed.\n if (notificationManager != null) {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {\n NotificationChannel channel = new NotificationChannel(channelId,\n channelId,\n NotificationManager.IMPORTANCE_DEFAULT);\n channel.setDescription(\"Young+推送\");\n notificationManager.createNotificationChannel(channel);\n }\n notificationManager.notify(0 /* ID of notification */, notificationBuilder.build());\n }\n }", "@Override\r\n public void onReceive(Context context, Intent intent) {\n\r\n int thisConversationId = intent.getIntExtra(\"conversation_id\", -1);\r\n Bundle remoteInput = RemoteInput.getResultsFromIntent(intent);\r\n if (remoteInput != null){\r\n CharSequence replyText = remoteInput.getCharSequence(\"voice_reply_key\");\r\n Log.d(\"BasicNotifications\", \"Found voice reply [\" + replyText+ \"] from conversation_id\");\r\n }\r\n }", "private void setUpNotification() {\n if (getIntent().getExtras() != null) {\n for (String key : getIntent().getExtras().keySet()) {\n Object value = getIntent().getExtras().get(key);\n Logger.e(\"Key: \" + key + \" Value: \" + value);\n\n if(key.equals(\"Key\")) {\n try {\n String idStr = String.valueOf(value);\n int id = Integer.parseInt(idStr);\n onOpenJobItem(id);\n }\n catch (Exception e){\n e.printStackTrace();\n }\n }\n\n }\n }\n // [END handle_data_extras]\n }", "@Override\n public void onReceive(Context context, Intent intent) {\n\n\n Bundle extras = intent.getExtras();\n String action = intent.getAction();\n\n Log.i(\"Bundle extras\" ,\"\"+extras);\n Log.i(\"Bundle action\" ,\"\"+action);\n\n\n if (AppConstant.YES_ACTION.equals(action)) {\n if (extras != null) {\n\n notificationId = extras.getInt(\"NotificationId\");\n visitorID = extras.getInt(\"visitor\");\n empID = extras.getInt(\"empID\");\n date_video =extras.getString(\"date\");\n Log.i(\"DownloadT Date\",\"\"+date_video);\n date_end=extras.getLong(\"end_date_time\");\n Log.i(\"DownloadT end Date\",\"\"+date_end);\n token = extras.getString(\"token\");\n Log.i(\"fs\", \"onReceive: \"+token);\n contentInfos=new ArrayList<>();\n\n\n contentTitle=extras.getString(\"Content_Title\");\n contentType=extras.getString(\"Content_Type\");\n contentYear=extras.getInt(\"Content_Year\");\n contentRating=extras.getString(\"Content_Rating\");\n contentViewCount=extras.getString(\"Content_ViewCount\");\n contentBannerImage=extras.getString(\"Content_BannerImage\");\n//\n Log.i(\"DownloadT ContentTitle\",\"\"+contentTitle);\n Log.i(\"DownloadT ContentType\",\"\"+contentType);\n Log.i(\"DownloadT ContentYear\",\"\"+contentYear);\n Log.i(\"DownloadT ContentRating\",\"\"+contentRating);\n Log.i(\"DownloadT Contentcount\",\"\"+contentViewCount);\n Log.i(\"DownloadT ContentImg\",\"\"+contentBannerImage);\n\n\n\n\n\n }\n }\n\n }", "@Override\n\t public void onReceive(Context context, Intent intent) {\n\t Toast.makeText(appContext, intent.getStringExtra(\"cmd_value\"), Toast.LENGTH_SHORT).show();\n\t }", "String getExtra();", "@Override\n protected void onMessage(Context context, Intent intent) {\n Log.i(TAG, \"Received message\");\n String message = intent.getExtras().getString(\"price\");\n \n // notifies user\n generateNotification(context, message);\n }", "private void getAndSetIncomingIntent(){\n if (getIntent().hasExtra(\"asso\")) {\n Log.d(TAG, getIntent().getStringExtra(\"asso\"));\n edt_asso_name.setText(getIntent().getStringExtra(\"asso\"));\n }\n if (getIntent().hasExtra(\"school\")) {\n edt_school.setText(getIntent().getStringExtra(\"school\"));\n }\n if (getIntent().hasExtra(\"purpose\")) {\n edt_purpose.setText(getIntent().getStringExtra(\"purpose\"));\n }\n if (getIntent().hasExtra(\"link\")) {\n edt_link.setText(getIntent().getStringExtra(\"link\"));\n }\n if (getIntent().hasExtra(\"type\")) {\n selectedSpinnerType = getIntent().getStringExtra(\"type\");\n }\n\n }", "private void showSmallNotification_channel(NotificationCompat.Builder mBuilder, int icon, String title, String message, String timeStamp, PendingIntent resultPendingIntent, Uri alarmSound, String channel) {\n\n NotificationCompat.InboxStyle inboxStyle = new NotificationCompat.InboxStyle();\n inboxStyle.addLine(message);\n String channelId = mContext.getString(R.string.default_notification_channel_id);\n String channelName = mContext.getString(R.string.default_notification_channel_name);\n\n //This is the intent of PendingIntent\n Intent intentAction = new Intent(mContext,ActionReceiverNotification.class);\n //This is optional if you have more than one buttons and want to differentiate between two\n intentAction.putExtra(\"notify\",\"getReplay\");\n PendingIntent pIntentAction = PendingIntent.getBroadcast(mContext,NotificationID.getID(),intentAction,PendingIntent.FLAG_ONE_SHOT);\n\n // Add Replay Action to Notification\n\n String KEY_TEXT_REPLY = \"key_text_reply\";\n\n RemoteInput remoteInput = new RemoteInput.Builder(KEY_TEXT_REPLY)\n .setLabel(\"Replay\")\n .build();\n\n //Notification Action with RemoteInput instance added.\n NotificationCompat.Action replyAction = new NotificationCompat.Action.Builder(\n android.R.drawable.sym_action_chat, \"REPLY\", pIntentAction)\n .addRemoteInput(remoteInput)\n .setAllowGeneratedReplies(true)\n .build();\n\n\n\n\n NotificationCompat.Builder notificationBuilder =\n new NotificationCompat.Builder(mContext, get_Channel_ID(channel))\n .setSmallIcon(icon)\n .setTicker(title)\n .addAction(replyAction)\n .setOngoing(true)\n .setAutoCancel(true)\n .setContentTitle(title)\n .setContentIntent(resultPendingIntent)\n .setSound(alarmSound)\n .setStyle(inboxStyle)\n .setWhen(getTimeMilliSec(timeStamp));\n // .setSmallIcon(R.mipmap.ic_launcher)\n // .setLargeIcon(BitmapFactory.decodeResource(mContext.getResources(), icon));\n // .setStyle(new NotificationCompat.BigTextStyle().bigText(message));\n\n\n\n NotificationManager notificationManager = (NotificationManager) mContext.getSystemService(Context.NOTIFICATION_SERVICE);\n // Since android Oreo notification channel is needed.\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {\n NotificationChannel channelNotification = new NotificationChannel(get_Channel_ID(channel),\n channel,\n NotificationManager.IMPORTANCE_DEFAULT);\n notificationManager.createNotificationChannel(channelNotification);\n }\n\n notificationManager.notify(NotificationID.getID() /* ID of notification */, notificationBuilder.build());\n }", "void processIntent(Intent intent) {\n Parcelable[] rawMsgs = intent.getParcelableArrayExtra(\n NfcAdapter.EXTRA_NDEF_MESSAGES);\n // only one message sent during the beam\n NdefMessage msg = (NdefMessage) rawMsgs[0];\n // record 0 contains the MIME type, record 1 is the AAR, if present\n menuInfo = new String(msg.getRecords()[0].getPayload());\n \n Toast.makeText(getApplicationContext(), menuInfo, Toast.LENGTH_LONG).show();\n }", "private void openNextActivity(Intent intent) {\n\n String message = intent.getStringExtra(\"phase\");\n\n Log.d(\"STATE\", \"Waiting activity, phase is -> \" + message );\n if(message != null) {\n if (message.equals(\"USER_JOINED\")) { //TODO: This should be for ready to vote.\n Log.d(\"STATE\", \"Waiting activity, USER JOINED\" );\n\n Intent i = new Intent(this, VoteActivity.class);\n startActivity(i);\n } else if (message.equals(\"result\")) { //TODO: Change this to the new \"phase\" value\n Log.d(\"STATE\", \"Waiting activity. Meadle is ready\" );\n //Notification has been received that alerts meadle is complete\n MeadleDataManager.setHasResult(this);\n\n Intent i = new Intent(this, ResultsActivity.class);\n startActivity(i);\n } else if(message.equals(\"VOTING_FINISHED\")){\n Log.d(\"Votiing Finished\",intent.getExtras().toString());\n Intent i = new Intent(this,MeetingPointActivity.class);\n i.putExtras(intent.getExtras());\n startActivity(i);\n }\n }\n }", "@SuppressLint(\"WrongConstant\")\n @Override\n public int onStartCommand(Intent myIntent, int flags, int startId) {\n if (myIntent != null && myIntent.getExtras() != null) {\n id = myIntent.getExtras().getString(\"id\");\n time = myIntent.getExtras().getString(\"time\");\n\n }\n\n\n return START_STICKY;\n }", "@Override\n public void onNotificationPosted(StatusBarNotification sbn) {\n int notificationCode = matchNotificationCode(sbn);\n String pack = \"\";\n Bundle extras = null;\n String title = \"\";\n String text = \"\";\n String subtext = \"\";\n String key = \"\";\n try {\n pack = sbn.getPackageName();\n extras = sbn.getNotification().extras;\n //Prendo i dati della notifica\n title = extras.getString(\"android.title\");\n //Parso il titolo\n if (title.contains(\"(\") && title.contains(\")\") && (title.contains((\"messaggi\")) || title.contains(\"messaggio\"))) {\n int posA = title.lastIndexOf('(');\n title = title.substring(0, posA - 1);\n }\n text = extras.getCharSequence(\"android.text\").toString();\n subtext = \"\";\n } catch (Exception ex) {\n Log.d(\"WHATSAPP RIGA 100\", \"Conv fallita\");\n }\n if (matchNotificationCode(sbn) != InterceptedNotificationCode.OTHER_NOTIFICATIONS_CODE) {\n if ((Build.VERSION.SDK_INT >= Build.VERSION_CODES.N)) {\n //EDIT\n /* Used for SendBroadcast */\n try {\n Parcelable b[] = (Parcelable[]) extras.get(Notification.EXTRA_MESSAGES);\n String content;\n if (b != null) {\n content = \"\";\n for (Parcelable tmp : b) {\n key = String.valueOf(tmp.hashCode());\n Bundle msgBundle = (Bundle) tmp;\n subtext = msgBundle.getString(\"text\");\n //content = content + msgBundle.getString(\"text\") + \"\\n\";\n }\n /*Toast.makeText(getApplicationContext(), content,\n Toast.LENGTH_LONG).show();*/\n }\n if (subtext.isEmpty()) {\n subtext = text;\n }\n } catch (Exception e) {\n Log.d(\"ERRORE RIGA 90 WHATSAPP\", \"Probabilmente la notifica è sballata\");\n }\n Notifica nuovaNotifica = new Notifica();\n\n if (subtext != null) {\n if (!text.contains(\"nuovi messaggi\") && !text.contains(\"WhatsApp Web is currently active\") && !text.contains(\"WhatsApp Web login\") && !title.toLowerCase().equals(\"whatsapp\")) {\n try {\n DateFormat df = new SimpleDateFormat(\"ddMMyyyyHHmmss\");\n String date = df.format(Calendar.getInstance().getTime());\n nuovaNotifica = new Notifica(key, pack, title, subtext, date);\n } catch (Exception ex) {\n Log.d(\"WHATSAPP RIGA 100\", \"Conversione fallita\");\n }\n try {\n //Parso il messaggio se viene da instagram\n if (matchNotificationCode(sbn) == InterceptedNotificationCode.INSTAGRAM_CODE) {\n //Elimino l'username nel messaggio\n if (subtext.contains(\":\"))\n subtext = subtext.substring(subtext.indexOf(':') + 2, subtext.length());\n else {\n if (subtext.contains(title)) {\n int ind = subtext.indexOf(title);\n subtext = subtext.replace(title, \"\");\n subtext = subtext.substring(1, subtext.length());\n }\n }\n }\n } catch (Exception ex) {\n Log.d(\"WHATSAPP RIGA 160\", \"Parser fallito\");\n }\n //Controllo che non abbia già ricevuto il messaggio\n String contatto = title + matchNotificationCode(sbn);\n int posizioneContatto = TrovaContattoInUltimiMessaggi(contatto);\n boolean daInviare = true;\n //Se ho trovato il contatto, controllo il valore se è diverso aggiungo e invio\n //Altrimenti modifico e non invio\n //Se non lo trovo lo registro e invio\n if (posizioneContatto != -1) {\n String strV = UltimiMessaggi.get(posizioneContatto).UltimoMessaggio;\n if (strV.equals(subtext)) {\n daInviare = false;\n } else {\n SettaUltimoMessaggio(posizioneContatto, subtext);\n }\n } else {\n //Aggiungo il contatto e il messaggio nella lista\n UltimiMessaggi.add(new ContattoAC(contatto, subtext));\n }\n //Invio la notifica alla mainActivity\n if (daInviare) {\n Intent intent = new Intent(\"ricevitoreNotifiche\");\n try {\n /*//LOG\n Log.d(\"Notifica KEY\", key);\n Log.d(\"Contatto\", title);\n Log.d(\"Messaggio\", subtext);*/\n intent.putExtra(\"ID\", nuovaNotifica.getID());\n intent.putExtra(\"Applicazione\", nuovaNotifica.getApplicazione());\n intent.putExtra(\"Titolo\", nuovaNotifica.getTitolo());\n intent.putExtra(\"Testo\", nuovaNotifica.getTesto());\n intent.putExtra(\"DateTime\", nuovaNotifica.getDateTime());\n sendBroadcast(intent);\n } catch (Exception ex) {\n Log.d(\"ERROR RIGA 103 WHATSAPP\", \"Non riesco a inviare in broadcast\");\n }\n }\n }\n /* End Used for Toast */\n }\n }\n }\n\n }", "private PendingIntent getNotificationIntent() {\n Intent resultIntent = new Intent(this, ScheduleNotificationActivity.class);\n // Because clicking the notification opens a new (\"special\") activity, there's\n // no need to create an artificial back stack.\n return PendingIntent.getActivity(\n this,\n 0,\n resultIntent,\n PendingIntent.FLAG_ONE_SHOT\n );\n }", "@Override\n public void onNotificationPosted(StatusBarNotification sbn) {\n\n if(isConnected()) {\n cone = ConnectBlActivity.con;\n //Here every notification is checked and if the user wands to listen to facebook, we get the message\n if (getFb()) {\n\n\n if (sbn.getPackageName().equals(\"com.facebook.orca\")) { //checking if the is a notification from facebook\n Bundle extras = sbn.getNotification().extras;\n String title;\n\n\n if (!extras.getString(\"android.text\").equals(\"Chat heads active\")) {\n String pack = \"Facebook\";\n title = extras.getString(\"android.text\"); //This is the actual user that sends the message\n String text = extras.getCharSequence(\"android.title\").toString(); //and that is the actual message\n\n\n Log.i(\"Title\", title);\n Log.i(\"Text\", text);\n\n\n //The message is being put in a String Builder\n StringBuilder msg = new StringBuilder();\n msg.append(pack);\n msg.append(\"\\n\");\n msg.append(text);\n msg.append(\"\\n\");\n msg.append(title);\n\n //The ui gets updated with the message\n Main.t.setText(msg);\n\n\n //The message is written to the outputStream\n\n byte[] send = msg.toString().getBytes();\n try {\n cone.write(String.valueOf(msg));\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }\n }\n\n\n //Here every notification is checked and if the user wands to listen to instagram, we get the message\n if (getInsta()) {\n if (sbn.getPackageName().equals(\"com.instagram.android\")) { //checking if the is a notification from facebook\n Bundle extras = sbn.getNotification().extras;\n String title = extras.getString(\"android.text\"); //This is the actual user that sends the message\n String text = extras.getCharSequence(\"android.title\").toString(); //and that is the actual message\n\n SimpleDateFormat sdff = new SimpleDateFormat(\"HH:mm\", Locale.getDefault());\n String tempf = sdff.format(new Date());\n\n\n Log.i(\"Title\", title);\n Log.i(\"Text\", text);\n\n\n //The message is being put in a String Builder\n StringBuilder msg = new StringBuilder();\n msg.append(\"`\");\n msg.append(tempf);\n msg.append(\" \");\n msg.append(text);\n msg.append(\" \");\n msg.append(title);\n\n //The ui gets updated with the message\n Main.t.setText(msg);\n\n\n //The message is written to the outputStream\n try {\n cone.write(String.valueOf(msg));\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }\n }\n }", "@Override\n\tpublic void onReceive(Context context, Intent intent) {\n\n\t\tString activityName = \"com.sonyericsson.media.infinite.EXTRA_ACTIVITY_NAME\";\n\n\t\tif (intent.getStringExtra(activityName) != null && intent.getStringExtra(activityName).equals(MusicPreferenceActivity.class.getName())) {\n\n\t\t\tBundle extras = new Bundle();\n\n\t\t\t// Build a URI for the string resource for the description text\n\t\t\tString description = new Uri.Builder().scheme(ContentResolver.SCHEME_ANDROID_RESOURCE).authority(context.getPackageName()).appendPath(Integer.toString(R.string.description)).build()\n\t\t\t\t\t.toString();\n\n\t\t\t// And return it to the infinite framework as an extra\n\t\t\textras.putString(\"com.sonyericsson.media.infinite.EXTRA_DESCRIPTION\", description);\n\t\t\tsetResultExtras(extras);\n\n\t\t}\n\t}", "@Override\n public void onReceive(Context context, Intent intent) {\n Bundle intentExtras = null;\n\n // true-> update the list view with goals\n Boolean updateRecyclerView = false;\n\n // check for intent extras\n intentExtras = intent.getExtras();\n if (intentExtras != null) {\n // check intent order\n\n String tmpExtraOurGoals = intentExtras.getString(\"OurGoals\",\"0\");\n String tmpExtraOurGoalsDebetableNow = intentExtras.getString(\"OurGoalsDebetableNow\",\"0\");\n String tmpExtraOurGoalsDebetableNowComment = intentExtras.getString(\"OurGoalsDebetableComment\",\"0\");\n String tmpExtraOurGoalsSettings = intentExtras.getString(\"OurGoalsSettings\",\"0\");\n String tmpExtraOurGoalsCommentShareEnable = intentExtras.getString(\"OurGoalsSettingsDebetableCommentShareEnable\",\"0\");\n String tmpExtraOurGoalsCommentShareDisable = intentExtras.getString(\"OurGoalsSettingsDebetableCommentShareDisable\",\"0\");\n String tmpExtraOurGoalsResetCommentCountComment = intentExtras.getString(\"OurGoalsSettingsDebetableCommentCountComment\",\"0\");\n String tmpSendSuccessefull = intentExtras.getString(\"SendSuccessfull\");\n String tmpSendNotSuccessefull = intentExtras.getString(\"SendNotSuccessfull\");\n String tmpMessage = intentExtras.getString(\"Message\");\n // case is close\n String tmpSettings = intentExtras.getString(\"Settings\", \"0\");\n String tmpCaseClose = intentExtras.getString(\"Case_close\", \"0\");\n\n if (tmpSettings != null && tmpSettings.equals(\"1\") && tmpCaseClose != null && tmpCaseClose.equals(\"1\")) {\n // case close! -> show toast\n String textCaseClose = fragmentDebetableGoalNowContext.getString(R.string.toastCaseClose);\n Toast toast = Toast.makeText(context, textCaseClose, Toast.LENGTH_LONG);\n TextView v = (TextView) toast.getView().findViewById(android.R.id.message);\n if (v != null) v.setGravity(Gravity.CENTER);\n toast.show();\n\n }\n else if (tmpExtraOurGoals != null && tmpExtraOurGoals.equals(\"1\") && tmpExtraOurGoalsDebetableNow != null && tmpExtraOurGoalsDebetableNow.equals(\"1\")) {\n // new jointly goals on smartphone -> update now view\n\n //update current block id of jointly goals\n currentBlockIdOfDebetableGoals = prefs.getString(ConstansClassOurGoals.namePrefsCurrentBlockIdOfDebetableGoals, \"0\");\n\n // check jointly and debetable goals update and show dialog jointly and debetable goals change\n ((ActivityOurGoals) getActivity()).checkUpdateForShowDialog (\"debetable\");\n\n // update the view\n updateRecyclerView = true;\n }\n else if (tmpExtraOurGoals != null && tmpExtraOurGoals.equals(\"1\") && tmpExtraOurGoalsDebetableNowComment != null && tmpExtraOurGoalsDebetableNowComment.equals(\"1\")) {\n // new debetable comments -> update view -> show toast and update view\n String updateMessageCommentNow = fragmentDebetableGoalNowContext.getString(R.string.toastMessageCommentDebetableGoalsNewComments);\n Toast.makeText(context, updateMessageCommentNow, Toast.LENGTH_LONG).show();\n\n // update the view\n updateRecyclerView = true;\n }\n else if (tmpExtraOurGoals != null && tmpExtraOurGoals.equals(\"1\") && tmpExtraOurGoalsSettings != null && tmpExtraOurGoalsSettings.equals(\"1\") && tmpExtraOurGoalsResetCommentCountComment != null && tmpExtraOurGoalsResetCommentCountComment.equals(\"1\")) {\n // reset debetable comment counter -> show toast and update view\n String updateMessageCommentNow = fragmentDebetableGoalNowContext.getString(R.string.toastMessageDebetableGoalsResetCommentCountComment);\n Toast toast = Toast.makeText(context, updateMessageCommentNow, Toast.LENGTH_LONG);\n TextView v = (TextView) toast.getView().findViewById(android.R.id.message);\n if( v != null) v.setGravity(Gravity.CENTER);\n toast.show();\n\n // update the view\n updateRecyclerView = true;\n }\n else if (tmpExtraOurGoals != null && tmpExtraOurGoals.equals(\"1\") && tmpExtraOurGoalsSettings != null && tmpExtraOurGoalsSettings.equals(\"1\") && tmpExtraOurGoalsCommentShareDisable != null && tmpExtraOurGoalsCommentShareDisable .equals(\"1\")) {\n // sharing is disable -> show toast and update view\n String updateMessageCommentNow = fragmentDebetableGoalNowContext.getString(R.string.toastMessageDebetableGoalsCommentShareDisable);\n Toast toast = Toast.makeText(context, updateMessageCommentNow, Toast.LENGTH_LONG);\n TextView v = (TextView) toast.getView().findViewById(android.R.id.message);\n if( v != null) v.setGravity(Gravity.CENTER);\n toast.show();\n }\n else if (tmpExtraOurGoals != null && tmpExtraOurGoals.equals(\"1\") && tmpExtraOurGoalsSettings != null && tmpExtraOurGoalsSettings.equals(\"1\") && tmpExtraOurGoalsCommentShareEnable != null && tmpExtraOurGoalsCommentShareEnable .equals(\"1\")) {\n // sharing is enable -> show toast and update view\n String updateMessageCommentNow = fragmentDebetableGoalNowContext.getString(R.string.toastMessageDebetableGoalsCommentShareEnable);\n Toast toast = Toast.makeText(context, updateMessageCommentNow, Toast.LENGTH_LONG);\n TextView v = (TextView) toast.getView().findViewById(android.R.id.message);\n if( v != null) v.setGravity(Gravity.CENTER);\n toast.show();\n }\n else if (tmpSendSuccessefull != null && tmpSendSuccessefull.equals(\"1\") && tmpMessage != null && tmpMessage.length() > 0) { // send successfull?\n\n Toast toast = Toast.makeText(context, tmpMessage, Toast.LENGTH_LONG);\n TextView v = (TextView) toast.getView().findViewById(android.R.id.message);\n if( v != null) v.setGravity(Gravity.CENTER);\n toast.show();\n\n }\n else if (tmpSendNotSuccessefull != null && tmpSendNotSuccessefull.equals(\"1\") && tmpMessage != null && tmpMessage.length() > 0) { // send not successfull?\n\n Toast toast = Toast.makeText(context, tmpMessage, Toast.LENGTH_LONG);\n TextView v = (TextView) toast.getView().findViewById(android.R.id.message);\n if( v != null) v.setGravity(Gravity.CENTER);\n toast.show();\n }\n else if (tmpExtraOurGoals != null && tmpExtraOurGoals.equals(\"1\") && tmpExtraOurGoalsSettings != null && tmpExtraOurGoalsSettings.equals(\"1\")) {\n\n // goal settings change\n updateRecyclerView = true;\n }\n\n // update the list view because data has change?\n if (updateRecyclerView) {\n updateRecyclerView();\n }\n }\n }", "@Override\n public void onReceive(Context context, Intent intent) {\n Bundle bundle = intent.getExtras();\n int messageCID = bundle.getInt(\"clubID\",0);\n int messageTID = bundle.getInt(\"tournamentID\",0);\n if ( tournamentID != 0 ) { // tournament chat\n if ( messageTID == tournamentID ) {\n Log.d(TAG,\"New Tournament Chat\");\n loadMoreRecentChat();\n }\n } else if ( clubID != 0) { // club chat\n if ( clubID == messageCID ) {\n Log.d(TAG,\"New Club Chat\");\n loadMoreRecentChat();\n }\n } else {\n Log.d(TAG,\"Unknown Notification\");\n loadMoreRecentChat();\n }\n\n }", "@Override\n public void onReceive(Context context, Intent intent) {\n SharedPreferences preferences = context.getSharedPreferences(SettingsActivity.prefFile,\n Context.MODE_PRIVATE);\n if (!preferences.getBoolean(SettingsActivity.notificationSetting, false))\n return;\n\n // Get intent data\n this.name = intent.getStringExtra(\"name\");\n this.dose = intent.getStringExtra(\"dose\");\n this.time = intent.getStringExtra(\"time\");\n\n //\n DBHelper db = new DBHelper(context);\n Map<String, String> idTimeMap = db.getIDTimeMap(this.name);\n\n // Medication notifications will have sound\n Uri sound = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION);\n\n // Setting up intent, ad building the notification\n NotificationManager mNM = (NotificationManager) context.getSystemService(\n Context.NOTIFICATION_SERVICE);\n Intent intent1 = new Intent(context, MainActivity.class);\n PendingIntent pendingIntent = PendingIntent.getActivity(\n context, NewMedActivity.pendingId++, intent1, 0);\n\n Notification notification = new Notification.Builder(context)\n .setContentTitle(this.time)\n .setContentText(String.format(\"%s %s.\",\n context.getText(R.string.nt_txt), this.name))\n .setSmallIcon(R.mipmap.fmn_app_icon_round)\n .setContentIntent(pendingIntent)\n .setAutoCancel(true)\n .build();\n\n // Sending the notification\n mNM.notify(NotifyService.notificationTag, Integer.parseInt(idTimeMap.get(this.time)),\n notification);\n }", "@Override\n public void onReceive(Context context, Intent intent) {\n if (intent.getAction().equals(Config.REGISTRATION_COMPLETE)) {\n // gcm successfully registered\n // now subscribe to `global` topic to receive app wide notifications\n FirebaseMessaging.getInstance().subscribeToTopic(Config.TOPIC_GLOBAL);\n\n\n } else\n if (intent.getAction().equals(Config.PUSH_NOTIFICATION)) {\n // new push notification is received\n invalidateOptionsMenu();//Activity method\n //updateMenuCounts(MyFirebaseMessagingService.count1);\n\n String message = intent.getStringExtra(\"message\");\n\n Toast.makeText(getApplicationContext(), \"Push notification: \" + message, Toast.LENGTH_LONG).show();\n\n //txtMessage.setText(message);\n }\n\n }", "@Override\n protected void onHandleIntent(Intent workIntent) {\n String dataString = workIntent.getDataString();\n\tif(null == dataString) {\n\t\tLog.i(\"BluetoothEventService\", dataString);\n\t}\n// ...\n // Do work here, based on the contents of dataString\n// ...\n }", "@Override\n protected void onNewIntent(Intent intent) {\n\n Bundle bundle=intent.getExtras();\n int uniqueFlagID=1;\n if(bundle!=null && (bundle.getInt(\"uniqueAppId\") > 0)) {\n DBAdapter adapter = new DBAdapter(getApplicationContext());\n adapter.getUpdatePresFlag(bundle.getString(\"type\"), bundle.getInt(\"uniqueAppId\"), \"1\");\n String AppointmentMessage1 = bundle.getString(AlarmReceiver.APPOINTMENT_MESSAGE);\n ApplicationBackgroundCheck.showNotificationDialog(\"Appointment Alert\", AppointmentMessage1, \"App\",uniqueFlagID,getApplicationContext(),getFragmentManager());\n }\n if(bundle!=null && (bundle.getInt(\"presUniqueId\") > 0)) {\n DBAdapter adapter = new DBAdapter(getApplicationContext());\n adapter.getUpdatePresFlag(bundle.getString(\"type\"),bundle.getInt(\"presUniqueId\"),\"1\");\n String RenewalMessage = bundle.getString(AlarmReceiver.PRESCRIPTION_RENEWAL_MESSAGE);\n ApplicationBackgroundCheck.showNotificationDialog(\"Prescription Renewal Alert\", RenewalMessage, \"PRES\",uniqueFlagID,getApplicationContext(),getFragmentManager());\n }\n if(bundle!=null && (bundle.getString(\"type\").equals(\"MED_TIT\"))) {\n String TitrationMessage = bundle.getString(AlarmReceiver.MEICATION_TITRATION_MESSAGE);\n ApplicationBackgroundCheck.showNotificationDialog(\"Medication Titration Alert\", TitrationMessage, \"MED_TIT\", uniqueFlagID,getApplicationContext(),getFragmentManager());\n }\n if(bundle!=null && (bundle.getString(\"type\").equals(\"EME\"))) {\n DBAdapter adapter= new DBAdapter(getApplicationContext());\n adapter.getUpdateReminderFlag(bundle.getString(\"type\"), bundle.getInt(\"id\"),\"1\");\n String EmergencyMedicationMessage = bundle.getString(AlarmReceiver.EMERGENCY_MEDICATION_MESSAGE);\n ApplicationBackgroundCheck.showNotificationDialog(\"Emergency Medication Alert\", EmergencyMedicationMessage, \"EME\",uniqueFlagID,getApplicationContext(),getFragmentManager());\n\n }\n\n\n }", "private static String getNotificationMessage(UserEvent event) {\n return \"Activity \" + event.getCategory().getTitle() + \" in progress\";\n }", "@SuppressLint(\"WrongConstant\")\n private Notification prepareNotification() {\n if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.O &&\n mNotificationManager.getNotificationChannel(FOREGROUND_CHANNEL_ID) == null) {\n CharSequence name = getString(R.string.text_name_notification);\n int importance = NotificationManager.IMPORTANCE_DEFAULT;\n NotificationChannel channel = new NotificationChannel(FOREGROUND_CHANNEL_ID, name, importance);\n channel.enableVibration(false);\n mNotificationManager.createNotificationChannel(channel);\n }\n\n Intent notificationIntent = new Intent(this, Principal.class);\n notificationIntent.setAction(Constants.ACTION.MAIN_ACTION);\n notificationIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);\n\n // if min sdk goes below honeycomb\n /*if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.HONEYCOMB) {\n notificationIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);\n } else {\n notificationIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n }*/\n\n PendingIntent pendingIntent = PendingIntent.getActivity(this, 0, notificationIntent, PendingIntent.FLAG_UPDATE_CURRENT);\n\n // make a stop intent\n Intent stopIntent = new Intent(this, Servicio_cargar_punto_google.class);\n stopIntent.setAction(Constants.ACTION.STOP_ACTION);\n PendingIntent pendingStopIntent = PendingIntent.getService(this, 0, stopIntent, PendingIntent.FLAG_UPDATE_CURRENT);\n RemoteViews remoteViews = new RemoteViews(getPackageName(), R.layout.notification);\n //remoteViews.setOnClickPendingIntent(R.id.btn_stop, pendingStopIntent);\n remoteViews.setTextViewText(R.id.tv_fecha, fecha);\n\n // if it is connected\n switch (stateService) {\n case Constants.STATE_SERVICE.NOT_CONNECTED:\n remoteViews.setTextViewText(R.id.tv_estado, \"Sin conexión a internet . . .\");\n remoteViews.setImageViewResource(R.id.im_estado, R.drawable.ic_advertencia);\n break;\n case Constants.STATE_SERVICE.CONNECTED:\n remoteViews.setTextViewText(R.id.tv_estado, \"Traigo en camino\");\n remoteViews.setImageViewResource(R.id.im_estado, R.drawable.ic_carrito_verde);\n break;\n case Constants.STATE_SERVICE.GPS_INACTIVO:\n remoteViews.setTextViewText(R.id.tv_estado, \"GPS inactivo\");\n remoteViews.setImageViewResource(R.id.im_estado, R.drawable.ic_advertencia);\n break;\n case Constants.STATE_SERVICE.SIN_INTERNET:\n remoteViews.setTextViewText(R.id.tv_estado, \"Sin conexión a internet . .\");\n remoteViews.setImageViewResource(R.id.im_estado, R.drawable.ic_advertencia);\n break;\n }\n\n // notification builder\n NotificationCompat.Builder notificationBuilder;\n if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.O) {\n notificationBuilder = new NotificationCompat.Builder(this, FOREGROUND_CHANNEL_ID);\n } else {\n notificationBuilder = new NotificationCompat.Builder(this);\n }\n notificationBuilder\n .setContent(remoteViews)\n .setSmallIcon(R.drawable.ic_carrito_verde)\n .setCategory(NotificationCompat.CATEGORY_SERVICE)\n .setOnlyAlertOnce(true)\n .setOngoing(true)\n .setAutoCancel(true)\n .setContentIntent(pendingIntent);\n\n if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.LOLLIPOP) {\n notificationBuilder.setVisibility(Notification.VISIBILITY_PUBLIC);\n }\n\n return notificationBuilder.build();\n }", "@Override\n public void onClick(View view) {\n Intent intent = new Intent(getApplicationContext(), StartActivityReceiver.class);\n intent.putExtra(\"zjf\", \"123\");\n sendBroadcast(intent);\n }", "public void onIntentReceived(final String payload) {\n }", "void getData() {\n Intent intent = this.getIntent();\n /* Obtain String from Intent */\n Sname = intent.getExtras().getString(\"name\");\n Sbloodbank = intent.getExtras().getString(\"bloodbank\");\n Sbranch = intent.getExtras().getString(\"branch\");\n Sdate = intent.getExtras().getString(\"date\");\n Stime = intent.getExtras().getString(\"time\");\n Sphone = intent.getExtras().getString(\"phone\");\n Log.d(\"userDetails received\", Sname + \",\" + Sphone ); //Don't ignore errors!\n }", "private void getIntentData() {\n if (getIntent() != null) {\n destinationLat = getIntent().getDoubleExtra(\"destinationLat\", 48.893478);\n destinationLng = getIntent().getDoubleExtra(\"destinationLng\", 2.334595);\n }\n }", "private String getNotificationMsg(int days){\n String message;\n if (days == 0){\n message = context.getString(R.string.notification_message_zero_days);\n }\n else if (days == 1){\n message = context.getString(R.string.notification_message_one_day, days);\n }\n else{\n message = context.getString(R.string.notification_message_two_days, days);\n }\n message = message + context.getString(R.string.notification_message_tap_to_learn);\n return message;\n }", "private void logPushExtras(Intent intent) {\n Set<String> keys = intent.getExtras().keySet();\n for (String key : keys) {\n\n // ignore standard C2DM extra keys\n List<String> ignoredKeys = (List<String>) Arrays.asList(\n \"collapse_key\",// c2dm collapse key\n \"from\",// c2dm sender\n PushManager.EXTRA_NOTIFICATION_ID,// int id of generated notification (ACTION_PUSH_RECEIVED only)\n PushManager.EXTRA_PUSH_ID,// internal UA push id\n PushManager.EXTRA_ALERT);// ignore alert\n if (ignoredKeys.contains(key)) {\n continue;\n }\n Log.i(logTag,\n \"Push Notification Extra: [\" + key + \" : \"\n + intent.getStringExtra(key) + \"]\"\n );\n }\n }", "@Override\n public void onReceive(Context context, Intent intent) {\n String message = intent.getStringExtra(\"message\");\n Log.d(\"receiver\", \"Got message: \" + message);\n filterDayWise();\n }", "@Override\n public void onReceive(Context context, Intent intent) {\n String message = intent.getStringExtra(\"message\");\n Log.d(\"receiver\", \"Got message: \" + message);\n }", "@Override\n public void onReceive(Context context, Intent intent) {\n String message = intent.getStringExtra(\"message\");\n Log.d(\"receiver\", \"Got message: \" + message);\n }", "public PendingIntent getLaunchPendingIntent() {\n }", "public static String getExtraString(Activity context, String key) {\n \tString param = \"\";\n \tBundle bundle = context.getIntent().getExtras();\n \tif(bundle!=null){\n \t\tparam = bundle.getString(key);\n \t}\n \treturn param;\n\t}", "@RequiresApi(api = Build.VERSION_CODES.O)\n @Override\n public int onStartCommand(Intent intent, int flags, int startId) {\n Intent notificationIntent = new Intent(this, MainActivity.class);\n\n PendingIntent pendingIntent = PendingIntent.getActivity(this, 0,\n notificationIntent, 0);\n\n Notification notification = new Notification.Builder(this, CHANNEL_ID)\n .setContentTitle(\"New mail from \" )\n .setContentText(\"acacsc\")\n .setSmallIcon(R.drawable.exo_controls_pause)\n //.setLargeIcon(aBitmap)\n .setContentIntent(pendingIntent)\n .build();\n\n\n startForeground(1, notification);\n\n return START_NOT_STICKY; //or return START_REDELIVER_INTENT;\n }", "private void processCustomMessage(Context context, Bundle bundle) {\n//\t\tif (MainActivity.isForeground) {\n\t\t\tString message = bundle.getString(JPushInterface.EXTRA_MESSAGE);\n\t\t\tString extras = bundle.getString(JPushInterface.EXTRA_EXTRA);\n//\t\t\tIntent msgIntent = new Intent(MainActivity.MESSAGE_RECEIVED_ACTION);\n//\t\t\tmsgIntent.putExtra(MainActivity.KEY_MESSAGE, message);\n//\t\t\tif (!ExampleUtil.isEmpty(extras)) {\n\t\t\t\ttry {\n\t\t\t\t\tJSONObject extraJson = new JSONObject(extras);\n//\t\t\t\t\tif (extraJson.length() > 0) {\n//\t\t\t\t\t\tmsgIntent.putExtra(MainActivity.KEY_EXTRAS, extras);\n//\t\t\t\t\t}\n\t\t\t\t} catch (JSONException e) {\n\n\t\t\t\t}\n\n//\t\t\t}\n//\t\t\tLocalBroadcastManager.getInstance(context).sendBroadcast(msgIntent);\n//\t\t}\n\t}", "@Override\n public void onReceive(Context context, Intent intent)\n {\n if (intent.getAction().equals(Config.REGISTRATION_COMPLETE))\n {\n // gcm successfully registered\n // now subscribe to `global` topic to receive app wide notifications\n tokenGCM = intent.getStringExtra(\"token\");\n sharedPreferences.putString(\"TOKEN\",tokenGCM);\n\n // Toast.makeText(getApplicationContext(), \"GCM registration token: \" + tokenGCM, Toast.LENGTH_LONG).show();\n\n }\n\n else if (intent.getAction().equals(Config.SENT_TOKEN_TO_SERVER))\n {\n // gcm registration id is stored in our server's MySQL\n\n //Toast.makeText(getApplicationContext(), \"GCM registration token is stored in server!\", Toast.LENGTH_LONG).show();\n\n }\n\n else if (intent.getAction().equals(Config.PUSH_NOTIFICATION))\n {\n // new push notification is received\n\n Log.w(\"ALERTA\", \"Push notification is received!\");\n\n //Toast.makeText(getApplicationContext(), \"Push notification is received!\", Toast.LENGTH_LONG).show();\n }\n }", "public Intent getTrackedIntent(){\n Intent trackedIntent = new Intent(context, PPOpenTrackerActivity.class);\n trackedIntent.putExtra(PushPrime.NOTIFICATION, this);\n return trackedIntent;\n }", "@Override\n protected void onNewIntent(Intent intent) {\n super.onNewIntent(intent);\n System.out.println(\"Has Match Status : One \");\n if (intent.hasExtra(\"matchStatus\")){\n System.out.println(\"Has Match Status : Two \");\n sessionManager.setRefreshChatFragment(true);\n viewPager.setCurrentItem(2,true);\n }\n }", "@Override\n public void onReceive(Context context, Intent intent) {\n if (intent.getAction().equals(Config.REGISTRATION_COMPLETE)) {\n // gcm successfully registered\n // now subscribe to `global` topic to receive app wide notifications\n FirebaseMessaging.getInstance().subscribeToTopic(Config.TOPIC_GLOBAL);\n\n\n\n } else if (intent.getAction().equals(Config.PUSH_NOTIFICATION)) {\n // new push notification is received\n\n String message = intent.getStringExtra(\"message\");\n\n Toast.makeText(getApplicationContext(), \"Push notification: \" + message, Toast.LENGTH_LONG).show();\n\n\n }\n }", "@Override\r\n\t public void onListItemClick(ListView l, View v, int position, long id) {\n\t\t Cursor cursor = (Cursor) getListAdapter().getItem(position);\r\n\t\t String serviceUri = cursor.getString(cursor.getColumnIndex(NotificationData.SERVICE_ID));\r\n\t\t Log.d(TAG, \"selected service \" + serviceUri);\r\n\t\t MainActivity m = (MainActivity) getActivity();\r\n\t\t m.showServiceSpecificNotifications(serviceUri,\"\");// TODO: fetch and send the service name!!, now is sending an empty string\r\n\t }", "@Override\n public void onReceive(Context context, Intent intent) {\n int id = new Random().nextInt(200);\n String titulo = intent.getStringExtra(\"titulo\");\n String texto = intent.getStringExtra(\"texto\");\n String channelId = intent.getStringExtra(\"channelid\");\n NotificationCompat.Builder builder = new NotificationCompat.Builder(context, channelId)\n .setSmallIcon(R.drawable.ic_baseline_notifications_24)\n .setContentTitle(titulo)\n .setContentText(texto)\n .setPriority(NotificationCompat.PRIORITY_MAX);\n\n NotificationManagerCompat notificationManagerCompat = NotificationManagerCompat.from(context);\n\n notificationManagerCompat.notify(id, builder.build());\n }", "private void sendMyNotification(String title, String message, String type, String Branch_Id) {\n\n\n Intent intent = new Intent(this, ActivityWithNavigationMenuPatient.class);\n intent.putExtra(\"push\", \"1\");\n intent.putExtra(\"Branch_Id\", Branch_Id);\n\n intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n\n PendingIntent pendingIntent = PendingIntent.getActivity(this, 0, intent, PendingIntent.FLAG_ONE_SHOT);\n\n Uri soundUri = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION);\n NotificationCompat.Builder notificationBuilder = new NotificationCompat.Builder(this)\n .setSmallIcon(R.mipmap.ic_launcher)\n .setContentTitle(title)\n .setContentText(message)\n .setAutoCancel(true)\n .setSound(soundUri)\n .setChannelId(\"my_channel_id_00011\") // set channel id\n .setContentIntent(pendingIntent);\n\n NotificationManager notificationManager =\n (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);\n\n notificationManager.notify(1224, notificationBuilder.build());\n }", "@Override\n\tprotected void getIntentData(Bundle savedInstanceState) {\n\n\t}", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_home);\n UserEmail = getIntent().getStringExtra(\"UserEmail\");\n Toast.makeText(this, \"Welcome\"+UserEmail, Toast.LENGTH_SHORT).show();\n\n }", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.main);\n ml = getSharedPreferences(\"musicList\", Context.MODE_PRIVATE);\n Intent receivem = getIntent();\n\n received = receivem.getIntExtra(\"MUS\",0);\n\n if(received==1)\n {\n MusKey=\"MUSICONE\";\n\n }\n\n if(received==2)\n {\n MusKey=\"MUSICTWO\";\n Toast.makeText(getApplicationContext(), \"Its shit\",\n Toast.LENGTH_SHORT).show();\n\n }\n if(received==3)\n {\n MusKey=\"MUSICTHREE\";\n }\n if(received==4)\n {\n MusKey=\"MUSICFOUR\";\n }\n\n if(received==9)\n {\n MusKey=\"EASYMUSIC\";\n }\n init_phone_music_grid();\n }", "@Override\n public void onGuildMessageReceived(@NotNull GuildMessageReceivedEvent event) {\n if (event.getAuthor().isBot() ||\n !event.getMessage().getType().equals(MessageType.DEFAULT)) return; // Bot messages will be ignored\n String args[] = event.getMessage().getContentRaw().split(\"\\\\s+\");\n\n switch (args[0].replace(Settings.COMMAND_PREFIX, \"\")){\n case \"youtube\":\n Color c = Settings.getConferenceColor(event.getChannel().getParent());\n event.getChannel().sendMessage(new EmbedBuilder()\n .setTitle(\"Youtube \" + Settings.CONFERENCE_NAME, Settings.YOUTUBE)\n .setColor(c).build()).queue();\n break;\n case \"stream\":\n case \"live\":\n // Display the current live stream depending on the current track\n event.getChannel().sendMessage(makeYoutubeLive(event.getChannel().getParent())).queue();\n if (event.getChannel().getParent().getId().equals(Settings.CATEGORY_BOT_ID) && args.length == 3){\n switch (args[1].toLowerCase()){\n case \"gcpr\":\n Settings.STREAM_URL[0] = args[2];\n System.out.println(\"[GCPR STREAM] Updated\");\n break;\n case \"vmv\":\n Settings.STREAM_URL[1] = args[2];\n System.out.println(\"[VMV STREAM] Updated\");\n break;\n case \"vcbm\":\n Settings.STREAM_URL[2] = args[2];\n System.out.println(\"[VCBM STREAM] Updated\");\n break;\n case \"joint\":\n Settings.STREAM_URL[3] = args[2];\n System.out.println(\"[JOINT STREAM] Updated\");\n break;\n default:\n break;\n }\n\n }\n break;\n case \"program\":\n case \"programm\": // Yes I often misspelled it during dev\n // Show a link to the program page\n event.getChannel().sendMessage(new EmbedBuilder()\n .setTitle(\"Program :alarm_clock:\", Settings.PROGRAMM)\n .setColor(Settings.getConferenceColor(event.getChannel().getParent()))\n .build()).queue();\n break;\n case \"web\":\n // Display Conference Web presence\n event.getChannel().sendMessage(new EmbedBuilder()\n .setTitle(\"Conference Website :desktop:\", Settings.URL)\n .setColor(Settings.getConferenceColor(event.getChannel().getParent()))\n .build()).queue();\n break;\n case \"ping\":\n // This is the mighty debug command\n //if(!event.getChannel().getParent().getId().equals(Settings.CATEGORY_BOT_ID)) break; // Comment in after first `!ping`\n event.getChannel().sendMessage(\"pong!\").queue();\n debugMessage(event);\n break;\n case \"channels\":\n // Sends a list of active channels with links to the Channel that issued the command\n if(!event.getChannel().getParent().getId().equals(Settings.CATEGORY_BOT_ID)) break;\n printChannels(event);\n break;\n case \"help\":\n case \"commands\":\n // Show a list of the above mentioned commands\n EmbedBuilder embed = new EmbedBuilder().setTitle(\":bulb: Commands / Help\")\n .setDescription(\"The following commands can be used in the text-channels.\\n\" +\n \"*speaker and chair roles are assigned through direct messages to @ConferenceBot*\")\n .setColor(Settings.getConferenceColor(event.getChannel().getParent()))\n .addField(\"`!program`\", \"Link to programm on the conference website.\", false)\n .addField(\"`!web`\", \"Conference website\", false)\n .addField(\"`!stream` / `!live`\", \"Link to youtube livestream\", false)\n .addField(\"`!youtube`\", \"Link to Conference YouTube channel\", false)\n .addField(\"`!help` / `!commands`\", \"Displays this message\", false);\n if (event.getChannel().getParent().getId().equals(Settings.CATEGORY_BOT_ID)) {\n embed.addBlankField(false)\n .addField(\"`!{stream|live} {gcpr|vmv|vcbm|joint} $StreamLink`\",\n \"Change Link to respective live String\", false)\n .addField(\"`!ping`\", \"Prints extensive debug message to CLI\", false)\n .addField(\"`!channels`\",\n \"Sends and prints all channel names and channel links as \" +\n \"text message to channel of origin (just Bot dev) and to CLI\", false);\n }\n event.getChannel().sendMessage(embed.build()).queue();\n default:\n break;\n }\n }", "@Override\n public void onReceive(Context context, Intent intent) {\n Toast.makeText(context,\"静态广播:\"+intent.getAction()+\":\"+intent.getStringExtra(\"tv\"),\n Toast.LENGTH_LONG).show();\n System.out.println(intent.getStringExtra(\"tv\"));\n }", "@Override\n public void onReceive(Context context, Intent intent) {\n if(\"com.example.brdcst_rec.toast\".equals(intent.getAction())){\n Integer received = intent.getIntExtra(\"com.example.brdcst_rec.text\", -1);\n Intent in = new Intent(context, BrowserActivity.class);\n in.putExtra(\"number\", received);\n context.startActivity(in);\n }\n }", "@Override\n protected void onHandleIntent(Intent intent) {\n\n }", "@Override\n public void onReceive(Context context, Intent intent) {\n int mNotificationId = 001;\n\n // Gets an instance of the NotificationManager service\n NotificationManager notificationManager = (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE);\n\n Intent notificationIntent = new Intent(context, MainActivity.class);\n notificationIntent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n\n PendingIntent pendingIntent =\n PendingIntent.getActivity(\n context,\n 0,\n notificationIntent,\n PendingIntent.FLAG_UPDATE_CURRENT\n );\n\n String habit = intent.getExtras().getString(\"name\",\"streak\");\n\n NotificationCompat.Builder mNotifyBuilder = new NotificationCompat.Builder(context)\n .setSmallIcon(R.mipmap.ic_launcher)\n .setContentTitle(\"BAARD Habit Tracker\")\n .setContentText(\"Reminder to complete your \"+habit+\" habit! Don't lose your streak!\")\n .setAutoCancel(true)\n .setVibrate(new long[]{1000,1000})\n .setStyle(new NotificationCompat.BigTextStyle()\n .bigText(\"Reminder to complete your \"+habit+\" habit! Don't lose your streak!\"))\n .setContentIntent(pendingIntent);\n Log.i(\"ALARM\", \"Receiver sending notification\");\n // Builds the notification and issues it.\n notificationManager.notify(mNotificationId, mNotifyBuilder.build());\n }", "@Override\n public void onReceive(Context context, Intent intent) {\n if (intent.getAction().equals(Config.REGISTRATION_COMPLETE)) {\n // gcm successfully registered\n // now subscribe to `global` topic to receive app wide notifications\n FirebaseMessaging.getInstance().subscribeToTopic(Config.TOPIC_GLOBAL);\n\n displayFirebaseRegId();\n\n } else if (intent.getAction().equals(Config.PUSH_NOTIFICATION)) {\n // new push notification is received\n\n String message = intent.getStringExtra(\"message\");\n\n Toast.makeText(getApplicationContext(), \"Push notification: \" + message, Toast.LENGTH_LONG).show();\n\n\n }\n }", "@Override\n public void onReceive(Context context, Intent intent) {\n String message = intent.getStringExtra(EXTRA_FCM_MESSAGE);\n String dialogId = intent.getStringExtra(EXTRA_FCM_DIALOG_ID);\n Log.v(TAG, \"Received broadcast \" + intent.getAction() + \" with data: \" + message + \", dialogId= \" + dialogId);\n notificationDlgId = dialogId;\n requestBuilder.setSkip(skipRecords = 0);\n loadDialogsREST(true, true);\n }", "@Override\n public int onStartCommand(Intent intent, int flags, int startId) {\n\n String messageSender = intent.getExtras().getString(\n AppConstants.SMS_SERVICE_SENDER_PHONE_NUMBER);\n String messageContent = intent.getExtras().getString(AppConstants.SMS_SERVICE_SMS_TEXT);\n\n if (RegExUtils.isAnyIndicatorsPresentInText(messageContent,\n getResources().getStringArray(R.array.indicators))\n && (RegExUtils.isDatePresentInText(messageContent))) {\n requestToMakeCalendarEntryNotificationBuilder(messageSender, messageContent);\n }\n\n return Service.START_NOT_STICKY;\n }", "public void startAlarm(Context context){\n Intent intent = new Intent(this,MonthlyReminderService.class);\n int received = intent.getIntExtra(\"recieved\", 0);\n intent.putExtra(\"received\", received);\n //int type = intent.getIntExtra(\"type\", 0);\n //Log.e(\"SurveyType\", Integer.toString(type));\n //intent.putExtra(\"type\", type);\n //intent.putExtra(\"date\", surveyDate);\n //intent.putExtra(\"type\", \"Health Literacy\");\n //Calendar now = Calendar.getInstance();\n //intent.putExtra(\"dayofYear\",now.get(Calendar.DAY_OF_YEAR));\n startService(intent);\n }", "private Notification prepareNotification() {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O && mNotificationManager.getNotificationChannel(FOREGROUND_CHANNEL_ID) == null) {\n CharSequence name = getString(R.string.text_name_notification);\n int importance = NotificationManager.IMPORTANCE_DEFAULT;\n NotificationChannel channel = new NotificationChannel(FOREGROUND_CHANNEL_ID, name, importance);\n channel.enableVibration(false);\n mNotificationManager.createNotificationChannel(channel);\n }\n\n Intent notificationIntent = new Intent(this, MainUIActivity.class);\n notificationIntent.setAction(Constants.ACTION.MAIN_ACTION);\n notificationIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);\n\n // if min sdk goes below honeycomb\n /*if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.HONEYCOMB) {\n notificationIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);\n } else {\n notificationIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n }*/\n\n PendingIntent pendingIntent = PendingIntent.getActivity(this, 0, notificationIntent, PendingIntent.FLAG_UPDATE_CURRENT);\n\n // make a stop intent\n Intent stopIntent = new Intent(this, MyService.class);\n stopIntent.setAction(Constants.ACTION.STOP_ACTION);\n PendingIntent pendingStopIntent = PendingIntent.getService(this, 0, stopIntent, PendingIntent.FLAG_UPDATE_CURRENT);\n RemoteViews remoteViews = new RemoteViews(getPackageName(), R.layout.service_notification);\n remoteViews.setOnClickPendingIntent(R.id.btn_stop, pendingStopIntent);\n\n // if it is connected\n switch (stateService) {\n case Constants.STATE_SERVICE.NOT_CONNECTED:\n remoteViews.setTextViewText(R.id.tv_state, \"Help Desk DISCONNECTED\");\n remoteViews.setTextColor(R.id.tv_state, getResources().getColor(android.R.color.holo_red_light));\n break;\n case Constants.STATE_SERVICE.CONNECTED:\n remoteViews.setTextColor(R.id.tv_state, getResources().getColor(android.R.color.black));\n remoteViews.setTextViewText(R.id.tv_state, \"Help Desk CONNECTED\");\n break;\n }\n\n // notification builder\n NotificationCompat.Builder notificationBuilder;\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {\n notificationBuilder = new NotificationCompat.Builder(this, FOREGROUND_CHANNEL_ID);\n } else {\n notificationBuilder = new NotificationCompat.Builder(this);\n }\n notificationBuilder\n .setContent(remoteViews)\n .setSmallIcon(R.mipmap.ic_launcher)\n .setCategory(NotificationCompat.CATEGORY_SERVICE)\n .setOnlyAlertOnce(true)\n .setOngoing(true)\n .setAutoCancel(true)\n .setContentIntent(pendingIntent);\n\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {\n notificationBuilder.setVisibility(Notification.VISIBILITY_SECRET);\n }\n\n return notificationBuilder.build();\n }", "public void onCreate(Bundle bundle) {\n super.onCreate(bundle);\n Intent intent = getIntent();\n if (intent != null) {\n this.Z = intent.getStringExtra(\"extra_deep_link_ots\");\n this.Y = intent.getStringExtra(\"extra_deep_link_email\");\n }\n }", "@TargetApi(Build.VERSION_CODES.JELLY_BEAN)\n\t@SuppressLint(\"NewApi\")\n\tpublic void onReceive(Context context, Intent intent) {\n message = intent.getStringExtra(\"collapse_key\");\n Log.d(\"PushNotificationReceiver\", \"message:\" + message);\n Log.d(\"PushNotificationReceiver\", \"from:\" + intent.getStringExtra(\"from\"));\n\n /** Sample Key Values (First, these must be added from Turkcell push server) */\n Log.d(\"PushNotificationReceiver\", \"key:\" + \"video, \" + \"value:\" + intent.getStringExtra(\"video\"));\n Log.d(\"PushNotificationReceiver\", \"key:\" + \"image, \" + \"value:\" + intent.getStringExtra(\"image\"));\n Log.d(\"PushNotificationReceiver\", \"key:\" + \"www, \" + \"value:\" + intent.getStringExtra(\"www\"));\n\n /** Show Sample Notification*/\n\n mNotificationManager = (NotificationManager)context.getSystemService(Context.NOTIFICATION_SERVICE);\n\n PendingIntent contentIntent = PendingIntent.getActivity(context, 0,\n new Intent(context, MainActivity.class), 0);\n\n Notification.Builder mBuilder = new Notification.Builder(\n context).setSmallIcon(R.drawable.ic_launcher)\n .setContentTitle(\"GCM Notification\")\n .setStyle(new Notification.BigTextStyle().bigText(message))\n .setContentText(message);\n\n mBuilder.setContentIntent(contentIntent);\n mNotificationManager.notify(NOTIFICATION_ID, mBuilder.build());\n }", "private void handleActionNotification() {\n String result = getQuote(stringsArray);\n// Notification myNotification = new Notification.Builder(this)\n// .setAutoCancel(true)\n// .setDefaults(Notification.DEFAULT_ALL)\n// .setWhen(System.currentTimeMillis())\n// .setSmallIcon(R.mipmap.ic_launcher)\n// .setContentText(result)\n// .build();\n//\n// NotificationManagerCompat manager = NotificationManagerCompat.from(this);\n// manager.notify(0, myNotification);\n\n\n NotificationCompat.Builder builder = new NotificationCompat.Builder(this)\n .setSmallIcon(R.mipmap.ic_launcher)\n .setContentTitle(\"My notification\")\n .setContentText(result);\n\n NotificationManager notificationManager = (NotificationManager)this\n .getSystemService(Context.NOTIFICATION_SERVICE);\n int id = 1;\n notificationManager.notify(id, builder.build());\n }", "@Override\n public void onReceive(Context context, Intent intent) {\n if (intent.getAction().equals(NotificationConfig.REGISTRATION_COMPLETE)) {\n // gcm successfully registered\n // now subscribe to `global` topic to receive app wide notification\n FirebaseMessaging.getInstance().subscribeToTopic(NotificationConfig.TOPIC_GLOBAL);\n\n displayFirebaseRegId();\n\n } else if (intent.getAction().equals(NotificationConfig.PUSH_NOTIFICATION)) {\n // new push notification is received\n\n String message = intent.getStringExtra(\"message\");\n\n Toast.makeText(getApplicationContext(), \"Notification: \" + message, Toast.LENGTH_LONG).show();\n\n\n }\n }", "@Override\n public void onReceive(Context context, Intent intent) {\n if (intent.getAction().equals(Config.REGISTRATION_COMPLETE)) {\n // gcm successfully registered\n // now subscribe to `global` topic to receive app wide notifications\n FirebaseMessaging.getInstance().subscribeToTopic(Config.TOPIC_GLOBAL);\n\n } else if (intent.getAction().equals(Config.PUSH_NOTIFICATION)) {\n // new push notification is received\n String message = intent.getStringExtra(\"message\");\n Toast.makeText(getApplicationContext(), \"Push notification: \" + message, Toast.LENGTH_LONG).show();\n }\n }", "@Override\n public void onReceive(Context k1, Intent k2) {\n Uri alarmSound = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION);\n NotificationCompat.Builder mBuilder =\n new NotificationCompat.Builder(k1)\n .setSmallIcon(R.drawable.ic_logo)\n .setContentTitle(\"Missed Task!\")\n .setContentText(\"Check your feed for details!\")\n .setSound(alarmSound);\n int mNotificationId = 001;\n\n\n NotificationManager mNotifyMgr =\n (NotificationManager) k1.getSystemService(Context.NOTIFICATION_SERVICE);\n// Builds the notification and issues it.\n mNotifyMgr.notify(mNotificationId, mBuilder.build());\n\n }", "@Override\n public void sendMessage() {\n Intent intent = new Intent(this, GoToMessage.class);\n intent.putExtras(getIntent().getExtras());\n Bundle args = new Bundle();\n args.putString(\"nickname\", mNickname);\n //args.putSerializable(\"convoitem\", item);\n args.putString(\"topic\", mContact.getTopic());\n args.putInt(\"chatid\", mContact.getChatID());\n intent.putExtras(args);\n startActivity(intent);\n }", "@Override\r\n\tpublic int onStartCommand(Intent intent, int flags, int startId) {\n\t\tBundle b = intent.getExtras();\r\n\t\tint id = 0;\r\n\r\n\t\tif ((id = b.getInt(AlarmFactory.ARG_NEWS_ID, -1)) >= 0) {\r\n\t\t\t// Toast.makeText(this, \"\"+id, Toast.LENGTH_SHORT).show();\r\n\t\t\tnew UpdateSourceTask(this, handler).execute(id, UpdateSourceTask.ALARM_TRIGER);\r\n\r\n\t\t}\r\n\t\treturn mStartMode;\r\n\t}", "private String getStringExtra(Bundle savedInstanceState, String strWhich) {\n String strRet = (savedInstanceState != null ? savedInstanceState.getString(strWhich) : \"\");\r\n \r\n if (strRet == \"\") {\r\n \tBundle extras = getIntent().getExtras(); \r\n \tstrRet = (extras != null ? extras.getString(strWhich) : \"\");\r\n }\r\n \r\n return strRet;\r\n\r\n\t}", "public void onReceive(Context context, Intent intent) {\n char c;\n Log.d(NotificationCoreService.TAG, \"onReceive() : \" + intent.getAction());\n String action = intent.getAction();\n int hashCode = action.hashCode();\n if (hashCode != -1354974214) {\n if (hashCode == -415576694 && action.equals(CoreService.ACTION_DEVICE_CONNECTED)) {\n c = 0;\n if (c == 0) {\n NotificationCoreService.this.VoiceNotificationSpeakCompleted(NotificationMessage.TYPE_NORMAL);\n return;\n } else if (c == 1) {\n if (NotificationCoreService.this.mTTSCore != null) {\n NotificationCoreService.this.mTTSCore.stopTTS(true);\n }\n if (NotificationManager.hasInstance()) {\n NotificationManager.getInstance(Application.getContext()).destroy();\n return;\n }\n return;\n } else {\n return;\n }\n }\n } else if (action.equals(CoreService.ACTION_DEVICE_DISCONNECTED)) {\n c = 1;\n if (c == 0) {\n }\n }\n c = 65535;\n if (c == 0) {\n }\n }", "@Override\n public int onStartCommand(Intent intent, int flags, int startId) {\n\n sleepTime = intent.getIntExtra(KEY_SLEEP_TIME,60000);\n\n if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.O){\n NotificationChannel notificationChannel = new NotificationChannel(Service_Channel,\n \"NotificationService\", NotificationManager.IMPORTANCE_LOW);\n NotificationManager notificationManager = (NotificationManager) getSystemService(\n Context.NOTIFICATION_SERVICE);\n notificationManager.createNotificationChannel(notificationChannel);\n }\n\n Notification notification = new NotificationCompat.Builder(this, Service_Channel)\n .setContentTitle(\"Notification Service information\")\n .setContentText(\"Country: \")\n .build();\n startForeground(Notification_Id, notification);\n\n\n CallApi();\n return START_STICKY;\n }", "@Override\n public void onReceive(Context context, Intent intent) {\n if (intent.getAction().equals(Config.REGISTRATION_COMPLETE)) {\n // gcm successfully registered\n // now subscribe to `global` topic to receive app wide notifications\n FirebaseMessaging.getInstance().subscribeToTopic(Config.TOPIC_GLOBAL);\n\n displayFirebaseRegId();\n\n } else if (intent.getAction().equals(Config.PUSH_NOTIFICATION)) {\n // new push notification is received\n\n String message = intent.getStringExtra(\"message\");\n\n\n// txtMessage.setText(message);\n getlist();\n adapter.notifyDataSetChanged();\n }\n }", "@Override\r\n\tpublic String getApp_activity_channel() {\n\t\treturn super.getApp_activity_channel();\r\n\t}", "@Override\n public void onReceive(Context context, Intent intent) {\n switch (intent.getAction() ) {\n case \"com.example.android.a1nba\":\n Toast.makeText(context, \"A2 nba \", Toast.LENGTH_LONG).show();\n break;\n case \"com.example.android.a1mlb\":\n Toast.makeText(context, \"A2 mlb \", Toast.LENGTH_LONG).show();\n break;\n }\n }", "public void onIntentReceived(final String payload) {\n this.WriteLine(\"--- Intent received by onIntentReceived() ---\");\n this.WriteLine(payload);\n this.WriteLine();\n }", "@Override\n public void onInput(MaterialDialog dialog, CharSequence input) {\n Intent myIntent = new Intent(getApplicationContext(), ConfirmActivity.class);\n PendingIntent pendingIntent = PendingIntent.getActivity(getApplicationContext(),\n 0, myIntent, PendingIntent.FLAG_UPDATE_CURRENT);\n\n //notification body\n NotificationManager notificationManager = (NotificationManager) getSystemService(NOTIFICATION_SERVICE);\n NotificationCompat.Builder builder = new NotificationCompat.Builder(getApplicationContext());\n builder.setStyle(new NotificationCompat.BigTextStyle().bigText(input.toString())); //BigText\n builder.setOngoing(true); //Make persistent\n builder.setContentIntent(pendingIntent);\n builder.setSmallIcon(R.drawable.ic_small);\n builder.setLargeIcon(BitmapFactory.decodeResource(getResources(), R.mipmap.ic_large));\n builder.setContentTitle(\"Remember!\");\n builder.setContentText(input.toString()); //Get text from dialog input\n notificationManager.notify(NOTIFICATION_ID, builder.build());\n\n //toast\n Toast.makeText(MainActivity.this, \"Done! Reminder has been set. Check your Notification Bar! :)\",\n Toast.LENGTH_LONG).show();\n\n //Close app when done entering in text\n finish();\n }", "@Override\n public void onReceive(Context context, Intent intent) {\n //If the broadcast has received with success\n //that means device is registered successfully\n if(intent.getAction().equals(GCMRegistrationIntentService.REGISTRATION_SUCCESS)){\n //Getting the registration token from the intent\n token = intent.getStringExtra(\"token\");\n //Displaying the token as toast\n// Toast.makeText(getApplicationContext(), \"Registration token:\" + token, Toast.LENGTH_LONG).show();\n// Intent emb = new Intent(SetingActivity.this, MainActivity.class);\n//sout\n System.out.println( \"Registration token:\" + token);\n //if the intent is not with success then displaying error messages\n } else if(intent.getAction().equals(GCMRegistrationIntentService.REGISTRATION_ERROR)){\n Toast.makeText(getApplicationContext(), \"GCM registration error!\", Toast.LENGTH_LONG).show();\n } else {\n Toast.makeText(getApplicationContext(), \"Error occurred\", Toast.LENGTH_LONG).show();\n }\n }", "@Override\n public void onReceive(Context context, Intent intent) {\n Alibi alibi = (Alibi) context.getApplicationContext();\n UserEventManager uem = alibi.getUserEventManager();\n UserEvent event = uem.getCurrentEvent();\n\n if (event == null) {\n Log.d(Alibi.TAG, \"ReminderAlarm: null current event\");\n return;\n }\n\n String msgNotify = getNotificationMessage(event);\n String msgToast = context.getString(R.string.reminder_title) + \"\\n\" +\n msgNotify + \" since \" + event.getNiceStartTime();\n\n setNotification(context, msgNotify);\n remind(context, msgToast);\n }", "void mo21580A(Intent intent);" ]
[ "0.6395139", "0.62746835", "0.6118142", "0.60974735", "0.58036333", "0.5792988", "0.57615983", "0.5740532", "0.57320666", "0.57114464", "0.5642794", "0.5621858", "0.5593888", "0.5580009", "0.55769694", "0.55743694", "0.5571589", "0.5564626", "0.5561972", "0.5552343", "0.5545258", "0.5542053", "0.5537871", "0.5526218", "0.55251276", "0.5509725", "0.550413", "0.5502398", "0.54944795", "0.5483517", "0.54719454", "0.54719424", "0.5463525", "0.5457339", "0.54355174", "0.54285103", "0.54236215", "0.5401535", "0.5392539", "0.53776896", "0.5357364", "0.53501016", "0.53450304", "0.5336695", "0.53233594", "0.53232324", "0.532163", "0.53161687", "0.53157175", "0.5297482", "0.5294537", "0.5267812", "0.5263627", "0.52615196", "0.5259255", "0.52566147", "0.52566147", "0.52350867", "0.52305675", "0.5225765", "0.52181417", "0.5217843", "0.521171", "0.52107733", "0.52104586", "0.5188725", "0.5186028", "0.5183888", "0.51725125", "0.5172215", "0.5169795", "0.516635", "0.5157664", "0.5157452", "0.51505536", "0.5144488", "0.5141203", "0.51393634", "0.5138095", "0.51334155", "0.51239294", "0.5119908", "0.5114283", "0.51128685", "0.51125735", "0.50983274", "0.5096706", "0.50938904", "0.50927067", "0.50830686", "0.508054", "0.5079094", "0.5078367", "0.5077715", "0.5077259", "0.50748926", "0.50743115", "0.5073959", "0.5069683", "0.5067239" ]
0.60311097
4
alertDialog = new AlertDialog.Builder(context).create(); alertDialog.setTitle("Login Status");
@Override protected void onPreExecute() { super.onPreExecute(); // Showing progress dialog pDialog = new ProgressDialog(thisContext); pDialog.setMessage("Please wait..."); pDialog.setCancelable(true); pDialog.show(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void onClick(DialogInterface dialog, int id) {\n\r\n Context context = getApplicationContext();\r\n CharSequence text = \"Welcome \" + name + \"! Signing up...\";\r\n int duration = Toast.LENGTH_SHORT;\r\n\r\n Toast toast = Toast.makeText(context, text, duration);\r\n toast.show();\r\n }", "public static void showAlert(String message, Activity context) {\n\n AlertDialog.Builder builder = new AlertDialog.Builder(context);\n builder.setMessage(message).setCancelable(false)\n .setPositiveButton(\"OK\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n\n\n }\n });\n try {\n builder.show();\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n }", "@Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n builder.setMessage(this.m)\n .setPositiveButton(R.string.donesuccess, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // onFailure();\n onLoginFailed(m);\n }\n });\n return builder.create();\n }", "static void showAlert(final Context con, final String title, final String msg){\n \tAlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(con);\n \n\t\t\t// set title\n\t\talertDialogBuilder.setTitle(title);\n\t\talertDialogBuilder.setMessage(msg).setCancelable(true)\n\t\t\t\t.setPositiveButton(\"OK\", new DialogInterface.OnClickListener() {\n\n\t\t @Override\n\t\t public void onClick(DialogInterface dialog, int which) {\n\t\t // TODO Auto-generated method stub\n\t\t // Do something\n\t\t dialog.dismiss();\n\t\t }\n\t\t });\n\t\t\n\t\tAlertDialog alertDialog = alertDialogBuilder.create();\n\t\talertDialog.show();\n }", "void AlertaValidacion(String title, String message){\n AlertDialog.Builder builder = new AlertDialog.Builder(RegisterActivity.this);\n builder.setTitle(title);\n builder.setMessage(message).setPositiveButton(\"ACEPTAR\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n\n }\n });\n AlertDialog alert = builder.create();\n alert.show();\n }", "private void showAlert() {\n AlertDialog.Builder alert = new AlertDialog.Builder(this);\n alert.setMessage(\"Error al autenticar usuario\");\n alert.setPositiveButton(\"Aceptar\", null);\n AlertDialog pop = alert.create();\n alert.show();\n }", "public void onClick(DialogInterface dialog, int which) {\n Toast.makeText(getApplicationContext(), \"Please Enter Correct User Name And Password\", Toast.LENGTH_SHORT).show();\n }", "public void onClick(DialogInterface dialog, int which) {\n Toast.makeText(getApplicationContext(), \"Please Enter Correct User Name And Password\", Toast.LENGTH_SHORT).show();\n }", "@SuppressWarnings(\"deprecation\")\n\t\tprivate void alertDialog(String msg) \n\t\t{\n\t\t\tAlertDialog alertDialog = new AlertDialog.Builder(LoginScreenActivity.this).create();\n\t alertDialog.setTitle(\"StyleZ\");\n\t alertDialog.setMessage(msg);\n\t alertDialog.setButton(\"OK\", new DialogInterface.OnClickListener() \n\t {\n\t public void onClick(DialogInterface dialog, int which) {\n\t \t\n\t // Write your code here to execute after dialog closed\n\t dialog.dismiss();\n\t \n\t if(strstatus.equals(\"success\"))\n\t {\n\t Intent i=new Intent(LoginScreenActivity.this,StyleZTab.class);\n\t startActivity(i);\n\t finish();\n\t }\n\t else\n\t {\n\t \t imgviewloginon.setVisibility(View.GONE);\n\t imgviewloginoff.setVisibility(View.VISIBLE);\n\t }\n\t }\n\t });\n\t alertDialog.show();\n\t\t}", "@NonNull\n @Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n builder.setTitle(R.string.login_request)\n .setMessage(R.string.profile_setting_change_credentials)\n .setPositiveButton(R.string.login, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n Log.d(TAG, \"positiveButtonClick\");\n EditPasswordActivity editPasswordActivity = (EditPasswordActivity) getActivity();\n if (editPasswordActivity != null) {\n editPasswordActivity.onDialogPositiveClick();\n }\n }\n })\n .setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n Log.d(TAG, \"negativeButtonClick\");\n }\n });\n // Create the AlertDialog object and return it\n return builder.create();\n }", "@Override\n public void onClick(View v) {\n\n MainActivity.alertDialog = new AlertDialog.Builder(v.getContext());\n MainActivity.alertDialog .setTitle(\"Logout\");\n final TextView input = new TextView(getContext());\n input.setTextSize(18);\n input.setGravity(Gravity.CENTER | Gravity.BOTTOM);\n\n input.setText(\"Are you sure you want to logout?\");\n\n MainActivity.alertDialog.setView(input);\n MainActivity.alertDialog.setCancelable(true);\n MainActivity.alertDialog.setPositiveButton(\"Yes\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n\n LoginActivity.restart(getContext(),0);\n\n }\n });\n\n MainActivity.alertDialog .setNegativeButton(\"No\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n\n dialog.dismiss();\n }\n });\n MainActivity.alertDialog .show();\n\n }", "private void alertForgetPwdMsg() {\n AlertDialog.Builder builder = new AlertDialog.Builder(this, R.style.MyTheme);\n builder.setMessage(R.string.alert_user_is_locked)\n .setCancelable(false)\n .setPositiveButton(R.string.ok,\n new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n dialog.cancel();\n onForgetPwd();\n\n }\n })\n .setNegativeButton(R.string.cancel,\n new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n dialog.cancel();\n }\n });\n builder.show();\n }", "public void alertDialogBasico() {\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\r\n\r\n // 2. Encadenar varios métodos setter para ajustar las características del diálogo\r\n builder.setMessage(R.string.dialog_message);\r\n\r\n\r\n builder.setPositiveButton(R.string.ok, new DialogInterface.OnClickListener() {\r\n public void onClick(DialogInterface dialog, int id) {\r\n\r\n }\r\n });\r\n\r\n\r\n builder.show();\r\n\r\n }", "public void showLoginAlertDialog(Context context, String message, Boolean status) {\r\n alertDialog.setCanceledOnTouchOutside(false);\r\n alertDialog.setMessage(message);\r\n alertDialog.setButton(getResources().getString(R.string.text_ok), new DialogInterface.OnClickListener() {\r\n public void onClick(DialogInterface dialog, int which) {\r\n dismissProgressDialog();\r\n mLoginEmailView.setText(\"\");\r\n et_One.setText(\"\");\r\n et_two.setText(\"\");\r\n et_three.setText(\"\");\r\n et_four.setText(\"\");\r\n et_five.setText(\"\");\r\n et_six.setText(\"\");\r\n et_One.requestFocus();\r\n alertDialog.dismiss();\r\n }\r\n });\r\n if (!isFinishing()) {\r\n alertDialog.show();\r\n TextView textView = (TextView) alertDialog.findViewById(android.R.id.message);\r\n textView.setTextSize(18);\r\n } else {\r\n alertDialog.dismiss();\r\n }\r\n }", "public void openAlert(View view) {\n try {\n AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(getActivity());\n alertDialogBuilder.setTitle(\"Create New Project\");\n\n// set positive button: Yes message\n alertDialogBuilder.setPositiveButton(\"Create Project\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n// go to a new activity of the app\n/*Intent positveActivity = new Intent(getContext(), PositiveActivity.class);\nstartActivity(positveActivity);*/\n }\n });\n\n // set neutral button: Exit the app message\n alertDialogBuilder.setNeutralButton(\"Cancel\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // exit the app and go to the HOME\n //AlertDialogActivity.this.finish();\n }\n });\n\n final EditText input = new EditText(getActivity());\n LinearLayout.LayoutParams lp = new LinearLayout.LayoutParams(\n LinearLayout.LayoutParams.MATCH_PARENT,\n LinearLayout.LayoutParams.MATCH_PARENT);\n input.setHint(\"Project Name\");\n input.setLayoutParams(lp);\n\n AlertDialog alertDialog = alertDialogBuilder.create();\n alertDialog.setView(input);\n alertDialog.show();\n\n\n } catch (Exception e) {\n Log.d(\"BaseManager\", \"openAlert(): \" + e);\n }\n }", "AlertDialog getAlertDialog();", "public void showAlert(){\n Loguin.this.runOnUiThread(new Runnable() {\n public void run() {\n AlertDialog.Builder builder = new AlertDialog.Builder(Loguin.this);\n builder.setTitle(\"Login Error.\");\n builder.setMessage(\"User not Found.\")\n .setCancelable(false)\n .setPositiveButton(\"OK\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n }\n });\n AlertDialog alert = builder.create();\n alert.show();\n }\n });\n }", "private void showAlertDialog(String message) {\n AlertDialog alertDialog = new AlertDialog.Builder(LoginActivity.this).create();\n alertDialog.setTitle(\"Authentication\");\n alertDialog.setMessage(message);\n alertDialog.setCancelable(false);\n alertDialog.setButton(AlertDialog.BUTTON_NEUTRAL, \"OK\",\n new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n dialog.dismiss();\n }\n });\n\n alertDialog.show();\n }", "public void showAlert(){\n MainActivity.this.runOnUiThread(new Runnable() {\n public void run() {\n AlertDialog.Builder builder = new AlertDialog.Builder(MainActivity.this);\n builder.setTitle(\"Login Error.\");\n builder.setMessage(\"User not Found.\")\n .setCancelable(false)\n .setPositiveButton(\"OK\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n }\n });\n AlertDialog alert = builder.create();\n alert.show();\n }\n });\n }", "public AlertDialog createAlert(String title,String message) {\n Builder builder = new Builder(currentContext);\n builder.setTitle(title);\n builder.setMessage(message);\n builder.setCancelable(true);\n builder.setPositiveButton(ok, this.new OkOnClickListener());\n alertDialog = builder.create();\n alertDialog.requestWindowFeature(Window.FEATURE_NO_TITLE);\n alertDialog.setCanceledOnTouchOutside(true);\n alertDialog.setCancelable(true);\n if (null != activity && !activity.isFinishing()) {\n alertDialog.show();\n }\n return alertDialog;\n }", "private void alert(String title, String msj){\n android.app.AlertDialog.Builder alertDialog = new android.app.AlertDialog.Builder(getActivity());\n alertDialog.setTitle(title);\n alertDialog.setMessage(msj);\n alertDialog.setPositiveButton(getString(R.string.alert_accept), new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n }\n });\n alertDialog.show();\n }", "private void showDialog() {\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setTitle(\"User created successfully\");\n builder.setIcon(R.drawable.ic_shield);\n builder.setCancelable(true);\n builder.setPositiveButton(\n \"Continue\",\n new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n finish();\n }\n });\n AlertDialog alert11 = builder.create();\n alert11.show();\n Window window = alert11.getWindow();\n assert window != null;\n WindowManager.LayoutParams wlp = window.getAttributes();\n wlp.gravity = Gravity.CENTER;\n wlp.y = 270;\n wlp.flags &= ~WindowManager.LayoutParams.FLAG_DIM_BEHIND;\n window.setAttributes(wlp);\n }", "private void showAlert(String status, String msg){\n android.app.AlertDialog.Builder builder = new android.app.AlertDialog.Builder(HostelRequestActivity.this)\n .setTitle(status)\n .setMessage(msg);\n builder.setPositiveButton(\"Ok\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n onBackPressed();\n }\n\n });\n //call api for insertion\n builder.setCancelable(false);\n android.app.AlertDialog alert = builder.create();\n alert.show();\n }", "public void getDialog(final Activity context, String message, int title) {\n\n AlertDialog.Builder builder = new AlertDialog.Builder(context);\n switch (title) {\n case 0:\n builder.setTitle(context.getString(R.string.alert_success));\n break;\n case 1:\n builder.setTitle(context.getString(R.string.alert_stop));\n break;\n default:\n builder.setTitle(context.getString(R.string.alert));\n break;\n }\n\n builder.setMessage(message);\n\n builder.setPositiveButton(context.getString(R.string.alert_ok), new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n //Toast.makeText(context, context.getString(R.string.alert_toast), Toast.LENGTH_SHORT).show();\n }\n });\n\n builder.show();\n }", "@Override\n\t public Dialog onCreateDialog(Bundle savedInstanceState) {\n\t AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n\t \n\t \n\t \n\t LayoutInflater inflater = getActivity().getLayoutInflater();\n\t \n\t final View inflator = inflater.inflate(R.layout.dialog_signin, null);\n\t \n\t \n\t \n\t builder.setView(inflator)\n\t \n\t \n\t .setPositiveButton(\"Set\", new DialogInterface.OnClickListener() {\n\t public void onClick(DialogInterface dialog, int id) {\n\t \t EditText username = (EditText) inflator.findViewById(R.id.username);\n\t \t String str = username.getText().toString();\n\t System.out.println(str);\n\t mEditText.setText(str);\n\t }\n\t })\n\t .setNegativeButton(\"Cancel\", new DialogInterface.OnClickListener() {\n\t public void onClick(DialogInterface dialog, int id) {\n\t // User cancelled the dialog\n\t }\n\t });\n\t // Create the AlertDialog object and return it\n\t return builder.create();\n\t }", "@Override\r\n\t\tpublic void onClick(View v) {\n\t\t\tAlertDialog.Builder builder=new AlertDialog.Builder(getActivity());\t\r\n\t\t\tbuilder.setTitle(\"Version 1.0\")\r\n\t\t\t.setMessage(\"With the App User Easily get the Work and directly Interact with Admin.\");\r\n\t\tbuilder.setNegativeButton(\"CLOSE\", new DialogInterface.OnClickListener() {\r\n public void onClick(DialogInterface dialog, int which) {\r\n // Write your code here to execute after dialog closed\r\n Toast.makeText(getActivity().getApplicationContext(), \"You clicked on CLOSE\", Toast.LENGTH_SHORT).show();\r\n }\r\n });\r\n \r\n // Showing Alert Message\r\n builder.show();\r\n\t\t}", "private void showAlert() {\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\r\n builder.setTitle(\"Info..\");\r\n builder.setMessage(\"Your password reset email has been sent!\\n\" +\r\n \"\\n\" +\r\n \"We have sent a password reset email to your email address:\\n\" +\r\n \"\\n\" +\r\n input_email.getText().toString()+\"\\n\" +\r\n \"\\n\" +\r\n \"Please check your inbox to continue.\");\r\n\r\n builder.setPositiveButton(\"Ok\", new DialogInterface.OnClickListener() {\r\n @Override\r\n public void onClick(DialogInterface dialog, int which) {\r\n dialog.dismiss();\r\n finish();\r\n }\r\n });\r\n /* builder.setNegativeButton(\"cancel\", new DialogInterface.OnClickListener() {\r\n @Override\r\n public void onClick(DialogInterface dialog, int which) {\r\n dialog.dismiss();\r\n }\r\n });*/\r\n // create and show the alert dialog\r\n AlertDialog dialog = builder.create();\r\n dialog.show();\r\n }", "@Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n\n builder.setTitle(R.string.prompt_app_updated_title)\n .setMessage(R.string.prompt_app_updated_text)\n // Set the action buttons\n .setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int id) {\n\n }\n });\n\n // Create the AlertDialog object and return it\n return builder.create();\n }", "private void alertBox(String title, String message) {\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setMessage(\"GPS Anda tampaknya dinonaktifkan, apakah Anda ingin mengaktifkannya?\")\n .setCancelable(false)\n .setTitle(\"STATUS GPS\")\n .setPositiveButton(\n \"YA\",\n new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n /* this gonna call class of settings then dialog interface disappeared */\n Intent intent = new Intent(Settings.ACTION_LOCATION_SOURCE_SETTINGS);\n startActivity(intent);\n dialog.cancel();\n }\n }\n )\n .setNegativeButton(\"TIDAK\", new DialogInterface.OnClickListener() {\n public void onClick(final DialogInterface dialog, @SuppressWarnings(\"unused\") final int id) {\n dialog.cancel();\n }\n }\n );\n AlertDialog alertDialog = builder.create();\n alertDialog.show();\n }", "private void AlertUserToReset() {\n Builder builder = new AlertDialog.Builder(this);\n View titleView = LayoutInflater.from(CheckResultActivity.this)\n .inflate(R.layout.custom_alert_dialog, null);\n TextView title = (TextView) titleView.findViewById(R.id.title);\n title.setText(getString(R.string.alert_restore_title));\n builder.setCustomTitle(titleView);\n builder.setMessage(getString(R.string.alert_restore_note));\n builder.setPositiveButton(R.string.alert_dialog_ok, null);\n builder.create().show();\n }", "private void showErrorDialog(){\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n\n builder.setTitle(getString(R.string.booking_not_created));\n builder.setMessage(getString(R.string.customer_already_has_active_booking_error));\n builder.setIcon(R.drawable.ic_error_black_24dp);\n builder.setCancelable(false);\n // When users confirms dialog, close the activity\n builder.setPositiveButton(android.R.string.ok, (dialog, which) -> {\n // Close the Activity..\n finish();\n });\n\n AlertDialog dialog = builder.create();\n dialog.setCanceledOnTouchOutside(false);\n dialog.show();\n\n // Change button colors\n Button positiveButton = dialog.getButton(AlertDialog.BUTTON_POSITIVE);\n positiveButton.setTextColor(getColor(R.color.colorPrimary));\n }", "public void onClickShowAlert(View view) {\n AlertDialog.Builder myAlertBuilder = new\n AlertDialog.Builder(MainActivity.this);\n // Set the dialog title and message.\n myAlertBuilder.setTitle(\"Alert\");\n myAlertBuilder.setMessage(\"Click OK to continue, or Cancel to stop:\");\n // Add the dialog buttons.\n myAlertBuilder.setPositiveButton(\"OK\", new\n DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n // User clicked OK button.\n Toast.makeText(getApplicationContext(), \"Pressed OK\",\n Toast.LENGTH_SHORT).show();\n }\n });\n myAlertBuilder.setNegativeButton(\"Cancel\", new\n DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n // User cancelled the dialog.\n Toast.makeText(getApplicationContext(), \"Pressed Cancel\",\n Toast.LENGTH_SHORT).show();\n }\n });\n // Create and show the AlertDialog.\n myAlertBuilder.show();\n }", "AlertDialog.Builder alertDialogBuilderSentSuccessMessage(Context context) {\n AlertDialog.Builder builder = new AlertDialog.Builder(context);\n builder.setTitle(\"Verification Account Message\");\n builder.setMessage(R.string.resend_ver_email_message_success);\n builder.setIcon(R.drawable.ic_action_info);\n builder.setPositiveButton(\"ok\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.dismiss();\n }\n });\n builder.show();\n\n return builder;\n }", "AlertDialog.Builder alertDialogBuilder(Context context) {\n AlertDialog.Builder builder = new AlertDialog.Builder(context);\n builder.setTitle(\"Verification Account Message\");\n builder.setMessage(R.string.resend_ver_email_message_req);\n builder.setIcon(R.drawable.ic_action_info);\n builder.setPositiveButton(\"Confirm\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n resendVerificationEmail();\n }\n });\n builder.setNegativeButton(\"Cancel\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.dismiss();\n }\n });\n builder.show();\n\n return builder;\n }", "private void doDialogMsgBuilder() {\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setMessage(getResources().getString(R.string.OverAge))\n .setCancelable(false)\n .setPositiveButton(getResources().getString(R.string.ok),\n new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n finish();\n }\n });\n\n AlertDialog alert = builder.create();\n alert.show();\n }", "@NonNull\n @Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n builder.setTitle(R.string.app_help_title);\n builder.setMessage(R.string.app_help_message)\n .setPositiveButton(R.string.app_help_ok, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n\n }\n });\n return builder.create();\n }", "private void showMessage(String title, String message, Context context) {\r\n AlertDialog.Builder builder = new AlertDialog.Builder(context);\r\n builder.setTitle(title);\r\n builder.setMessage(message);\r\n builder.show();\r\n\r\n\r\n }", "private void mDialogShow() {\n alertDialog = new AlertDialog.Builder(this).create();\n alertDialog.setTitle(\"CyanMobile Warning!\");\n alertDialog.setMessage(\"Enable Pie Menu App Toggle to use this!\");\n alertDialog.setButton(DialogInterface.BUTTON_POSITIVE,\n getResources().getString(com.android.internal.R.string.ok),\n new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n updateValues();\n return;\n }\n });\n \n alertDialog.show();\n }", "private void showCustomDialog() {\n final Dialog dialog = new Dialog(getContext());\n dialog.requestWindowFeature(Window.FEATURE_NO_TITLE); //before\n // Include dialog.xml file\n dialog.setContentView(R.layout.success_dialog);\n TextView btn_home = dialog.findViewById(R.id.btn_home);\n dialog.setCanceledOnTouchOutside(false);\n dialog.setOnCancelListener(new DialogInterface.OnCancelListener() {\n @Override\n public void onCancel(DialogInterface dialog) {\n startActivity(new Intent(getContext(), MainActivity.class));\n getActivity().finish();\n }\n });\n btn_home.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n startActivity(new Intent(getContext(), MainActivity.class));\n getActivity().finish();\n }\n });\n // Set dialog title\n\n dialog.show();\n }", "@Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n String mess = \"The user your trying to connect to does not have a name set\";\n if(getArguments().getBoolean(\"me\"))\n {\n mess = \"Someone tried to connect to you for a game but you dont have a name set\";\n }\n builder.setMessage(mess)\n .setPositiveButton(\"Ok\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // FIRE ZE MISSILES!\n }\n });\n // Create the AlertDialog object and return it\n return builder.create();\n }", "static void errorNotification(Context context,String exception) {\n AlertDialog.Builder errorDialogBox= new AlertDialog.Builder(context);\n errorDialogBox.setTitle(\"Exception\");\n errorDialogBox.setMessage(exception);\n errorDialogBox.setNeutralButton(android.R.string.ok,new DialogInterface.OnClickListener(){\n\n @Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.dismiss();\n }\n });\n //Activates the dialog box\n AlertDialog errorDialog = errorDialogBox.create();\n errorDialog.show();\n\n }", "@Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n\n LayoutInflater inflater = getActivity().getLayoutInflater();\n\n\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n builder.setMessage(\"CREA USUARIO\")\n .setView(inflater.inflate(R.layout.register_dialog, null))\n .setPositiveButton(\"OK\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n editUser = ((AlertDialog) dialog).findViewById(R.id.username);\n editPass = ((AlertDialog) dialog).findViewById(R.id.password);\n startConexion();\n }\n })\n .setNegativeButton(\"CANCEL\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User cancelled the dialog\n }\n });\n // Create the AlertDialog object and return it\n return builder.create();\n }", "private void showErrorAlert()\n {\n \tAlertDialog.Builder builder = new AlertDialog.Builder(this);\n \tbuilder.setMessage(getResources().getString(R.string.app_error_str))\n \t .setCancelable(false)\n \t .setPositiveButton(\"OK\", new DialogInterface.OnClickListener() {\n \t public void onClick(DialogInterface dialog, int id) {\n \t dialog.cancel();\n \t }\n \t });\n \t \n \tAlertDialog alert = builder.create();\n \talert.show();\n }", "@Override\n\n public Dialog onCreateDialog (Bundle savedInstanceState){\n Bundle messages = getArguments();\n Context context = getActivity();\n AlertDialog.Builder builder = new AlertDialog.Builder(context);\n\n builder.setPositiveButton(\"OKAY\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.dismiss();\n }\n });\n\n if(messages != null) {\n //Add the arguments. Supply a default in case the wrong key was used, or only one was set.\n builder.setTitle(messages.getString(TITLE_ID, \"Error\"));\n builder.setMessage(messages.getString(MESSAGE_ID, \"There was an error.\"));\n }\n else {\n //Supply default text if no arguments were set.\n builder.setTitle(\"Error\");\n builder.setMessage(\"There was an error.\");\n }\n\n AlertDialog dialog = builder.create();\n return dialog;\n }", "@Override\n public Dialog onCreateDialog (Bundle SaveInstanceState) {\n\n /* Get context from current activity.*/\n Context context = getActivity();\n\n /* Create new dialog, and set message. */\n AlertDialog.Builder ackAlert = new AlertDialog.Builder(context);\n String message = getString(R.string.msg_about_us);\n ackAlert.setMessage(message);\n\n /* Create button in dialog. */\n ackAlert.setNeutralButton(R.string.btn_got_it, new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.dismiss();\n }\n });\n\n /* Set title and show dialog. */\n ackAlert.setTitle(\"About us\");\n ackAlert.create();\n\n return ackAlert.create();\n }", "private void dialogshow(String title, String msg) {\n\n AlertDialog.Builder builder =\n new AlertDialog.Builder(this, R.style.AppCompatAlertDialogStyle);\n builder.setTitle(title);\n builder.setMessage(msg);\n builder.setCancelable(false);\n builder.setPositiveButton(R.string.ok, new DialogInterface.OnClickListener() {\n\n @Override\n public void onClick(DialogInterface dialog, int which) {\n if (acc1.equals(\"no\")) {\n// sendacktorider();\n Intent fare = new Intent(SlideMainActivity.this, SlideMainActivity.class);\n fare.putExtra(\"userid\", User_id);\n fare.putExtra(\"fbuserproimg\", fbuserproimg);\n fare.putExtra(\"whologin\", WhoLogin);\n fare.putExtra(\"password\", checkpassword);\n startActivity(fare);\n finish();\n }\n dialog.cancel();\n }\n });\n\n builder.show();\n\n }", "private void showCheckDialog() {\n AlertDialog.Builder showAuditAlert = new AlertDialog.Builder(this); // Create Alert dialog\n showAuditAlert.setTitle(\"Total prize\"); // Set title\n showAuditAlert.setMessage(\"= \"+mydb.getResultDayAudit(year,month,day).intValue()+\"\"); // Set message\n\n showAuditAlert.setPositiveButton(\"Done\",\n new DialogInterface.OnClickListener()\n { // Can hear \"CLICK\"\n @Override\n public void onClick(DialogInterface dialog,int which)\n {\n \tdialog.dismiss(); // CLICK then disappear\n }\n }\n );\n showAuditAlert.show(); // Show dialog that created upper this line\n }", "private void alertBox_service(String title, String msg) {\r\n\t\tAlertDialog.Builder service_alert = new AlertDialog.Builder(this.mContext);\r\n\t\tservice_alert.setTitle(title);\r\n\t\tservice_alert.setMessage(msg);\r\n\t\tservice_alert.setNeutralButton(\"OK\",new DialogInterface.OnClickListener() {\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void onClick(DialogInterface dialog, int which) {\r\n\t\t\t\tdialog.dismiss();\r\n\r\n\t\t\t}\r\n\t\t});\r\n\t\tservice_alert.show();\r\n\t}", "@Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n builder.setTitle(\"REGISTRO PODA\");\n builder.setMessage(\"USUARIO O CONTRASEÑA INCORRECTA\");\n final AlertDialog.Builder ok = builder.setPositiveButton(\"OK\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // You don't have to do anything here if you just want it dismissed when clicked\n }\n });\n\n // Create the AlertDialog object and return it\n return builder.create();\n }", "private void showdialog()\n\t{\n\n\t\tAlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n\t\tLayoutInflater inflater = getActivity().getLayoutInflater();\n\t\t\n\t\tView convertView = (View) inflater.inflate(R.layout.changepass_dialog, null);\t\t\t\n\t\t\n\t\tfinal EditText old_pass = (EditText) convertView.findViewById(R.id.old_pass);\n\t\tfinal EditText new_pass = (EditText) convertView.findViewById(R.id.new_pass);\n\t\tTextView pass_changed = (TextView) convertView.findViewById(R.id.pass_changed);\n\t\tImageView close_btn = (ImageView) convertView.findViewById(R.id.chng_pass_close);\n\t\t\n\t\tpass_changed.setOnClickListener(new OnClickListener() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) \n\t\t\t{\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\n\t\t\t\tchange_pass(Singleton.user_id, old_pass.getText().toString(), new_pass.getText().toString(), \n\t\t\t\t\t\tnew_pass.getText().toString());\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t\t\n\t\tclose_btn.setOnClickListener(new OnClickListener() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) \n\t\t\t{\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\n\t\t\t\talert.dismiss();\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t\t\n\t\t\n\t\tbuilder.setView(convertView);\n\t\talert = builder.create();\n\t\t\n\t\tWindow window = alert.getWindow();\n\t\tWindowManager.LayoutParams lp = window.getAttributes();\t\t\n\t\t//lp.copyFrom(window.getAttributes());\n\t\twindow.setGravity(Gravity.CENTER);\n\n\t\t// This makes the dialog take up the full width\n\n\t\t/*lp.width = WindowManager.LayoutParams.MATCH_PARENT;\n\t\tlp.height = WindowManager.LayoutParams.WRAP_CONTENT;\n\t\tlp.gravity = Gravity.CENTER;*/\n\t\t\n\t\tlp.x = 100; // The new position of the X coordinates\n lp.y = 100; // The new position of the Y coordinates\n lp.width = 300; // Width\n lp.height = 100; // Height\n // lp.alpha = 0.7f; // Transparency\n\n\t\twindow.setAttributes(lp);\n\t\talert.show();\n\t}", "private void showAlert(){\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity())\n .setTitle(\"Your further details please:\")\n .setView(view);\n builder.setPositiveButton(\"Proceed\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n Intent it = new Intent(getActivity(), StudentFurtherDetails.class);\n getActivity().startActivity(it);\n }\n\n });\n //call api for insertion\n builder.setNegativeButton(\"Later\", null)\n .setCancelable(false);\n AlertDialog alert = builder.create();\n alert.show();\n }", "@Override\n\tpublic Dialog onCreateDialog(Bundle savedInstanceState) {\n\t\tAlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n\t\tbuilder.setMessage(message).setTitle(\"Device's IP address :\")\n\t\t\t\t.setNeutralButton(\"OK\",\n\t\t\t\t\t\tnew DialogInterface.OnClickListener() {\n\t\t\t\t\t\t\tpublic void onClick(DialogInterface dialog, int id) {\n\t\t\t\t\t\t\t\t// close the dialog\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\t// Create the AlertDialog object and return it\n\t\treturn builder.create();\n\t}", "@Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n\n builder.setMessage(R.string.dialog_internet_eng_text).setPositiveButton\n (R.string.ok, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n System.exit(1);\n /*\n Intent homeIntent= new Intent(getContext(), MainCardActivity.class);\n homeIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n startActivity(homeIntent);\n */\n }\n });\n return builder.create();\n }", "@Override\n public void onClick(View v)\n {\n AlertDialog.Builder dialogBuilder = new AlertDialog.Builder(new ContextThemeWrapper(activity, R.style.AppTheme));\n dialogBuilder.setView(viewConfirmDialog);\n AlertDialog alertDialog= dialogBuilder.create();\n Window windowAlert = alertDialog.getWindow();\n WindowManager.LayoutParams layoutConfirmDialog = new WindowManager.LayoutParams();\n layoutConfirmDialog.copyFrom(windowAlert.getAttributes());\n layoutConfirmDialog.width = 320;\n layoutConfirmDialog.height = 320;\n alertDialog.getWindow().setAttributes(layoutConfirmDialog);\n dismissAlertDialog();\n components.alertDialog = alertDialog;\n alertDialog.show();\n\n }", "private void showHelp(){\n AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(this,R.style.MyDialogTheme);\n alertDialogBuilder.setMessage(\"Welcome to NBA Manager 2019\\n\\n\" +\n \"The purpose of the application is to simulate a basketball manager game and draft a team.\\n\\n\" +\n \"You can view your current roster by pressing the right arrow in the top right corner.\\n\\n\" +\n \"*Not all players will have a height or a weight.\");\n alertDialogBuilder.setPositiveButton(\"Ok\",\n new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface arg0, int arg1) {\n }\n });\n AlertDialog alertDialog = alertDialogBuilder.create();\n alertDialog.show();\n }", "public Dialog onCreateDialog(Bundle savedInstanceState){\n AlertDialog.Builder sample_builder = new AlertDialog.Builder(getActivity());\n sample_builder.setView(\"activity_main\");\n sample_builder.setMessage(\"This is a sample prompt. No new networks should be scanned while this prompt is up\");\n sample_builder.setCancelable(true);\n sample_builder.setPositiveButton(\"Ok\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n listener.onDialogPositiveClick(StationFragment.this);\n }\n });\n sample_builder.setNegativeButton(\"Cancel\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n listener.onDialogNegativeClick(StationFragment.this);\n }\n });\n return sample_builder.create();\n\n }", "void showDialog() {\n DialogFragment newFragment = MyAlertDialogFragment.newInstance(R.string.alert_dialog_two_buttons_title);\n newFragment.show(getFragmentManager(), \"dialog\");\n }", "@Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n \n // Get the layout inflater\n LayoutInflater inflater = getActivity().getLayoutInflater();\n View dialogView = inflater.inflate(R.layout.password_dialog, null);\n CheckBox rememberCheckbox = (CheckBox) dialogView.findViewById(R.id.rememberPassword);\n rememberCheckbox.setChecked(app.getRememberPassword());\n \n //Set Error message\n if(message != null)\n ((TextView)dialogView.findViewById(R.id.authErrorView)).setText(message);\n \n builder.setView(dialogView);\n \n \n builder.setMessage(R.string.authenticate)\n .setPositiveButton(R.string.ok, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n String password = ((EditText)AuthDialogFragment.this.getDialog().findViewById(R.id.password)).getText().toString();\n boolean rememberPassword = ((CheckBox)AuthDialogFragment.this.getDialog().findViewById(R.id.rememberPassword)).isChecked();\n \n app.setRememberPass(rememberPassword);\n \n service.authenticate(password);\n }\n })\n .setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User cancelled the dialog, shutdown everything\n if(service != null)\n {\n service.disconnect();\n }\n }\n });\n // Create the AlertDialog object and return it\n return builder.create();\n }", "public void showAlertDialog(View v){\n AlertDialog.Builder alert = new AlertDialog.Builder(this);\n alert.setTitle(\"Update Details\");\n alert.setMessage(\"Do you really want to update details?\");\n\n //if customer click yes\n alert.setPositiveButton(\"Yes\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n Toast.makeText(MEditProfile.this, \"Update Successfully\", Toast.LENGTH_SHORT).show();\n }\n });\n //if customer click no\n alert.setNegativeButton(\"No\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n Toast.makeText(MEditProfile.this,\"\",Toast.LENGTH_SHORT).show();\n }\n });\n alert.create().show();\n }", "private void createAndShowDialog(final String message, final String title) {\n final AlertDialog.Builder builder = new AlertDialog.Builder(getActivity ());\n\n builder.setMessage(message);\n builder.setTitle(title);\n builder.create().show();\n }", "public void emailCollisionError(){\n String[] options = {\"Proceed with Login\",\"Stay Here\"};\n AlertDialog.Builder builder = new AlertDialog.Builder(LoginActivity.this)\n .setTitle(\"You are a registered user, try logging in!\")\n .setItems(options, new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n if(which == 0){\n\n startActivity(new Intent(LoginActivity.this, RegisteredUserLogin.class));\n LoginActivity.this.finish();\n\n }\n }\n });\n builder.show();\n\n }", "private void startMealToDatabaseAlert() {\n AlertDialog.Builder dialogBuilder = new AlertDialog.Builder(this);\n TextView dialogTitle = new TextView(this);\n int blackValue = Color.parseColor(\"#000000\");\n dialogTitle.setText(R.string.title_dialog_meal);\n dialogTitle.setGravity(Gravity.CENTER_HORIZONTAL);\n dialogTitle.setPadding(0, 30, 0, 0);\n dialogTitle.setTextSize(25);\n dialogTitle.setTextColor(blackValue);\n dialogBuilder.setCustomTitle(dialogTitle);\n View dialogView = getLayoutInflater().inflate(R.layout.dialog_add_meal, null);\n\n this.startEditTexts(dialogView);\n this.startLocationSpinner(dialogView);\n this.startAddPhotoButton(dialogView);\n this.startMealDialogButtonListeners(dialogBuilder);\n\n dialogBuilder.setView(dialogView);\n AlertDialog permission_dialog = dialogBuilder.create();\n permission_dialog.show();\n }", "public void createStatusDialog(String title, String msg)\n {\n new AlertDialog.Builder(this)\n .setTitle(title)\n .setMessage(msg)\n // A null listener allows the button to dismiss the dialog and take no further action.\n .setNeutralButton(android.R.string.ok, null)\n .setIcon(android.R.drawable.ic_dialog_alert)\n .show();\n }", "public void showAlertDialog(Context context, String title, String message,\n\t\t\t\t\t\t\t\tBoolean status) {\n\t\tAlertDialog alertDialog = new AlertDialog.Builder(context).create();\n\n\t\t// Setting Dialog Title\n\t\talertDialog.setTitle(title);\n\n\t\t// Setting Dialog Message\n\t\talertDialog.setMessage(message);\n\n\t\t// Setting alert dialog icon\n\t\t// alertDialog.setIcon((status) ? R.drawable.success : R.drawable.fail);\n\n\t\t// Setting OK Button\n\t\talertDialog.setButton(\"OK\", new DialogInterface.OnClickListener() {\n\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\tSystem.exit(0);\n\t\t\t}\n\t\t});\n\n\t\t// Showing Alert Message\n\t\talertDialog.show();\n\n\t}", "@Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n String mess = \"Stalemate!\";\n if(getArguments().getBoolean(\"check\"))\n {\n mess = \"Checkmate! \"+getArguments().getString(\"team\")+\" wins\";\n }\n builder.setMessage(mess)\n .setPositiveButton(\"Ok\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n Log.d(TAG, \"Ok\");\n }\n });\n // Create the AlertDialog object and return it\n return builder.create();\n }", "protected void showAlertbox() {\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n builder.setTitle(\"위치서비스 비활성화\");\n builder.setMessage(\"현위치를 탐색하기 위해서 위치서비스가 필요합니다. 위치 설정을 켜시고 다시 현위치를 탐색해주세요.\");\n builder.setCancelable(true);\n builder.setPositiveButton(\"설정\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int id) {\n startActivity(new Intent(android.provider.Settings.ACTION_LOCATION_SOURCE_SETTINGS));\n }\n });\n builder.setNegativeButton(\"취소\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int id) {\n dialog.cancel();\n }\n });\n builder.create().show();\n }", "@Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n builder.setMessage(R.string.dialog_fire_missiles)\n .setPositiveButton(R.string.fire, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n }\n });\n return builder.create();\n }", "private void confirmOtp(String OTP) {\n verifyOTP=OTP;\n LayoutInflater li = LayoutInflater.from(this);\n //Creating a view to get the dialog box\n View confirmDialog = li.inflate(R.layout.dailogconfirm, null);\n AppCompatButton buttonConfirm = (AppCompatButton) confirmDialog.findViewById(R.id.buttonConfirm);\n editTextConfirmOtp = (EditText) confirmDialog.findViewById(R.id.editTextOtp);\n\n alert = new AlertDialog.Builder(this);\n alert.setView(confirmDialog);\n\n\n alertDialog = alert.create();\n alertDialog.show();\n\n\n }", "@Override\n\tpublic void setDialogTitle(AlertDialog dialog, int layoutId, String title,\n\t\t\tString id) {\n\t\t\n\t}", "public void showMessageDialog(String title, String message, Context context) {\n //Create the dialog\n AlertDialog.Builder builder = new AlertDialog.Builder(context);\n builder.setTitle(title);\n builder.setMessage(message);\n builder.show();\n }", "public void onClick(DialogInterface dialog, int id) {\n prefs.edit().putBoolean(\"Islogin\", false).commit();\n prefs.edit().putString(\"role\", \"\").commit();\n item.setTitle(\"Login\");\n }", "public void Report_User_alert(){\n final AlertDialog.Builder alert=new AlertDialog.Builder(context,R.style.DialogStyle);\n alert.setTitle(\"Report\")\n .setMessage(\"Are you sure to Report this user?\")\n .setNegativeButton(\"No\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n dialog.dismiss();\n }\n })\n .setPositiveButton(\"yes\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n Send_report();\n }\n });\n\n alert.setCancelable(true);\n alert.show();\n }", "private void changeNameDialog() {\n\n AlertDialog.Builder alert;\n alert = new AlertDialog.Builder(this,R.style.Theme_MaterialComponents_Dialog_Alert);\n LayoutInflater inflater = getLayoutInflater();\n\n View view = inflater.inflate(R.layout.change_name_dialog,null);\n\n changeName = view.findViewById(R.id.change_name);\n nCancel = view.findViewById(R.id.n_cancel);\n nSave = view.findViewById(R.id.n_save);\n\n alert.setView(view);\n alert.setCancelable(false);\n\n AlertDialog dialog = alert.create();\n dialog.getWindow().setBackgroundDrawableResource(R.color.transparent);\n\n dialog.show();\n\n nSave.setOnClickListener(v -> {\n txtName = changeName.getText().toString().trim();\n if(TextUtils.isEmpty(txtName)){\n Toast.makeText(UserActivity.this, \"Your name is empty\" , Toast.LENGTH_SHORT).show();\n dialog.dismiss();\n }\n else {\n updateUserInfo(txtName);\n dialog.dismiss();\n }\n });\n\n nCancel.setOnClickListener(v -> dialog.dismiss());\n\n }", "@Override\n public void onClick(View v) {\n builder.setMessage(R.string.alertMessage)\n .setCancelable(false)\n .setPositiveButton(\"Yes\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n //buClick();\n //finish();\n dialog.cancel();\n calculat();\n\n }\n })\n .setNegativeButton(\"No\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // Action for 'NO' Button\n dialog.cancel();\n\n }\n });\n //Creating dialog box\n AlertDialog alert = builder.create();\n //Setting the title manually\n alert.setTitle(R.string.alertTitle);\n alert.show();\n }", "@Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n builder.setMessage(\"Limite mensal excedido! Na versão gratuita, o limite máximo de publicação de caronas mensais é 4 (quatro), atualize para a versão Pro e tenha publicações ilimitadas...\")\n .setPositiveButton(\"Ir\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n String url = \"https://play.google.com/store/apps/details?id=com.xetelas.nova\";\n Intent i = new Intent(Intent.ACTION_VIEW);\n i.setData(Uri.parse(url));\n i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n getContext().startActivity(i);\n }\n })\n .setNegativeButton(\"Voltar\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User cancelled the dialog\n }\n });\n // Create the AlertDialog object and return it\n return builder.create();\n }", "public static void setDialogViewMessage(Context context, AlertDialog.Builder alert, String message1, String message2){\n// Log.e(\"setDialogViewMessage\", \"setDialogViewMessage\");\n LinearLayout ll=new LinearLayout(context);\n LinearLayout.LayoutParams layoutParams = new LinearLayout.LayoutParams(\n LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.WRAP_CONTENT);\n\n layoutParams.setMargins(20, 10, 20, 10);\n\n ll.setOrientation(LinearLayout.VERTICAL);\n ll.setLayoutParams(layoutParams);\n TextView messageView1 = new TextView(context);\n TextView messageView2 = new TextView(context);\n TextView messageView3 = new TextView(context);\n messageView1.setLayoutParams(layoutParams);\n messageView2.setLayoutParams(layoutParams);\n messageView3.setLayoutParams(layoutParams);\n messageView1.setText(message1);\n messageView2.setText(message2);\n PackageInfo pInfo = null;\n String version = \"\";\n try {\n pInfo = context.getPackageManager().getPackageInfo(context.getPackageName(), 0);\n version = pInfo.versionName;\n } catch (PackageManager.NameNotFoundException e) {\n e.printStackTrace();\n }\n\n messageView3.setText(\"Card Safe Version \" + version);\n ll.addView(messageView1);\n ll.addView(messageView2);\n ll.addView(messageView3);\n alert.setView(ll);\n\n }", "public AlertMessage(Context context, String msg) {\r\n\t\tAlertDialog.Builder dialog = new AlertDialog.Builder(context);\r\n\t\tdialog.setMessage(msg);\r\n\t\tdialog.setCancelable(false);\r\n\t\tdialog.setNeutralButton(\"OK\", null);\r\n \tdialog.create().show();\r\n\t}", "@Override\r\n\tpublic Dialog onCreateDialog(Bundle savedInstanceState) {\n\t\tAlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\r\n\r\n\t\t// Set up the layout inflater\r\n\t\tLayoutInflater inflater = getActivity().getLayoutInflater();\r\n\r\n\t\t// Set the title, message and layout of the dialog box\r\n\t\tbuilder.setView(inflater.inflate(R.layout.dialog_box_layout, null))\r\n\t\t\t\t.setTitle(R.string.dialog_title);\r\n\r\n\t\t// User accepts the thing in the dialog box\r\n\t\tbuilder.setPositiveButton(R.string.dialog_accpet,\r\n\t\t\t\tnew DialogInterface.OnClickListener() {\r\n\t\t\t\t\tpublic void onClick(DialogInterface dialog, int id) {\r\n\t\t\t\t\t\tToast.makeText(getActivity(),\r\n\t\t\t\t\t\t\t\t\"Thank you for your kiss ^.^\",\r\n\t\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\r\n\t\t// User cancels the thing in the dialog box\r\n\t\tbuilder.setNegativeButton(R.string.dialog_cancel,\r\n\t\t\t\tnew DialogInterface.OnClickListener() {\r\n\t\t\t\t\tpublic void onClick(DialogInterface dialog, int id) {\r\n\t\t\t\t\t\tToast.makeText(getActivity(), \"Refuse my kiss??? >.<\",\r\n\t\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\r\n\t\treturn builder.create(); // return the AlertDialog object\r\n\t}", "@Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n // Get the layout inflater\n LayoutInflater inflater = getActivity().getLayoutInflater();\n \n // Inflate and set the layout for the dialog\n // Pass null as the parent view because its going in the dialog layout\n View view = inflater.inflate(R.layout.signin_dialog, null);\n view.findViewById(R.id.sign_in_button).setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n mHelper.beginUserInitiatedSignIn();\n SignInDialogFragment.this.dismiss();\n }\n });\n builder.setView(view);\n // Create the AlertDialog object and return it\n return builder.create();\n }", "public void showAlertDialog(String title, String message) {\n\n\t\t// Create an object of alert class for an activity\n\t\tAlertDialog alertDialog = new AlertDialog.Builder(objContext).create();\n\n\t\t// Setting Dialog Title\n\t\talertDialog.setTitle(title);\n\n\t\t// Setting Dialog Message\n\t\talertDialog.setMessage(message);\n\n\t\t// Setting Icon to Dialog\n\t\talertDialog.setIcon(R.drawable.ic_launcher);\n\n\t\talertDialog.setButton(DialogInterface.BUTTON_POSITIVE, \"Ok\", new DialogInterface.OnClickListener() {\n\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\tdialog.dismiss();\n\t\t\t}\n\t\t});\n\t\talertDialog.show();\n\t}", "public void showMessage(){\n final AlertDialog.Builder alert = new AlertDialog.Builder(context);\n alert.setMessage(message);\n alert.setTitle(title);\n alert.setPositiveButton(\"OK\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n alert.create().dismiss();\n }\n });\n alert.create().show();\n }", "@Override\n public void onClick(View v) {\n final Dialog login = new Dialog(MainActivity.this);\n // Set GUI of login screen\n login.setContentView(R.layout.login_dialog);\n login.setTitle(\"Login to your Snap account\");\n\n // Init button of login GUI\n Button btnLogin = (Button) login.findViewById(R.id.btnLogin);\n Button btnCancel = (Button) login.findViewById(R.id.btnCancel);\n final EditText txtUsername = (EditText)login.findViewById(R.id.txtUsername);\n final EditText txtPassword = (EditText)login.findViewById(R.id.txtPassword);\n txtPassword.setTypeface(Typeface.SANS_SERIF);\n txtUsername.setTypeface(Typeface.SANS_SERIF);\n\n SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(MainActivity.this);\n //String strSavedMem1 = sharedPreferences.getString(\"username\",\"d\");\n txtUsername.setText( sharedPreferences.getString(\"username\",\"@walk.com\") );\n txtPassword.setText( sharedPreferences.getString(\"password\",\"password\"));\n\n\n\n // Attached listener for login GUI button\n btnLogin.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n if(txtUsername.getText().toString().trim().length() > 0 && txtPassword.getText().toString().trim().length() > 0)\n {\n // Validate Your login credential here than display message\n checkCredentials(txtUsername.getText().toString().trim(),txtPassword.getText().toString().trim());\n login.dismiss();\n }\n else\n {\n Toast.makeText(getApplicationContext(),\n \"Please enter Username and Password\", Toast.LENGTH_LONG).show();\n }\n }\n });\n btnCancel.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n login.dismiss();\n }\n });\n\n // Make dialog box visible.\n login.show();\n\n }", "public AlertDialog createSimpleDialog() {\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setTitle(\"Code with love by\")\n .setMessage(\"Alvaro Velasco & Jose Alberto del Val\");\n return builder.create();\n }", "@Override\r\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\r\n \r\n LayoutInflater inflater = getActivity().getLayoutInflater();\r\n builder.setTitle(\"New Wallet\");\r\n \r\n\t final View view = inflater.inflate(R.layout.new_wallet_dialog, null);\r\n\t \r\n\t final EditText name = (EditText) view.findViewById(R.id.newWallet_text);\r\n\t \r\n builder.setPositiveButton(R.string.confirmRecord, new DialogInterface.OnClickListener() {\r\n \r\n \tpublic void onClick(DialogInterface dialog, int id) {\r\n \t\tlistener.comfirmPressed(name.getText().toString());\t\r\n \t\t}\r\n });\r\n builder.setNegativeButton(R.string.cancelRecord, new DialogInterface.OnClickListener() {\r\n \tpublic void onClick(DialogInterface dialog, int id) {\r\n \t\tlistener.cancelPressed();\r\n \t\t}\r\n \t});\r\n // Create the AlertDialog object and return it\r\n return builder.create();\r\n }", "@Override\n\t\tpublic final Dialog onCreateDialog(final Bundle savedInstanceState) {\n\t\t\tint title = getArguments().getInt(\"title\");\n\n\t\t\treturn new AlertDialog.Builder(getActivity())\n\t\t\t\t\t.setIcon(R.drawable.alert_dialog_icon)\n\t\t\t\t\t.setTitle(title)\n\t\t\t\t\t.setPositiveButton(R.string.alert_dialog_ok,\n\t\t\t\t\t\t\tnew DialogInterface.OnClickListener() {\n\t\t\t\t\t\t\t\tpublic void onClick(\n\t\t\t\t\t\t\t\t\t\tfinal DialogInterface dialog,\n\t\t\t\t\t\t\t\t\t\tfinal int whichButton) {\n\t\t\t\t\t\t\t\t\t((AddingActivity) getActivity())\n\t\t\t\t\t\t\t\t\t\t\t.doPositiveClick();\n\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t})\n\t\t\t\t\t.setNegativeButton(R.string.alert_dialog_cancel,\n\t\t\t\t\t\t\tnew DialogInterface.OnClickListener() {\n\t\t\t\t\t\t\t\tpublic void onClick(\n\t\t\t\t\t\t\t\t\t\tfinal DialogInterface dialog,\n\t\t\t\t\t\t\t\t\t\tfinal int whichButton) {\n\t\t\t\t\t\t\t\t\t((AddingActivity) getActivity())\n\t\t\t\t\t\t\t\t\t\t\t.doNegativeClick();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}).create();\n\t\t}", "@Override\n protected void onPrepareDialog(int id, Dialog dialog) {\n \tToast.makeText(this, dialog.toString(), Toast.LENGTH_SHORT).show();\n }", "public void alertDialogShow_login(final Context context) {\n LayoutInflater li = LayoutInflater.from(context);\n View promptsView = li.inflate(R.layout.custom_popup_login,\n null);\n\n final AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(\n context, AlertDialog.THEME_DEVICE_DEFAULT_LIGHT);\n // set prompts.xml to alertdialog builder\n alertDialogBuilder.setView(promptsView);\n\n final AlertDialog d = alertDialogBuilder.show();\n\n final EditText ed_username = (EditText) promptsView.findViewById(R.id.ed_username);\n final EditText ed_password = (EditText) promptsView.findViewById(R.id.ed_password);\n\n\n Button p_btn_login = (Button) promptsView.findViewById(R.id.p_btn_login);\n p_btn_login.setTransformationMethod(null);\n\n p_btn_login.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n\n\n\n String url = getResources().getString(R.string.url)+\"login.php\";\n String params = \"username=\"+ed_username.getText().toString()+\"&password=\"+ed_password.getText().toString();\n\n\n //System.out.println(\"URL = \"+url_login+\"?\"+params);\n WebRequestCall webRequestCall_login = new WebRequestCall(new TaskDelegate() {\n @Override\n public void TaskCompletionResult(String result) {\n\n try {\n\n JSONObject jsonObject = new JSONObject(result);\n if(jsonObject.getString(\"status\").equals(\"200\")) {\n\n\n SavePreferences(\"fname\" ,jsonObject.getString(\"fname\" ));\n SavePreferences(\"lname\" ,jsonObject.getString(\"lname\"));\n SavePreferences(\"full_name\" ,jsonObject.getString(\"full_name\" ));\n SavePreferences(\"email\" ,jsonObject.getString(\"email\" ));\n SavePreferences(\"phone\" ,jsonObject.getString(\"phone\" ));\n SavePreferences(\"address\" ,jsonObject.getString(\"address\" ));\n SavePreferences(\"user_id\" ,jsonObject.getString(\"user_id\" ));\n SavePreferences(\"user_status\" ,jsonObject.getString(\"user_status\" ));\n SavePreferences(\"user_role\" ,jsonObject.getString(\"user_role\" ));\n\n SavePreferences(\"isLogin\",\"yes\");\n\n /* if (jsonObject.getString(\"user_status\" ).equals(\"a\")){\n fragment_no = 2;\n }*/\n\n if (jsonObject.getString(\"user_role\" ).equals(\"1\")){\n Intent intent = new Intent(getActivity(), MainActivity.class);\n intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n getActivity().startActivity(intent);\n getActivity().finish();\n }else if (sharedPreferences.getString(\"user_role\" ,\"\" ).equals(\"2\")){\n //staff bookappointment activity here\n\n SavePreferences(\"staff_user_id\",jsonObject.getString(\"staff_user_id\" ));\n SavePreferences(\"staff_name\" ,jsonObject.getString(\"staff_name\" ));\n SavePreferences(\"business_id\" ,jsonObject.getString(\"business_id\" ));\n SavePreferences(\"business_name\",jsonObject.getString(\"business_name\" ));\n\n Intent intent = new Intent(getActivity(), MainActivity.class);\n intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n startActivity(intent);\n getActivity().finish();\n\n } else if (sharedPreferences.getString(\"user_role\" ,\"\" ).equals(\"3\")){\n //staff bookappointment activity here\n SavePreferences(\"staff_user_id\",jsonObject.getString(\"staff_user_id\" ));\n SavePreferences(\"staff_name\" ,jsonObject.getString(\"staff_name\" ));\n SavePreferences(\"business_id\" ,jsonObject.getString(\"business_id\" ));\n SavePreferences(\"business_name\",jsonObject.getString(\"business_name\" ));\n\n Intent intent = new Intent(getActivity(), StaffScreensActivity.class);\n getActivity().startActivity(intent);\n getActivity().finish();\n\n } else if (jsonObject.getString(\"user_role\" ).equals(\"4\")){\n //Customer bookappointment activity here\n Intent intent = new Intent(getActivity(), CustomerBookingActivity.class);\n getActivity().startActivity(intent);\n }\n\n //Toast.makeText(context,jsonObject.getString(\"status_alert\"),Toast.LENGTH_SHORT).show();\n d.dismiss();\n }else{\n //login_form_layout.setVisibility(View.VISIBLE);\n Toast.makeText(context,jsonObject.getString(\"status_alert\"),Toast.LENGTH_SHORT).show();\n ed_username.setError(getResources().getString(R.string.enter_valid_username));\n ed_password.setError(getResources().getString(R.string.enter_valid_password));\n ed_username.requestFocus();\n }\n\n } catch (final JSONException e) {\n //login_form_layout.setVisibility(View.VISIBLE);\n //Log.e(TAG, \"Json parsing error: \" + e.getMessage());\n }\n }\n });\n webRequestCall_login.execute(url,\"POST\",params);\n\n\n\n /*if(haveNetworkConnection()){}else{\n //showSnack(false);\n }*/\n\n }\n });\n\n\n }", "@Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n LayoutInflater inflater = requireActivity().getLayoutInflater();\n final View view = inflater.inflate(R.layout.on_click_dialog, null);\n builder.setView(view);\n\n\n\n\n\n\n\n\n return builder.create();\n }", "@Override\n public Dialog onCreateDialog(Bundle bundle) {\n AlertDialog.Builder builder =\n new AlertDialog.Builder(getActivity());\n builder.setMessage(\n getString(R.string.results,\n totalSuposicoes,\n (1000 / (double) totalSuposicoes)));\n\n // \"Resetar Questão\" Button\n builder.setPositiveButton(R.string.reset_quiz,\n new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog,\n int id) {\n resetQuiz();\n }\n }\n );\n\n return builder.create(); // retorna o AlertDialog\n }", "public void Alert() {\n\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n builder.setTitle(R.string.app_name);\n builder.setMessage(\"Do you want to Sign out ?\");\n builder.setIcon(R.drawable.small_logo);\n builder.setPositiveButton(\"Yes\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n dialog.dismiss();\n FirebaseAuth.getInstance().signOut();\n\n Intent i=new Intent(getActivity(),signIn.class);\n startActivity(i);\n\n\n }\n });\n builder.setNegativeButton(\"No\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n dialog.dismiss();\n }\n });\n AlertDialog alert = builder.create();\n alert.show();\n\n\n\n\n\n // AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n // builder.setPositiveButton(\"Yes\", new DialogInterface.OnClickListener()\n // {\n // @Override\n // public void onClick(DialogInterface dialog, int which)\n // {\n // Stuff to do\n\n // FirebaseAuth.getInstance().signOut();\n // }\n // });\n // builder.setNegativeButton(\"No\", new DialogInterface.OnClickListener()\n // {\n // @Override\n // public void onClick(DialogInterface dialog, int which)\n // {\n // // Stuff to do\n // }\n // });\n\n // builder.setMessage(\"Your_MSG\");\n // builder.setTitle(\"Warning..\");\n\n// AlertDialog d = builder.create();\n// d.show();\n\n\n\n\n\n\n\n }", "public void alertForOuitMessage() {\n final AlertDialog.Builder builder = new AlertDialog.Builder(context);\n final AlertDialog alert = builder.create();\n alert.getWindow().getAttributes().windowAnimations = R.style.alertAnimation;\n View view = alert.getLayoutInflater().inflate(R.layout.quiz_quit_alert, null);\n TextView title1 = (TextView) view.findViewById(R.id.title1);\n title1.setText(context.getString(R.string.quiz_quit_are));\n title1.setTypeface(VodafoneRg);\n TextView title2 = (TextView) view.findViewById(R.id.title2);\n title2.setText(context.getString(R.string.quiz_quit_progress));\n title2.setTypeface(VodafoneRg);\n TextView quiz_text = (TextView) view.findViewById(R.id.quit_text);\n quiz_text.setTypeface(VodafoneRg);\n LinearLayout quit_layout = (LinearLayout) view.findViewById(R.id.quit_layout);\n alert.setCustomTitle(view);\n TextView quit_icon = (TextView) view.findViewById(R.id.quit_icon);\n quit_icon.setTypeface(materialdesignicons_font);\n quit_icon.setText(Html.fromHtml(\"&#xf425;\"));\n quit_layout.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n alert.dismiss();\n finish();\n }\n });\n alert.show();\n }", "private void alert(String title, String message) {\n UIAlertView alertView = new UIAlertView(title, message, null, \"OK\");\n alertView.show();\n }", "@Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n builder.setMessage(device.getName())\n \t\t.setTitle(R.string.bt_exchange_dialog_title)\n .setPositiveButton(R.string.bt_exchange_dialog_positive_btn, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n\n \t //Add BT Device Activity\n \t performBTKeyExchange(device);\n }\n })\n .setNegativeButton(R.string.bt_exchange_dialog_negative_btn, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User cancelled the dialog\n \t dismiss();\n }\n });\n // Create the AlertDialog object and return it\n return builder.create();\n }", "private void alertDialog(int title, int message, int icon) {\n tst_Message.cancel();\n tst_Message = null;\n AlertDialog.Builder builder = new AlertDialog.Builder(MainActivity.this);\n builder.setTitle(title);\n builder.setMessage(message);\n builder.setIcon(icon);\n builder.setPositiveButton(R.string.dialog_pos_btn, new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n reset();\n }\n });\n builder.show();\n }", "@Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n\n builder.setMessage(msg)\n .setPositiveButton(\"Ok\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n return;\n }\n });\n\n Dialog dialog = builder.create();\n\n // Create the AlertDialog object and return it\n return dialog;\n }", "private void createAndShowDialog(final String message, final String title) {\n final AlertDialog.Builder builder = new AlertDialog.Builder(this);\n\n builder.setMessage(message);\n builder.setTitle(title);\n builder.create().show();\n }", "private void creatDialog() {\n \t mDialog=new ProgressDialog(this);\n \t mDialog.setTitle(\"\");\n \t mDialog.setMessage(\"正在加载请稍后\");\n \t mDialog.setIndeterminate(true);\n \t mDialog.setCancelable(true);\n \t mDialog.show();\n \n\t}", "private Alert alert(String AlertText) {\n Alert alert = new Alert(ERROR, AlertText, OK);\n DialogPane dialogPane = alert.getDialogPane();\n dialogPane.getStylesheets().add(getClass().getResource(\"login.css\").toExternalForm());\n dialogPane.getStyleClass().add(\"myDialog\");\n alert.show();\n return alert;\n }", "@NonNull\n @Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n\n //setting the message and the title of dialog\n builder.setTitle(R.string.dialog_title)\n .setMessage(R.string.dialog_message)\n .setPositiveButton(android.R.string.yes, (dialog, which) -> {\n getActivity().finish();\n })\n .setOnCancelListener(dialog -> getActivity().finish());\n\n //creating and returning the dialog\n return builder.create();\n }", "public void createAlertDialog(String msg) {\n\t\tAlertDialog.Builder alertbox = new AlertDialog.Builder(\n\t\t\t\tMainActivity.this);\n\t\talertbox.setTitle(\"Response Message\");\n\t\talertbox.setMessage(msg);\n\t\talertbox.setPositiveButton(\"Ok\", new DialogInterface.OnClickListener() {\n\t\t\t// do something when the button is clicked\n\t\t\tpublic void onClick(DialogInterface arg0, int arg1) {\n\t\t\t}\n\t\t});\n\t\talertbox.show();\n\t}", "protected void alertBuilder(){\n SettingsDialogFragment settingsDialogFragment = new SettingsDialogFragment();\n settingsDialogFragment.show(getSupportFragmentManager(), \"Settings\");\n }" ]
[ "0.7214013", "0.715677", "0.7111684", "0.7066088", "0.7064668", "0.704397", "0.6995633", "0.6995633", "0.6980476", "0.6948025", "0.6937573", "0.69088876", "0.6900713", "0.68985975", "0.6886988", "0.6842692", "0.6835197", "0.68185097", "0.6810134", "0.67973685", "0.67885613", "0.6780425", "0.6758504", "0.6754333", "0.67469615", "0.67463714", "0.67272294", "0.6709811", "0.6700053", "0.6634855", "0.66338253", "0.66171837", "0.6595512", "0.6579389", "0.6564891", "0.6558515", "0.6547773", "0.6545851", "0.6525544", "0.6524235", "0.65209645", "0.651559", "0.65122914", "0.6489435", "0.6489425", "0.6487285", "0.64823043", "0.64805984", "0.6474088", "0.64740205", "0.6464998", "0.6463566", "0.64401025", "0.6438863", "0.64251196", "0.64162654", "0.6406188", "0.6402069", "0.639953", "0.6399526", "0.6393106", "0.6390061", "0.6389331", "0.63804585", "0.637864", "0.63712275", "0.6366684", "0.63597524", "0.6350248", "0.6334479", "0.63342", "0.63284045", "0.6327896", "0.63204145", "0.63190484", "0.6318307", "0.6318196", "0.63172776", "0.6314062", "0.62939346", "0.6287551", "0.6285396", "0.6279916", "0.62758815", "0.62702024", "0.62678427", "0.6267335", "0.6266225", "0.6260787", "0.62599355", "0.62583447", "0.6251329", "0.6241057", "0.6237224", "0.62358975", "0.6231979", "0.62319165", "0.62315106", "0.62292296", "0.62224305", "0.6192467" ]
0.0
-1
Makes an HTTP request to the web service to update the given model or save it if it does not exist in the database.
@Override public long saveOrUpdate(Object model) { OrmPreconditions.checkForOpenSession(mIsOpen); OrmPreconditions.checkPersistenceForModify(model, mPersistencePolicy); mLogger.debug("Sending PUT request to save or update entity"); String uri = mHost + mPersistencePolicy.getRestEndpoint(model.getClass()); Map<String, String> headers = new HashMap<String, String>(); RestfulModelMap modelMap = mMapper.mapModel(model); if (mRestContext.getMessageType() == MessageType.JSON) headers.put("Content-Type", "application/json"); else if (mRestContext.getMessageType() == MessageType.XML) headers.put("Content-Type", "application/xml"); RestResponse response = mRestClient.executePut(uri, modelMap.toHttpEntity(), headers); switch (response.getStatusCode()) { case HttpStatus.SC_CREATED: return 1; case HttpStatus.SC_OK: case HttpStatus.SC_NO_CONTENT: return 0; default: return -1; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean update(ModelObject obj);", "@Override\n public int update(Model model) throws ServiceException {\n try {\n \treturn getDao().updateByID(model);\n\t\t} catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t\tlogger.error(e.getMessage());\n\t\t\tthrow new ServiceException(ResultCode.DB_ERROR);\n\t\t}\n }", "public void update( final T model )\n\t{\n\t\tthis.dao.save( model );\n\t}", "@UpdateProvider(type = ServeInfoSqlProvider.class, method = \"updateById\")\n int update(ServeInfoDO model);", "public Base save(Base model) throws IOException {\n\t\tif (model.getID().equals(\"\")) {\n\t\t\treturn Core.create(model, getHttpMethodExecutor());\n\t\t} else {\n\t\t\treturn Core.update(model, getHttpMethodExecutor());\n\t\t}\n\n\t}", "public boolean saveOrUpdate(Data model);", "@Override\n\tpublic String update(Long id, Model m) throws Exception {\n\t\treturn null;\n\t}", "@Override\n\tpublic String update(Long id, Model m) throws Exception {\n\t\treturn null;\n\t}", "@Override\n\tpublic String update(Integer id, Model m) throws Exception {\n\t\treturn null;\n\t}", "@Override\n\tpublic String update(Integer id, Model m) throws Exception {\n\t\treturn null;\n\t}", "E update(ID id, E entity, RequestContext context);", "public void update(E model) {\n\t\tgetHibernateTemplate().update(model);\r\n\t}", "public static boolean update(Car newCar, CarModel model) {\n\n Map<String, String> carToUpdate = new HashMap<>();\n carToUpdate.put(\"idCar\", \"\"+newCar.getId());\n carToUpdate.put(\"brand\", newCar.getBrand());\n carToUpdate.put(\"year\", \"\" + newCar.getYear());\n carToUpdate.put(\"idUser\", \"\" + newCar.getId_user());\n carToUpdate.put(\"model\", model.getModel_name());\n RequestPutObject task = new RequestPutObject(carToUpdate);\n try {\n String response = task.execute(\"https://waiting-list-garage.herokuapp.com/car\").get();\n Log.d(\"response\",response);\n } catch (ExecutionException e) {\n e.printStackTrace();\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n return false;\n }", "public abstract Response update(Request request, Response response);", "@Override\n\tpublic int update(Object model) {\n\t\treturn 0;\n\t}", "public Future<CtxModelObject> update(CtxModelObject identifier);", "@RequestMapping(value=\"/employeeupdt\", method=RequestMethod.POST)\npublic String UpdateSave(EmployeeRegmodel erm)\n{\n\tEmployeeRegmodel erm1 = ergserv.findOne(erm.getEmployee_id());\n\t\n\term1.setEmployee_address(erm.getEmployee_address());\n\term1.setEmail(erm.getEmail());\n\term1.setEmployee_dob(erm.getEmployee_dob());\n\term1.setEmployee_phoneno(erm.getEmployee_phoneno());\n\term1.setEmployee_password(erm.getEmployee_password());\n\term1.setEmployee_fullname(erm.getEmployee_fullname());\n\term1.setEmployee_fname(erm.getEmployee_fname());\n\t\n\tergserv.updateEmployeeRegmodel(erm1);\n\treturn \"update.jsp\";\n}", "public abstract boolean update(T entity) throws ServiceException;", "void updateModelFromView();", "int updateByPrimaryKey(Model record);", "boolean update(T entity) throws Exception;", "public String update(String id, String datetime, String description, String request, String status);", "@Override\r\n\tpublic ResponseEntity<String> update(@Valid @RequestBody Pais updateMODEL, Integer id) {\n\t\treturn null;\r\n\t}", "@Override\n public void Update(Model model) {\n\n }", "T update(T entity);", "T update(T entity);", "@Override\r\n\tpublic StockResponseModel stockUpdated(StockRequestModel stockRequestModel) {\n\t\tStockResponseModel response = new StockResponseModel();\r\n\t\tboolean isStockID = CommonUtills.idExistOrNot(stockRequestModel);\r\n\t\tif(isStockID)\r\n\t\t{\r\n\t\t\t\tStockEntities stockEntity = new StockEntities();\r\n\t\t\t\tstockEntity = CommonUtills.mapConvert(stockRequestModel, stockEntity);\r\n\t\t\t\t\r\n\t\t\t\tstockRepository.save(stockEntity);\r\n\t\t\t\tresponse.setResponseCode(HttpStatus.ACCEPTED.toString());\r\n\t\t\t\tresponse.setResponseMsg(HttpStatus.ACCEPTED.getReasonPhrase());\r\n\t\t\t\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tresponse.setResponseCode(HttpStatus.NOT_FOUND.toString());\r\n\t\t\tresponse.setResponseMsg(HttpStatus.NOT_FOUND.getReasonPhrase());\r\n\t\t}\r\n\t\treturn response;\t\r\n\t\r\n\t}", "public boolean update(Object obj) throws Exception;", "E update(E entity) throws ValidationException;", "@Override\n public final void doPut() {\n try {\n checkPermissions(getRequest());\n if (id == null) {\n throw new APIMissingIdException(getRequestURL());\n }\n\n final String inputStream = getInputStream();\n if (inputStream.length() == 0) {\n api.runUpdate(id, new HashMap<String, String>());\n return;\n }\n\n Item.setApplyValidatorMandatoryByDefault(false);\n final IItem item = getJSonStreamAsItem();\n api.runUpdate(id, getAttributesWithDeploysAsJsonString(item));\n } catch (final APIException e) {\n e.setApi(apiName);\n e.setResource(resourceName);\n throw e;\n\n }\n }", "private void updateObject(Object object) {\n Connection connection = ConnectionPoll.getConnection();\n CRUDService crudService = new CRUDService(connection, object.getClass());\n\n try {\n crudService.update((SimpleORMInterface) object);\n } catch (IllegalAccessException e) {\n e.printStackTrace();\n }\n\n ConnectionPoll.releaseConnection(connection);\n\n try {\n connection.close();\n } catch (SQLException throwables) {\n throwables.printStackTrace();\n }\n }", "public boolean save(Data model);", "private void update() {\n ambianceModel.ambiance.uniq_id = ambianceModel._id.$oid;\n\n RestAdapter restAdapter = new RestAdapter.Builder().setLogLevel(RestAdapter.LogLevel.FULL).setEndpoint(getResources().getString(R.string.api)).build();\n final GsonBuilder builder = new GsonBuilder();\n builder.excludeFieldsWithoutExposeAnnotation();\n builder.disableHtmlEscaping();\n final Gson gson = builder.create();\n Request r = new Request(Singleton.token, ambianceModel._id.$oid, ambianceModel);\n String json = gson.toJson(r);\n Log.v(\"Ambiance activity\", json);\n\n final Lumhueapi lumhueapi = restAdapter.create(Lumhueapi.class);\n lumhueapi.updateAmbiance(r, new Callback<AmbianceApplyResponse>() {\n @Override\n public void success(AmbianceApplyResponse ambianceApplyResponse, Response response) {\n Log.v(\"Ambiance activity\", \"It worked\");\n }\n\n @Override\n public void failure(RetrofitError error) {\n String tv = error.getMessage();\n Log.v(\"Ambiance activity\", tv + \"\");\n }\n });\n }", "@Override\n public JSONObject fullUpdateHwWalletObject(String urlSegment, String id, String body) {\n HttpHeaders header = constructHttpHeaders();\n // Construct the http URL.\n String baseUrl = ConfigUtil.instants().getValue(\"walletServerBaseUrl\");\n String walletServerUrl = baseUrl + urlSegment + id;\n\n // Send the http request and get response.\n HttpEntity<JSONObject> entity = new HttpEntity<>(JSONObject.parseObject(body), header);\n ResponseEntity<JSONObject> response =\n REST_TEMPLATE.exchange(walletServerUrl, HttpMethod.PUT, entity, JSONObject.class);\n\n // Return the updated model or instance.\n return response.getBody();\n }", "public JsonNode update(String resourcePath, String model, Map<String, String> parameters, JsonNode modifiedRecord) {\n\t\tNitrite db = nitriteDbConnection.getConnection(resourcePath, model);\n\t\tNitriteCollection collection = db.getCollection(model);\n\t\tDocument doc = getDocument(modifiedRecord);\n\t\tFilter filter = getAndFilter(parameters);\n\t\tif (filter == null) {\n\t\t\tcollection.insert(doc);\n\t\t} else {\n\t\t\tcollection.update(filter, doc);\n\t\t}\n\t\treturn getJsonNode(doc);\n\t}", "void update(T entity) throws Exception;", "E update(E entity);", "E update(E entity);", "@PutMapping(\"/products\") \nprivate Products update(@RequestBody Products products) \n{ \nproductsService.saveOrUpdate(products); \nreturn products; \n}", "int updTravelById(Travel record) throws TravelNotFoundException;", "void update(T obj) throws PersistException;", "public void updateEntity();", "boolean updateById(T entity);", "public <T> T update(T entity);", "void updateViewFromModel();", "E update(E entiry);", "public User update(User user)throws Exception;", "@RequestMapping(method = RequestMethod.POST)\r\n\t@ResponseBody\r\n\t@Transactional\r\n\tpublic Object create(@RequestBody Model model) {\r\n\t\ttry {\r\n\t\t\tgetService().create(model);\r\n\t\t\treturn true;\r\n\t\t} catch (Exception e) {\r\n\t\t\tlogger.error(\"Create exception for \" + model, e);\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "public void update() throws ModelException {\n\t\tConnection conn = null;\n\t\ttry {\n\t\t\tconn = DataSource.getConnection();\n\t\t\tPreparedStatement pstmt = conn.prepareStatement(\n \" UPDATE carrera nombre = ? WHERE codigo = ?\");\n\t\t\tpstmt.setString(2, this.nombre);\n\t\t\tpstmt.executeUpdate();\n\t\t} catch (SQLException e) {\n\t\t\tthrow new ModelException(\"Error de acceso a datos\", e);\n\t\t} finally {\n \t\t\tDataSource.closeConnection(conn);\n\t\t}\n\t}", "public int updateRequestData(Request input) throws SQLException{\n String sqlquery = \"UPDATE Request SET Requester=?, ModelName=?, Worker=?,Ps=?, Status=?, ExecutionTime=?,Accuracy=?, DownloadUrl=? WHERE id=?\";\n PreparedStatement statement = this.connection.prepareStatement(sqlquery);\n this.setCreateAndUpdateStatement(statement,input);\n statement.setInt(9,input.getId());\n return statement.executeUpdate();\n }", "@Override\n public JSONObject partialUpdateHwWalletObject(String urlSegment, String id, String body) {\n HttpHeaders header = constructHttpHeaders();\n // Construct the http URL.\n String baseUrl = ConfigUtil.instants().getValue(\"walletServerBaseUrl\");\n String walletServerUrl = baseUrl + urlSegment + id;\n\n // Send the http request and get response.\n HttpEntity<JSONObject> entity = new HttpEntity<>(JSONObject.parseObject(body), header);\n ResponseEntity<JSONObject> response =\n REST_TEMPLATE.exchange(walletServerUrl, HttpMethod.PATCH, entity, JSONObject.class);\n\n // Return the updated model or instance.\n return response.getBody();\n }", "@Override\n\tpublic void saveORUpdate(T obj) throws Exception {\n\t\t\n\t}", "Weather update(Long id, WeatherInformation weatherInformation);", "int updateByPrimaryKey(TbComEqpModel record);", "public int updateOrderRequest(OrderEntity orderEntity);", "@Override\r\n\tpublic void update(Interest model, InterestEntity entity) {\n\r\n\t}", "public ModelResponse execute(ModelRequest req, ModelResponse res) throws ModelException;", "public static int setModel(String modelName) {\n\t\tString path = SET_MODEL + modelName;\n\t\tHttpResponse<String> response = sendRequest(path);\n\t\tif(response == null) return 400;\n\t\treturn response.statusCode();\n\t}", "@Test\n public void updateWorkflow_200() throws Exception {\n\n // PREPARE THE DATABASE\n // Fill in the workflow db\n addMOToDb(1);\n Integer id = addMOToDb(2).getId();\n addMOToDb(3);\n\n // PREPARE THE TEST\n Workflow mo = new Workflow();\n mo.setName(\"New My_Workflow\");\n mo.setDescription(\"New Description of my new workflow\");\n mo.setRaw(\"New Workflow new content\");\n\n // DO THE TEST\n Response response = callAPI(VERB.PUT, \"/mo/\" + id.toString(), mo);\n\n // CHECK RESULTS\n int status = response.getStatus();\n assertEquals(200, status);\n\n String body = response.readEntity(String.class);\n assertEquals(\"\", body);\n }", "int updateByPrimaryKey(AccessModelEntity record);", "@Test\n public void testUpdateExample() throws Exception{\n MvcResult result = this.mockMvc.perform(get(\"/api/example/{id}\",50))\n .andExpect(status().is2xxSuccessful())\n .andReturn();\n\n // Parses it\n Example example = convertFromJson(result.getResponse().getContentAsString(), Example.class);\n \n // Change name value\n example.setName(\"Test 27\");\n\n // Updates it and checks if it was updated\n this.mockMvc.perform(put(\"/api/example\")\n .contentType(MediaType.APPLICATION_JSON)\n .content(convertToJson(example)))\n .andDo(print())\n .andExpect(status().isOk())\n .andExpect(jsonPath(\"$.name\", equalTo(\"Test 27\")));\n }", "public Customer updateCustomer(@RequestBody Customer theCustomer)\n {\n customerService.save(theCustomer);\n return theCustomer;\n }", "@GetMapping(\"/update/{id}\")\n public String showSocioToUpdate(@PathVariable Integer id, Model model) {\n List<Cargo> cargos = cargoService.getCargos();\n Persona persona = personaService.getById(id);\n model.addAttribute(\"cargos\", cargos);\n model.addAttribute(\"persona\", persona);\n return \"/backoffice/socioFormEdit\";\n }", "@Override\n public void update(EntityModel model) {\n super.update(model);\n\n }", "protected void processRequest(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n LOG.debug(\"Received new update request\");\n \n String modelerName = request.getParameter(\"name\");\n String originalModelerName = request.getParameter(\"originalName\");\n String modelId = request.getParameter(\"modelId\");\n String modelType = request.getParameter(\"modeltype\");\n // Currently not being used since we don't update the modelVersion \n // String modelVersion = request.getParameter(\"version\");\n String originalModelVersion = request.getParameter(\"originalModelVersion\");\n String runIdent = request.getParameter(\"runIdent\");\n String originalRunIdent = request.getParameter(\"originalRunIdent\");\n String runDate = request.getParameter(\"creationDate\");\n String originalRunDate = request.getParameter(\"originalCreationDate\");\n String scenario = request.getParameter(\"scenario\");\n String originalScenario = request.getParameter(\"originalScenario\");\n String comments = request.getParameter(\"comments\");\n String originalComments = request.getParameter(\"originalComments\");\n String email = request.getParameter(\"email\");\n String wfsUrl = request.getParameter(\"wfsUrl\");\n String layer = request.getParameter(\"layer\");\n String commonAttr = request.getParameter(\"commonAttr\");\n Boolean updateAsBest = \"on\".equalsIgnoreCase(request.getParameter(\"markAsBest\")) ? Boolean.TRUE : Boolean.FALSE;\n Boolean rerun = Boolean.parseBoolean(request.getParameter(\"rerun\")); // If this is true, we only re-run the R processing \n \n String responseText;\n RunMetadata newRunMetadata;\n \n ModelType modelTypeEnum = null;\n if (\"prms\".equals(modelType.toLowerCase())) {\n modelTypeEnum = ModelType.PRMS;\n }\n if (\"afinch\".equals(modelType.toLowerCase())) {\n modelTypeEnum = ModelType.AFINCH;\n }\n if (\"waters\".equals(modelType.toLowerCase())) {\n modelTypeEnum = ModelType.WATERS;\n }\n if (\"sye\".equals(modelType.toLowerCase())) {\n modelTypeEnum = ModelType.SYE;\n }\n \n RunMetadata originalRunMetadata = new RunMetadata(\n modelTypeEnum,\n modelId,\n originalModelerName,\n originalModelVersion,\n originalRunIdent,\n originalRunDate,\n originalScenario,\n originalComments,\n email,\n wfsUrl,\n layer,\n commonAttr,\n updateAsBest);\n \n if (rerun) {\n String sosEndpoint = props.getProperty(\"watersmart.sos.model.repo\") + originalRunMetadata.getTypeString() + \"/\" + originalRunMetadata.getFileName();\n WPSImpl impl = new WPSImpl();\n String implResponse = impl.executeProcess(sosEndpoint, originalRunMetadata);\n Boolean processStarted = implResponse.toLowerCase().equals(\"ok\");\n responseText = \"{success: \"+processStarted.toString()+\", message: '\" + implResponse + \"'}\";\n } else {\n newRunMetadata = new RunMetadata(\n modelTypeEnum,\n modelId,\n modelerName,\n originalModelVersion,\n runIdent,\n runDate,\n scenario,\n comments,\n email,\n wfsUrl,\n layer,\n commonAttr,\n updateAsBest);\n \n CSWTransactionHelper helper = new CSWTransactionHelper(newRunMetadata, null, new HashMap<String, String>());\n try {\n String results = helper.updateRunMetadata(originalRunMetadata);\n // TODO- parse xml, make sure stuff happened alright, if so don't say success\n responseText = \"{success: true, msg: 'The record has been updated'}\";\n } catch (IOException ex) {\n responseText = \"{success: false, msg: '\" + ex.getMessage() + \"'}\";\n } catch (URISyntaxException ex) {\n responseText = \"{success: false, msg: '\" + ex.getMessage() + \"'}\";\n }\n \n }\n \n response.setContentType(\"application/json\");\n response.setCharacterEncoding(\"utf-8\");\n \n try {\n Writer writer = response.getWriter();\n writer.write(responseText);\n writer.close();\n } catch (IOException ex) {\n LOG.warn(\"An error occurred while trying to send response to client. \", ex);\n }\n \n }", "public abstract void update(@Nonnull Response response);", "@WorkerThread\n public abstract void saveToDb(NetworkModel fetchedModel);", "private static void LessonDAOUpdate() {\n PersonDAO personDAO = new PersonDAOImpl();\n\n Person person = personDAO.getPersonById(7);\n person.setFirstName(\"Teddy\");\n\n if(personDAO.updatePerson(person)) {\n System.out.println(\"Person Update Success!\");\n } else {\n System.out.println(\"Person Update Fail!\");\n }\n }", "@Test\n public void updateById() {\n User user = new User();\n user.setId(1259474874313797634L);\n user.setAge(30);\n boolean ifUpdate = user.updateById();\n System.out.println(ifUpdate);\n }", "@RequestMapping(value=\"/update\", method = RequestMethod.PUT)\r\n\t @ResponseBody\r\n//\t public String updateUser(Long id, String userName, String phone, String email, String password, Date dateOfBirth, String userNotes) {\r\n\t public UserDto update(UserDto userDto) \r\n\t {\r\n\t\t return service.update(userDto);\r\n\t }", "public String doUpdate(HttpServletRequest request,\n HttpServletResponse response) {\n return null;\n }", "int updateByPrimaryKey(ResourcePojo record);", "@Test\n void updateSuccess () {\n TestEntity testEntity = buildEntity();\n Api2 instance = new Api2();\n Long result = instance.save(testEntity);\n\n String name = \"Edited name\";\n boolean check = false;\n String description = \"edited description\";\n\n if (result != null) {\n testEntity.setName(name);\n testEntity.setCheck(check);\n testEntity.setDescription(description);\n instance.update(testEntity);\n\n Optional<TestEntity> optionalTestEntity = instance.getById(TestEntity.class, testEntity.getId());\n assertTrue(optionalTestEntity.isPresent());\n\n if (optionalTestEntity.isPresent()) {\n TestEntity entity = optionalTestEntity.get();\n\n assertEquals(entity.getName(), name);\n assertEquals(entity.getDescription(), description);\n assertEquals(entity.isCheck(), check);\n } else {\n fail();\n }\n } else {\n fail();\n }\n }", "@ResponseStatus(code=HttpStatus.OK)\r\n\t@RequestMapping(value=\"/update\", method=RequestMethod.GET)\r\n\tpublic void update() {\r\n\t\tSystem.out.println(\"StudentRestController.Update()_________\");\r\n\t}", "int updateByPrimaryKey(Body record);", "@Override\n public Vehicle updateVehicleDetails(Vehicle model, Integer id){\n VehicleDetails domain = throwIfNotFound(repo.findById(id));\n domain = validateAndPatchRequest(domain, model);\n domain = repo.saveAndFlush(domain);\n return mapper.map(domain, Vehicle.class);\n }", "public void saveStudent(sust.paperlessexm.entity.Student model) throws GenericBusinessException {\n // We have to create an object:\n sust.paperlessexm.hibernatehelper.HibernateQueryHelper hibernateTemplate = new sust.paperlessexm.hibernatehelper.HibernateQueryHelper();\n try {\n // Now update the data.\n hibernateTemplate.update(model);\n } finally {\n log.debug(\"finished saveStudent(sust.paperlessexm.entity.Student model)\");\n }\n }", "int updateByPrimaryKey(TycCompanyCheckCrawler record);", "public ServiceRequest updateServiceRequest(ServiceRequest sr)\r\n {\r\n\t Session session = sessionFactory.getCurrentSession();\r\n\t session.update(sr);\r\n\t return sr;\r\n\t}", "@Override\n protected Response doUpdate(Long id, JSONObject data) {\n return null;\n }", "public User updateUser(User user);", "public int saveOrUpdate(o dto);", "@Override\n\tprotected void doRequest(HttpServletRequest request,\n\t\t\tHttpServletResponse response) throws ServletException, IOException {\n\t\tBookDao bookdao = new BookDao();\n\t\tString id = request.getParameter(\"id\");\n\t\tbookdao.update(Integer.parseInt(id));\n\t\trequest.getRequestDispatcher(\"/QueryBookInfoServlet\").forward(request,\n\t\t\t\tresponse);\n\t}", "<T> void update(T persistentObject);", "public void update(Triplet t) throws DAOException;", "@Override\r\n\tprotected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t\tString action = request.getParameter(\"action\");\r\n\t\t\r\n\t\tif(action.equals(\"Save\")){\r\n\t\t\tmodel.setAddress(request.getParameter(\"address\"));\r\n\t model.setPort( Integer.parseInt(request.getParameter(\"port\")));\r\n\t model.setAddressIp(request.getParameter(\"addressIp\"));\r\n\t save();\r\n\t\t}\r\n\t\trequest.setAttribute(\"model\", model);\r\n\t\trequest.getRequestDispatcher(\"param.jsp\").forward(request, response);\r\n\t}", "int updWayBillById(WayBill record) throws WayBillNotFoundException;", "@Override\n public void update(BookUpdateViewModel viewModel) {\n Book bookDb = repository.findById(viewModel.getId())\n .orElseThrow(RecordNotFoundException::new);\n\n\n // check the validity of the fields\n if (viewModel.getTitle().strip().length() < 5) {\n throw new DomainValidationException();\n }\n\n // apply the update\n BeanUtils.copyProperties(viewModel, bookDb);\n\n // save and flush\n repository.saveAndFlush(bookDb);\n }", "@ApiMethod(name = \"updateRequest\")\n public Request updateRequest(Request request)throws NotFoundException {\n if (findRecord(request.getDeviceId()) == null) {\n throw new NotFoundException(\"Request Record does not exist\");\n }\n ofy().save().entity(request).now();\n return request;\n }", "@BodyParser.Of(play.mvc.BodyParser.Json.class)\n public static Result update(Long id) throws JsonParseException, JsonMappingException, IOException {\n JsonNode json = request().body().asJson();\n Thing thing = mapper.treeToValue(json, Thing.class);\n thing.cachedJson = json.toString();\n Logger.debug(\"Content: \" + thing.content);\n Logger.debug(\"Content: \" + thing.content);\n thing.update();\n return ok();\n }", "int updateUserById( User user);", "@RequestMapping(path = \"/update\", method = RequestMethod.POST)\n\tpublic ResponseEntity<RestResponse<CompanyDTO>> update(@RequestBody CompanyDTO request) {\n\n\t\tCompanyDTO result = companyService.update(request);\n\t\t\n\t\tRestResponse<CompanyDTO> restResponse = \n\t\t\t\tnew RestResponse<CompanyDTO>(RestResponseCodes.OK.getCode(), RestResponseCodes.OK.getDescription(), result);\n\t\t\n\t\treturn new ResponseEntity<RestResponse<CompanyDTO>>(restResponse, HttpStatus.OK);\n\t\t\t\n\t}", "public Address update(Address entity);", "E update(IApplicationUser user, ID id, U updateDto);", "@PostMapping(\"/person\")\r\n@ApiOperation( value = \"Save/Update Person\", notes = \"Save/Update the person detail in the database\", response = Person.class)\r\nprivate int savePerson(@RequestBody Person person)\r\n{\r\n personService.saveOrUpdate(person);\r\n return person.getId();\r\n}", "@PUT\n @Produces({ \"application/json\" })\n @Path(\"{id}\")\n @CommitAfter\n public abstract Response update(Person person);", "int updateByPrimaryKeySelective(TbComEqpModel record);", "public interface BasicModel {\n static final String host = \"http://2flf3l7wp7.hardtobelieve.me/\";\n boolean checkConnection();\n void getByID(String ID);\n\n void add();\n boolean validObject();\n\n static JSONArray getAll(String folder) {\n String endpoint = folder + \"/getall.php\";\n try {\n HashMap<String, Object> result = APIClient.get(host + endpoint, new HashMap<>());\n if ( result.get(\"status_code\").equals(\"Success\") ) {\n return (JSONArray) result.get(\"result\");\n }\n else return new JSONArray();\n } catch (Exception e) {\n e.printStackTrace();\n }\n return new JSONArray();\n }\n\n static JSONArray getUnique(String folder, HashMap<String, String> dict) {\n String endpoint = folder + \"/get.php\";\n try {\n HashMap<String, Object> result = APIClient.get(host + endpoint, dict);\n if ( result.get(\"status_code\").equals(\"Success\") ) {\n return (JSONArray) result.get(\"result\");\n\n }\n else return new JSONArray();\n } catch (Exception e) {\n e.printStackTrace();\n }\n return new JSONArray();\n }\n\n static boolean deleteUnique(String folder, HashMap<String, String> dict) {\n String endpoint = folder + \"/delete.php\";\n try {\n HashMap<String, Object> result = APIClient.get(host + endpoint, dict);\n return result.get(\"status_code\").equals(\"Success\");\n } catch (Exception e) {\n e.printStackTrace();\n }\n return false;\n }\n\n static boolean updateUnique(String folder, HashMap<String, String> dict) {\n String endpoint = folder + \"/update.php\";\n try {\n HashMap<String, Object> result = APIClient.post(host + endpoint, dict);\n return result.get(\"status_code\").equals(\"Success\");\n } catch (Exception e) {\n e.printStackTrace();\n }\n return false;\n }\n}", "public @ResponseBody Contract updateContract(@RequestBody Contract Contract);", "public void executeUpdate(String request) {\n try {\r\n st.executeUpdate(request);\r\n } catch (SQLException ex) {\r\n Logger.getLogger(Database.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }" ]
[ "0.71019894", "0.6671019", "0.6463319", "0.644475", "0.6329234", "0.63078016", "0.6219448", "0.6219448", "0.61766744", "0.61766744", "0.6109925", "0.6067224", "0.5895542", "0.58668953", "0.5852896", "0.58517474", "0.5844449", "0.5821127", "0.58056897", "0.5800574", "0.5777123", "0.57716995", "0.57561404", "0.5753537", "0.5737762", "0.5737762", "0.5727941", "0.57237536", "0.56959236", "0.56927073", "0.5688193", "0.56750625", "0.5649403", "0.5619916", "0.56160384", "0.56073934", "0.55991524", "0.55991524", "0.5594612", "0.55745006", "0.5563258", "0.55553895", "0.5541523", "0.55406284", "0.55099255", "0.5496912", "0.5494921", "0.5489237", "0.54682964", "0.5443522", "0.54349256", "0.54116654", "0.54114205", "0.5402791", "0.5385927", "0.5384772", "0.538466", "0.53655064", "0.53629327", "0.5357552", "0.53528357", "0.5352418", "0.535157", "0.5349412", "0.5347426", "0.5344404", "0.5337794", "0.5334633", "0.532479", "0.53140295", "0.5309223", "0.5307675", "0.5307372", "0.5302864", "0.53009933", "0.53009117", "0.529643", "0.5296035", "0.52957284", "0.52853227", "0.52826357", "0.5281688", "0.5273142", "0.5270768", "0.5267568", "0.52663344", "0.525797", "0.5253213", "0.52521205", "0.524696", "0.52379376", "0.52371556", "0.5231892", "0.522698", "0.52266407", "0.5225546", "0.522238", "0.5220652", "0.5219138", "0.5217589" ]
0.6928236
1
TODO Autogenerated method stub
@Override public boolean accept(File dir, String name) { return(name.endsWith(".mp3")); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "private stendhal() {\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.66708666", "0.65675074", "0.65229905", "0.6481001", "0.64770633", "0.64584893", "0.6413091", "0.63764185", "0.6275735", "0.62541914", "0.6236919", "0.6223816", "0.62017626", "0.61944294", "0.61944294", "0.61920846", "0.61867654", "0.6173323", "0.61328775", "0.61276996", "0.6080555", "0.6076938", "0.6041293", "0.6024541", "0.6019185", "0.5998426", "0.5967487", "0.5967487", "0.5964935", "0.59489644", "0.59404725", "0.5922823", "0.5908894", "0.5903041", "0.5893847", "0.5885641", "0.5883141", "0.586924", "0.5856793", "0.58503157", "0.58464456", "0.5823378", "0.5809384", "0.58089525", "0.58065355", "0.58065355", "0.5800514", "0.57912874", "0.57912874", "0.57912874", "0.57912874", "0.57912874", "0.57912874", "0.57896614", "0.5789486", "0.5786597", "0.5783299", "0.5783299", "0.5773351", "0.5773351", "0.5773351", "0.5773351", "0.5773351", "0.5760369", "0.5758614", "0.5758614", "0.574912", "0.574912", "0.574912", "0.57482654", "0.5732775", "0.5732775", "0.5732775", "0.57207066", "0.57149917", "0.5714821", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57115865", "0.57045746", "0.5699", "0.5696016", "0.5687285", "0.5677473", "0.5673346", "0.56716853", "0.56688815", "0.5661065", "0.5657898", "0.5654782", "0.5654782", "0.5654782", "0.5654563", "0.56536144", "0.5652585", "0.5649566" ]
0.0
-1
TODO Autogenerated method stub
public void onListItemClick(ListView l, View v, int position, long id) { super.onListItemClick(l, v, position, id); index = position; sour = paths.get(position); finish(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
TODO Autogenerated method stub Toast.makeText(this, p[index], 1000).show();
@Override public void finish() { Intent I = new Intent(); I.putExtra("songs_path", sour); I.putExtra("songs_index", index); I.putExtra("path_detail", p); I.putExtra("name_song", name_song); I.putExtra("length", ind); //Toast.makeText(this, sour, 1000).show(); setResult(RESULT_OK,I); super.finish(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void onClick(View v) {\n \tSystem.out.println(\"ss1ss\");\n //Toast.makeText(ListViewActivity.this, title[mPosition], Toast.LENGTH_SHORT).show();\n }", "@Override\n public void onItemClick(AdapterView<?> arg0, View arg1,\n int position, long arg3) {\n Toast.makeText(getApplicationContext(), strs[location][position], Toast.LENGTH_SHORT).show();\n }", "@Override\n public void onItemClick(AdapterView<?> arg0, View arg1,\n int position, long arg3) {\n Toast.makeText(getApplicationContext(), strs[location][position], Toast.LENGTH_SHORT).show();\n }", "@Override\n public void onClick(View v) {\n Toast.makeText(context, \"You Clicked \" + result[position], Toast.LENGTH_SHORT).show();\n }", "@Override\n public void onClick(View v) {\n Toast.makeText(context, \"You Clicked \" + titles.get(position), Toast.LENGTH_SHORT).show();\n }", "@Override\n public void onClick(View v) {\n Toast.makeText(ct,\" Blood Group \"+bloodgroup[position], Toast.LENGTH_LONG).show();\n }", "@Override\r\n public void onClick(View view) {\r\n Toast.makeText(context, \"satu\" +list_data.get(getAdapterPosition()), Toast.LENGTH_SHORT).show();\r\n\r\n }", "public void showMessage(int i) {\n ToastHelper.showLongToast(getContext().getString(i));\n }", "@Override\n public void onClick(View v) {\n Toast.makeText(mContext, \"You Clicked \" + position, Toast.LENGTH_LONG).show();\n }", "@Override\r\n\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\tToast.makeText(x.app(), Constant.ADDRESS_LIST[index], Toast.LENGTH_SHORT).show();\r\n\t\t\t\t\t}", "@Override\n\tpublic void onItemClick(AdapterView<?> parent, View view, int position,\n\t\t\tlong id) {\n\t\tString text=listview.getItemAtPosition(position)+\"\";\n\t\tToast tipsToast=Toast.makeText(this, \"position+\"+position+\"text=\"+text, Toast.LENGTH_SHORT);\n\t\ttipsToast.show();\n\t}", "public void ShowPosInfo(int index){\n\n //\tJT_rollno.setText(BindList().get(index).getRollno());\n JT_name.setText(BindList().get(index).getName());\n JT_category.setText(BindList().get(index).getCategory());\n JT_year.setText(BindList().get(index).getYear());\n JT_sponsor.setText(BindList().get(index).getSponsor());\n //JT_mob.setText(BindList().get(index).getMob());\n //JT_emailid.setText(BindList().get(index).getEmailid());\n }", "@Override\n\tpublic void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n\t\tString text = listview.getItemAtPosition(position)+\"\";\n\t\t\n\t\tToast.makeText(context, \"position=\"+position+\" text=\"+text, Toast.LENGTH_SHORT).show();\n\t}", "@Override\n\t\t\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int arg2,\n\t\t\t\t\tlong arg3) {\n\t\t\t\tToast.makeText(getApplicationContext(), \"Selected Text Is...\"+names[arg2]+\":\"+phones[arg2], 5000).show();\n\t\t\t}", "@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n Toast.makeText(Cardio.this,cardios.get(position).getTitle(), Toast.LENGTH_SHORT).show();\n }", "@Override\n public void onButtonClick(int nButtonIndex) {\n Toast.makeText(this, \"onButtonClick:\" + nButtonIndex, Toast.LENGTH_SHORT).show();\n }", "@Override\n\t\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int arg2,\n\t\t\t\tlong arg3) {\n\t\t\t\t\n\t\t\tToast.makeText(getBaseContext(), list.get(arg2),\n\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t}", "@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n\n Log.i(\"Tag\", myfamily.get(position));\n\n Toast.makeText(MainActivity.this, \"Hello \"+myfamily.get(position), Toast.LENGTH_SHORT).show();\n }", "@Override\n public void onItemClick(AdapterView<?> parent, View view,\n int position, long id) {\n String SlectedCountry = countryNameThree[+position];\n Toast.makeText(getApplicationContext(), SlectedCountry, Toast.LENGTH_SHORT).show();\n\n }", "@Override\n\t\t \t public void onItemClick(AdapterView<?> arg0, View arg1,int position, long arg3) {\n\t\t \t \n\t\t \t Toast.makeText(getApplicationContext(), \"Clicked at Position\"+position, Toast.LENGTH_SHORT).show();\n\t\t \t }", "@Override\n public void onClick(View v) {\n\n String s = v.getTag().toString();\n int duration = Toast.LENGTH_SHORT;\n Toast toast = Toast.makeText(context, s, duration);\n toast.show();\n }", "@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n System.out.println(\"JE SUIS VRAIMENT A L'ECOLE JUSQU'A PRESENT, MOI MEME JE NE COMPRENDS PAS\");\n //for (Risque r: mRisqueArrayList)\n //{\n if (position == 0)\n {\n Toast.makeText(SignalActivity.this, mRisqueArrayList.get(position).getCaracterisation(), Toast.LENGTH_SHORT).show();\n }\n //}\n }", "@Override\n\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int position, long arg3) {\n\t\tToast.makeText(this, \"Selected=\"+data[position], Toast.LENGTH_SHORT).show();\n\t}", "@Override\n public void onClick(View v) {\n lastSelectedSpotIndex=position;\n Toast.makeText(context, \"You Clicked \"+categoryNames[position], Toast.LENGTH_LONG).show();\n }", "@Override\n public void onItemClick(AdapterView<?> parent, View view,\n int position, long id) {\n String SlectedCountry = countryName[+position];\n Toast.makeText(getApplicationContext(), SlectedCountry, Toast.LENGTH_SHORT).show();\n\n }", "public void onEventSelected(int position) {\n Toast toast=Toast.makeText(getApplicationContext(),\"Hello Javatpoint\",Toast.LENGTH_SHORT);\n toast.setMargin(50,50);\n toast.show();\n }", "@Override\n public void onItemClick(AdapterView<?> parent, View view,\n int position, long id) {\n String SlectedCountry = countryNameTwo[+position];\n Toast.makeText(getApplicationContext(), SlectedCountry, Toast.LENGTH_SHORT).show();\n\n }", "public void ToastPopper(String t){\n Context context = getApplicationContext();\n CharSequence text = t;\n int duration = Toast.LENGTH_LONG;\n\n Toast toast = Toast.makeText(context, text, duration);\n toast.show();\n try {\n Thread.sleep(3000);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }", "@Override\n public void onItemClick(AdapterView<?> av, View v, int pos,\n long id)\n {\n Toast.makeText(getActivity(), data.get(pos).get(\"Player\"), Toast.LENGTH_SHORT).show();\n }", "@Override\n public void onClick(View v) {\n Toast.makeText(RecycleTestActivity.this, pos + \"\", Toast.LENGTH_SHORT)\n .show();\n }", "@Override\n public void onItemClick(AdapterView<?> adapterView, View view, int position, long l) {\n Toast.makeText(getActivity(), \"You Clicked \"+position+\" item. Wait For Coming Functions\",\n Toast.LENGTH_LONG).show();\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tToast.makeText(context, \"You Clicked \"+imageId[position], Toast.LENGTH_LONG).show();\n\t\t\t}", "@Override\n public void onItemClick(AdapterView<?> av, View v, int pos,\n long id) {\n\n Toast.makeText(getActivity(), data.get(pos).get(\"Player\"), Toast.LENGTH_SHORT).show();\n\n }", "@Override\n\t\t\tpublic void onItemClick(AdapterView<?> parent, View view,\n\t\t\t\t\tint position, long id) {\n\t\t\t\tToast.makeText(getActivity(), listAdapter.getItem(position), Toast.LENGTH_LONG).show();\n\t\t\t}", "@Override\n public void onItemClick(AdapterView<?> a, View v, int position, long id) {\n Toast.makeText(getApplicationContext(), \"Selected :\" + \" \" + listData.get(position), Toast.LENGTH_LONG).show();\n }", "public void showTopic (int index) {\n\n\t //Toast.makeText(getActivity (), \" tesssst\" + index, Toast.LENGTH_SHORT).show();\n\t /* Intent intent = new Intent(getActivity().getApplicationContext(), GridImageActivity.class);\n\t intent.putExtra (\"index\", index);\n\t startActivity (intent);*/\n\t}", "private static void debug(Context context, String p){\n\t\tToast.makeText(context, p, Toast.LENGTH_SHORT).show();\n\t}", "@Override\n public void onItemClicked(RecyclerView recyclerView, int position, View v) {\n Toast.makeText(getApplicationContext(), znamkyItemList.get(position).popis, Toast.LENGTH_LONG).show();\n\n }", "@Override\n public void onClick(DialogInterface dialog, int which, boolean isChecked) {\n if (isChecked) {\n Toast.makeText(MainActivity.this, item[which], Toast.LENGTH_SHORT).show();\n }\n }", "@Override\r\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tToast.makeText(getApplication(), \"right\", 1).show();\r\n\t\t\t}", "@Override\n public void toastSemEnderecos() {\n Toast.makeText(MainActivity.this, R.string.semEndereco, Toast.LENGTH_SHORT).show();\n }", "@Override\n\t\t\tpublic void onItemSelected(AdapterView<?> arg0, View arg1,\n\t\t\t\t\tint arg2, long arg3) {\n\t\t\t\tToast.makeText(getApplicationContext(), \"Selected Text Is...\"+names[arg2]+\":\"+phones[arg2], 5000).show();\n\t\t\t}", "@Override\n public void playNote(int index){\n for (int a = 0; a <3; a++){\n pStrings[index][a].pluck();\n }\n }", "void toast(CharSequence sequence);", "@Override\n public void onClick(View v) {\n text_to_speech = set_voice(text_to_speech);\n int len = ar.length;\n for (int i = 0; i < len; i++){\n speak(text_to_speech,ar[i]);\n }\n }", "@Override\n public void toastText(String s){\n Toast.makeText(getApplicationContext(), s, Toast.LENGTH_SHORT).show();\n }", "@Override\n public void onClick(View v) {\n switch (result[position]){\n case \"Java\": years = 8;\n break;\n case \"Python\": years = 6;\n break;\n case \"C\": years = 6;\n break;\n case \"Embedded\": years = 6;\n break;\n case \"C++\": years = 6;\n break;\n case \"XML\": years = 0.25;\n break;\n case \"JavaScript\": years = 1;\n break;\n case \"IAM\": years = 1;\n break;\n case \"SQL\": years = 7;\n break;\n case \"Automation\": years = 3;\n break;\n }\n Toast.makeText(context, result[position]+\" Experience: \"+years+ \" years\", Toast.LENGTH_SHORT).show();\n }", "@Override\n public void onItemClick(AdapterView<?> arg0, View arg1, int position,\n long id) {\n Toast.makeText(getApplicationContext(), actorsList.get(position).getName(), Toast.LENGTH_LONG).show();\n }", "@Override\n\tprotected void onListItemClick(ListView l, View v, int position, long id) {\n\t\tToast.makeText(this, String.format(\"Clicked on item #%d with text %s\",\n\t\t\tposition, mAdapter.getItem(position)), Toast.LENGTH_SHORT).show();\n\t}", "private void sendToCatVA()\n {\n Toast.makeText(getApplicationContext(), \"No Results Found For 'Visual Art'\", Toast.LENGTH_SHORT).show();\n }", "protected void toastshow1() {\n \n\t\tToast toast=Toast.makeText(this, \"image and text\", Toast.LENGTH_LONG);\n\t\t\n\t\tLinearLayout linearLayout=new LinearLayout(this);\n\t\tlinearLayout.setOrientation(LinearLayout.VERTICAL);\n\t\tImageView imageView=new ImageView(this);\n\t\timageView.setImageResource(R.drawable.icon);\n\t\tButton button=new Button(this);\n\t\tbutton.setText(\"progress over\");\n\t\tView toastView=toast.getView();\n\t\tlinearLayout.addView(imageView);\n\t\tlinearLayout.addView(button);\n\t\tlinearLayout.addView(toastView);\n\t\t\n\t\ttoast.setView(linearLayout);\n\t\ttoast.show();\n\t\t\n\t}", "private static void showToastText(String infoStr, int TOAST_LENGTH) {\n Context context = null;\n\t\ttoast = getToast(context);\n\t\tTextView textView = (TextView) toast.getView().findViewById(R.id.tv_toast);\n\t\ttextView.setText(infoStr);\n textView.setTypeface(Typeface.SANS_SERIF);\n\t\ttoast.setDuration(TOAST_LENGTH);\n\t\ttoast.show();\n\t}", "private void showResultAsToast(int nbOfCorrectAnswers) {\n String msg = \"\";\n\n if(nbOfCorrectAnswers == 4) {\n msg = \"Genius ! LOL !! \" + nbOfCorrectAnswers + \"/4\";\n } else if (nbOfCorrectAnswers < 4) {\n msg = \"You can do better than this! \" + nbOfCorrectAnswers + \"/4\";\n }\n\n // The Toast method helps to show a message that shows the number of correct answers\n Toast.makeText(this, msg, Toast.LENGTH_LONG).show();\n }", "@Override\n public void onItemClick(View view, int position) {\n Toast.makeText(getContext(), \"You clicked \" + adapter.getItem(position) + \" on row number \" + position, Toast.LENGTH_SHORT).show();\n }", "private void displayToast(String message) {\n Toast.makeText(OptionActivity.this, message, Toast.LENGTH_SHORT).show();\n }", "@Override\n public void onItemSelected(AdapterView<?> arg0, View arg1, int position, long id) {\n Toast.makeText(getApplicationContext(),country[position] , Toast.LENGTH_LONG).show();\n }", "@Override\n public void onClick(DialogInterface dialog, int position) {\n tv.setText(String.valueOf(items[position]));\n\n String tag = tv.getTag().toString();\n\n switch (tag) {\n\n case \"district\":\n districtStr = String.valueOf(items[position]);\n break;\n\n case \"village\":\n villageStr = String.valueOf(items[position]);\n break;\n\n case \"ward\":\n wardStr = String.valueOf(items[position]);\n break;\n\n case \"category\":\n categoryStr = String.valueOf(items[position]);\n break;\n\n }\n\n }", "@Override\r\n public void onItemClick(AdapterView<?> parent, View view,\r\n int position, long id) {\n int itemPosition = position;\r\n\r\n // ListView Clicked item value\r\n String itemValue = (String) listView.getItemAtPosition(position);\r\n\r\n // Show Alert\r\n Toast.makeText(getApplicationContext(),\r\n \"Position :\"+itemPosition+\" ListItem : \" +itemValue , Toast.LENGTH_LONG)\r\n .show();\r\n }", "@Override\r\n public void onItemClick(AdapterView<?> parent, View view,\r\n int position, long id) {\n int itemPosition = position;\r\n\r\n // ListView Clicked item value\r\n String itemValue = (String) listView.getItemAtPosition(position);\r\n\r\n // Show Alert\r\n Toast.makeText(getApplicationContext(),\r\n \"Position :\"+itemPosition+\" ListItem : \" +itemValue , Toast.LENGTH_LONG)\r\n .show();\r\n\r\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n switch (which) {\n case 0:\n notice.setText(items[0]);\n noticeTime = 1;\n break;\n case 1:\n notice.setText(items[1]);\n noticeTime = 2;\n break;\n case 2:\n notice.setText(items[2]);\n noticeTime = 3;\n break;\n case 3:\n notice.setText(items[3]);\n noticeTime = 4;\n break;\n case 4:\n notice.setText(items[4]);\n noticeTime = 5;\n showCustom();\n break;\n }\n }", "public void ToastMessage() {\n\n // create toast message object\n final Toast toast = Toast.makeText(Product_Details_Page_Type_4.this,\n \"Product added to cart\",Toast.LENGTH_LONG);\n // show method call to show Toast message\n toast.show();\n\n // create handler to set duration for toast message\n Handler handler = new Handler() {\n\n @Override\n public void close() {\n // set duration for toast message\n toast.setDuration(100);\n // cancel toast message\n toast.cancel();\n }\n @Override\n public void flush() {}\n\n @Override\n public void publish(LogRecord record) {}\n };\n }", "@Override\r\n\t\t\tpublic void onClick(View v) {\n\t\r\n\t\t\r\n\t\t\t\tToast.makeText(getApplicationContext(), \"등록완료\", Toast.LENGTH_SHORT).show();\r\n\t\t\t\r\n\t\t\t\t\t \r\n\t\t\t}", "@Override\n public void onSuccess(Void aVoid) {\n Toast.makeText(getContext(), \"המוצר נמחק בהצלחה!\", Toast.LENGTH_SHORT).show();\n }", "@Override\n\t\t\t\tpublic void onItemClick(AdapterView<?> parent, View view,\n\t\t\t\t\t\tint position, long id) {\n\t\t\t\t\tToast.makeText(MainActivity.this, \"我被点击了\", 0).show();\n\t\t\t\t}", "public void onItemClick(AdapterView<?> arg0, View arg1, int index,\n\t\t\t\t\tlong arg3) {\n\t\t\t\t final int idex = index;\n\t\t\t\t final long position = arg3;\n\t\t\t\t final AlertDialog dlg2 = new AlertDialog.Builder(PropagandaListActivity.this).create();\n\t\t\t\t\tdlg2.show();\t\t\t\t\t\n\t\t\t\t\tdlg2.getWindow().setContentView(R.layout.dialog_new);\n\t\t\t\t\tButton confirm =(Button)dlg2.findViewById(R.id.button_confirm);\n\t\t\t\t\tButton cancel =(Button)dlg2.findViewById(R.id.button_cancel);\n\t\t\t\t\tTextView tv = (TextView)dlg2.findViewById(R.id.notice_message);\n\t\t\t\t\ttv.setTextSize(16);\n\t\t\t\t\ttv.setText(MainActivity.resources.getString(R.string.propagandalist_toast1)+GameData.pro[index].money+MainActivity.resources.getString(R.string.propagandalist_toast2));\n\t\t\t\t confirm.setOnClickListener(new OnClickListener() {\n\t\t\t\t\t\t\n\t\t\t\t\t\t \n\t\t\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t\t\tConnection.sendMessage(GameProtocol.\n\t\t\t\t\t\t\t\t\tCONNECTION_SEND_JointAdvocacy_Req,\n\t\t\t\t\t\t\t\t\tConstructData.Join_JointAdvocacy_Req(GameData.pro[idex].id,0));//8宣传列表\n\t\t\t\t\t\t\tdlg2.dismiss();\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t cancel.setOnClickListener(new OnClickListener() {\n\t\t\t\t \t\n\t\t\t\t \t \n\t\t\t\t \tpublic void onClick(View v) {\n\t\t\t\t \t\t// TODO Auto-generated method stub\n\t\t\t\t \t\t\n\t\t\t\t \t\tdlg2.dismiss();\n\t\t\t\t \t}\n\t\t\t\t });\n/*\t\t\t\t \n\t\t\t\tAlertDialog.Builder builder = new AlertDialog.Builder(PropagandaListActivity.mContext);\n\t\t\t\tbuilder.setMessage(MainActivity.resources.getString(R.string.propagandalist_toast1)+GameData.pro[index].money+MainActivity.resources.getString(R.string.propagandalist_toast2))\n\t\t\t\t .setPositiveButton(MainActivity.resources.getString(R.string.dialog_ok), new DialogInterface.OnClickListener(){\t\t\t\t \t \n\t\t\t\t\t\t\n\t\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t\t\tConnection.sendMessage(GameProtocol.\n\t\t\t\t\t\t\t\t\tCONNECTION_SEND_JointAdvocacy_Req,\n\t\t\t\t\t\t\t\t\tConstructData.Join_JointAdvocacy_Req(GameData.pro[idex].id));//8宣传列表\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tdialog.dismiss();\n\t\t\t\t\t\t}})\n\t\t\t\t .setNegativeButton(MainActivity.resources.getString(R.string.dialog_return), new DialogInterface.OnClickListener(){\n\n\t\t\t\t\t\t \n\t\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t\t\tdialog.dismiss();\n\t\t\t\t\t\t}} );\n\t\t\t\tbuilder.create().show();*/\n\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t \n\t\t\t\t\n\t\t\t}", "private void toast(String bread) {\n Toast.makeText(getActivity(), bread, Toast.LENGTH_SHORT).show();\n }", "private void displayToast(CharSequence text){\n Context context = getApplicationContext();\n int duration = Toast.LENGTH_SHORT;\n Toast toast = Toast.makeText(context, text, duration);\n toast.show();\n }", "public void printVoting(int index){\n System.out.print(\"Question : \"+votingList.get(index).getQuestion()+\" Choices: \");\n int i=0;\n for (String s:votingList.get(index).getChoices()) {\n System.out.print(i + \": \" + s + \" \");\n i++;\n }\n System.out.println();\n }", "void displayMessage(){\r\n Toast toast = Toast.makeText(this, getString(R.string.congratz_message, String.valueOf(playerScore)), Toast.LENGTH_SHORT);\r\n toast.show();\r\n }", "@Override\n public boolean onMenuItemClick(int position, SwipeMenu menu, int index) {\n switch (index) {\n case 0:\n Toast.makeText(getApplicationContext(), \"Action 1 for \", Toast.LENGTH_SHORT).show();\n break;\n case 1:\n Toast.makeText(getApplicationContext(), \"Action 2 for \", Toast.LENGTH_SHORT).show();\n break;\n }\n return false;\n }", "@Override\n\t\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\t\tToast.makeText(getContext(), \"告辞!\",\n\t\t\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\t\t\t\t}", "public String s(int index) {\n if (get(index) == null) return \"null\";\n return this.adapter.get(index).toString();\n }", "public String getMessage(int index) {\n return text.get(index);\n }", "private void sendToCatTheater()\n {\n Toast.makeText(getApplicationContext(), \"No Results Found For 'Theater'\", Toast.LENGTH_SHORT).show();\n }", "@Override\n public void onItemClick(AdapterView<?> adapterView, View view, int i, long l) {\n txtVwMostrar.setText(asDatos[i]);\n\n new AlertDialog.Builder(this).setTitle(\"Selección de la lista\").setMessage(asDatos[i]).setIcon(R.drawable.ic_launcher_background)\n //Botones\n .setPositiveButton(\"OK\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n Toast.makeText(getApplicationContext(),\"Pues OK\", Toast.LENGTH_SHORT).show();\n\n }\n })\n .setNegativeButton(\"Cancelar\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n Toast.makeText(getApplicationContext(),\"Cancelar :p\", Toast.LENGTH_SHORT).show();\n }\n })\n .setNeutralButton(\"que haces\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n Toast.makeText(getApplicationContext(),\"neutral\",Toast.LENGTH_SHORT).show();\n }\n });\n }", "@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n int itemPosition = position;\n\n // ListView Clicked item value\n String itemValue = (String) listView.getItemAtPosition(position);\n\n // Show Alert\n Toast.makeText(getApplicationContext(), \"Position :\" + itemPosition + \" ListItem : \" + itemValue , Toast.LENGTH_LONG).show();\n }", "@Override\n public void onItemClick(AdapterView arg0, View arg1, int arg2,\n long arg3) {\n ListView listView = (ListView) arg0;\n getAlertDialog(\"Word\",listView.getItemAtPosition(arg2).toString()).show();\n\n }", "@Override\n public void onItemClick(AdapterView<?> parent, View view,\n int position, long id) {\n ((TextView) levelDialog.findViewById(R.id.evaluation_title)).setText(st_place[position][0]);\n current_position = position;\n levelDialog.show();\n }", "public void toastMsg(View v){\n String msg = \"Message Sent!\";\n Toast toast = Toast.makeText(this,msg,Toast.LENGTH_SHORT);\n toast.show();\n }", "@Override\n public void onItemClick(AdapterView<?> parent, View view,\n int position, long id) {\n int itemPosition = position;\n\n // ListView Clicked item value\n String itemValue = (String) listView.getItemAtPosition(position);\n\n // Show Alert\n Toast.makeText(getApplicationContext(),\n \"Position :\" + itemPosition + \" ListItem : \" + itemValue, Toast.LENGTH_LONG)\n .show();\n\n }", "private void toastmessage(String message){\n Toast.makeText(Accountinfo.this,message,Toast.LENGTH_SHORT).show();\n }", "@Override\n\t\t\tpublic void onItemClick(AdapterView<?> parent, View view,\n\t\t\t\t\tint position, long id) {\n\t\t\t\tint itemPosition = position;\n\n\t\t\t\t// ListView Clicked item value\n\t\t\t\tString itemValue = (String) listView\n\t\t\t\t\t\t.getItemAtPosition(position);\n\t\t\t\t\n\t\t\t\ttestando(itemValue);\n\n\t\t\t\t// Show Alert\n\t\t\t\t/*Toast.makeText(\n\t\t\t\t\t\tgetApplicationContext(),\n\t\t\t\t\t\t\"Position :\" + itemPosition + \" ListItem : \"\n\t\t\t\t\t\t\t\t+ itemValue, Toast.LENGTH_LONG).show();*/\n\t\t\t\t\n\t\t\t\t\n\n\t\t\t}", "public void onClick(View v) {\n Toast.makeText( getActivity(),\"Voice Recognition\", Toast.LENGTH_SHORT).show();\n }", "public void makeToast(String name,int time){\n toast = new Toast(context);\n// toast.setGravity(Gravity.BOTTOM|Gravity.CENTER_HORIZONTAL , 0, SecretMessageApplication.get720WScale(240));\n toast.setDuration(time);\n// toast.setView(layout);\n toast.show();\n\n }", "private void toast(String aToast) {\n Toast.makeText(getApplicationContext(), aToast, Toast.LENGTH_LONG).show();\n }", "private void showToast(final String message, final int toastLength) {\n post(new Runnable() {\n @Override\n public void run() {\n Toast.makeText(getActivity(), message, toastLength).show();\n }\n });\n }", "public void showToast(String text){\n Toast.makeText(this,text,Toast.LENGTH_SHORT).show();\n }", "@Override\n public void onClick(View v) {\n String toastText = \"Hello World\";\n\n // This is how long we want to show the toast\n int duration = Toast.LENGTH_SHORT;\n\n // Get the context\n Context context = getApplicationContext();\n\n // Create the toast\n Toast toast = Toast.makeText(context, toastText, duration);\n\n // Show the toast\n toast.show();\n }", "public void onClick(DialogInterface dialog, int which) {\n displayToast(getString(R.string.revise_el_pedido));\n }", "void showToast(String value);", "@Override\n public View getView(final int position, View convertView, ViewGroup parent) {\n Holder holder = new Holder();\n View rowView;\n\n rowView = inflater.inflate(R.layout.inventory_management_item, null);\n holder.os_text = (TextView) rowView.findViewById(R.id.inventory_brand_qty_tv);\n\n\n holder.os_text.setText(result[position]);\n\n\n rowView.setOnClickListener(new View.OnClickListener() {\n\n @Override\n public void onClick(View v) {\n // TODO Auto-generated method stub\n Toast.makeText(context, \"You Clicked \" + result[position], Toast.LENGTH_SHORT).show();\n }\n });\n\n return rowView;\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n \t\tif (index == 4) \n \t\t\tcurrentTimes[4] = \" \";\n \t\telse {\n \t\t\tfor (int a = index + 1; a <= 4; a++)\n {\n \t\t\t\tcurrentTimes[a-1] = currentTimes[a];\n }\n \t\t\tcurrentTimes[4] = \" \";\n \t\t}\n \n \n timeCount--;\n setTimes();\n \n \n }", "@Override\r\n public void onResult(String result)\r\n {\n handler.sendMessage(handler.obtainMessage(SHOWTOAST, \"SN = \"+result));\r\n }", "@Override\r\n public void onClick(View v)\r\n {\n DJIDrone.getDjiMainController().getAircraftSn(new DJIExecuteStringResultCallback(){\r\n\r\n @Override\r\n public void onResult(String result)\r\n {\r\n // TODO Auto-generated method stub\r\n handler.sendMessage(handler.obtainMessage(SHOWTOAST, \"SN = \"+result));\r\n }\r\n \r\n });\r\n }", "@Override\n\t\t\tpublic boolean onItemLongClick(AdapterView<?> arg0, View arg1,\n\t\t\t\t\tint arg2, long arg3) {\n\t\t\t\tToast.makeText(getApplicationContext(), \"Selected Text Is...\"+names[arg2]+\":\"+phones[arg2], 5000).show();\n\t\t\t\treturn true;\n\t\t\t}", "private void toastMessage(String message){\n Toast.makeText(this,message, Toast.LENGTH_SHORT).show();\n }", "private void toastMessage(String message){\n Toast.makeText(this,message, Toast.LENGTH_SHORT).show();\n }", "private static void popuniPolja(int index) {\r\n\t\tClan c = listaClanova.getClan(index);\r\n\t\tizmeniClanaGui.getTxtBrojtelefona().setText(c.getBrojTelefona());\r\n\t\tizmeniClanaGui.getTxtAdresa().setText(c.getAdresa());\r\n\t\tizmeniClanaGui.getTxtTezina().setText(c.getTezina() + \"\");\r\n\t\tizmeniClanaGui.getTxtVisina().setText(c.getVisina() + \"\");\r\n\t\tizmeniClanaGui.getTxtSifra().setText(c.getSifra());\r\n\t\tizmeniClanaGui.getTxtClanarinaPlacenaDo().setText(c.getPlacenaClanarina());\r\n\t}", "static void makeToast(Context ctx, String s){\n Toast.makeText(ctx, s, Toast.LENGTH_SHORT).show();\n }", "private void msg(String s)\n {\n Toast.makeText(getApplicationContext(),s,Toast.LENGTH_LONG).show();\n }", "private void msg(String s)\n {\n Toast.makeText(getApplicationContext(),s,Toast.LENGTH_LONG).show();\n }" ]
[ "0.68214124", "0.6758684", "0.6752585", "0.67437226", "0.652738", "0.649858", "0.64903206", "0.63822216", "0.6334517", "0.63289535", "0.63104576", "0.6209714", "0.6115152", "0.6102723", "0.6070943", "0.6070567", "0.6039277", "0.6031918", "0.5951745", "0.5949662", "0.5905967", "0.58892566", "0.5861986", "0.584945", "0.5843429", "0.5833529", "0.5819571", "0.5815857", "0.5785502", "0.5781285", "0.57811356", "0.5766408", "0.5758455", "0.5716528", "0.5711547", "0.5674709", "0.5641755", "0.5638904", "0.5626951", "0.56010866", "0.5593843", "0.5592802", "0.55851877", "0.5580154", "0.55708", "0.55581135", "0.5537648", "0.55246025", "0.55240536", "0.55215913", "0.55129623", "0.5470748", "0.54678607", "0.5455719", "0.54346097", "0.5409089", "0.54057753", "0.5397722", "0.53975344", "0.5397341", "0.5394341", "0.53902465", "0.53851646", "0.53849477", "0.5380938", "0.53779715", "0.5365256", "0.5351288", "0.53403896", "0.53390634", "0.53283376", "0.5318497", "0.531446", "0.5308008", "0.53039694", "0.530201", "0.53005403", "0.52969575", "0.5294625", "0.5292173", "0.529133", "0.52892333", "0.5286718", "0.52832854", "0.5281794", "0.52808654", "0.5274786", "0.52669406", "0.5266492", "0.5266431", "0.52616036", "0.5258968", "0.52538764", "0.52522916", "0.52498233", "0.52424294", "0.52424294", "0.524225", "0.5235862", "0.52358603", "0.52358603" ]
0.0
-1
Setup for before each test case
@BeforeEach public void setup() throws Exception { MockitoAnnotations.openMocks(this); mockMvc = standaloneSetup(userController) .setControllerAdvice(userManagementExceptionHandler) .build(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void runBeforeTest() {}", "@Before public void setUp() { }", "@Before\r\n\tpublic void setup() {\r\n\t}", "@Before\r\n\t public void setUp(){\n\t }", "@Before\n\t public void setUp() {\n\t }", "@Before\n\tpublic void setup() {\n\t\t\n\t\t\n\t}", "@Before\n public void setup() {\n }", "@Before\n public void setup() {\n }", "@Before\n public void setup() {\n }", "@Before public void setUp() {\n }", "@Before public void setUp() {\n }", "@Before public void setUp() {\n }", "@Before public void setUp() {\n }", "@Before public void setUp() {\n }", "@Before\n public void setup() {\n }", "@BeforeAll\n static void setup() {\n log.info(\"@BeforeAll - executes once before all test methods in this class\");\n }", "@Before\n\tpublic void setup() \n\t{\n\t\tsuper.setup();\n\t\t\n }", "@Before\n public void setUp() {\n System.out.println(\"\\n@Before - Setting Up Stuffs: Pass \"\n + ++setUpCount);\n // write setup code that must be executed before each test method run\n }", "@Before\r\n\tpublic void set_up(){\n\t}", "@Before\r\n\tpublic void before() {\r\n\t}", "@Before\r\n\tpublic void setUp() {\n\t}", "protected void setUp() {\n\t}", "@Before\n public void postSetUpPerTest(){\n\n }", "@Before\n public void before() {\n }", "@Before\n public void before() {\n }", "@BeforeMethod\r\n\tpublic void beforeMethod() {\r\n\t\t//initializeTestBaseSetup();\r\n\t}", "@Before\n\tpublic void setUp() {\n\t}", "@Before\r\n public void setUp()\r\n {\r\n }", "@Before\r\n public void setUp()\r\n {\r\n }", "@Before\r\n public void setUp()\r\n {\r\n }", "@Before\r\n public void setUp()\r\n {\r\n }", "@BeforeEach\n public void setup() {\n }", "@BeforeClass\n\tpublic void beforeClass() {\n\t}", "@Before\n public void setUp() {\n }", "@Before\n public void setUp() {\n }", "@Before\n public void setUp() {\n }", "@Before\n public void setUp() {\n }", "@Before\n public void setUp() {\n }", "@Before\n public void setUp() {\n }", "public void setUp() {\n\n\t}", "@Override\n @Before\n public void before() throws Exception {\n\n super.before();\n }", "@Before\n public void setUp () {\n }", "@Before\n public void beforeScenario() {\n }", "public void before() {\n }", "public void before() {\n }", "@Before\n public void setUp()\n {\n }", "@Before\n public void setUp()\n {\n }", "@Before\n public void setUp()\n {\n }", "@Before\n public void setUp()\n {\n }", "@Before\n public void setUp()\n {\n }", "@Before\n public void setUp()\n {\n }", "@Before\n public void setUp()\n {\n }", "@Before\n public void setUp()\n {\n }", "@Before\n public void setUp()\n {\n }", "@Before\n public void setUp()\n {\n }", "@Before\n public void setUp()\n {\n }", "@Before\n public void setUp()\n {\n }", "@Before\n public void setUp()\n {\n }", "@Before\n public void setUp()\n {\n }", "@Before\n public void setUp()\n {\n }", "@Before\n public void setUp()\n {\n }", "@Before\n public void setUp()\n {\n }", "@Before\n public void setUp()\n {\n }", "@Before\n public void beforeTest(){\n\n\n }", "@Before\n public void setUp() {\n }", "@Before\n public void setup() {\n Helpers.fillData();\n }", "@BeforeClass\n public static void beforeClass() {\n }", "@BeforeAll\n static void init() {\n }", "@BeforeAll\n public void prepare() {\n }", "public void setUp()\r\n {\r\n //empty on purpose\r\n }", "@BeforeEach\n\tpublic void runBeforeTests() {\n\t\ttestArrayList = new ArrayList<>(Arrays.asList(38, 3, 33, 36, 5, 70, 24, 47, 7, 27, 15, 48, 53, 32, 93));\n\t}", "@Before\n public void setUp()\n {\n summary = \"\";\n allPassed = true;\n firstFailExpected = null;\n firstFailRun = null;\n captureSummary = \"\";\n captureRun = null;\n }", "@Before\r\n public void before() throws Exception {\r\n }", "@Before\n\tpublic void setup() {\n\t\tinit(rule.getProcessEngine());\n\t}", "@Before\n public void init() {\n }", "protected void runBeforeStep() {}", "protected void setUp()\n {\n }", "protected void setUp()\n {\n }", "@BeforeEach\n\tvoid setup(){\n\t}", "@Override\r\n\tpublic void setUp() {\n\t\t\r\n\t}", "@BeforeClass\n public void beforeclass() {\n\t}", "@Before\n public void init(){\n }", "@Before\n public final void setUp() throws Exception\n {\n // Empty\n }", "@BeforeClass\n\tpublic static void testSetup() {\n\t\t// do something before all tests\n\t}", "protected void setUp() {\n\n }", "@Before\r\n\tpublic void setUp() throws Exception {\r\n\t\t//This method is unused. \r\n\t}", "@BeforeClass\n\tpublic void beforeTestClass() \n\t{\n\t\tfBase.driver = driver;\n\t\tfBase.testdataHashMap = testdataHashMap;\n\t\tfBase.eTest = eTest;\n\t}", "@Before\n @Override\n public void init() {\n }", "@Before\n public void setUp() throws Exception {\n }", "@Before\n public void setUp() throws Exception {\n }", "@Before\n public void setUp() throws Exception {\n\n }", "@Before\n public void init() {\n this.testMethodName = this.getTestMethodName();\n this.initialize();\n }", "@BeforeClass\n\t public void setUp() {\n\t }", "@Before\n public void setupThis() {\n System.out.println(\"* Before test method *\");\n }", "@BeforeTest\n\n public void Initialize() {\n\n\n}", "@Override\r\n\t@Before\r\n\tpublic void callSetup() throws Exception\r\n\t{\r\n\t\tsuper.callSetup();\r\n\t}", "@Before\n\tpublic void setupTeste()\n\t{\n\t\tSystem.out.println(\"ESTOU FAZENDO O SETUP\");\n\t}", "@Before\n public void setUp() throws Exception {\n\n }", "@Before\n\tpublic void init() {\n\t}", "@Before\n\tpublic void testEachSetup() {\n\t\ttestGrid = new Grid(50,50);\n\t\tundoRedo_TestStack = new UndoRedo();\n\t\tSystem.out.println(\"Setting up test...\");\n\t}", "@Before\n\t\t public void setUp() throws Exception {\n\t\t\t testHelper.setUp();\n\t\t }" ]
[ "0.824252", "0.8086822", "0.8025366", "0.80219376", "0.80033875", "0.7994822", "0.79937744", "0.79937744", "0.79937744", "0.7969581", "0.7969581", "0.7969581", "0.7969581", "0.7969581", "0.79663527", "0.7949009", "0.78930974", "0.7888912", "0.78489465", "0.7818042", "0.77804905", "0.77710956", "0.7766813", "0.7764529", "0.7764529", "0.7733499", "0.77247053", "0.7715522", "0.7715522", "0.7715522", "0.7715522", "0.7684357", "0.7660694", "0.7654851", "0.7654851", "0.7654851", "0.7654851", "0.7654851", "0.76357245", "0.76291186", "0.76136774", "0.76084554", "0.76054525", "0.760378", "0.760378", "0.7599933", "0.7599933", "0.7599933", "0.7599933", "0.7599933", "0.7599933", "0.7599933", "0.7599933", "0.7599933", "0.7599933", "0.7599933", "0.7599933", "0.7599933", "0.7599933", "0.7599933", "0.7599933", "0.7599933", "0.7599933", "0.7597632", "0.75902313", "0.7586838", "0.75799966", "0.75780123", "0.75770766", "0.7565573", "0.7555227", "0.7546793", "0.75450206", "0.7514001", "0.7512573", "0.7502069", "0.7498119", "0.7498119", "0.7477728", "0.74758196", "0.7474924", "0.7474043", "0.74596435", "0.74584055", "0.7456613", "0.745602", "0.74395853", "0.74307334", "0.74238473", "0.74238473", "0.74228364", "0.7417531", "0.741444", "0.7413312", "0.7412887", "0.7405292", "0.7403937", "0.7382754", "0.73814815", "0.7373872", "0.7363988" ]
0.0
-1
TODO Autogenerated method stub
public static void main(String[] args) { try { throw new MyException("This is the my custom error message"); } catch (MyException error) { System.out.println(error); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "private stendhal() {\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.66708666", "0.65675074", "0.65229905", "0.6481001", "0.64770633", "0.64584893", "0.6413091", "0.63764185", "0.6275735", "0.62541914", "0.6236919", "0.6223816", "0.62017626", "0.61944294", "0.61944294", "0.61920846", "0.61867654", "0.6173323", "0.61328775", "0.61276996", "0.6080555", "0.6076938", "0.6041293", "0.6024541", "0.6019185", "0.5998426", "0.5967487", "0.5967487", "0.5964935", "0.59489644", "0.59404725", "0.5922823", "0.5908894", "0.5903041", "0.5893847", "0.5885641", "0.5883141", "0.586924", "0.5856793", "0.58503157", "0.58464456", "0.5823378", "0.5809384", "0.58089525", "0.58065355", "0.58065355", "0.5800514", "0.57912874", "0.57912874", "0.57912874", "0.57912874", "0.57912874", "0.57912874", "0.57896614", "0.5789486", "0.5786597", "0.5783299", "0.5783299", "0.5773351", "0.5773351", "0.5773351", "0.5773351", "0.5773351", "0.5760369", "0.5758614", "0.5758614", "0.574912", "0.574912", "0.574912", "0.57482654", "0.5732775", "0.5732775", "0.5732775", "0.57207066", "0.57149917", "0.5714821", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57115865", "0.57045746", "0.5699", "0.5696016", "0.5687285", "0.5677473", "0.5673346", "0.56716853", "0.56688815", "0.5661065", "0.5657898", "0.5654782", "0.5654782", "0.5654782", "0.5654563", "0.56536144", "0.5652585", "0.5649566" ]
0.0
-1
ThreadPoolExecutor pool = (ThreadPoolExecutor) Executors.newFixedThreadPool(10);
public static void main(String[] args) { MyTheads threads = new MyTheads(); threads.exec(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static void useCachedThreadPool() {\n ExecutorService executor = Executors.newCachedThreadPool();\n\n System.out.println(((ThreadPoolExecutor) executor).getActiveCount());\n\n\n executor.execute(() -> {\n System.out.println(\"==========\");\n });\n\n System.out.println(((ThreadPoolExecutor) executor).getActiveCount());\n\n IntStream.range(0, 100).boxed().forEach(i -> {\n executor.execute(() -> {\n sleepSeconds(10);\n System.out.println(Thread.currentThread().getName() + \"[\" + i + \"]\");\n });\n });\n sleepSeconds(1);\n System.out.println(((ThreadPoolExecutor) executor).getActiveCount());\n }", "private static void useFixedSizePool(){\n ExecutorService executor = Executors.newFixedThreadPool(10);\n\n System.out.println(((ThreadPoolExecutor) executor).getActiveCount());\n\n IntStream.range(0, 20).boxed().forEach(i -> {\n executor.execute(() -> {\n sleepSeconds(10);\n System.out.println(Thread.currentThread().getName() + \"[\" + i + \"]\");\n });\n });\n sleepSeconds(1);\n System.out.println(((ThreadPoolExecutor) executor).getActiveCount());\n }", "private static void threadPoolInit() {\n ExecutorService service = Executors.newCachedThreadPool();\n try {\n for (int i = 1; i <= 10; i++) {\n service.execute(() -> {\n System.out.println(Thread.currentThread().getName() + \" 办理业务...\");\n });\n try {\n TimeUnit.MILLISECONDS.sleep(1L);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }\n } catch (Exception e) {\n e.printStackTrace();\n } finally {\n service.shutdown();\n }\n }", "@Test\n void test3() {\n ThreadPoolExecutor executor = new ThreadPoolExecutor(1,1,10L, TimeUnit.SECONDS,new LinkedBlockingDeque<>(2),new ThreadPoolExecutor.DiscardPolicy());\n for (int i = 0; i < 10; i++) {\n executor.execute(new Runnable() {\n @Override\n public void run() {\n System.out.println(Thread.currentThread().getName()+\"输出\");\n }\n });\n }\n }", "public static void main(String[] args) throws ExecutionException, InterruptedException {\n ExecutorService executorService=Executors.newScheduledThreadPool(5);\n try{\n for (int i = 0; i < 10; i++) {\n Future<String> futures = executorService.submit(new TestCallable());\n System.out.println(\"result---------------------\"+futures.get());\n }\n }catch (Exception e){\n e.printStackTrace();\n }finally {\n executorService.shutdown();\n }\n }", "public ExecutorService createExecutor() {\n return getCamelContext().getExecutorServiceManager().newThreadPool(this, endpointName,\n 1, 5);\n }", "ActorThreadPool getThreadPool();", "public static void main(String[] args) {\n\t\tExecutorService pool = Executors.newFixedThreadPool(3);\n\t\t//ExecutorService pool = Executors.newSingleThreadExecutor();\n\t\t\n\t\tExecutorService pool2 = Executors.newCachedThreadPool();\n\t\t//this pool2 will add more thread into pool(when no other thread running), the new thread do not need to wait.\n\t\t//pool2 will delete un runing thread(unrun for 60 secs)\n\t\tThread t1 = new MyThread();\n\t\tThread t2 = new MyThread();\n\t\tThread t3 = new MyThread();\n\n\t\tpool.execute(t1);\n\t\tpool.execute(t2);\n\t\tpool.execute(t3);\n\t\tpool.shutdown();\n\t\t\n\t}", "public static void main(String[] args) {\n ExecutorService threadPool = Executors.newCachedThreadPool();\n\n try{\n for (int i = 0; i < 10; i++) {\n threadPool.execute(() ->{\n System.out.println(Thread.currentThread().getName()+\"\\t 办理业务\");\n });\n //try {TimeUnit.SECONDS.sleep(1); } catch (InterruptedException e) {e.printStackTrace();}\n }\n\n } catch (Exception e) {\n e.printStackTrace();\n }finally {\n threadPool.shutdown();\n }\n\n\n\n }", "int getExecutorCorePoolSize();", "public static void main(String[] args) throws InterruptedException, ExecutionException {\n\t\tExecutorService executor = Executors.newFixedThreadPool(5);\n for (int i = 0; i < 10; i++) {\n \tCallable worker = new WorkerThread1(\"\" + i);\n \tFuture future = executor.submit(worker);\n \tSystem.out.println(\"Results\"+future.get());\n //executor.execute(worker);\n }\n executor.shutdown();\n while (!executor.isTerminated()) {\n }\n System.out.println(\"Finished all threads\");\n }", "public void testForNThreads();", "public static void main(String[] args) {\n ExecutorService executor = Executors.newFixedThreadPool(5);\n\n for (int i = 0; i < 10; i++) {\n Runnable worker = new WorkerThreadSand(\" \" + i);\n executor.execute(worker);\n }\n executor.shutdown();\n\n// nasty path for executor\n try {\n ExecutorService nastyExecutor = Executors.newSingleThreadExecutor();\n nastyExecutor.execute(null);\n }catch (Exception e){\n System.out.println(\"Nulls don't work\");\n }\n\n\n System.out.println(\"Finished all threads\");\n\n }", "private void initExecService() {\n try {\n executorService = Executors.newFixedThreadPool(NO_OF_THREADS);\n } catch (Exception e) {\n log.error(e.getMessage(), e);\n }\n }", "protected synchronized ExecutorService getService() {\r\n if(service == null) {\r\n //System.out.println(\"creating an executor service with a threadpool of size \" + threadPoolSize);\r\n service = Executors.newFixedThreadPool(threadPoolSize, new ThreadFactory() {\r\n private int count = 0;\r\n \r\n public Thread newThread(Runnable r) {\r\n Thread t = new Thread(r, \"tile-pool-\" + count++);\r\n t.setPriority(Thread.MIN_PRIORITY);\r\n t.setDaemon(true);\r\n return t;\r\n }\r\n });\r\n }\r\n return service;\r\n }", "int getExecutorPoolSize();", "@Test\r\n\tpublic void test()\r\n\t{\n\t\t\r\n\t\tThreadPoolManager.addPool(\"1,UD,12,12,30000,200000\");\r\n//\t\tThreadPoolManager.addPool(\"2,UD,12,12,30000,200000\");\r\n\r\n// ThreadPoolManager.init(params);\r\n// ThreadPoolManager.getPool(\"1\");\r\n\t\t\r\n//\t\tThread t = new Thread(this.testCreaterun());\r\n//\t\tBaseTask\r\n\t\tBaseTask b = this.testCreaterun();\r\n\t\tThreadPoolManager.submit(\"1\", b);\r\n\t\t\r\n\t\tSystemUtil.sleep(2000);\r\n\t\tThreadPoolManager.shutdownNow(\"1\");\r\n\t\t\r\n\t\tSystemUtil.sleep(2000);\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tSystemUtil.sleepForever();\r\n\t}", "public void startThread() \n { \n ExecutorService taskList = \n Executors.newFixedThreadPool(2); \n for (int i = 0; i < 5; i++) \n { \n // Makes tasks available for execution. \n // At the appropriate time, calls run \n // method of runnable interface \n taskList.execute(new Counter(this, i + 1, \n \"task \" + (i + 1))); \n } \n \n // Shuts the thread that's watching to see if \n // you have added new tasks. \n taskList.shutdown(); \n }", "public static void main(String[] args) {\n ThreadPoolExecutor executorService = new ThreadPoolExecutor(3, 10, 1L, TimeUnit.SECONDS,\n new LinkedBlockingQueue<>(20),\n Executors.defaultThreadFactory(),\n new ThreadPoolExecutor.AbortPolicy());\n ABC abc = new ABC();\n try {\n for (int i = 1; i <= 10; i++) {\n executorService.execute(abc::print5);\n executorService.execute(abc::print10);\n executorService.execute(abc::print15);\n }\n\n }finally {\n executorService.shutdown();\n }\n }", "public static void main(String[] args) {\n ThreadPoolExecutor executor = new ThreadPoolExecutor(7, 8, 5, TimeUnit.SECONDS,\r\n new LinkedBlockingQueue<Runnable>());\r\n System.out.println(executor.getCorePoolSize());\r\n System.out.println(executor.getMaximumPoolSize());\r\n System.out.println(\"***************************\");\r\n ThreadPoolExecutor executor2 = new ThreadPoolExecutor(7, 8, 5, TimeUnit.SECONDS,\r\n new SynchronousQueue<Runnable>());\r\n System.out.println(executor2.getCorePoolSize());\r\n System.out.println(executor2.getMaximumPoolSize());\r\n\r\n// 7\r\n// 8\r\n// ***************************\r\n// 7\r\n// 8\r\n\r\n // 熟悉下api,查询线程池中保存的core线程数量为7,最大为8\r\n }", "@Test\n @SneakyThrows\n void test() {\n ExecutorService executor = Executors.newSingleThreadExecutor();\n\n Runnable runnable = () -> {\n System.out.println(\"this is a new thread !!\");\n System.out.println(\"===============\");\n try {\n Thread.sleep(3000);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n };\n\n for (int i = 0; i < 3; i++) {\n executor.submit(runnable);\n }\n Thread.sleep(10 * 1000);\n\n executor.shutdown();\n\n }", "private ExecutorService getDroneThreads() {\n\t\treturn droneThreads;\n\t}", "private static void threadPoolWithExecute() {\n\n Executor executor = Executors.newFixedThreadPool(3);\n IntStream.range(1, 10)\n .forEach((i) -> {\n executor.execute(() -> {\n System.out.println(\"started task for id - \"+i);\n try {\n if (i == 8) {\n Thread.sleep(4000);\n } else {\n Thread.sleep(1000);\n }\n System.out.println(\"In runnable task for id -\" + i);\n } catch (Exception e) {\n e.printStackTrace();\n }\n });\n });\n System.out.println(\"End of method .THis gets printed immdly since execute is not blocking call\");\n }", "private void ejecutorDeServicio(){\r\n dbExeccutor = Executors.newFixedThreadPool(\r\n 1, \r\n new databaseThreadFactory()\r\n ); \r\n }", "public static void main(String[] args) throws Exception {\n Service1 service1 = new Service1();\n ExecutorService service = Executors.newFixedThreadPool(10);\n Future<String> f1 = service.submit(service1);\n\n\n }", "public void testNewFixedThreadPool1() {\n final ExecutorService e = Executors.newFixedThreadPool(2);\n try (PoolCleaner cleaner = cleaner(e)) {\n e.execute(new NoOpRunnable());\n e.execute(new NoOpRunnable());\n e.execute(new NoOpRunnable());\n }\n }", "@Bean(destroyMethod = \"shutdown\")\n public Executor threadPoolTaskExecutor(@Value(\"${thread.size}\") String argThreadSize) {\n this.threadSize = Integer.parseInt(argThreadSize);\n ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor();\n executor.setCorePoolSize(this.threadSize);\n executor.setKeepAliveSeconds(15);\n executor.initialize();\n return executor;\n }", "public interface ThreadPool {\n /**\n * Returns the number of threads in the thread pool.\n */\n int getPoolSize();\n /**\n * Returns the maximum size of the thread pool.\n */\n int getMaximumPoolSize();\n /**\n * Returns the keep-alive time until the thread suicides after it became\n * idle (milliseconds unit).\n */\n int getKeepAliveTime();\n\n void setMaximumPoolSize(int maximumPoolSize);\n void setKeepAliveTime(int keepAliveTime);\n\n /**\n * Starts thread pool threads and starts forwarding events to them.\n */\n void start();\n /**\n * Stops all thread pool threads.\n */\n void stop();\n \n\n}", "private void initThreadPool(int numOfThreadsInPool, int[][] resultMat, Observer listener) {\n for(int i=0;i<numOfThreadsInPool; i++){\r\n PoolThread newPoolThread = new PoolThread(m_TaskQueue, resultMat);\r\n newPoolThread.AddResultMatListener(listener);\r\n m_Threads.add(newPoolThread);\r\n }\r\n // Start all Threads:\r\n for(PoolThread currThread: m_Threads){\r\n currThread.start();\r\n }\r\n }", "public EngineConcurrency() {\n Runtime runtime = Runtime.getRuntime();\n int threads = runtime.availableProcessors();\n if (threads > 1) {\n threads++;\n }\n this.executor = Executors.newFixedThreadPool(threads);\n }", "private void normalExecutorService() {\n ListeningExecutorService executor = MoreExecutors.listeningDecorator(Executors.newFixedThreadPool(numberOfThreadsInThePool));\n try {\n Set<Future<String>> printTaskFutures = new HashSet<Future<String>>();\n for (final String printRequest : printRequests) {\n// Future<String> printer = executor.submit(new Printer(printRequest));\n ListenableFuture<String> printer = executor.submit(new Printer(printRequest));\n printTaskFutures.add(printer);\n// Futures.addCallback(printer, new FutureCallback<String>() {\n// // we want this handler to run immediately after we push the big red button!\n// public void onSuccess(String explosion) {\n//// walkAwayFrom(explosion);\n// }\n//\n// public void onFailure(Throwable thrown) {\n//// battleArchNemesis(); // escaped the explosion!\n// }\n// });\n }\n for (Future<String> future : printTaskFutures) {\n System.out.print(future.get());\n\n }\n } catch (Exception e) {\n Thread.currentThread().interrupt();\n } finally {\n// if (executor != null) {\n executor.shutdownNow();\n// }\n }\n }", "public ThreadPool( int totalPoolSize ) {\n\n\tpoolLocked = false;\n\n\ttry {\n\n\t initializePools( null, totalPoolSize );\n\n\t} catch( Exception exc ) {}\n\n }", "int getPoolSize();", "public static void main(String[] args) {\n\t\tExecutorService threadPool = Executors.newCachedThreadPool();\r\n\t\ttry {\r\n\t\t\tfor (int i = 0; i < 10; i++) {\r\n\t\t\t\tthreadPool.execute(()->{\r\n\t\t\t\t\tSystem.out.println(Thread.currentThread().getName() + \"\\t 执行业务\");\r\n\t\t\t\t});\r\n\t\t\t\tTimeUnit.MICROSECONDS.sleep(200);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t} catch (Exception e) {\r\n\t\t\t// TODO: handle exception\r\n\t\t}finally {\r\n\t\t\tthreadPool.shutdown();\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t}", "public UseCaseThreadPoolScheduler() {\n\t\tthis.threadPoolExecutor = new ThreadPoolExecutor(POOL_SIZE, MAX_POOL_SIZE, TIMEOUT,\n\t\t\t\tTimeUnit.SECONDS, new ArrayBlockingQueue<Runnable>(POOL_SIZE));\n\t}", "@Bean(name = \"process-response\")\n\tpublic Executor threadPoolTaskExecutor() {\n\t\tThreadPoolTaskExecutor x = new ThreadPoolTaskExecutor();\n\t\tx.setCorePoolSize(poolProcessResponseCorePoolSize);\n\t\tx.setMaxPoolSize(poolProcessResponseMaxPoolSize);\n\t\treturn x;\n\t}", "@Bean\n @ConditionalOnMissingBean(Executor.class)\n @ConditionalOnProperty(name = \"async\", prefix = \"slack\", havingValue = \"true\")\n public Executor threadPool() {\n ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor();\n executor.setCorePoolSize(5);\n executor.setMaxPoolSize(30);\n executor.setQueueCapacity(20);\n executor.setThreadNamePrefix(\"slack-thread\");\n return executor;\n }", "public static void testES() {\n ExecutorService es = Executors.newFixedThreadPool(2);\n for (int i = 0; i < 10; i++)\n es.execute(new TestTask());\n }", "public static void main(String[] args)\n\t{\n\t\tint coreCount = Runtime.getRuntime().availableProcessors();\n\t\t//Create the pool\n\t\tExecutorService ec = Executors.newCachedThreadPool(); //Executors.newFixedThreadPool(coreCount);\n\t\tfor(int i=0;i<100;i++) \n\t\t{\n\t\t\t//Thread t = new Thread(new Task());\n\t\t\t//t.start();\n\t\t\tec.execute(new Task());\n\t\t\tSystem.out.println(\"Thread Name under main method:-->\"+Thread.currentThread().getName());\n\t\t}\n\t\t\n\t\t//for scheduling tasks\n\t\tScheduledExecutorService service = Executors.newScheduledThreadPool(10);\n\t\tservice.schedule(new Task(), 10, TimeUnit.SECONDS);\n\t\t\n\t\t//task to run repetatively 10 seconds after previous taks completes\n\t\tservice.scheduleWithFixedDelay(new Task(), 15, 10, TimeUnit.SECONDS);\n\t\t\n\t}", "public void testNewFixedThreadPool3() {\n try {\n ExecutorService e = Executors.newFixedThreadPool(2, null);\n shouldThrow();\n } catch (NullPointerException success) {}\n }", "public static void main(String[] args) {\n\t\tList<Future<String>> futureList = new ArrayList<Future<String>>();\r\n\r\n\t\t//collection of multiple tasks which we are supposed to give to thread pool to perform\r\n\t\tList<CallableDemo> taskList = new ArrayList<CallableDemo>();\r\n\t\t//adding multiple tasks to collection (tasks are created using 'Callable' Interface.\r\n\t\ttaskList.add(new CallableDemo(\"first\"));\r\n\t\ttaskList.add(new CallableDemo(\"second\"));\r\n\t\ttaskList.add(new CallableDemo(\"third\"));\r\n\t\ttaskList.add(new CallableDemo(\"fourth\"));\r\n\t\ttaskList.add(new CallableDemo(\"fifth\"));\r\n\t\ttaskList.add(new CallableDemo(\"sixth\"));\r\n\t\ttaskList.add(new CallableDemo(\"seventh\"));\r\n\r\n\t\t//creating a thread pool of size four\r\n\t\tExecutorService threadPool = Executors.newFixedThreadPool(4);\r\n\t\t\r\n\t\tfor (CallableDemo task : taskList) {\r\n\t\t\tfutureList.add(threadPool.submit(task));\r\n\t\t}\r\n threadPool.shutdown();\r\n\t\tfor (Future<String> future : futureList) {\r\n\t\t\ttry {\r\n//\t\t\t\t System.out.println(future.get());\r\n\t\t\t\tSystem.out.println(future.get(1L, TimeUnit.SECONDS));\r\n\t\t\t} catch (InterruptedException | ExecutionException e) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}catch (TimeoutException e) {\r\n\t\t\t\tSystem.out.println(\"Sorry already waited for result for 1 second , can't wait anymore...\");\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t}", "public ThreadPool getDefaultThreadPool();", "public static void main(String[] args) {\n\n var pool = Executors.newFixedThreadPool(5);\n Future outcome = pool.submit(() -> 1);\n\n }", "public void testNewFixedThreadPool2() {\n final ExecutorService e = Executors.newFixedThreadPool(2, new SimpleThreadFactory());\n try (PoolCleaner cleaner = cleaner(e)) {\n e.execute(new NoOpRunnable());\n e.execute(new NoOpRunnable());\n e.execute(new NoOpRunnable());\n }\n }", "public static void main(String[] args) {\n SomeRunnable obj1 = new SomeRunnable();\n SomeRunnable obj2 = new SomeRunnable();\n SomeRunnable obj3 = new SomeRunnable();\n \n System.out.println(\"obj1 = \"+obj1);\n System.out.println(\"obj2 = \"+obj2);\n System.out.println(\"obj3 = \"+obj3);\n \n //Create fixed Thread pool, here pool of 2 thread will created\n ExecutorService pool = Executors.newFixedThreadPool(3);\n ExecutorService pool2 = Executors.newFixedThreadPool(2);\n pool.execute(obj1);\n pool.execute(obj2);\n pool2.execute(obj3);\n \n pool.shutdown();\n pool2.shutdown();\n }", "@SuppressWarnings({ \"rawtypes\", \"unchecked\" })\r\n\tpublic static void main(String[] args) throws InterruptedException, ExecutionException{\n\t\tExecutorService e = Executors.newFixedThreadPool(2);\r\n//\t\tList<Future> list = new ArrayList<Future>();\r\n\t\tfor(int i=0;i<10;i++){\r\n\t\t\tCallable c = new JavaTestThread(i);\r\n\t\t\tFuture f = e.submit(c);\r\n\t\t\tSystem.out.println(\"-------\"+ f.get().toString());\r\n\t\t}\r\n\t\t\r\n\t\r\n\t\t\r\n\t}", "public void testCreateThreadPool_int()\n {\n System.out.println( \"createThreadPool\" );\n int numRequestedThreads = 0;\n ThreadPoolExecutor result = ParallelUtil.createThreadPool( ParallelUtil.OPTIMAL_THREADS );\n ThreadPoolExecutor expected = ParallelUtil.createThreadPool( -1 );\n assertEquals( expected.getMaximumPoolSize(), result.getMaximumPoolSize() );\n \n result = ParallelUtil.createThreadPool( -1 );\n assertTrue( result.getMaximumPoolSize() > 0 );\n \n numRequestedThreads = 10;\n result = ParallelUtil.createThreadPool( numRequestedThreads );\n assertEquals( numRequestedThreads, result.getMaximumPoolSize() );\n }", "public void testExecuteInParallel_Collection_ThreadPoolExecutor() throws Exception\n {\n System.out.println( \"executeInParallel\" );\n Collection<Callable<Double>> tasks = createTasks( 10 );\n Collection<Double> result = ParallelUtil.executeInParallel( tasks, ParallelUtil.createThreadPool( 1 ) );\n assertEquals( result.size(), tasks.size() );\n }", "public interface ThreadPool<Job extends Runnable> {\n\n void execute(Job job);\n\n void shutDown();\n\n void addWorkers(int num);\n\n void removeWorkers(int num);\n\n int getJobSize();\n\n}", "public void testNewFixedThreadPool4() {\n try {\n ExecutorService e = Executors.newFixedThreadPool(0);\n shouldThrow();\n } catch (IllegalArgumentException success) {}\n }", "public static void main(String[] args) {\n ExecutorService es = Executors.newCachedThreadPool();\n es.execute(new Task(65));\n es.execute(new Task(5));\n System.out.println(\"结束执行!\");\n }", "@Override\n\tpublic void execute() {\n\t\tThreadPool pool=ThreadPool.getInstance();\n\t\tpool.beginTaskRun(this);\n\t}", "void setExecutorService(ExecutorService executorService);", "public interface IHttpThreadExecutor {\n public void addTask(Runnable runnable);\n}", "public void testGetNumThreads_ThreadPoolExecutor()\n {\n System.out.println( \"getNumThreads\" );\n int numThreads = 10;\n PA pa = new PA();\n assertEquals( 0, ParallelUtil.getNumThreads( pa.getThreadPool() ) );\n \n pa.threadPool = ParallelUtil.createThreadPool( 10 ); \n \n int result = ParallelUtil.getNumThreads( pa.getThreadPool() );\n assertEquals( numThreads, result );\n }", "int getExecutorMaximumPoolSize();", "ScheduledExecutorService getExecutorService();", "@Override\n\tpublic int getMaxThreads() {\n\t\treturn 10;\n\t}", "@Singleton\n\t@Provides\n\tExecutorService provideExecutorService() {\n\t\tThreadFactory threadFactory = new ThreadFactory() {\n\t\t\tprivate final AtomicInteger threadNumber = new AtomicInteger(1);\n\n\t\t\t@Override\n\t\t\tpublic Thread newThread(final Runnable r) {\n\t\t\t\t// Two-digit counter, used in load test.\n\t\t\t\tint id = threadNumber.getAndIncrement();\n\t\t\t\tString threadName = leftPad(String.valueOf(id), 2, \"0\");\n\t\t\t\tThread th = new Thread(r);\n\t\t\t\tth.setName(threadName);\n\t\t\t\tth.setDaemon(false);\n\t\t\t\treturn th;\n\t\t\t}\n\t\t};\n\t\treturn threadCount >= 0\n\t\t\t\t? Executors.newFixedThreadPool(threadCount, threadFactory)\n\t\t\t\t: Executors.newCachedThreadPool(threadFactory);\n\t}", "public interface ThreadExecutor extends Executor {\n}", "@PostConstruct\r\n\tprivate void init() {\n\t threadPool = Executors.newCachedThreadPool();\r\n\t}", "protected ThreadPool getPool()\r\n {\r\n return threadPool_;\r\n }", "public void testNewSingleThreadExecutor1() {\n final ExecutorService e = Executors.newSingleThreadExecutor();\n try (PoolCleaner cleaner = cleaner(e)) {\n e.execute(new NoOpRunnable());\n e.execute(new NoOpRunnable());\n e.execute(new NoOpRunnable());\n }\n }", "@Override\n public ExecutorService newThreadPool(ThreadPoolProfile profile, ThreadFactory threadFactory) {\n if (profile.isDefaultProfile()) {\n return vertxExecutorService;\n } else {\n return super.newThreadPool(profile, threadFactory);\n }\n }", "public void buttonClickThreadPool(View view) throws InterruptedException {\n count = 0;\n ThreadPoolExecutor mThreadPoolExecutor = new ThreadPoolExecutor(\n NUMBER_OF_CORES + 5, // Initial pool size\n NUMBER_OF_CORES + 8, // Max pool size\n KEEP_ALIVE_TIME, // Time idle thread waits before terminating\n KEEP_ALIVE_TIME_UNIT, // Sets the Time Unit for KEEP_ALIVE_TIME\n new LinkedBlockingDeque<Runnable>()); // Work Queue\n\n Future<Integer> future = mThreadPoolExecutor.submit(mCallable);\n Thread.sleep(200);\n future.cancel(true);\n }", "@RequestMapping(\"/syncAddRedisValue\")\n public void syncAddRedisValue(){\n ExecutorService pool = Executors.newFixedThreadPool(100);\n for(int i = 0 ; i < 100; i++){\n pool.execute(new Runnable() {\n @Override\n public void run() {\n try {\n Thread.currentThread().sleep(4000);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n redisByJedisUtil.incr(\"yang\");\n System.out.println(Thread.currentThread().getName() + \" 执行结束!\");\n }\n });\n }\n pool.shutdown();\n }", "public List<String> runParallelCharacters() throws InterruptedException, ExecutionException {\n ExecutorService executor = Executors.newFixedThreadPool(10);\r\n\r\n // create a list to hold the Future object associated with Callable\r\n List<Future<String>> list = new ArrayList<>();\r\n list.add(executor.submit(new FetchResourceCallable(\"https://dueinator.dk/jwtbackend/api/car/all\")));\r\n executor.shutdown();\r\n List<String> urlStr = new ArrayList<>();\r\n for (Future<String> future : list) {\r\n urlStr.add(future.get());\r\n }\r\n return urlStr;\r\n }", "public static void main(String args[]) {\n\t\t (new Thread(new Threads_and_Executors())).start();\r\n}", "public int getExecutors() {\r\n return executors;\r\n }", "public void testNewCachedThreadPool2() {\n final ExecutorService e = Executors.newCachedThreadPool(new SimpleThreadFactory());\n try (PoolCleaner cleaner = cleaner(e)) {\n e.execute(new NoOpRunnable());\n e.execute(new NoOpRunnable());\n e.execute(new NoOpRunnable());\n }\n }", "int getExecutorLargestPoolSize();", "private Thread[] newThreadArray() { \r\n\t int n_cpus = Runtime.getRuntime().availableProcessors(); \r\n\t return new Thread[n_cpus]; \r\n\t }", "public static void main(String[] args) {\n\t\tBlockingQueue queue = new LinkedBlockingQueue(4);\n\n\t\t// Thread factory below is used to create new threads\n\t\tThreadFactory thFactory = Executors.defaultThreadFactory();\n\n\t\t// Rejection handler in case the task get rejected\n\t\tRejectTaskHandler rth = new RejectTaskHandler();\n\t\t// ThreadPoolExecutor constructor to create its instance\n\t\t// public ThreadPoolExecutor(int corePoolSize,int maximumPoolSize,long\n\t\t// keepAliveTime,\n\t\t// TimeUnit unit,BlockingQueue workQueue ,ThreadFactory\n\t\t// threadFactory,RejectedExecutionHandler handler) ;\n\t\tThreadPoolExecutor threadPoolExecutor = new ThreadPoolExecutor(1, 2, 10L, TimeUnit.MILLISECONDS, queue,\n\t\t\t\tthFactory, rth);\n\n\t\tfor (int i = 1; i <= 10; i++) {\n\t\t\tDataFileReader df = new DataFileReader(\"File \" + i);\n\t\t\tSystem.out.println(\"A new file has been added to read : \" + df.getFileName());\n\t\t\t// Submitting task to executor\n\t\t\tthreadPoolExecutor.execute(df);\n\t\t}\n\t\tthreadPoolExecutor.shutdown();\n\t}", "public static void main(String[] args)\n {\n Runnable r1 = new Task1();\n // Creates Thread task\n Task2 r2 = new Task2();\n ExecutorService pool = Executors.newFixedThreadPool(MAX_T);\n\n pool.execute(r1);\n r2.start();\n\n // pool shutdown\n pool.shutdown();\n }", "public static void main(String [] args) {\n\t\tExecutorService executor= Executors.newFixedThreadPool(2);\n\t\t\n\t\t//add the tasks that the threadpook executor should run\n\t\tfor(int i=0;i<5;i++) {\n\t\t\texecutor.submit(new Processor(i));\n\t\t}\n\t\t\n\t\t//shutdown after all have started\n\t\texecutor.shutdown();\n\t\t\n\t\tSystem.out.println(\"all submitted\");\n\t\t\n\t\t//wait 1 day till al the threads are finished \n\t\ttry {\n\t\t\texecutor.awaitTermination(1, TimeUnit.DAYS);\n\t\t} catch (InterruptedException e) {\n\t\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\tSystem.out.println(\"all completed\");\n\t\t\n\t}", "public TestInvoker()\n {\n super(new TestClient(), new ThreadPoolExecutorImpl(3));\n }", "public void initialize() {\n service = Executors.newCachedThreadPool();\n }", "private void completionService() {\n ListeningExecutorService executor = MoreExecutors.listeningDecorator(Executors.newFixedThreadPool(numberOfThreadsInThePool));\n ExecutorCompletionService<String> completionService = new ExecutorCompletionService<String>(executor);\n for (final String printRequest : printRequests) {\n// ListenableFuture<String> printer = completionService.submit(new Printer(printRequest));\n completionService.submit(new Printer(printRequest));\n }\n try {\n for (int t = 0, n = printRequests.size(); t < n; t++) {\n Future<String> f = completionService.take();\n System.out.print(f.get());\n }\n } catch (InterruptedException | ExecutionException e) {\n Thread.currentThread().interrupt();\n } finally {\n// if (executor != null) {\n executor.shutdownNow();\n// }\n }\n\n }", "public ThreadPool()\r\n {\r\n // 20 seconds of inactivity and a worker gives up\r\n suicideTime = 20000;\r\n // half a second for the oldest job in the queue before\r\n // spawning a worker to handle it\r\n spawnTime = 500;\r\n jobs = null;\r\n activeThreads = 0;\r\n askedToStop = false;\r\n }", "public CacheThreadPool(final int size)\n {\n synchronized (m_lock)\n {\n m_pool = new PooledThread[size];\n \n // We assume that a list is expanded once it reaches half of its capacity\n // and it doesn't harm if the assumption is wrong.\n m_index = new ArrayList(size + 1 + (size / 2));\n }\n }", "public static void main(String[] args) {\r\n\r\n ExecutorService es = Executors.newFixedThreadPool(100);\r\n for (int i = 0; i < 10; i++) {\r\n es.execute(new Runnable() {\r\n @Override\r\n public void run() {\r\n // l++;\r\n // l--;\r\n l.incrementAndGet();\r\n l.decrementAndGet();\r\n }\r\n });\r\n }\r\n // for (int i = 0; i < 10; i++) {\r\n // es.execute(new Runnable() {\r\n // @Override\r\n // public void run() {\r\n // synchronized (l) {\r\n // l--;\r\n // }\r\n // // l.decrementAndGet();\r\n // }\r\n // });\r\n // }\r\n System.out.println(l);\r\n }", "public static void main(String[] args) {\n\t\tExecutorService es = new Executors.\n\t}", "public static void main(String args[]) {\n\t\tExecutorService executor = Executors.newFixedThreadPool(5);\n\t\t\n\t\t// Create a list to hold the Future object associated with Callable\n\t\tList<Future<String>> futureList = new ArrayList<Future<String>>();\n\n\t\t/**\n\t\t * Create MyCallable instance using Lambda expression which return\n\t\t * the thread name executing this callable task\n\t\t */\n\t\tCallable<String> callable = () -> {\n\t\t\tThread.sleep(2000);\n\t\t\treturn Thread.currentThread().getName();\n\t\t};\n\t\t\n\t\t/**\n\t\t * Submit Callable tasks to be executed by thread pool\n\t\t * Add Future to the list, we can get return value using Future\n\t\t **/\n\t\tfor (int i = 0; i < 20; i++) {\n\t\t\tFuture<String> future = executor.submit(callable);\n\t\t\tfutureList.add(future);\n\t\t}\n\t\t\n\t\t/**\n\t\t * Print the return value of Future, notice the output delay\n\t\t * in console because Future.get() waits for task to get completed\n\t\t **/\n\t\tfor (Future<String> future : futureList) {\n\t\t\ttry {\n\t\t\t\tSystem.out.println(new Date() + \" | \" + future.get());\n\t\t\t} catch (InterruptedException | ExecutionException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\t// shut down the executor service.\n\t\texecutor.shutdown();\n\t}", "public static ThreadPool getInstance()\r\n {\r\n if(instance == null)\r\n {\r\n instance = new ThreadPool();\r\n }\r\n return instance;\r\n }", "public static void main(String args[])\n {\n\t ScheduledExecutorService executorService= Executors.newScheduledThreadPool(2);\n\t Runnable task1=new RunnableChild(\"task1\");\n\t Runnable task2=new RunnableChild(\"task2\");\n\t Runnable task3=new RunnableChild(\"task3\");\n\t executorService.submit(task1);\n\t executorService.submit(task2);\n\t executorService.submit(task3);\n\t executorService.schedule(task1,20, TimeUnit.SECONDS);\n\t System.out.println(\"*******shutting down called\");\n\t executorService.shutdown();\n }", "public static void main(String[] args) {\n ExecutorService service = Executors.newCachedThreadPool();\n for (int i = 0; i < 100; i++) {\n service.submit(new Task());\n }\n System.out.println(\"Running Main\" + Thread.currentThread().getName());\n }", "@Override\n\t\t\tprotected void beforeExecute(Thread t, Runnable r) {\n\t\t\t\tint qsize = getQueue().size();\n\t\t\t\tif(initCorePoolSize>0&&getCorePoolSize()<getMaximumPoolSize()\n\t\t\t\t\t&& qsize > 0 && (qsize%divisor) == 0){\n\t\t\t\t\tsetCorePoolSize(getCorePoolSize()+1); // 进行动态增加\n\t\t\t\t}\n\t\t\t}", "public void testCreateThreadPool_0args()\n {\n System.out.println( \"createThreadPool\" );\n ThreadPoolExecutor result = ParallelUtil.createThreadPool();\n ThreadPoolExecutor expected = ParallelUtil.createThreadPool(\n ParallelUtil.OPTIMAL_THREADS );\n assertEquals( expected.getMaximumPoolSize(), result.getMaximumPoolSize() );\n }", "public static void main(String[] args) {\n\n ScheduledExecutorService service = Executors.newScheduledThreadPool(4);\n\n //task to run after 10 seconds delay\n service.schedule(new Task(), 10, TimeUnit.SECONDS);\n\n //task to repeatedly every 10 seconds\n service.scheduleAtFixedRate(new Task(), 15, 10, TimeUnit.SECONDS);\n\n //task to run repeatedly 10 seconds after previous task completes\n service.scheduleWithFixedDelay(new Task(), 15, 10, TimeUnit.SECONDS);\n\n\n for (int i = 0; i < 100; i++) {\n System.out.println(\"task number - \" + i + \" \");\n service.execute(new Task());\n }\n System.out.println(\"Thread name: \" + Thread.currentThread().getName());\n\n }", "public void testNewSingleThreadExecutor2() {\n final ExecutorService e = Executors.newSingleThreadExecutor(new SimpleThreadFactory());\n try (PoolCleaner cleaner = cleaner(e)) {\n e.execute(new NoOpRunnable());\n e.execute(new NoOpRunnable());\n e.execute(new NoOpRunnable());\n }\n }", "private synchronized void execute(TestRunnerThread testRunnerThread) {\n boolean hasSpace = false;\n while(!hasSpace) {\n threadLock.lock();\n try {\n hasSpace = currentThreads.size()<capacity;\n }\n finally {\n threadLock.unlock();\n }\n }\n \n //Adding thread to list and executing it\n threadLock.lock();\n try {\n currentThreads.add(testRunnerThread);\n testRunnerThread.setThreadPoolListener(this);\n Thread thread = new Thread(testRunnerThread);\n //System.out.println(\"Starting thread for \"+testRunnerThread.getTestRunner().getTestName());\n thread.start();\n }\n finally {\n threadLock.unlock();\n }\n }", "public static void main(String[] args) throws InterruptedException,\n ExecutionException {\n ExecutorService executor = Executors\n .newFixedThreadPool(THREAD_POOL_SIZE);\n\n Future future1 = executor.submit(new Counter());\n Future future2 = executor.submit(new Counter());\n\n System.out.println(Thread.currentThread().getName() + \" executing ...\");\n\n //asynchronously get from the worker threads\n System.out.println(future1.get());\n System.out.println(future2.get());\n\n }", "public static void main(String[] args) {\n ThreadPoolExecutor threadPoolExecutor = new ThreadPoolExecutor(threadNum, threadNum, 10L, TimeUnit.SECONDS, linkedBlockingDeque);\n\n final CountDownLatch countDownLatch = new CountDownLatch(NUM);\n\n long start = System.currentTimeMillis();\n\n for (int i = 0; i < NUM; i++) {\n threadPoolExecutor.execute(\n () -> {\n inventory--;\n System.out.println(\"线程执行:\" + Thread.currentThread().getName());\n\n countDownLatch.countDown();\n }\n );\n }\n\n threadPoolExecutor.shutdown();\n\n try {\n countDownLatch.await();\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n\n long end = System.currentTimeMillis();\n System.out.println(\"执行线程数:\" + NUM + \" 总耗时:\" + (end - start) + \" 库存数为:\" + inventory);\n }", "public static void main(String[] args){ new ThreadPoolBlockingServer().processRequests(); }", "ThreadCounterRunner() {}", "@Override\n protected ExecutorService createDefaultExecutorService() {\n return null;\n }", "@Test\n\tpublic void addNormalConcurrentTP10_1000() throws Exception {\n\t\tExecutorService exec = Executors.newFixedThreadPool(10);\n\t\tfinal AtomicInteger count = new AtomicInteger(0);\n\t\t\n\t\tretryManager.registerCallback(new RetryCallback() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic boolean onEvent(RetryHolder retry) throws Exception {\n\t\t\t\t\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}, TYPE);\n\t\t\n\t\tfor (int i=0;i<1000;i++) {\n\t\t\texec.submit(new Runnable() {\n\t\t\t\t\n\t\t\t\t@Override\n\t\t\t\tpublic void run() {\n\t\t\t\t\tRetryHolder holder = new RetryHolder(\"id-local\"+ count.getAndIncrement(), TYPE,new Exception(),\"Object\");\n\t\t\t\t\t\n\t\t\t\t\tretryManager.addRetry(holder);\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t\texec.shutdown();\n\t\texec.awaitTermination(10, TimeUnit.SECONDS);\n\t\tint localQueueSize = retryManager.getLocalQueuer().size(TYPE);\n\t\tAssert.assertEquals(0,localQueueSize);\n\t\tAssert.assertEquals(1000, retryManager.getH1().getMap(TYPE).size() );\n\t\t\t\t\n\t\t//synchronous add, check immediately\t\t\n\t\tfor (int i=0;i<1000;i++ ) {\n\t\t\tAssert.assertNotNull(\n\t\t\t\t\tretryManager.getH1().getMap(TYPE).get(\"id-local\"+i)\n\t\t\t\t\t);\n\t\t\tretryManager.removeRetry(\"id-local\"+i, TYPE);\n\t\t}\n\t\t\n\t}", "int getMaximumPoolSize();", "public void testNewCachedThreadPool3() {\n try {\n ExecutorService e = Executors.newCachedThreadPool(null);\n shouldThrow();\n } catch (NullPointerException success) {}\n }", "Executor getWorkerpool() {\n\t return pool.getWorkerpool();\n\t}", "@Test\n public void testThread() {\n\n Thread thread1 = new Thread(() -> {\n //i++;\n for (int j = 0; j < 2000000; j++) {\n (this.i)++;\n }\n });\n\n Thread thread2 = new Thread(() -> {\n //System.out.println(\"i = \" + i);\n for (int j = 0; j < 2000000; j++) {\n System.out.println(\"i = \" + this.i);\n }\n });\n\n thread1.start();\n thread2.start();\n /*for (int j = 0; j < 20; j++) {\n thread1.start();\n thread2.start();\n }*/\n\n\n /* ValueTask valueTask = new ValueTask();\n PrintTask printTask = new PrintTask();*/\n\n /*for (int i = 0; i < 20; i++) {\n Worker1 worker1 = new Worker1(valueTask);\n Worker2 worker2 = new Worker2(printTask);\n\n worker1.start();\n worker2.start();\n }*/\n\n }" ]
[ "0.7306395", "0.7280557", "0.7155857", "0.7149113", "0.68747926", "0.6836253", "0.6719816", "0.66763794", "0.6573371", "0.6569097", "0.65411454", "0.6531555", "0.65245503", "0.6518193", "0.65083784", "0.6502246", "0.64953816", "0.64498264", "0.64495605", "0.6449142", "0.6415393", "0.6414537", "0.6391628", "0.63457155", "0.632813", "0.6310749", "0.6309145", "0.6298896", "0.6298805", "0.62962586", "0.6291832", "0.62496895", "0.62443286", "0.6225396", "0.6193947", "0.6191412", "0.61904985", "0.6183727", "0.61738247", "0.6161476", "0.6134167", "0.6133836", "0.6131758", "0.61037457", "0.6102515", "0.6097888", "0.60922474", "0.60918605", "0.60734206", "0.60597366", "0.6051794", "0.6044021", "0.6035032", "0.6034567", "0.60337996", "0.60307705", "0.60201174", "0.60100585", "0.59758365", "0.59598756", "0.5951099", "0.59483397", "0.59401494", "0.5931161", "0.592505", "0.592247", "0.5922174", "0.59123725", "0.59010565", "0.589603", "0.5865048", "0.58632886", "0.5856919", "0.5856396", "0.5845237", "0.58423275", "0.58418393", "0.58328384", "0.58167803", "0.5794008", "0.57913387", "0.57882893", "0.57879263", "0.5781696", "0.5780358", "0.5773833", "0.5764588", "0.5752418", "0.57496077", "0.57463294", "0.57452524", "0.57450753", "0.5729597", "0.57230175", "0.5711926", "0.5705425", "0.5703145", "0.5697695", "0.56972307", "0.56957644", "0.56933594" ]
0.0
-1
TODO Autogenerated method stub System.out.println(args[0]);
public static void main(String[] args) { if(args.length != 1) { System.out.println("using : java FileInfo input filename plz"); System.exit(0); } // System.out.println(args[0]); File f = new File(args[0]); int if(f.exists()) { System.out.println("파일이름 : " + f.getName()); System.out.println("파일경로 : " + f.getPath()); System.out.println("현재경로 : " + f.getAbsolutePath()); System.out.println("쓰기여부 : " + f.canWrite()); System.out.println("읽기여부 : " + f.canRead()); System.out.println("파일길이 : " + f.length()); } else { System.out.println(args[0] + " 파일은 논존재하지 않는다."); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void main(String[] args) {\n System.out.println(\"args[0] = \" + args[0]);\n System.out.println(\"args[1] = \" + args[1]);\n System.out.println(\"args[2] = \" + args[2]);\n }", "public static void main(String[] args) {\n\t\tfor (int i =0; i<args.length; i++) {\r\n\t\t\tSystem.out.println(\"args[\"+i+\"]\" + args[i]);\r\n\t\t}\r\n\r\n\t}", "public static void main(String[] args) {\n\t\tfor (int j = 0; j < args.length; j++) {\n\t\t\tSystem.out.println(args[j]);\n\t\t\t\n\t\t}\n\t}", "public static void main(String[] args) {\r\n\t\tfor (int i=0; i<args.length; i++) {\r\n\t\t\tSystem.out.println(args[i]);\r\n\t\t}\r\n\t}", "public static void main(String[] args) {\n\t\t// TODO Auto-generated method stub\n\n\t}", "public static void main(String[] args) {\n\t\t// TODO Auto-generated method stub\n\n\t}", "public static void main(String[] args) {\n\t\t// TODO Auto-generated method stub\n\n\t}", "public static void main(String[] args) {\n\t\t// TODO Auto-generated method stub\n\n\t}", "public static void main(String[] args) {\n\t\t// TODO Auto-generated method stub\n\n\t}", "public static void main (String args[]) {\n\t\t\n }", "public static void main(String[] args) {\r\n\t\t// TODO Auto-generated method stub\r\n\t\t\r\n\t}", "public static void main(String[] args) {\n\n\t\t\n\t\t\n\t}", "public static void main(String[] args) {\n\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t}", "public static void main(String[] args){\n\t\t\n\t\t\n \t}", "public static void main(String[] args) {\n\t\t\r\n\t\t\r\n\r\n\t}", "public static void main(String[] args) {\n\t\t// TODO Auto-generated method stub\n\t}", "public static void main(String[] args) {\n\t\t\n\t\t\n\t\t\n\n\t}", "public static void main(String[] args) {\r\n\t\tfor (int t = 0; t < args.length; t++){\r\n\t\t\tSystem.out.println(\"Argument \" + t + \" is \" + args[t]);\r\n\t\t}\r\n\r\n\t}", "public static void main(String[] args) {\n\n\t\t\n\t}", "public static void main(String[] args){\n\n\t}", "public static void main(String[] args){\n\n\t}", "public static void main(String[] args){\n\n\t}", "public static void main( String[ ] args ) {\r\n\t\t// TODO Auto-generated method stub\r\n\t\t\r\n\t}", "public static void main(String[] args) {\n\t\t\r\n\r\n\t}", "public static void main(String[] args) {\n\t\t\r\n\r\n\t}", "public static void main(String[] args) {\n\t\t\r\n\r\n\t}", "public static void main(String[] args) {\n\t\t\r\n\r\n\t}", "public static void main(String[] args) {\n \n\t\t}", "public static void main (String[] args) {\r\n\t\t \r\n\t\t}", "public static void main(String[] args) {\t\t\n\n\t}", "public static void main(String[] args) {\n\t\t\n\t\t\n\n\t}", "public static void main(String[] args) {\n\t\t\n\t\t\n\t}", "public static void main(String[] args) {\n\t\t\n\t\t\n\t}", "public static void main(String[] args) {\n\t\t\n\t\t\n\t}", "public static void main(String[] args) {\n\t\t\n\t\t\n\t}", "public static void main(String[] args){\n\t\t\r\n\t}", "public static void main(String[] args) {\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t}", "public static void main(String[] args) {\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t}", "public static void main(String[] args) {\n\t\t\r\n\t\tfor(int i=0;i < args.length;i++){\r\n\t\t\tSystem.out.print(args[i] + \" \");\r\n\t\t}\r\n\t\tSystem.out.println();\r\n\t}", "public static void main(String[] args) {\n\t\t\n\t\t\t\n\n\t}", "public static void main(String[] args) {\r\n\t\t\r\n\t\t\r\n\r\n\t}", "public static void main(String[] args) {\n\t\t\n\n\t}", "public static void main(String[] args) {\n\t\t\n\n\t}", "public static void main(String[] args) {\n\t\t\n\n\t}", "public static void main(String[] args) {\n\t\t\n\n\t}", "public static void main(String[] args) {\n\t\t\n\n\t}", "public static void main(String[] args) {\n\t\t\n\n\t}", "public static void main(String[] args) {\n\t\t\n\n\t}", "public static void main(String[] args) {\n \n\n if (args.length > 0) {\n System.out.println(\"Hello \" + args[1]);\n } else {\n \n //args[0] or any number will exception in main - java.lang.ArrayIndexOutOfBoundsException\n //System.out.println(\"args is 0\" + args[1]);\n System.out.println(\"args is 0 \" + args.length);\n }\n\n }", "public static void main(String[] args) {\n if (args == null || args.length != 2) {\n printUsage();\n }\n }", "public static void main(String[] args) {\n\n }", "public static void main(String[] args) {\n\n }", "public static void main(String[] args) {\n \n\t}", "public static void main(String args[]){\n\t\t\n\t}", "public static void main(String[] args) {\n System.out.println(\"Start printing out args: \");\n for(int i = 0; i < args.length; i = i + 1) {\n System.out.println(args[i]);\n }\n }", "public static void main(String[] args) {\n\t \t\n\t \t\n\t }", "public static void main(String[] args) {\n\r\n\t\t\r\n\t\t\r\n\r\n\t}", "public static void main(String[] args) {\n\t\n\t\t\n\n\t}", "public static void main(String[] args) {\n\t\t\r\n\t}", "public static void main(String[] args) {\n\t\t\r\n\t}", "public static void main(String[] args) {\n\t\t\r\n\t}", "public static void main(String[] args) {\n\t\t\r\n\t}", "public static void main(String[] args) {\n\t\t\r\n\t}", "public static void main(String[] args) {\n\t\t\r\n\t}", "public static void main(String[] args) {\n\t\t\r\n\t}", "public static void main(String[] args) {\n\t\t\r\n\t}", "public static void main(String[] args) {\n\t\t\r\n\t}", "public static void main(String[] args) {\n \r\n\t}", "public static void main(String[] args) \n\t{\n\t\t\n\t\n\t\t\n\t}", "public static void main(String[] args) {\n\n\n\t}", "public static void main(String[] args) {\n\n\n\t}", "public static void main(String[] args) {\n\n\n\t}", "public static void main(String[] args) {\r\n\t\t\r\n\t\t\r\n\t}", "public static void main(String args[]){\n\t\t\n\t\n\t}", "public static void main(String[] args) {\t\n\t\t\n\t}", "public static void main(String[] args) {\n\t\t \n\t}", "public static void main(String args[]) {\r\n }", "public static void main(String[] args){\n \t\n }", "public static void main(String[] args) {\n\r\n\t\t\r\n\t\t\r\n\t}", "public static void main(String[] args)\r\t{", "public static void main(String[] args) \n\t{\n\n\t}", "public static void main(String[] args) \n\t{\n\n\t}", "public static void main(String[] args) \n\t{\n\n\t}", "public static void main(String args[]) {\n\n }", "public static void main (String[] args) {\n\t\t\n\t}", "public static void main(final String[] args) {\n\n\t}", "public static void main(String[] args) {\n \n\t}", "public static void main(String[] args) {\n\t\tSystem.out.println(args[0]+\" Technologies \"+args[1]);\r\n\t}", "public static void main(String[] args){\n\t}", "public static void main(String[] args){\n\t}", "public static void main(String[] args){\n\t}", "public static void main(String[] args){\n\t}", "public static void main(String[] args){\n\t}", "public static void main(String[] args){\n\t}", "public static void main(String[] args){\n\t}", "public static void main(String[] args){\n\t}", "public static void main(String[] args) {\n \n\t}", "public static void main(String[] args) {\n\t\r\n\t}", "public static void main(String[] args) {\n \n \n \n\t}", "public static void main(String args[]){\n\t\t\r\n\t}", "public static void main(String[] args) {\r\n\r\n\t}" ]
[ "0.8009967", "0.77192914", "0.76821214", "0.76366824", "0.7635338", "0.7635338", "0.7635338", "0.7635338", "0.7635338", "0.7624561", "0.76025724", "0.7590127", "0.7581282", "0.7571235", "0.7568944", "0.7559567", "0.7555295", "0.75539815", "0.75538534", "0.7550266", "0.7550266", "0.7550266", "0.75468624", "0.7544073", "0.7544073", "0.7544073", "0.7544073", "0.75430256", "0.75428176", "0.75426024", "0.75386167", "0.7531613", "0.7531613", "0.7531613", "0.7531613", "0.7528804", "0.75270504", "0.75270504", "0.7526443", "0.7526249", "0.7514332", "0.7512965", "0.7512965", "0.7512965", "0.7512965", "0.7512965", "0.7512965", "0.7512965", "0.75052124", "0.75033134", "0.75023884", "0.75023884", "0.749722", "0.74969405", "0.74955004", "0.7494535", "0.7493212", "0.7489139", "0.74856025", "0.74856025", "0.74856025", "0.74856025", "0.74856025", "0.74856025", "0.74856025", "0.74856025", "0.74856025", "0.74848664", "0.7484278", "0.74842346", "0.74842346", "0.74842346", "0.74811983", "0.74771065", "0.74736375", "0.7471907", "0.7471503", "0.7470359", "0.7465619", "0.74639034", "0.7462521", "0.7462521", "0.7462521", "0.74583566", "0.74487424", "0.7447627", "0.7445807", "0.74438095", "0.74404013", "0.74404013", "0.74404013", "0.74404013", "0.74404013", "0.74404013", "0.74404013", "0.74404013", "0.7438786", "0.7438721", "0.7435684", "0.74353015", "0.7432419" ]
0.0
-1
sets layout to focused if enter pressed
@Override public boolean onKey(View v, int keyCode, KeyEvent event) { if(keyCode==KeyEvent.KEYCODE_ENTER) { layout.requestFocus(); } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void mouseEntered(MouseEvent e) {\n view.requestFocus();\n }", "@Override\n public boolean onKey(View v, int keyCode, KeyEvent event) {\n if (keyCode == KeyEvent.KEYCODE_ENTER && event.getAction() == KeyEvent.ACTION_UP) {\n //enter key has been pressed and we hide the keyboard\n hideKeyboard();\n editPenalty.setCursorVisible(false);\n rootView.requestFocus();\n //return true to let it know we handled the event\n return true;\n }\n return false;\n }", "@Override\n public boolean onKey(View v, int keyCode, KeyEvent event) {\n if (keyCode == KeyEvent.KEYCODE_ENTER && event.getAction() == KeyEvent.ACTION_UP) {\n //enter key has been pressed and we hide the keyboard\n hideKeyboard();\n editFinish.setCursorVisible(false);\n rootView.requestFocus();\n //return true to let it know we handled the event\n return true;\n }\n return false;\n }", "@Override\r\n\t\t\tpublic void keyPressed(KeyEvent e) {\r\n\t\t\t\tif (e.getKeyCode()==e.VK_ENTER) {\r\n\t\t\t\t\ttfNota.requestFocus();\r\n\t\t\t\t}\r\n\t\t\t}", "public void setFocus();", "public void setFocus() {\n\t}", "void setFocus();", "public static void enterPressesWhenFocused(JButton button)\r\n\t{\t\t\r\n\t button.registerKeyboardAction(\r\n\t button.getActionForKeyStroke(\r\n\t KeyStroke.getKeyStroke(KeyEvent.VK_SPACE, 0, false)), \r\n\t KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0, false), \r\n\t JComponent.WHEN_FOCUSED);\r\n\t \r\n\t button.registerKeyboardAction(\r\n\t button.getActionForKeyStroke(\r\n\t KeyStroke.getKeyStroke(KeyEvent.VK_SPACE, 0, true)), \r\n\t KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0, true), \r\n\t JComponent.WHEN_FOCUSED);\r\n\t}", "@Override\n public boolean onTouch(View v, MotionEvent event) {\n layout.requestFocus();\n return false;\n }", "@Override\n public boolean onTouch(View v, MotionEvent event) {\n layout.requestFocus();\n return false;\n }", "@Override\n public boolean onTouch(View v, MotionEvent event) {\n layout.requestFocus();\n return false;\n }", "public void focus() {}", "public void setFocus() {\n \t\tex.setFocus();\n \t}", "@Override\r\n\tpublic void setFocus() {\r\n\t}", "@Override\n\tpublic void setFocus() {\n\t\t\n\t}", "@Override\n\tpublic void setFocus() {\n\t\t\n\t}", "@Override\n\tpublic void setFocus() {\n\t\t\n\t}", "@Override\n\tpublic void setFocus() {\n\t\t\n\t}", "@Override\n\tpublic void setFocus() {\n\t\t\n\t}", "public void setFocus() {\n }", "@Override\r\n\tpublic void setFocus() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void keyPressed(KeyEvent arg0) {\r\n\t\t\t\tif (arg0.getKeyCode()==arg0.VK_ENTER) {\r\n\t\t\t\t\ttxtFornecedor.requestFocus();\r\n\t\t\t\t}\r\n\t\t\t}", "@Override\n\tpublic void setFocus() {\n\n\t}", "@Override\n\tpublic void setFocus() {\n\n\t}", "@Override\n\tpublic void setFocus() {\n\n\t}", "@Override\n\tpublic void setFocus() {\n\n\t}", "@Override\n public void setFocus() {\n }", "@Override\n\tpublic void setFocus() {\n\t}", "protected void enterPressed()\n\t{\n\t\t// Call the enter method if the enter key was pressed\n\t\tif (showCaret)\n\t\t\tonSubmit(text.getText().substring(0, text.getText().length() - 1));\n\t\telse onSubmit(text.getText());\n\t}", "public void focus() {\n getRoot().requestFocus();\n }", "@Override\r\n\t\t\tpublic void keyPressed(KeyEvent e) {\r\n\t\t\t\tif (e.getKeyCode()==e.VK_ENTER) {\r\n\t\t\t\t\ttfPreco.requestFocus();\r\n\t\t\t\t}\r\n\t\t\t}", "@Override\r\n\tpublic void setFocus() {\n\r\n\t}", "@Override\r\n\tpublic void setFocus() {\n\r\n\t}", "@Override\r\n\tpublic void setFocus() {\n\r\n\t}", "@Override\r\n\tpublic void setFocus() {\n\r\n\t}", "@Override\r\n\tpublic void setFocus() {\n\r\n\t}", "@Override\r\n\tpublic void setFocus() {\n\r\n\t}", "@Override\r\n\tpublic void setFocus() {\n\r\n\t}", "public void keyPressed(KeyEvent e) {\n\t\t\t\tif(e.getKeyCode()==KeyEvent.VK_ENTER){\n\t\t\t\t\te.consume();\n\t\t\t\t\t KeyboardFocusManager.getCurrentKeyboardFocusManager().focusNextComponent();\n\t\t\t\t}\n\t\t\t}", "void addFocus();", "@Override\n public void setFocus()\n {\n this.textInput.setFocus();\n }", "public void setFocus() {\n \t\tviewer.getControl().setFocus();\n \t}", "public void requestFocus() {\n // Not supported for MenuComponents\n }", "@Override\r\npublic void keyReleased(KeyEvent e) {\n\tif(e.getKeyCode()==KeyEvent.VK_ENTER) {\r\n\t\tinput.setEditable(true);\r\n\t}\r\n\t\r\n}", "@Override\n\t\t\tpublic void enter(InputEvent event, float x, float y, int pointer,\n\t\t\t\t\tcom.badlogic.gdx.scenes.scene2d.Actor fromActor) {\n\t\t\t\tgetStage().setScrollFocus(centerPanel);\n\t\t\t}", "@Override\n\t\t\tpublic void handle(KeyEvent event) {\n\t\t\t\tif(event.getCode().equals(KeyCode.ENTER)){\n\t\t\t\t\tPlatform.runLater(()->{dodaj.fire(); sifra.requestFocus();});\n\t\t\t\t}\n\t\t\t}", "@Override\r\n\tpublic void focus() {\r\n\t\tactivate();\r\n\t\ttoFront();\r\n\t}", "public void setFocus() {\n\t\tui.setFocus();\n\t}", "void focus();", "void focus();", "public void setFocus() {\n\t\tviewer.getControl().setFocus();\n\t}", "public void setFocus() {\n\t\tviewer.getControl().setFocus();\n\t}", "public void setFocus() {\n\t\tviewer.getControl().setFocus();\n\t}", "@Override\n\tpublic void enter(ViewChangeEvent event) {\n\t\tuserTextField.focus();\n\t}", "public void setFocus() {\n\t\tthis.viewer.getControl().setFocus();\n\t}", "void requestSearchViewFocus();", "public void Focus() {\n }", "@Override\r\npublic void keyTyped(KeyEvent e) {\n\tif(e.getKeyCode()==KeyEvent.VK_ENTER) {\r\n\t\tinput.setEditable(true);\r\n\t}\r\n}", "public void setFormFocus() {\n\t\tint column = dm.getColSelected();\n\t\tif (rowElements.size() > column) {\n\t\t\tSystem.out.println(\"FormEntryTab.setFormFocus()\");\n\t\t\trowElements.get(column).requestFocusInWindow();\n\t\t}\n\t}", "@Override\r\n\t\t\tpublic void ancestorAdded(AncestorEvent event) {\n\t\t\t\tSwingUtilities.invokeLater(new Runnable() {\r\n\t\t @Override\r\n\t\t public void run() {\r\n\t\t \ttextField_transaction_input.requestFocusInWindow();\r\n\t\t }\r\n\t\t\t\t});\r\n\t\t\t}", "public void setFocus(){\n\t\ttxtText.setFocus(true);\n\t\ttxtText.selectAll();\n\t}", "@Override\r\n\tpublic void setFocus() {\r\n\t\tif (getControl() != null)\r\n\t\t\tgetControl().setFocus();\r\n\t}", "protected void doSetFocus() {\n\t\t// Ignore\n\t}", "public void setFocus() {\n startButton.setFocus();\n }", "private void clickEnter(){\n\t\tString commandInput = textInput.getText();\n\t\tString feedback;\n\n\t\tif (commandIsClear(commandInput)) {\n\t\t\tusedCommands.addFirst(commandInput);\n\t\t\tclearLinkedDisplay();\n\n\t\t} else {\n\t\t\tif (commandInput.trim().isEmpty()) {\n\t\t\t\tfeedback = \"Empty command\";\n\t\t\t} else {\n\t\t\t\ttry {\n\t\t\t\t\tusedCommands.addFirst(commandInput);\n\t\t\t\t\tParser parser = new Parser(commandInput);\n\t\t\t\t\tTask currentTask = parser.parseInput();\n\t\t\t\t\t\n\t\t\t\t\tif (currentTask.getOpCode() == OPCODE.EXIT) {\n\t\t\t\t\t\tWindow frame = findWindow(widgetPanel);\n\t\t\t\t\t\tframe.dispatchEvent(new WindowEvent(frame, WindowEvent.WINDOW_CLOSING));\n\t\t\t\t\t\tframe.dispose();\n\t\t\t\t\t}\n\t\t\t\t\tif (currentTask.getOpCode() == OPCODE.HELP) {\n\t\t\t\t\t\tfeedback = currentTask.getHelpMessage();\n\t\t\t\t\t} else {\n\t\t\t\t\t\tfeedback = GUIAbstract.getLogic().executeTask(currentTask);\n\t\t\t\t\t}\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tfeedback = e.getMessage();\n\t\t\t\t}\n\t\t\t}\n\t\t\tlinkedDisplay.displayFeedback(feedback);\n\t\t\tfor (TasksWidget widget : linkedOptionalDisplays) {\n\t\t\t\twidget.doActionOnClick();\n\t\t\t}\n\t\t}\n\t\tclearTextInput();\n\t}", "void redirectToEnterKey();", "@Override\n public void handle(KeyEvent event) {\n if (event.getCode() == KeyCode.ENTER || kcUp.match(event) || kcDown.match(event)) {\n /*\n * Requests Focus for the first Field in the currently selected Tab.\n */\n getFieldForIndex(tabs.getSelectionModel().getSelectedIndex()).requestFocus();\n /*\n * Checks, if the KeyCombination for Next-Tab is pressed.\n */\n } else if (kcPlus.match(event)) {\n /*\n * Switches to the next Tab to the right (first One, if the rightmost Tab was already \n * selected) and requests Focus for it's first Field.\n */\n tabs.getSelectionModel().select(Math.floorMod(\n tabs.getSelectionModel().getSelectedIndex() + 1, 4));\n getFieldForIndex(tabs.getSelectionModel().getSelectedIndex()).requestFocus();\n /*\n * Checks, if the KeyCombination for Previous-Tab is pressed.\n */\n } else if (kcMinus.match(event)) {\n /*\n * Switches to the next Tab to the left (first One, if the leftmost Tab was already \n * selected) and requests Focus for it's first Field.\n */\n tabs.getSelectionModel().select(Math.floorMod(\n tabs.getSelectionModel().getSelectedIndex() - 1, 4));\n getFieldForIndex(tabs.getSelectionModel().getSelectedIndex()).requestFocus();\n }\n }", "public void requestInputFocus(){\n\t\tuserInput.requestFocus();\n\t}", "private void requestFocus(View view) {\n if (view.requestFocus()) {\n getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_VISIBLE);\n }\n }", "public void focus() {\n if (toSetFocus != null) {\n toSetFocus.requestFocus();\n } else {\n root.requestFocus();\n toSetFocus = null;\n }\n }", "@Override\r\n\t\t\t\t\t\t\tpublic void ancestorAdded(AncestorEvent event) {\n\t\t\t\t\t\t\tSwingUtilities.invokeLater(new Runnable() {\r\n\t\t\t\t\t\t\t\t\t@Override\r\n\t\t\t\t\t\t\t\t\tpublic void run() {\r\n\t\t\t\t\t\t\t\t\t\ttextField_search_input.requestFocusInWindow();\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\t}", "public void focus() {\n\t\tJWLC.nativeHandler().wlc_output_focus(this.to());\n\t}", "public void setEditTextFocus (Activity a, EditText e) {\n if (e.requestFocus()) {\n a.getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_VISIBLE);\n }\n }", "@Override\r\n\tpublic boolean isFocused() {\n\t\treturn false;\r\n\t}", "void resetFocus();", "void resetFocus();", "public void keyPressed(KeyEvent e) {\n if (e.getKeyCode()==KeyEvent.VK_ENTER){\n enter();\n } \n }", "public void setFocus() {\n\t\tcompositeQueryTree.setFocus();\n\t}", "protected void gainFocus(){\r\n\t\twidgetModifyFacade.changeVersatilePane(this);\r\n\t\twidgetModifyFacade.gainedFocusSignal(this);\r\n\t//\tthis.setId(\"single-image-widget-selected\");\r\n\t}", "@Override\n public void requestFocus() {\n\tif (term != null) {\n\t //term.requestActive(); // Not implemented yet\n\t // TEMPORARY\n\t // boolean result = term.requestFocusInWindow();\n\t term.requestFocus();\n\t}\n }", "public void actionPerformed(ActionEvent e){\n repaint();\n requestFocus();\n }", "public void requestFocus()\n {\n super.requestFocus();\n field.requestFocus();\n }", "@Override\n public void onClick(View view) {\n // clear and set the focus on this viewgroup\n this.clearFocus();\n this.requestFocus();\n // now, the focus listener in Activity will handle\n // the focus change state when this layout is clicked\n }", "@FXML\n\tprivate void onKeyReleased(KeyEvent e) {\n\t\tif (e.getCode() == KeyCode.ENTER)\n\t\t\tanswerQuestion();\n\t}", "@Override\r\n\t\t\tpublic void ancestorAdded(AncestorEvent event) {\n\t\t\t\tSwingUtilities.invokeLater(new Runnable() {\r\n\t\t @Override\r\n\t\t public void run() {\r\n\t\t textField_productID_input.requestFocusInWindow();\r\n\t\t }\r\n\t\t });\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void keyPressed(KeyEvent e) {\r\n\t\t\t\tif (e.getKeyCode()==e.VK_ENTER) {\r\n\t\t\t\t\ttfCNPJ.requestFocus();\r\n\t\t\t\t}\r\n\t\t\t}", "@Override\n\t\tpublic boolean onKey(View v, int keyCode, KeyEvent event) {\n\t\t\trefreshData(mAutoEdit.getText().toString().trim());\n\n\t\t\tif (keyCode == KeyEvent.KEYCODE_ENTER) {\n\n\t\t\t\tInputMethodManager imm = (InputMethodManager) v.getContext().getSystemService(Context.INPUT_METHOD_SERVICE);\n\n\t\t\t\tif (imm.isActive()) {\n\n\t\t\t\t\timm.hideSoftInputFromWindow(v.getApplicationWindowToken(), 0);\n\n\t\t\t\t}\n\n\t\t\t\treturn true;\n\n\t\t\t}\n\n\t\t\treturn false;\n\n\t\t}", "@Override\n\tpublic void keyPressed(KeyEvent e)\n\t{\n\t\t//\telse if (e.getSource() == tfOrt && e.getKeyCode() == KeyEvent.VK_ENTER && tfOrt.getText().length() > 0) \n\t\t//\tkbFocusManager.focusNextComponent();\n\t\t\n\t\tif (e.getSource() == tbTypMusic && e.getKeyCode() == KeyEvent.VK_ENTER && tbTypMusic.getText().length() > 0) \n\t\t\tkbFocusManager.focusNextComponent();\n\t\telse if (e.getSource() == tbAuthor && e.getKeyCode() == KeyEvent.VK_ENTER && tbAuthor.getText().length() > 0) \n\t\t\tkbFocusManager.focusNextComponent();\n\t\telse if (e.getSource() == tbCD_Name && e.getKeyCode() == KeyEvent.VK_ENTER && tbCD_Name.getText().length() > 0) \n\t\t\tkbFocusManager.focusNextComponent();\n\t\telse if (e.getSource() == tbSong_Name && e.getKeyCode() == KeyEvent.VK_ENTER && tbSong_Name.getText().length() > 0) \n\t\t\tkbFocusManager.focusNextComponent();\n\t\telse if (e.getSource() == tbCountry && e.getKeyCode() == KeyEvent.VK_ENTER && tbCountry.getText().length() > 0) \n\t\t\tkbFocusManager.focusNextComponent();\n\t\t\n\t}", "@Override\n\t\t\tpublic void keyPressed(KeyEvent e) {\n\t\t\t\tif (e.getKeyCode() == KeyEvent.VK_ENTER) {\n\t\t\t\t\tsbt_jbt.doClick();\n\t\t\t\t}\n\t\t\t}", "protected void doSetFocus() {\n \t\tif (getText() != null) {\n \t\t\tgetText().selectAll();\n \t\t\tgetText().setFocus();\n \t\t\tcheckSelection();\n \t\t\tcheckDeleteable();\n \t\t\tcheckSelectable();\n \t\t}\n \t}", "public void setEnterAction(OnEnter et){\n this.enterText = et;\n }", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent me) {\n\t\t\t\trequestFocusInWindow();\n\t\t\t}", "public void keyPressed(KeyEvent e) {\r\n\r\n\t\tif (getAceptarKeyLikeTabKey()) {\r\n\t\t\tint key = e.getKeyCode();\r\n\t\t\tif (key == KeyEvent.VK_ENTER) {\r\n\t\t\t\ttransferFocus();\r\n\t\t\t}\r\n\t\t}\r\n\t}", "@Override\n public boolean onKey(View v, int keyCode, KeyEvent event) {\n if (keyCode == KeyEvent.KEYCODE_ENTER && event.getAction() == KeyEvent.ACTION_UP) {\n //enter key has been pressed and we hide the keyboard\n hideKeyboard();\n //return true to let it know we handled the event\n return true;\n }\n return false;\n }", "@Override\n\tprotected void handleFocus (Context context, boolean focus) {\n\t\tif (focus) context.requestFocus();\n\t}", "public void keyPressed(KeyEvent e) {\n if(e.getKeyCode()==KeyEvent.VK_ENTER){\n\n }\n }", "@Override\n public void setFocus() {\n if (!modes.get(BCOConstants.F_SHOW_ANALYZER)) {\n if (textViewer != null) {\n textViewer.getTextWidget().setFocus();\n }\n } else {\n if (tableControl != null) {\n tableControl.setFocus();\n }\n }\n }", "public abstract @Nullable View getKeyboardFocusView();", "@Override\r\n public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {\n sendFocusToJail();\r\n\r\n return false;\r\n }", "public void setFocus() {\r\n\t\tIFormPart part = _parts.get(0);\r\n\t\tif ( part != null ) part.setFocus();\r\n\t}" ]
[ "0.7003682", "0.6851449", "0.68018436", "0.66881067", "0.6663253", "0.6645273", "0.6617965", "0.656932", "0.65664905", "0.65664905", "0.65664905", "0.65663", "0.654991", "0.6542241", "0.65246487", "0.65246487", "0.65246487", "0.65246487", "0.65246487", "0.6523315", "0.65190744", "0.6498086", "0.64761686", "0.64761686", "0.64761686", "0.64761686", "0.6465022", "0.6449687", "0.64406335", "0.6432715", "0.6430561", "0.6403937", "0.6403937", "0.6403937", "0.6403937", "0.6403937", "0.6403937", "0.6403937", "0.63977706", "0.63916445", "0.6388599", "0.6316819", "0.63118166", "0.6286587", "0.62722296", "0.6268083", "0.6263998", "0.62569374", "0.6230971", "0.6230971", "0.62276125", "0.62276125", "0.62276125", "0.6182723", "0.61643887", "0.6154284", "0.61378545", "0.61207104", "0.60985297", "0.60820276", "0.6077611", "0.6074567", "0.60726464", "0.60148704", "0.6014103", "0.60109794", "0.6008903", "0.6003226", "0.59936917", "0.59930927", "0.5987825", "0.5983651", "0.5980871", "0.5962092", "0.5958445", "0.5958445", "0.59581006", "0.59510595", "0.59483653", "0.59449226", "0.5920697", "0.5918901", "0.59187067", "0.59175277", "0.59168524", "0.58996946", "0.58821106", "0.58644056", "0.58419806", "0.58329886", "0.58119285", "0.5800341", "0.5799855", "0.57970524", "0.5782973", "0.57661986", "0.57542324", "0.573131", "0.57042754", "0.5698535" ]
0.7619127
0
sets layout to focused if layout pressed
@Override public boolean onTouch(View v, MotionEvent event) { layout.requestFocus(); return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setFocus() {\n\t}", "public void setFocus();", "public void setFocused(boolean focused);", "void setFocus();", "public void focus() {}", "public void setFocus() {\n }", "@Override\n public void onClick(View view) {\n // clear and set the focus on this viewgroup\n this.clearFocus();\n this.requestFocus();\n // now, the focus listener in Activity will handle\n // the focus change state when this layout is clicked\n }", "@Override\r\n\tpublic void setFocus() {\r\n\t}", "@Override\n\tpublic void setFocus() {\n\t\t\n\t}", "@Override\n\tpublic void setFocus() {\n\t\t\n\t}", "@Override\n\tpublic void setFocus() {\n\t\t\n\t}", "@Override\n\tpublic void setFocus() {\n\t\t\n\t}", "@Override\n\tpublic void setFocus() {\n\t\t\n\t}", "public void setFocus() {\n \t\tviewer.getControl().setFocus();\n \t}", "protected void gainFocus(){\r\n\t\twidgetModifyFacade.changeVersatilePane(this);\r\n\t\twidgetModifyFacade.gainedFocusSignal(this);\r\n\t//\tthis.setId(\"single-image-widget-selected\");\r\n\t}", "@Override\r\n\tpublic void setFocus() {\n\t\t\r\n\t}", "@Override\n\tpublic void setFocus() {\n\n\t}", "@Override\n\tpublic void setFocus() {\n\n\t}", "@Override\n\tpublic void setFocus() {\n\n\t}", "@Override\n\tpublic void setFocus() {\n\n\t}", "public void setFocus() {\n\t\tui.setFocus();\n\t}", "public void setFocus() {\n \t\tex.setFocus();\n \t}", "@Override\n\tpublic void setFocus() {\n\t}", "public void focus() {\n if (toSetFocus != null) {\n toSetFocus.requestFocus();\n } else {\n root.requestFocus();\n toSetFocus = null;\n }\n }", "public void setFocus() {\n\t\tviewer.getControl().setFocus();\n\t}", "public void setFocus() {\n\t\tviewer.getControl().setFocus();\n\t}", "public void setFocus() {\n\t\tviewer.getControl().setFocus();\n\t}", "@Override\n public void setFocus() {\n }", "@Override\r\n\tpublic void focus() {\r\n\t\tactivate();\r\n\t\ttoFront();\r\n\t}", "@Override\r\n\tpublic void setFocus() {\n\r\n\t}", "@Override\r\n\tpublic void setFocus() {\n\r\n\t}", "@Override\r\n\tpublic void setFocus() {\n\r\n\t}", "@Override\r\n\tpublic void setFocus() {\n\r\n\t}", "@Override\r\n\tpublic void setFocus() {\n\r\n\t}", "@Override\r\n\tpublic void setFocus() {\n\r\n\t}", "@Override\r\n\tpublic void setFocus() {\n\r\n\t}", "public void setFocus() {\n startButton.setFocus();\n }", "void focus();", "void focus();", "public void focus() {\n getRoot().requestFocus();\n }", "public void setFocus() {\n\t\tthis.viewer.getControl().setFocus();\n\t}", "public void requestFocus() {\n // Not supported for MenuComponents\n }", "@Override\n public void setFocus()\n {\n this.textInput.setFocus();\n }", "public void Focus() {\n }", "private void setFocus() {\n\t\tif (held) {\n\t\t\tfocus.x = img.getWidth() / 2;\n\t\t\tfocus.y = img.getHeight();\n\t\t} else {\n\t\t\tfocus.x = img.getWidth();\n\t\t\tfocus.y = img.getHeight() /2;\n\t\t} // end else\n\t}", "public void focus() {\n\t\tJWLC.nativeHandler().wlc_output_focus(this.to());\n\t}", "private void toggle_focus() {\n\t\ttry {\n\t\t\tif (!lock_autofocus) {\n\t\t\t\t//getCameraManager().requestAutoFocus(handler, R.id.auto_focus);\n\t\t\t\t\n\t\t\t\tlockAutoFocus.setBackgroundResource(R.drawable.eye_selected);\n\t\t\t} else {\n\t\t\t\tlockAutoFocus.setBackgroundResource(R.drawable.eye);\n\t\t\t\tstatusView.setText(getString(R.string.set_focus));\n\t\t\t\tCommonValues.getInstance().CameraMessage = CameraMessageStatus.Stopped;\n\t\t\t //getCameraManager().requestAutoFocus(handler, R.id.auto_focus);\n\t\t\t\t\n\t\t\t}\n\t\t\tlock_autofocus = !lock_autofocus;\n\t\t\tcameraManager.setAutoFocus(lock_autofocus);\n\t\t} catch (Exception oEx) {\n\n\t\t}\n\t}", "@Override\r\n\tpublic boolean isFocused() {\n\t\treturn false;\r\n\t}", "@Override\n public void setFocused()\n {\n setImage(\"MinusFocused.png\");\n }", "public void setFocus() {\n\t\tcompositeQueryTree.setFocus();\n\t}", "public void setFocus(){\n\t\ttxtText.setFocus(true);\n\t\ttxtText.selectAll();\n\t}", "void addFocus();", "@Override\r\n\tpublic void setFocus() {\r\n\t\tif (getControl() != null)\r\n\t\t\tgetControl().setFocus();\r\n\t}", "private void changeToPhotoFocusDoneView(Boolean bl) {\n this.changeLayoutTo(DefaultLayoutPattern.FOCUS_DONE);\n if (!this.isHeadUpDesplayReady()) {\n return;\n }\n super.changeToPhotoFocusView();\n if (this.mCapturingMode.isFront()) return;\n this.mFocusRectangles.onAutoFocusDone(bl);\n }", "private void changeFocus() {\n focusChange(etTitle, llTitle, mActivity);\n focusChange(etOriginalPrice, llOriginalPrice, mActivity);\n focusChange(etTotalItems, llTotalItems, mActivity);\n focusChange(etDescription, llDescription, mActivity);\n }", "public void setFocus() {\r\n\t\tIFormPart part = _parts.get(0);\r\n\t\tif ( part != null ) part.setFocus();\r\n\t}", "@Override\n public void setFocus() {\n if (!modes.get(BCOConstants.F_SHOW_ANALYZER)) {\n if (textViewer != null) {\n textViewer.getTextWidget().setFocus();\n }\n } else {\n if (tableControl != null) {\n tableControl.setFocus();\n }\n }\n }", "private void requestFocus(View view) {\n if (view.requestFocus()) {\n getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_VISIBLE);\n }\n }", "protected void doSetFocus() {\n\t\t// Ignore\n\t}", "@Override\n public boolean onKey(View v, int keyCode, KeyEvent event) {\n if(keyCode==KeyEvent.KEYCODE_ENTER) {\n layout.requestFocus();\n }\n return false;\n }", "void setFocus( ChatTarget focus );", "public void setFocus() {\n \n selectionAction = FINISHED_SELECTION;\n if (recordForm != null) {\n recordForm.setFocusAt(currentColumn);\n }\n selectionAction = WAITING_ON_SELECTION;\n \n }", "public void setFormFocus() {\n\t\tint column = dm.getColSelected();\n\t\tif (rowElements.size() > column) {\n\t\t\tSystem.out.println(\"FormEntryTab.setFormFocus()\");\n\t\t\trowElements.get(column).requestFocusInWindow();\n\t\t}\n\t}", "private void changeToPhotoFocusSearchView() {\n this.changeLayoutTo(DefaultLayoutPattern.FOCUS_SEARCHING);\n if (!this.isHeadUpDesplayReady()) {\n return;\n }\n this.changeToPhotoFocusView();\n if (this.mCapturingMode.isFront()) return;\n this.mFocusRectangles.onAutoFocusStarted();\n }", "@Override\n\tprotected void handleFocus (Context context, boolean focus) {\n\t\tif (focus) context.requestFocus();\n\t}", "public void setFocus(boolean focus) {\n if (focus) {\n getContainerElement().focus();\n } else {\n getContainerElement().blur();\n }\n }", "public void mouseClicked(MouseEvent e){\n\r\n TShapePanel.this.requestFocus(); //Aug 06\r\n\r\n }", "public void setFocused(boolean value) {\n getPolymerElement().setFocused(value);\n }", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent me) {\n\t\t\t\trequestFocusInWindow();\n\t\t\t}", "@Override\n public void mouseEntered(MouseEvent e) {\n view.requestFocus();\n }", "public void requestInputFocus(){\n\t\tuserInput.requestFocus();\n\t}", "public void setFocused(boolean focused) {\n/* 822 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "void resetFocus();", "void resetFocus();", "void requestSearchViewFocus();", "private void focusChange(EditText editText, final LinearLayout linearLayout, final Activity activity) {\n\n editText.setOnFocusChangeListener(new View.OnFocusChangeListener() {\n @Override\n public void onFocusChange(View view, boolean hasFocus) {\n if (hasFocus) {\n linearLayout.setBackgroundColor(ContextCompat.getColor(activity, R.color.colorCreateDealSelected));\n selectDeselectNewPrice(false);\n } else\n linearLayout.setBackgroundColor(ContextCompat.getColor(activity, R.color.colorWhite));\n if (!hasFocus) {\n if (activity.getCurrentFocus() != null) {\n InputMethodManager inputMethodManager = (InputMethodManager) activity.getApplicationContext().getSystemService(Context.INPUT_METHOD_SERVICE);\n inputMethodManager.hideSoftInputFromWindow(activity.getCurrentFocus().getWindowToken(), InputMethodManager.HIDE_NOT_ALWAYS);\n }\n }\n }\n });\n }", "public void requestFocus()\n {\n super.requestFocus();\n field.requestFocus();\n }", "private void requestDefaultFocus() {\r\n if( getFunctionType() == TypeConstants.DISPLAY_MODE ){\r\n ratesBaseWindow.btnCancel.requestFocus();\r\n }else {\r\n ratesBaseWindow.btnOK.requestFocus();\r\n }\r\n }", "@Focus\n\tpublic void setFocus() \n\t{\n\t\t\tfor(int r = Board.LENGTH - 1; r >= 0; r--)\n\t\t\t{\t\n\t\t\t\t\tfor(int c=0;c<Board.LENGTH;c++)\n\t\t\t\t\t{\t\n\t\t\t\t\t\tsquares[r][c+1].setBackground(Display.getDefault().getSystemColor(SWT.COLOR_DARK_GRAY));\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\tif(((Square) squares[r][c+1].getData()).isLegal())//It returns the legal attribute wrong\n\t\t\t\t\t\t{squares[r][c+1].setBackground(Display.getDefault().getSystemColor(SWT.COLOR_YELLOW));}\n\t\t\t\t\t\t\n\t\t\t\t\t\tPiece piece = ((Square) squares[r][c+1].getData()).getPiece();\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(piece == null)\t\n\t\t\t\t\t\t\tsquares[r][c+1].setImage(IconHandler.getBlankIcon());\t\t\t\t\t\t\t\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tsquares[r][c+1].setImage(piece.getIcon());\t\t\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t}\t\t\n\t}", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\t\trequestFocusInWindow();\n\t\t\t}", "protected void doSetFocus() {\n \t\tif (getText() != null) {\n \t\t\tgetText().selectAll();\n \t\t\tgetText().setFocus();\n \t\t\tcheckSelection();\n \t\t\tcheckDeleteable();\n \t\t\tcheckSelectable();\n \t\t}\n \t}", "public void setTextPanelFocused(boolean focused)\r\n\t{\r\n\t\t\r\n\t}", "public void setEditTextFocus (Activity a, EditText e) {\n if (e.requestFocus()) {\n a.getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_VISIBLE);\n }\n }", "public void actionPerformed(ActionEvent e){\n repaint();\n requestFocus();\n }", "public void setFocusedIndex(int i)\n {\n focusedIndex = i;\n }", "public ControlArbAppFocus () {\n inputManager = InputManager3D.getInputManager();\n }", "public abstract @Nullable View getKeyboardFocusView();", "public void tryLockFocus() {\n }", "@Override\n public void requestFocus() {\n\tif (term != null) {\n\t //term.requestActive(); // Not implemented yet\n\t // TEMPORARY\n\t // boolean result = term.requestFocusInWindow();\n\t term.requestFocus();\n\t}\n }", "protected void paintFocus(Graphics g, AbstractButton b, Rectangle viewRect, Rectangle textRect, Rectangle iconRect){\n }", "protected void onFocusGained()\n {\n ; // do nothing. \n }", "boolean isFocused() {\n\t\tif (state != State.ROTATE)\n\t\t\treturn true;\n\t\telse\n\t\t\treturn false;\n\t}", "@Override\n public void setLayout(Layout layout) {\n checkWidget();\n return;\n }", "public void setFocus() {\n \t\t// set initial focus to the URL text combo\n \t\turlCombo.setFocus();\n \t}", "@Override\n\t\t\tpublic void onFocusChange(View button, boolean isFocus) {\n\t\t\t\tif(isFocus){\n\t\t\t\t\tbutton.setBackgroundColor(getResources().getColor(R.color.blue));\n\t\t\t\t}else \n\t\t\t\t\tbutton.setBackground(getResources().getDrawable(R.drawable.button_style)); \n\t\t\t}", "public void resetFocus() {\n toSetFocus = null;\n focusOn = null;\n }", "@Override\r\n\tpublic void windowActivated(WindowEvent e) {\n\t\tsetFocusableWindowState(true);\r\n\t}", "public void requestFocus() {\n\n if (MyTextArea != null)\n MyTextArea.requestFocus();\n\n }" ]
[ "0.70400697", "0.70005006", "0.6989401", "0.69741046", "0.69394106", "0.68516403", "0.679961", "0.6752377", "0.67503595", "0.67503595", "0.67503595", "0.67503595", "0.67503595", "0.67446595", "0.6737927", "0.67350996", "0.67313516", "0.67313516", "0.67313516", "0.67313516", "0.6725222", "0.66934097", "0.6675864", "0.6640247", "0.6629592", "0.6629592", "0.6629592", "0.6629118", "0.66211534", "0.6611068", "0.6611068", "0.6611068", "0.6611068", "0.6611068", "0.6611068", "0.6611068", "0.6600209", "0.65904254", "0.65904254", "0.6590416", "0.6565656", "0.65641046", "0.64941597", "0.6441498", "0.6407515", "0.6406232", "0.6383589", "0.63594306", "0.6329223", "0.6308156", "0.6290515", "0.6285557", "0.6282051", "0.62659997", "0.6257708", "0.6215032", "0.6183934", "0.6161773", "0.6153794", "0.6067934", "0.6067907", "0.6066396", "0.6056977", "0.6022672", "0.6019387", "0.6017109", "0.59881234", "0.5977858", "0.5967286", "0.59645355", "0.58999616", "0.5830359", "0.5802583", "0.5802583", "0.5800901", "0.5785785", "0.578087", "0.57553047", "0.5752243", "0.5751511", "0.5749528", "0.5745645", "0.57346153", "0.56971794", "0.5690362", "0.5683284", "0.5676333", "0.5661739", "0.56603414", "0.5640239", "0.5638023", "0.5627374", "0.5587538", "0.55695766", "0.5564165", "0.555443", "0.5530142", "0.5529037" ]
0.72156304
0
sets layout to focused if alarmTimeButton pressed
@Override public boolean onTouch(View v, MotionEvent event) { layout.requestFocus(); return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void onClick(View view) {\n calendar.set(Calendar.HOUR_OF_DAY, tp.getHour());\n calendar.set(Calendar.MINUTE, tp.getMinute());\n\n //get int value of timepicker selected time\n int hour = tp.getHour();\n int minute = tp.getMinute();\n\n String hour_string = String.valueOf(hour);\n String minute_string = String.valueOf(minute);\n\n if (hour > 12) {\n hour_string = String.valueOf(hour - 12);\n }\n\n if (minute < 10) {\n minute_string = \"0\" + String.valueOf(minute);\n }\n\n //update status box method\n alarm_text(\"Alarm set for \" + hour_string + \":\" + minute_string);\n //put extra string in my_intent\n //tells clock \"set alarm\" button pressed\n my_intent.putExtra(\"extra\", \"alarm on\");\n //create pending intent that delays intent until user selects time\n pending_intent = PendingIntent.getBroadcast(AlarmClock.this, 0, my_intent, PendingIntent.FLAG_UPDATE_CURRENT);\n //set alarm manager\n am.set(AlarmManager.RTC_WAKEUP, calendar.getTimeInMillis(), pending_intent);\n }", "public void viewAlarm() {\n\t\tfinal Dialog dialog = new Dialog(this);\n\t\tdialog.setContentView(R.layout.date_time_picker);\n\t\tdialog.setTitle(\"Set Reminder\");\n\t\tButton saveDate = (Button)dialog.findViewById(R.id.btnSave);\n\t\tsaveDate.setOnClickListener(new OnClickListener() {\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tdialog.dismiss();\n\t\t\t\tsetAlarm(dialog);\n\t\t\t}\n\t\t});\n\t\tdialog.show();\n\t}", "@Override\n protected void startCreatingAlarm() {\n mSelectedAlarm = null;\n AlarmUtils.showTimeEditDialog(getChildFragmentManager(),\n null, AlarmClockFragmentPreL.this, DateFormat.is24HourFormat(getActivity()));\n }", "private void selectTime() {\n Calendar calendar = Calendar.getInstance();\n int hour = calendar.get(Calendar.HOUR_OF_DAY);\n int minute = calendar.get(Calendar.MINUTE);\n TimePickerDialog timePickerDialog = new TimePickerDialog(this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker timePicker, int i, int i1) {\n timeTonotify = i + \":\" + i1; //temp variable to store the time to set alarm\n mTimebtn.setText(FormatTime(i, i1)); //sets the button text as selected time\n }\n }, hour, minute, false);\n timePickerDialog.show();\n }", "@Override\n public void onClick(View v) {\n Calendar mcurrentTime = Calendar.getInstance();\n int hour = mcurrentTime.get(Calendar.HOUR_OF_DAY);\n int minute = mcurrentTime.get(Calendar.MINUTE);\n TimePickerDialog mTimePicker;\n mTimePicker = new TimePickerDialog(AddRDV.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker timePicker, int selectedHour, int selectedMinute) {\n editTextHeur.setText(String.format(\"%02d\",selectedHour) + \":\" + String.format(\"%02d\" ,selectedMinute)+\":\"+\"00\");\n }\n }, hour, minute, true);//Yes 24 hour time\n mTimePicker.setTitle(\"Select time of your appointment\");\n mTimePicker.show();\n\n }", "public void initializeTime() {\n hour = cal.get(Calendar.HOUR);\n min = cal.get(Calendar.MINUTE);\n\n time = (EditText) findViewById(R.id.textSetTime);\n time.setInputType(InputType.TYPE_NULL);\n\n //Set EditText text to be current time\n if(min < 10) {\n time.setText(hour + \":0\" + min);\n } else {\n time.setText(hour + \":\" + min);\n }\n\n time.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n picker = new TimePickerDialog(ControlCenterActivity.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker timePicker, int i, int i1) {\n if(i1 < 10) {\n time.setText(i + \":0\" + i1);\n } else {\n time.setText(i + \":\" + i1);\n }\n }\n }, hour, min, false);\n\n picker.show();\n }\n });\n }", "@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog24 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t24Hour24 = hourOfDay1;\n t24Minute24 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t24Hour24, t24Minute24);\n //set selected time on text view\n\n\n timeE12 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editETime12.setText(timeE12);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog24.updateTime(t24Hour24, t24Minute24);\n //show dialog\n timePickerDialog24.show();\n }", "@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tflag = 1;\n\t\t\t\tshowDialog(TIME_DIALOG_ID);\n\t\t\t}", "private void reactMain_region_digitalwatch_Display_refreshing_RefreshingTime_timeView_showAlarm() {\n\t\tif (sCIButtons.topLeftPressed) {\n\t\t\tswitch (stateVector[1]) {\n\t\t\t\tcase main_region_digitalwatch_Display_refreshing_RefreshingTime_timeView_showAlarm :\n\t\t\t\t\tnextStateIndex = 1;\n\t\t\t\t\tstateVector[1] = State.$NullState$;\n\n\t\t\t\t\ttimer.unsetTimer(this, 1);\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase main_region_digitalwatch_Display_refreshing_RefreshingTime_timeView_hideAlarm :\n\t\t\t\t\tnextStateIndex = 1;\n\t\t\t\t\tstateVector[1] = State.$NullState$;\n\n\t\t\t\t\ttimer.unsetTimer(this, 2);\n\t\t\t\t\tbreak;\n\n\t\t\t\tdefault :\n\t\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\ttimer.setTimer(this, 3, 250, false);\n\n\t\t\tsCIDisplay.operationCallback.refreshChronoDisplay();\n\n\t\t\tsCILogicUnit.operationCallback.getChrono();\n\n\t\t\tnextStateIndex = 1;\n\t\t\tstateVector[1] = State.main_region_digitalwatch_Display_refreshing_RefreshingChrono;\n\t\t} else {\n\t\t\tif (sCIButtons.bottomLeftPressed) {\n\t\t\t\tnextStateIndex = 1;\n\t\t\t\tstateVector[1] = State.$NullState$;\n\n\t\t\t\ttimer.unsetTimer(this, 1);\n\n\t\t\t\ttimer.setTimer(this, 2, 1 * 1000, false);\n\n\t\t\t\tsCIDisplay.operationCallback.refreshTimeDisplay();\n\n\t\t\t\tsCIDisplay.operationCallback.refreshDateDisplay();\n\n\t\t\t\tnextStateIndex = 1;\n\t\t\t\tstateVector[1] = State.main_region_digitalwatch_Display_refreshing_RefreshingTime_timeView_hideAlarm;\n\t\t\t} else {\n\t\t\t\tif (timeEvents[1]) {\n\t\t\t\t\tnextStateIndex = 1;\n\t\t\t\t\tstateVector[1] = State.$NullState$;\n\n\t\t\t\t\ttimer.unsetTimer(this, 1);\n\n\t\t\t\t\ttimer.setTimer(this, 1, 1 * 1000, false);\n\n\t\t\t\t\tsCIDisplay.operationCallback.refreshTimeDisplay();\n\n\t\t\t\t\tsCIDisplay.operationCallback.refreshDateDisplay();\n\n\t\t\t\t\tsCIDisplay.operationCallback.refreshAlarmDisplay();\n\n\t\t\t\t\tnextStateIndex = 1;\n\t\t\t\t\tstateVector[1] = State.main_region_digitalwatch_Display_refreshing_RefreshingTime_timeView_showAlarm;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog25 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t25Hour25 = hourOfDay1;\n t25Minute25 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t25Hour25, t25Minute25);\n //set selected time on text view\n\n\n timeS13 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editSTime13.setText(timeS13);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog25.updateTime(t25Hour25, t25Minute25);\n //show dialog\n timePickerDialog25.show();\n }", "@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog48 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t48Hour48 = hourOfDay1;\n t48Minute48 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t48Hour48, t48Minute48);\n //set selected time on text view\n\n\n timeE24 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editETime24.setText(timeE24);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog48.updateTime(t48Hour48, t48Minute48);\n //show dialog\n timePickerDialog48.show();\n }", "@Override\n public void onClick(View v) {\n calendar.set(Calendar.HOUR_OF_DAY, alarm_timepicker.getHour());\n calendar.set(Calendar.MINUTE, alarm_timepicker.getMinute());\n\n // getting the int values of the hour and minute\n int hour = alarm_timepicker.getHour();\n int minute = alarm_timepicker.getMinute();\n\n //converting the int values to strings\n String hour_string = String.valueOf(hour);\n String minute_string = String.valueOf(minute);\n\n // 10:4 -> 10:04\n if (minute < 10) {\n minute_string = \"0\" + String.valueOf(minute);\n }\n\n // method that changes the update text Textbox\n set_alarm_text(\"Alarm set to: \" + hour_string + \":\" + minute_string);\n\n\n // put in extra string into my_intent\n // tells the clock that you pressed the \"alarm on\" button\n my_intent.putExtra(\"extra\", \"alarm on\");\n\n //put in an extra long value into my intent\n //tells the clock that you want a certain value from the\n // dropdown menu/spinners\n my_intent.putExtra(\"alarm_choice\", choose_alarm_sound);\n\n // create a pending intent that delays the intent\n // until the specified calendar time\n pending_intent = PendingIntent.getBroadcast(MainActivity.this, 0, my_intent, PendingIntent.FLAG_UPDATE_CURRENT);\n\n //set the alarm manager\n alarm_manager.set(AlarmManager.RTC_WAKEUP, calendar.getTimeInMillis(), pending_intent);\n\n }", "@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tflag = 2;\n\t\t\t\tshowDialog(TIME_DIALOG_ID);\n\t\t\t}", "@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog10 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t10Hour10 = hourOfDay1;\n t10Minute10 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t10Hour10, t10Minute10);\n //set selected time on text view\n\n\n timeE5 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editETime5.setText(timeE5);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog10.updateTime(t10Hour10, t10Minute10);\n //show dialog\n timePickerDialog10.show();\n }", "@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog8 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t8Hour8 = hourOfDay1;\n t8Minute8 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t8Hour8, t8Minute8);\n //set selected time on text view\n\n\n timeE4 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editETime4.setText(timeE4);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog8.updateTime(t8Hour8, t8Minute8);\n //show dialog\n timePickerDialog8.show();\n }", "@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog42 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t42Hour42 = hourOfDay1;\n t42Minute42 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t42Hour42, t42Minute42);\n //set selected time on text view\n\n\n timeE21 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editETime21.setText(timeE21);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog42.updateTime(t42Hour42, t42Minute42);\n //show dialog\n timePickerDialog42.show();\n }", "@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog7 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t7Hour7 = hourOfDay1;\n t7Minute7 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t7Hour7, t7Minute7);\n //set selected time on text view\n\n\n timeS4 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editSTime4.setText(timeS4);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog7.updateTime(t7Hour7, t7Minute7);\n //show dialog\n timePickerDialog7.show();\n }", "@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog18 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t18Hour18 = hourOfDay1;\n t18Minute18 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t18Hour18, t18Minute18);\n //set selected time on text view\n\n\n timeE9 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editETime9.setText(timeE9);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog18.updateTime(t18Hour18, t18Minute18);\n //show dialog\n timePickerDialog18.show();\n }", "@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog32 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t32Hour32 = hourOfDay1;\n t32Minute32 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t32Hour32, t32Minute32);\n //set selected time on text view\n\n\n timeE16 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editETime16.setText(timeE16);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog32.updateTime(t32Hour32, t32Minute32);\n //show dialog\n timePickerDialog32.show();\n }", "@Override\r\n\tpublic void onCreate(Bundle savedInstanceState) {\r\n\t\tsuper.onCreate(savedInstanceState);\r\n\t\tsetContentView(R.layout.set_alarm);\r\n\t\ts = getIntent().getStringExtra(\"match time\");\r\n\t\tsetTitle(\"闹钟设置\");\r\n\t\tcalendar = Calendar.getInstance();\r\n\t\tmTextView = (TextView) this.findViewById(R.id.mText);\r\n\t\tmTextView.setText(s);\r\n\t\tmsetButton = (Button) this.findViewById(R.id.setTimeButton);\r\n\t\tmcancelButton = (Button) this.findViewById(R.id.cancelButton);\r\n\t\tcheckButton = (Button) this.findViewById(R.id.checkButton);\r\n\t\tringButton= (Button) this.findViewById(R.id.setalarm);\r\n\t\thelper = new AlarmHelper(this);\r\n\r\n\t\tmsetButton.setOnClickListener(new OnClickListener() {\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void onClick(View v) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\tcalendar.setTimeInMillis(System.currentTimeMillis());\r\n\t\t\t\tint hour = calendar.get(Calendar.HOUR_OF_DAY);\r\n\t\t\t\tint minute = calendar.get(Calendar.MINUTE);\r\n\t\t\t\tnew TimePickerDialog(SetClock_Activity.this,\r\n\t\t\t\t\t\tnew TimePickerDialog.OnTimeSetListener() {\r\n\r\n\t\t\t\t\t\t\t@Override\r\n\t\t\t\t\t\t\tpublic void onTimeSet(TimePicker view,\r\n\t\t\t\t\t\t\t\t\tint hourOfDay, int minute) {\r\n\t\t\t\t\t\t\t\tcalendar.setTimeInMillis(System\r\n\t\t\t\t\t\t\t\t\t\t.currentTimeMillis());\r\n\t\t\t\t\t\t\t\t// set(f, value) changes field f to value.\r\n\t\t\t\t\t\t\t\tcalendar.set(Calendar.HOUR_OF_DAY, hourOfDay);\r\n\t\t\t\t\t\t\t\tcalendar.set(Calendar.MINUTE, minute);\r\n\t\t\t\t\t\t\t\tcalendar.set(Calendar.SECOND, 0);\r\n\t\t\t\t\t\t\t\tcalendar.set(Calendar.MILLISECOND, 0);\r\n\r\n\t\t\t\t\t\t\t\thelper.openAlarm(id, s,\r\n\t\t\t\t\t\t\t\t\t\tcalendar.getTimeInMillis());\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tAlarmList.alarmSet.put(id,s);\r\n\t\t\t\t\t\t\t\tid++;\r\n\t\t\t\t\t\t\t\tDate date = new java.util.Date(System.currentTimeMillis());\r\n\t\t\t\t\t\t\t\tint m, h;\r\n\t\t\t\t\t\t\t\tif (hourOfDay < date.getHours())\r\n\t\t\t\t\t\t\t\t\th = hourOfDay + 24 - date.getHours();\r\n\t\t\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t\t\th = hourOfDay - date.getHours();\r\n\t\t\t\t\t\t\t\tif (minute < date.getMinutes()) {\r\n\t\t\t\t\t\t\t\t\tm = minute + 60 - date.getMinutes();\r\n\t\t\t\t\t\t\t\t\th--;\r\n\t\t\t\t\t\t\t\t} else\r\n\t\t\t\t\t\t\t\t\tm = minute - date.getMinutes();\r\n\r\n\t\t\t\t\t\t\t\tString tmps = \"距离闹钟还有: \" + h+\"小时 \"\r\n\t\t\t\t\t\t\t\t\t\t+ m+\"分钟\";\r\n\t\t\t\t\t\t\t\tmTextView.setText(tmps);\r\n\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}, hour, minute, true).show();\r\n\r\n\t\t\t}\r\n\t\t});\r\n\t\tmcancelButton.setOnClickListener(new OnClickListener() {\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void onClick(View v) {\r\n\t\t\t\t// helper.closeAlarm(id-1, s);\r\n\t\t\t\tIntent intent = new Intent(SetClock_Activity.this,\r\n\t\t\t\t\t\tAlarmReceiver.class);\r\n\t\t\t\tPendingIntent pendingIntent = PendingIntent.getBroadcast(\r\n\t\t\t\t\t\tSetClock_Activity.this, id - 1, intent, 0);\r\n\t\t\t\tAlarmManager am;\r\n\r\n\t\t\t\t// 获取系统进程\r\n\t\t\t\tam = (AlarmManager) getSystemService(ALARM_SERVICE);\r\n\r\n\t\t\t\t// cancel\r\n\t\t\t\tam.cancel(pendingIntent);\r\n\t\t\t\tAlarmList.alarmSet.remove(id-1);\r\n\t\t\t\tmTextView.setText(\"取消了!\");\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\t checkButton.setOnClickListener(new OnClickListener() {\r\n\t\t\r\n\t\t @Override\r\n\t\t public void onClick(View v) {\r\n\t\t Intent intent = new Intent(\"myaction8\");\r\n\t\t startActivity(intent);\r\n\t\t overridePendingTransition(R.anim.zoomin, R.anim.zoomout);\r\n\t\t }\r\n\t\t });\r\n\t\t \r\n\t\t ringButton.setOnClickListener(new OnClickListener() {\r\n\t\t\t\t\r\n\t\t\t @Override\r\n\t\t\t public void onClick(View v) {\r\n\t\t\t\t\tnew AlertDialog.Builder(SetClock_Activity.this)\r\n\t\t\t\t\t.setTitle(\"友情提示\")\r\n\t\t\t\t\t.setMessage(\"功能还在完善中,敬请期待!\")\r\n\t\t\t\t\t.setPositiveButton(\"确定\",\r\n\t\t\t\t\t\t\tnew DialogInterface.OnClickListener() {\r\n\r\n\t\t\t\t@Override\r\n\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\r\n\t\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t}).show();\r\n\t\t\t }\r\n\t\t\t });\r\n\r\n\t}", "@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog40 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t40Hour40 = hourOfDay1;\n t40Minute40 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t40Hour40, t40Minute40);\n //set selected time on text view\n\n\n timeE20 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editETime20.setText(timeE20);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog40.updateTime(t40Hour40, t40Minute40);\n //show dialog\n timePickerDialog40.show();\n }", "@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog47 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t47Hour47 = hourOfDay1;\n t47Minute47 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t47Hour47, t47Minute47);\n //set selected time on text view\n\n\n timeS24 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editSTime24.setText(timeS24);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog47.updateTime(t47Hour47, t47Minute47);\n //show dialog\n timePickerDialog47.show();\n }", "@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog21 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t21Hour21 = hourOfDay1;\n t21Minute21 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t21Hour21, t21Minute21);\n //set selected time on text view\n\n\n timeS11 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editSTime11.setText(timeS11);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog21.updateTime(t21Hour21, t21Minute21);\n //show dialog\n timePickerDialog21.show();\n }", "@Override\n public void onClick(View v) {\n Calendar mcurrentTime = Calendar.getInstance();\n int hour = mcurrentTime.get(Calendar.HOUR_OF_DAY);\n int minute = mcurrentTime.get(Calendar.MINUTE);\n TimePickerDialog mTimePicker;\n mTimePicker = new TimePickerDialog(AddReminder.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker timePicker, int selectedHour, int selectedMinute) {\n edtSelectTimeForMeet.setText( \"\" + selectedHour + \":\" + selectedMinute);\n }\n }, hour, minute, true);\n mTimePicker.setTitle(\"Select Time\");\n mTimePicker.show();\n\n }", "@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog50 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t50Hour50 = hourOfDay1;\n t50Minute50 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t50Hour50, t50Minute50);\n //set selected time on text view\n\n\n timeE25 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editETime25.setText(timeE25);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog50.updateTime(t50Hour50, t50Minute50);\n //show dialog\n timePickerDialog50.show();\n }", "@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog35 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t35Hour35 = hourOfDay1;\n t35Minute35 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t35Hour35, t35Minute35);\n //set selected time on text view\n\n\n timeS18 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editSTime18.setText(timeS18);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog35.updateTime(t35Hour35, t35Minute35);\n //show dialog\n timePickerDialog35.show();\n }", "@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog13 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t13Hour13 = hourOfDay1;\n t13Minute13 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t13Hour13, t13Minute13);\n //set selected time on text view\n\n\n timeS7 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editSTime7.setText(timeS7);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog13.updateTime(t13Hour13, t13Minute13);\n //show dialog\n timePickerDialog13.show();\n }", "@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog34 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t34Hour34 = hourOfDay1;\n t34Minute34 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t34Hour34, t34Minute34);\n //set selected time on text view\n\n\n timeE17 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editETime17.setText(timeE17);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog34.updateTime(t34Hour34, t34Minute34);\n //show dialog\n timePickerDialog34.show();\n }", "@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog9 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t9Hour9 = hourOfDay1;\n t9Minute9 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t9Hour9, t9Minute9);\n //set selected time on text view\n\n\n timeS5 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editSTime5.setText(timeS5);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog9.updateTime(t9Hour9, t9Minute9);\n //show dialog\n timePickerDialog9.show();\n }", "@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog36 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t36Hour36 = hourOfDay1;\n t36Minute36 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t36Hour36, t36Minute36);\n //set selected time on text view\n\n\n timeE18 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editETime18.setText(timeE18);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog36.updateTime(t36Hour36, t36Minute36);\n //show dialog\n timePickerDialog36.show();\n }", "@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog46 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t46Hour46 = hourOfDay1;\n t46Minute46 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t46Hour46, t46Minute46);\n //set selected time on text view\n\n\n timeE23 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editETime23.setText(timeE23);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog46.updateTime(t46Hour46, t46Minute46);\n //show dialog\n timePickerDialog46.show();\n }", "@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog23 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t23Hour23 = hourOfDay1;\n t23Minute23 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t23Hour23, t23Minute23);\n //set selected time on text view\n\n\n timeS12 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editSTime12.setText(timeS12);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog23.updateTime(t23Hour23, t23Minute23);\n //show dialog\n timePickerDialog23.show();\n }", "@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog31 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t31Hour31 = hourOfDay1;\n t31Minute31 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t31Hour31, t31Minute31);\n //set selected time on text view\n\n\n timeS16 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editSTime16.setText(timeS16);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog31.updateTime(t31Hour31, t31Minute31);\n //show dialog\n timePickerDialog31.show();\n }", "@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog12 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t12Hour12 = hourOfDay1;\n t12Minute12 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t12Hour12, t12Minute12);\n //set selected time on text view\n\n\n timeE6 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editETime6.setText(timeE6);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog12.updateTime(t12Hour12, t12Minute12);\n //show dialog\n timePickerDialog12.show();\n }", "@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog41 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t41Hour41 = hourOfDay1;\n t41Minute41 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t41Hour41, t41Minute41);\n //set selected time on text view\n\n\n timeS21 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editSTime21.setText(timeS21);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog41.updateTime(t41Hour41, t41Minute41);\n //show dialog\n timePickerDialog41.show();\n }", "@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog49 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t49Hour49 = hourOfDay1;\n t49Minute49 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t49Hour49, t49Minute49);\n //set selected time on text view\n\n\n timeS25 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editSTime25.setText(timeS25);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog49.updateTime(t49Hour49, t49Minute49);\n //show dialog\n timePickerDialog49.show();\n }", "@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog22 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t22Hour22 = hourOfDay1;\n t22Minute22 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t22Hour22, t22Minute22);\n //set selected time on text view\n\n\n timeE11 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editETime11.setText(timeE11);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog22.updateTime(t22Hour22, t22Minute22);\n //show dialog\n timePickerDialog22.show();\n }", "@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog16 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t16Hour16 = hourOfDay1;\n t16Minute16 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t16Hour16, t16Minute16);\n //set selected time on text view\n\n\n timeE8 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editETime8.setText(timeE8);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog16.updateTime(t16Hour16, t16Minute16);\n //show dialog\n timePickerDialog16.show();\n }", "@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog20 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t20Hour20 = hourOfDay1;\n t20Minute20 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t20Hour20, t20Minute20);\n //set selected time on text view\n\n\n timeE10 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editETime10.setText(timeE10);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog20.updateTime(t20Hour20, t20Minute20);\n //show dialog\n timePickerDialog20.show();\n }", "@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog17 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t17Hour17 = hourOfDay1;\n t17Minute17 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t17Hour17, t17Minute17);\n //set selected time on text view\n\n\n timeS9 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editSTime9.setText(timeS9);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog17.updateTime(t17Hour17, t17Minute17);\n //show dialog\n timePickerDialog17.show();\n }", "@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog39 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t39Hour39 = hourOfDay1;\n t39Minute39 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t39Hour39, t39Minute39);\n //set selected time on text view\n\n\n timeS20 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editSTime20.setText(timeS20);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog39.updateTime(t39Hour39, t39Minute39);\n //show dialog\n timePickerDialog39.show();\n }", "@Override\n public void onTimeSet(android.widget.TimePicker view, int hourOfDay, int minute) {\n boolean timeInAM = true;\n\n if(hourOfDay>=12) { //if it's pm\n hourOfDay-=12;\n timeInAM = false;\n } else { //if it's am\n timeInAM = true;\n }\n\n //update shared preferences with alarm time\n PreferenceManager.getDefaultSharedPreferences(getActivity()).edit().putInt(\"alarmHour_\"+alarmID, hourOfDay).apply(); //will be 0:00 if 12:00\n PreferenceManager.getDefaultSharedPreferences(getActivity()).edit().putInt(\"alarmMinutes_\"+alarmID, minute).apply();\n PreferenceManager.getDefaultSharedPreferences(getActivity()).edit().putBoolean(\"timeInAM_\"+alarmID, timeInAM).apply();\n\n //set minuteString of alarm time\n String minuteString;\n if(minute<10) {\n minuteString = \"0\" + PreferenceManager.getDefaultSharedPreferences(getActivity()).getInt(\"alarmMinutes_\"+alarmID, 0);\n } else {\n minuteString = \"\" + PreferenceManager.getDefaultSharedPreferences(getActivity()).getInt(\"alarmMinutes_\"+alarmID, 10);\n }\n int alarmHour = PreferenceManager.getDefaultSharedPreferences(getActivity()).getInt(\"alarmHour_\"+alarmID, 0);\n if(alarmHour<10 && alarmHour>0) {\n alarmTimeButton.setText(\" \"+alarmHour+\":\"+minuteString);\n } else if(alarmHour==0) {\n alarmTimeButton.setText(\"12:\"+minuteString);\n } else {\n alarmTimeButton.setText(alarmHour+\":\"+minuteString);\n }\n\n //show alarm time\n if(PreferenceManager.getDefaultSharedPreferences(getActivity()).getBoolean(\"timeInAM_\"+alarmID, true)) {\n dayOrNight.setText(\"AM\");\n } else {\n dayOrNight.setText(\"PM\");\n }\n\n }", "@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog26 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t26Hour26 = hourOfDay1;\n t26Minute26 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t26Hour26, t26Minute26);\n //set selected time on text view\n\n\n timeE13 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editETime13.setText(timeE13);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog26.updateTime(t26Hour26, t26Minute26);\n //show dialog\n timePickerDialog26.show();\n }", "@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog38 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t38Hour38 = hourOfDay1;\n t38Minute38 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t38Hour38, t38Minute38);\n //set selected time on text view\n\n\n timeE19 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editETime19.setText(timeE19);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog38.updateTime(t38Hour38, t38Minute38);\n //show dialog\n timePickerDialog38.show();\n }", "@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog33 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t33Hour33 = hourOfDay1;\n t33Minute33 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t33Hour33, t33Minute33);\n //set selected time on text view\n\n\n timeS17 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editSTime17.setText(timeS17);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog33.updateTime(t33Hour33, t33Minute33);\n //show dialog\n timePickerDialog33.show();\n }", "@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog4 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t4Hour4 = hourOfDay1;\n t4Minute4 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t4Hour4, t4Minute4);\n //set selected time on text view\n\n\n timeE2 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editETime2.setText(timeE2);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog4.updateTime(t4Hour4, t4Minute4);\n //show dialog\n timePickerDialog4.show();\n }", "private void reactMain_region_digitalwatch_Display_refreshing_RefreshingTime_timeView_hideAlarm() {\n\t\tif (sCIButtons.topLeftPressed) {\n\t\t\tswitch (stateVector[1]) {\n\t\t\t\tcase main_region_digitalwatch_Display_refreshing_RefreshingTime_timeView_showAlarm :\n\t\t\t\t\tnextStateIndex = 1;\n\t\t\t\t\tstateVector[1] = State.$NullState$;\n\n\t\t\t\t\ttimer.unsetTimer(this, 1);\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase main_region_digitalwatch_Display_refreshing_RefreshingTime_timeView_hideAlarm :\n\t\t\t\t\tnextStateIndex = 1;\n\t\t\t\t\tstateVector[1] = State.$NullState$;\n\n\t\t\t\t\ttimer.unsetTimer(this, 2);\n\t\t\t\t\tbreak;\n\n\t\t\t\tdefault :\n\t\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\ttimer.setTimer(this, 3, 250, false);\n\n\t\t\tsCIDisplay.operationCallback.refreshChronoDisplay();\n\n\t\t\tsCILogicUnit.operationCallback.getChrono();\n\n\t\t\tnextStateIndex = 1;\n\t\t\tstateVector[1] = State.main_region_digitalwatch_Display_refreshing_RefreshingChrono;\n\t\t} else {\n\t\t\tif (sCIButtons.bottomLeftPressed) {\n\t\t\t\tnextStateIndex = 1;\n\t\t\t\tstateVector[1] = State.$NullState$;\n\n\t\t\t\ttimer.unsetTimer(this, 2);\n\n\t\t\t\ttimer.setTimer(this, 1, 1 * 1000, false);\n\n\t\t\t\tsCIDisplay.operationCallback.refreshTimeDisplay();\n\n\t\t\t\tsCIDisplay.operationCallback.refreshDateDisplay();\n\n\t\t\t\tsCIDisplay.operationCallback.refreshAlarmDisplay();\n\n\t\t\t\tnextStateIndex = 1;\n\t\t\t\tstateVector[1] = State.main_region_digitalwatch_Display_refreshing_RefreshingTime_timeView_showAlarm;\n\t\t\t} else {\n\t\t\t\tif (timeEvents[2]) {\n\t\t\t\t\tnextStateIndex = 1;\n\t\t\t\t\tstateVector[1] = State.$NullState$;\n\n\t\t\t\t\ttimer.unsetTimer(this, 2);\n\n\t\t\t\t\ttimer.setTimer(this, 2, 1 * 1000, false);\n\n\t\t\t\t\tsCIDisplay.operationCallback.refreshTimeDisplay();\n\n\t\t\t\t\tsCIDisplay.operationCallback.refreshDateDisplay();\n\n\t\t\t\t\tnextStateIndex = 1;\n\t\t\t\t\tstateVector[1] = State.main_region_digitalwatch_Display_refreshing_RefreshingTime_timeView_hideAlarm;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog14 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t14Hour14 = hourOfDay1;\n t14Minute14 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t14Hour14, t14Minute14);\n //set selected time on text view\n\n\n timeE7 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editETime7.setText(timeE7);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog14.updateTime(t14Hour14, t14Minute14);\n //show dialog\n timePickerDialog14.show();\n }", "@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog43 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t43Hour43 = hourOfDay1;\n t43Minute43 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t43Hour43, t43Minute43);\n //set selected time on text view\n\n\n timeS22 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editSTime22.setText(timeS22);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog43.updateTime(t43Hour43, t43Minute43);\n //show dialog\n timePickerDialog43.show();\n }", "@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog27 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t27Hour27 = hourOfDay1;\n t27Minute27 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t27Hour27, t27Minute27);\n //set selected time on text view\n\n\n timeS14 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editSTime14.setText(timeS14);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog27.updateTime(t27Hour27, t27Minute27);\n //show dialog\n timePickerDialog27.show();\n }", "@Override\r\n\t\t\tpublic void onClick(View v) {\n\r\n\t\t\t\tShowTimePickerDialog();\r\n\r\n\t\t\t}", "public void setFocus() {\n\t}", "@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog2 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t2Hour2 = hourOfDay1;\n t2Minute2 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t2Hour2, t2Minute2);\n //set selected time on text view\n\n\n timeE1 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editETime1.setText(timeE1);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog2.updateTime(t2Hour2, t2Minute2);\n //show dialog\n timePickerDialog2.show();\n }", "@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog45 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t45Hour45 = hourOfDay1;\n t45Minute45 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t45Hour45, t45Minute45);\n //set selected time on text view\n\n\n timeS23 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editSTime23.setText(timeS23);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog45.updateTime(t45Hour45, t45Minute45);\n //show dialog\n timePickerDialog45.show();\n }", "@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog37 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t37Hour37 = hourOfDay1;\n t37Minute37 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t37Hour37, t37Minute37);\n //set selected time on text view\n\n\n timeS19 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editSTime19.setText(timeS19);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog37.updateTime(t37Hour37, t37Minute37);\n //show dialog\n timePickerDialog37.show();\n }", "@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog11 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t11Hour11 = hourOfDay1;\n t11Minute11 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t11Hour11, t11Minute11);\n //set selected time on text view\n\n\n timeS6 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editSTime6.setText(timeS6);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog11.updateTime(t11Hour11, t11Minute11);\n //show dialog\n timePickerDialog11.show();\n }", "@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog19 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t19Hour19 = hourOfDay1;\n t19Minute19 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t19Hour19, t19Minute19);\n //set selected time on text view\n\n\n timeS10 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editSTime10.setText(timeS10);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog19.updateTime(t19Hour19, t19Minute19);\n //show dialog\n timePickerDialog19.show();\n }", "public void setOneTime(View view) {\n Intent intent = new Intent(this, CreateOneTimeAlarm.class);\n startActivity(intent);\n }", "@Override\n public void onClick(View v) {\n\n Calendar mcurrentTime = Calendar.getInstance();\n int hour = mcurrentTime.get(Calendar.HOUR_OF_DAY);\n int minute = mcurrentTime.get(Calendar.MINUTE);\n TimePickerDialog mTimePicker;\n mTimePicker = new TimePickerDialog(\n Attend_Regularization.this,\n new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker timePicker,\n int selectedHour, int selectedMinute) {\n\n String am_pm = \"\";\n\n Calendar datetime = Calendar.getInstance();\n datetime.set(Calendar.HOUR_OF_DAY, selectedHour);\n datetime.set(Calendar.MINUTE, selectedMinute);\n\n if (datetime.get(Calendar.AM_PM) == Calendar.AM)\n am_pm = \"AM\";\n else if (datetime.get(Calendar.AM_PM) == Calendar.PM)\n am_pm = \"PM\";\n\n String strHrsToShow = (datetime\n .get(Calendar.HOUR) == 0) ? \"12\"\n : datetime.get(Calendar.HOUR) + \"\";\n\n in_time.setText(strHrsToShow + \":\"\n + pad(datetime.get(Calendar.MINUTE))\n + \" \" + am_pm);\n\n /*if (out_time.getText().toString().trim().equals(\"\")) {\n\n } else {\n if (!in_date.getText().toString().trim().isEmpty() && !out_date.getText().toString().trim().isEmpty()) {\n if (in_date.getText().toString().trim().equals(out_date.getText().toString().trim())) {\n String resultcampare = CompareTime(in_time.getText().toString().trim(), out_time.getText().toString().trim());\n if (!resultcampare.equals(\"1\")) {\n\n EmpowerApplication.alertdialog(for_out_time, Attend_Regularization.this);\n\n }\n }\n } else {\n if (!validateindate())\n return;\n if (!validateoutdate())\n return;\n }\n }*/\n // edtxt_time.setTextColor(Color.parseColor(\"#000000\"));\n\n }\n }, hour, minute, false);// Yes 24 hour time\n mTimePicker.setTitle(\"Select Time\");\n mTimePicker.show();\n getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_HIDDEN);\n\n }", "@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog15 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t15Hour15 = hourOfDay1;\n t15Minute15 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t15Hour15, t15Minute15);\n //set selected time on text view\n\n\n timeS8 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editSTime8.setText(timeS8);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog15.updateTime(t15Hour15, t15Minute15);\n //show dialog\n timePickerDialog15.show();\n }", "@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog5 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t5Hour5 = hourOfDay1;\n t5Minute5 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t5Hour5, t5Minute5);\n //set selected time on text view\n\n\n timeS3 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editSTime3.setText(timeS3);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog5.updateTime(t5Hour5, t5Minute5);\n //show dialog\n timePickerDialog5.show();\n }", "public void setFocus();", "public void setFocus() {\n startButton.setFocus();\n }", "@Override\r\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tcalendar.setTimeInMillis(System.currentTimeMillis());\r\n\t\t\t\tint hour = calendar.get(Calendar.HOUR_OF_DAY);\r\n\t\t\t\tint minute = calendar.get(Calendar.MINUTE);\r\n\t\t\t\tnew TimePickerDialog(SetClock_Activity.this,\r\n\t\t\t\t\t\tnew TimePickerDialog.OnTimeSetListener() {\r\n\r\n\t\t\t\t\t\t\t@Override\r\n\t\t\t\t\t\t\tpublic void onTimeSet(TimePicker view,\r\n\t\t\t\t\t\t\t\t\tint hourOfDay, int minute) {\r\n\t\t\t\t\t\t\t\tcalendar.setTimeInMillis(System\r\n\t\t\t\t\t\t\t\t\t\t.currentTimeMillis());\r\n\t\t\t\t\t\t\t\t// set(f, value) changes field f to value.\r\n\t\t\t\t\t\t\t\tcalendar.set(Calendar.HOUR_OF_DAY, hourOfDay);\r\n\t\t\t\t\t\t\t\tcalendar.set(Calendar.MINUTE, minute);\r\n\t\t\t\t\t\t\t\tcalendar.set(Calendar.SECOND, 0);\r\n\t\t\t\t\t\t\t\tcalendar.set(Calendar.MILLISECOND, 0);\r\n\r\n\t\t\t\t\t\t\t\thelper.openAlarm(id, s,\r\n\t\t\t\t\t\t\t\t\t\tcalendar.getTimeInMillis());\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tAlarmList.alarmSet.put(id,s);\r\n\t\t\t\t\t\t\t\tid++;\r\n\t\t\t\t\t\t\t\tDate date = new java.util.Date(System.currentTimeMillis());\r\n\t\t\t\t\t\t\t\tint m, h;\r\n\t\t\t\t\t\t\t\tif (hourOfDay < date.getHours())\r\n\t\t\t\t\t\t\t\t\th = hourOfDay + 24 - date.getHours();\r\n\t\t\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t\t\th = hourOfDay - date.getHours();\r\n\t\t\t\t\t\t\t\tif (minute < date.getMinutes()) {\r\n\t\t\t\t\t\t\t\t\tm = minute + 60 - date.getMinutes();\r\n\t\t\t\t\t\t\t\t\th--;\r\n\t\t\t\t\t\t\t\t} else\r\n\t\t\t\t\t\t\t\t\tm = minute - date.getMinutes();\r\n\r\n\t\t\t\t\t\t\t\tString tmps = \"距离闹钟还有: \" + h+\"小时 \"\r\n\t\t\t\t\t\t\t\t\t\t+ m+\"分钟\";\r\n\t\t\t\t\t\t\t\tmTextView.setText(tmps);\r\n\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}, hour, minute, true).show();\r\n\r\n\t\t\t}", "@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog29 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t29Hour29 = hourOfDay1;\n t29Minute29 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t29Hour29, t29Minute29);\n //set selected time on text view\n\n\n timeS15 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editSTime15.setText(timeS15);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog29.updateTime(t29Hour29, t29Minute29);\n //show dialog\n timePickerDialog29.show();\n }", "@Override\n public void onClick(View v) {\n showDialog(TIME_DIALOG_ID);\n }", "@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog1 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t1Hour1 = hourOfDay1;\n t1Minute1 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t1Hour1, t1Minute1);\n //set selected time on text view\n\n\n timeS1 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editSTime1.setText(timeS1);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog1.updateTime(t1Hour1, t1Minute1);\n //show dialog\n timePickerDialog1.show();\n }", "@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog30 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t30Hour30 = hourOfDay1;\n t30Minute30 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t30Hour30, t30Minute30);\n //set selected time on text view\n\n\n timeE15 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editETime15.setText(timeE15);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog30.updateTime(t30Hour30, t30Minute30);\n //show dialog\n timePickerDialog30.show();\n }", "void setFocus();", "public void focus() {\n if (toSetFocus != null) {\n toSetFocus.requestFocus();\n } else {\n root.requestFocus();\n toSetFocus = null;\n }\n }", "@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog44 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t44Hour44 = hourOfDay1;\n t44Minute44 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t44Hour44, t44Minute44);\n //set selected time on text view\n\n\n timeE22 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editETime22.setText(timeE22);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog44.updateTime(t44Hour44, t44Minute44);\n //show dialog\n timePickerDialog44.show();\n }", "@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog28 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t28Hour28 = hourOfDay1;\n t28Minute28 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t28Hour28, t28Minute28);\n //set selected time on text view\n\n\n timeE14 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editETime14.setText(timeE14);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog28.updateTime(t28Hour28, t28Minute28);\n //show dialog\n timePickerDialog28.show();\n }", "@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog3 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t3Hour3 = hourOfDay1;\n t3Minute3 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t3Hour3, t3Minute3);\n //set selected time on text view\n\n\n timeS2 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editSTime2.setText(timeS2);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog3.updateTime(t3Hour3, t3Minute3);\n //show dialog\n timePickerDialog3.show();\n }", "@Override\r\n\t\t\t\t\tpublic void onClick(View v) {\n\r\n\t\t\t\t\t\talert_dialog.dismiss();\r\n\t\t\t\t\t\tet_select_time.setText(\"Set Time\");\r\n\t\t\t\t\t\tselect_time = \"\";\r\n\r\n\t\t\t\t\t}", "@Override\n public void onClick(View view) {\n timeDialog.show(getFragmentManager(), \"timePicker\");\n }", "public void setFocus() {\n }", "private void updateModelFromLayout() {\n\n TimePicker timePicker = (TimePicker) findViewById(R.id.alarm_details_time_picker);\n mAlarmDetails.timeMinute = timePicker.getCurrentMinute().intValue();\n mAlarmDetails.timeHour = timePicker.getCurrentHour().intValue();\n mAlarmDetails.name = mEditName.getText().toString();\n mAlarmDetails.repeatWeekly = mChkWeekly.isChecked();\n mAlarmDetails.vibration = mVibrate.isChecked();\n mAlarmDetails.setRepeatingDay(AlarmModel.SUNDAY, checked[AlarmModel.SUNDAY]);\n mAlarmDetails.setRepeatingDay(AlarmModel.MONDAY, checked[AlarmModel.MONDAY]);\n mAlarmDetails.setRepeatingDay(AlarmModel.TUESDAY, checked[AlarmModel.TUESDAY]);\n mAlarmDetails.setRepeatingDay(AlarmModel.WEDNESDAY, checked[AlarmModel.WEDNESDAY]);\n mAlarmDetails.setRepeatingDay(AlarmModel.THURSDAY, checked[AlarmModel.THURSDAY]);\n mAlarmDetails.setRepeatingDay(AlarmModel.FRIDAY, checked[AlarmModel.FRIDAY]);\n mAlarmDetails.setRepeatingDay(AlarmModel.SATURDAY, checked[AlarmModel.SATURDAY]);\n mAlarmDetails.isEnabled = true;\n mAlarmDetails.repeatOnce = false;\n mAlarmDetails.setDifficulty(difficulty);\n mAlarmDetails.setNumberOfQuestions(questions);\n }", "@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog6 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t6Hour6 = hourOfDay1;\n t6Minute6 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t6Hour6, t6Minute6);\n //set selected time on text view\n\n\n timeE3 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editETime3.setText(timeE3);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog6.updateTime(t6Hour6, t6Minute6);\n //show dialog\n timePickerDialog6.show();\n }", "public void addAlarmClicked(View view) {\n DialogFragment timePickerFragment = new TimePickerFragment();\n timePickerFragment.show(getSupportFragmentManager(), \"timePicker\");\n\n }", "@Override\n public void onClick(View v) {\n\n Calendar mcurrentTime = Calendar.getInstance();\n int hour = mcurrentTime.get(Calendar.HOUR_OF_DAY);\n int minute = mcurrentTime.get(Calendar.MINUTE);\n TimePickerDialog mTimePicker;\n mTimePicker = new TimePickerDialog(\n Attend_Regularization.this,\n new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker timePicker,\n int selectedHour, int selectedMinute) {\n\n String am_pm = \"\";\n\n Calendar datetime = Calendar.getInstance();\n datetime.set(Calendar.HOUR_OF_DAY, selectedHour);\n datetime.set(Calendar.MINUTE, selectedMinute);\n\n if (datetime.get(Calendar.AM_PM) == Calendar.AM)\n am_pm = \"AM\";\n else if (datetime.get(Calendar.AM_PM) == Calendar.PM)\n am_pm = \"PM\";\n\n String strHrsToShow = (datetime\n .get(Calendar.HOUR) == 0) ? \"12\"\n : datetime.get(Calendar.HOUR) + \"\";\n\n out_time.setText(strHrsToShow + \":\"\n + pad(datetime.get(Calendar.MINUTE))\n + \" \" + am_pm);\n\n /*if (in_time.getText().toString().trim().equals(\"\")) {\n *//*if(!validateintime())\n return;*//*\n\n } else {\n if (!in_date.getText().toString().trim().isEmpty() && !out_date.getText().toString().trim().isEmpty()) {\n if (in_date.getText().toString().trim().equals(out_date.getText().toString().trim())) {\n String resultcampare = CompareTime(in_time.getText().toString().trim(), out_time.getText().toString().trim());\n if (!resultcampare.equals(\"1\")) {\n\n EmpowerApplication.alertdialog(for_out_time, Attend_Regularization.this);\n\n }\n }\n } else {\n if (!validateindate())\n return;\n if (!validateoutdate())\n return;\n }\n }*/\n\n // edtxt_time.setTextColor(Color.parseColor(\"#000000\"));\n\n }\n }, hour, minute, false);// Yes 24 hour time\n mTimePicker.setTitle(\"Select Time\");\n mTimePicker.show();\n getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_HIDDEN);\n\n }", "@Override\r\n\tpublic void setFocus() {\n\t\t\r\n\t}", "public void setFocus() {\n\t\tui.setFocus();\n\t}", "private void toggle_focus() {\n\t\ttry {\n\t\t\tif (!lock_autofocus) {\n\t\t\t\t//getCameraManager().requestAutoFocus(handler, R.id.auto_focus);\n\t\t\t\t\n\t\t\t\tlockAutoFocus.setBackgroundResource(R.drawable.eye_selected);\n\t\t\t} else {\n\t\t\t\tlockAutoFocus.setBackgroundResource(R.drawable.eye);\n\t\t\t\tstatusView.setText(getString(R.string.set_focus));\n\t\t\t\tCommonValues.getInstance().CameraMessage = CameraMessageStatus.Stopped;\n\t\t\t //getCameraManager().requestAutoFocus(handler, R.id.auto_focus);\n\t\t\t\t\n\t\t\t}\n\t\t\tlock_autofocus = !lock_autofocus;\n\t\t\tcameraManager.setAutoFocus(lock_autofocus);\n\t\t} catch (Exception oEx) {\n\n\t\t}\n\t}", "@Override\n\tpublic void setFocus() {\n\n\t}", "@Override\n\tpublic void setFocus() {\n\n\t}", "@Override\n\tpublic void setFocus() {\n\n\t}", "@Override\n\tpublic void setFocus() {\n\n\t}", "private void delayForDefocusTextFieldWorkaround() {\n if (Build.VERSION.SDK_INT <= 27) {\n alarmPeriodTextField.perform(waitMsec(60));\n }\n }", "@Override\n public void onClick(View v) {\n\n /**Time picker for Sleep Time*/\n if (v == tVTimePicker_sleep) {\n\n // Get Current Time\n final Calendar c = Calendar.getInstance();\n mHour = c.get(Calendar.HOUR_OF_DAY);\n mMinute = c.get(Calendar.MINUTE);\n\n // Launch Time Picker Dialog\n TimePickerDialog timePickerDialog = new TimePickerDialog(this,\n new TimePickerDialog.OnTimeSetListener() {\n\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay,\n int minute) {\n String curTime = String.format(\"%02d : %02d\", hourOfDay, minute);\n tVTimePicker_sleep.setText(curTime);\n mHour1 = hourOfDay;\n mMinute1 = minute;\n }\n }, mHour, mMinute, false);\n timePickerDialog.show();\n }\n\n /**Time picker for Wake Up Time*/\n if (v == tVTimePicker_wake) {\n\n // Get Current Time\n final Calendar c2 = Calendar.getInstance();\n mHour = c2.get(Calendar.HOUR_OF_DAY);\n mMinute = c2.get(Calendar.MINUTE);\n\n // Launch Time Picker Dialog\n TimePickerDialog timePickerDialog2 = new TimePickerDialog(this,\n new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet\n (TimePicker view,\n int hourOfDay,\n int minute)\n {\n String curTime = String.format(\"%02d : %02d\", hourOfDay, minute);\n tVTimePicker_wake.setText(curTime);\n mHour2 = hourOfDay;\n mMinute2 = minute;\n }\n }, mHour, mMinute, false);\n timePickerDialog2.show();\n }\n\n /**Time picker for Wake up Date*/\n if (v == tVDatePicker) {\n\n // Get Current Date\n final Calendar c = Calendar.getInstance();\n mYear = c.get(Calendar.YEAR);\n mMonth = c.get(Calendar.MONTH);\n mDay = c.get(Calendar.DAY_OF_MONTH);\n\n DatePickerDialog datePickerDialog = new DatePickerDialog(this,\n new DatePickerDialog.OnDateSetListener()\n {\n @Override\n public void onDateSet\n (DatePicker view,\n int year,\n int monthOfYear,\n int dayOfMonth)\n {\n String curDate = String.format(\"%02d / %02d\", (monthOfYear + 1) , dayOfMonth);\n tVDatePicker.setText(curDate + \" \" + year);\n\n //The Date to be shown in the screen\n Calendar newDate = Calendar.getInstance();\n newDate.set(year, monthOfYear, dayOfMonth);\n //The Date that can be match with database\n wakeDate = sdf_database.format(newDate.getTime());\n\n }\n }, mYear, mMonth, mDay);\n datePickerDialog.show();\n }\n\n /**Save the Data into Firebase Database and close the window*/\n if( v == saveButton){\n\n // Toast.makeText(getApplicationContext(), \"Save clicked!\", Toast.LENGTH_SHORT).show();\n newtimer.cancel();\n\n //Save the Data into database and display the data in the sleep page\n // DateFormat df = new SimpleDateFormat(\"yyyy-MM-dd HH:mm\");\n\n String sleepTime =String.format(\"%02d : %02d\", mHour1, mMinute1);\n String wakeTime= String.format(\"%02d : %02d\", mHour2, mMinute2);\n //String wakeDate= String.format(\"%02d / %02d\", (wMonth+ 1) , wDay) + \" \" + wYear ;\n\n sleepRef = rootRef.child(uid).child(\"sleep\").child(wakeDate);\n\n if (TextUtils.isEmpty(sid)) {\n sid = sleepRef.push().getKey();\n }\n\n Sleep user_sleep = new Sleep(sid, \"Tina\", sleepTime, wakeTime, wakeDate, sleepDrt,rateNumber);\n sleepRef.setValue(user_sleep);\n\n //Update the fragment page\n\n if(getFragmentRefreshListener()!=null){\n getFragmentRefreshListener().onRefresh();\n }\n\n finish();\n\n //load the value for page fragment\n }//end if\n\n }", "private void showTimePicker(){\n\n // Create new time picker instance\n TimePickerDialog timePicker = new TimePickerDialog(this, (view, hourOfDay, minute) -> {\n // Update booking time\n bookingHour = hourOfDay;\n bookingMinute = minute;\n\n // Set the contents of the edit text to the relevant hours / minutes\n timeInput.setText(getString(R.string.desired_time_format, bookingHour, bookingMinute));\n\n }, bookingHour, bookingMinute, true);\n\n timePicker.setTitle(getString(R.string.desired_time_selection));\n timePicker.show();\n\n // Change button colors\n Button positiveButton = timePicker.getButton(AlertDialog.BUTTON_POSITIVE);\n positiveButton.setTextColor(getColor(R.color.colorPrimary));\n Button negativeButton = timePicker.getButton(AlertDialog.BUTTON_NEGATIVE);\n negativeButton.setTextColor(getColor(R.color.colorPrimary));\n }", "@Override\r\n\tpublic void setFocus() {\r\n\t}", "@Override\n public void onTimeSet(TimePicker view, int hourOfDay, int minute) {\n Calendar calendar = Calendar.getInstance();\n calendar.set(Calendar.HOUR_OF_DAY, hourOfDay);\n calendar.set(Calendar.MINUTE, minute - 2);\n calendar.set(Calendar.SECOND, 0);\n\n startAlarm(calendar);\n }", "@Override\n\tpublic void setFocus() {\n\t\t\n\t}", "@Override\n\tpublic void setFocus() {\n\t\t\n\t}", "@Override\n\tpublic void setFocus() {\n\t\t\n\t}", "@Override\n\tpublic void setFocus() {\n\t\t\n\t}", "@Override\n\tpublic void setFocus() {\n\t\t\n\t}", "public void button_time_ok(View view){\n int[] times = new int[4];\n times[0] = getTimeFromSpinner(R.id.spinner_termin1);\n times[1] = getTimeFromSpinner(R.id.spinner_termin2);\n times[2] = getTimeFromSpinner(R.id.spinner_termin3);\n times[3] = getTimeFromSpinner(R.id.spinner_termin4);\n // and update the user data\n _control.updateUserTimes(times);\n _control.saveUserData();\n // then change to main menu\n setContentView(R.layout.mainmenu);\n setButtonDisabled(R.id.goto_question_button, _control.wasLastQuestionAnswered());\n }" ]
[ "0.6291798", "0.6240165", "0.6212706", "0.61580074", "0.60433686", "0.59696776", "0.59542996", "0.59417486", "0.59387255", "0.5925583", "0.5923349", "0.5920649", "0.59190816", "0.59159076", "0.5913716", "0.59063613", "0.5903052", "0.59002906", "0.5899253", "0.5889857", "0.5889387", "0.58869684", "0.58776355", "0.5862812", "0.5861325", "0.58555406", "0.58553", "0.58449924", "0.5837293", "0.58339083", "0.5833561", "0.58284694", "0.5827378", "0.5824115", "0.5823138", "0.5813305", "0.5808627", "0.58055675", "0.58053803", "0.5803263", "0.580199", "0.5799183", "0.5797284", "0.5794523", "0.5793141", "0.5790343", "0.5789081", "0.57836604", "0.5782185", "0.57788545", "0.5778549", "0.5775289", "0.5771739", "0.57709754", "0.57708526", "0.57701427", "0.5757359", "0.5756399", "0.5753222", "0.5751917", "0.57469946", "0.5744275", "0.5740094", "0.5739384", "0.57391757", "0.5737918", "0.5735429", "0.5734809", "0.5723648", "0.572046", "0.5720242", "0.5714256", "0.5709708", "0.5706657", "0.56933427", "0.56791526", "0.5667978", "0.5635258", "0.56126714", "0.5604369", "0.55688", "0.5564395", "0.55602443", "0.5546815", "0.5546815", "0.5546815", "0.5546815", "0.55463773", "0.55405617", "0.5523945", "0.55151856", "0.5514283", "0.5513896", "0.5513896", "0.5513896", "0.5513896", "0.5513896", "0.55119246" ]
0.5927065
10
sets layout to focused if adTimeButton pressed
@Override public boolean onTouch(View v, MotionEvent event) { layout.requestFocus(); return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setFocus() {\n startButton.setFocus();\n }", "public void setFocus() {\n \t\tviewer.getControl().setFocus();\n \t}", "void setFocus();", "public void setFocus() {\n\t}", "public void setFocus();", "protected void gainFocus(){\r\n\t\twidgetModifyFacade.changeVersatilePane(this);\r\n\t\twidgetModifyFacade.gainedFocusSignal(this);\r\n\t//\tthis.setId(\"single-image-widget-selected\");\r\n\t}", "public void setFocus() {\n\t\tviewer.getControl().setFocus();\n\t}", "public void setFocus() {\n\t\tviewer.getControl().setFocus();\n\t}", "public void setFocus() {\n\t\tviewer.getControl().setFocus();\n\t}", "public void setFocus() {\n\t\tthis.viewer.getControl().setFocus();\n\t}", "public void setFocus() {\n }", "public void setFocus() {\n\t\tui.setFocus();\n\t}", "@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tflag = 1;\n\t\t\t\tshowDialog(TIME_DIALOG_ID);\n\t\t\t}", "public void focus() {}", "void addFocus();", "@Override\r\n\tpublic void setFocus() {\n\t\t\r\n\t}", "public void setFocus() {\n \t\tex.setFocus();\n \t}", "public void setFocused(boolean focused);", "@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tflag = 2;\n\t\t\t\tshowDialog(TIME_DIALOG_ID);\n\t\t\t}", "@Override\n\tpublic void setFocus() {\n\t\t\n\t}", "@Override\n\tpublic void setFocus() {\n\t\t\n\t}", "@Override\n\tpublic void setFocus() {\n\t\t\n\t}", "@Override\n\tpublic void setFocus() {\n\t\t\n\t}", "@Override\n\tpublic void setFocus() {\n\t\t\n\t}", "@Override\n\tpublic void setFocus() {\n\n\t}", "@Override\n\tpublic void setFocus() {\n\n\t}", "@Override\n\tpublic void setFocus() {\n\n\t}", "@Override\n\tpublic void setFocus() {\n\n\t}", "private void toggle_focus() {\n\t\ttry {\n\t\t\tif (!lock_autofocus) {\n\t\t\t\t//getCameraManager().requestAutoFocus(handler, R.id.auto_focus);\n\t\t\t\t\n\t\t\t\tlockAutoFocus.setBackgroundResource(R.drawable.eye_selected);\n\t\t\t} else {\n\t\t\t\tlockAutoFocus.setBackgroundResource(R.drawable.eye);\n\t\t\t\tstatusView.setText(getString(R.string.set_focus));\n\t\t\t\tCommonValues.getInstance().CameraMessage = CameraMessageStatus.Stopped;\n\t\t\t //getCameraManager().requestAutoFocus(handler, R.id.auto_focus);\n\t\t\t\t\n\t\t\t}\n\t\t\tlock_autofocus = !lock_autofocus;\n\t\t\tcameraManager.setAutoFocus(lock_autofocus);\n\t\t} catch (Exception oEx) {\n\n\t\t}\n\t}", "@Override\r\n\tpublic void setFocus() {\r\n\t\tif (getControl() != null)\r\n\t\t\tgetControl().setFocus();\r\n\t}", "@Override\r\n\tpublic void setFocus() {\r\n\t}", "private void changeToPhotoFocusDoneView(Boolean bl) {\n this.changeLayoutTo(DefaultLayoutPattern.FOCUS_DONE);\n if (!this.isHeadUpDesplayReady()) {\n return;\n }\n super.changeToPhotoFocusView();\n if (this.mCapturingMode.isFront()) return;\n this.mFocusRectangles.onAutoFocusDone(bl);\n }", "@Override\n\tpublic void setFocus() {\n\t}", "@Override\r\n\tpublic void setFocus() {\n\r\n\t}", "@Override\r\n\tpublic void setFocus() {\n\r\n\t}", "@Override\r\n\tpublic void setFocus() {\n\r\n\t}", "@Override\r\n\tpublic void setFocus() {\n\r\n\t}", "@Override\r\n\tpublic void setFocus() {\n\r\n\t}", "@Override\r\n\tpublic void setFocus() {\n\r\n\t}", "@Override\r\n\tpublic void setFocus() {\n\r\n\t}", "public void setFocus(){\n\t\ttxtText.setFocus(true);\n\t\ttxtText.selectAll();\n\t}", "@Override\n public void setFocus() {\n }", "private void takeABreak(){\n mIsBreak = false;\n mLytBreakLayout.setVisibility(View.VISIBLE);\n startTimer(_str_break);\n }", "private void changeFocus() {\n focusChange(etTitle, llTitle, mActivity);\n focusChange(etOriginalPrice, llOriginalPrice, mActivity);\n focusChange(etTotalItems, llTotalItems, mActivity);\n focusChange(etDescription, llDescription, mActivity);\n }", "@Override\n public void setFocus()\n {\n this.textInput.setFocus();\n }", "public void Focus() {\n }", "@Override\r\n\tpublic void focus() {\r\n\t\tactivate();\r\n\t\ttoFront();\r\n\t}", "void focus();", "void focus();", "protected void redisplayBottomBox() {\n timeBox.setVisible(timePanel.isVisible());\n // Force a new layout of this and everything above it\n timeBox.invalidate();\n validate(); // Do the layout of the whole frame\n\n // The reqFoc doesn't work. The system sets it to the buttons async,\n // after the box appears.\n // Return focus to the frame, not in this panel (buttons!)\n requestFocus();\n }", "public void setFocus() {\n\t\tcompositeQueryTree.setFocus();\n\t}", "@Override\n public void setFocus() {\n if (!modes.get(BCOConstants.F_SHOW_ANALYZER)) {\n if (textViewer != null) {\n textViewer.getTextWidget().setFocus();\n }\n } else {\n if (tableControl != null) {\n tableControl.setFocus();\n }\n }\n }", "@Override\n public void onClick(View view) {\n // clear and set the focus on this viewgroup\n this.clearFocus();\n this.requestFocus();\n // now, the focus listener in Activity will handle\n // the focus change state when this layout is clicked\n }", "public void focus() {\n if (toSetFocus != null) {\n toSetFocus.requestFocus();\n } else {\n root.requestFocus();\n toSetFocus = null;\n }\n }", "public void setFocus() {\r\n\t\tIFormPart part = _parts.get(0);\r\n\t\tif ( part != null ) part.setFocus();\r\n\t}", "public void mouseClicked(MouseEvent e){\n\r\n TShapePanel.this.requestFocus(); //Aug 06\r\n\r\n }", "public void onAttachedToWindow() {\n super.onAttachedToWindow();\n if (!isInEditMode()) {\n this.mAdjustRelockTimePadLockPresenter.start();\n }\n }", "private void setFocus() {\n\t\tif (held) {\n\t\t\tfocus.x = img.getWidth() / 2;\n\t\t\tfocus.y = img.getHeight();\n\t\t} else {\n\t\t\tfocus.x = img.getWidth();\n\t\t\tfocus.y = img.getHeight() /2;\n\t\t} // end else\n\t}", "T setTapToFocusHoldTimeMillis(int val);", "private void requestFocus(View view) {\n if (view.requestFocus()) {\n getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_VISIBLE);\n }\n }", "@Override\r\n\tpublic boolean isFocused() {\n\t\treturn false;\r\n\t}", "public void pickAdTime(View view) {\n\n DialogFragment newFragment = new AdTimePicker();\n newFragment.show(getFragmentManager(), \"adTimePicker\");\n\n }", "@Override\n public void onClick(View view) {\n timeDialog.show(getFragmentManager(), \"timePicker\");\n }", "public void m16206h() {\n this.f13199d.setVisibility(0);\n this.f13199d.setFocusableInTouchMode(true);\n this.f13199d.requestFocus();\n this.f13199d.setOnKeyListener(this.f13198c);\n this.f13125b.f13131e = true;\n }", "void setFocus( ChatTarget focus );", "@Override\n public void onWindowFocusChanged(boolean hasFocus) {\n\n if (hasFocus) {\n animationDrawable.start();\n// factoryHandler.sendEmptyMessageDelayed(0, 3000);\n// startActivity(new Intent(FactoryActivity.this, LanguageActivity.class));\n// finish();\n// decorView.setSystemUiVisibility(uiOption);\n timer();\n }\n }", "public void setFormFocus() {\n\t\tint column = dm.getColSelected();\n\t\tif (rowElements.size() > column) {\n\t\t\tSystem.out.println(\"FormEntryTab.setFormFocus()\");\n\t\t\trowElements.get(column).requestFocusInWindow();\n\t\t}\n\t}", "public void run() {\n txtSpclDate.requestFocus();\n }", "@Override\n public void onClick(View v) {\n showDialog(TIME_DIALOG_ID);\n }", "@Override\r\n\t\t\tpublic void onClick(View v) {\n\r\n\t\t\t\tShowTimePickerDialog();\r\n\r\n\t\t\t}", "public void focus() {\n\t\tJWLC.nativeHandler().wlc_output_focus(this.to());\n\t}", "@Override\n public void setFocused()\n {\n setImage(\"MinusFocused.png\");\n }", "private void requestDefaultFocus() {\r\n if( getFunctionType() == TypeConstants.DISPLAY_MODE ){\r\n ratesBaseWindow.btnCancel.requestFocus();\r\n }else {\r\n ratesBaseWindow.btnOK.requestFocus();\r\n }\r\n }", "void requestFocus() {\n if (this.fieldRate != null) {\n this.fieldRate.requestFocus();\n }\n }", "public void setFocus(boolean focus) {\n if (focus) {\n getContainerElement().focus();\n } else {\n getContainerElement().blur();\n }\n }", "@Override\n public void setActive(View view, boolean state){\n\n TextView textViewActivated = (TextView) view.findViewById(R.id.day);\n\n if(textViewActivated != null){\n if(state) {\n textViewActivated.setBackgroundResource(R.drawable.btn_select_week_day);\n textViewActivated.setTextColor(ContextCompat.getColor(context, R.color.white));\n }\n else {\n textViewActivated.setBackgroundResource(R.drawable.btn_profile_admin);\n textViewActivated.setTextColor(ContextCompat.getColor(context, R.color.deep_purple_400));\n }\n\n }\n }", "public void requestFocus() {\n // Not supported for MenuComponents\n }", "@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog24 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t24Hour24 = hourOfDay1;\n t24Minute24 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t24Hour24, t24Minute24);\n //set selected time on text view\n\n\n timeE12 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editETime12.setText(timeE12);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog24.updateTime(t24Hour24, t24Minute24);\n //show dialog\n timePickerDialog24.show();\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tstartActivity(openTimetable);\n\t\t\t\t//setContentView(R.layout.activity_timetable__gui);\n\t\t\t}", "void setHeaderAccessibilityFocus();", "@Override\n public void onClick(View v) {\n Calendar mcurrentTime = Calendar.getInstance();\n int hour = mcurrentTime.get(Calendar.HOUR_OF_DAY);\n int minute = mcurrentTime.get(Calendar.MINUTE);\n TimePickerDialog mTimePicker;\n mTimePicker = new TimePickerDialog(AddRDV.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker timePicker, int selectedHour, int selectedMinute) {\n editTextHeur.setText(String.format(\"%02d\",selectedHour) + \":\" + String.format(\"%02d\" ,selectedMinute)+\":\"+\"00\");\n }\n }, hour, minute, true);//Yes 24 hour time\n mTimePicker.setTitle(\"Select time of your appointment\");\n mTimePicker.show();\n\n }", "@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog32 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t32Hour32 = hourOfDay1;\n t32Minute32 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t32Hour32, t32Minute32);\n //set selected time on text view\n\n\n timeE16 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editETime16.setText(timeE16);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog32.updateTime(t32Hour32, t32Minute32);\n //show dialog\n timePickerDialog32.show();\n }", "@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog40 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t40Hour40 = hourOfDay1;\n t40Minute40 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t40Hour40, t40Minute40);\n //set selected time on text view\n\n\n timeE20 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editETime20.setText(timeE20);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog40.updateTime(t40Hour40, t40Minute40);\n //show dialog\n timePickerDialog40.show();\n }", "@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog48 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t48Hour48 = hourOfDay1;\n t48Minute48 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t48Hour48, t48Minute48);\n //set selected time on text view\n\n\n timeE24 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editETime24.setText(timeE24);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog48.updateTime(t48Hour48, t48Minute48);\n //show dialog\n timePickerDialog48.show();\n }", "public ControlArbAppFocus () {\n inputManager = InputManager3D.getInputManager();\n }", "public void start() {\n animator.start();\n setVisible(true);\n requestFocus();\n }", "public void focus() {\n getRoot().requestFocus();\n }", "protected void doSetFocus() {\n\t\t// Ignore\n\t}", "@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog18 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t18Hour18 = hourOfDay1;\n t18Minute18 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t18Hour18, t18Minute18);\n //set selected time on text view\n\n\n timeE9 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editETime9.setText(timeE9);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog18.updateTime(t18Hour18, t18Minute18);\n //show dialog\n timePickerDialog18.show();\n }", "@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog34 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t34Hour34 = hourOfDay1;\n t34Minute34 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t34Hour34, t34Minute34);\n //set selected time on text view\n\n\n timeE17 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editETime17.setText(timeE17);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog34.updateTime(t34Hour34, t34Minute34);\n //show dialog\n timePickerDialog34.show();\n }", "private void delayForDefocusTextFieldWorkaround() {\n if (Build.VERSION.SDK_INT <= 27) {\n alarmPeriodTextField.perform(waitMsec(60));\n }\n }", "@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog47 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t47Hour47 = hourOfDay1;\n t47Minute47 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t47Hour47, t47Minute47);\n //set selected time on text view\n\n\n timeS24 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editSTime24.setText(timeS24);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog47.updateTime(t47Hour47, t47Minute47);\n //show dialog\n timePickerDialog47.show();\n }", "@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog39 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t39Hour39 = hourOfDay1;\n t39Minute39 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t39Hour39, t39Minute39);\n //set selected time on text view\n\n\n timeS20 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editSTime20.setText(timeS20);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog39.updateTime(t39Hour39, t39Minute39);\n //show dialog\n timePickerDialog39.show();\n }", "@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog38 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t38Hour38 = hourOfDay1;\n t38Minute38 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t38Hour38, t38Minute38);\n //set selected time on text view\n\n\n timeE19 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editETime19.setText(timeE19);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog38.updateTime(t38Hour38, t38Minute38);\n //show dialog\n timePickerDialog38.show();\n }", "@Override\n public void onClick(View v) {\n orderField = \"orderTime\";\n btn_single_time.setTextColor(getResources().getColor(R.color.colorff6c02));\n btn_array_time.setTextColor(getResources().getColor(R.color.color000000));\n submitInitOrRefreshOrSearch();\n }", "@Override\n\t\t\tpublic void OnAnimateStart(View currentFocusView) {\n\t\t\t\tmFocusAnimationEndFlag = false;\n\t\t\t}", "@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog42 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t42Hour42 = hourOfDay1;\n t42Minute42 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t42Hour42, t42Minute42);\n //set selected time on text view\n\n\n timeE21 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editETime21.setText(timeE21);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog42.updateTime(t42Hour42, t42Minute42);\n //show dialog\n timePickerDialog42.show();\n }", "public void activateButton() {\n\t\tif (isBrowser) this.bringToBack();\r\n\t\tMainActivity.resetXY();\r\n\t}" ]
[ "0.6142135", "0.60901755", "0.6067187", "0.60457456", "0.60447913", "0.5961433", "0.5955083", "0.5955083", "0.5955083", "0.5930116", "0.5911048", "0.5820092", "0.58031654", "0.57849073", "0.57692033", "0.5767916", "0.57640564", "0.5761231", "0.5759486", "0.5717006", "0.5717006", "0.5717006", "0.5717006", "0.5717006", "0.5708708", "0.5708708", "0.5708708", "0.5708708", "0.5699595", "0.5695708", "0.56844884", "0.5642553", "0.563138", "0.56169623", "0.56169623", "0.56169623", "0.56169623", "0.56169623", "0.56169623", "0.56169623", "0.5585253", "0.55822104", "0.5564169", "0.5550371", "0.5549704", "0.551661", "0.5513385", "0.54957336", "0.54957336", "0.548268", "0.5463611", "0.54586387", "0.5444054", "0.54395574", "0.54388964", "0.54313415", "0.541245", "0.53976697", "0.5392901", "0.53667516", "0.5354966", "0.5338297", "0.532215", "0.5306998", "0.5303473", "0.5298934", "0.5291488", "0.5289012", "0.5278891", "0.5261716", "0.5259364", "0.5255362", "0.52455086", "0.52332366", "0.5229545", "0.52120286", "0.520914", "0.5195194", "0.51842606", "0.518236", "0.5181199", "0.51710224", "0.5167636", "0.5159769", "0.5156621", "0.5150296", "0.5145459", "0.5144152", "0.5134017", "0.5126571", "0.512655", "0.51249325", "0.5121693", "0.51208043", "0.5120479", "0.5117815", "0.5114093", "0.5112344" ]
0.62275547
2
if urlText not focused, hide keyboard
@Override public void onFocusChange(View v, boolean hasFocus) { if(!hasFocus) { imm.hideSoftInputFromWindow(layout.getWindowToken(), 0); } else { urlText.selectAll(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void hideKeyboard() {\n\t\tInputMethodManager inputMgr = (InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE);\n\t\tEditText editText = (EditText)findViewById(R.id.searchtext);\n\t\tinputMgr.hideSoftInputFromWindow(editText.getWindowToken(), 0);\t\t\n\t}", "public void setInputMethodShowOff() {\n\n }", "public void hideKeyboard() {\n getDriver().hideKeyboard();\n }", "private void hideKeypad() {\n EditText editTextView = (EditText) findViewById(R.id.book_search_text);\n\n InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);\n imm.hideSoftInputFromWindow(editTextView.getWindowToken(), 0);\n }", "void urlFieldEnterKeyPressed();", "private void hideKeyboard() {\n View view = this.getCurrentFocus();\n if (view != null) {\n InputMethodManager inputManager = (InputMethodManager) this.getSystemService( Context.INPUT_METHOD_SERVICE );\n inputManager.hideSoftInputFromWindow( view.getWindowToken(), InputMethodManager.HIDE_NOT_ALWAYS );\n }\n }", "private void hideKeyboard() {\n View view = this.getCurrentFocus();\n if (view != null) {\n InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);\n imm.hideSoftInputFromWindow(view.getWindowToken(), 0);\n }\n }", "private void hideKeyboard() {\n\t View view = this.getCurrentFocus();\n\t if (view != null) {\n\t InputMethodManager inputManager = (InputMethodManager) this.getSystemService(Context.INPUT_METHOD_SERVICE);\n\t inputManager.hideSoftInputFromWindow(view.getWindowToken(), InputMethodManager.HIDE_NOT_ALWAYS);\n\t }\n\t}", "private void hideKeyboard() {\n\t View view = this.getCurrentFocus();\n\t if (view != null) {\n\t InputMethodManager inputManager = (InputMethodManager) this.getSystemService(Context.INPUT_METHOD_SERVICE);\n\t inputManager.hideSoftInputFromWindow(view.getWindowToken(), InputMethodManager.HIDE_NOT_ALWAYS);\n\t }\n\t}", "private void hideKeyboard() {\n View view = this.getCurrentFocus();\n if (view != null) {\n InputMethodManager inputManager = (InputMethodManager) this\n .getSystemService(Context.INPUT_METHOD_SERVICE);\n inputManager.hideSoftInputFromWindow(view.getWindowToken(),\n InputMethodManager.HIDE_NOT_ALWAYS);\n }\n }", "private void hideKeyboard() {\n //check to make sure no view has focus\n View view = this.getCurrentFocus();\n\n if (view != null) {\n InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);\n imm.hideSoftInputFromWindow(view.getWindowToken(), 0);\n }\n }", "private void hideKeyboard() {\n\t\tView view = getActivity().getCurrentFocus();\n\t\tif ( view != null ) {\n\t\t\tInputMethodManager inputManager = ( InputMethodManager ) getActivity().getSystemService( Context.INPUT_METHOD_SERVICE );\n\t\t\tinputManager.hideSoftInputFromWindow( view.getWindowToken(), InputMethodManager.HIDE_NOT_ALWAYS );\n\t\t}\n\t}", "public void hideKeyboard() {\n View view = this.getCurrentFocus();\n if (view != null) {\n InputMethodManager inputManager = (InputMethodManager) this.getSystemService(Context.INPUT_METHOD_SERVICE);\n inputManager.hideSoftInputFromWindow(view.getWindowToken(), InputMethodManager.HIDE_NOT_ALWAYS);\n }\n }", "@Override\n public void onWebContentsLostFocus() {\n hide();\n }", "public void onPressHideKeyboard(EditText editText){\n editText.setOnFocusChangeListener(new View.OnFocusChangeListener() {\n /*hide keyboard\n If press any else where on screen, (need clickable=\"true\" & focusableInTouchMode=\"true\" in base layer xml)\n */\n @Override\n public void onFocusChange(View v, boolean hasFocus) { // if focus has changed\n if (!hasFocus) {\n InputMethodManager inputMethodManager = (InputMethodManager) getSystemService(Activity.INPUT_METHOD_SERVICE);\n inputMethodManager.hideSoftInputFromWindow(v.getWindowToken(), 0);\n }\n }\n });\n\n }", "public void hideWindowSoftKeyboard() {\n getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_HIDDEN);\n }", "private void hideKeyboard() {\n View view = getActivity().getCurrentFocus();\n if (view != null) {\n InputMethodManager inputManager = (InputMethodManager) getActivity().getSystemService(Context.INPUT_METHOD_SERVICE);\n inputManager.hideSoftInputFromWindow(view.getWindowToken(), InputMethodManager.HIDE_NOT_ALWAYS);\n }\n }", "public void hideKeyboard() {\n try {\n InputMethodManager inputmanager = (InputMethodManager)this.getSystemService(Context.INPUT_METHOD_SERVICE);\n if (inputmanager != null) {\n inputmanager.hideSoftInputFromWindow(this.getCurrentFocus().getWindowToken(), 0);\n }\n } catch (Exception var2) {\n }\n }", "public void hideKeyboard() {\n View view = getCurrentFocus();\n if (view != null) {\n InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);\n if (imm != null) {\n imm.hideSoftInputFromWindow(view.getWindowToken(), 0);\n }\n }\n }", "public void hideKeyboard(){\n\t\tInputMethodManager inputMethodManager = (InputMethodManager) getApplicationContext().getSystemService(Context.INPUT_METHOD_SERVICE);\n\t\tinputMethodManager.toggleSoftInput(InputMethodManager.HIDE_IMPLICIT_ONLY, 0);\n\t}", "@Override\r\n\tpublic boolean isFocused() {\n\t\treturn false;\r\n\t}", "@Override\n public void hide() {\n Gdx.input.setOnscreenKeyboardVisible(false);\n super.hide();\n }", "@Override\n public void onFocusChange(View v, boolean hasFocus) { // if focus has changed\n if (!hasFocus) {\n InputMethodManager inputMethodManager = (InputMethodManager) getSystemService(Activity.INPUT_METHOD_SERVICE);\n inputMethodManager.hideSoftInputFromWindow(v.getWindowToken(), 0);\n }\n }", "B disableTextInput();", "@Override\n public void onFocusChange(View view, boolean hasFocus) {\n if (hasFocus || view.isInTouchMode() || mUrlInput.needsUpdate()) {\n setFocusState(hasFocus);\n }\n if (hasFocus) {\n mBaseUi.showTitleBar();\n if (!BrowserSettings.getInstance().isPowerSaveModeEnabled()) {\n //Notify about anticipated network activity\n NetworkServices.hintUpcomingUserActivity();\n }\n } else if (!mUrlInput.needsUpdate()) {\n mUrlInput.dismissDropDown();\n mUrlInput.hideIME();\n if (mUrlInput.getText().length() == 0) {\n Tab currentTab = mUiController.getTabControl().getCurrentTab();\n if (currentTab != null) {\n setDisplayTitle(currentTab.getTitle(), currentTab.getUrl());\n }\n }\n }\n mUrlInput.clearNeedsUpdate();\n }", "public void hideSoftKeyboard() {\n if(getCurrentFocus()!=null) {\n InputMethodManager inputMethodManager = (InputMethodManager) getSystemService(INPUT_METHOD_SERVICE);\n inputMethodManager.hideSoftInputFromWindow(getCurrentFocus().getWindowToken(), 0);\n }\n }", "public void hideSoftKeyboard() {\n\t if(getCurrentFocus()!=null) {\n\t InputMethodManager inputMethodManager = (InputMethodManager) getSystemService(INPUT_METHOD_SERVICE);\n\t inputMethodManager.hideSoftInputFromWindow(getCurrentFocus().getWindowToken(), 0);\n\t }\n\t}", "private void schowajKlawiature() {\n View view = this.getActivity().getCurrentFocus(); //inside a fragment you should use getActivity()\n if (view != null) {\n InputMethodManager imm = (InputMethodManager) getActivity().getSystemService(context.INPUT_METHOD_SERVICE);\n imm.hideSoftInputFromWindow(view.getWindowToken(), 0);\n }\n }", "void hideSoftKeyBoard();", "@Override\r\n\tpublic boolean onTouchEvent(MotionEvent event) {\n\t\tif (event.getAction() == MotionEvent.ACTION_DOWN) {\r\n\t\t\tif (getCurrentFocus() != null\r\n\t\t\t\t\t&& getCurrentFocus().getWindowToken() != null) {\r\n\t\t\t\tmanager.hideSoftInputFromWindow(getCurrentFocus()\r\n\t\t\t\t\t\t.getWindowToken(), InputMethodManager.HIDE_NOT_ALWAYS);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn super.onTouchEvent(event);\r\n\t}", "@Override\n public void onClick(View view) {\n InputMethodManager imm = (InputMethodManager)context.getSystemService(Context.INPUT_METHOD_SERVICE);\n imm.hideSoftInputFromWindow(homesearchbar.getWindowToken(), 0);\n // launch_search(searchText.getText().toString());\n homecontainer.setVisibility(View.VISIBLE);\n homesearchbar.setVisibility(View.INVISIBLE);\n searchText.setText(\"\");\n }", "@Override\n\tpublic void onClick(View arg0) {\n\t\tswitch (arg0.getId()) {\n\t\tcase R.id.bGo:\n\t\t\tInputMethodManager mgr = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);\n\t\t\tmgr.hideSoftInputFromWindow(inputText.getWindowToken(), 0);\n\t\t\tString theWebsite = inputText.getText().toString();\n\t\t\ttheBrow.loadUrl((\"http:\" + theWebsite));\n\t\t\tinputText.setCursorVisible(false);\n\n\t\t\tbreak;\n\t\tcase R.id.editUrl:\n\t\t\tinputText.setCursorVisible(true);\n\t\t\tbreak;\n\t\tcase R.id.bBack:\n\t\t\tif (theBrow.canGoBack()) {\n\t\t\t\ttheBrow.goBack();\n\t\t\t}\n\t\t\tbreak;\n\t\tcase R.id.brefresh:\n\t\t\ttheBrow.reload();\n\t\t\tbreak;\n\t\tcase R.id.bForward:\n\t\t\tif (theBrow.canGoForward()) {\n\t\t\t\ttheBrow.goForward();\n\t\t\t}\n\t\t\tbreak;\n\t\t}\n\t}", "@Override\n public boolean onQueryTextSubmit(String query) {\n InputMethodManager imm = (InputMethodManager)mSearchView.getContext().getSystemService(Context.INPUT_METHOD_SERVICE);\n imm.hideSoftInputFromWindow(mSearchView.getWindowToken(), 0);\n return true;\n }", "public void hideSoftKeyboard() {\n if (getActivity().getCurrentFocus() != null) {\n InputMethodManager inputMethodManager = (InputMethodManager) getActivity().getSystemService(getActivity().INPUT_METHOD_SERVICE);\n inputMethodManager.hideSoftInputFromWindow(getActivity().getCurrentFocus().getWindowToken(), 0);\n }\n }", "protected void stopEnterText()\n\t{ if (text.getText().length() > 0) text.setText(text.getText().substring(0, text.getText().length() - 1)); }", "@Override\n public boolean onTouchEvent(MotionEvent event) {\n if(event.getAction() == MotionEvent.ACTION_DOWN){\n if(getCurrentFocus()!=null && getCurrentFocus().getWindowToken()!=null){\n manager.hideSoftInputFromWindow(getCurrentFocus().getWindowToken(), InputMethodManager.HIDE_NOT_ALWAYS);\n }\n }\n return super.onTouchEvent(event);\n }", "public void hideSoftKeyboard(){\n InputMethodManager imm = (InputMethodManager) context.getSystemService(Context.INPUT_METHOD_SERVICE);\n imm.hideSoftInputFromWindow(view.getWindowToken(), 0);\n // imm.toggleSoftInput(InputMethodManager.SHOW_FORCED, InputMethodManager.HIDE_IMPLICIT_ONLY);\n }", "@Override\n public boolean isFocusable() {\n return false;\n }", "public void setFocus() {\n \t\t// set initial focus to the URL text combo\n \t\turlCombo.setFocus();\n \t}", "void removeFocus();", "@Override\n public void onClick(View view) {\n InputMethodManager imm = (InputMethodManager) context.getSystemService(Context.INPUT_METHOD_SERVICE);\n imm.hideSoftInputFromWindow(gridsearchbar.getWindowToken(), 0);\n //launch_search(searchTextG.getText().toString());\n gridhomecontainer.setVisibility(View.VISIBLE);\n gridsearchbar.setVisibility(View.INVISIBLE);\n searchTextG.setText(\"\");\n }", "public void hideSoftKeyboard()\n\t{\n\t\tif (getCurrentFocus() != null)\n\t\t{\n\t\t\tInputMethodManager inputMethodManager = (InputMethodManager) getSystemService(INPUT_METHOD_SERVICE);\n\t\t\tinputMethodManager.hideSoftInputFromWindow(getCurrentFocus()\n\t\t\t\t\t.getWindowToken(), 0);\n\t\t}\n\t\t// InputMethodManager imm = (InputMethodManager)\n\t\t// getSystemService(INPUT_METHOD_SERVICE);\n\t\t// imm.hideSoftInputFromWindow(editHousePrice.getWindowToken(), 0);\n\t}", "@Override\n public void focusGained(FocusEvent arg0) {\n if(jtxt_username.getText().contains(\"Type in your username...\")){\n jtxt_username.setText(\"\");\n }\n }", "public boolean isFocus() {\n\t\tif(lfocus.getText().equals(\"取消关注\"))\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\tlfocus.setText(\"取消关注\");\n\t\treturn false;\n\t}", "public void onClick(View v) {\n editText1.setInputType(InputType.TYPE_NULL);\n InputMethodManager mgr = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);\n mgr.hideSoftInputFromWindow(editText1.getWindowToken(),InputMethodManager.HIDE_IMPLICIT_ONLY);\n }", "public void hideSoftKeyboard() {\n\t\tif (getCurrentFocus() != null) {\n\t\t\tInputMethodManager inputMethodManager = (InputMethodManager) getSystemService(INPUT_METHOD_SERVICE);\n\t\t\tinputMethodManager.hideSoftInputFromWindow(getCurrentFocus()\n\t\t\t\t\t.getWindowToken(), 0);\n\t\t}\n\t}", "public void onClick(View v) {\n editText2.setInputType(InputType.TYPE_NULL);\n InputMethodManager mgr = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);\n mgr.hideSoftInputFromWindow(editText2.getWindowToken(),InputMethodManager.HIDE_IMPLICIT_ONLY);\n }", "@Override\n\t\t\t\tpublic void onClick(View v) {\n\t \t\t\t getWindow().setSoftInputMode(\n\t \t \t WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_HIDDEN);\n\t \t\t\tshowDialog();\n\t\t\t\t}", "public void hideInputMethod(IBinder token) {\n \tif (mImMgr != null) {\n \t\tmImMgr.hideSoftInputFromWindow(token, 0);\n \t}\n }", "public void onClick(View v) {\n editText3.setInputType(InputType.TYPE_NULL);\n InputMethodManager mgr = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);\n mgr.hideSoftInputFromWindow(editText3.getWindowToken(),InputMethodManager.HIDE_IMPLICIT_ONLY);\n }", "public static void hideKeyboard(Activity activity) {\n activity.getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_HIDDEN);\n }", "private void dismisskeyboard() {\n InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);\n imm.hideSoftInputFromWindow(usernameTxt.getWindowToken(), 0);\n imm.hideSoftInputFromWindow(passwordTxt.getWindowToken(), 0);\n imm.hideSoftInputFromWindow(fullnameTxt.getWindowToken(), 0);\n }", "public void setInputMethodShowOn() {\n\n }", "private void hideSoftKeyboard() {\n\n FragmentActivity activity = getActivity();\n\n InputMethodManager in = (InputMethodManager)activity.getSystemService(Context.INPUT_METHOD_SERVICE);\n in.hideSoftInputFromWindow(editTextEmail.getWindowToken(), 0);\n }", "public static void HideKeyboardMain(Activity mContext, View view) {\n try {\n InputMethodManager imm = (InputMethodManager) mContext\n .getSystemService(Context.INPUT_METHOD_SERVICE);\n // R.id.search_img\n imm.hideSoftInputFromWindow(view.getWindowToken(), 0);\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "public void focusLost(FocusEvent arg0) {\r\n\t\thelpActive = false;\r\n\t\tpopup.setVisible(false);\r\n\t}", "public static void hideKeyboard(Activity activity)\n {\n View view = activity.getCurrentFocus();\n //If no view currently has focus, create a new one, just so we can grab a window token from it\n if(view != null)\n {\n InputMethodManager inputMethodManager = (InputMethodManager) activity.getSystemService(Activity.INPUT_METHOD_SERVICE);\n inputMethodManager.hideSoftInputFromWindow(view.getWindowToken(), 0);\n }\n }", "public static void hideKeyboard(Context context, EditText editText) {\n InputMethodManager imm = (InputMethodManager) context.getSystemService(Context.INPUT_METHOD_SERVICE);\n if (editText != null) {\n imm.hideSoftInputFromWindow(editText.getWindowToken(), 0);\n //editText.clearFocus();\n //editText.setInputType(0);\n }\n }", "@Override\r\n public boolean dispatchTouchEvent(MotionEvent event) {\n\r\n if (event.getAction() == MotionEvent.ACTION_DOWN) {\r\n View v = getCurrentFocus();\r\n if (v instanceof EditText) {\r\n Rect outRect = new Rect();\r\n v.getGlobalVisibleRect(outRect);\r\n if (!outRect.contains((int) event.getRawX(), (int) event.getRawY())) {\r\n v.clearFocus();\r\n InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);\r\n imm.hideSoftInputFromWindow(v.getWindowToken(), 0);\r\n }\r\n }\r\n }\r\n return super.dispatchTouchEvent(event);\r\n }", "@Override\n public void onClick(View v) {\n searchET.setText(\"\");\n //hide keyboard\n Utils.hideKeyboard(getActivity());\n }", "public void closeKeyboard(){\n View v = getCurrentFocus();\n if(v != null){\n imm = (InputMethodManager) getSystemService(Activity.INPUT_METHOD_SERVICE);\n imm.toggleSoftInput(InputMethodManager.HIDE_IMPLICIT_ONLY, 0);\n }\n }", "public void supressKeyboard() {\n\t\tgetWindow().setSoftInputMode(\n\t\t\t\tWindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_HIDDEN);\n\t}", "public static void hideKeyboard(Activity activity){\n\t\tif (activity.getCurrentFocus() != null){\n\t \tInputMethodManager inputMethodManager = (InputMethodManager) activity.getSystemService(Activity.INPUT_METHOD_SERVICE);\n\t \tinputMethodManager.hideSoftInputFromWindow(activity.getCurrentFocus().getWindowToken(), InputMethodManager.HIDE_NOT_ALWAYS);\n\t }\n\t}", "public void focus() {}", "@Override\n public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {\n if (actionId == EditorInfo.IME_ACTION_SEARCH) {\n //Hide soft keyboard\n InputMethodManager imm = (InputMethodManager) MyApp.getContext().getSystemService(Context.INPUT_METHOD_SERVICE);\n imm.hideSoftInputFromWindow(edtSearch.getWindowToken(), 0);\n\n if (edtSearch.getText().toString().length() > 0)\n btnCancelSearch.setVisibility(View.VISIBLE);\n else\n btnCancelSearch.setVisibility(View.GONE);\n //searchItems();\n return true;\n }\n return false;\n }", "private void hideKeyboard(View view) {\n InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);\n imm.hideSoftInputFromWindow(view.getWindowToken(), 0);\n\n }", "private void closeKeyboard(){\n View view = this.getCurrentFocus();\n if (view != null){\n InputMethodManager imm = (InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE);\n imm.hideSoftInputFromWindow(view.getWindowToken(), 0);\n }\n }", "void onKeyboardVisibilityChanged(boolean isKeyboardShow);", "protected void hideKeyboard(View view)\n {\n InputMethodManager in = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);\n in.hideSoftInputFromWindow(view.getWindowToken(), InputMethodManager.HIDE_NOT_ALWAYS);\n }", "final void clearMostRecentFocusOwnerOnHide() {\n /* do nothing */\n }", "@Override\n\t\t\tpublic boolean onEditorAction(TextView v, int actionId, KeyEvent event) {\n\t\t\t\tif(event!=null){\n\t\t\t\tInputMethodManager imm = (InputMethodManager)getSystemService(\n\t\t\t\t\t Context.INPUT_METHOD_SERVICE);\n\t\t\t\t\timm.hideSoftInputFromWindow(v.getWindowToken(), 0);\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\treturn false;\n\t\t\t}", "boolean hasFocus() {\n\t\t\tif (text == null || text.isDisposed()) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\treturn text.getShell().isFocusControl() || text.isFocusControl();\n\t\t}", "@Override\n public void onFocusChange(View v, boolean hasFocus) {\n if (hasFocus)\n showKeyboard();\n else {\n hideKeyboard();\n }\n\n }", "protected void onFocusGained()\n {\n ; // do nothing. \n }", "public static void hideKeyboard(Context context, View myEditText) {\n hideKeyboard(context);\n try {\n InputMethodManager imm = (InputMethodManager) context.getSystemService(Context.INPUT_METHOD_SERVICE);\n imm.hideSoftInputFromWindow(myEditText.getWindowToken(), 0);\n } catch (Exception ignored) {\n }\n }", "public void stopKeyboard() {\n\t\tthis.stopKeyboard = true;\n\t}", "@Override\n public void setFocus(Context context) {\n InputMethodManager inputManager =\n (InputMethodManager) context.getSystemService(Context.INPUT_METHOD_SERVICE);\n inputManager.hideSoftInputFromWindow(this.getWindowToken(), 0);\n\n }", "private static void hideSoftKeyboard(Activity activity) {\n InputMethodManager inputMethodManager =\n (InputMethodManager) activity.getSystemService(\n Activity.INPUT_METHOD_SERVICE);\n inputMethodManager.hideSoftInputFromWindow(\n activity.getCurrentFocus().getWindowToken(), 0);\n }", "void startEditingUrl(boolean clearInput, boolean forceIME) {\n // editing takes preference of progress\n setVisibility(View.VISIBLE);\n if (clearInput) {\n mUrlInput.setText(\"\");\n }\n if (!mUrlInput.hasFocus()) {\n mUrlInput.requestFocus();\n }\n if (forceIME) {\n mUrlInput.showIME();\n }\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n Utility.hideKeyBoard(editText, mContext);\n if (editText.getText().toString().trim().length() > 0) {\n kw.setText(editText.getText().toString().trim());\n } else {\n kw.setText(\"\");\n }\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t if(coop_search_et.getText().toString().isEmpty()){\n\t\t \t\n\t\t \tToast.makeText(activity, \"关键词不能为空\",Toast.LENGTH_SHORT).show();\n\t\t }\n\t\t \n\t\t else\n\t\t {\n\t\t \tkeyword = coop_search_et.getText().toString();\n\t\t \trequestData();\n\t\t \tInputMethodManager imm = (InputMethodManager)activity.\n\t\t\t getSystemService(Context.INPUT_METHOD_SERVICE);\n\t\t \timm.hideSoftInputFromWindow(v.getWindowToken(), InputMethodManager.HIDE_NOT_ALWAYS);\n\t\t }\n\t\t\t}", "@Override\n public void focusGained(FocusEvent arg0) {\n if(jtxt_userName.getText().contains(\"xxx\")){\n jtxt_userName.setText(\"\");\n }\n }", "@Override\n public boolean dispatchTouchEvent(MotionEvent event) {\n if (event.getAction() == MotionEvent.ACTION_UP) {\n View v = getCurrentFocus();\n if (v instanceof EditText) {\n Rect outRect = new Rect();\n v.getGlobalVisibleRect(outRect);\n if (!outRect.contains((int)event.getRawX(), (int)event.getRawY())) {\n v.clearFocus();\n InputMethodManager imm =\n (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);\n imm.hideSoftInputFromWindow(v.getWindowToken(), 0);\n }\n }\n }\n return super.dispatchTouchEvent(event);\n }", "private void closeKeyboard()\n {\n View view = this.getCurrentFocus();\n if(view != null)\n {\n InputMethodManager imm = (InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE);\n imm.hideSoftInputFromWindow(view.getWindowToken(), 0);\n }\n }", "public boolean hideSoftInputBase() {\n if (tOverlaySupport != null) {\n return tOverlaySupport.hideSoftInputBase();\n }\n return false;\n }", "void focus();", "void focus();", "@Override\n public void setFocus()\n {\n this.textInput.setFocus();\n }", "public static void hideSoftInputMethod(Activity activity) {\n InputMethodManager inputManager = (InputMethodManager) activity.getSystemService(Context.INPUT_METHOD_SERVICE);\n inputManager.hideSoftInputFromWindow(\n activity.getWindow().getDecorView().getWindowToken(),\n 0\n );\n try {\n View currentFocus = activity.getWindow().getCurrentFocus();\n if (currentFocus != null)\n currentFocus.clearFocus();\n } catch (Exception e) {\n // current focus could be out of visibility\n }\n }", "public static void hideKeyboard(Activity activity) {\n View view = activity.findViewById(android.R.id.content);\n if (view != null) {\n InputMethodManager imm = (InputMethodManager) activity.getSystemService(Context.INPUT_METHOD_SERVICE);\n imm.hideSoftInputFromWindow(view.getWindowToken(), 0);\n }\n }", "public static void hideSoftKeyboard(Activity activity) {\n if (activity.getCurrentFocus() != null) {\n InputMethodManager inputMethodManager = (InputMethodManager) activity.getSystemService(Context.INPUT_METHOD_SERVICE);\n inputMethodManager.hideSoftInputFromWindow(activity.getCurrentFocus().getWindowToken(), 0);\n }\n }", "public static void hideSoftKeypad(Context context) {\n Activity activity = (Activity) context;\n if(activity != null) {\n InputMethodManager imm = (InputMethodManager) activity.getSystemService(Context.INPUT_METHOD_SERVICE);\n if (activity.getCurrentFocus() != null) {\n imm.hideSoftInputFromWindow(activity.getCurrentFocus().getWindowToken(), 0);\n }\n }\n }", "protected void onFocusLost()\n {\n ; // do nothing. \n }", "private void hideMe() {\n\t\tthis.setVisible(false);\n\t\ttxtName.setText(\"\");\n\t\ttxtEmail.setText(\"\");\n\t\ttxtPhone.setText(\"\");\n\t}", "@Override\n public void onKeyboardChange(boolean isShow, int keyboardHeight) {\n if (!isShow) {\n // dismiss();\n }\n }", "void hidePlaceholder();", "@Override\n public void focusGained(FocusEvent arg0) {\n if(jpassword.getPassword().equals(\"password\")){\n jpassword.setText(\"\");\n }\n }", "public static void hideKeyboard(Activity instance) \n\t{\n\t\tInputMethodManager imm = (InputMethodManager) instance.getSystemService(Activity.INPUT_METHOD_SERVICE);\n\t imm.toggleSoftInput(InputMethodManager.HIDE_IMPLICIT_ONLY, 0); // hide\n\t}", "void setFocus();", "@Override\n public boolean onKey(View v, int keyCode, KeyEvent event) {\n if (keyCode == KeyEvent.KEYCODE_DEL) {\n // this is for backspace\n if(edtCodeNumber3.getSelectionStart() <= 0) {\n edtCodeNumber2.setText(\"\");\n\n Handler handler = new Handler();\n handler.postDelayed(new Runnable() {\n public void run() {\n // do something\n edtCodeNumber2.requestFocus();\n }\n }, 50);\n }\n } else if (edtCodeNumber3.getText().toString().length() == 1)\n edtCodeNumber4.requestFocus();\n return false;\n }" ]
[ "0.6625575", "0.64518404", "0.6347333", "0.6334012", "0.6281871", "0.62800837", "0.6239035", "0.6237449", "0.6237449", "0.6234434", "0.6199721", "0.61975986", "0.6193481", "0.61874044", "0.618441", "0.61500555", "0.6139629", "0.61229235", "0.6122296", "0.61197466", "0.61116576", "0.6049261", "0.6027306", "0.6015912", "0.5990444", "0.5987019", "0.5949082", "0.5939234", "0.59182227", "0.5908745", "0.5877014", "0.58740187", "0.58715314", "0.5855106", "0.58516896", "0.58485854", "0.58426", "0.5838281", "0.58296955", "0.58236915", "0.5815827", "0.578995", "0.5788986", "0.5785603", "0.5784578", "0.5756046", "0.5737861", "0.57319766", "0.5724398", "0.57241356", "0.5720885", "0.57127273", "0.57125556", "0.5709923", "0.567939", "0.5676306", "0.5655826", "0.56500465", "0.5642628", "0.56374764", "0.5637059", "0.56210387", "0.560753", "0.56024927", "0.55996734", "0.55965185", "0.5577475", "0.5576721", "0.55705416", "0.5567498", "0.55650836", "0.553754", "0.5521805", "0.55083746", "0.5507627", "0.5489526", "0.5483196", "0.5481374", "0.54736197", "0.5470406", "0.5467793", "0.5467521", "0.5459524", "0.5452848", "0.5444037", "0.5442408", "0.5442408", "0.543956", "0.54318804", "0.54205704", "0.5417459", "0.5409671", "0.54076576", "0.54054266", "0.54030204", "0.5401491", "0.53900415", "0.53815734", "0.5374449", "0.5366739" ]
0.74313575
0
shows the time picker
public void pickTime(View view) { DialogFragment newFragment = new TimePicker(); newFragment.show(getFragmentManager(), "timePicker"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void showTimePicker(){\n final Calendar c = Calendar.getInstance();\n mHour = c.get(Calendar.HOUR_OF_DAY);\n mMinute = c.get(Calendar.MINUTE);\n\n // Launch Time Picker Dialog\n TimePickerDialog tpd = new TimePickerDialog(this,\n new TimePickerDialog.OnTimeSetListener() {\n\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay,\n int minute) {\n // Display Selected time in textbox\n pickupTime.setText(hourOfDay + \":\" + minute);\n// Log.e(TAG,\"Time set: \" + mHour + \",\" + mMinute + \",\");\n }\n }, mHour, mMinute, false);\n\n tpd.show();\n }", "protected void ShowTimePickerDialog() {\n\r\n\t\tfinal Calendar c = Calendar.getInstance();\r\n\t\tint mHour = c.get(Calendar.HOUR_OF_DAY);\r\n\t\tint mMinute = c.get(Calendar.MINUTE);\r\n\r\n\t\tCustomTimePickerDialog timepicker = new CustomTimePickerDialog(\r\n\t\t\t\tgetActivity(), timePickerListener, mHour, mMinute, false);\r\n\t\ttimepicker.show();\r\n\r\n\t}", "private void showTimePicker(){\n\n // Create new time picker instance\n TimePickerDialog timePicker = new TimePickerDialog(this, (view, hourOfDay, minute) -> {\n // Update booking time\n bookingHour = hourOfDay;\n bookingMinute = minute;\n\n // Set the contents of the edit text to the relevant hours / minutes\n timeInput.setText(getString(R.string.desired_time_format, bookingHour, bookingMinute));\n\n }, bookingHour, bookingMinute, true);\n\n timePicker.setTitle(getString(R.string.desired_time_selection));\n timePicker.show();\n\n // Change button colors\n Button positiveButton = timePicker.getButton(AlertDialog.BUTTON_POSITIVE);\n positiveButton.setTextColor(getColor(R.color.colorPrimary));\n Button negativeButton = timePicker.getButton(AlertDialog.BUTTON_NEGATIVE);\n negativeButton.setTextColor(getColor(R.color.colorPrimary));\n }", "private void showTimerPickerDialog() {\n backupCal = cal;\n if (cal == null) {\n cal = Calendar.getInstance();\n }\n\n TimePickerFragment fragment = new TimePickerFragment();\n\n fragment.setCancelListener(new DialogInterface.OnCancelListener() {\n @Override\n public void onCancel(DialogInterface dialog) {\n cal = backupCal;\n EventBus.getDefault().post(new TaskEditedEvent());\n }\n });\n\n fragment.setCalendar(cal);\n fragment.show(getFragmentManager(), \"timePicker\");\n }", "private void showTimeDialog() {\n\t\tTimePickerDialog tpd = new TimePickerDialog(this, new OnTimeSetListener(){\r\n\t\t\tpublic void onTimeSet(TimePicker view , int hour, int minute){\r\n\t\t\t\tgiorno.set(Calendar.HOUR_OF_DAY,hour);\r\n\t\t\t\tgiorno.set(Calendar.MINUTE,minute); \r\n\t\t\t\tEditText et_ora = (EditText) BookingActivity.this.findViewById(R.id.prenotazione_et_ora);\r\n\t\t\t\tformatter.applyPattern(\"HH:mm\");\r\n\t\t\t\tet_ora.setText(formatter.format(giorno.getTime()));\r\n\t\t\t}\t\t\t \t\r\n\t\t}, giorno.get(Calendar.HOUR_OF_DAY), giorno.get(Calendar.MINUTE), true);\r\n\t\ttpd.show();\r\n\t}", "@Override\n public void onClick(View v) {\n new TimePickerDialog(getActivity(), starttimepicker, trigger.getStarttime().get(Calendar.HOUR), trigger.getStarttime().get(Calendar.MINUTE), true).show();\n }", "@Override\n public void onClick(View view) {\n timeDialog.show(getFragmentManager(), \"timePicker\");\n }", "@Override\n public void onClick(View v) {\n new TimePickerDialog(getActivity(), endtimepicker, trigger.getEndtime().get(Calendar.HOUR), trigger.getEndtime().get(Calendar.MINUTE), true).show();\n }", "public void showTimePickerDialog(int input) {\n Bundle args = new Bundle();\n args.putInt(\"input\", input);\n DialogFragment newFragment = new TimeFragment();\n newFragment.setArguments(args);\n newFragment.show(getSupportFragmentManager(), \"timePicker\");\n }", "public void showTimePickerDialog(View view) {\n TimePickerDialog timePickerDialog = new TimePickerDialog(this,\n new TimePickerDialog.OnTimeSetListener() {\n\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay,\n int minute) {\n hour1 = hourOfDay;\n minute1 = minute;\n text3.setText(hourOfDay + \":\" + minute);\n }\n }, hour1, minute1, true);\n timePickerDialog.show();\n }", "private void chooseTimeDialog() {\n Calendar c = Calendar.getInstance();\n int hourOfDay = c.get(Calendar.HOUR_OF_DAY);\n int minute = c.get(Calendar.MINUTE);\n\n TimePickerDialog timePickerDialog =\n new TimePickerDialog(getContext(), this, hourOfDay, minute, false);\n timePickerDialog.show();\n }", "public void showTimePickerDialog(View v) {\n TextView tf = (TextView) v;\n Bundle args = getTimeFromLabel(tf.getText());\n args.putInt(\"id\", v.getId());\n TimePickerFragment newFragment = new TimePickerFragment();\n newFragment.setArguments(args);\n newFragment.show(getSupportFragmentManager(), \"timePicker\");\n }", "private void showDialogTime() {\n final TimePickerDialog timePickerDialog = new TimePickerDialog(getActivity(),\n new TimePickerDialog.OnTimeSetListener() {\n\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay, int minute) {\n\n mCal.set(Calendar.HOUR_OF_DAY, hourOfDay);\n mCal.set(Calendar.MINUTE, minute);\n\n tvDate.setText(getDateString(mCal));\n\n }\n }, mCal.get(Calendar.HOUR_OF_DAY), mCal.get(Calendar.MINUTE), true);\n\n DatePickerDialog datePickerDialog = new DatePickerDialog(getActivity(),\n new DatePickerDialog.OnDateSetListener() {\n\n @Override\n public void onDateSet(DatePicker view, int year, int monthOfYear, int dayOfMonth) {\n\n mCal.set(Calendar.YEAR, year);\n mCal.set(Calendar.MONTH, monthOfYear);\n mCal.set(Calendar.DAY_OF_MONTH, dayOfMonth);\n\n timePickerDialog.show();\n }\n }, mCal.get(Calendar.YEAR), mCal.get(Calendar.MONTH), mCal.get(Calendar.DAY_OF_MONTH));\n datePickerDialog.show();\n }", "@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog31 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t31Hour31 = hourOfDay1;\n t31Minute31 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t31Hour31, t31Minute31);\n //set selected time on text view\n\n\n timeS16 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editSTime16.setText(timeS16);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog31.updateTime(t31Hour31, t31Minute31);\n //show dialog\n timePickerDialog31.show();\n }", "@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog47 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t47Hour47 = hourOfDay1;\n t47Minute47 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t47Hour47, t47Minute47);\n //set selected time on text view\n\n\n timeS24 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editSTime24.setText(timeS24);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog47.updateTime(t47Hour47, t47Minute47);\n //show dialog\n timePickerDialog47.show();\n }", "@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog39 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t39Hour39 = hourOfDay1;\n t39Minute39 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t39Hour39, t39Minute39);\n //set selected time on text view\n\n\n timeS20 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editSTime20.setText(timeS20);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog39.updateTime(t39Hour39, t39Minute39);\n //show dialog\n timePickerDialog39.show();\n }", "@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog43 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t43Hour43 = hourOfDay1;\n t43Minute43 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t43Hour43, t43Minute43);\n //set selected time on text view\n\n\n timeS22 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editSTime22.setText(timeS22);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog43.updateTime(t43Hour43, t43Minute43);\n //show dialog\n timePickerDialog43.show();\n }", "@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog19 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t19Hour19 = hourOfDay1;\n t19Minute19 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t19Hour19, t19Minute19);\n //set selected time on text view\n\n\n timeS10 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editSTime10.setText(timeS10);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog19.updateTime(t19Hour19, t19Minute19);\n //show dialog\n timePickerDialog19.show();\n }", "@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog41 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t41Hour41 = hourOfDay1;\n t41Minute41 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t41Hour41, t41Minute41);\n //set selected time on text view\n\n\n timeS21 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editSTime21.setText(timeS21);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog41.updateTime(t41Hour41, t41Minute41);\n //show dialog\n timePickerDialog41.show();\n }", "private void setUpTimePickers() {\n timeText.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n\n MaterialTimePicker.Builder builder = new MaterialTimePicker.Builder();\n builder.setTitleText(\"Time Picker Title\");\n builder.setHour(12);\n builder.setMinute(0);\n\n final MaterialTimePicker timePicker = builder.build();\n\n timePicker.addOnPositiveButtonClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n timeChoice = LocalTime.of(timePicker.getHour(),timePicker.getMinute());\n String selectedTimeStr = timeChoice.format(DateTimeFormatter.ofPattern(\"kk:mm\"));\n timeText.setText(selectedTimeStr);\n }\n });\n\n timePicker.show(getSupportFragmentManager(),\"TimePicker\");\n }\n });\n\n }", "public void initializeTime() {\n hour = cal.get(Calendar.HOUR);\n min = cal.get(Calendar.MINUTE);\n\n time = (EditText) findViewById(R.id.textSetTime);\n time.setInputType(InputType.TYPE_NULL);\n\n //Set EditText text to be current time\n if(min < 10) {\n time.setText(hour + \":0\" + min);\n } else {\n time.setText(hour + \":\" + min);\n }\n\n time.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n picker = new TimePickerDialog(ControlCenterActivity.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker timePicker, int i, int i1) {\n if(i1 < 10) {\n time.setText(i + \":0\" + i1);\n } else {\n time.setText(i + \":\" + i1);\n }\n }\n }, hour, min, false);\n\n picker.show();\n }\n });\n }", "@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog21 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t21Hour21 = hourOfDay1;\n t21Minute21 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t21Hour21, t21Minute21);\n //set selected time on text view\n\n\n timeS11 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editSTime11.setText(timeS11);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog21.updateTime(t21Hour21, t21Minute21);\n //show dialog\n timePickerDialog21.show();\n }", "@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog25 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t25Hour25 = hourOfDay1;\n t25Minute25 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t25Hour25, t25Minute25);\n //set selected time on text view\n\n\n timeS13 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editSTime13.setText(timeS13);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog25.updateTime(t25Hour25, t25Minute25);\n //show dialog\n timePickerDialog25.show();\n }", "@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog29 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t29Hour29 = hourOfDay1;\n t29Minute29 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t29Hour29, t29Minute29);\n //set selected time on text view\n\n\n timeS15 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editSTime15.setText(timeS15);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog29.updateTime(t29Hour29, t29Minute29);\n //show dialog\n timePickerDialog29.show();\n }", "@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog42 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t42Hour42 = hourOfDay1;\n t42Minute42 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t42Hour42, t42Minute42);\n //set selected time on text view\n\n\n timeE21 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editETime21.setText(timeE21);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog42.updateTime(t42Hour42, t42Minute42);\n //show dialog\n timePickerDialog42.show();\n }", "@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog23 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t23Hour23 = hourOfDay1;\n t23Minute23 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t23Hour23, t23Minute23);\n //set selected time on text view\n\n\n timeS12 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editSTime12.setText(timeS12);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog23.updateTime(t23Hour23, t23Minute23);\n //show dialog\n timePickerDialog23.show();\n }", "@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog49 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t49Hour49 = hourOfDay1;\n t49Minute49 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t49Hour49, t49Minute49);\n //set selected time on text view\n\n\n timeS25 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editSTime25.setText(timeS25);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog49.updateTime(t49Hour49, t49Minute49);\n //show dialog\n timePickerDialog49.show();\n }", "@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog9 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t9Hour9 = hourOfDay1;\n t9Minute9 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t9Hour9, t9Minute9);\n //set selected time on text view\n\n\n timeS5 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editSTime5.setText(timeS5);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog9.updateTime(t9Hour9, t9Minute9);\n //show dialog\n timePickerDialog9.show();\n }", "@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog37 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t37Hour37 = hourOfDay1;\n t37Minute37 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t37Hour37, t37Minute37);\n //set selected time on text view\n\n\n timeS19 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editSTime19.setText(timeS19);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog37.updateTime(t37Hour37, t37Minute37);\n //show dialog\n timePickerDialog37.show();\n }", "@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog13 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t13Hour13 = hourOfDay1;\n t13Minute13 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t13Hour13, t13Minute13);\n //set selected time on text view\n\n\n timeS7 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editSTime7.setText(timeS7);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog13.updateTime(t13Hour13, t13Minute13);\n //show dialog\n timePickerDialog13.show();\n }", "@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog32 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t32Hour32 = hourOfDay1;\n t32Minute32 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t32Hour32, t32Minute32);\n //set selected time on text view\n\n\n timeE16 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editETime16.setText(timeE16);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog32.updateTime(t32Hour32, t32Minute32);\n //show dialog\n timePickerDialog32.show();\n }", "@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog27 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t27Hour27 = hourOfDay1;\n t27Minute27 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t27Hour27, t27Minute27);\n //set selected time on text view\n\n\n timeS14 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editSTime14.setText(timeS14);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog27.updateTime(t27Hour27, t27Minute27);\n //show dialog\n timePickerDialog27.show();\n }", "@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog45 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t45Hour45 = hourOfDay1;\n t45Minute45 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t45Hour45, t45Minute45);\n //set selected time on text view\n\n\n timeS23 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editSTime23.setText(timeS23);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog45.updateTime(t45Hour45, t45Minute45);\n //show dialog\n timePickerDialog45.show();\n }", "@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog16 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t16Hour16 = hourOfDay1;\n t16Minute16 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t16Hour16, t16Minute16);\n //set selected time on text view\n\n\n timeE8 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editETime8.setText(timeE8);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog16.updateTime(t16Hour16, t16Minute16);\n //show dialog\n timePickerDialog16.show();\n }", "@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog48 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t48Hour48 = hourOfDay1;\n t48Minute48 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t48Hour48, t48Minute48);\n //set selected time on text view\n\n\n timeE24 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editETime24.setText(timeE24);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog48.updateTime(t48Hour48, t48Minute48);\n //show dialog\n timePickerDialog48.show();\n }", "@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog33 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t33Hour33 = hourOfDay1;\n t33Minute33 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t33Hour33, t33Minute33);\n //set selected time on text view\n\n\n timeS17 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editSTime17.setText(timeS17);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog33.updateTime(t33Hour33, t33Minute33);\n //show dialog\n timePickerDialog33.show();\n }", "@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog46 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t46Hour46 = hourOfDay1;\n t46Minute46 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t46Hour46, t46Minute46);\n //set selected time on text view\n\n\n timeE23 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editETime23.setText(timeE23);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog46.updateTime(t46Hour46, t46Minute46);\n //show dialog\n timePickerDialog46.show();\n }", "@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog40 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t40Hour40 = hourOfDay1;\n t40Minute40 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t40Hour40, t40Minute40);\n //set selected time on text view\n\n\n timeE20 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editETime20.setText(timeE20);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog40.updateTime(t40Hour40, t40Minute40);\n //show dialog\n timePickerDialog40.show();\n }", "@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog35 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t35Hour35 = hourOfDay1;\n t35Minute35 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t35Hour35, t35Minute35);\n //set selected time on text view\n\n\n timeS18 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editSTime18.setText(timeS18);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog35.updateTime(t35Hour35, t35Minute35);\n //show dialog\n timePickerDialog35.show();\n }", "@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog17 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t17Hour17 = hourOfDay1;\n t17Minute17 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t17Hour17, t17Minute17);\n //set selected time on text view\n\n\n timeS9 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editSTime9.setText(timeS9);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog17.updateTime(t17Hour17, t17Minute17);\n //show dialog\n timePickerDialog17.show();\n }", "@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog10 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t10Hour10 = hourOfDay1;\n t10Minute10 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t10Hour10, t10Minute10);\n //set selected time on text view\n\n\n timeE5 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editETime5.setText(timeE5);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog10.updateTime(t10Hour10, t10Minute10);\n //show dialog\n timePickerDialog10.show();\n }", "@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog50 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t50Hour50 = hourOfDay1;\n t50Minute50 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t50Hour50, t50Minute50);\n //set selected time on text view\n\n\n timeE25 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editETime25.setText(timeE25);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog50.updateTime(t50Hour50, t50Minute50);\n //show dialog\n timePickerDialog50.show();\n }", "@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog15 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t15Hour15 = hourOfDay1;\n t15Minute15 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t15Hour15, t15Minute15);\n //set selected time on text view\n\n\n timeS8 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editSTime8.setText(timeS8);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog15.updateTime(t15Hour15, t15Minute15);\n //show dialog\n timePickerDialog15.show();\n }", "@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog12 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t12Hour12 = hourOfDay1;\n t12Minute12 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t12Hour12, t12Minute12);\n //set selected time on text view\n\n\n timeE6 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editETime6.setText(timeE6);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog12.updateTime(t12Hour12, t12Minute12);\n //show dialog\n timePickerDialog12.show();\n }", "@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog38 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t38Hour38 = hourOfDay1;\n t38Minute38 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t38Hour38, t38Minute38);\n //set selected time on text view\n\n\n timeE19 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editETime19.setText(timeE19);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog38.updateTime(t38Hour38, t38Minute38);\n //show dialog\n timePickerDialog38.show();\n }", "@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog18 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t18Hour18 = hourOfDay1;\n t18Minute18 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t18Hour18, t18Minute18);\n //set selected time on text view\n\n\n timeE9 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editETime9.setText(timeE9);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog18.updateTime(t18Hour18, t18Minute18);\n //show dialog\n timePickerDialog18.show();\n }", "private void selectTime() {\n Calendar calendar = Calendar.getInstance();\n int hour = calendar.get(Calendar.HOUR_OF_DAY);\n int minute = calendar.get(Calendar.MINUTE);\n TimePickerDialog timePickerDialog = new TimePickerDialog(this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker timePicker, int i, int i1) {\n timeTonotify = i + \":\" + i1; //temp variable to store the time to set alarm\n mTimebtn.setText(FormatTime(i, i1)); //sets the button text as selected time\n }\n }, hour, minute, false);\n timePickerDialog.show();\n }", "@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog3 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t3Hour3 = hourOfDay1;\n t3Minute3 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t3Hour3, t3Minute3);\n //set selected time on text view\n\n\n timeS2 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editSTime2.setText(timeS2);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog3.updateTime(t3Hour3, t3Minute3);\n //show dialog\n timePickerDialog3.show();\n }", "@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog26 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t26Hour26 = hourOfDay1;\n t26Minute26 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t26Hour26, t26Minute26);\n //set selected time on text view\n\n\n timeE13 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editETime13.setText(timeE13);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog26.updateTime(t26Hour26, t26Minute26);\n //show dialog\n timePickerDialog26.show();\n }", "@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog20 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t20Hour20 = hourOfDay1;\n t20Minute20 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t20Hour20, t20Minute20);\n //set selected time on text view\n\n\n timeE10 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editETime10.setText(timeE10);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog20.updateTime(t20Hour20, t20Minute20);\n //show dialog\n timePickerDialog20.show();\n }", "@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog34 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t34Hour34 = hourOfDay1;\n t34Minute34 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t34Hour34, t34Minute34);\n //set selected time on text view\n\n\n timeE17 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editETime17.setText(timeE17);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog34.updateTime(t34Hour34, t34Minute34);\n //show dialog\n timePickerDialog34.show();\n }", "private void setTime(TextView textView) {\n Calendar mcurrentTime = Calendar.getInstance();\n int hour = mcurrentTime.get(Calendar.HOUR_OF_DAY);\n int minute = mcurrentTime.get(Calendar.MINUTE);\n TimePickerDialog mTimePicker;\n mTimePicker = new TimePickerDialog(getActivity(), new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker timePicker, int selectedHour, int selectedMinute) {\n textView.setText( selectedHour + \":\" + selectedMinute);\n }\n }, hour, minute, false);//Yes 24 hour time\n mTimePicker.setTitle(\"Select Time\");\n mTimePicker.show();\n }", "@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog11 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t11Hour11 = hourOfDay1;\n t11Minute11 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t11Hour11, t11Minute11);\n //set selected time on text view\n\n\n timeS6 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editSTime6.setText(timeS6);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog11.updateTime(t11Hour11, t11Minute11);\n //show dialog\n timePickerDialog11.show();\n }", "@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog5 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t5Hour5 = hourOfDay1;\n t5Minute5 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t5Hour5, t5Minute5);\n //set selected time on text view\n\n\n timeS3 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editSTime3.setText(timeS3);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog5.updateTime(t5Hour5, t5Minute5);\n //show dialog\n timePickerDialog5.show();\n }", "@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog1 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t1Hour1 = hourOfDay1;\n t1Minute1 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t1Hour1, t1Minute1);\n //set selected time on text view\n\n\n timeS1 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editSTime1.setText(timeS1);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog1.updateTime(t1Hour1, t1Minute1);\n //show dialog\n timePickerDialog1.show();\n }", "@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog36 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t36Hour36 = hourOfDay1;\n t36Minute36 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t36Hour36, t36Minute36);\n //set selected time on text view\n\n\n timeE18 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editETime18.setText(timeE18);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog36.updateTime(t36Hour36, t36Minute36);\n //show dialog\n timePickerDialog36.show();\n }", "@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog30 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t30Hour30 = hourOfDay1;\n t30Minute30 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t30Hour30, t30Minute30);\n //set selected time on text view\n\n\n timeE15 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editETime15.setText(timeE15);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog30.updateTime(t30Hour30, t30Minute30);\n //show dialog\n timePickerDialog30.show();\n }", "@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog4 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t4Hour4 = hourOfDay1;\n t4Minute4 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t4Hour4, t4Minute4);\n //set selected time on text view\n\n\n timeE2 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editETime2.setText(timeE2);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog4.updateTime(t4Hour4, t4Minute4);\n //show dialog\n timePickerDialog4.show();\n }", "@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog2 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t2Hour2 = hourOfDay1;\n t2Minute2 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t2Hour2, t2Minute2);\n //set selected time on text view\n\n\n timeE1 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editETime1.setText(timeE1);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog2.updateTime(t2Hour2, t2Minute2);\n //show dialog\n timePickerDialog2.show();\n }", "@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog24 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t24Hour24 = hourOfDay1;\n t24Minute24 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t24Hour24, t24Minute24);\n //set selected time on text view\n\n\n timeE12 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editETime12.setText(timeE12);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog24.updateTime(t24Hour24, t24Minute24);\n //show dialog\n timePickerDialog24.show();\n }", "@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog28 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t28Hour28 = hourOfDay1;\n t28Minute28 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t28Hour28, t28Minute28);\n //set selected time on text view\n\n\n timeE14 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editETime14.setText(timeE14);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog28.updateTime(t28Hour28, t28Minute28);\n //show dialog\n timePickerDialog28.show();\n }", "private void showTimePicker(final EditText editText, final boolean isStartType) {\n Calendar mcurrentTime = Calendar.getInstance();\n int hour = mcurrentTime.get(Calendar.HOUR_OF_DAY);\n int minute = mcurrentTime.get(Calendar.MINUTE);\n TimePickerDialog mTimePicker;\n mTimePicker = new TimePickerDialog(mActivity, R.style.DialogTheme, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker timePicker, int selectedHour, int selectedMinute) {\n if (isStartType) {\n Calendar datetime = Calendar.getInstance();\n Calendar c = Calendar.getInstance();\n datetime.set(Calendar.HOUR_OF_DAY, selectedHour);\n datetime.set(Calendar.MINUTE, selectedMinute);\n if (datetime.getTimeInMillis() > c.getTimeInMillis()) {\n// it's after current\n editText.setText(parseTimeToTimeDate(String.format(Locale.getDefault(), \"%02d\", selectedHour) + \":\" +\n String.format(Locale.getDefault(), \"%02d\", selectedMinute)));\n } else {\n// it's before current'\n appUtils.showSnackBar(mActivity.findViewById(android.R.id.content), getString(R.string.start_time_cant_be_less));\n\n }\n } else {\n if (!checktimings(etBeginTime.getText().toString(), parseTimeToTimeDate(String.format(Locale.getDefault(), \"%02d\", selectedHour) + \":\" +\n String.format(Locale.getDefault(), \"%02d\", selectedMinute)))) {\n appUtils.showSnackBar(mActivity.findViewById(android.R.id.content), getString(R.string.end_time_cant_less));\n } else if (pickUpTime != null && !pickUpTime.equals(\"\") && !appUtils.matchSameTime(appUtils.parseDateToTime(pickUpTime), selectedHour + \":\" + selectedMinute)) {\n appUtils.showAlertDialog(mActivity, \"\", getString(R.string.same_pickup_time), getString(R.string.ok), \"\", null);\n } else {\n editText.setText(parseTimeToTimeDate(String.format(Locale.getDefault(), \"%02d\", selectedHour) + \":\" +\n String.format(Locale.getDefault(), \"%02d\", selectedMinute)));\n }\n }\n }\n }, hour, minute, true);//Yes 24 hour time\n mTimePicker.setTitle(\"\");\n mTimePicker.show();\n }", "@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog44 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t44Hour44 = hourOfDay1;\n t44Minute44 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t44Hour44, t44Minute44);\n //set selected time on text view\n\n\n timeE22 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editETime22.setText(timeE22);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog44.updateTime(t44Hour44, t44Minute44);\n //show dialog\n timePickerDialog44.show();\n }", "@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog22 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t22Hour22 = hourOfDay1;\n t22Minute22 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t22Hour22, t22Minute22);\n //set selected time on text view\n\n\n timeE11 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editETime11.setText(timeE11);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog22.updateTime(t22Hour22, t22Minute22);\n //show dialog\n timePickerDialog22.show();\n }", "@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog7 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t7Hour7 = hourOfDay1;\n t7Minute7 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t7Hour7, t7Minute7);\n //set selected time on text view\n\n\n timeS4 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editSTime4.setText(timeS4);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog7.updateTime(t7Hour7, t7Minute7);\n //show dialog\n timePickerDialog7.show();\n }", "@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog8 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t8Hour8 = hourOfDay1;\n t8Minute8 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t8Hour8, t8Minute8);\n //set selected time on text view\n\n\n timeE4 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editETime4.setText(timeE4);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog8.updateTime(t8Hour8, t8Minute8);\n //show dialog\n timePickerDialog8.show();\n }", "public void showTimePickerDialog(View v) {\n DialogFragment newFragment = new DatePickerFragment();\n newFragment.setTargetFragment(RegisterFragment.this, 0);\n newFragment.show(getFragmentManager(), \"datePicker\");\n }", "public void showTimeStartPickerDialog(View v) {\n DialogFragment newFragment = new TimePickerFragment() {\n @Override\n public void onTimeSet(TimePicker view, int hour, int minute) {\n timeStartTV = (TextView)findViewById(R.id.timeStartTV);\n hourStart=hour;\n minuteStart=minute;\n timeStartTV.setText(makeHourFine(hour,minute));\n if(hourEnd!=99||minuteEnd!=99) {\n if ((hourEnd + (minuteEnd / 60.0)) - (hourStart + (minuteStart / 60.0)) >= 0) {\n hoursD = Round((hourEnd + (minuteEnd / 60.0)) - (hourStart + (minuteStart / 60.0)), 2);\n } else\n hoursD = Round((hourEnd + (minuteEnd / 60.0)) + 24 - (hourStart + (minuteStart / 60.0)), 2);\n\n hours = (EditText) findViewById(R.id.HoursET);\n hours.setText(Double.toString(hoursD));\n }\n\n }\n\n };\n newFragment.show(getSupportFragmentManager(), \"timeStartPicker\");\n }", "@Override\n public void onClick(View v) {\n Calendar mcurrentTime = Calendar.getInstance();\n int hour = mcurrentTime.get(Calendar.HOUR_OF_DAY);\n int minute = mcurrentTime.get(Calendar.MINUTE);\n TimePickerDialog mTimePicker;\n mTimePicker = new TimePickerDialog(getActivity(), new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker timePicker, int selectedHour, int selectedMinute) {\n eventTime.setText( selectedHour + \":\" + selectedMinute);\n }\n }, hour, minute, true);//Yes 24 hour time\n mTimePicker.setTitle(\"Event Time\");\n mTimePicker.show();\n\n }", "@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog14 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t14Hour14 = hourOfDay1;\n t14Minute14 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t14Hour14, t14Minute14);\n //set selected time on text view\n\n\n timeE7 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editETime7.setText(timeE7);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog14.updateTime(t14Hour14, t14Minute14);\n //show dialog\n timePickerDialog14.show();\n }", "private void getTimeView() {\n\n\t\ttry {\n\n\t\t\t// Launch Time Picker Dialog\n\n\t\t\tSystem.out.println(\"!!!!!in time picker\" + hour);\n\t\t\tSystem.out.println(\"!!!!!in time picker\" + minutes);\n\n\t\t\tTimePickerDialog tpd = new TimePickerDialog(this,\n\t\t\t\t\tnew TimePickerDialog.OnTimeSetListener() {\n\n\t\t\t\t\t\t@Override\n\t\t\t\t\t\tpublic void onTimeSet(TimePicker view, int hourOfDay,\n\t\t\t\t\t\t\t\tint minute) {\n\n\t\t\t\t\t\t\tif (rf_booking_date_box.getText().toString()\n\t\t\t\t\t\t\t\t\t.equalsIgnoreCase(currDate.toString())) {\n\t\t\t\t\t\t\t\tc = Calendar.getInstance();\n\t\t\t\t\t\t\t\tint curr_hour = c.get(Calendar.HOUR_OF_DAY);\n\t\t\t\t\t\t\t\tint curr_minutes = c.get(Calendar.MINUTE);\n\n\t\t\t\t\t\t\t\tSystem.out\n\t\t\t\t\t\t\t\t\t\t.println(\"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!shikha\"\n\t\t\t\t\t\t\t\t\t\t\t\t+ curr_hour);\n\t\t\t\t\t\t\t\tSystem.out\n\t\t\t\t\t\t\t\t\t\t.println(\"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!shikha\"\n\t\t\t\t\t\t\t\t\t\t\t\t+ curr_minutes);\n\n\t\t\t\t\t\t\t\tSystem.out\n\t\t\t\t\t\t\t\t\t\t.println(\"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!hourOfDay<curr_hour\"\n\t\t\t\t\t\t\t\t\t\t\t\t+ (hourOfDay < curr_hour));\n\t\t\t\t\t\t\t\tSystem.out\n\t\t\t\t\t\t\t\t\t\t.println(\"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!minute<curr_minutes\"\n\t\t\t\t\t\t\t\t\t\t\t\t+ (minute < curr_minutes));\n\n\t\t\t\t\t\t\t\tif (hourOfDay < curr_hour\n\t\t\t\t\t\t\t\t\t\t&& minute < curr_minutes\n\t\t\t\t\t\t\t\t\t\t|| hourOfDay < curr_hour\n\t\t\t\t\t\t\t\t\t\t&& minute <= curr_minutes\n\t\t\t\t\t\t\t\t\t\t|| hourOfDay == curr_hour\n\t\t\t\t\t\t\t\t\t\t&& minute < curr_minutes) {\n\t\t\t\t\t\t\t\t\tSystem.out\n\t\t\t\t\t\t\t\t\t\t\t.println(\"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! in if\");\n\t\t\t\t\t\t\t\t\tToast.makeText(\n\t\t\t\t\t\t\t\t\t\t\tgetApplicationContext(),\n\t\t\t\t\t\t\t\t\t\t\tgetString(R.string.str_Please_choose_valid_time),\n\t\t\t\t\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t\t\tminutes = minute;\n\t\t\t\t\t\t\t\t\thour = hourOfDay;\n\n\t\t\t\t\t\t\t\t\tString time1 = hour + \":\" + minutes;\n\n\t\t\t\t\t\t\t\t\tDate time;\n\t\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\t\ttime = new SimpleDateFormat(\"HH:mm\")\n\t\t\t\t\t\t\t\t\t\t\t\t.parse(hour + \":\" + minutes);\n\n\t\t\t\t\t\t\t\t\t\tDateFormat outputFormatter = new SimpleDateFormat(\n\t\t\t\t\t\t\t\t\t\t\t\t\"HH:mm\");\n\t\t\t\t\t\t\t\t\t\tString final_time = outputFormatter\n\t\t\t\t\t\t\t\t\t\t\t\t.format(time);\n\n\t\t\t\t\t\t\t\t\t\tSystem.out\n\t\t\t\t\t\t\t\t\t\t\t\t.println(\"!!!!!!!!!!!!!!!!!final_time...\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t+ final_time);\n\n\t\t\t\t\t\t\t\t\t\t// Display Selected time in textbox\n\t\t\t\t\t\t\t\t\t\trf_booking_time_box.setText(final_time);\n\t\t\t\t\t\t\t\t\t\tBooking_Screen_TabLayout.rf_booking_time_header.setText(final_time);\n\n\t\t\t\t\t\t\t\t\t\t// Display Selected time in textbox\n\t\t\t\t\t\t\t\t\t\t// rf_booking_time_box.setText(hourOfDay\n\t\t\t\t\t\t\t\t\t\t// + \":\" +\n\t\t\t\t\t\t\t\t\t\t// minute);\n\t\t\t\t\t\t\t\t\t\tGlobal_variable.str_Time_From = final_time;\n\t\t\t\t\t\t\t\t\t\tGlobal_variable.str_Time_To = final_time;\n\n\t\t\t\t\t\t\t\t\t} catch (java.text.ParseException e) {\n\t\t\t\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t\tminutes = minute;\n\t\t\t\t\t\t\t\thour = hourOfDay;\n\n\t\t\t\t\t\t\t\tString time1 = hour + \":\" + minutes;\n\n\t\t\t\t\t\t\t\tDate time;\n\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\ttime = new SimpleDateFormat(\"HH:mm\")\n\t\t\t\t\t\t\t\t\t\t\t.parse(hour + \":\" + minutes);\n\n\t\t\t\t\t\t\t\t\tDateFormat outputFormatter = new SimpleDateFormat(\n\t\t\t\t\t\t\t\t\t\t\t\"HH:mm\");\n\t\t\t\t\t\t\t\t\tString final_time = outputFormatter\n\t\t\t\t\t\t\t\t\t\t\t.format(time);\n\n\t\t\t\t\t\t\t\t\tSystem.out\n\t\t\t\t\t\t\t\t\t\t\t.println(\"!!!!!!!!!!!!!!!!!final_time...\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t+ final_time);\n\n\t\t\t\t\t\t\t\t\t// Display Selected time in textbox\n\t\t\t\t\t\t\t\t\trf_booking_time_box.setText(final_time);\n\t\t\t\t\t\t\t\t\tBooking_Screen_TabLayout.rf_booking_time_header.setText(final_time);\n\t\t\t\t\t\t\t\t\t// Display Selected time in textbox\n\t\t\t\t\t\t\t\t\t// rf_booking_time_box.setText(hourOfDay +\n\t\t\t\t\t\t\t\t\t// \":\" +\n\t\t\t\t\t\t\t\t\t// minute);\n\t\t\t\t\t\t\t\t\tGlobal_variable.str_Time_From = final_time;\n\t\t\t\t\t\t\t\t\tGlobal_variable.str_Time_To = final_time;\n\n\t\t\t\t\t\t\t\t} catch (java.text.ParseException e) {\n\t\t\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t}\n\t\t\t\t\t}, hour, minutes, false);\n\t\t\ttpd.show();\n\t\t\ttpd.setCancelable(false);\n\t\t\ttpd.setCanceledOnTouchOutside(false);\n\n\t\t} catch (NullPointerException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}", "public void show() {\n if (manager == null || styleResId == null) {\n Log.e(\"TimePickerBuilder\", \"setFragmentManager() and setStyleResId() must be called.\");\n return;\n }\n FragmentTransaction ft = manager.beginTransaction();\n final Fragment prev = manager.findFragmentByTag(\"time_dialog\");\n if (prev != null) {\n ft.remove(prev).commit();\n ft = manager.beginTransaction();\n }\n ft.addToBackStack(null);\n\n final TimePickerDialogFragment fragment = TimePickerDialogFragment.newInstance(mReference, styleResId);\n if (targetFragment != null) {\n fragment.setTargetFragment(targetFragment, 0);\n }\n fragment.setTimePickerDialogHandlers(mTimePickerDialogHandlers);\n fragment.setOnDismissListener(mOnDismissListener);\n fragment.show(ft, \"time_dialog\");\n }", "@Override\n public void onTimeSet(TimePicker view, int hourOfDay,\n int minute) {\n txtTime.setText(hourOfDay + \":\" + minute);\n }", "public void showStartTimeDialog(View v){\n DialogFragment dialogFragment = null;\n switch (v.getId()) {\n case R.id.newEvent_button_from_hour:\n dialogFragment = new StartTimePicker(0);\n break;\n case R.id.newEvent_button_to_hour:\n dialogFragment = new StartTimePicker(1);\n break;\n }\n dialogFragment.show(getFragmentManager(), \"start_time_picker\");\n }", "public void setPickerTime(@NonNull final LocalDateTime date) {\n onView(viewMatcher).perform(click());\n onView(withClassName(equalTo(TimePicker.class.getName())))\n .perform(PickerActions.setTime(date.getHour(), date.getMinute()));\n new Dialog().confirmDialog();\n }", "@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog6 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t6Hour6 = hourOfDay1;\n t6Minute6 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t6Hour6, t6Minute6);\n //set selected time on text view\n\n\n timeE3 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editETime3.setText(timeE3);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog6.updateTime(t6Hour6, t6Minute6);\n //show dialog\n timePickerDialog6.show();\n }", "@Override\n public void onClick(View v) {\n Calendar mcurrentTime = Calendar.getInstance();\n int hour = mcurrentTime.get(Calendar.HOUR_OF_DAY);\n int minute = mcurrentTime.get(Calendar.MINUTE);\n TimePickerDialog mTimePicker;\n mTimePicker = new TimePickerDialog(AddRDV.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker timePicker, int selectedHour, int selectedMinute) {\n editTextHeur.setText(String.format(\"%02d\",selectedHour) + \":\" + String.format(\"%02d\" ,selectedMinute)+\":\"+\"00\");\n }\n }, hour, minute, true);//Yes 24 hour time\n mTimePicker.setTitle(\"Select time of your appointment\");\n mTimePicker.show();\n\n }", "@Override\n public void onTimeSet(TimePicker view, int hourOfDay, int minute) {\n txtview_time_result.setText(\"Time : \"+hourOfDay+\":\"+minute);\n }", "private void bindToTime() {\r\n Timeline timeline = new Timeline(\r\n new KeyFrame(Duration.seconds(0), (ActionEvent actionEvent) -> {\r\n Calendar time = Calendar.getInstance();\r\n SimpleDateFormat simpleDateFormat = new SimpleDateFormat(\"HH:mm:ss\");\r\n datePicker.setText(simpleDateFormat.format(time.getTime()));\r\n }),\r\n new KeyFrame(Duration.seconds(1))\r\n );\r\n timeline.setCycleCount(Animation.INDEFINITE);\r\n timeline.play();\r\n }", "@Override\n public void onTimeSet(TimePicker view, int hourOfDay,\n int minute) {\n txtTime.setText(hourOfDay + \":\" + minute);\n }", "@Override\r\n\t\t\tpublic void onClick(View v) {\n\r\n\t\t\t\tShowTimePickerDialog();\r\n\r\n\t\t\t}", "public void showTimeEndPickerDialog(View v) {\n DialogFragment newFragment = new TimePickerFragment() {\n @Override\n public void onTimeSet(TimePicker view, int hour, int minute) {\n timeEndTV = (TextView)findViewById(R.id.timeEndTV);\n timeEndTV.setText(makeHourFine(hour, minute));\n hourEnd=hour;\n minuteEnd=minute;\n if(hourStart!=99||minuteStart!=99) {\n if ((hourEnd + (minuteEnd / 60.0)) - (hourStart + (minuteStart / 60.0)) >= 0) {\n hoursD =Round((hourEnd + (minuteEnd / 60.0)) - (hourStart + (minuteStart / 60.0)), 2);\n } else\n hoursD = Round((hourEnd + (minuteEnd / 60.0)) + 24 - (hourStart + (minuteStart / 60.0)), 2);\n\n hours = (EditText) findViewById(R.id.HoursET);\n hours.setText(Double.toString(hoursD));\n }\n\n\n }\n\n\n };\n newFragment.show(getSupportFragmentManager(), \"timeStartPicker\");\n }", "private void showTime()\n {\n showText(\"Time: \" + time, 700, 25);\n }", "@Override\n\t\t\t\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t\t\t\t TimePickerDialog tpd = new TimePickerDialog(contextyeild, //same Activity Context like before\n\t\t\t\t\t\t\t new TimePickerDialog.OnTimeSetListener() {\n\n\t\t\t\t\t\t\t @Override\n\t\t\t\t\t\t\t public void onTimeSet(TimePicker view, int hourOfDay,int minute) {\n\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t hour = hourOfDay;\n\t\t\t\t\t\t\t \t\t min = minute;\n\t\t\t\t\t\t\t \t\t \n\t\t\t\t\t\t\t \t\t\t String timeSet = \"\";\n\t\t\t\t\t\t\t \t\t\t if (hour > 12) {\n\t\t\t\t\t\t\t \t\t\t hour -= 12;\n\t\t\t\t\t\t\t \t\t\t timeSet = \"PM\";\n\t\t\t\t\t\t\t \t\t\t } else if (hour == 0) {\n\t\t\t\t\t\t\t \t\t\t hour += 12;\n\t\t\t\t\t\t\t \t\t\t timeSet = \"AM\";\n\t\t\t\t\t\t\t \t\t\t } else if (hour == 12)\n\t\t\t\t\t\t\t \t\t\t timeSet = \"PM\";\n\t\t\t\t\t\t\t \t\t\t else\n\t\t\t\t\t\t\t \t\t\t timeSet = \"AM\";\n\t\t\t\t\t\t\t \t\t\t \n\t\t\t\t\t\t\t \t\t\t \n\t\t\t\t\t\t\t \t\t\t String minutes = \"\";\n\t\t\t\t\t\t\t \t\t\t if (min < 10)\n\t\t\t\t\t\t\t \t\t\t minutes = \"0\" + min;\n\t\t\t\t\t\t\t \t\t\t else\n\t\t\t\t\t\t\t \t\t\t minutes = String.valueOf(min);\n\t\t\t\t\t\t\t \t\t\t \n\t\t\t\t\t\t\t \t\t\t // Append in a StringBuilder\n\t\t\t\t\t\t\t \t\t\t String aTime = new StringBuilder().append(hour).append(':')\n\t\t\t\t\t\t\t \t\t\t .append(minutes).append(\" \").append(timeSet).toString();\n\t\t\t\t\t\t\t \t\t\t \n\t\t\t\t\t\t\t \t\t\t harvesttime.setText(aTime); \n\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t }, hour, min, false);\n\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t tpd.show();\t\t\t\n\t\t\t\t\t\t\t}", "@Override\n public void onClick(View v) {\n showDialog(TIME_DIALOG_ID);\n }", "public void showStartPicker(View v)\n { toggleVisibility(_pickerInitTime); }", "@Override\n\t\t\t\t\t\t\tpublic void onClick(View v) {\n\n\t\t\t\t TimePickerDialog tpd = new TimePickerDialog(contextyeild, //same Activity Context like before\n\t\t\t\t new TimePickerDialog.OnTimeSetListener() {\n\n\t\t\t\t @Override\n\t\t\t\t public void onTimeSet(TimePicker view, int hourOfDay,int minute) {\n\t\t\t\t \n\t\t\t\t hour = hourOfDay;\n\t\t\t\t \t\t min = minute;\n\t\t\t\t \t\t \n\t\t\t\t \t\t\t String timeSet = \"\";\n\t\t\t\t \t\t\t if (hour > 12) {\n\t\t\t\t \t\t\t hour -= 12;\n\t\t\t\t \t\t\t timeSet = \"PM\";\n\t\t\t\t \t\t\t } else if (hour == 0) {\n\t\t\t\t \t\t\t hour += 12;\n\t\t\t\t \t\t\t timeSet = \"AM\";\n\t\t\t\t \t\t\t } else if (hour == 12)\n\t\t\t\t \t\t\t timeSet = \"PM\";\n\t\t\t\t \t\t\t else\n\t\t\t\t \t\t\t timeSet = \"AM\";\n\t\t\t\t \t\t\t \n\t\t\t\t \t\t\t \n\t\t\t\t \t\t\t String minutes = \"\";\n\t\t\t\t \t\t\t if (min < 10)\n\t\t\t\t \t\t\t minutes = \"0\" + min;\n\t\t\t\t \t\t\t else\n\t\t\t\t \t\t\t minutes = String.valueOf(min);\n\t\t\t\t \t\t\t \n\t\t\t\t \t\t\t // Append in a StringBuilder\n\t\t\t\t \t\t\t String aTime = new StringBuilder().append(hour).append(':')\n\t\t\t\t \t\t\t .append(minutes).append(\" \").append(timeSet).toString();\n\t\t\t\t \t\t\t \n\t\t\t\t \t\t\t harvesttime.setText(aTime); \n\t\t\t\t }\n\t\t\t\t }, hour, min, false);\n\t\t\t\t \n\t\t\t\t tpd.show();\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}", "@Override\n public void onClick(View v) {\n int hour = calendar.get(Calendar.HOUR_OF_DAY);\n int minute = calendar.get(Calendar.MINUTE);\n TimePickerDialog mTimePicker;\n mTimePicker = new TimePickerDialog(getContext(), new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker timePicker, int selectedHour, int selectedMinute) {\n String time = (selectedHour > 9 ? selectedHour : \"0\" + selectedHour)\n + \":\" +\n (selectedMinute > 9 ? selectedMinute : \"0\" + selectedMinute);\n //validar hora\n plantaOut.setText(time);\n globals.getAntecedentesHormigonMuestreo().setPlantaOut(time);\n }\n }, hour, minute, true);\n mTimePicker.setTitle(\"Seleccione Hora\");\n mTimePicker.show();\n\n }", "@Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n\n t7Hour7 = hourOfDay1;\n t7Minute7 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t7Hour7, t7Minute7);\n //set selected time on text view\n\n\n timeS4 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editSTime4.setText(timeS4);\n }", "public void pickAdTime(View view) {\n\n DialogFragment newFragment = new AdTimePicker();\n newFragment.show(getFragmentManager(), \"adTimePicker\");\n\n }", "@Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n\n t5Hour5 = hourOfDay1;\n t5Minute5 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t5Hour5, t5Minute5);\n //set selected time on text view\n\n\n timeS3 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editSTime3.setText(timeS3);\n }", "@Override\n public void onClick(View v) {\n TimePickerDialog timePicker = new TimePickerDialog(\n PHUpdateNonRecurringScheduleActivity.this,\n mTimeSetListener, mHour, mMinute, true);\n\n timePicker.show();\n }", "@Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n\n t39Hour39 = hourOfDay1;\n t39Minute39 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t39Hour39, t39Minute39);\n //set selected time on text view\n\n\n timeS20 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editSTime20.setText(timeS20);\n }", "public void timeCallback(View v){\n TimePickerDialog timePickerDialog = new TimePickerDialog(this,\n new TimePickerDialog.OnTimeSetListener() {\n\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay,\n int minute) {\n mHour = hourOfDay;\n mMinute = minute;\n String hourStr = String.format(\"%2s\",mHour).replace(\" \", \"0\");\n String minuteStr = String.format(\"%2s\",mMinute).replace(\" \", \"0\");\n ((EditText)findViewById(R.id.entry_time)).setText(hourStr+\":\"+minuteStr);\n }\n }, mHour, mMinute, false);\n timePickerDialog.show();\n }", "@Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n\n t19Hour19 = hourOfDay1;\n t19Minute19 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t19Hour19, t19Minute19);\n //set selected time on text view\n\n\n timeS10 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editSTime10.setText(timeS10);\n }", "@Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n\n t25Hour25 = hourOfDay1;\n t25Minute25 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t25Hour25, t25Minute25);\n //set selected time on text view\n\n\n timeS13 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editSTime13.setText(timeS13);\n }", "@Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n\n t43Hour43 = hourOfDay1;\n t43Minute43 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t43Hour43, t43Minute43);\n //set selected time on text view\n\n\n timeS22 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editSTime22.setText(timeS22);\n }", "private static void setupTimePicker(LoopView timeHours, LoopView timeMins, LoopView timeTime) {\n timeHours.setItemsVisibleCount(5);\n timeHours.setNotLoop();\n //timeMins.setItems(timeMinsList);\n timeMins.setItemsVisibleCount(5);\n timeMins.setNotLoop();\n //timeTime.setItems(timeTimeList);\n timeTime.setItemsVisibleCount(5);\n timeTime.setNotLoop();\n }", "@Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n\n t29Hour29 = hourOfDay1;\n t29Minute29 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t29Hour29, t29Minute29);\n //set selected time on text view\n\n\n timeS15 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editSTime15.setText(timeS15);\n }", "public static String showTimePickerDialog(final Context appContext,\n final TextView eStartTime) {\n\n final Calendar c = Calendar.getInstance();\n currentHour = c.get(Calendar.HOUR_OF_DAY);\n currentMinute = c.get(Calendar.MINUTE);\n currentSeconds = c.get(Calendar.SECOND);\n TimePickerDialog tpd = new TimePickerDialog(appContext,\n new TimePickerDialog.OnTimeSetListener() {\n\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay,\n int minutes) {\n int hour = hourOfDay;\n int minute = minutes;\n String time = \"\" + hourOfDay + \"\" + minutes + \"00\";\n DTU.time = time;\n int flg = 0;\n String strHour, strMinutes, strAMPM;\n\n if (hour > 12) {\n flg = 1;\n hour = hour - 12;\n strAMPM = \"PM\";\n } else {\n strAMPM = \"AM\";\n }\n if (hour < 10) {\n strHour = \"0\" + hour;\n } else {\n strHour = \"\" + hour;\n }\n if (minute < 10) {\n strMinutes = \"0\" + minute;\n } else {\n strMinutes = \"\" + minute;\n }\n eStartTime\n .setText(strHour + \":\" + strMinutes + strAMPM);\n\n }\n }, currentHour, currentMinute, false);\n tpd.show();\n\n return \"\";\n }" ]
[ "0.8156941", "0.7951597", "0.77912736", "0.7729824", "0.76787233", "0.7639499", "0.7563876", "0.75263005", "0.7495254", "0.74766797", "0.7441154", "0.7388808", "0.72970134", "0.72139657", "0.7199064", "0.71902364", "0.7180407", "0.71717286", "0.7162668", "0.7159221", "0.71569586", "0.7148366", "0.71478784", "0.714745", "0.71457535", "0.7144853", "0.7141568", "0.7140645", "0.713998", "0.71397716", "0.71392095", "0.7139027", "0.71350515", "0.71337354", "0.71319705", "0.7129755", "0.7128748", "0.71270806", "0.7119047", "0.71148425", "0.711108", "0.7104531", "0.70935625", "0.7090222", "0.708865", "0.70874405", "0.7079346", "0.7073769", "0.7070375", "0.7069284", "0.70689505", "0.7066797", "0.706639", "0.7064817", "0.70626676", "0.706238", "0.70610416", "0.7057703", "0.7047067", "0.70449674", "0.7036397", "0.7033171", "0.703245", "0.7030848", "0.7028079", "0.7023147", "0.7010874", "0.7009446", "0.70004666", "0.6999415", "0.69909084", "0.6982409", "0.6960733", "0.6960587", "0.694787", "0.6944007", "0.69135165", "0.6908437", "0.6875145", "0.6863086", "0.68505293", "0.6849102", "0.6848434", "0.68441147", "0.6842313", "0.68172336", "0.68147856", "0.68118376", "0.6787955", "0.67783684", "0.67649925", "0.67477906", "0.6747459", "0.67356527", "0.6730913", "0.67303365", "0.67288935", "0.67213917", "0.67213863", "0.6721335" ]
0.75944006
6
Use the current time as the default values for the picker
@Override public Dialog onCreateDialog(Bundle savedInstanceState) { final Calendar c = Calendar.getInstance(); int hour = c.get(Calendar.HOUR_OF_DAY); int minute = c.get(Calendar.MINUTE); // Create a new instance of TimePickerDialog and return it return new TimePickerDialog(getActivity(), this, hour, minute, DateFormat.is24HourFormat(getActivity())); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void initializeTime() {\n hour = cal.get(Calendar.HOUR);\n min = cal.get(Calendar.MINUTE);\n\n time = (EditText) findViewById(R.id.textSetTime);\n time.setInputType(InputType.TYPE_NULL);\n\n //Set EditText text to be current time\n if(min < 10) {\n time.setText(hour + \":0\" + min);\n } else {\n time.setText(hour + \":\" + min);\n }\n\n time.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n picker = new TimePickerDialog(ControlCenterActivity.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker timePicker, int i, int i1) {\n if(i1 < 10) {\n time.setText(i + \":0\" + i1);\n } else {\n time.setText(i + \":\" + i1);\n }\n }\n }, hour, min, false);\n\n picker.show();\n }\n });\n }", "public void set_value_to_default() {\n this.selectionListStrike.setText(\"\");\n this.selectionListCal_iv.setText(\"\");\n this.selectionListUlast.setText(\"\");\n String format = new SimpleDateFormat(\"dd/MM/yyyy\").format(new Date());\n int parseInt = Integer.parseInt(format.substring(6, 10));\n int parseInt2 = Integer.parseInt(format.substring(3, 5));\n int parseInt3 = Integer.parseInt(format.substring(0, 2));\n this.selectedDate = parseInt + \"-\" + parseInt2 + \"-\" + parseInt3;\n this.selectionListExpiry.setSelectedText(format);\n this.selectionListExpiry.initItems(R.string.set_date, SelectionList.PopTypes.DATE, parseInt, parseInt2, parseInt3);\n if (!this.wtype.equals(\"C\")) {\n this.callputbutton.callOnClick();\n }\n }", "public void setcurrent_time() {\n\t\tthis.current_time = LocalTime.now();\n\t}", "@Override\n protected void onSetInitialValue(boolean restorePersistedValue, Object defaultValue) {\n super.onSetInitialValue(restorePersistedValue, defaultValue);\n if(restorePersistedValue){\n Calendar calendar = Calendar.getInstance();\n long savedTime = getPersistedLong(calendar.getTimeInMillis());\n calendar.setTimeInMillis(savedTime);\n\n setTimePicker(calendar);\n }else {\n Calendar calendar = Calendar.getInstance();\n calendar.setTimeInMillis((long) defaultValue);\n\n int [] fields = setTimePicker(calendar);\n //persists only if the value is not from sharedPreference.\n setTime(fields[0], fields[1]);\n }\n }", "@Override\n public void onTimeSet(TimePicker view, int hourOfDay,\n int minute) {\n txtTime.setText(hourOfDay + \":\" + minute);\n }", "@Override\n public void onTimeSet(RadialPickerLayout view, int hourOfDay, int minute, int second) {\n String time = Integer.toString(hourOfDay) + \"-\" + Integer.toString(minute);\n txtTime.setText(time);\n\n //TODO why get wrong time?\n calendar.set(Calendar.HOUR, hourOfDay);\n calendar.set(Calendar.MINUTE, minute);\n\n }", "@Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n\n t5Hour5 = hourOfDay1;\n t5Minute5 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t5Hour5, t5Minute5);\n //set selected time on text view\n\n\n timeS3 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editSTime3.setText(timeS3);\n }", "@Override\n public void onTimeSet(TimePicker view, int hourOfDay,\n int minute) {\n txtTime.setText(hourOfDay + \":\" + minute);\n }", "@Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n\n t40Hour40 = hourOfDay1;\n t40Minute40 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t40Hour40, t40Minute40);\n //set selected time on text view\n\n\n timeE20 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editETime20.setText(timeE20);\n }", "public static void setTime(){\n\t\tCalendar cal = Calendar.getInstance();\n\t\tif (!JsonUtils.RUNNING_LOCALLY){\n\t\t\tcal.set(Calendar.HOUR_OF_DAY, cal.get(Calendar.HOUR_OF_DAY) - 4); //account for UTC offset because of lambda\n\t\t}\n\t\tCURRENT_TIME = formatTime(cal.getTime().toString());\n\t}", "@Override\n public void onTimeSet(TimePicker view, int hourOfDay,\n int minute) {\n Toast.makeText(Settings.this, \"\"+hourOfDay + \":\" + minute, Toast.LENGTH_SHORT).show();\n hour = hourOfDay;\n minutes = minute;\n switch(v.getId()){\n case R.id.bMorning:\n ed.putInt(\"morningHour\",hour);\n ed.putInt(\"morningMinute\", minutes);\n ed.commit();\n morning.setText(hour + \":\" + minutes);\n break;\n case R.id.bAfternoon:\n ed.putInt(\"afternoonHour\",hour);\n ed.putInt(\"afternoonMinute\", minutes);\n ed.commit();\n afternoon.setText(hour + \":\" + minutes);\n break;\n case R.id.bNight:\n ed.putInt(\"nightHour\",hour);\n ed.putInt(\"nightMinute\", minutes);\n ed.commit();\n night.setText(hour + \":\" + minutes);\n break;\n }\n }", "@Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n\n t7Hour7 = hourOfDay1;\n t7Minute7 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t7Hour7, t7Minute7);\n //set selected time on text view\n\n\n timeS4 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editSTime4.setText(timeS4);\n }", "@Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n\n t1Hour1 = hourOfDay1;\n t1Minute1 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t1Hour1, t1Minute1);\n //set selected time on text view\n\n\n timeS1 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editSTime1.setText(timeS1);\n }", "@Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n\n t20Hour20 = hourOfDay1;\n t20Minute20 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t20Hour20, t20Minute20);\n //set selected time on text view\n\n\n timeE10 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editETime10.setText(timeE10);\n }", "private void setToday() {\r\n\t\tmTime = new Date().getTime();\r\n\t}", "@Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n\n t48Hour48 = hourOfDay1;\n t48Minute48 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t48Hour48, t48Minute48);\n //set selected time on text view\n\n\n timeE24 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editETime24.setText(timeE24);\n }", "public GregorianCalendar getSelectedTime(){\n int start_hour = Integer.parseInt(this.time_hour.getValue().toString());\n int start_min = Integer.parseInt(this.time_min.getValue().toString());\n\n GregorianCalendar time = new GregorianCalendar();\n time.setTimeInMillis(0);\n\n time.set(Calendar.HOUR_OF_DAY, start_hour);\n time.set(Calendar.MINUTE, start_min);\n \n return time;\n }", "@Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n\n t39Hour39 = hourOfDay1;\n t39Minute39 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t39Hour39, t39Minute39);\n //set selected time on text view\n\n\n timeS20 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editSTime20.setText(timeS20);\n }", "@Override\n public void onTimeSet(TimePicker view, int hourOfDay, int minute) {\n editASLTStime.setText((((hourOfDay < 10) ? \"0\" + hourOfDay : hourOfDay) + \":\" + ((minute < 10) ? \"0\" + minute : minute) + \":00\"));\n }", "@Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n\n t38Hour38 = hourOfDay1;\n t38Minute38 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t38Hour38, t38Minute38);\n //set selected time on text view\n\n\n timeE19 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editETime19.setText(timeE19);\n }", "@Override\n public void onTimeSet(TimePicker timePicker, int hourOfDay, int minute) {\n\n Log.d(TAG, calendar.getSelectedDate().getDay() + \"\");\n Log.d(TAG, new CalendarDay().getDay() + \"\");\n\n mCalendar.set(Calendar.YEAR, calendar.getSelectedDate().getYear());\n mCalendar.set(Calendar.MONTH, calendar.getSelectedDate().getMonth());\n mCalendar.set(Calendar.DAY_OF_MONTH, calendar.getSelectedDate().getDay());\n mCalendar.set(Calendar.HOUR_OF_DAY, hourOfDay /*+ (calendar.getSelectedDate().getDay() - new CalendarDay().getDay()) * 24*/);\n mCalendar.set(Calendar.MINUTE, minute);\n mCalendar.set(Calendar.SECOND, 0);\n\n String time = DateFormat.getTimeInstance(DateFormat.SHORT).format(mCalendar.getTime());\n dateReminder.setText(time);\n Log.d(\"MainActivity\", \"Selected time is \" + time);\n timeInMillis = mCalendar.getTimeInMillis();\n }", "@Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n\n t16Hour16 = hourOfDay1;\n t16Minute16 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t16Hour16, t16Minute16);\n //set selected time on text view\n\n\n timeE8 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editETime8.setText(timeE8);\n }", "@Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n\n t8Hour8 = hourOfDay1;\n t8Minute8 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t8Hour8, t8Minute8);\n //set selected time on text view\n\n\n timeE4 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editETime4.setText(timeE4);\n }", "@Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n\n t10Hour10 = hourOfDay1;\n t10Minute10 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t10Hour10, t10Minute10);\n //set selected time on text view\n\n\n timeE5 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editETime5.setText(timeE5);\n }", "@Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n\n t50Hour50 = hourOfDay1;\n t50Minute50 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t50Hour50, t50Minute50);\n //set selected time on text view\n\n\n timeE25 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editETime25.setText(timeE25);\n }", "@Override\r\n public void onTimeChanged(TimePicker view, int hourOfDay, int minute) {\n if (hourOfDay < 10 && minute < 10) {\r\n tvDateTimeCurrent.setText(\"0\" + hourOfDay + \":0\" + minute);\r\n } else if (hourOfDay >= 10 && minute < 10) {\r\n tvDateTimeCurrent.setText(\"\" + hourOfDay + \":0\" + minute);\r\n } else if (hourOfDay < 10 && minute >= 10) {\r\n tvDateTimeCurrent.setText(\"0\" + hourOfDay + \":\" + minute);\r\n } else {\r\n tvDateTimeCurrent.setText(\"\" + hourOfDay + \":\" + minute);\r\n }\r\n }", "@Override\r\n public void onTimeChanged(TimePicker view, int hourOfDay, int minute) {\n if (hourOfDay < 10 && minute < 10) {\r\n tvDateTimeCurrent.setText(\"0\" + hourOfDay + \":0\" + minute);\r\n } else if (hourOfDay >= 10 && minute < 10) {\r\n tvDateTimeCurrent.setText(\"\" + hourOfDay + \":0\" + minute);\r\n } else if (hourOfDay < 10 && minute >= 10) {\r\n tvDateTimeCurrent.setText(\"0\" + hourOfDay + \":\" + minute);\r\n } else {\r\n tvDateTimeCurrent.setText(\"\" + hourOfDay + \":\" + minute);\r\n }\r\n }", "@Override\r\n public void onTimeChanged(TimePicker view, int hourOfDay, int minute) {\n if (hourOfDay < 10 && minute < 10) {\r\n tvDateTimeCurrent.setText(\"0\" + hourOfDay + \":0\" + minute);\r\n } else if (hourOfDay >= 10 && minute < 10) {\r\n tvDateTimeCurrent.setText(\"\" + hourOfDay + \":0\" + minute);\r\n } else if (hourOfDay < 10 && minute >= 10) {\r\n tvDateTimeCurrent.setText(\"0\" + hourOfDay + \":\" + minute);\r\n } else {\r\n tvDateTimeCurrent.setText(\"\" + hourOfDay + \":\" + minute);\r\n }\r\n }", "@Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n\n t43Hour43 = hourOfDay1;\n t43Minute43 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t43Hour43, t43Minute43);\n //set selected time on text view\n\n\n timeS22 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editSTime22.setText(timeS22);\n }", "@Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n\n t32Hour32 = hourOfDay1;\n t32Minute32 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t32Hour32, t32Minute32);\n //set selected time on text view\n\n\n timeE16 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editETime16.setText(timeE16);\n }", "@Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n\n t6Hour6 = hourOfDay1;\n t6Minute6 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t6Hour6, t6Minute6);\n //set selected time on text view\n\n\n timeE3 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editETime3.setText(timeE3);\n }", "private void setTime(@NonNull Context context) {\n SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(context);\n timeBefore.setText(getString(R.string.minute, preferences.getInt(PreferenceKeys.BEFORE, 0)));\n timeWay.setText(getString(R.string.minute, preferences.getInt(PreferenceKeys.WAY, 0)));\n timeAfter.setText(getString(R.string.minute, preferences.getInt(PreferenceKeys.AFTER, 0)));\n }", "@Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n\n t47Hour47 = hourOfDay1;\n t47Minute47 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t47Hour47, t47Minute47);\n //set selected time on text view\n\n\n timeS24 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editSTime24.setText(timeS24);\n }", "@Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n\n t37Hour37 = hourOfDay1;\n t37Minute37 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t37Hour37, t37Minute37);\n //set selected time on text view\n\n\n timeS19 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editSTime19.setText(timeS19);\n }", "@Override\n public void onTimeSet(TimePicker timePicker, int selectedHour, int selectedMinute) {\n mHour = selectedHour;\n mMinute = selectedMinute;\n if(selectedMinute<10){\n remTime.setText(selectedHour + \":0\" + selectedMinute);\n }\n else {\n remTime.setText(selectedHour + \":\" + selectedMinute);\n }\n }", "@Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n\n t4Hour4 = hourOfDay1;\n t4Minute4 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t4Hour4, t4Minute4);\n //set selected time on text view\n\n\n timeE2 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editETime2.setText(timeE2);\n }", "@Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n\n t27Hour27 = hourOfDay1;\n t27Minute27 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t27Hour27, t27Minute27);\n //set selected time on text view\n\n\n timeS14 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editSTime14.setText(timeS14);\n }", "@Override\n\t\t\t\t\t\t\tpublic void onTimeSet(TimePicker view, int hourOfDay, int minute) {\n\t\t\t\t\t\t\t\tcalendar.set(Calendar.HOUR_OF_DAY,hourOfDay);\n\t\t\t\t\t\t\t\tcalendar.set(Calendar.MINUTE,minute);\n\t\t\t\t\t\t\t\tcalendar.set(Calendar.SECOND,0);\n\t\t\t\t\t\t\t\tdate=new SimpleDateFormat(\"yyyy/MM/dd hh:mm\").format(calendar.getTimeInMillis());\n\t\t\t\t\t\t\t\ttv_tiem.setText(date);\n\t\t\t\t\t\t\t}", "private void chooseTimeDialog() {\n Calendar c = Calendar.getInstance();\n int hourOfDay = c.get(Calendar.HOUR_OF_DAY);\n int minute = c.get(Calendar.MINUTE);\n\n TimePickerDialog timePickerDialog =\n new TimePickerDialog(getContext(), this, hourOfDay, minute, false);\n timePickerDialog.show();\n }", "@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog48 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t48Hour48 = hourOfDay1;\n t48Minute48 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t48Hour48, t48Minute48);\n //set selected time on text view\n\n\n timeE24 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editETime24.setText(timeE24);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog48.updateTime(t48Hour48, t48Minute48);\n //show dialog\n timePickerDialog48.show();\n }", "public void setTime(){\r\n \r\n }", "@Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n\n t35Hour35 = hourOfDay1;\n t35Minute35 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t35Hour35, t35Minute35);\n //set selected time on text view\n\n\n timeS18 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editSTime18.setText(timeS18);\n }", "@Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n\n t49Hour49 = hourOfDay1;\n t49Minute49 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t49Hour49, t49Minute49);\n //set selected time on text view\n\n\n timeS25 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editSTime25.setText(timeS25);\n }", "@Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n\n t46Hour46 = hourOfDay1;\n t46Minute46 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t46Hour46, t46Minute46);\n //set selected time on text view\n\n\n timeE23 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editETime23.setText(timeE23);\n }", "@Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n\n t21Hour21 = hourOfDay1;\n t21Minute21 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t21Hour21, t21Minute21);\n //set selected time on text view\n\n\n timeS11 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editSTime11.setText(timeS11);\n }", "@Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n\n t45Hour45 = hourOfDay1;\n t45Minute45 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t45Hour45, t45Minute45);\n //set selected time on text view\n\n\n timeS23 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editSTime23.setText(timeS23);\n }", "@Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n\n t41Hour41 = hourOfDay1;\n t41Minute41 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t41Hour41, t41Minute41);\n //set selected time on text view\n\n\n timeS21 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editSTime21.setText(timeS21);\n }", "@Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n\n t9Hour9 = hourOfDay1;\n t9Minute9 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t9Hour9, t9Minute9);\n //set selected time on text view\n\n\n timeS5 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editSTime5.setText(timeS5);\n }", "@Override\n public void onTimeSet(TimePicker view, int hourOfDay, int minute) {\n String time = hourOfDay+\":\"+minute;\n tvSelectedTime.setText(time);\n appSelectTime = time;\n }", "@Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n\n t24Hour24 = hourOfDay1;\n t24Minute24 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t24Hour24, t24Minute24);\n //set selected time on text view\n\n\n timeE12 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editETime12.setText(timeE12);\n }", "@Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n\n t31Hour31 = hourOfDay1;\n t31Minute31 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t31Hour31, t31Minute31);\n //set selected time on text view\n\n\n timeS16 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editSTime16.setText(timeS16);\n }", "@Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n\n t34Hour34 = hourOfDay1;\n t34Minute34 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t34Hour34, t34Minute34);\n //set selected time on text view\n\n\n timeE17 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editETime17.setText(timeE17);\n }", "@Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n\n t18Hour18 = hourOfDay1;\n t18Minute18 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t18Hour18, t18Minute18);\n //set selected time on text view\n\n\n timeE9 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editETime9.setText(timeE9);\n }", "@Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n\n t19Hour19 = hourOfDay1;\n t19Minute19 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t19Hour19, t19Minute19);\n //set selected time on text view\n\n\n timeS10 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editSTime10.setText(timeS10);\n }", "@Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n\n t36Hour36 = hourOfDay1;\n t36Minute36 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t36Hour36, t36Minute36);\n //set selected time on text view\n\n\n timeE18 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editETime18.setText(timeE18);\n }", "@Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n\n t42Hour42 = hourOfDay1;\n t42Minute42 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t42Hour42, t42Minute42);\n //set selected time on text view\n\n\n timeE21 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editETime21.setText(timeE21);\n }", "@Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n\n t25Hour25 = hourOfDay1;\n t25Minute25 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t25Hour25, t25Minute25);\n //set selected time on text view\n\n\n timeS13 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editSTime13.setText(timeS13);\n }", "@Override\n public void onTimeSet(TimePicker view, int hourOfDay,\n int minute) {\n pickupTime.setText(hourOfDay + \":\" + minute);\n// Log.e(TAG,\"Time set: \" + mHour + \",\" + mMinute + \",\");\n }", "@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog40 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t40Hour40 = hourOfDay1;\n t40Minute40 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t40Hour40, t40Minute40);\n //set selected time on text view\n\n\n timeE20 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editETime20.setText(timeE20);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog40.updateTime(t40Hour40, t40Minute40);\n //show dialog\n timePickerDialog40.show();\n }", "@Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n\n t17Hour17 = hourOfDay1;\n t17Minute17 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t17Hour17, t17Minute17);\n //set selected time on text view\n\n\n timeS9 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editSTime9.setText(timeS9);\n }", "@Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n\n t2Hour2 = hourOfDay1;\n t2Minute2 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t2Hour2, t2Minute2);\n //set selected time on text view\n\n\n timeE1 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editETime1.setText(timeE1);\n }", "@Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n\n t22Hour22 = hourOfDay1;\n t22Minute22 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t22Hour22, t22Minute22);\n //set selected time on text view\n\n\n timeE11 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editETime11.setText(timeE11);\n }", "@Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n\n t33Hour33 = hourOfDay1;\n t33Minute33 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t33Hour33, t33Minute33);\n //set selected time on text view\n\n\n timeS17 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editSTime17.setText(timeS17);\n }", "@Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n\n t29Hour29 = hourOfDay1;\n t29Minute29 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t29Hour29, t29Minute29);\n //set selected time on text view\n\n\n timeS15 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editSTime15.setText(timeS15);\n }", "@Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n\n t23Hour23 = hourOfDay1;\n t23Minute23 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t23Hour23, t23Minute23);\n //set selected time on text view\n\n\n timeS12 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editSTime12.setText(timeS12);\n }", "private void selectTime() {\n Calendar calendar = Calendar.getInstance();\n int hour = calendar.get(Calendar.HOUR_OF_DAY);\n int minute = calendar.get(Calendar.MINUTE);\n TimePickerDialog timePickerDialog = new TimePickerDialog(this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker timePicker, int i, int i1) {\n timeTonotify = i + \":\" + i1; //temp variable to store the time to set alarm\n mTimebtn.setText(FormatTime(i, i1)); //sets the button text as selected time\n }\n }, hour, minute, false);\n timePickerDialog.show();\n }", "@Override\n public void onTimeSet(TimePicker timePicker, int selectedHour, int selectedMinute) {\n\n }", "@Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n\n t11Hour11 = hourOfDay1;\n t11Minute11 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t11Hour11, t11Minute11);\n //set selected time on text view\n\n\n timeS6 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editSTime6.setText(timeS6);\n }", "@Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n\n t3Hour3 = hourOfDay1;\n t3Minute3 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t3Hour3, t3Minute3);\n //set selected time on text view\n\n\n timeS2 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editSTime2.setText(timeS2);\n }", "@Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n\n t28Hour28 = hourOfDay1;\n t28Minute28 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t28Hour28, t28Minute28);\n //set selected time on text view\n\n\n timeE14 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editETime14.setText(timeE14);\n }", "@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog42 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t42Hour42 = hourOfDay1;\n t42Minute42 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t42Hour42, t42Minute42);\n //set selected time on text view\n\n\n timeE21 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editETime21.setText(timeE21);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog42.updateTime(t42Hour42, t42Minute42);\n //show dialog\n timePickerDialog42.show();\n }", "@Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n\n t15Hour15 = hourOfDay1;\n t15Minute15 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t15Hour15, t15Minute15);\n //set selected time on text view\n\n\n timeS8 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editSTime8.setText(timeS8);\n }", "@Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n\n t14Hour14 = hourOfDay1;\n t14Minute14 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t14Hour14, t14Minute14);\n //set selected time on text view\n\n\n timeE7 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editETime7.setText(timeE7);\n }", "@Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n\n t26Hour26 = hourOfDay1;\n t26Minute26 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t26Hour26, t26Minute26);\n //set selected time on text view\n\n\n timeE13 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editETime13.setText(timeE13);\n }", "@Override\n public void onTimeSet(TimePicker view, int hourOfDay, int minute) {\n txtview_time_result.setText(\"Time : \"+hourOfDay+\":\"+minute);\n }", "@Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n\n t44Hour44 = hourOfDay1;\n t44Minute44 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t44Hour44, t44Minute44);\n //set selected time on text view\n\n\n timeE22 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editETime22.setText(timeE22);\n }", "@Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n\n t13Hour13 = hourOfDay1;\n t13Minute13 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t13Hour13, t13Minute13);\n //set selected time on text view\n\n\n timeS7 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editSTime7.setText(timeS7);\n }", "@Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n\n t30Hour30 = hourOfDay1;\n t30Minute30 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t30Hour30, t30Minute30);\n //set selected time on text view\n\n\n timeE15 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editETime15.setText(timeE15);\n }", "@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog5 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t5Hour5 = hourOfDay1;\n t5Minute5 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t5Hour5, t5Minute5);\n //set selected time on text view\n\n\n timeS3 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editSTime3.setText(timeS3);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog5.updateTime(t5Hour5, t5Minute5);\n //show dialog\n timePickerDialog5.show();\n }", "@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog50 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t50Hour50 = hourOfDay1;\n t50Minute50 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t50Hour50, t50Minute50);\n //set selected time on text view\n\n\n timeE25 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editETime25.setText(timeE25);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog50.updateTime(t50Hour50, t50Minute50);\n //show dialog\n timePickerDialog50.show();\n }", "@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog16 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t16Hour16 = hourOfDay1;\n t16Minute16 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t16Hour16, t16Minute16);\n //set selected time on text view\n\n\n timeE8 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editETime8.setText(timeE8);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog16.updateTime(t16Hour16, t16Minute16);\n //show dialog\n timePickerDialog16.show();\n }", "@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog4 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t4Hour4 = hourOfDay1;\n t4Minute4 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t4Hour4, t4Minute4);\n //set selected time on text view\n\n\n timeE2 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editETime2.setText(timeE2);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog4.updateTime(t4Hour4, t4Minute4);\n //show dialog\n timePickerDialog4.show();\n }", "@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog38 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t38Hour38 = hourOfDay1;\n t38Minute38 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t38Hour38, t38Minute38);\n //set selected time on text view\n\n\n timeE19 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editETime19.setText(timeE19);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog38.updateTime(t38Hour38, t38Minute38);\n //show dialog\n timePickerDialog38.show();\n }", "private void setUpTimePickers() {\n timeText.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n\n MaterialTimePicker.Builder builder = new MaterialTimePicker.Builder();\n builder.setTitleText(\"Time Picker Title\");\n builder.setHour(12);\n builder.setMinute(0);\n\n final MaterialTimePicker timePicker = builder.build();\n\n timePicker.addOnPositiveButtonClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n timeChoice = LocalTime.of(timePicker.getHour(),timePicker.getMinute());\n String selectedTimeStr = timeChoice.format(DateTimeFormatter.ofPattern(\"kk:mm\"));\n timeText.setText(selectedTimeStr);\n }\n });\n\n timePicker.show(getSupportFragmentManager(),\"TimePicker\");\n }\n });\n\n }", "@Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n\n t12Hour12 = hourOfDay1;\n t12Minute12 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t12Hour12, t12Minute12);\n //set selected time on text view\n\n\n timeE6 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editETime6.setText(timeE6);\n }", "@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog36 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t36Hour36 = hourOfDay1;\n t36Minute36 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t36Hour36, t36Minute36);\n //set selected time on text view\n\n\n timeE18 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editETime18.setText(timeE18);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog36.updateTime(t36Hour36, t36Minute36);\n //show dialog\n timePickerDialog36.show();\n }", "@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog47 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t47Hour47 = hourOfDay1;\n t47Minute47 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t47Hour47, t47Minute47);\n //set selected time on text view\n\n\n timeS24 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editSTime24.setText(timeS24);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog47.updateTime(t47Hour47, t47Minute47);\n //show dialog\n timePickerDialog47.show();\n }", "@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog32 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t32Hour32 = hourOfDay1;\n t32Minute32 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t32Hour32, t32Minute32);\n //set selected time on text view\n\n\n timeE16 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editETime16.setText(timeE16);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog32.updateTime(t32Hour32, t32Minute32);\n //show dialog\n timePickerDialog32.show();\n }", "@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog39 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t39Hour39 = hourOfDay1;\n t39Minute39 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t39Hour39, t39Minute39);\n //set selected time on text view\n\n\n timeS20 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editSTime20.setText(timeS20);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog39.updateTime(t39Hour39, t39Minute39);\n //show dialog\n timePickerDialog39.show();\n }", "@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog41 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t41Hour41 = hourOfDay1;\n t41Minute41 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t41Hour41, t41Minute41);\n //set selected time on text view\n\n\n timeS21 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editSTime21.setText(timeS21);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog41.updateTime(t41Hour41, t41Minute41);\n //show dialog\n timePickerDialog41.show();\n }", "@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog43 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t43Hour43 = hourOfDay1;\n t43Minute43 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t43Hour43, t43Minute43);\n //set selected time on text view\n\n\n timeS22 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editSTime22.setText(timeS22);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog43.updateTime(t43Hour43, t43Minute43);\n //show dialog\n timePickerDialog43.show();\n }", "@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog31 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t31Hour31 = hourOfDay1;\n t31Minute31 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t31Hour31, t31Minute31);\n //set selected time on text view\n\n\n timeS16 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editSTime16.setText(timeS16);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog31.updateTime(t31Hour31, t31Minute31);\n //show dialog\n timePickerDialog31.show();\n }", "@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog18 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t18Hour18 = hourOfDay1;\n t18Minute18 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t18Hour18, t18Minute18);\n //set selected time on text view\n\n\n timeE9 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editETime9.setText(timeE9);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog18.updateTime(t18Hour18, t18Minute18);\n //show dialog\n timePickerDialog18.show();\n }", "@Override\n public void onTimeSet(TimePicker view, int hourOfDay, int minute) {\n Calendar calendar = Calendar.getInstance();\n calendar.set(0, 0, 0, hourOfDay, minute, 0);\n Date date = calendar.getTime();\n SimpleDateFormat sdf = new SimpleDateFormat(\"hh.mm aa\", Locale.getDefault());\n\n mBinding.time.setText(sdf.format(date));\n }", "@Override\n public void onTimeChanged(TimePicker view, int hourOfDay, int minute) {\n Toast.makeText(getApplicationContext(), hourOfDay + \" \" + minute, Toast.LENGTH_SHORT).show();\n time_text.setText(hourOfDay + \" : \" + minute);// set the current time in text view\n\n time= time_text.getText().toString();\n\n\n }", "@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog46 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t46Hour46 = hourOfDay1;\n t46Minute46 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t46Hour46, t46Minute46);\n //set selected time on text view\n\n\n timeE23 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editETime23.setText(timeE23);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog46.updateTime(t46Hour46, t46Minute46);\n //show dialog\n timePickerDialog46.show();\n }", "@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog35 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t35Hour35 = hourOfDay1;\n t35Minute35 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t35Hour35, t35Minute35);\n //set selected time on text view\n\n\n timeS18 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editSTime18.setText(timeS18);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog35.updateTime(t35Hour35, t35Minute35);\n //show dialog\n timePickerDialog35.show();\n }", "@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog34 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t34Hour34 = hourOfDay1;\n t34Minute34 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t34Hour34, t34Minute34);\n //set selected time on text view\n\n\n timeE17 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editETime17.setText(timeE17);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog34.updateTime(t34Hour34, t34Minute34);\n //show dialog\n timePickerDialog34.show();\n }", "@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog20 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t20Hour20 = hourOfDay1;\n t20Minute20 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t20Hour20, t20Minute20);\n //set selected time on text view\n\n\n timeE10 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editETime10.setText(timeE10);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog20.updateTime(t20Hour20, t20Minute20);\n //show dialog\n timePickerDialog20.show();\n }", "@Override\n public void onClick(View v) {\n\n TimePickerDialog timePickerDialog49 = new TimePickerDialog(add_sched.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n //initialize hour and minute\n\n t49Hour49 = hourOfDay1;\n t49Minute49 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t49Hour49, t49Minute49);\n //set selected time on text view\n\n\n timeS25 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editSTime25.setText(timeS25);\n }\n }, 12, 0, false\n );\n // displayed previous selected time\n\n timePickerDialog49.updateTime(t49Hour49, t49Minute49);\n //show dialog\n timePickerDialog49.show();\n }", "@Override\n public void onTimePicked() {\n }" ]
[ "0.7145544", "0.6881153", "0.6741829", "0.66395825", "0.6638164", "0.6624899", "0.65596735", "0.65371704", "0.65153104", "0.65095294", "0.65068406", "0.6505117", "0.6502575", "0.64955634", "0.64939094", "0.6490701", "0.6488149", "0.6481539", "0.6474427", "0.6473683", "0.64642495", "0.6462182", "0.6457502", "0.64555544", "0.6450133", "0.6449509", "0.6449509", "0.6449509", "0.64450765", "0.64445114", "0.64444613", "0.64430106", "0.64386636", "0.6438364", "0.64344186", "0.6433925", "0.64303863", "0.6429765", "0.642954", "0.642757", "0.64246917", "0.64239913", "0.6422824", "0.6420882", "0.6419868", "0.64182013", "0.6416971", "0.64163035", "0.64142454", "0.6412043", "0.6411778", "0.6408778", "0.6408763", "0.64085674", "0.6405351", "0.640525", "0.64038837", "0.64012456", "0.64004475", "0.63958377", "0.639461", "0.6392575", "0.6390581", "0.6387831", "0.6387297", "0.63840264", "0.63818437", "0.6375805", "0.63743186", "0.63716763", "0.6371013", "0.6366445", "0.63625365", "0.63617617", "0.6359357", "0.635788", "0.6352962", "0.6352564", "0.6348921", "0.63438034", "0.6342804", "0.6341315", "0.63353544", "0.63328683", "0.633179", "0.6331589", "0.63314104", "0.63301307", "0.6328935", "0.63271534", "0.6323276", "0.631817", "0.6313722", "0.6310528", "0.6303156", "0.63024944", "0.62995434", "0.6298275", "0.6295828", "0.62939334", "0.6293063" ]
0.0
-1
set hour of alarm time
@Override public void onTimeSet(android.widget.TimePicker view, int hourOfDay, int minute) { boolean timeInAM = true; if(hourOfDay>=12) { //if it's pm hourOfDay-=12; timeInAM = false; } else { //if it's am timeInAM = true; } //update shared preferences with alarm time PreferenceManager.getDefaultSharedPreferences(getActivity()).edit().putInt("alarmHour_"+alarmID, hourOfDay).apply(); //will be 0:00 if 12:00 PreferenceManager.getDefaultSharedPreferences(getActivity()).edit().putInt("alarmMinutes_"+alarmID, minute).apply(); PreferenceManager.getDefaultSharedPreferences(getActivity()).edit().putBoolean("timeInAM_"+alarmID, timeInAM).apply(); //set minuteString of alarm time String minuteString; if(minute<10) { minuteString = "0" + PreferenceManager.getDefaultSharedPreferences(getActivity()).getInt("alarmMinutes_"+alarmID, 0); } else { minuteString = "" + PreferenceManager.getDefaultSharedPreferences(getActivity()).getInt("alarmMinutes_"+alarmID, 10); } int alarmHour = PreferenceManager.getDefaultSharedPreferences(getActivity()).getInt("alarmHour_"+alarmID, 0); if(alarmHour<10 && alarmHour>0) { alarmTimeButton.setText(" "+alarmHour+":"+minuteString); } else if(alarmHour==0) { alarmTimeButton.setText("12:"+minuteString); } else { alarmTimeButton.setText(alarmHour+":"+minuteString); } //show alarm time if(PreferenceManager.getDefaultSharedPreferences(getActivity()).getBoolean("timeInAM_"+alarmID, true)) { dayOrNight.setText("AM"); } else { dayOrNight.setText("PM"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setHour(int newHour) {\n hour = newHour; // sets the appointment's hour to the input in military time\n }", "public void setTime(String newHour) { // setTime sets the appointment's hour in standard time\n \n // this divides the newHour string into the hour part and the 'am'/'pm' part\n int timeHour = Integer.parseInt(newHour.substring(0, newHour.length()-2)); // the number of the hour\n String timeAmPm = newHour.substring(newHour.length()-2); // whether it is 'am' or 'pm'\n\n // 4 possible cases exist and are handled in this order:\n // 1. after midnight/before noon\n // 2. midnight (12am)\n // 3. noon (12pm)\n // 4. afternoon\n if(timeAmPm.equalsIgnoreCase(\"am\") && timeHour != 12) {\n this.hour = timeHour;\n }\n else if(timeAmPm.equalsIgnoreCase(\"am\")) {\n this.hour = 0;\n }\n else if(timeHour == 12){\n this.hour = timeHour;\n }\n else {\n this.hour = timeHour + 12;\n }\n }", "public void updateAlarmTime (){\r\n\t\tint newHour, newMinut;\r\n\t\t\r\n\t\tif (relative) { //Before\r\n\t\t\tnewMinut = reference.getMinutes() - alarmMinutes;\r\n\t\t\tnewHour = reference.getHours() - alarmHours - ((newMinut<0)?1:0);\r\n\t\t\tnewMinut = (newMinut<0)?newMinut+60:newMinut;\r\n\t\t\tnewHour = (newHour<0)?newHour+24:newHour;\r\n\t\t} else {\r\n\t\t\tnewMinut = reference.getMinutes() + alarmMinutes;\r\n\t\t\tnewHour = reference.getHours() + alarmHours + ((newMinut>=60)?1:0);\r\n\t\t\tnewMinut = (newMinut>=60)?newMinut-60:newMinut;\r\n\t\t\tnewHour = (newHour>=240)?newHour-24:newHour;\r\n\t\t}\r\n\r\n\t\tthis.alarmTime.setHours(newHour);\r\n\t\tthis.alarmTime.setMinutes(newMinut);\r\n\t}", "public void setAlarm(int time, String name){\n\t}", "public void setAlarm(Context context, int pk, long time, int Hora, int Minuto) {\n\n\n Calendar calendar = Calendar.getInstance();\n calendar.setTimeInMillis(System.currentTimeMillis());\n calendar.set(Calendar.HOUR_OF_DAY, Hora);\n calendar.set(Calendar.MINUTE, Minuto);\n\n\n //Se crea la hora correcta para el sistema\n long newTime = 1000 * 60 * 60 * time;\n AlarmManager manager = (AlarmManager) context.getSystemService(Context.ALARM_SERVICE);\n Intent alarmIntent = new Intent(context, AlarmReceiver.class);\n alarmIntent.putExtra(\"alarma\", pk);\n PendingIntent pendingIntent = PendingIntent.getBroadcast(context, pk, alarmIntent, PendingIntent.FLAG_UPDATE_CURRENT);\n manager.setInexactRepeating(AlarmManager.RTC_WAKEUP, calendar.getTimeInMillis(), newTime, pendingIntent);\n\n\n\n }", "@Override\n public void onTimeSet(TimePicker view, int hourOfDay, int minute) {\n Calendar calendar = Calendar.getInstance();\n calendar.set(Calendar.HOUR_OF_DAY, hourOfDay);\n calendar.set(Calendar.MINUTE, minute - 2);\n calendar.set(Calendar.SECOND, 0);\n\n startAlarm(calendar);\n }", "public void setAlarmClock() {\n\n }", "void setTestAlarm() \n {\n \t// start with now\n java.util.Calendar c = java.util.Calendar.getInstance();\n c.setTimeInMillis(System.currentTimeMillis());\n\n int nowHour = c.get(java.util.Calendar.HOUR_OF_DAY);\n int nowMinute = c.get(java.util.Calendar.MINUTE);\n\n int minutes = (nowMinute + 1) % 60;\n int hour = nowHour + (nowMinute == 0 ? 1 : 0);\n\n saveAlarm(this, mId, true, hour, minutes, mRepeatPref.getDaysOfWeek(),\n true, \"\", mAlarmPref.getAlertString(), true);\n }", "@Override\n public void onTimeSet(TimePicker view, int hourOfDay, int minute) {\n int timeToSet = (hourOfDay * 1000 + (minute * 1000)/60 + 18000) % 24000;\n prompt.sendCommand(CommandSet.getCommand(CommandSet.TIME) + \"set \"+timeToSet, new ResponseToastGenerator(getActivity(), \n new CommandResponseEvaluator(EvaluatorType.time),\n R.string.time_set_ok, R.string.time_set_failed));\n }", "private void setTime(int hour, int minute){\n Calendar calendar = Calendar.getInstance();\n calendar.set(Calendar.HOUR_OF_DAY, hour);\n calendar.set(Calendar.MINUTE, minute);\n\n persistLong(calendar.getTimeInMillis());\n\n notifyChanged();\n notifyDependencyChange(shouldDisableDependents());\n }", "public void setHour(int nHour) { m_nTimeHour = nHour; }", "public void onTimeSet(TimePicker view, int hourOfDay, int minute) {\n\n time = 3600 * hour + 60 * minute;\n\n\n }", "public void setHour(int hour){\n if(hour < 0 || hour > 23) {System.out.println(\"wrong input!\"); return;}\n this.hour = hour;\n }", "private void setHeartRateMonitor()\n {\n\n Calendar cal = Calendar.getInstance();\n Date now = new Date();\n cal.setTime(now);\n\n long alarm_time = cal.getTimeInMillis();\n\n// if(cal.before(Calendar.getInstance()))\n// alarm_time += 60*1000;\n\n AlarmManager alarmManager = (AlarmManager) getSystemService(Context.ALARM_SERVICE);\n\n Intent intent = new Intent(this, HeartRateMonitor.class);\n\n PendingIntent pendingIntent = PendingIntent.getBroadcast(this, HEART_RATE_MONITOR_REQUEST_CODE, intent,PendingIntent.FLAG_UPDATE_CURRENT);\n\n alarmManager.setRepeating(AlarmManager.RTC_WAKEUP, alarm_time,90000, pendingIntent);\n\n Log.i(\"hrmonitor\",\"hrmonitor alarm set\");\n }", "public void setHour(int hour)\n {\n this.hour = hour;\n }", "public void setHour(int hour) throws BlablakidException {\n\t\tif(checkTime(hour,this.minutes)==false) {\n\t\t\tthrow new BlablakidException(\"The hour introduced is wrong : \"+hour);\n\t\t}\n\t\telse {\n\t\tthis.hour = hour;\n\t\t}\n\t}", "public Time4 setHour( int hour ) \r\n { \r\n this.hour = ( hour >= 0 && hour < 24 ? hour : 0 ); \r\n\r\n return this; // enables chaining\r\n }", "public void setHour(int hour) \n { \n if (hour < 0 || hour >= 24)\n throw new IllegalArgumentException(\"hour must be 0-23\");\n\n this.hour = hour;\n }", "private void setTimeOfDay(){\n Calendar calendar = Calendar.getInstance();\n int timeOfDay = calendar.get(Calendar.HOUR_OF_DAY);\n if(timeOfDay >= 0 && timeOfDay < 12){\n greetings.setText(\"Good Morning\");\n }else if(timeOfDay >= 12 && timeOfDay < 16){\n greetings.setText(\"Good Afternoon\");\n }else if(timeOfDay >= 16 && timeOfDay < 23){\n greetings.setText(\"Good Evening\");\n }\n }", "public void updateChangedTime(int hour, int minute);", "public void advanceHour(long hour) {\n clock = Clock.offset(clock, Duration.ofHours(hour));\n }", "@Override\n public void onTimeSet(TimePicker view, int hour, int minute) {\n trigger.getEndtime().set(Calendar.HOUR_OF_DAY, hour);\n trigger.getEndtime().set(Calendar.MINUTE, minute);\n updateEndTime();\n }", "public void setHour(Pair<Double, Double> value) {\r\n\t\thour = value;\r\n\t}", "public void setHour(Integer hour) {\n this.hour = hour;\n }", "@Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n\n t48Hour48 = hourOfDay1;\n t48Minute48 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t48Hour48, t48Minute48);\n //set selected time on text view\n\n\n timeE24 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editETime24.setText(timeE24);\n }", "@Override\n public void onTimeSet(TimePicker view, int hour, int minute) {\n trigger.getStarttime().set(Calendar.HOUR_OF_DAY, hour);\n trigger.getStarttime().set(Calendar.MINUTE, minute);\n updateStartTime();\n }", "public void setHour(int hour) {\n\t\tthis.hour = hour;\n\t}", "public void scheduleAlarm()\n {\n hour = timePicker.getCurrentHour(); //get hour\n minute = timePicker.getCurrentMinute(); //get minutes\n alarmMgr = (AlarmManager) getSystemService(Context.ALARM_SERVICE);\n Intent intent = new Intent(getApplicationContext(), AlarmReceiver.class);\n alarmIntent = PendingIntent.getBroadcast(getApplicationContext(), 0, intent, 0);\n\n Calendar calendar = Calendar.getInstance();\n calendar.setTimeInMillis(System.currentTimeMillis());\n calendar.set(Calendar.HOUR_OF_DAY, hour);\n calendar.set(Calendar.MINUTE, minute);\n\n alarmMgr.setInexactRepeating(AlarmManager.RTC_WAKEUP, calendar.getTimeInMillis(),\n AlarmManager.INTERVAL_DAY, alarmIntent);\n Toast.makeText(this, \"Alarm scheduled for \" + hour + \":\" + minute, Toast.LENGTH_SHORT).show();\n\n }", "public void setTime(int hour, int minute, int second){\r\n this.hour = hour ; /*when it was hour,minutes,second it was a new variable for this function bt as we used this.It gained access to the global ones. */\r\n this.minute = minute; \r\n this.second = second;\r\n }", "@Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n\n t26Hour26 = hourOfDay1;\n t26Minute26 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t26Hour26, t26Minute26);\n //set selected time on text view\n\n\n timeE13 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editETime13.setText(timeE13);\n }", "public void setAlarm (int alarm) { this.alarm = alarm; }", "@Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n\n t47Hour47 = hourOfDay1;\n t47Minute47 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t47Hour47, t47Minute47);\n //set selected time on text view\n\n\n timeS24 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editSTime24.setText(timeS24);\n }", "@Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n\n t24Hour24 = hourOfDay1;\n t24Minute24 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t24Hour24, t24Minute24);\n //set selected time on text view\n\n\n timeE12 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editETime12.setText(timeE12);\n }", "public void setAlarm(AlarmTime alarm){\r\n\t\t//write to XML file\r\n\t\txmanager.write(alarm);\r\n\t\talarmList.add(alarm);\r\n\t}", "@Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n\n t16Hour16 = hourOfDay1;\n t16Minute16 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t16Hour16, t16Minute16);\n //set selected time on text view\n\n\n timeE8 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editETime8.setText(timeE8);\n }", "@Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n\n t50Hour50 = hourOfDay1;\n t50Minute50 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t50Hour50, t50Minute50);\n //set selected time on text view\n\n\n timeE25 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editETime25.setText(timeE25);\n }", "@Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n\n t36Hour36 = hourOfDay1;\n t36Minute36 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t36Hour36, t36Minute36);\n //set selected time on text view\n\n\n timeE18 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editETime18.setText(timeE18);\n }", "public void setHour(int hour) {\n/* 51 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "public void onTimeSet(TimePicker view, int hourOfDay, int minute) {\n String newValue = String.format(\"%d:%02d\", hourOfDay, minute);\n mPrefs.edit().putString(mPreference.getKey(), newValue).apply();\n mPreference.setSummary(DateFormatter.getSummaryTimestamp(getActivity(), newValue));\n mListener.onPreferenceChange(mPreference, newValue);\n SettingsFragment.updateAlarmManager(getActivity(), true);\n }", "@Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n\n t18Hour18 = hourOfDay1;\n t18Minute18 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t18Hour18, t18Minute18);\n //set selected time on text view\n\n\n timeE9 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editETime9.setText(timeE9);\n }", "@Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n\n t25Hour25 = hourOfDay1;\n t25Minute25 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t25Hour25, t25Minute25);\n //set selected time on text view\n\n\n timeS13 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editSTime13.setText(timeS13);\n }", "public void setAlarmMorning(Context context, long timestampMillisKey) {\n //cancel any existing alarms and then set a new one\n cancel(context);\n\n Calendar calendar = Calendar.getInstance();\n calendar.set(Calendar.HOUR_OF_DAY, Constants.AFTER_HOURS_END);\n calendar.set(Calendar.MINUTE, 0);\n calendar.set(Calendar.SECOND, 0);\n calendar.set(Calendar.MILLISECOND, 0);\n\n if (calendar.compareTo(Calendar.getInstance()) < 0) {\n //this means we are trying to set alarm time which is already expired, so add 24Hrs or 1 day to this and then set alarm\n calendar.add(Calendar.DATE, 1);\n }\n\n Intent alarmIntent = new Intent(context, AutoPendingNotificationTrigger.class);\n\n Bundle bundle = new Bundle();\n bundle.putLong(Constants.EXTRA_TIME_STAMP_MILLIS, timestampMillisKey);\n alarmIntent.putExtras(bundle);\n\n AlarmManager alarmManager = (AlarmManager) context.getSystemService(context.getApplicationContext().ALARM_SERVICE);\n alarmManager.setExact(AlarmManager.RTC_WAKEUP,\n calendar.getTimeInMillis(),\n PendingIntent.getBroadcast(context.getApplicationContext(), ALARM_REQUEST_CODE, alarmIntent, PendingIntent.FLAG_UPDATE_CURRENT));\n }", "@Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n\n t46Hour46 = hourOfDay1;\n t46Minute46 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t46Hour46, t46Minute46);\n //set selected time on text view\n\n\n timeE23 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editETime23.setText(timeE23);\n }", "@Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n\n t40Hour40 = hourOfDay1;\n t40Minute40 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t40Hour40, t40Minute40);\n //set selected time on text view\n\n\n timeE20 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editETime20.setText(timeE20);\n }", "@Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n\n t12Hour12 = hourOfDay1;\n t12Minute12 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t12Hour12, t12Minute12);\n //set selected time on text view\n\n\n timeE6 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editETime6.setText(timeE6);\n }", "@Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n\n t42Hour42 = hourOfDay1;\n t42Minute42 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t42Hour42, t42Minute42);\n //set selected time on text view\n\n\n timeE21 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editETime21.setText(timeE21);\n }", "@Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n\n t44Hour44 = hourOfDay1;\n t44Minute44 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t44Hour44, t44Minute44);\n //set selected time on text view\n\n\n timeE22 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editETime22.setText(timeE22);\n }", "public void startAgentTime() {\n Timer timer = new Timer(SIBAConst.TIME_AGENT_CHANGE_FOR_HOUR, new ActionListener() {\n public void actionPerformed(ActionEvent e) {\n \t\n \tCalendar c = Calendar.getInstance();\n int minutos = c.get(Calendar.MINUTE);\n int hora = c.get( (Calendar.HOUR_OF_DAY)); \n hora = hora * 60;\n if (minutos >= 30 && minutos <= 59)\n {hora +=30;\t\n }\n if (hora > ctrlHours)\n {ctrlHours = hora;\n //activada bandera de modificacion de programacion\n activatedScheduleChange = true;\n }\n else\n { if (hora < ctrlHours)\n \t ctrlHours = 0;\n }\n \t\n \t\n \n }\n });\n timer.start();\n }", "public void sethourNeed(Integer h){hourNeed=h;}", "public static void set24Hour( boolean hour24 ) {\n AM_PM = !hour24;\n }", "@Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n\n t22Hour22 = hourOfDay1;\n t22Minute22 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t22Hour22, t22Minute22);\n //set selected time on text view\n\n\n timeE11 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editETime11.setText(timeE11);\n }", "@Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n\n t14Hour14 = hourOfDay1;\n t14Minute14 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t14Hour14, t14Minute14);\n //set selected time on text view\n\n\n timeE7 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editETime7.setText(timeE7);\n }", "@Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n\n t6Hour6 = hourOfDay1;\n t6Minute6 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t6Hour6, t6Minute6);\n //set selected time on text view\n\n\n timeE3 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editETime3.setText(timeE3);\n }", "@Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n\n t20Hour20 = hourOfDay1;\n t20Minute20 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t20Hour20, t20Minute20);\n //set selected time on text view\n\n\n timeE10 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editETime10.setText(timeE10);\n }", "@Override\n public void onTimeSet(TimePicker view, int hourOfDay,\n int minute) {\n Toast.makeText(Settings.this, \"\"+hourOfDay + \":\" + minute, Toast.LENGTH_SHORT).show();\n hour = hourOfDay;\n minutes = minute;\n switch(v.getId()){\n case R.id.bMorning:\n ed.putInt(\"morningHour\",hour);\n ed.putInt(\"morningMinute\", minutes);\n ed.commit();\n morning.setText(hour + \":\" + minutes);\n break;\n case R.id.bAfternoon:\n ed.putInt(\"afternoonHour\",hour);\n ed.putInt(\"afternoonMinute\", minutes);\n ed.commit();\n afternoon.setText(hour + \":\" + minutes);\n break;\n case R.id.bNight:\n ed.putInt(\"nightHour\",hour);\n ed.putInt(\"nightMinute\", minutes);\n ed.commit();\n night.setText(hour + \":\" + minutes);\n break;\n }\n }", "public void setHours(int x, double h) {\r\n hours[x] = h;\r\n }", "@Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n\n t32Hour32 = hourOfDay1;\n t32Minute32 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t32Hour32, t32Minute32);\n //set selected time on text view\n\n\n timeE16 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editETime16.setText(timeE16);\n }", "@Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n\n t34Hour34 = hourOfDay1;\n t34Minute34 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t34Hour34, t34Minute34);\n //set selected time on text view\n\n\n timeE17 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editETime17.setText(timeE17);\n }", "@Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n\n t13Hour13 = hourOfDay1;\n t13Minute13 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t13Hour13, t13Minute13);\n //set selected time on text view\n\n\n timeS7 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editSTime7.setText(timeS7);\n }", "public void increaseHour() {\n\t\tthis.total++;\n\t}", "@Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n\n t8Hour8 = hourOfDay1;\n t8Minute8 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t8Hour8, t8Minute8);\n //set selected time on text view\n\n\n timeE4 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editETime4.setText(timeE4);\n }", "@Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n\n t7Hour7 = hourOfDay1;\n t7Minute7 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t7Hour7, t7Minute7);\n //set selected time on text view\n\n\n timeS4 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editSTime4.setText(timeS4);\n }", "@Override\r\n public boolean setHours(int hours) {\r\n if(hours<0||hours>23)\r\n {\r\n return false;\r\n }\r\n calendar.set(Calendar.HOUR_OF_DAY, hours);\r\n return true;\r\n }", "@Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n\n t21Hour21 = hourOfDay1;\n t21Minute21 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t21Hour21, t21Minute21);\n //set selected time on text view\n\n\n timeS11 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editSTime11.setText(timeS11);\n }", "@Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n\n t10Hour10 = hourOfDay1;\n t10Minute10 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t10Hour10, t10Minute10);\n //set selected time on text view\n\n\n timeE5 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editETime5.setText(timeE5);\n }", "public void setAlarm() {\n\t\tid.toAlarm();\n\t}", "@Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n\n t17Hour17 = hourOfDay1;\n t17Minute17 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t17Hour17, t17Minute17);\n //set selected time on text view\n\n\n timeS9 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editSTime9.setText(timeS9);\n }", "@Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n\n t43Hour43 = hourOfDay1;\n t43Minute43 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t43Hour43, t43Minute43);\n //set selected time on text view\n\n\n timeS22 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editSTime22.setText(timeS22);\n }", "@Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n\n t38Hour38 = hourOfDay1;\n t38Minute38 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t38Hour38, t38Minute38);\n //set selected time on text view\n\n\n timeE19 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editETime19.setText(timeE19);\n }", "@Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n\n t27Hour27 = hourOfDay1;\n t27Minute27 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t27Hour27, t27Minute27);\n //set selected time on text view\n\n\n timeS14 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editSTime14.setText(timeS14);\n }", "public void setEHour(int ehour)\r\n\t{\r\n\t\tthis.ehour = ehour;\r\n\t}", "@Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n\n t30Hour30 = hourOfDay1;\n t30Minute30 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t30Hour30, t30Minute30);\n //set selected time on text view\n\n\n timeE15 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editETime15.setText(timeE15);\n }", "public boolean setHours(int value) {\r\n if (!FormatUtils.uint8RangeCheck(value)) {\r\n return false;\r\n }\r\n mHours = FormatUtils.intToUint8(value);\r\n updateGattCharacteristic();\r\n return true;\r\n }", "@Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n\n t49Hour49 = hourOfDay1;\n t49Minute49 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t49Hour49, t49Minute49);\n //set selected time on text view\n\n\n timeS25 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editSTime25.setText(timeS25);\n }", "@Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n\n t23Hour23 = hourOfDay1;\n t23Minute23 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t23Hour23, t23Minute23);\n //set selected time on text view\n\n\n timeS12 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editSTime12.setText(timeS12);\n }", "@Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n\n t28Hour28 = hourOfDay1;\n t28Minute28 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t28Hour28, t28Minute28);\n //set selected time on text view\n\n\n timeE14 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editETime14.setText(timeE14);\n }", "@Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n\n t31Hour31 = hourOfDay1;\n t31Minute31 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t31Hour31, t31Minute31);\n //set selected time on text view\n\n\n timeS16 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editSTime16.setText(timeS16);\n }", "@Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n\n t41Hour41 = hourOfDay1;\n t41Minute41 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t41Hour41, t41Minute41);\n //set selected time on text view\n\n\n timeS21 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editSTime21.setText(timeS21);\n }", "public static void setTime(){\n\t\tCalendar cal = Calendar.getInstance();\n\t\tif (!JsonUtils.RUNNING_LOCALLY){\n\t\t\tcal.set(Calendar.HOUR_OF_DAY, cal.get(Calendar.HOUR_OF_DAY) - 4); //account for UTC offset because of lambda\n\t\t}\n\t\tCURRENT_TIME = formatTime(cal.getTime().toString());\n\t}", "@Override\n public void onTimeSet(TimePicker view, int hourOfDay, int minute) {\n editASLTStime.setText((((hourOfDay < 10) ? \"0\" + hourOfDay : hourOfDay) + \":\" + ((minute < 10) ? \"0\" + minute : minute) + \":00\"));\n }", "@Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n\n t45Hour45 = hourOfDay1;\n t45Minute45 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t45Hour45, t45Minute45);\n //set selected time on text view\n\n\n timeS23 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editSTime23.setText(timeS23);\n }", "@Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n\n t35Hour35 = hourOfDay1;\n t35Minute35 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t35Hour35, t35Minute35);\n //set selected time on text view\n\n\n timeS18 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editSTime18.setText(timeS18);\n }", "@Override\n public void onTimeSet(TimePicker view, int hourOfDay, int minute) {\n }", "public void onTimeSet(TimePicker view, int hourOfDay, int minute) {\n et_time.setText(et_time.getText() + \"\" + hourOfDay + \":\" + minute);\n }", "@Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n\n t33Hour33 = hourOfDay1;\n t33Minute33 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t33Hour33, t33Minute33);\n //set selected time on text view\n\n\n timeS17 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editSTime17.setText(timeS17);\n }", "@Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n\n t15Hour15 = hourOfDay1;\n t15Minute15 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t15Hour15, t15Minute15);\n //set selected time on text view\n\n\n timeS8 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editSTime8.setText(timeS8);\n }", "public static void setOneTimeAlarm(boolean isSet, Context context,\n\t\t\tClass<?> cls, int attime) {\n\t\tPendingIntent pi = PendingIntent.getBroadcast(context, 0, new Intent(\n\t\t\t\tcontext, cls).putExtra(\"myname\", \"ahsai\"),\n\t\t\t\tPendingIntent.FLAG_ONE_SHOT);\n\t\tAlarmManager am = (AlarmManager) context\n\t\t\t\t.getSystemService(Context.ALARM_SERVICE);\n\t\tif (isSet) {\n\t\t\tLog.e(\"CatchThemAll\", \"start alarm attime:\"+attime+\" second later\");\n\t\t\tam.set(AlarmManager.RTC_WAKEUP, System.currentTimeMillis()\n\t\t\t\t\t+ (attime * 1000), pi);\n\t\t} else {\n\t\t\tLog.e(\"CatchThemAll\", \"stop alarm\");\n\t\t\tam.cancel(pi);\n\t\t}\n\t}", "@Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n\n t4Hour4 = hourOfDay1;\n t4Minute4 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t4Hour4, t4Minute4);\n //set selected time on text view\n\n\n timeE2 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editETime2.setText(timeE2);\n }", "public void setHour(int hour) throws InvalidDateException {\r\n\t\tif (hour < 24 & hour >= 0) {\r\n\t\t\tthis.hour = hour;\r\n\t\t} else {\r\n\t\t\tthrow new InvalidDateException(\"Please enter a realistic hour for the date (between 0 and 23) !\");\r\n\t\t}\r\n\t}", "@Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n\n t2Hour2 = hourOfDay1;\n t2Minute2 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t2Hour2, t2Minute2);\n //set selected time on text view\n\n\n timeE1 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editETime1.setText(timeE1);\n }", "@Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n\n t9Hour9 = hourOfDay1;\n t9Minute9 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t9Hour9, t9Minute9);\n //set selected time on text view\n\n\n timeS5 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editSTime5.setText(timeS5);\n }", "@Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n\n t11Hour11 = hourOfDay1;\n t11Minute11 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t11Hour11, t11Minute11);\n //set selected time on text view\n\n\n timeS6 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editSTime6.setText(timeS6);\n }", "@Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n\n t39Hour39 = hourOfDay1;\n t39Minute39 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t39Hour39, t39Minute39);\n //set selected time on text view\n\n\n timeS20 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editSTime20.setText(timeS20);\n }", "@Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n\n t37Hour37 = hourOfDay1;\n t37Minute37 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t37Hour37, t37Minute37);\n //set selected time on text view\n\n\n timeS19 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editSTime19.setText(timeS19);\n }", "public void setSleepHour(int hours) {\n\t\tif (hours >= 0)\n\t\t\tsleepHours = hours;\n\t\telse\n\t\t\tsleepHours = -1;\n\t}", "@Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n\n t19Hour19 = hourOfDay1;\n t19Minute19 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t19Hour19, t19Minute19);\n //set selected time on text view\n\n\n timeS10 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editSTime10.setText(timeS10);\n }", "@Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n\n t5Hour5 = hourOfDay1;\n t5Minute5 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t5Hour5, t5Minute5);\n //set selected time on text view\n\n\n timeS3 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editSTime3.setText(timeS3);\n }", "@Override\n public void onTimeSet(TimePicker view, int hourOfDay, int minute) {\n Calendar calendar = Calendar.getInstance();\n calendar.set(0, 0, 0, hourOfDay, minute, 0);\n Date date = calendar.getTime();\n SimpleDateFormat sdf = new SimpleDateFormat(\"hh.mm aa\", Locale.getDefault());\n\n mBinding.time.setText(sdf.format(date));\n }", "@Override\n public void onTimeSet(TimePicker view, int hourOfDay1, int minute1) {\n\n t29Hour29 = hourOfDay1;\n t29Minute29 = minute1;\n\n Calendar calendar = Calendar.getInstance();\n\n //set hour and minute\n calendar.set(0, 0, 0, t29Hour29, t29Minute29);\n //set selected time on text view\n\n\n timeS15 = String.valueOf((DateFormat.format(\"hh:mm aa\", calendar)));\n editSTime15.setText(timeS15);\n }", "public void SetAlarm(Context context)\n {\n Calendar calendar = Calendar.getInstance();\n calendar.setTimeInMillis(System.currentTimeMillis());\n calendar.set(Calendar.HOUR_OF_DAY, 7);\n calendar.set(Calendar.MINUTE,20);\n Log.i(\"Set calendar\", \"for time: \" + calendar.toString());\n\n //Intent i = new Intent(context, AlarmService.class);\n Intent i = new Intent(context, Alarm.class);\n boolean alarmRunning = (PendingIntent.getBroadcast(context, 0, i, PendingIntent.FLAG_NO_CREATE) !=null);\n if (!alarmRunning) {\n //PendingIntent pi = PendingIntent.getService(context, 0, i, PendingIntent.FLAG_UPDATE_CURRENT);\n PendingIntent pi = PendingIntent.getService(context, 0, i, 0);\n\n\n\n PendingIntent pendingIntent = PendingIntent.getBroadcast(context, 0, i, 0);\n AlarmManager am = (AlarmManager)getSystemService(ALARM_SERVICE);\n am.setRepeating(AlarmManager.RTC_WAKEUP, calendar.getTimeInMillis(), AlarmManager.INTERVAL_DAY, pendingIntent);\n //am.cancel(pi);\n }\n\n //PendingIntent pi = PendingIntent.getBroadcast(context, 0, i, 0 );\n\n\n //am.setRepeating(AlarmManager.RTC_WAKEUP, calendar.getTimeInMillis(),AlarmManager.INTERVAL_DAY, pi);\n\n }" ]
[ "0.74369746", "0.7128418", "0.7123178", "0.7041694", "0.69339716", "0.6821802", "0.6781678", "0.6772096", "0.67640454", "0.669386", "0.6679871", "0.6607545", "0.6604041", "0.6596059", "0.659389", "0.65368295", "0.65352196", "0.65181917", "0.6505283", "0.65003276", "0.64222956", "0.6383248", "0.6382793", "0.6364134", "0.63625246", "0.6347358", "0.6346083", "0.63395584", "0.6328673", "0.631639", "0.63104665", "0.6297859", "0.6294655", "0.6294607", "0.6282906", "0.62708503", "0.62657726", "0.6256114", "0.625221", "0.6249763", "0.6247514", "0.6247427", "0.6244134", "0.6236359", "0.62338877", "0.6230087", "0.62294906", "0.62170905", "0.62128514", "0.62126243", "0.62106365", "0.620836", "0.6196639", "0.6195408", "0.61862105", "0.6186109", "0.61852884", "0.61821944", "0.61790234", "0.6173934", "0.61698663", "0.6166972", "0.61623496", "0.61582285", "0.6153117", "0.6149321", "0.6138362", "0.6138276", "0.6132427", "0.61239654", "0.6122842", "0.6119998", "0.6114686", "0.61121786", "0.6111274", "0.6106627", "0.61034644", "0.61002314", "0.60896015", "0.60863537", "0.60830563", "0.6074164", "0.60701907", "0.6057292", "0.60536796", "0.6052455", "0.6051567", "0.60505015", "0.6049914", "0.6041123", "0.60396147", "0.6039243", "0.60216993", "0.60187733", "0.60179996", "0.60158", "0.6002615", "0.59961337", "0.5994633", "0.59901536" ]
0.67290044
9
initialize array of days and selectedRepeatDays
@Override public Dialog onCreateDialog(Bundle savedInstanceState) { selectedRepeatDays = new ArrayList<String>(); final String[] days = {"Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"}; AlertDialog.Builder builder = new AlertDialog.Builder(getActivity()); builder.setTitle("Restrict alarm to some days? If not, select none.") .setMultiChoiceItems(days, null, new DialogInterface.OnMultiChoiceClickListener() { @Override public void onClick(DialogInterface dialog, int which, boolean isChecked) { if(isChecked) { selectedRepeatDays.add(days[which]); } else { selectedRepeatDays.remove(days[which]); } } }) .setPositiveButton("OK", new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { //display in order Collections.sort(selectedRepeatDays); Set<String> daySet = new HashSet<String>(selectedRepeatDays); PreferenceManager.getDefaultSharedPreferences(getActivity()).edit().putStringSet("daySet_"+alarmID, daySet).apply(); //permanently store selectedRepeatDays as a set String displayDays = ""; if(selectedRepeatDays.contains("Monday")) { displayDays = displayDays + " M"; } if(selectedRepeatDays.contains("Tuesday")) { displayDays = displayDays + " Tu"; } if(selectedRepeatDays.contains("Wednesday")) { displayDays = displayDays + " W"; } if(selectedRepeatDays.contains("Thursday")) { displayDays = displayDays + " Th"; } if(selectedRepeatDays.contains("Friday")) { displayDays = displayDays + " F"; } if(selectedRepeatDays.contains("Saturday")) { displayDays = displayDays + " Sa"; } if(selectedRepeatDays.contains("Sunday")) { displayDays = displayDays + " Su"; } if(selectedRepeatDays.isEmpty()) { displayDays = "Next available time"; } PreferenceManager.getDefaultSharedPreferences(getActivity()).edit().putString("displayDays_"+alarmID, displayDays).apply(); daysOfWeek.setText(PreferenceManager.getDefaultSharedPreferences(getActivity()).getString("displayDays_"+alarmID, "Next available time")); } }) .setNegativeButton("Cancel", null); return builder.create(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void initSelectedDays() {\n binding.viewAlarm.cbMonday.setSelected(alarmVM.isDayActive(Calendar.MONDAY));\n binding.viewAlarm.cbTuesday.setSelected(alarmVM.isDayActive(Calendar.TUESDAY));\n binding.viewAlarm.cbWednesday.setSelected(alarmVM.isDayActive(Calendar.WEDNESDAY));\n binding.viewAlarm.cbThursday.setSelected(alarmVM.isDayActive(Calendar.THURSDAY));\n binding.viewAlarm.cbFriday.setSelected(alarmVM.isDayActive(Calendar.FRIDAY));\n binding.viewAlarm.cbSaturday.setSelected(alarmVM.isDayActive(Calendar.SATURDAY));\n binding.viewAlarm.cbSunday.setSelected(alarmVM.isDayActive(Calendar.SUNDAY));\n }", "public void fillDays(int days){\n\t\tnumberDate.removeAllItems();\n\t\tfor(int i = 0; i< days; i++){\n\t\t\t//daylist[i] = \"\" + (i+1);\n\t\t\tnumberDate.addItem((i+1));\n\t\t}\n\t\t\n\t\t\n\t\t\n\t}", "public void setDaysOfWeek(int[] daysOfWeek) {\n if (daysOfWeek == null)\n daysOfWeek = new int[] {};\n this.daysOfWeek = daysOfWeek;\n }", "public void setupDays() {\n\n //if(days.isEmpty()) {\n days.clear();\n int day_number = today.getActualMaximum(Calendar.DAY_OF_MONTH);\n SimpleDateFormat sdf = new SimpleDateFormat(\"EEEE\");\n SimpleDateFormat sdfMonth = new SimpleDateFormat(\"MMM\");\n today.set(Calendar.DATE, 1);\n for (int i = 1; i <= day_number; i++) {\n OrariAttivita data = new OrariAttivita();\n data.setId_utente(mActualUser.getID());\n\n //Trasformare in sql date\n java.sql.Date sqldate = new java.sql.Date(today.getTimeInMillis());\n data.setGiorno(sqldate.toString());\n\n data.setDay(i);\n data.setMonth(today.get(Calendar.MONTH) + 1);\n\n data.setDay_of_week(today.get(Calendar.DAY_OF_WEEK));\n Date date = today.getTime();\n String day_name = sdf.format(date);\n data.setDay_name(day_name);\n data.setMonth_name(sdfMonth.format(date));\n\n int indice;\n\n if (!attivitaMensili.isEmpty()) {\n if ((indice = attivitaMensili.indexOf(data)) > -1) {\n OrariAttivita temp = attivitaMensili.get(indice);\n if (temp.getOre_totali() == 0.5) {\n int occurence = Collections.frequency(attivitaMensili, temp);\n if (occurence == 2) {\n for (OrariAttivita other : attivitaMensili) {\n if (other.equals(temp) && other.getCommessa() != temp.getCommessa()) {\n data.setOtherHalf(other);\n data.getOtherHalf().setModifica(true);\n }\n }\n\n }\n }\n data.setFromOld(temp);\n data.setModifica(true);\n }\n }\n isFerie(data);\n\n\n //Aggiungi la data alla lista\n days.add(data);\n\n //Aggiugni un giorno alla data attuale\n today.add(Calendar.DATE, 1);\n }\n\n today.setTime(actualDate);\n\n mCalendarAdapter.notifyDataSetChanged();\n mCalendarList.setAdapter(mCalendarAdapter);\n showProgress(false);\n }", "private int[] setDaysOfWeek() {\n int[] daysOfWeek = new int[7];\n\n for (int i = 0; i < 6; i++) {\n daysOfWeek[i] = calculateNumberOfDaysOfWeek(DayOfWeek.of(i + 1));\n }\n\n return daysOfWeek;\n }", "private void initDays(String trigger) {\n\t\tif(trigger.equals(\"edit\")){\n\t\t\tfor(int i = 0; i < tgWeekDays.length; i++){\n\t\t\t\tif(days.contains(tgWeekDays[i].getTag()))\n\t\t\t\t\ttgWeekDays[i].setChecked(true);\n\t\t\t\telse\n\t\t\t\t\ttgWeekDays[i].setChecked(false);\n\t\t\t}\n\t\t}\n\t\telse if(trigger.equalsIgnoreCase(\"calendar\")){\n\t\t\tfor(int i = 0; i < tgWeekDays.length; i++){\n\t\t\t\tif(days.contains(tgWeekDays[i].getTag()))\n\t\t\t\t\ttgWeekDays[i].setChecked(true);\n\t\t\t\telse\n\t\t\t\t\ttgWeekDays[i].setChecked(false);\n\t\t\t}\n\t\t}\n\t\telse{\n\t\t\tint curDay = calendar.get(Calendar.DAY_OF_WEEK);\n\t\t\t\n\t\t\tfor(int i = 0; i < tgWeekDays.length; i++){\n\t\t\t\tif(tgWeekDays[i].getTag().equals(curDay))\n\t\t\t\t\ttgWeekDays[i].setChecked(true);\n\t\t\t\telse\n\t\t\t\t\ttgWeekDays[i].setChecked(false);\n\t\t\t}\n\t\t}\n\t\t\n\t\tdays.clear();\n\t}", "private void setCheckedDays(List<Boolean> repeatedDays){\n for(int i = 0; i < DateTime.DAYS_IN_WEEK; i++){\n mWeekCheckBoxes[i].setChecked(repeatedDays.get(i));\n }\n }", "public void setDays(){\n\n CalendarDay Day=DropDownCalendar.getSelectedDate();\n Date selectedDate=Day.getDate();\n String LongDate=\"\"+selectedDate;\n String DayOfWeek=LongDate.substring(0,3);\n Calendar calendar=Calendar.getInstance();\n calendar.setTime(selectedDate);\n int compare=Integer.parseInt(CurrenDate.substring(6,8).trim());\n int comparemonth=Integer.parseInt(CurrenDate.substring(4,6));\n int startNumber=Integer.parseInt(CheckedDate.substring(6,8).trim())-Offset(DayOfWeek);\n int max=calendar.getActualMaximum(Calendar.DAY_OF_MONTH);\n\n GregorianCalendar date= (GregorianCalendar) GregorianCalendar.getInstance();\n date.set(selectedDate.getYear(),1,1);\n\n boolean Feb=false;\n int priormax=30;\n\n if(max==30){\n priormax=31;\n }\n else if( max==31){\n priormax=30;\n }\n\n if(selectedDate.getMonth()==2){\n if(date.isLeapYear(selectedDate.getYear())){\n priormax=29;\n }\n\n else{\n priormax=28;\n }\n Feb=true;\n }\n for(int i=0;i<WeekDays.length;++i){\n String line=WeekDays[i].getText().toString().substring(0,3);\n\n if(startNumber<=max){\n if(startNumber==compare && comparemonth==Day.getMonth()+1){\n WeekDays[i].setTextColor(Color.BLUE);\n }\n else{\n WeekDays[i].setTextColor(Color.BLACK);\n }\n if(startNumber<=0){\n int val=startNumber+priormax;\n if(Feb){\n if(val==priormax){\n startNumber=max;\n }\n }\n\n WeekDays[i].setText(line+\"\\n\"+val);}\n\n else{\n WeekDays[i].setText(line+\"\\n\"+startNumber);\n }\n\n }\n else{\n startNumber=1;\n WeekDays[i].setText(line+\"\\n\"+startNumber);\n }\n\n MaskWeekdays[i].setText(line+\"\\n\"+startNumber);\n ++startNumber;\n }\n DropDownCalendar.setDateSelected(Calendar.getInstance().getTime(), true);\n }", "public void setDays(int days) {\n this.days = days;\n }", "public TextView[] Weekdays(){\n Resources r = getResources();\n String name = getPackageName();\n String WeekDays[]={\"Mon\",\"Tue\",\"Wed\",\"Thu\",\"Fri\",\"Sat\",\"Sun\"};\n String DummyWeekDays[]={\"F1\",\"F2\",\"F3\",\"F4\",\"F5\",\"F6\",\"F7\"};\n TextView Weekdays[]=new TextView[7];\n DropDownCalendar.setCurrentDate(Calendar.getInstance());\n for(int i=0;i<WeekDays.length;++i) {\n TextView weekday,dummyWeekday;\n weekday = (TextView) findViewById(r.getIdentifier(WeekDays[i], \"id\", name));\n dummyWeekday=(TextView)findViewById(r.getIdentifier(DummyWeekDays[i],\"id\",name));\n Weekdays[i]=weekday;\n dummyWeekday.setTextColor(Color.TRANSPARENT);\n dummyWeekday.setHintTextColor(Color.TRANSPARENT);\n MaskWeekdays[i]=dummyWeekday;;\n\n }\n return Weekdays;\n }", "private RepeatWeekdays() {}", "public void setAvailableDays(String days) {\n\t\tthis.availableDays =days;\r\n\t\t\r\n\t}", "public Day[] getDays() {\n\t\treturn days;\n\t}", "public void setDaysOfMonth(int[] daysOfMonth) {\n if (daysOfMonth == null)\n daysOfMonth = new int[] {};\n this.daysOfMonth = daysOfMonth;\n }", "public DaySelections(List<Date> dates, List<Date> conflictDates)\n\t{\n\t\tsuper();\n\t\tthis.initializeUI(dates, conflictDates);\t\t\n\t}", "private void initList(LocalDate cal) {\n\t\tdays.add(\"Mo\");\n\t\tdays.add(\"Tu\");\n\t\tdays.add(\"We\");\n\t\tdays.add(\"Th\");\n\t\tdays.add(\"Fr\");\n\t\tdays.add(\"Sa\");\n\t\tdays.add(\"Su\");\n\t}", "private void init() {\n setMinutes(new int[] {});\n setHours(new int[] {});\n setDaysOfMonth(new int[] {});\n setMonths(new int[] {});\n setDaysOfWeek(new int[] {});\n }", "public void setDays(String days) {\n\t\tthis.days = days;\n\t}", "public int[] getDaysOfWeek() {\n return daysOfWeek;\n }", "public ArrayList getDayArray() {\r\n return dayArray; \r\n }", "public static List<Date> initDates(Integer daysIntervalSize) {\n List<Date> dateList = new ArrayList<Date>();\n Calendar calendar = Calendar.getInstance();\n calendar.add(Calendar.DATE, -((daysIntervalSize / 2) + 1));\n for (int i = 0; i <= daysIntervalSize; i++) {\n calendar.add(Calendar.DATE, 1);\n dateList.add(calendar.getTime());\n }\n return dateList;\n }", "public void setEDays(int days){\n \teDays = days;\n }", "public void PopulateDays(TextView[] Days){\n for(int i=0;i<Days.length;++i){\n TextView day=Days[i];\n String info[]=day.getText().toString().split(\"\\n\");\n String line=info[0];\n String line2=info[1];\n PopulateHours(line,line2);\n }\n\n }", "public Builder byDay(DayOfWeek... days) {\n\t\t\treturn byDay(Arrays.asList(days));\n\t\t}", "private Calimiteit[] chooseCalimiteiten()\n\t{\n\n\t\tCalimiteit[] calimiteiten = new Calimiteit[_AantalCalimiteiten];\n\n\t\tint[] choosenValues = new int[_AantalCalimiteiten];\n\n\t\tfor (int i = 0; i < _AantalCalimiteiten; i++) {\n\t\t\tint random = Greenfoot.getRandomNumber(25);\n\n\t\t\t/*\n\t\t\t * Kijkt of het gekozen getal al gekozen is. Zo ja blijft hij een\n\t\t\t * random getal genereren totdat hij een getal heeft dat nog niet\n\t\t\t * gekozen is\n\t\t\t */\n\t\t\twhile (Arrays.asList(choosenValues).contains(random) == true) {\n\t\t\t\trandom = Greenfoot.getRandomNumber(25);\n\t\t\t}\n\n\t\t\tchoosenValues[i] = random;\n\t\t\tcalimiteiten[i] = _Calimiteiten[random];\n\t\t}\n\n\t\treturn calimiteiten;\n\t}", "ArrayList<Day> getDays() {\n return days;\n }", "private void setDay() {\n Boolean result = false;\n for (int i = 0; i < 7; ++i) {\n if(mAlarmDetails.getRepeatingDay(i))\n result = true;\n mAlarmDetails.setRepeatingDay(i, mAlarmDetails.getRepeatingDay(i));\n }\n if(!result)\n mAlarmDetails.setRepeatingDay((Calendar.getInstance().get(Calendar.DAY_OF_WEEK) - 1), true);\n }", "public void setDays(int daysIn){\r\n\t\tdays = daysIn;\r\n\t}", "public void setPresentDays(Integer presentDays)\r\n/* 53: */ {\r\n/* 54:55 */ this.presentDays = presentDays;\r\n/* 55: */ }", "private void loadDays(){\n MyDBHandler db = new MyDBHandler(this);\n dayOfTheWeek.clear();\n dayOfTheWeek.addAll(db.getDaysOfTheWeek());\n }", "private List<String> makeListOfDates(HashSet<Calendar> workDays) {\n //SimpleDateFormat sdf = new SimpleDateFormat(\"dd/MM/YYYY\");\n SimpleDateFormat sdf = new SimpleDateFormat();\n List<String> days = new ArrayList<>();\n for (Calendar date : workDays) {\n //SimpleDateFormat sdf = new SimpleDateFormat(\"dd/MM/YYYY\");\n days.add(sdf.format(date.getTime()));\n }\n\n return days;\n }", "@PostConstruct\r\n public void init() {\n this.tab = false;\r\n this.tabNumber = 0;\r\n\r\n weekdaysItem = new ArrayList<>();\r\n\r\n for (WeekDay wd : WeekDay.values()) {\r\n weekdaysItem.add(new SelectItem(wd, wd.name()));\r\n }\r\n }", "public void setNumDays(int days) {\n maxDays = days;\n }", "public static HolidayCalendar[] calendarArray() {\n return new HolidayCalendar[] {TARGET };\n }", "public DaySelections(Date date, List<Date> conflictDates)\n\t{\n\t\tsuper();\n\t\tthis.initializeUI(date, conflictDates);\n\t}", "public void setUDays(int days){\n \tuDays = days;\n }", "public int[] getDaysOfMonth() {\n return daysOfMonth;\n }", "private List<Long> makeListOfDatesLong(HashSet<Calendar> workDays) {\n List<Long> days = new ArrayList<>();\n if (workDays != null) {\n for (Calendar date : workDays) {\n //SimpleDateFormat sdf = new SimpleDateFormat(\"dd/MM/YYYY\");\n //days.add(sdf.format(date.getTime()));\n days.add(date.getTimeInMillis());\n }\n }\n return days;\n }", "private void initDate(){\n\n owa = findViewById(R.id.OWA);\n sda = findViewById(R.id.SWA);\n fida = findViewById(R.id.FIDA);\n fda = findViewById(R.id.FDA);\n trda = findViewById(R.id.TRDA);\n tda = findViewById(R.id.TDA);\n hier = findViewById(R.id.HIER);\n\n dateList.add(hier);\n dateList.add(tda);\n dateList.add(trda);\n dateList.add(fda);\n dateList.add(fida);\n dateList.add(sda);\n dateList.add(owa);\n\n }", "private void makeDayButtons() \n\t{\n\t\t\n\t\tSystem.out.println(monthMaxDays);\n\t\tfor (int i = 1; i <= monthMaxDays; i++) \n\t\t{\n\t\t\t//the first day starts from 1\n\t\t\tfinal int dayNumber = i;\n\t\t\t\n\t\t\t//create new button\n\t\t\tJButton day = new JButton(Integer.toString(dayNumber));\n\t\t\tday.setBackground(Color.WHITE);\n\t\n\t\t\t//attach a listener\n\t\t\tday.addActionListener(new \n\t\t\t\t\tActionListener() \n\t\t\t\t\t{\n\t\t\t\t\t\tpublic void actionPerformed(ActionEvent arg0) \n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t//if button is pressed, highlight it \n\t\t\t\t\t\t\tborderSelected(dayNumber -1);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//show the event items in the box on the right\n\t\t\t\t\t\t\twriteEvents(dayNumber);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tchangeDateLabel(dayNumber);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//make these buttons available for use\n\t\t\t\t\t\t\tnextDay.setEnabled(true);\n\t\t\t\t\t\t\tprevDay.setEnabled(true);\n\t\t\t\t\t\t\tcreateButton.setEnabled(true);\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\n\t\t\t//add this button to the day button ArrayList\n\t\t\tbuttonArray.add(day);\n\t\t}\n\t}", "public Date[] getSelectedDates() {\r\n return calendarTable.getSelectedDates();\r\n }", "public void resetDates() {\r\n selectedDate = null;\r\n currentDate = Calendar.getInstance();\r\n }", "public void loadSpinnerDays(){\r\n \r\n ObservableList<String> days = FXCollections.observableArrayList(\r\n \"Saturday\" ,\"Friday\" ,\"Thursday\" ,\"Wednesday\" ,\"Tuesday\" ,\"Monday\");\r\n \r\n // Value factory.\r\n SpinnerValueFactory<String> valueFactory = //\r\n new SpinnerValueFactory.ListSpinnerValueFactory<String>(days);\r\n SpinnerValueFactory<String> valueFactory2 = //\r\n new SpinnerValueFactory.ListSpinnerValueFactory<String>(days);\r\n \r\n valueFactory.setValue(\"Monday\");\r\n valueFactory2.setValue(\"Monday\");\r\n \r\n \r\n spnDay1.setValueFactory(valueFactory);\r\n spnDay2.setValueFactory(valueFactory2);\r\n \r\n }", "public static void createArrayOfCalendars() {\n\n GregorianCalendar[] calendars = new GregorianCalendar[12];\n\n /*\n\n At this point, every element in the array has a value of null.\n\n */\n\n for (GregorianCalendar calendar : calendars) {\n System.out.println(calendar);\n }\n \n /*\n * Create a new calendar object and assign it to each element in the array. \n * \n */\n \n for (int i = 0; i < calendars.length; i++) {\n calendars[i] = new GregorianCalendar(2021, i + 1, 1);\n }\n \n for (GregorianCalendar calendar : calendars) {\n System.out.println(calendar);\n }\n \n /*\n * An enhanced for loop cannot modify the values of the elements in the array (.g., references to calendars), but we can call \n * mutator methods which midify the properties fo the referenced objects (e.g., day of the month).\n */\n \n for (GregorianCalendar calendar : calendars) {\n calendar.add(GregorianCalendar.DAY_OF_MONTH, 2);\n }\n \n for (GregorianCalendar calendar : calendars) {\n System.out.println(calendar);\n }\n }", "private void mInitData(int DaysRange, int HourRange) {\n mDaysRange = DaysRange;\n mHourRange = HourRange;\n\n mDateList = new ArrayList<>();\n mHourList = new ArrayList<>();\n mTimeWithMeridianList = new ArrayList<>();\n mDatewithYearList = new ArrayList<>();\n\n // Calculate Date List\n calculateDateList();\n }", "public Builder byDay(Collection<DayOfWeek> days) {\n\t\t\tfor (DayOfWeek day : days) {\n\t\t\t\tbyDay(null, day);\n\t\t\t}\n\t\t\treturn this;\n\t\t}", "public WebElement getMultiArticleDayDropdown(int day) {\n WebElement el;\n switch(day) {\n case 1: el = locateWebElement(\"SelectDay1DropDown\");\n break;\n case 2: el = locateWebElement(\"SelectDay2DropDown\");\n break;\n case 3: el = locateWebElement(\"SelectDay3DropDown\");\n break;\n case 4: el = locateWebElement(\"SelectDay4DropDown\");\n break;\n case 5: el = locateWebElement(\"SelectDay5DropDown\");\n break;\n case 6: el = locateWebElement(\"SelectDay6DropDown\");\n break;\n default: el = null;\n break;\n }\n return el;\n }", "private boolean makeCalendarByDays() {\n if (calendar != null) {\n for (Date date:calendar.keySet()) {\n Date startDay;\n if (date.getTime() > date.getTime() - 3600000 * 2 - date.getTime() % 86400000)\n startDay = new Date(date.getTime() + 3600000 * 22 - date.getTime() % 86400000);\n else startDay = new Date(date.getTime() - 3600000 * 2 - date.getTime() % 86400000);\n calendarByDays.put(startDay, calendar.get(date));\n }\n return true;\n }\n return false;\n }", "public static void createArrayOfCalendars()\n {\n GregorianCalendar[] calendars = new GregorianCalendar[12];\n \n /*\n * At this point, every element in the array has a value of\n * null.\n */\n for(GregorianCalendar calendar : calendars)\n {\n System.out.println(calendar);\n }\n \n /*\n * Create a new calendar object and assign to each element\n * in the array.\n */\n for(int i = 0; i < calendars.length; i++)\n {\n calendars[i] = new GregorianCalendar(2018, i + 1, 1); // year, month, day\n }\n \n for(GregorianCalendar calendar : calendars)\n {\n System.out.println(calendar);\n }\n \n /*\n * An enahnced for loop cannot modify the value of the \n * elements in the array (e.g., references to calendars),\n * but we can call mutator methods which modify the\n * properties of the referenced objects (e.g., day\n * of the month).\n */\n for(GregorianCalendar calendar : calendars)\n {\n calendar.add(GregorianCalendar.DAY_OF_MONTH, 2);\n }\n \n for(GregorianCalendar calendar : calendars)\n {\n System.out.println(calendar);\n }\n }", "private void setRepeatMode() {\n tvRepeatMode.setText(data.getRepeateDays());\n }", "public String[] defineDaysLine(String day) {\n int shiftPositions = -1;\n String[] definedDayLine = {Const.DAY_SUNDAY, Const.DAY_MONDAY, Const.DAY_TUESDAY, Const.DAY_WEDNESDAY,\n Const.DAY_THURSDAY, Const.DAY_FRIDAY, Const.DAY_SATURDAY};\n for (int i = 0; i < definedDayLine.length; i++) {\n if (day.equals(definedDayLine[i])) {\n shiftPositions = i;\n }\n }\n String[] tempArray = new String[definedDayLine.length];\n System.arraycopy(definedDayLine, shiftPositions, tempArray, 0, definedDayLine.length - shiftPositions);\n System.arraycopy(definedDayLine, 0, tempArray, definedDayLine.length - shiftPositions, shiftPositions);\n return tempArray;\n }", "public Schedule() {\r\n\t\tschedule = new boolean[WEEK_DAYS][];\r\n\t\tfor(int i = 0; i < WEEK_DAYS; i++)\r\n\t\t\tschedule[i] = new boolean[SEGMENTS_PER_DAY];\r\n\t\tlisteners = new ArrayList<ScheduleChangeListener>();\r\n\t}", "public StoredDay(LocalDate date) {\n this.date = date;\n this.recipes = new StoredRecipe[0];\n }", "public void sortDaysArray() {\n if (_savedDates.size() > 0) {\n Collections.sort(_savedDates, Collections.reverseOrder());\n }\n //Log.i(\"DailyLogFragment\", \"_savedDates after sort = \" + _savedDates);\n }", "@JsonSetter(\"workingDays\")\n public void setWorkingDays (List<Days> value) { \n this.workingDays = value;\n notifyObservers(this.workingDays);\n }", "public void setIDays(int iDays) {\n this.iDays = iDays;\n }", "@FXML\n public void todaySelected() {\n ArrayList<Interview> todayInterviews = new ArrayList<>();\n for (Interview it : this.interviewer.getPendingInterviews()) {\n Date itDate = it.getDate();\n if (itDate.getYear() == new Date().getYear() &&\n itDate.getMonth() == new Date().getMonth() &&\n itDate.getDay() == new Date().getDay()) {\n todayInterviews.add(it);\n }\n }\n this.populateListInterview(todayInterviews);\n }", "private void getData(int day){\n try {\n String today = DateUtilities.getCurrentDateInString();\n DateFormat dateFormat = new SimpleDateFormat(\"dd-MM-yyyy\");\n Date currentDate = dateFormat.parse(today);\n Calendar calendar = Calendar.getInstance();\n calendar.setTime(currentDate);\n calendar.add(Calendar.DAY_OF_YEAR,-day);\n Date datebefore = calendar.getTime();\n String dateBeforeStr = dateFormat.format(datebefore);\n\n stepsTakenModels = db.stepsTakenDao().getStepsTakenInrange(dateBeforeStr,today);\n// stepsTakenModels.addAll(db.stepsTakenDao().getStepsTakenInrange(\"01-10-2019\",today));\n\n for(int i = 0 ; i < 7 ; i++){\n stepsTakenModelsLastWeek.add(stepsTakenModels.get(i));\n }\n\n for(int i = 7 ; i<stepsTakenModels.size() ; i++){\n stepsTakenModelsThisWeek.add(stepsTakenModels.get(i));\n }\n// if(stepsTakenModelsThisWeek.size()==0){\n// StepsTakenModel stepsTakenModel = new StepsTakenModel();\n// stepsTakenModel.setSteps(659);\n// stepsTakenModel.setDate(today);\n// stepsTakenModelsThisWeek.add(stepsTakenModel);\n// }\n\n }catch (Exception e){\n Log.d(\"TAG\",e.getMessage());\n }\n }", "private void fillCalimiteiten()\n\t{\n\n\t\t_Calimiteiten[0] = new Calimiteit(new Brand(false), 80, 108, new actBlussen(true));\n\t\t_Calimiteiten[1] = new Calimiteit(new Brand(false), 557, 284, new actBlussen(true));\n\t\t_Calimiteiten[2] = new Calimiteit(new Brand(false), 557, 284, new actBlussen(true));\n\t\t_Calimiteiten[3] = new Calimiteit(new Brand(false), 557, 284, new actBlussen(true));\n\t\t_Calimiteiten[4] = new Calimiteit(new Brand(false), 415, 86, new actBlussen(true));\n\t\t_Calimiteiten[5] = new Calimiteit(new Evacuatie(false), 201, 590, new actZorg(true));\n\t\t_Calimiteiten[6] = new Calimiteit(new Evacuatie(false), 47, 669, new actZorg(true));\n\t\t_Calimiteiten[7] = new Calimiteit(new Evacuatie(false), 128, 666, new actZorg(true));\n\t\t_Calimiteiten[8] = new Calimiteit(new Evacuatie(false), 145, 601, new actZorg(true));\n\t\t_Calimiteiten[9] = new Calimiteit(new Evacuatie(false), 507, 540, new actZorg(true));\n\t\t_Calimiteiten[10] = new Calimiteit(new Autoongeluk(false), 280, 140, new actEhbo(true));\n\t\t_Calimiteiten[11] = new Calimiteit(new Autoongeluk(false), 395, 375, new actEhbo(true));\n\t\t_Calimiteiten[12] = new Calimiteit(new Autoongeluk(false), 305, 615, new actEhbo(true));\n\t\t_Calimiteiten[13] = new Calimiteit(new Elek_Brand(false), 275, 185, new actElectraBrand(true));\n\t\t_Calimiteiten[14] = new Calimiteit(new Elek_Brand(false), 460, 390, new actElectraBrand(true));\n\t\t_Calimiteiten[15] = new Calimiteit(new Elek_Brand(false), 155, 530, new actElectraBrand(true));\n\t\t_Calimiteiten[16] = new Calimiteit(new Overstroming(false), 240, 465, new actWaterpomp(true));\n\t\t_Calimiteiten[17] = new Calimiteit(new Overstroming(false), 425, 575, new actWaterpomp(true));\n\t\t_Calimiteiten[18] = new Calimiteit(new Overstroming(false), 415, 415, new actWaterpomp(true));\n\t\t_Calimiteiten[19] = new Calimiteit(new Rellen(false), 300, 115, new actStuurME(true));\n\t\t_Calimiteiten[20] = new Calimiteit(new Rellen(false), 265, 420, new actStuurME(true));\n\t\t_Calimiteiten[21] = new Calimiteit(new Rellen(false), 420, 635, new actStuurME(true));\n\t\t_Calimiteiten[22] = new Calimiteit(new Overval(false), 300, 350, new actArrest(true));\n\t\t_Calimiteiten[23] = new Calimiteit(new Overval(false), 450, 230, new actArrest(true));\n\t\t_Calimiteiten[24] = new Calimiteit(new Overval(false), 210, 200, new actArrest(true));\n\n\t\t/*\n\t\t * Hier zorgt hij ervoor dat er in de Actor class ook de gemaakte\n\t\t * calimiteit mee geeft.\n\t\t */\n\t\tfor (Calimiteit calimiteit : _Calimiteiten) {\n\t\t\tString actorStr = calimiteit.getActor().toString();\n\t\t\tactorStr = actorStr.substring(0, actorStr.indexOf(\"@\"));\n\n\t\t\tif (actorStr.equals(\"Brand\")) {\n\t\t\t\tBrand actor = (Brand) calimiteit.getActor();\n\t\t\t\tactor.setCalimiteit(calimiteit);\n\t\t\t}\n\t\t\telse if (actorStr.equals(\"Evacuatie\")) {\n\t\t\t\tEvacuatie actor = (Evacuatie) calimiteit.getActor();\n\t\t\t\tactor.setCalimiteit(calimiteit);\n\t\t\t}\n\t\t\telse if (actorStr.equals(\"Autoongeluk\")) {\n\t\t\t\tAutoongeluk actor = (Autoongeluk) calimiteit.getActor();\n\t\t\t\tactor.setCalimiteit(calimiteit);\n\t\t\t}\n\t\t\telse if (actorStr.equals(\"Elek_Brand\")) {\n\t\t\t\tElek_Brand actor = (Elek_Brand) calimiteit.getActor();\n\t\t\t\tactor.setCalimiteit(calimiteit);\n\t\t\t}\n\t\t\telse if (actorStr.equals(\"Overstroming\")) {\n\t\t\t\tOverstroming actor = (Overstroming) calimiteit.getActor();\n\t\t\t\tactor.setCalimiteit(calimiteit);\n\t\t\t}\n\t\t\telse if (actorStr.equals(\"Rellen\")) {\n\t\t\t\tRellen actor = (Rellen) calimiteit.getActor();\n\t\t\t\tactor.setCalimiteit(calimiteit);\n\t\t\t}\n\t\t\telse if (actorStr.equals(\"Overval\")) {\n\t\t\t\tOverval actor = (Overval) calimiteit.getActor();\n\t\t\t\tactor.setCalimiteit(calimiteit);\n\t\t\t}\n\t\t}\n\t}", "private int[] nextDay(int[] cells){\n int[] tmp = new int[cells.length];\n \n for(int i=1;i<cells.length-1;i++){\n tmp[i]=cells[i-1]==cells[i+1]?1:0;\n }\n return tmp;\n }", "public Date212[] getNumbDates(int a){ //a is the number that signfies the dates passed in.\n // System.out.println(a+ \"a is\");\n Date212 myDates[] = new Date212[a]; //initalize it from the a.\n\n for(int d = 0; d< myTempDates.length; d++){ //that \"myTempDates\" array which holds the dates is used to copy it into the specified array.\n if(myTempDates[d] != null){ //if next index is not null then copy.\n myDates[d] = myTempDates[d];\n }\n }\n return myDates; //return the array to method calling it!\n }", "private final int[] initializeInstanceVariable() {\n\t\tint n = 10;\n\t\tint[] temp = new int[n];\n\t\tfor (int i = 0; i < n; i++) {temp[i] = i;}\n\t\treturn temp;\n\t}", "public void setNumberOfDays(int numberOfDays) {\n this.numberOfDays = numberOfDays;\n }", "private Double[] getDayValue24(DayEM dayEm) {\n\n\t Double[] dayValues = new Double[24];\n\n\t /* OPF-610 정규화 관련 처리로 인한 주석\n\t dayValues[0] = (dayEm.getValue_00() == null ? 0 : dayEm.getValue_00());\n\t dayValues[1] = (dayEm.getValue_01() == null ? 0 : dayEm.getValue_01());\n\t dayValues[2] = (dayEm.getValue_02() == null ? 0 : dayEm.getValue_02());\n\t dayValues[3] = (dayEm.getValue_03() == null ? 0 : dayEm.getValue_03());\n\t dayValues[4] = (dayEm.getValue_04() == null ? 0 : dayEm.getValue_04());\n\t dayValues[5] = (dayEm.getValue_05() == null ? 0 : dayEm.getValue_05());\n\t dayValues[6] = (dayEm.getValue_06() == null ? 0 : dayEm.getValue_06());\n\t dayValues[7] = (dayEm.getValue_07() == null ? 0 : dayEm.getValue_07());\n\t dayValues[8] = (dayEm.getValue_08() == null ? 0 : dayEm.getValue_08());\n\t dayValues[9] = (dayEm.getValue_09() == null ? 0 : dayEm.getValue_09());\n\t dayValues[10] = (dayEm.getValue_10() == null ? 0 : dayEm.getValue_10());\n\t dayValues[11] = (dayEm.getValue_11() == null ? 0 : dayEm.getValue_11());\n\t dayValues[12] = (dayEm.getValue_12() == null ? 0 : dayEm.getValue_12());\n\t dayValues[13] = (dayEm.getValue_13() == null ? 0 : dayEm.getValue_13());\n\t dayValues[14] = (dayEm.getValue_14() == null ? 0 : dayEm.getValue_14());\n\t dayValues[15] = (dayEm.getValue_15() == null ? 0 : dayEm.getValue_15());\n\t dayValues[16] = (dayEm.getValue_16() == null ? 0 : dayEm.getValue_16());\n\t dayValues[17] = (dayEm.getValue_17() == null ? 0 : dayEm.getValue_17());\n\t dayValues[18] = (dayEm.getValue_18() == null ? 0 : dayEm.getValue_18());\n\t dayValues[19] = (dayEm.getValue_19() == null ? 0 : dayEm.getValue_19());\n\t dayValues[20] = (dayEm.getValue_20() == null ? 0 : dayEm.getValue_20());\n\t dayValues[21] = (dayEm.getValue_21() == null ? 0 : dayEm.getValue_21());\n\t dayValues[22] = (dayEm.getValue_22() == null ? 0 : dayEm.getValue_22());\n\t dayValues[23] = (dayEm.getValue_23() == null ? 0 : dayEm.getValue_23());\n\t\t\t*/\n\t \n\t return dayValues;\n\t }", "public void setDays(int n) {\n this.days = n;\n this.total = this.days * this.price;\n }", "List<Day> getDays(String userName);", "public void setDaysAdded(int value) {\n this.daysAdded = value;\n }", "private void setUp() {\r\n Calendar calendar1 = Calendar.getInstance();\r\n calendar1.set((endDate.get(Calendar.YEAR)), \r\n (endDate.get(Calendar.MONTH)), (endDate.get(Calendar.DAY_OF_MONTH)));\r\n calendar1.roll(Calendar.DAY_OF_YEAR, -6);\r\n \r\n Calendar calendar2 = Calendar.getInstance();\r\n calendar2.set((endDate.get(Calendar.YEAR)), \r\n (endDate.get(Calendar.MONTH)), (endDate.get(Calendar.DAY_OF_MONTH)));\r\n \r\n acceptedDatesRange[0] = calendar1.get(Calendar.DAY_OF_YEAR);\r\n acceptedDatesRange[1] = calendar2.get(Calendar.DAY_OF_YEAR); \r\n \r\n if(acceptedDatesRange[1] < 7) {\r\n acceptedDatesRange[0] = 1; \r\n }\r\n \r\n //MiscStuff.writeToLog(\"Ranges set \" + calendar1.get\r\n // (Calendar.DAY_OF_YEAR) + \" \" + calendar2.get(Calendar.DAY_OF_YEAR));\r\n }", "public void setAbsentDays(Integer absentDays)\r\n/* 63: */ {\r\n/* 64:63 */ this.absentDays = absentDays;\r\n/* 65: */ }", "public void setValidityDays(int value) {\r\n this.validityDays = value;\r\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.full_day_meal_fragment, container, false);\n Bundle bundle = this.getArguments();\n\n String strNoOfDays = bundle.getString(\"no_of_days\");\n String mealType = bundle.getString(\"type_of_meal\");\n if (mealType.equals(\"Lunch Only\")) {\n isFullDayMeal = false;\n }\n intNoOFDays = Integer.parseInt(strNoOfDays);\n expListView = (ExpandableListView) view.findViewById(R.id.lvExp);\n tv_title=(TextView)view.findViewById(R.id.tv_title_meal);\n tv_dayName=(TextView)view.findViewById(R.id.tv_day_name);\n daysselectCategory = new ArrayList[intNoOFDays];\n daysCategory = new ArrayList[intNoOFDays];\n btn_select_meal = (Button) view.findViewById(R.id.btn_select_meal);\n horizontal_recycler_view = (RecyclerView) view.findViewById(R.id.title_recyleview);\n\n\n horizontalAdapter = new TitleHorizontalAdapter(titles, getActivity(), this);\n\n LinearLayoutManager horizontalLayoutManager = new LinearLayoutManager(getActivity(), LinearLayoutManager.HORIZONTAL, false);\n horizontal_recycler_view.setLayoutManager(horizontalLayoutManager);\n horizontal_recycler_view.setAdapter(horizontalAdapter);\n tv_title.setText(mealType);\n\n menuSelectDayCheck = new boolean[intNoOFDays];\n for (int i = 0; i < intNoOFDays; i++) {\n menuSelectDayCheck[i] = false;\n }\n\n int intStartDate = Prefs.getInt(\"date\", 0);\n int day = Prefs.getInt(\"day\", 0);\n int month = Prefs.getInt(\"month\", 0);\n int year = Prefs.getInt(\"year\", 0);\n /* starts before 1 month from now */\n Calendar startDate = Calendar.getInstance();\n start_Date = startDate;\n\n // Toast.makeText(getActivity(), \"\" + Calendar.DATE, Toast.LENGTH_SHORT).show();\n startDate.add(Calendar.DATE, 3);\n\n getMeals(getDateString(startDate));\n\n /* ends after 1 month from now */\n Calendar endDate = Calendar.getInstance();\n endDate.add(Calendar.DATE, intNoOFDays + 2);\n\n HorizontalCalendar horizontalCalendar = new HorizontalCalendar.Builder(view, R.id.calendarView)\n .range(startDate, endDate)\n .datesNumberOnScreen(5)\n .build();\n\n\n horizontalCalendar.setCalendarListener(new HorizontalCalendarListener() {\n @Override\n public void onDateSelected(Calendar date, int position) {\n //do something\n if (AllCheck()) {\n daysselectCategory[check_day_index] = selectCategory;\n\n if (!menuSelectDayCheck[check_day_index]) {\n menuSelectDayCheck[check_day_index] = true;\n size++;\n }\n\n } else {\n Toast.makeText(getActivity(), \"You have not select all category from \" + curentDate, Toast.LENGTH_SHORT).show();\n\n }\n if (load != intNoOFDays) {\n getMeals(getDateString(date));\n } else {\n getDateString(date);\n SetAdapter_list(check_day_index);\n }\n // Toast.makeText(getContext(), \"\"+position+\" \"+getDateString(date), Toast.LENGTH_SHORT).show();\n\n }\n });\n\n\n // GetMeals();\n\n btn_select_meal.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n if (AllCheck()) {\n daysselectCategory[check_day_index] = selectCategory;\n if (!menuSelectDayCheck[check_day_index]) {\n menuSelectDayCheck[check_day_index] = true;\n size++;\n }\n\n if (size == intNoOFDays) {\n Bundle bundle = getArguments();\n bundle.putSerializable(\"Cat_List\", daysselectCategory);\n fragmentContact.ChangeFragment(\"FullMealDetailFragment\", bundle);\n } else {\n Toast.makeText(getActivity(), \"Please select all days menu!\", Toast.LENGTH_SHORT).show();\n }\n\n } else {\n String msg = \"\";\n if (isFullDayMeal) {\n\n msg = \"Please select 2 item from Salad, MainCourse and Soup\";\n } else\n msg = \"Please select all category!\";\n Toast.makeText(getActivity(), msg, Toast.LENGTH_SHORT).show();\n\n }\n\n }\n });\n\n return view;\n }", "public int getDays(){\r\n\t\treturn days;\r\n\t}", "private static List<LocalDateTime> createEmptyFutureSchedule(int days) {\n List<LocalDateTime> emptySchedule = new ArrayList<>();\n LocalDateTime dateTime = LocalDateTime.now();\n dateTime = dateTime.minusMinutes(dateTime.getMinute());\n dateTime = dateTime.minusSeconds(dateTime.getSecond());\n dateTime = dateTime.minusNanos(dateTime.getNano());\n int delta = Constant.END_WORKING_DAY_HOUR - dateTime.getHour();\n for (int i = 1; i < Constant.HOURS_PER_DAY * days + delta; i++) {\n LocalDateTime timeCell = dateTime.plusHours(i);\n if (timeCell.getHour() < Constant.END_WORKING_DAY_HOUR && timeCell.getHour() >= Constant.START_WORKING_DAY_HOUR && !timeCell.getDayOfWeek().equals(DayOfWeek.SUNDAY)) {\n emptySchedule.add(timeCell);\n }\n }\n return emptySchedule;\n }", "private void initDatePicker() {\n pickDateBox.setDayCellFactory(picker -> new DateCell() {\n public void updateItem(LocalDate date, boolean empty) {\n super.updateItem(date, empty);\n LocalDate today = LocalDate.now();\n\n setDisable(empty || date.compareTo(today) < 0 );\n }\n });\n }", "public Builder byMonthDay(Collection<Integer> monthDays) {\n\t\t\tbyMonthDay.addAll(monthDays);\n\t\t\treturn this;\n\t\t}", "public void setDay(int day) {\r\n this.day = day;\r\n }", "public long getDays() {\r\n \treturn days;\r\n }", "private void initDates() throws RIFCSException {\n NodeList nl = super.getElements(Constants.ELEMENT_DATE);\n\n for (int i = 0; i < nl.getLength(); i++) {\n dates.add(new DateWithTypeDateFormat(nl.item(i)));\n }\n }", "Integer getDaysSpanned();", "public void setDay(int day)\n {\n this.day = day;\n }", "private void getActivatedWeekdays() {\n }", "public void refreshAllRepeatReminderDates(){\n for(int position=0;position<reminderItems.size();position++){\n refreshRepeatReminder(position);\n }\n }", "public static void main(String[] args) {\n LocalDate[] dates=new LocalDate[10];\n\n for (int i = 0; i <dates.length ; i++) {\n dates[i] = LocalDate.now().plusDays(i+1);\n }\n System.out.println(Arrays.toString(dates));\n for (LocalDate each:dates){\n System.out.println(each.format(DateTimeFormatter.ofPattern(\"MMMM/dd, EEEE\")));\n }\n\n\n }", "public void GetAvailableDates()\n\t{\n\t\topenDates = new ArrayList<TimePeriod>(); \n\t\t\n\t\ttry\n\t\t{\n\t\t\tConnector con = new Connector();\n\t\t\t\n\t\t\tString query = \"SELECT startDate, endDate FROM Available WHERE available_hid = '\"+hid+\"'\"; \n\t\t\tResultSet rs = con.stmt.executeQuery(query);\n\t\t\t\n\t\t\twhile(rs.next())\n\t\t\t{\n\t\t\t\tTimePeriod tp = new TimePeriod(); \n\t\t\t\ttp.stringStart = rs.getString(\"startDate\"); \n\t\t\t\ttp.stringEnd = rs.getString(\"endDate\"); \n\t\t\t\ttp.StringToDate();\n\t\t\t\t\n\t\t\t\topenDates.add(tp); \n\t\t\t}\n\t\t\tcon.closeConnection(); \n\t\t}\n\t\tcatch(Exception e)\n\t\t{\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\t}", "public Builder byMonthDay(Integer... monthDays) {\n\t\t\treturn byMonthDay(Arrays.asList(monthDays));\n\t\t}", "public DoctorSchedules(int month, int day, String workHours) {\r\n\t\tsuper();\r\n\t\ttimeAvailable = new ArrayList<String>();\r\n\t\tsetDate(month, day);\r\n\t\tsetWorkHours(workHours);\r\n\t\tsetTime();\r\n\t}", "public void processForDays(){\r\n\t\tboolean inDaySection = false;\r\n\t\tint dataSize;\r\n\t\tfor(int i=0; i<Constant.dataList.size(); i++){\r\n\t\t\tString line = Constant.dataList.get(i);\r\n\t\t\tString[] linesplit = line.split(\",\");\r\n\t\t\tdataSize = linesplit.length;\r\n\t\t\t\r\n\t\t\tif (i==0) {\r\n//\t\t\t\tConstant.dataList.set(i, \"Days,Dummy,\" + line);\r\n\t\t\t\tConstant.dayDataList.add(\"Days,Dummy,\"+linesplit[0]+\",\"+linesplit[1]+\",\"+\"Day00\");\r\n\t\t\t}\r\n\t\t\telse if(linesplit[1].equals(\"PM10\")){\r\n\t\t\t\tString m,a,e,n;\r\n//\t\t\t\tm = \"M,1000,\"+linesplit[0]+\"m,\"+linesplit[1];\r\n//\t\t\t\ta = \"A,1000,\"+linesplit[0]+\"a,\"+linesplit[1];\r\n//\t\t\t\te = \"E,1000,\"+linesplit[0]+\"e,\"+linesplit[1];\r\n//\t\t\t\tn = \"N,1000,\"+linesplit[0]+\"n,\"+linesplit[1];\r\n\t\t\t\t//morning,afternoon,evening\r\n\t\t\t\tfor(int j=0; j<4; j++){\r\n\t\t\t\t\tfor(int k=0; k<2; k++){\r\n\t\t\t\t\t\tif(j==0){\r\n\t\t\t\t\t\t\tif(k+7<dataSize){\r\n//\t\t\t\t\t\t\t\tm = m + \",\" + linesplit[k+7];\r\n\t\t\t\t\t\t\t\tm = \"Morning,1000,\"+linesplit[0]+\"m-\"+k+\",\"+linesplit[1]+\",\"+linesplit[k+7];\r\n\t\t\t\t\t\t\t\tConstant.dayDataList.add(m);\r\n\t\t\t\t\t\t\t}\r\n//\t\t\t\t\t\t\telse{\r\n//\t\t\t\t\t\t\t\tm = m + \",\";\r\n//\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse if(j==1){\r\n\t\t\t\t\t\t\tif(k+13<dataSize){\r\n//\t\t\t\t\t\t\t\ta = a + \",\" + linesplit[k+13];\r\n\t\t\t\t\t\t\t\ta = \"Afternoon,1000,\"+linesplit[0]+\"a-\"+k+\",\"+linesplit[1]+\",\"+linesplit[k+13];\r\n\t\t\t\t\t\t\t\tConstant.dayDataList.add(a);\r\n\t\t\t\t\t\t\t}\r\n//\t\t\t\t\t\t\telse{\r\n//\t\t\t\t\t\t\t\ta = a + \",\";\r\n//\t\t\t\t\t\t\t}\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse if(j==2){\r\n\t\t\t\t\t\t\tif(k+19<dataSize){\r\n//\t\t\t\t\t\t\t\te = e + \",\" + linesplit[k+19];\r\n\t\t\t\t\t\t\t\te = \"Evening,1000,\"+linesplit[0]+\"e-\"+k+\",\"+linesplit[1]+\",\"+linesplit[k+19];\r\n\t\t\t\t\t\t\t\tConstant.dayDataList.add(e);\r\n\t\t\t\t\t\t\t}\r\n//\t\t\t\t\t\t\telse{\r\n//\t\t\t\t\t\t\t\te = e + \",\";\r\n//\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse{\r\n\t\t\t\t\t\t\tif(k<1){\r\n\t\t\t\t\t\t\t\tif(k+25<dataSize){\r\n//\t\t\t\t\t\t\t\t\tn = n + \",\" +linesplit[k+25];\r\n\t\t\t\t\t\t\t\t\tn = \"Night,1000,\"+linesplit[0]+\"n-\"+k+\",\"+linesplit[1]+\",\"+linesplit[k+25];\r\n\t\t\t\t\t\t\t\t\tConstant.dayDataList.add(n);\r\n\t\t\t\t\t\t\t\t}\r\n//\t\t\t\t\t\t\t\telse{\r\n//\t\t\t\t\t\t\t\t\tn = n + \",\";\r\n//\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\telse{\r\n\t\t\t\t\t\t\t\tif(k+1<dataSize){\r\n//\t\t\t\t\t\t\t\t\tn = n + \",\" +linesplit[k+1];\r\n\t\t\t\t\t\t\t\t\tn = \"Night,1000,\"+linesplit[0]+\"n-\"+k+\",\"+linesplit[1]+\",\"+linesplit[k+1];\r\n\t\t\t\t\t\t\t\t\tConstant.dayDataList.add(n);\r\n\t\t\t\t\t\t\t\t}\r\n//\t\t\t\t\t\t\t\telse{\r\n//\t\t\t\t\t\t\t\t\tn = n + \",\";\r\n//\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n//\t\t\t\t\tif(j==0){\r\n//\t\t\t\t\t\tConstant.dayDataList.add(m);\r\n//\t\t\t\t\t}\r\n//\t\t\t\t\telse if(j==1){\r\n//\t\t\t\t\t\tConstant.dayDataList.add(a);\r\n//\t\t\t\t\t}\r\n//\t\t\t\t\telse if(j==2){\r\n//\t\t\t\t\t\tConstant.dayDataList.add(e);\r\n//\t\t\t\t\t}\r\n//\t\t\t\t\telse{\r\n//\t\t\t\t\t\tConstant.dayDataList.add(n);\r\n//\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\t\r\n\t\t}\r\n\t}", "public void getoptions() {\n if (mydatepicker.getValue() != null) {\n ObservableList<String> options1 = FXCollections.observableArrayList(\n \"09:00\",\n \"09:30\",\n \"10:00\",\n \"10:30\",\n \"11:00\",\n \"11:30\",\n \"12:00\",\n \"12:30\",\n \"13:00\",\n \"13:30\",\n \"14:00\",\n \"14:30\"\n );\n ObservableList<String> options2 = FXCollections.observableArrayList(\n \"09:00\",\n \"09:30\",\n \"10:00\",\n \"10:30\",\n \"11:00\"\n );\n ObservableList<String> options3 = FXCollections.observableArrayList(\"NOT open on Sunday\");\n\n int a = mydatepicker.getValue().getDayOfWeek().getValue();\n if (a == 7) {\n time_input.setItems(options3);\n } else if (a == 6) {\n time_input.setItems(options2);\n } else {\n time_input.setItems(options1);\n }\n }\n }", "public void setTotalDays(Integer totalDays)\r\n/* 73: */ {\r\n/* 74:71 */ this.totalDays = totalDays;\r\n/* 75: */ }", "private void fillTreeView() {\n SimpleDateFormat format = new SimpleDateFormat(\"dd-MM-yyyy\");\n Start.setText(format.format(start));\n End.setText(format.format(end));\n if (makeCalendarByDays()) {\n TreeItem<String> rootItem = new TreeItem<>(\"Root\",null);\n rootItem.setExpanded(true);\n for (Date date: calendarByDays.keySet()) {\n TreeItem<String> day = new TreeItem<>(format.format(date));\n for (Date dateTime : calendar.keySet()) {\n if (date.getTime() <= dateTime.getTime()\n && dateTime.getTime() < (date.getTime() + 3600000 * 24)) {\n for (String task : calendar.get(dateTime)) {\n String taskToPut = task.substring(0, task.indexOf(\", a\"));\n TreeItem<String> taskItem = new TreeItem<>(taskToPut);\n day.getChildren().add(taskItem);\n }\n }\n }\n if (day.getChildren().size() != 0)\n rootItem.getChildren().add(day);\n }\n calendarTreeView.setRoot(rootItem);\n calendarTreeView.setShowRoot(false);\n calendarTreeView.refresh();\n }\n }", "public Calendar getValidDates(Calendar calendar, int days) throws Exception {\r\n\t\tint d = 0;\r\n\t\t\r\n\t\tcalendar.set(Calendar.HOUR, 0);\r\n\t\tcalendar.set(Calendar.MINUTE, 0);\r\n\t\tcalendar.set(Calendar.SECOND, 0);\r\n\t\t\r\n\t\twhile (d <= days) {\r\n\t\t\tPagedList<Feriado> feriados = configureBasicFilter(calendar);\r\n\r\n\t\t\tif (feriados.getTotal() > 0) {\r\n\t\t\t\tcalendar.add(Calendar.DAY_OF_MONTH, 1);\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\tif (calendar.get(Calendar.DAY_OF_WEEK) > 1 && calendar.get(Calendar.DAY_OF_WEEK) < 7) {\r\n\t\t\t\td++;\r\n\t\t\t\tif(d <= days)\r\n\t\t\t\t\tcalendar.add(Calendar.DAY_OF_MONTH, 1);\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t\tcalendar.add(Calendar.DAY_OF_MONTH, 1);\r\n\t\t}\r\n\t\t\r\n\t\treturn (Calendar) calendar.clone();\r\n\t}", "public void fillCal(Model i)\n {\n for (int y = 0; y < 6; y++)\n {\n for (int j=0; j< 7; j++)\n {\n tableModel.setValueAt(null, y, j);\n }\n }\n int NumberOfDays = i.getMaxDayOfMonth();\n int DayOfWeek = i.getFdayOfWeek();\n JLabel xCord = new JLabel(String.valueOf(NumberOfDays));\n for (int x = 1; x <= NumberOfDays; x++)\n {\n int row = new Integer((x+ DayOfWeek - 2) / 7);\n int column = (x + DayOfWeek - 2) % 7;\n if(x == i.getDate() && i.getMonth() == i.realMonth())\n {\n String y = \"[\" + x + \"]\";\n tableModel.setValueAt(y, row, column);\n }\n else {\n tableModel.setValueAt(x, row, column);\n }\n }\n }", "@Override\r\n\tpublic int[] getDayPeople() {\n\t\tint[] result = new int[7];\r\n\t\tDate date = DateUtil.getCurrentDate();\r\n\t\tresult[0] = cinemaConditionDao.getDayCount(date);\r\n\t\tfor(int i=0;i<6;i++){\r\n\t\t\tdate = DateUtil.getDayBefore(date);\r\n\t\t\tresult[i+1] = cinemaConditionDao.getDayCount(date);\r\n\t\t}\r\n\t\treturn result;\r\n\t}", "private void setUpCalRecyclerView() {\n dates = new ArrayList<>();\n\n\n Query query = calTaskRef.whereEqualTo(\"m_Privacy\", \"Private\");\n\n tasks = new FirestoreRecyclerOptions.Builder<Task>()\n .setQuery(query, Task.class)\n .build();\n\n db.collection(\"Task\").whereEqualTo(\"m_Privacy\", \"Private\")\n .get()\n .addOnCompleteListener(new OnCompleteListener<QuerySnapshot>() {\n @Override\n public void onComplete(@NonNull com.google.android.gms.tasks.Task<QuerySnapshot> task) {\n if (task.isSuccessful()) {\n if (task.getResult() != null) {\n List<Task> tasks = task.getResult().toObjects(Task.class);\n for (Task dbDate : tasks) {\n //Get date from firebase\n //Set date to CalendarDay\n dates.add(CalendarDay.from(dbDate.getM_DueDate().getTime()));\n calendarView.addDecorator(new DayViewDecorator() {\n @Override\n public boolean shouldDecorate(CalendarDay day) {\n return dates.contains(day);\n }\n @Override\n public void decorate(DayViewFacade view) {\n view.setBackgroundDrawable(ContextCompat.getDrawable(getContext(),R.drawable.logo));\n }\n });\n }\n }\n }else {\n Toast.makeText(getActivity(), \"Error getting documents.\" + task.getException(), Toast.LENGTH_SHORT).show();\n }\n }\n });\n }", "public int getDays() {\n return this.days;\n }", "@Override\n public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {\n Spinner spinner = (Spinner) parent;\n if(spinner.getId() == R.id.spinner) { //after a item is selected from the product drop down list,\n List<String> dates = new ArrayList<>(product_list.size()); //dates : options to set expiry date\n\n //an if statement is made since the sample size is only 2, \n //with larger sample sizes it would be a good idea to create a for loop.\n if (position == 0) { //if milk was selected,\n product_name = (product_list.get(0)).getProduct_name();\n Product object = product_list.get(0); //then the selected object will be recorded as milk\n dates.add(Integer.toString(object.getProduct_exp())); //and the expiry date is set to the default of milk\n } else { //if bread it selected\n\n product_name = (product_list.get(1)).getProduct_name();\n Product object = product_list.get(1);//then the selected object will be recorded as bread\n dates.add(Integer.toString(object.getProduct_exp()));//and the expiry date is set to the default of bread\n }\n\n //below are the options to select for te expiry date\n //again manual done, but a for loop would have been better in case the number of options change.\n dates.add(\"1\");\n dates.add(\"2\");\n dates.add(\"3\");\n dates.add(\"4\");\n dates.add(\"5\");\n dates.add(\"6\");\n dates.add(\"7\");\n\n //a drop down view is used as the layout for the spinner\n ArrayAdapter<String> adapter = new ArrayAdapter<String>(this, android.R.layout.simple_spinner_item, dates);\n adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n //the view for the spinner for the expiry date is used to display\n list = (Spinner) findViewById(R.id.spinner_day);\n list.setAdapter(adapter);\n }\n else if(spinner.getId() == R.id.spinner_day){//after the number of day(s) is selected from the expiry date drop down list,\n expiry_date=position; //that number is set to the user's desired expiry date.\n }\n }", "public static Date[] getCurrentWeekInDates(){\n\t\t Date FromDate=new Date();\n\t\t Date ToDate=new Date();\n\n\t\t int i = 1; \n\t\t while(i <= 7){\n\t\t \n\t\t Date CurDate = DateUtils.addDays(new Date(), i * (-1));\n\t\t \n\t\t Calendar cal = Calendar.getInstance();\n\t\t cal.setTime(CurDate);\n\t\t \n\t\t int DayOfWeek = cal.get(Calendar.DAY_OF_WEEK);\n\t\t \n\t\t if(DayOfWeek == 6){\n\t\t ToDate = CurDate;\n\t\t }\n\t\t \n\t\t if(DayOfWeek == 7){\n\t\t \n\t\t FromDate = CurDate;\n\t\t \n\t\t break;\n\t\t }\n\t\t \n\t\t i++;\n\t\t \n\t\t }// end while\n\t\t \n\t\t \n\t\t Date temp[] = new Date[2];\n\t\t temp[0] = FromDate;\n\t\t temp[1] = ToDate;\n\t\t \n\t\t return temp;\n\t\t \n\t}", "private void generateDefaultTimeSlots() {\n\t\tLocalTime startTime = LocalTime.of(9, 0); // 9AM start time\n\t\tLocalTime endTime = LocalTime.of(19, 0); // 5PM end time\n\n\t\tfor (int i = 1; i <= 7; i++) {\n\t\t\tList<Timeslot> timeSlots = new ArrayList<>();\n\t\t\tLocalTime currentTime = startTime.plusMinutes(15);\n\t\t\twhile (currentTime.isBefore(endTime) && currentTime.isAfter(startTime)) {\n\t\t\t\tTimeslot newSlot = new Timeslot();\n\t\t\t\tnewSlot.setTime(currentTime);\n\t\t\t\tnewSlot = timeslotRepository.save(newSlot);\n\t\t\t\ttimeSlots.add(newSlot);\n\t\t\t\tcurrentTime = currentTime.plusHours(1); // new slot after one hour\n\t\t\t}\n\t\t\tDay newDay = new Day();\n\t\t\tnewDay.setTs(timeSlots);\n\t\t\tnewDay.setDayOfWeek(DayOfWeek.of(i));\n\t\t\tdayRepository.save(newDay);\n\t\t}\n\t}", "public void setDay(Day day, int dayNum) {\n\t\tif (dayNum <= days.length) {\n\t\t\tdays[dayNum - 1] = day;\n\t\t}\n\t}", "public static void fillArray() {\r\n\t\tfor (int i = 0; i < myOriginalArray.length - 1; i++) {\r\n\t\t\tRandom rand = new Random();\r\n\t\t\tmyOriginalArray[i] = rand.nextInt(250);\r\n\t\t}\r\n\t\t// Copies original array 4 times for algorithm arrays\r\n\t\tmyBubbleArray = Arrays.copyOf(myOriginalArray, myOriginalArray.length);\r\n\t\tmySelectionArray = Arrays.copyOf(myOriginalArray, myOriginalArray.length);\r\n\t\tmyInsertionArray = Arrays.copyOf(myOriginalArray, myOriginalArray.length);\r\n\t\tmyQuickArray = Arrays.copyOf(myOriginalArray, myOriginalArray.length);\r\n\t}" ]
[ "0.6945343", "0.67848134", "0.64677143", "0.6435846", "0.62859553", "0.6206987", "0.61690444", "0.6143989", "0.604144", "0.6023553", "0.59792244", "0.5950047", "0.5874162", "0.5851062", "0.5758694", "0.5721984", "0.57008165", "0.5698366", "0.56473464", "0.5596389", "0.5583019", "0.55503374", "0.5504331", "0.55035174", "0.5491892", "0.54491436", "0.5415685", "0.5407969", "0.5398486", "0.53922987", "0.5362099", "0.53556144", "0.53441477", "0.5333087", "0.5313637", "0.52925926", "0.5283349", "0.5256657", "0.52275836", "0.52271515", "0.5211116", "0.5208231", "0.519742", "0.5187184", "0.5182615", "0.517725", "0.5171637", "0.5167629", "0.5154206", "0.5149654", "0.5138822", "0.5135291", "0.5112945", "0.51054525", "0.50864327", "0.50794977", "0.5040812", "0.5039489", "0.5016517", "0.50113857", "0.5011", "0.5005665", "0.50055814", "0.49886334", "0.4987855", "0.49693075", "0.4968193", "0.49621293", "0.49588758", "0.49339515", "0.49107575", "0.48885274", "0.48771617", "0.4876755", "0.48590472", "0.4857486", "0.4848675", "0.48415735", "0.4839197", "0.48384738", "0.4833652", "0.48326316", "0.47959363", "0.4789962", "0.47866586", "0.4785871", "0.47637063", "0.47446704", "0.47257873", "0.47226268", "0.47170606", "0.47035554", "0.46895495", "0.46881813", "0.46812677", "0.46770403", "0.46745202", "0.46709526", "0.467069", "0.46632624" ]
0.5354981
32