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 |
---|---|---|---|---|---|---|
Helper method to write the given data on the TCP/IP socket. A Toast is created on the android screen if the socket is connected.
|
private void sendData(String data) {
if (!socket.isConnected() || socket.isClosed()) {
Toast.makeText(getApplicationContext(), "Joystick is disconnected...",
Toast.LENGTH_LONG).show();
return;
}
try {
OutputStream outputStream = socket.getOutputStream();
byte [] arr = data.getBytes();
byte [] cpy = ByteBuffer.allocate(arr.length+1).array();
for (int i = 0; i < arr.length; i++) {
cpy[i] = arr[i];
}
//Terminating the string with null character
cpy[arr.length] = 0;
outputStream.write(cpy);
outputStream.flush();
Log.d(TAG, "Sending data " + data);
} catch (IOException e) {
Log.e(TAG, "IOException while sending data "
+ e.getMessage());
e.printStackTrace();
} catch (NullPointerException e) {
Log.e(TAG, "NullPointerException while sending data "
+ e.getMessage());
}
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"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 }",
"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 }",
"public void sendPacket(String data) throws IOException {\n\n BufferedWriter out = new BufferedWriter(new OutputStreamWriter(socket.getOutputStream()));\n out.write(data + \"\\0\");\n out.flush();\n }",
"public void writeToSocket(byte[] bytes) {\n\n try {\n outStream = socket.getOutputStream();\n } catch (IOException e) {\n Log.e(\"tag\", \"Error occurred when creating output stream\", e);\n }\n\n try {\n outStream.write(bytes);\n\n } catch (IOException e) {\n Log.e(\"tag\", \"Error occurred when sending data\", e);\n }\n }",
"public boolean write(String data) throws IOException\n\t{\n\t\treturn this.write(this.socket, data);\n\t}",
"private void write(String msg) throws IOException {\n if (connectedSwitch) {\n outStream.writeBytes(msg + \";\");\n outStream.flush();\n } else {\n Log.e(TAG, \"Socket disconnected\");\n }\n }",
"public void writePacket(DataOutputStream dataOutputStream) throws IOException;",
"private void sendSocket(String data) {\n if (!serviceStartNormalMethod) {\n pingStamp = System.currentTimeMillis();\n }\n\n if (ctrlSocketBufferOut != null && !ctrlSocketBufferOut.checkError() && ctrlSocketThreadState == SocketThreadStates.RUNNING) {\n ctrlSocketBufferOut.println(data);\n ctrlSocketBufferOut.flush();\n }\n\n if (ctrlSocketBufferOut != null && ctrlSocketBufferOut.checkError()) {\n // conn manager thread will re-connect us\n ctrlSocketThreadState = SocketThreadStates.ERROR;\n broadcastConnectionStatus();\n }\n }",
"public synchronized void writeToSocket(String msg) {\n try {\n bluetoothSocket.getOutputStream().println(msg);\n } catch (Exception e) {\n Log.e(TAG, General.OnWriteToSocketFailed, e);\n }\n }",
"public synchronized void writeNow(String data){\n\t\tlog.debug(\"[SC] Writing now unencrypted - \"+data, 4);\n\t\tif(out!=null){\n\t\t\ttry {\n\t\t\t\tif(!data.endsWith(\"\\n\")){\n\t\t\t\t\tdata = data + \"\\n\";\n\t\t\t\t}\n\t\t\t\tout.write(data.getBytes());\n\t\t\t\tout.flush();\n\t\t\t} catch (IOException e) {\n\t\t\t\tlog.error(\"[SC] Could not write to socket\");\n\t\t\t}\t\n\t\t}else{\n\t\t\tlog.error(\"[SC] Could not write to socket\");\n\t\t}\n\t}",
"public boolean sendData(String data) throws IOException;",
"public void sendData(byte[] data) {\r\n\t\t//send packet\r\n\t\ttry {\r\n\t\t\tout.write(data);\r\n\t\t} catch(IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}",
"public void send(final String data) throws IOException {\r\n\t\t//Writes the packet as a byte buffer, using the data from the packet and converting in to bytes\r\n\t\t//Adds an end-of-packet footer to the data\r\n\t\tif(channel.isConnected()) {\r\n\t\t\tchannel.write(ByteBuffer.wrap((data + \"%EOP%\").getBytes()));\r\n\t\t}\r\n\t}",
"public void send_data(int curr_portNo, String data_send) {\n\t\ttry {\n\t\t\tSocket baseSocket = new Socket(Content_Provider.ipAdd, curr_portNo);\n\t\t\tPrintWriter toPeer = new PrintWriter(new BufferedWriter(\n\t\t\t\t\tnew OutputStreamWriter(baseSocket.getOutputStream())), true);\n\t\t\ttoPeer.println(data_send);\n\t\t\tbaseSocket.close();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"public void sendMsgToClient() {\n\n try {\n\n writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(socket.getOutputStream())), true);\n\n Log.d(TAG, \"The transmitted data:\" + msg);\n\n writer.println(msg);\n\n } catch (Exception e) {\n\n e.printStackTrace();\n\n }\n\n }",
"public void write(byte[] bytes) {\n try {\n mmOutStream.write(bytes);\n\n // Share the sent message with the UI activity.\n /*Message writtenMsg = handler.obtainMessage(\n MessageConstants.MESSAGE_WRITE, -1, -1, mmBuffer);\n writtenMsg.sendToTarget();*/\n } catch (IOException e) {\n Log.e(TAG, \"Error occurred when sending data\", e);\n\n // Send a failure message back to the activity.\n /*Message writeErrorMsg =\n handler.obtainMessage(MessageConstants.MESSAGE_TOAST);\n Bundle bundle = new Bundle();\n bundle.putString(\"toast\",\n \"Couldn't send data to the other device\");\n writeErrorMsg.setData(bundle);\n handler.sendMessage(writeErrorMsg);*/\n }\n }",
"public boolean write(Socket socket, String data) throws IOException\n\t{\n\t\tif(socket.isConnected() && !socket.isClosed())\n\t\t{\n\t\t\tString hdr = \"\";\n\t\t\tthis.addRequestHeader(\"Content-Length\", data.length());\n\t\t\tString data2sent = \"\";\n\t\t\tif(!this.requestHeader.isEmpty())\n\t\t\t{\n\t\t\t\t Set<Map.Entry<String, String>> entrySet = this.requestHeader.entrySet();\n\t\t\t\t for(Entry<String, String> entry : entrySet) \n\t\t\t\t {\n\t\t\t\t hdr = entry.getKey().toString().trim()+\": \"+entry.getValue().toString().trim()+\"\\r\\n\";\n\t\t\t\t data2sent += hdr;\n\t\t\t\t }\n\t\t\t}\n\t\t\tdata2sent += \"\\r\\n\";\n\t\t\tdata2sent += data;\n\t\t\tsocket.getOutputStream().write(data2sent.getBytes());\n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t}",
"@Override\n public synchronized void send(byte[] data) throws SocketException {\n try {\n connectionSocket.getOutputStream().write(data);\n connectionSocket.getOutputStream().flush();\n connectionSocket.close();\n } catch (IOException ex) {\n Logger.getLogger(TCPServer.class.getName()).log(Level.SEVERE, null, ex);\n }\n }",
"private void writeData(Socket s, String cmd){\n\t\ttry {\n\t\t\tDataOutputStream dos = new DataOutputStream(s.getOutputStream());\n\t\t\tdos.writeUTF(cmd);\n\t\t} catch (Exception e) {\n\t\t\tJOptionPane.showMessageDialog(main, e.getMessage(), \"Error\", JOptionPane.ERROR_MESSAGE);\n\t\t}\n\t}",
"public synchronized boolean write_to_sock(StringBuilder msg){\n\t\t/**\n\t\t * TRY SEND TO SERVER\n\t\t */\n\t\ttry {\n\t\t\tout.print(msg.toString());\n\t\t\tmysock.getOutputStream().flush();\n\t\t\tout.flush();\n\t\t\tSystem.out.println(TAG +\": Tuple injected.\");\n\t\t} catch (IOException ioException) {\n\t\t\tSystem.out.println(TAG + \": I could not connect\");\n\t\t\tsrvDisconnect();\n\t\t\treturn false;\n\t\t} catch (NullPointerException e) {\n\t\t\tSystem.out.println(TAG + \": Null Pointer Exception\");\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}",
"@Override\r\n public void onSendTcp(Object obj) {\n mNetworkManager.sendTCPData(obj);\r\n }",
"public void write(String message) {\n Log.d(TAG, \"...Data to send: \" + message + \"...\");\n byte[] msgBuffer = message.getBytes();\n try {\n mmOutStream.write(msgBuffer);\n } catch (IOException e) {\n Log.d(TAG, \"...Error data send: \" + e.getMessage() + \"...\");\n }\n }",
"public void write(String message) {\n Log.d(TAG, \"...Data to send: \" + message + \"...\");\n byte[] msgBuffer = message.getBytes();\n try {\n mmOutStream.write(msgBuffer);\n } catch (IOException e) {\n Log.d(TAG, \"...Error data send: \" + e.getMessage() + \"...\");\n }\n }",
"@Override\n public void run() {\n if (socket != null) {\n byte b0 = get_sendbyte0();\n byte b1 = get_sendbyte1();\n Log.e(\"handler\", String.valueOf(b0) + String.valueOf(b1));\n if (outputStream == null) {\n try {\n outputStream = socket.getOutputStream();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n try {\n outputStream.write(new byte[]{(byte) 1, b0, b1, (byte) 1}); /*1, b0, b1, 1*/\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n\n\n }",
"@Override\n public void onDataWrite(String deviceName, String data)\n {\n if(mTruconnectHandler.getLastWritePacket().contentEquals(data))\n {\n mTruconnectCallbacks.onDataWritten(data);\n\n String nextPacket = mTruconnectHandler.getNextWriteDataPacket();\n if(!nextPacket.contentEquals(\"\"))\n {\n mBLEHandler.writeData(deviceName, nextPacket);\n }\n }\n else\n {\n mTruconnectCallbacks.onError(TruconnectErrorCode.WRITE_FAILED);\n mTruconnectHandler.onError();\n }\n }",
"public synchronized void write(String data){\n\t\tlog.debug(\"[SC] Writing \"+data, 4);\n\t\twriteBuffer.add(data.getBytes());\n\t}",
"public void onClickSend(View view) {\n //String string = editText.getText().toString();\n //serialPort.write(string.getBytes());\n //tvAppend(txtResponse, \"\\nData Sent : \" + string + \"\\n\");\n }",
"public void write(DataOutputStream out) throws IOException;",
"@Override\n public void write(Data dataPacket) throws IOException {\n }",
"public static void writeToSocket(Socket socket, String writeTo) throws Exception {\n try {\n BufferedWriter bufferedWriter = new BufferedWriter(new OutputStreamWriter(socket.getOutputStream()));\n bufferedWriter.write(writeTo);\n bufferedWriter.flush();\n BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(socket.getInputStream()));\n StringBuilder sb = new StringBuilder();\n while (true) {\n String str = bufferedReader.readLine();\n if (str != null) {\n sb.append(str + \"\\n\");\n } else {\n Log.d(BBLogger.APP_LOG_FLAG, sb.toString());\n bufferedReader.close();\n return;\n }\n }\n } catch (IOException e) {\n e.printStackTrace();\n throw e;\n }\n }",
"public void write(byte[] data) throws IOException {\r\n try {\r\n os.write(data);\r\n } catch (IOException io) {\r\n if (!cbImpl.checkMobileNetwork()) {\r\n throw new WrapperIOException(new TransportException(io.getMessage(), io,\r\n TransportException.NO_NETWORK_COVERAGE));\r\n }\r\n throw io;\r\n }\r\n }",
"public abstract void writeToStream(DataOutputStream dataOutputStream);",
"public void ChatNetworking(String _host, boolean pickTCP, boolean pickUDP){\r\n \r\n host = _host; \r\n //I'm not sure if I understand Chat Networking method's requirement on our document because it isn't that clear as I thought\r\n try{\r\n \r\n cs = new Socket(\"hostname\", 16789); \r\n input = new BufferedReader(new InputStreamReader(cs.getInputStream())); \r\n output = new PrintWriter(new OutputStreamWriter(cs.getOutputStream())); \r\n //I'm not sure how to use TCP DataOutputSTream to create a socket. That means DataOutputStream replace PrintWriter?\r\n DataOutputStream out = new DataOutputStream(cs.getOutputStream()); \r\n \r\n System.out.println(\"getLocalHost: \"+InetAddress.getLocalHost() );\r\n \r\n \r\n }\r\n catch (UnknownHostException uhe){\r\n jtaMsgReceived.setText(\"Unable to connect the host\"); \r\n return;\r\n }\r\n catch (IOException ioe){\r\n jtaMsgReceived.setText(\"Communication lost\"); \r\n return; \r\n }\r\n \r\n }",
"private void sendDataMsgToClient(String msg) {\n if (dataConnection == null || dataConnection.isClosed()) {\n sendMsgToClient(\"425 No data connection was established\");\n debugOutput(\"Cannot send message, because no data connection is established\");\n } else {\n dataOutWriter.print(msg + '\\r' + '\\n');\n }\n\n }",
"public synchronized void sendData(PrintWriter stream){\r\n\t\t\tstream.println(\"3\");\r\n\t\t\tstream.println(Integer.toString(x));\r\n\t\t\tstream.println(Integer.toString(y));\r\n\t\t\tstream.println(Integer.toString(health));\r\n\t\t\tstream.println(Integer.toString(level));\r\n\t\t}",
"public void write(String input) {\n byte[] msgBuffer = input.getBytes(); //converts entered String into bytes\n try {\n mmOutStream.write(msgBuffer); //write bytes over BT connection via outstream\n } catch (IOException e) {\n //if you cannot write, close the application\n Toast.makeText(getBaseContext(), \"Connection Failure\", Toast.LENGTH_LONG).show();\n finish();\n }\n }",
"public void sendData(byte[] data) {\n\t\tDatagramPacket packet = new DatagramPacket(data, data.length, ipAddress, serverPort);\n\n\t\ttry {\n\t\t\tsocket.send(packet);\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"public void onSend(View v){\n Socket msocket;\n try {\n msocket = IO.socket(\"http://10.0.2.2:9080/\");\n } catch (Exception e) {\n throw new RuntimeException(e);\n }\n //msocket=cApp.getSocket();\n msocket.connect();\n msocket.emit(\"sendTest\",\"fkg\");\n msocket.on(\"sendTest\",onSendTest);\n }",
"void send(ByteBuffer data, Address addr) throws CCommException, IllegalStateException;",
"@Override\r\n public void sendData(byte[] buffer, int bytes) {\r\n try {\r\n mOutputStream.write(buffer, 0, bytes);\r\n } catch (IOException ioe) {\r\n Log.e(Common.TAG, \"Error sending data on socket: \" + ioe.getMessage());\r\n cancel();\r\n mPeer.communicationErrorOccured();\r\n }\r\n }",
"public void onClickSend(View view) {\n String string = editText.getText().toString();\n serialPort.write(string.getBytes());\n tvAppend(textView, \"\\nData Sent : \" + string + \"\\n\");\n\n }",
"private void writeData(String data) throws IOException\n {\n this.writer.println(data);\n this.writer.flush();\n }",
"public void writeTcpMessage(String message) {\n\t\tm_tcpSession.write(message);\n\t}",
"private void send(final String data) {\n\t\tif (null != PinPadController) {\n\t\t\tnew Thread() {\n\t\t\t\tpublic void run() {\n\t\t\t\t\tPinPadController.PINPad_sendToPinPad(data);\n\t\t\t\t};\n\t\t\t}.start();\n\t\t\tToast.makeText(this, \"send\", Toast.LENGTH_SHORT).show();\n\t\t}\n\t}",
"public void writeData(final Socket id) throws IOException {\r\n final byte[] dataRep = getDataRep();\r\n COPSUtil.writeData(id, dataRep, dataRep.length);\r\n }",
"public abstract void SendData(int sock, String Data) throws LowLinkException, TransportLayerException, CommunicationException;",
"private void sendPacket(InetAddress address, byte[] data) {\n try {\n send.setAddress(address);\n send.setData(Encryption.encrypt(data));\n socket.send(send);\n } catch (Exception e) {\n e.printStackTrace();\n }\n }",
"@Override\n\tpublic void sendData(int type, byte[] data) {\n\t\t\n\t}",
"public boolean send(NetData data)\n {\n writer.println(data.toString());\n xMessenger.miniMessege(\">>>\"+ data.toString());\n return true;\n }",
"public void sendData(String message) {\n if (asyncClient != null) {\n asyncClient.write(new ByteBufferList(message.getBytes()));\n Timber.d(\"Data sent: %s\", message);\n } else {\n Timber.e(\"cannot send data - socket not yet ready\");\n }\n }",
"@Override\n\tpublic void sendData(CharSequence data) {\n\t\t\n\t}",
"public boolean sendData(String data, String prefix) throws IOException;",
"public void sendDataToESP(String data){\n\n\n URL remoteurl = null;\n String baseurl = \"http://\"+IpAddress+\"/\";\n String urlString = baseurl + data;\n System.out.println(urlString);\n try {\n remoteurl = new URL(urlString);\n } catch (MalformedURLException e) {\n e.printStackTrace();\n }\n new AutoActivity.pingit().execute(remoteurl);\n }",
"void send(ByteBuffer data) throws CCommException, IllegalStateException;",
"private void EnviarDatos(String data) \n {\n\n try \n {\n Output.write(data.getBytes());\n\n } catch (IOException e) {\n\n System.exit(ERROR);\n }\n }",
"public static void writeUTF(DataOutputStream dos,String data) throws IOException{\r\n\t\tif(data != null){\r\n\t\t\tdos.writeBoolean(true);\r\n\t\t\tdos.writeUTF(data);\r\n\t\t}\r\n\t\telse\r\n\t\t\tdos.writeBoolean(false);\r\n\t}",
"public void sendData(String data) {\n\t\tIoBuffer buf = IoBuffer.allocate(data.getBytes().length + 10);\n\t\tbuf.put(data.getBytes());\n\t\tbuf.put((byte)0x00);\n\t\tbuf.flip();\n\t\tsendData(buf);\n\t}",
"public void send(byte[] data) throws IOException {\n dataOutput.write(data);\n dataOutput.flush();\n }",
"public void write(byte[] bytes) {\n try {\n OutputStream out = mmSocket.getOutputStream();\n DataOutputStream dataout = new DataOutputStream(out);\n //发送给服务器需要下载的文件和断点\n String temp = new String(bytes, \"utf-8\");\n dataout.writeUTF(temp);\n Log.d(\"whalea\", temp);\n } catch (IOException e) {\n Log.d(\"whalea\", \"写不出的原因:\" + e.getMessage());\n }\n }",
"public void write(byte[] buffer) {\n try {\n String bufferstring=\"a5550100a2\";\n // byte [] buffer03=new byte[]{(byte) 0xa5, Byte.parseByte(\"ffaa\"),0x01,0x00, (byte) 0xa2};\n byte buffer01[]=bufferstring.getBytes();\n byte [] buffer02=new byte[]{(byte) 0xa5,0x55,0x01,0x00, (byte) 0xa2};\n\n\n //for(int i=0;i<100000;i++) {\n mmOutStream.write(buffer);\n // Thread.sleep(1000);\n //}\n //\n //Share the sent message back to the UI Activity\n// mHandler.obtainMessage(BluetoothChat.MESSAGE_WRITE, -1, -1, buffer)\n// .sendToTarget();\n } catch (Exception e) {\n Log.e(TAG, \"Exception during write\", e);\n }\n }",
"public void sendData(byte[] data){\n try {\n if (mDatagramSocket == null){\n Log.d(Constants.LOG_TAG, \"datagram socket not initialized yet\");\n return;\n }\n\n if (mDatagramSocket.isClosed())\n {\n Log.d(Constants.LOG_TAG, \"datagram socket closed\");\n return;\n }\n\n DatagramPacket datagramPacket = new DatagramPacket(data, data.length, mClientAddress, mPort);\n mDatagramSocket.send(datagramPacket);\n\n } catch (IOException e) {\n e.printStackTrace();\n } catch (Exception e)\n {\n e.printStackTrace();\n }\n }",
"void write(PacketConnection connection);",
"public abstract void write (DataOutputStream outStream)\r\n throws IOException;",
"protected void write(byte[] bytes, int offset, int length) {\n/* 114 */ if (this.socket == null) {\n/* 115 */ if (this.connector != null && !this.immediateFail) {\n/* 116 */ this.connector.latch();\n/* */ }\n/* 118 */ if (this.socket == null) {\n/* 119 */ String msg = \"Error writing to \" + getName() + \" socket not available\";\n/* 120 */ throw new AppenderLoggingException(msg);\n/* */ } \n/* */ } \n/* 123 */ synchronized (this) {\n/* */ try {\n/* 125 */ getOutputStream().write(bytes, offset, length);\n/* 126 */ } catch (IOException ex) {\n/* 127 */ if (this.retry && this.connector == null) {\n/* 128 */ this.connector = new Reconnector(this);\n/* 129 */ this.connector.setDaemon(true);\n/* 130 */ this.connector.setPriority(1);\n/* 131 */ this.connector.start();\n/* */ } \n/* 133 */ String msg = \"Error writing to \" + getName();\n/* 134 */ throw new AppenderLoggingException(msg, ex);\n/* */ } \n/* */ } \n/* */ }",
"void writeData(String messageToBeSent) {\n\n try {\n if (clientSocket != null) {\n outputStream = clientSocket.getOutputStream();\n ObjectOutputStream objectOutputStream = new ObjectOutputStream(outputStream);\n objectOutputStream.writeObject(messageToBeSent);\n outputStream.flush();\n }\n\n if (getLog().isDebugEnabled()) {\n getLog().debug(\"Artifact configurations and test cases data sent to the synapse agent successfully\");\n }\n } catch (IOException e) {\n getLog().error(\"Error while sending deployable data to the synapse agent \", e);\n }\n }",
"public void send(ILPacket dataPacket) throws IOException {\n\t\t \n\t\tDatagramPacket packet;\n\t\t\n\t\tbyte[] buffer = dataPacket.getBytes();\n\t\t\n\t\tpacket = new DatagramPacket(buffer, buffer.length, this.group, this.writePort);\n\t\tthis.outSocket.send(packet);\n\t}",
"public boolean send(String data, boolean isbase64){\n\t\t\ttry\n\t\t\t{\n\t\t\t\t\n\t\t\t\t//Write to socket base64 encoded with a newline on end\n\t\t\t\tif (isbase64){\n\t\t\t\t\t//output.write(Base64.encode(arr, Base64.DEFAULT), 0, arr.length);\n\t\t\t\t\toutput.write(new String(Base64.encode(data.getBytes(), Base64.DEFAULT))+\"\\n\");\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t//Or not\n\t\t\t\t\toutput.write(data, 0, data.length());\n\t\t\t\t}\n\t\t\t\t//output.flush();\t\t\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\tcatch (Exception e)\n\t\t\t{\n\t\t\t\tLog.i(_TAG, \"EXCEPTION SEEND\");\n\t\t\t\te.printStackTrace();\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}",
"private void bluetoothSendMsg(String s) {\n byte [] msgOnBuf;\n msgOnBuf = s.getBytes();\n try {\n outStream.write(msgOnBuf);\n } catch (IOException e) {\n Log.d(TAG,\"send message fail!\");\n }\n }",
"@Override\n public void send(byte[] data) throws SocketException {\n DatagramPacket sendPacket = new DatagramPacket(\n data,\n data.length,\n this.lastClientIPAddress,\n this.lastClientPort);\n try {\n serverSocket.send(sendPacket);\n } catch (IOException ex) {\n Logger.getLogger(UDPServer.class.getName()).log(Level.SEVERE, null, ex);\n }\n }",
"native int _writeSerialPort(int port, byte data[]);",
"private void send(final byte[] data, final InetAddress address, final int port) {\n send = new Thread(\"Send\") {\n public void run() {\n DatagramPacket packet = new DatagramPacket(data, data.length, address, port);\n try {\n socket.send(packet);\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n };\n send.start();\n }",
"void sendData() throws IOException\n\t{\n\t}",
"private void sendAnswer(SensorData sensorData, String newValueOfProduct) throws IOException{\n\n /** The IP address and port from client . */\n InetAddress address = sensorData.getAddress();\n int port = sensorData.getPortNummber();\n //increment for check\n String message = newValueOfProduct;\n data = message.getBytes();\n DatagramPacket sendPacket = new DatagramPacket(data, data.length, address, port);\n udpSocket.send(sendPacket);\n }",
"public void connect(String ipAdress, int port) {\n try {\n //Opening socket and making sure you can send data\n socket = new Socket(ipAdress, port);\n OutputStream outputStream = socket.getOutputStream();\n this.printStream = new PrintStream(outputStream);\n Log.i(TAG, \"done connecting\");\n } catch (UnknownHostException e) {\n // TODO Auto-generated catch block\n toast.setText(e.toString());\n toast.show();\n Log.i(TAG, e.toString());\n } catch (IOException e) {\n // TODO Auto-generated catch block\n toast.setText(e.toString());\n toast.show();\n Log.i(TAG, e.toString());\n }\n }",
"public void write(byte[] buffer, int offset, int count) {\n try {\n if(buffer==null){\n Log.w(TAG, \"Can't write to device, nothing to send\");\n return;\n }\n //This would be a good spot to log out all bytes received\n mmOutStream.write(buffer, offset, count);\n if(connectionSuccessful == null){\n connectionSuccessful = false;\n }\n //Log.w(TAG, \"Wrote out to device: bytes = \"+ count);\n } catch (IOException|NullPointerException e) { // STRICTLY to catch mmOutStream NPE\n // Exception during write\n //OMG! WE MUST NOT BE CONNECTED ANYMORE! LET THE USER KNOW\n Log.e(TAG, \"Error sending bytes to connected device!\");\n connectionLost();\n }\n }",
"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 }",
"public void write(byte[] out) {\n if (mSendProcessThread != null)\n mSendProcessThread.write(out);\n else\n Toast.makeText(this, \"send process thread null\", Toast.LENGTH_SHORT).show();\n }",
"@Override\n\tpublic void onNotify(EventData data) {\n\t\tEchoResponseEventData echoData = (EchoResponseEventData) data;\n\t\tSocket connection = echoData.getPacket().getConnection();\n\n\t\ttry {\n\t\t\tDataOutputStream dos = new DataOutputStream(\n\t\t\t\t\tconnection.getOutputStream());\n\t\t\tdos.writeUTF(echoData.getPacket().getMessage());\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}",
"private void connectToServer(String ip)\n {\n try\n {\n if(!ip.equals(\"\"))\n {\n s = new Socket(ip, 3000);\n }\n\n else\n {\n s = new Socket(\"10.0.0.143\", 3000);\n }\n\n output = new BufferedWriter(new OutputStreamWriter(s.getOutputStream()));\n output.write(\"Android Connected\");\n output.flush();\n\n // new CommuTask().execute();\n\n //starting the thread\n communication.start();\n // s.close();\n }\n\n catch(UnknownHostException e)\n {\n e.printStackTrace();\n try {\n s.close();\n } catch (IOException e1) {\n e1.printStackTrace();\n }\n }\n\n catch(IOException e)\n {\n e.printStackTrace();\n try {\n s.close();\n } catch (IOException e1) {\n e1.printStackTrace();\n }\n }\n\n }",
"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 runTcpClient() {\n\t\t\n\t\tint TCP_SERVER_PORT=5050;\n\n\t try {\n\n\t Socket s = new Socket(\"192.168.0.255\", TCP_SERVER_PORT);\n\n\t BufferedReader in = new BufferedReader(new InputStreamReader(s.getInputStream()));\n\n\t BufferedWriter out = new BufferedWriter(new OutputStreamWriter(s.getOutputStream()));\n\n\t //send output msg\n\n\t String outMsg = \"TCP connecting to \" + TCP_SERVER_PORT + System.getProperty(\"line.separator\"); \n\n\t out.write(outMsg);\n\n\t out.flush();\n\n\t Log.i(\"TcpClient\", \"sent: \" + outMsg);\n\n\t //accept server response\n\n\t String inMsg = in.readLine() + System.getProperty(\"line.separator\");\n\t \n\t textView.append(inMsg);\n\n\t Log.i(\"TcpClient\", \"received: \" + inMsg);\n\n\t //close connection\n\n\t s.close();\n\n\t } catch (UnknownHostException e) {\n\n\t e.printStackTrace();\n\n\t } catch (IOException e) {\n\n\t e.printStackTrace();\n\n\t } \n\n\t}",
"@Override\n\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\tmConnectedThread.write(\"send\");\n\t\t\t\t\tmConnectedThread.writeFile();\n\t\t\t\t}",
"public void write(String message) {\n\t Log.d(TAG, \"...Данные для отправки: \" + message + \"...\");\n\t byte[] msgBuffer = message.getBytes();\n\t try {\n\t mmOutStream.write(msgBuffer);\n\t } catch (IOException e) {\n\t Log.d(TAG, \"...Ошибка отправки данных: \" + e.getMessage() + \"...\"); \n\t }\n\t }",
"@Override\n\tpublic void showByteWrite(ByteBuffer data)\n\t{\n\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}",
"public void packetSent(NIOSocket socket, Object tag)\n {\n }",
"public TicTacToeSendInterface(Socket socket) throws IOException {\n\t\tthis.socket = socket;\n\t\tthis.writer = new OutputStreamWriter(this.socket.getOutputStream(),\n\t\t\t\tCharset.forName(\"US-ASCII\"));\n\t}",
"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}",
"public abstract int writeData(int address, byte[] buffer, int length);",
"@Override\n public void stream(T data) {\n channel.write(new DataMessage<>(data));\n }",
"public static void sendData(String message) {\n try // send object to server\n {\n output.writeObject(message);\n output.flush(); // flush data to output\n displayMessage(\"\\nSend to Server:\");\n displayMessage(\"\\n\" + message);\n } // end try\n catch (IOException ioException) {\n displayArea.append(\"\\nError writing object\");\n } // end catch\n }",
"public void send(byte[] data, InetAddress address, int port) {\n\t\t\n\t\tDatagramPacket sendingPacket = new DatagramPacket(data, data.length, address, port);\n\t\t\n\t\ttry {\n\t\t\tmainSocket.send(sendingPacket);\n\t\t}\n\t\tcatch(PortUnreachableException ex) {\n\t\t\t\n\t\t\tSystem.out.println(\"PortUnreachableException caught in server side.\\n Unable to send packet\\n\");\n\t\t\tex.printStackTrace();\n\t\t}\n\t\tcatch (IOException ex) {\n\t\t\t\n\t\t\tSystem.out.println(\"2. IOException Caught in server side.\\n Unable to send packet\\n\");\n\t\t\tex.printStackTrace();\n\t\t}\n\t\t\n\t}",
"private native static int shout_send(long shoutInstancePtr, byte[] data, int setDataLength);",
"public void run(){\n\t\t\t\tDatagramPacket packet = new DatagramPacket(data,data.length, ip, port);\n\t\t\t\ttry {\n\t\t\t\t\tsocket.send(packet);\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}",
"public void send(final byte[] data) {\n\t\tsend = new Thread(\"Send\") {\n\t\t\t// anaonymous class prevents us from making new class that implemtents Runnable\n\t\t\tpublic void run(){\n\t\t\t\tDatagramPacket packet = new DatagramPacket(data,data.length, ip, port);\n\t\t\t\ttry {\n\t\t\t\t\tsocket.send(packet);\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t};\n\t\tsend.start();\n\t}",
"public void SendData(final String data) throws ClientIsDisconnectedException, OutgoingPacketFailedException\n {\n final byte[] bytes = data.getBytes(fMyListener.getCharset());\n SendData(bytes, 0, bytes.length);\n }",
"protected final synchronized boolean send(final Object data, final Commands overWrite) {\n\t\ttry {\n\t\t\t// verificamos si la conexion esta cerrada\n\t\t\tif (this.getConnection().isClosed())\n\t\t\t\t// retornamos false\n\t\t\t\treturn false;\n\t\t\t// mostramos un mensaje\n\t\t\tthis.getLogger().debug((data instanceof Commands || overWrite != null ? \"<<= \" : \"<<< \") + (overWrite != null ? overWrite : data));\n\t\t\t// verificamos si es un comando\n\t\t\tif (!this.getLocalStage().equals(Stage.POST) && data instanceof Commands || overWrite != null)\n\t\t\t\t// almacenamos el ultimo comando enviado\n\t\t\t\tthis.lastCommand = overWrite != null ? overWrite : (Commands) data;\n\t\t\t// enviamos el dato\n\t\t\tthis.getOutputStream().writeObject(data);\n\t\t\t// escribimos el dato\n\t\t\tthis.getOutputStream().flush();\n\t\t} catch (final IOException e) {\n\t\t\t// mostramos el trace\n\t\t\tthis.getLogger().error(e);\n\t\t\t// retornamos false\n\t\t\treturn false;\n\t\t}\n\t\t// retornamos true\n\t\treturn true;\n\t}",
"public abstract boolean send(byte[] data);",
"private void sendSocket()\n {\n InputStreamReader reader = null;\n BufferedReader bufferreader = null;\n Socket socket = null;\n try{\n socket = new Socket(address, port);\n OutputStream outputstream = socket.getOutputStream();\n DataOutputStream dataOutputStream = new DataOutputStream(outputstream);\n OutputStreamWriter outputStreamWriter = new OutputStreamWriter(dataOutputStream);\n String tem_msg = \"\";\n if(SEND_FILE==0)\n {\n tem_msg = original_name;\n }\n tem_msg = tem_msg+msg;\n// outputstream.write(msg.getBytes());\n// outputstream.flush();\n //dataOutputStream.writeUTF(msg);\n //dataOutputStream.flush();\n outputStreamWriter.write(tem_msg);\n outputStreamWriter.flush();\n //DataInputStream dataInputStream = new DataInputStream(socket.getInputStream());\n //InputStreamReader inputStreamReader = new InputStreamReader(dataInputStream);\n //dataOutputStream.close();\n socket.shutdownOutput();\n\n InputStream inputstream = socket.getInputStream();\n reader = new InputStreamReader(inputstream);\n bufferreader = new BufferedReader(reader);\n String tem = null;\n final StringBuffer stringb = new StringBuffer();\n while((tem=bufferreader.readLine())!=null){\n stringb.append(tem);\n }\n sendMsg(msg_what, stringb.toString());\n dataOutputStream.flush();\n dataOutputStream.close();\n socket.close();\n inputstream.close();\n }catch(UnknownHostException e){\n e.printStackTrace();\n }catch(IOException e){\n e.printStackTrace();\n }finally {\n try{\n if(bufferreader!=null)\n bufferreader.close();\n }catch(IOException ex){\n ex.printStackTrace();\n }\n }\n }",
"public void sendPing(byte[] data) {\n final Payload payload = new Payload(OPCODE_PING, data);\n\n new Thread(new Runnable() {\n @Override\n public void run() {\n webSocketConnection.sendInternal(payload);\n }\n }).start();\n }"
] |
[
"0.70797616",
"0.69754004",
"0.6967548",
"0.66313213",
"0.65681875",
"0.65092057",
"0.64658403",
"0.6435264",
"0.6419903",
"0.6264211",
"0.6238523",
"0.62113297",
"0.6209073",
"0.6207585",
"0.61862296",
"0.61682034",
"0.6147115",
"0.6144125",
"0.6133161",
"0.6089435",
"0.6086359",
"0.60461926",
"0.60461926",
"0.6026028",
"0.6024542",
"0.60229105",
"0.60085136",
"0.5975259",
"0.5973444",
"0.59368795",
"0.5915557",
"0.590574",
"0.5893956",
"0.589209",
"0.5878482",
"0.58348787",
"0.582321",
"0.58099836",
"0.58072525",
"0.5796612",
"0.5791345",
"0.5786325",
"0.5758078",
"0.57580715",
"0.5757226",
"0.57505286",
"0.5737125",
"0.5721424",
"0.57208467",
"0.57175946",
"0.57065076",
"0.57018733",
"0.5683677",
"0.567589",
"0.567248",
"0.567232",
"0.5659896",
"0.56591225",
"0.5655309",
"0.5654237",
"0.56449836",
"0.5641363",
"0.5626732",
"0.5618327",
"0.55895615",
"0.55876833",
"0.55825686",
"0.55742675",
"0.5572368",
"0.55684084",
"0.55466276",
"0.55378157",
"0.55233985",
"0.55168587",
"0.5513313",
"0.5504499",
"0.5491914",
"0.54787284",
"0.5476619",
"0.54743844",
"0.5471621",
"0.5467456",
"0.54584044",
"0.5454984",
"0.54534715",
"0.5453107",
"0.54527724",
"0.5449649",
"0.5446806",
"0.54344267",
"0.5433615",
"0.54220563",
"0.5407622",
"0.5407067",
"0.5397651",
"0.53923625",
"0.53918564",
"0.53719974",
"0.53698117",
"0.5359356"
] |
0.69119763
|
3
|
Crea el Panel con fondo del radio. Tambien se encarga de responder ante el tipo de objeto que se cree, pudiendo asi mostrar en pantalla el formato actual del radio.
|
public Panel_fondo(Image fondo){
/** INICIALIZAR PROPIEDADES DE PANTALLA Y GUI */
this.fondo_panel = fondo;
Dimension tamano = new Dimension(fondo_panel.getWidth(null),fondo_panel.getHeight(null));
setPreferredSize(tamano);
pantalla.setFont(font);
setLayout(null);
car_radio = new Radio();
//*************************Creo mis botones con su respectiva IMAGEN y NOMBRE ***************************
for(int a=0;a< mis_botoncitos.length ;a++){
if(System.getProperty("os.name").toLowerCase().startsWith("windows"))
mis_botoncitos[a] = new myBotones(new ImageIcon(".\\imagenes\\botones\\"+a+".jpg"),a);
else
mis_botoncitos[a] = new myBotones(new ImageIcon("./imagenes/botones/"+a+".jpg"),a);
mis_botoncitos[a].addActionListener(this);
add(mis_botoncitos[a]);
}
//*************************Coloco todos mis Botones en Forma ELEGANTE ***************************
for(int x=0;x<4;x++){
for(int y=0;y<4;y++){
mis_botoncitos[counter].setBounds(286+y*54,150+x*54,55,55);
counter +=1;
}// Tamaño de Imagenes 83*75 , 54*119 , 79*75 , 88*62, 340*58
}
//Colocar Mis Botones en Lugares Especificos, sinningun LAYOUT
mis_botoncitos[0].setBounds(125,125,83,75);
mis_botoncitos[13].setBounds(125,360,54,119);
mis_botoncitos[14].setBounds(605,360,79,75);
mis_botoncitos[15].setBounds(330,365,88,62);
mis_botoncitos[16].setBounds(418,365,88,62);
//Establecer ToolTips para ayuda
mis_botoncitos[0].setToolTipText("On / Off");
mis_botoncitos[14].setToolTipText("Presiona 'Store', y luego El numero de Memoria");
pantalla.setBounds(270,70,340,58);
add(pantalla);
// ******************************************************************************************************
//@verriding para pintar el fondo del panel
//con la imagen inicialmente enviada
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"private JPanel criarPainelNorte() {\n\n JPanel pNorte = new JPanel(new BorderLayout());\n\n pNorte.setBorder(PADDING_BORDER);\n\n JLabel lbl = new JLabel(\"Selecione o tipo de Utilizador:\", JLabel.CENTER);\n\n btnFae = criarRadioBtnFae();\n btnOrg = criarRadioBtnOrg();\n btnRep = criarRadioBtnRep();\n\n ButtonGroup rBtnGroup = new ButtonGroup();\n rBtnGroup.add(btnFae);\n rBtnGroup.add(btnOrg);\n rBtnGroup.add(btnRep);\n\n JPanel panelBotoes = new JPanel(new FlowLayout());\n panelBotoes.add(btnFae);\n panelBotoes.add(btnOrg);\n panelBotoes.add(btnRep);\n\n pNorte.add(lbl, BorderLayout.NORTH);\n pNorte.add(panelBotoes, BorderLayout.CENTER);\n\n return pNorte;\n }",
"public RadioButtonPanel build()\r\n\t\t{\r\n\t\t\t\r\n\t\t\tSystem.out.println(\"[INFO] <RADIOBUTTON_PANEL_BUILDER> Running build\"); // Debug\r\n\t\t\t\r\n\t\t\ttrimArray();\r\n\t\t\t\r\n\t\t\treturn new RadioButtonPanel(this);\r\n\t\t}",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jRadioButtonMenuItem1 = new javax.swing.JRadioButtonMenuItem();\n try {\n jPanel1 =(javax.swing.JPanel)java.beans.Beans.instantiate(getClass().getClassLoader(), \"com/LD/Windows/TheWay.TheWay_jPanel1\");\n } catch (ClassNotFoundException e) {\n e.printStackTrace();\n } catch (java.io.IOException e) {\n e.printStackTrace();\n }\n jLabel1 = new javax.swing.JLabel();\n jPanel2 = new BackgroundPanel(TheWay);\n jRadioButton1 = new javax.swing.JRadioButton();\n jRadioButton2 = new javax.swing.JRadioButton();\n jRadioButton3 = new javax.swing.JRadioButton();\n jLabel2 = new javax.swing.JLabel();\n jTextField1 = new MJTextField();\n jLabel3 = new javax.swing.JLabel();\n jLabel4 = new javax.swing.JLabel();\n jTextField2 = new MJTextField();\n jTextField3 = new MJTextField();\n jButton1 = new javax.swing.JButton();\n jButton2 = new javax.swing.JButton();\n jLabel5 = new javax.swing.JLabel();\n jLabel6 = new javax.swing.JLabel();\n jLabel7 = new javax.swing.JLabel();\n jTextField4 = new MJTextField();\n jLabel8 = new javax.swing.JLabel();\n jTextField5 = new MJTextField();\n jLabel9 = new javax.swing.JLabel();\n jRadioButton4 = new javax.swing.JRadioButton();\n jRadioButton5 = new javax.swing.JRadioButton();\n\n jRadioButtonMenuItem1.setSelected(true);\n jRadioButtonMenuItem1.setText(\"jRadioButtonMenuItem1\");\n\n setDefaultCloseOperation(javax.swing.WindowConstants.DO_NOTHING_ON_CLOSE);\n setTitle(\"LD type\");\n setResizable(false);\n addWindowListener(new java.awt.event.WindowAdapter() {\n public void windowClosing(java.awt.event.WindowEvent evt) {\n formWindowClosing(evt);\n }\n });\n\n jLabel1.setFont(ff.loadFont(36));\n jLabel1.setForeground(new java.awt.Color(255, 255, 255));\n jLabel1.setText(\"LD type\");\n\n jPanel2.setBackground(new java.awt.Color(255, 51, 51));\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 .addGap(0, 41, Short.MAX_VALUE)\n );\n jPanel2Layout.setVerticalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 41, Short.MAX_VALUE)\n );\n\n jRadioButton1.setBackground(new java.awt.Color(0, 206, 201));\n ways.add(jRadioButton1);\n jRadioButton1.setFont(ss.ssFont(24));\n jRadioButton1.setForeground(new java.awt.Color(255, 255, 255));\n jRadioButton1.setSelected(true);\n jRadioButton1.setText(\"LD decay\");\n jRadioButton1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jRadioButton1ActionPerformed(evt);\n }\n });\n\n jRadioButton2.setBackground(new java.awt.Color(0, 206, 201));\n ways.add(jRadioButton2);\n jRadioButton2.setFont(ss.ssFont(24));\n jRadioButton2.setForeground(new java.awt.Color(255, 255, 255));\n jRadioButton2.setText(\"LD site\");\n jRadioButton2.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jRadioButton2ActionPerformed(evt);\n }\n });\n\n jRadioButton3.setBackground(new java.awt.Color(0, 206, 201));\n ways.add(jRadioButton3);\n jRadioButton3.setFont(ss.ssFont(24));\n jRadioButton3.setForeground(new java.awt.Color(255, 255, 255));\n jRadioButton3.setText(\"LD block\");\n jRadioButton3.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jRadioButton3ActionPerformed(evt);\n }\n });\n\n jLabel2.setFont(ss.ssFont(24));\n jLabel2.setForeground(new java.awt.Color(255, 255, 255));\n jLabel2.setText(\"Chrom:\");\n\n jTextField1.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n jTextField1MouseClicked(evt);\n }\n });\n jTextField1.addInputMethodListener(new java.awt.event.InputMethodListener() {\n public void inputMethodTextChanged(java.awt.event.InputMethodEvent evt) {\n jTextField1InputMethodTextChanged(evt);\n }\n public void caretPositionChanged(java.awt.event.InputMethodEvent evt) {\n }\n });\n jTextField1.addKeyListener(new java.awt.event.KeyAdapter() {\n public void keyTyped(java.awt.event.KeyEvent evt) {\n jTextField1KeyTyped(evt);\n }\n });\n\n jLabel3.setFont(ss.ssFont(24));\n jLabel3.setForeground(new java.awt.Color(255, 255, 255));\n jLabel3.setText(\"End:\");\n\n jLabel4.setFont(ss.ssFont(24));\n jLabel4.setForeground(new java.awt.Color(255, 255, 255));\n jLabel4.setText(\"Start:\");\n\n jTextField2.addKeyListener(new java.awt.event.KeyAdapter() {\n public void keyTyped(java.awt.event.KeyEvent evt) {\n jTextField2KeyTyped(evt);\n }\n });\n\n jTextField3.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jTextField3ActionPerformed(evt);\n }\n });\n jTextField3.addKeyListener(new java.awt.event.KeyAdapter() {\n public void keyTyped(java.awt.event.KeyEvent evt) {\n jTextField3KeyTyped(evt);\n }\n });\n\n jButton1.setFont(ss.ssFont(12));\n jButton1.setText(\"OK\");\n jButton1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton1ActionPerformed(evt);\n }\n });\n\n jButton2.setFont(ss.ssFont(12));\n jButton2.setText(\"CANCEL\");\n jButton2.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton2ActionPerformed(evt);\n }\n });\n\n jLabel5.setFont(ss.ssFont(24));\n jLabel5.setForeground(new java.awt.Color(255, 255, 255));\n jLabel5.setText(\"Region\");\n\n jLabel6.setFont(ss.ssFont(24));\n jLabel6.setForeground(new java.awt.Color(255, 255, 255));\n jLabel6.setText(\"Site\");\n\n jLabel7.setFont(ss.ssFont(24));\n jLabel7.setForeground(new java.awt.Color(255, 255, 255));\n jLabel7.setText(\"Chr :\");\n\n jTextField4.addKeyListener(new java.awt.event.KeyAdapter() {\n public void keyTyped(java.awt.event.KeyEvent evt) {\n jTextField4KeyTyped(evt);\n }\n });\n\n jLabel8.setFont(ss.ssFont(24));\n jLabel8.setForeground(new java.awt.Color(255, 255, 255));\n jLabel8.setText(\"Pos:\");\n\n jTextField5.addKeyListener(new java.awt.event.KeyAdapter() {\n public void keyTyped(java.awt.event.KeyEvent evt) {\n jTextField5KeyTyped(evt);\n }\n });\n\n jLabel9.setFont(ss.ssFont(24));\n jLabel9.setForeground(new java.awt.Color(255, 255, 255));\n jLabel9.setText(\"Intermediate:\");\n\n jRadioButton4.setBackground(new java.awt.Color(0, 206, 201));\n Intermediate.add(jRadioButton4);\n jRadioButton4.setFont(ss.ssFont(12));\n jRadioButton4.setForeground(new java.awt.Color(255, 255, 255));\n jRadioButton4.setText(\"YES\");\n\n jRadioButton5.setBackground(new java.awt.Color(0, 206, 201));\n Intermediate.add(jRadioButton5);\n jRadioButton5.setFont(ss.ssFont(12));\n jRadioButton5.setForeground(new java.awt.Color(255, 255, 255));\n jRadioButton5.setSelected(true);\n jRadioButton5.setText(\"NO\");\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 .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(43, 43, 43)\n .addComponent(jRadioButton1)\n .addGap(66, 66, 66)\n .addComponent(jRadioButton3)\n .addGap(49, 49, 49)\n .addComponent(jRadioButton2))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(163, 163, 163)\n .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(70, 70, 70)\n .addComponent(jLabel1))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(28, 28, 28)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jLabel4)\n .addComponent(jLabel3)\n .addComponent(jLabel2)\n .addComponent(jLabel9, javax.swing.GroupLayout.Alignment.LEADING))\n .addGap(18, 18, 18)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(30, 30, 30)\n .addComponent(jLabel5)\n .addGap(208, 208, 208)\n .addComponent(jLabel6))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, 152, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addComponent(jLabel7))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(jTextField3, javax.swing.GroupLayout.PREFERRED_SIZE, 152, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addComponent(jLabel8)))\n .addGap(18, 18, 18)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jTextField5, javax.swing.GroupLayout.PREFERRED_SIZE, 152, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(jButton2)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jButton1))\n .addComponent(jTextField4, javax.swing.GroupLayout.PREFERRED_SIZE, 152, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(jRadioButton4)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jRadioButton5))\n .addComponent(jTextField2, javax.swing.GroupLayout.PREFERRED_SIZE, 152, javax.swing.GroupLayout.PREFERRED_SIZE)))))\n .addContainerGap(101, Short.MAX_VALUE))\n );\n jPanel1Layout.setVerticalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(34, 34, 34)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jLabel1)\n .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(13, 13, 13)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jRadioButton1)\n .addComponent(jRadioButton3)\n .addComponent(jRadioButton2))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel5)\n .addComponent(jLabel6))\n .addGap(10, 10, 10)\n .addGroup(jPanel1Layout.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 .addComponent(jLabel7)\n .addComponent(jTextField4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel8)\n .addComponent(jTextField5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel4)\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(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jTextField2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel3))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel9)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jRadioButton4)\n .addComponent(jRadioButton5)))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 47, Short.MAX_VALUE)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jButton1)\n .addComponent(jButton2))\n .addGap(95, 95, 95))\n );\n\n jLabel2.setVisible(false);\n jTextField1.addFocusListener(new JTextFieldHintListener(jTextField1, \"Example:11\"));\n jTextField1.setVisible(false);\n\n jLabel3.setVisible(false);\n jLabel4.setVisible(false);\n jTextField2.addFocusListener(new JTextFieldHintListener(jTextField2, \"Example:10000\"));\n jTextField2.setVisible(false);\n jTextField3.addFocusListener(new JTextFieldHintListener(jTextField3, \"Example:10000\"));\n jTextField3.setVisible(false);\n jLabel5.setVisible(false);\n jLabel6.setVisible(false);\n jLabel7.setVisible(false);\n jTextField4.addFocusListener(new JTextFieldHintListener(jTextField4, \"Example:11\"));\n jTextField4.setVisible(false);\n jLabel8.setVisible(false);\n jTextField5.addFocusListener(new JTextFieldHintListener(jTextField5, \"Example:10000\"));\n jTextField5.setVisible(false);\n jLabel9.setVisible(false);\n jRadioButton4.setVisible(false);\n jRadioButton5.setVisible(false);\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.LEADING)\n .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, 595, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, 407, Short.MAX_VALUE)\n );\n\n this.setIconImage(ic);\n new MJTextField();\n\n pack();\n setLocationRelativeTo(null);\n }",
"public Alunos() {\n initComponents();\n ButtonGroup bg = new ButtonGroup(); \n \n//Agora basta vc adicionar os seus RadioButtons ao objeto desta classe. \n \nbg.add(rdNome); \nbg.add(rdID); \nbg.add(rdNomeEditar);\nbg.add(rdIdEditar);\n }",
"public Sistema() {\n initComponents();\n //Codigo de Configuracion\n _radio = new ArrayList();\n _radio.add(RadioButtonDollar);\n _radio.add(RadioButtonSol);\n _radio.add(RadioButtonPeso);\n \n }",
"@Override\n public Element createDomImpl(Renderable element) {\n InputElement radioInputElement =\n Document.get().createRadioInputElement(\"xx\");\n radioInputElement.setClassName(CheckConstants.css.radio());\n radioInputElement.setTabIndex(0);\n return radioInputElement;\n }",
"public GUI_Tipo_Cadastro() {\n initComponents();\n \n buttonGroup1.add(jRadioButton_Cliente);\n buttonGroup1.add(jRadioButton_Profissional);\n buttonGroup1.add(jRadioButton_Admin);\n \n // Centraliza o JFrame na tela\n this.setLocationRelativeTo(null);\n }",
"private void crearPanel() {\r\n\t\tJLabel lbl_Empresa = new JLabel(\"Empresa:\");\r\n\t\tlbl_Empresa.setBounds(10, 52, 72, 14);\r\n\t\tadd(lbl_Empresa);\r\n\r\n\t\ttxField_Empresa = new JTextField();\r\n\t\ttxField_Empresa.setBounds(116, 49, 204, 20);\r\n\t\tadd(txField_Empresa);\r\n\t\ttxField_Empresa.setColumns(10);\r\n\r\n\t\tlbl_Oferta = new JLabel(\" \");\r\n\t\tlbl_Oferta.setFont(new Font(\"Tahoma\", Font.PLAIN, 20));\r\n\t\tlbl_Oferta.setBounds(10, 11, 742, 20);\r\n\t\tadd(lbl_Oferta);\r\n\r\n\t\tJLabel lbl_sueldoMin = new JLabel(\"Sueldo Minimo:\");\r\n\t\tlbl_sueldoMin.setBounds(10, 83, 96, 14);\r\n\t\tadd(lbl_sueldoMin);\r\n\r\n\t\ttxField_sueldoMin = new JTextField();\r\n\t\ttxField_sueldoMin.setColumns(10);\r\n\t\ttxField_sueldoMin.setBounds(116, 80, 93, 20);\r\n\t\tadd(txField_sueldoMin);\r\n\r\n\t\tJLabel lbl_sueldoMax = new JLabel(\"Sueldo Maximo:\");\r\n\t\tlbl_sueldoMax.setBounds(10, 115, 96, 14);\r\n\t\tadd(lbl_sueldoMax);\r\n\r\n\t\ttxField_sueldoMax = new JTextField();\r\n\t\ttxField_sueldoMax.setColumns(10);\r\n\t\ttxField_sueldoMax.setBounds(116, 112, 93, 20);\r\n\t\tadd(txField_sueldoMax);\r\n\r\n\t\tJLabel lbl_experiencia = new JLabel(\"A\\u00F1os de experiencia minimos:\");\r\n\t\tlbl_experiencia.setBounds(10, 143, 185, 14);\r\n\t\tadd(lbl_experiencia);\r\n\r\n\t\ttxField_experiencia = new JTextField();\r\n\t\ttxField_experiencia.setColumns(10);\r\n\t\ttxField_experiencia.setBounds(205, 140, 93, 20);\r\n\t\tadd(txField_experiencia);\r\n\r\n\t\tJLabel lbl_aspectosValorar = new JLabel(\"Aspectos a valorar:\");\r\n\t\tlbl_aspectosValorar.setBounds(10, 178, 137, 14);\r\n\t\tadd(lbl_aspectosValorar);\r\n\r\n\t\ttxArea_aspectosValorar = new JTextArea();\r\n\t\ttxArea_aspectosValorar.setBorder(UIManager.getBorder(\"TextField.border\"));\r\n\t\ttxArea_aspectosValorar.setBounds(157, 172, 253, 41);\r\n\t\tadd(txArea_aspectosValorar);\r\n\r\n\t\tJLabel lbl_aspectosImpres = new JLabel(\"Aspectos imprescindibles:\");\r\n\t\tlbl_aspectosImpres.setBounds(10, 238, 133, 14);\r\n\t\tadd(lbl_aspectosImpres);\r\n\r\n\t\ttxArea_aspectosImpres = new JTextArea();\r\n\t\ttxArea_aspectosImpres.setBorder(UIManager.getBorder(\"TextField.border\"));\r\n\t\ttxArea_aspectosImpres.setBounds(157, 232, 253, 41);\r\n\t\tadd(txArea_aspectosImpres);\r\n\r\n\t\tJLabel lbl_descripcion = new JLabel(\"Descripcion:\");\r\n\t\tlbl_descripcion.setBounds(10, 302, 107, 14);\r\n\t\tadd(lbl_descripcion);\r\n\r\n\t\ttxArea_descripcion = new JTextArea();\r\n\t\ttxArea_descripcion.setBorder(UIManager.getBorder(\"TextField.border\"));\r\n\t\ttxArea_descripcion.setBounds(10, 328, 465, 149);\r\n\t\tadd(txArea_descripcion);\r\n\r\n\t\tJLabel lbl_conocimientos = new JLabel(\"Conocimientos requeridos:\");\r\n\t\tlbl_conocimientos.setBounds(537, 125, 169, 14);\r\n\t\tadd(lbl_conocimientos);\r\n\r\n\t\tpa_conocimientos = new PanelListaDoble(Usuario.getConocimientosTotales(), miOferta.getConocimientos());\r\n\t\tpa_conocimientos.setBounds(537, 174, 215, 180);\r\n\t\tadd(pa_conocimientos);\r\n\r\n\t\ttxField_buscarCono = new JTextField();\r\n\t\ttxField_buscarCono.setBounds(537, 140, 135, 20);\r\n\t\tadd(txField_buscarCono);\r\n\t\ttxField_buscarCono.setColumns(10);\r\n\r\n\t\tJButton btn_buscar = new JButton(\"\");\r\n\t\tbtn_buscar.setBounds(682, 138, 24, 23);\r\n\t\tadd(btn_buscar);\r\n\r\n\t\tbtn_crear = new JButton(\"\");\r\n\t\tbtn_crear.setBounds(716, 138, 24, 23);\r\n\t\tadd(btn_crear);\r\n\r\n\t\ttxField_lugar = new JTextField();\r\n\t\ttxField_lugar.setEditable(false);\r\n\t\ttxField_lugar.setColumns(10);\r\n\t\ttxField_lugar.setBounds(506, 49, 234, 20);\r\n\t\tadd(txField_lugar);\r\n\r\n\t\tJLabel lbl_lugar = new JLabel(\"Lugar de trabajo:\");\r\n\t\tlbl_lugar.setBounds(392, 52, 104, 14);\r\n\t\tadd(lbl_lugar);\r\n\r\n\t\tJLabel lbl_contrato = new JLabel(\"Tipo de contrato:\");\r\n\t\tlbl_contrato.setBounds(392, 83, 104, 14);\r\n\t\tadd(lbl_contrato);\r\n\r\n\t\tcombo_contrato = new JComboBox<Contrato>();\r\n\t\tcombo_contrato.addItem(Contrato.INDEFINIDO_TIEMPO_COMPLETO);\r\n\t\tcombo_contrato.addItem(Contrato.INDEFINIDO_TIEMPO_PARCIAL);\r\n\t\tcombo_contrato.addItem(Contrato.TEMPORAL_TIEMPO_COMPLETO);\r\n\t\tcombo_contrato.addItem(Contrato.TEMPORTAL_TIEMPO_PARCIAL);\r\n\t\tcombo_contrato.setBounds(506, 83, 159, 20);\r\n\t\tadd(combo_contrato);\r\n\t\t// d\r\n\t\tinicializar(miOferta);\r\n\t\tdesHabCampos(false);\r\n\t\tif (miOferta.getEmpresa().getNumID().compareToIgnoreCase(Aplicacion.getUsuario().getNumID()) == 0) {\r\n\t\t\tbtnEliminar = new JButton(\"Eliminar\");\r\n\t\t\tbtnEliminar.setToolTipText(\"Eliminar\");\r\n\t\t\tbtnEliminar.setBounds(492, 384, 125, 41);\r\n\t\t\tadd(btnEliminar);\r\n\r\n\t\t\tbtnRetirar = new JButton(\"\\uD83D\\uDC40\");\r\n\t\t\tbtnRetirar.setToolTipText(\"Retirar Oferta\");\r\n\t\t\tbtnRetirar.setBounds(627, 384, 125, 41);\r\n\t\t\tadd(btnRetirar);\r\n\r\n\t\t\tbutton_Editar = new JButton(\"Editar\");\r\n\t\t\tbutton_Editar.setToolTipText(\"Editar\");\r\n\t\t\tbutton_Editar.setBounds(627, 436, 125, 41);\r\n\t\t\tadd(button_Editar);\r\n\r\n\t\t\tbutton_Editar.addMouseListener(new MouseAdapter() {\r\n\t\t\t\t@Override\r\n\t\t\t\tpublic void mouseClicked(MouseEvent e) {\r\n\t\t\t\t\tdesHabCampos(true);\r\n\t\t\t\t\tbutton_Editar.setVisible(false);\r\n\t\t\t\t\tbtnEliminar.setVisible(false);\r\n\t\t\t\t\tbtnRetirar.setVisible(false);\r\n\t\t\t\t\tbtn_crear.setVisible(false);\r\n\r\n\t\t\t\t\tbtn_guardar = new JButton(\"Guardar\");\r\n\t\t\t\t\tbtn_guardar.setToolTipText(\"Guardar\");\r\n\t\t\t\t\tbtn_guardar.setBounds(627, 436, 125, 41);\r\n\t\t\t\t\tadd(btn_guardar);\r\n\r\n\t\t\t\t\tbtn_cancelar = new JButton(\"Cancelar\");\r\n\t\t\t\t\tbtn_cancelar.setToolTipText(\"Cancelar\");\r\n\t\t\t\t\tbtn_cancelar.setBounds(492, 436, 125, 41);\r\n\t\t\t\t\tadd(btn_cancelar);\r\n\r\n\t\t\t\t\tbtn_cancelar.addMouseListener(new MouseAdapter() {\r\n\t\t\t\t\t\t@Override\r\n\t\t\t\t\t\tpublic void mouseClicked(MouseEvent e) {\r\n\t\t\t\t\t\t\tbtn_guardar.removeAll();\r\n\t\t\t\t\t\t\tbtn_cancelar.removeAll();\r\n\t\t\t\t\t\t\tbtn_cancelar.setVisible(false);\r\n\t\t\t\t\t\t\tbtn_guardar.setVisible(false);\r\n\t\t\t\t\t\t\tbtnEliminar.setVisible(true);\r\n\t\t\t\t\t\t\tbutton_Editar.setVisible(true);\r\n\t\t\t\t\t\t\tbtnRetirar.setVisible(true);\r\n\t\t\t\t\t\t\tbtn_crear.setVisible(true);\r\n\t\t\t\t\t\t\tinicializar(miOferta);\r\n\t\t\t\t\t\t\tdesHabCampos(false);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\r\n\t\t\t\t\tbtn_guardar.addMouseListener(new MouseAdapter() {\r\n\t\t\t\t\t\t@Override\r\n\t\t\t\t\t\tpublic void mouseClicked(MouseEvent e) {\r\n\t\t\t\t\t\t\tEmergenteCambios.createWindow(\"┐Desea guardar los cambios?\", (TieneEmergente) padre);\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}",
"private void creaPannelli() {\n /* variabili e costanti locali di lavoro */\n Pannello pan;\n\n try { // prova ad eseguire il codice\n\n /* pannello date */\n pan = this.creaPanDate();\n this.addPannello(pan);\n\n /* pannello coperti */\n PanCoperti panCoperti = new PanCoperti();\n this.setPanCoperti(panCoperti);\n this.addPannello(panCoperti);\n\n\n /* pannello placeholder per il Navigatore risultati */\n /* il navigatore vi viene inserito in fase di inizializzazione */\n pan = new PannelloFlusso(Layout.ORIENTAMENTO_ORIZZONTALE);\n this.setPanNavigatore(pan);\n this.addPannello(pan);\n\n\n } catch (Exception unErrore) { // intercetta l'errore\n Errore.crea(unErrore);\n } // fine del blocco try-catch\n\n }",
"public void preparePanelPoder(){\n\t\tpanelNombrePoder = new JPanel();\n\t\tpanelNombrePoder.setLayout( new GridLayout(3,1,0,0 ));\n\t\t\n\t\tString name = ( game.getCurrentSorpresa() == null )?\" No hay sorpresa\":\" \"+game.getCurrentSorpresa().getClass().getName();\n\t\tn1 = new JLabel(\"Sorpresa actual:\"); \n\t\tn1.setForeground(Color.WHITE);\n\t\t\n\t\tn2 = new JLabel();\n\t\tn2.setText(name.replace(\"aplicacion.\",\"\"));\n\t\tn2.setForeground(Color.WHITE);\n\t\t\n\t\tpanelNombrePoder.add(n1);\n\t\tpanelNombrePoder.add(n2);\n\t\tpanelNombrePoder.setBounds( 34,200 ,110,50);\n\t\tpanelNombrePoder.setOpaque(false);\n\t\tthis.add( panelNombrePoder);\n\t\t\n\t\t\n\t\t\n\t\t\n\t}",
"public TelaCadastrarProduto() {\n initComponents();\n entidade = new Produto();\n setRepositorio(RepositorioBuilder.getProdutoRepositorio());\n grupo.add(jRadioButton1);\n grupo.add(jRadioButton2);\n }",
"private void inicializar(){\n this.setLocationRelativeTo(null);\n this.setResizable(false);\n radioButtons();\n txtTitulo.setText(txtTitulo.getText() + \" para \" + nombre);\n }",
"private void preparePanel()\r\n\t{\r\n\t\t\r\n\t\tSystem.out.println(\"[INFO] <RADIOBUTTON_PANEL> Running preparePanel\"); // Debug\r\n\t\t\r\n\t\tthis.setLayout(new GridLayout(0,2)); // Infinite rows 2 columns\r\n\t\t\r\n\t\t// Create a button group for the radio buttons\r\n\t\tgroup = new ButtonGroup();\r\n\t\t\r\n\t\tfor (JRadioButton button : buttons) // Add each button to the array\r\n\t\t{\r\n\t\t\tthis.add(button);\r\n\t\t\tgroup.add(button); // Add the buttons to the button group\r\n\t\t}\r\n\t\t\r\n\t\t// Calculate the number of rows\r\n\t\tint numberOfRows = (buttons.length + 1)/2;\r\n\t\t\r\n\t\t// Make the panel the correct size, 40px per row\r\n\t\tthis.setPreferredSize(new Dimension(700,40*numberOfRows));\r\n\t\tthis.setMaximumSize(new Dimension(700,50*numberOfRows));\r\n\t}",
"private Pannello creaPanDate() {\n /* variabili e costanti locali di lavoro */\n Pannello panDate = null;\n Campo campoDataInizio;\n Campo campoDataFine;\n JButton bottone;\n ProgressBar pb;\n\n try { // prova ad eseguire il codice\n\n /* pannello date */\n campoDataInizio = CampoFactory.data(DialogoStatistiche.nomeDataIni);\n campoDataInizio.decora().eliminaEtichetta();\n campoDataInizio.decora().etichettaSinistra(\"dal\");\n campoDataInizio.decora().obbligatorio();\n campoDataFine = CampoFactory.data(DialogoStatistiche.nomeDataFine);\n campoDataFine.decora().eliminaEtichetta();\n campoDataFine.decora().etichettaSinistra(\"al\");\n campoDataFine.decora().obbligatorio();\n\n /* bottone esegui */\n bottone = new JButton(\"Esegui\");\n bottone.setOpaque(false);\n this.setBottoneEsegui(bottone);\n bottone.addActionListener(new DialogoStatistiche.AzioneEsegui());\n bottone.setFocusPainted(false);\n\n /* progress bar */\n pb = new ProgressBar();\n this.setProgressBar(pb);\n\n panDate = PannelloFactory.orizzontale(this.getModulo());\n panDate.setAllineamento(Layout.ALLINEA_CENTRO);\n panDate.creaBordo(\"Periodo di analisi\");\n panDate.add(campoDataInizio);\n panDate.add(campoDataFine);\n panDate.add(bottone);\n panDate.add(Box.createHorizontalGlue());\n panDate.add(pb);\n\n } catch (Exception unErrore) { // intercetta l'errore\n Errore.crea(unErrore);\n } // fine del blocco try-catch\n\n /* valore di ritorno */\n return panDate;\n }",
"public JPanel getPanelConsulta(){\n\n\t\tJPanel panel = new JPanel();\n\t\tpanel.setLayout(new GridLayout(5, 1, 50, 10));\n\n\t\tpanel.add(new JLabel(\"Fecha inicio:\"));\n\t\tcampoInicio = new JTextField(\"yyyy-mm-dd\");\n\t\tcampoInicio.setForeground(new Color(111,111,111));\n\t\tcampoInicio.addFocusListener(control);\n\t\tcampoInicio.setActionCommand(\"fecahaInicio\");\n\n\t\tpanel.add(campoInicio);\n\n\t\tpanel.add(new JLabel(\"Fecha final:\"));\n\t\tcampoFinal = new JTextField(\"yyyy-mm-dd\");\n\t\tcampoFinal.setForeground(new Color(111,111,111));\n\t\tcampoFinal.addFocusListener(control);\n\t\tcampoFinal.setActionCommand(\"fecahaFinal\");\n\t\n\t\tpanel.add(campoFinal);\n\n\t\tpanel.setBorder(BorderFactory.createTitledBorder(\"Datos Reporte\"));\n\n\t\tJButton consulta = new JButton(\"Consultar\");\n\t\tconsulta.addActionListener(control);\n\t\tconsulta.setActionCommand(\"consulta\");\n\t\tpanel.add(consulta);\n\t\tpanel.setPreferredSize(new Dimension(190, 250));\n\n\t\treturn panel;\n\n\t}",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n buttonGroup1 = new javax.swing.ButtonGroup();\n jPanel1 = new javax.swing.JPanel();\n jPanel2 = new javax.swing.JPanel();\n txtPadron = new rojeru_san.RSMTextFull();\n jPanel3 = new javax.swing.JPanel();\n rbGlobal = new javax.swing.JRadioButton();\n rbDetallado = new javax.swing.JRadioButton();\n btnReporte = new rojeru_san.RSButton();\n Calendario = new rojerusan.RSCalendar();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);\n setTitle(\"REPORTE DE PRODUCCION\");\n\n jPanel1.setBackground(new java.awt.Color(255, 255, 255));\n\n jPanel2.setBorder(javax.swing.BorderFactory.createEtchedBorder());\n\n txtPadron.setPlaceholder(\"0000\");\n txtPadron.addFocusListener(new java.awt.event.FocusAdapter() {\n public void focusLost(java.awt.event.FocusEvent evt) {\n txtPadronFocusLost(evt);\n }\n });\n txtPadron.addKeyListener(new java.awt.event.KeyAdapter() {\n public void keyPressed(java.awt.event.KeyEvent evt) {\n txtPadronKeyPressed(evt);\n }\n public void keyTyped(java.awt.event.KeyEvent evt) {\n txtPadronKeyTyped(evt);\n }\n });\n\n jPanel3.setBorder(javax.swing.BorderFactory.createEtchedBorder());\n\n buttonGroup1.add(rbGlobal);\n rbGlobal.setSelected(true);\n rbGlobal.setText(\"GLOBAL\");\n\n buttonGroup1.add(rbDetallado);\n rbDetallado.setText(\"DETALLADO\");\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 .addComponent(rbGlobal)\n .addComponent(rbDetallado))\n .addContainerGap(66, Short.MAX_VALUE))\n );\n jPanel3Layout.setVerticalGroup(\n jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel3Layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(rbGlobal)\n .addGap(18, 18, 18)\n .addComponent(rbDetallado)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\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 .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addGap(30, 30, 30)\n .addComponent(txtPadron, javax.swing.GroupLayout.PREFERRED_SIZE, 123, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addContainerGap(20, Short.MAX_VALUE))\n );\n jPanel2Layout.setVerticalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(txtPadron, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(21, Short.MAX_VALUE))\n );\n\n btnReporte.setText(\"GENERAR REPORTE\");\n btnReporte.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnReporteActionPerformed(evt);\n }\n });\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(jPanel1Layout.createSequentialGroup()\n .addGap(18, 18, 18)\n .addComponent(Calendario, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(37, 37, 37)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(btnReporte, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE))\n .addContainerGap(14, Short.MAX_VALUE))\n );\n jPanel1Layout.setVerticalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(73, 73, 73)\n .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(31, 31, 31)\n .addComponent(btnReporte, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(Calendario, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addContainerGap(28, Short.MAX_VALUE))\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.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(1, 1, 1)\n .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n );\n\n pack();\n }",
"public static AbstractAnswerTypePanel create(IAnswerType type, Questionaire app)\n throws IllegalAnswerTypeException {\n\n int value = type.getType().getValue();\n\n\t\tAbstractAnswerTypePanel result;\n\n if (AnswerType.COMPLETION_LIMITED.getValue() == value) {\n result = new CompletionLimitedPanel(type, app.getConfig());\n } else if (AnswerType.COMPLETION_OPEN.getValue() == value) {\n result = new CompletionOpenPanel(type, app.getConfig());\n } else if (AnswerType.MATCH_MULTIPLE.getValue() == value) {\n result = new MatchMultiplePanel(type, app.getConfig());\n } else if (AnswerType.MATCH_SINGLE.getValue() == value) {\n result = new MatchSinglePanel(type, app.getConfig());\n } else if (AnswerType.OPEN_QUALIFIED.getValue() == value) {\n result = new OpenQualifiedPanel(type, app.getConfig());\n } else if (AnswerType.OPEN_QUANTIFIED.getValue() == value) {\n result = new OpenQuantifiedPanel(type, app.getConfig());\n } else if (AnswerType.OPTION_BINARY.getValue() == value) {\n result = new OptionBinaryPanel(type, app.getConfig());\n } else if (AnswerType.OPTION_LIMITED.getValue() == value) {\n result = new OptionLimitedPanel(type, app.getConfig());\n } else if (AnswerType.OPTION_VARIABLE.getValue() == value) {\n result = new OptionVariablePanel(type, app.getConfig());\n } else if (AnswerType.ORDER.getValue() == value) {\n result = new OrderPanel(type, app.getConfig());\n } else if (AnswerType.SCALE_CALCULATED.getValue() == value) {\n result = new ScaleCalculatedPanel(type, app.getConfig());\n } else if (AnswerType.SCALE_LABLED.getValue() == value) {\n result = new ScaleLabledPanel(type, app.getConfig());\n } else {\n throw new IllegalAnswerTypeException(\"unknown type: \" + type);\n }\n \n return result;\n }",
"void addPanel() {\n \tPanel panel = new Panel();\r\n\r\n panel.setLayout(new GridLayout(4, 1));\r\n jSliderBrightness = makeTitledSilder(\"Helligkeit\", 0, 256, 128); // werte veraendert\r\n jSliderContrast = makeTitledSilder(\"Kontrast\", 0, 10, 5);\r\n jSliderSaturation = makeTitledSilder(\"Sättigung\", 0, 9, 4);\r\n jSliderHue = makeTitledSilder(\"Hue\", 0, 360, 0);\r\n //jSliderContrast = makeTitledSilder(\"Slider2-Wert\", 0, 100, 50);\r\n panel.add(jSliderBrightness);\r\n panel.add(jSliderContrast);\r\n panel.add(jSliderSaturation);\r\n panel.add(jSliderHue);\r\n \r\n add(panel);\r\n \r\n pack();\r\n }",
"@SuppressWarnings(\"unchecked\")\r\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\r\n private void initComponents() {\r\n\r\n groupSexoBtn = new javax.swing.ButtonGroup();\r\n jdp4 = new javax.swing.JDesktopPane();\r\n txtIdentificacion = new javax.swing.JTextField();\r\n jLabel1 = new javax.swing.JLabel();\r\n jLabel4 = new javax.swing.JLabel();\r\n txtNombre1 = new javax.swing.JTextField();\r\n txtNombre2 = new javax.swing.JTextField();\r\n jLabel5 = new javax.swing.JLabel();\r\n jLabel3 = new javax.swing.JLabel();\r\n txtApellido1 = new javax.swing.JTextField();\r\n txtApellido2 = new javax.swing.JTextField();\r\n jLabel2 = new javax.swing.JLabel();\r\n jLabel6 = new javax.swing.JLabel();\r\n txtFechaNacimiento = new com.toedter.calendar.JDateChooser();\r\n rBtn1 = new javax.swing.JRadioButton();\r\n jLabel8 = new javax.swing.JLabel();\r\n jLabel7 = new javax.swing.JLabel();\r\n jLabel10 = new javax.swing.JLabel();\r\n jLabel12 = new javax.swing.JLabel();\r\n jLabel11 = new javax.swing.JLabel();\r\n txtPassword = new javax.swing.JPasswordField();\r\n cmbRol = new javax.swing.JComboBox<>();\r\n txtTelefono = new javax.swing.JTextField();\r\n txtCorreo = new javax.swing.JTextField();\r\n rBtn2 = new javax.swing.JRadioButton();\r\n btnCerrarVistaCrearFuncionario = new javax.swing.JButton();\r\n btnRegistrarFuncionario = new javax.swing.JButton();\r\n jLabel9 = new javax.swing.JLabel();\r\n lbl10 = new javax.swing.JLabel();\r\n lbl1 = new javax.swing.JLabel();\r\n lbl3 = new javax.swing.JLabel();\r\n lbl2 = new javax.swing.JLabel();\r\n lbl6 = new javax.swing.JLabel();\r\n lbl4 = new javax.swing.JLabel();\r\n lbl5 = new javax.swing.JLabel();\r\n lbl7 = new javax.swing.JLabel();\r\n lbl8 = new javax.swing.JLabel();\r\n lbl9 = new javax.swing.JLabel();\r\n\r\n setBackground(java.awt.Color.white);\r\n setBorder(null);\r\n setClosable(true);\r\n setTitle(\"Crear Funcionario\");\r\n setPreferredSize(new java.awt.Dimension(792, 437));\r\n setVisible(true);\r\n getContentPane().setLayout(null);\r\n\r\n jdp4.setBackground(new java.awt.Color(255, 255, 255));\r\n\r\n txtIdentificacion.setName(\"txtIdentificacionF\"); // NOI18N\r\n jdp4.add(txtIdentificacion);\r\n txtIdentificacion.setBounds(190, 130, 178, 20);\r\n\r\n jLabel1.setFont(new java.awt.Font(\"Times New Roman\", 0, 12)); // NOI18N\r\n jLabel1.setText(\"Identificacion: \");\r\n jdp4.add(jLabel1);\r\n jLabel1.setBounds(20, 130, 80, 14);\r\n\r\n jLabel4.setFont(new java.awt.Font(\"Times New Roman\", 0, 12)); // NOI18N\r\n jLabel4.setText(\"Primer Nombre: \");\r\n jdp4.add(jLabel4);\r\n jLabel4.setBounds(20, 170, 80, 14);\r\n\r\n txtNombre1.setName(\"txtPrimerNombreF\"); // NOI18N\r\n jdp4.add(txtNombre1);\r\n txtNombre1.setBounds(190, 170, 178, 20);\r\n\r\n txtNombre2.setName(\"txtSegundoNombreF\"); // NOI18N\r\n txtNombre2.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n txtNombre2ActionPerformed(evt);\r\n }\r\n });\r\n jdp4.add(txtNombre2);\r\n txtNombre2.setBounds(190, 210, 178, 20);\r\n\r\n jLabel5.setFont(new java.awt.Font(\"Times New Roman\", 0, 12)); // NOI18N\r\n jLabel5.setText(\"Segundo Nombre: \");\r\n jdp4.add(jLabel5);\r\n jLabel5.setBounds(20, 210, 90, 14);\r\n\r\n jLabel3.setFont(new java.awt.Font(\"Times New Roman\", 0, 12)); // NOI18N\r\n jLabel3.setText(\"Primier Apellido: \");\r\n jdp4.add(jLabel3);\r\n jLabel3.setBounds(20, 250, 90, 14);\r\n\r\n txtApellido1.setName(\"txtPrimerApellidoF\"); // NOI18N\r\n jdp4.add(txtApellido1);\r\n txtApellido1.setBounds(190, 250, 178, 20);\r\n\r\n txtApellido2.setName(\"txtSegundoApellidoF\"); // NOI18N\r\n jdp4.add(txtApellido2);\r\n txtApellido2.setBounds(190, 290, 178, 20);\r\n\r\n jLabel2.setFont(new java.awt.Font(\"Times New Roman\", 0, 12)); // NOI18N\r\n jLabel2.setText(\"Segundo Apellido: \");\r\n jdp4.add(jLabel2);\r\n jLabel2.setBounds(20, 290, 100, 14);\r\n\r\n jLabel6.setFont(new java.awt.Font(\"Times New Roman\", 0, 12)); // NOI18N\r\n jLabel6.setText(\"Fecha De Nacimiento: \");\r\n jdp4.add(jLabel6);\r\n jLabel6.setBounds(20, 330, 110, 14);\r\n jdp4.add(txtFechaNacimiento);\r\n txtFechaNacimiento.setBounds(190, 330, 180, 20);\r\n\r\n rBtn1.setText(\"Masculino\");\r\n jdp4.add(rBtn1);\r\n rBtn1.setBounds(580, 120, 90, 23);\r\n\r\n jLabel8.setFont(new java.awt.Font(\"Times New Roman\", 0, 12)); // NOI18N\r\n jLabel8.setText(\"Sexo: \");\r\n jdp4.add(jLabel8);\r\n jLabel8.setBounds(410, 130, 30, 14);\r\n\r\n jLabel7.setFont(new java.awt.Font(\"Times New Roman\", 0, 12)); // NOI18N\r\n jLabel7.setText(\"Correo Electronico: \");\r\n jdp4.add(jLabel7);\r\n jLabel7.setBounds(410, 170, 100, 14);\r\n\r\n jLabel10.setFont(new java.awt.Font(\"Times New Roman\", 0, 12)); // NOI18N\r\n jLabel10.setText(\"Telefono: \");\r\n jdp4.add(jLabel10);\r\n jLabel10.setBounds(410, 210, 60, 14);\r\n\r\n jLabel12.setFont(new java.awt.Font(\"Times New Roman\", 0, 12)); // NOI18N\r\n jLabel12.setText(\"Cargo: \");\r\n jdp4.add(jLabel12);\r\n jLabel12.setBounds(410, 250, 40, 14);\r\n\r\n jLabel11.setFont(new java.awt.Font(\"Times New Roman\", 0, 12)); // NOI18N\r\n jLabel11.setText(\"Contraseña\");\r\n jdp4.add(jLabel11);\r\n jLabel11.setBounds(410, 290, 70, 14);\r\n jdp4.add(txtPassword);\r\n txtPassword.setBounds(580, 290, 178, 20);\r\n\r\n cmbRol.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"Administardor\", \"Auxiliar\", \"Coordinador\" }));\r\n jdp4.add(cmbRol);\r\n cmbRol.setBounds(580, 250, 178, 20);\r\n jdp4.add(txtTelefono);\r\n txtTelefono.setBounds(580, 210, 178, 20);\r\n jdp4.add(txtCorreo);\r\n txtCorreo.setBounds(580, 170, 178, 20);\r\n\r\n rBtn2.setText(\"Femenino\");\r\n jdp4.add(rBtn2);\r\n rBtn2.setBounds(670, 120, 90, 23);\r\n\r\n btnCerrarVistaCrearFuncionario.setBackground(new java.awt.Color(0, 0, 0));\r\n btnCerrarVistaCrearFuncionario.setFont(new java.awt.Font(\"Times New Roman\", 0, 14)); // NOI18N\r\n btnCerrarVistaCrearFuncionario.setForeground(new java.awt.Color(255, 255, 255));\r\n btnCerrarVistaCrearFuncionario.setText(\"CERRAR\");\r\n btnCerrarVistaCrearFuncionario.setBorder(javax.swing.BorderFactory.createCompoundBorder());\r\n btnCerrarVistaCrearFuncionario.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n btnCerrarVistaCrearFuncionarioActionPerformed(evt);\r\n }\r\n });\r\n jdp4.add(btnCerrarVistaCrearFuncionario);\r\n btnCerrarVistaCrearFuncionario.setBounds(500, 410, 110, 30);\r\n\r\n btnRegistrarFuncionario.setBackground(new java.awt.Color(0, 0, 0));\r\n btnRegistrarFuncionario.setFont(new java.awt.Font(\"Times New Roman\", 0, 14)); // NOI18N\r\n btnRegistrarFuncionario.setForeground(new java.awt.Color(255, 255, 255));\r\n btnRegistrarFuncionario.setText(\"REGISTRAR\");\r\n btnRegistrarFuncionario.setBorder(javax.swing.BorderFactory.createCompoundBorder());\r\n btnRegistrarFuncionario.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n btnRegistrarFuncionarioActionPerformed(evt);\r\n }\r\n });\r\n jdp4.add(btnRegistrarFuncionario);\r\n btnRegistrarFuncionario.setBounds(290, 410, 120, 30);\r\n\r\n jLabel9.setFont(new java.awt.Font(\"Times New Roman\", 0, 18)); // NOI18N\r\n jLabel9.setText(\"CREAR FUNCIONARIO\");\r\n jdp4.add(jLabel9);\r\n jLabel9.setBounds(330, 60, 220, 14);\r\n\r\n lbl10.setFont(new java.awt.Font(\"Tahoma\", 0, 12)); // NOI18N\r\n lbl10.setForeground(new java.awt.Color(255, 0, 0));\r\n lbl10.setText(\"*\");\r\n jdp4.add(lbl10);\r\n lbl10.setBounds(470, 290, 20, 14);\r\n\r\n lbl1.setFont(new java.awt.Font(\"Tahoma\", 0, 12)); // NOI18N\r\n lbl1.setForeground(new java.awt.Color(255, 0, 0));\r\n lbl1.setText(\"*\");\r\n jdp4.add(lbl1);\r\n lbl1.setBounds(90, 130, 20, 14);\r\n\r\n lbl3.setFont(new java.awt.Font(\"Tahoma\", 0, 12)); // NOI18N\r\n lbl3.setForeground(new java.awt.Color(255, 0, 0));\r\n lbl3.setText(\"*\");\r\n jdp4.add(lbl3);\r\n lbl3.setBounds(110, 250, 20, 14);\r\n\r\n lbl2.setFont(new java.awt.Font(\"Tahoma\", 0, 12)); // NOI18N\r\n lbl2.setForeground(new java.awt.Color(255, 0, 0));\r\n lbl2.setText(\"*\");\r\n jdp4.add(lbl2);\r\n lbl2.setBounds(100, 170, 20, 14);\r\n\r\n lbl6.setFont(new java.awt.Font(\"Tahoma\", 0, 12)); // NOI18N\r\n lbl6.setForeground(new java.awt.Color(255, 0, 0));\r\n lbl6.setText(\"*\");\r\n jdp4.add(lbl6);\r\n lbl6.setBounds(440, 130, 20, 14);\r\n\r\n lbl4.setFont(new java.awt.Font(\"Tahoma\", 0, 12)); // NOI18N\r\n lbl4.setForeground(new java.awt.Color(255, 0, 0));\r\n lbl4.setText(\"*\");\r\n jdp4.add(lbl4);\r\n lbl4.setBounds(110, 290, 20, 14);\r\n\r\n lbl5.setFont(new java.awt.Font(\"Tahoma\", 0, 12)); // NOI18N\r\n lbl5.setForeground(new java.awt.Color(255, 0, 0));\r\n lbl5.setText(\"*\");\r\n jdp4.add(lbl5);\r\n lbl5.setBounds(130, 330, 20, 14);\r\n\r\n lbl7.setFont(new java.awt.Font(\"Tahoma\", 0, 12)); // NOI18N\r\n lbl7.setForeground(new java.awt.Color(255, 0, 0));\r\n lbl7.setText(\"*\");\r\n jdp4.add(lbl7);\r\n lbl7.setBounds(510, 170, 20, 14);\r\n\r\n lbl8.setFont(new java.awt.Font(\"Tahoma\", 0, 12)); // NOI18N\r\n lbl8.setForeground(new java.awt.Color(255, 0, 0));\r\n lbl8.setText(\"*\");\r\n jdp4.add(lbl8);\r\n lbl8.setBounds(460, 210, 20, 14);\r\n\r\n lbl9.setFont(new java.awt.Font(\"Tahoma\", 0, 12)); // NOI18N\r\n lbl9.setForeground(new java.awt.Color(255, 0, 0));\r\n lbl9.setText(\"*\");\r\n jdp4.add(lbl9);\r\n lbl9.setBounds(440, 250, 20, 14);\r\n\r\n getContentPane().add(jdp4);\r\n jdp4.setBounds(-10, -30, 850, 520);\r\n\r\n pack();\r\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n grupo = new javax.swing.ButtonGroup();\n etiquetaTituloPregunta = new javax.swing.JLabel();\n radioTituloOpcion0 = new javax.swing.JRadioButton();\n radioTituloOpcion1 = new javax.swing.JRadioButton();\n radioTituloOpcion2 = new javax.swing.JRadioButton();\n radioTituloOpcion3 = new javax.swing.JRadioButton();\n botonRespuesta = new javax.swing.JButton();\n etiquetaRespuesta = new javax.swing.JLabel();\n jLabel1 = new javax.swing.JLabel();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n etiquetaTituloPregunta.setText(\"jLabel1\");\n\n grupo.add(radioTituloOpcion0);\n radioTituloOpcion0.setText(\"jRadioButton1\");\n\n grupo.add(radioTituloOpcion1);\n radioTituloOpcion1.setText(\"jRadioButton2\");\n radioTituloOpcion1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n radioTituloOpcion1ActionPerformed(evt);\n }\n });\n\n grupo.add(radioTituloOpcion2);\n radioTituloOpcion2.setText(\"jRadioButton3\");\n radioTituloOpcion2.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n radioTituloOpcion2ActionPerformed(evt);\n }\n });\n\n grupo.add(radioTituloOpcion3);\n radioTituloOpcion3.setText(\"jRadioButton4\");\n\n botonRespuesta.setText(\"Checar respuesta\");\n botonRespuesta.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n botonRespuestaActionPerformed(evt);\n }\n });\n\n jLabel1.setBackground(new java.awt.Color(0, 204, 153));\n jLabel1.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/cuestionario/pro.png\"))); // NOI18N\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.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(etiquetaTituloPregunta, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(etiquetaRespuesta, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(radioTituloOpcion0, javax.swing.GroupLayout.DEFAULT_SIZE, 113, Short.MAX_VALUE)\n .addComponent(radioTituloOpcion1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(radioTituloOpcion2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(radioTituloOpcion3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addComponent(botonRespuesta))\n .addGap(65, 65, 65)\n .addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addContainerGap())))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(20, 20, 20)\n .addComponent(etiquetaTituloPregunta, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(radioTituloOpcion0)\n .addGap(18, 18, 18)\n .addComponent(radioTituloOpcion1)\n .addGap(18, 18, 18)\n .addComponent(radioTituloOpcion2)\n .addGap(18, 18, 18)\n .addComponent(radioTituloOpcion3)\n .addGap(18, 18, 18)\n .addComponent(botonRespuesta))\n .addComponent(jLabel1))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(etiquetaRespuesta, javax.swing.GroupLayout.PREFERRED_SIZE, 39, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(69, Short.MAX_VALUE))\n );\n\n pack();\n }",
"public Component getPanelControl() {\n\t\tTableSorter sorterOperaciones = new TableSorter(modeloOperaciones);\n\t\tJTable tablaOperaciones = new JTable(sorterOperaciones);\n\t\tsorterOperaciones.setTableHeader(tablaOperaciones.getTableHeader());\n\t\tJScrollPane panelScrollDerecha = new JScrollPane(tablaOperaciones);\n\t\tpanelScrollDerecha.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);\n\t\tpanelDerecha = new FakeInternalFrame(\"Log de Operaciones\", panelScrollDerecha);\n\n\t\tTableSorter sorterPrecios = new TableSorter(modeloPrecios);\n\t\tJTable tablaPrecios = new JTable(sorterPrecios);\n\t\tsorterPrecios.setTableHeader(tablaPrecios.getTableHeader());\n\t\ttablaPrecios.getColumn(tablaPrecios.getColumnName(1)).setCellRenderer(modeloPrecios.getRenderer());\n\n\t\tJScrollPane panelScrollIzqAbajo = new JScrollPane(tablaPrecios);\n\t\tpanelScrollIzqAbajo.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);\n\t\tpanelIzqAbajo = new FakeInternalFrame(\"Precios en bolsa\", panelScrollIzqAbajo);\n\n\t\t//panelSecundario = new JSplitPane(JSplitPane.VERTICAL_SPLIT, panelIzqAbajo, panelIzqArriba);\n\t\tpanelPrincipal = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, panelIzqAbajo, panelDerecha);\n\n\t\tpanelPrincipal.setDividerLocation(300);\n\t\t//panelSecundario.setDividerLocation(300);\n\n\t\tpanelIzqAbajo.setPreferredSize(new Dimension(250, 300));\n\t\tpanelDerecha.setPreferredSize(new Dimension(550, 600));\n\n\t\treturn panelPrincipal;\n\t}",
"private JPanel getJPanelMethod() {\r\n\t\t// if (jPanelMethod== null) {\r\n\t\tjPanelMethod = new JPanel();\r\n\t\tjPanelMethod.setLayout(new BoxLayout(jPanelMethod, BoxLayout.Y_AXIS));\r\n\t\t//jPanelMethod.setLayout(new FlowLayout(FlowLayout.CENTER, 5, 5));\r\n\t\tjPanelMethod.setBorder(new TitledBorder(null, \"Method\", TitledBorder.LEADING, TitledBorder.TOP, null, null));\t\r\n\t\tjPanelMethod.add(getJRadioButtonButtZero());\r\n\t\tjPanelMethod.add(getJRadioButtonButtConst());\r\n\t\tjPanelMethod.add(getJRadioButtonButtCopy());\r\n\t\tjPanelMethod.add(getJRadioButtonButtReflect());\r\n\t\tjPanelMethod.add(getJRadioButtonButtWrap());\r\n\t\t// jPanelMethod.addSeparator();\r\n\t\tthis.setButtonGroupMethod(); // Grouping of JRadioButtons\r\n\t\t// }\r\n\t\treturn jPanelMethod;\r\n\t}",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n grupo = new javax.swing.ButtonGroup();\n jPanel2 = new javax.swing.JPanel();\n jLabel9 = new javax.swing.JLabel();\n txtTipo = new javax.swing.JTextField();\n txtDescricao = new javax.swing.JTextField();\n jLabel8 = new javax.swing.JLabel();\n jLabel1 = new javax.swing.JLabel();\n txtNome = new javax.swing.JTextField();\n btnSalvar = new javax.swing.JButton();\n btnVoltar = new javax.swing.JButton();\n btnCancelar = new javax.swing.JButton();\n jPanel1 = new javax.swing.JPanel();\n jLabel2 = new javax.swing.JLabel();\n jLabel3 = new javax.swing.JLabel();\n txtLucro = new javax.swing.JTextField();\n jLabel4 = new javax.swing.JLabel();\n jPanel3 = new javax.swing.JPanel();\n txtEstoque = new javax.swing.JTextField();\n txtCusto = new javax.swing.JSpinner();\n txtVenda = new javax.swing.JSpinner();\n jPanel4 = new javax.swing.JPanel();\n jRadioButton1 = new javax.swing.JRadioButton();\n jRadioButton2 = new javax.swing.JRadioButton();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));\n\n jPanel2.setBorder(javax.swing.BorderFactory.createTitledBorder(null, \"PRODUTOS\", javax.swing.border.TitledBorder.CENTER, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font(\"Dialog\", 1, 18))); // NOI18N\n\n jLabel9.setText(\"Tipo:\");\n\n jLabel8.setText(\"Descrição:\");\n\n jLabel1.setText(\"Nome : \");\n\n txtNome.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n txtNomeActionPerformed(evt);\n }\n });\n\n btnSalvar.setText(\"Salvar\");\n btnSalvar.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnSalvarActionPerformed(evt);\n }\n });\n\n btnVoltar.setText(\"Voltar\");\n btnVoltar.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnVoltarActionPerformed(evt);\n }\n });\n\n btnCancelar.setText(\"Cancelar\");\n btnCancelar.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnCancelarActionPerformed(evt);\n }\n });\n\n jPanel1.setBorder(javax.swing.BorderFactory.createEtchedBorder());\n\n jLabel2.setText(\"Valor de Custo:\");\n\n jLabel3.setText(\"Lucro(%):\");\n\n jLabel4.setText(\"Valor de Venda:\");\n\n jPanel3.setBorder(javax.swing.BorderFactory.createTitledBorder(\"ESTOQUE\"));\n\n txtEstoque.setEditable(false);\n txtEstoque.setFont(new java.awt.Font(\"Dialog\", 0, 36)); // NOI18N\n txtEstoque.setHorizontalAlignment(javax.swing.JTextField.CENTER);\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 .addGap(25, 25, 25)\n .addComponent(txtEstoque, javax.swing.GroupLayout.PREFERRED_SIZE, 122, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n jPanel3Layout.setVerticalGroup(\n jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel3Layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(txtEstoque, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n\n txtCusto.setModel(new javax.swing.SpinnerNumberModel(0.0f, 0.0f, null, 1.0f));\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(jPanel1Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(jLabel4)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(txtVenda))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(jLabel3)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(txtLucro, javax.swing.GroupLayout.PREFERRED_SIZE, 64, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(jLabel2)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(txtCusto, javax.swing.GroupLayout.PREFERRED_SIZE, 66, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGap(0, 0, Short.MAX_VALUE))))\n .addContainerGap())\n );\n jPanel1Layout.setVerticalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel2)\n .addComponent(txtCusto, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel3)\n .addComponent(txtLucro, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel4)\n .addComponent(txtVenda, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 29, Short.MAX_VALUE)\n .addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(20, 20, 20))\n );\n\n jPanel4.setBorder(javax.swing.BorderFactory.createTitledBorder(\"FORNECEDOR\"));\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 .addGap(0, 508, Short.MAX_VALUE)\n );\n jPanel4Layout.setVerticalGroup(\n jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 69, Short.MAX_VALUE)\n );\n\n jRadioButton1.setText(\"jRadioButton1\");\n jRadioButton1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jRadioButton1ActionPerformed(evt);\n }\n });\n\n jRadioButton2.setText(\"jRadioButton2\");\n jRadioButton2.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jRadioButton2ActionPerformed(evt);\n }\n });\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 .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addComponent(jLabel9)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(txtTipo, javax.swing.GroupLayout.PREFERRED_SIZE, 468, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addComponent(jLabel8)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(txtDescricao))\n .addComponent(jPanel4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addComponent(jLabel1)\n .addGap(21, 21, 21)\n .addComponent(txtNome)))\n .addGap(18, 18, 18)\n .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addGap(0, 0, Short.MAX_VALUE)\n .addComponent(btnSalvar)\n .addGap(18, 18, 18)\n .addComponent(btnVoltar)\n .addGap(18, 18, 18)\n .addComponent(btnCancelar)))\n .addContainerGap())\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addGap(130, 130, 130)\n .addComponent(jRadioButton1)\n .addGap(38, 38, 38)\n .addComponent(jRadioButton2)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n jPanel2Layout.setVerticalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jRadioButton1)\n .addComponent(jRadioButton2))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(btnVoltar)\n .addComponent(btnCancelar)\n .addComponent(btnSalvar)))\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addGap(16, 16, 16)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel1)\n .addComponent(txtNome, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel8)\n .addComponent(txtDescricao, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel9)\n .addComponent(txtTipo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addComponent(jPanel4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(0, 0, Short.MAX_VALUE)))\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.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addContainerGap())\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addContainerGap())\n );\n\n pack();\n }",
"protected JPanel getModelPane() {\n JPanel result = new JPanel(new BorderLayout());\n ButtonGroup radios = new ButtonGroup();\n JPanel radioPanel = new JPanel();\n radioPanel.setLayout(new BoxLayout(radioPanel, BoxLayout.Y_AXIS));\n radioPanel.setBorder(BorderFactory.createTitledBorder(\n \"select model & object information source\"));\n\n expModelReflect = new JRadioButton(\"ReflectionFacade\");\n radios.add(expModelReflect);\n expModelReflect.setSelected(true);\n JTextArea explReflect = new JTextArea(\n \" contains the \\\"Person-Company\\\" model\\n\" + \n \" out of the OCL-Sepcification via reflection\\n\" + \n \" (Source and Binarys have to be in the same folder)\");\n explReflect.setEditable(false);\n explReflect.setOpaque(false);\n explReflect.setAlignmentX(0);\n\n expModelDummy = new JRadioButton(\"DummyFacade\");\n radios.add(expModelDummy);\n String expl = \" contains a simple model with classes A and B\\n\" + \n \" explained in the source of: \\n\" + \n \" tudresden.ocl.interp.test.ABDummyFacade\\n\" + \n \" Does not work with usage of oclType\";\n JTextArea explDummy = new JTextArea(expl);\n explDummy.setEditable(false);\n explDummy.setOpaque(false);\n explDummy.setAlignmentX(0);\n\n\tRadioListener rl = new RadioListener();\n\texpModelReflect.addActionListener(rl);\n\texpModelDummy.addActionListener(rl);\n\n radioPanel.add(expModelReflect);\n radioPanel.add(explReflect);\n radioPanel.add(expModelDummy);\n radioPanel.add(explDummy);\n\n \tclassPicture = new JLabel(getImage(\"interp/core/intern/company_class.gif\"));\n \tobjectPicture = new JLabel(getImage(\"interp/core/intern/company_object.gif\"));\n\t\n JPanel rightSide = new JPanel(new GridLayout(0, 1));\n rightSide.add(classPicture);\n rightSide.add(objectPicture);\n rightSide.setBorder(BorderFactory.createTitledBorder(\n \"The class and object information in UML\"));\n\t\n\trightSide.setPreferredSize(new Dimension(400,300));\n\t\n result.add(radioPanel,BorderLayout.WEST);\n result.add(rightSide);\n \n return panelAround(result);\n }",
"public DialogoBuscar(InterfazKaraoke pPrincipal) {\n\t\tsuper(pPrincipal, true);\n\t\t\n\t\tprincipal= pPrincipal;\n\t\tsetTitle( \"Buscar\" );\n setSize( 220, 250 );\n setLocationRelativeTo( principal );\n\t\topcSeleccionada = null;\n\t\t\n\t\tJPanel contenedor = new JPanel(new GridLayout(6, 1));\n\t\tcontenedor.setBorder(new EmptyBorder(10, 10, 10, 10));\n\t\t\n\t\t\n\t\t// TODO Cree el grupo de botones para los radios.\n\t\tButtonGroup btnGroup = new ButtonGroup();\n\t\t\n\t\t// TODO Inicialice los radios\n\t\tbtnRadios = new JRadioButton[5];\n\t\tbtnRadios [0] = new JRadioButton (CANCION_MAS_FACIL);\n\t\tbtnRadios [1] = new JRadioButton (CANCION_MAS_DIFICIL);\n\t\tbtnRadios [2] = new JRadioButton (CANCION_MAS_CORTA);\n\t\tbtnRadios [3] = new JRadioButton (CANCION_MAS_LARGA);\n\t\tbtnRadios [4] = new JRadioButton (ARTISTA_MAS_CANCIONES);\n\t\t\n\t\tfor (JRadioButton j: btnRadios)\n\t\t{\n\t\t\tj.setActionCommand(j.getText());\n\t\t\tj.addActionListener(this);\n\t\t}\n\t\t\n\t\t// TODO Agregue los radios al grupo de botones\n\t\tfor (JRadioButton j: btnRadios)\n\t\t\tbtnGroup.add(j);\n\t\t\n\t\t// TODO Agregue los radios al panel contenedor\n\t\tfor (JRadioButton j: btnRadios)\n\t\t\tcontenedor.add(j);\n\t\t\n\t\t// TODO Marque el primer radio como seleccionado \n\t\tbtnRadios [0].setSelected(true);\n\t\t\n\t\t// TODO Inicialice el atributo opcSeleccionada con el comando del radio seleccionado.\n\t\topcSeleccionada = btnRadios [0].getText();\n\t\t\n\t\tbtnBuscar = new JButton(BUSCAR);\n\t\tbtnBuscar.setActionCommand(BUSCAR);\n\t\tbtnBuscar.addActionListener(this);\n\t\tcontenedor.add(btnBuscar);\n\t\t\n\t\tadd(contenedor);\n\t}",
"public abstract void add(Field.RadioData radioData);",
"private void addToPanel(){\n getContentPane().add(jdpFondo);\n jtpcContenedor.add(jtpPanel);\n\tjtpcContenedor.add(jtpPanel2);\n jdpFondo.add(jtpcContenedor, BorderLayout.CENTER);\n jdpFondo.add(jpnlPanelPrincilal);\n }",
"public PanelSubMenuMedico() {\n initComponents();\n pnForm = null;\n pnViewer = null;\n observadores = new ArrayList<>();\n nombre = \"medico\";\n }",
"private JPanel makeFieldPanel(int type, int which)\r\n {\r\n\t JPanel panel = new JPanel();\r\n\t panel.setLayout(new BoxLayout(panel, BoxLayout.X_AXIS));\r\n panel.setBackground(new Color(168,168,168));\r\n\t panel.add(new JLabel(\" \"));\r\n\t \r\n\t panel.add(new JLabel(\"Field\"));\r\n\t panel.add(Box.createHorizontalStrut(GAP));\r\n\r\n\t JComboBox<String> field = new JComboBox<String>(fields);\r\n\t components[type][which][FormatData.F_FIELD] = field;\r\n\t \r\n\t setComboParams(field, FIELD_SIZE);\r\n field.setToolTipText(\"Select field to be included in output\");\r\n field.setSelectedIndex(0);\r\n\r\n\t panel.add(field);\r\n\t panel.add(Box.createHorizontalStrut(GAP));\r\n\t \r\n\t panel.add(new JLabel(\"Title\"));\r\n\t panel.add(Box.createHorizontalStrut(GAP));\r\n\r\n\t JTextField title = new JTextField();\r\n\t components[type][which][FormatData.F_TITLE] = title;\r\n title.setMinimumSize(TEXT_SIZE);\r\n title.setMaximumSize(TEXT_SIZE);\r\n title.setPreferredSize(TEXT_SIZE);\r\n title.setToolTipText(\"Title of field (Use \\\\n to skip lines)\");\r\n panel.add(title);\r\n\t panel.add(Box.createHorizontalStrut(GAP));\r\n \t \r\n\t panel.add(new JLabel(\"Format\"));\r\n\t panel.add(Box.createHorizontalStrut(GAP));\r\n\r\n\t JComboBox<String> format = new JComboBox<String>(formats);\r\n\t components[type][which][FormatData.F_FORMAT] = format;\r\n\t setComboParams(format, FORMAT_SIZE);\r\n format.setToolTipText(\"Selection controls the field format\");\r\n format.setSelectedItem(\"Normal\");\r\n panel.add(format);\r\n\t panel.add(Box.createHorizontalStrut(GAP));\r\n \r\n\t JComboBox<String> separator = new JComboBox<String>(separators);\r\n\t components[type][which][FormatData.F_SEPARATOR] = separator;\r\n\t setComboParams(separator, SEPARATOR_SIZE);\r\n separator.setToolTipText(\"Selection controls how field separates from other text\");\r\n\t panel.add(separator);\r\n\t panel.add(Box.createHorizontalStrut(GAP));\r\n\t \r\n\t if (type==FormatData.t.D_FLD.ordinal())\r\n\t {\t\t \r\n\t\t JLabel label = new JLabel(\"Position Before\");\r\n\t\t panel.add(label);\r\n\t\t panel.add(Box.createHorizontalStrut(GAP));\r\n\t\r\n\t\t JCheckBox position = new JCheckBox();\r\n\t components[type][which][FormatData.F_POSITION] = position;\r\n\t \r\n\t String tip = \"Position field before or after Definition\";\r\n\t \t \r\n\t position.setToolTipText(tip);\r\n\t\t panel.add(position);\r\n\t }\r\n\t panel.add(Box.createHorizontalGlue());\r\n\t return panel;\r\n }",
"public JPanel createPanel() {\n\t\t\r\n\t\tJPanel mainPanel = new JPanel();\r\n\t\tmainPanel.setLayout(new BoxLayout(mainPanel, BoxLayout.Y_AXIS));\r\n\t\tmainPanel.setBackground(Color.WHITE);\r\n\t\tmainPanel.setBorder(new CompoundBorder(\r\n\t\t\t\tBorderFactory.createLineBorder(new Color(0x3B70A3), 4),\r\n\t\t\t\tnew EmptyBorder(10, 20, 10, 20)));\r\n\r\n\t\t/*\r\n\t\t * Instruction\r\n\t\t */\t\r\n\t\tmainPanel.add(instructionPanel());\r\n\t\t\r\n\t\t\r\n\t\t// TODO: set task order for each group - make first 3 tasks = groups tasks\r\n\t\tmainPanel.add(messagesPanel());\r\n\t\tmainPanel.add(Box.createRigidArea(new Dimension(this.getWidth(), 5)));\r\n\r\n\t\tmainPanel.add(phonePanel());\r\n\t\tmainPanel.add(Box.createRigidArea(new Dimension(this.getWidth(), 5)));\r\n\r\n\t\tmainPanel.add(clockPanel());\r\n\t\tmainPanel.add(Box.createRigidArea(new Dimension(this.getWidth(), 5)));\r\n\r\n\t\tmainPanel.add(cameraPanel());\r\n\t\tmainPanel.add(Box.createRigidArea(new Dimension(this.getWidth(), 5)));\t\r\n\r\n\t\tmainPanel.add(contactPanel());\r\n\t\tmainPanel.add(Box.createRigidArea(new Dimension(this.getWidth(), 5)));\r\n\r\n\t\tmainPanel.add(galleryPanel());\r\n\t\t\r\n\t\treturn mainPanel;\r\n\t}",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n PrincipalPanel = new javax.swing.JPanel();\n Titulo = new javax.swing.JLabel();\n Botão1 = new javax.swing.JButton();\n Botão2 = new javax.swing.JButton();\n EstatisticaPanel = new javax.swing.JPanel();\n Finalizar1 = new javax.swing.JButton();\n NivelPanel = new javax.swing.JPanel();\n TituloNivel = new javax.swing.JLabel();\n Nivel1 = new javax.swing.JRadioButton();\n Nivel2 = new javax.swing.JRadioButton();\n Nivel3 = new javax.swing.JRadioButton();\n SairButton = new javax.swing.JButton();\n ResultadoPanel = new javax.swing.JPanel();\n Sair = new javax.swing.JButton();\n RodadaPanel = new javax.swing.JPanel();\n Finalizar = new javax.swing.JButton();\n MostrarResultados = new javax.swing.JButton();\n AdicionarRespostas = new javax.swing.JButton();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n setLocationByPlatform(true);\n setSize(new java.awt.Dimension(1000, 1000));\n getContentPane().setLayout(new java.awt.CardLayout());\n\n PrincipalPanel.setOpaque(false);\n PrincipalPanel.setPreferredSize(new java.awt.Dimension(597, 349));\n\n Titulo.setFont(new java.awt.Font(\"augie\", 1, 26)); // NOI18N\n Titulo.setForeground(new java.awt.Color(255, 255, 255));\n Titulo.setText(\"Termo Desconhecido\");\n\n Botão1.setBackground(new java.awt.Color(255, 0, 51));\n Botão1.setFont(new java.awt.Font(\"Hobo Std\", 0, 16)); // NOI18N\n Botão1.setForeground(new java.awt.Color(255, 255, 255));\n Botão1.setActionCommand(\"Começar\");\n Botão1.setLabel(\"Começar\");\n Botão1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n Botão1ActionPerformed(evt);\n }\n });\n\n Botão2.setBackground(new java.awt.Color(255, 0, 51));\n Botão2.setFont(new java.awt.Font(\"Hobo Std\", 0, 16)); // NOI18N\n Botão2.setForeground(new java.awt.Color(255, 255, 255));\n Botão2.setLabel(\"Histórico\");\n Botão2.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n Botão2ActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout PrincipalPanelLayout = new javax.swing.GroupLayout(PrincipalPanel);\n PrincipalPanel.setLayout(PrincipalPanelLayout);\n PrincipalPanelLayout.setHorizontalGroup(\n PrincipalPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(PrincipalPanelLayout.createSequentialGroup()\n .addGroup(PrincipalPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(PrincipalPanelLayout.createSequentialGroup()\n .addGap(151, 151, 151)\n .addComponent(Botão1)\n .addGap(49, 49, 49)\n .addComponent(Botão2))\n .addGroup(PrincipalPanelLayout.createSequentialGroup()\n .addGap(132, 132, 132)\n .addComponent(Titulo)))\n .addContainerGap(178, Short.MAX_VALUE))\n );\n PrincipalPanelLayout.setVerticalGroup(\n PrincipalPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(PrincipalPanelLayout.createSequentialGroup()\n .addContainerGap(144, Short.MAX_VALUE)\n .addComponent(Titulo)\n .addGap(84, 84, 84)\n .addGroup(PrincipalPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(Botão2, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(Botão1, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(46, 46, 46))\n );\n\n getContentPane().add(PrincipalPanel, \"card2\");\n\n EstatisticaPanel.setOpaque(false);\n EstatisticaPanel.setPreferredSize(new java.awt.Dimension(597, 349));\n\n Finalizar1.setBackground(new java.awt.Color(255, 0, 51));\n Finalizar1.setFont(new java.awt.Font(\"Hobo Std\", 0, 16)); // NOI18N\n Finalizar1.setForeground(new java.awt.Color(255, 255, 255));\n Finalizar1.setText(\"Menu\");\n Finalizar1.setToolTipText(\"\");\n Finalizar1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n Finalizar1ActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout EstatisticaPanelLayout = new javax.swing.GroupLayout(EstatisticaPanel);\n EstatisticaPanel.setLayout(EstatisticaPanelLayout);\n EstatisticaPanelLayout.setHorizontalGroup(\n EstatisticaPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, EstatisticaPanelLayout.createSequentialGroup()\n .addContainerGap(343, Short.MAX_VALUE)\n .addComponent(Finalizar1)\n .addGap(181, 181, 181))\n );\n EstatisticaPanelLayout.setVerticalGroup(\n EstatisticaPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, EstatisticaPanelLayout.createSequentialGroup()\n .addContainerGap(277, Short.MAX_VALUE)\n .addComponent(Finalizar1)\n .addGap(47, 47, 47))\n );\n\n getContentPane().add(EstatisticaPanel, \"card5\");\n\n NivelPanel.setOpaque(false);\n NivelPanel.setPreferredSize(new java.awt.Dimension(597, 349));\n\n TituloNivel.setFont(new java.awt.Font(\"augie\", 1, 24)); // NOI18N\n TituloNivel.setForeground(new java.awt.Color(255, 255, 255));\n TituloNivel.setText(\"Escolher o nivel\");\n\n Nivel1.setFont(new java.awt.Font(\"augie\", 1, 18)); // NOI18N\n Nivel1.setForeground(new java.awt.Color(255, 255, 255));\n Nivel1.setText(\"Nivel 1\");\n Nivel1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n Nivel1ActionPerformed(evt);\n }\n });\n\n Nivel2.setFont(new java.awt.Font(\"augie\", 1, 18)); // NOI18N\n Nivel2.setForeground(new java.awt.Color(255, 255, 255));\n Nivel2.setText(\"Nivel 2\");\n Nivel2.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n Nivel2ActionPerformed(evt);\n }\n });\n\n Nivel3.setFont(new java.awt.Font(\"augie\", 1, 18)); // NOI18N\n Nivel3.setForeground(new java.awt.Color(255, 255, 255));\n Nivel3.setText(\"Nivel 3\");\n Nivel3.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n Nivel3ActionPerformed(evt);\n }\n });\n\n SairButton.setBackground(new java.awt.Color(255, 0, 51));\n SairButton.setFont(new java.awt.Font(\"Hobo Std\", 0, 16)); // NOI18N\n SairButton.setForeground(new java.awt.Color(255, 255, 255));\n SairButton.setLabel(\"Menu\");\n SairButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n SairButtonActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout NivelPanelLayout = new javax.swing.GroupLayout(NivelPanel);\n NivelPanel.setLayout(NivelPanelLayout);\n NivelPanelLayout.setHorizontalGroup(\n NivelPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(NivelPanelLayout.createSequentialGroup()\n .addGroup(NivelPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(NivelPanelLayout.createSequentialGroup()\n .addGap(170, 170, 170)\n .addComponent(TituloNivel))\n .addGroup(NivelPanelLayout.createSequentialGroup()\n .addGap(229, 229, 229)\n .addGroup(NivelPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(Nivel3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(Nivel1)\n .addComponent(Nivel2))))\n .addContainerGap(224, Short.MAX_VALUE))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, NivelPanelLayout.createSequentialGroup()\n .addGap(0, 0, Short.MAX_VALUE)\n .addComponent(SairButton)\n .addGap(181, 181, 181))\n );\n NivelPanelLayout.setVerticalGroup(\n NivelPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(NivelPanelLayout.createSequentialGroup()\n .addGap(95, 95, 95)\n .addComponent(TituloNivel)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(Nivel1)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(Nivel2)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(Nivel3)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 31, Short.MAX_VALUE)\n .addComponent(SairButton)\n .addGap(47, 47, 47))\n );\n\n getContentPane().add(NivelPanel, \"card3\");\n\n ResultadoPanel.setOpaque(false);\n\n Sair.setBackground(new java.awt.Color(255, 0, 51));\n Sair.setFont(new java.awt.Font(\"Hobo Std\", 0, 16)); // NOI18N\n Sair.setForeground(new java.awt.Color(255, 255, 255));\n Sair.setLabel(\"Menu\");\n Sair.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n SairActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout ResultadoPanelLayout = new javax.swing.GroupLayout(ResultadoPanel);\n ResultadoPanel.setLayout(ResultadoPanelLayout);\n ResultadoPanelLayout.setHorizontalGroup(\n ResultadoPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, ResultadoPanelLayout.createSequentialGroup()\n .addContainerGap(343, Short.MAX_VALUE)\n .addComponent(Sair)\n .addGap(181, 181, 181))\n );\n ResultadoPanelLayout.setVerticalGroup(\n ResultadoPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, ResultadoPanelLayout.createSequentialGroup()\n .addContainerGap(277, Short.MAX_VALUE)\n .addComponent(Sair)\n .addGap(47, 47, 47))\n );\n\n getContentPane().add(ResultadoPanel, \"card6\");\n\n RodadaPanel.setOpaque(false);\n RodadaPanel.setPreferredSize(new java.awt.Dimension(597, 349));\n\n Finalizar.setBackground(new java.awt.Color(255, 0, 51));\n Finalizar.setFont(new java.awt.Font(\"Hobo Std\", 0, 16)); // NOI18N\n Finalizar.setForeground(new java.awt.Color(255, 255, 255));\n Finalizar.setLabel(\"Menu\");\n Finalizar.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n FinalizarActionPerformed(evt);\n }\n });\n\n MostrarResultados.setBackground(new java.awt.Color(255, 0, 51));\n MostrarResultados.setFont(new java.awt.Font(\"Hobo Std\", 0, 16)); // NOI18N\n MostrarResultados.setForeground(new java.awt.Color(255, 255, 255));\n MostrarResultados.setToolTipText(\"\");\n MostrarResultados.setEnabled(false);\n MostrarResultados.setLabel(\"Resultado\");\n MostrarResultados.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n MostrarResultadosActionPerformed(evt);\n }\n });\n\n AdicionarRespostas.setBackground(new java.awt.Color(255, 0, 51));\n AdicionarRespostas.setFont(new java.awt.Font(\"Hobo Std\", 0, 16)); // NOI18N\n AdicionarRespostas.setForeground(new java.awt.Color(255, 255, 255));\n AdicionarRespostas.setText(\"Responder\");\n AdicionarRespostas.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n AdicionarRespostasActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout RodadaPanelLayout = new javax.swing.GroupLayout(RodadaPanel);\n RodadaPanel.setLayout(RodadaPanelLayout);\n RodadaPanelLayout.setHorizontalGroup(\n RodadaPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(RodadaPanelLayout.createSequentialGroup()\n .addGap(109, 109, 109)\n .addComponent(AdicionarRespostas)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(MostrarResultados)\n .addGap(18, 18, 18)\n .addComponent(Finalizar)\n .addContainerGap(181, Short.MAX_VALUE))\n );\n RodadaPanelLayout.setVerticalGroup(\n RodadaPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(RodadaPanelLayout.createSequentialGroup()\n .addGap(282, 282, 282)\n .addGroup(RodadaPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(Finalizar)\n .addComponent(MostrarResultados, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(AdicionarRespostas))\n .addGap(47, 47, 47))\n );\n\n AdicionarRespostas.getAccessibleContext().setAccessibleParent(RodadaPanel);\n\n getContentPane().add(RodadaPanel, \"card4\");\n\n setSize(new java.awt.Dimension(613, 388));\n setLocationRelativeTo(null);\n }",
"public DCrearDisco( InterfazDiscotienda id ){\r\n super( id, true );\r\n principal = id;\r\n\r\n panelDatos = new PanelCrearDisco( );\r\n panelBotones = new PanelBotonesDisco( this );\r\n\r\n getContentPane( ).add( panelDatos, BorderLayout.CENTER );\r\n getContentPane( ).add( panelBotones, BorderLayout.SOUTH );\r\n\r\n setTitle( \"Crear Disco\" );\r\n pack();\r\n }",
"private JPanel getControlPanel() {\n\t\tJPanel controlPanel = new JPanel();\n\t\t\n\t\tTitledBorder border = new TitledBorder(\" CONTROL PANEL\");\n\t\tborder.setTitleFont(new Font(\"TimesNewRoman\", Font.BOLD, 12));\n\t\tcontrolPanel.setBorder(border);\n\t\tcontrolPanel.setBackground(new Color(245, 214, 196));\n\t\tcontrolPanel.setPreferredSize(new Dimension(595, 50));\n\t\t\n\t\tJRadioButton viewRcmButton = new JRadioButton(\"View RCM\");\n\t\tviewRcmButton.setSelected(true);\n\t\t\n\t\tJRadioButton addRcmButton = new JRadioButton(\"Add RCM\");\n\t\t\n\t\tJRadioButton removeRcmButton = new JRadioButton(\"Remove RCM\");\n\t\t\n\t\tJRadioButton manageRcmButton = new JRadioButton(\"Manage RCM\");\n\t\t\n\t\tJRadioButton manageItemButton = new JRadioButton(\"Manage Items\");\n\t\t\n\t\tButtonGroup group = new ButtonGroup();\n\t group.add(viewRcmButton);\n\t group.add(addRcmButton);\n\t group.add(removeRcmButton);\n\t group.add(manageRcmButton);\n\t group.add(manageItemButton);\n\t \n\t viewRcmButton.addActionListener(new ActionListener() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tviewRcmButtonHandler();\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t \n\t addRcmButton.addActionListener(new ActionListener() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\taddRcmButtonHandler();\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t \n\t removeRcmButton.addActionListener(new ActionListener() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tremoveRcmButtonHandler();\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t \n\t manageRcmButton.addActionListener(new ActionListener() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tmanageRcmButtonHandler();\n\t\t\t\t\n\t\t\t}\n\t\t});\n\n\t\t\n\t manageItemButton.addActionListener(new ActionListener() {\n\t\n\t \t@Override\n\t \tpublic void actionPerformed(ActionEvent e) {\n\t \t\tmanageItemButtonHandler();\n\t\t\n\t \t}\n\t });\n\t controlPanel.add(viewRcmButton);\n\t controlPanel.add(addRcmButton);\n\t controlPanel.add(removeRcmButton);\n\t controlPanel.add(manageRcmButton);\n\t controlPanel.add(manageItemButton);\n\t \n\t\treturn controlPanel;\n\t}",
"private void initComponents() {\n optModeButtonGroup = new javax.swing.ButtonGroup();\n optModePanel = new javax.swing.JPanel();\n droopRadioButton = new javax.swing.JRadioButton();\n isochRadioButton = new javax.swing.JRadioButton();\n rLabel = new javax.swing.JLabel();\n rTextField = new javax.swing.JTextField();\n fp1Label = new javax.swing.JLabel();\n fp1TextField = new javax.swing.JTextField();\n fp2Label = new javax.swing.JLabel();\n fp2TextField = new javax.swing.JTextField();\n fp3Label = new javax.swing.JLabel();\n fp3TextField = new javax.swing.JTextField();\n pmaxLabel = new javax.swing.JLabel();\n pmaxTextField = new javax.swing.JTextField();\n pminLabel = new javax.swing.JLabel();\n pminTextField = new javax.swing.JTextField();\n t1Label = new javax.swing.JLabel();\n t1TextField = new javax.swing.JTextField();\n t2Label = new javax.swing.JLabel();\n t2TextField = new javax.swing.JTextField();\n t3Label = new javax.swing.JLabel();\n t3TextField = new javax.swing.JTextField();\n t4Label = new javax.swing.JLabel();\n t4TextField = new javax.swing.JTextField();\n t5Label = new javax.swing.JLabel();\n t5TextField = new javax.swing.JTextField();\n\n optModePanel.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)), \"Operation Mode\", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font(\"Dialog\", 0, 10)));\n optModeButtonGroup.add(droopRadioButton);\n droopRadioButton.setFont(new java.awt.Font(\"Dialog\", 0, 12));\n droopRadioButton.setSelected(true);\n droopRadioButton.setText(\"Droop \");\n droopRadioButton.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));\n droopRadioButton.setMargin(new java.awt.Insets(0, 0, 0, 0));\n optModePanel.add(droopRadioButton);\n\n optModeButtonGroup.add(isochRadioButton);\n isochRadioButton.setFont(new java.awt.Font(\"Dialog\", 0, 12));\n isochRadioButton.setText(\"Isoch\");\n isochRadioButton.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));\n isochRadioButton.setMargin(new java.awt.Insets(0, 0, 0, 0));\n optModePanel.add(isochRadioButton);\n\n rLabel.setFont(new java.awt.Font(\"Dialog\", 0, 12));\n rLabel.setText(\"R(%)\");\n rLabel.setAlignmentX(1.0F);\n\n rTextField.setColumns(5);\n rTextField.setFont(new java.awt.Font(\"Dialog\", 0, 12));\n rTextField.setText(\"5.0\");\n rTextField.setAlignmentX(1.0F);\n\n fp1Label.setFont(new java.awt.Font(\"Dialog\", 0, 12));\n fp1Label.setText(\"Fp1(pu)\");\n fp1Label.setAlignmentX(1.0F);\n\n fp1TextField.setColumns(5);\n fp1TextField.setFont(new java.awt.Font(\"Dialog\", 0, 12));\n fp1TextField.setText(\"0.3\");\n fp1TextField.setAlignmentX(1.0F);\n\n fp2Label.setFont(new java.awt.Font(\"Dialog\", 0, 12));\n fp2Label.setText(\"Fp2(pu)\");\n fp2Label.setAlignmentX(1.0F);\n\n fp2TextField.setColumns(5);\n fp2TextField.setFont(new java.awt.Font(\"Dialog\", 0, 12));\n fp2TextField.setText(\"0.4\");\n fp2TextField.setAlignmentX(1.0F);\n\n fp3Label.setFont(new java.awt.Font(\"Dialog\", 0, 12));\n fp3Label.setText(\"Fp3(pu)\");\n fp3Label.setAlignmentX(2.0F);\n\n fp3TextField.setColumns(5);\n fp3TextField.setFont(new java.awt.Font(\"Dialog\", 0, 12));\n fp3TextField.setText(\"0.3\");\n fp3TextField.setAlignmentX(2.0F);\n\n pmaxLabel.setFont(new java.awt.Font(\"Dialog\", 0, 12));\n pmaxLabel.setText(\"Pmax(pu)\");\n pmaxLabel.setAlignmentX(2.0F);\n\n pmaxTextField.setColumns(5);\n pmaxTextField.setFont(new java.awt.Font(\"Dialog\", 0, 12));\n pmaxTextField.setText(\"1.1\");\n pmaxTextField.setAlignmentX(2.0F);\n\n pminLabel.setFont(new java.awt.Font(\"Dialog\", 0, 12));\n pminLabel.setText(\"Pmin(pu)\");\n pminLabel.setAlignmentX(2.0F);\n\n pminTextField.setColumns(5);\n pminTextField.setFont(new java.awt.Font(\"Dialog\", 0, 12));\n pminTextField.setText(\"0.0\");\n pminTextField.setAlignmentX(2.0F);\n\n t1Label.setFont(new java.awt.Font(\"Dialog\", 0, 12));\n t1Label.setText(\"T1(s)\");\n\n t1TextField.setColumns(5);\n t1TextField.setFont(new java.awt.Font(\"Dialog\", 0, 12));\n t1TextField.setText(\"0.1\");\n\n t2Label.setFont(new java.awt.Font(\"Dialog\", 0, 12));\n t2Label.setText(\"T2(s)\");\n\n t2TextField.setColumns(5);\n t2TextField.setFont(new java.awt.Font(\"Dialog\", 0, 12));\n t2TextField.setText(\"0.1\");\n\n t3Label.setFont(new java.awt.Font(\"Dialog\", 0, 12));\n t3Label.setText(\"T3(s)\");\n\n t3TextField.setColumns(5);\n t3TextField.setFont(new java.awt.Font(\"Dialog\", 0, 12));\n t3TextField.setText(\"0.15\");\n\n t4Label.setFont(new java.awt.Font(\"Dialog\", 0, 12));\n t4Label.setText(\"T4(s)\");\n\n t4TextField.setColumns(5);\n t4TextField.setFont(new java.awt.Font(\"Dialog\", 0, 12));\n t4TextField.setText(\"4.0\");\n\n t5Label.setFont(new java.awt.Font(\"Dialog\", 0, 12));\n t5Label.setText(\"T5(s)\");\n\n t5TextField.setColumns(5);\n t5TextField.setFont(new java.awt.Font(\"Dialog\", 0, 12));\n t5TextField.setText(\"0.3\");\n\n org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)\n .add(org.jdesktop.layout.GroupLayout.TRAILING, layout.createSequentialGroup()\n .addContainerGap(63, Short.MAX_VALUE)\n .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)\n .add(layout.createSequentialGroup()\n .add(128, 128, 128)\n .add(optModePanel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 179, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))\n .add(layout.createSequentialGroup()\n .add(rLabel)\n .add(35, 35, 35)\n .add(rTextField, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)\n .add(30, 30, 30)\n .add(fp1Label)\n .add(30, 30, 30)\n .add(fp1TextField, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)\n .add(30, 30, 30)\n .add(fp2Label)\n .add(28, 28, 28)\n .add(fp2TextField, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))\n .add(layout.createSequentialGroup()\n .add(fp3Label)\n .add(20, 20, 20)\n .add(fp3TextField, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)\n .add(30, 30, 30)\n .add(pmaxLabel)\n .add(20, 20, 20)\n .add(pmaxTextField, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)\n .add(30, 30, 30)\n .add(pminLabel)\n .add(20, 20, 20)\n .add(pminTextField, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))\n .add(layout.createSequentialGroup()\n .add(t1Label)\n .add(34, 34, 34)\n .add(t1TextField, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)\n .add(30, 30, 30)\n .add(t2Label)\n .add(44, 44, 44)\n .add(t2TextField, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)\n .add(30, 30, 30)\n .add(t3Label)\n .add(42, 42, 42)\n .add(t3TextField, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))\n .add(layout.createSequentialGroup()\n .add(t4Label)\n .add(34, 34, 34)\n .add(t4TextField, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)\n .add(30, 30, 30)\n .add(t5Label)\n .add(44, 44, 44)\n .add(t5TextField, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)))\n .add(61, 61, 61))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)\n .add(layout.createSequentialGroup()\n .addContainerGap()\n .add(optModePanel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)\n .add(15, 15, 15)\n .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)\n .add(layout.createSequentialGroup()\n .add(2, 2, 2)\n .add(rLabel))\n .add(rTextField, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)\n .add(layout.createSequentialGroup()\n .add(2, 2, 2)\n .add(fp1Label))\n .add(fp1TextField, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)\n .add(layout.createSequentialGroup()\n .add(2, 2, 2)\n .add(fp2Label))\n .add(fp2TextField, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))\n .add(10, 10, 10)\n .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)\n .add(layout.createSequentialGroup()\n .add(2, 2, 2)\n .add(fp3Label))\n .add(fp3TextField, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)\n .add(layout.createSequentialGroup()\n .add(2, 2, 2)\n .add(pmaxLabel))\n .add(pmaxTextField, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)\n .add(layout.createSequentialGroup()\n .add(2, 2, 2)\n .add(pminLabel))\n .add(pminTextField, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))\n .add(10, 10, 10)\n .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)\n .add(layout.createSequentialGroup()\n .add(2, 2, 2)\n .add(t1Label))\n .add(t1TextField, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)\n .add(layout.createSequentialGroup()\n .add(2, 2, 2)\n .add(t2Label))\n .add(t2TextField, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)\n .add(layout.createSequentialGroup()\n .add(2, 2, 2)\n .add(t3Label))\n .add(t3TextField, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))\n .add(10, 10, 10)\n .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)\n .add(layout.createSequentialGroup()\n .add(2, 2, 2)\n .add(t4Label))\n .add(t4TextField, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)\n .add(layout.createSequentialGroup()\n .add(2, 2, 2)\n .add(t5Label))\n .add(t5TextField, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))\n .addContainerGap(33, Short.MAX_VALUE))\n );\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n radio_group = new javax.swing.ButtonGroup();\n label_header = new javax.swing.JLabel();\n label_soal = new javax.swing.JLabel();\n pilihan_a = new javax.swing.JRadioButton();\n pilihan_b = new javax.swing.JRadioButton();\n pilihan_c = new javax.swing.JRadioButton();\n pilihan_d = new javax.swing.JRadioButton();\n btn_next = new javax.swing.JButton();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n label_header.setFont(new java.awt.Font(\"8-bit pusab\", 1, 24)); // NOI18N\n label_header.setText(\"Soal\");\n\n label_soal.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n label_soal.setText(\"Lorem Ipsum sit dolor amet consectetur alit \");\n label_soal.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);\n\n radio_group.add(pilihan_a);\n pilihan_a.setText(\"pilihan a\");\n\n radio_group.add(pilihan_b);\n pilihan_b.setText(\"pilihan b\");\n pilihan_b.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n pilihan_bActionPerformed(evt);\n }\n });\n\n radio_group.add(pilihan_c);\n pilihan_c.setText(\"pilihan c\");\n pilihan_c.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n pilihan_cActionPerformed(evt);\n }\n });\n\n radio_group.add(pilihan_d);\n pilihan_d.setText(\"pilihan d\");\n\n btn_next.setText(\"Next\");\n btn_next.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btn_nextActionPerformed(evt);\n }\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.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(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(205, 205, 205)\n .addComponent(btn_next, javax.swing.GroupLayout.PREFERRED_SIZE, 102, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(layout.createSequentialGroup()\n .addGap(28, 28, 28)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(pilihan_a)\n .addComponent(pilihan_b)\n .addComponent(pilihan_c)\n .addComponent(pilihan_d)))\n .addGroup(layout.createSequentialGroup()\n .addGap(200, 200, 200)\n .addComponent(label_header)))\n .addGap(0, 0, Short.MAX_VALUE))\n .addComponent(label_soal, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 538, Short.MAX_VALUE))\n .addContainerGap())\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(label_header)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(label_soal, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(8, 8, 8)\n .addComponent(pilihan_a)\n .addGap(18, 18, 18)\n .addComponent(pilihan_b)\n .addGap(18, 18, 18)\n .addComponent(pilihan_c)\n .addGap(18, 18, 18)\n .addComponent(pilihan_d)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 15, Short.MAX_VALUE)\n .addComponent(btn_next, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(26, 26, 26))\n );\n\n pack();\n setLocationRelativeTo(null);\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jPanel1 = new javax.swing.JPanel();\n jTextFieldNomeAluno = new javax.swing.JTextField();\n jLabelNomeAluno = new javax.swing.JLabel();\n jScrollPane1 = new javax.swing.JScrollPane();\n jTextAreaAvisosSistema = new javax.swing.JTextArea();\n jButtonCadastrar = new javax.swing.JButton();\n jRadioAcesso = new javax.swing.JRadioButton();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);\n setTitle(\"Cadastro de alunos\");\n setBackground(new java.awt.Color(245, 245, 245));\n setBounds(new java.awt.Rectangle(0, 0, 0, 0));\n setResizable(false);\n\n jPanel1.setBackground(new java.awt.Color(173, 216, 230));\n jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder(null, \"Cadastro\", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font(\"Tahoma\", 1, 18))); // NOI18N\n\n jTextFieldNomeAluno.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jTextFieldNomeAlunoActionPerformed(evt);\n }\n });\n\n jLabelNomeAluno.setText(\"Nome do aluno\");\n\n jTextAreaAvisosSistema.setEditable(false);\n jTextAreaAvisosSistema.setColumns(20);\n jTextAreaAvisosSistema.setRows(5);\n jTextAreaAvisosSistema.setBorder(javax.swing.BorderFactory.createTitledBorder(null, \"Insira o dedo para cadastrar digital\", javax.swing.border.TitledBorder.CENTER, javax.swing.border.TitledBorder.DEFAULT_POSITION));\n jTextAreaAvisosSistema.setEnabled(false);\n jScrollPane1.setViewportView(jTextAreaAvisosSistema);\n\n jButtonCadastrar.setText(\"Cadastrar\");\n jButtonCadastrar.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButtonCadastrarActionPerformed(evt);\n }\n });\n\n jRadioAcesso.setText(\"Com acesso\");\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(jPanel1Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jScrollPane1)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(jLabelNomeAluno)\n .addGap(0, 0, Short.MAX_VALUE))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(jTextFieldNomeAluno, javax.swing.GroupLayout.PREFERRED_SIZE, 301, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jRadioAcesso)))\n .addContainerGap())\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(143, 143, 143)\n .addComponent(jButtonCadastrar)\n .addContainerGap(213, Short.MAX_VALUE))\n );\n jPanel1Layout.setVerticalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(37, 37, 37)\n .addComponent(jLabelNomeAluno)\n .addGap(6, 6, 6)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jTextFieldNomeAluno, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jRadioAcesso))\n .addGap(21, 21, 21)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 20, Short.MAX_VALUE)\n .addComponent(jButtonCadastrar))\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.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addContainerGap())\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n\n getAccessibleContext().setAccessibleName(\"Cadastro\");\n\n pack();\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n btnGroup = new javax.swing.ButtonGroup();\n ColorPieza = new javax.swing.ButtonGroup();\n btnIniciar = new javax.swing.ButtonGroup();\n PantallaInicio = new javax.swing.JPanel();\n labelNombre = new javax.swing.JLabel();\n txtjugador = new javax.swing.JTextField();\n btnIngresar = new javax.swing.JButton();\n jPanel1 = new javax.swing.JPanel();\n opc_Archivo = new javax.swing.JRadioButton();\n opc_Manual = new javax.swing.JRadioButton();\n jPanel2 = new javax.swing.JPanel();\n opc_blanca = new javax.swing.JRadioButton();\n opc_oscura = new javax.swing.JRadioButton();\n jLabel2 = new javax.swing.JLabel();\n jLabel3 = new javax.swing.JLabel();\n jPanel4 = new javax.swing.JPanel();\n opc_Usuario = new javax.swing.JRadioButton();\n opc_Computador = new javax.swing.JRadioButton();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n PantallaInicio.setBackground(new java.awt.Color(255, 255, 255));\n PantallaInicio.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0), 2));\n\n labelNombre.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\n labelNombre.setText(\"INGRESE SU NOMBRE: \");\n\n txtjugador.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\n\n btnIngresar.setText(\"ACEPTAR Y INGRESAR\");\n btnIngresar.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnIngresarActionPerformed(evt);\n }\n });\n\n opc_Archivo.setText(\"Cargar desde Archivo\");\n\n opc_Manual.setText(\"Cargar Manualmente\");\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(jPanel1Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(opc_Archivo)\n .addComponent(opc_Manual))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\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(opc_Archivo)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(opc_Manual)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n\n opc_blanca.setText(\"Jugar Piezas Blancas\");\n\n opc_oscura.setText(\"Jugar Piezas Oscuras\");\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 .addGap(18, 18, 18)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(opc_oscura)\n .addComponent(opc_blanca))\n .addContainerGap(21, Short.MAX_VALUE))\n );\n jPanel2Layout.setVerticalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(opc_blanca)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(opc_oscura)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n\n jLabel2.setText(\"Inicio de Juego\");\n\n jLabel3.setText(\"Seleccionar Equipo del Usuario\");\n\n opc_Usuario.setText(\"Iniciar Usuario\");\n\n opc_Computador.setText(\"Inicar Computador\");\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 .addGap(17, 17, 17)\n .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(opc_Computador)\n .addComponent(opc_Usuario))\n .addContainerGap(38, Short.MAX_VALUE))\n );\n jPanel4Layout.setVerticalGroup(\n jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel4Layout.createSequentialGroup()\n .addGap(15, 15, 15)\n .addComponent(opc_Usuario)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(opc_Computador)\n .addContainerGap(27, Short.MAX_VALUE))\n );\n\n javax.swing.GroupLayout PantallaInicioLayout = new javax.swing.GroupLayout(PantallaInicio);\n PantallaInicio.setLayout(PantallaInicioLayout);\n PantallaInicioLayout.setHorizontalGroup(\n PantallaInicioLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(PantallaInicioLayout.createSequentialGroup()\n .addGroup(PantallaInicioLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(PantallaInicioLayout.createSequentialGroup()\n .addGap(18, 18, 18)\n .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(PantallaInicioLayout.createSequentialGroup()\n .addGap(44, 44, 44)\n .addComponent(jLabel2)))\n .addGroup(PantallaInicioLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(PantallaInicioLayout.createSequentialGroup()\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jPanel4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(0, 18, Short.MAX_VALUE))\n .addGroup(PantallaInicioLayout.createSequentialGroup()\n .addGap(17, 17, 17)\n .addComponent(jLabel3))))\n .addGroup(PantallaInicioLayout.createSequentialGroup()\n .addGroup(PantallaInicioLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(PantallaInicioLayout.createSequentialGroup()\n .addGap(35, 35, 35)\n .addComponent(labelNombre)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(txtjugador, javax.swing.GroupLayout.PREFERRED_SIZE, 198, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(PantallaInicioLayout.createSequentialGroup()\n .addGap(180, 180, 180)\n .addComponent(btnIngresar)))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n PantallaInicioLayout.setVerticalGroup(\n PantallaInicioLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(PantallaInicioLayout.createSequentialGroup()\n .addGap(56, 56, 56)\n .addGroup(PantallaInicioLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(labelNombre)\n .addComponent(txtjugador, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(28, 28, 28)\n .addGroup(PantallaInicioLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel3))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(PantallaInicioLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(jPanel4, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addGap(41, 41, 41)\n .addComponent(btnIngresar)\n .addContainerGap(40, Short.MAX_VALUE))\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.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(PantallaInicio, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(PantallaInicio, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n\n pack();\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n grupo = new javax.swing.ButtonGroup();\n radiotituloOpcion0 = new javax.swing.JRadioButton();\n radiotituloOpcion1 = new javax.swing.JRadioButton();\n radiotituloOpcion2 = new javax.swing.JRadioButton();\n radiotituloOpcion3 = new javax.swing.JRadioButton();\n botonRespuesta = new javax.swing.JButton();\n imagen = new javax.swing.JLabel();\n siguiente = new javax.swing.JButton();\n Salir = new javax.swing.JButton();\n etiquetaTituloPregunta = new javax.swing.JLabel();\n etiquetaRespueta = new javax.swing.JLabel();\n Calificacion = new javax.swing.JLabel();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n grupo.add(radiotituloOpcion0);\n radiotituloOpcion0.setText(\"jRadioButton1\");\n\n grupo.add(radiotituloOpcion1);\n radiotituloOpcion1.setText(\"jRadioButton2\");\n\n grupo.add(radiotituloOpcion2);\n radiotituloOpcion2.setText(\"jRadioButton3\");\n\n grupo.add(radiotituloOpcion3);\n radiotituloOpcion3.setText(\"jRadioButton4\");\n\n botonRespuesta.setBackground(new java.awt.Color(153, 255, 153));\n botonRespuesta.setText(\"Verificar\");\n botonRespuesta.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n botonRespuestaActionPerformed(evt);\n }\n });\n\n imagen.setIcon(new javax.swing.ImageIcon(\"C:\\\\Users\\\\guill\\\\Documents\\\\NetBeansProjects\\\\Figuras_1\\\\images\\\\origen-nombres-informatica-nunca-hubieras-imaginado_2.jpg\")); // NOI18N\n\n siguiente.setBackground(new java.awt.Color(255, 102, 102));\n siguiente.setText(\"Siguiente\");\n siguiente.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n siguienteActionPerformed(evt);\n }\n });\n\n Salir.setBackground(new java.awt.Color(0, 204, 153));\n Salir.setText(\"Finalizar\");\n Salir.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n SalirActionPerformed(evt);\n }\n });\n\n etiquetaTituloPregunta.setText(\".\");\n\n etiquetaRespueta.setText(\".\");\n\n Calificacion.setText(\".\");\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.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addComponent(botonRespuesta)\n .addGap(60, 60, 60)\n .addComponent(siguiente)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(Salir)\n .addGap(26, 26, 26))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(radiotituloOpcion0)\n .addComponent(radiotituloOpcion2)\n .addComponent(radiotituloOpcion1)\n .addComponent(radiotituloOpcion3))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(imagen)\n .addContainerGap())\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(etiquetaTituloPregunta, javax.swing.GroupLayout.PREFERRED_SIZE, 648, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(etiquetaRespueta, javax.swing.GroupLayout.PREFERRED_SIZE, 393, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(0, 79, Short.MAX_VALUE))))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(Calificacion, javax.swing.GroupLayout.PREFERRED_SIZE, 403, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(38, 38, 38))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap(13, Short.MAX_VALUE)\n .addComponent(etiquetaTituloPregunta, javax.swing.GroupLayout.PREFERRED_SIZE, 37, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(radiotituloOpcion0)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(radiotituloOpcion1)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(radiotituloOpcion2)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(radiotituloOpcion3))\n .addComponent(imagen, javax.swing.GroupLayout.PREFERRED_SIZE, 274, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(63, 63, 63)\n .addComponent(Calificacion)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 28, Short.MAX_VALUE)\n .addComponent(etiquetaRespueta)\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(siguiente)\n .addComponent(Salir)\n .addComponent(botonRespuesta))\n .addGap(32, 32, 32))\n );\n\n pack();\n }",
"public RadioUI()\n {\n initComponents();\n }",
"private FactoryViewPanel buildAdvancedPanel()\r\n {\r\n FactoryViewPanel panel = new FactoryViewPanel();\r\n if (myIsImport)\r\n {\r\n addField(panel, myDataSourceModel.getIncludeInTimeline());\r\n }\r\n JPanel refreshPanel = buildRefreshPanel();\r\n panel.addLabelComponent(ControllerFactory.createLabel(myDataSourceModel.getAutoRefresh(), refreshPanel.getComponent(0)),\r\n refreshPanel);\r\n addField(panel, myDataSourceModel.getPointType());\r\n addField(panel, myDataSourceModel.getFeatureAltitude());\r\n addField(panel, myDataSourceModel.getPolygonFill());\r\n addField(panel, myDataSourceModel.getScalingMethod());\r\n addField(panel, myDataSourceModel.getShowLabels());\r\n return panel;\r\n }",
"public RadioGroupFieldEditor makeNewRadioGroupField(\n PreferencePage page, PreferencesTab tab,\n IPreferencesService service, String level,\t\n String name, String labelText, String toolTip, int numColumns,\n String[] values, String[] labels, Composite parent, boolean useGroup,\n boolean isEnabled, boolean isRemovable)\t\n {\n\n boolean onProjectLevelWithNullProject =\n level != null && level.equals(IPreferencesService.PROJECT_LEVEL) && service.getProject() == null;\n boolean notOnARealLevel = level == null;\n boolean onAFunctioningLevel = !onProjectLevelWithNullProject && !notOnARealLevel;\n\n RadioGroupFieldEditor field = new RadioGroupFieldEditor(\n page, tab, service, level, name, labelText, numColumns,\n values, labels, parent, useGroup);\n\n field.setToolTipText(toolTip);\n //Composite radioBoxControl = field.getRadioBoxControl(parent);\n //Composite radioBoxControlParent = field.getRadioBoxControl(parent).getParent();\n\n if (!onProjectLevelWithNullProject) {\n setField(field, parent);\n addRadioGroupPropertyChangeListeners(service, level, field, name, parent);\n } else {\n //setField(field, parent);\n //addStringPropertyChangeListeners(service, level, field, key, fieldHolder);\n }\n\n // Set the enabled state\n // Assumes that RadioGroups use the Group representation for the button box;\n // if a Group is not used, then fill out the elxe branches below accordingly\n if (onProjectLevelWithNullProject || notOnARealLevel) {\n if (useGroup) {\n Group radioGroup = (Group) field.getRadioBoxControl();\n radioGroup.setEnabled(false);\n } else {\n // do something else as appropriate to the representation\n }\n field.setEnabled(false, parent);\n } else if (onAFunctioningLevel) {\n if (useGroup) {\n Group radioGroup = (Group) field.getRadioBoxControl();\n radioGroup.setEnabled(isEnabled);\n } else {\n // do something else as appropriate to the representation\n }\n field.setEnabled(isEnabled, parent);\t\n }\n\n if (level == null) field.setRemovable(false);\t// can never remove from a field that doesn't have a stored value\n else if (level.equals(IPreferencesService.DEFAULT_LEVEL)) field.setRemovable(false);\t// can never remove from Default level\n else field.setRemovable(isRemovable);\n\n return field;\n }",
"public radioButtonClass()\n {\n setTitle(\"radioButtons\");\n setLayout(new FlowLayout());\n \n tf=new JTextField(\"DUDE!!! WTF\", 20);\n add(tf);\n \n plain_b= new JRadioButton(\"plain\",true); //for radio buttons one needs to be true so when they are grouped it unchecks all except one\n bold_b= new JRadioButton(\"bold\",false);\n italic_b= new JRadioButton(\"italic\",false);\n bi_b= new JRadioButton(\"bold&italic\",false);\n add(plain_b);\n add(bold_b);\n add(italic_b);\n add(bi_b);\n \n //needed to create a family so that each one knows who is checked/unchecked\n group= new ButtonGroup(); \n group.add(plain_b); //group.add as its being added to group only\n group.add(bold_b);\n group.add(italic_b);\n group.add(bi_b);\n \n \n //to create fonts that will be passsed directly as an object to handler class\n pf= new Font(\"Serif\",Font.PLAIN,15);\n bf= new Font(\"Serif\",Font.BOLD,15);\n itf= new Font(\"Serif\",Font.ITALIC,15);\n bif= new Font(\"Serif\",Font.BOLD+Font.ITALIC,15);\n tf.setFont(pf); //setting initial font for the text field\n \n //waits for event and directly pass object(Of font) to cnstructor \n plain_b.addItemListener(new Handler(pf));\n bold_b.addItemListener(new Handler(bf));\n italic_b.addItemListener(new Handler(itf));\n bi_b.addItemListener(new Handler(bif));\n }",
"public void crearPanel(){\n\n panel = new JPanel();\n this.getContentPane().add(panel);\n panel.setBackground(Color.CYAN);\n panel.setLayout(null);\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents()\n {\n\n jPFondo = new javax.swing.JPanel();\n jPInteracturador = new javax.swing.JPanel();\n rSPanelPaquete = new RSMaterialComponent.RSPanelBorder();\n jLabel2 = new javax.swing.JLabel();\n rSTF_Nombre_Emisor = new RSMaterialComponent.RSTextFieldOne();\n jPanel1 = new javax.swing.JPanel();\n jLabel1 = new javax.swing.JLabel();\n btnCerrarAltas = new RSMaterialComponent.RSButtonIconOne();\n jLabel6 = new javax.swing.JLabel();\n jLabel7 = new javax.swing.JLabel();\n jLabel8 = new javax.swing.JLabel();\n jLabel4 = new javax.swing.JLabel();\n rSTF_ApeP_Emisor = new RSMaterialComponent.RSTextFieldOne();\n vLabelErrModApeP = new javax.swing.JLabel();\n rSTF_ApeM_Emisor = new RSMaterialComponent.RSTextFieldOne();\n jLabel17 = new javax.swing.JLabel();\n vLabelErrModApeM = new javax.swing.JLabel();\n btnGuardarMod1 = new RSMaterialComponent.RSButtonIconOne();\n vLabelErrModNombre = new javax.swing.JLabel();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.DO_NOTHING_ON_CLOSE);\n setUndecorated(true);\n getContentPane().setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());\n\n jPFondo.setBackground(new java.awt.Color(0, 0, 0));\n\n rSPanelPaquete.setBackground(new java.awt.Color(255, 255, 255));\n rSPanelPaquete.setBgBorder(new java.awt.Color(0, 153, 204));\n rSPanelPaquete.addMouseMotionListener(new java.awt.event.MouseMotionAdapter()\n {\n public void mouseMoved(java.awt.event.MouseEvent evt)\n {\n rSPanelPaqueteMouseMoved(evt);\n }\n });\n\n jLabel2.setFont(new java.awt.Font(\"Segoe UI Semibold\", 1, 12)); // NOI18N\n jLabel2.setText(\"Nombre del emisor\");\n\n rSTF_Nombre_Emisor.setForeground(new java.awt.Color(0, 0, 0));\n rSTF_Nombre_Emisor.setBorderColor(new java.awt.Color(103, 177, 202));\n rSTF_Nombre_Emisor.setFont(new java.awt.Font(\"Segoe UI Semibold\", 1, 16)); // NOI18N\n rSTF_Nombre_Emisor.setPhColor(new java.awt.Color(0, 0, 0));\n rSTF_Nombre_Emisor.setPlaceholder(\"Ingrese nombre\");\n rSTF_Nombre_Emisor.addKeyListener(new java.awt.event.KeyAdapter()\n {\n public void keyReleased(java.awt.event.KeyEvent evt)\n {\n rSTF_Nombre_EmisorKeyReleased(evt);\n }\n public void keyTyped(java.awt.event.KeyEvent evt)\n {\n rSTF_Nombre_EmisorKeyTyped(evt);\n }\n });\n\n jPanel1.setBackground(new java.awt.Color(0, 153, 204));\n\n jLabel1.setFont(new java.awt.Font(\"Segoe UI Semibold\", 1, 24)); // NOI18N\n jLabel1.setForeground(new java.awt.Color(255, 255, 255));\n jLabel1.setText(\"Modificar datos de paquete\");\n\n btnCerrarAltas.setBackground(new java.awt.Color(0, 153, 204));\n btnCerrarAltas.setToolTipText(\"Cerrar Formulario\");\n btnCerrarAltas.setBackgroundHover(new java.awt.Color(103, 177, 202));\n btnCerrarAltas.setIcons(rojeru_san.efectos.ValoresEnum.ICONS.CANCEL);\n btnCerrarAltas.setRound(15);\n btnCerrarAltas.addActionListener(new java.awt.event.ActionListener()\n {\n public void actionPerformed(java.awt.event.ActionEvent evt)\n {\n btnCerrarAltasActionPerformed(evt);\n }\n });\n\n jLabel6.setFont(new java.awt.Font(\"Segoe UI Semibold\", 1, 16)); // NOI18N\n jLabel6.setForeground(new java.awt.Color(255, 255, 255));\n jLabel6.setText(\"Datos del emisor\");\n\n jLabel7.setBorder(javax.swing.BorderFactory.createMatteBorder(0, 0, 2, 0, new java.awt.Color(255, 255, 255)));\n\n jLabel8.setBorder(javax.swing.BorderFactory.createMatteBorder(0, 0, 2, 0, new java.awt.Color(255, 255, 255)));\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 .addGap(154, 154, 154)\n .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 304, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(btnCerrarAltas, javax.swing.GroupLayout.PREFERRED_SIZE, 56, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(19, 19, 19))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(66, 66, 66)\n .addComponent(jLabel7, javax.swing.GroupLayout.PREFERRED_SIZE, 158, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(25, 25, 25)\n .addComponent(jLabel6)\n .addGap(18, 18, 18)\n .addComponent(jLabel8, javax.swing.GroupLayout.PREFERRED_SIZE, 158, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(93, Short.MAX_VALUE))\n );\n jPanel1Layout.setVerticalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 79, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(15, 15, 15)\n .addComponent(btnCerrarAltas, javax.swing.GroupLayout.PREFERRED_SIZE, 55, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel7, javax.swing.GroupLayout.PREFERRED_SIZE, 9, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel8, javax.swing.GroupLayout.PREFERRED_SIZE, 9, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel6, javax.swing.GroupLayout.PREFERRED_SIZE, 26, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addContainerGap(23, Short.MAX_VALUE))\n );\n\n jLabel4.setFont(new java.awt.Font(\"Segoe UI Semibold\", 1, 12)); // NOI18N\n jLabel4.setText(\"Apellido Paterno\");\n\n rSTF_ApeP_Emisor.setForeground(new java.awt.Color(0, 0, 0));\n rSTF_ApeP_Emisor.setBorderColor(new java.awt.Color(103, 177, 202));\n rSTF_ApeP_Emisor.setFont(new java.awt.Font(\"Segoe UI Semibold\", 1, 16)); // NOI18N\n rSTF_ApeP_Emisor.setPhColor(new java.awt.Color(0, 0, 0));\n rSTF_ApeP_Emisor.setPlaceholder(\"Ingrese el apellido paterno\");\n rSTF_ApeP_Emisor.addFocusListener(new java.awt.event.FocusAdapter()\n {\n public void focusLost(java.awt.event.FocusEvent evt)\n {\n rSTF_ApeP_EmisorFocusLost(evt);\n }\n });\n rSTF_ApeP_Emisor.addKeyListener(new java.awt.event.KeyAdapter()\n {\n public void keyReleased(java.awt.event.KeyEvent evt)\n {\n rSTF_ApeP_EmisorKeyReleased(evt);\n }\n public void keyTyped(java.awt.event.KeyEvent evt)\n {\n rSTF_ApeP_EmisorKeyTyped(evt);\n }\n });\n\n vLabelErrModApeP.setFont(new java.awt.Font(\"Segoe UI Semibold\", 1, 12)); // NOI18N\n vLabelErrModApeP.setForeground(java.awt.Color.red);\n vLabelErrModApeP.setText(\"Error, verifique apellido paterno\");\n\n rSTF_ApeM_Emisor.setForeground(new java.awt.Color(0, 0, 0));\n rSTF_ApeM_Emisor.setBorderColor(new java.awt.Color(103, 177, 202));\n rSTF_ApeM_Emisor.setFont(new java.awt.Font(\"Segoe UI Semibold\", 1, 16)); // NOI18N\n rSTF_ApeM_Emisor.setPhColor(new java.awt.Color(0, 0, 0));\n rSTF_ApeM_Emisor.setPlaceholder(\"Ingrese el apellido materno\");\n rSTF_ApeM_Emisor.addFocusListener(new java.awt.event.FocusAdapter()\n {\n public void focusLost(java.awt.event.FocusEvent evt)\n {\n rSTF_ApeM_EmisorFocusLost(evt);\n }\n });\n rSTF_ApeM_Emisor.addKeyListener(new java.awt.event.KeyAdapter()\n {\n public void keyReleased(java.awt.event.KeyEvent evt)\n {\n rSTF_ApeM_EmisorKeyReleased(evt);\n }\n public void keyTyped(java.awt.event.KeyEvent evt)\n {\n rSTF_ApeM_EmisorKeyTyped(evt);\n }\n });\n\n jLabel17.setFont(new java.awt.Font(\"Segoe UI Semibold\", 1, 12)); // NOI18N\n jLabel17.setText(\"Apellido Materno\");\n\n vLabelErrModApeM.setFont(new java.awt.Font(\"Segoe UI Semibold\", 1, 12)); // NOI18N\n vLabelErrModApeM.setForeground(java.awt.Color.red);\n vLabelErrModApeM.setText(\"Error, verifique apellido materno\");\n\n btnGuardarMod1.setBackground(new java.awt.Color(0, 153, 204));\n btnGuardarMod1.setToolTipText(\"Guardar modificaciones\");\n btnGuardarMod1.setBackgroundHover(new java.awt.Color(103, 177, 202));\n btnGuardarMod1.setIcons(rojeru_san.efectos.ValoresEnum.ICONS.SAVE);\n btnGuardarMod1.setRound(15);\n btnGuardarMod1.addMouseListener(new java.awt.event.MouseAdapter()\n {\n public void mouseEntered(java.awt.event.MouseEvent evt)\n {\n btnGuardarMod1MouseEntered(evt);\n }\n });\n btnGuardarMod1.addActionListener(new java.awt.event.ActionListener()\n {\n public void actionPerformed(java.awt.event.ActionEvent evt)\n {\n btnGuardarMod1ActionPerformed(evt);\n }\n });\n\n vLabelErrModNombre.setFont(new java.awt.Font(\"Segoe UI Semibold\", 1, 12)); // NOI18N\n vLabelErrModNombre.setForeground(java.awt.Color.red);\n vLabelErrModNombre.setText(\"Error, verifique nombre\");\n\n javax.swing.GroupLayout rSPanelPaqueteLayout = new javax.swing.GroupLayout(rSPanelPaquete);\n rSPanelPaquete.setLayout(rSPanelPaqueteLayout);\n rSPanelPaqueteLayout.setHorizontalGroup(\n rSPanelPaqueteLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(rSPanelPaqueteLayout.createSequentialGroup()\n .addContainerGap()\n .addGroup(rSPanelPaqueteLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel2)\n .addComponent(vLabelErrModNombre, javax.swing.GroupLayout.PREFERRED_SIZE, 175, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(rSTF_Nombre_Emisor, javax.swing.GroupLayout.PREFERRED_SIZE, 386, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addGroup(rSPanelPaqueteLayout.createSequentialGroup()\n .addGap(12, 12, 12)\n .addGroup(rSPanelPaqueteLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel4)\n .addComponent(jLabel17)\n .addGroup(rSPanelPaqueteLayout.createSequentialGroup()\n .addComponent(vLabelErrModApeM, javax.swing.GroupLayout.PREFERRED_SIZE, 180, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(btnGuardarMod1, javax.swing.GroupLayout.PREFERRED_SIZE, 56, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addComponent(rSTF_ApeP_Emisor, javax.swing.GroupLayout.PREFERRED_SIZE, 384, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(rSTF_ApeM_Emisor, javax.swing.GroupLayout.PREFERRED_SIZE, 384, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(vLabelErrModApeP))\n .addContainerGap())\n .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n );\n rSPanelPaqueteLayout.setVerticalGroup(\n rSPanelPaqueteLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(rSPanelPaqueteLayout.createSequentialGroup()\n .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(rSPanelPaqueteLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(rSPanelPaqueteLayout.createSequentialGroup()\n .addGap(27, 27, 27)\n .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 18, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(6, 6, 6)\n .addComponent(rSTF_Nombre_Emisor, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(vLabelErrModNombre, javax.swing.GroupLayout.PREFERRED_SIZE, 18, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(17, 17, 17)\n .addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 18, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(6, 6, 6)\n .addComponent(rSTF_ApeP_Emisor, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(6, 6, 6)\n .addComponent(vLabelErrModApeP, javax.swing.GroupLayout.PREFERRED_SIZE, 18, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(28, 28, 28)\n .addComponent(jLabel17, javax.swing.GroupLayout.PREFERRED_SIZE, 18, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(6, 6, 6)\n .addComponent(rSTF_ApeM_Emisor, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(6, 6, 6)\n .addComponent(vLabelErrModApeM, javax.swing.GroupLayout.PREFERRED_SIZE, 18, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(61, 61, 61))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, rSPanelPaqueteLayout.createSequentialGroup()\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(btnGuardarMod1, javax.swing.GroupLayout.PREFERRED_SIZE, 55, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap())))\n );\n\n javax.swing.GroupLayout jPInteracturadorLayout = new javax.swing.GroupLayout(jPInteracturador);\n jPInteracturador.setLayout(jPInteracturadorLayout);\n jPInteracturadorLayout.setHorizontalGroup(\n jPInteracturadorLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(rSPanelPaquete, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n );\n jPInteracturadorLayout.setVerticalGroup(\n jPInteracturadorLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(rSPanelPaquete, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n );\n\n javax.swing.GroupLayout jPFondoLayout = new javax.swing.GroupLayout(jPFondo);\n jPFondo.setLayout(jPFondoLayout);\n jPFondoLayout.setHorizontalGroup(\n jPFondoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPFondoLayout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jPInteracturador, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n jPFondoLayout.setVerticalGroup(\n jPFondoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPFondoLayout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jPInteracturador, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n\n getContentPane().add(jPFondo, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, 660, -1));\n\n pack();\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n grbtTurno = new javax.swing.ButtonGroup();\n jLabel1 = new javax.swing.JLabel();\n jLabel2 = new javax.swing.JLabel();\n jLabel3 = new javax.swing.JLabel();\n jLabel4 = new javax.swing.JLabel();\n txtRegFuncional = new javax.swing.JTextField();\n txtNome = new javax.swing.JTextField();\n txtEndereco = new javax.swing.JTextField();\n txtTelefone = new javax.swing.JTextField();\n jPanelTurno = new javax.swing.JPanel();\n rbtManha = new javax.swing.JRadioButton();\n rbtTarde = new javax.swing.JRadioButton();\n rbtNoite = new javax.swing.JRadioButton();\n btnConsultar = new javax.swing.JButton();\n btnInserir = new javax.swing.JButton();\n btnAlterar = new javax.swing.JButton();\n btnExcluir = new javax.swing.JButton();\n btnSair = new javax.swing.JButton();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n setTitle(\"Cadastro Atendente\");\n\n jLabel1.setText(\"Reg. Funcional\");\n\n jLabel2.setText(\"Nome\");\n\n jLabel3.setText(\"Endereço\");\n\n jLabel4.setText(\"Telefone\");\n\n txtNome.setEnabled(false);\n\n txtEndereco.setEnabled(false);\n\n txtTelefone.setEnabled(false);\n\n jPanelTurno.setBorder(javax.swing.BorderFactory.createTitledBorder(\"Turno\"));\n\n grbtTurno.add(rbtManha);\n rbtManha.setSelected(true);\n rbtManha.setText(\"Manhã\");\n rbtManha.setEnabled(false);\n\n grbtTurno.add(rbtTarde);\n rbtTarde.setText(\"Tarde\");\n rbtTarde.setEnabled(false);\n\n grbtTurno.add(rbtNoite);\n rbtNoite.setText(\"Noite\");\n rbtNoite.setEnabled(false);\n\n javax.swing.GroupLayout jPanelTurnoLayout = new javax.swing.GroupLayout(jPanelTurno);\n jPanelTurno.setLayout(jPanelTurnoLayout);\n jPanelTurnoLayout.setHorizontalGroup(\n jPanelTurnoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanelTurnoLayout.createSequentialGroup()\n .addComponent(rbtManha)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(rbtTarde)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(rbtNoite)\n .addContainerGap())\n );\n jPanelTurnoLayout.setVerticalGroup(\n jPanelTurnoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanelTurnoLayout.createSequentialGroup()\n .addGap(0, 0, Short.MAX_VALUE)\n .addGroup(jPanelTurnoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(rbtManha)\n .addComponent(rbtTarde)\n .addComponent(rbtNoite)))\n );\n\n btnConsultar.setText(\"Consultar\");\n btnConsultar.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnConsultarActionPerformed(evt);\n }\n });\n\n btnInserir.setText(\"Inserir\");\n btnInserir.setEnabled(false);\n btnInserir.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnInserirActionPerformed(evt);\n }\n });\n\n btnAlterar.setText(\"Alterar\");\n btnAlterar.setEnabled(false);\n btnAlterar.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnAlterarActionPerformed(evt);\n }\n });\n\n btnExcluir.setText(\"Excluir\");\n btnExcluir.setEnabled(false);\n btnExcluir.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnExcluirActionPerformed(evt);\n }\n });\n\n btnSair.setText(\"Sair\");\n btnSair.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnSairActionPerformed(evt);\n }\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.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(20, 20, 20)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(btnConsultar)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(btnInserir)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(btnAlterar)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(btnExcluir)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(btnSair))\n .addComponent(jPanelTurno, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jLabel1)\n .addComponent(jLabel2, javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel3, javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel4, javax.swing.GroupLayout.Alignment.LEADING))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(txtNome, javax.swing.GroupLayout.DEFAULT_SIZE, 250, Short.MAX_VALUE)\n .addComponent(txtEndereco)\n .addComponent(txtRegFuncional, javax.swing.GroupLayout.PREFERRED_SIZE, 120, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(txtTelefone, javax.swing.GroupLayout.PREFERRED_SIZE, 120, javax.swing.GroupLayout.PREFERRED_SIZE))))\n .addContainerGap(16, Short.MAX_VALUE))\n );\n\n layout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {btnAlterar, btnConsultar, btnExcluir, btnInserir, btnSair});\n\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(43, 43, 43)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel1)\n .addComponent(txtRegFuncional, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel2)\n .addComponent(txtNome, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel3)\n .addComponent(txtEndereco, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel4)\n .addComponent(txtTelefone, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addComponent(jPanelTurno, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(btnConsultar)\n .addComponent(btnInserir)\n .addComponent(btnAlterar)\n .addComponent(btnExcluir)\n .addComponent(btnSair))\n .addContainerGap(10, Short.MAX_VALUE))\n );\n\n layout.linkSize(javax.swing.SwingConstants.VERTICAL, new java.awt.Component[] {btnAlterar, btnConsultar, btnExcluir, btnInserir, btnSair});\n\n pack();\n }",
"protected final void setPanelDatos(){\n panel_datos.setBackground(fondo);\n panel_datos.setBorder(BorderFactory.createTitledBorder(null,\"Datos\",TitledBorder.CENTER,TitledBorder.DEFAULT_POSITION, titulo, titulos));\n\n titulo_funcion.setFont(titulo); \n titulo_funcion.setForeground(titulos);\n titulo_h.setFont(titulo); \n titulo_h.setForeground(titulos);\n titulo_x.setFont(titulo); \n titulo_x.setForeground(titulos);\n titulo_n.setFont(titulo); \n titulo_n.setForeground(titulos);\n titulo_condiciones.setFont(titulo); \n titulo_condiciones.setForeground(titulos);\n titulo_y.setFont(titulo); \n titulo_y.setForeground(titulos);\n titulo_val.setFont(titulo); \n titulo_val.setForeground(titulos);\n titulo_metodo.setFont(titulo); \n titulo_metodo.setForeground(titulos);\n\n calcular.setBackground(titulos);\n calcular.setBorder(BorderFactory.createLineBorder(fondo,2));\n\n limpiar.setBackground(titulos);\n limpiar.setBorder(BorderFactory.createLineBorder(fondo,2));\n\n agregar.setBackground(titulos);\n agregar.setBorder(BorderFactory.createLineBorder(fondo,2));\n\n funcion.setBorder(BorderFactory.createLineBorder(Color.BLACK));\n h.setBorder(BorderFactory.createLineBorder(Color.BLACK));\n x.setBorder(BorderFactory.createLineBorder(Color.BLACK));\n n.setBorder(BorderFactory.createLineBorder(Color.BLACK));\n y.setBorder(BorderFactory.createLineBorder(Color.BLACK));\n val.setBorder(BorderFactory.createLineBorder(Color.BLACK));\n variables.setBorder(BorderFactory.createLineBorder(Color.BLACK));\n\n GroupLayout panel_datosLayout = new GroupLayout(panel_datos);\n panel_datos.setLayout(panel_datosLayout);\n\n panel_datosLayout.setHorizontalGroup(\n panel_datosLayout.createParallelGroup(GroupLayout.Alignment.LEADING)\n .addGroup(panel_datosLayout.createSequentialGroup()\n .addGroup(panel_datosLayout.createParallelGroup(GroupLayout.Alignment.LEADING)\n .addGroup(panel_datosLayout.createSequentialGroup()\n .addContainerGap()\n .addComponent(titulo_funcion))\n .addGroup(panel_datosLayout.createSequentialGroup()\n .addContainerGap()\n .addComponent(titulo_metodo)\n .addPreferredGap(LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(metodo, GroupLayout.PREFERRED_SIZE, 95, GroupLayout.PREFERRED_SIZE))\n .addGroup(panel_datosLayout.createSequentialGroup()\n .addContainerGap()\n .addComponent(titulo_n)\n .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(n, GroupLayout.PREFERRED_SIZE, 63, GroupLayout.PREFERRED_SIZE))\n .addGroup(panel_datosLayout.createSequentialGroup()\n .addContainerGap()\n .addComponent(titulo_x)\n .addPreferredGap(LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(x, GroupLayout.PREFERRED_SIZE, 79, GroupLayout.PREFERRED_SIZE))\n .addGroup(panel_datosLayout.createSequentialGroup()\n .addContainerGap()\n .addComponent(titulo_h)\n .addPreferredGap(LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(h, GroupLayout.PREFERRED_SIZE, 58, GroupLayout.PREFERRED_SIZE))\n .addGroup(panel_datosLayout.createSequentialGroup()\n .addGap(56, 56, 56)\n .addComponent(calcular, GroupLayout.PREFERRED_SIZE, 81, GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(limpiar, GroupLayout.PREFERRED_SIZE, 89, GroupLayout.PREFERRED_SIZE))\n .addGroup(panel_datosLayout.createSequentialGroup()\n .addGap(99, 99, 99)\n .addComponent(agregar,GroupLayout.PREFERRED_SIZE, 89, GroupLayout.PREFERRED_SIZE))\n .addGroup(panel_datosLayout.createSequentialGroup()\n .addContainerGap()\n .addComponent(titulo_y)\n .addPreferredGap(LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(y, GroupLayout.PREFERRED_SIZE, 70, GroupLayout.PREFERRED_SIZE)\n .addGap(11, 11, 11)\n .addComponent(titulo_val)\n .addPreferredGap(LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(val, GroupLayout.PREFERRED_SIZE,50, GroupLayout.PREFERRED_SIZE)))\n .addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addGroup(panel_datosLayout.createSequentialGroup()\n .addContainerGap()\n .addGroup(panel_datosLayout.createParallelGroup(GroupLayout.Alignment.LEADING)\n .addGroup(panel_datosLayout.createSequentialGroup()\n .addComponent(funcion)\n .addContainerGap())\n .addGroup(panel_datosLayout.createSequentialGroup()\n .addComponent(titulo_condiciones)\n .addGap(0, 0, Short.MAX_VALUE))\n .addGroup(panel_datosLayout.createSequentialGroup()\n .addComponent(titulo_variables, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(variables, GroupLayout.PREFERRED_SIZE, 63, GroupLayout.PREFERRED_SIZE)\n .addGap(16, 16, 16))))\n );\n\n panel_datosLayout.setVerticalGroup(\n panel_datosLayout.createParallelGroup(GroupLayout.Alignment.LEADING)\n .addGroup(panel_datosLayout.createSequentialGroup()\n .addGroup(panel_datosLayout.createParallelGroup(GroupLayout.Alignment.BASELINE)\n .addComponent(titulo_variables)\n .addComponent(variables, GroupLayout.PREFERRED_SIZE, 24, GroupLayout.PREFERRED_SIZE))\n .addGap(5, 5, 5)\n .addComponent(titulo_funcion)\n .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(funcion, GroupLayout.PREFERRED_SIZE, 26, GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(titulo_condiciones)\n .addPreferredGap(LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(panel_datosLayout.createParallelGroup(GroupLayout.Alignment.TRAILING)\n .addComponent(titulo_y)\n .addGroup(panel_datosLayout.createParallelGroup(GroupLayout.Alignment.BASELINE)\n .addComponent(y, GroupLayout.PREFERRED_SIZE, 22, GroupLayout.PREFERRED_SIZE)\n .addComponent(titulo_val)\n .addComponent(val, GroupLayout.DEFAULT_SIZE, 24, Short.MAX_VALUE)))\n .addGap(11,11,11)\n .addComponent(agregar,GroupLayout.PREFERRED_SIZE, 28, GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED, 16, Short.MAX_VALUE)\n .addGroup(panel_datosLayout.createParallelGroup(GroupLayout.Alignment.TRAILING)\n .addComponent(titulo_h)\n .addComponent(h, GroupLayout.PREFERRED_SIZE,22, GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(panel_datosLayout.createParallelGroup(GroupLayout.Alignment.TRAILING)\n .addComponent(titulo_x)\n .addComponent(x, GroupLayout.PREFERRED_SIZE, 24, GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(panel_datosLayout.createParallelGroup(GroupLayout.Alignment.TRAILING)\n .addComponent(titulo_n)\n .addComponent(n, GroupLayout.PREFERRED_SIZE, 24, GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(panel_datosLayout.createParallelGroup(GroupLayout.Alignment.TRAILING)\n .addComponent(titulo_metodo)\n .addComponent(metodo, GroupLayout.PREFERRED_SIZE,24, GroupLayout.PREFERRED_SIZE))\n .addGap(28, 28, 28)\n .addGroup(panel_datosLayout.createParallelGroup(GroupLayout.Alignment.BASELINE)\n .addComponent(calcular, GroupLayout.PREFERRED_SIZE, 28, GroupLayout.PREFERRED_SIZE)\n .addComponent(limpiar, GroupLayout.PREFERRED_SIZE, 28, GroupLayout.PREFERRED_SIZE))\n .addGap(11, 11, 11))\n );\n }",
"public RadioButtonPanelBuilder add(String option)\r\n\t\t{\r\n\t\t\t\r\n\t\t\tSystem.out.println(\"[INFO] <RADIOBUTTON_PANEL_BUILDER> Running add\"); // Debug\r\n\t\t\t\r\n\t\t\tradioButtons[nextRadioButtonLocation] = new JRadioButton(option);\r\n\t\t\tnextRadioButtonLocation++;\r\n\t\t\t\r\n\t\t\treturn this;\r\n\t\t}",
"private JPanel getJPanel() {\r\n\t\tif (jPanel == null) {\r\n\t\t\ttitleFieldImage = new JLabel();\r\n\t\t\ttitleFieldImage.setBounds(new Rectangle(480, 75, 280, 60));\r\n\t\t\ttitleFieldImage.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\t\ttitleFieldImage.setText(\"Image\");\r\n\t\t\ttitleFieldImage.setBackground(new Color(255, 204, 204));\r\n\t\t\tpageInfoLbl = new JLabel();\r\n\t\t\tpageInfoLbl.setBounds(new java.awt.Rectangle(224,480,315,30));\r\n\t\t\tpageInfoLbl.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\t\tpageInfoLbl.setText(\"\");\r\n\t\t\ttitleFieldName = new JLabel();\r\n\t\t\ttitleFieldName.setBounds(new Rectangle(190, 75, 170, 60));\r\n\t\t\ttitleFieldName.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\t\ttitleFieldName.setBackground(new Color(255,204,204));\r\n\t\t\ttitleFieldName.setText(\"Field name\");\r\n\t\t\ttitleFieldId = new JLabel();\r\n\t\t\ttitleFieldId.setBounds(new Rectangle(90, 75, 70, 60));\r\n\t\t\ttitleFieldId.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\t\ttitleFieldId.setBackground(new Color(255,160,204));\r\n\t\t\ttitleFieldId.setText(\"Field ID\");\r\n\t\t\tlblPageName = new JLabel();\r\n\t\t\tlblPageName.setBounds(new Rectangle(10, 40, 120, 20));\r\n\t\t\tlblPageName.setText(\"Page Name\");\r\n\t\t\tjLabel = new JLabel();\r\n\t\t\tjLabel.setBounds(new java.awt.Rectangle(10,10,500,24));\r\n\t\t\tjLabel.setText(\"Select the field you want to add\");\r\n\t\t\tjPanel = new JPanel();\r\n\t\t\tjPanel.setLayout(null);\r\n\t\t\tjPanel.add(jLabel, null);\r\n\t\t\tjPanel.add(getJButton(), null);\r\n\t\t\tjPanel.add(getPageSheet(), null);\r\n\t\t\tjPanel.add(getPreButton(), null);\r\n\t\t\tjPanel.add(getAfterButton(), null);\r\n\t\t\tjPanel.add(lblPageName, null);\r\n\t\t\tjPanel.add(titleFieldId, null);\r\n\t\t\tjPanel.add(titleFieldName, null);\r\n\t\t\tjPanel.add(pageInfoLbl, null);\r\n\t\t\tjPanel.add(titleFieldImage, null);\r\n\t\t\t\r\n\t\t\tJLabel titleFiledType = new JLabel();\r\n\t\t\ttitleFiledType.setText(\"Field Type\");\r\n\t\t\ttitleFiledType.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\t\ttitleFiledType.setBounds(new Rectangle(10, 75, 90, 60));\r\n\t\t\ttitleFiledType.setBackground(new Color(255, 160, 204));\r\n\t\t\ttitleFiledType.setBounds(360, 75, 120, 60);\r\n\t\t\tjPanel.add(titleFiledType);\r\n\t\t\t\r\n\t\t\tJButton btnSelect = new JButton();\r\n\t\t\tbtnSelect.addActionListener(new ActionListener() {\r\n\t\t\t\t@SuppressWarnings(\"unchecked\")\r\n\t\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\t\treturnValue.clear();\r\n\t\t\t\t\tgrid.freshData();\r\n\t\t\t\t\tList<Map<String, String>> valueList = grid.getValueList();\r\n\t\t\t\t\t\r\n\t\t\t\t\tSelectBean bean = (SelectBean)pageIdSelect.getSelectedItem();\r\n\t\t\t\t\t\r\n\t\t\t\t\tfor (Map<String, String> map : valueList) {\r\n\t\t\t\t\t\tString strSelect = map.get(\"SELECT\");\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif (Boolean.valueOf(strSelect)) {\r\n\t\t\t\t\t\t\tMap<String, String> temp = new HashMap<String, String>(map);\r\n\t\t\t\t\t\t\ttemp.put(\"PAGE_ID\", bean.getCode());\r\n\t\t\t\t\t\t\tString strName = bean.getName();\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tif (strName.indexOf(\":\") > 0 && strName.length() > strName.indexOf(\":\") + 2) {\r\n\t\t\t\t\t\t\t\tstrName = strName.substring(strName.indexOf(\":\") + 2);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\ttemp.put(\"PAGE_NAME\", strName);\r\n\t\t\t\t\t\t\treturnValue.add(temp);\r\n\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\tif (returnValue.size() > 0) {\r\n\t\t\t\t\t\tsetVisible(false);\r\n\t\t\t\t\t\t_parent.addSelectFields(PageSelectDialog.this);\r\n\t\t\t\t\t\tUtils.removeWindow(PageSelectDialog.this);\r\n\t\t\t\t\t\t_parent.setVisible(true);\r\n\t\t\t\t\t\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tJOptionPane.showMessageDialog(PageSelectDialog.this, \"Plese select field!\");\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\t\t\tbtnSelect.setText(\"Select\");\r\n\t\t\tbtnSelect.setSize(new Dimension(90, 30));\r\n\t\t\tbtnSelect.setLocation(new Point(10, 480));\r\n\t\t\tbtnSelect.setBounds(10, 520, 120, 30);\r\n\t\t\tjPanel.add(btnSelect);\r\n\t\t\t\r\n\t\t\ttitleSelect = new JLabel();\r\n\t\t\ttitleSelect.setText(\"Select\");\r\n\t\t\ttitleSelect.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\t\ttitleSelect.setBounds(new Rectangle(90, 75, 70, 60));\r\n\t\t\ttitleSelect.setBackground(new Color(255, 160, 204));\r\n\t\t\ttitleSelect.setBounds(10, 75, 80, 60);\r\n\t\t\tjPanel.add(titleSelect);\r\n\t\t\t\r\n\t\t\tpageIdSelect = new JComboBox<DefaultComboBoxModel>();\r\n\t\t\tpageIdSelect.addItemListener(new ItemListener() {\r\n\t\t\t\tpublic void itemStateChanged(ItemEvent e) {\r\n\t\t\t\t\tsearchDetailList();\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\tpageIdSelect.setBounds(140, 40, 300, 20);\r\n\t\t\tjPanel.add(pageIdSelect);\r\n\t\t}\r\n\t\treturn jPanel;\r\n\t}",
"public JRadioSortTypeMenu(){\n date = new JRadioButton(LanguageLoader.Language(\"COLUMNDATE\"), true);\n customerName = new JRadioButton(LanguageLoader.Language(\"LABELCUSTOMERNAME\"));\n bookingId = new JRadioButton(LanguageLoader.Language(\"COLUMNID\"));\n \n date.setBounds(20, 20, 200, 20);\n customerName.setBounds(20, 40, 200, 20);\n bookingId.setBounds(20, 60, 200, 20);\n \n buttonGroup.add(date);\n buttonGroup.add(customerName);\n buttonGroup.add(bookingId);\n }",
"public AddVisite(java.awt.Frame parent, boolean modal, EventType type) {\n super(parent, modal);\n isRadioEnable = true;\n this.type = type;\n if (type == EventType.OUTING){\n eventType = \"Sortie\";\n }\n else\n eventType = \"Visite\";\n\n System.out.println(eventType);\n initComponents();\n alerteEmptyField.setVisible(false);\n }",
"private void initComponents() {\n\n buttonGroup1 = new javax.swing.ButtonGroup();\n jPanel1 = new javax.swing.JPanel();\n jLabel1 = new javax.swing.JLabel();\n txtCodigo = new javax.swing.JTextField();\n jLabel5 = new javax.swing.JLabel();\n txtNombre = new javax.swing.JTextField();\n txtNombre1 = new javax.swing.JTextField();\n txtNombre2 = new javax.swing.JTextField();\n jLabel6 = new javax.swing.JLabel();\n jLabel7 = new javax.swing.JLabel();\n jLabel8 = new javax.swing.JLabel();\n jRadioButton1 = new javax.swing.JRadioButton();\n jRadioButton2 = new javax.swing.JRadioButton();\n btnCancelar = new javax.swing.JButton();\n btnOk = new javax.swing.JButton();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);\n setTitle(\"Detalle de proyecto\");\n setMinimumSize(new java.awt.Dimension(800, 200));\n setSize(new java.awt.Dimension(800, 200));\n\n jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder(\" Datos del profesor \"));\n\n jLabel1.setText(\"Identificación\");\n\n jLabel5.setText(\"Nombre\");\n\n jLabel6.setText(\"Primer Apellido\");\n\n jLabel7.setText(\"Segundo Apellido\");\n\n jLabel8.setText(\"Activo\");\n\n jRadioButton1.setText(\"No\");\n\n jRadioButton2.setText(\"Si\");\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(jPanel1Layout.createSequentialGroup()\n .addGap(12, 12, 12)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel7, javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jLabel8, javax.swing.GroupLayout.Alignment.TRAILING))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(txtNombre, javax.swing.GroupLayout.DEFAULT_SIZE, 585, Short.MAX_VALUE)\n .addComponent(txtCodigo)\n .addComponent(txtNombre1, javax.swing.GroupLayout.DEFAULT_SIZE, 585, Short.MAX_VALUE)\n .addComponent(txtNombre2, javax.swing.GroupLayout.DEFAULT_SIZE, 585, Short.MAX_VALUE))\n .addGap(6, 6, 6))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(jRadioButton1)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jRadioButton2)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel6, javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jLabel5, javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jLabel1, javax.swing.GroupLayout.Alignment.TRAILING))\n .addGap(603, 603, 603))\n );\n jPanel1Layout.setVerticalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel1)\n .addComponent(txtCodigo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(txtNombre, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel5))\n .addGap(9, 9, 9)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(txtNombre2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel6))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(txtNombre1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel7))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel8)\n .addComponent(jRadioButton1)\n .addComponent(jRadioButton2)))\n );\n\n btnCancelar.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/img/cross32.png\"))); // NOI18N\n btnCancelar.setText(\"Cancelar\");\n btnCancelar.setHorizontalTextPosition(javax.swing.SwingConstants.LEADING);\n\n btnOk.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/img/check_mark32.png\"))); // NOI18N\n btnOk.setText(\"OK\");\n btnOk.setHorizontalTextPosition(javax.swing.SwingConstants.LEADING);\n btnOk.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnOkActionPerformed(evt);\n }\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.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel1, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addGap(0, 0, Short.MAX_VALUE)\n .addComponent(btnOk)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(btnCancelar)))\n .addContainerGap())\n );\n\n layout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {btnCancelar, btnOk});\n\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(btnCancelar)\n .addComponent(btnOk))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n\n pack();\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n grpSexo = new javax.swing.ButtonGroup();\n jPanel1 = new javax.swing.JPanel();\n jpTitulo = new javax.swing.JPanel();\n jPanel3 = new javax.swing.JPanel();\n btncancelar = new javax.swing.JLabel();\n jPanel4 = new javax.swing.JPanel();\n btnProsseguir = new javax.swing.JLabel();\n jLabel1 = new javax.swing.JLabel();\n pnpasso01 = new javax.swing.JPanel();\n lblpasso01 = new javax.swing.JLabel();\n pnpasso02 = new javax.swing.JPanel();\n lblpasso02 = new javax.swing.JLabel();\n pnpasso03 = new javax.swing.JPanel();\n lblpasso03 = new javax.swing.JLabel();\n pnpasso3 = new javax.swing.JPanel();\n lblpasso3 = new javax.swing.JLabel();\n jPanel2 = new javax.swing.JPanel();\n jLabel2 = new javax.swing.JLabel();\n btnAlterarImage = new javax.swing.JPanel();\n btnAlterarImagem = new javax.swing.JLabel();\n jLabel4 = new javax.swing.JLabel();\n dtnasc = new com.toedter.calendar.JDateChooser();\n jSeparator1 = new javax.swing.JSeparator();\n lblDatanasc = new java.awt.Label();\n jpTitulo1 = new javax.swing.JPanel();\n lblTituloForm4 = new javax.swing.JLabel();\n jPanel5 = new javax.swing.JPanel();\n txtNome = new javax.swing.JTextField();\n txtSobrenome = new javax.swing.JTextField();\n jPanel6 = new javax.swing.JPanel();\n lblSexo = new java.awt.Label();\n jSeparator2 = new javax.swing.JSeparator();\n rbtnMasculino = new javax.swing.JRadioButton();\n rbtnFeminino = new javax.swing.JRadioButton();\n lblNome = new java.awt.Label();\n lblSobrenome = new java.awt.Label();\n campoMensagem = new javax.swing.JPanel();\n lblMensagem = new javax.swing.JLabel();\n\n setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));\n setMinimumSize(new java.awt.Dimension(300, 80));\n setPreferredSize(new java.awt.Dimension(1210, 640));\n getContentPane().setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());\n\n jPanel1.setBackground(new java.awt.Color(255, 255, 255));\n jPanel1.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());\n\n jpTitulo.setBackground(new java.awt.Color(255, 255, 255));\n jpTitulo.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());\n\n jPanel3.setBackground(new java.awt.Color(255, 102, 102));\n jPanel3.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());\n\n btncancelar.setBackground(new java.awt.Color(109, 127, 145));\n btncancelar.setFont(new java.awt.Font(\"Century Gothic\", 0, 18)); // NOI18N\n btncancelar.setForeground(new java.awt.Color(255, 255, 255));\n btncancelar.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n btncancelar.setText(\"CANCELAR\");\n btncancelar.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n btncancelarMouseClicked(evt);\n }\n });\n jPanel3.add(btncancelar, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, 220, 60));\n\n jpTitulo.add(jPanel3, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, 220, 60));\n\n jPanel4.setBackground(new java.awt.Color(109, 127, 145));\n jPanel4.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());\n\n btnProsseguir.setBackground(new java.awt.Color(109, 127, 145));\n btnProsseguir.setFont(new java.awt.Font(\"Century Gothic\", 0, 18)); // NOI18N\n btnProsseguir.setForeground(new java.awt.Color(255, 255, 255));\n btnProsseguir.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n btnProsseguir.setText(\"Prosseguir\");\n btnProsseguir.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n btnProsseguirMouseClicked(evt);\n }\n public void mouseEntered(java.awt.event.MouseEvent evt) {\n btnProsseguirMouseEntered(evt);\n }\n });\n jPanel4.add(btnProsseguir, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, 220, 60));\n\n jpTitulo.add(jPanel4, new org.netbeans.lib.awtextra.AbsoluteConstraints(560, 0, 220, 60));\n\n jPanel1.add(jpTitulo, new org.netbeans.lib.awtextra.AbsoluteConstraints(210, 560, 780, 60));\n\n jLabel1.setFont(new java.awt.Font(\"Century Gothic\", 0, 36)); // NOI18N\n jLabel1.setText(\"Passo \");\n jPanel1.add(jLabel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(410, 100, 110, 40));\n\n pnpasso01.setBackground(new java.awt.Color(48, 59, 70));\n pnpasso01.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());\n\n lblpasso01.setForeground(new java.awt.Color(255, 255, 255));\n lblpasso01.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n lblpasso01.setText(\"1\");\n pnpasso01.add(lblpasso01, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, 25, 25));\n\n jPanel1.add(pnpasso01, new org.netbeans.lib.awtextra.AbsoluteConstraints(530, 110, 25, 25));\n\n pnpasso02.setBackground(new java.awt.Color(109, 127, 145));\n pnpasso02.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());\n\n lblpasso02.setBackground(new java.awt.Color(109, 127, 145));\n lblpasso02.setForeground(new java.awt.Color(255, 255, 255));\n lblpasso02.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n lblpasso02.setText(\"2\");\n pnpasso02.add(lblpasso02, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, 25, 25));\n\n jPanel1.add(pnpasso02, new org.netbeans.lib.awtextra.AbsoluteConstraints(580, 110, 25, 25));\n\n pnpasso03.setBackground(new java.awt.Color(109, 127, 145));\n pnpasso03.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());\n\n lblpasso03.setForeground(new java.awt.Color(255, 255, 255));\n lblpasso03.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n lblpasso03.setText(\"3\");\n pnpasso03.add(lblpasso03, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, 25, 25));\n\n jPanel1.add(pnpasso03, new org.netbeans.lib.awtextra.AbsoluteConstraints(630, 110, 25, 25));\n\n pnpasso3.setBackground(new java.awt.Color(109, 127, 145));\n pnpasso3.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());\n\n lblpasso3.setBackground(new java.awt.Color(109, 127, 145));\n lblpasso3.setForeground(new java.awt.Color(255, 255, 255));\n lblpasso3.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n lblpasso3.setText(\"4\");\n pnpasso3.add(lblpasso3, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, 25, 25));\n\n jPanel1.add(pnpasso3, new org.netbeans.lib.awtextra.AbsoluteConstraints(680, 110, 25, 25));\n\n jPanel2.setBackground(new java.awt.Color(226, 224, 224));\n jPanel2.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));\n jPanel2.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());\n jPanel2.add(jLabel2, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, 130, 120));\n\n jPanel1.add(jPanel2, new org.netbeans.lib.awtextra.AbsoluteConstraints(530, 210, 130, 120));\n\n btnAlterarImage.setBackground(new java.awt.Color(109, 127, 145));\n btnAlterarImage.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());\n\n btnAlterarImagem.setFont(new java.awt.Font(\"Century Gothic\", 0, 11)); // NOI18N\n btnAlterarImagem.setForeground(new java.awt.Color(255, 255, 255));\n btnAlterarImagem.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n btnAlterarImagem.setText(\"Alterar Imagem\");\n btnAlterarImagem.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n btnAlterarImagemMouseClicked(evt);\n }\n });\n btnAlterarImage.add(btnAlterarImagem, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, 130, 30));\n\n jPanel1.add(btnAlterarImage, new org.netbeans.lib.awtextra.AbsoluteConstraints(530, 340, 130, 30));\n jPanel1.add(jLabel4, new org.netbeans.lib.awtextra.AbsoluteConstraints(330, 440, -1, -1));\n\n dtnasc.setBackground(new java.awt.Color(255, 255, 255));\n jPanel1.add(dtnasc, new org.netbeans.lib.awtextra.AbsoluteConstraints(610, 510, 380, 30));\n\n jSeparator1.setForeground(new java.awt.Color(109, 127, 145));\n jPanel1.add(jSeparator1, new org.netbeans.lib.awtextra.AbsoluteConstraints(610, 500, 380, 10));\n\n lblDatanasc.setFont(new java.awt.Font(\"Century Gothic\", 0, 12)); // NOI18N\n lblDatanasc.setForeground(new java.awt.Color(109, 127, 145));\n lblDatanasc.setText(\"Data de Nascimento\");\n jPanel1.add(lblDatanasc, new org.netbeans.lib.awtextra.AbsoluteConstraints(608, 480, 130, -1));\n\n jpTitulo1.setBackground(new java.awt.Color(109, 127, 145));\n jpTitulo1.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());\n\n lblTituloForm4.setBackground(new java.awt.Color(109, 127, 145));\n lblTituloForm4.setFont(new java.awt.Font(\"Century Gothic\", 0, 18)); // NOI18N\n lblTituloForm4.setForeground(new java.awt.Color(255, 255, 255));\n lblTituloForm4.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n lblTituloForm4.setText(\"FORMULARIO DO FUNCIONARIO\");\n jpTitulo1.add(lblTituloForm4, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, 780, 60));\n\n jPanel1.add(jpTitulo1, new org.netbeans.lib.awtextra.AbsoluteConstraints(220, 20, 780, 60));\n\n jPanel5.setBackground(new java.awt.Color(255, 255, 255));\n jPanel5.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());\n\n txtNome.setFont(new java.awt.Font(\"Century Gothic\", 0, 14)); // NOI18N\n txtNome.setForeground(new java.awt.Color(109, 127, 145));\n txtNome.setToolTipText(\"Nome\");\n txtNome.addFocusListener(new java.awt.event.FocusAdapter() {\n public void focusGained(java.awt.event.FocusEvent evt) {\n txtNomeFocusGained(evt);\n }\n public void focusLost(java.awt.event.FocusEvent evt) {\n txtNomeFocusLost(evt);\n }\n });\n txtNome.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n txtNomeActionPerformed(evt);\n }\n });\n txtNome.addKeyListener(new java.awt.event.KeyAdapter() {\n public void keyReleased(java.awt.event.KeyEvent evt) {\n txtNomeKeyReleased(evt);\n }\n });\n jPanel5.add(txtNome, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, 380, 40));\n\n txtSobrenome.setFont(new java.awt.Font(\"Century Gothic\", 0, 14)); // NOI18N\n txtSobrenome.setForeground(new java.awt.Color(109, 127, 145));\n txtSobrenome.addFocusListener(new java.awt.event.FocusAdapter() {\n public void focusGained(java.awt.event.FocusEvent evt) {\n txtSobrenomeFocusGained(evt);\n }\n public void focusLost(java.awt.event.FocusEvent evt) {\n txtSobrenomeFocusLost(evt);\n }\n });\n txtSobrenome.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n txtSobrenomeActionPerformed(evt);\n }\n });\n jPanel5.add(txtSobrenome, new org.netbeans.lib.awtextra.AbsoluteConstraints(400, 0, 380, 40));\n\n jPanel1.add(jPanel5, new org.netbeans.lib.awtextra.AbsoluteConstraints(210, 420, 780, 40));\n\n jPanel6.setBackground(new java.awt.Color(255, 255, 255));\n jPanel6.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());\n\n lblSexo.setFont(new java.awt.Font(\"Century Gothic\", 0, 12)); // NOI18N\n lblSexo.setForeground(new java.awt.Color(109, 127, 145));\n lblSexo.setText(\"Sexo\");\n jPanel6.add(lblSexo, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, 40, 20));\n\n jSeparator2.setForeground(new java.awt.Color(109, 127, 145));\n jPanel6.add(jSeparator2, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 20, 380, 10));\n\n rbtnMasculino.setBackground(new java.awt.Color(255, 255, 255));\n grpSexo.add(rbtnMasculino);\n rbtnMasculino.setFont(new java.awt.Font(\"Century Gothic\", 0, 14)); // NOI18N\n rbtnMasculino.setForeground(new java.awt.Color(109, 127, 145));\n rbtnMasculino.setText(\"Masculino\");\n rbtnMasculino.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n rbtnMasculinoActionPerformed(evt);\n }\n });\n jPanel6.add(rbtnMasculino, new org.netbeans.lib.awtextra.AbsoluteConstraints(70, 30, -1, -1));\n\n rbtnFeminino.setBackground(new java.awt.Color(255, 255, 255));\n grpSexo.add(rbtnFeminino);\n rbtnFeminino.setFont(new java.awt.Font(\"Century Gothic\", 0, 14)); // NOI18N\n rbtnFeminino.setForeground(new java.awt.Color(109, 127, 145));\n rbtnFeminino.setText(\"Feminino\");\n jPanel6.add(rbtnFeminino, new org.netbeans.lib.awtextra.AbsoluteConstraints(220, 30, -1, -1));\n\n jPanel1.add(jPanel6, new org.netbeans.lib.awtextra.AbsoluteConstraints(210, 480, 780, 70));\n\n lblNome.setFont(new java.awt.Font(\"Century Gothic\", 0, 12)); // NOI18N\n lblNome.setForeground(new java.awt.Color(109, 127, 145));\n lblNome.setText(\"Nome\");\n jPanel1.add(lblNome, new org.netbeans.lib.awtextra.AbsoluteConstraints(210, 400, 40, 20));\n\n lblSobrenome.setFont(new java.awt.Font(\"Century Gothic\", 0, 12)); // NOI18N\n lblSobrenome.setForeground(new java.awt.Color(109, 127, 145));\n lblSobrenome.setText(\"Sobrenome\");\n jPanel1.add(lblSobrenome, new org.netbeans.lib.awtextra.AbsoluteConstraints(610, 400, 80, 20));\n\n campoMensagem.setBackground(new java.awt.Color(255, 204, 204));\n campoMensagem.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());\n\n lblMensagem.setFont(new java.awt.Font(\"Century Gothic\", 0, 14)); // NOI18N\n lblMensagem.setForeground(new java.awt.Color(255, 51, 51));\n lblMensagem.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n lblMensagem.setText(\"You have an error in you form\");\n campoMensagem.add(lblMensagem, new org.netbeans.lib.awtextra.AbsoluteConstraints(18, 5, 750, 30));\n\n jPanel1.add(campoMensagem, new org.netbeans.lib.awtextra.AbsoluteConstraints(220, 150, 780, 40));\n\n getContentPane().add(jPanel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(-10, 0, 1230, 640));\n\n pack();\n }",
"private FactoryViewPanel buildBasicPanel()\r\n {\r\n FactoryViewPanel panel = new FactoryViewPanel();\r\n JComponent pathComponent = addField(panel, myDataSourceModel.getPath());\r\n if (pathComponent instanceof JTextComponent)\r\n {\r\n ((JTextComponent)pathComponent).setEditable(false);\r\n }\r\n addField(panel, myDataSourceModel.getSourceName());\r\n return panel;\r\n }",
"public JPanel convertisseur(){\n JPanel pano = new JPanel();\n stop.addActionListener(this);\n envoi.addActionListener(this);\n \n //empeche qu'un retard essaye de fuck up la sortie\n this.resultat.setFocusable(false);\n \n //le GridBagLayout permet d'avoir une grille relative entre les elements\n pano.setLayout(new GridBagLayout());\n GridBagConstraints c = new GridBagConstraints();\n c.fill = GridBagConstraints.HORIZONTAL;\n c.gridx = 0;\n c.gridy = 1;\n pano.add(saisie, c);\n c.gridx = 1;\n pano.add(format, c);\n c.gridx = 3;\n pano.add(resultat, c);\n c.gridx = 2;\n pano.add(envoi, c);\n c.gridy = 2;\n pano.add(stop, c);\n c.gridy = 0;\n c.gridx = 0;\n pano.add(new JLabel(\"Heure de depart \"), c);\n c.gridx = 1;\n pano.add(new JLabel(\"duree\"), c);\n return pano;\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jPanel1 = new javax.swing.JPanel();\n jLabel1 = new javax.swing.JLabel();\n rbcod = new javax.swing.JRadioButton();\n rbdetalle = new javax.swing.JRadioButton();\n rbmarca = new javax.swing.JRadioButton();\n jScrollPane1 = new javax.swing.JScrollPane();\n tbbuscaprod = new javax.swing.JTable();\n txtbusca = new javax.swing.JTextField();\n jLabel33 = new javax.swing.JLabel();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n jPanel1.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED));\n\n jLabel1.setText(\"Buscar por :\");\n pt.seteaLabel(jLabel1);\n\n rbcod.setText(\"Código\");\n pt.seteaRadio(rbcod);\n rbcod.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n rbcodActionPerformed(evt);\n }\n });\n\n rbdetalle.setText(\"Detalle\");\n pt.seteaRadio(rbdetalle);\n rbdetalle.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n rbdetalleActionPerformed(evt);\n }\n });\n\n rbmarca.setText(\"Marca\");\n pt.seteaRadio(rbmarca);\n rbmarca.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n rbmarcaActionPerformed(evt);\n }\n });\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(jPanel1Layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jLabel1)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(rbcod)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(rbdetalle)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(rbmarca, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addContainerGap())\n );\n jPanel1Layout.setVerticalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel1)\n .addComponent(rbcod)\n .addComponent(rbdetalle)\n .addComponent(rbmarca))\n .addContainerGap(9, Short.MAX_VALUE))\n );\n\n pt.seteaTabla(tbbuscaprod);\n tbbuscaprod.setModel(new javax.swing.table.DefaultTableModel(\n new Object [][] {\n {},\n {},\n {},\n {}\n },\n new String [] {\n\n }\n ));\n tbbuscaprod.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n tbbuscaprodMouseClicked(evt);\n }\n });\n jScrollPane1.setViewportView(tbbuscaprod);\n\n txtbusca.addKeyListener(new java.awt.event.KeyAdapter() {\n public void keyPressed(java.awt.event.KeyEvent evt) {\n txtbuscaKeyPressed(evt);\n }\n public void keyTyped(java.awt.event.KeyEvent evt) {\n txtbuscaKeyTyped(evt);\n }\n });\n\n jLabel33.setText(\"Buscador\");\n pt.seteaLabel(jLabel33);\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.LEADING)\n .addGap(0, 611, Short.MAX_VALUE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jLabel33)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(txtbusca, javax.swing.GroupLayout.PREFERRED_SIZE, 80, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(0, 0, Short.MAX_VALUE))\n .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 591, Short.MAX_VALUE))\n .addContainerGap()))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 385, Short.MAX_VALUE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(txtbusca, javax.swing.GroupLayout.PREFERRED_SIZE, 22, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel33)))\n .addGap(17, 17, 17)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 301, Short.MAX_VALUE)\n .addContainerGap()))\n );\n\n pack();\n }",
"public void createPartyPanel()\n {\n setPartyLabel(game.getPartyPane(), 0);\n //setPartyLabel(\"EMPTY\", 1);\n //setPartyLabel(\"EMPTY\", 2);\n //setPartyLabel(\"EMPTY\", 3);\n reloadPartyPanel();\n }",
"public PanelCrearJugador( DialogoCrearJugador d )\n {\n dialogo = d;\n\n setLayout( new GridBagLayout( ) );\n\n etiquetaNombre = new JLabel( \"Nombre: \" );\n GridBagConstraints gbc = new GridBagConstraints( );\n gbc.gridx = 0;\n gbc.gridy = 0;\n gbc.fill = GridBagConstraints.BOTH;\n gbc.insets = new Insets( 3, 3, 3, 3 );\n add( etiquetaNombre, 0 );\n\n txtNombre = new JTextField( );\n txtNombre.setPreferredSize( new Dimension( 80, 25 ) );\n gbc.gridx = 1;\n add( txtNombre, gbc );\n\n etiquetaEdad = new JLabel( \"Edad:\" );\n gbc.gridx = 0;\n gbc.gridy = 1;\n add( etiquetaEdad, gbc );\n\n txtEdad = new JTextField( );\n txtEdad.setPreferredSize( new Dimension( 80, 25 ) );\n gbc.gridx = 1;\n add( txtEdad, gbc );\n\n etiquetaPosicion = new JLabel( \"Posición:\" );\n gbc.gridx = 0;\n gbc.gridy = 2;\n add( etiquetaPosicion, gbc );\n\n txtPosicion = new JTextField( );\n txtPosicion.setPreferredSize( new Dimension( 80, 25 ) );\n gbc.gridx = 1;\n add( txtPosicion, gbc );\n\n etiquetaAltura = new JLabel( \"Altura:\" );\n gbc.gridx = 0;\n gbc.gridy = 3;\n add( etiquetaAltura, gbc );\n\n txtAltura = new JTextField( );\n txtAltura.setPreferredSize( new Dimension( 80, 25 ) );\n gbc.gridx = 1;\n add( txtAltura, gbc );\n\n etiquetaPeso = new JLabel( \"Peso:\" );\n gbc.gridx = 0;\n gbc.gridy = 4;\n add( etiquetaPeso, gbc );\n\n txtPeso = new JTextField( );\n txtPeso.setPreferredSize( new Dimension( 80, 25 ) );\n gbc.gridx = 1;\n add( txtPeso, gbc );\n\n etiquetaSalario = new JLabel( \"Salario:\" );\n gbc.gridx = 0;\n gbc.gridy = 5;\n add( etiquetaSalario, gbc );\n\n txtSalario = new JTextField( );\n txtSalario.setPreferredSize( new Dimension( 80, 25 ) );\n gbc.gridx = 1;\n add( txtSalario, gbc );\n\n etiquetaImagen = new JLabel( \"Imagen:\" );\n gbc.gridx = 0;\n gbc.gridy = 6;\n add( etiquetaImagen, gbc );\n\n JPanel panelImagen = new JPanel( );\n panelImagen.setLayout( new GridLayout( 1, 2, 3, 3 ) );\n txtImagen = new JTextField( );\n panelImagen.add( txtImagen );\n\n botonExplorar = new JButton( \"Explorar\" );\n botonExplorar.setActionCommand( EXPLORAR );\n botonExplorar.addActionListener( this );\n panelImagen.add( botonExplorar );\n\n gbc.gridx = 1;\n add( panelImagen, gbc );\n\n JPanel panelBotones = new JPanel( );\n panelBotones.setLayout( new GridBagLayout( ) );\n\n botonAgregarJugador = new JButton( \"Crear\" );\n botonAgregarJugador.setActionCommand( CREAR_JUGADOR );\n botonAgregarJugador.addActionListener( this );\n gbc.gridx = 0;\n gbc.gridy = 0;\n panelBotones.add( botonAgregarJugador, gbc );\n\n botonCancelar = new JButton( \"Cancelar\" );\n botonCancelar.setActionCommand( CANCELAR );\n botonCancelar.addActionListener( this );\n gbc.gridx = 1;\n panelBotones.add( botonCancelar, gbc );\n\n gbc.gridx = 0;\n gbc.gridy = 7;\n gbc.gridwidth = 2;\n add( panelBotones, gbc );\n\n setBorder( new EmptyBorder( 5, 5, 5, 5 ) );\n }",
"@AutoGenerated\r\n\tprivate Panel buildPnlFondos() {\n\t\tpnlFondos = new Panel();\r\n\t\tpnlFondos.setImmediate(false);\r\n\t\tpnlFondos.setWidth(\"-1px\");\r\n\t\tpnlFondos.setHeight(\"-1px\");\r\n\t\t\r\n\t\t// layoutFondo\r\n\t\tlayoutFondo = buildLayoutFondo();\r\n\t\tpnlFondos.setContent(layoutFondo);\r\n\t\t\r\n\t\treturn pnlFondos;\r\n\t}",
"private void initPanel() {\r\n panel = new JDialog(mdiForm);\r\n panel.setTitle(\"Groups\");\r\n panel.setSize(325, 290);\r\n panel.getContentPane().add(groupsController.getControlledUI());\r\n Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();\r\n java.awt.Dimension dlgSize = panel.getSize();\r\n int x = screenSize.width/1 - ((dlgSize.width/1)+20);\r\n int y = screenSize.height/1 - ((dlgSize.height/1)+60);\r\n panel.setLocation(x, y);\r\n panel.setFocusable(false);\r\n panel.show();\r\n panel.setDefaultCloseOperation(JDialog.DO_NOTHING_ON_CLOSE);\r\n panel.addWindowListener(new java.awt.event.WindowAdapter() {\r\n public void windowClosing(java.awt.event.WindowEvent event) {\r\n panel.dispose();\r\n maintainSponsorHierarchyBaseWindow.mnuItmPanel.setSelected(false);\r\n maintainSponsorHierarchyBaseWindow.btnPanel.setSelected(false);\r\n }\r\n });\r\n }",
"final JPanel createMainPanel() {\r\n\r\n logger.entering(this.getClass().getName(), \"createMainPanel\");\r\n\r\n this.pnlMain = new JPanel();\r\n\r\n this.pnlMain.setLayout(new BorderLayout());\r\n\r\n this.pnlMain.add(new JLabel(\r\n \"Select the MicroSensorDataTypes that shall be filtered out\"),\r\n BorderLayout.NORTH);\r\n\r\n this.pnlMain.add(createCheckBoxPanel(), BorderLayout.CENTER);\r\n\r\n this.pnlMain.add(getButtonPanel(), BorderLayout.SOUTH);\r\n\r\n logger.exiting(this.getClass().getName(), \"createMainPanel\",\r\n this.pnlMain);\r\n\r\n return this.pnlMain;\r\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n radioGroup = new javax.swing.ButtonGroup();\n lblSantaFe = new javax.swing.JLabel();\n pnlTitulo = new javax.swing.JPanel();\n lblEmitirLicencia = new javax.swing.JLabel();\n lblSubtitulo = new javax.swing.JLabel();\n pnlTitulares = new javax.swing.JPanel();\n jScrollPane1 = new javax.swing.JScrollPane();\n tableTitulares = new javax.swing.JTable();\n txtFiltro = new javax.swing.JTextField();\n btnFiltroNombre = new javax.swing.JButton();\n btnFiltroApellido = new javax.swing.JButton();\n btnFiltroDocumento = new javax.swing.JButton();\n btnAplicarFiltro = new javax.swing.JButton();\n btnLimpiarFiltro = new javax.swing.JButton();\n lblBuscarPor = new javax.swing.JLabel();\n pnlClaseLicencia = new javax.swing.JPanel();\n jScrollPane3 = new javax.swing.JScrollPane();\n txtAreaClaseLicencia = new javax.swing.JTextArea();\n pnlClases = new javax.swing.JPanel();\n radioE = new javax.swing.JRadioButton();\n radioG = new javax.swing.JRadioButton();\n radioB = new javax.swing.JRadioButton();\n radioF = new javax.swing.JRadioButton();\n radioA = new javax.swing.JRadioButton();\n radioC = new javax.swing.JRadioButton();\n radioD = new javax.swing.JRadioButton();\n lblDescripcionClase = new javax.swing.JLabel();\n btnEmitirLicencia = new javax.swing.JButton();\n pnlDatosTitular = new javax.swing.JPanel();\n labelNombre = new javax.swing.JLabel();\n labelApellido = new javax.swing.JLabel();\n labelTipoNroDocumento = new javax.swing.JLabel();\n labelDomicilio = new javax.swing.JLabel();\n labelFechaNacimiento = new javax.swing.JLabel();\n labelGrupoFactorSanguineo = new javax.swing.JLabel();\n labelDonanteOrganos = new javax.swing.JLabel();\n lblObservaciones = new javax.swing.JLabel();\n btnCancelar = new javax.swing.JButton();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n setTitle(\"GLC | SFC - Emitir Licencias\");\n setResizable(false);\n\n lblSantaFe.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n lblSantaFe.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/res/drawable/logo-santafe.png\"))); // NOI18N\n lblSantaFe.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);\n\n lblEmitirLicencia.setFont(new java.awt.Font(\"Arial\", 1, 25)); // NOI18N\n lblEmitirLicencia.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n lblEmitirLicencia.setText(\"EMITIR UNA LICENCIA\");\n\n lblSubtitulo.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n lblSubtitulo.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n lblSubtitulo.setText(\"A continuación, seleccione el titular y el tipo de licencia que desea emitir.\");\n\n javax.swing.GroupLayout pnlTituloLayout = new javax.swing.GroupLayout(pnlTitulo);\n pnlTitulo.setLayout(pnlTituloLayout);\n pnlTituloLayout.setHorizontalGroup(\n pnlTituloLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(pnlTituloLayout.createSequentialGroup()\n .addContainerGap()\n .addGroup(pnlTituloLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(lblSubtitulo, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(lblEmitirLicencia, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addContainerGap())\n );\n pnlTituloLayout.setVerticalGroup(\n pnlTituloLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(pnlTituloLayout.createSequentialGroup()\n .addGap(16, 16, 16)\n .addComponent(lblEmitirLicencia, javax.swing.GroupLayout.PREFERRED_SIZE, 33, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(lblSubtitulo, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n\n pnlTitulares.setBorder(javax.swing.BorderFactory.createTitledBorder(null, \"Seleccione el Titular\", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font(\"Dialog\", 1, 12), java.awt.SystemColor.textHighlight)); // NOI18N\n\n tableTitulares.setModel(new javax.swing.table.DefaultTableModel(\n new Object [][] {\n\n },\n new String [] {\n \"Nombre\", \"Apellido\", \"Tipo Documento\", \"N° Documento\"\n }\n ) {\n Class[] types = new Class [] {\n java.lang.String.class, java.lang.String.class, java.lang.Object.class, java.lang.String.class\n };\n boolean[] canEdit = new boolean [] {\n false, false, false, false\n };\n\n public Class getColumnClass(int columnIndex) {\n return types [columnIndex];\n }\n\n public boolean isCellEditable(int rowIndex, int columnIndex) {\n return canEdit [columnIndex];\n }\n });\n tableTitulares.setRowHeight(20);\n jScrollPane1.setViewportView(tableTitulares);\n\n txtFiltro.setFont(txtFiltro.getFont().deriveFont(txtFiltro.getFont().getSize()+4f));\n txtFiltro.setEnabled(false);\n\n btnFiltroNombre.setFont(new java.awt.Font(\"Dialog\", 1, 14)); // NOI18N\n btnFiltroNombre.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/res/icons/filter_mini.png\"))); // NOI18N\n btnFiltroNombre.setText(\"Nombre\");\n btnFiltroNombre.setToolTipText(\"Filtre a los contribuyentes por su nombre.\");\n btnFiltroNombre.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnFiltroNombreActionPerformed(evt);\n }\n });\n\n btnFiltroApellido.setFont(new java.awt.Font(\"Dialog\", 1, 14)); // NOI18N\n btnFiltroApellido.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/res/icons/filter_mini.png\"))); // NOI18N\n btnFiltroApellido.setText(\"Apellido\");\n btnFiltroApellido.setToolTipText(\"Filtre a los contribuyentes por su apellido.\");\n btnFiltroApellido.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnFiltroApellidoActionPerformed(evt);\n }\n });\n\n btnFiltroDocumento.setFont(new java.awt.Font(\"Dialog\", 1, 14)); // NOI18N\n btnFiltroDocumento.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/res/icons/filter_mini.png\"))); // NOI18N\n btnFiltroDocumento.setText(\"Documento\");\n btnFiltroDocumento.setToolTipText(\"Filtre a los contribuyentes por su N° de documento.\");\n btnFiltroDocumento.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnFiltroDocumentoActionPerformed(evt);\n }\n });\n\n btnAplicarFiltro.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/res/icons/search_mini.png\"))); // NOI18N\n btnAplicarFiltro.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED));\n btnAplicarFiltro.setEnabled(false);\n btnAplicarFiltro.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnAplicarFiltroActionPerformed(evt);\n }\n });\n\n btnLimpiarFiltro.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/res/icons/cancel_mini.png\"))); // NOI18N\n btnLimpiarFiltro.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED));\n btnLimpiarFiltro.setEnabled(false);\n btnLimpiarFiltro.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnLimpiarFiltroActionPerformed(evt);\n }\n });\n\n lblBuscarPor.setForeground(java.awt.Color.gray);\n lblBuscarPor.setText(\"Buscar por...\");\n\n javax.swing.GroupLayout pnlTitularesLayout = new javax.swing.GroupLayout(pnlTitulares);\n pnlTitulares.setLayout(pnlTitularesLayout);\n pnlTitularesLayout.setHorizontalGroup(\n pnlTitularesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnlTitularesLayout.createSequentialGroup()\n .addContainerGap()\n .addGroup(pnlTitularesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 506, Short.MAX_VALUE)\n .addGroup(javax.swing.GroupLayout.Alignment.LEADING, pnlTitularesLayout.createSequentialGroup()\n .addComponent(txtFiltro)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(btnAplicarFiltro, javax.swing.GroupLayout.PREFERRED_SIZE, 29, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(btnLimpiarFiltro, javax.swing.GroupLayout.PREFERRED_SIZE, 29, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(javax.swing.GroupLayout.Alignment.LEADING, pnlTitularesLayout.createSequentialGroup()\n .addComponent(lblBuscarPor)\n .addGap(0, 434, Short.MAX_VALUE))\n .addGroup(javax.swing.GroupLayout.Alignment.LEADING, pnlTitularesLayout.createSequentialGroup()\n .addComponent(btnFiltroNombre, javax.swing.GroupLayout.PREFERRED_SIZE, 150, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(28, 28, 28)\n .addComponent(btnFiltroApellido, javax.swing.GroupLayout.PREFERRED_SIZE, 150, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(btnFiltroDocumento, javax.swing.GroupLayout.PREFERRED_SIZE, 150, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addContainerGap())\n );\n pnlTitularesLayout.setVerticalGroup(\n pnlTitularesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(pnlTitularesLayout.createSequentialGroup()\n .addComponent(lblBuscarPor)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(pnlTitularesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(btnFiltroDocumento)\n .addComponent(btnFiltroNombre)\n .addComponent(btnFiltroApellido))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(pnlTitularesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(txtFiltro)\n .addComponent(btnAplicarFiltro, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(btnLimpiarFiltro, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE)\n .addContainerGap())\n );\n\n pnlClaseLicencia.setBorder(javax.swing.BorderFactory.createTitledBorder(null, \"Seleccione la Clase\", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font(\"Dialog\", 1, 12), java.awt.SystemColor.textHighlight)); // NOI18N\n\n txtAreaClaseLicencia.setEditable(false);\n txtAreaClaseLicencia.setColumns(20);\n txtAreaClaseLicencia.setFont(txtAreaClaseLicencia.getFont().deriveFont(txtAreaClaseLicencia.getFont().getStyle() | java.awt.Font.BOLD, txtAreaClaseLicencia.getFont().getSize()-1));\n txtAreaClaseLicencia.setRows(3);\n jScrollPane3.setViewportView(txtAreaClaseLicencia);\n\n radioE.setFont(radioE.getFont().deriveFont(radioE.getFont().getStyle() | java.awt.Font.BOLD, radioE.getFont().getSize()+8));\n radioE.setForeground(javax.swing.UIManager.getDefaults().getColor(\"Button.darcula.selection.color2\"));\n radioE.setText(\"E\");\n radioE.setEnabled(false);\n radioE.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n radioEActionPerformed(evt);\n }\n });\n\n radioG.setFont(radioG.getFont().deriveFont(radioG.getFont().getStyle() | java.awt.Font.BOLD, radioG.getFont().getSize()+8));\n radioG.setForeground(javax.swing.UIManager.getDefaults().getColor(\"Button.darcula.selection.color2\"));\n radioG.setText(\"G\");\n radioG.setEnabled(false);\n radioG.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n radioGActionPerformed(evt);\n }\n });\n\n radioB.setFont(radioB.getFont().deriveFont(radioB.getFont().getStyle() | java.awt.Font.BOLD, radioB.getFont().getSize()+8));\n radioB.setForeground(javax.swing.UIManager.getDefaults().getColor(\"Button.darcula.selection.color2\"));\n radioB.setText(\"B\");\n radioB.setEnabled(false);\n radioB.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n radioBActionPerformed(evt);\n }\n });\n\n radioF.setFont(radioF.getFont().deriveFont(radioF.getFont().getStyle() | java.awt.Font.BOLD, radioF.getFont().getSize()+8));\n radioF.setForeground(javax.swing.UIManager.getDefaults().getColor(\"Button.darcula.selection.color2\"));\n radioF.setText(\"F\");\n radioF.setEnabled(false);\n radioF.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n radioFActionPerformed(evt);\n }\n });\n\n radioA.setFont(radioA.getFont().deriveFont(radioA.getFont().getStyle() | java.awt.Font.BOLD, radioA.getFont().getSize()+8));\n radioA.setForeground(new java.awt.Color(35, 48, 69));\n radioA.setText(\"A\");\n radioA.setEnabled(false);\n radioA.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n radioAActionPerformed(evt);\n }\n });\n\n radioC.setFont(radioC.getFont().deriveFont(radioC.getFont().getStyle() | java.awt.Font.BOLD, radioC.getFont().getSize()+8));\n radioC.setForeground(javax.swing.UIManager.getDefaults().getColor(\"Button.darcula.selection.color2\"));\n radioC.setText(\"C\");\n radioC.setEnabled(false);\n radioC.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n radioCActionPerformed(evt);\n }\n });\n\n radioD.setFont(radioD.getFont().deriveFont(radioD.getFont().getStyle() | java.awt.Font.BOLD, radioD.getFont().getSize()+8));\n radioD.setForeground(javax.swing.UIManager.getDefaults().getColor(\"Button.darcula.selection.color2\"));\n radioD.setText(\"D\");\n radioD.setEnabled(false);\n radioD.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n radioDActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout pnlClasesLayout = new javax.swing.GroupLayout(pnlClases);\n pnlClases.setLayout(pnlClasesLayout);\n pnlClasesLayout.setHorizontalGroup(\n pnlClasesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(pnlClasesLayout.createSequentialGroup()\n .addComponent(radioA)\n .addGap(18, 18, 18)\n .addComponent(radioB, javax.swing.GroupLayout.PREFERRED_SIZE, 42, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addComponent(radioC, javax.swing.GroupLayout.PREFERRED_SIZE, 42, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addComponent(radioD, javax.swing.GroupLayout.PREFERRED_SIZE, 42, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addComponent(radioE, javax.swing.GroupLayout.PREFERRED_SIZE, 41, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addComponent(radioF, javax.swing.GroupLayout.PREFERRED_SIZE, 41, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addComponent(radioG)\n .addGap(0, 0, Short.MAX_VALUE))\n );\n\n pnlClasesLayout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {radioA, radioB, radioC, radioD, radioE, radioF, radioG});\n\n pnlClasesLayout.setVerticalGroup(\n pnlClasesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(pnlClasesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(radioA)\n .addComponent(radioB)\n .addComponent(radioC)\n .addComponent(radioD)\n .addComponent(radioE)\n .addComponent(radioF)\n .addComponent(radioG))\n );\n\n lblDescripcionClase.setFont(lblDescripcionClase.getFont().deriveFont(lblDescripcionClase.getFont().getStyle() & ~java.awt.Font.BOLD, lblDescripcionClase.getFont().getSize()-1));\n lblDescripcionClase.setForeground(java.awt.Color.gray);\n lblDescripcionClase.setPreferredSize(new java.awt.Dimension(63, 16));\n\n javax.swing.GroupLayout pnlClaseLicenciaLayout = new javax.swing.GroupLayout(pnlClaseLicencia);\n pnlClaseLicencia.setLayout(pnlClaseLicenciaLayout);\n pnlClaseLicenciaLayout.setHorizontalGroup(\n pnlClaseLicenciaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(pnlClaseLicenciaLayout.createSequentialGroup()\n .addContainerGap()\n .addGroup(pnlClaseLicenciaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(lblDescripcionClase, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jScrollPane3)\n .addComponent(pnlClases, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addContainerGap())\n );\n pnlClaseLicenciaLayout.setVerticalGroup(\n pnlClaseLicenciaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(pnlClaseLicenciaLayout.createSequentialGroup()\n .addComponent(pnlClases, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(lblDescripcionClase, javax.swing.GroupLayout.DEFAULT_SIZE, 27, Short.MAX_VALUE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jScrollPane3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap())\n );\n\n btnEmitirLicencia.setFont(btnEmitirLicencia.getFont().deriveFont(btnEmitirLicencia.getFont().getSize()+2f));\n btnEmitirLicencia.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/res/icons/save.png\"))); // NOI18N\n btnEmitirLicencia.setText(\"Emitir Licencia\");\n btnEmitirLicencia.setEnabled(false);\n btnEmitirLicencia.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnEmitirLicenciaActionPerformed(evt);\n }\n });\n\n pnlDatosTitular.setBorder(javax.swing.BorderFactory.createTitledBorder(null, \"Datos del Titular\", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font(\"Dialog\", 1, 12), java.awt.SystemColor.textHighlight)); // NOI18N\n\n labelNombre.setFont(labelNombre.getFont().deriveFont(labelNombre.getFont().getStyle() & ~java.awt.Font.BOLD, labelNombre.getFont().getSize()-2));\n labelNombre.setText(\" \");\n\n labelApellido.setFont(labelApellido.getFont().deriveFont(labelApellido.getFont().getStyle() & ~java.awt.Font.BOLD, labelApellido.getFont().getSize()-2));\n labelApellido.setText(\" \");\n\n labelTipoNroDocumento.setFont(labelTipoNroDocumento.getFont().deriveFont(labelTipoNroDocumento.getFont().getStyle() & ~java.awt.Font.BOLD, labelTipoNroDocumento.getFont().getSize()-2));\n labelTipoNroDocumento.setText(\" \");\n\n labelDomicilio.setFont(labelDomicilio.getFont().deriveFont(labelDomicilio.getFont().getStyle() & ~java.awt.Font.BOLD, labelDomicilio.getFont().getSize()-2));\n labelDomicilio.setText(\" \");\n\n labelFechaNacimiento.setFont(labelFechaNacimiento.getFont().deriveFont(labelFechaNacimiento.getFont().getStyle() & ~java.awt.Font.BOLD, labelFechaNacimiento.getFont().getSize()-2));\n labelFechaNacimiento.setText(\" \");\n\n labelGrupoFactorSanguineo.setFont(labelGrupoFactorSanguineo.getFont().deriveFont(labelGrupoFactorSanguineo.getFont().getStyle() & ~java.awt.Font.BOLD, labelGrupoFactorSanguineo.getFont().getSize()-2));\n labelGrupoFactorSanguineo.setText(\" \");\n\n labelDonanteOrganos.setFont(labelDonanteOrganos.getFont().deriveFont(labelDonanteOrganos.getFont().getStyle() & ~java.awt.Font.BOLD, labelDonanteOrganos.getFont().getSize()-2));\n labelDonanteOrganos.setText(\" \");\n\n lblObservaciones.setFont(new java.awt.Font(\"Dialog\", 0, 12)); // NOI18N\n lblObservaciones.setVerticalAlignment(javax.swing.SwingConstants.TOP);\n\n javax.swing.GroupLayout pnlDatosTitularLayout = new javax.swing.GroupLayout(pnlDatosTitular);\n pnlDatosTitular.setLayout(pnlDatosTitularLayout);\n pnlDatosTitularLayout.setHorizontalGroup(\n pnlDatosTitularLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(pnlDatosTitularLayout.createSequentialGroup()\n .addContainerGap()\n .addGroup(pnlDatosTitularLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(labelTipoNroDocumento, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(labelApellido, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(labelDomicilio, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(labelFechaNacimiento, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(labelGrupoFactorSanguineo, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(labelDonanteOrganos, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(pnlDatosTitularLayout.createSequentialGroup()\n .addComponent(labelNombre, javax.swing.GroupLayout.PREFERRED_SIZE, 210, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(0, 0, Short.MAX_VALUE))\n .addComponent(lblObservaciones, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addContainerGap())\n );\n pnlDatosTitularLayout.setVerticalGroup(\n pnlDatosTitularLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(pnlDatosTitularLayout.createSequentialGroup()\n .addComponent(labelNombre)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(labelApellido)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(labelTipoNroDocumento)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(labelDomicilio)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(labelFechaNacimiento)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(labelGrupoFactorSanguineo)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(labelDonanteOrganos)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(lblObservaciones, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(0, 6, Short.MAX_VALUE))\n );\n\n btnCancelar.setFont(btnCancelar.getFont().deriveFont(btnCancelar.getFont().getSize()+2f));\n btnCancelar.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/res/icons/cancel.png\"))); // NOI18N\n btnCancelar.setText(\"Cancelar\");\n btnCancelar.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnCancelarActionPerformed(evt);\n }\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.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(pnlTitulo, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addContainerGap())\n .addComponent(lblSantaFe, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)\n .addGroup(layout.createSequentialGroup()\n .addComponent(btnCancelar, javax.swing.GroupLayout.PREFERRED_SIZE, 200, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(btnEmitirLicencia, javax.swing.GroupLayout.PREFERRED_SIZE, 200, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(layout.createSequentialGroup()\n .addComponent(pnlTitulares, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(pnlClaseLicencia, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(pnlDatosTitular, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))))\n .addGap(0, 9, Short.MAX_VALUE))))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(lblSantaFe, javax.swing.GroupLayout.PREFERRED_SIZE, 159, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(0, 0, 0)\n .addComponent(pnlTitulo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(pnlDatosTitular, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(pnlClaseLicencia, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addComponent(pnlTitulares, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(btnCancelar)\n .addComponent(btnEmitirLicencia))\n .addGap(10, 10, 10))\n );\n\n pack();\n }",
"public JRadioButton add(E enumValue, JComponent panel) {\n JRadioButton button = add(enumValue);\n panel.add(button);\n return button;\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jLabel1 = new javax.swing.JLabel();\n jLabel2 = new javax.swing.JLabel();\n jLabel3 = new javax.swing.JLabel();\n campoNroFactura = new javax.swing.JTextField();\n campoCliente = new javax.swing.JTextField();\n campoValor = new javax.swing.JTextField();\n botonBuscar = new javax.swing.JButton();\n botonRegistrar = new javax.swing.JButton();\n jLabel5 = new javax.swing.JLabel();\n campoFecha = new com.toedter.calendar.JDateChooser();\n opcionPagoR = new javax.swing.JRadioButton();\n\n setBorder(javax.swing.BorderFactory.createTitledBorder(\"Registro Ventas Antiguas\"));\n\n jLabel1.setText(\"Nro Factura\");\n\n jLabel2.setText(\"Cliente\");\n\n jLabel3.setText(\"Valor Factura\");\n\n campoCliente.setEditable(false);\n\n botonBuscar.setText(\"Buscar\");\n botonBuscar.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n botonBuscarActionPerformed(evt);\n }\n });\n\n botonRegistrar.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/Imagenes/Add.png\"))); // NOI18N\n botonRegistrar.setText(\"Registrar\");\n botonRegistrar.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n botonRegistrarActionPerformed(evt);\n }\n });\n\n jLabel5.setText(\"Fecha Venta\");\n\n opcionPagoR.setText(\"Pagó\");\n opcionPagoR.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n opcionPagoRActionPerformed(evt);\n }\n });\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 .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel5)\n .addGap(18, 18, 18)\n .addComponent(campoFecha, javax.swing.GroupLayout.DEFAULT_SIZE, 300, Short.MAX_VALUE)\n .addGap(18, 18, 18)\n .addComponent(jLabel1)\n .addGap(18, 18, 18)\n .addComponent(campoNroFactura, javax.swing.GroupLayout.PREFERRED_SIZE, 291, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addGap(0, 0, Short.MAX_VALUE)\n .addComponent(botonRegistrar))\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addComponent(jLabel2)\n .addGap(45, 45, 45))\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel3)\n .addGap(14, 14, 14)))\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)\n .addComponent(campoValor, javax.swing.GroupLayout.DEFAULT_SIZE, 300, Short.MAX_VALUE)\n .addComponent(campoCliente))\n .addGap(18, 18, 18)\n .addComponent(botonBuscar))\n .addComponent(opcionPagoR))\n .addGap(0, 0, Short.MAX_VALUE)))\n .addContainerGap())\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jLabel5)\n .addComponent(campoFecha, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel1)\n .addComponent(campoNroFactura, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel2)\n .addComponent(campoCliente, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(botonBuscar))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel3)\n .addComponent(campoValor, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addComponent(opcionPagoR)\n .addGap(18, 18, 18)\n .addComponent(botonRegistrar)\n .addContainerGap(229, Short.MAX_VALUE))\n );\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n bgTipo = new javax.swing.ButtonGroup();\n jlpDados = new javax.swing.JLayeredPane();\n jlNome = new javax.swing.JLabel();\n jlPreco = new javax.swing.JLabel();\n jlTipo = new javax.swing.JLabel();\n jlQuantidade = new javax.swing.JLabel();\n jtNome = new javax.swing.JTextField();\n jtPreco = new javax.swing.JTextField();\n jrQuarto = new javax.swing.JRadioButton();\n jrSala = new javax.swing.JRadioButton();\n jrCozinha = new javax.swing.JRadioButton();\n jtQuantidade = new javax.swing.JTextField();\n jlAltura = new javax.swing.JLabel();\n jlLargura = new javax.swing.JLabel();\n jlComprimento = new javax.swing.JLabel();\n jtAltura = new javax.swing.JTextField();\n jtLargura = new javax.swing.JTextField();\n jtComprimento = new javax.swing.JTextField();\n jlNomeErro = new javax.swing.JLabel();\n jlPrecoErro = new javax.swing.JLabel();\n jlQuantidadeErro = new javax.swing.JLabel();\n jlAlturaErro = new javax.swing.JLabel();\n jlLarguraErro = new javax.swing.JLabel();\n jlComprimentoErro = new javax.swing.JLabel();\n jlpAcoes = new javax.swing.JLayeredPane();\n jbCadastrar = new javax.swing.JButton();\n jbLimpar = new javax.swing.JButton();\n\n setClosable(true);\n setIconifiable(true);\n setMaximizable(true);\n setTitle(\"Cadastro de Moveis\");\n\n jlpDados.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED));\n\n jlNome.setText(\"Nome: \");\n\n jlPreco.setText(\"Preço:\");\n\n jlTipo.setText(\"Tipo:\");\n\n jlQuantidade.setText(\"Quantidade:\");\n\n jtNome.addFocusListener(new java.awt.event.FocusAdapter() {\n public void focusLost(java.awt.event.FocusEvent evt) {\n jtNomeFocusLost(evt);\n }\n });\n jtNome.addKeyListener(new java.awt.event.KeyAdapter() {\n public void keyPressed(java.awt.event.KeyEvent evt) {\n jtNomeKeyPressed(evt);\n }\n });\n\n jtPreco.addFocusListener(new java.awt.event.FocusAdapter() {\n public void focusLost(java.awt.event.FocusEvent evt) {\n jtPrecoFocusLost(evt);\n }\n });\n jtPreco.addKeyListener(new java.awt.event.KeyAdapter() {\n public void keyPressed(java.awt.event.KeyEvent evt) {\n jtPrecoKeyPressed(evt);\n }\n });\n\n bgTipo.add(jrQuarto);\n jrQuarto.setText(\"Quarto\");\n jrQuarto.setActionCommand(\"Quarto\");\n jrQuarto.addKeyListener(new java.awt.event.KeyAdapter() {\n public void keyPressed(java.awt.event.KeyEvent evt) {\n jrQuartoKeyPressed(evt);\n }\n });\n\n bgTipo.add(jrSala);\n jrSala.setText(\"Sala\");\n jrSala.setActionCommand(\"Sala\");\n jrSala.addKeyListener(new java.awt.event.KeyAdapter() {\n public void keyPressed(java.awt.event.KeyEvent evt) {\n jrSalaKeyPressed(evt);\n }\n });\n\n bgTipo.add(jrCozinha);\n jrCozinha.setText(\"Cozinha\");\n jrCozinha.setActionCommand(\"Cozinha\");\n jrCozinha.addKeyListener(new java.awt.event.KeyAdapter() {\n public void keyPressed(java.awt.event.KeyEvent evt) {\n jrCozinhaKeyPressed(evt);\n }\n });\n\n jtQuantidade.addFocusListener(new java.awt.event.FocusAdapter() {\n public void focusLost(java.awt.event.FocusEvent evt) {\n jtQuantidadeFocusLost(evt);\n }\n });\n jtQuantidade.addKeyListener(new java.awt.event.KeyAdapter() {\n public void keyPressed(java.awt.event.KeyEvent evt) {\n jtQuantidadeKeyPressed(evt);\n }\n });\n\n jlAltura.setText(\"Altura:\");\n\n jlLargura.setText(\"Largura:\");\n\n jlComprimento.setText(\"Comprimento:\");\n\n jtAltura.addFocusListener(new java.awt.event.FocusAdapter() {\n public void focusLost(java.awt.event.FocusEvent evt) {\n jtAlturaFocusLost(evt);\n }\n });\n jtAltura.addKeyListener(new java.awt.event.KeyAdapter() {\n public void keyPressed(java.awt.event.KeyEvent evt) {\n jtAlturaKeyPressed(evt);\n }\n });\n\n jtLargura.addFocusListener(new java.awt.event.FocusAdapter() {\n public void focusLost(java.awt.event.FocusEvent evt) {\n jtLarguraFocusLost(evt);\n }\n });\n jtLargura.addKeyListener(new java.awt.event.KeyAdapter() {\n public void keyPressed(java.awt.event.KeyEvent evt) {\n jtLarguraKeyPressed(evt);\n }\n });\n\n jtComprimento.addFocusListener(new java.awt.event.FocusAdapter() {\n public void focusLost(java.awt.event.FocusEvent evt) {\n jtComprimentoFocusLost(evt);\n }\n });\n jtComprimento.addKeyListener(new java.awt.event.KeyAdapter() {\n public void keyPressed(java.awt.event.KeyEvent evt) {\n jtComprimentoKeyPressed(evt);\n }\n });\n\n jlpDados.setLayer(jlNome, javax.swing.JLayeredPane.DEFAULT_LAYER);\n jlpDados.setLayer(jlPreco, javax.swing.JLayeredPane.DEFAULT_LAYER);\n jlpDados.setLayer(jlTipo, javax.swing.JLayeredPane.DEFAULT_LAYER);\n jlpDados.setLayer(jlQuantidade, javax.swing.JLayeredPane.DEFAULT_LAYER);\n jlpDados.setLayer(jtNome, javax.swing.JLayeredPane.DEFAULT_LAYER);\n jlpDados.setLayer(jtPreco, javax.swing.JLayeredPane.DEFAULT_LAYER);\n jlpDados.setLayer(jrQuarto, javax.swing.JLayeredPane.DEFAULT_LAYER);\n jlpDados.setLayer(jrSala, javax.swing.JLayeredPane.DEFAULT_LAYER);\n jlpDados.setLayer(jrCozinha, javax.swing.JLayeredPane.DEFAULT_LAYER);\n jlpDados.setLayer(jtQuantidade, javax.swing.JLayeredPane.DEFAULT_LAYER);\n jlpDados.setLayer(jlAltura, javax.swing.JLayeredPane.DEFAULT_LAYER);\n jlpDados.setLayer(jlLargura, javax.swing.JLayeredPane.DEFAULT_LAYER);\n jlpDados.setLayer(jlComprimento, javax.swing.JLayeredPane.DEFAULT_LAYER);\n jlpDados.setLayer(jtAltura, javax.swing.JLayeredPane.DEFAULT_LAYER);\n jlpDados.setLayer(jtLargura, javax.swing.JLayeredPane.DEFAULT_LAYER);\n jlpDados.setLayer(jtComprimento, javax.swing.JLayeredPane.DEFAULT_LAYER);\n jlpDados.setLayer(jlNomeErro, javax.swing.JLayeredPane.DEFAULT_LAYER);\n jlpDados.setLayer(jlPrecoErro, javax.swing.JLayeredPane.DEFAULT_LAYER);\n jlpDados.setLayer(jlQuantidadeErro, javax.swing.JLayeredPane.DEFAULT_LAYER);\n jlpDados.setLayer(jlAlturaErro, javax.swing.JLayeredPane.DEFAULT_LAYER);\n jlpDados.setLayer(jlLarguraErro, javax.swing.JLayeredPane.DEFAULT_LAYER);\n jlpDados.setLayer(jlComprimentoErro, javax.swing.JLayeredPane.DEFAULT_LAYER);\n\n javax.swing.GroupLayout jlpDadosLayout = new javax.swing.GroupLayout(jlpDados);\n jlpDados.setLayout(jlpDadosLayout);\n jlpDadosLayout.setHorizontalGroup(\n jlpDadosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jlpDadosLayout.createSequentialGroup()\n .addGap(36, 36, 36)\n .addGroup(jlpDadosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jlPreco)\n .addComponent(jlNome, javax.swing.GroupLayout.PREFERRED_SIZE, 42, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jlTipo)\n .addComponent(jlQuantidade)\n .addComponent(jlAltura)\n .addComponent(jlComprimento)\n .addComponent(jlLargura))\n .addGap(18, 18, 18)\n .addGroup(jlpDadosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jlpDadosLayout.createSequentialGroup()\n .addComponent(jrQuarto)\n .addGap(18, 18, 18)\n .addComponent(jrSala)\n .addGap(18, 18, 18)\n .addComponent(jrCozinha))\n .addGroup(jlpDadosLayout.createSequentialGroup()\n .addGroup(jlpDadosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jtNome, javax.swing.GroupLayout.PREFERRED_SIZE, 204, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jtPreco, javax.swing.GroupLayout.PREFERRED_SIZE, 204, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jtQuantidade, javax.swing.GroupLayout.PREFERRED_SIZE, 204, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jtLargura, javax.swing.GroupLayout.PREFERRED_SIZE, 204, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(jlpDadosLayout.createSequentialGroup()\n .addGap(2, 2, 2)\n .addComponent(jtComprimento, javax.swing.GroupLayout.PREFERRED_SIZE, 202, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addComponent(jtAltura, javax.swing.GroupLayout.PREFERRED_SIZE, 204, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(42, 42, 42)\n .addGroup(jlpDadosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(jlNomeErro, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jlComprimentoErro, javax.swing.GroupLayout.DEFAULT_SIZE, 53, Short.MAX_VALUE)\n .addComponent(jlAlturaErro, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jlLarguraErro, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jlQuantidadeErro, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 45, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jlPrecoErro, javax.swing.GroupLayout.PREFERRED_SIZE, 45, javax.swing.GroupLayout.PREFERRED_SIZE))))\n .addContainerGap(50, Short.MAX_VALUE))\n );\n jlpDadosLayout.setVerticalGroup(\n jlpDadosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jlpDadosLayout.createSequentialGroup()\n .addGap(43, 43, 43)\n .addGroup(jlpDadosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jlNomeErro, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(jlpDadosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jtNome, javax.swing.GroupLayout.PREFERRED_SIZE, 29, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jlNome, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGroup(jlpDadosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jlpDadosLayout.createSequentialGroup()\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 31, Short.MAX_VALUE)\n .addGroup(jlpDadosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jtPreco, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jlPreco)))\n .addGroup(jlpDadosLayout.createSequentialGroup()\n .addGap(30, 30, 30)\n .addComponent(jlPrecoErro, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))\n .addGap(27, 27, 27)\n .addGroup(jlpDadosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jlTipo)\n .addComponent(jrQuarto)\n .addComponent(jrSala)\n .addComponent(jrCozinha))\n .addGap(19, 19, 19)\n .addGroup(jlpDadosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jtQuantidade, javax.swing.GroupLayout.PREFERRED_SIZE, 31, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jlQuantidade)\n .addComponent(jlQuantidadeErro, javax.swing.GroupLayout.PREFERRED_SIZE, 31, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(24, 24, 24)\n .addGroup(jlpDadosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jlpDadosLayout.createSequentialGroup()\n .addComponent(jlAltura)\n .addGap(8, 8, 8))\n .addComponent(jtAltura, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jlAlturaErro, javax.swing.GroupLayout.PREFERRED_SIZE, 31, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(10, 10, 10)\n .addGroup(jlpDadosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jtLargura, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jlLargura)\n .addComponent(jlLarguraErro, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(13, 13, 13)\n .addGroup(jlpDadosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(jlComprimentoErro, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jlComprimento, javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jtComprimento, javax.swing.GroupLayout.DEFAULT_SIZE, 34, Short.MAX_VALUE))\n .addGap(41, 41, 41))\n );\n\n jlpAcoes.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED));\n\n jbCadastrar.setText(\"Cadastrar\");\n jbCadastrar.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jbCadastrarActionPerformed(evt);\n }\n });\n\n jbLimpar.setText(\"Limpar\");\n jbLimpar.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jbLimparActionPerformed(evt);\n }\n });\n\n jlpAcoes.setLayer(jbCadastrar, javax.swing.JLayeredPane.DEFAULT_LAYER);\n jlpAcoes.setLayer(jbLimpar, javax.swing.JLayeredPane.DEFAULT_LAYER);\n\n javax.swing.GroupLayout jlpAcoesLayout = new javax.swing.GroupLayout(jlpAcoes);\n jlpAcoes.setLayout(jlpAcoesLayout);\n jlpAcoesLayout.setHorizontalGroup(\n jlpAcoesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jlpAcoesLayout.createSequentialGroup()\n .addGap(61, 61, 61)\n .addComponent(jbCadastrar, javax.swing.GroupLayout.PREFERRED_SIZE, 90, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jbLimpar, javax.swing.GroupLayout.PREFERRED_SIZE, 93, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(70, 70, 70))\n );\n jlpAcoesLayout.setVerticalGroup(\n jlpAcoesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jlpAcoesLayout.createSequentialGroup()\n .addGap(23, 23, 23)\n .addGroup(jlpAcoesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jbLimpar, javax.swing.GroupLayout.PREFERRED_SIZE, 37, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jbCadastrar, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addContainerGap(27, Short.MAX_VALUE))\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.LEADING)\n .addComponent(jlpDados)\n .addComponent(jlpAcoes)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jlpDados)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jlpAcoes, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n );\n\n pack();\n }",
"public PanelMethodSEDN(Color fondo){\n super(fondo,\"Solucion Sistemas ED\");\n titulo_n = new JLabel(\"Num. de Div:\");\n setPanelDatos();\n setInformacion();\n setAllElements();\n calcular.addActionListener(this);\n limpiar.addActionListener(this);\n agregar.addActionListener(this);\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n buttonGroup1 = new javax.swing.ButtonGroup();\n jLabel1 = new javax.swing.JLabel();\n jLabel2 = new javax.swing.JLabel();\n jLabel3 = new javax.swing.JLabel();\n jLabel4 = new javax.swing.JLabel();\n jcombocateg = new javax.swing.JComboBox();\n txtcodigo = new javax.swing.JTextField();\n txtproduto = new javax.swing.JTextField();\n txtpreco = new javax.swing.JTextField();\n jButton1 = new javax.swing.JButton();\n jPanel1 = new javax.swing.JPanel();\n jRadioButton1 = new javax.swing.JRadioButton();\n jRadioButton2 = new javax.swing.JRadioButton();\n jLabel5 = new javax.swing.JLabel();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);\n setTitle(\"Adicionar Produtos\");\n setResizable(false);\n\n jLabel1.setText(\"Codigo\");\n\n jLabel2.setText(\"Produto\");\n\n jLabel3.setText(\"Categoria\");\n\n jLabel4.setText(\"Preço\");\n\n jcombocateg.setModel(new javax.swing.DefaultComboBoxModel(new String[] { \"Medicamento\", \"Perfumaria\" }));\n\n jButton1.setFont(new java.awt.Font(\"Tahoma\", 1, 18)); // NOI18N\n jButton1.setText(\"Adicionar\");\n jButton1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton1ActionPerformed(evt);\n }\n });\n\n jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder(null, \"Status\", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font(\"Tahoma\", 1, 13))); // NOI18N\n\n buttonGroup1.add(jRadioButton1);\n jRadioButton1.setText(\"Disponivel\");\n\n buttonGroup1.add(jRadioButton2);\n jRadioButton2.setText(\"Em Falta\");\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(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jRadioButton1)\n .addContainerGap())\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jRadioButton2)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n jPanel1Layout.setVerticalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(jRadioButton1)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 3, Short.MAX_VALUE)\n .addComponent(jRadioButton2))\n );\n\n jLabel5.setFont(new java.awt.Font(\"Tahoma\", 1, 18)); // NOI18N\n jLabel5.setText(\"Adicionar Produtos\");\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.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(121, 121, 121)\n .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 140, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(137, Short.MAX_VALUE))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel3, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 60, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel4, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 34, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel2, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(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(10, 10, 10)\n .addComponent(txtpreco, javax.swing.GroupLayout.PREFERRED_SIZE, 90, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(layout.createSequentialGroup()\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jcombocateg, javax.swing.GroupLayout.PREFERRED_SIZE, 110, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGap(43, 43, 43)\n .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(layout.createSequentialGroup()\n .addGap(12, 12, 12)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(txtcodigo, javax.swing.GroupLayout.PREFERRED_SIZE, 96, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(txtproduto, javax.swing.GroupLayout.PREFERRED_SIZE, 252, javax.swing.GroupLayout.PREFERRED_SIZE))))\n .addGap(26, 26, 26))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, 184, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\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(jLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, 39, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 34, Short.MAX_VALUE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(txtcodigo, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(15, 15, 15)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(txtproduto, javax.swing.GroupLayout.PREFERRED_SIZE, 31, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(43, 43, 43)\n .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jcombocateg, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(17, 17, 17)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(txtpreco, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(31, 31, 31)))\n .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(22, 22, 22))\n );\n\n setSize(new java.awt.Dimension(416, 415));\n setLocationRelativeTo(null);\n }",
"private JRadioButton getJRadioButtonButtWrap() {\r\n\t\t// if (buttWrap == null) {\r\n\t\tbuttWrap = new JRadioButton();\r\n\t\tbuttWrap.setText(\"Wrap\");\r\n\t\tbuttWrap.setToolTipText(\"filling borders with copies of the whole image\");\r\n\t\tbuttWrap.addActionListener(this);\r\n\t\tbuttWrap.setActionCommand(\"parameter\");\r\n\t\t// }\r\n\t\treturn buttWrap;\r\n\t}",
"public PanelRadSaFakturom() {\n initComponents();\n srediFormu();\n }",
"private JRadioButton getJRadioButtonButtReflect() {\r\n\t\t// if (buttReflect == null) {\r\n\t\tbuttReflect = new JRadioButton();\r\n\t\tbuttReflect.setText(\"Reflect\");\r\n\t\tbuttReflect.setToolTipText(\"filling borders with copies of the whole image\");\r\n\t\tbuttReflect.addActionListener(this);\r\n\t\tbuttReflect.setActionCommand(\"parameter\");\r\n\t\t// }\r\n\t\treturn buttReflect;\r\n\t}",
"@Override\r\n public String toString() {\r\n return \"Circulo{\" + \"radio=\" + radio + '}';\r\n }",
"private void makePanelTask() {\r\n if (panelTask == null) {\r\n panelTask = makePanel(jframe, BorderLayout.CENTER,\r\n \"Task Details\", 180, 50, 200, 25);\r\n\r\n JLabel createLabelName = makeJLabel(\"Name: \", 10, 100, 80, 25);\r\n JLabel createLabelDescription = makeJLabel(\"Description: \", 10, 130, 80, 25);\r\n JLabel createLabelDueDate = makeJLabel(\"Due Date: \", 10, 160, 80, 25);\r\n JLabel createLabelPriority = makeJLabel(\"Priority Level: \", 10, 190, 80, 25);\r\n\r\n addToTodoTaskGui(createLabelName, createLabelDescription, createLabelDueDate, createLabelPriority);\r\n\r\n JButton clickSave = makeButton(\"saveTask\", \"Save\", 80, 250, 150, 25,\r\n JComponent.BOTTOM_ALIGNMENT, \"cli.wav\");\r\n panelTask.add(clickSave);\r\n\r\n JButton clickCancel = makeButton(\"cancelTask\", \"Cancel\", 280, 250, 150, 25,\r\n JComponent.BOTTOM_ALIGNMENT, \"cli.wav\");\r\n panelTask.add(clickCancel);\r\n }\r\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n operacaoButtonGroup = new ButtonGroup();\n tudoPanel = new JPanel();\n tituloLabel = new JLabel();\n corpoContaPanel = new JPanel();\n contaPanel = new JPanel();\n operacaoPanel = new JPanel();\n operacaoLabel = new JLabel();\n selectOperacaoPanel = new JPanel();\n depositoRadioButton = new JRadioButton();\n saqueRadioButton = new JRadioButton();\n saldoRadioButton = new JRadioButton();\n valorPanel = new JPanel();\n valorLabel = new JLabel();\n valorTextField = new JTextField();\n vazioPanel7 = new JPanel();\n okPanel = new JPanel();\n okButton = new JButton();\n sairButton = new JButton();\n vazioPanel6 = new JPanel();\n\n FormListener formListener = new FormListener();\n\n setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);\n setTitle(\"Banco SSA\");\n setPreferredSize(new Dimension(350, 340));\n setResizable(false);\n\n tudoPanel.setLayout(new BorderLayout());\n\n tituloLabel.setHorizontalAlignment(SwingConstants.CENTER);\n tituloLabel.setIcon(new ImageIcon(getClass().getResource(\"/br/com/senai/main/loco SSA.png\"))); // NOI18N\n tudoPanel.add(tituloLabel, BorderLayout.PAGE_START);\n\n contaPanel.setBorder(BorderFactory.createTitledBorder(null, \"Conta:\", TitledBorder.LEFT, TitledBorder.ABOVE_TOP, new Font(\"sansserif\", 1, 18))); // NOI18N\n contaPanel.setPreferredSize(new Dimension(300, 200));\n contaPanel.setLayout(new BorderLayout());\n\n operacaoPanel.setLayout(new GridLayout(1, 2));\n\n operacaoLabel.setText(\"Operação:\");\n operacaoPanel.add(operacaoLabel);\n\n selectOperacaoPanel.setLayout(new GridLayout(3, 1));\n\n operacaoButtonGroup.add(depositoRadioButton);\n depositoRadioButton.setSelected(true);\n depositoRadioButton.setText(\"Depósito\");\n selectOperacaoPanel.add(depositoRadioButton);\n\n operacaoButtonGroup.add(saqueRadioButton);\n saqueRadioButton.setText(\"Saque\");\n selectOperacaoPanel.add(saqueRadioButton);\n\n operacaoButtonGroup.add(saldoRadioButton);\n saldoRadioButton.setText(\"Saldo\");\n selectOperacaoPanel.add(saldoRadioButton);\n\n operacaoPanel.add(selectOperacaoPanel);\n\n contaPanel.add(operacaoPanel, BorderLayout.NORTH);\n\n valorPanel.setLayout(new GridLayout(2, 2, 5, 5));\n\n valorLabel.setText(\"Valor:\");\n valorPanel.add(valorLabel);\n\n valorTextField.addActionListener(formListener);\n valorPanel.add(valorTextField);\n valorPanel.add(vazioPanel7);\n\n okButton.setText(\"OK\");\n okButton.setPreferredSize(new Dimension(85, 30));\n okPanel.add(okButton);\n\n valorPanel.add(okPanel);\n\n contaPanel.add(valorPanel, BorderLayout.SOUTH);\n\n corpoContaPanel.add(contaPanel);\n\n sairButton.setText(\"Sair\");\n sairButton.setPreferredSize(new Dimension(150, 30));\n corpoContaPanel.add(sairButton);\n\n vazioPanel6.setPreferredSize(new Dimension(150, 10));\n corpoContaPanel.add(vazioPanel6);\n\n tudoPanel.add(corpoContaPanel, BorderLayout.CENTER);\n\n getContentPane().add(tudoPanel, BorderLayout.CENTER);\n\n pack();\n }",
"private JPanel getPanel() {\n\t\tint width = resources.getSize().width / 5;\n\t\tint height = resources.getSize().height / 14;\n\n\t\tJLabel limit = createJLabelImg(\"textfield.png\", width - width / 15,\n\t\t\t\theight, 1f);\n\t\tint limitWidth = limit.getIcon().getIconWidth();\n\t\tint limitHeight = limit.getIcon().getIconHeight();\n\n\t\ton = createJLabelImg(\"toggle_on.png\", limitWidth, limitHeight, 1f)\n\t\t\t\t.getIcon();\n\t\toff = createJLabelImg(\"toggle_off.png\", limitWidth, limitHeight, 1f)\n\t\t\t\t.getIcon();\n\n\t\ttoggle = new JCheckBox();\n\t\ttoggle.setSelectedIcon(on);\n\t\ttoggle.setIcon(off);\n\t\ttoggle.setEnabled(true);\n\t\ttoggle.setSelected(value);\n\t\ttoggle.setCursor(new Cursor(Cursor.HAND_CURSOR));\n\t\ttoggle.setFocusable(false);\n\t\ttoggle.setBorder(null);\n\t\ttoggle.setOpaque(false);\n\n\t\tint indent = limitWidth / 25;\n\t\tint textWidthLimit = limitWidth - indent * 2 - on.getIconWidth();\n\t\tString fieldStr = Util.clipText(fieldName + \" \",\n\t\t\t\tresources.getFont(\"italic\", 15f), textWidthLimit);\n\t\tJLabel label = new JLabel(fieldStr);\n\t\tlabel.setFont(resources.getFont(\"italic\", 15f));\n\t\tlabel.setForeground(resources.getTextColor());\n\n\t\tJPanel toggleWrapper = new JPanel(new FlowLayout(FlowLayout.LEFT,\n\t\t\t\tindent, 0));\n\t\ttoggleWrapper.setOpaque(false);\n\t\ttoggleWrapper.setPreferredSize(new Dimension(limitWidth, limitHeight));\n\t\ttoggleWrapper.setMaximumSize(toggleWrapper.getPreferredSize());\n\t\ttoggleWrapper.add(toggle);\n\t\ttoggleWrapper.add(label);\n\n\t\tJPanel container = new JPanel(new FlowLayout(FlowLayout.LEFT, 0,\n\t\t\t\theight / 7));\n\t\tcontainer.setOpaque(false);\n\t\tcontainer.add(toggleWrapper);\n\t\tcontainer.setPreferredSize(new Dimension(width, container\n\t\t\t\t.getPreferredSize().height));\n\t\tcontainer.setMaximumSize(container.getPreferredSize());\n\n\t\treturn container;\n\t}",
"Radian createRadian();",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n buttonGroup1 = new javax.swing.ButtonGroup();\n panelDadosCliente = new javax.swing.JPanel();\n jLabel1 = new javax.swing.JLabel();\n txtCPFouCNPJCliente = new javax.swing.JTextField();\n CPFRadioButton = new javax.swing.JRadioButton();\n CNPJRadioButton = new javax.swing.JRadioButton();\n btnBuscarCliente = new javax.swing.JButton();\n btnCadastrarCliente = new javax.swing.JButton();\n btnSair = new javax.swing.JButton();\n jPanel2 = new javax.swing.JPanel();\n jLabel2 = new javax.swing.JLabel();\n jLabel3 = new javax.swing.JLabel();\n txtCodCliente = new javax.swing.JTextField();\n txtNomeCliente = new javax.swing.JTextField();\n jLabel4 = new javax.swing.JLabel();\n txtTelefone1Cliente = new javax.swing.JTextField();\n jLabel5 = new javax.swing.JLabel();\n txtTelefone2Cliente = new javax.swing.JTextField();\n jLabel6 = new javax.swing.JLabel();\n txtEndereçoCliente = new javax.swing.JTextField();\n jLabel7 = new javax.swing.JLabel();\n txtCPFCliente = new javax.swing.JTextField();\n jLabel8 = new javax.swing.JLabel();\n txtRGCliente = new javax.swing.JTextField();\n jLabel9 = new javax.swing.JLabel();\n txtCidadeCliente = new javax.swing.JTextField();\n jLabel10 = new javax.swing.JLabel();\n txtEstadoCliente = new javax.swing.JTextField();\n jLabel11 = new javax.swing.JLabel();\n txtClienteCNPJ = new javax.swing.JTextField();\n jLabel12 = new javax.swing.JLabel();\n txtInscEstadualCliente = new javax.swing.JTextField();\n jLabel13 = new javax.swing.JLabel();\n txtInscMunicipalCliente = new javax.swing.JTextField();\n jLabel14 = new javax.swing.JLabel();\n txtNomeFantasiaCliente = new javax.swing.JTextField();\n jLabel15 = new javax.swing.JLabel();\n txtRazaoSocialCliente = new javax.swing.JTextField();\n btnSalvarDadosCliente = new javax.swing.JButton();\n panelOrdemServico = new javax.swing.JPanel();\n jLabel16 = new javax.swing.JLabel();\n cmbOrdensServicoCliente = new javax.swing.JComboBox<>();\n btnConsultarOS = new javax.swing.JButton();\n btnCriarNovaOS = new javax.swing.JButton();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);\n addWindowListener(new java.awt.event.WindowAdapter() {\n public void windowClosing(java.awt.event.WindowEvent evt) {\n formWindowClosing(evt);\n }\n });\n\n panelDadosCliente.setBorder(javax.swing.BorderFactory.createTitledBorder(\"Buscar cliente\"));\n panelDadosCliente.setName(\"panelBuscaCliente\"); // NOI18N\n\n jLabel1.setText(\"Digite CPF ou CNPJ:\");\n\n txtCPFouCNPJCliente.setName(\"\"); // NOI18N\n\n buttonGroup1.add(CPFRadioButton);\n CPFRadioButton.setText(\"CPF\");\n CPFRadioButton.setName(\"\"); // NOI18N\n\n buttonGroup1.add(CNPJRadioButton);\n CNPJRadioButton.setText(\"CNPJ\");\n CNPJRadioButton.setName(\"\"); // NOI18N\n\n btnBuscarCliente.setText(\"Buscar\");\n btnBuscarCliente.setName(\"\"); // NOI18N\n btnBuscarCliente.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnBuscarClienteActionPerformed(evt);\n }\n });\n\n btnCadastrarCliente.setText(\"Novo cliente\");\n btnCadastrarCliente.setName(\"\"); // NOI18N\n btnCadastrarCliente.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnCadastrarClienteActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout panelDadosClienteLayout = new javax.swing.GroupLayout(panelDadosCliente);\n panelDadosCliente.setLayout(panelDadosClienteLayout);\n panelDadosClienteLayout.setHorizontalGroup(\n panelDadosClienteLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(panelDadosClienteLayout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jLabel1)\n .addGap(18, 18, 18)\n .addComponent(txtCPFouCNPJCliente, javax.swing.GroupLayout.PREFERRED_SIZE, 177, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addComponent(CPFRadioButton)\n .addGap(26, 26, 26)\n .addComponent(CNPJRadioButton)\n .addGap(18, 18, 18)\n .addComponent(btnBuscarCliente)\n .addGap(18, 18, 18)\n .addComponent(btnCadastrarCliente)\n .addContainerGap(35, Short.MAX_VALUE))\n );\n panelDadosClienteLayout.setVerticalGroup(\n panelDadosClienteLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(panelDadosClienteLayout.createSequentialGroup()\n .addContainerGap()\n .addGroup(panelDadosClienteLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel1)\n .addComponent(txtCPFouCNPJCliente, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(CPFRadioButton)\n .addComponent(CNPJRadioButton)\n .addComponent(btnBuscarCliente)\n .addComponent(btnCadastrarCliente))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n\n btnSair.setText(\"Sair\");\n btnSair.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnSairActionPerformed(evt);\n }\n });\n\n jPanel2.setBorder(javax.swing.BorderFactory.createTitledBorder(\"Dados do cliente\"));\n\n jLabel2.setText(\"ID:\");\n\n jLabel3.setText(\"Nome:\");\n\n jLabel4.setText(\"Telefone1:\");\n\n jLabel5.setText(\"Telefone 2:\");\n\n jLabel6.setText(\"Endereço:\");\n\n jLabel7.setText(\"CPF:\");\n\n jLabel8.setText(\"RG:\");\n\n jLabel9.setText(\"Cidade:\");\n\n jLabel10.setText(\"Estado:\");\n\n jLabel11.setText(\"CNPJ:\");\n\n jLabel12.setText(\"Insc. Estadual:\");\n\n jLabel13.setText(\"Insc. Municipal:\");\n\n jLabel14.setText(\"Nome Fantasia:\");\n\n jLabel15.setText(\"Razão Social:\");\n\n btnSalvarDadosCliente.setText(\"Salvar dados\");\n btnSalvarDadosCliente.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnSalvarDadosClienteActionPerformed(evt);\n }\n });\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 .addGap(15, 15, 15)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jLabel10)\n .addComponent(jLabel9)\n .addComponent(jLabel8)\n .addComponent(jLabel7)\n .addComponent(jLabel6)\n .addComponent(jLabel5)\n .addComponent(jLabel4)\n .addComponent(jLabel3)\n .addComponent(jLabel2))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(txtCodCliente)\n .addComponent(txtNomeCliente)\n .addComponent(txtTelefone1Cliente)\n .addComponent(txtTelefone2Cliente)\n .addComponent(txtEndereçoCliente)\n .addComponent(txtCPFCliente)\n .addComponent(txtRGCliente)\n .addComponent(txtCidadeCliente)\n .addComponent(txtEstadoCliente, javax.swing.GroupLayout.DEFAULT_SIZE, 243, Short.MAX_VALUE))\n .addGap(31, 31, 31)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jLabel11)\n .addComponent(jLabel12)\n .addComponent(jLabel13)\n .addComponent(jLabel14)\n .addComponent(jLabel15))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(txtClienteCNPJ)\n .addComponent(txtInscEstadualCliente)\n .addComponent(txtInscMunicipalCliente)\n .addComponent(txtNomeFantasiaCliente)\n .addComponent(txtRazaoSocialCliente, javax.swing.GroupLayout.DEFAULT_SIZE, 221, Short.MAX_VALUE))\n .addComponent(btnSalvarDadosCliente))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n jPanel2Layout.setVerticalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addGap(19, 19, 19)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel2)\n .addComponent(txtCodCliente, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel11)\n .addComponent(txtClienteCNPJ, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(txtNomeCliente, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel3)\n .addComponent(jLabel12)\n .addComponent(txtInscEstadualCliente, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel4)\n .addComponent(txtTelefone1Cliente, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel13)\n .addComponent(txtInscMunicipalCliente, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel5)\n .addComponent(txtTelefone2Cliente, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel14)\n .addComponent(txtNomeFantasiaCliente, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel6)\n .addComponent(txtEndereçoCliente, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel15)\n .addComponent(txtRazaoSocialCliente, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel7)\n .addComponent(txtCPFCliente, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel8)\n .addComponent(txtRGCliente, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(btnSalvarDadosCliente))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel9)\n .addComponent(txtCidadeCliente, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel10)\n .addComponent(txtEstadoCliente, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addContainerGap(18, Short.MAX_VALUE))\n );\n\n panelOrdemServico.setBorder(javax.swing.BorderFactory.createTitledBorder(\"Ordem de serviço\"));\n\n jLabel16.setText(\"OS deste cliente:\");\n\n btnConsultarOS.setText(\"Consultar\");\n btnConsultarOS.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnConsultarOSActionPerformed(evt);\n }\n });\n\n btnCriarNovaOS.setText(\"Nova OS\");\n btnCriarNovaOS.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnCriarNovaOSActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout panelOrdemServicoLayout = new javax.swing.GroupLayout(panelOrdemServico);\n panelOrdemServico.setLayout(panelOrdemServicoLayout);\n panelOrdemServicoLayout.setHorizontalGroup(\n panelOrdemServicoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(panelOrdemServicoLayout.createSequentialGroup()\n .addGap(23, 23, 23)\n .addComponent(jLabel16)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(cmbOrdensServicoCliente, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(btnConsultarOS)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(btnCriarNovaOS, javax.swing.GroupLayout.PREFERRED_SIZE, 103, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(14, 14, 14))\n );\n panelOrdemServicoLayout.setVerticalGroup(\n panelOrdemServicoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(panelOrdemServicoLayout.createSequentialGroup()\n .addContainerGap()\n .addGroup(panelOrdemServicoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel16)\n .addComponent(cmbOrdensServicoCliente, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(btnConsultarOS)\n .addComponent(btnCriarNovaOS))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\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.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(panelDadosCliente, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addGap(0, 0, Short.MAX_VALUE)\n .addComponent(btnSair, javax.swing.GroupLayout.PREFERRED_SIZE, 84, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addComponent(panelOrdemServico, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addContainerGap())\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(panelDadosCliente, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(panelOrdemServico, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(btnSair)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n\n pack();\n }",
"public void addFirstSynthPanel() {\n\t\t// the variable firstSynthPanel holds an instance of JPanel\n\t\t// created by the makeNewJPanel method\n\t\tfinal JPanel firstSynthPanel = makeNewJPanel();\n\t\t// the variable firstSynthButtonOn holds an instance of JButton labeled\n\t\t// \"On\"\n\n\t\tfirstSynthPanel.setBackground(new Color(13, 23, 0));\n\t\tfirstSynthButtonOn = new JButton(\"On\");\n\t\t//firstSynthButtonOn.setBackground(new Color(123, 150, 123));\n\t\t// the variable firstSynthButtonOff holds an instance of JButton labeled\n\t\t// \"Off\"\n\t\tfirstSynthButtonOff = new JButton(\"Off\");\n\t\tfirstSynthButtonOff.setEnabled(false);\n\t\t// the variable slider holds an instance of JSlider which is\n\t\t// set to be a Horizontal slider\n\t\tslider = new JSlider(JSlider.HORIZONTAL);\n\t\t// set the minimum value of the slider to FREQ_MIN\n\t\tslider.setMinimum(0);\n\t\tslider.setMaximum(FREQ_MAX);\n\t\t// set the inital value of the slider to 400\n\t\t//slider.setValue(1 / 5);\n\t\tslider.setEnabled(false);\n\n\t\ttextBox = new JTextField(String.valueOf((1 / 5) * FREQ_MAX), 8);\n\t\ttextBox.setEnabled(false);\n\n\t\tfirstSynthButtonOn.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(final ActionEvent evt) {\n\t\t\t\t// when the on button is pushed, doSendOn method is invoked\n\t\t\t\t// send the arguments for frequency and node\n\t\t\t\tdoSendOn(440, 1000);\n\t\t\t\tfirstSynthButtonOn.setEnabled(false);\n\t\t\t\tfirstSynthButtonOff.setEnabled(true);\n\t\t\t\ttextBox.setText(\"440.0\");\n\t\t\t\ttextBox.setEnabled(true);\n\t\t\t\tslider.setValue(2050);\n\t\t\t\tslider.setEnabled(true);\n\t\t\t}\n\t\t});\n\t\t// when the on button is pushed, doSendOff method is invoked\n\t\t// send the argument for node\n\t\tfirstSynthButtonOff.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(final ActionEvent evt) {\n\t\t\t\t// when the action occurs the doSend1 method is invoked\n\t\t\t\tdoSendOff(1000);\n\t\t\t\tfirstSynthButtonOn.setEnabled(true);\n\t\t\t\tfirstSynthButtonOff.setEnabled(false);\n\t\t\t\tslider.setEnabled(false);\n\t\t\t\tslider.setValue(0);\n\t\t\t\ttextBox.setEnabled(false);\n\t\t\t\ttextBox.setText(\"0\");\n\t\t\t}\n\t\t});\n\n\t\t// when the slider is moved, doSendSlider method is invoked\n\t\t// send the argument for freq and node\n\t\tslider.addChangeListener(new ChangeListener() {\n\n\t\t\t@Override\n\t\t\tpublic void stateChanged(final ChangeEvent evt) {\n\t\t\t\tfinal JSlider mySlider = (JSlider) evt.getSource();\n\t\t\t\tif (mySlider.getValueIsAdjusting()) {\n\t\t\t\t\tfloat freq = (float) mySlider.getValue();\n\t\t\t\t\tfreq = (freq / FREQ_MAX) * (freq / FREQ_MAX);\n\t\t\t\t\tfreq = freq * FREQ_MAX;\n\t\t\t\t\tfreq = freq + FREQ_MIN;\n\t\t\t\t\tdoPrintValue(freq);\n\t\t\t\t\tdoSendSlider(freq, 1000);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\t// when the value in the text-box is changed, doSendSlider method is\n\t\t// invoked; send the argument for freq and node\n\t\ttextBox.addActionListener(new ActionListener() {\n\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(final ActionEvent evt) {\n\t\t\t\tfinal JTextField field = (JTextField) evt.getSource();\n\t\t\t\tfloat freq = Float.valueOf(field.getText());\n\t\t\t\tif (freq > (FREQ_MIN + FREQ_MAX)) { freq = (FREQ_MIN + FREQ_MAX); doPrintValue(freq); }\n\t\t\t\tif (freq < FREQ_MIN) { freq = FREQ_MIN; doPrintValue(freq); }\n\t\t\t\tslider.setValue((int)(FREQ_MAX * Math.sqrt(((freq - FREQ_MIN) / FREQ_MAX))));\n\t\t\t\tdoSendSlider(freq, 1000);\n\t\t\t}\n\t\t});\n\n\n\t\t// add firstSynthButtonOn to the firstSynthPanel\n\t\tfirstSynthPanel.add(firstSynthButtonOn);\n\t\t// add firstSendButtonOff to the firstSynthPanel\n\t\tfirstSynthPanel.add(firstSynthButtonOff);\n\t\t// add slider to the firstSynthPanel\n\t\tfirstSynthPanel.add(slider);\n\t\tfirstSynthPanel.add(textBox);\n\n\t\t// add the firstSynthpanel to the OscUI Panel\n\t\tadd(firstSynthPanel);\n\t}",
"private JRadioButton getJRadioButtonButtSize() {\r\n\t\t// if (buttSize == null) {\r\n\t\tbuttSize = new JRadioButton();\r\n\t\tbuttSize.setText(\"New Size\");\r\n\t\tbuttSize.setToolTipText(\"prefers the new size setting instead of the zoom values\");\r\n\t\tbuttSize.addActionListener(this);\r\n\t\tbuttSize.setActionCommand(\"parameter\");\r\n\t\t// }\r\n\t\treturn buttSize;\r\n\t}",
"public JRadioButton getJRadioButtonBOhne()\n\t{\n\t\tif (jRadioButtonBOhne == null)\n\t\t{\n\t\t\tjRadioButtonBOhne = new JRadioButton();\n\t\t\tjRadioButtonBOhne.setText(\"ohne\");\n\t\t\tjRadioButtonBOhne.setVisible(false);\n\t\t\tjRadioButtonBOhne.setBounds(125, 145, 70, 20);\n\t\t\tjRadioButtonBOhne.addItemListener(new ItemListener() {\n\t\t\t\tpublic void itemStateChanged(ItemEvent evt) {\n\t\t\t\t\tonCheckBoxBreak(0, evt);}});\n\t\t\tjRadioButtonBOhne.addKeyListener(keyListener);\n\t\t}\n\t\treturn jRadioButtonBOhne;\n\t}",
"private void initComponents() {\r\n\r\n\t\tbuttonGroupSexo = new javax.swing.ButtonGroup();\r\n\t\tbuttonGroupAlcohol = new javax.swing.ButtonGroup();\r\n\t\tbuttonGroupPsicofarmacos = new javax.swing.ButtonGroup();\r\n\t\tbuttonGroupEstudios = new javax.swing.ButtonGroup();\r\n\t\tbuttonGroupTipoReporte = new javax.swing.ButtonGroup();\r\n\t\tjPanelFiltros = new javax.swing.JPanel();\r\n\t\tjTextFieldEdadInicio = new javax.swing.JTextField();\r\n\t\tjLabelEdad2 = new javax.swing.JLabel();\r\n\t\tjTextFieldEdadFin = new javax.swing.JTextField();\r\n\t\tjLabelEdad3 = new javax.swing.JLabel();\r\n\t\tjRadioButtonMasculino = new javax.swing.JRadioButton();\r\n\t\tjRadioButtonFemenino = new javax.swing.JRadioButton();\r\n\t\tjCheckBoxEdad = new javax.swing.JCheckBox();\r\n\t\tjCheckBoxSexo = new javax.swing.JCheckBox();\r\n\t\tjCheckBoxEstudios = new javax.swing.JCheckBox();\r\n\t\tjCheckBoxTomoHoyAlcohol = new javax.swing.JCheckBox();\r\n\t\tjRadioButtonTomoHoyAlcoholSI = new javax.swing.JRadioButton();\r\n\t\tjRadioButtonTomoHoyAlcoholNO = new javax.swing.JRadioButton();\r\n\t\tjCheckBoxTomoHoyPsicofarmacos = new javax.swing.JCheckBox();\r\n\t\tjRadioButtonTomoHoyPsicofarmacosSI = new javax.swing.JRadioButton();\r\n\t\tjRadioButtonTomoHoyPsicofarmacosNO = new javax.swing.JRadioButton();\r\n\t\tjRadioButtonEstudiosSI = new javax.swing.JRadioButton();\r\n\t\tjRadioButtonEstudiosNO = new javax.swing.JRadioButton();\r\n\t\tjButton1 = new javax.swing.JButton();\r\n\t\tjRadioResumida = new javax.swing.JRadioButton();\r\n\t\tjRadioDetallada = new javax.swing.JRadioButton();\r\n\r\n\t\tjPanelFiltros.setBorder(javax.swing.BorderFactory.createTitledBorder(\r\n\t\t\t\tnull, \"Filtros\",\r\n\t\t\t\tjavax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION,\r\n\t\t\t\tjavax.swing.border.TitledBorder.DEFAULT_POSITION,\r\n\t\t\t\tnew java.awt.Font(\"Segoe UI\", 3, 12)));\r\n\r\n\t\tjTextFieldEdadInicio\r\n\t\t\t\t.addFocusListener(new java.awt.event.FocusAdapter() {\r\n\t\t\t\t\tpublic void focusGained(java.awt.event.FocusEvent evt) {\r\n\t\t\t\t\t\tjTextFieldEdadInicioFocusGained(evt);\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\r\n\t\tjLabelEdad2.setText(\"y\");\r\n\r\n\t\tjTextFieldEdadFin.addFocusListener(new java.awt.event.FocusAdapter() {\r\n\t\t\tpublic void focusGained(java.awt.event.FocusEvent evt) {\r\n\t\t\t\tjTextFieldEdadFinFocusGained(evt);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tjLabelEdad3.setText(\"a\\u00f1os.\");\r\n\r\n\t\tbuttonGroupSexo.add(jRadioButtonMasculino);\r\n\t\tjRadioButtonMasculino.setText(\"Masculino\");\r\n\t\tjRadioButtonMasculino\r\n\t\t\t\t.addActionListener(new java.awt.event.ActionListener() {\r\n\t\t\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent evt) {\r\n\t\t\t\t\t\tjRadioButtonMasculinoActionPerformed(evt);\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\r\n\t\tbuttonGroupSexo.add(jRadioButtonFemenino);\r\n\t\tjRadioButtonFemenino.setText(\"Femenino\");\r\n\t\tjRadioButtonFemenino\r\n\t\t\t\t.addActionListener(new java.awt.event.ActionListener() {\r\n\t\t\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent evt) {\r\n\t\t\t\t\t\tjRadioButtonFemeninoActionPerformed(evt);\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\r\n\t\tjCheckBoxEdad.setText(\"Edad: entre\");\r\n\t\tjCheckBoxEdad.addActionListener(new java.awt.event.ActionListener() {\r\n\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent evt) {\r\n\t\t\t\tjCheckBoxEdadActionPerformed(evt);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tjCheckBoxSexo.setText(\"Sexo:\");\r\n\t\tjCheckBoxSexo.addActionListener(new java.awt.event.ActionListener() {\r\n\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent evt) {\r\n\t\t\t\tjCheckBoxSexoActionPerformed(evt);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tjCheckBoxEstudios.setText(\"Estudios:\");\r\n\t\tjCheckBoxEstudios\r\n\t\t\t\t.addActionListener(new java.awt.event.ActionListener() {\r\n\t\t\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent evt) {\r\n\t\t\t\t\t\tjCheckBoxEstudiosActionPerformed(evt);\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\r\n\t\tjCheckBoxTomoHoyAlcohol.setText(\"\\u00bfTom\\u00f3 hoy alcohol?\");\r\n\t\tjCheckBoxTomoHoyAlcohol\r\n\t\t\t\t.addActionListener(new java.awt.event.ActionListener() {\r\n\t\t\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent evt) {\r\n\t\t\t\t\t\tjCheckBoxTomoHoyAlcoholActionPerformed(evt);\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\r\n\t\tbuttonGroupAlcohol.add(jRadioButtonTomoHoyAlcoholSI);\r\n\t\tjRadioButtonTomoHoyAlcoholSI.setText(\"Si\");\r\n\t\tjRadioButtonTomoHoyAlcoholSI\r\n\t\t\t\t.addActionListener(new java.awt.event.ActionListener() {\r\n\t\t\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent evt) {\r\n\t\t\t\t\t\tjRadioButtonTomoHoyAlcoholSIActionPerformed(evt);\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\r\n\t\tbuttonGroupAlcohol.add(jRadioButtonTomoHoyAlcoholNO);\r\n\t\tjRadioButtonTomoHoyAlcoholNO.setText(\"No\");\r\n\t\tjRadioButtonTomoHoyAlcoholNO\r\n\t\t\t\t.addActionListener(new java.awt.event.ActionListener() {\r\n\t\t\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent evt) {\r\n\t\t\t\t\t\tjRadioButtonTomoHoyAlcoholNOActionPerformed(evt);\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\r\n\t\tjCheckBoxTomoHoyPsicofarmacos\r\n\t\t\t\t.setText(\"\\u00bfTom\\u00f3 hoy psicof\\u00e1rmacos?\");\r\n\t\tjCheckBoxTomoHoyPsicofarmacos\r\n\t\t\t\t.addActionListener(new java.awt.event.ActionListener() {\r\n\t\t\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent evt) {\r\n\t\t\t\t\t\tjCheckBoxTomoHoyPsicofarmacosActionPerformed(evt);\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\r\n\t\tbuttonGroupPsicofarmacos.add(jRadioButtonTomoHoyPsicofarmacosSI);\r\n\t\tjRadioButtonTomoHoyPsicofarmacosSI.setText(\"Si\");\r\n\t\tjRadioButtonTomoHoyPsicofarmacosSI\r\n\t\t\t\t.addActionListener(new java.awt.event.ActionListener() {\r\n\t\t\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent evt) {\r\n\t\t\t\t\t\tjRadioButtonTomoHoyPsicofarmacosSIActionPerformed(evt);\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\r\n\t\tbuttonGroupPsicofarmacos.add(jRadioButtonTomoHoyPsicofarmacosNO);\r\n\t\tjRadioButtonTomoHoyPsicofarmacosNO.setText(\"No\");\r\n\t\tjRadioButtonTomoHoyPsicofarmacosNO\r\n\t\t\t\t.addActionListener(new java.awt.event.ActionListener() {\r\n\t\t\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent evt) {\r\n\t\t\t\t\t\tjRadioButtonTomoHoyPsicofarmacosNOActionPerformed(evt);\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\r\n\t\tbuttonGroupEstudios.add(jRadioButtonEstudiosSI);\r\n\t\tjRadioButtonEstudiosSI.setText(\"Si\");\r\n\t\tjRadioButtonEstudiosSI\r\n\t\t\t\t.addActionListener(new java.awt.event.ActionListener() {\r\n\t\t\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent evt) {\r\n\t\t\t\t\t\tjRadioButtonEstudiosSIActionPerformed(evt);\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\r\n\t\tbuttonGroupEstudios.add(jRadioButtonEstudiosNO);\r\n\t\tjRadioButtonEstudiosNO.setText(\"No\");\r\n\t\tjRadioButtonEstudiosNO\r\n\t\t\t\t.addActionListener(new java.awt.event.ActionListener() {\r\n\t\t\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent evt) {\r\n\t\t\t\t\t\tjRadioButtonEstudiosNOActionPerformed(evt);\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\r\n\t\tjButton1.setText(\"Generar Estad\\u00edsticas\");\r\n\t\tjButton1.addActionListener(new java.awt.event.ActionListener() {\r\n\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent evt) {\r\n\t\t\t\tjButton1ActionPerformed(evt);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tbuttonGroupTipoReporte.add(jRadioResumida);\r\n\t\tjRadioResumida.setSelected(true);\r\n\t\tjRadioResumida.setText(\"Informaci\\u00f3n Resumida\");\r\n\t\tjRadioResumida.addActionListener(new java.awt.event.ActionListener() {\r\n\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent evt) {\r\n\t\t\t\tjRadioResumidaActionPerformed(evt);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tbuttonGroupTipoReporte.add(jRadioDetallada);\r\n\t\tjRadioDetallada.setText(\"Informaci\\u00f3n Detallada\");\r\n\t\tjRadioDetallada.addActionListener(new java.awt.event.ActionListener() {\r\n\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent evt) {\r\n\t\t\t\tjRadioDetalladaActionPerformed(evt);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tjavax.swing.GroupLayout jPanelFiltrosLayout = new javax.swing.GroupLayout(\r\n\t\t\t\tjPanelFiltros);\r\n\t\tjPanelFiltros.setLayout(jPanelFiltrosLayout);\r\n\t\tjPanelFiltrosLayout\r\n\t\t\t\t.setHorizontalGroup(jPanelFiltrosLayout\r\n\t\t\t\t\t\t.createParallelGroup(\r\n\t\t\t\t\t\t\t\tjavax.swing.GroupLayout.Alignment.LEADING)\r\n\t\t\t\t\t\t.addGroup(\r\n\t\t\t\t\t\t\t\tjPanelFiltrosLayout\r\n\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\r\n\t\t\t\t\t\t\t\t\t\t.addGroup(\r\n\t\t\t\t\t\t\t\t\t\t\t\tjPanelFiltrosLayout\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjavax.swing.GroupLayout.Alignment.LEADING)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjPanelFiltrosLayout\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjCheckBoxSexo)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t18,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t18,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t18)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjRadioButtonMasculino)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjavax.swing.LayoutStyle.ComponentPlacement.RELATED)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjRadioButtonFemenino))\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjPanelFiltrosLayout\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjCheckBoxEdad)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjavax.swing.LayoutStyle.ComponentPlacement.RELATED)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjTextFieldEdadInicio,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjavax.swing.GroupLayout.PREFERRED_SIZE,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t30,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjavax.swing.GroupLayout.PREFERRED_SIZE)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjavax.swing.LayoutStyle.ComponentPlacement.RELATED)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjLabelEdad2)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjavax.swing.LayoutStyle.ComponentPlacement.RELATED)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjTextFieldEdadFin,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjavax.swing.GroupLayout.PREFERRED_SIZE,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t33,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjavax.swing.GroupLayout.PREFERRED_SIZE)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjavax.swing.LayoutStyle.ComponentPlacement.RELATED)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjLabelEdad3))\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjCheckBoxTomoHoyAlcohol)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjPanelFiltrosLayout\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjPanelFiltrosLayout\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\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\tjavax.swing.GroupLayout.Alignment.LEADING)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\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\tjCheckBoxTomoHoyPsicofarmacos)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\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\tjCheckBoxEstudios))\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t4,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t4,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t4)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjPanelFiltrosLayout\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\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\tjavax.swing.GroupLayout.Alignment.LEADING)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(\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\tjPanelFiltrosLayout\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\t\t\t.createSequentialGroup()\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\t\t\t.addComponent(\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\t\t\t\t\tjRadioButtonTomoHoyPsicofarmacosSI)\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\t\t\t.addPreferredGap(\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\t\t\t\t\tjavax.swing.LayoutStyle.ComponentPlacement.RELATED)\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\t\t\t.addComponent(\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\t\t\t\t\tjRadioButtonTomoHoyPsicofarmacosNO))\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(\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\tjPanelFiltrosLayout\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\t\t\t.createSequentialGroup()\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\t\t\t.addComponent(\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\t\t\t\t\tjRadioButtonTomoHoyAlcoholSI)\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\t\t\t.addPreferredGap(\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\t\t\t\t\tjavax.swing.LayoutStyle.ComponentPlacement.RELATED)\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\t\t\t.addComponent(\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\t\t\t\t\tjRadioButtonTomoHoyAlcoholNO))\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(\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\tjPanelFiltrosLayout\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\t\t\t.createSequentialGroup()\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\t\t\t.addComponent(\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\t\t\t\t\tjRadioButtonEstudiosSI)\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\t\t\t.addPreferredGap(\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\t\t\t\t\tjavax.swing.LayoutStyle.ComponentPlacement.RELATED)\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\t\t\t.addComponent(\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\t\t\t\t\tjRadioButtonEstudiosNO)))\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t42,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t42,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t42)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjPanelFiltrosLayout\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\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\tjavax.swing.GroupLayout.Alignment.LEADING)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\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\tjRadioResumida)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\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\tjRadioDetallada)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\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\tjButton1))))\r\n\t\t\t\t\t\t\t\t\t\t.addContainerGap(18, Short.MAX_VALUE)));\r\n\t\tjPanelFiltrosLayout\r\n\t\t\t\t.setVerticalGroup(jPanelFiltrosLayout\r\n\t\t\t\t\t\t.createParallelGroup(\r\n\t\t\t\t\t\t\t\tjavax.swing.GroupLayout.Alignment.LEADING)\r\n\t\t\t\t\t\t.addGroup(\r\n\t\t\t\t\t\t\t\tjPanelFiltrosLayout\r\n\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\r\n\t\t\t\t\t\t\t\t\t\t.addGroup(\r\n\t\t\t\t\t\t\t\t\t\t\t\tjPanelFiltrosLayout\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjavax.swing.GroupLayout.Alignment.LEADING)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjPanelFiltrosLayout\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjPanelFiltrosLayout\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\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\tjavax.swing.GroupLayout.Alignment.BASELINE)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\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\tjCheckBoxEdad)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\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\tjLabelEdad2)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\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\tjTextFieldEdadFin,\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\tjavax.swing.GroupLayout.PREFERRED_SIZE,\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\tjavax.swing.GroupLayout.DEFAULT_SIZE,\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\tjavax.swing.GroupLayout.PREFERRED_SIZE)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\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\tjLabelEdad3)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\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\tjTextFieldEdadInicio,\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\tjavax.swing.GroupLayout.PREFERRED_SIZE,\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\tjavax.swing.GroupLayout.DEFAULT_SIZE,\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\tjavax.swing.GroupLayout.PREFERRED_SIZE))\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjavax.swing.LayoutStyle.ComponentPlacement.RELATED)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjPanelFiltrosLayout\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\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\tjavax.swing.GroupLayout.Alignment.BASELINE)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\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\tjCheckBoxSexo)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\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\tjRadioButtonMasculino)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\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\tjRadioButtonFemenino))\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjavax.swing.LayoutStyle.ComponentPlacement.RELATED)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjPanelFiltrosLayout\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\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\tjavax.swing.GroupLayout.Alignment.BASELINE)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\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\tjRadioButtonEstudiosSI)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\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\tjRadioButtonEstudiosNO)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\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\tjCheckBoxEstudios))\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjavax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjPanelFiltrosLayout\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\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\tjavax.swing.GroupLayout.Alignment.BASELINE)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\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\tjCheckBoxTomoHoyPsicofarmacos)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\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\tjRadioButtonTomoHoyPsicofarmacosSI)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\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\tjRadioButtonTomoHoyPsicofarmacosNO))\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjavax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjPanelFiltrosLayout\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\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\tjavax.swing.GroupLayout.Alignment.BASELINE)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\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\tjCheckBoxTomoHoyAlcohol)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\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\tjRadioButtonTomoHoyAlcoholSI)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\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\tjRadioButtonTomoHoyAlcoholNO)))\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjPanelFiltrosLayout\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addContainerGap()\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjRadioResumida)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjavax.swing.LayoutStyle.ComponentPlacement.RELATED)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjRadioDetallada)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t18,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t18,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t18)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjButton1,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjavax.swing.GroupLayout.PREFERRED_SIZE,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t41,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjavax.swing.GroupLayout.PREFERRED_SIZE)))\r\n\t\t\t\t\t\t\t\t\t\t.addContainerGap(22, Short.MAX_VALUE)));\r\n\r\n\t\tjavax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\r\n\t\tthis.setLayout(layout);\r\n\t\tlayout.setHorizontalGroup(layout.createParallelGroup(\r\n\t\t\t\tjavax.swing.GroupLayout.Alignment.LEADING).addGroup(\r\n\t\t\t\tlayout.createSequentialGroup().addContainerGap().addComponent(\r\n\t\t\t\t\t\tjPanelFiltros, javax.swing.GroupLayout.PREFERRED_SIZE,\r\n\t\t\t\t\t\tjavax.swing.GroupLayout.DEFAULT_SIZE,\r\n\t\t\t\t\t\tjavax.swing.GroupLayout.PREFERRED_SIZE)\r\n\t\t\t\t\t\t.addContainerGap(340, Short.MAX_VALUE)));\r\n\t\tlayout.setVerticalGroup(layout.createParallelGroup(\r\n\t\t\t\tjavax.swing.GroupLayout.Alignment.LEADING).addGroup(\r\n\t\t\t\tlayout.createSequentialGroup().addComponent(jPanelFiltros,\r\n\t\t\t\t\t\tjavax.swing.GroupLayout.PREFERRED_SIZE,\r\n\t\t\t\t\t\tjavax.swing.GroupLayout.DEFAULT_SIZE,\r\n\t\t\t\t\t\tjavax.swing.GroupLayout.PREFERRED_SIZE)\r\n\t\t\t\t\t\t.addContainerGap(230, Short.MAX_VALUE)));\r\n\t}",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n RadioGroupStato = new javax.swing.ButtonGroup();\n FiltroVisualizzazione = new javax.swing.ButtonGroup();\n Header = new javax.swing.JPanel();\n ToggleMenu = new javax.swing.JButton();\n User = new javax.swing.JLabel();\n jLayeredPane1 = new javax.swing.JLayeredPane();\n Footer = new javax.swing.JPanel();\n jLabel9 = new javax.swing.JLabel();\n Welcome = new javax.swing.JPanel();\n jLabel13 = new javax.swing.JLabel();\n jLabel15 = new javax.swing.JLabel();\n Modifica = new javax.swing.JPanel();\n jLabel16 = new javax.swing.JLabel();\n jScrollPane4 = new javax.swing.JScrollPane();\n jList2 = new javax.swing.JList<>();\n jLabel17 = new javax.swing.JLabel();\n jScrollPane6 = new javax.swing.JScrollPane();\n jList3 = new javax.swing.JList<>();\n jLabel18 = new javax.swing.JLabel();\n jComboBox4 = new javax.swing.JComboBox<>();\n jButton3 = new javax.swing.JButton();\n jButton5 = new javax.swing.JButton();\n Vendita = new javax.swing.JPanel();\n jLabel14 = new javax.swing.JLabel();\n jButton1 = new javax.swing.JButton();\n jScrollPane5 = new javax.swing.JScrollPane();\n Lista_Vendita = new javax.swing.JList<>();\n Stampa = new javax.swing.JPanel();\n Label_Stampa = new javax.swing.JLabel();\n jScrollPane3 = new javax.swing.JScrollPane();\n Lista_Stampa = new javax.swing.JList<>();\n jLabel20 = new javax.swing.JLabel();\n FiltroNuovo = new javax.swing.JRadioButton();\n FiltroUsato = new javax.swing.JRadioButton();\n FiltroPrezzo = new javax.swing.JCheckBox();\n jComboBox5 = new javax.swing.JComboBox<>();\n jComboBox6 = new javax.swing.JComboBox<>();\n jLabel21 = new javax.swing.JLabel();\n jLabel22 = new javax.swing.JLabel();\n FiltroAlimentazione = new javax.swing.JCheckBox();\n jComboBox7 = new javax.swing.JComboBox<>();\n FiltroAnno = new javax.swing.JCheckBox();\n jComboBox8 = new javax.swing.JComboBox<>();\n FiltroMese = new javax.swing.JCheckBox();\n jComboBox9 = new javax.swing.JComboBox<>();\n ApplicaFiltro = new javax.swing.JButton();\n Aggiunta = new javax.swing.JPanel();\n jLabel2 = new javax.swing.JLabel();\n jLabel3 = new javax.swing.JLabel();\n jTextField1 = new javax.swing.JTextField();\n jLabel4 = new javax.swing.JLabel();\n jLabel5 = new javax.swing.JLabel();\n jTextField4 = new javax.swing.JTextField();\n jLabel6 = new javax.swing.JLabel();\n jRadioButton1 = new javax.swing.JRadioButton();\n jRadioButton2 = new javax.swing.JRadioButton();\n jLabel7 = new javax.swing.JLabel();\n jComboBox1 = new javax.swing.JComboBox<>();\n jLabel1 = new javax.swing.JLabel();\n jComboBox2 = new javax.swing.JComboBox<>();\n jLabel8 = new javax.swing.JLabel();\n jTextField3 = new javax.swing.JTextField();\n jSeparator4 = new javax.swing.JSeparator();\n jLabel10 = new javax.swing.JLabel();\n jScrollPane1 = new javax.swing.JScrollPane();\n jList1 = new javax.swing.JList<>();\n jComboBox3 = new javax.swing.JComboBox<>();\n jButton2 = new javax.swing.JButton();\n jLabel11 = new javax.swing.JLabel();\n jTextField5 = new javax.swing.JTextField();\n jSeparator5 = new javax.swing.JSeparator();\n jSeparator6 = new javax.swing.JSeparator();\n jSeparator8 = new javax.swing.JSeparator();\n jScrollPane2 = new javax.swing.JScrollPane();\n jLabel12 = new javax.swing.JLabel();\n jButton4 = new javax.swing.JButton();\n jLabel19 = new javax.swing.JLabel();\n jTextField6 = new javax.swing.JTextField();\n jSeparator7 = new javax.swing.JSeparator();\n jComboBox10 = new javax.swing.JComboBox<>();\n Menu = new javax.swing.JPanel();\n MButton_Aggiungi = new javax.swing.JButton();\n MButton_Modifica = new javax.swing.JButton();\n MButton_Nuovi = new javax.swing.JButton();\n MButton_Vendita = new javax.swing.JButton();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n setMaximumSize(new java.awt.Dimension(1024, 768));\n setMinimumSize(new java.awt.Dimension(841, 624));\n setModalExclusionType(java.awt.Dialog.ModalExclusionType.APPLICATION_EXCLUDE);\n setResizable(false);\n\n Header.setBackground(new java.awt.Color(0, 113, 156));\n Header.setPreferredSize(new java.awt.Dimension(800, 60));\n\n ToggleMenu.setBackground(new java.awt.Color(0, 113, 156));\n ToggleMenu.setForeground(new java.awt.Color(255, 255, 255));\n ToggleMenu.setText(\"Menu\");\n ToggleMenu.setBorder(null);\n ToggleMenu.setBorderPainted(false);\n ToggleMenu.setFocusPainted(false);\n ToggleMenu.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);\n ToggleMenu.setOpaque(false);\n ToggleMenu.setVerifyInputWhenFocusTarget(false);\n\n User.setBackground(new java.awt.Color(0, 113, 156));\n User.setFont(new java.awt.Font(\"Dialog\", 1, 18)); // NOI18N\n User.setForeground(new java.awt.Color(255, 255, 255));\n User.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);\n User.setText(\"Concessionario Utente\");\n\n javax.swing.GroupLayout HeaderLayout = new javax.swing.GroupLayout(Header);\n Header.setLayout(HeaderLayout);\n HeaderLayout.setHorizontalGroup(\n HeaderLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(HeaderLayout.createSequentialGroup()\n .addGap(17, 17, 17)\n .addComponent(ToggleMenu, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(User, javax.swing.GroupLayout.PREFERRED_SIZE, 300, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(15, 15, 15))\n );\n HeaderLayout.setVerticalGroup(\n HeaderLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(HeaderLayout.createSequentialGroup()\n .addGap(17, 17, 17)\n .addGroup(HeaderLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(User)\n .addComponent(ToggleMenu, javax.swing.GroupLayout.PREFERRED_SIZE, 24, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(15, 17, Short.MAX_VALUE))\n );\n\n jLayeredPane1.setMinimumSize(new java.awt.Dimension(800, 540));\n jLayeredPane1.setName(\"\"); // NOI18N\n\n Footer.setBackground(new java.awt.Color(0, 113, 156));\n Footer.setForeground(new java.awt.Color(208, 208, 208));\n Footer.setFocusable(false);\n Footer.setPreferredSize(new java.awt.Dimension(834, 20));\n Footer.setRequestFocusEnabled(false);\n\n jLabel9.setFont(new java.awt.Font(\"Dialog\", 1, 10)); // NOI18N\n jLabel9.setForeground(new java.awt.Color(208, 208, 208));\n jLabel9.setFocusable(false);\n jLabel9.setRequestFocusEnabled(false);\n\n javax.swing.GroupLayout FooterLayout = new javax.swing.GroupLayout(Footer);\n Footer.setLayout(FooterLayout);\n FooterLayout.setHorizontalGroup(\n FooterLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(FooterLayout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jLabel9, javax.swing.GroupLayout.DEFAULT_SIZE, 829, Short.MAX_VALUE)\n .addContainerGap())\n );\n FooterLayout.setVerticalGroup(\n FooterLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel9, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE)\n );\n\n Welcome.setBackground(new java.awt.Color(77, 77, 77));\n Welcome.setForeground(new java.awt.Color(255, 255, 255));\n Welcome.setMinimumSize(new java.awt.Dimension(800, 540));\n Welcome.setPreferredSize(new java.awt.Dimension(841, 546));\n\n jLabel13.setBackground(new java.awt.Color(77, 77, 77));\n jLabel13.setFont(new java.awt.Font(\"Dialog\", 1, 24)); // NOI18N\n jLabel13.setForeground(new java.awt.Color(208, 208, 208));\n jLabel13.setText(\"Benvenuto Utente\");\n jLabel13.setFocusable(false);\n jLabel13.setRequestFocusEnabled(false);\n\n jLabel15.setBackground(new java.awt.Color(77, 77, 77));\n jLabel15.setFont(new java.awt.Font(\"Dialog\", 1, 18)); // NOI18N\n jLabel15.setForeground(new java.awt.Color(208, 208, 208));\n jLabel15.setText(\"Per iniziare seleziona un'attività dal menù a sinistra\");\n jLabel15.setFocusable(false);\n jLabel15.setRequestFocusEnabled(false);\n\n javax.swing.GroupLayout WelcomeLayout = new javax.swing.GroupLayout(Welcome);\n Welcome.setLayout(WelcomeLayout);\n WelcomeLayout.setHorizontalGroup(\n WelcomeLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(WelcomeLayout.createSequentialGroup()\n .addGroup(WelcomeLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(WelcomeLayout.createSequentialGroup()\n .addGap(330, 330, 330)\n .addComponent(jLabel15))\n .addGroup(WelcomeLayout.createSequentialGroup()\n .addGap(300, 300, 300)\n .addComponent(jLabel13)))\n .addContainerGap(65, Short.MAX_VALUE))\n );\n WelcomeLayout.setVerticalGroup(\n WelcomeLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(WelcomeLayout.createSequentialGroup()\n .addGap(80, 80, 80)\n .addComponent(jLabel13)\n .addGap(27, 27, 27)\n .addComponent(jLabel15)\n .addContainerGap(383, Short.MAX_VALUE))\n );\n\n Modifica.setBackground(new java.awt.Color(77, 77, 77));\n Modifica.setForeground(new java.awt.Color(255, 255, 255));\n Modifica.setMinimumSize(new java.awt.Dimension(800, 540));\n Modifica.setPreferredSize(new java.awt.Dimension(841, 546));\n\n jLabel16.setFont(new java.awt.Font(\"Dialog\", 1, 24)); // NOI18N\n jLabel16.setForeground(new java.awt.Color(208, 208, 208));\n jLabel16.setText(\"Modifica Automobile Usata\");\n\n jScrollPane4.setBackground(new java.awt.Color(77, 77, 77));\n jScrollPane4.setBorder(null);\n jScrollPane4.setForeground(new java.awt.Color(208, 208, 208));\n\n jList2.setBackground(new java.awt.Color(77, 77, 77));\n jList2.setForeground(new java.awt.Color(208, 208, 208));\n jScrollPane4.setViewportView(jList2);\n\n jLabel17.setBackground(new java.awt.Color(77, 77, 77));\n jLabel17.setForeground(new java.awt.Color(208, 208, 208));\n jLabel17.setText(\"Automobile\");\n\n jScrollPane6.setBackground(new java.awt.Color(77, 77, 77));\n jScrollPane6.setBorder(null);\n jScrollPane6.setForeground(new java.awt.Color(208, 208, 208));\n\n jList3.setBackground(new java.awt.Color(77, 77, 77));\n jList3.setForeground(new java.awt.Color(208, 208, 208));\n jList3.setFocusable(false);\n jScrollPane6.setViewportView(jList3);\n\n jLabel18.setBackground(new java.awt.Color(77, 77, 77));\n jLabel18.setForeground(new java.awt.Color(208, 208, 208));\n jLabel18.setText(\"Accessori\");\n\n jComboBox4.setBackground(new java.awt.Color(77, 77, 77));\n jComboBox4.setForeground(new java.awt.Color(208, 208, 208));\n jComboBox4.setModel(this.generaAccessori());\n jComboBox4.setBorder(null);\n jComboBox4.setEnabled(false);\n\n jButton3.setBackground(new java.awt.Color(0, 113, 156));\n jButton3.setForeground(new java.awt.Color(208, 208, 208));\n jButton3.setText(\"Aggiungi\");\n jButton3.setBorder(null);\n jButton3.setBorderPainted(false);\n jButton3.setEnabled(false);\n jButton3.setFocusPainted(false);\n\n jButton5.setBackground(new java.awt.Color(0, 113, 156));\n jButton5.setForeground(new java.awt.Color(208, 208, 208));\n jButton5.setText(\"Applica\");\n jButton5.setBorder(null);\n jButton5.setBorderPainted(false);\n jButton5.setFocusPainted(false);\n\n javax.swing.GroupLayout ModificaLayout = new javax.swing.GroupLayout(Modifica);\n Modifica.setLayout(ModificaLayout);\n ModificaLayout.setHorizontalGroup(\n ModificaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(ModificaLayout.createSequentialGroup()\n .addGap(24, 24, 24)\n .addGroup(ModificaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(ModificaLayout.createSequentialGroup()\n .addComponent(jLabel16)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addGroup(ModificaLayout.createSequentialGroup()\n .addComponent(jScrollPane4, javax.swing.GroupLayout.PREFERRED_SIZE, 350, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 99, Short.MAX_VALUE)\n .addGroup(ModificaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jScrollPane6, javax.swing.GroupLayout.PREFERRED_SIZE, 350, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(ModificaLayout.createSequentialGroup()\n .addComponent(jComboBox4, javax.swing.GroupLayout.PREFERRED_SIZE, 260, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(ModificaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jButton5, javax.swing.GroupLayout.PREFERRED_SIZE, 84, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jButton3, javax.swing.GroupLayout.PREFERRED_SIZE, 84, javax.swing.GroupLayout.PREFERRED_SIZE))))\n .addGap(24, 24, 24))\n .addGroup(ModificaLayout.createSequentialGroup()\n .addGap(6, 6, 6)\n .addComponent(jLabel17)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jLabel18)\n .addGap(307, 307, 307))))\n );\n ModificaLayout.setVerticalGroup(\n ModificaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(ModificaLayout.createSequentialGroup()\n .addGap(24, 24, 24)\n .addComponent(jLabel16)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(ModificaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel17)\n .addComponent(jLabel18))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(ModificaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jScrollPane4, javax.swing.GroupLayout.PREFERRED_SIZE, 450, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(ModificaLayout.createSequentialGroup()\n .addComponent(jScrollPane6, javax.swing.GroupLayout.PREFERRED_SIZE, 360, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(ModificaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(jComboBox4)\n .addComponent(jButton3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addGap(26, 26, 26)\n .addComponent(jButton5, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))\n .addContainerGap(30, Short.MAX_VALUE))\n );\n\n Vendita.setBackground(new java.awt.Color(77, 77, 77));\n Vendita.setForeground(new java.awt.Color(255, 255, 255));\n Vendita.setMinimumSize(new java.awt.Dimension(800, 540));\n Vendita.setPreferredSize(new java.awt.Dimension(841, 546));\n\n jLabel14.setFont(new java.awt.Font(\"Dialog\", 1, 24)); // NOI18N\n jLabel14.setForeground(new java.awt.Color(208, 208, 208));\n jLabel14.setText(\"Vendita Automobile\");\n\n jButton1.setBackground(new java.awt.Color(0, 113, 156));\n jButton1.setForeground(new java.awt.Color(208, 208, 208));\n jButton1.setText(\"Vendi\");\n jButton1.setBorder(null);\n jButton1.setBorderPainted(false);\n jButton1.setFocusPainted(false);\n\n jScrollPane5.setBackground(new java.awt.Color(77, 77, 77));\n jScrollPane5.setBorder(null);\n jScrollPane5.setForeground(new java.awt.Color(208, 208, 208));\n\n Lista_Vendita.setBackground(new java.awt.Color(77, 77, 77));\n Lista_Vendita.setForeground(new java.awt.Color(208, 208, 208));\n jScrollPane5.setViewportView(Lista_Vendita);\n\n javax.swing.GroupLayout VenditaLayout = new javax.swing.GroupLayout(Vendita);\n Vendita.setLayout(VenditaLayout);\n VenditaLayout.setHorizontalGroup(\n VenditaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(VenditaLayout.createSequentialGroup()\n .addGap(24, 24, 24)\n .addGroup(VenditaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel14)\n .addComponent(jScrollPane5, javax.swing.GroupLayout.PREFERRED_SIZE, 789, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addContainerGap(28, Short.MAX_VALUE))\n );\n VenditaLayout.setVerticalGroup(\n VenditaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(VenditaLayout.createSequentialGroup()\n .addGap(24, 24, 24)\n .addComponent(jLabel14)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jScrollPane5, javax.swing.GroupLayout.PREFERRED_SIZE, 418, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(24, Short.MAX_VALUE))\n );\n\n Stampa.setBackground(new java.awt.Color(77, 77, 77));\n Stampa.setForeground(new java.awt.Color(255, 255, 255));\n Stampa.setMinimumSize(new java.awt.Dimension(800, 540));\n Stampa.setPreferredSize(new java.awt.Dimension(841, 546));\n\n Label_Stampa.setFont(new java.awt.Font(\"Dialog\", 1, 24)); // NOI18N\n Label_Stampa.setForeground(new java.awt.Color(208, 208, 208));\n Label_Stampa.setText(\"Lista Automobili\");\n\n jScrollPane3.setBackground(new java.awt.Color(77, 77, 77));\n jScrollPane3.setBorder(null);\n jScrollPane3.setForeground(new java.awt.Color(208, 208, 208));\n\n Lista_Stampa.setBackground(new java.awt.Color(77, 77, 77));\n Lista_Stampa.setForeground(new java.awt.Color(208, 208, 208));\n jScrollPane3.setViewportView(Lista_Stampa);\n\n jLabel20.setBackground(new java.awt.Color(77, 77, 77));\n jLabel20.setForeground(new java.awt.Color(208, 208, 208));\n jLabel20.setText(\"Filtri\");\n\n FiltroNuovo.setBackground(new java.awt.Color(77, 77, 77));\n FiltroVisualizzazione.add(FiltroNuovo);\n FiltroNuovo.setForeground(new java.awt.Color(208, 208, 208));\n FiltroNuovo.setSelected(true);\n FiltroNuovo.setText(\"Nuove\");\n FiltroNuovo.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n FiltroNuovoActionPerformed(evt);\n }\n });\n\n FiltroUsato.setBackground(new java.awt.Color(77, 77, 77));\n FiltroVisualizzazione.add(FiltroUsato);\n FiltroUsato.setForeground(new java.awt.Color(208, 208, 208));\n FiltroUsato.setText(\"Usate\");\n\n FiltroPrezzo.setBackground(new java.awt.Color(77, 77, 77));\n FiltroPrezzo.setForeground(new java.awt.Color(208, 208, 208));\n FiltroPrezzo.setText(\"Fascia di prezzo\");\n\n jComboBox5.setBackground(new java.awt.Color(77, 77, 77));\n jComboBox5.setForeground(new java.awt.Color(208, 208, 208));\n jComboBox5.setBorder(null);\n jComboBox5.setEnabled(false);\n\n jComboBox6.setBackground(new java.awt.Color(77, 77, 77));\n jComboBox6.setForeground(new java.awt.Color(208, 208, 208));\n jComboBox6.setBorder(null);\n jComboBox6.setEnabled(false);\n jComboBox6.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jComboBox6ActionPerformed(evt);\n }\n });\n\n jLabel21.setBackground(new java.awt.Color(77, 77, 77));\n jLabel21.setForeground(new java.awt.Color(208, 208, 208));\n jLabel21.setText(\"da\");\n\n jLabel22.setBackground(new java.awt.Color(77, 77, 77));\n jLabel22.setForeground(new java.awt.Color(208, 208, 208));\n jLabel22.setText(\"a\");\n\n FiltroAlimentazione.setBackground(new java.awt.Color(77, 77, 77));\n FiltroAlimentazione.setForeground(new java.awt.Color(208, 208, 208));\n FiltroAlimentazione.setText(\"Alimentazione\");\n\n jComboBox7.setBackground(new java.awt.Color(77, 77, 77));\n jComboBox7.setForeground(new java.awt.Color(208, 208, 208));\n jComboBox7.setModel(this.generaAlimentazione());\n jComboBox7.setBorder(null);\n jComboBox7.setEnabled(false);\n\n FiltroAnno.setBackground(new java.awt.Color(77, 77, 77));\n FiltroAnno.setForeground(new java.awt.Color(208, 208, 208));\n FiltroAnno.setText(\"Anno di produzione\");\n\n jComboBox8.setBackground(new java.awt.Color(77, 77, 77));\n jComboBox8.setForeground(new java.awt.Color(208, 208, 208));\n jComboBox8.setModel(this.generaAnni());\n jComboBox8.setBorder(null);\n jComboBox8.setEnabled(false);\n\n FiltroMese.setBackground(new java.awt.Color(77, 77, 77));\n FiltroMese.setForeground(new java.awt.Color(208, 208, 208));\n FiltroMese.setText(\"Mese di produzione\");\n\n jComboBox9.setBackground(new java.awt.Color(77, 77, 77));\n jComboBox9.setForeground(new java.awt.Color(208, 208, 208));\n jComboBox9.setModel(this.generaMesi());\n jComboBox9.setBorder(null);\n jComboBox9.setEnabled(false);\n\n ApplicaFiltro.setBackground(new java.awt.Color(0, 113, 156));\n ApplicaFiltro.setForeground(new java.awt.Color(208, 208, 208));\n ApplicaFiltro.setText(\"Applica\");\n ApplicaFiltro.setBorder(null);\n ApplicaFiltro.setBorderPainted(false);\n ApplicaFiltro.setFocusPainted(false);\n ApplicaFiltro.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n ApplicaFiltroActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout StampaLayout = new javax.swing.GroupLayout(Stampa);\n Stampa.setLayout(StampaLayout);\n StampaLayout.setHorizontalGroup(\n StampaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(StampaLayout.createSequentialGroup()\n .addGroup(StampaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(StampaLayout.createSequentialGroup()\n .addGap(24, 24, 24)\n .addGroup(StampaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(Label_Stampa)\n .addComponent(jScrollPane3, javax.swing.GroupLayout.PREFERRED_SIZE, 800, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGroup(StampaLayout.createSequentialGroup()\n .addGap(37, 37, 37)\n .addGroup(StampaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel20)\n .addGroup(StampaLayout.createSequentialGroup()\n .addGroup(StampaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, StampaLayout.createSequentialGroup()\n .addComponent(FiltroNuovo)\n .addGap(155, 155, 155))\n .addGroup(StampaLayout.createSequentialGroup()\n .addComponent(FiltroUsato)\n .addGap(157, 157, 157)))\n .addGroup(StampaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(FiltroMese)\n .addComponent(FiltroAlimentazione)\n .addComponent(FiltroPrezzo)\n .addComponent(FiltroAnno))\n .addGap(18, 18, 18)\n .addGroup(StampaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addGroup(StampaLayout.createSequentialGroup()\n .addComponent(jLabel21)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jComboBox5, javax.swing.GroupLayout.PREFERRED_SIZE, 90, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jLabel22)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jComboBox6, javax.swing.GroupLayout.PREFERRED_SIZE, 90, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addComponent(jComboBox7, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jComboBox8, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jComboBox9, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 103, Short.MAX_VALUE)\n .addComponent(ApplicaFiltro, javax.swing.GroupLayout.PREFERRED_SIZE, 90, javax.swing.GroupLayout.PREFERRED_SIZE)))))\n .addGap(14, 14, 14))\n );\n StampaLayout.setVerticalGroup(\n StampaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(StampaLayout.createSequentialGroup()\n .addGap(24, 24, 24)\n .addComponent(Label_Stampa)\n .addGap(18, 18, 18)\n .addComponent(jLabel20)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(StampaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(FiltroNuovo)\n .addComponent(FiltroPrezzo)\n .addComponent(jComboBox5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jComboBox6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel21)\n .addComponent(jLabel22))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(StampaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(FiltroUsato)\n .addComponent(FiltroAlimentazione)\n .addComponent(jComboBox7, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(StampaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(FiltroAnno)\n .addComponent(jComboBox8, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(StampaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(FiltroMese)\n .addComponent(jComboBox9, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(ApplicaFiltro, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addComponent(jScrollPane3, javax.swing.GroupLayout.PREFERRED_SIZE, 292, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(10, Short.MAX_VALUE))\n );\n\n Aggiunta.setBackground(new java.awt.Color(77, 77, 77));\n Aggiunta.setForeground(new java.awt.Color(255, 255, 255));\n Aggiunta.setMinimumSize(new java.awt.Dimension(800, 540));\n Aggiunta.setPreferredSize(new java.awt.Dimension(841, 546));\n\n jLabel2.setFont(new java.awt.Font(\"Dialog\", 1, 24)); // NOI18N\n jLabel2.setForeground(new java.awt.Color(208, 208, 208));\n jLabel2.setText(\"Aggiungi Automobile\");\n\n jLabel3.setForeground(new java.awt.Color(208, 208, 208));\n jLabel3.setText(\"Marca\");\n\n jTextField1.setBackground(new java.awt.Color(77, 77, 77));\n jTextField1.setForeground(new java.awt.Color(208, 208, 208));\n jTextField1.setBorder(null);\n jTextField1.setCaretColor(new java.awt.Color(208, 208, 208));\n jTextField1.setOpaque(false);\n\n jLabel4.setForeground(new java.awt.Color(208, 208, 208));\n jLabel4.setText(\"Modello\");\n\n jLabel5.setForeground(new java.awt.Color(208, 208, 208));\n jLabel5.setText(\"Alimentazione\");\n\n jTextField4.setBackground(new java.awt.Color(77, 77, 77));\n jTextField4.setForeground(new java.awt.Color(208, 208, 208));\n jTextField4.setBorder(null);\n jTextField4.setCaretColor(new java.awt.Color(208, 208, 208));\n jTextField4.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));\n\n jLabel6.setForeground(new java.awt.Color(208, 208, 208));\n jLabel6.setText(\"Stato\");\n\n jRadioButton1.setBackground(new java.awt.Color(77, 77, 77));\n RadioGroupStato.add(jRadioButton1);\n jRadioButton1.setForeground(new java.awt.Color(208, 208, 208));\n jRadioButton1.setSelected(true);\n jRadioButton1.setText(\"Nuovo\");\n jRadioButton1.setBorder(null);\n jRadioButton1.setFocusPainted(false);\n\n jRadioButton2.setBackground(new java.awt.Color(77, 77, 77));\n RadioGroupStato.add(jRadioButton2);\n jRadioButton2.setForeground(new java.awt.Color(208, 208, 208));\n jRadioButton2.setText(\"Usato\");\n jRadioButton2.setBorder(null);\n jRadioButton2.setFocusPainted(false);\n\n jLabel7.setBackground(new java.awt.Color(77, 77, 77));\n jLabel7.setForeground(new java.awt.Color(208, 208, 208));\n jLabel7.setText(\"Mese\");\n\n jComboBox1.setBackground(new java.awt.Color(77, 77, 77));\n jComboBox1.setForeground(new java.awt.Color(208, 208, 208));\n jComboBox1.setModel(this.generaMesi());\n jComboBox1.setBorder(null);\n jComboBox1.setEnabled(false);\n jComboBox1.setOpaque(false);\n\n jLabel1.setForeground(new java.awt.Color(208, 208, 208));\n jLabel1.setText(\"Anno\");\n\n jComboBox2.setBackground(new java.awt.Color(77, 77, 77));\n jComboBox2.setForeground(new java.awt.Color(208, 208, 208));\n jComboBox2.setModel(this.generaAnni());\n jComboBox2.setBorder(null);\n jComboBox2.setEnabled(false);\n jComboBox2.setOpaque(false);\n\n jLabel8.setForeground(new java.awt.Color(208, 208, 208));\n jLabel8.setText(\"Prezzo\");\n\n jTextField3.setBackground(new java.awt.Color(77, 77, 77));\n jTextField3.setForeground(new java.awt.Color(208, 208, 208));\n jTextField3.setBorder(null);\n jTextField3.setCaretColor(new java.awt.Color(208, 208, 208));\n\n jSeparator4.setBackground(new java.awt.Color(77, 77, 77));\n jSeparator4.setForeground(new java.awt.Color(208, 208, 208));\n\n jLabel10.setForeground(new java.awt.Color(208, 208, 208));\n jLabel10.setText(\"Accessori\");\n\n jScrollPane1.setBackground(new java.awt.Color(77, 77, 77));\n jScrollPane1.setForeground(new java.awt.Color(208, 208, 208));\n jScrollPane1.setRequestFocusEnabled(false);\n\n jList1.setBackground(new java.awt.Color(77, 77, 77));\n jList1.setForeground(new java.awt.Color(208, 208, 208));\n jList1.setModel(new DefaultListModel<String>());\n jList1.setSelectionBackground(new java.awt.Color(0, 113, 156));\n jList1.setSelectionForeground(new java.awt.Color(208, 208, 208));\n jScrollPane1.setViewportView(jList1);\n\n jComboBox3.setBackground(new java.awt.Color(77, 77, 77));\n jComboBox3.setForeground(new java.awt.Color(208, 208, 208));\n jComboBox3.setModel(this.generaAccessori());\n jComboBox3.setBorder(null);\n\n jButton2.setBackground(new java.awt.Color(0, 113, 156));\n jButton2.setForeground(new java.awt.Color(208, 208, 208));\n jButton2.setText(\"Aggiungi\");\n jButton2.setBorder(null);\n jButton2.setBorderPainted(false);\n jButton2.setFocusPainted(false);\n jButton2.setPreferredSize(new java.awt.Dimension(50, 25));\n\n jLabel11.setForeground(new java.awt.Color(208, 208, 208));\n jLabel11.setText(\"Immagine\");\n\n jTextField5.setEditable(false);\n jTextField5.setBackground(new java.awt.Color(77, 77, 77));\n jTextField5.setForeground(new java.awt.Color(208, 208, 208));\n jTextField5.setText(\"Seleziona Un Immagine...\");\n jTextField5.setBorder(null);\n\n jSeparator5.setBackground(new java.awt.Color(77, 77, 77));\n jSeparator5.setForeground(new java.awt.Color(208, 208, 208));\n\n jSeparator6.setBackground(new java.awt.Color(77, 77, 77));\n jSeparator6.setForeground(new java.awt.Color(208, 208, 208));\n\n jSeparator8.setBackground(new java.awt.Color(77, 77, 77));\n jSeparator8.setForeground(new java.awt.Color(208, 208, 208));\n\n jScrollPane2.setBackground(new java.awt.Color(77, 77, 77));\n jScrollPane2.setBorder(null);\n jScrollPane2.setForeground(new java.awt.Color(208, 208, 208));\n\n jLabel12.setBackground(new java.awt.Color(77, 77, 77));\n jLabel12.setForeground(new java.awt.Color(208, 208, 208));\n jLabel12.setText(\"Image\");\n jLabel12.setToolTipText(\"\");\n jLabel12.setOpaque(true);\n jScrollPane2.setViewportView(jLabel12);\n\n jButton4.setBackground(new java.awt.Color(0, 113, 156));\n jButton4.setForeground(new java.awt.Color(208, 208, 208));\n jButton4.setText(\"Inserisci\");\n jButton4.setBorder(null);\n jButton4.setBorderPainted(false);\n jButton4.setFocusPainted(false);\n jButton4.setPreferredSize(new java.awt.Dimension(50, 25));\n\n jLabel19.setForeground(new java.awt.Color(208, 208, 208));\n jLabel19.setText(\"Cilindrata\");\n\n jTextField6.setBackground(new java.awt.Color(77, 77, 77));\n jTextField6.setForeground(new java.awt.Color(208, 208, 208));\n jTextField6.setBorder(null);\n jTextField6.setCaretColor(new java.awt.Color(208, 208, 208));\n jTextField6.setOpaque(false);\n\n jSeparator7.setBackground(new java.awt.Color(77, 77, 77));\n jSeparator7.setForeground(new java.awt.Color(208, 208, 208));\n\n jComboBox10.setBackground(new java.awt.Color(77, 77, 77));\n jComboBox10.setForeground(new java.awt.Color(208, 208, 208));\n jComboBox10.setModel(this.generaAlimentazione());\n jComboBox10.setBorder(null);\n jComboBox10.setOpaque(false);\n\n javax.swing.GroupLayout AggiuntaLayout = new javax.swing.GroupLayout(Aggiunta);\n Aggiunta.setLayout(AggiuntaLayout);\n AggiuntaLayout.setHorizontalGroup(\n AggiuntaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(AggiuntaLayout.createSequentialGroup()\n .addGroup(AggiuntaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(AggiuntaLayout.createSequentialGroup()\n .addGap(24, 24, 24)\n .addComponent(jLabel2))\n .addGroup(AggiuntaLayout.createSequentialGroup()\n .addGap(60, 60, 60)\n .addGroup(AggiuntaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jButton4, javax.swing.GroupLayout.PREFERRED_SIZE, 84, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(AggiuntaLayout.createSequentialGroup()\n .addGroup(AggiuntaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(AggiuntaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, AggiuntaLayout.createSequentialGroup()\n .addGroup(AggiuntaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel4)\n .addComponent(jLabel3))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(AggiuntaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)\n .addComponent(jTextField1, javax.swing.GroupLayout.DEFAULT_SIZE, 300, Short.MAX_VALUE)\n .addComponent(jTextField4)\n .addComponent(jSeparator8)))\n .addGroup(AggiuntaLayout.createSequentialGroup()\n .addGroup(AggiuntaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel5)\n .addComponent(jLabel6)\n .addComponent(jLabel7)\n .addComponent(jLabel1)\n .addComponent(jLabel8)\n .addComponent(jLabel10))\n .addGap(18, 18, 18)\n .addGroup(AggiuntaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(AggiuntaLayout.createSequentialGroup()\n .addGroup(AggiuntaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addGroup(AggiuntaLayout.createSequentialGroup()\n .addComponent(jRadioButton1)\n .addGap(18, 18, 18)\n .addComponent(jRadioButton2))\n .addComponent(jComboBox1, 0, 300, Short.MAX_VALUE)\n .addComponent(jComboBox2, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addGap(0, 0, Short.MAX_VALUE))\n .addComponent(jSeparator6)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, AggiuntaLayout.createSequentialGroup()\n .addGap(0, 0, Short.MAX_VALUE)\n .addGroup(AggiuntaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 300, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jTextField3, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 300, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addComponent(jComboBox10, javax.swing.GroupLayout.Alignment.TRAILING, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))\n .addGroup(AggiuntaLayout.createSequentialGroup()\n .addComponent(jComboBox3, javax.swing.GroupLayout.PREFERRED_SIZE, 300, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jButton2, javax.swing.GroupLayout.PREFERRED_SIZE, 84, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, AggiuntaLayout.createSequentialGroup()\n .addComponent(jLabel11)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(AggiuntaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(jSeparator5, javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jTextField5, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 300, Short.MAX_VALUE)))\n .addComponent(jSeparator4, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 300, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(AggiuntaLayout.createSequentialGroup()\n .addComponent(jLabel19)\n .addGap(44, 44, 44)\n .addGroup(AggiuntaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jSeparator7, javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jTextField6))))\n .addGap(18, 18, 18)\n .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 300, javax.swing.GroupLayout.PREFERRED_SIZE)))))\n .addGap(65, 65, 65))\n );\n AggiuntaLayout.setVerticalGroup(\n AggiuntaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, AggiuntaLayout.createSequentialGroup()\n .addGap(24, 24, 24)\n .addComponent(jLabel2)\n .addGap(26, 26, 26)\n .addGroup(AggiuntaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 300, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(AggiuntaLayout.createSequentialGroup()\n .addGroup(AggiuntaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel3)\n .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(1, 1, 1)\n .addComponent(jSeparator8, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(4, 4, 4)\n .addGroup(AggiuntaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel4, javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jTextField4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(1, 1, 1)\n .addComponent(jSeparator6, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(1, 1, 1)\n .addGroup(AggiuntaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel5)\n .addComponent(jComboBox10, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(9, 9, 9)\n .addGroup(AggiuntaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jRadioButton1)\n .addComponent(jLabel6)\n .addComponent(jRadioButton2))\n .addGap(10, 10, 10)\n .addGroup(AggiuntaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel7)\n .addComponent(jComboBox1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(AggiuntaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel1)\n .addComponent(jComboBox2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(9, 9, 9)\n .addGroup(AggiuntaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel19)\n .addComponent(jTextField6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(2, 2, 2)\n .addComponent(jSeparator7, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(1, 1, 1)\n .addGroup(AggiuntaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel8)\n .addComponent(jTextField3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(2, 2, 2)\n .addComponent(jSeparator4, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(1, 1, 1)\n .addGroup(AggiuntaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 70, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel10))))\n .addGap(18, 18, 18)\n .addGroup(AggiuntaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jComboBox3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jButton2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addGap(18, 18, 18)\n .addGroup(AggiuntaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel11)\n .addComponent(jTextField5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(1, 1, 1)\n .addComponent(jSeparator5, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(3, 3, 3)\n .addComponent(jButton4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(30, 30, 30))\n );\n\n Menu.setBackground(new java.awt.Color(0, 113, 156));\n Menu.setMinimumSize(new java.awt.Dimension(0, 540));\n Menu.setPreferredSize(new java.awt.Dimension(250, 540));\n Menu.setRequestFocusEnabled(false);\n\n MButton_Aggiungi.setBackground(new java.awt.Color(0, 113, 156));\n MButton_Aggiungi.setForeground(new java.awt.Color(255, 255, 255));\n MButton_Aggiungi.setText(\"Aggiungi Automobile\");\n MButton_Aggiungi.setBorder(null);\n MButton_Aggiungi.setBorderPainted(false);\n MButton_Aggiungi.setFocusPainted(false);\n\n MButton_Modifica.setBackground(new java.awt.Color(0, 113, 156));\n MButton_Modifica.setForeground(new java.awt.Color(255, 255, 255));\n MButton_Modifica.setText(\"Modifca Automobile Usata\");\n MButton_Modifica.setBorder(null);\n MButton_Modifica.setBorderPainted(false);\n MButton_Modifica.setFocusPainted(false);\n\n MButton_Nuovi.setBackground(new java.awt.Color(0, 113, 156));\n MButton_Nuovi.setForeground(new java.awt.Color(255, 255, 255));\n MButton_Nuovi.setText(\"Lista Automobili\");\n MButton_Nuovi.setBorder(null);\n MButton_Nuovi.setBorderPainted(false);\n MButton_Nuovi.setFocusPainted(false);\n\n MButton_Vendita.setBackground(new java.awt.Color(0, 113, 156));\n MButton_Vendita.setForeground(new java.awt.Color(255, 255, 255));\n MButton_Vendita.setText(\"Vendita Automobile\");\n MButton_Vendita.setBorder(null);\n MButton_Vendita.setBorderPainted(false);\n MButton_Vendita.setFocusPainted(false);\n\n javax.swing.GroupLayout MenuLayout = new javax.swing.GroupLayout(Menu);\n Menu.setLayout(MenuLayout);\n MenuLayout.setHorizontalGroup(\n MenuLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(MButton_Modifica, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 250, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(MButton_Aggiungi, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(MButton_Nuovi, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(MButton_Vendita, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n );\n MenuLayout.setVerticalGroup(\n MenuLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(MenuLayout.createSequentialGroup()\n .addGap(29, 29, 29)\n .addComponent(MButton_Aggiungi, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(10, 10, 10)\n .addComponent(MButton_Nuovi, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(90, 90, 90)\n .addComponent(MButton_Vendita, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(MButton_Modifica, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n\n jLayeredPane1.setLayer(Footer, javax.swing.JLayeredPane.MODAL_LAYER);\n jLayeredPane1.setLayer(Welcome, javax.swing.JLayeredPane.DEFAULT_LAYER);\n jLayeredPane1.setLayer(Modifica, javax.swing.JLayeredPane.DEFAULT_LAYER);\n jLayeredPane1.setLayer(Vendita, javax.swing.JLayeredPane.DEFAULT_LAYER);\n jLayeredPane1.setLayer(Stampa, javax.swing.JLayeredPane.DEFAULT_LAYER);\n jLayeredPane1.setLayer(Aggiunta, javax.swing.JLayeredPane.DEFAULT_LAYER);\n jLayeredPane1.setLayer(Menu, javax.swing.JLayeredPane.PALETTE_LAYER);\n\n javax.swing.GroupLayout jLayeredPane1Layout = new javax.swing.GroupLayout(jLayeredPane1);\n jLayeredPane1.setLayout(jLayeredPane1Layout);\n jLayeredPane1Layout.setHorizontalGroup(\n jLayeredPane1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(Aggiunta, javax.swing.GroupLayout.DEFAULT_SIZE, 847, Short.MAX_VALUE)\n .addComponent(Menu, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(jLayeredPane1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(Stampa, javax.swing.GroupLayout.DEFAULT_SIZE, 847, Short.MAX_VALUE))\n .addGroup(jLayeredPane1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(Vendita, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 847, Short.MAX_VALUE))\n .addGroup(jLayeredPane1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(Modifica, javax.swing.GroupLayout.DEFAULT_SIZE, 847, Short.MAX_VALUE))\n .addGroup(jLayeredPane1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(Footer, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 847, Short.MAX_VALUE))\n .addGroup(jLayeredPane1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(Welcome, javax.swing.GroupLayout.DEFAULT_SIZE, 847, Short.MAX_VALUE))\n );\n jLayeredPane1Layout.setVerticalGroup(\n jLayeredPane1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(Aggiunta, javax.swing.GroupLayout.DEFAULT_SIZE, 564, Short.MAX_VALUE)\n .addComponent(Menu, javax.swing.GroupLayout.DEFAULT_SIZE, 564, Short.MAX_VALUE)\n .addGroup(jLayeredPane1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(Stampa, javax.swing.GroupLayout.DEFAULT_SIZE, 564, Short.MAX_VALUE))\n .addGroup(jLayeredPane1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(Vendita, javax.swing.GroupLayout.DEFAULT_SIZE, 564, Short.MAX_VALUE))\n .addGroup(jLayeredPane1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(Modifica, javax.swing.GroupLayout.DEFAULT_SIZE, 564, Short.MAX_VALUE))\n .addGroup(jLayeredPane1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jLayeredPane1Layout.createSequentialGroup()\n .addGap(0, 544, Short.MAX_VALUE)\n .addComponent(Footer, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGroup(jLayeredPane1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(Welcome, javax.swing.GroupLayout.DEFAULT_SIZE, 564, Short.MAX_VALUE))\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.LEADING)\n .addComponent(jLayeredPane1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(Header, javax.swing.GroupLayout.DEFAULT_SIZE, 847, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(Header, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(0, 0, 0)\n .addComponent(jLayeredPane1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n\n pack();\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n buttonGroup1 = new javax.swing.ButtonGroup();\n jPanel1 = new javax.swing.JPanel();\n jrdb1 = new javax.swing.JRadioButton();\n jrdb2 = new javax.swing.JRadioButton();\n jrdb3 = new javax.swing.JRadioButton();\n jLabel1 = new javax.swing.JLabel();\n jbtnAceptar = new javax.swing.JButton();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);\n setName(\"Form\"); // NOI18N\n\n org.jdesktop.application.ResourceMap resourceMap = org.jdesktop.application.Application.getInstance(teoriadealinfo.TeoriadealInfoApp.class).getContext().getResourceMap(Tam_bloque.class);\n jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder(null, resourceMap.getString(\"jPanel1.border.title\"), javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, resourceMap.getFont(\"jPanel1.border.titleFont\"))); // NOI18N\n jPanel1.setName(\"jPanel1\"); // NOI18N\n\n buttonGroup1.add(jrdb1);\n jrdb1.setFont(resourceMap.getFont(\"jrdb1.font\")); // NOI18N\n jrdb1.setText(resourceMap.getString(\"jrdb1.text\")); // NOI18N\n jrdb1.setName(\"jrdb1\"); // NOI18N\n jrdb1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jrdb1ActionPerformed(evt);\n }\n });\n\n buttonGroup1.add(jrdb2);\n jrdb2.setFont(resourceMap.getFont(\"jrdb2.font\")); // NOI18N\n jrdb2.setText(resourceMap.getString(\"jrdb2.text\")); // NOI18N\n jrdb2.setName(\"jrdb2\"); // NOI18N\n\n buttonGroup1.add(jrdb3);\n jrdb3.setFont(resourceMap.getFont(\"jrdb3.font\")); // NOI18N\n jrdb3.setText(resourceMap.getString(\"jrdb3.text\")); // NOI18N\n jrdb3.setName(\"jrdb3\"); // NOI18N\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(jPanel1Layout.createSequentialGroup()\n .addGap(29, 29, 29)\n .addComponent(jrdb1)\n .addGap(53, 53, 53)\n .addComponent(jrdb2)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 52, Short.MAX_VALUE)\n .addComponent(jrdb3)\n .addGap(36, 36, 36))\n );\n jPanel1Layout.setVerticalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(28, 28, 28)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jrdb1)\n .addComponent(jrdb3)\n .addComponent(jrdb2))\n .addContainerGap(20, Short.MAX_VALUE))\n );\n\n jLabel1.setFont(resourceMap.getFont(\"jLabel1.font\")); // NOI18N\n jLabel1.setText(resourceMap.getString(\"jLabel1.text\")); // NOI18N\n jLabel1.setName(\"jLabel1\"); // NOI18N\n\n jbtnAceptar.setFont(resourceMap.getFont(\"jbtnAceptar.font\")); // NOI18N\n jbtnAceptar.setText(resourceMap.getString(\"jbtnAceptar.text\")); // NOI18N\n jbtnAceptar.setName(\"jbtnAceptar\"); // NOI18N\n jbtnAceptar.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jbtnAceptarActionPerformed(evt);\n }\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.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(36, 36, 36)\n .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGap(40, 40, 40))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addContainerGap(69, Short.MAX_VALUE)\n .addComponent(jLabel1)\n .addGap(56, 56, 56))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addContainerGap(169, Short.MAX_VALUE)\n .addComponent(jbtnAceptar)\n .addGap(159, 159, 159))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(6, 6, 6)\n .addComponent(jLabel1)\n .addGap(18, 18, 18)\n .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addComponent(jbtnAceptar)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n\n pack();\n }",
"private void initializeButtonPanel() {\n buttonPanel = new ButtonPanel();\n radioPanel = new JPanel(new GridLayout(0, 1));\n ButtonGroup buttonGroup = new ButtonGroup();\n Collections.addAll(toDoButtonList,task1,task2,task3,task4,task5,task6);\n for (int i=0;i<toDoButtonList.size();i++){\n JRadioButton task = toDoButtonList.get(i);\n buttonGroup.add(task);\n radioPanel.add(task);\n }\n\n refresh();\n\n }",
"public MostraVenta(String idtrasp, Object[][] clienteM1, Object[][] vendedorM1, String idmarc, String responsable,ListaTraspaso panel)\n{\n this.padre = panel;\n this.clienteM = clienteM1;\n this.vendedorM = vendedorM1;\n this.idtraspaso= idtrasp;\n this.idmarca=idmarc;\n//this.tipoenvioM = new String[]{\"INGRESO\", \"TRASPASO\"};\n String tituloTabla =\"Detalle Venta\";\n // padre=panel;\n String nombreBoton1 = \"Registrar\";\n String nombreBoton2 = \"Cancelar\";\n // String nombreBoton3 = \"Eliminar Empresa\";\n\n setId(\"win-NuevaEmpresaForm1\");\n setTitle(tituloTabla);\n setWidth(400);\n setMinWidth(ANCHO);\n setHeight(250);\n setLayout(new FitLayout());\n setPaddings(WINDOW_PADDING);\n setButtonAlign(Position.CENTER);\n setCloseAction(Window.CLOSE);\n setPlain(true);\n\n but_aceptar = new Button(nombreBoton1);\n but_cancelar = new Button(nombreBoton2);\n // addButton(but_aceptarv);\n addButton(but_aceptar);\n addButton(but_cancelar);\n\n formPanelCliente = new FormPanel();\n formPanelCliente.setBaseCls(\"x-plain\");\n //formPanelCliente.setLabelWidth(130);\n formPanelCliente.setUrl(\"save-form.php\");\n formPanelCliente.setWidth(ANCHO);\n formPanelCliente.setHeight(ALTO);\n formPanelCliente.setLabelAlign(Position.LEFT);\n\n formPanelCliente.setAutoWidth(true);\n\n\ndat_fecha1 = new DateField(\"Fecha\", \"d-m-Y\");\n fechahoy = new Date();\n dat_fecha1.setValue(fechahoy);\n dat_fecha1.setReadOnly(true);\n\ncom_vendedor = new ComboBox(\"Vendedor al que enviamos\", \"idempleado\");\ncom_cliente = new ComboBox(\"Clientes\", \"idcliente\");\n//com_tipo = new ComboBox(\"Tipo Envio\", \"idtipo\");\n initValues1();\n\n\n\n formPanelCliente.add(dat_fecha1);\n// formPanelCliente.add(com_tipo);\n// formPanelCliente.add(tex_nombreC);\n// formPanelCliente.add(tex_codigoBarra);\n // formPanelCliente.add(tex_codigoC);\nformPanelCliente.add(com_vendedor);\n formPanelCliente.add(com_cliente);\n add(formPanelCliente);\nanadirListenersTexfield();\n addListeners();\n\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n buttonGroup1 = new javax.swing.ButtonGroup();\n jPanel1 = new javax.swing.JPanel();\n jPanel2 = new javax.swing.JPanel();\n jLabel1 = new javax.swing.JLabel();\n jPanel3 = new javax.swing.JPanel();\n rbEmpresa = new javax.swing.JRadioButton();\n rbPessoa = new javax.swing.JRadioButton();\n tfCNPJ = new javax.swing.JTextField();\n try{ \n javax.swing.text.MaskFormatter cnpj = new javax.swing.text.MaskFormatter(\"##.###.###/####-##\"); \n tfCNPJ = new javax.swing.JFormattedTextField(cnpj); \n } \n catch (Exception e){ \n }\n lblCPFCNPJ = new javax.swing.JLabel();\n tfCPF = new javax.swing.JTextField();\n try{ \n javax.swing.text.MaskFormatter cpf = new javax.swing.text.MaskFormatter(\"###.###.###-##\"); \n tfCPF = new javax.swing.JFormattedTextField(cpf); \n } \n catch (Exception e){ \n }\n tfNome = new javax.swing.JTextField();\n lblTel = new javax.swing.JLabel();\n tfTelefone = new javax.swing.JTextField();\n try{ \n javax.swing.text.MaskFormatter tel = new javax.swing.text.MaskFormatter(\"(##)#####-####\"); \n tfTelefone = new javax.swing.JFormattedTextField(tel); \n } \n catch (Exception e){ \n }\n jButton1 = new javax.swing.JButton();\n jButton2 = new javax.swing.JButton();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n setTitle(\"Cadastrar Fornecedor\");\n\n jPanel1.setBackground(new java.awt.Color(153, 255, 153));\n\n jPanel2.setBackground(new java.awt.Color(204, 255, 204));\n\n jLabel1.setText(\"Nome:\");\n\n jPanel3.setBackground(new java.awt.Color(204, 255, 204));\n jPanel3.setLayout(null);\n\n rbEmpresa.setBackground(new java.awt.Color(204, 255, 204));\n buttonGroup1.add(rbEmpresa);\n rbEmpresa.setSelected(true);\n rbEmpresa.setText(\"Empresa\");\n rbEmpresa.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n rbEmpresaActionPerformed(evt);\n }\n });\n jPanel3.add(rbEmpresa);\n rbEmpresa.setBounds(0, 0, 90, 23);\n\n rbPessoa.setBackground(new java.awt.Color(204, 255, 204));\n buttonGroup1.add(rbPessoa);\n rbPessoa.setText(\"Pessoa física\");\n rbPessoa.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n rbPessoaActionPerformed(evt);\n }\n });\n jPanel3.add(rbPessoa);\n rbPessoa.setBounds(180, 0, 110, 23);\n\n tfCNPJ.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n tfCNPJActionPerformed(evt);\n }\n });\n jPanel3.add(tfCNPJ);\n tfCNPJ.setBounds(50, 30, 250, 30);\n\n lblCPFCNPJ.setText(\"CNPJ:\");\n jPanel3.add(lblCPFCNPJ);\n lblCPFCNPJ.setBounds(0, 30, 40, 30);\n\n tfCPF.setText(\"jTextField1\");\n jPanel3.add(tfCPF);\n tfCPF.setBounds(50, 30, 250, 30);\n\n tfNome.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n tfNomeActionPerformed(evt);\n }\n });\n\n lblTel.setText(\"Telefone:\");\n\n jButton1.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/Visao.icon/clienteAdd.png\"))); // NOI18N\n jButton1.setText(\"Cadastrar\");\n jButton1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton1ActionPerformed(evt);\n }\n });\n\n jButton2.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/Visao.icon/logout.png\"))); // NOI18N\n jButton2.setText(\"Voltar\");\n jButton2.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton2ActionPerformed(evt);\n }\n });\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 .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addComponent(lblTel)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(tfTelefone))\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addComponent(jLabel1)\n .addGap(18, 18, 18)\n .addComponent(tfNome, javax.swing.GroupLayout.PREFERRED_SIZE, 244, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addGap(35, 35, 35)\n .addComponent(jButton1)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jButton2, javax.swing.GroupLayout.PREFERRED_SIZE, 81, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(39, 39, 39))))\n );\n jPanel2Layout.setVerticalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel1)\n .addComponent(tfNome, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, 68, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(lblTel)\n .addComponent(tfTelefone, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jButton1)\n .addComponent(jButton2))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\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(jPanel1Layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addContainerGap())\n );\n jPanel1Layout.setVerticalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\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.LEADING)\n .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n );\n\n pack();\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n buttonGroup1 = new javax.swing.ButtonGroup();\n jPanel1 = new javax.swing.JPanel();\n jScrollPane1 = new javax.swing.JScrollPane();\n jtadiagnostico = new javax.swing.JTextArea();\n jPanel2 = new javax.swing.JPanel();\n jrbtnno = new javax.swing.JRadioButton();\n jrbtnsi = new javax.swing.JRadioButton();\n jLabel1 = new javax.swing.JLabel();\n jlblmodelo = new javax.swing.JLabel();\n jbtnaceptar = new javax.swing.JButton();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);\n setResizable(false);\n\n jPanel1.setBackground(new java.awt.Color(255, 255, 255));\n jPanel1.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());\n\n jtadiagnostico.setColumns(20);\n jtadiagnostico.setRows(5);\n jtadiagnostico.addKeyListener(new java.awt.event.KeyAdapter() {\n public void keyReleased(java.awt.event.KeyEvent evt) {\n jtadiagnosticoKeyReleased(evt);\n }\n public void keyTyped(java.awt.event.KeyEvent evt) {\n jtadiagnosticoKeyTyped(evt);\n }\n });\n jScrollPane1.setViewportView(jtadiagnostico);\n\n jPanel1.add(jScrollPane1, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 150, 460, 220));\n\n jPanel2.setBackground(new java.awt.Color(255, 255, 255));\n jPanel2.setBorder(javax.swing.BorderFactory.createTitledBorder(null, \"Reparado?\", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font(\"Segoe UI Light\", 0, 12))); // NOI18N\n\n jrbtnno.setBackground(new java.awt.Color(255, 255, 255));\n buttonGroup1.add(jrbtnno);\n jrbtnno.setFont(new java.awt.Font(\"Tahoma\", 1, 12)); // NOI18N\n jrbtnno.setText(\"No\");\n\n jrbtnsi.setBackground(new java.awt.Color(255, 255, 255));\n buttonGroup1.add(jrbtnsi);\n jrbtnsi.setFont(new java.awt.Font(\"Tahoma\", 1, 12)); // NOI18N\n jrbtnsi.setSelected(true);\n jrbtnsi.setText(\"Si\");\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(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup()\n .addGap(20, 20, 20)\n .addComponent(jrbtnsi)\n .addGap(18, 18, 18)\n .addComponent(jrbtnno)\n .addContainerGap(335, Short.MAX_VALUE))\n );\n jPanel2Layout.setVerticalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jrbtnno)\n .addComponent(jrbtnsi))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n\n jPanel1.add(jPanel2, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 60, 460, 60));\n\n jLabel1.setFont(new java.awt.Font(\"Segoe UI Light\", 0, 12)); // NOI18N\n jLabel1.setText(\"Diagnostico:\");\n jPanel1.add(jLabel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 130, -1, -1));\n\n jlblmodelo.setFont(new java.awt.Font(\"Segoe UI Light\", 0, 18)); // NOI18N\n jlblmodelo.setForeground(new java.awt.Color(255, 51, 51));\n jlblmodelo.setText(\"jLabel2\");\n jPanel1.add(jlblmodelo, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 20, 390, -1));\n\n jbtnaceptar.setBackground(new java.awt.Color(77, 161, 227));\n jbtnaceptar.setFont(new java.awt.Font(\"Segoe UI Light\", 0, 14)); // NOI18N\n jbtnaceptar.setForeground(new java.awt.Color(255, 255, 255));\n jbtnaceptar.setText(\"Aceptar\");\n jbtnaceptar.setBorderPainted(false);\n jbtnaceptar.setContentAreaFilled(false);\n jbtnaceptar.setDefaultCapable(false);\n jbtnaceptar.setOpaque(true);\n jbtnaceptar.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jbtnaceptarActionPerformed(evt);\n }\n });\n jPanel1.add(jbtnaceptar, new org.netbeans.lib.awtextra.AbsoluteConstraints(350, 380, 130, 40));\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.LEADING)\n .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, 495, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, 432, Short.MAX_VALUE)\n );\n\n pack();\n }",
"private void RadioButtonAgregarActionPerformed(java.awt.event.ActionEvent evt) {\n }",
"public ComandaPanel() {\n\n initComponents();\n // comanda = new Comanda();\n }",
"public void setRadio(GenericRadio radio) {\n\t\tthis.radio = radio;\r\n\t}",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n buttonGroup_borda = new javax.swing.ButtonGroup();\n jButton_ola = new javax.swing.JButton();\n jLabel_nome = new javax.swing.JLabel();\n jTextField_nome = new javax.swing.JTextField();\n jButton_Entrada = new javax.swing.JButton();\n jCheckBox_Borda = new javax.swing.JCheckBox();\n jCheckBox_Quijo = new javax.swing.JCheckBox();\n jCheckBox_Tomate = new javax.swing.JCheckBox();\n jButton_CheckBox = new javax.swing.JButton();\n jRadioButton_mussarela = new javax.swing.JRadioButton();\n jRadioButton_parmesao = new javax.swing.JRadioButton();\n jRadioButton_chedar = new javax.swing.JRadioButton();\n jButton_radio = new javax.swing.JButton();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n jButton_ola.setText(\"Clique Olá\");\n jButton_ola.setToolTipText(\"\");\n jButton_ola.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n jButton_olaMouseClicked(evt);\n }\n });\n jButton_ola.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton_olaActionPerformed(evt);\n }\n });\n\n jLabel_nome.setText(\"Digite o seu nome\");\n\n jButton_Entrada.setText(\"Entrar Nome\");\n jButton_Entrada.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n jButton_EntradaMouseClicked(evt);\n }\n });\n jButton_Entrada.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton_EntradaActionPerformed(evt);\n }\n });\n\n jCheckBox_Borda.setText(\"Borda recheada?\");\n\n jCheckBox_Quijo.setText(\"Queijo extra?\");\n\n jCheckBox_Tomate.setText(\"Tomates?\");\n\n jButton_CheckBox.setText(\"Verifica Check Box\");\n jButton_CheckBox.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n jButton_CheckBoxMouseClicked(evt);\n }\n });\n\n buttonGroup_borda.add(jRadioButton_mussarela);\n jRadioButton_mussarela.setText(\"Borda Mussarela\");\n\n buttonGroup_borda.add(jRadioButton_parmesao);\n jRadioButton_parmesao.setText(\"Borda Parmesao\");\n\n buttonGroup_borda.add(jRadioButton_chedar);\n jRadioButton_chedar.setText(\"Borda Chedar\");\n\n jButton_radio.setText(\"Verifica Radio Button\");\n jButton_radio.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n jButton_radioMouseClicked(evt);\n }\n });\n jButton_radio.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton_radioActionPerformed(evt);\n }\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.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(31, 31, 31)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jButton_CheckBox)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 97, Short.MAX_VALUE)\n .addComponent(jButton_radio)\n .addGap(153, 153, 153))\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jButton_ola)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jButton_Entrada))\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel_nome)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jTextField_nome, javax.swing.GroupLayout.PREFERRED_SIZE, 238, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jCheckBox_Borda)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jCheckBox_Quijo)\n .addComponent(jCheckBox_Tomate)))\n .addGap(79, 79, 79)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)\n .addComponent(jRadioButton_chedar, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jRadioButton_mussarela, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jRadioButton_parmesao, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(45, 45, 45)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel_nome)\n .addComponent(jTextField_nome, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(4, 4, 4)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jButton_ola)\n .addComponent(jButton_Entrada))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jCheckBox_Borda)\n .addComponent(jRadioButton_mussarela))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jCheckBox_Quijo)\n .addComponent(jRadioButton_parmesao))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jCheckBox_Tomate)\n .addComponent(jRadioButton_chedar))\n .addGap(58, 58, 58)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jButton_radio)\n .addComponent(jButton_CheckBox))\n .addContainerGap(42, Short.MAX_VALUE))\n );\n\n pack();\n }",
"private JPanel createReinforcePanel(Player p){\n\t\tthis.add( panels[1] );\n\t\tthis.panels[1].add( labels[ 3 ]);\n\t\t\n\t\t\n\t\tfor (Country c : this.game.getCurrentPlayer().getOwnedCountries()){\n\t\t\tcountrySelect[2].addItem(c.getName());\n\t\t}\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//reinforce panel\n\t\tthis.panels[1].add( countrySelect[2] );\t\t\n\t\tthis.panels[1].add(labels[ 4 ]);\n\t\tthis.panels[1].add( numberOfArmies[1] );\n\t\tthis.panels[1].add( execute[1] );\n\t\tpanels[1].setVisible(false);\n\t\treturn panels[1];\n\t}",
"public ManageMedicationJPanel(JPanel userProcessContainer, OrganizationDirectory organizationDirectory,UserAccount account) {\n initComponents();\n setSize(1370, 725);\n this.userAccount = account;\n this.userProcessContainer = userProcessContainer;\n this.organizationDirectory = organizationDirectory;\n this.patient = (Patient) userAccount.getPerson();\n \n Date date = new Date();\n Calendar calendar = GregorianCalendar.getInstance(); // creates a new calendar instance\n calendar.setTime(date); // assigns calendar to given date \n int hour = calendar.get(Calendar.HOUR_OF_DAY); // gets hour in 24h format\n int minute = calendar.get(Calendar.MINUTE);\n \n if(hour <9){\n radio1.setSelected(true);\n }\n else if(hour>9 && hour < 14){\n radio2.setSelected(true);\n }\n else if(hour>14 && hour <23){\n radio3.setSelected(true);\n }\n datechooser.setDate(date);\n populateComboInsulin();\n if (list1.size().equals(\"\")){\n JOptionPane.showMessageDialog(null, \"You have no medicines prescribed. Please visit a doctor.\", \"Created Successfully\", JOptionPane.INFORMATION_MESSAGE);\n }\n populateList1();\n // populateFields();\n }",
"public void addRadio(int aChanel) {\n radioList.add(radioLibrary.get(aChanel));\n rewriteXmlSource();\n }",
"@Override\n\tpublic JPanel obtenerPanel() {\n\t\treturn null;\n\t}",
"@Override\n\tpublic JPanel obtenerPanel() {\n\t\treturn null;\n\t}",
"public NewHeroIPPanel(NewHeroCiv nhCiv, HeroDisplayCiv hdCiv)\n {\n super(NEW_HERO_TITLE);\n _nhCiv = nhCiv;\n _hdCiv = hdCiv;\n\n // GENERAL SETUP\n setPreferredSize(Mainframe.getWindowSize());\n\n int pad = Mainframe.PAD;\n Border matte = BorderFactory.createMatteBorder(pad, pad, pad, pad, Color.WHITE);\n setBorder(matte);\n setBackground(_backColor);\n\n // Set Panel layout to special MiGLayout\n setLayout(new MigLayout(\"\", \"[center]\"));\n\n /* HERO NAME AND PROMPT COMPONENTS */\n // Add name components to the name subpanel\n // Create a hero name prompt label centered across all columns\n add(new JLabel(HERO_NAME_PROMPT), \"push, aligncenter, span\");\n\n // Create the input text field to collect the Hero's name give it default focus\n _nameField = makeNameField();\n add(_nameField, \"push, align center, span\");\n\n /* Label prompts for three horizontal inputs */\n add(new JLabel(HERO_GENDER_PROMPT), \"push, align center, gaptop 5%\");\n add(new JLabel(HERO_HAIR_PROMPT), \"push, align center, gaptop 5%\");\n add(new JLabel(HERO_RACE_PROMPT), \"push, align center, wrap\");\n\n /* Gender radio buttons */\n _genderPanel = new GenderPanel();\n add(_genderPanel.toJPanel());\n /* Hair color drop-down box */\n add(makeHairCombo());\n\n /* Add the Race drop-down combo */\n add(makeRaceCombo(), \"push, align center, wrap\");\n\n /* Add a button panel containing the Submit and Cancel buttons */\n add(makeButtonPanel(), \"push, align center, span, gaptop 50%\");\n\n }",
"private JPanel getJPanel() {\r\n\t\tif (jPanel == null) {\r\n\t\t\tmaxLabel = new JLabel();\r\n\t\t\tinfLabel = new JLabel();\r\n\t\t\tminLabel = new JLabel();\r\n\t\t\tjPanel = new JPanel();\r\n\t\t\tString min = \"0.0 <=\";\r\n\t\t\tString max = \"<= 1.0\";\r\n\t\t\tif (mode == RULES_BASIS_SUPPORT_MODE) {\r\n\t\t\t\tmin = rulesBasis.getMinSupport() + \" <=\";\r\n\t\t\t\tmax = \"<= \" + rulesBasis.getMaxSupport();\r\n\t\t\t} else if (mode == RULES_BASIS_CONFIDENCE_MODE) {\r\n\t\t\t\tmin = rulesBasis.getMinConfidence() + \" <=\";\r\n\t\t\t\tmax = \"<= \" + rulesBasis.getMaxConfidence();\r\n\t\t\t} else if (mode == INTENTS_BASIS_SUPPORT_MODE) {\r\n\t\t\t\tmin = intentsBasis.getMinSupport() + \" <=\";\r\n\t\t\t\tmax = \"<= \" + intentsBasis.getMaxSupport();\r\n\t\t\t}\r\n\t\t\tminLabel.setText(min);\r\n\t\t\tinfLabel.setText(\"<=\");\r\n\t\t\tmaxLabel.setText(max);\r\n\t\t\tjPanel.add(minLabel, null);\r\n\t\t\tjPanel.add(getMinTextField(), null);\r\n\t\t\tjPanel.add(infLabel, null);\r\n\t\t\tjPanel.add(getMaxTextField(), null);\r\n\t\t\tjPanel.add(maxLabel, null);\r\n\t\t}\r\n\t\treturn jPanel;\r\n\t}",
"private JPanel addPannelName(){\n\t\tJPanel panNom = new JPanel();\n\t\tpanNom.setPreferredSize(new Dimension(175, 75));\n\t\tnameT = new JTextField();\n\t\tnameT.setPreferredSize(new Dimension(100, 25));\n\t\tpanNom.setBorder(BorderFactory.createTitledBorder(\"Channel name\"));\n\t\tname = new JLabel(\"Put a name :\");\n\t\tpanNom.add(name);\n\t\tpanNom.add(nameT);\n\t\treturn panNom;\n\t}",
"public JPanel createAnswerButtonPanel()\n\t{\n\t\t//create a new panel\n\t\tJPanel answerPanel = new JPanel();\n\t\t//the layout is a grid Layout\n\t\tanswerPanel.setLayout(new GridLayout(1,2));\n\t\n\t\t//the no button will be added to the panel\t\t\n\t\tnoButton = new JButton(\"NO\");\n\t\tanswerPanel.add(noButton);\n\t\tnoButton.setBackground(Color.RED);\n\t\tnoButton.setOpaque(true);\n\t\tFont noFont = new Font(\"Bauhaus 93\",Font.BOLD,30);\n\t\tnoButton.setFont(noFont);\n\t\tnoButton.addActionListener(this);\n\t\t\n\t\t//no button will be added to the panel\t\t\t\t\n\t\tyesButton = new JButton(\"YES\");\n\t\tanswerPanel.add(yesButton);\n\t\tFont yesFont = new Font(\"Bauhaus 93\",Font.BOLD,30);\n\t\tyesButton.setFont(yesFont);\n\t\tyesButton.setBackground(Color.GREEN);\n\t\tyesButton.setOpaque(true);\n\t\tyesButton.addActionListener(this);\n\t\t//return answerPanel\n\t\treturn answerPanel;\n\t\t\n\t}",
"public Parent creatPanel() {\r\n\t\t\r\n\t\thlavniPanel = new BorderPane();\r\n\t\thlavniPanel.setCenter(creatGameDesk());\r\n\t\thlavniPanel.setTop(createMenuBar());\r\n\t\t\r\n\t\thlavniPanel.setBackground(new Background(new BackgroundFill(Color.BURLYWOOD, CornerRadii.EMPTY, Insets.EMPTY)));\r\n\t\thlavniPanel.setPadding(new Insets(8));\r\n\t\treturn hlavniPanel;\r\n\t}",
"private JPanel addControl() {\n\n\t\t// uses grid layout\n\t\tcontrolPanel.setLayout(new GridLayout(2, 1));\n\n\t\t// use box layout\n\t\tbuttonPanel.setLayout(new BoxLayout(buttonPanel, BoxLayout.X_AXIS));\n\t\t// add the answer buttons to the panel\n\t\tbuttonPanel.add(answer());\n\t\t// add the question text to the control panel\n\t\tcontrolPanel.add(question);\n\t\t// set alignment, color, font, opaque, border\n\t\tquestion.setHorizontalAlignment(SwingConstants.CENTER);\n\t\tquestion.setForeground(new Color(86, 10, 0));\n\t\tquestion.setBackground(new Color(206, 213, 224));\n\t\tquestion.setFont(new Font(\"Serif\", Font.BOLD, 24));\n\t\tquestion.setOpaque(true);\n\t\tquestion.setBorder(question.getBorder());\n\t\t// add the button panel to the control panel\n\t\tcontrolPanel.add(buttonPanel);\n\t\t// return control panel\n\t\treturn controlPanel;\n\t}"
] |
[
"0.6571653",
"0.63084733",
"0.61239713",
"0.59769404",
"0.5919328",
"0.5915748",
"0.5905855",
"0.5883822",
"0.58586293",
"0.58278674",
"0.5823427",
"0.5808127",
"0.57540476",
"0.5753459",
"0.5746603",
"0.57239854",
"0.57226455",
"0.572122",
"0.57026947",
"0.56475616",
"0.5644784",
"0.56386983",
"0.5619703",
"0.56184214",
"0.56059444",
"0.55885893",
"0.5564445",
"0.5563192",
"0.5561124",
"0.55546546",
"0.5550473",
"0.5525391",
"0.5523076",
"0.5519096",
"0.5505976",
"0.5497805",
"0.5487188",
"0.5485562",
"0.548334",
"0.5479698",
"0.5467159",
"0.5465486",
"0.54623514",
"0.54432046",
"0.54363734",
"0.543597",
"0.5423245",
"0.541975",
"0.54170656",
"0.5415547",
"0.5414864",
"0.54070926",
"0.54020727",
"0.54005903",
"0.5398936",
"0.5393679",
"0.53929067",
"0.53886974",
"0.5388036",
"0.53837204",
"0.5383258",
"0.53736144",
"0.5373081",
"0.5355849",
"0.53523093",
"0.5351598",
"0.53499967",
"0.5341178",
"0.53338027",
"0.53306305",
"0.5326421",
"0.5326408",
"0.5322245",
"0.5318777",
"0.53148675",
"0.5313767",
"0.53093076",
"0.53032786",
"0.5302019",
"0.5299726",
"0.52990115",
"0.52982366",
"0.52837324",
"0.52721125",
"0.5269778",
"0.5265745",
"0.52552265",
"0.52532625",
"0.5246672",
"0.5240294",
"0.5229203",
"0.52288306",
"0.52263707",
"0.52263707",
"0.5223519",
"0.52093023",
"0.5209024",
"0.52072245",
"0.52052563",
"0.5203495"
] |
0.62925225
|
2
|
Interface that handles edited messages received from a bot.
|
@FunctionalInterface
public interface MessageEditHandler extends UpdateHandler {
/**
* Handles an incoming message edit.
*
* @param message new incoming edit
* @param editDate the date of the edit
* @throws Throwable if a throwable is thrown
*/
void onMessageEdit(Message message, long editDate) throws Throwable;
@Override
default void onUpdate(Update update) throws Throwable {
if (update instanceof EditedMessageUpdate) {
Message message = ((EditedMessageUpdate) update).getMessage();
onMessageEdit(message, message.getEditDate().getAsLong());
}
}
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"void onMessageEdit(Message message, long editDate) throws Throwable;",
"boolean editMessage(int roomId, long messageId, String updatedMessage) throws RoomNotFoundException, RoomPermissionException, IOException;",
"public abstract void update(Message message);",
"public void sendEditTest( MessageReceivedEvent event ) {\n\n final StringBuilder message = new StringBuilder();\n message.append( \"!poll edit 00000 text test \\n\" ); //Change the text for the poll. PASS\n\n message.append( \"!poll edit 00000 OpeNtIMe \\\"06-09-2012\\\" \\n\" ); //Test open time change. FAIL\n message.append( \"!poll edit 00000 OPENTIME \\\"12:00pm\\\" \\n\" ); //Test open time change. FAIL\n message.append( \"!poll edit 00000 openTIME \\\"null\\\" \\n\" ); //Test open time change. FAIL\n message.append( \"!poll edit 00000 opentime \\\"11-11-2019 04:20pm\\\" \\n\" ); //Test open time change. PASS\n\n message.append( \"!poll edit 00000 closeTIME \\\"06-09-2019 04:20am\\\" \\n\" ); //Test close time before open. PASS\n message.append( \"!poll edit 00000 closetime \\\"06-09-2012\\\" \\n\" ); //Test open time change. FAIL\n message.append( \"!poll edit 00000 CLOSETIME \\\"12:00pm\\\" \\n\" ); //Test open time change. FAIL\n message.append( \"!poll edit 00000 cLoSeTiMe \\\"null\\\" \\n\" ); //Test open time change. FAIL\n message.append( \"!poll edit 00000 CLOSEtime \\\"06-09-2020 04:20am\\\" \\n\" ); //Test open time change. PASS\n\n message.append( \"!poll edit 00000 option 1 \\\"New First\\\" \\n\" ); //Edit first option. Else option will be \"Option A\".\n message.append( \"!poll vote 00000 1 \\n\" ); //This vote should be reset.\n message.append( \"!poll edit 00000 option 2 \\\"New Second\\\" \\n\" ); //Edit second option. Else option will be \"Option B\".\n message.append( \"!poll edit 00000 option add \\\"Third Option\\\" \\n\" ); //Add third option.\n message.append( \"!poll edit 00000 option 4 \\\"This should fail\\\" \\n\" ); //If this options appears. You did it wrong.\n message.append( \"!poll edit 00000 text test \\n\" ); //Change the text for the poll.\n message.append( \"!poll edit 00000 text \\\"\\\" \\n\" ); //Change the text for the poll.\n\n message.append(\"-----\");\n event.getChannel().sendMessage( message ).queue();\n }",
"public interface MineMessageModifyView extends MvpView {\n\n void modifyMessage(Object connect);\n}",
"public interface OnAboutForMeMessageUpdateListener {\r\n void onAboutForMeMessage(String text);\r\n}",
"protected void handleMessage(Message msg) {}",
"public interface MessageHandler {\n\n public void setMessage(TextMessage message,String msg);\n}",
"@Override\n public void handleMessage(Message message) {}",
"@Override\r\n public void handleMessage(Message msg) {\n }",
"abstract void updateMessage(String msg);",
"public interface OnBulletinBoardUpdate\n {\n public void onBulletinEdit(String paramBulletinId,BulletinBoard paramBulletinBoard);\n public void onBulletinDelete(String paramBulletinId);\n public void onBulletinReadMore(int paramPosition);\n public void onBulletinLike(int paramPosition, String owner);\n\n\n }",
"@Override\n\t\t\tpublic void handleMessage(Message msg) {\n\t\t\t\tsuper.handleMessage(msg);\n\t\t\t\tswitch (msg.what) {\n\t\t\t\tcase EventManager.EventType_VoteChange:\n\t\t\t\tcase EventManager.EventType_SurveyChange:\n\t\t\t\t\tif(mDateArray == null || mDateArray.length() == 0){\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tfor(int i = 0; i < mDateArray.length(); i++){\n\t\t\t\t\t\tJSONObject obj = mDateArray.optJSONObject(i);\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tif(obj.optString(\"id\").equalsIgnoreCase((String) ((Object[])msg.obj)[0])){\n\t\t\t\t\t\t\t\tobj.put(\"favoriteStatus\", \"6\");\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\t// TODO: handle exception\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif(mListViewAdapter != null){\n\t\t\t\t\t\tmListViewAdapter.notifyDataSetChanged();\n\t\t\t\t\t}\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}",
"void onUpdate(Message message);",
"public interface ClientUpdateListener {\n\n /**\n * This method notify the implementer that a message has been received\n *\n * @param message the received message from the server\n */\n void onUpdate(Message message);\n}",
"void onIssueEditedEvent(T event);",
"void onCommandMessage(AbstractTelegramBot bot, Update update, Message message, List<String> args) throws TelegramApiException;",
"public void handleMessage(Message message);",
"void update(String message, Command command, String senderNickname);",
"@Override\n\t\t\tpublic void handleMessage(Message msg) {\n\t\t\t\tsuper.handleMessage(msg);\n\t\t\t\tswitch(msg.what){\n\t\t\t\tcase COMMENT_OK:\n\t\t\t\t\tString[] operatStatus = (String[]) msg.obj;\n\t\t\t\t\tif (\"1\".equals(operatStatus[0])) {\n\t\t\t\t\t\tinputView.setText(\"\");\n\t\t\t\t\t\tToast.makeText(mContext,\"发布成功\", Toast.LENGTH_SHORT)\n\t\t\t\t\t\t\t\t.show();\n\t\t\t\t\t\tif(post_comment_list!=null){\n\t\t\t\t\t\t\tpost_comment_list.refresh();\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tToast.makeText(mContext, \"发布失败\", Toast.LENGTH_SHORT)\n\t\t\t\t\t\t\t\t.show();\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase WeibaBaseHelper.DATA_ERROR:\n\t\t\t\t\tToast.makeText(mContext, \"数据加载失败\", Toast.LENGTH_SHORT)\n\t\t\t\t\t\t\t.show();\n\t\t\t\t\tbreak;\n\t\t\t\tcase WeibaBaseHelper.NET_ERROR:\n\t\t\t\t\tToast.makeText(mContext, \"网络故障\", Toast.LENGTH_SHORT).show();\n\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\t}\n\t\t\t}",
"public void handleMessage(EBMessage message) {\n\t\tif (message instanceof PropertiesChanged) {\n\t\t\tView[] openViews = jEdit.getViews();\n\t\t\tfor (int i = 0; i < openViews.length; i++) {\n\t\t\t\tTypoScriptSiteBrowser browser = (TypoScriptSiteBrowser)openViews[i].getDockableWindowManager().getDockable(\"typoscriptsitebrowser\");\n\t\t\t\tif (browser != null) {\n\t\t\t\t\tbrowser.checkForPossibleSitesUpdate();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (message instanceof BufferUpdate) {\n\t\t\tBufferUpdate bu = (BufferUpdate)message;\n\t\t\tif (bu.getWhat() == BufferUpdate.LOADED) {\n\t\t\t\tBuffer buf = bu.getBuffer();\n\t\t\t\tVFS vfs = buf.getVFS();\n\t\t\t\tif (vfs instanceof TypoScriptVFS) {\n\t\t\t\t\tMode mode = jEdit.getMode(\"typoscript\");\n\t\t\t\t\tif (mode == null) {\n\t\t\t\t\t\tloadModeManually();\n\t\t\t\t\t}\n\t\t\t\t\tmode = jEdit.getMode(\"typoscript\");\n\t\t\t\t\tif (mode != null) {\n\t\t\t\t\t\tbuf.setMode(mode);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tLog.log(Log.ERROR, TypoScriptPlugin.instance, \"Failed to manually load mode!\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"@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 }",
"public void onChatMessageReceived(ConversationMessage convo, String errorMessage);",
"public void action(BotInstance bot, Message message);",
"@Override\n public void onUpdateReceived(Update update) {\n if (update.hasMessage() && update.getMessage().hasText()) {\n SendMessage reply = new SendMessage(); // Create a SendMessage object with mandatory fields\n String chatId = update.getMessage().getChatId().toString();\n reply.setChatId(chatId);\n // message.setText(update.getMessage().getText());\n\n String userId = update.getMessage().getChat().getId().toString();\n String firstName = update.getMessage().getChat().getFirstName();\n String lastName = update.getMessage().getChat().getLastName();\n String channel = TELEGRAM_STRING;\n\n User user = getUser(userId, channel);\n if(user == null) {\n user = createUser(userId, firstName, lastName, channel, chatId);\n }\n\n String message = update.getMessage().getText();\n String[] splittedMessage = message.split(\" \");\n\n String command = getCommand(message);\n\n switch (command) {\n case START_COMMAND:\n createReplyMessage(reply, START_MESSAGE);\n break;\n\n case SUBSCRIBE_COMMAND:\n if (splittedMessage.length > 1) {\n if (splittedMessage[1].length() != 6) {\n createReplyMessage(reply, String.format(INVALID_PINCODE, splittedMessage[1]));\n break;\n }\n String pincode = getPincode(splittedMessage[1], userId);\n Integer age = getAge(splittedMessage[2]);\n if (pincode == null || age == null) {\n createReplyMessage(reply, String.format(INVALID_MESSAGE, splittedMessage[1]));\n break;\n }\n Boolean subscribed = subscribe(user, pincode, age);\n if (subscribed) {\n createReplyMessage(reply, String.format(SUBSCRIBED_MESSAGE, pincode, age));\n } else {\n createReplyMessage(reply, String.format(ALREADY_SUBSCRIBED_MESSAGE, pincode, age));\n }\n } else {\n createReplyMessage(reply, INVALID_MESSAGE);\n }\n break;\n\n case UNSUBSCRIBE_COMMAND:\n if (splittedMessage.length > 1) {\n if (splittedMessage[1].length() != 6) {\n createReplyMessage(reply, String.format(INVALID_PINCODE, splittedMessage[1]));\n break;\n }\n String pincode = getPincode(splittedMessage[1], userId);\n Integer age = getAge(splittedMessage[2]);\n if (pincode == null || age == null) {\n createReplyMessage(reply, String.format(INVALID_MESSAGE, String.format(\"%s %s\", splittedMessage[1], splittedMessage[2])));\n break;\n }\n Boolean unsubscribed = unsubscribe(user, pincode, age);\n if (unsubscribed) {\n createReplyMessage(reply, String.format(UNSUBSCRIBED_MESSAGE, pincode, age));\n } else {\n createReplyMessage(reply, String.format(NO_SUBSCRIPTION_FOUND, pincode, age));\n }\n } else {\n createReplyMessage(reply, INVALID_MESSAGE);\n }\n break;\n\n case LIST_SUBSCRIPTION_COMMAND:\n List<String> subscriptionList = getAllSubscription(user);\n String replyMessString = \"\";\n if (!(subscriptionList.size() > 0)) {\n replyMessString = NO_SUBSCRIPTION_MESSAGE;\n }\n int i = 1;\n for (String string : subscriptionList) {\n replyMessString += String.format(\"%s. %s\\n\", i, string);\n i++;\n }\n createReplyMessage(reply, replyMessString);\n break;\n\n case HELP_COMMAND:\n createReplyMessage(reply, HELP_MESSAGE);\n break;\n\n default:\n createReplyMessage(reply, UNRECOGNIZED_COMMAND);\n }\n sendMessage(reply);\n }\n }",
"public void processMessage(Chat chat, Message message)\n {\n }",
"void update(T message);",
"public interface EditCallbacks {\n\n public void onSaveItem(final Bundle data);\n public void onEditCanceled();\n public void onValidationError(String msg);\n}",
"public void handleMessageFromClient(Object msg) {\n\n }",
"@Override\n public void onMessageReceived(MessageReceivedEvent event) {\n if (event.getAuthor().isBot()) {\n return ;\n }\n\n Parser.parse(event.getMessage().getContentRaw(), event);\n }",
"private void handleMessage (Message message, Update update){\r\n\t\tSendMessage sendMessage = new SendMessage();\r\n\t\tLong chatId = update.getMessage().getChatId();\r\n\t\tif (isPolling == true){//Si el comando de la encuesta ha sido pulsado, modo encuesta...\t\t\t\r\n\t\t\tif (haveQuestion == false){//Si es falso todavia no se ha asignado la pregunta...\r\n\t\t\t\tpoll.setQuestion(message.getText());//Asignamos\tla pregunta.\t\t\t\r\n\t\t\t\tsendMessage.setChatId(chatId);\r\n\t\t\t\tsendMessage.setParseMode(Poll.parseMode);\r\n\t\t\t\tsendMessage.setText(BotConfig.POLL_QUESTION_STRING+ message.getText() +BotConfig.POLL_FIRST_ANSWER_STRING);\r\n\t\t\t\thaveQuestion = true;//Marcamos que hay pregunta.\r\n\t\t\t} else {//En este estado tenemos la pregunta, asignamos las respuestas.\r\n\t\t\t\tpoll.setAnswers(message.getText());\t\t\t\t\r\n\t\t\t\tsendMessage.setChatId(chatId);\r\n\t\t\t\tsendMessage.setText(BotConfig.POLL_ANSWER_STRING);\r\n\t\t\t}\t\t\t\r\n\t\t} else if(update.getMessage().getFrom().getId() != null){//Si el id del usuario no es null...\r\n\t\t\tInteger id = update.getMessage().getFrom().getId();\r\n\t\t\tif (id == BotConfig.DEV_ID){//Si es mi id...\r\n\t\t\t\tsendMessage.setChatId(chatId);\r\n\t\t\t\tsendMessage.setText(BotConfig.DEV_WORDS);//Mensaje personalizado...xD\r\n\t\t\t}\t\r\n\t\t} else {//Sino respondemos con el mismo texto enviado por el usuario.\r\n\t\t\tsendMessage.setChatId(chatId);\r\n\t\t\tsendMessage.setText(update.getMessage().getText());\r\n\t\t} \t\t\r\n try { \t\r\n execute(sendMessage);//Enviamos mensaje. \r\n } catch (TelegramApiException e) {\r\n \tBotLogger.error(LOGTAG, e);//Guardamos mensaje y lo mostramos en pantalla de la consola.\r\n e.printStackTrace();\r\n }\r\n\t}",
"public abstract void msgHandler(Message msg);",
"public MessageEdit(Display display, Displayable pView, Contact to, String body) {\r\n t = new TextBox(to.toString(), \"\", 500, TextField.ANY);\r\n try {\r\n //expanding buffer as much as possible\r\n maxSize = t.setMaxSize(4096); //must not trow\r\n \r\n } catch (Exception e) {}\r\n \r\n insert(body, 0); // workaround for Nokia S40\r\n this.to=to;\r\n this.display=display;\r\n \r\n cf=Config.getInstance();\r\n //#ifdef DETRANSLIT\r\n //# DeTranslit.getInstance();\r\n //#endif\r\n \r\n if (!cf.swapSendAndSuspend) {\r\n cmdSuspend=new Command(SR.MS_SUSPEND, Command.BACK, 90);\r\n cmdSend=new Command(SR.MS_SEND, Command.OK, 1);\r\n } else {\r\n cmdSuspend=new Command(SR.MS_SUSPEND, Command.OK, 1);\r\n cmdSend=new Command(SR.MS_SEND, Command.BACK, 90);\r\n }\r\n //#ifdef ARCHIVE\r\n //#ifdef PLUGINS\r\n //# if (StaticData.getInstance().Archive)\r\n //#endif\r\n t.addCommand(cmdPaste);\r\n //#endif\r\n //#ifdef CLIPBOARD\r\n //# if (cf.useClipBoard) {\r\n //# clipboard=ClipBoard.getInstance();\r\n //# if (!clipboard.isEmpty()) {\r\n //# t.addCommand(cmdPasteText);\r\n //# }\r\n //# }\r\n //#endif\r\n //#if TEMPLATES\r\n //#ifdef PLUGINS\r\n //# if (StaticData.getInstance().Archive)\r\n //#endif\r\n //# t.addCommand(cmdTemplate);\r\n //#endif\r\n \r\n t.addCommand(cmdSend);\r\n t.addCommand(cmdInsMe);\r\n //#ifdef SMILES\r\n t.addCommand(cmdSmile);\r\n //#endif\r\n if (to.origin>=Contact.ORIGIN_GROUPCHAT)\r\n t.addCommand(cmdInsNick);\r\n //#ifdef DETRANSLIT\r\n //# t.addCommand(cmdSendInTranslit);\r\n //# t.addCommand(cmdSendInDeTranslit);\r\n //#endif\r\n t.addCommand(cmdSuspend);\r\n t.addCommand(cmdCancel);\r\n \r\n if (to.origin==Contact.ORIGIN_GROUPCHAT)\r\n t.addCommand(cmdSubj);\r\n \r\n if (to.lastSendedMessage!=null)\r\n t.addCommand(cmdLastMessage); \r\n //#ifdef RUNNING_MESSAGE\r\n //# if (cf.notifyWhenMessageType == 1) {\r\n //# t.setTicker(ticker);\r\n //# } else {\r\n //# t.setTicker(null);\r\n //# }\r\n //# if (thread==null) (thread=new Thread(this)).start() ; // composing\r\n //#else\r\n send() ; // composing\r\n //#endif\r\n setInitialCaps(cf.capsState);\r\n if (Config.getInstance().phoneManufacturer == Config.SONYE) System.gc(); // prevent flickering on Sony Ericcsson C510\r\n t.setCommandListener(this);\r\n display.setCurrent(t); \r\n this.parentView=pView;\r\n }",
"@Override\n\tpublic void onMessage(CommandMessage msg) {\n\t}",
"public interface OnChatListener {\n void onSendMessage(Bundle b);\n }",
"public interface Changed extends Editable.Changed\n {\n }",
"@Override\n public void updateView(Message msg)\n {\n \n }",
"@Override\r\n\tpublic void handleMessageFromServer(Object msg) {\r\n\t\tMessage currMsg = (Message) msg;\r\n\t\tswitch (currMsg.getAction()) \r\n\t\t{\r\n\t\tcase EDIT_USER_DETAILS:\r\n\t\t\tif ((Integer) currMsg.getData().get(0) == 0) \r\n\t\t\t\tJOptionPane.showMessageDialog(null, \"All the changes have been saved succesfully\", \"Notification\",\r\n\t\t\t\t\t\tJOptionPane.INFORMATION_MESSAGE);\r\n\t\t\telse \r\n\t\t\t\tJOptionPane.showMessageDialog(null, (currMsg.getData().get(1)).toString(), \"Error\",\r\n\t\t\t\t\t\tJOptionPane.WARNING_MESSAGE);\r\n\t\tbreak;\r\n\t\tcase GET_USER_PURCHASES:\r\n\t\t\tif ((Integer) currMsg.getData().get(0) == 0) \r\n\t\t\t{\r\n\t\t \tArrayList<Purchase> purchases = (ArrayList<Purchase>) currMsg.getData().get(1);\r\n\t\t\t\tObservableList<Purchase> currPurchasesList = FXCollections.observableArrayList(purchases);\r\n\t\t\t\tsetTableViewForPurchases(currPurchasesList);\r\n\t\t\t}\r\n\t\t\telse \r\n\t\t\t\tJOptionPane.showMessageDialog(null, (currMsg.getData().get(1)).toString(), \"Error\",\r\n\t\t\t\t\t\tJOptionPane.WARNING_MESSAGE);\r\n\t\tbreak;\r\n\t\tcase RENEW:\r\n\t\t\tif ((Integer) currMsg.getData().get(0) == 0) \r\n\t\t\t{\r\n\t\t \tArrayList<Purchase> purchases = (ArrayList<Purchase>) currMsg.getData().get(1);\r\n\t\t\t\tObservableList<Purchase> currPurchasesList = FXCollections.observableArrayList(purchases);\r\n\t\t\t\tsetTableViewForPurchases(currPurchasesList);\r\n\t\t\t\tJOptionPane.showMessageDialog(null,\"Automated certificate renewal has succeeded.\\nYou've got a 10% discount!\", \"Notification\",\r\n\t\t\t\t\t\tJOptionPane.INFORMATION_MESSAGE);\r\n\t\t\t}\r\n\t\t\telse \r\n\t\t\t\tJOptionPane.showMessageDialog(null, (currMsg.getData().get(1)).toString(), \"Error\",\r\n\t\t\t\t\t\tJOptionPane.WARNING_MESSAGE);\r\n\t\tbreak;\r\n\t\tcase DOWNLOAD_PURCHASE:\r\n\t\t\tif ((Integer) currMsg.getData().get(0) == 0) {\r\n\t\t\t\t\tPlatform.runLater(() -> {\r\n\t\t\t\t\t\tDirectoryChooser directoryChooser = new DirectoryChooser ();\r\n\t\t\t\t\t\tdirectoryChooser.setTitle(\"Save To Folder\");\r\n\t\t\t\t\t\tFile file = directoryChooser.showDialog(MainGUI.MainStage);\r\n\t\t\t\t\t\tServices.writeCityToFile((City) (currMsg.getData().get(1)), file.getAbsolutePath());\r\n\t\t\t\t\t});\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tJOptionPane.showMessageDialog(null, (currMsg.getData().get(1)).toString(), \"Error\",\r\n\t\t\t\t\t\tJOptionPane.WARNING_MESSAGE);\r\n\t\t\t}\r\n\t\tbreak;\r\n\t\tdefault:\r\n\t\t}\r\n\t}",
"public void receivedUpdateFromServer();",
"@Override\r\n\t\t\tpublic void onChat(String message) {\n\r\n\t\t\t}",
"public abstract void handleClientSide(T message, EntityPlayer player);",
"public interface OnChatEvents {\n void onSendChatMessage(String time, String displayName, String buddyPicture, String message, String to);\n void onMessageRead();\n void onSendFile(String time, String displayName, String buddyPicture, String message, long size, String name, String mime, String to);\n\n void onDownload(int position, String id, FileInfo fileinfo);\n }",
"@Override\n\tpublic void onMessageRecieved(Message arg0) {\n\t\t\n\t}",
"@Override\n\t\t\tpublic void handleMessage(Message msg)\n\t\t\t{\n\t\t\t\tString data = (String) msg.obj;\n\t\t\t\tfinal TextView textView;\n\t\t\t\tfinal StringBuffer buffer;\n\t\t\t\tfinal ScrollView scrollView;\n\t\t\t\tfinal AutoCompleteTextView autoCompleteText;\n\t\t\t\tRunnable scrollPost = null;\n\t\t\t\tint delayTime = 0;\n\t\t\t\t\n\t\t\t\t// Set view pointer\n\t\t\t\tif (msg.what == VIEW_ID_COMMAND)\n\t\t\t\t{\n\t\t\t\t\ttextView = mCommandView;\n\t\t\t\t\tbuffer = mCommandBuffer;\n\t\t\t\t\tscrollView = mCommandScrollView;\n\t\t\t\t\tscrollPost = mCommandScrollPost;\n\t\t\t\t\tif ((mUpdateCount % 20) == 0)\n\t\t\t\t\t{\n\t\t\t\t\t\tdelayTime = 0;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tdelayTime = 1000;\n\t\t\t\t\t}\n\t\t\t\t\tmUpdateCount++;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\ttextView = mKeyView;\n\t\t\t\t\tbuffer = mKeyBuffer;\n\t\t\t\t\tscrollView = mKeyScrollView;\n\t\t\t\t\tscrollPost = mKeyScrollPost;\n\t\t\t\t\tdelayTime = 0;\n\t\t\t\t}\n\n\t\t\t\tif (mTabHost.getCurrentTab() == VIEW_ID_COMMAND)\n\t\t\t\t{\n\t\t\t\t\tautoCompleteText = mCommandInputView;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tautoCompleteText = mKeyInputView;\n\t\t\t\t}\n\n\t\t\t\t\n\t\t\t\t// Update data\n\t\t\t\tbuffer.append(data);\n\t\t\t\tif (buffer.length() > 5000)\n\t\t\t\t{\n\t\t\t\t\tbuffer.delete(0, buffer.length() - 5000);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tremoveCallbacks(scrollPost);\n\n\t\t\t\t// Reduce update frequency\n\t\t\t\tscrollPost = new Runnable() \n\t\t\t\t{\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void run() \n\t\t\t\t\t{\n\t\t\t\t\t\ttextView.setText(buffer);\n\t\t\t\t\t\t\n\t\t\t\t\t\tpostDelayed(new Runnable()\n\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{\n\t\t\t\t\t\t\t\tscrollView.fullScroll(View.FOCUS_DOWN);\n\t\t\t\t\t\t\t\tautoCompleteText.requestFocus();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}, 200);\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t\t\n\t\t\t\tif (msg.what == VIEW_ID_COMMAND)\n\t\t\t\t{\n\t\t\t\t\tmCommandScrollPost = scrollPost;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tmKeyScrollPost = scrollPost;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tpostDelayed(scrollPost, delayTime);\n\t\t\t}",
"public interface MessageInterface {\n\t\n\t/** \n\t * Get Message type.<br>\n\t * \n\t * Operations on Server operate based on the Message type. A type can never be overridden.\n\t * @return A String for the Message type.\n\t */\n\tString getType();\n\n\t/** \n\t * Set Message status.<br>\n\t * \n\t * Message status can be used for validation of operations. All Client Messages will receive a reply from the Server. \n\t * The Client can use the Status to determine the success or failure of an operation.<br>\n\t * \n\t * @return A String for the Message type.\n\t */\n\tvoid setStatus(String status);\n\n\t/** \n\t * Get Message status.<br>\n\t * \n\t * Message status can be used for validation of operations. All Client Messages will receive a reply from the Server.<br> \n\t * The Client can use the Status to determine the success or failure of an operation.\n\t * \n\t */\n\tString getStatus();\n\t\n\t/** \n\t * Set Message content.<br>\n\t * \n\t * Each Message contains a payload that is used for operations. Such operations will require that content for the operation to work. \n\t */\n\tvoid setContent(Map<String, Object> content);\n\t\n\t/** \n\t * Get Message content.<br>\n\t * \n\t * Each Message contains a payload that is used for operations. Such operations will require that content for the operation to work. \n\t * \n\t * @return A Map containing content.\n\t */\n\tMap<String, Object> getContent();\n}",
"public interface CallbackItemEdit {\n public void doEdit(int position);\n\n public void doDelete(int position);\n}",
"public final void manageMessage(Message message)\n\t{\n\t\tif(message.getText() != null)\n\t\t{\n\t\t\ttextMessage(message);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif(message.getAudio() != null)\n\t\t{\n\t\t\taudioMessage(message);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif(message.getDocument() != null)\n\t\t{\n\t\t\tdocumentMessage(message);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif(message.getPhoto() != null)\n\t\t{\n\t\t\tphotoMessage(message);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif(message.getSticker() != null)\n\t\t{\n\t\t\tstickerMessage(message);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif(message.getVideo() != null)\n\t\t{\n\t\t\tvideoMessage(message);\n\t\t\treturn;\n\t\t}\n\n\t\tif(message.getVideoNote() != null)\n\t\t{\n\t\t\tvideoNoteMessage(message);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif(message.getVoice() != null)\n\t\t{\n\t\t\tvoiceMessage(message);\n\t\t\treturn;\n\t\t}\n\t\tif(message.getContact() != null)\n\t\t{\n\t\t\tcontactMessage(message);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif(message.getLocation() != null)\n\t\t{\n\t\t\tlocationMessage(message);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif(message.getVenue() != null)\n\t\t{\n\t\t\tvenueMessage(message);\n\t\t\treturn;\n\t\t}\n\n\t\tif (message.getDice() != null)\n\t\t{\n\t\t\tdiceMessage(message);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif(message.getNewChatMember() != null)\n\t\t{\n\t\t\tnewChatMemberMessage(message);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif(message.getNewChatMembers() != null)\n\t\t{\n\t\t\tnewChatMembersMessage(message);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif(message.getLeftChatMember() != null)\n\t\t{\n\t\t\tleftChatMemberMessage(message);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif(message.getPinned_message() != null)\n\t\t{\n\t\t\tpinnedMessage(message);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif(message.getNewChatTitle() != null)\n\t\t{\n\t\t\tnewChatTitleMessage(message);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif(message.getNewChatPhoto() != null)\n\t\t{\n\t\t\tnewChatPhotoMessage(message);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif(message.GetDeleteChatPhoto())\n\t\t{\n\t\t\tgroupChatPhotoDeleteMessage(message);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif(message.GetGroupChatCreated())\n\t\t{\n\t\t\tgroupChatCreatedMessage(message);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif(message.getGame() != null)\n\t\t{\n\t\t\tgameMessage(message);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif(message.getSuccessfulPayment() != null)\n\t\t{\n\t\t\tsuccessfulPaymentMessage(message);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif(message.getInvoice() != null)\n\t\t{\n\t\t\tinvoiceMessage(message);\n\t\t\treturn;\n\t\t}\n\t}",
"@Override\n public void handleMessage(Message msg) {\n switch (msg.what) {\n case Constants.MESSAGE_STATE_CHANGE:\n\n break;\n\n }\n }",
"public interface VoteHandler {\n\n /**\n * Handle the user's vote to alter the media's score\n *\n * @param vote User's vote\n */\n void handle(VoteMessage vote);\n\n}",
"public interface SendMessageListener {\n abstract void onSendOK(Message msg);\n\n abstract void onSendFailed(Message msg, String reason);\n}",
"void onNewMessage(String message);",
"@Override\n\tpublic void onMessage(Message m) {\n\t\t\t\ttry {\n\n\t\t\t\t\tTextMessage ms = (TextMessage) m;\n\n\t\t\t\t\tString linea = ms.getText();\n\n\t\t\t\t\tString args[] = linea.split(\" - \");\n\n\t\t\t\t\tif (args[0].equals(\"consulta2\")) {\n\t\t\t\t\t\t// Ver envios del usuario\n\t\t\t\t\t\tif (args[1].equals(\"1\")) {\t\t\t\t\t\n\t\t\t\t\t\t\t//registrarPedido(args[2], args[3], args[4], args[5]);\n\t\t\t\t\t\t}else if (args[1].equals(\"2\")) {\n\t\t\t\t\t\t\t//cambiarEstado(args[2], args[3]);\n\t\t\t\t\t\t}else if (args[1].equals(\"3\")) {\n\t\t\t\t\t\t\t//ArrayList<String> ejecuciones = consultarEjecucionDeEtapas(args[2], args[3], args[4]);\n\t\t\t\t\t\t\t//responderConEjecucionesDeEtapas(ejecuciones);\n\t\t\t\t\t\t}\n\t\t\t\t\t}else if (args[0].equals(\"respuesta2\")) {\n\t\t\t\t\t\t// Ver envios del usuario\n\n\t\t\t\t\t\tif ( args[1].equals(\"1\") || args[1].equals(\"2\") ) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}else if( args[1].equals(\"3\") ){\n\t\t\t\t\t\t\tString[] data = linea.substring( 16, ( linea.length() - 1 ) ).split(\"-\");\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tArrayList<String> ejec = new ArrayList<String>();\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tfor (int i = 0; i < data.length; i++) {\n\t\t\t\t\t\t\t\tString data0 = data[i];\n\t\t\t\t\t\t\t\tejec.add(data0);\n\t\t\t\t\t\t\t\t\n//\t\t\t\t\t\t\t\t//Numero del Pedido\n//\t\t\t\t\t\t\t\tString numPedido = data0[0];\n//\t\t\t\t\t\t\t\t//Codigo de la EstaciÛn\n//\t\t\t\t\t\t\t\tString codEstacion = data0[1];\n//\t\t\t\t\t\t\t\t//Numero de ejecuciones\n//\t\t\t\t\t\t\t\tString numEjecuciones = data0[2];\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} catch (Exception e) {\n\n\t\t\t\t}\n\t\t\t}",
"@Override\n\tpublic void handleMsg(String in) {\n\n\t}",
"@Override\n public void onSave(MessageContainer messages) {\n }",
"public void onMessage(Message message)\n {\n \tObjectMessage om = (ObjectMessage) message;\n\t\tTypeMessage mess;\n\t\ttry {\n\t\t\tmess = (TypeMessage) om.getObject();\n\t\t\tint id = om.getIntProperty(\"ID\");\n\t\t\tview.updatelistTweetFeed(mess, id);\n\t\t\tSystem.out.println(\"received: \" + mess.toString());\n\t\t} catch (JMSException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\t\n\t\t\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 }",
"@Headers({\n \"Content-Type:application/json\"\n })\n @PUT(\"chat/messages/{id}\")\n Call<Void> editChatMessage(\n @retrofit2.http.Path(\"id\") String id, @retrofit2.http.Body ChatMessageResource chatMessageResource\n );",
"public interface EditViewHandler<T extends DomainObject> extends Serializable {\n\t\n\t/**\n\t * Saves the data in the back-end.\n\t * \n\t * @param entity Object containing the data to be saved in the back-end\n\t * @param editMode Indicates whether the operation is an update or not\n\t * \n\t * @throws PersistenceException if the operation could not be processed in the back-end\n\t */\n\tvoid save(T entity, boolean editMode) throws PersistenceException;\n\t\n\t/**\n\t * Cancels the operation of either an record update or creation\n\t * \n\t * @param entity The entity being edited when the operation is cancelled.\n\t * @param editMode Indicates whether the operation is an update or creation\n\t */\n\tvoid cancel(T entity, boolean editMode);\n\t\n\t/**\n\t * Defines the view to be managed and presented by the view handler.\n\t * \n\t * @param view The view to present data processed by the handler\n\t */\n\tvoid setView(PopupView<T> view);\n\t\n\t/**\n\t * Registers a handler to track changes performed in a given entity. \n\t * \n\t * @param changeListener The object to be defined as the change handler\n\t */\n\tvoid setChangeListener(EntityChangeListener<T> changeListener);\n}",
"public interface EditUserHandler extends EventHandler {\n void onEditUser(EditUser event);\n}",
"void onMessageReceived(Message message);",
"public void save() {\n if (message == null || currentView == null) {\n return;\n }\n\n if (isEditable) {\n if (currentView.hasChanged()) {\n currentView.save();\n }\n }\n }",
"@Override\n\tpublic void editExchange() {\n\t\t\n\t}",
"@Override\n\t\t\tpublic void handleMessage(android.os.Message msg) {\n\t\t\t\tsuper.handleMessage(msg);\n\n\t\t\t\tswitch (msg.what) {\n\t\t\t\tcase HandleConfig.GETROOMINFO:// 获取room详情,并且1分钟更新一次\n\t\t\t\t\tdismissProcessDialog();\n\t\t\t\t\tNetEntry entry = decodePointList(msg.getData().getString(\n\t\t\t\t\t\t\t\"data\"));\n\t\t\t\t\tif (NetEntry.CODESUCESS.equals(entry.status)) {\n\t\t\t\t\t\tupdteRoomInfo(msg.getData().getString(\"data\"));\n\n\t\t\t\t\t} else {\n\t\t\t\t\t\tshowToastError(entry.msg);\n\t\t\t\t\t}\n\t\t\t\t\tandroid.os.Message mg = android.os.Message.obtain();\n\t\t\t\t\tmg.what = HandleConfig.REFRESHROOMINFO;\n\t\t\t\t\tmHandler.sendMessageDelayed(mg, 10000);\n\n\t\t\t\t\tbreak;\n\t\t\t\tcase HandleConfig.REFRESHROOMINFO:\n\t\t\t\t\tif(isFinishing()==false){\n\t\t\t\t\t\tgetroominfo(roomid);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase HandleConfig.QUERYROOMUSERS:// 更新room user list\n\n\t\t\t\t\tNetEntry entry1 = decodePointList(msg.getData().getString(\n\t\t\t\t\t\t\t\"data\"));\n\n\t\t\t\t\tif (NetEntry.CODESUCESS.equals(entry1.status)) {\n\t\t\t\t\t\tJSONObject jsonobj;\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tjsonobj = new JSONObject(msg.getData().getString(\n\t\t\t\t\t\t\t\t\t\"data\"));\n\n\t\t\t\t\t\t\tJSONObject tmp = jsonobj.getJSONObject(\"data\");\n\t\t\t\t\t\t\tJSONArray tmpList = tmp.getJSONArray(\"list\");\n\t\t\t\t\t\t\tperson.clear();\n\t\t\t\t\t\t\tfor (int i = 0; i < tmpList.length(); i++) {\n\t\t\t\t\t\t\t\tJSONObject t = tmpList.getJSONObject(i);\n\t\t\t\t\t\t\t\tString phone = t.getString(\"phone\");\n\t\t\t\t\t\t\t\tString id = t.getString(\"id\");\n\t\t\t\t\t\t\t\tString name = t.getString(\"name\");\n\t\t\t\t\t\t\t\tString headpic = t.getString(\"headpic\");\n\t\t\t\t\t\t\t\tif (phone.equals(owner.phone)) {// 房主\n\t\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tMessagePerson p = new MessagePerson();\n\t\t\t\t\t\t\t\tp.id = id;\n\t\t\t\t\t\t\t\tp.name=name;\n\t\t\t\t\t\t\t\tp.pic = headpic;\n\t\t\t\t\t\t\t\tp.phone = phone;\n\t\t\t\t\t\t\t\tperson.add(p);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tbigWindow.UpdateRoomPerson(person);\n\t\t\t\t\t\t} catch (JSONException e) {\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t}\n\n\t\t\t\t\t} else {\n\t\t\t\t\t\tshowToastError(entry1.msg);\n\t\t\t\t\t}\n\n\t\t\t\t\tbreak;\n\t\t\t\tcase 3:\n\t\t\t\t\tshowToastError(\"聊天室链接失败\");\n\t\t\t\tcase 4:\n\t\t\t\t\tdismissProcessDialog();\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}",
"public void handleOppoMessage(Message msg, int whichHandler) {\n warn(\"handleOppoMessage\");\n }",
"void onAction(TwitchUser sender, TwitchMessage message);",
"@Override\n public void onMessageReceived(@NotNull MessageReceivedEvent event) {\n // Ignore messages from myself\n if (event.getAuthor().getIdLong() == ID.SELF)\n return;\n\n // Whenever a message is sent in the announcements channel, the timer must be reset\n if (event.getChannel().getIdLong() == Setting.ANNOUNCEMENT_CHANNEL)\n Announcements.resetTimer();\n\n if (isMentioned(event))\n return;\n\n if (EventUtils.ignoreChannel(event.getChannel()))\n return;\n\n if (checkDadBot(event))\n return;\n\n if(checkSurveyLink(event))\n return;\n\n if (event.getMessage().getContentRaw().equalsIgnoreCase(Setting.PREFIX + \"help\"))\n event.getMessage().reply(\"This command is \\\"depreciated\\\" in favor of the new `/help` command. \" +\n \"Please use that command instead of this one.\").queue();\n }",
"public void handle(int ID, Object message){}",
"@Override\n public void onMessageReceived(MessageReceivedEvent event) {\n if(event.getAuthor().isBot())\n return;\n\n Message msg = event.getMessage();\n String content = msg.getContentRaw();\n\n if(content.charAt(0) == PREFIX) {\n handleCommand(msg, content.substring(1));\n }\n }",
"@Override\n public void onMessageReceived(List<EMMessage> messages) {\n for (EMMessage message : messages) {\n String username = null;\n // group message\n if (message.getChatType() == ChatType.GroupChat || message.getChatType() == ChatType.ChatRoom) {\n username = message.getTo();\n } else {\n // single chat message\n username = message.getFrom();\n }\n // if the message is for current conversation\n if (username.equals(toChatUsername) || message.getTo().equals(toChatUsername) || message.conversationId().equals(toChatUsername)) {\n messageList.refreshSelectLast();\n EaseUI.getInstance().getNotifier().vibrateAndPlayTone(message);\n conversation.markMessageAsRead(message.getMsgId());\n } else {\n EaseUI.getInstance().getNotifier().onNewMsg(message);\n }\n }\n }",
"public interface EdittextListener {\n void onQuery(String s);\n\n void onClear();\n\n void onContentChange(String s);\n}",
"public void onEditParticipant() {\n Participant participant = outputParticipants.getSelectionModel().getSelectedItem();\n\n if (participant == null) {\n AlertHelper.showError(LanguageKey.ERROR_PARTICIPANT_NULL, null);\n return;\n }\n\n ParticipantDialog participantDialog = ParticipantDialog.getNewInstance(participant);\n if (participantDialog == null) {\n // Exception already handled\n return;\n }\n Optional<Participant> result = participantDialog.showAndWait();\n if (!result.isPresent()) {\n return;\n }\n\n if (controller.editParticipant(result.get())) {\n return;\n }\n\n AlertHelper.showError(LanguageKey.ERROR_PARTICIPANT_EDIT, null);\n }",
"protected abstract Entity getEditedEntity();",
"@Override\n public MessageWrapper[] onMsgReceive(MSGGameVote msg, Player sender) {\n Lobby lobby = playerLobbyMap.get(sender);\n lobby.getGameSession().addVote(msg.isAccepted(), msg.getOrient());\n\n if (lobby.getGameSession().allVoted()) {\n // all players voted, move onto next player\n Player prevPlayer = lobby.getGameSession().getCurrentTurn();\n lobby.getGameSession().nextTurn(false);\n\n Message msgNextTurn = new MSGNewTurn(\n prevPlayer,\n lobby.getGameSession().getCurrentTurn(),\n lobby.getGameSession().getScores().get(prevPlayer),\n false);\n\n // if board is full, end the game\n if (lobby.getGameSession().isBoardFull()) {\n Message msgEndGame = new MSGGameStatus(MSGGameStatus.GameStatus.ENDED, null);\n\n // TODO: Better structure protocol\n // send additional message to end game\n return MessageWrapper.prepWraps(\n new MessageWrapper(msgNextTurn, lobby.getPlayers()),\n new MessageWrapper(msgEndGame, lobby.getPlayers()));\n } else {\n return MessageWrapper.prepWraps(\n new MessageWrapper(msgNextTurn, lobby.getPlayers()));\n }\n }\n\n return null;\n }",
"@Override\n public void handleMessage(Message message) {\n stopProgressDialog();\n swipeRefreshLayout.setRefreshing(false);\n switch (message.what) {\n case Flinnt.SUCCESS:\n try {\n //Helper.showToast(\"Success\", Toast.LENGTH_SHORT);\n if (LogWriter.isValidLevel(Log.INFO))\n LogWriter.write(\"SUCCESS_RESPONSE : \" + message.obj.toString());\n if (message.obj instanceof WishResponse) {\n updateCourseList((WishResponse) message.obj);\n }\n } catch (Exception e) {\n LogWriter.err(e);\n }\n\n break;\n case Flinnt.FAILURE:\n try {\n if (LogWriter.isValidLevel(Log.INFO))\n LogWriter.write(\"FAILURE_RESPONSE : \" + message.obj.toString());\n } catch (Exception e) {\n LogWriter.err(e);\n }\n\n break;\n default:\n super.handleMessage(message);\n }\n }",
"public interface OnMessageReceived {\n public void messageReceived(String message);\n }",
"public interface MessageUpdateCallbacks {\n /**\n * The operation caused the message's UID to change\n * @param message The message for which the UID changed\n * @param newUid The new UID for the message\n */\n public void onMessageUidChange(Message message, String newUid) throws MessagingException;\n\n /**\n * The operation could not be completed because the message doesn't exist\n * (for example, it was already deleted from the server side.)\n * @param message The message that does not exist\n * @throws MessagingException\n */\n public void onMessageNotFound(Message message) throws MessagingException;\n }",
"public void handleMessageAction(ActionEvent event) {\n if (action.getSelectedToggle() == sendMessage){\n sendPane.setVisible(true);\n reviewPane.setVisible(false);\n }\n else{ //action.getSelectedToggle() == reviewMessage\n sendPane.setVisible(false);\n reviewPane.setVisible(true);\n\n StringBuilder builder = new StringBuilder();\n\n for ( String i : messageController.getMessageForMe(this.sender)){\n builder.append(i).append(\"\\n\");\n }\n this.inbox.setText(String.valueOf(builder));\n\n }\n }",
"public abstract void onTextReceived(String message);",
"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 }",
"@OnClick(R.id.enter_chat1)\n public void sendMessage() {\n if (getView() == null) {\n return;\n }\n EditText editText = getView().findViewById(R.id.chat_edit_text1);\n sendMessageBackend(editText.getText().toString(), utils.getChatUser());\n updateListAdapter();\n editText.setText(\"\");\n }",
"@Override\n\tpublic void enteradoCambioMensaje(EventObject event) {\n\t\tList<MensajeWhatsApp> newMsgs = ((MensajeEvent) event).getNewMensajes();\n\t\tList<MensajeWhatsApp> oldMsgs = ((MensajeEvent) event).getOldMensajes();\n\t\t// Makes no sense to identify the contact as the person's actual name!\n\t\tif (!newMsgs.equals(oldMsgs)) {\n\t\t\tOptional<MensajeWhatsApp> WAmsg = newMsgs.stream()\n\t\t\t\t\t.filter(msg -> !msg.getAutor().equals(currentUser.getName())).findFirst();\n\t\t\tif (WAmsg != null) {\n\t\t\t\tString contactName = WAmsg.get().getAutor();\n\t\t\t\tOptional<Contacto> contact = currentUser.getContacts().stream()\n\t\t\t\t\t\t.filter(c -> c.getName().equals(contactName)).findFirst();\n\t\t\t\tif (contact.isPresent()) {\n\t\t\t\t\tnewMsgs.stream().forEach(msg -> {\n\t\t\t\t\t\tint speakerId = 0;\n\t\t\t\t\t\tif (msg.getAutor().equals(currentUser.getName()))\n\t\t\t\t\t\t\tspeakerId = currentUser.getId();\n\t\t\t\t\t\telse if (msg.getAutor().equals(contactName))\n\t\t\t\t\t\t\tspeakerId = contact.get().getId();\n\t\t\t\t\t\tif (speakerId != 0) {\n\t\t\t\t\t\t\taddMessage(msg.getTexto(), 0, contact.get());\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}",
"@Override\n public void update(Observable o, Object arg) {\n if(arg instanceof Message) {\n\n // Unpack Message\n MessageType type = ((Message) arg).getMessageType();\n int cardAffected = ((Message) arg).getCardAffected();\n\n // Handle Message\n if(type == MessageType.NEW_GAME_B_RANDOM_R_RANDOM) {\n startNewGame(true, true);\n }\n if(type == MessageType.NEW_GAME_B_NEXT_R_NEXT) {\n startNewGame(false, false);\n\n }\n if(type == MessageType.NEW_GAME_B_NEXT_R_RANDOM) {\n startNewGame(false, true);\n\n }\n if(type == MessageType.NEW_GAME_B_RANDOM_R_NEXT) {\n startNewGame(true, false);\n\n }\n if(type == MessageType.SELECT) {\n\n // Get Card object\n Card card = mGameBoard.getCard(cardAffected);\n\n // Check if Card is already revealed\n if(!card.isRevealed()) {\n\n // Flush Undo stack\n mUndoStack.clear();\n\n // Push Message onto Message stack\n mMessageStack.push(new Message(type, cardAffected));\n\n // Add Message to Message log\n mMessageLog.add(new Message(type, cardAffected));\n\n // Reveal Card (will notify Observer)\n card.revealCard();\n }\n // Otherwise do nothing\n }\n if(type == MessageType.NEXT) {\n \t\n \tString hint;\n\n // Flush Undo Stack\n mUndoStack.clear();\n \n // Tell Strategy to generate a hint\n if (mGameBoard.getCurrentTurn())\n {\n hint = Strategy.generateHint(mGameBoard.getBoard(), CardType.BLUE);\n }\n else\n {\n hint = Strategy.generateHint(mGameBoard.getBoard(), CardType.RED);\n }\n \n mOutbox.updateHint(hint);\n \n // Generate an ArrayList of Cards based on the hint\n Strategy.getHintedCards(mGameBoard.getBoard()); //ROB CODE\n\n // Check which strategy to use for the list of applicable cards\n String wordOfCardAffected;\n if(mGameBoard.getCurrentTurn()) {\n if(mBlueRandom) {\n \twordOfCardAffected = Strategy.pickRandomCard(Strategy.storedHintedCards); //ROB CODE - changed mGameBoard.getBoard() to Strategy.storedHintedCards\n }\n else {\n \twordOfCardAffected = Strategy.pickNextCard(Strategy.storedHintedCards); //ROB CODE - changed mGameBoard.getBoard() to Strategy.storedHintedCards\n }\n }\n else {\n if(mRedRandom) {\n \twordOfCardAffected = Strategy.pickRandomCard(Strategy.storedHintedCards); //ROB CODE - changed mGameBoard.getBoard() to Strategy.storedHintedCards\n }\n else {\n \twordOfCardAffected = Strategy.pickNextCard(Strategy.storedHintedCards); //ROB CODE - changed mGameBoard.getBoard() to Strategy.storedHintedCards\n }\n }\n \n //ROB CODE\n //Convert wordOfCardAffected to cardAffected for below\n if (wordOfCardAffected != Strategy.NULL_CARD_ERROR)\n {\n \tcardAffected = mGameBoard.getCardIndexOfCodeword(wordOfCardAffected);\n }\n else\n {\n \tcardAffected = -1;\n }\n //END ROB CODE\n\n // Check if Card was selected (-1 mean no more cards)\n if (cardAffected != -1) {\n // Get Card Object\n Card card = mGameBoard.getCard(cardAffected);\n\n // Flush Undo Stack\n mUndoStack.clear();\n\n // Push Message onto Message stack\n mMessageStack.push(new Message(type, cardAffected));\n\n // Add Message to Message log\n mMessageLog.add(new Message(type, cardAffected));\n\n // Reveal Card (will notify Observer)\n card.revealCard();\n }\n else {\n // Do nothing\n }\n }\n if(type == MessageType.UNDO) {\n\n if (!mMessageStack.isEmpty()) {\n // Get last Message off Message stack\n Message undoMessage = mMessageStack.pop();\n\n // Unpack Message\n MessageType undoType = undoMessage.getMessageType();\n int undoCardAffected = undoMessage.getCardAffected();\n\n // Get Card object\n Card undoCard = mGameBoard.getCard(undoCardAffected);\n\n // Push the Undo onto the Undo stack\n mUndoStack.push(new Message(undoType, undoCardAffected));\n\n // Add Message to Message log\n mMessageLog.add(new Message(undoType, undoCardAffected));\n\n // Hide Card (will notify Observer)\n undoCard.hideCard();\n }\n }\n if(type == MessageType.REDO) {\n\n if (!mUndoStack.isEmpty()) {\n // Get last Message off Undo stack\n Message redoMessage = mUndoStack.pop();\n\n // Unpack Message\n MessageType redoType = redoMessage.getMessageType();\n int redoCardAffected = redoMessage.getCardAffected();\n\n // Get Card object\n Card redoCard = mGameBoard.getCard(redoCardAffected);\n\n // Push the Redo onto the Message stack\n mMessageStack.push(new Message(redoType, redoCardAffected));\n\n // Add Message to Message log\n mMessageLog.add(new Message(redoType, redoCardAffected));\n\n // Reveal Card (will notify Observer)\n redoCard.revealCard();\n }\n }\n }\n }",
"public boolean onEditorAction(TextView view, int actionId, KeyEvent event) {\n if (Send_btn && actionId == EditorInfo.IME_NULL && event.getAction() == KeyEvent.ACTION_UP) {\n String message = view.getText().toString();\n Bundle bundle=new Bundle();\n bundle.putString(EXTRAS_ADVERTISE_DATA, message);\n mCallback.onSendMessage(bundle);\n //對話框上顯示\n mConversationArrayAdapter.add(\"Me: \" + message);\n //設定為不可發送 清除訊息文字編輯區\n Send_btn=false;\n mSendButton.setEnabled(Send_btn);\n mOutStringBuffer.setLength(0);\n mOutEditText.setText(mOutStringBuffer);\n\n }\n return true;\n }",
"public void processMessage()\n {\n \tif(messageContents.getMessage().containsCommand())\n {\n \tCommand command = new Command(messageContents);\n CommandProcessor commandProcessor = new CommandProcessor(joeBot, command);\n commandProcessor.processCommand();\n }\n else\n {\n Speech speech = new Speech(messageContents);\n SpeechProcessor speechProcessor = new SpeechProcessor(joeBot, speech);\n speechProcessor.processSpeech();\n }\n }",
"private void HandleMessage(Message message)\n\t{\n\t\tswitch (message.messageType) {\n\t\tcase disconnect: ApplicationManager.Instance().Disconnect();\n\t\t\tbreak;\n\t\tcase log: PrintLogMessageOnTextChat((String)message.message);\n\t\t\tbreak;\n\t\tcase message: PrintMessageOnTextChat((MessageWithTime)message.message);\n\t\t\tbreak;\n\t\tcase UserJoinChannel: UserJoinChannel((ClientData)message.message);\n\t\t\tbreak;\n\t\tcase UserDisconnectChannel: UserDisconnectChannel((ClientData)message.message);\n\t\t\tbreak;\n\t\tcase changeChannel: OnChannelChanged((ChannelData)message.message);\n\t\t\tbreak;\n\t\tcase serverData: data = (ServerData) message.message; \n\t\t\t\t\t\t ApplicationManager.channelsList.DrawChannels(data);\n\t\t\t\tbreak;\n\t\tcase channelInfo: clientsData = (ClientsOnChannelData)message.message;\n\t\t\t\t\t\t ApplicationManager.informationsList.ShowInfo(clientsData);\n\t\t \t\tbreak;\n\t\tcase sendMessageToUser: ApplicationManager.textChat.write((MessageToUser)message.message);\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tbreak;\n\t\t}\n\t}",
"public interface IMessageLog {\n\n /**\n * Add a spam message\n * \n * @param msg Chat message\n */\n void addOneToOneSpamMessage(ChatMessage msg);\n\n /**\n * Add a chat message\n * \n * @param msg Chat message\n * @param imdnDisplayedRequested IMDN display report requested\n */\n void addIncomingOneToOneChatMessage(ChatMessage msg, boolean imdnDisplayedRequested);\n\n /**\n * Add a chat message\n * \n * @param msg Chat message\n * @param status Message status\n * @param reasonCode Status reason code\n * @param deliveryExpiration TODO\n */\n void addOutgoingOneToOneChatMessage(ChatMessage msg, Status status, ReasonCode reasonCode,\n long deliveryExpiration);\n\n /**\n * Add an incoming group chat message\n * \n * @param chatId Chat ID\n * @param msg Chat message\n * @param imdnDisplayedRequested IMDN display report requested\n */\n void addIncomingGroupChatMessage(String chatId, ChatMessage msg, boolean imdnDisplayedRequested);\n\n /**\n * Add an outgoing group chat message\n * \n * @param chatId Chat ID\n * @param msg Chat message\n * @param recipients the set of recipients\n * @param status Message status\n * @param reasonCode Status reason code\n */\n void addOutgoingGroupChatMessage(String chatId, ChatMessage msg, Set<ContactId> recipients,\n Status status, ReasonCode reasonCode);\n\n /**\n * Add group chat system message\n * \n * @param chatId Chat ID\n * @param contact Contact ID\n * @param status Status\n * @param timestamp Local timestamp when got group chat notification\n * @return the message ID created for the group chat system event\n */\n String addGroupChatEvent(String chatId, ContactId contact, GroupChatEvent.Status status,\n long timestamp);\n\n /**\n * Update chat message read status\n * \n * @param msgId message ID\n * @param timestampDisplayed Displayed time\n * @return the number of rows affected.\n */\n int markMessageAsRead(String msgId, long timestampDisplayed);\n\n /**\n * Set chat message status and reason code. Note that this method should not be used for\n * Status.DELIVERED and Status.DISPLAYED. These states require timestamps and should be set\n * through setChatMessageStatusDelivered and setChatMessageStatusDisplayed respectively.\n * \n * @param msgId message ID\n * @param status Message status (See restriction above)\n * @param reasonCode Message status reason code\n * @return True if an entry was updated, otherwise false\n */\n boolean setChatMessageStatusAndReasonCode(String msgId, Status status, ReasonCode reasonCode);\n\n /**\n * Check if the message is already persisted in db\n * \n * @param msgId message ID\n * @return true if the message already exists in db\n */\n boolean isMessagePersisted(String msgId);\n\n /**\n * Check if the message is read by remote contact\n * \n * @param msgId message ID\n * @return true if read, false if unread and null if record is not found\n */\n Boolean isMessageRead(String msgId);\n\n /**\n * Returns the timestamp_sent of a message\n * \n * @param msgId message ID\n * @return timestamp_sent\n */\n Long getMessageSentTimestamp(String msgId);\n\n /**\n * Returns the timestamp of a message\n * \n * @param msgId message ID\n * @return timestamp\n */\n Long getMessageTimestamp(String msgId);\n\n /**\n * Get message state from its unique ID\n * \n * @param msgId message ID\n * @return State\n */\n Status getMessageStatus(String msgId);\n\n /**\n * Get message reason code from its unique ID\n * \n * @param msgId message ID\n * @return reason code of the state\n */\n ReasonCode getMessageReasonCode(String msgId);\n\n /**\n * Get message MIME-type from its unique ID\n * \n * @param msgId message ID\n * @return MIME-type\n */\n String getMessageMimeType(String msgId);\n\n /**\n * Get message data from its unique ID\n * \n * @param msgId message ID\n * @return Cursor or null if no data exists\n */\n Cursor getChatMessageData(String msgId);\n\n /**\n * Get all one-to-one chat messages for specific contact that are in queued state in ascending\n * order of timestamp\n * \n * @param contact Contact ID\n * @return Cursor\n */\n Cursor getQueuedOneToOneChatMessages(ContactId contact);\n\n /**\n * Gets group chat events per contacts for chat ID\n * \n * @param chatId Chat ID\n * @return group chat events for contacts or null if there is no group chat events\n */\n Map<ContactId, GroupChatEvent.Status> getGroupChatEvents(String chatId);\n\n /**\n * Returns true if the chat id and contact are same for this message id.\n * \n * @param messageId the message id\n * @return true if the message belongs to one to one conversation\n */\n boolean isOneToOneChatMessage(String messageId);\n\n /**\n * Set chat message delivered\n * \n * @param msgId message ID\n * @param timestampDelivered Delivered time\n * @return True if an entry was updated, otherwise false\n */\n boolean setChatMessageStatusDelivered(String msgId, long timestampDelivered);\n\n /**\n * Set chat message displayed\n * \n * @param msgId message ID\n * @param timestampDisplayed Displayed time\n * @return True if an entry was updated, otherwise false\n */\n boolean setChatMessageStatusDisplayed(String msgId, long timestampDisplayed);\n\n /**\n * Marks undelivered chat messages to indicate that messages have been processed.\n * \n * @param msgIds List of message IDs\n */\n void clearMessageDeliveryExpiration(List<String> msgIds);\n\n /**\n * Set message delivery expired for specified message id.\n * \n * @param msgId message ID\n * @return True if an entry was updated, otherwise false\n */\n boolean setChatMessageDeliveryExpired(String msgId);\n\n /**\n * Get one-one chat messages with unexpired delivery\n * \n * @return Cursor\n */\n Cursor getUndeliveredOneToOneChatMessages();\n\n /**\n * Returns true if delivery for this chat message has expired or false otherwise. Note: false\n * means either that delivery for this chat message has not yet expired, delivery has been\n * successful, delivery expiration has been cleared (see clearMessageDeliveryExpiration) or that\n * this particular chat message is not eligible for delivery expiration in the first place.\n * \n * @param msgId message ID\n * @return boolean\n */\n Boolean isChatMessageExpiredDelivery(String msgId);\n\n /**\n * Get chat id for chat message\n * \n * @param msgId message ID\n * @return ChatId\n */\n String getMessageChatId(String msgId);\n\n /**\n * Set chat message status and sent timestamp for outgoing messages\n * \n * @param msgId message ID\n * @param status Message status\n * @param reasonCode Message status reason code\n * @param timestamp New local timestamp\n * @param timestampSent New timestamp sent in payload\n * @return boolean\n */\n boolean setChatMessageStatusAndTimestamp(String msgId, Status status, ReasonCode reasonCode,\n long timestamp, long timestampSent);\n\n /**\n * Add a one to one chat message for which delivery report has failed\n * \n * @param msg Chat message\n */\n void addOneToOneFailedDeliveryMessage(ChatMessage msg);\n\n /**\n * Add a group chat message for which delivery report has failed\n * \n * @param chatId the chat ID\n * @param msg Chat message\n */\n void addGroupChatFailedDeliveryMessage(String chatId, ChatMessage msg);\n}",
"@Override\n public void react(@NotNull ClientConnection client) throws IOException {\n String[] params = message.getHeader().split(\" \");\n if( params.length != getMessagesSize || client.getClientID() == null )\n return ;\n int roomID = Integer.parseInt(params[1]);\n List<String> messages = UserRequests.getMessagesFromRoom(roomID, nMessage);\n if (messages == null) return;\n assert client.getStreamMessage() != null;\n client.getStreamMessage().write(\n new Message(getMessagesType + \" \" + roomID, messages));\n }",
"public interface GroupChatView {\n void enterText();\n void appendMsg(String chatName, String chatMessage, String chatTime, String chatDate);\n}",
"public interface OnMessageReceived {\n void messageReceived(String message);\n }",
"public interface IMessage {\n\n public Long getId();\n\n public void setId(Long id);\n\n public Date getDate();\n\n public void setDate(Date date);\n\n public String getText();\n\n public void setText(String tex);\n}",
"@Override\n public void handleMessage(ACLMessage message) {\n try {\n onMessage(message);\n } catch (Exception e) {\n e.getMessage();\n }\n }",
"public interface MPFCallback {\n // TODO: Update argument type and name\n void editMyPost(Post post);\n\n void deleteMyPost(Post post);\n }",
"@RequestMapping(value = \"/edit.json\", method = RequestMethod.PUT)\n\t@ResponseBody\n\tpublic ResultDto edit( HttpServletRequest request,\n\t\t\tHttpServletResponse reponse, @RequestBody String message) {\n\t\tObjectMapper mapper = new ObjectMapper();\n\t\ttry {\n\t\t\tUser user = mapper.readValue(message, User.class);\n\t\t\tif(user.getRoleid()==null){\n\t\t\t\treturn new ResultDto(Constant.NACK, \"The role is null \", null);\n\t\t\t}\n\t\t\tif(user.getRoleid()==1 && user.getClientids().size()<=0){\n\t\t\t\treturn new ResultDto(Constant.NACK, \"The clientids is null \", null);\n\t\t\t}\n\t\t\tuserService.editById(user);\n\t\t\treponse.setStatus(Constant.HTTP_OK);\n\t\t\treturn new ResultDto(Constant.ACK, Constant.SUCCEED, null);\n\t\t} catch (IOException e) {\n\t\t\treponse.setStatus(Constant.SERVER_ERROR);\n\t\t\tlogger.error(e.toString());\n\t\t\treturn new ResultDto(Constant.NACK, \"edit parameter error \", null);\n\t\t} catch (SQLException e) {\n\t\t\treponse.setStatus(Constant.SERVER_ERROR);\n\t\t\tlogger.error(e.toString());\n\t\t\treturn new ResultDto(Constant.NACK, \"edit sql error \", null);\n\t\t}\n\t}",
"public synchronized void handle(int ID, Object input) {\r\n\t\tif(input instanceof String){\r\n\t\t\tSystem.out.println(\"New Message Recieved: \" + input);\r\n\t\t}else{\r\n\t\t\tSystem.out.println(\"New Message Recieved: \" + input.getClass().toString());\r\n\t\t}\r\n\t\tthis.controller.handle(ID, input);\r\n\t}",
"@Override\n\t\t\tpublic void handleMessage(Message msg) {\n\n\t\t\t\tsuper.handleMessage(msg);\n\t\t\t\tswitch (msg.what) {\n\t\t\t\tcase GlobalConstants.MSG_AVCOMMENT_MAIN_INIT_DATA:\n\t\t\t\t\tList<AvComment> tmpList=(List<AvComment>)msg.obj;\n\t\t\t\t\tfor (int i = 0; i < tmpList.size(); i++) {\n\t\t\t\t\t\tcommentAdapter.getList().add(tmpList.get(i));\n\t\t\t\t\t}\n\t\t\t\t\tif (progressDialog.isShowing())\n\t\t\t\t\t\tprogressDialog.dismiss();\n\t\t\t\t\tfootView.setVisibility(View.GONE);\n\t\t\t\t\tinitAvInfoComment();\n\t\t\t\t\tloadingDataFlag = false;\n\t\t\t\t\tbreak;\n\t\t\t\tcase GlobalConstants.MSG_AVCOMMENT_MAIN_INIT_COVER:\n\t\t\t\t\tinitAvInfoComment();\n\t\t\t\t\tbreak;\n\t\t\t\tcase GlobalConstants.MSG_AVCOMMENT_MAIN_UPDATE_LIST:\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}",
"@Override\n public void onEvent(EMNotifierEvent event) {\n message = (EMMessage) event.getData();\n messageBean.setGetMsgCode(MessageContant.receiveMsgByListChanged);\n messageBean.setEmMessage(message);\n\n eventBus.post(messageBean);\n }",
"public void updateInbox(ConversationObject c) {\n Log.e(\"New MessageActivity coming in\", c.toString());\n secretkey2 = (EditText) findViewById(R.id.secretkey);\n String secretkey = secretkey2.getText().toString();\n try {\n if(c.getBody().toString().contains(\"issa secret\") && c.getAddress().equals(number) || c.getAddress().equals(\"+1\"+ number)) {\n // convert the encrypted String message body to a byte\n // array\n String EncryptedMessage = c.getBody().toString().replace(\"issa secret\", \"\");\n byte[] msg = hex2byte(EncryptedMessage.getBytes());\n // decrypt the byte array\n byte[] result = decryptSMS(secretkey, msg);\n String DecryptedMessage = new String(result);\n //just formatting the decrypted message\n if (DecryptedMessage.contains(\"Sent: \")) {\n DecryptedMessage = DecryptedMessage.replace(\"Sent: \", \"\");\n }\n ConversationObject c1 = new ConversationObject(\"\", DecryptedMessage, c.getAddress(),0);\n convo.add(c1);\n adapter.notifyDataSetChanged();\n Log.e(\"HEEEELLLOOOO\", c1.toString());\n }else if(!c.getBody().toString().contains(\"issa secret\") && (c.getAddress().equals(number) || c.getAddress().equals(\"+1\"+ number))) {\n convo.add(c);\n adapter.notifyDataSetChanged();\n }\n listView.smoothScrollToPosition(convo.size()-1);\n } catch (Exception e) {\n // in the case of message corrupted or invalid key\n // decryption cannot be carried out\n convo.add(c);\n adapter.notifyDataSetChanged();\n Log.e(\"catch\", \"\" + e);\n }\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 }",
"public void OnMessageReceived(String msg);",
"@Override\n public void handleMessage(Message msg) {\n Bundle data = msg.getData();\n if (data.containsKey(\"command\")) {\n if (data.getString(\"command\").equalsIgnoreCase(\"get_data\")) {\n mGetDataMessenger = msg.replyTo;\n getData();\n }\n }\n }"
] |
[
"0.71790266",
"0.655698",
"0.6079811",
"0.60527563",
"0.5984171",
"0.59487253",
"0.5914935",
"0.591089",
"0.5883321",
"0.5844047",
"0.5838295",
"0.5824034",
"0.5805945",
"0.5786835",
"0.5781655",
"0.57716864",
"0.57687384",
"0.57609653",
"0.57560635",
"0.5733018",
"0.5724299",
"0.57207024",
"0.5717872",
"0.56758714",
"0.5669704",
"0.56684554",
"0.5658306",
"0.5651079",
"0.5642219",
"0.5625264",
"0.5619805",
"0.5613313",
"0.56023705",
"0.5587777",
"0.5570636",
"0.55653906",
"0.55591637",
"0.5557695",
"0.5545621",
"0.5537821",
"0.5527747",
"0.5527465",
"0.54986477",
"0.5476757",
"0.54605484",
"0.54477453",
"0.54447246",
"0.5442643",
"0.5440194",
"0.5436913",
"0.54218835",
"0.54085386",
"0.54050285",
"0.54014754",
"0.54010606",
"0.53933537",
"0.53865653",
"0.5381038",
"0.537735",
"0.53769064",
"0.536563",
"0.53648853",
"0.5364032",
"0.53587794",
"0.5343757",
"0.5341979",
"0.5334013",
"0.5329728",
"0.53265625",
"0.53260934",
"0.5320797",
"0.5317206",
"0.5316167",
"0.5310514",
"0.5301581",
"0.529816",
"0.529027",
"0.52899295",
"0.5287369",
"0.52833754",
"0.52830607",
"0.52803916",
"0.5279965",
"0.5277266",
"0.5276089",
"0.5274661",
"0.52727145",
"0.52700067",
"0.5269629",
"0.52652735",
"0.52549136",
"0.5253603",
"0.5253451",
"0.5249038",
"0.52457196",
"0.5244737",
"0.5235935",
"0.52273923",
"0.5225268",
"0.5223333"
] |
0.6954491
|
1
|
Handles an incoming message edit.
|
void onMessageEdit(Message message, long editDate) throws Throwable;
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"boolean editMessage(int roomId, long messageId, String updatedMessage) throws RoomNotFoundException, RoomPermissionException, IOException;",
"public void sendEditTest( MessageReceivedEvent event ) {\n\n final StringBuilder message = new StringBuilder();\n message.append( \"!poll edit 00000 text test \\n\" ); //Change the text for the poll. PASS\n\n message.append( \"!poll edit 00000 OpeNtIMe \\\"06-09-2012\\\" \\n\" ); //Test open time change. FAIL\n message.append( \"!poll edit 00000 OPENTIME \\\"12:00pm\\\" \\n\" ); //Test open time change. FAIL\n message.append( \"!poll edit 00000 openTIME \\\"null\\\" \\n\" ); //Test open time change. FAIL\n message.append( \"!poll edit 00000 opentime \\\"11-11-2019 04:20pm\\\" \\n\" ); //Test open time change. PASS\n\n message.append( \"!poll edit 00000 closeTIME \\\"06-09-2019 04:20am\\\" \\n\" ); //Test close time before open. PASS\n message.append( \"!poll edit 00000 closetime \\\"06-09-2012\\\" \\n\" ); //Test open time change. FAIL\n message.append( \"!poll edit 00000 CLOSETIME \\\"12:00pm\\\" \\n\" ); //Test open time change. FAIL\n message.append( \"!poll edit 00000 cLoSeTiMe \\\"null\\\" \\n\" ); //Test open time change. FAIL\n message.append( \"!poll edit 00000 CLOSEtime \\\"06-09-2020 04:20am\\\" \\n\" ); //Test open time change. PASS\n\n message.append( \"!poll edit 00000 option 1 \\\"New First\\\" \\n\" ); //Edit first option. Else option will be \"Option A\".\n message.append( \"!poll vote 00000 1 \\n\" ); //This vote should be reset.\n message.append( \"!poll edit 00000 option 2 \\\"New Second\\\" \\n\" ); //Edit second option. Else option will be \"Option B\".\n message.append( \"!poll edit 00000 option add \\\"Third Option\\\" \\n\" ); //Add third option.\n message.append( \"!poll edit 00000 option 4 \\\"This should fail\\\" \\n\" ); //If this options appears. You did it wrong.\n message.append( \"!poll edit 00000 text test \\n\" ); //Change the text for the poll.\n message.append( \"!poll edit 00000 text \\\"\\\" \\n\" ); //Change the text for the poll.\n\n message.append(\"-----\");\n event.getChannel().sendMessage( message ).queue();\n }",
"@Override\n public void handleMessage(Message message) {}",
"@Override\r\n public void handleMessage(Message msg) {\n }",
"public void handleMessageAction(ActionEvent event) {\n if (action.getSelectedToggle() == sendMessage){\n sendPane.setVisible(true);\n reviewPane.setVisible(false);\n }\n else{ //action.getSelectedToggle() == reviewMessage\n sendPane.setVisible(false);\n reviewPane.setVisible(true);\n\n StringBuilder builder = new StringBuilder();\n\n for ( String i : messageController.getMessageForMe(this.sender)){\n builder.append(i).append(\"\\n\");\n }\n this.inbox.setText(String.valueOf(builder));\n\n }\n }",
"public void handleMessage(EBMessage message) {\n\t\tif (message instanceof PropertiesChanged) {\n\t\t\tView[] openViews = jEdit.getViews();\n\t\t\tfor (int i = 0; i < openViews.length; i++) {\n\t\t\t\tTypoScriptSiteBrowser browser = (TypoScriptSiteBrowser)openViews[i].getDockableWindowManager().getDockable(\"typoscriptsitebrowser\");\n\t\t\t\tif (browser != null) {\n\t\t\t\t\tbrowser.checkForPossibleSitesUpdate();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (message instanceof BufferUpdate) {\n\t\t\tBufferUpdate bu = (BufferUpdate)message;\n\t\t\tif (bu.getWhat() == BufferUpdate.LOADED) {\n\t\t\t\tBuffer buf = bu.getBuffer();\n\t\t\t\tVFS vfs = buf.getVFS();\n\t\t\t\tif (vfs instanceof TypoScriptVFS) {\n\t\t\t\t\tMode mode = jEdit.getMode(\"typoscript\");\n\t\t\t\t\tif (mode == null) {\n\t\t\t\t\t\tloadModeManually();\n\t\t\t\t\t}\n\t\t\t\t\tmode = jEdit.getMode(\"typoscript\");\n\t\t\t\t\tif (mode != null) {\n\t\t\t\t\t\tbuf.setMode(mode);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tLog.log(Log.ERROR, TypoScriptPlugin.instance, \"Failed to manually load mode!\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"protected void handleMessage(Message msg) {}",
"@Override\r\n\tpublic void handleMessageFromServer(Object msg) {\r\n\t\tMessage currMsg = (Message) msg;\r\n\t\tswitch (currMsg.getAction()) \r\n\t\t{\r\n\t\tcase EDIT_USER_DETAILS:\r\n\t\t\tif ((Integer) currMsg.getData().get(0) == 0) \r\n\t\t\t\tJOptionPane.showMessageDialog(null, \"All the changes have been saved succesfully\", \"Notification\",\r\n\t\t\t\t\t\tJOptionPane.INFORMATION_MESSAGE);\r\n\t\t\telse \r\n\t\t\t\tJOptionPane.showMessageDialog(null, (currMsg.getData().get(1)).toString(), \"Error\",\r\n\t\t\t\t\t\tJOptionPane.WARNING_MESSAGE);\r\n\t\tbreak;\r\n\t\tcase GET_USER_PURCHASES:\r\n\t\t\tif ((Integer) currMsg.getData().get(0) == 0) \r\n\t\t\t{\r\n\t\t \tArrayList<Purchase> purchases = (ArrayList<Purchase>) currMsg.getData().get(1);\r\n\t\t\t\tObservableList<Purchase> currPurchasesList = FXCollections.observableArrayList(purchases);\r\n\t\t\t\tsetTableViewForPurchases(currPurchasesList);\r\n\t\t\t}\r\n\t\t\telse \r\n\t\t\t\tJOptionPane.showMessageDialog(null, (currMsg.getData().get(1)).toString(), \"Error\",\r\n\t\t\t\t\t\tJOptionPane.WARNING_MESSAGE);\r\n\t\tbreak;\r\n\t\tcase RENEW:\r\n\t\t\tif ((Integer) currMsg.getData().get(0) == 0) \r\n\t\t\t{\r\n\t\t \tArrayList<Purchase> purchases = (ArrayList<Purchase>) currMsg.getData().get(1);\r\n\t\t\t\tObservableList<Purchase> currPurchasesList = FXCollections.observableArrayList(purchases);\r\n\t\t\t\tsetTableViewForPurchases(currPurchasesList);\r\n\t\t\t\tJOptionPane.showMessageDialog(null,\"Automated certificate renewal has succeeded.\\nYou've got a 10% discount!\", \"Notification\",\r\n\t\t\t\t\t\tJOptionPane.INFORMATION_MESSAGE);\r\n\t\t\t}\r\n\t\t\telse \r\n\t\t\t\tJOptionPane.showMessageDialog(null, (currMsg.getData().get(1)).toString(), \"Error\",\r\n\t\t\t\t\t\tJOptionPane.WARNING_MESSAGE);\r\n\t\tbreak;\r\n\t\tcase DOWNLOAD_PURCHASE:\r\n\t\t\tif ((Integer) currMsg.getData().get(0) == 0) {\r\n\t\t\t\t\tPlatform.runLater(() -> {\r\n\t\t\t\t\t\tDirectoryChooser directoryChooser = new DirectoryChooser ();\r\n\t\t\t\t\t\tdirectoryChooser.setTitle(\"Save To Folder\");\r\n\t\t\t\t\t\tFile file = directoryChooser.showDialog(MainGUI.MainStage);\r\n\t\t\t\t\t\tServices.writeCityToFile((City) (currMsg.getData().get(1)), file.getAbsolutePath());\r\n\t\t\t\t\t});\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tJOptionPane.showMessageDialog(null, (currMsg.getData().get(1)).toString(), \"Error\",\r\n\t\t\t\t\t\tJOptionPane.WARNING_MESSAGE);\r\n\t\t\t}\r\n\t\tbreak;\r\n\t\tdefault:\r\n\t\t}\r\n\t}",
"@FunctionalInterface\npublic interface MessageEditHandler extends UpdateHandler {\n \n /**\n * Handles an incoming message edit.\n *\n * @param message new incoming edit\n * @param editDate the date of the edit\n * @throws Throwable if a throwable is thrown\n */\n void onMessageEdit(Message message, long editDate) throws Throwable;\n \n @Override\n default void onUpdate(Update update) throws Throwable {\n if (update instanceof EditedMessageUpdate) {\n Message message = ((EditedMessageUpdate) update).getMessage();\n onMessageEdit(message, message.getEditDate().getAsLong());\n }\n }\n \n}",
"public MessageEdit(Display display, Displayable pView, Contact to, String body) {\r\n t = new TextBox(to.toString(), \"\", 500, TextField.ANY);\r\n try {\r\n //expanding buffer as much as possible\r\n maxSize = t.setMaxSize(4096); //must not trow\r\n \r\n } catch (Exception e) {}\r\n \r\n insert(body, 0); // workaround for Nokia S40\r\n this.to=to;\r\n this.display=display;\r\n \r\n cf=Config.getInstance();\r\n //#ifdef DETRANSLIT\r\n //# DeTranslit.getInstance();\r\n //#endif\r\n \r\n if (!cf.swapSendAndSuspend) {\r\n cmdSuspend=new Command(SR.MS_SUSPEND, Command.BACK, 90);\r\n cmdSend=new Command(SR.MS_SEND, Command.OK, 1);\r\n } else {\r\n cmdSuspend=new Command(SR.MS_SUSPEND, Command.OK, 1);\r\n cmdSend=new Command(SR.MS_SEND, Command.BACK, 90);\r\n }\r\n //#ifdef ARCHIVE\r\n //#ifdef PLUGINS\r\n //# if (StaticData.getInstance().Archive)\r\n //#endif\r\n t.addCommand(cmdPaste);\r\n //#endif\r\n //#ifdef CLIPBOARD\r\n //# if (cf.useClipBoard) {\r\n //# clipboard=ClipBoard.getInstance();\r\n //# if (!clipboard.isEmpty()) {\r\n //# t.addCommand(cmdPasteText);\r\n //# }\r\n //# }\r\n //#endif\r\n //#if TEMPLATES\r\n //#ifdef PLUGINS\r\n //# if (StaticData.getInstance().Archive)\r\n //#endif\r\n //# t.addCommand(cmdTemplate);\r\n //#endif\r\n \r\n t.addCommand(cmdSend);\r\n t.addCommand(cmdInsMe);\r\n //#ifdef SMILES\r\n t.addCommand(cmdSmile);\r\n //#endif\r\n if (to.origin>=Contact.ORIGIN_GROUPCHAT)\r\n t.addCommand(cmdInsNick);\r\n //#ifdef DETRANSLIT\r\n //# t.addCommand(cmdSendInTranslit);\r\n //# t.addCommand(cmdSendInDeTranslit);\r\n //#endif\r\n t.addCommand(cmdSuspend);\r\n t.addCommand(cmdCancel);\r\n \r\n if (to.origin==Contact.ORIGIN_GROUPCHAT)\r\n t.addCommand(cmdSubj);\r\n \r\n if (to.lastSendedMessage!=null)\r\n t.addCommand(cmdLastMessage); \r\n //#ifdef RUNNING_MESSAGE\r\n //# if (cf.notifyWhenMessageType == 1) {\r\n //# t.setTicker(ticker);\r\n //# } else {\r\n //# t.setTicker(null);\r\n //# }\r\n //# if (thread==null) (thread=new Thread(this)).start() ; // composing\r\n //#else\r\n send() ; // composing\r\n //#endif\r\n setInitialCaps(cf.capsState);\r\n if (Config.getInstance().phoneManufacturer == Config.SONYE) System.gc(); // prevent flickering on Sony Ericcsson C510\r\n t.setCommandListener(this);\r\n display.setCurrent(t); \r\n this.parentView=pView;\r\n }",
"@Override\n\t\t\tpublic void handleMessage(Message msg) {\n\t\t\t\tsuper.handleMessage(msg);\n\t\t\t\tswitch(msg.what){\n\t\t\t\tcase COMMENT_OK:\n\t\t\t\t\tString[] operatStatus = (String[]) msg.obj;\n\t\t\t\t\tif (\"1\".equals(operatStatus[0])) {\n\t\t\t\t\t\tinputView.setText(\"\");\n\t\t\t\t\t\tToast.makeText(mContext,\"发布成功\", Toast.LENGTH_SHORT)\n\t\t\t\t\t\t\t\t.show();\n\t\t\t\t\t\tif(post_comment_list!=null){\n\t\t\t\t\t\t\tpost_comment_list.refresh();\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tToast.makeText(mContext, \"发布失败\", Toast.LENGTH_SHORT)\n\t\t\t\t\t\t\t\t.show();\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase WeibaBaseHelper.DATA_ERROR:\n\t\t\t\t\tToast.makeText(mContext, \"数据加载失败\", Toast.LENGTH_SHORT)\n\t\t\t\t\t\t\t.show();\n\t\t\t\t\tbreak;\n\t\t\t\tcase WeibaBaseHelper.NET_ERROR:\n\t\t\t\t\tToast.makeText(mContext, \"网络故障\", Toast.LENGTH_SHORT).show();\n\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\t}\n\t\t\t}",
"public void onEditParticipant() {\n Participant participant = outputParticipants.getSelectionModel().getSelectedItem();\n\n if (participant == null) {\n AlertHelper.showError(LanguageKey.ERROR_PARTICIPANT_NULL, null);\n return;\n }\n\n ParticipantDialog participantDialog = ParticipantDialog.getNewInstance(participant);\n if (participantDialog == null) {\n // Exception already handled\n return;\n }\n Optional<Participant> result = participantDialog.showAndWait();\n if (!result.isPresent()) {\n return;\n }\n\n if (controller.editParticipant(result.get())) {\n return;\n }\n\n AlertHelper.showError(LanguageKey.ERROR_PARTICIPANT_EDIT, null);\n }",
"private void handleMessage(EcologyMessage msg) {\n // Check the message type and route them accordingly.\n switch ((Integer) msg.fetchArgument()) {\n // A message destined for a room\n case ROOM_MESSAGE_ID:\n forwardRoomMessage(msg);\n break;\n\n // A message destined for ecology data sync\n case SYNC_DATA_MESSAGE_ID:\n getEcologyDataSync().onMessage(msg);\n break;\n }\n }",
"@FXML\n\tprivate void handleEdit() {\n\t\tCustomer customer = customerTable.getSelectionModel().getSelectedItem();\n\t\tshowCustomerInfoDialog(customer);\n\t}",
"@Override\n public void updateView(Message msg)\n {\n \n }",
"@Override\n public void handleEditStart ()\n {\n\n }",
"public void handleMessage(Message message);",
"@Override\n\tpublic void handleMsg(String in) {\n\n\t}",
"@Override\n\tpublic void editExchange() {\n\t\t\n\t}",
"public void save() {\n if (message == null || currentView == null) {\n return;\n }\n\n if (isEditable) {\n if (currentView.hasChanged()) {\n currentView.save();\n }\n }\n }",
"public synchronized void handle(int ID, Object input) {\r\n\t\tif(input instanceof String){\r\n\t\t\tSystem.out.println(\"New Message Recieved: \" + input);\r\n\t\t}else{\r\n\t\t\tSystem.out.println(\"New Message Recieved: \" + input.getClass().toString());\r\n\t\t}\r\n\t\tthis.controller.handle(ID, input);\r\n\t}",
"@RequestMapping(value = \"/edit.json\", method = RequestMethod.PUT)\n\t@ResponseBody\n\tpublic ResultDto edit( HttpServletRequest request,\n\t\t\tHttpServletResponse reponse, @RequestBody String message) {\n\t\tObjectMapper mapper = new ObjectMapper();\n\t\ttry {\n\t\t\tUser user = mapper.readValue(message, User.class);\n\t\t\tif(user.getRoleid()==null){\n\t\t\t\treturn new ResultDto(Constant.NACK, \"The role is null \", null);\n\t\t\t}\n\t\t\tif(user.getRoleid()==1 && user.getClientids().size()<=0){\n\t\t\t\treturn new ResultDto(Constant.NACK, \"The clientids is null \", null);\n\t\t\t}\n\t\t\tuserService.editById(user);\n\t\t\treponse.setStatus(Constant.HTTP_OK);\n\t\t\treturn new ResultDto(Constant.ACK, Constant.SUCCEED, null);\n\t\t} catch (IOException e) {\n\t\t\treponse.setStatus(Constant.SERVER_ERROR);\n\t\t\tlogger.error(e.toString());\n\t\t\treturn new ResultDto(Constant.NACK, \"edit parameter error \", null);\n\t\t} catch (SQLException e) {\n\t\t\treponse.setStatus(Constant.SERVER_ERROR);\n\t\t\tlogger.error(e.toString());\n\t\t\treturn new ResultDto(Constant.NACK, \"edit sql error \", null);\n\t\t}\n\t}",
"@Override\n public void handleMessage(Message msg) {\n switch (msg.what) {\n case Constants.MESSAGE_STATE_CHANGE:\n\n break;\n\n }\n }",
"@Override\r\n public void handleMessage(Message inputMessage) {\n actualMainActivityInstance.putDataOnPage((String)inputMessage.obj);\r\n }",
"private void HandleMessage(Message message)\n\t{\n\t\tswitch (message.messageType) {\n\t\tcase disconnect: ApplicationManager.Instance().Disconnect();\n\t\t\tbreak;\n\t\tcase log: PrintLogMessageOnTextChat((String)message.message);\n\t\t\tbreak;\n\t\tcase message: PrintMessageOnTextChat((MessageWithTime)message.message);\n\t\t\tbreak;\n\t\tcase UserJoinChannel: UserJoinChannel((ClientData)message.message);\n\t\t\tbreak;\n\t\tcase UserDisconnectChannel: UserDisconnectChannel((ClientData)message.message);\n\t\t\tbreak;\n\t\tcase changeChannel: OnChannelChanged((ChannelData)message.message);\n\t\t\tbreak;\n\t\tcase serverData: data = (ServerData) message.message; \n\t\t\t\t\t\t ApplicationManager.channelsList.DrawChannels(data);\n\t\t\t\tbreak;\n\t\tcase channelInfo: clientsData = (ClientsOnChannelData)message.message;\n\t\t\t\t\t\t ApplicationManager.informationsList.ShowInfo(clientsData);\n\t\t \t\tbreak;\n\t\tcase sendMessageToUser: ApplicationManager.textChat.write((MessageToUser)message.message);\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tbreak;\n\t\t}\n\t}",
"private void edit() {\n\n\t}",
"@Override\n\t\tpublic void handleMessage(Message msg) {\n\t\t\tsuper.handleMessage(msg);\n\t\t\tswitch (msg.what) {\n\t\t\tcase 0:\n\t\t\t\ttv_read.setText(msg.obj.toString());\n\t\t\t\tToast.makeText(N20PINPadControllerActivity.this, \"recv\",\n\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}",
"@Override\n\tpublic void editAction(int id) {\n\t\t\n\t}",
"public void edit(RequestBean request) {\n\t\t\r\n\t}",
"public void handleMessage(Message msg) {\n \t\t\tif (msg.what < 0) {\n \t\t\t\tMyOrder.getFlaovorFromSetting();\n \t\t\t} else {\n \t\t\t\tMyOrder.saveFlavorToSetting();\n \t\t\t}\n \t\t}",
"public void handle(int ID, Object message){}",
"@Override\n\t\t\tpublic void handleMessage(Message msg)\n\t\t\t{\n\t\t\t\tString data = (String) msg.obj;\n\t\t\t\tfinal TextView textView;\n\t\t\t\tfinal StringBuffer buffer;\n\t\t\t\tfinal ScrollView scrollView;\n\t\t\t\tfinal AutoCompleteTextView autoCompleteText;\n\t\t\t\tRunnable scrollPost = null;\n\t\t\t\tint delayTime = 0;\n\t\t\t\t\n\t\t\t\t// Set view pointer\n\t\t\t\tif (msg.what == VIEW_ID_COMMAND)\n\t\t\t\t{\n\t\t\t\t\ttextView = mCommandView;\n\t\t\t\t\tbuffer = mCommandBuffer;\n\t\t\t\t\tscrollView = mCommandScrollView;\n\t\t\t\t\tscrollPost = mCommandScrollPost;\n\t\t\t\t\tif ((mUpdateCount % 20) == 0)\n\t\t\t\t\t{\n\t\t\t\t\t\tdelayTime = 0;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tdelayTime = 1000;\n\t\t\t\t\t}\n\t\t\t\t\tmUpdateCount++;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\ttextView = mKeyView;\n\t\t\t\t\tbuffer = mKeyBuffer;\n\t\t\t\t\tscrollView = mKeyScrollView;\n\t\t\t\t\tscrollPost = mKeyScrollPost;\n\t\t\t\t\tdelayTime = 0;\n\t\t\t\t}\n\n\t\t\t\tif (mTabHost.getCurrentTab() == VIEW_ID_COMMAND)\n\t\t\t\t{\n\t\t\t\t\tautoCompleteText = mCommandInputView;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tautoCompleteText = mKeyInputView;\n\t\t\t\t}\n\n\t\t\t\t\n\t\t\t\t// Update data\n\t\t\t\tbuffer.append(data);\n\t\t\t\tif (buffer.length() > 5000)\n\t\t\t\t{\n\t\t\t\t\tbuffer.delete(0, buffer.length() - 5000);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tremoveCallbacks(scrollPost);\n\n\t\t\t\t// Reduce update frequency\n\t\t\t\tscrollPost = new Runnable() \n\t\t\t\t{\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void run() \n\t\t\t\t\t{\n\t\t\t\t\t\ttextView.setText(buffer);\n\t\t\t\t\t\t\n\t\t\t\t\t\tpostDelayed(new Runnable()\n\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{\n\t\t\t\t\t\t\t\tscrollView.fullScroll(View.FOCUS_DOWN);\n\t\t\t\t\t\t\t\tautoCompleteText.requestFocus();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}, 200);\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t\t\n\t\t\t\tif (msg.what == VIEW_ID_COMMAND)\n\t\t\t\t{\n\t\t\t\t\tmCommandScrollPost = scrollPost;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tmKeyScrollPost = scrollPost;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tpostDelayed(scrollPost, delayTime);\n\t\t\t}",
"@Override\r\n\tpublic void edit() {\n\t\t\r\n\t}",
"@Override\n public void handleMessage(ACLMessage message) {\n try {\n onMessage(message);\n } catch (Exception e) {\n e.getMessage();\n }\n }",
"public boolean onEditorAction(TextView view, int actionId, KeyEvent event) {\n if (Send_btn && actionId == EditorInfo.IME_NULL && event.getAction() == KeyEvent.ACTION_UP) {\n String message = view.getText().toString();\n Bundle bundle=new Bundle();\n bundle.putString(EXTRAS_ADVERTISE_DATA, message);\n mCallback.onSendMessage(bundle);\n //對話框上顯示\n mConversationArrayAdapter.add(\"Me: \" + message);\n //設定為不可發送 清除訊息文字編輯區\n Send_btn=false;\n mSendButton.setEnabled(Send_btn);\n mOutStringBuffer.setLength(0);\n mOutEditText.setText(mOutStringBuffer);\n\n }\n return true;\n }",
"public Message handleRequest(Message request){\n\n Message error = new Message(Message.GENERIC_ERROR);\n\n switch (request.getId()){\n\n case Message.LOGIN:\n return handleLogin(request);\n case Message.CREATE_DOCUMENT:\n return handleCreate(request);\n case Message.REMOVE_INVITE:\n controlServer.removeInvite(request.getUserName(),request.getDocumentName());\n return request;\n case Message.PORTIONS:\n System.out.println(\"HANDLER pre-handle: \" +request.getDocumentName());\n request.setSectionNumbers(controlServer.getPortions(request.getDocumentName()));\n return request;\n case Message.ADMINS:\n Message response = new Message(Message.ADMINS);\n response.setStringVector(new Vector<>(controlServer.getAdmins(request.getDocumentName())));\n return response;\n case Message.USERS:\n request.setStringVector(controlServer.getUserNames());\n return request;\n case Message.INVITATION:\n controlServer.addAdmin(request.getDocumentName(),request.getReceiver());\n controlServer.addInvite(request.getReceiver(),request.getDocumentName());\n request.setId(Message.INVITE_SENT);\n return request;\n case Message.GET_INVITES:\n String owner = request.getUserName();\n request.setStringVector(controlServer.getUserData(owner).getInvites());\n return request;\n case Message.GET_USERDATA:\n return handleGetUserData(request);\n case Message.LOCK:\n if(!controlServer.lock(request.getDocumentName(),request.getSectionNumbers()))\n request.setId(Message.LOCK_NOK);\n else\n request.setId(Message.LOCK_OK);\n return request;\n case Message.UNLOCK:\n if(controlServer.unlock(request.getDocumentName(),request.getSectionNumbers()))\n request.setId(Message.UNLOCK_OK);\n return request;\n case Message.EDIT:\n String DocumentName = request.getDocumentName();\n int SectionNumbers = request.getSectionNumbers();\n request.setText(controlServer.getSection(DocumentName,SectionNumbers));\n return request;\n case Message.END_EDIT:\n controlServer.editDoc(request.getDocumentName(),request.getSectionNumbers(),request.getText());\n return request;\n case Message.PRINT:\n request.setText(controlServer.getDocumentString(request.getDocumentName()));\n return request;\n case Message.SHOW:\n String text = controlServer.getSection(request.getDocumentName(),request.getSectionNumbers());\n request.setText(text);\n return request;\n default:\n controlServer.showMessage(\"unknown request\");\n break;\n }return error;\n }",
"@Override\n public void handleMessage(Message message) {\n super.handleMessage(message);\n\n ImportKeysActivity.this.handleMessage(message);\n }",
"@FXML\n void handleEdit(ActionEvent event) {\n if (checkFields()) {\n\n try {\n //create a pseudo new environment with the changes but same id\n Environment newEnvironment = new Environment(oldEnvironment.getId(), editTxtName.getText(), editTxtDesc.getText(), editClrColor.getValue());\n\n //edit the oldenvironment\n Environment.edit(oldEnvironment, newEnvironment);\n } catch (SQLException exception) {\n //failed to save a environment, IO with database failed\n Manager.alertException(\n resources.getString(\"error\"),\n resources.getString(\"error.10\"),\n this.dialogStage,\n exception\n );\n }\n //close the stage\n dialogStage.close();\n } else {\n //fields are not filled valid\n Manager.alertWarning(\n resources.getString(\"add.invalid\"),\n resources.getString(\"add.invalid\"),\n resources.getString(\"add.invalid.content\"),\n this.dialogStage);\n }\n Bookmark.refreshBookmarksResultsProperty();\n }",
"protected void doEdit (RenderRequest request,\n\t\t RenderResponse response)\n throws PortletException, java.io.IOException\n {\n throw new PortletException(\"doEdit method not implemented\");\n }",
"private View.OnClickListener HandleEdit() {\n return v -> {\n //Change the application state to edit mode\n mMainActivityState.ChangeActivityMode(Mode.EDIT);\n //Close the current dialog\n mCurrentDialog.dismiss();\n };\n }",
"@Override\n\t\t\tpublic void handleMessage(Message msg) {\n\t\t\t\tsuper.handleMessage(msg);\n\t\t\t\tString temp;\n\t\t\t\tswitch (msg.what) {\n\t\t\t\tcase MSG_SHOW_RESULT:\n\t\t\t\t\t temp = (String) msg.obj;\n\t\t\t\t\t Reader.writelog(temp,tvResult);\n\t\t\t\t\t break;\n\t\t\t\tcase MSG_SHOW_INFO:\n\t\t\t\t\t temp = (String) msg.obj;\n\t\t\t\t\treadContent.setText(temp);\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}",
"public void editHandler(View v) {\n LinearLayout vwParentRow = (LinearLayout)v.getParent();\n TextView id =(TextView) vwParentRow.findViewById(R.id._id);\n Intent intent = new Intent(Hates.this, Formulario.class);\n\n intent.putExtra(C_MODO, C_EDITAR);\n intent.putExtra(C_TIPO, love_hate);\n intent.putExtra(mDbHelper.ID, Long.valueOf((String)id.getText()));\n\n\n this.startActivityForResult(intent, C_EDITAR);\n }",
"public void edit_actionPerformed(ActionEvent e) {\n\t\t\n\t\tif (edit.isSelected()) {\n\t\t\t\n\t\t\teditor.validate();\n\t\t\teditor.repaint();\n\t\t\t\n\t\t\t//Reset edit components values\n\t\t\tresetEdit();\n\t\t\t\n\t\t\t//Configure editor panel\n\t\t\tinitEditorPanel();\n\t\t\t\n\t\t\tmyParent.editCM = true;\n\t\t\tmyParent.extendCM = false;\n\t\t\tmyParent.mullionsPanel.selectedHV = 0;\n\n //Setting type action event\n myParent.setActionTypeEvent(MenuActionEventDraw.EDIT_COUPLER_MULLION.getValue());\n\t\t\t\n\t\t\tvC.setSelected(false);\n\t\t\thC.setSelected(false);\n\t\t\tvC.setEnabled(false);\n\t\t\thC.setEnabled(false);\n\t\t\t\n\t\t\tcouplerTypeC.setEnabled(false);\n\t\t\t\n\t\t\tedit.setEnabled(false);\n\t\t\tcancel.setVisible(true);\n\t\t\tcancel.setEnabled(true);\n\t\t\tthis.enableDisableBySeries();\n\t\t\t\n\t\t\twhichFeature.validate();\n\t\t\twhichFeature.repaint();\n\t\t}\n\t}",
"@Override\n public void handleMessage(Message msg) {\n switch (msg.what) {\n case EVENT_VOICEMAIL_CHANGED:\n handleSetVMMessage((AsyncResult) msg.obj);\n break;\n default:\n // TODO: should never reach this, may want to throw exception\n }\n }",
"@Override\n public void onClick(View v){\n EditText newMessageView=(EditText) findViewById(R.id.new_message);\n String newMessageView1 = newMessageView.getText().toString();\n newMessageView.setText(\"\");\n com.arunya.aarunya.Message msg = new com.arunya.aarunya.Message();\n msg.setmDate(new Date());\n msg.setmText(\"newMessage\");\n msg.setmSender(\"Raj\");\n\n MessageDataSource.saveMessage(msg,mConvoId); /*fetches message from edit text add to the message object */\n\n\n\n }",
"@FXML\n\tprivate void handleEditProducts() {\n\t\tboolean okClicked = showProducts();\n\t\tsaveCurrentAcknowledgment();\n\t\tsetAcknowledgment(acknowledgment);\n\t}",
"public void handleMessageEvent(StunMessageEvent e) {\n delegate.processRequest(e);\n }",
"@Override\n\t\t\tpublic void handleMessage(Message msg) {\n\t\t\t\tsuper.handleMessage(msg);\n\t\t\t\tswitch (msg.what) {\n\t\t\t\tcase EventManager.EventType_VoteChange:\n\t\t\t\tcase EventManager.EventType_SurveyChange:\n\t\t\t\t\tif(mDateArray == null || mDateArray.length() == 0){\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tfor(int i = 0; i < mDateArray.length(); i++){\n\t\t\t\t\t\tJSONObject obj = mDateArray.optJSONObject(i);\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tif(obj.optString(\"id\").equalsIgnoreCase((String) ((Object[])msg.obj)[0])){\n\t\t\t\t\t\t\t\tobj.put(\"favoriteStatus\", \"6\");\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\t// TODO: handle exception\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif(mListViewAdapter != null){\n\t\t\t\t\t\tmListViewAdapter.notifyDataSetChanged();\n\t\t\t\t\t}\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}",
"@Override\n public void handleMessage(Message msg) {\n super.handleMessage(msg);\n if(msg.what==1)\n {\n savePhone();\n }\n }",
"public void run()\r\n {\r\n \tsynchronized(Ipoki.this)\r\n \t{\r\n \t\t_messageToSend = _messageEdit.getText();\r\n \t}\r\n MessageScreen.this.close();\r\n }",
"@Override\n public void onMessageReceived(MessageEvent messageEvent) {\n Log.d(\"T\", \"in PhoneListenerService, got: \" + messageEvent.getPath());\n //use the 'path' field in sendmessage to differentiate use cases\n\n /* Following sends intent to RepView, but is unused. Add resources from phone for RepView to use */\n\n if( messageEvent.getPath().equalsIgnoreCase( LIST ) ) {\n String value = new String(messageEvent.getData(), StandardCharsets.UTF_8);\n Intent intent = new Intent(this, EditListsActivity.class );\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 //Log.d(\"T\", \"about to start watch RepresentativeView with LOCATION_TYPE: District\");\n startActivity(intent);\n } else {\n super.onMessageReceived( messageEvent );\n }\n\n }",
"private void handleEditingException(@NonNull MwException caught) {\n String code = caught.getTitle();\n if (AccountUtil.isLoggedIn() && (\"badtoken\".equals(code) || \"assertuserfailed\".equals(code))) {\n getEditTokenThenSave(true);\n } else if (\"blocked\".equals(code) || \"wikimedia-globalblocking-ipblocked\".equals(code)) {\n // User is blocked, locally or globally\n // If they were anon, canedit does not catch this, so we can't show them the locked pencil\n // If they not anon, this means they were blocked in the interim between opening the edit\n // window and clicking save. Less common, but might as well handle it\n progressDialog.dismiss();\n AlertDialog.Builder builder = new AlertDialog.Builder(EditSectionActivity.this);\n builder.setTitle(R.string.user_blocked_from_editing_title);\n if (AccountUtil.isLoggedIn()) {\n builder.setMessage(R.string.user_logged_in_blocked_from_editing);\n builder.setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n dialogInterface.dismiss();\n }\n });\n } else {\n builder.setMessage(R.string.user_anon_blocked_from_editing);\n builder.setPositiveButton(R.string.nav_item_login, new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n dialogInterface.dismiss();\n Intent loginIntent = LoginActivity.newIntent(EditSectionActivity.this,\n LoginFunnel.SOURCE_BLOCKED);\n startActivity(loginIntent);\n }\n });\n builder.setNegativeButton(android.R.string.cancel, new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n dialogInterface.dismiss();\n }\n });\n }\n builder.show();\n } else {\n progressDialog.dismiss();\n showError(caught);\n }\n }",
"void onIssueEditedEvent(T event);",
"@Override\n public void handleMessage(Message msg) {\n Bundle data = msg.getData();\n if (data.containsKey(\"command\")) {\n if (data.getString(\"command\").equalsIgnoreCase(\"get_data\")) {\n mGetDataMessenger = msg.replyTo;\n getData();\n }\n }\n }",
"@Override\n\tprotected ModelAndView handleRequestInternal(HttpServletRequest arg0, HttpServletResponse arg1) throws Exception {\n\t\tModelAndView model = new ModelAndView(\"contact\");\n\t\tmodel.addObject(\"command\", getMsg());\n\n\t\treturn model;\n\t}",
"@Override\n public void actionPerformed(ActionEvent e) {\n chat.receiveMessage();\n }",
"public abstract void update(Message message);",
"public void handleMessage(Msg clientMsg) {\n switch (clientMsg.getMsgType()) {\n case ID_IS_SET:\n handle_id_is_set(clientMsg);\n break;\n\n case SHIPS_PLACED:\n handle_ships_placed(clientMsg);\n break;\n\n case WAITING:\n break;\n\n case SHOT_PERFORMED:\n handle_shot_performed(clientMsg);\n break;\n }\n }",
"@Override\n\t\tpublic void handleMessage(Message msg) {\n\t\t\tsuper.handleMessage(msg);\n\t\t\tswitch(msg.what){\n\t\t\t\tcase SHOW_UPDATE_DIALOG:\n\t\t\t\t\tToast.makeText(getApplicationContext(), \"准备升级中\", Toast.LENGTH_LONG).show();\n\t\t\t\t\tupdate();\n\t\t\t\t\tbreak;\n\t\t\t\tcase NET_ERROR:\n\t\t\t\t\tToast.makeText(getApplicationContext(), \"网络异常\", Toast.LENGTH_LONG).show();\n\t\t\t\t\tgoHome();\n\t\t\t\t\tbreak;\n\t\t\t\tcase JSON_ERROR:\n\t\t\t\t\tToast.makeText(getApplicationContext(), \"JSON解析出错\", Toast.LENGTH_LONG).show();\n\t\t\t\t\tbreak;\n\t\t\t\tcase URL_ERROR:\n\t\t\t\t\tToast.makeText(getApplicationContext(), \"URL出错\", Toast.LENGTH_LONG).show();\n\t\t\t\t\tbreak;\n\t\t\t\tdefault :\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t}\n\t\t}",
"@Override\n\tpublic void enteradoCambioMensaje(EventObject event) {\n\t\tList<MensajeWhatsApp> newMsgs = ((MensajeEvent) event).getNewMensajes();\n\t\tList<MensajeWhatsApp> oldMsgs = ((MensajeEvent) event).getOldMensajes();\n\t\t// Makes no sense to identify the contact as the person's actual name!\n\t\tif (!newMsgs.equals(oldMsgs)) {\n\t\t\tOptional<MensajeWhatsApp> WAmsg = newMsgs.stream()\n\t\t\t\t\t.filter(msg -> !msg.getAutor().equals(currentUser.getName())).findFirst();\n\t\t\tif (WAmsg != null) {\n\t\t\t\tString contactName = WAmsg.get().getAutor();\n\t\t\t\tOptional<Contacto> contact = currentUser.getContacts().stream()\n\t\t\t\t\t\t.filter(c -> c.getName().equals(contactName)).findFirst();\n\t\t\t\tif (contact.isPresent()) {\n\t\t\t\t\tnewMsgs.stream().forEach(msg -> {\n\t\t\t\t\t\tint speakerId = 0;\n\t\t\t\t\t\tif (msg.getAutor().equals(currentUser.getName()))\n\t\t\t\t\t\t\tspeakerId = currentUser.getId();\n\t\t\t\t\t\telse if (msg.getAutor().equals(contactName))\n\t\t\t\t\t\t\tspeakerId = contact.get().getId();\n\t\t\t\t\t\tif (speakerId != 0) {\n\t\t\t\t\t\t\taddMessage(msg.getTexto(), 0, contact.get());\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}",
"public void actionPerformed(ActionEvent e) {\n\n if (inputField.getText().trim().length() == 0) {\n return;\n }\n try {\n\n String input = inputField.getText();\n \n inputField.setText(\"\");\n clientMessage = new Message(getName(), Message.ALL, input, Message.DATA);\n clientMessage.setID(manager.getNextMessageID());\n //JOptionPane.showMessageDialog(null, input);\n //JOptionPane.showMessageDialog(null, clientMessage.getContent());\n sendMessage(clientMessage);\n\n } catch (IOException err) {\n System.err.println(err.getMessage());\n err.printStackTrace();\n }\n }",
"private void messageHandler(String read){\n\n try {\n buffer.append(read);\n }catch (MalformedMessageException e){\n System.out.println(\"[CLIENT] The message received is not in XML format.\");\n }\n\n while(!buffer.isEmpty()) {\n if (buffer.getPong()) pong = true;\n else if (buffer.getPing()) send(\"<pong/>\");\n else {\n try {\n clientController.onReceivedMessage(buffer.get());\n } catch (EmptyBufferException e) {\n System.out.println(\"[CLIENT] The buffer is empty!\");\n }\n }\n }\n\n }",
"public final void manageMessage(Message message)\n\t{\n\t\tif(message.getText() != null)\n\t\t{\n\t\t\ttextMessage(message);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif(message.getAudio() != null)\n\t\t{\n\t\t\taudioMessage(message);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif(message.getDocument() != null)\n\t\t{\n\t\t\tdocumentMessage(message);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif(message.getPhoto() != null)\n\t\t{\n\t\t\tphotoMessage(message);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif(message.getSticker() != null)\n\t\t{\n\t\t\tstickerMessage(message);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif(message.getVideo() != null)\n\t\t{\n\t\t\tvideoMessage(message);\n\t\t\treturn;\n\t\t}\n\n\t\tif(message.getVideoNote() != null)\n\t\t{\n\t\t\tvideoNoteMessage(message);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif(message.getVoice() != null)\n\t\t{\n\t\t\tvoiceMessage(message);\n\t\t\treturn;\n\t\t}\n\t\tif(message.getContact() != null)\n\t\t{\n\t\t\tcontactMessage(message);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif(message.getLocation() != null)\n\t\t{\n\t\t\tlocationMessage(message);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif(message.getVenue() != null)\n\t\t{\n\t\t\tvenueMessage(message);\n\t\t\treturn;\n\t\t}\n\n\t\tif (message.getDice() != null)\n\t\t{\n\t\t\tdiceMessage(message);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif(message.getNewChatMember() != null)\n\t\t{\n\t\t\tnewChatMemberMessage(message);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif(message.getNewChatMembers() != null)\n\t\t{\n\t\t\tnewChatMembersMessage(message);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif(message.getLeftChatMember() != null)\n\t\t{\n\t\t\tleftChatMemberMessage(message);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif(message.getPinned_message() != null)\n\t\t{\n\t\t\tpinnedMessage(message);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif(message.getNewChatTitle() != null)\n\t\t{\n\t\t\tnewChatTitleMessage(message);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif(message.getNewChatPhoto() != null)\n\t\t{\n\t\t\tnewChatPhotoMessage(message);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif(message.GetDeleteChatPhoto())\n\t\t{\n\t\t\tgroupChatPhotoDeleteMessage(message);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif(message.GetGroupChatCreated())\n\t\t{\n\t\t\tgroupChatCreatedMessage(message);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif(message.getGame() != null)\n\t\t{\n\t\t\tgameMessage(message);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif(message.getSuccessfulPayment() != null)\n\t\t{\n\t\t\tsuccessfulPaymentMessage(message);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif(message.getInvoice() != null)\n\t\t{\n\t\t\tinvoiceMessage(message);\n\t\t\treturn;\n\t\t}\n\t}",
"@Override\n\t\t\tpublic void handleMessage(Message msg) {\n\n\t\t\t\tsuper.handleMessage(msg);\n\t\t\t\tswitch (msg.what) {\n\t\t\t\tcase GlobalConstants.MSG_AVCOMMENT_MAIN_INIT_DATA:\n\t\t\t\t\tList<AvComment> tmpList=(List<AvComment>)msg.obj;\n\t\t\t\t\tfor (int i = 0; i < tmpList.size(); i++) {\n\t\t\t\t\t\tcommentAdapter.getList().add(tmpList.get(i));\n\t\t\t\t\t}\n\t\t\t\t\tif (progressDialog.isShowing())\n\t\t\t\t\t\tprogressDialog.dismiss();\n\t\t\t\t\tfootView.setVisibility(View.GONE);\n\t\t\t\t\tinitAvInfoComment();\n\t\t\t\t\tloadingDataFlag = false;\n\t\t\t\t\tbreak;\n\t\t\t\tcase GlobalConstants.MSG_AVCOMMENT_MAIN_INIT_COVER:\n\t\t\t\t\tinitAvInfoComment();\n\t\t\t\t\tbreak;\n\t\t\t\tcase GlobalConstants.MSG_AVCOMMENT_MAIN_UPDATE_LIST:\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}",
"public static EditMsgRequest buildEditMsgRequest(Integer chatRoomID, Integer executorID, Integer senderID, Integer messageID, String newContent) {\n EditMsgRequest.Data editMsgRequestData = EditMsgRequest.Data.builder()\n .chatRoomID(chatRoomID)\n .executorID(executorID)\n .senderID(senderID)\n .messageID(messageID)\n .newContent(newContent)\n .build();\n return EditMsgRequest.builder()\n .request(\"edit_msg\")\n .data(editMsgRequestData)\n .build();\n }",
"public abstract void msgHandler(Message msg);",
"@Override\n\t\tpublic void handleMessage(Message msg) {\n\t\t\tString reslutInfo = (String) msg.obj;\n\t\t\tLog.d(App.LOG_TAG, reslutInfo);\n\t\t\tswitch (msg.what) {\n\t\t\tcase 200:\n\t\t\t\tpb.setProgress(7);\n\t\t\t\ttextState.append(\"\\n\");\n\t\t\t\ttextState.append(reslutInfo);\n\t\t\t\tlayout.setVisibility(View.VISIBLE);\n\t\t\t\tclearSign();\n\t\t\t\tsaveRecodes();\n\t\t\t\tbreak;\n\t\t\tcase 201:\n\t\t\t\ttextState.append(\"\\n\");\n\t\t\t\ttextState.append(reslutInfo);\n\t\t\t\tbreak;\n\t\t\tcase 501:\n\t\t\t\tpb.setProgress(7);\n\t\t\t\ttextState.append(\"\\n\");\n\t\t\t\ttextState.append(reslutInfo);\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\ttextState.append(\"\\n\");\n\t\t\t\ttextState.append(reslutInfo);\n\t\t\t\tpb.setProgress(msg.what);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}",
"@Override\n\tpublic void onMessage(Message message, Object... data) {\n\t\tif(Messenger.is(Message.KEY_DOWN, message)){\n\t\t\tif((int)data[0] == KeyEvent.VK_W) Messenger.sendMessage(Message.Move);\n\t\t\telse if((int)data[0] == KeyEvent.VK_E) Messenger.sendMessage(Message.Scale);\n\t\t\telse if((int)data[0] == KeyEvent.VK_R) Messenger.sendMessage(Message.Rotate);\n\t\t\treturn;\n\t\t}\n\t\tEditorSystem.editingTypeStateMachine.changeState(Messenger.getStateFromMessage(this.getDeclaringClass(), message));\n\t}",
"public String handleEdit()\n throws webschedulePresentationException, HttpPresentationException\n {\t\t \n String projID = this.getComms().request.getParameter(PROJ_ID);\n Project project = null;\n\n System.out.println(\" trying to edit a project \"+ projID);\n \n // Try to get the proj by its ID\n try {\n\t project = ProjectFactory.findProjectByID(projID);\n\t System.out.println(\" trying to edit a project 2\"+ projID);\n\t String title = project.getProj_name();\n\t System.out.println(\"project title: \"+title);\n\t\n } catch(Exception ex) {\n this.getSessionData().setUserMessage(\"Please choose a valid PROJECT to edit\");\n throw new ClientPageRedirectException(PROJECT_ADMIN_PAGE);\n }\n \n // If we got a valid project then try to save it\n // If any fields were missing then redisplay the edit page, \n // otherwise redirect to the project catalog page\n try {\n saveProject(project);\n throw new ClientPageRedirectException(PROJECT_ADMIN_PAGE);\n } catch(Exception ex) {\n return showEditPage(\"You must fill out all fields to edit this project\");\n } \n }",
"public boolean onEditorAction(TextView view, int actionId, KeyEvent event) {\n if (actionId == EditorInfo.IME_NULL && event.getAction() == KeyEvent.ACTION_UP) {\n String message = view.getText().toString();\n sendMessage(message);\n }\n return true;\n }",
"public boolean onEditorAction(TextView view, int actionId, KeyEvent event) {\n if (actionId == EditorInfo.IME_NULL && event.getAction() == KeyEvent.ACTION_UP) {\n String message = view.getText().toString();\n sendMessage(message);\n }\n return true;\n }",
"@OnClick(R.id.enter_chat1)\n public void sendMessage() {\n if (getView() == null) {\n return;\n }\n EditText editText = getView().findViewById(R.id.chat_edit_text1);\n sendMessageBackend(editText.getText().toString(), utils.getChatUser());\n updateListAdapter();\n editText.setText(\"\");\n }",
"@Override\n\t\t\tpublic void handleMessage(android.os.Message msg) {\n\t\t\t\tsuper.handleMessage(msg);\n\n\t\t\t\tswitch (msg.what) {\n\t\t\t\tcase HandleConfig.GETROOMINFO:// 获取room详情,并且1分钟更新一次\n\t\t\t\t\tdismissProcessDialog();\n\t\t\t\t\tNetEntry entry = decodePointList(msg.getData().getString(\n\t\t\t\t\t\t\t\"data\"));\n\t\t\t\t\tif (NetEntry.CODESUCESS.equals(entry.status)) {\n\t\t\t\t\t\tupdteRoomInfo(msg.getData().getString(\"data\"));\n\n\t\t\t\t\t} else {\n\t\t\t\t\t\tshowToastError(entry.msg);\n\t\t\t\t\t}\n\t\t\t\t\tandroid.os.Message mg = android.os.Message.obtain();\n\t\t\t\t\tmg.what = HandleConfig.REFRESHROOMINFO;\n\t\t\t\t\tmHandler.sendMessageDelayed(mg, 10000);\n\n\t\t\t\t\tbreak;\n\t\t\t\tcase HandleConfig.REFRESHROOMINFO:\n\t\t\t\t\tif(isFinishing()==false){\n\t\t\t\t\t\tgetroominfo(roomid);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase HandleConfig.QUERYROOMUSERS:// 更新room user list\n\n\t\t\t\t\tNetEntry entry1 = decodePointList(msg.getData().getString(\n\t\t\t\t\t\t\t\"data\"));\n\n\t\t\t\t\tif (NetEntry.CODESUCESS.equals(entry1.status)) {\n\t\t\t\t\t\tJSONObject jsonobj;\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tjsonobj = new JSONObject(msg.getData().getString(\n\t\t\t\t\t\t\t\t\t\"data\"));\n\n\t\t\t\t\t\t\tJSONObject tmp = jsonobj.getJSONObject(\"data\");\n\t\t\t\t\t\t\tJSONArray tmpList = tmp.getJSONArray(\"list\");\n\t\t\t\t\t\t\tperson.clear();\n\t\t\t\t\t\t\tfor (int i = 0; i < tmpList.length(); i++) {\n\t\t\t\t\t\t\t\tJSONObject t = tmpList.getJSONObject(i);\n\t\t\t\t\t\t\t\tString phone = t.getString(\"phone\");\n\t\t\t\t\t\t\t\tString id = t.getString(\"id\");\n\t\t\t\t\t\t\t\tString name = t.getString(\"name\");\n\t\t\t\t\t\t\t\tString headpic = t.getString(\"headpic\");\n\t\t\t\t\t\t\t\tif (phone.equals(owner.phone)) {// 房主\n\t\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tMessagePerson p = new MessagePerson();\n\t\t\t\t\t\t\t\tp.id = id;\n\t\t\t\t\t\t\t\tp.name=name;\n\t\t\t\t\t\t\t\tp.pic = headpic;\n\t\t\t\t\t\t\t\tp.phone = phone;\n\t\t\t\t\t\t\t\tperson.add(p);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tbigWindow.UpdateRoomPerson(person);\n\t\t\t\t\t\t} catch (JSONException e) {\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t}\n\n\t\t\t\t\t} else {\n\t\t\t\t\t\tshowToastError(entry1.msg);\n\t\t\t\t\t}\n\n\t\t\t\t\tbreak;\n\t\t\t\tcase 3:\n\t\t\t\t\tshowToastError(\"聊天室链接失败\");\n\t\t\t\tcase 4:\n\t\t\t\t\tdismissProcessDialog();\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}",
"public void onPressEdit() {\r\n Intent intent = new Intent(this, CreateEventActivity.class);\r\n intent.putExtra(CreateEventActivity.EXTRA_EDIT_EVENT_UID, event.uid);\r\n startActivity(intent);\r\n }",
"@Override\r\n\t\tpublic void handleMessage(Message msg) {\n\t\t\tswitch (msg.what) {\r\n\t\t\t// upload ok\r\n\t\t\tcase 0:\r\n\t\t\t\tToast.makeText(SendBroadcastMessage.this, \"上传语音成功\",\r\n\t\t\t\t\t\tToast.LENGTH_SHORT).show();\r\n\t\t\t\tbreak;\r\n\t\t\t// upload error\r\n\t\t\tcase 1:\t\t\t\r\n\t\t\t\tToast.makeText(SendBroadcastMessage.this, \"上传语音失败\",\r\n\t\t\t\t\t\tToast.LENGTH_SHORT).show();\r\n\t\t\t\tbreak;\r\n\t\t\t// update ok\r\n\t\t\tcase 2:\r\n\t\t\t\tif (dialog!=null) {\r\n\t\t\t\t\tdialog.dismiss();\r\n\t\t\t\t}\r\n\t\t\t\tToast.makeText(SendBroadcastMessage.this, \"发布成功\",\r\n\t\t\t\t\t\tToast.LENGTH_SHORT).show();\r\n\t\t\t\tTextSave();\r\n\t\t\t\tSendResultSave(true);\r\n\t\t\t\tif (bm != null) {\r\n\t\t\t\t\tbm.recycle();\r\n\t\t\t\t}\r\n\t\t\t\tSendBroadcastMessage.this.finish();\r\n\t\t\t\tbreak;\r\n\t\t\t// update error\r\n\t\t\tcase 3:\r\n\t\t\t\tif (dialog!=null) {\r\n\t\t\t\t\tdialog.dismiss();\r\n\t\t\t\t}\r\n\t\t\t\tTextSave();\r\n\t\t\t\tSendResultSave(false);\r\n\t\t\t\tToast.makeText(SendBroadcastMessage.this, \"发布失败\",\r\n\t\t\t\t\t\tToast.LENGTH_SHORT).show();\r\n\t\t\t\tif (bm != null) {\r\n\t\t\t\t\tbm.recycle();\r\n\t\t\t\t}\r\n\t\t\t\tSendBroadcastMessage.this.finish();\r\n\t\t\t\tbreak;\r\n\t\t\t\t\r\n\t\t\tdefault:\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t}",
"public void onMessage(Message message)\n {\n \tObjectMessage om = (ObjectMessage) message;\n\t\tTypeMessage mess;\n\t\ttry {\n\t\t\tmess = (TypeMessage) om.getObject();\n\t\t\tint id = om.getIntProperty(\"ID\");\n\t\t\tview.updatelistTweetFeed(mess, id);\n\t\t\tSystem.out.println(\"received: \" + mess.toString());\n\t\t} catch (JMSException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\t\n\t\t\n }",
"public void handleMessage(Message message) {\r\n\r\n\t try { \r\n\t \t//only authenticate if you are trying to write to the db... \r\n\t \tHttpServletRequest req = (HttpServletRequest) message.get(\"HTTP.REQUEST\");\r\n\t \tString method = req.getMethod();\r\n\t \t\r\n\t \tif (method!=HttpMethod.GET && method!=HttpMethod.OPTIONS && method!=HttpMethod.HEAD){\r\n \t \r\n\t\t \tAuthorizationPolicy policy = apiUserService.getCurrentAuthPolicy();\r\n\t\t \tString accessKey = policy.getUserName();\r\n\t\t \tString secret = policy.getPassword();\r\n\t\t \r\n\t\t\t\tif (accessKey==null || accessKey.length()==0\r\n\t\t\t\t\t\t|| secret==null || secret.length()==0)\t{\r\n\t\t\t \tthrow new RMapTransformApiException(ErrorCode.ER_NO_USER_TOKEN_PROVIDED);\r\n\t\t\t\t}\t\t\r\n\t\t\t\r\n\t\t\t\tapiUserService.validateKey(accessKey, secret);\r\n\t \t}\r\n\t \t\r\n\t } catch (RMapTransformApiException ex){ \r\n\t \t//generate a response to intercept default message\r\n\t \tRMapTransformApiExceptionHandler exceptionhandler = new RMapTransformApiExceptionHandler();\r\n\t \tResponse response = exceptionhandler.toResponse(ex);\r\n\t \tmessage.getExchange().put(Response.class, response); \t\r\n\t }\r\n\t\t\r\n }",
"@Override\n public void handleMessage(Message msg) {\n super.handleMessage(msg);\n postInvalidate();\n }",
"protected void onSendMessage(View view){\n et = (EditText)findViewById(R.id.message);\n String message = et.getText().toString();\n Intent intent = new Intent(this, ReceiveMessageActivity.class);\n intent.putExtra(\"message\",message);\n startActivity(intent);\n }",
"@Override\n public void handleMessage(Message m)\n {\n String content = m.getContent();\n if (content.isEmpty())\n {\n content = \"N/A\";\n }\n\n JOptionPane.showMessageDialog(null, \"From: \" + m.getFrom() + \"\\n\"\n + \"To: \" + m.getTo() + \"\\n\"\n + \"Content: \" + content + \"\\n\"\n + \"Type: \" + m.getType().toString(),\n \"Message Notification\",\n JOptionPane.INFORMATION_MESSAGE);\n }",
"@Override\n\t\tpublic void handleMessage(Message msg) {\n\t\t\tsuper.handleMessage(msg);\n\t\t\tswitch (msg.what) {\n\t\t\tcase 911:\n\t\t\t\tqueryMsg();\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t}",
"public void execute() throws RemoteException {\n if (parentToEdit == null || messageToEdit == null) {\n return;\n }\n parentToEdit.notifyServerEdit(messageToEdit);\n }",
"public void onEditItem(View view) {\n Intent data = new Intent(EditItemActivity.this, MainActivity.class);\n data.putExtra(\"position\", elementId);\n data.putExtra(\"text\", etText.getText().toString());\n setResult(RESULT_OK, data);\n finish();\n }",
"public void handleUpdate(){\n increaseDecrease(\"i\");\n action=\"update\";\n buttonSave.setVisible(true);\n admission.setEditable(false);\n\n }",
"private void handleServerMessage() throws IOException {\n System.out.println(\"Handeling message for \" + id + \" with type: \" + sm.getType().toString());\n switch (sm.getType()) {\n case REGISTER:\n registrationLoginHandler.register(sm, output);\n break;\n case LOGIN:\n this.user = registrationLoginHandler.login(sm, output);\n break;\n case BOOT:\n bootHandler.boot(user, output);\n break;\n case ADD_CONTACT:\n contactHandler.addContact(sm, user, output);\n handleAddContact();\n break;\n case REMOVE_CONTACT:\n break;\n case UPDATE_NICKNAME:\n break;\n case UPDATE_STATUS:\n break;\n case UPDATE_PROFILE_PIC:\n break;\n case CLIENT_DISCONNECT:\n keepGoing = false;\n close();\n server.remove(id);\n break;\n }\n }",
"public void handleEvent(Message event)\r\n {\r\n m_tsm.handleEvent(event);\r\n\r\n String msg = event.getMessage().toLowerCase();\r\n\r\n String name = m_botAction.getPlayerName(event.getPlayerID());\r\n\r\n if(event.getMessageType() == Message.PRIVATE_MESSAGE && m_opList.isER(name))\r\n {\r\n if(msg.equals(\"!safeson\"))\r\n {\r\n c_Activate(name, true);\r\n }\r\n else if(msg.equals(\"!safesoff\"))\r\n {\r\n c_Activate(name, false);\r\n m_entryTimes.clear();\r\n } else if(msg.startsWith(\"!default\")) {\r\n cmd_default(name, msg);\r\n }\r\n }\r\n }",
"@Override\n public void handleMessage(Message msg) {\n super.handleMessage(msg);\n Log.d(TAG,\"In Handler, Msg = \"+msg.arg1);\n }",
"@Override\n\t\tpublic void handleMessage(Message msg) {\n\t\t\tsuper.handleMessage(msg);\n\t\t\tisExit = false;\n\t\t}",
"abstract void updateMessage(String msg);",
"@Override\n public void actionPerformed(ActionEvent e) {\n fenetre.getClient().envoyerMessage(getMessage(), optionEnvoi); // Envoie du message\n saisieMessage.setText(\"\"); // On supprime le texte de la saisie message\n }",
"@Override\r\n\t@RequestMapping(value=\"/edit\",method=RequestMethod.POST)\r\n\tpublic Message update(MeetingDetail meetingDetail) {\n\t\treturn new Message(dao.update(meetingDetail));\r\n\t}",
"private void execHandlerChange( Message msg ){\n\t\tswitch ( msg.arg1 ) {\n\t\t\tcase STATE_CONNECTED:\n\t\t\t\texecHandlerConnected( msg );\n\t\t\t\tbreak; \n\t\t\tcase STATE_CONNECTING:\n\t\t\t\texecHandlerConnecting( msg );\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\texecHandlerNotConnected( msg );\n\t\t\t\tbreak;\n\t\t}\n\t}",
"public void editOperation() {\n\t\t\r\n\t}",
"@Headers({\n \"Content-Type:application/json\"\n })\n @PUT(\"chat/messages/{id}\")\n Call<Void> editChatMessage(\n @retrofit2.http.Path(\"id\") String id, @retrofit2.http.Body ChatMessageResource chatMessageResource\n );",
"public void onClick(ClickEvent event) {\n\t\t\t\tString msgtxt = view.getCreateMessageText().getText().trim();\n\n\t\t\t\t// 2. Lock input, show sending indicator: goto 3\n\t\t\t\tview.lockCreateMessageInput();\n\n\t\t\t\t// 3. Validate input: valid ? goto 4 : goto e1\n\t\t\t\tif(msgtxt.isEmpty()) {\n\t\t\t\t\t// TODO: Show warning message: goto 6\n\n\t\t\t\t\t// 6. Unlock input, remove sending indicator, set focus to inputText: goto 1\n\t\t\t\t\tview.unlockCreatemessageInput();\n\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tMessage msg = new MessageImpl();\n\t\t\t\tmsg.setText(msgtxt);\n\t\t\t\tservice.createMessage(msg, new AsyncCallback<Void>() {\t\t\t\t\t\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onSuccess(Void result) {\n\t\t\t\t\t\tGWT.log(\"INFO: Message saved succesfully.\");\n\n\t\t\t\t\t\t// 5. Clear input: goto 6\n\t\t\t\t\t\tview.getCreateMessageText().setText(\"\");\n\n\t\t\t\t\t\t// 6. Unlock input, remove sending indicator, set focus to inputText: goto 1\n\t\t\t\t\t\tview.unlockCreatemessageInput();\t\t\t\t\t\n\t\t\t\t\t}\t\t\t\t\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onFailure(Throwable caught) {\n\t\t\t\t\t\tGWT.log(caught.getMessage());\n\n\t\t\t\t\t\t// TODO: Show error message: goto 6\n\n\t\t\t\t\t\t// 6. Unlock input, remove sending indicator, set focus to inputText: goto 1\n\t\t\t\t\t\tview.unlockCreatemessageInput();\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}",
"protected abstract void editItem();",
"void onEditClicked();",
"@Override\n public void handleMessage(android.os.Message msg) {\n super.handleMessage(msg);\n int type = msg.what;\n if (countTextView != null) {\n countTextView.setText(\"\");\n countTextView.setVisibility(View.GONE);\n }\n switch (type) {\n case 1:\n//\t\t\tshowDialog(\"User invitation sent\",true);\n Toast.makeText(BulkInvitationScreen.this, \"Invite sent\", Toast.LENGTH_SHORT).show();\n//\t\t\tif(inviteFromReg){\n//\t\t\t\tIntent intent = new Intent(BulkInvitationScreen.this, HomeScreen.class);\n//\t\t\t\tintent.putExtra(\"ADMIN_FIRST_TIME\", true);\n//\t\t\t\tstartActivity(intent);\n//\t\t\t\tfinish();\n//\t\t\t}\n//\t\t\telse\n//\t\t\t\trestartActivity(BulkInvitationScreen.this);\n break;\n case 2:\n//\t\t\tshowDialog(\"User already added.\",false);\n Toast.makeText(BulkInvitationScreen.this, \"Invite already sent!\", Toast.LENGTH_SHORT).show();\n break;\n case 3:\n//\t\t\tshowDialog(\"User already added in this domain.\",false);\n Toast.makeText(BulkInvitationScreen.this, \"Invite already sent!\", Toast.LENGTH_SHORT).show();\n break;\n }\n if (adapter != null) {\n adapter.removeSelectedItems();\n adapter.notifyDataSetChanged();\n }\n }",
"public void handleMessageFromClient(Object msg) {\n\n }",
"@Override\n public void edit() {\n this.parent.handleEditSignal(this.deadline);\n }"
] |
[
"0.68066525",
"0.6261563",
"0.61987394",
"0.6184851",
"0.61760026",
"0.6157877",
"0.6155064",
"0.61408126",
"0.61182326",
"0.6089238",
"0.60614836",
"0.6048066",
"0.6034191",
"0.6023785",
"0.59937006",
"0.5978547",
"0.5973314",
"0.5972721",
"0.59569687",
"0.5929211",
"0.59283364",
"0.5906057",
"0.5899528",
"0.58987796",
"0.5890384",
"0.5852902",
"0.58408237",
"0.58330667",
"0.58272815",
"0.5817246",
"0.58126205",
"0.58071464",
"0.5785767",
"0.57780486",
"0.57610375",
"0.57520306",
"0.5740649",
"0.5737716",
"0.57322437",
"0.5721334",
"0.5700653",
"0.57004535",
"0.5694265",
"0.5691538",
"0.5677495",
"0.56682026",
"0.5668179",
"0.56658673",
"0.5658795",
"0.5650988",
"0.56393254",
"0.5631411",
"0.5628403",
"0.5621549",
"0.5618538",
"0.56183535",
"0.56095105",
"0.56045246",
"0.56015694",
"0.55980825",
"0.5595073",
"0.558663",
"0.55836517",
"0.55746657",
"0.55701977",
"0.5567766",
"0.55638456",
"0.5560353",
"0.55590546",
"0.55582017",
"0.55582017",
"0.55533445",
"0.55519104",
"0.5551602",
"0.5551448",
"0.5547353",
"0.55441254",
"0.5544024",
"0.55435765",
"0.5542385",
"0.55407596",
"0.55386174",
"0.55311126",
"0.5530316",
"0.55213016",
"0.5515315",
"0.55150205",
"0.55138654",
"0.5511338",
"0.5501845",
"0.5478812",
"0.5472161",
"0.54707944",
"0.54689527",
"0.54648006",
"0.5464351",
"0.5463805",
"0.54635423",
"0.54622704",
"0.5461161"
] |
0.7216815
|
0
|
initialisation des varibles modele et controleur
|
@Before
public void initial() {
modele = new FractaleModele();
controleur = new FractaleControler(modele);
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"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 initBefore() {\n // Crear Modelo\n model = new Model();\n\n // Crear Controlador\n control = new Controller(model, this);\n\n // Cargar Propiedades Vista\n prpView = UtilesApp.cargarPropiedades(FICHERO);\n\n // Restaurar Estado\n control.restaurarEstadoVista(this, prpView);\n\n // Otras inicializaciones\n }",
"private void initializeModel() {\n\t\t\n\t}",
"public void initialize() {\n\n fechaDeLaVisita.set(LocalDate.now());\n\n if (medico.get() != null) {\n medico.get().clear();\n } else {\n medico.set(new Medico());\n }\n\n turnoVisita.set(\"\");\n visitaAcompanadaSN.set(false);\n lugarVisita.set(\"\");\n if (causa.get() != null) {\n causa.get().clear();\n } else {\n causa.set(new Causa());\n }\n\n if (promocion.get() != null) {\n promocion.get().clear();\n } else {\n promocion.set(new Promocion());\n }\n\n observacion.set(\"\");\n persistida.set(false);\n persistidoGraf.set(MaterialDesignIcon.SYNC_PROBLEM.graphic());\n\n fechaCreacion.set(LocalDateTime.now());\n\n }",
"public MVCModelo(int capacidad)\n\t{\n\t\tllave = \"\";\n\t\tvalue = 0.0;\n\t}",
"public static void initialisations() {\n\t\tit = 0;\r\n\t\tbc = 1;\r\n\r\n\t\t// pile des reprises pour compilation des branchements en avant\r\n\t\tpileRep = new TPileRep(); \r\n\t\t// programme objet = code Mapile de l'unite en cours de compilation\r\n\t\tpo = new ProgObjet();\r\n\t\t// COMPILATION SEPAREE: desripteur de l'unite en cours de compilation\r\n\t\tdesc = new Descripteur();\r\n\r\n\t\t// initialisation necessaire aux attributs lexicaux\r\n\t\tUtilLex.initialisation();\r\n\r\n\t\t// initialisation du type de l'expression courante\r\n\t\ttCour = NEUTRE;\r\n\r\n\t\t//Initialisation de la variable qui compte le nombre de param�tres de chaque proc�dure \r\n\t\tnbParamProc = 0;\r\n\r\n\t\t//Initialisation de la variable qui compte le nombre de variables d�clar�es\r\n\t\tnbVar++;\r\n\r\n\t\t//Initialisation vTmp\r\n\t\tvTmp = 0;\r\n\t\t\r\n\t\tdesc.setUnite(\"programme\");\r\n\t\t\r\n\t}",
"public void limpiarCampos() {\n\t\ttema = new Tema();\n\t\ttemaSeleccionado = new Tema();\n\t\tmultimedia = new Multimedia();\n\t}",
"@Override\r\n\tpublic void initVariables() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initVentajas() {\n\r\n\t}",
"public MVCModelo()\n\t{\n\t\ttablaChaining=new HashSeparateChaining<String, TravelTime>(20000000);\n\t\ttablaLineal = new TablaHashLineal<String, TravelTime>(20000000);\n\t}",
"public MusiqueFiducial(){\n\t\tinitialisation();\n\t}",
"@Override\r\n public void initialize(URL url, ResourceBundle rb) {\r\n modelo = new Modelo();\r\n }",
"@Override\r\n\tpublic void init() throws ServletException {\n\t\tsuper.init();\r\n\t\r\n\t\tpdmodel = new pedidoModel();\r\n\t\tcmodel = new clienteModel();\r\n\t\tcnmodel = new cancionModel();\r\n\t}",
"public ValorVariavel() {\r\n }",
"protected void initVars() {}",
"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 }",
"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 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 }",
"public void init() {\r\n\t\tlog.info(\"init()\");\r\n\t\tobjIncidencia = new IncidenciaSie();\r\n\t\tobjObsIncidencia = new ObservacionIncidenciaSie();\r\n\t\tobjCliente = new ClienteSie();\r\n\t\tobjTelefono = new TelefonoPersonaSie();\r\n\t}",
"public ModeloMenuBase() {\n\t\tinicializar();\n\t}",
"private void init() {\n\t\tthis.model = ModelFactory.createOntologyModel(OntModelSpec.OWL_MEM);\n\t\tthis.model.setNsPrefixes(INamespace.NAMSESPACE_MAP);\n\n\t\t// create classes and properties\n\t\tcreateClasses();\n\t\tcreateDatatypeProperties();\n\t\tcreateObjectProperties();\n\t\t// createFraktionResources();\n\t}",
"public Model() {\r\n\t\t\tsuper();\r\n\t\t\tdao=new SerieADAO();\r\n\t\t\tthis.mapSeason=new HashMap<>();\r\n\t\t\tthis.mapTeam=new HashMap<>();\r\n\t\t\tthis.mapTeamBySeason=new HashMap<>();\r\n\t\t\tthis.mapMatch=new HashMap<>();\r\n\t\t\tthis.mapMatchBySeason=new HashMap<>();\r\n\r\n\t\r\n\t\t}",
"@Override\n protected void initModel() {\n bannerModel = new BannerModel();\n// homeSousuoModel = new Home\n\n// bannerModel = new BannerModel();\n// homeSousuoModel = new HomeSousuoModel();\n// izxListModelBack = new\n }",
"public DataModel()\r\n {\r\n System.out.println(\"New DataModel created\");\r\n \r\n languageList = new LanguageList();\r\n }",
"public void startModel() {\n\t\tpaginaImperatori = WikiImperatoriRomaniPagina.getInstance();\n\t}",
"public MVCModelo()\n\t{\n\t\tqueueMonthly = new Queue();\n\t\tqueueHourly = new Queue();\n\t\tstackWeekly = new Stack();\n\t}",
"@PostConstruct\r\n\tpublic void init() {\n\t\ttexto=\"Nombre : \";\r\n\t\topcion = 1;\r\n\t\tverPn = true;\r\n\t\ttipoPer = 1;\r\n\t\tsTipPer = \"N\";\r\n\t\tverGuar = true;\r\n\t\tvalBus = \"\";\r\n\t\tverCampo = true;\r\n\t\tread = false;\r\n\t\tgrabar = 0;\r\n\t\tcodCli = 0;\r\n\t\tcargarLista();\r\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}",
"public Model() {\n\t}",
"public Model() {\n\t}",
"public Controlador() {\n\t\t// m\n\t\tdatosPrueba1 = new ListaEnlazada();\n\t\t// m\n\t\tdatosPrueba2 = new ListaEnlazada();\n\t\t// add\n\t\tdatosPrueba3 = new ListaEnlazada();\n\t\tdatosPrueba4 = new ListaEnlazada();\n\t\tprueba1 = new Estadisticas(datosPrueba1);\n\t\tprueba2 = new Estadisticas(datosPrueba2);\n\t\tprueba3 = new Estadisticas(datosPrueba3);\n\t\tprueba4 = new Estadisticas(datosPrueba4);\n\t\t// finAdd\n\t}",
"public Saida() {\n initComponents();\n defaults();\n preencherTabela();\n \n }",
"public void crearModelo() {\r\n\t\tmodelo = new DefaultComboBoxModel<>();\r\n\t\tmodelo.addElement(\"Rojo\");\r\n\t\tmodelo.addElement(\"Verde\");\r\n\t\tmodelo.addElement(\"Azul\");\r\n\t\tmodelo.addElement(\"Morado\");\r\n\t}",
"public Caso_de_uso () {\n }",
"public GeneralModel() {\n initThemes();\n initProperties();\n }",
"public CadastrarMarcasModelos() {\n initComponents();\n }",
"private Model(){}",
"public void init(){\n \n }",
"private void objectInitialization(View view) {\n mbt_realizar_comentario_propietario = (Button) view.findViewById(R.id.bt_guardar_comentario_asesor);\n mbt_no_realizar_comentario = (Button) view.findViewById(R.id.bt_dialogo_cancelar_comentario_del_asesor);\n met_Comentario_del_Asesor = (EditText) view.findViewById(R.id.et_comentario_del_asesor);\n realmConfiguration = new RealmConfiguration.Builder(getActivity()).build();\n realm = Realm.getInstance(realmConfiguration);\n allEncuestas = realm.where(Encuesta.class).findAll();\n\n\n }",
"public void initialize(Model model){\r\n\t\tArrayList<String> elements = new ArrayList<String>();\r\n\t\tfor(int i = 0; i < model.getElements().size(); i++){\r\n\t\t\telements.add(model.getElements().get(i).getId());\r\n\t\t}\r\n\t\t\r\n\t\tFeature base = new Feature(\"base\", \"mandatory\", \"root\", elements);\r\n\t\tthis.mandatoryFeatures.add(base);\r\n\t\tFeatureGroup variants = new FeatureGroup(\"variants\", \"alternative\", \"root\");\r\n\t\tthis.alternativeFeatureGroup.add(variants);\r\n\t\t\r\n\t\t//New 02/12/201/\r\n\t\tFeature newVariant = new Feature(model.getId()+\"_Variant\", \"variant\", this.alternativeFeatureGroup.get(0).getId());\r\n\t\tthis.addVariant(newVariant);\r\n\t\t//-New 02/12/201/\r\n\t}",
"public void init() {\r\n\r\n\t}",
"@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 void init() {\n \n }",
"void initData() {\r\n\t\tthis.daVinci = new Artist(\"da Vinci\");\r\n\t\tthis.mona = new Painting(daVinci, \"Mona Lisa\");\r\n\t\t//this.lastSupper = new Painting(this.daVinci, \"Last Supper\");\r\n\t}",
"private void initObjects() {\n inputValidation = new InputValidation(activity);\n databaseHelper = new DatabaseHelper(activity);\n user = new User();\n }",
"public ListaComuniModel() {\n\t\tsuper();\n\t}",
"public cola_de_un_banco(){// se crea nuestro metodo costructor \r\n primero=null;//se crea el tipo de indicaciones con valor a null\r\n ultimo=null;\r\n}",
"private void initDatas(){\r\n \t\r\n \tjTable1.setModel(ViewUtil.transferBeanList2DefaultTableModel(discountService.getAllDiscountInfo(),\"Discount\"));\r\n }",
"private void prepare()\n {\n Victoria victoria = new Victoria();\n addObject(victoria,190,146);\n Salir salir = new Salir();\n addObject(salir,200,533);\n Volver volver = new Volver();\n addObject(volver,198,401);\n }",
"@Override\r\n\tprotected void init() {\r\n\t\tList<Configuracao> configs = servico.listarTodos();\r\n\t\tif (!configs.isEmpty()) {\r\n\t\t\tentidade = configs.get(0);\t// deve haver apenas um registro\r\n\t\t} else {\r\n\t\t\tcreateConfiguracao();\r\n\t\t}\r\n\t\t\r\n carregarTemas();\r\n\t}",
"private void initValues() {\n \n }",
"public static void init()\n\t{\n\t\t\n\t\tu.creerGalaxie(\"VoieLactee\", \"spirale\", 0);\n\t\tu.creerEtoile(\"Soleil\", 0, 'F', u.getGalaxie(\"VoieLactee\")); //1\n\t\tu.creerObjetFroid(\"Terre\", 150000 , 13000 , 365 , u.getObjet(1)); //2\n\n\t\tu.creerObjetFroid(\"Lune\", 200 , 5000 , 30 , u.getObjet(2)); //3\n\n\t\tu.creerObjetFroid(\"Mars\", 200000 , 11000 , 750 , u.getObjet(1)); //4\n\n\t\tu.creerObjetFroid(\"Phobos\", 150 , 500 , 40 , u.getObjet(4)); //5\n\n\t\tu.creerObjetFroid(\"Pluton\", 1200000 , 4000 , 900 , u.getObjet(1)); //6\n\n\t\tu.creerEtoile(\"Sirius\", 2, 'B', u.getGalaxie(\"VoieLactee\")); //7\n\n\t\tu.creerObjetFroid(\"BIG-1\", 1000 , 50000 , 333 , u.getObjet(7)); //8\n\n\t\tu.creerGalaxie(\"M31\", \"lenticulaire\", 900000);\n\t\tu.creerEtoile(\"XS67\", 8, 'F', u.getGalaxie(\"M31\")); //9\n\t\tu.creerObjetFroid(\"XP88\", 160000 , 40000 , 400 , u.getObjet(9)); //10\n\t}",
"@PostConstruct\r\n public void inicializar() {\r\n try {\r\n anioDeclaracion = 0;\r\n existeDedPatente = false;\r\n deducciones = false;\r\n detaleExoDedMul = new ArrayList<String>();\r\n activaBaseImponible = 0;\r\n verBuscaPatente = 0;\r\n inicializarValCalcula();\r\n datoGlobalActual = new DatoGlobal();\r\n patenteActual = new Patente();\r\n patenteValoracionActal = new PatenteValoracion();\r\n verPanelDetalleImp = 0;\r\n habilitaEdicion = false;\r\n numPatente = \"\";\r\n buscNumPat = \"\";\r\n buscAnioPat = \"\";\r\n catDetAnio = new CatalogoDetalle();\r\n verguarda = 0;\r\n verActualiza = 0;\r\n verDetDeducciones = 0;\r\n verBotDetDeducciones = 0;\r\n listarAnios();\r\n } catch (Exception ex) {\r\n LOGGER.log(Level.SEVERE, null, ex);\r\n }\r\n }",
"private void setUp() {\r\n\tvariables = new Vector();\r\n\tstatements = new Vector();\r\n\tconstraints = new Vector();\r\n\tvariableGenerator = new SimpleVariableGenerator(\"v_\");\r\n }",
"public void initialize() {\n\t\tanzPakete = Integer.parseInt(textFieldAnzPakete.getText());\r\n\r\n\t\t// Tabelle erzeugen\r\n\t\tsetupTabelle();\r\n\t}",
"public Final_parametre() {\r\n\t}",
"public void init() {\n\t\tTypedQuery<Personne> query = em.createQuery(\"SELECT p FROM Personne p\", Personne.class);\n\t\tList<Personne> clients = query.getResultList();\n\t\tif (clients.size()==0) {\n\t\t\tSqlUtils.executeFile(\"exemple.sql\", em);\n\t\t}\n\t}",
"public SalaculturalController() {\n jpa = new SalaculturalJpaController(PersistenceUtil.getEntityManagerFactory());\n salacultural = new Salacultural();\n lista = jpa.findSalaculturalEntities();\n jpa2 = new EdificioJpaController(PersistenceUtil.getEntityManagerFactory());\n edificios = jpa2.findEdificioEntities();\n edificio = new Edificio();\n tmpid = 0;\n }",
"static void initialize() {\n model = new RatAppModel(\n );\n //Log.d(\"RatAppModel\", \"Initialized\");\n }",
"public Propiedad() {\n bdPropiedad = new DaoPropiedad();\n bdComentario = new DaoComentario();\n }",
"public void initDefaultValues() {\n }",
"public Modello() {\r\n super();\r\n initComponents();\r\n setModalita(APPEND_QUERY);\r\n setFrameTable(tabModello);\r\n setNomeTabella(\"vmodello\");\r\n tMarcaDescrizione.setEnabled(false);\r\n }",
"public void initForAddNew() {\r\n\r\n\t}",
"public BaseModel initObj() {\n\t\treturn null;\n\t}",
"public void init() {\n\n\t}",
"public void init() {\n\n\t}",
"public void init() {\n\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}",
"@FXML private void initialize() {\r\n \t\tc = Utilities.leggiCliente(Main.idCliente);\r\n \t\tac = new acquisto.AcquistoController(c);\r\n \t\tgetProdotti();\r\n \t\tgetSconti();\r\n \t\tinitSelezionati();\r\n \t\tpunti.setText(\"\" + ac.getSaldoPunti());\r\n \t\tpunti.setEditable(false);\r\n \t\ttotale.setEditable(false);\r\n \t\tconferma.setDisable(true);\r\n \t}",
"public Data() {\n initComponents();\n koneksi_db();\n tampil_data();\n }",
"public void initModel() {\r\n this.stateEngine = new RocketStateEngine();\r\n }",
"public void initControles(){\n\n }",
"public void init() {\n\t\t}",
"public EtatInitialisation(Controleur controleur) {\n super(controleur);\n super.rendControleur().lancerEcranDemarrage();\n }",
"public void init(){\r\n\t\t\r\n\t}",
"public View_Categoria() {\n c = new Categoria();\n daoCategoria = new Dao_CadastroCategoria();\n categorias = new ArrayList<>();\n initComponents();\n TextCodigo.setDocument(new LimitaDigitosNum(11));\n TextNome.setDocument(new LimitaDigitos(30));\n TextNomeCons.setDocument(new LimitaDigitos(30));\n atualizarTabela();\n inicio();\n }",
"@SuppressWarnings(\"unchecked\")\n\tprivate void initDatas() {\n\t\tisCharacterChecked = CustomApplication.app.preferencesUtil\n\t\t\t\t.getValuesBoolean(\"isCharacterChecked\");\n\t\tisSentenceChecked = CustomApplication.app.preferencesUtil\n\t\t\t\t.getValuesBoolean(\"isSentenceChecked\");\n\t\tisWordChecked = CustomApplication.app.preferencesUtil\n\t\t\t\t.getValuesBoolean(\"isWordChecked\");\n\t\tisAutoPlay = CustomApplication.app.preferencesUtil\n\t\t\t\t.getValuesBoolean(\"isAutoPlay\");\n\t\ttry {\n\t\t\ttbMyCharacterList = (ArrayList<TbMyCharacter>) MyDao.getDaoMy(\n\t\t\t\t\tTbMyCharacter.class).queryForAll();\n\n\t\t\ttbMyWordList = (ArrayList<TbMyWord>) MyDao.getDaoMy(TbMyWord.class)\n\t\t\t\t\t.queryForAll();\n\n\t\t\ttbMySentenceList = (ArrayList<TbMySentence>) MyDao.getDaoMy(\n\t\t\t\t\tTbMySentence.class).queryForAll();\n\n\t\t\tcharacterCount = tbMyCharacterList.size();\n\t\t\twordsCount = tbMyWordList.size();\n\t\t\tsentenceCount = tbMySentenceList.size();\n\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\tif (isCharacterChecked) {\n\t\t\tfor (int i = 0; i < tbMyCharacterList.size(); i++) {\n\n\t\t\t\tTbMyCharacter model = tbMyCharacterList.get(i);\n\t\t\t\tif (model == null) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tLGModelFlashCard lGModelFlashCard = new LGModelFlashCard();\n\t\t\t\tint id = model.getCharId();\n\t\t\t\tlGModelFlashCard.setMyCharacter(model);\n\t\t\t\tlGModelFlashCard.setMySentence(null);\n\t\t\t\tlGModelFlashCard.setMyWord(null);\n\n\t\t\t\ttry {\n\t\t\t\t\t@SuppressWarnings(\"unchecked\")\n\t\t\t\t\tLGCharacter character = (LGCharacter) MyDao.getDao(\n\t\t\t\t\t\t\tLGCharacter.class).queryForId(id);\n\n\t\t\t\t\tif (character == null) {\n\t\t\t\t\t\tLog.e(TAG, \"character==null\");\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tString chinese = character.getCharacter();\n\t\t\t\t\tString pinyin = character.getPinyin();\n\t\t\t\t\tString english = character.getTranslation();\n\t\t\t\t\tString dirCode = character.getDirCode();\n\t\t\t\t\tString voicePath = \"c-\" + id + \"-\" + dirCode + \".mp3\";\n\n\t\t\t\t\tlGModelFlashCard.setId(id);\n\t\t\t\t\tlGModelFlashCard.setChinese(chinese);\n\t\t\t\t\tlGModelFlashCard.setPinyin(pinyin);\n\t\t\t\t\tlGModelFlashCard.setEnglish(english);\n\t\t\t\t\tlGModelFlashCard.setVoicePath(voicePath);\n\n\t\t\t\t\tdatas.add(lGModelFlashCard);\n\n\t\t\t\t} catch (SQLException 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\n\t\t\t}\n\t\t}\n\n\t\tif (isSentenceChecked) {\n\t\t\tfor (int i = 0; i < tbMySentenceList.size(); i++) {\n\n\t\t\t\tTbMySentence model = tbMySentenceList.get(i);\n\t\t\t\tif (model == null) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tLGModelFlashCard lGModelFlashCard = new LGModelFlashCard();\n\t\t\t\tint id = model.getSentenceId();\n\t\t\t\tlGModelFlashCard.setMySentence(model);\n\t\t\t\tlGModelFlashCard.setMyCharacter(null);\n\t\t\t\tlGModelFlashCard.setMyWord(null);\n\n\t\t\t\ttry {\n\t\t\t\t\t@SuppressWarnings(\"unchecked\")\n\t\t\t\t\tLGSentence sentence = (LGSentence) MyDao.getDao(\n\t\t\t\t\t\t\tLGSentence.class).queryForId(id);\n\n\t\t\t\t\tif (sentence == null) {\n\t\t\t\t\t\tLog.e(TAG, \"sentence==null\");\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tString chinese = sentence.getSentence();\n\t\t\t\t\tString pinyin = \"\";\n\t\t\t\t\tString english = sentence.getTranslations();\n\t\t\t\t\tString dirCode = sentence.getDirCode();\n\t\t\t\t\tString voicePath = \"s-\" + id + \"-\" + dirCode + \".mp3\";\n\n\t\t\t\t\tlGModelFlashCard.setId(id);\n\t\t\t\t\tlGModelFlashCard.setChinese(chinese);\n\t\t\t\t\tlGModelFlashCard.setPinyin(pinyin);\n\t\t\t\t\tlGModelFlashCard.setEnglish(english);\n\t\t\t\t\tlGModelFlashCard.setVoicePath(voicePath);\n\n\t\t\t\t\tdatas.add(lGModelFlashCard);\n\n\t\t\t\t} catch (SQLException 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\n\t\t\t}\n\t\t}\n\t\tif (isWordChecked) {\n\t\t\tfor (int i = 0; i < tbMyWordList.size(); i++) {\n\n\t\t\t\tTbMyWord model = tbMyWordList.get(i);\n\t\t\t\tif (model == null) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tLGModelFlashCard lGModelFlashCard = new LGModelFlashCard();\n\t\t\t\tint id = model.getWordId();\n\t\t\t\tlGModelFlashCard.setMyWord(model);\n\t\t\t\tlGModelFlashCard.setMySentence(null);\n\t\t\t\tlGModelFlashCard.setMyCharacter(null);\n\t\t\t\ttry {\n\t\t\t\t\t@SuppressWarnings(\"unchecked\")\n\t\t\t\t\tLGWord word = (LGWord) MyDao.getDao(LGWord.class)\n\t\t\t\t\t\t\t.queryForId(id);\n\n\t\t\t\t\tif (word == null) {\n\t\t\t\t\t\tLog.e(TAG, \"sentence==null\");\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tString chinese = word.getWord();\n\t\t\t\t\tString pinyin = word.getPinyin();\n\t\t\t\t\tString english = word.getTranslations();\n\t\t\t\t\tString dirCode = word.getDirCode();\n\t\t\t\t\tString voicePath = \"w-\" + id + \"-\" + dirCode + \".mp3\";\n\n\t\t\t\t\tlGModelFlashCard.setId(id);\n\t\t\t\t\tlGModelFlashCard.setChinese(chinese);\n\t\t\t\t\tlGModelFlashCard.setPinyin(pinyin);\n\t\t\t\t\tlGModelFlashCard.setEnglish(english);\n\t\t\t\t\tlGModelFlashCard.setVoicePath(voicePath);\n\n\t\t\t\t\tdatas.add(lGModelFlashCard);\n\n\t\t\t\t} catch (SQLException 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}\n\t\t}\n\n\t\tchooseCount = 0;\n\t\tif (isCharacterChecked) {\n\t\t\tchooseCount = chooseCount + characterCount;\n\t\t}\n\t\tif (isSentenceChecked) {\n\t\t\tchooseCount = chooseCount + sentenceCount;\n\t\t}\n\t\tif (isWordChecked) {\n\t\t\tchooseCount = chooseCount + wordsCount;\n\t\t}\n\t\tdefaultNumber = chooseCount;\n\t\tif (adapter == null) {\n\t\t\tadapter = new FlashCardOpGalleryAdapter(this, datas, datas.size());\n\t\t}\n\t\tadapter.notifyDataSetChanged();\n\t\tgallery = (FancyCoverFlow) findViewById(R.id.flash_gallery);\n\t\tgallery.setAdapter(adapter);\n\t\tgallery.setOnItemSelectedListener(this);\n\t\tgallery.setAnimationDuration(1500);\n\t\t// gallery.setSpacing(screenWidth / 10 * 1);\n\t\tgallery.setSelection(index);\n\t\tgallery.setFocusable(false);\n\t\tgallery.setGravity(Gravity.CENTER);\n\t\tgallery.setIsTouchMove(false);\n\t\tLinearLayout.LayoutParams param = new LinearLayout.LayoutParams(screenWidth, screenHeight * 6 / 10);\n\t\tgallery.setLayoutParams(param);\n\n\t}",
"public Kullanici() {}",
"@PostConstruct\n\tpublic void init() {\n\t\tvisitaSelecionada = new AgendamentoVisitas();\n\n\t}",
"private void init() {\n filmCollection = new FilmCollection();\n cameraCollection = new CameraCollection();\n }",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"protected void commonInit() {\r\n dataBinder = new DBTreeDataBinder(this);\r\n }",
"@SideOnly(Side.CLIENT)\n public static void initModels() {\n }",
"public ViewDetallesPagos () {\r\n\r\n }",
"@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\t@Transactional\n\n\tpublic void initCinemas() {\n\t\tvilleRepository.findAll().forEach(v->{\n\t\t\tStream.of(\"Megarama\",\"Pathé\",\"UGC\",\"MK2\").forEach(c->{\n\t\t\t\tCinema cinema=new Cinema();\n\t\t\t\tcinema.setName(c);\n\t\t\t\tcinema.setNombreSalles(3+(int) (Math.random()*7));\n\t\t\t\tcinema.setVille(v);\n\t\t\t\t\n\t\t\t cinemaRepository.save(cinema);\t\n\t\t\t});\n\t\t\t\n\t\t\t\n\t\t});\n\t}",
"public void initModel() {\n gunControl.initSmoke();\n }",
"public void init(){\n nomInscription = (EditText)findViewById(R.id.inscriptionNomEdit);\n prenomInscription = (EditText)findViewById(R.id.inscriptionPrenomEdit);\n mailInscription = (EditText)findViewById(R.id.inscriptionMailEdit);\n telInscription = (EditText)findViewById(R.id.inscriptionGSMEdit);\n mdpInscription = (EditText)findViewById(R.id.inscriptionPSWEdit);\n mdpConfirmation = (EditText)findViewById(R.id.inscriptionConfirmEdit);\n }",
"public TipoInformazioniController() {\n\n\t}",
"private void init() {\n\n\t}",
"public Controller(){\r\n\t\tthis.fabricaJogos = new JogoFactory();\r\n\t\tthis.loja = new Loja();\r\n\t\tthis.preco = 0;\r\n\t\tthis.desconto = 0;\r\n\t}",
"private synchronized void init(){\n _2_zum_vorbereiten.addAll(spielzeilenRepo.find_B_ZurVorbereitung());\n _3_vorbereitet.addAll(spielzeilenRepo.find_C_Vorbereitet());\n _4_spielend.addAll(spielzeilenRepo.find_D_Spielend());\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 void init() {\n\r\n\t}",
"public void init() {\n\r\n\t}",
"public Pasien() {\r\n }",
"public void inicializar() {\n\t\t// TODO Auto-generated method stub\n\t\tIDISFICHA=\"\";\n\t\tNOTAS=\"\";\n\t\tANOTACIONES=\"\";\n\t\tNOTAS_EJERCICIOS=\"\";\n\t}",
"@Override\n\tprotected void init() {\n\t\tsuper.init();\n\t\tsintaticoHelper = AnalisadorSintaticoHelper.getInstancia();\n\t\tsintaticoHelper.errors = \"\";\n\t\tsintaticoHelper.errosCount = 0;\n\t}"
] |
[
"0.7691702",
"0.7108476",
"0.7020334",
"0.69539857",
"0.6927436",
"0.68137294",
"0.6748749",
"0.67306215",
"0.66915524",
"0.6577933",
"0.65677446",
"0.65566593",
"0.6536825",
"0.6508342",
"0.64838123",
"0.6467426",
"0.64606535",
"0.6444089",
"0.6430845",
"0.64030814",
"0.639434",
"0.638149",
"0.63779336",
"0.63750094",
"0.63680935",
"0.63394827",
"0.63383",
"0.63342106",
"0.63228816",
"0.63228816",
"0.63144237",
"0.6313294",
"0.6308348",
"0.6296325",
"0.62917274",
"0.62892395",
"0.62600297",
"0.62596095",
"0.62506515",
"0.62496525",
"0.624306",
"0.6236141",
"0.62351125",
"0.6228338",
"0.62268114",
"0.622631",
"0.62195504",
"0.6213656",
"0.6206702",
"0.6200439",
"0.6195897",
"0.61916393",
"0.61870444",
"0.61829937",
"0.61818373",
"0.6179619",
"0.6174417",
"0.6163775",
"0.6158768",
"0.6157432",
"0.6154969",
"0.61433065",
"0.61404556",
"0.61369",
"0.6136679",
"0.6136679",
"0.6136679",
"0.61313206",
"0.6122122",
"0.6117976",
"0.61161315",
"0.61110187",
"0.610984",
"0.6109114",
"0.61060226",
"0.60984164",
"0.6094032",
"0.608939",
"0.6088977",
"0.60849667",
"0.60826194",
"0.6078007",
"0.60779124",
"0.6074947",
"0.60729903",
"0.60729903",
"0.60729903",
"0.6069674",
"0.6065756",
"0.6061118",
"0.6058587",
"0.60550004",
"0.60484046",
"0.6044314",
"0.60430497",
"0.6042365",
"0.6042365",
"0.60362196",
"0.603589",
"0.60332924"
] |
0.692997
|
4
|
throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
|
@Override
public ResultSet getByID(String id) throws SQLException {
return db.getConnection().createStatement().executeQuery("select * from comic where idcomic="+id);
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"private void habilitar() {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }",
"@Override\r\n\t\tpublic void action()\r\n\t\t{\r\n// throw new UnsupportedOperationException(\"Not supported yet.\");\r\n\t\t}",
"public void remove()\n/* */ {\n/* 99 */ throw new UnsupportedOperationException();\n/* */ }",
"public void remove()\n/* */ {\n/* 110 */ throw new UnsupportedOperationException();\n/* */ }",
"@Override\n public boolean isSupported() {\n return true;\n }",
"@Override\n public String toString() {\n throw new UnsupportedOperationException(\"implement me!\");\n }",
"private void cargartabla() {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }",
"private void HargaKamera() {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }",
"@Override\n public void remove() {\n throw new UnsupportedOperationException(); \n }",
"@Override\r\npublic int method() {\n\treturn 0;\r\n}",
"@Override\n\tpublic void remove() {\n\t\tthrow new UnsupportedOperationException();\t\t\n\t}",
"@Override\n\tpublic void remove() {\n\t\tthrow new UnsupportedOperationException();\t\t\n\t}",
"@Override\n public boolean isSupported() {\n return true;\n }",
"private static UnsupportedOperationException getModificationUnsupportedException()\n {\n throw new UnsupportedOperationException(\"Illegal operation. Specified list is unmodifiable.\");\n }",
"@Override\r\n public void remove() throws UnsupportedOperationException {\r\n throw new UnsupportedOperationException(\"Me ei poisteta\");\r\n }",
"Boolean mo1305n() {\n throw new UnsupportedOperationException(getClass().getSimpleName());\n }",
"@Override\n public void actionPerformed(ActionEvent e) {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }",
"public boolean isEnabled() {\n/* 945 */ throw new RuntimeException(\"Stub!\");\n/* */ }",
"@Override\r\n\t\t\tpublic void remove() {\r\n\t\t\t\tthrow new UnsupportedOperationException();\r\n\t\t\t}",
"@Override\r\n\t\tpublic void remove() {\r\n\t\t\tthrow new UnsupportedOperationException();\r\n\t\t}",
"void Salvar(String nome) {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }",
"protected void input_back(){\n throw new UnsupportedOperationException();\n }",
"@Override\n\tpublic void remove() {\n\t\tthrow new UnsupportedOperationException();\n\t}",
"public UnsupportedCycOperationException() {\n super();\n }",
"public int getListSelection() {\n/* 515 */ throw new RuntimeException(\"Stub!\");\n/* */ }",
"public void remove(){\r\n\t\t\tthrow new UnsupportedOperationException();\r\n\t\t}",
"@SuppressWarnings(\"static-method\")\n\tpublic void open() {\n\t\tthrow new UnsupportedOperationException();\n\t}",
"@Override\n\t\t\tpublic void remove() {\n\t\t\t\tthrow new UnsupportedOperationException();\n\t\t\t}",
"@Override\n public void remove() {\n throw new UnsupportedOperationException();\n }",
"@Override\n public void remove() {\n throw new UnsupportedOperationException();\n }",
"@Override\n public void remove() {\n throw new UnsupportedOperationException();\n }",
"private void atualizar_tbl_pro_profs() {\n throw new UnsupportedOperationException(\"Not supported yet.\");\n//To change body of generated methods, choose Tools | Templates.\n }",
"@Override\n\t/**\n\t * feature is not supported\n\t */\n\tpublic void remove() {\n\t}",
"@Override\n public void remove() {\n throw new UnsupportedOperationException();\n }",
"@Override\n public void remove() {\n throw new UnsupportedOperationException();\n }",
"public void remove() throws UnsupportedOperationException {\n\t\t\tthrow new UnsupportedOperationException(\"Myö ei poisteta\");\n\t\t}",
"private String printStackTrace() {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }",
"@Override\n public void makeVisible() {\n throw new UnsupportedOperationException(\"operation not supported\");\n }",
"public void _reportUnsupportedOperation() {\n StringBuilder sb = new StringBuilder();\n sb.append(\"Operation not supported by parser of type \");\n sb.append(getClass().getName());\n throw new UnsupportedOperationException(sb.toString());\n }",
"@Override\r\n public void actionPerformed(ActionEvent e) {\r\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\r\n }",
"public void remove() {\r\n \r\n throw new UnsupportedOperationException();\r\n }",
"public void showDropDown() {\n/* 592 */ throw new RuntimeException(\"Stub!\");\n/* */ }",
"public void remove() {\n\t\tthrow new UnsupportedOperationException();\n\t}",
"public void remove() {\n\t\tthrow new UnsupportedOperationException();\n\t}",
"public int zzef() {\n throw new UnsupportedOperationException();\n }",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n public String toString() {\n throw new UnsupportedOperationException();\n //TODO: Complete this method!\n }",
"@Override\n public void refresh() {\n throw new UnsupportedOperationException(\"operation not supported\");\n }",
"@Override\npublic boolean isEnabled() {\n\treturn false;\n}",
"@Override\n public String writeToString() {\n throw new UnsupportedOperationException();\n }",
"public boolean isImportantForAccessibility() {\n/* 1302 */ throw new RuntimeException(\"Stub!\");\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}",
"private String getText() {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }",
"@Deprecated\n/* */ public int getActions() {\n/* 289 */ throw new RuntimeException(\"Stub!\");\n/* */ }",
"@Override\n\tprotected Object clone() {\n\t\tthrow new UnsupportedOperationException();\n\t}",
"public String getDisplayVariant() {\n/* 656 */ throw new RuntimeException(\"Stub!\");\n/* */ }",
"@Override\n public boolean getObsolete()\n {\n return false;\n }",
"@Override\n public void close() {\n throw new UnsupportedOperationException(\"Not supported yet.\");\n }",
"public String getName() {\n/* 341 */ throw new RuntimeException(\"Stub!\");\n/* */ }",
"@Override\npublic boolean isEnabled() {\n\treturn true;\n}",
"public int mo1265e() {\n throw new UnsupportedOperationException(getClass().getSimpleName());\n }",
"public MissingMethodArgumentException() {\n }",
"public ListAdapter getAdapter() {\n/* 431 */ throw new RuntimeException(\"Stub!\");\n/* */ }",
"public CollectionItemInfo getCollectionItemInfo() {\n/* 1114 */ throw new RuntimeException(\"Stub!\");\n/* */ }",
"@Override\n public void cancel() {\n throw new UnsupportedOperationException();\n }",
"public CharSequence getContentDescription() {\n/* 1531 */ throw new RuntimeException(\"Stub!\");\n/* */ }",
"public void remove() {\n throw new UnsupportedOperationException();\r\n }",
"@Override\n public final void remove() {\n throw new UnsupportedOperationException();\n }",
"public void remove() {\n throw new UnsupportedOperationException();\n }",
"public void remove() {\n throw new UnsupportedOperationException();\n }",
"public void remove() {\r\n throw new UnsupportedOperationException();\r\n }",
"private ExampleVersion() {\n throw new UnsupportedOperationException(\"Illegal constructor call.\");\n }",
"public void remove() throws UnsupportedOperationException {\n\t\t\tthrow new UnsupportedOperationException( \"remove() Not implemented.\" );\n\t\t}",
"public boolean isSelected() {\n/* 3021 */ throw new RuntimeException(\"Stub!\");\n/* */ }",
"private void chk() {\n if (clist != null)\n throw new UnsupportedOperationException();\n }",
"public void remove() {\n\t\t\tthrow new UnsupportedOperationException();\n\t\t}",
"@Override\n\tpublic void e() {\n\n\t}",
"public boolean isEditable() {\n/* 1014 */ throw new RuntimeException(\"Stub!\");\n/* */ }",
"@Override\n\tpublic int method() {\n\t\treturn 0;\n\t}",
"private void m50366E() {\n }",
"@Deprecated\n\tprivate void oldCode()\n\t{\n\t}",
"public boolean mo1266f() {\n throw new UnsupportedOperationException(getClass().getSimpleName());\n }",
"public void remove() {\n throw new UnsupportedOperationException();\n }",
"@Override\n public void actionPerformed(ActionEvent ae) {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }",
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"private void someUtilityMethod() {\n }",
"private void someUtilityMethod() {\n }",
"public void remove() {\n throw new UnsupportedOperationException();\n }",
"public void remove() {\n throw new UnsupportedOperationException();\n }",
"private CollectionUtils() {\n\t\tthrow new UnsupportedOperationException();\n\t}",
"default boolean isDeprecated() {\n return false;\n }",
"public String formNotImplemented()\r\n {\r\n return formError(\"501 Method not implemented\",\"Service not implemented, programer was lazy\");\r\n }",
"@Override\n\tpublic String getMoreInformation() {\n\t\tthrow new UnsupportedOperationException();\n\t}",
"public void m23075a() {\n }",
"private void setText() {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }",
"@Override\n\tpublic void dosomething() {\n\t\t\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"public int getObjectPropCode() {\n/* 108 */ throw new RuntimeException(\"Stub!\");\n/* */ }",
"public void toggle() {\n/* 135 */ throw new RuntimeException(\"Stub!\");\n/* */ }",
"public String getSuggestSelection() {\n/* 113 */ throw new RuntimeException(\"Stub!\");\n/* */ }"
] |
[
"0.7744652",
"0.73749053",
"0.6966527",
"0.6909395",
"0.67964953",
"0.6773559",
"0.6771067",
"0.6654384",
"0.66389716",
"0.6624263",
"0.6609339",
"0.6609339",
"0.65914184",
"0.6586954",
"0.6555998",
"0.6499744",
"0.6462636",
"0.64495736",
"0.64296776",
"0.6419897",
"0.6382666",
"0.63818693",
"0.63796616",
"0.63749474",
"0.6362977",
"0.636036",
"0.63596714",
"0.6353923",
"0.6334584",
"0.6334584",
"0.6334584",
"0.6330838",
"0.6324835",
"0.6323451",
"0.6323451",
"0.63148075",
"0.629012",
"0.6280384",
"0.6277155",
"0.6273978",
"0.62646115",
"0.6245552",
"0.62258106",
"0.62258106",
"0.6219513",
"0.6203273",
"0.62024796",
"0.6200088",
"0.6199513",
"0.61933196",
"0.61925113",
"0.6179876",
"0.6179876",
"0.616379",
"0.6162549",
"0.6161032",
"0.6143854",
"0.6126567",
"0.6125385",
"0.6122703",
"0.61223984",
"0.6113832",
"0.61117774",
"0.610708",
"0.61012566",
"0.6090525",
"0.60898113",
"0.60887575",
"0.6087027",
"0.60860145",
"0.60860145",
"0.60802037",
"0.60587925",
"0.60574937",
"0.6048819",
"0.60460234",
"0.60427284",
"0.6024831",
"0.6021711",
"0.60165054",
"0.60164917",
"0.60145986",
"0.6008991",
"0.6007108",
"0.5997761",
"0.5995581",
"0.59879506",
"0.59879506",
"0.5985853",
"0.5985853",
"0.59836394",
"0.5981447",
"0.5977667",
"0.5969774",
"0.59676147",
"0.59659356",
"0.59650296",
"0.5964039",
"0.5955716",
"0.59521776",
"0.59496826"
] |
0.0
|
-1
|
Inflate the menu; this adds items to the action bar if it is present.
|
@Override
public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(R.menu.profilemenu, menu);
return true;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n \tMenuInflater inflater = getMenuInflater();\n \tinflater.inflate(R.menu.main_activity_actions, menu);\n \treturn super.onCreateOptionsMenu(menu);\n }",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n inflater.inflate(R.menu.actions, menu);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n \tgetMenuInflater().inflate(R.menu.actions, menu);\n \treturn super.onCreateOptionsMenu(menu);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.actions_bar, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main_actions, menu);\n\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\r\n\t\tinflater.inflate(R.menu.action_bar_menu, menu);\r\n\t\tmMenu = menu;\r\n\t\treturn super.onCreateOptionsMenu(menu);\r\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.act_bar_menu, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\r\n inflater.inflate(R.menu.main_actions, menu);\r\n\t\treturn true;\r\n //return super.onCreateOptionsMenu(menu);\r\n\t}",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t MenuInflater inflater = getMenuInflater();\r\n\t inflater.inflate(R.menu.action_bar_all, menu);\r\n\t return super.onCreateOptionsMenu(menu);\r\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(android.view.Menu menu) {\n\t\t super.onCreateOptionsMenu(menu);\n\t\tMenuInflater muu= getMenuInflater();\n\t\tmuu.inflate(R.menu.cool_menu, menu);\n\t\treturn true;\n\t\t\n\t\t\n\t}",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.adventure_archive, menu);\r\n\t\treturn true;\r\n\t}",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.archive_menu, menu);\r\n\t\treturn true;\r\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n \tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n \t\tinflater.inflate(R.menu.main, menu);\n \t\tsuper.onCreateOptionsMenu(menu, inflater);\n \t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t MenuInflater inflater = getMenuInflater();\n\t inflater.inflate(R.menu.action_menu, menu);\n\t return super.onCreateOptionsMenu(menu);\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tsuper.onCreateOptionsMenu(menu);\n\t\tMenuInflater bow=getMenuInflater();\n\t\tbow.inflate(R.menu.menu, menu);\n\t\treturn true;\n\t\t}",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n inflater.inflate(R.menu.action_menu, menu);\n super.onCreateOptionsMenu(menu, inflater);\n }",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}",
"@Override\t\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\t\t\n\t\t/* Inflate the menu; this adds items to the action bar if it is present */\n\t\tgetMenuInflater().inflate(R.menu.act_main, menu);\t\t\n\t\treturn true;\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflate = getMenuInflater();\n inflate.inflate(R.menu.menu, ApplicationData.amvMenu.getMenu());\n return true;\n }",
"@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.menu, menu);\n\t\t\treturn true; \n\t\t\t\t\t\n\t\t}",
"@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tinflater.inflate(R.menu.main, menu);\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);//Menu Resource, Menu\n return true;\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);//Menu Resource, Menu\n return true;\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) \n {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu_bar, menu);\n return true;\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu_item, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tinflater.inflate(R.menu.menu, menu);\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t MenuInflater inflater = getMenuInflater();\n\t inflater.inflate(R.menu.menu, menu);\n\t return super.onCreateOptionsMenu(menu);\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t inflater.inflate(R.menu.menu, menu);\n\t \n\t\treturn super.onCreateOptionsMenu(menu);\n\t}",
"@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t\t//menu.clear();\n\t\tinflater.inflate(R.menu.soon_to_be, menu);\n\t\t//getActivity().getActionBar().show();\n\t\t//getActivity().getActionBar().setBackgroundDrawable(\n\t\t\t\t//new ColorDrawable(Color.rgb(223, 160, 23)));\n\t\t//return true;\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n this.getMenuInflater().inflate(R.menu.main, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n inflater.inflate(R.menu.main, menu);\n }",
"@Override\n\tpublic void onCreateOptionsMenu( Menu menu, MenuInflater inflater )\n\t{\n\t\tsuper.onCreateOptionsMenu( menu, inflater );\n\t}",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\r\n\t\treturn super.onCreateOptionsMenu(menu);\r\n\t}",
"@Override\r\n public boolean onCreateOptionsMenu(Menu menu) {\r\n \t// We must call through to the base implementation.\r\n \tsuper.onCreateOptionsMenu(menu);\r\n \t\r\n MenuInflater inflater = getMenuInflater();\r\n inflater.inflate(R.menu.main_menu, menu);\r\n\r\n return true;\r\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main, menu);//Menu Resource, Menu\n return true;\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main, menu);//Menu Resource, Menu\n return true;\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater= getMenuInflater();\n inflater.inflate(R.menu.menu_main, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n inflater.inflate(R.menu.inter_main, menu);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.action, menu);\n\t\treturn true;\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public boolean onCreateOptionsMenu (Menu menu){\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu_main, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.custom_action_bar, menu);\n\t\treturn true;\n\t}",
"public void initMenubar() {\n\t\tremoveAll();\n\n\t\t// \"File\"\n\t\tfileMenu = new FileMenuD(app);\n\t\tadd(fileMenu);\n\n\t\t// \"Edit\"\n\t\teditMenu = new EditMenuD(app);\n\t\tadd(editMenu);\n\n\t\t// \"View\"\n\t\t// #3711 viewMenu = app.isApplet()? new ViewMenu(app, layout) : new\n\t\t// ViewMenuApplicationD(app, layout);\n\t\tviewMenu = new ViewMenuApplicationD(app, layout);\n\t\tadd(viewMenu);\n\n\t\t// \"Perspectives\"\n\t\t// if(!app.isApplet()) {\n\t\t// perspectivesMenu = new PerspectivesMenu(app, layout);\n\t\t// add(perspectivesMenu);\n\t\t// }\n\n\t\t// \"Options\"\n\t\toptionsMenu = new OptionsMenuD(app);\n\t\tadd(optionsMenu);\n\n\t\t// \"Tools\"\n\t\ttoolsMenu = new ToolsMenuD(app);\n\t\tadd(toolsMenu);\n\n\t\t// \"Window\"\n\t\twindowMenu = new WindowMenuD(app);\n\n\t\tadd(windowMenu);\n\n\t\t// \"Help\"\n\t\thelpMenu = new HelpMenuD(app);\n\t\tadd(helpMenu);\n\n\t\t// support for right-to-left languages\n\t\tapp.setComponentOrientation(this);\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tsuper.onCreateOptionsMenu(menu);\n\t\tMenuInflater blowUp=getMenuInflater();\n\t\tblowUp.inflate(R.menu.welcome_menu, menu);\n\t\treturn true;\n\t}",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.listing, menu);\r\n\t\treturn true;\r\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.item, menu);\n return true;\n }",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.resource, menu);\n\t\treturn true;\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater= getMenuInflater();\n inflater.inflate(R.menu.menu,menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.home_action_bar, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.template, menu);\n\t\treturn true;\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n Log.d(\"onCreateOptionsMenu\", \"create menu\");\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.socket_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main_menu, menu);//Menu Resource, Menu\n\n return true;\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.actionbar, menu);\n return true;\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(toolbar_res, menu);\n updateMenuItemsVisibility(menu);\n return true;\n }",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t// \n\t\tMenuInflater mi = getMenuInflater();\n\t\tmi.inflate(R.menu.thumb_actv_menu, menu);\n\t\t\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}",
"@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}",
"@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}",
"@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n }",
"@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t\t}",
"@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t\t}",
"@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.swag_list_activity_menu, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_menu, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n\tpublic boolean onCreateOptionsMenu(android.view.Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\n\t\treturn true;\n\t}",
"@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.jarvi, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}",
"public void onCreateOptionsMenu(Menu menu, MenuInflater inflater){\n }",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater menuInflater) {\n menuInflater.inflate(R.menu.main, menu);\n\n }",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.add__listing, menu);\r\n\t\treturn true;\r\n\t}",
"@Override\r\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.actmain, menu);\r\n return true;\r\n }",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.buat_menu, menu);\n\t\treturn true;\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.layout.menu, menu);\n\t\treturn true;\n\t}",
"@Override\npublic boolean onCreateOptionsMenu(Menu menu) {\n\n\t\n\t\n\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\n\treturn super.onCreateOptionsMenu(menu);\n}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.ichat, menu);\n\t\treturn true;\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater)\n\t{\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t\tinflater.inflate(R.menu.expenses_menu, menu);\n\t}",
"@Override\n \tpublic boolean onCreateOptionsMenu(Menu menu) {\n \t\tgetMenuInflater().inflate(R.menu.main, menu);\n \t\treturn true;\n \t}",
"@Override\n \tpublic boolean onCreateOptionsMenu(Menu menu) {\n \t\tgetMenuInflater().inflate(R.menu.main, menu);\n \t\treturn true;\n \t}",
"@Override\n \tpublic boolean onCreateOptionsMenu(Menu menu) {\n \t\tgetMenuInflater().inflate(R.menu.main, menu);\n \t\treturn true;\n \t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.action_bar, menu);\n return true;\n }",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tsuper.onCreateOptionsMenu(menu);\n\t\tMenuInflater blowUp = getMenuInflater();\n\t\tblowUp.inflate(R.menu.status, menu);\n\t\treturn true;\n\t}",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.menu, menu);\r\n\t\treturn true;\r\n\t}",
"@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn true;\n\t}",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.ui_main, menu);\r\n\t\treturn true;\r\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main_activity_actions, menu);\n return true;\n }",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n inflater.inflate(R.menu.menu_main, menu);\n super.onCreateOptionsMenu(menu, inflater);\n }",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n inflater.inflate(R.menu.menu_main, menu);\n super.onCreateOptionsMenu(menu, inflater);\n }"
] |
[
"0.7246102",
"0.7201358",
"0.7194834",
"0.7176498",
"0.71066517",
"0.7039537",
"0.7037961",
"0.70112145",
"0.70094734",
"0.69807225",
"0.6944953",
"0.69389373",
"0.6933199",
"0.6916928",
"0.6916928",
"0.6891486",
"0.68831646",
"0.68754137",
"0.68745375",
"0.68621665",
"0.68621665",
"0.68621665",
"0.68621665",
"0.68515885",
"0.68467957",
"0.68194443",
"0.6817494",
"0.6813087",
"0.6813087",
"0.6812847",
"0.6805774",
"0.6801204",
"0.6797914",
"0.6791314",
"0.6789091",
"0.67883503",
"0.6783642",
"0.6759701",
"0.6757412",
"0.67478645",
"0.6744127",
"0.6744127",
"0.67411774",
"0.6740183",
"0.6726017",
"0.6723245",
"0.67226785",
"0.67226785",
"0.67208904",
"0.67113477",
"0.67079866",
"0.6704564",
"0.6699229",
"0.66989094",
"0.6696622",
"0.66952467",
"0.66865396",
"0.6683476",
"0.6683476",
"0.6682188",
"0.6681209",
"0.6678941",
"0.66772443",
"0.6667702",
"0.66673946",
"0.666246",
"0.6657578",
"0.6657578",
"0.6657578",
"0.6656586",
"0.66544783",
"0.66544783",
"0.66544783",
"0.66524047",
"0.6651954",
"0.6650132",
"0.66487855",
"0.6647077",
"0.66467404",
"0.6646615",
"0.66464466",
"0.66449624",
"0.6644209",
"0.6643461",
"0.6643005",
"0.66421187",
"0.6638628",
"0.6634786",
"0.6633529",
"0.6632049",
"0.6632049",
"0.6632049",
"0.66315657",
"0.6628954",
"0.66281766",
"0.6627182",
"0.6626297",
"0.6624309",
"0.6619582",
"0.6618876",
"0.6618876"
] |
0.0
|
-1
|
Handle action bar item clicks here. The action bar will automatically handle clicks on the Home/Up button, so long as you specify a parent activity in AndroidManifest.xml.
|
@Override
public boolean onOptionsItemSelected(MenuItem item) {
int id = item.getItemId();
if (id == R.id.action_settings) {
return true;
} else if (id == R.id.pieProfile) {
startActivity(new Intent(this, ActivityInfo.class));
return true;
}
return super.onOptionsItemSelected(item);
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"@Override\n public boolean onOptionsItemSelected(MenuItem item) { Handle action bar item clicks here. The action bar will\n // automatically handle clicks on the Home/Up button, so long\n // as you specify a parent activity in AndroidManifest.xml.\n\n //\n // HANDLE BACK BUTTON\n //\n int id = item.getItemId();\n if (id == android.R.id.home) {\n // Back button clicked\n this.finish();\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n // app icon in action bar clicked; goto parent activity.\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n // Respond to the action bar's Up/Home button\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }",
"@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n switch (id) {\r\n case android.R.id.home:\r\n // app icon in action bar clicked; go home\r\n this.finish();\r\n return true;\r\n default:\r\n return super.onOptionsItemSelected(item);\r\n }\r\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n // app icon in action bar clicked; go home\n finish();\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n Log.e(\"clik\", \"action bar clicked\");\n finish();\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n\t public boolean onOptionsItemSelected(MenuItem item) {\n\t int id = item.getItemId();\n\t \n\t\t\tif (id == android.R.id.home) {\n\t\t\t\t// Respond to the action bar's Up/Home button\n\t\t\t\t// NavUtils.navigateUpFromSameTask(this);\n\t\t\t\tonBackPressed();\n\t\t\t\treturn true;\n\t\t\t}\n\t \n\t \n\t return super.onOptionsItemSelected(item);\n\t }",
"@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\r\n switch (item.getItemId()) {\r\n // Respond to the action bar's Up/Home button\r\n case android.R.id.home:\r\n finish();\r\n return true;\r\n }\r\n return super.onOptionsItemSelected(item);\r\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n // Respond to the action bar's Up/Home button\n case android.R.id.home:\n finish();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n\n switch (item.getItemId()) {\n case android.R.id.home:\n\n // app icon in action bar clicked; goto parent activity.\n this.finish();\n return true;\n default:\n\n return super.onOptionsItemSelected(item);\n\n }\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n\n switch (item.getItemId()) {\n case android.R.id.home:\n\n // app icon in action bar clicked; goto parent activity.\n this.finish();\n return true;\n default:\n\n return super.onOptionsItemSelected(item);\n\n }\n }",
"@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tonBackPressed();\n\t\t\treturn true;\n\t\tdefault:\n\t\t\treturn super.onOptionsItemSelected(item);\n\t\t}\n\t}",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n // Handle presses on the action bar items\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n case R.id.action_clear:\n return true;\n case R.id.action_done:\n\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n switch (id) {\n case android.R.id.home:\n onActionHomePressed();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id) {\n case android.R.id.home:\n onBackPressed();\n break;\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n switch (id) {\n case android.R.id.home:\n onBackPressed();\n break;\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n switch (item.getItemId())\n {\n case android.R.id.home :\n super.onBackPressed();\n break;\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId ()) {\n case android.R.id.home:\n onBackPressed ();\n return true;\n\n default:\n break;\n }\n return super.onOptionsItemSelected ( item );\n }",
"@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t switch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\t// app icon in action bar clicked; go home \n\t\t\tIntent intent = new Intent(this, Kelutral.class); \n\t\t\tintent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); \n\t\t\tstartActivity(intent); \n\t\t\treturn true;\t\t\n\t case R.id.Search:\n\t \treturn onSearchRequested();\n\t\tcase R.id.AppInfo:\n\t\t\t// Place holder menu item\n\t\t\tIntent newIntent = new Intent(Intent.ACTION_VIEW,\n\t\t\t\t\tUri.parse(\"http://forum.learnnavi.org/mobile-apps/\"));\n\t\t\tstartActivity(newIntent);\n\t\t\treturn true;\n\t\tcase R.id.Preferences:\n\t\t\tnewIntent = new Intent(getBaseContext(), Preferences.class);\n\t\t\tstartActivity(newIntent);\n\t\t\treturn true;\t\n\t }\n\t return false;\n\t}",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n\n case android.R.id.home:\n onBackPressed();\n return true;\n\n }\n return super.onOptionsItemSelected(item);\n\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n\n default:\n return super.onOptionsItemSelected(item);\n }\n\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n // Intent homeIntent = new Intent(this, MainActivity.class);\n // homeIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n // startActivity(homeIntent);\n finish();\n return true;\n default:\n return (super.onOptionsItemSelected(item));\n }\n\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n // setResult and close the activity when Action Bar Up Button clicked.\n if (item.getItemId() == android.R.id.home) {\n setResult(RESULT_CANCELED);\n finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n // This ID represents the Home or Up button. In the case of this\n // activity, the Up button is shown. Use NavUtils to allow users\n // to navigate up one level in the application structure. For\n // more details, see the Navigation pattern on Android Design:\n //\n // http://developer.android.com/design/patterns/navigation.html#up-vs-back\n //\n \tgetActionBar().setDisplayHomeAsUpEnabled(false);\n \tgetFragmentManager().popBackStack();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n switch (item.getItemId()) {\n case android.R.id.home:\n super.onBackPressed();\n return true;\n\n default:\n // If we got here, the user's action was not recognized.\n // Invoke the superclass to handle it.\n return super.onOptionsItemSelected(item);\n\n }\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if(id == android.R.id.home){\n onBackPressed();\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n\n }\n\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }",
"@RequiresApi(api = Build.VERSION_CODES.M)\n @Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n break;\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n\n default:\n return super.onOptionsItemSelected(item);\n }\n }",
"@Override\r\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tif(item.getItemId()==android.R.id.home)\r\n\t\t{\r\n\t\t\tgetActivity().onBackPressed();\r\n\t\t}\r\n\t\treturn super.onOptionsItemSelected(item);\r\n\t}",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n if(item.getItemId()==android.R.id.home){\n super.onBackPressed();\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id) {\n case android.R.id.home:\n onBackPressed();\n return false;\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n //Back arrow\n case android.R.id.home:\n onBackPressed();\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n // android.R.id.home是Android内置home按钮的id\n finish();\n break;\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n super.onBackPressed();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n this.onBackPressed();\n return false;\n }\n return false;\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n // Handle action bar item clicks here. The action bar will\n // automatically handle clicks on the Home/Up button, so long\n // as you specify a parent activity in AndroidManifest.xml.\n int id = item.getItemId();\n\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\r\n switch (item.getItemId()) {\r\n\r\n case android.R.id.home:\r\n /*Intent i= new Intent(getApplication(), MainActivity.class);\r\n i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TOP);\r\n startActivity(i);*/\r\n onBackPressed();\r\n finish();\r\n return true;\r\n default:\r\n return super.onOptionsItemSelected(item);\r\n }\r\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id){\n case android.R.id.home:\n this.finish();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n // Pass the event to ActionBarDrawerToggle, if it returns\n // true, then it has handled the app icon touch event\n if (mDrawerToggle.onOptionsItemSelected(item)) {\n return true;\n }\n\n // Handle your other action bar items...\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n // Respond to the action bar's Up/Home button\n case android.R.id.home:\n NavUtils.navigateUpFromSameTask(getActivity());\n return true;\n case R.id.action_settings:\n Intent i = new Intent(getActivity(), SettingsActivity.class);\n startActivity(i);\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n //Fixes the Up Button\n if(id == android.R.id.home) {\n BuildRoute.this.finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()){\n case android.R.id.home:\n onBackPressed();\n break;\n }\n return true;\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n\n if (id == android.R.id.home) {\n NavUtils.navigateUpFromSameTask(this);\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\r\n case android.R.id.home:\r\n onBackPressed();\r\n break;\r\n }\r\n return true;\r\n }",
"@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tif (item.getItemId() == android.R.id.home) {\n\t\t\tfinish();\n\t\t}\n\t\treturn super.onOptionsItemSelected(item);\n\t}",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n onBackPressed();\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n if ( id == android.R.id.home ) {\r\n finish();\r\n return true;\r\n }\r\n return super.onOptionsItemSelected(item);\r\n }",
"@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == R.id.home) {\r\n NavUtils.navigateUpFromSameTask(this);\r\n return true;\r\n }\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == R.id.action_about) {\r\n AboutDialog();\r\n return true;\r\n }\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == R.id.action_exit) {\r\n finish();\r\n return true;\r\n }\r\n\r\n\r\n return super.onOptionsItemSelected(item);\r\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n\n this.finish();\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n\n this.finish();\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n//noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n// finish the activity\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item)\n {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if( id == android.R.id.home ) // Back button of the actionbar\n {\n finish();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\r\n\t\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\t\tswitch (item.getItemId()) {\r\n\t\t\tcase android.R.id.home:\r\n\t\t\t\tfinish();\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\treturn super.onOptionsItemSelected(item);\r\n\t\t}",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n\n this.finish();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n if (item.getItemId() == android.R.id.home) {\n onBackPressed();\n return true;\n }\n return false;\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n\n if(id == android.R.id.home){\n finish();\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\r\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\r\n\t\tcase android.R.id.home:\r\n\t\t\tsetResult(RESULT_OK, getIntent());\r\n\t\t\tfinish();\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\treturn true;\r\n\t}",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n if (item.getItemId() == android.R.id.home) {\n finish();\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n finish();\n return true;\n default:\n // If we got here, the user's action was not recognized.\n // Invoke the superclass to handle it.\n return super.onOptionsItemSelected(item);\n\n }\n }",
"@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tfinish();\n\t\t\tbreak;\n\n\t\t}\n\t\treturn super.onOptionsItemSelected(item);\n\t}",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id) {\n\n case android.R.id.home:\n this.finish();\n return true;\n }\n return true;\n }",
"@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tfinish();\n\t\t\tbreak;\n\n\t\tdefault:\n\t\t\tbreak;\n\t\t}\n\t\treturn super.onOptionsItemSelected(item);\n\t}",
"@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tint id = item.getItemId();\n\t\tif (id == android.R.id.home) {\n\t\t\tfinish();\n\t\t\treturn true;\n\t\t}\n\t\treturn super.onOptionsItemSelected(item);\n\t}",
"@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n if (id == android.R.id.home) {\r\n finish();\r\n return true;\r\n }\r\n return super.onOptionsItemSelected(item);\r\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n //NavUtils.navigateUpFromSameTask(this);\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n // todo: goto back activity from here\n finish();\n return true;\n\n default:\n return super.onOptionsItemSelected(item);\n }\n }",
"@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\r\n // Handle item selection\r\n switch (item.getItemId()) {\r\n case android.R.id.home:\r\n onBackPressed();\r\n return true;\r\n\r\n case me.cchiang.lookforthings.R.id.action_sample:\r\n// Snackbar.make(parent_view, item.getTitle() + \" Clicked \", Snackbar.LENGTH_SHORT).show();\r\n return true;\r\n default:\r\n return super.onOptionsItemSelected(item);\r\n }\r\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n finish();\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n finish();\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n finish();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n\n\n }",
"@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tonBackPressed();\n\t\t\treturn true;\n\t\tcase R.id.scan_menu:\n\t\t\tonScan();\n\t\t\tbreak;\n\t\tcase R.id.opt_about:\n\t\t\t//onAbout();\n\t\t\tbreak;\n\t\tcase R.id.opt_exit:\n\t\t\tfinish();\n\t\t\tbreak;\n\t\tdefault:\n\t\t\treturn super.onOptionsItemSelected(item);\n\t\t}\n\t\treturn true;\n\t}",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n super.onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id) {\n case android.R.id.home:\n this.finish();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }",
"@Override\n public boolean onOptionsItemSelected(@NonNull MenuItem item) {\n if (item.getItemId() == android.R.id.home) {\n onBackPressed();\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n switch (id) {\n case android.R.id.home:\n finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n\n case android.R.id.home:\n finish();\n return true;\n\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if(id==android.R.id.home){\n finish();\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\r\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\r\n\t switch (item.getItemId()) {\r\n\t \t// back to previous page\r\n\t case android.R.id.home:\r\n\t finish();\r\n\t return true;\r\n\t }\r\n\t return super.onOptionsItemSelected(item);\r\n\t}",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n finish();\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == android.R.id.home) {\r\n // finish the activity\r\n onBackPressed();\r\n return true;\r\n }\r\n\r\n return super.onOptionsItemSelected(item);\r\n }",
"@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == android.R.id.home) {\r\n // finish the activity\r\n onBackPressed();\r\n return true;\r\n }\r\n\r\n return super.onOptionsItemSelected(item);\r\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId())\n {\n case android.R.id.home:\n this.finish();\n return (true);\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id){\n case R.id.home:{\n NavUtils.navigateUpFromSameTask(this);\n return true;\n }\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n switch(item.getItemId())\n {\n case android.R.id.home:\n super.onBackPressed();\n break;\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tfinish();\n\t\t\treturn true;\n\n\t\tdefault:\n\t\t\treturn super.onOptionsItemSelected(item);\n\t\t}\n\t}",
"@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n\r\n int id = item.getItemId();\r\n if(id==android.R.id.home){\r\n finish();\r\n return true;\r\n }\r\n return super.onOptionsItemSelected(item);\r\n }"
] |
[
"0.79043454",
"0.7805307",
"0.7766523",
"0.7726966",
"0.76315224",
"0.7621912",
"0.758477",
"0.75306976",
"0.74880254",
"0.74575543",
"0.74575543",
"0.7438532",
"0.7421883",
"0.7402763",
"0.73917615",
"0.7386916",
"0.7379295",
"0.7370095",
"0.7362524",
"0.7355668",
"0.73453736",
"0.7341163",
"0.73305136",
"0.7328424",
"0.7326022",
"0.73185575",
"0.7316514",
"0.73133105",
"0.73039705",
"0.73039705",
"0.73018175",
"0.72980475",
"0.7293134",
"0.7286246",
"0.7283366",
"0.72808856",
"0.72785276",
"0.7259704",
"0.7259704",
"0.7259704",
"0.7259644",
"0.72593737",
"0.7249992",
"0.72239757",
"0.7219266",
"0.7216562",
"0.7204262",
"0.72002286",
"0.7200063",
"0.71934915",
"0.7184896",
"0.717771",
"0.7168381",
"0.71673703",
"0.71539783",
"0.7153406",
"0.71359825",
"0.7134769",
"0.7134769",
"0.71291566",
"0.71290356",
"0.7124105",
"0.71230125",
"0.71229",
"0.7121768",
"0.7117213",
"0.7117213",
"0.7117213",
"0.7117213",
"0.71171486",
"0.71170366",
"0.71167237",
"0.7114887",
"0.71122557",
"0.7109733",
"0.71086675",
"0.71055007",
"0.7099629",
"0.70980704",
"0.7096012",
"0.7093658",
"0.7093658",
"0.708592",
"0.7082855",
"0.70810896",
"0.7080205",
"0.7073979",
"0.70682657",
"0.7061635",
"0.7059869",
"0.70598",
"0.70514536",
"0.7037983",
"0.7037983",
"0.70357627",
"0.7035278",
"0.7035278",
"0.7032543",
"0.70311016",
"0.7029504",
"0.70182127"
] |
0.0
|
-1
|
END Google Play Services connection callbacks section //
|
public void toEvents(View v) {
startActivity(new Intent(this, EventswipeActivity.class));
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"@Override\n public void onConnectionFailed(@NonNull ConnectionResult connectionResult) {\n Log.d(\"MainActivity\", \"onConnectionFailed:\" + connectionResult);\n Toast.makeText(this, \"Google Play Services error.\", Toast.LENGTH_SHORT).show();\n }",
"@Override\n public void onConnectionFailed(ConnectionResult connectionResult) {\n Toast.makeText(this,\n \"Could not connect to Google API Client: Error \" + connectionResult.getErrorCode(),\n Toast.LENGTH_SHORT).show();\n }",
"@Override\n public void onConnectionFailed(@NonNull ConnectionResult connectionResult) {\n Log.d(TAG, \"onConnectionFailed:\" + connectionResult);\n Toast.makeText(this, \"Google Play Services error.\", Toast.LENGTH_SHORT).show();\n }",
"@Override\n public void onConnectionFailed(@NonNull ConnectionResult connectionResult) {\n Log.d(TAG, \"onConnectionFailed:\" + connectionResult);\n Toast.makeText(this, \"Google Play Services error.\", Toast.LENGTH_SHORT).show();\n }",
"@Override\n public void onConnectionFailed(@NonNull ConnectionResult connectionResult) {\n Log.d(TAG, \"onConnectionFailed:\" + connectionResult);\n Toast.makeText(this, \"Google Play Services error.\", Toast.LENGTH_SHORT).show();\n }",
"@Override\n public void onConnectionFailed(@NonNull ConnectionResult connectionResult) {\n Log.d(TAG, \"onConnectionFailed:\" + connectionResult);\n Toast.makeText(this, \"Google Play Services error.\", Toast.LENGTH_SHORT).show();\n }",
"@Override\n public void onConnectionFailed(@NonNull ConnectionResult connectionResult) {\n Log.d(TAG, \"onConnectionFailed:\" + connectionResult);\n Toast.makeText(this, \"Google Play Services error.\", Toast.LENGTH_SHORT).show();\n }",
"@Override\n public void onConnectionFailed(@NonNull ConnectionResult connectionResult) {\n Log.d(TAG, \"onConnectionFailed:\" + connectionResult);\n Toast.makeText(this, \"Google Play Services error.\", Toast.LENGTH_SHORT).show();\n }",
"@Override\n public void onConnectionFailed(@NonNull ConnectionResult connectionResult) {\n Log.d(TAG, \"onConnectionFailed:\" + connectionResult);\n Toast.makeText(this, \"Google Play Services error.\", Toast.LENGTH_SHORT).show();\n }",
"@Override\n public void onConnectionFailed(@NonNull ConnectionResult connectionResult) {\n Log.e(TAG, \"onConnectionFailed:\" + connectionResult);\n Toast.makeText(this, \"Google Play Services error.\", Toast.LENGTH_SHORT).show();\n }",
"private void acquireGooglePlayServices() {\n GoogleApiAvailability apiAvailability =\n GoogleApiAvailability.getInstance();\n final int connectionStatusCode =\n apiAvailability.isGooglePlayServicesAvailable(mActivity);\n if (apiAvailability.isUserResolvableError(connectionStatusCode)) {\n Log.d(Util.TAG_GOOGLE, \"\" + connectionStatusCode);\n // showGooglePlayServicesAvailabilityErrorDialog(connectionStatusCode);\n }\n }",
"@Override\n public void onConnectionFailed(@NonNull ConnectionResult connectionResult) {\n Log.d(\"LoginActivity\", \"onConnectionFailed:\" + connectionResult);\n Toast.makeText(this, \"Google Play Services error.\", Toast.LENGTH_SHORT).show();\n }",
"@Override\n public void onConnectionFailed(ConnectionResult result) {\n // An unresolvable error has occurred and a connection to Google APIs\n // could not be established. Display an error message, or handle\n // the failure silently\n }",
"private void acquireGooglePlayServices() {\r\n GoogleApiAvailability apiAvailability = GoogleApiAvailability.getInstance();\r\n final int connectionStatusCode = apiAvailability.isGooglePlayServicesAvailable(getActivity());\r\n if (apiAvailability.isUserResolvableError(connectionStatusCode)) {\r\n showGooglePlayServicesAvailabilityErrorDialog(connectionStatusCode);\r\n }\r\n }",
"@Override\n public void onConnectionFailed(@NonNull ConnectionResult connectionResult) {\n Toast.makeText(getBaseContext(), R.string.google_api_client_connection_failed, Toast.LENGTH_LONG).show();\n googleApiClient.connect();\n }",
"@Override\n protected void onStart() {\n super.onStart();\n\n\n GoogleApiAvailability GMS_Availability = GoogleApiAvailability.getInstance();\n int GMS_CheckResult = GMS_Availability.isGooglePlayServicesAvailable(this);\n\n if (GMS_CheckResult != ConnectionResult.SUCCESS) {\n\n // Would show a dialog to suggest user download GMS through Google Play\n GMS_Availability.getErrorDialog(this, GMS_CheckResult, 1).show();\n }else{\n mGoogleApiClient.connect();\n }\n }",
"@Override\n public void onConnectionSuspended(int i) {\n Log.d(TAG, \"Play services connection suspended\");\n }",
"private void acquireGooglePlayServices() {\n GoogleApiAvailability apiAvailability =\n GoogleApiAvailability.getInstance();\n final int connectionStatusCode =\n apiAvailability.isGooglePlayServicesAvailable(this);\n if (apiAvailability.isUserResolvableError(connectionStatusCode)) {\n showGooglePlayServicesAvailabilityErrorDialog(connectionStatusCode);\n }\n }",
"private void acquireGooglePlayServices() {\n GoogleApiAvailability apiAvailability =\n GoogleApiAvailability.getInstance();\n final int connectionStatusCode =\n apiAvailability.isGooglePlayServicesAvailable(this);\n if (apiAvailability.isUserResolvableError(connectionStatusCode)) {\n showGooglePlayServicesAvailabilityErrorDialog(connectionStatusCode);\n }\n }",
"private void acquireGooglePlayServices() {\n GoogleApiAvailability apiAvailability =\n GoogleApiAvailability.getInstance();\n final int connectionStatusCode =\n apiAvailability.isGooglePlayServicesAvailable(this);\n if (apiAvailability.isUserResolvableError(connectionStatusCode)) {\n showGooglePlayServicesAvailabilityErrorDialog(connectionStatusCode);\n }\n }",
"private void acquireGooglePlayServices() {\n GoogleApiAvailability apiAvailability =\n GoogleApiAvailability.getInstance();\n final int connectionStatusCode =\n apiAvailability.isGooglePlayServicesAvailable(getActivity());\n if (apiAvailability.isUserResolvableError(connectionStatusCode)) {\n showGooglePlayServicesAvailabilityErrorDialog(connectionStatusCode);\n }\n }",
"@Override\n public void onConnectionFailed(ConnectionResult connectionResult) {\n // Refer to the reference doc for ConnectionResult to see what error codes might\n // be returned in onConnectionFailed.\n Log.d(TAG, \"Play services connection failed: ConnectionResult.getErrorCode() = \"\n + connectionResult.getErrorCode());\n }",
"@Override\n public void onStart() {\n super.onStart();\n googleApiClient.connect();\n }",
"private void checkGooglePlayServices() {\n\t\tint status = GooglePlayServicesUtil\n\t\t\t\t.isGooglePlayServicesAvailable(getApplicationContext());\n\t\tif (D) {\n\t\t\tif (status == ConnectionResult.SUCCESS) {\n\t\t\t\t// Success! Do what you want\n\t\t\t\tLog.i(TAG, \"Google Play Services all good\");\n\t\t\t} else if (status == ConnectionResult.SERVICE_MISSING) {\n\t\t\t\tLog.e(TAG, \"Google Play Services not in place\");\n\t\t\t} else if (status == ConnectionResult.SERVICE_VERSION_UPDATE_REQUIRED) {\n\t\t\t\tLog.e(TAG, \"Google Play Serivices outdated\");\n\t\t\t} else if (status == ConnectionResult.SERVICE_DISABLED) {\n\t\t\t\tLog.e(TAG, \"Google Plauy Services disabled\");\n\t\t\t} else if (status == ConnectionResult.SERVICE_INVALID) {\n\t\t\t\tLog.e(TAG,\n\t\t\t\t\t\t\"Google Play Serivices invalid but wtf does that mean?\");\n\t\t\t} else {\n\t\t\t\tLog.e(TAG, \"No way this is gonna happen\");\n\t\t\t}\n\t\t}\n\t}",
"@Override\n public void onStart() {\n mGoogleApiClient.connect();\n super.onStart();\n }",
"@Override\n public void onConnectionSuspended(int cause) {\n Log.d(TAG, \"Play services connection suspended\");\n }",
"@Override\n public void onConnectionSuspended(int cause) {\n Log.d(TAG, \"Play services connection suspended\");\n }",
"private void connectGoogleApiAgain(){\n if (!mGoogleApiClient.isConnected()) {\n ConnectionResult connectionResult =\n mGoogleApiClient.blockingConnect(30, TimeUnit.SECONDS);\n\n if (!connectionResult.isSuccess()) {\n Log.e(TAG, \"DataLayerListenerService failed to connect to GoogleApiClient, \"\n + \"error code: \" + connectionResult.getErrorCode());\n }\n }\n }",
"@Override\n protected void onStop() {\n if (null != googleClient && googleClient.isConnected()) {\n googleClient.disconnect();\n }\n super.onStop();\n }",
"private void requestConnection() {\n getGoogleApiClient().connect();\n }",
"@Override\n protected void onStart() {\n super.onStart();\n Log.i(TAG, \"In onStart() - connecting...\");\n googleApiClient.connect();\n }",
"@Override\n public void onCreate(){\n super.onCreate();\n createGoogleAPIClient();\n Log.i(TAG, \"On Create\");\n }",
"@Override\n\tpublic void onConnectionFailed(ConnectionResult connectionResult) {\n\t\tLog.e(TAG, \"onConnectionFailed: ConnectionResult.getErrorCode() = \"\n\t\t\t\t+ connectionResult.getErrorCode());\n\t\t// TODO(Developer): Check error code and notify the user of error state and resolution.\n\t\tToast.makeText(this,\n\t\t\t\t\"Could not connect to Google API Client: Error \" + connectionResult.getErrorCode(),\n\t\t\t\tToast.LENGTH_SHORT).show();\n\n\t}",
"@Override\r\n protected void onStart() {\n super.onStart();\r\n mGoogleApiClient.connect();\r\n }",
"@Override\npublic void onConnectionFailed(ConnectionResult arg0) {\n\t\n}",
"@Override\n public void onConnectionSuspended(int cause) {\n\n Log.i(TAG, \"GoogleApiClient connection suspended\");\n }",
"@Override\n public void onConnectionFailed(@NonNull ConnectionResult connectionResult) {\n\n Log.e(TAG, \"onConnectionFailed: ConnectionResult.getErrorCode() = \"\n + connectionResult.getErrorCode());\n\n Toast.makeText(this,\n \"Could not connect to Google API Client: Error \" + connectionResult.getErrorCode(),\n Toast.LENGTH_SHORT).show();\n }",
"@Override\n\tprotected void onResume()\n\t{\n\t\tsuper.onResume();\n\n\t\tint resCode = GooglePlayServicesUtil.isGooglePlayServicesAvailable(getApplicationContext());\n\t\tif (resCode != ConnectionResult.SUCCESS)\n\t\t{\n\t\t\tGooglePlayServicesUtil.getErrorDialog(resCode, this, 1);\n\t\t}\n\t}",
"public interface GooglefitCallback {\n\n /**\n * when google fir is connected this method is called.\n */\n public void connect();\n\n /**\n * when google fit is disconnected this method is callled.\n */\n public void disconnect();\n}",
"@Override\n public void onConnectionFailed(ConnectionResult arg0) {\n\n }",
"@Override\n public void onConnectionSuspended(int cause) {\n Log.i(\"Feelknit\", \"Connection suspended\");\n mGoogleApiClient.connect();\n }",
"@Override\n public void onConnectionSuspended(int cause) {\n Log.i(TAG, \"Connection suspended\");\n mGoogleApiClient.connect();\n }",
"@Override\n public void onConnectionFailed(@NonNull ConnectionResult result) {\n // Refer to the reference doc for ConnectionResult to see what error codes might\n // be returned in onConnectionFailed.\n Log.d(TAG, \"Play services connection failed: ConnectionResult.getErrorCode() = \"\n + result.getErrorCode());\n }",
"@Override\n public void onConnectionFailed(@NonNull ConnectionResult result) {\n // Refer to the reference doc for ConnectionResult to see what error codes might\n // be returned in onConnectionFailed.\n Log.d(TAG, \"Play services connection failed: ConnectionResult.getErrorCode() = \"\n + result.getErrorCode());\n }",
"protected void onConnect() {}",
"@Override\n public void onConnectionSuspended(int cause) {\n Log.i(TAG, \"Connection suspended\");\n mGoogleApiClient.connect();\n }",
"@Override\n public void onConnectionSuspended(int cause) {\n Log.i(TAG, \"Connection suspended\");\n mGoogleApiClient.connect();\n }",
"@Override\n public void onConnectionSuspended(int cause) {\n Log.e(TAG, \"Connection suspended\");\n mGoogleApiClient.connect();\n }",
"private void checkGooglePlayServiceSDK() {\n //To change body of created methods use File | Settings | File Templates.\n final int googlePlayServicesAvailable = GooglePlayServicesUtil.isGooglePlayServicesAvailable(context);\n Log.i(TAG, \"googlePlayServicesAvailable:\" + googlePlayServicesAvailable);\n\n switch (googlePlayServicesAvailable) {\n case ConnectionResult.SERVICE_MISSING:\n form.dispatchErrorOccurredEvent(this, \"checkGooglePlayServiceSDK\",\n ErrorMessages.ERROR_GOOGLE_PLAY_NOT_INSTALLED);\n break;\n case ConnectionResult.SERVICE_VERSION_UPDATE_REQUIRED:\n form.dispatchErrorOccurredEvent(this, \"checkGooglePlayServiceSDK\",\n ErrorMessages.ERROR_GOOGLE_PLAY_SERVICE_UPDATE_REQUIRED);\n break;\n case ConnectionResult.SERVICE_DISABLED:\n form.dispatchErrorOccurredEvent(this, \"checkGooglePlayServiceSDK\",\n ErrorMessages.ERROR_GOOGLE_PLAY_DISABLED);\n break;\n case ConnectionResult.SERVICE_INVALID:\n form.dispatchErrorOccurredEvent(this, \"checkGooglePlayServiceSDK\",\n ErrorMessages.ERROR_GOOGLE_PLAY_INVALID);\n break;\n }\n }",
"public void OnConnectSuccess();",
"private void connectWithCallbacks(GoogleApiClient.ConnectionCallbacks callbacks) {\n googleApiClient = new GoogleApiClient.Builder(context)\n .addApi(LocationServices.API)\n .addConnectionCallbacks(callbacks) // callbacks specific to the service\n .addOnConnectionFailedListener(connectionFailedListener) // callbacks when cannot connect to the client\n .build();\n Log.d(TAG,googleApiClient.toString());\n googleApiClient.connect();\n }",
"@Override\n public void onConnected(@Nullable Bundle bundle) {\n readPreviousStoredDataAPI();\n Wearable.DataApi.addListener(mGoogleApiClient, this);\n }",
"@Override\n public void onConnectionFailed(ConnectionResult arg0) {\n }",
"@Override\n public void onConnectionSuspended(int cause) {\n Log.i(DEBUG_TAG, \"Connection suspended\");\n mGoogleApiClient.connect();\n }",
"@Override\n protected void onStop() {\n mGoogleApiClient.disconnect();\n super.onStop();\n }",
"@Override\n protected void onStop() {\n mGoogleApiClient.disconnect();\n super.onStop();\n }",
"@Override\n public void onStart() {\n super.onStart();\n try {\n if (mGoogleApiClient != null) {\n mGoogleApiClient.connect();\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n }",
"private boolean servicesConnected(Activity activity) {\n int resultCode = GooglePlayServicesUtil.isGooglePlayServicesAvailable(activity);\n // If Google Play services is available\n if (ConnectionResult.SUCCESS == resultCode) {\n return true;\n // Google Play services was not available for some reason.\n // resultCode holds the error code.\n } else {\n // Get the error dialog from Google Play services\n Dialog errorDialog = GooglePlayServicesUtil.getErrorDialog(resultCode, activity, LocationFailureHandler.CONNECTION_FAILURE_RESOLUTION_REQUEST);\n\n // If Google Play services can provide an error dialog\n if (errorDialog != null) {\n \terrorDialog.show();\n } else {\n }\n return false;\n }\n }",
"@Override\n public void onConnectionFailed(ConnectionResult connectionResult) {\n\n }",
"public interface ResponseListener {\n void onResponce(GoogleResponse response);\n}",
"public void onServiceConnected();",
"@Override\n\tpublic void onConnectionFailed(ConnectionResult arg0) {\n\n\t}",
"@Override\n protected void onStop() {\n super.onStop();\n if (googleApiClient != null) {\n Log.i(TAG, \"In onStop() - disConnecting...\");\n googleApiClient.disconnect();\n }\n }",
"@Override\n\tpublic void onConnectionFailed(ConnectionResult arg0) {\n\t\t\n\t}",
"@Override\n\tpublic void onConnectionFailed(ConnectionResult arg0) {\n\t\t\n\t}",
"@Override\n public void onConnectionSuspended(int i) {\n if (i == GoogleApiClient.ConnectionCallbacks.CAUSE_NETWORK_LOST) {\n com.google.android.gms.fit.samples.common.logger.Log.i(TAG, \"Connection lost. Cause: Network Lost.\");\n } else if (i == GoogleApiClient.ConnectionCallbacks.CAUSE_SERVICE_DISCONNECTED) {\n com.google.android.gms.fit.samples.common.logger.Log.i(TAG, \"Connection lost. Reason: Service Disconnected\");\n }\n }",
"protected void onConnectionError() {\n\t}",
"@Override\n public void onStop() {\n mGoogleApiClient.disconnect();\n super.onStop();\n }",
"@Override\n public void onCallGapRequest(CallGapRequest ind) {\n\n }",
"@Override\n protected void onStart() {\n super.onStart();\n if (!mGoogleApiClient.isConnected()) {\n mGoogleApiClient.connect();\n }\n }",
"@Override\n public void onConnectionFailed(ConnectionResult conRes) {}",
"public void connectApiClient()\n {\n googleApiClient.connect();\n }",
"void onInternetConnectionBack();",
"@Override\n public void onConnectionFailed(ConnectionResult result) {\n\n }",
"@Override public void onConnectionFailed(ConnectionResult connectionResult) {\n }",
"@Override protected void onResume() {\n super.onResume();\n locationClient.connect();\n }",
"@Override\n public void onConnectionFailed(@NonNull ConnectionResult connectionResult) {\n\n }",
"@Override\n public void onConnectionFailed(@NonNull ConnectionResult connectionResult) {\n\n }",
"@Override\n protected void onStop() {\n if (mGoogleApiClient.isConnected()) {\n mGoogleApiClient.disconnect();\n }\n\n super.onStop();\n }",
"private boolean servicesConnected() {\n\n int resultCode = GooglePlayServicesUtil.isGooglePlayServicesAvailable(this);\n\n if (ConnectionResult.SUCCESS == resultCode) {\n // In debug mode, log the status\n Log.d(ClientSideUtils.APPTAG, getString(R.string.play_services_available));\n return true;\n \n } else {\n // Display an error dialog\n Dialog dialog = GooglePlayServicesUtil.getErrorDialog(resultCode, this, 0);\n if (dialog != null) {\n ErrorDialogFragment errorFragment = new ErrorDialogFragment();\n errorFragment.setDialog(dialog);\n errorFragment.show(getSupportFragmentManager(), ClientSideUtils.APPTAG);\n }\n return false;\n }\n }",
"public void OnConnectionError();",
"@Override\n public void onCreate() {\n googleApiClient = new GoogleApiClient.Builder(this)\n .addConnectionCallbacks(this)\n .addOnConnectionFailedListener(this)\n .addApi(LocationServices.API)\n .build();\n\n /*conectar al servicio*/\n Log.w(TAG, \"onCreate: Conectando el google client\");\n googleApiClient.connect();\n\n\n //NOTIFICACION\n mNotificationManager = (NotificationManager) getSystemService(NOTIFICATION_SERVICE);\n stateService = Constants.STATE_SERVICE.NOT_CONNECTED;\n\n }",
"@Override\r\n protected void onConnected() {\n \r\n }",
"@Override\n protected void onStart() {\n super.onStart();\n idsession = MyModel.getInstance().getIdsession();\n\n //Check if GooglePlayServices are available\n GoogleApiAvailability googleApiAvailability = GoogleApiAvailability.getInstance();\n int status = googleApiAvailability.isGooglePlayServicesAvailable(this);\n if(status == ConnectionResult.SUCCESS) {\n Log.d(\"GeoPost Location\", \"GooglePlayServices available\");\n } else {\n Log.d(\"GeoPost Location\", \"GooglePlayServices UNAVAILABLE\");\n if(googleApiAvailability.isUserResolvableError(status)) {\n Log.d(\"GeoPost Location\", \"Ask the user to fix the problem\");\n //If the user accepts to install the google play services,\n //a new app will open. When the user gets back to this activity,\n //the onStart method is invoked again.\n googleApiAvailability.getErrorDialog(this, status, 2404).show();\n } else {\n Log.d(\"GeoPost Location\", \"The problem cannot be fixed\");\n }\n }\n\n // Instantiate and connect GoogleAPIClient.\n if (mGoogleApiClient == null) {\n mGoogleApiClient = new GoogleApiClient.Builder(this)\n .addConnectionCallbacks(this)\n .addOnConnectionFailedListener(this)\n .addApi(LocationServices.API)\n .build();\n }\n mGoogleApiClient.connect();\n }",
"private boolean servicesConnected() {\n int resultCode =\n GooglePlayServicesUtil.\n isGooglePlayServicesAvailable(this);\n // If Google Play services is available\n if (ConnectionResult.SUCCESS == resultCode) {\n // In debug mode, log the status\n Log.d(\"Location Updates\",\n \"Google Play services is available.\");\n // Continue\n return true;\n // Google Play services was not available for some reason.\n // resultCode holds the error code.\n } else {\n return false;\n }\n }",
"@Override\n public void onConnected(Bundle bundle) {\n Wearable.DataApi.addListener(googleApiClient, this);\n }",
"@Override\n public void onConnectionFailed(@NonNull ConnectionResult connectionResult) {\n Log.d(Constants.GOOGLE_MAP_ERROR_TAG, Constants.GOOGLE_MAP_ERROR);\n }",
"void onConnectionLost();",
"@Override\n public void onConnectionFailed(ConnectionResult connectionResult) {\n }",
"protected void SetupGoogleServices()\n {\n if (mGoogleApiClient == null)\n {\n mGoogleApiClient = new GoogleApiClient.Builder(this)\n .addConnectionCallbacks(this)\n .addOnConnectionFailedListener(this)\n .addApi(LocationServices.API)\n .build();\n }\n }",
"private boolean servicesConnected() {\n int resultCode =\n GooglePlayServicesUtil.isGooglePlayServicesAvailable(this);\n\n // If Google Play services is available\n if (ConnectionResult.SUCCESS == resultCode) {\n\n // In debug mode, log the status\n Log.d(GeofenceUtils.APPTAG, getString(R.string.play_services_available));\n\n // Continue\n return true;\n\n // Google Play services was not available for some reason\n } else {\n\n // Display an error dialog\n Dialog dialog = GooglePlayServicesUtil.getErrorDialog(resultCode, this, 0);\n if (dialog != null) {\n ErrorDialogFragment errorFragment = new ErrorDialogFragment();\n errorFragment.setDialog(dialog);\n errorFragment.show(getSupportFragmentManager(), GeofenceUtils.APPTAG);\n }\n return false;\n }\n }",
"public interface IGoogleServices {\n void signIn();\n void signOut();\n void changeUser();\n boolean isConnected();\n boolean isConnecting();\n}",
"@Override\n public void onConnectionFailed(@NonNull ConnectionResult connectionResult) {\n Log.e(TAG, \"location service connection lost\");\n Toast.makeText(this, R.string.conn_failed, Toast.LENGTH_LONG).show();\n }",
"@Override\n protected ConnectionResult doInBackground(Void... params) {\n ConnectionResult connectionResult = googleApiClient.blockingConnect(\n Constants.GOOGLE_API_CLIENT_TIMEOUT_S, TimeUnit.SECONDS);\n\n return connectionResult;\n }",
"@Override\r\n protected void onStop() {\n super.onStop();\r\n if (mGoogleApiClient.isConnected()) {\r\n mGoogleApiClient.disconnect();\r\n }\r\n }",
"public interface HttpsCallbackListener {\n\n public void onFinish(String response);\n\n public void onError(Exception e);\n}",
"private void RegisterGoogleSignup() {\n\n\t\ttry {\n\t\t\tLocalData data = new LocalData(SplashActivity.this);\n\n\t\t\tArrayList<String> asName = new ArrayList<String>();\n\t\t\tArrayList<String> asValue = new ArrayList<String>();\n\n\t\t\tasName.add(\"email\");\n\t\t\tasName.add(\"firstname\");\n\t\t\tasName.add(\"gender\");\n\t\t\tasName.add(\"id\");\n\t\t\tasName.add(\"lastname\");\n\t\t\tasName.add(\"name\");\n\t\t\t// asName.add(\"link\");\n\n\t\t\tasName.add(\"device_type\");\n\t\t\tasName.add(\"device_id\");\n\t\t\tasName.add(\"gcm_id\");\n\t\t\tasName.add(\"timezone\");\n\n\t\t\tasValue.add(data.GetS(LocalData.EMAIL));\n\t\t\tasValue.add(data.GetS(LocalData.FIRST_NAME));\n\t\t\tasValue.add(data.GetS(LocalData.GENDER));\n\t\t\tasValue.add(data.GetS(LocalData.ID));\n\t\t\tasValue.add(data.GetS(LocalData.LAST_NAME));\n\t\t\tasValue.add(data.GetS(LocalData.NAME));\n\t\t\t// asValue.add(data.GetS(LocalData.LINK));\n\n\t\t\tasValue.add(\"A\");\n\n\t\t\tString android_id = Secure\n\t\t\t\t\t.getString(SplashActivity.this.getContentResolver(),\n\t\t\t\t\t\t\tSecure.ANDROID_ID);\n\n\t\t\tasValue.add(android_id);\n\n\t\t\tLocalData data1 = new LocalData(SplashActivity.this);\n\t\t\tasValue.add(data1.GetS(\"gcmId\"));\n\t\t\tasValue.add(Main.GetTimeZone());\n\t\t\tString sURL = StringURLs.getQuery(StringURLs.GOOGLE_LOGIN, asName,\n\t\t\t\t\tasValue);\n\n\t\t\tConnectServer connectServer = new ConnectServer();\n\t\t\tconnectServer.setMode(ConnectServer.MODE_POST);\n\t\t\tconnectServer.setContext(SplashActivity.this);\n\t\t\tconnectServer.setListener(new ConnectServerListener() {\n\n\t\t\t\t@Override\n\t\t\t\tpublic void onServerResponse(String sJSON, JSONObject jsonObject) {\n\t\t\t\t\t// TODO Auto-generated method stub\n\n\t\t\t\t\tLog.d(\"JSON DATA\", sJSON);\n\n\t\t\t\t\ttry {\n\n\t\t\t\t\t\tif (sJSON.length() != 0) {\n\t\t\t\t\t\t\tJSONObject object = new JSONObject(sJSON);\n\t\t\t\t\t\t\tJSONObject response = object\n\t\t\t\t\t\t\t\t\t.getJSONObject(JSONStrings.JSON_RESPONSE);\n\t\t\t\t\t\t\tString sResult = response\n\t\t\t\t\t\t\t\t\t.getString(JSONStrings.JSON_SUCCESS);\n\n\t\t\t\t\t\t\tif (sResult.equalsIgnoreCase(\"1\") == true) {\n\n\t\t\t\t\t\t\t\tString user_id = response.getString(\"userid\");\n\n\t\t\t\t\t\t\t\tLocalData data = new LocalData(\n\t\t\t\t\t\t\t\t\t\tSplashActivity.this);\n\t\t\t\t\t\t\t\tdata.Update(\"userid\", user_id);\n\t\t\t\t\t\t\t\tdata.Update(\"name\", response.getString(\"name\"));\n\n\t\t\t\t\t\t\t\tGetNotificationCount();\n\n\t\t\t\t\t\t\t} else if (sResult.equalsIgnoreCase(\"0\") == true) {\n\n\t\t\t\t\t\t\t\tString msgcode = jsonObject.getJSONObject(\n\t\t\t\t\t\t\t\t\t\t\"response\").getString(\"msgcode\");\n\n\t\t\t\t\t\t\t\tToast.makeText(\n\t\t\t\t\t\t\t\t\t\tSplashActivity.this,\n\t\t\t\t\t\t\t\t\t\tMain.getStringResourceByName(\n\t\t\t\t\t\t\t\t\t\t\t\tSplashActivity.this, msgcode),\n\t\t\t\t\t\t\t\t\t\tToast.LENGTH_LONG).show();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\tToast.makeText(\n\t\t\t\t\t\t\t\t\tSplashActivity.this,\n\t\t\t\t\t\t\t\t\tMain.getStringResourceByName(\n\t\t\t\t\t\t\t\t\t\t\tSplashActivity.this, \"c100\"),\n\t\t\t\t\t\t\t\t\tToast.LENGTH_LONG).show();\n\t\t\t\t\t\t}\n\n\t\t\t\t\t} catch (Exception exp) {\n\n\t\t\t\t\t\tToast.makeText(\n\t\t\t\t\t\t\t\tSplashActivity.this,\n\t\t\t\t\t\t\t\tMain.getStringResourceByName(\n\t\t\t\t\t\t\t\t\t\tSplashActivity.this, \"c100\"),\n\t\t\t\t\t\t\t\tToast.LENGTH_LONG).show();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tconnectServer.execute(sURL);\n\n\t\t} catch (Exception exp) {\n\n\t\t\tToast.makeText(SplashActivity.this,\n\t\t\t\t\tMain.getStringResourceByName(SplashActivity.this, \"c100\"),\n\t\t\t\t\tToast.LENGTH_LONG).show();\n\t\t}\n\t}",
"public void onConnectionFailed(ConnectionResult connectionResult) {\r\n /*\r\n * Google Play services can resolve some errors it detects.\r\n * If the error has a resolution, try sending an Intent to\r\n * start a Google Play services activity that can resolve\r\n * error.\r\n */\r\n if (connectionResult.hasResolution()) {\r\n try {\r\n // Start an Activity that tries to resolve the error\r\n connectionResult.startResolutionForResult(\r\n this,\r\n CONNECTION_FAILURE_RESOLUTION_REQUEST);\r\n /*\r\n * Thrown if Google Play services canceled the original\r\n * PendingIntent\r\n */\r\n } catch (IntentSender.SendIntentException e) {\r\n // Log the error\r\n e.printStackTrace();\r\n }\r\n } else {\r\n Toast.makeText(getApplicationContext(), \"Sorry. Location services not available to you\", Toast.LENGTH_LONG).show();\r\n }\r\n }",
"public interface SDKCallback {\n void onSDKSuccess(String tag, Object message);\n\n void onSDKFail(String tag, String message);\n\n}",
"@Override\n public void onStop() {\n if(null!=mGoogleApiClient)\n mGoogleApiClient.disconnect();\n super.onStop();\n }",
"public void didFinishLaunching () {\n\t\tGPPSignIn signIn = GPPSignIn.sharedInstance();\n\t\tsignIn.setClientID(clientId);\n\n\t\t// set scopes\n\t\tArrayList<NSString> scopes = new ArrayList<NSString>();\n\t\tscopes.add(new NSString(\"https://www.googleapis.com/auth/plus.login\"));\n\t\tscopes.add(new NSString(\"https://www.googleapis.com/auth/games\"));\n\t\tscopes.add(new NSString(\"https://www.googleapis.com/auth/appstate\"));\n\t\tsignIn.setScopes(new NSArray<NSString>(scopes));\n\n\t\tsignIn.setDelegate(this);\n\t\tsignIn.setShouldFetchGoogleUserID(fetchId);\n\t\tsignIn.setShouldFetchGoogleUserEmail(fetchEmail);\n\t\tsignIn.setShouldFetchGooglePlusUser(fetchName);\n\n\t\t// try to sign in silently\n\t\tsignIn.trySilentAuthentication();\n\n\t\t// define blocks\n\t\trevealBlock = new GPGAchievementDidRevealBlock() {\n\t\t\t@Override\n\t\t\tpublic void invoke (GPGAchievementState state, NSError error) {\n\t\t\t\tif (error != null) {\n\t\t\t\t\tSystem.out.println(\"Error while revealing achievement!\");\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\tincrementBlock = new GPGAchievementDidIncrementBlock() {\n\t\t\t@Override\n\t\t\tpublic void invoke (boolean newlyUnlocked, int currentSteps, NSError error) {\n\t\t\t\tif (error != null) {\n\t\t\t\t\tSystem.out.println(\"Error while revealing!\");\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\tunlockBlock = new GPGAchievementDidUnlockBlock() {\n\t\t\t@Override\n\t\t\tpublic void invoke (boolean newlyUnlocked, NSError error) {\n\t\t\t\tif (error != null) {\n\t\t\t\t\tSystem.out.println(\"Error while unlocking!\");\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\tcloudCompletionHandler = new GPGAppStateWriteResultHandler() {\n\t\t\t@Override\n\t\t\tpublic void invoke (GPGAppStateWriteStatus status, NSError error) {\n\t\t\t\tswitch (status) {\n\t\t\t\tcase GPGAppStateWriteStatusSuccess:\n\t\t\t\t\tSystem.out.println(\"cloud save succeeded!\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase GPGAppStateWriteStatusBadKeyDataOrVersion:\n\t\t\t\t\tSystem.out.println(\"cloud save failed: bad key or version\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase GPGAppStateWriteStatusConflict:\n\t\t\t\t\tSystem.out.println(\"cloud save failed: conflict\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase GPGAppStateWriteStatusKeysQuotaExceeded:\n\t\t\t\t\tSystem.out.println(\"cloud save failed: keys quota exceeded\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase GPGAppStateWriteStatusNotFound:\n\t\t\t\t\tSystem.out.println(\"cloud save failed: not found\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase GPGAppStateWriteStatusSizeExceeded:\n\t\t\t\t\tSystem.out.println(\"cloud save failed: size exceeded\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase GPGAppStateWriteStatusUnknownError:\n\t\t\t\t\tSystem.out.println(\"cloud save failed: unknown error\");\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\tpostScoreCompletionHandler = new GPGScoreReportScoreBlock() {\n\t\t\t@Override\n\t\t\tpublic void invoke (GPGScoreReport report, NSError error) {\n\t\t\t\tif (error != null) {\n\t\t\t\t\tSystem.out.println(\"score posting failed!\");\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t}"
] |
[
"0.68801343",
"0.670071",
"0.66782266",
"0.66782266",
"0.66782266",
"0.66782266",
"0.66782266",
"0.66782266",
"0.66782266",
"0.66749936",
"0.65705717",
"0.6482301",
"0.6447309",
"0.64388514",
"0.6392222",
"0.63670284",
"0.63640827",
"0.6352089",
"0.6352089",
"0.6352089",
"0.6322343",
"0.62239754",
"0.62117404",
"0.6201286",
"0.6179294",
"0.6167084",
"0.6167084",
"0.6162839",
"0.6152341",
"0.6120611",
"0.6091384",
"0.6086716",
"0.60766375",
"0.6072164",
"0.60702324",
"0.6032586",
"0.6007865",
"0.6002609",
"0.59833115",
"0.59774363",
"0.5969385",
"0.5967034",
"0.59555817",
"0.59555817",
"0.59521544",
"0.59513885",
"0.59513885",
"0.59458005",
"0.5920273",
"0.5894947",
"0.5879878",
"0.5868042",
"0.58662075",
"0.58625627",
"0.5859142",
"0.5859142",
"0.5833392",
"0.5832795",
"0.58291996",
"0.5824928",
"0.5821892",
"0.58146435",
"0.58134335",
"0.5811641",
"0.5811641",
"0.58070225",
"0.57991564",
"0.57943004",
"0.57771844",
"0.5776354",
"0.5773707",
"0.57701075",
"0.57637525",
"0.57631296",
"0.5760931",
"0.5754693",
"0.5750582",
"0.5750582",
"0.57430476",
"0.57401323",
"0.5731446",
"0.57271993",
"0.57231915",
"0.5721965",
"0.5721785",
"0.5718758",
"0.57163775",
"0.5707667",
"0.56772816",
"0.566835",
"0.5668106",
"0.56502175",
"0.56488717",
"0.5647017",
"0.5644899",
"0.5640472",
"0.5640355",
"0.5631107",
"0.5624374",
"0.56239605",
"0.56238556"
] |
0.0
|
-1
|
Test that the profile of a user created with UserManagementcreateUser can be updated
|
@Test
public void testUpdateUserProfileOfCreatedUser() throws Exception {
UserVO user = new UserVO();
user.setAlias(UUID.randomUUID().toString());
user.setFirstName(UUID.randomUUID().toString());
user.setLastName(UUID.randomUUID().toString());
user.setEmail(UUID.randomUUID().toString() + "@" + UUID.randomUUID().toString());
user.setLanguage(Locale.ENGLISH);
user.setRoles(new UserRole[] { UserRole.ROLE_KENMEI_USER });
user.setPassword(UUID.randomUUID().toString());
User dbUser = ServiceLocator.instance().getService(UserManagement.class)
.createUser(user, false, false);
UserProfileVO userProfile = new UserProfileVO();
ServiceLocator.instance().getService(UserProfileManagement.class)
.updateUserProfile(dbUser.getId(), userProfile);
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"@Test\n\tpublic void test_update_user_success(){\n\t\tUser user = new User(null, \"fengt\", \"[email protected]\", \"12345678\");\n\t\ttemplate.put(REST_SERVICE_URI + \"/20\" + ACCESS_TOKEN + token, user);\n\t}",
"@Test\n public void updateUser() {\n userDAO.createUser(new User(\"dummy\", \"dummy\", 1));\n\n assertTrue(userResource.updateUser(new User(\"dummy\", \"dummyUPDATED\", 2)));\n\n //clean up\n userDAO.removeUser(\"dummy\");\n }",
"@Test\n void testUpdateUser() {\n String password = \"testPassword\";\n User updateUser = (User) userData.crud.getById(1);\n updateUser.setPassword(password);\n userData.crud.updateRecords(updateUser);\n User getUser = (User) userData.crud.getById(1);\n assertEquals(getUser, updateUser);\n logger.info(\"Updated the password for ID: \" + updateUser.getId());\n }",
"@Test\n public void testModifyUser() throws Exception {\n\n User user = userDao.retrieveById(\"uuid123123123\");\n user.setUsername(\"newbody4\");\n\n Boolean result = userDao.update(user);\n Assert.assertTrue(result);\n }",
"@Test\n public void testGetEditUserViewModel() throws Exception {\n \n User user = new User();\n user.setUsername(\"Tephon\");\n user.setPassword(\"password\");\n \n User existingUser = userServiceLayer.createUser(user);\n \n EditUserViewModel editUserViewModel = userWebServices.getEditUserViewModel(existingUser.getId()); \n \n EditUserCommandModel commandModel = editUserViewModel.getEditUserCommandModel();\n \n assert existingUser.getId() == commandModel.getId();\n assert existingUser.getUsername().equals(commandModel.getUsername());\n assert existingUser.getPassword().equals(commandModel.getPassword());\n }",
"public static boolean upDateProfile(String userName ,String password,String firstName,String address\r\n\t\t\t, String phone , String lastName , String email) {\n User user = new User(userName,password,firstName,lastName,email,phone,address,0);\r\n if(DatabaseMethods.update_user(user)){\r\n return true;\r\n }\r\n else{\r\n setProfile();\r\n \r\n return false;\r\n }\r\n\t\t\r\n\t}",
"@Test\n\tpublic void testUpdateUserPositive() {\n\t\tUser testUser = new User();\n\t\ttestUser.setUserEmail(TEST_EMAIL);\n\t\ttestUser.setUserPassword(TEST_PASSWORD);\n\t\ttestUser.setUserId(TEMP_Key);\n\t\tMockito.when(userService.persistUser((User) Matchers.anyObject()))\n\t\t.thenReturn(testUser);\n\t\t\n\t\t// create a simple user for persistent user return call\n\t\tUser resultUser = new User();\n\t\tresultUser.setUserEmail(TEST_EMAIL + \"Update\");\n\t\tresultUser.setUserPassword(TEST_PASSWORD);\n\t\tresultUser.setUserId(TEMP_Key);\n\t\tMockito.when(userService.updateUser((User) Matchers.anyObject()))\n\t\t\t\t.thenReturn(resultUser);\n\t\tMockito.when(userService.existsUserByEmail(TEST_EMAIL)).thenReturn(\n\t\t\t\tfalse);\n\n\t\tgiven().body(testUser).contentType(ContentType.JSON).when()\n\t\t\t\t.put(getBaseTestURI()).then()\n\t\t\t\t.statusCode(HttpServletResponse.SC_OK)\n\t\t\t\t.contentType(ContentType.JSON)\n\t\t\t\t.body(\"userEmail\", equalTo(TEST_EMAIL + \"Update\"));\n\t}",
"public boolean createUser(UserProfile userProfile) {\n\t\tmongoTemplate.insert(userProfile, \"UserProfile_Details\");\n\t\treturn true;\n\t}",
"@Test\n public void testGetNewUser() throws Exception {\n UserMultiID umk = createRU(\"remote-user-\" + getRandomString());\n String idp = \"test-idp-\" + getRandomString();\n // create a new user.\n XMLMap map = getDBSClient().getUser(umk, idp);\n assert getDBSClient().hasUser(umk, idp);\n Identifier uid = BasicIdentifier.newID(map.get(userKeys.identifier()).toString());\n User user2 = getUserStore().get(uid);\n checkUserAgainstMap(map, user2);\n }",
"@Test\n\t public void testUpdate(){\n\t\t try{\n\t\t\t Users user = BaseData.getUsers();\n\t\t\t\twhen(entityManager.merge(user)).thenReturn(BaseData.getDBUsers());\n\t\t\t\tUsers savedUser = userDao.update(user);\n\t\t\t\tassertNotNull(savedUser);\n\t\t\t\tassertTrue(savedUser.getFirstName().equals(\"MerchandisingUI\"));\n\t\t }catch(DataAcessException se){\n\t\t\t logger.error(\"error at service layer while testing update:.\",se);\n\t\t }\n\t }",
"@Override\n\tpublic void createUserProfile(User user) throws Exception {\n\n\t}",
"@Test\n public void testCreateOnBehalfUser() throws Exception {\n String password = \"abcdef\";\n VOUserDetails result = idService\n .createOnBehalfUser(customer.getOrganizationId(), password);\n checkCreatedUser(result, customer, password, false);\n }",
"@Test\n public void testSaveEditUserCommandModel() throws Exception {\n BCryptPasswordEncoder encoder = new BCryptPasswordEncoder();\n User user = new User();\n user.setUsername(\"Tephon\");\n user.setPassword(\"password\");\n \n \n ArrayList<String> authority1 = new ArrayList();\n authority1.add(\"ROLE_USER\");\n \n User existingUser = userServiceLayer.createUser(user);\n \n EditUserCommandModel commandModel = new EditUserCommandModel();\n commandModel.setId(existingUser.getId());\n commandModel.setUsername(\"Cheesy\");\n commandModel.setPassword(\"provolone1\");\n commandModel.setAuthorities(authority1);\n \n \n User userFromModel = userWebServices.saveEditUserCommandModel(commandModel, \"Tephon\");\n \n assert userFromModel.getId() != 0;\n assert userFromModel.getUsername().equals(\"Cheesy\");\n\n }",
"private static void updateUserTest(Connection conn) {\n\t\t\n\t\ttry {\n\t\t\tUser existingUser = User.loadUserById(conn, 3); // User user = User.loadUserById(conn, 3);\n\t\t\t// the same id is preserved\n\t\t\texistingUser.setUsername(\"jo\");\n\t\t\texistingUser.setEmail(\"[email protected]\");\n\t\t\texistingUser.setUserGroupId(2);\n\t\t\texistingUser.saveToDB(conn);\n\t\t\t\n\t\t\t/*Następnie\tnależy\tsprawdzić,\tczy:\n\t\t\t\t1.\t Czy\twpis\tw\tbazie\tdanych\tma\twszystkie\n\t\t\t\tdane\todpowiednio\tponastawiane?\n\t\t\t\t2.\t Czy\tobiekt\tma\tnastawione\tpoprawne\tid? - czyli niezmienione, bo nie mamy settera dla id\n\t\t\t\t3.\t Czy\tnie\tdodał\tsię\tnowy\twpis\tw\tbazie?*/\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}",
"public UserProfile createUserProfile(String username, UserProfile newProfile);",
"@Test\n public void test_update() throws Exception {\n User user1 = createUser(1, false);\n\n user1.setUsername(\"new\");\n\n entityManager.getTransaction().begin();\n instance.update(user1);\n entityManager.getTransaction().commit();\n entityManager.clear();\n\n User retrievedUser = instance.get(user1.getId());\n\n assertEquals(\"'update' should be correct.\", user1.getUsername(), retrievedUser.getUsername());\n }",
"public long registerUserProfile(User user);",
"@Test\n\tpublic void testUpdateUserWithoutPassword() {\n\t\tUser testUser = new User();\n\t\ttestUser.setUserEmail(TEST_EMAIL);\n\t\ttestUser.setUserId(TEMP_Key);\n\t\t\n\t\tgiven().body(testUser).contentType(ContentType.JSON).when()\n\t\t\t\t.put(getBaseTestURI()).then()\n\t\t\t\t.statusCode(HttpServletResponse.SC_BAD_REQUEST);\n\t}",
"@Test\n public void testCreateAccountWithPassword() {\n final CreateUserRequest createUserRequest = new CreateUserRequest();\n createUserRequest.setUsername(\"[email protected]\");\n createUserRequest.setPassword(\"beta\");\n createUserRequest.setFirstname(\"Alpha\");\n createUserRequest.setLastname(\"Gamma\");\n\n // Now, perform the actual test - create the Account, and verify that\n // the response is ok, and that a Notification was sent\n final CreateUserResponse result = administration.createUser(token, createUserRequest);\n assertThat(result.isOk(), is(true));\n assertThat(result.getUser(), is(not(nullValue())));\n assertThat(result.getUser().getUserId(), is(not(nullValue())));\n // Creating a new User should generate an Activate User notification\n final NotificationType type = NotificationType.ACTIVATE_NEW_USER;\n assertThat(spy.size(type), is(1));\n final String activationCode = spy.getNext(type).getFields().get(NotificationField.CODE);\n assertThat(activationCode, is(not(nullValue())));\n }",
"@Test\n public void tcEditProfileWithValidData() {\n for (User user : EditProfileTestData.validUsers) {\n loginPage.open();\n loginPage.populateUsername(user.getUsername());\n loginPage.populatePassword(user.getPassword());\n loginPage.login();\n\n common.openEditProfilePage();\n\n editProfilePage.editProfile(user.getEmail(), user.getName(), user.getPhone(), user.getAddress());\n\n // do some verification\n\n common.logout();\n }\n }",
"@Test(priority = 1)\r\n\tpublic void validUserTest() {\t\t\t\r\n\r\n\t\tAdminDashboardPage adminPage=new AdminDashboardPage(driver);\r\n\t\tadminPage.clickUsersTab();\t\r\n\t\t\r\n\t\tUsersListViewPage ulPage=new UsersListViewPage(driver);\r\n\t\tulPage.clickNewUser();\r\n\t\t\r\n\t\tCreateNewUserPage crUserPage=new CreateNewUserPage(driver);\r\n\t\tcrUserPage.enterUserDetails(\"Kathy\",\"pass\",\"[email protected]\");\r\n\t\tcrUserPage.clickCreateUser();\t\t\r\n\t\t\r\n\t\tadminPage.clickUsersTab();\r\n\t\tString actUserCreated=ulPage.verifyCreatedUser();\r\n\t\tAssert.assertEquals(actUserCreated,\"Kathy\");\r\n\t\t\r\n\t}",
"@Test\n public void modifyUserSuccessfull(){\n User user_test = new User();\n user_test.setId(1L);\n user_test.setName(\"nametest\");\n user_test.setLast_name(\"lastnametest\");\n user_test.setUsername(\"usernametest\");\n user_test.setPassword(\"apassword\");\n\n given(userRepository.findById(anyLong())).willReturn(Optional.of(user_test));\n\n User user_expected = new User();\n user_expected.setId(1L);\n user_expected.setName(\"nametestmodified\");\n user_expected.setLast_name(\"lastnametestmodified\");\n user_expected.setUsername(\"usernametest\");\n user_expected.setPassword(\"apassword\");\n\n given(userRepository.save(any())).willReturn(user_expected);\n\n User user_retrieved = userServiceImpl.modifyUser(user_test.getId(), user_test);\n\n Assertions.assertNotNull(user_retrieved);\n Assertions.assertEquals(user_expected.getName(),user_retrieved.getName());\n Assertions.assertEquals(user_expected.getLast_name(),user_retrieved.getLast_name());\n Assertions.assertNull(user_retrieved.getPassword());\n }",
"@Test\n public void updateUserCatch() {\n userDAO.createUser(new User(\"dummy\", \"dummy\", 1));\n\n assertFalse(userDAO.updateUser(new User(\"notdummy\", \"dummyUPDATED\", 2)));\n\n //clean up\n userDAO.removeUser(\"dummy\");\n }",
"@Test\n\tpublic void testUpdateUser() {\n\t\tLogin login = new Login(\"unique_username_4324321\", \"password\");\n\t\t//login is encrypted in createUser method\n\t\tResponse response = createUser(login);\n\t\t//printResponse(response);\n\t\tassertEquals(Status.OK.getStatusCode(), response.getStatus());\n\t\t\n\t\t//update the user\n\t\tLogin update = new Login(\"unique_username_53428971\", \"a_different_password\");\n\t\tupdate.encryptPassword(passwordEncryptionKey);\n\t\tString resource = \"update_user\";\n\t\tString requestType = \"POST\";\n\t\tList<Login> updateLogins = Arrays.asList(login, update);\n\t\t\n\t\tresponse = sendRequest(resource, requestType, Entity.entity(updateLogins, MediaType.APPLICATION_JSON));\n\t\t//printResponse(response);\n\t\tassertEquals(Status.OK.getStatusCode(), response.getStatus());\n\t}",
"@Test\n @Transactional\n public void updateUserExistingEmail() throws Exception {\n userRepository.saveAndFlush(user);\n User anotherUser = new User();\n anotherUser.setLogin(\"jhipster\");\n anotherUser.setPassword(RandomStringUtils.random(60));\n anotherUser.setActivated(true);\n anotherUser.setEmail(\"jhipster@localhost\");\n anotherUser.setFirstName(\"java\");\n anotherUser.setLastName(\"hipster\");\n anotherUser.setImageUrl(\"\");\n anotherUser.setLangKey(\"en\");\n userRepository.saveAndFlush(anotherUser);\n // Update the user\n User updatedUser = userRepository.findById(user.getId()).get();\n ManagedUserVM managedUserVM = new ManagedUserVM();\n managedUserVM.setId(updatedUser.getId());\n managedUserVM.setLogin(updatedUser.getLogin());\n managedUserVM.setPassword(updatedUser.getPassword());\n managedUserVM.setFirstName(updatedUser.getFirstName());\n managedUserVM.setLastName(updatedUser.getLastName());\n managedUserVM.setEmail(\"jhipster@localhost\");// this email should already be used by anotherUser\n\n managedUserVM.setActivated(updatedUser.getActivated());\n managedUserVM.setImageUrl(updatedUser.getImageUrl());\n managedUserVM.setLangKey(updatedUser.getLangKey());\n managedUserVM.setCreatedBy(updatedUser.getCreatedBy());\n managedUserVM.setCreatedDate(updatedUser.getCreatedDate());\n managedUserVM.setLastModifiedBy(updatedUser.getLastModifiedBy());\n managedUserVM.setLastModifiedDate(updatedUser.getLastModifiedDate());\n managedUserVM.setAuthorities(Collections.singleton(USER));\n restUserMockMvc.perform(content(TestUtil.convertObjectToJsonBytes(managedUserVM))).andExpect(status().isBadRequest());\n }",
"@Test\n public void testCreateUser() throws InvalidUserException {\n //Arrange\n User user = new User();\n user.setEmail(\"[email protected]\");\n user.setFirstName(\"first\");\n user.setLastName(\"last\");\n user.setPassword(\"pass\");\n user.setRole(\"admin\");\n \n //Act\n User createdUser = userService.createUser(user);\n User fetchedUser = userService.readUser(createdUser.getUserId());\n \n //Assert\n assertEquals(fetchedUser.getUserId(), createdUser.getUserId());\n assertEquals(fetchedUser.getEmail(), \"[email protected]\");\n assertEquals(fetchedUser.getFirstName(), \"first\");\n \n }",
"public void createAdminUser() {\n\n Users user = new Users();\n user.setId(\"1\");\n user.setName(\"admin\");\n user.setPassword(bCryptPasswordEncoder.encode(\"admin\"));\n\n ExampleMatcher em = ExampleMatcher.matching().withIgnoreCase();\n Example<Users> example = Example.of(user, em);\n List<Users> users = userRepository.findAll(example);\n System.out.println(\"Existing users: \" + users);\n\n if (users.size() == 0) {\n System.out.println(\"admin user not found, hence creating admin user\");\n userRepository.save(user);\n System.out.println(\"admin user created\");\n latch.countDown();\n }\n try {\n latch.await();\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }",
"@Override\n\tpublic void updateUserProfile(User user) throws Exception {\n\n\t}",
"@Test\n public void createNewUserAndCheckIt() {\n UserLogin userLogin = new UserLogin();\n userLogin.setUserLogin(\"068-068-68-68\");\n userLogin.setUserPassword(\"12345\");\n boolean isThrow = false;\n try {\n UserResponse userResponse = loginsService.checkLoginSignInSignUp(userLogin, \"SignUp\");\n } catch (ApplicationException e) {\n isThrow = true;\n }\n assertThat(isThrow);\n\n //Successful registration\n userLogin.setUserPasswordNew(\"12345\");\n UserResponse userResponse = loginsService.checkLoginSignInSignUp(userLogin, \"SignUp\");\n\n assertThat(userResponse.getUserPhone().equals(usersService.normalizeAndCheckPhoneFormat(userLogin.getUserLogin())));\n assertThat(userResponse.getUserPoints()).size().isEqualTo(5);\n }",
"@Ignore(\"Test is not done yet\")\n @Test\n public void testChangingUsernameToExisting() {\n final UserRequest request = new UserRequest();\n // We're currently logged in as Austria, so we're trying to change the\n // username to Germany.\n request.setNewUsername(\"[email protected]\");\n final Response response = administration.controlUserAccount(token, request);\n assertThat(response.getError(), is(IWSErrors.FATAL));\n }",
"@Test(groups ={Slingshot,Regression})\n\tpublic void VerifyStdSpecificacctsPrepopulatedUserdetails() {\n\t\tReport.createTestLogHeader(\"MuMv\", \"Verify the confirmation page of Add new user is getting displayed with prepopulated user details\");\n\n\t\tUserProfile userProfile = new TestDataHelper().getUserProfile(\"MuMVTestDatas\");\n\t\tnew LoginAction()\n\t\t.BgbnavigateToLogin()\n\t\t.BgbloginDetails(userProfile);\n\t\tnew MultiUserMultiViewAction()\n\t\t.ClickManageUserLink()\n\t\t.ClickAddNewUserLink()\n\t\t.AddUserRadioButton()\n\t\t.StandardUser_Creation()\n\t\t.VerifySpecificAccountsViewNames(userProfile);\t \t \t\t \t \t\t \t \t \t \t\t \t \t\t \t \t\t \t \t\t\n\t}",
"@Test\n\tpublic void shouldAddUser() throws UserExistsException\n\t{\n\t\tUserProfile user = new UserProfile();\n\t\tuser.setId(100);\n\t\tuser.setLogin(\"testUser\");\n\t\t\n\t\twhen(userDao.findUserByLogin(user.getLogin())).thenReturn(null);\n\t\t\n\t\tuserService.addUser(user);\n\t}",
"@Test\n void updateSuccess() {\n String newFirstName = \"Artemis\";\n User userToUpdate = (User) dao.getById(1);\n userToUpdate.setFirstName(newFirstName);\n dao.saveOrUpdate(userToUpdate);\n User userAfterUpdate = (User) dao.getById(1);\n assertEquals(newFirstName, userAfterUpdate.getFirstName());\n }",
"@Test\n public void testUsernameChange() {\n final String username = \"[email protected]\";\n // There was a bug related to the Changing of Username, as it failed if\n // the password contained upper/lower case letters. Since IWS followed\n // the rule from IW3 and only looked at Passwords case insensitive.\n final String password = \"Harvey's password which is SUPER secret.\";\n final CreateUserRequest createRequest = new CreateUserRequest(username, password, \"Harvey\", \"Rabbit\");\n final CreateUserResponse createResponse = administration.createUser(token, createRequest);\n assertThat(createResponse.isOk(), is(true));\n\n // To ensure that we can use the account, we have to activate it. Once\n // it is activated, we can move on to the actual test.\n final String activationCode = readCode(NotificationType.ACTIVATE_NEW_USER);\n final Response activateResponse = administration.activateUser(activationCode);\n assertThat(activateResponse.isOk(), is(true));\n\n // Now we have a fresh new account which is active. So we can now try to\n // change the Username. To do this, we have to log in as the user, since\n // only a user may change his/her own username.\n final String newUsername = \"[email protected]\";\n final AuthenticationToken myToken = login(username, password);\n // We're building the request with the user itself as User Object\n final UserRequest updateRequest = new UserRequest(createResponse.getUser());\n // We're setting a new username here, which we can use.\n updateRequest.setNewUsername(newUsername);\n // To update the username, we need to provide some credentials,\n // otherwise the IWS will reject the request. This is needed to ensure\n // that nobody is attempting to hijack an active account.\n updateRequest.setPassword(password);\n // Let's just clear the Spy before we're using it :-)\n final Response updateResponse = administration.controlUserAccount(myToken, updateRequest);\n assertThat(updateResponse.isOk(), is(true));\n // Changing username must work without being logged in, well actually\n // it doesn't matter. As it doesn't use the current Session.\n logout(myToken);\n // Now, we can read out the update Code from the Notifications, which\n // is a cheap way of reading the value from the e-mail that is send.\n final String updateCode = readCode(NotificationType.UPDATE_USERNAME);\n final Response resetResponse = administration.updateUsername(updateCode);\n assertThat(resetResponse.isOk(), is(true));\n\n // Final part of the test, login with the new username, and ensure that\n // the UserId we're getting is the same as the previous Id.\n final AuthenticationToken newToken = login(newUsername, password);\n assertThat(newToken, is(not(nullValue())));\n final FetchPermissionResponse permissionResponse = access.fetchPermissions(newToken);\n assertThat(permissionResponse.isOk(), is(true));\n assertThat(permissionResponse.getAuthorizations().get(0).getUserGroup().getUser().getUserId(), is(createResponse.getUser().getUserId()));\n logout(newToken);\n // And done - Long test, but worth it :-)\n }",
"@Test\n public void testReadUser() throws InvalidUserException {\n //Arrange\n User user = new User();\n user.setEmail(\"[email protected]\");\n user.setFirstName(\"first\");\n user.setLastName(\"last\");\n user.setPassword(\"pass\");\n user.setRole(\"admin\");\n User createdUser = userService.createUser(user);\n \n\n //Act\n User fetchedUser = userService.readUser(createdUser.getUserId());\n \n //Assert\n assertEquals(fetchedUser.getUserId(), createdUser.getUserId());\n assertEquals(fetchedUser.getEmail(), \"[email protected]\");\n assertEquals(fetchedUser.getFirstName(), \"first\"); \n \n }",
"public void UserServiceTest_Edit()\r\n {\r\n User user = new User();\r\n user.setId(\"1234\");\r\n user.setName(\"ABCEdited\");\r\n user.setPassword(\"123edited\");\r\n ArrayList<Role> roles = new ArrayList<>();\r\n roles.add(new Role(\"statio manager\"));\r\n user.setRoles(roles);\r\n \r\n UserService service = new UserService(); \r\n try {\r\n service.updateUser(user);\r\n } catch (SQLException e) {\r\n fail();\r\n System.out.println(e);\r\n }catch (NotFoundException e) {\r\n fail();\r\n System.out.println(e);\r\n }\r\n }",
"@Test\n public void createUserTestTest()\n {\n HashMap<String, Object> values = new HashMap<String, Object>();\n values.put(\"age\", \"22\");\n values.put(\"dob\", new Date());\n values.put(\"firstName\", \"CreateFName\");\n values.put(\"lastName\", \"CreateLName\");\n values.put(\"middleName\", \"CreateMName\");\n values.put(\"pasword\", \"user\");\n values.put(\"address\", \"CreateAddress\");\n values.put(\"areacode\", \"CreateAddressLine\");\n values.put(\"city\", \"CreateCity\");\n values.put(\"country\", \"CreateCountry\");\n values.put(\"road\", \"CreateRoad\");\n values.put(\"suberb\", \"CreateSuberb\");\n values.put(\"cell\", \"CreateCell\");\n values.put(\"email\", \"user\");\n values.put(\"homeTell\", \"CreateHomeTell\");\n values.put(\"workTell\", \"CreateWorkTell\");\n createUser.createNewUser(values);\n\n Useraccount useraccount = useraccountCrudService.findById(ObjectId.getCurrentUserAccountId());\n Assert.assertNotNull(useraccount);\n\n Garage garage = garageCrudService.findById(ObjectId.getCurrentGarageId());\n Assert.assertNotNull(garage);\n\n Saleshistory saleshistory = saleshistoryCrudService.findById(ObjectId.getCurrentSalesHistoryId());\n Assert.assertNotNull(saleshistory);\n }",
"@Test\n\tpublic void testUpdateUserWithoutUserid() {\n\t\tUser testUser = new User();\n\t\ttestUser.setUserEmail(TEST_EMAIL);\n\t\ttestUser.setUserPassword(TEST_PASSWORD);\n\t\t\n\t\tgiven().body(testUser).contentType(ContentType.JSON).when()\n\t\t\t\t.put(getBaseTestURI()).then()\n\t\t\t\t.statusCode(HttpServletResponse.SC_BAD_REQUEST);\n\t}",
"@Test\n\tpublic void testUpdateAdminAccountSuccessfully() {\n\t\tassertEquals(2, adminAccountService.getAllAdminAccounts().size());\n\n\t\tString newName = \"New Name\";\n\t\tString newPassword = \"newPassword\";\n\n\t\tAdminAccount user = null; \n\t\ttry {\n\t\t\tuser = adminAccountService.updateAdminAccount(USERNAME1, newPassword, newName);\n\t\t} catch (InvalidInputException e) {\n\t\t\t// Check that no error occurred\n\t\t\tfail();\n\t\t}\n\t\tassertNotNull(user);\n\t\tassertEquals(USERNAME1, user.getUsername());\n\t\tassertEquals(newPassword, user.getPassword());\n\t\tassertEquals(newName, user.getName());\n\t}",
"@Test\n\tpublic void testGetUser() throws DBException {\n\t\tMyProfileController controller = new MyProfileController();\n\t\tUserBean adminBean = controller.getUser(1);\n\t\tboolean equal = true;\n\t\tif(adminBean.getId()!=1) {\n\t\t\tequal=false;\n\t\t}\n\t\tif(!adminBean.getName().equals(\"Admin\")){\n\t\t\tequal=false;\n\t\t}\n\t\tif(!adminBean.getSurname().equals(\"Admin\")){\n\t\t\tequal=false;\n\t\t}\n\t\tassertEquals(equal,true);\n\t}",
"@Test\n public void testUpdateUser_ResetPassword() throws Exception {\n User user = new User();\n user.setUserUID(123);\n user.setUsername(\"resetme\");\n user.setPasswordTemporary(false);\n\n when(userService.getUserByUID(123)).thenReturn(user);\n\n mockMvc.perform(put(\"/api/users/123?action=resetpwd\").contentType(MediaType.APPLICATION_JSON)).andExpect(status().isOk());\n\n verify(userService, times(1)).getUserByUID(anyLong());\n }",
"@Test\n\tpublic void testUpdateUserWithoutEmail() {\n\t\tUser testUser = new User();\n\t\ttestUser.setUserPassword(TEST_PASSWORD);\n\t\ttestUser.setUserId(TEMP_Key);\n\t\t\n\t\tgiven().body(testUser).contentType(ContentType.JSON).when()\n\t\t\t\t.put(getBaseTestURI()).then()\n\t\t\t\t.statusCode(HttpServletResponse.SC_BAD_REQUEST);\n\t}",
"@Test\n\tvoid updateFirstName() {\n\t\tfinal UserOrgEditionVo userEdit = new UserOrgEditionVo();\n\t\tuserEdit.setId(\"jlast3\");\n\t\tuserEdit.setFirstName(\"John31\");\n\t\tuserEdit.setLastName(\"Last3\");\n\t\tuserEdit.setCompany(\"ing\");\n\t\tuserEdit.setMail(\"[email protected]\");\n\t\tuserEdit.setGroups(null);\n\t\tinitSpringSecurityContext(\"assist\");\n\t\tresource.update(userEdit);\n\t\tTableItem<UserOrgVo> tableItem = resource.findAll(null, null, \"jlast3\", newUriInfoAsc(\"id\"));\n\t\tAssertions.assertEquals(1, tableItem.getRecordsTotal());\n\t\tAssertions.assertEquals(1, tableItem.getRecordsFiltered());\n\t\tAssertions.assertEquals(1, tableItem.getData().size());\n\n\t\tUserOrgVo user = tableItem.getData().get(0);\n\t\tAssertions.assertEquals(\"jlast3\", user.getId());\n\t\tAssertions.assertEquals(\"John31\", user.getFirstName());\n\t\tAssertions.assertEquals(\"Last3\", user.getLastName());\n\t\tAssertions.assertEquals(\"ing\", user.getCompany());\n\t\tAssertions.assertEquals(\"[email protected]\", user.getMails().get(0));\n\t\tAssertions.assertEquals(0, user.getGroups().size());\n\t\trollbackUser();\n\t}",
"@Test\n public void testCreateOnBehalfUser_asTechnologyManager() throws Exception {\n container.login(supplierAdminUser.getKey(), ROLE_TECHNOLOGY_MANAGER);\n VOUserDetails result = idService\n .createOnBehalfUser(customer.getOrganizationId(), \"abcdef\");\n checkCreatedUser(result, customer, \"abcdef\", false);\n checkUserRoleAssignment(result, ROLE_ORGANIZATION_ADMIN);\n }",
"@Test\n public void testCreateUser() {\n facade = UserFacade.getUserFacade(emf);\n User actual = facade.createUser(\"thias\", \"thias123\");\n User expected = new User(\"thias\", \"thias123\");\n Role userRole = new Role(\"user\");\n expected.addRole(userRole);\n assertEquals(expected.getUserName(), actual.getUserName());\n }",
"@Test\n\tpublic void testCreateUser(){\n\t\trepository.createUser(expectedUser);\n\t\tSystem.out.println(\"#########################>User inserted into database<#########################\");\n\t\tUser actualUser = repository.findByUsername(\"vgeorga\");\n\t\tassertEquals(expectedUser.getUsername(), actualUser.getUsername());\n\t}",
"@Test\n public void testGeneratedProfileFields() {\n Profile p = getProfile(BASIC_PROFILE_PATH);\n assertNotNull(\"Profile uniqueId was null\", p.getUniqueId());\n assertNotNull(\"Profile display name was null\", p.getDisplayName());\n }",
"@Test(alwaysRun = true, priority = 5)\n public void test006createUserWithExistingNameTest() {\n close();\n login();\n// create user\n createUser(EXISTING_USER_NAME, new HashMap<String, String>());\n checkOperationStatusOk(\"Save (GUI)\");\n //try to create user with the same name\n createUser(EXISTING_USER_NAME, new HashMap<String, String>());\n //check if error message appears\n getFeedbackPanel().find(byText(\"Error processing focus\"));\n }",
"private void editUser(){\n getDeviceLocation();\n ProxyBuilder.SimpleCallback<User> callback = returnedUser-> responseEdit(returnedUser);\n ServerManager.editUserProfile(userManager,callback);\n }",
"@Test\n\tpublic void testCreateUser() {\n\t\tassertTrue(auctionSystem.createUser(\"toto\", \"Glen\", \"Fiddich\", RoleEnum.SELLER));\n\t\tassertTrue(auctionSystem.createUser(\"tata\", \"Johnnie\", \"Campbell\", RoleEnum.BUYER));\n\t\tassertTrue(auctionSystem.createUser(\"tutu\", \"Ballentine\", \"Darmore\", RoleEnum.SELLER_BUYER));\n\t}",
"@Test(priority=2)\n\tpublic void ValidateNewUser() {\n\t\t\n\t\tString apiEndPoint = \"https://gorest.co.in/public-api/users/\"+newUserId;\n\t\tSystem.out.println(\"API EndPoint is: \"+apiEndPoint);\n\t\t\t\t\t\t\n\t\tGetUser getuser= given()\n\t\t\t.proxy(\"internet.ford.com\", 83)\n\t\t\t.contentType(\"application/json\")\n\t\t\t.baseUri(apiEndPoint)\t\t\t\n\t\t.when()\n\t\t\t.get(apiEndPoint).as(GetUser.class);\n\t\t\n\t\tAssert.assertEquals(getuser.getCode(),200);\n\t\tAssert.assertEquals(getuser.getData().getName(),\"Stephen M D\");\n\t\tAssert.assertEquals(getuser.getData().getStatus(),\"Active\");\n\t}",
"@Test\r\n public void UserServiceTest_Create()\r\n {\r\n User user = new User();\r\n user.setId(\"1234\");\r\n user.setName(\"ABCDEFG\");\r\n ArrayList<Role> roles = new ArrayList<>();\r\n roles.add(new Role(\"Presenter\"));\r\n user.setRoles(roles);\r\n user.setPassword(\"12345678\");\r\n \r\n UserService service = new UserService();\r\n \r\n try {\r\n service.createAUser(user);\r\n } catch (SQLException e) {\r\n fail();\r\n System.out.println(e);\r\n }\r\n UserServiceTest_Edit();\r\n UserServiceTest_Delete();\r\n }",
"@Test\n public void testSameUser() {\n LocalUserManager ua = new LocalUserManager();\n try {\n ua.createUser(\"gburdell1\", \"buzz\", \"[email protected]\", \"George\", \"Burdell\", \"MANAGER\");\n ua.createUser(\"gburdell2\", \"ramblin\", \"[email protected]\", \"G\", \"B\", \"USER\");\n } catch (Exception e) {\n Assert.assertEquals(1, ua.getUsers().size());\n return;\n }\n Assert.fail();\n }",
"@Test\n public void testCreateAccountWithoutPassword() {\n final CreateUserRequest createUserRequest = new CreateUserRequest();\n createUserRequest.setUsername(\"[email protected]\");\n createUserRequest.setFirstname(\"Beta\");\n createUserRequest.setLastname(\"Gamma\");\n\n // Now, perform the actual test - create the Account, and verify that\n // the response is ok, and that a Notification was sent\n final Response result = administration.createUser(token, createUserRequest);\n assertThat(result.isOk(), is(true));\n // Creating a new User should generate an Activate User notification\n final NotificationType type = NotificationType.ACTIVATE_NEW_USER;\n assertThat(spy.size(type), is(1));\n final String activationCode = spy.getNext(type).getFields().get(NotificationField.CODE);\n assertThat(activationCode, is(not(nullValue())));\n\n // Check that the user is in the list of members\n final String memberGroupId = findMemberGroup(token).getGroupId();\n token.setGroupId(memberGroupId);\n final FetchGroupRequest groupRequest = new FetchGroupRequest(memberGroupId);\n final FetchGroupResponse groupResponse = administration.fetchGroup(token, groupRequest);\n assertThat(groupResponse, is(not(nullValue())));\n }",
"@Test\n public void testSaveOrUpdateUser() {\n System.out.println(\"saveOrUpdateUser\");\n User user = null;\n UserServiceImpl instance = new UserServiceImpl(passwordService);\n instance.saveOrUpdateUser(user);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }",
"@Test\n\tpublic void updateUser() throws Exception {\n\t\tmockMvc.perform(\n\t\t\t\tpost(\"/secure/user/updateUser\").param(\"username\", \"username1\")\n\t\t\t\t\t\t.param(\"firstName\", \"updatedFirstName\")\n\t\t\t\t\t\t.accept(MediaType.APPLICATION_JSON)).andDo(print())\n\t\t\t\t.andExpect(status().isOk())\n\t\t\t\t.andExpect(content().contentType(\"application/json\"))\n\t\t\t\t.andExpect(jsonPath(\"message\").value(\"Success\"));\n\n\t}",
"@Test\n public void testSaveCreateUserCommandModel() throws Exception {\n BCryptPasswordEncoder encoder = new BCryptPasswordEncoder();\n CreateUserCommandModel commandModel = new CreateUserCommandModel();\n commandModel.setUsername(\"Tephon\");\n commandModel.setPassword(\"password\");\n\n User user = userWebServices.saveCreateUserCommandModel(commandModel);\n \n assert user.getId() != 0;\n assert user.getUsername().equals(\"Tephon\");\n }",
"public void setUserProfile(UserProfile userProfile) {this.userProfile = userProfile;}",
"@Test\n public void fetchUserProfileSync_userIdPassedToEndpoint_returnSuccess(){\n SUT.fetchUserProfileSync(USER_ID);\n assertThat(userProfileHttpEndpointSyncTd.mUserId, is(USER_ID));\n }",
"@Test\n\tvoid update() {\n\t\tfinal UserOrgEditionVo userEdit = new UserOrgEditionVo();\n\t\tuserEdit.setId(\"flast1\");\n\t\tuserEdit.setFirstName(\"FirstA\");\n\t\tuserEdit.setLastName(\"LastA\");\n\t\tuserEdit.setCompany(\"ing\");\n\t\tuserEdit.setMail(\"[email protected]\");\n\t\tfinal List<String> groups = new ArrayList<>();\n\t\tgroups.add(\"dig rha\");\n\t\tuserEdit.setGroups(groups);\n\t\tinitSpringSecurityContext(\"fdaugan\");\n\t\tresource.update(userEdit);\n\t\tfinal TableItem<UserOrgVo> tableItem = resource.findAll(null, null, \"flast1\", newUriInfoAsc(\"id\"));\n\t\tAssertions.assertEquals(1, tableItem.getRecordsTotal());\n\t\tAssertions.assertEquals(1, tableItem.getRecordsFiltered());\n\t\tAssertions.assertEquals(1, tableItem.getData().size());\n\n\t\tfinal UserOrgVo user = tableItem.getData().get(0);\n\t\tAssertions.assertEquals(\"flast1\", user.getId());\n\t\tAssertions.assertEquals(\"Firsta\", user.getFirstName());\n\t\tAssertions.assertEquals(\"Lasta\", user.getLastName());\n\t\tAssertions.assertEquals(\"ing\", user.getCompany());\n\t\tAssertions.assertEquals(\"[email protected]\", user.getMails().get(0));\n\t\tAssertions.assertEquals(1, user.getGroups().size());\n\t\tAssertions.assertEquals(\"DIG RHA\", user.getGroups().get(0).getName());\n\n\t\t// Rollback attributes\n\t\tuserEdit.setId(\"flast1\");\n\t\tuserEdit.setFirstName(\"First1\");\n\t\tuserEdit.setLastName(\"Last1\");\n\t\tuserEdit.setCompany(\"ing\");\n\t\tuserEdit.setMail(\"[email protected]\");\n\t\tuserEdit.setGroups(null);\n\t\tresource.update(userEdit);\n\t}",
"@Test\n\n public void create() {\n User user = new User();\n user.setAccount(\"TestUser03\");\n user.setEmail(\"[email protected]\");\n user.setPhoneNumber(\"010-1111-3333\");\n user.setCreatedAt(LocalDateTime.now());\n user.setCreatedBy(\"TestUser3\");\n\n User newUser = userRepository.save(user);\n System.out.println(\"newUser : \" + newUser);\n }",
"@Ignore\n @Test\n public void testAdminUsers() {\n Map<String, Object> map = new HashMap<>();\n map.put(\"uid\", \"duckart\");\n map.put(\"uhUuid\", \"89999999\");\n AttributePrincipal principal = new AttributePrincipalImpl(\"duckart\", map);\n Assertion assertion = new AssertionImpl(principal);\n CasUserDetailsServiceImplj userDetailsService = new CasUserDetailsServiceImplj(userBuilder);\n User user = (User) userDetailsService.loadUserDetails(assertion);\n\n // Basics.\n assertThat(user.getUsername(), is(\"duckart\"));\n assertThat(user.getUid(), is(\"duckart\"));\n assertThat(user.getUhUuid(), is(\"89999999\"));\n\n // Granted Authorities.\n assertTrue(user.getAuthorities().size() > 0);\n assertTrue(user.hasRole(Role.ANONYMOUS));\n assertTrue(user.hasRole(Role.UH));\n assertTrue(user.hasRole(Role.EMPLOYEE));\n assertTrue(user.hasRole(Role.ADMIN));\n\n // Check a made-up junky role name.\n\n map = new HashMap<>();\n map.put(\"uid\", \"someuser\");\n map.put(\"uhUuid\", \"10000001\");\n principal = new AttributePrincipalImpl(\"someuser\", map);\n assertion = new AssertionImpl(principal);\n user = (User) userDetailsService.loadUserDetails(assertion);\n\n assertThat(user.getUsername(), is(\"someuser\"));\n assertThat(user.getUid(), is(\"someuser\"));\n assertThat(user.getUhUuid(), is(\"10000001\"));\n\n assertTrue(user.getAuthorities().size() > 0);\n assertTrue(user.hasRole(Role.ANONYMOUS));\n assertTrue(user.hasRole(Role.UH));\n assertTrue(user.hasRole(Role.EMPLOYEE));\n assertTrue(user.hasRole(Role.ADMIN));\n }",
"@Test\n\tpublic void newUser() {\n\n\t\tUser user = new User(\"moviewatcher\", \"$2a$10$37jGlxDwJK4mRpYqYvPmyu8mqQJfeQJVSdsyFY5UNAm9ckThf2Zqa\", \"USER\");\n\t\tuserRepository.save(user);\n\n\t\tassertThat(user).isNotNull();\n\t\tassertThat(user).hasFieldOrPropertyWithValue(\"username\", \"moviewatcher\");\n\t}",
"@Test (priority = 0)\n public void test001createUserWithUserNameOnlyTest() {\n close();\n login();\n\n checkLoginIsPerformed();\n //create user with filled user name only\n createUser(SIMPLE_USER_NAME, new HashMap<String, String>());\n checkOperationStatusOk(\"Save (GUI)\");\n\n //search for the created in users list\n searchForElement(SIMPLE_USER_NAME);\n $(By.linkText(SIMPLE_USER_NAME)).shouldBe(visible).click();\n }",
"@Test\n public void test_update_user_success() throws Exception {\n UserDto user = new UserDto(1L, \"Arya\", \"Stark\", \"[email protected]\");\n\n when(userService.updateUser(user.getUserId(), user)).thenReturn(user);\n\n mockMvc.perform(put(\"/users/{id}\", user.getUserId()).contentType(MediaType.APPLICATION_JSON)\n .content(asJsonString(user))).andExpect(status().isOk());\n\n verify(userService, times(1)).updateUser(user.getUserId(), user);\n verifyNoMoreInteractions(userService);\n }",
"public void updateUserDetails() {\n\t\tSystem.out.println(\"Calling updateUserDetails() Method To Update User Record\");\n\t\tuserDAO.updateUser(user);\n\t}",
"private void setCreateUser(entity.User value) {\n __getInternalInterface().setFieldValue(CREATEUSER_PROP.get(), value);\n }",
"@Test(groups ={Slingshot,Regression})\n\tpublic void allAcctsStdUserCreation() {\n\t\tReport.createTestLogHeader(\"MuMv\", \"Verify whether the user can successfully enter details in Add new user page and registers it\"); \t \t \t \n\t\tUserProfile userProfile = new TestDataHelper().getUserProfile(\"MuMVTestDatas\");\n\t\tnew LoginAction()\n\t\t.BgbnavigateToLogin()\n\t\t.BgbloginDetails(userProfile);\n\t\tnew MultiUserMultiViewAction()\n\t\t.ClickManageUserLink()\n\t\t.ClickAddNewUserLink()\n\t\t.AddUserRadioButton()\n\t\t.StandardUserCreation();\n\t\tnew BgbRegistrationAction()\n\t\t.AddNewStdUser(userProfile);\n\t\tnew MultiUserMultiViewAction()\n\t\t.verifyAuditTable(userProfile)\n\t\t.AdduserConfirmationPage()\n\t\t.confirmationPageVerificationLinks();\n\t}",
"@Test\n public void updateTest() throws SQLException, IDAO.DALException {\n userDAO.create(user);\n user.setNavn(\"SørenBob\");\n user.setCpr(\"071199-4397\");\n user.setAktiv(false);\n user.setIni(\"SBO\");\n // Opdatere objektet i databasen, og sammenligner.\n userDAO.update(user);\n recivedUser = userDAO.get(-1);\n\n assertEquals(recivedUser.getId(), user.getId());\n assertEquals(recivedUser.getNavn(), user.getNavn());\n assertEquals(recivedUser.getIni(), user.getIni());\n assertEquals(recivedUser.getCpr(), user.getCpr());\n assertEquals(recivedUser.isAktiv(),user.isAktiv());\n }",
"public boolean updateProfile(ApplicationUser applicationUser){\n boolean isUpdated = false;\n applicationUser = mongoDbConnector.updateProfile(applicationUser);\n if(applicationUser != null)\n isUpdated = true;\n return isUpdated;\n }",
"@SmallTest\n public void testInitiallyDone_ProfileDuringSuw() {\n final ProvisioningParams params = createProvisioningParams(ACTION_PROVISION_MANAGED_PROFILE,\n false);\n when(mSettingsFacade.isUserSetupCompleted(mContext)).thenReturn(false);\n when(mUtils.getManagedProfile(mContext)).thenReturn(UserHandle.of(MANAGED_PROFILE_USER_ID));\n\n // WHEN calling markUserProvisioningStateInitiallyDone\n mHelper.markUserProvisioningStateInitiallyDone(params);\n\n // THEN the managed profile's state should be set to COMPLETE\n verify(mDevicePolicyManager).setUserProvisioningState(STATE_USER_SETUP_COMPLETE,\n MANAGED_PROFILE_USER_ID);\n // THEN the primary user's state should be set to PROFILE_COMPLETE\n verify(mDevicePolicyManager).setUserProvisioningState(STATE_USER_PROFILE_COMPLETE,\n PRIMARY_USER_ID);\n }",
"@Test\n public void getUserInformationSuccessfullyTest() throws Exception {\n\n User user_expected = new User();\n user_expected.setId(1L);\n user_expected.setName(\"nametest\");\n user_expected.setLast_name(\"lastnametest\");\n user_expected.setUsername(\"usernametest\");\n user_expected.setPassword(\"a7574a42198b7d7eee2c037703a0b95558f195457908d6975e681e2055fd5eb9\");\n\n given(userRepository.findById(anyLong())).willReturn(Optional.of(user_expected));\n\n User user_retrived = userServiceImpl.getUserInformation(1L);\n Assertions.assertNotNull(user_retrived);\n Assertions.assertNull(user_retrived.getPassword());\n\n }",
"@Test(groups ={Slingshot,Regression})\n\tpublic void VerifyNewUserDetailsactivation() {\n\t\tReport.createTestLogHeader(\"MuMv\", \"Verify the Super User Overlay Yes Button Selection\");\n\n\t\tUserProfile userProfile = new TestDataHelper().getUserProfile(\"MuMVTestDatas\");\n\t\tnew LoginAction()\n\t\t.BgbnavigateToLogin()\n\t\t.BgbloginDetails(userProfile);\n\t\tnew MultiUserMultiViewAction()\n\t\t.ClickManageUserLink()\n\t\t.ClickAddNewUserLink()\n\t\t.AddUserRadioButton()\n\t\t.SuperUserCreation()\n\t\t.SuperUserOverlayyes(); \t \t \t \t \n\t}",
"@Test(dataProvider = \"CreateData\", dataProviderClass = DataProviderClass.class)\n public void TC004_VerifyUserCanUpdateHisProfileFromUserDropdownMenu(HashMap<String, String> data) {\n PantryForGoodSignUpPage p4gSignUp = new PantryForGoodSignUpPage(driver);\n PantryForGoodProfilePage p4gProfile = new PantryForGoodProfilePage(driver);\n PantryForGoodHomePage p4gPage = new PantryForGoodHomePage(driver);\n\n //Sign up a new account\n p4gSignUp.navigateToURL(baseURL);\n p4gSignUp.goToSignUpPage();\n p4gSignUp.registerAnAccount(data.get(\"fName\"), data.get(\"lName\"), data.get(\"email\"), data.get(\"password\"));\n sleep(3000);\n\n //Go to profile page\n p4gProfile.goToProfilePage();\n\n //Edit user profile and verify if the update is made correctly\n p4gProfile.editUserProfileFromDropdownMenu(driver, data.get(\"fName\"), data.get(\"lName\"), data.get(\"fullName\"));\n\n //Log out\n p4gPage.signOut();\n }",
"public void saveOrUpdateProfile(){\n try {\n \n if(PersonalDataController.getInstance().existRegistry(username)){\n PersonalDataController.getInstance().update(username, staff_name, staff_surname, \n Integer.parseInt(id_type), \n id_number, imagePic, phone_number, mobile_number, email, birthdate, \n Integer.parseInt(gender), birthdate);\n }else{\n PersonalDataController.getInstance().create(username, staff_name, staff_surname, \n Integer.parseInt(id_type), \n id_number, imagePic, phone_number, mobile_number, email, birthdate, \n Integer.parseInt(gender));\n }\n } catch (GB_Exception ex) {\n LOG.error(ex);\n GBMessage.putMessage(GBEnvironment.getInstance().getError(32), null);\n }\n GBMessage.putMessage(GBEnvironment.getInstance().getError(33), null);\n }",
"@Test\n\tpublic void createUsersServiceTestKo_pwdNull() {\n\t\tUserDto user = null;\n\t\tDate now = Calendar.getInstance().getTime();\n\t\tList<Profil> listProfils = profilService.findAll();\n\t\ttry {\n\t\t\t//insert users\n\t\t\t\tuser = new UserDto();\n\t\t\t\tuser.setProfil(listProfils.get(0));\n\t\t\t\tuser.setModificationDate(now);\n\t\t\t\tuser.setCreationDate(now);\n\t\t\t\tuser.setFirstname(\"firstname\");\n\t\t\t\tuser.setEmail(\"email\");\n\t\t\t\tuser.setUserLastname(\"last name\");\n\t\t\t\tuserService.createUser(user);\n\t\t\t\tfail();\n\t\t} catch (HangTechnicalException e) {\n\t\t\te.printStackTrace();\n\t\t\tassertThat(\"Erro while saving user\", equalTo(e.getMessage()));\n\t\t\tassertTrue(e.getCause().getCause() instanceof NullPointerException);\n\t\t} \n\t}",
"@Test\n\tpublic void testSaveUser() {\n\t\tfinal User user = new User();\n\t\tuser.setUserid(15);\n\t\tResponseEntity<String> responseEntity = this.restTemplate.postForEntity(getRootUrl() + \"/save-user?userid=15\", user , String.class);\n\t\tassertEquals(200,responseEntity.getStatusCodeValue());\n\t}",
"@Test\n public void tcEditProfileWithInvalidData() {\n\n }",
"@Test\n public void testUserManager(){\n userManager.addUser(\"and\",\"rew\");\n assertEquals(\"rew\",userManager.getPassword(\"and\"));\n userManager.addUser(\"a\",\"a\");\n assertEquals(\"a\",userManager.getPassword(\"a\"));\n assertEquals(\"rew\",userManager.getPassword(\"and\"));\n }",
"@Test (priority = 1)\n public void test002createUserWithAllFieldsTest() {\n close();\n login();\n\n //create user with filled user name only\n Map<String, String> userAttributesMap = getAllUserAttributesMap();\n createUser(ALL_FIELDS_USER_NAME, userAttributesMap);\n\n checkOperationStatusOk(\"Save (GUI)\");\n //search for the created user in users list\n searchForElement(ALL_FIELDS_USER_NAME);\n //check if all fields are saved with values\n $(By.linkText(ALL_FIELDS_USER_NAME)).shouldBe(visible).click();\n checkObjectAttributesValues(userAttributesMap);\n }",
"@Test(groups ={Slingshot,Regression})\n\tpublic void VerifyUserType_WhatsthisOverlay() {\n\t\tReport.createTestLogHeader(\"MuMv\", \"Verify user is able to create Standard user and verify the audit details\");\t\t\t\t\t \t \t \n\t\tUserProfile userProfile = new TestDataHelper().getUserProfile(\"MuMVTestDataspl\");\n\t\tnew LoginAction()\n\t\t.BgbnavigateToLogin()\n\t\t.BgbloginDetails(userProfile);\n\t\tnew MultiUserMultiViewAction()\n\t\t.ClickManageUserLink()\n\t\t.ClickAddNewUserLink()\n\t\t.AddUserRadioButton()\n\t\t.SuperUserCreation()\n\t\t.SuperUserOverlayyes()\n\t\t.AddUsersWhatisThisverlay();\t\t\t\t \t \t\n\n\t}",
"@BeforeClass(alwaysRun = true)\r\n\tpublic void createUser() throws ParseException, SQLException, JoseException {\r\n\t\tSystem.out.println(\"******STARTING***********\");\r\n\t\tUser userInfo = User.builder().build();\r\n\t\tuserInfo.setUsername(userName);\r\n\t\tuserInfo.setPassword(\"Test@123\");\r\n\t\tsessionObj = EnvSession.builder().cobSession(config.getCobrandSessionObj().getCobSession())\r\n\t\t\t\t.path(config.getCobrandSessionObj().getPath()).build();\r\n\t\t//userHelper.getUserSession(\"InsightsEngineusers26 \", \"TEST@123\", sessionObj); \r\n\t\tuserHelper.getUserSession(userInfo, sessionObj);\r\n\t\tlong providerId = 16441;\r\n\t\tproviderAccountId = providerId;\r\n\t\tResponse response = providerAccountUtils.addProviderAccountStrict(providerId, \"fieldarray\",\r\n\t\t\t\t\"budget1_v1.site16441.1\", \"site16441.1\", sessionObj);\r\n\t\tproviderAccountId = response.jsonPath().getLong(JSONPaths.PROVIDER_ACC_ID);\r\n\t\tAssert.assertTrue(providerAccountId!=null);\r\n\t\t\r\n\t\t}",
"@Override\n public void checkProfileUserData() {\n mProfilePresenter.checkProfileUserData();\n }",
"private void checkCreatedUser(VOUserDetails createdUser,\n Organization userOrg, String password, boolean isSamlSpMode)\n throws Exception {\n assertNotNull(createdUser);\n if (isSamlSpMode) {\n assertEquals(password, createdUser.getUserId());\n }\n assertFalse(supplierAdminUser.getKey() == createdUser.getKey());\n assertEquals(userOrg.getOrganizationId(),\n createdUser.getOrganizationId());\n assertEquals(UserAccountStatus.ACTIVE, createdUser.getStatus());\n assertEquals(supplierAdminUser.getEmail(), createdUser.getEMail());\n assertEquals(supplierAdminUser.getLocale(), createdUser.getLocale());\n assertEquals(supplierAdminUser.getSalutation(),\n createdUser.getSalutation());\n assertTrue(createdUser.hasAdminRole());\n\n // correct the password, so implicitly verifying it\n if (!isSamlSpMode) {\n container.login(createdUser.getKey());\n idService.changePassword(password, password);\n }\n }",
"@Test\n\tvoid testCreateAccount() {\n\t\t\n\t\t// Data Object for unregister user\n\t\tUser user = new User(\"Create AccountExample\", \"CreateAccount\", \"[email protected]\");\n\t\t\n\t\t// Prepare data\n\t\tUserDAO dao = new UserDAO();\n\t\tboolean exist = false;\n\t\t\n\t\ttry {\n\t\t\t// Creating User in DB\n\t\t\tdao.createAccount(user, \"CreateAccountPassword\");\n\t\t\t\n\t\t\t// Boolean confirming if exist\n\t\t\texist = !dao.availabilityUsername(user.getUsername());\n\t\t\t\n\t\t\t// Deleting account\n\t\t\tdao.deleteAccount(user.getUsername());\n\t\t\t\n\t\t} catch (ClassNotFoundException | UnsupportedEncodingException | SQLException | GeneralSecurityException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\t// Asserting that the create account works\n\t\tassertTrue(exist);\n\t}",
"public void saveProfileCreateData() {\r\n\r\n }",
"@Override\n\tpublic UserProfileResponse updateProfile(User user) {\n\t\t// datasource is used to connect with database\n\t\tdatasource = getDataSource();\n\t\tjdbcTemplate = new JdbcTemplate(datasource);\n\t\tUserProfileResponse gcmres = new UserProfileResponse();\n\t\tlogger.info(\"IN updateProfile METHOD \");\n\t\t// check if user exists in database with user_id\n\t\tString sql = \"select count(1) from user where user_id = ? \";\n\t\tint result = jdbcTemplate.queryForObject(sql, new Object[] { user.getUserid() }, Integer.class);\n\t\t// if user exists, return userId\n\t\tlogger.info(\"Query Count : \" + result);\n\t\tif (result > 0) {\n\t\t\tString update_gcm_query = \"Update user set emailid = ?, mobileno = ?, username = ?, uuid = ?, appversion = ?, gcmregistartionkey = ? where user_id = ?\";\n\t\t\tint rowcount = jdbcTemplate.update(update_gcm_query, user.getEmailid(), user.getMobileno(),\n\t\t\t\t\tuser.getUsername(), user.getUuid(), user.getAppversion(), user.getGcmregistartionkey(),\n\t\t\t\t\tuser.getUserid());\n\t\t\tlogger.info(\"updateProfile Update Row Count : \" + rowcount);\n\t\t\tif (rowcount > 0) {\n\t\t\t\tgcmres.setStatus(true);\n\t\t\t\tgcmres.setMessage(\"User Profile IS Updated Successfully For User Id:\" + user.getUserid());\n\t\t\t\tlogger.info(\"User Profile IS Updated Successfully\");\n\t\t\t} else {\n\t\t\t\tgcmres.setStatus(false);\n\t\t\t\tgcmres.setMessage(\"User Profile Is Not Updated Successfully For User Id:\" + user.getUserid());\n\t\t\t\tlogger.info(\"User Profile Is Not Updated Successfully For User Id:\" + user.getUserid());\n\t\t\t}\n\n\t\t} else {\n\t\t\tgcmres.setStatus(false);\n\t\t\tgcmres.setMessage(\"User Profile Is Not Updated Successfully For User Id:\" + user.getUserid());\n\t\t\tlogger.info(\"User Profile Is Not Updated Successfully For User Id:\" + user.getUserid());\n\t\t}\n\n\t\treturn gcmres;\n\n\t}",
"@Test\n public void editProfileTest() {\n }",
"@POST\n @Path(\"/create\")\n @Consumes(MediaType.APPLICATION_JSON)\n public Response createUser(ProfileJson json) throws ProfileDaoException {\n Profile profile = json.asProfile();\n profile.setPassword(BCrypt.hashpw(profile.getPassword(), BCrypt.gensalt()));\n //add checking if profile doesn't exit\n api.saveProfile(profile, datastore);\n return Response\n .created(null)\n .build();\n }",
"@Test\n\tpublic void test_create_new_user_success(){\n\t\tUser user = new User(null, \"create_user\", \"[email protected]\", \"12345678\");\n\t\tResponseEntity<User> response = template.postForEntity(REST_SERVICE_URI + ACCESS_TOKEN + token, user, User.class);\n\t\tUser newUser = response.getBody();\n\t\tassertThat(newUser.getName(), is(\"create_user\"));\n\t\tassertThat(response.getStatusCode(), is(HttpStatus.CREATED));\n\t\tvalidateCORSHttpHeaders(response.getHeaders());\n\t}",
"private void editProfile() {\n Log.d(TAG, \"Starting volley request to API\");\n try {\n String authority = String.format(Constants.AUTHORITY,\n Constants.TENANT,\n Constants.EDIT_PROFILE_POLICY);\n\n User currentUser = Helpers.getUserByPolicy(\n sampleApp.getUsers(),\n Constants.EDIT_PROFILE_POLICY);\n\n sampleApp.acquireToken(\n this,\n Constants.SCOPES.split(\"\\\\s+\"),\n currentUser,\n UiBehavior.SELECT_ACCOUNT,\n null,\n null,\n authority,\n getEditPolicyCallback());\n } catch(MsalClientException e) {\n /* No User */\n Log.d(TAG, \"MSAL Exception Generated while getting users: \" + e.toString());\n }\n\n }",
"@Test\n public void testCreate() {\n User user = new User(\"lgn\", \"[email protected]\", \"Login Name\", \n \"12345678\");\n userService.create(user);\n }",
"@Test\n\tpublic void testCreateAdminAccountSuccessfully() {\n\t\tassertEquals(2, adminAccountService.getAllAdminAccounts().size());\n\n\t\tString username = \"newUsername\";\n\t\tAdminAccount user = null;\n\t\ttry {\n\t\t\tuser = adminAccountService.createAdminAccount(username, PASSWORD1, NAME1);\n\t\t} catch (InvalidInputException e) {\n\t\t\tfail();\n\t\t}\n\t\tassertNotNull(user);\n\t\tassertEquals(username, user.getUsername());\n\t\tassertEquals(PASSWORD1, user.getPassword());\n\t\tassertEquals(NAME1, user.getName());\n\t}",
"public String updateUserProfileAction()throws Exception{\n\t\tString response=\"\";\n\t\tresponse = getService().getUserMgmtService().updateUser(getAuthBean().getUserName(),\n\t\t\t\tgetAuthBean().getFirstName(),\n\t\t\t\tgetAuthBean().getLastName(),\n\t\t\t\tgetAuthBean().getEmailId(),\n\t\t\t\tgetAuthBean().getRole()\n\t\t);\n\t\tgetAuthBean().setResponse(response);\n\t\tinputStream = new StringBufferInputStream(response);\n\t\tinputStream.close();\n\t\treturn SUCCESS;\n\t}",
"public void createUser(User user) {\n\n\t}",
"@Test\n public void UserCreation() throws Exception {\n openDemoSite(driver);\n driver.findElement(By.xpath(\"//li/a[@title=\\\"Admin area\\\"]\")).click();\n driver.findElement(By.xpath(\"//input[@name='login']\")).sendKeys(\"Email\");\n driver.findElement(By.xpath(\"//input[@name='password']\")).sendKeys(\"Password\");\n driver.findElement(By.xpath(\"//button[@type='submit']\")).click();\n Assert.assertTrue(\"Admin should be logged in\", false);\n driver.findElement(By.xpath(\"//a[@title=\\\"Users list\\\"]\")).click();\n driver.findElement(By.xpath(\"//button[@class='btn regular-button']\")).click();\n driver.findElement(By.xpath(\"//input[@id='login']\")).sendKeys(\"Email\");\n driver.findElement(By.xpath(\"//input[@id='password']\")).sendKeys(\"Password\");\n driver.findElement(By.xpath(\"//input[@id='password-conf']\")).sendKeys(\"Confirm password\");\n driver.findElement(By.xpath(\"//div/button[@type='submit']/span[text()='Create account']\")).click();\n\n }",
"@Test\n public void testUpdateUser_InvalidUser() throws Exception {\n when(userService.getUserByUID(anyLong())).thenThrow(IncorrectResultSizeDataAccessException.class);\n\n mockMvc.perform(put(\"/api/users/321?action=unlock\")).andExpect(status().isNotFound());\n\n verify(userService, times(1)).getUserByUID(anyLong());\n }",
"@Test\n public void testCreateValidUser() {\n LocalUserManager ua = new LocalUserManager();\n\n try {\n ua.createUser(\"gburdell1\", \"buzz\", \"[email protected]\", \"George\", \"Burdell\", \"MANAGER\");\n } catch (Exception e) {\n Assert.fail();\n }\n Assert.assertEquals(1, ua.getUsers().size());\n Assert.assertEquals(\"gburdell1\", ua.getUsers().get(0).getUsername());\n Assert.assertEquals(\"[email protected]\", ua.getUsers().get(0).getEmail());\n Assert.assertEquals(UserClass.MANAGER, ua.getUsers().get(0).getUserClass());\n }",
"@Test\n public void testChangePassword() throws AuthenticationException, IllegalAccessException {\n EntityManager em = emf.createEntityManager();\n User finduser;\n String userName = \"aaa\";\n String newPassword = \"JuiceIsLoose123/\";\n facade.changePassword(userName, \"bbb\", newPassword, newPassword);\n try {\n em.getTransaction().begin();\n finduser = em.find(User.class, userName);\n em.getTransaction().commit();\n } finally {\n em.close();\n }\n assertTrue(finduser.verifyPassword(newPassword));\n\n }",
"@Test\r\n public void testRegisterNewUser() {\r\n System.out.println(\"registerNewUser\");\r\n String newName = \"Admin4\";\r\n String newPassword1 = \"4441\";\r\n String newPassword2 = \"4441\";\r\n String rights = \"A\";\r\n Users instance = new Users();\r\n instance.registerNewUser(newName, newPassword1, newPassword2, rights);\r\n // TODO review the generated test code and remove the default call to fail.\r\n fail(\"The test case is a prototype.\");\r\n }"
] |
[
"0.7207893",
"0.7076503",
"0.6993102",
"0.6915705",
"0.68231666",
"0.67948735",
"0.67520463",
"0.6751899",
"0.6736847",
"0.6736512",
"0.6728615",
"0.6719467",
"0.67130697",
"0.67032844",
"0.66803926",
"0.66734743",
"0.66206384",
"0.659449",
"0.6577463",
"0.6576063",
"0.65703785",
"0.6542099",
"0.6530406",
"0.6529539",
"0.65277797",
"0.65239364",
"0.64771646",
"0.6470982",
"0.64519167",
"0.64511484",
"0.6447065",
"0.6442151",
"0.6439831",
"0.6437545",
"0.6432891",
"0.6431469",
"0.6430768",
"0.6391169",
"0.63704157",
"0.63571",
"0.63442284",
"0.63417435",
"0.6333502",
"0.63321334",
"0.63224626",
"0.6322273",
"0.63018394",
"0.62981015",
"0.6295141",
"0.62912714",
"0.6274972",
"0.6272466",
"0.6270437",
"0.6267361",
"0.62447166",
"0.6236163",
"0.6231648",
"0.6231141",
"0.62289715",
"0.62186813",
"0.62066007",
"0.6193215",
"0.61916554",
"0.6191354",
"0.61632806",
"0.6152594",
"0.61467624",
"0.614439",
"0.6136665",
"0.6135361",
"0.61235416",
"0.6118965",
"0.61108136",
"0.6108787",
"0.61070365",
"0.61016595",
"0.61012053",
"0.61008793",
"0.60997033",
"0.60928774",
"0.6083279",
"0.6081907",
"0.6080863",
"0.60776544",
"0.6077541",
"0.6077206",
"0.6072902",
"0.60718566",
"0.6070411",
"0.60628223",
"0.6062757",
"0.6055916",
"0.60548013",
"0.6044266",
"0.6037072",
"0.60335344",
"0.6019151",
"0.6016729",
"0.60134304",
"0.6012089"
] |
0.8534561
|
0
|
end method Perform attack
|
@Override
public String performAttack(Entity target)
{
if(Math.random() <= this.accuracy)
{
Random rand = new Random();
Attack atk = new Attack();
atk.addDamage(new Damage(20+rand.nextInt(6), true, "bludgeon"));
atk.addDamage(new Damage(5+rand.nextInt(6), true, "slash"));
atk.applyPower(this.power);
return target.takeDamage(atk);
}
else
{
return ("The attack failed!");
}
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"@Override\n\tpublic void attack() {\n\n\t}",
"@Override\n\tpublic void attack() {\n\t\t\n\t}",
"@Override\n public void attack() {\n\n }",
"@Override\n\tvoid attack() {\n\n\t}",
"public void attack() {\n\n }",
"@Override\n\tpublic void attack() {\n\t}",
"public void attack();",
"@Override\n public void attack(){\n\n }",
"@Override\n\t\tpublic void attack() {\n\t\t\tSystem.out.println(\"잽을 날리다\");\n\t\t}",
"@Override\n\t\tpublic void attack() {\n\t\t\tSystem.out.println(\"날으면서 원거리 공격을 하다.\");\n\t\t}",
"@Override\n\tpublic void attack() {\n\t\tSystem.out.println(\"빠르게 근접공격을 하다\");\n\t}",
"String attack();",
"@Override\n\tpublic void attack() {\n\t\tSystem.out.println(\" 원거리 공격을 하다\");\n\t}",
"@Override\n\tpublic void attack() {\n\t\tSystem.out.println(\"땅밑에서 공격하다\");\n\t}",
"public void attackTargetCharacter() {\n }",
"public void attack() {\n this.attacked = true;\n }",
"@Override\n\tpublic void attack() {\n\t\tSystem.out.println(\"Woof! Woof! *Crunch!*\");\n\t}",
"@Override\n\tpublic void physicAttack() {\n\t\tSystem.out.println(\"进行物理攻击!\");\n\t}",
"AttackResult userAttack();",
"AttackResult smartAttack();",
"public void attack(Entity entity) {\n\t}",
"@Override\n\tpublic int attack( ){\n\t\treturn enemy.attack();\n\t}",
"@Override\n\t\t\tpublic void attack(Base enemy) {\n\t\t\t}",
"@Override\n\tpublic void attack(Slime slime) {\n\t\t\n\t}",
"public abstract void attack(int i,int j);",
"@Override\n\tpublic void takeHit(int attack) {\n\n\t}",
"public void attack() { \n db.attack(creatures.get(creatureId), players.get(playerId));\n creatures.set(creatureId, db.getCreature(creatures.get(creatureId).getId()));\n players.set(playerId, db.getPlayer(players.get(playerId).getId()));\n setTextFields();\n }",
"public abstract boolean attack(Enemy w);",
"public void attack() {\n\n for (int i = 0; i < Vampiro.getNumVamp(); i++) {\n\n lista[i].attack();\n }\n }",
"@Override\n\tpublic void attack() {\n\t\tSystem.out.println(getKind()+\" 공격하다\");\n\t}",
"@Override\n\tpublic void attack() {\n\t\tSystem.out.println(getKind()+\" 공격하다\");\n\t}",
"@Override\n\tpublic void attack() {\n\t\tSystem.out.println(getKind()+\" 공격하다\");\n\t}",
"abstract public boolean performNextAttack();",
"void basicAttack(Character attacked);",
"void bypass();",
"public void attackEntity(Entity entity)\n/* 79: */ {\n/* 80:71 */ super.attackEntity(entity);\n/* 81: */ }",
"public abstract boolean attack(TemporaryCharm i);",
"public abstract void attack(Game g);",
"void evadeAttack(IUnit attacker, int incomingDamage);",
"public abstract boolean attack(Warrior w);",
"public abstract void attack(Player p);",
"private void attackPhase(Player p) \n\t{\n\t\tp.attack();\n\t}",
"@Override\r\n\tpublic void attack() {\n\t\tSystem.out.printf(\"ºóÎÀ%s½ø¹¥\\n\", name);\r\n\t}",
"private int heavyAttack() {\n return attack(6, 2);\n }",
"@Override\r\n\tpublic String attack(int damage) {\n\t\treturn damage +\"로 공격 합니다.\";\r\n\t}",
"public boolean attack(int dir) {\n\t\treturn false;\n\t}",
"protected void attack(){\n\t\tif(reloadTime-- <= 0){\n\t\t\treloadTime = 0;\n\t\t}\n\t\tif(!hostileInRange())\n\t\t\treturn;\n\t\tif(!rotate()){\n\t\t\tif(reloadTime <= 0){\n\t\t\t\tshotAt(this.target);\n\t\t\t}\n\t\t}\n\t}",
"public void attack() {\n energy = 2;\n redBull = 0;\n gun = 0;\n target = 1;\n // if Player is in range take off a life.\n if (CharacterTask.ghostLocation == GameWindow.playerLocation) {\n playerLives = playerLives - 1;\n System.out.println(\"Player Lives: \" + playerLives);\n }\n }",
"@Override\n\tpublic double attack() {\n\t\treturn 12.5;\n\t}",
"void ponderhit();",
"@Override\n public void attack(Entity e) {\n e.hit(atk);\n }",
"void defendAttack(IUnit attacker, int incomingDamage);",
"public abstract boolean attack(PermanentCharm i);",
"public int attack(Character target){ //hw3E#0 //hw46#moreThinking\n lowerHP((int)(strength * attack / 10)); //hw3E#0 //hw46#moreThinking\n return super.attack(target); //hw3E#0 //hw44#3,4 //hw46#moreThinking\n }",
"@Override\r\n\tpublic void attack(DungeonCharacter that)\r\n\t{\n\t}",
"public String attack(Entity e) {\n return super.attack(e) + \"\\n\" + super.attack(e);\n }",
"@Override\r\n\tpublic void Attack(Player arg0, Player arg1) {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void Attack(Player arg0, Player arg1) {\n\t\t\r\n\t}",
"public abstract boolean attack(KillableItem i);",
"public void attack(User p)\n\t{\n\t\tint damage = getAttack() - p.getDefense();\n\t\tint evade = 0;\n\t\tif(damage <= 0)\n\t\t{\n\t\t\tevade = p.getDefense() - getAttack();\n\t\t\tdamage = 1;\n\t\t}\n\t\t\n\t\tif(Math.random() * 100 < evade * 5)\n\t\t{\n\t\t\tJOptionPane.showMessageDialog(null, \"Miss\");\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tp.reduce(damage);\n JOptionPane.showMessageDialog(null,\"Enemy attacked you! User's health = \" + p.getHealth() + \"\\n\" + \"Damage dealt = \" + damage); \n\t}",
"public abstract void attackPlayer(Player p);",
"private static void attack(RobotInfo target) throws GameActionException {\n if (SOLDIER_DEBUG) {\n System.out.println(\"attacking\");\n }\n BulletInfo[] bullets = rc.senseNearbyBullets(EvasiveSoldier.BULLET_DETECT_RADIUS);\n RobotInfo[] robots = rc.senseNearbyRobots(EvasiveSoldier.ENEMY_DETECT_RADIUS);\n MapLocation targetLocation = target.getLocation();\n move(bullets, robots, targetLocation);\n //RobotUtils.tryMoveDestination(targetLocation);\n if (TargetingUtils.clearShot(here, target) || (rc.getType() == RobotType.GARDENER && rc.getOpponentVictoryPoints() > 10)) {\n if (SOLDIER_DEBUG) {\n System.out.println(\"clearShot to target\");\n }\n Direction towardsEnemy = here.directionTo(targetLocation);\n float distanceEnemy = here.distanceTo(targetLocation);\n if (distanceEnemy <= 3.5 && rc.canFirePentadShot() && rc.getTeamBullets() > 200) {\n rc.firePentadShot(towardsEnemy);\n }\n else {\n if (rc.canFireTriadShot() && rc.getTeamBullets() > 50) {\n rc.fireTriadShot(towardsEnemy);\n }\n else if (rc.canFireSingleShot()) {\n rc.fireSingleShot(towardsEnemy);\n }\n }\n }\n }",
"public abstract void attack(Vector2 spawnPos, Vector2 target);",
"AttackResult randomAttack();",
"public void performAbility() { return; }",
"public void attack(Player p){\n p.takeDamage(damage);\n }",
"public void attack() {\n if (activeWeapon == null) {\n return;\n }\n attacking = true;\n }",
"private int lightAttack() {\n return attack(9, 0);\n }",
"public void attack() {\n\t\t\n\t\tint row = getPosition().getRow();\n\t\tint column = getPosition().getColumn();\n\t\t\n\t\tgetPosition().setCoordinates(row + 1, column);\n\t\tsetPosition(getPosition()) ;\n\t\t// restore health\n\t\tsetHealth(100);\n\t\t// end hunter mode\n\t\tthis.hunter = false;\n\t\t\n\t}",
"@Override\n\t\tpublic void hit(Npc attacker, Mob defender, Hit hit) {\n\t\t}",
"public void battleEnemyAttack() {\n if(battleEnemy != null){ // If all enemies have attacked, they cannot attack anymore for this round\n\n MovingEntity target = battleEnemy.getAttackPreference(targetAllies);\n if(target == null){\n target = targetAlly;\n }\n\n battleEnemy.attack(target, targetEnemies, targetAllies);\n //System.out.println(battleEnemy.getID() + \" is attacking \" + target.getID() + \" remaining hp: \" + target.getCurrHP());\n if (updateTarget(target) == false) {\n // if target still alive, check if its still friendly incase of zombify\n targetAlly = checkSideSwap(targetAlly, false, battleEnemies, targetEnemies, battleAllies, targetAllies);\n }\n\n battleEnemy = nextAttacker(battleEnemy, battleEnemies);\n\n }\n }",
"Float attack();",
"@Override\n\tpublic void exucute() {\n\t\t\n\t}",
"public void Attack()\n\t{\n\t\tif(action && waitingFrames == 0)\n\t\t{\n\t\t\tspriteImageView.setImage(new Image(\"image/main_attack.png\"));\n\t\t\tswitch(getDirection())\n\t\t\t{\n\t\t\t\tcase \"UP\": \tspriteImageView.setViewport(new Rectangle2D(300, 0, width, height)); action = false; break;\n\t\t\t\tcase \"DOWN\": spriteImageView.setViewport(new Rectangle2D(0, 0, width, height)); action = false; break;\n\t\t\t\tcase \"LEFT\": spriteImageView.setViewport(new Rectangle2D(100, 0, width, height)); action = false; break;\n\t\t\t\tcase \"RIGHT\": spriteImageView.setViewport(new Rectangle2D(200, 0, width, height)); action = false; break;\n\t\t\t\tdefault: break;\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t}",
"int attack(Unit unit, Unit enemy);",
"@Override\r\n\tpublic void command() {\n\t\tSystem.out.println(\"CommandAttack Process\");\r\n\t}",
"public void sharkAttack() {\n if (fins>0) \n fins--;\n }",
"abstract void koPlayerAttack(final Player attacker);",
"public String attack() {\r\n\t\t\tthis.getCurrentEnemy().setHealth(this.getCurrentEnemy().getHealth()-this.getPlayer().getWeapon().getAttack());\r\n\t\t\tif(this.getCurrentEnemy().isDefeated()) {\r\n\t\t\t\tthis.setInBattle(false);\r\n\t\t\t\t\r\n\t\t\t\tthis.handleQuestrelatedEnemy(this.getCurrentEnemy());\r\n\t\t\t\t\r\n\t\t\t\tif(this.getCurrentEnemy().getLoot() != null) {\r\n\t\t\t\t\tthis.getPlayer().getCurrentLocation().addItem(this.getCurrentEnemy().getLoot());\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tthis.getPlayer().gainXp(this.getCurrentEnemy().getXpYield());\r\n\t\t\t\tthis.getPlayer().getCurrentLocation().removeNpc(this.getCurrentEnemy().getName());\r\n\t\t\t\tif(this.getCurrentEnemy().getClass().getName().equals(\"game.EnemyGuardian\")) {\r\n\t\t\t\t\t// adds paths between current location and location in the guardian, path names are specified in the guardian construction\r\n\t\t\t\t\tthis.getPlayer().getCurrentLocation().addPaths(this.getPlayer().getCurrentLocation(), ((EnemyGuardian)this.getCurrentEnemy()).getPathTo(),\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t((EnemyGuardian)this.getCurrentEnemy()).getGuardedLocation(), ((EnemyGuardian)this.getCurrentEnemy()).getPathFrom());\r\n\t\t\t\t\treturn \"You defeated \" + this.getCurrentEnemy().getName() + \". \\n\"\r\n\t\t\t\t\t\t\t+ ((EnemyGuardian)this.getCurrentEnemy()).getRevelationMessage() + \"\\n\";\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\treturn \"You defeated \" + this.getCurrentEnemy().getName() + \".\";\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tthis.triggerEnemyAttack();\r\n\t\t\t\t\tif(this.getPlayer().getHealth() <= 0) {\r\n\r\n\t\t\t\t\t\tthis.gameOver();\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\treturn \"You attacked \" + this.getCurrentEnemy().getName() + \" for \" + this.getPlayer().getWeapon().getAttack() + \" damage. \\n You DIED.\";\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\treturn \"You attacked \" + this.getCurrentEnemy().getName() + \" for \" + this.getPlayer().getWeapon().getAttack() + \" damage. \\n\"\r\n\t\t\t\t\t\t\t\t+ this.getCurrentEnemy().getName() + \" attacked you for \" + this.getCurrentEnemy().getAttack() + \" damage.\\n\"\r\n\t\t\t\t\t\t\t\t\t\t+ this.getCurrentEnemy().printHealth();\r\n\t\t\t\t\t}\r\n\t\t\t}\r\n\t\t}",
"public int basicAttack() {\n\t\t// lots of logic\n\t\treturn 5;\n\t}",
"public void attack() {\n //Grab an attacker.\n Territory attacker = potentialAttackers.remove(0);\n \n //Find the weakest adjacent territory\n int victimStrength = Integer.MAX_VALUE;\n Territory victim = null;\n List<Territory> adjs = gameController.getBoard().getAdjacentTerritories(attacker);\n for(Territory adj : adjs){\n \n //Verify that our odds are good enough for this attack to consider it.\n int aTroops = attacker.getNumTroops() - 1;\n int dTroops = adj.getNumTroops();\n double odds = MarkovLookupTable.getOddsOfSuccessfulAttack(aTroops, dTroops);\n boolean yes = Double.compare(odds, ACCEPTABLE_RISK) >= 0;\n \n //If we have a chance of winning this fight and its the weakest opponent.\n if(yes && adj.getNumTroops() < victimStrength && !adj.getOwner().equals(this)){\n victim = adj;\n victimStrength = adj.getNumTroops();\n }\n }\n \n //Resolve the Attack by building forces and settle the winner in Victim's land\n Force atkForce = attacker.buildForce(attacker.getNumTroops() - 1);\n Force defForce = victim.buildForce(victimStrength); //Guaranteed not null\n Force winner = atkForce.attack(defForce);\n victim.settleForce(winner);\n }",
"public void attemptAttack() {\r\n\t\tattackAttempts += 100;\r\n\t}",
"public void act() \n {\n checkCollision();\n KeyMovements(); \n attackWeapon();\n //stopGame();\n \n }",
"public boolean whatNow (String action, player friday, player you){ // Method which will allow the ia to choose his action\n\t\tString testAction = \"Tank\"; // Create a String we will use a lot to test other string\n\t\tint actionIa; // If the ia is a Tank, forbid him to use his special attack. The purpose is to prevent him from useless turns\n\t\tif (friday.getName().equals(testAction)){ // If the name of the ia's class is Tank\n\t\t\t actionIa = (int)(Math.random() * 2); // His random will be between 0 or 1\n\t\t}\n\t\t\n\t\telse {\n\t\t\t actionIa = (int)(Math.random() * 3); // Else, his random will be between 0, 1 and 2\n\t\t}\n\t\t\n\t\ttestAction = \"attack\"; // Will be use to test if you attacked\n\t\t\n\t\t\n\t\tswitch (actionIa){ // Test ia's action\n\t\t\tcase 0: // 0, the enemy attack\n\t\t\t\tfriday.setSprite(\"attack\");\n\t\t\t\tSystem.out.println(\"The enemy attack\\n\"); // Warns the user\n\t\t\t\ttestAction = \"block\"; // Will be use to test if you block\n\t\t\t\tif (action.equals(testAction)){ // If you block\n\t\t\t\t\tSystem.out.println(\"You blocked the enemy's attack.\"); // Warns the user\n\t\t\t\t\tyou.setHp(you.getHp() - you.getDp()); // You loose as much hp as your dp\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\telse{\n\t\t\t\t\tyou.setHp(you.getHp() - friday.getAp()); // Else, you loose as much hp as your enemy's ap\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tcase 1: // 1, the enemy block\n\t\t\t\tfriday.setSprite(\"block\");\n\t\t\t\tif (action.equals(testAction)){ // If you attacked\n\t\t\t\t\tfriday.setHp(friday.getHp() - friday.getDp()); // The enemy loose as much hp as his dp\n\t\t\t\t\taction = \"\"; // Prevent you from attack a second time\n\t\t\t\t}\n\t\t\t\tSystem.out.println(\"The enemy blocked your attack\\n\"); // Warns the user\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tcase 2: // 2, the enemy use his special power if he isn't a tank\n\t\t\t\tfriday.setSprite(\"special\");\n\t\t\t\tSystem.out.println(\"The enemy uses his special power.\"); // Warns the user\n\t\t\t\tfriday.special(); // Execute ia's special attack\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t}\n\t\t\n\t\ttestAction = \"attack\"; // Reset testAction\n\t\t\n\t\tif (action.equals(testAction)){ // If you attacked\n\t\t\tfriday.setHp(friday.getHp() - you.getAp()); // The enemy loose as much hp as your ap\n\t\t} // Nota Bene : if the enemy blocked your attack, this won't be executed because 'action = \"\";'\n\t\t\n\t\tSystem.out.println(\"You have \" + you.getHp() + \" HP left.\"); // Warns the user\n\t\tSystem.out.println(\"The ennemy have \" + friday.getHp() + \" HP left.\\n\"); // Warns the user\n\t\t\n\t\tif(you.getHp() <= 0){ // If you or the ia has no hp left, warn the system that the fight is over by setting 'end' on true and tell who died\n\t\t\tend = true;\n\t\t\tSystem.out.println(\"You died!\");\n\t\t\tyou.setSprite(\"dead\");\n\t\t}\n\t\t\n\t\telse if(friday.getHp() <= 0){\n\t\t\tend = true;\n\t\t\tSystem.out.println(\"You killed the ennemy!\");\n\t\t\tfriday.setSprite(\"dead\");\n\t\t}\n\t\t\n\t\telse { // Else, it just asks you what you want to do\n\t\t\tSystem.out.println(\"What do you want to do, attack, block or use your special power ?\"); // Asks what you want to do\n\t\t}\n\t\treturn end;\n\t}",
"private void reviveAttacker() {\n\t\tString type = (mRandom.nextFloat() > mKnightSpawnChance) ? \"normal\" : \"knight\";\n\t\treviveAttacker(type);\n\t}",
"public void attack(){\n activity = CreatureActivity.ATTACK;\n createWeapon();\n endAttack = new CountDown(20); //100\n endAnimationAttack = new CountDown(100);\n }",
"protected void attack() {\n int[] dir = orientationToArray(orientation);\n int newX = positionX + dir[0];\n int newY = positionY + dir[1];\n Skill currentSkill = grid.getPlayer().getBattleSkill();\n if (\n currentSkill != null\n && grid.valid(newX, newY)\n && grid.getPlayer().hasEnoughMp(currentSkill.getCost())\n && System.currentTimeMillis() - currentSkill.getLastUsed() > currentSkill.getCooldown()\n ) {\n Token token = new SkillToken(\n currentSkill.getImage(),\n newX,\n newY,\n grid,\n dir[0],\n dir[1],\n currentSkill\n );\n token.orientation = orientation;\n grid.addTokenAt(token, newX, newY);\n currentSkill.use(System.currentTimeMillis());\n new Thread(token).start();\n }\n grid.repaint();\n }",
"public void excavate();",
"void hunt();",
"public Object run() throws Exception {\n System.out.println(\"Performing secure action ...\");\n return null;\n }",
"public void gameAttack(){\n int counter = 0;\n while (currentPlayer.wantToAttack(this)){\n counter++;\n if (counter > 100) break;\n /*In rare cases, AI players will repeatedly select the same attackers and defenders\n while also not wanting to dice fight. That will infinitely loop here and this counter will prevent it\n Under normal circumstances, no reasonable player will ever try to do more than 100 separate attacks in the same turn\n */\n\n String[] attackerDefender = {\"\",\"\"};\n //AttackStarterSelection\n attackerDefender[0] = currentPlayer.chooseAttackStarter(this);\n\n //AttackDefenderSelection\n attackerDefender[1] = currentPlayer.chooseAttackDefender(this, attackerDefender[0]);\n\n //DiceFightOrQuit\n int attackerDice, defenderDice;\n while (currentPlayer.wantToDiceFight(this, attackerDefender[0]+ \",\" + attackerDefender[1])){\n //DiceFightAttackerChoice\n attackerDice = currentPlayer.getAttackerDice(this, getTerritory(attackerDefender[0]));\n\n //DiceFightDefenderChoice\n Player defender = this.getPlayerFromList(this.getTerritory(attackerDefender[1]).getOwner());\n defenderDice = defender.getDefenderDice(this, this.getTerritory(attackerDefender[1]));\n\n\n //DiceFight results\n displayMessage(this.diceFight(attackerDefender, attackerDice,defenderDice));\n\n //Possible elimination and announcement of winner\n //Current diceFight ends if attacker has 1 troop left, or territory is conquered\n if (endDiceFight(attackerDefender, attackerDice)) break;\n\n }//End diceFightOrQuit\n\n\n }//End wantToAttack\n //Proceed to fortify stage of turn\n }",
"public void war() {\r\n while ((safeCount(survivors) > 0) && (safeCount(zombies) > 0)) {\r\n // Make each survivor attack every zombie\r\n attack(survivors, zombies);\r\n\r\n // Make each zombie attack every survivor\r\n attack(zombies, survivors);\r\n }\r\n\r\n // Print number of survivors that made to safety.\r\n warResult();\r\n }",
"public static void checkTurnEnd(){\n\t\tboolean end = true;\n\t\tfor (int i = 0; i < heroList.length && end; i++) {\n\t\t\t\n\t\t\tif (heroList[i].isAlive()){\n\t\t\t\tif (heroList[i].getOtherAction()){\n\t\t\t\t\tend = false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (checkVictory()) {\n\t\t\tinBattle = false;\n\t\t\t//screenNumber = ID_POST_BATTLE_CUTSCENE;\n\t\t\t//gui.setScreenID(screenNumber);\n\t\t\tscreenNumber = ID_POST_BATTLE_CUTSCENE;\n\t\t\tCutscene.loadCutscene(player.getCurLevel(), false);\n\t\t\tgui.setScreenID(screenNumber);\n\t\t\tgui.initializeCutscene();\n\t\t\tplayer.setCurLevel(player.getCurLevel()+1);\n\t\t}\n\t\t\n\t\tif (end) {\n\t\t\tai.play();\n\t\t\tgui.setEnemyPath(ai.getMoveCommands());\n\t\t\t\n\t\t\ttotalEnemyAttacks = 0;\n\t\t\tcurEnemyAttacker = -1;\n\t\t\t\n\t\t\tfor (int i = 0; i < enemyList.length; i++){\n\t\t\t\t\n\t\t\t\tif (ai.getAttackCommands(i) != null){\n\t\t\t\t\ttotalEnemyAttacks++;\n\t\t\t\t\t\n\t\t\t\t\tif (curEnemyAttacker == -1){\n\t\t\t\t\t\tcurEnemyAttacker = i;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif (totalEnemyAttacks > 0){\n\t\t\t\tgui.setEnemyHasAttackCommand(true);\n\t\t\t\tscreenNumber = ID_POST_BATTLE_CUTSCENE;\n\t\t\t\tisEnemyAttacking = true;\n\t\t\t\t//gui.setScreenID(screenNumber);\n\t\t\t\tString message = ((Enemy)enemyList[curEnemyAttacker]).getEnemyType() + \" did \" + ai.getAttackCommandsDamage(curEnemyAttacker) + \" damage to \" + ((Hero)ai.getAttackCommands(curEnemyAttacker)).getName() + \"!\";\n\t\t\t\tCutscene.loadAttackCutscene(((Enemy)enemyList[curEnemyAttacker]).getEnemyID() * -1 - 1, ai.getAttackCommands(curEnemyAttacker).getUnitID(), message, map.getTileNumber(enemyList[curEnemyAttacker].getCoordinate()));\n\t\t\t\t\n\t\t\t\tcurEnemyAttack = 1;\n\t\t\t\t\n\t\t\t}else{\n\t\t\t\tplayer.resetAllHeroes();\n\t\t\t}\n\n\t\t}\n\t}",
"private void enemyAttack() {\n\t\t\n\t\tRandom rand = new Random();\t\n\t\t\n\t\tint roll = rand.nextInt(101);\n\t\t\n\t\tint sroll = rand.nextInt(101);\n\t\t\n\t\tevents.appendText(e.getName() + \" attacks!\\n\");\n\t\t\n\t\tif(roll <= p.getEV()) { // Player evades\n\t\t\t\n\t\t\tevents.appendText(\"You evaded \"+e.getName()+\"\\'s Attack!\\n\");\n\t\t\t\n\t\t}else if(roll > p.getEV()) { // Player is hit and dies if HP is 0 or less\n\t\t\t\n\t\t\tp.setHP(p.getHP() - e.getDMG());\n\t\t\t\n\t\t\tString newHp = p.getHP()+\"/\"+p.getMaxHP();\n\t\t\t\n\t\t\tString effect = e.getSpecial(); // Stats are afflicted\n\t\t\t\n\t\t\tif(sroll < 51){\n\t\t\t\t\n\t\t\tif(effect == \"Bleed\") { // Bleed Special\n\t\t\t\t\n\t\t\t\tp.setHP(p.getHP() - 100);\n\t\t\t\t\n\t\t\t\tevents.appendText(\"You bleed profusely. - 100 HP\\n\");\n\t\t\t\t\n\t\t\t\tnewHp = String.valueOf(p.getHP()+\"/\"+p.getMaxHP());\n\t\t\t}\n\t\t\tif(effect == \"Break\") { // Break Special \n\t\t\t\t\n\t\t\t\tif(p.getEV()-5>0)\n\t\t\t\t\tp.setEV(p.getEV() - 5);\n\t\t\t\telse\n\t\t\t\t\tp.setEV(0);\n\t\t\t\t\n\t\t\t\tevents.appendText(\"You feel a bone break restricting movement. - 5 EV\\n\");\n\t\t\t\t\n\t\t\t\tString newEV = String.valueOf(p.getEV());\n\t\t\t\t\n\t\t\t\tgev.setText(newEV);\n\t\t\t\t\n\t\t\t}\n\t\t\tif(effect == \"Fear\") { // Fear Special \n\t\t\t\t\n\t\t\t\tif(p.getDMG()-40>0)\n\t\t\t\t\tp.setDMG(p.getDMG() - 40);\n\t\t\t\telse\n\t\t\t\t\tp.setDMG(0);\n\t\t\t\t\n\t\t\t\tevents.appendText(\"A crippling fear rattles your resolve. - 40 DMG\\n\");\n\t\t\t\t\n\t\t\t\tString newDMG = String.valueOf(p.getDMG());\n\t\t\t\t\n\t\t\t\tgdmg.setText(newDMG);\n\t\t\t\t\n\t\t\t}\n\t\t\tif(effect == \"Rend\") { // Rend Special \n\t\t\t\t\n\t\t\t\tif(p.getDMG()-30>0)\n\t\t\t\t\tp.setDMG(p.getDMG() - 30);\n\t\t\t\telse\n\t\t\t\t\tp.setDMG(0);\n\t\t\t\t\n\t\t\t\tif(p.getEV()-5>0)\n\t\t\t\t\tp.setEV(p.getEV() - 5);\n\t\t\t\telse\n\t\t\t\t\tp.setEV(0);\n\t\t\t\t\n\t\t\t\tevents.appendText(\"Morthar unleashes a pillar of flame! - 30 DMG and - 5 EV\\n\");\n\t\t\t\t\n\t\t\t\tString newDMG = String.valueOf(p.getDMG());\n\t\t\t\t\n\t\t\t\tString newEV = String.valueOf(p.getEV());\n\t\t\t\t\n\t\t\t\tgdmg.setText(newDMG);\n\t\t\t\t\n\t\t\t\tgev.setText(newEV);\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\t\n\t\t\tif(p.getHP() <= 0) {\n\t\t\t\t\n\t\t\t\tp.setDead(true);\n\t\t\t\t\n\t\t\t\tcurrentHp.setText(0+\"/\"+e.getMaxHP());\n\t\t\t\tplayerHPBar.setProgress((double)0);\n\t\t\t}else {\n\t\t\t\t\n\t\t\t\tcurrentHp.setText(newHp);\n\t\t\t\tplayerHPBar.setProgress((double)p.getHP()/p.getMaxHP());\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\tif(p.isDead()) { // Game over if player dies\n\t\t\t\n\t\t\ttry {\n\t\t\t\tLoadGO();\n\t\t\t} catch (IOException e1) {\n\t\t\t\n\t\t\t\te1.printStackTrace();\n\t\t\t}\n\t\t\t\n\t\t\tcombat = false;\n\t\t}\n\t}",
"public abstract void attack(Monster mon);",
"public abstract String forceAttack(Humanoid enemy);",
"private void attack() {\n final Random rnd = new Random();\n // Создаем WorkerThread\n attackerExecutor = Executors.newScheduledThreadPool(1);\n mAttackExecuter = attackerExecutor.scheduleWithFixedDelay(new Runnable() {\n @Override\n public void run() {\n for (int i =0; i<enemyPerWave;i++){\n int x = (int) (rnd.nextInt((int) (rightBorder-leftBorder))+leftBorder);\n\n createBossBall(x,0);\n }\n attackRatee-=attackLiveRate;\n if (attackRatee < 100){\n mAttackExecuter.cancel(true);\n attackerExecutor.shutdownNow();\n\n }\n }\n }, 0,attackLiveRate , TimeUnit.MILLISECONDS);\n\n }",
"void breach();",
"public abstract void performAction(Individual victim) {\n\tvictim.health -= this.performance;\n}",
"public void performAttack(){\r\n // For every zombie\r\n for (int i = 0 ; i < allZombies.getZombies().size(); i++) {\r\n // Variables used to prevent long getter lines\r\n int zombieX = allZombies.getZombies().get(i).getCurrX();\r\n int zombieY = allZombies.getZombies().get(i).getCurrY();\r\n Zombie zombie = allZombies.getZombies().get(i);\r\n // If the zombie is in range and alive:\r\n if(isInRange(zombieX,zombieY) && zombie.isAlive()) {\r\n // kill the zombie and increase score by 1.\r\n allZombies.getZombies().get(i).setAlive(false);\r\n increaseScore();\r\n }\r\n }\r\n }"
] |
[
"0.77667993",
"0.7720959",
"0.7716578",
"0.76569724",
"0.7636351",
"0.7622139",
"0.7588255",
"0.7538915",
"0.7347675",
"0.7323356",
"0.7282911",
"0.72606903",
"0.71541697",
"0.71519715",
"0.69749576",
"0.6972866",
"0.6754855",
"0.67223364",
"0.67030084",
"0.66559213",
"0.66452533",
"0.6580861",
"0.6428419",
"0.64249194",
"0.6418437",
"0.6411507",
"0.64047015",
"0.6367443",
"0.6344217",
"0.6304302",
"0.6304302",
"0.6304302",
"0.6281641",
"0.62562394",
"0.6225427",
"0.6207621",
"0.61967814",
"0.6174982",
"0.6162161",
"0.6145283",
"0.61193025",
"0.6111073",
"0.60861003",
"0.6050916",
"0.6035709",
"0.60182554",
"0.5991262",
"0.5990506",
"0.5967258",
"0.5967194",
"0.5962231",
"0.5954649",
"0.5950614",
"0.5948751",
"0.594541",
"0.59333146",
"0.5931998",
"0.5931998",
"0.5921723",
"0.59026235",
"0.5891693",
"0.58803445",
"0.58787173",
"0.5874579",
"0.58724654",
"0.58697635",
"0.5852749",
"0.5849715",
"0.5834732",
"0.5816693",
"0.57991296",
"0.5792303",
"0.5789716",
"0.578718",
"0.5780967",
"0.57669866",
"0.57640123",
"0.5733013",
"0.5686754",
"0.5667052",
"0.56556314",
"0.5654679",
"0.5653901",
"0.5650249",
"0.5643882",
"0.5630482",
"0.56220305",
"0.56097156",
"0.55991066",
"0.55984277",
"0.55980766",
"0.5595599",
"0.5592921",
"0.55868727",
"0.5575551",
"0.55750406",
"0.5560713",
"0.556002",
"0.5559051",
"0.5552731"
] |
0.56115514
|
87
|
end method Zombie spits up stomach acid
|
@Override
public String specialMove(Entity target)
{
if(Math.random() <= this.accuracy-0.1)
{
Random rand = new Random();
Attack atk = new Attack();
atk.addDamage(new Damage(rand.nextInt(10), true, "slash"));
CorrosiveAcid acidEffect = new CorrosiveAcid();
atk.addStatus(acidEffect);
atk.applyPower(this.power);
return target.takeDamage(atk);
}
else
{
return ("The attack failed!");
}
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"void endLife();",
"@Override\n\tpublic void despawn() {\n\t\t\n\t}",
"public void killed(){\n System.out.println(\"The zombie takes one step closer toward you then falls over.\");\n }",
"public void act() \n {\n moveAround();\n die();\n }",
"public void die()\n\t{\n\t\talive = false;\n\t}",
"BossEnemy(){\n super();\n totallyDied = true;\n }",
"protected void end() {\n \tRobot.hand.setWrist(0.0);\n }",
"public void kill() {\n // leben abziehen und geister sowie pacman respawnen\n lives--;\n pacman.respawn(level.getRandomPacmanSpawn());\n for (GameEntity entity : entities)\n if (entity instanceof Ghost)\n ((Ghost) entity).respawn(level.getNextGhostSpawn());\n }",
"public Zombie() {\r\n\t\tsuper(myAnimationID, 0, 0, 60, 60);\r\n\t}",
"protected void end() {\r\n Robot.feeder.retractArm();\r\n Robot.feeder.setFeederIntakeSpeed(0);\r\n Robot.chassis.driveMecanumNormalized(0, 0, 0);\r\n Robot.shooter.setShootingMotors(0, 0);\r\n }",
"private void die() {\r\n\t\tisAlive = false;\r\n\t}",
"protected void end() {\n \twrist.rotateWrist(0);\n }",
"protected void end() {\n\t\tshooter.stopShooter();\n\t}",
"@Override\n public void Die() {\n this.setAlive(false);\n }",
"@Override\r\n\tpublic void endTurn() {\n\t\t\r\n\t}",
"protected void end() {\n drivebase.setArcade(0, 0);\n drivebase.disableTurnController();\n }",
"@Override\n protected void end() {\n Robot.shooter.setShooterSpeed(0);\n Robot.elevator.elevatorUp(0);\n Robot.hopper.hopperOut(0);\n Robot.intake.enableIntake(0);\n\n\n }",
"protected void end() {\n \tRobotMap.gearIntakeRoller.set(0);\n }",
"public void act() \n {\n\n World wrld = getWorld();\n if(frameCounter >= frameWait)\n {\n super.act();\n frameCounter = 0;\n }\n else\n {\n frameCounter++;\n }\n if (dying)\n deathcounter++;\n GreenfootImage trans = getImage();\n trans.scale(500,500);\n setImage(trans);\n setLocation(getX(), (getY()));\n\n if (deathcounter > 10)\n {\n wrld.removeObject(this);\n ((Universe)wrld).score += 50;\n }\n else if (getX() < 10)\n wrld.removeObject(this);\n }",
"protected void kill() {\n\t\tsetDeathTime(0.6);\n\t}",
"public void die(){\n\t\tboolean success = false;\n\t\ttile.setAnimal(null);\n\t\treleasePandas();\n\n\t\twhile(!success){\n\t\t\tRandom rng = new Random();\n\t\t\tInteger idx =rng.nextInt(gf.gp.getTiles().size());\n\t\t\tif(gf.gp.getTiles().get(idx).getAnimal() == null && gf.gp.getTiles().get(idx).getEntity() == null) {\n\t\t\t\tsuccess = spawn(gf.gp.getTiles().get(idx)); break;\n\t\t\t}\n\t\t}\n\t}",
"public void death(){\n\t}",
"public void kill() {\r\n\t\t\tfor(Guerre war : aggresiveWar) {\r\n\t\t\t\twar.finalize();\r\n\t\t\t}\r\n\t\t\tfor(Guerre war : defensiveWar) {\r\n\t\t\t\twar.finalize();\r\n\t\t\t}\r\n\t\t\tfor(Case c : caseOwned) {\r\n\t\t\t\tc.liberate();\r\n\t\t\t}\r\n\r\n\t\t\tSystem.out.println(nom + \" n'a pas su s'adapter aux nombreux dangers environnants, l'Histoire oublie les faibles.\");\r\n\t\t\t\r\n\t\t\tfor(String str : saveStats()) System.out.println(str);\r\n\t\t\t//finalisation de la mort\r\n\t\t\tthis.die();\r\n\t\t\tSystem.out.println(\"Une civilisation c'est éteinte...\");\r\n\t\t\t//finalize(); //bloque la sauvegarde et case les relations avec les autres (du à la recherche de la civ par id dans l'arraylist\r\n\t\t}",
"protected void end() {\n \tRobotMap.feedMotor1.set(0);\n \tRobotMap.shootAgitator.set(0);\n }",
"protected void end() {\n\r\n\t}",
"protected void end()\n\t{\n\t}",
"public void die() throws KillOfAnAlreadyDeadAgent {\n\t\t\n\t}",
"protected void end() {\n \tif (waitForMovement) Robot.intake.setHopperTracker(deploy ? Status.deployed : Status.stowed);\n }",
"protected void end() {\n \tRobot.shooter.speed(0.0);\n }",
"void endcredits() {\n }",
"public void turnoZombie(){\n int cont = 0;\n\n while(cont < zombies.size()){\n Zombie tmp = (Zombie) zombies.get(cont);\n //System.out.println(\"Zombie \" + cont + \" | posx: \" + tmp.posX + \" | posy: \" + tmp.posY);\n\n //===============Ataque=========================\n\n int[] target = objetivoAtaque(tmp);\n\n if(target != null){\n Soldado objetivo = (Soldado) tablero[target[0]][target[1]].personaje;\n tmp.atacar(objetivo);\n if(objetivo.vida <= 0){\n soldados.remove(tablero[target[0]][target[1]].personaje);\n tablero[target[0]][target[1]].personaje = null;\n }\n cont++;\n continue;\n }\n\n //===============Vision=========================\n\n int[] destino = vision(tmp);\n\n if(destino != null){\n moverZombie(tmp, destino[0], destino[1]);\n cont++;\n System.out.println(\"Ví algo\");\n System.out.println(\"Zombie \" + cont + \" | posx: \" + destino[0] + \" | posy: \" + destino[1]);\n }\n\n //===============Escucha=========================\n else{\n\n int[] destino2 = escuchar(tmp);\n\n if(destino2 != null){\n moverZombie(tmp, destino2[0], destino2[1]);\n cont++;\n System.out.println(\"Escuché algo\");\n System.out.println(destino2[0] + \", \" + destino2[1]);\n }\n\n //===============Random=========================\n else{\n\n moverZombie(tmp, tmp.posX, tmp.posY + 2);\n cont++;\n System.out.println(\"Random\");\n System.out.println(tmp.posX + \", \" + tmp.posY);\n }\n\n }\n\n }\n this.mostrar();\n }",
"public void lifeLost() {\n\t\t--lives;\n\t\tif (lives == 0) {\n\t\t\tSystem.exit(0);\n\t\t}\n\t}",
"protected void end() {\n \n \n }",
"protected void end() {\n\t}",
"protected void end() {\n\t}",
"protected void end() {\n\t}",
"protected void end() {\n\t}",
"protected void end() {\n\t}",
"protected void end() {\n\t}",
"public void kill()\n\t{\n\t\tthis.isDead = true;\n\t\tSystem.out.println(name + \" died!\");\n\t\t//GamePanel.player.playerCombatant.awardXP(this.getXP());\n\n\t\t//TODO: Reload last save or Exit\n\t}",
"@Override\n protected void end() {\n Robot.SCISSOR.extendLift(0);\n }",
"@Override\n\tprotected void killReward() {\n\t\t\n\t}",
"public void act() \n {\n moveAround(); \n addBomb(); \n touchGhost(); \n }",
"@Override\n\tprotected void takeDown() {\n\t\tSystem.out.println(\"i'm going to die ...............................\");\n\t}",
"protected void end() {\r\n }",
"protected void end() {\r\n }",
"protected void end() {\r\n }",
"protected void end() {\r\n }",
"public void act() // method act\n {\n moveBear(); //lakukan method movebear\n objectDisappear(); // lakukan method objeectDisappear\n }",
"private final void kill() {\n\t\tgrown=false;\t\t\n\t}",
"@Override\n\tpublic void endGame() {\n\t\tsuper.endGame();\n\t}",
"public void endTurn() {\n }",
"@Override\n public void die() {\n }",
"protected void end() {\n \n this.getPIDController().disable();\n shooter.setShooterMotor(0.0);\n }",
"@Override\r\n\tpublic void recieveHit() {\n\t\tif(armour <= 0) {\r\n\t\t\tSystem.out.println(\"Enemy Destroyed\");\r\n\t\t\treturn;\r\n\t\t}\r\n\t\telse {\r\n\t\t\tdouble calculateHitDamage = shot * basicDamage;\r\n\t\t\tif(calculateHitDamage == armour) {\r\n\t\t\t\tarmour = armour - calculateHitDamage;\r\n\t\t\t\tSystem.out.println(\"Enemy Armour Destroyed!!!\");\r\n\t\t\t}\r\n\t\t\telse if(calculateHitDamage > armour) {\r\n\t\t\t\tarmour = armour - calculateHitDamage;\r\n\t\t\t\tSystem.out.println(\"Enemy is Dead!!\");\r\n\t\t\t}\r\n\t\t\telse if(calculateHitDamage < armour) {\r\n\t\t\t\tarmour = armour - calculateHitDamage;\r\n\t\t\t\tSystem.out.println(\"Enemy not detroyed!! \\n\");\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\tSystem.out.println(\"Current Enemy life: \"+ armour);\r\n\t\t}\r\n\t}",
"@Override\n public void die() {\n _brain.mouth.say(\"aaarrrrrgggh...\");\n }",
"protected void end() {\n }",
"protected void end() {\n }",
"protected void end() {\n }",
"protected void end() {\n }",
"protected void end() {\n }",
"protected void end() {\n }",
"protected void end() {\n }",
"protected void end() {\n }",
"protected void end() {\n }",
"protected void end() {\n }",
"protected void end() {\n }",
"protected void end() {\n }",
"protected void end() {\n }",
"protected void end() {\n }",
"protected void end() {\n }",
"protected void end() {\n }",
"protected void end() {\n }",
"protected void end() {\n }",
"protected void end() {\n }",
"protected void end() {\n }",
"protected void end() {\n }",
"protected void end() {\n }",
"protected void end() {\n }",
"protected void end() {\n }",
"protected void end() {\n }",
"protected void end() {\n }",
"protected void end() {\n }",
"protected void end() {\n }",
"protected void end() {\n }",
"protected void end() {\n }",
"protected void end() {\n }",
"@Override\n\tpublic void tick(Location currentLocation) {\n\t\t// TODO Auto-generated method stub\n\t\tsuper.tick(currentLocation);\n\t\tturnsToZombify--;\n\t\tif(turnsToZombify<=0&&!currentLocation.containsAnActor()) {\n\t\t\tcurrentLocation.removeItem(this);\n\t\t\tcurrentLocation.addActor(new Zombie(\"undead\"+name));\n\t\t\t\n\t\t}\n\t}",
"protected void end() {\n Robot.shooter.Stop();\n }",
"@Override\r\n\tpublic void onDeath() {\n\t\t\r\n\t}",
"protected void end() {\n \t//claw.close();\n }",
"protected void end() {\n \tRobot.m_elevator.disable();\n \tRobot.m_elevator.free();\n }",
"protected void end() {\n Robot.arm.moveArm(0, 1);\n }",
"public void die(){\n \tif (resetdelay<=0){ //if he didn't just die\r\n \t\tresetdelay = 100; //gives the frog 100 frames of invincibility\r\n \t\tlives-=1;\r\n \t}\r\n }",
"protected void end() {\n \t// theres nothing to end\n }",
"protected void end() {\n\t\tL.ogEnd(this);\n\t\t_xboxControllerToRumble.setRumble(_rumbleType, 0);\n\t}",
"@Override\r\n protected void end() {\r\n\r\n }",
"public void onImpact() {\r\n die();\r\n }",
"public void lifeLost() {\n\n\t\tif (invincipleTimer <= currentTickCount) {\n\t\t\tSystem.out.println(\"Life Lost!\");\n\n\t\t\thealth--;\n\t\t\tinvincipleTimer = currentTickCount + invicibleLength;\n\t\t}\n\t}",
"@Override\n protected void end() {\n if (!extend) Robot.rearHatch.stopRearHatch();\n }",
"@Override\r\n public void fromDeathToChase() {\r\n if (eaten()) {\r\n startChase();\r\n }\r\n }"
] |
[
"0.6910392",
"0.6835228",
"0.68162835",
"0.6793281",
"0.656096",
"0.6524518",
"0.65024567",
"0.64912754",
"0.64624727",
"0.64620346",
"0.64611083",
"0.64594525",
"0.6458225",
"0.64455265",
"0.6444414",
"0.64206606",
"0.640636",
"0.6404705",
"0.6394477",
"0.6371731",
"0.635138",
"0.63425094",
"0.6339226",
"0.6337706",
"0.6337675",
"0.6309083",
"0.6304266",
"0.62853605",
"0.6281367",
"0.6278834",
"0.6272064",
"0.6267834",
"0.6254668",
"0.6249358",
"0.6249358",
"0.6249358",
"0.6249358",
"0.6249358",
"0.6249358",
"0.62401736",
"0.6234965",
"0.6231414",
"0.62303346",
"0.6221031",
"0.62160695",
"0.62160695",
"0.62160695",
"0.62160695",
"0.6214856",
"0.62020934",
"0.6201804",
"0.6179585",
"0.6172622",
"0.616735",
"0.61616397",
"0.6159872",
"0.6157401",
"0.6157401",
"0.6157401",
"0.6157401",
"0.6157401",
"0.6157401",
"0.6157401",
"0.6157401",
"0.6157401",
"0.6157401",
"0.6157401",
"0.6157401",
"0.6157401",
"0.6157401",
"0.6157401",
"0.6157401",
"0.6157401",
"0.6157401",
"0.6157401",
"0.6157401",
"0.6157401",
"0.6157401",
"0.6157401",
"0.6157401",
"0.6157401",
"0.6157401",
"0.6157401",
"0.6157401",
"0.6157401",
"0.6157401",
"0.6157401",
"0.6150067",
"0.6135001",
"0.6128173",
"0.61192983",
"0.6117974",
"0.6110215",
"0.61083025",
"0.6097677",
"0.6096169",
"0.609611",
"0.60960585",
"0.60940593",
"0.6092414",
"0.60917544"
] |
0.0
|
-1
|
Get auth token from header
|
@Override
public void filter(final ContainerRequestContext requestContext) throws IOException {
final String authToken = requestContext.getHeaders().getFirst("authToken");
if (StringUtils.isBlank(authToken)) {
throw unauthorizedWebException();
}
try {
// authenticate using token to get principle
final Optional<P> principal = authenticator.authenticate(authToken);
// set security context on request
if (principal.isPresent()) {
setSecurityContextOnRequest(requestContext, principal);
return;
}
} catch (AuthenticationException e) {
LOGGER.warn("Error authenticating credentials", e);
throw unauthorizedWebException();
}
throw unauthorizedWebException();
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"private String getToken(HttpServletRequest request){\n String header = request.getHeader(\"Authorization\");\n if(header != null && header.startsWith(\"Bearer\"))\n \t// Sacamos al bearer del token\n return header.replace(\"Bearer \", \"\");\n return null;\n }",
"AuthenticationTokenInfo authenticationTokenInfo(String headerToken);",
"public String getToken(HttpServletRequest request) {\n Cookie authCookie = getCookieValueByName(request, AUTH_TOKEN_COOKIE);\n if (authCookie != null) {\n return authCookie.getValue();\n }\n /**\n * Getting the token from Authentication header e.g Bearer your_token\n */\n String authHeader = request.getHeader(AUTH_HEADER);\n if (authHeader != null) {\n \tif (authHeader.startsWith(\"Bearer \"))\n \t\treturn authHeader.substring(7);\n \t// Support without Bearer prefix\n \treturn authHeader;\n }\n return null;\n }",
"private String readHeader(RoutingContext ctx) {\n String tok = ctx.request().getHeader(XOkapiHeaders.TOKEN);\n if (tok != null && ! tok.isEmpty()) {\n return tok;\n }\n return null;\n }",
"public AuthorizationToken retrieveToken(String token);",
"public String extractAuthTokenFromRequest(HttpServletRequest httpRequest) {\n\t\t/* Get token from header */\n\t\tString authToken = httpRequest.getHeader(\"X-Auth-Token\");\n\n\t\t/* If token not found get it from request parameter */\n\t\tif (authToken == null) {\n\t\t\tauthToken = httpRequest.getParameter(\"token\");\n\t\t}\n\n\t\treturn authToken;\n\t}",
"private String getJwt(HttpServletRequest request) {\n String authHeader = request.getHeader(\"Authorization\");\n if (authHeader != null && authHeader.startsWith(\"Bearer \")) {\n return authHeader.replace(\"Bearer \", \"\");\n }\n return null;\n }",
"private String getAuthorizationHeaderValue(HttpRequest request){\n\t\t String authorizationValue = \"\";\n\t\t List<String> authorizationList = new ArrayList<>(0);\t\t\n\t\t \n\t\t HttpHeaders headers = request.getHttpHeaders();\n\t\t for(String headerName : headers.getRequestHeaders().keySet()){\n\t\t\t if(TokenConstants.AUTHORIZATION_HEADER_NAME.equalsIgnoreCase(headerName)){\n\t\t\t\t authorizationList = headers.getRequestHeader(headerName);\n\t\t\t\t break;\n\t\t\t }\n\t\t }\n\n\t\t if(CollectionUtils.isNotEmpty(authorizationList)) {\n\t\t\t authorizationValue = authorizationList.get(0);\n\t\t }\n\t\t return authorizationValue;\n\t}",
"public static String extractAuthTokenFromRequest(HttpServletRequest httpRequest) {\n\t\tString authToken = httpRequest.getHeader(\"X-Auth-Token\");\n\n\t\t/* If token not found get it from request parameter */\n\t\tif (authToken == null) {\n\t\t\tauthToken = httpRequest.getParameter(\"token\");\n\t\t}\n\n\t\treturn authToken;\n\t}",
"public static String obtenerTokenAcceso(HttpServletRequest request) {\n String tokenId = \"\";\n try {\n String authorization = request.getHeader(\"Authorization\");\n if (authorization != null && authorization.contains(\"Bearer\")) {\n tokenId = authorization.replace(\"Bearer\", \"\");\n }\n String[] contenidoToken = tokenId.split(\"\\\\.\");\n return contenidoToken[1];\n } catch (Exception e) {\n // TODO: handle exception\n return \"\";\n }\n }",
"@Override\n public Map<String, String> getHeaders() throws AuthFailureError {\n Map<String, String> headers = new HashMap<>();\n String token = LogInActivity.token;\n headers.put(\"Authorization\", \"bearer \"+ token);\n return headers;\n }",
"private HttpHeaders getHeaders(String token) {\n UserDetails userDetails = new UserDetails();\r\n userDetails.setEmail(jwtUtils.extractEmail(token));\r\n userDetails.setUserType((String) jwtUtils.extractAllClaims(token).get(\"userType\"));\r\n HttpHeaders httpHeaders = new HttpHeaders();\r\n httpHeaders.set(\"Authorization\", jwtUtils.generateToken(userDetails));\r\n return httpHeaders;\r\n }",
"User authenticate(String headerToken) throws AuthenticationException;",
"public String getUsernameFromToken() {\n\t\tHttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest();\n\t\tfinal String requestTokenHeader = request.getHeader(AUTH);\n\t\tString jwtToken = requestTokenHeader.substring(BEARER.length());\n\t\treturn getClaimFromToken(jwtToken, Claims::getSubject);\n\t}",
"private Optional<String> getBearerToken(String headerVal) {\n log.info(\"header value = \" + headerVal);\n if (headerVal != null && headerVal.startsWith(JwtProperties.BEARER)) {\n return Optional.of(headerVal.replace(JwtProperties.BEARER, \"\").trim());\n }\n return Optional.empty();\n }",
"public String getToken();",
"public String getToken(final HttpServletRequest request) {\n final String param = ofNullable(request.getHeader(AUTHORIZATION))\n .orElse(request.getParameter(\"t\"));\n\n return ofNullable(param)\n .map(value -> removeStart(value, BEARER))\n .map(String::trim)\n .orElseThrow(() -> new BadCredentialsException(Constants.AUTHENTICATION_FILTER_MISSING_TOKEN));\n }",
"@Nullable\n private TokenCredentials getCredentials(String header) {\n if (header == null) {\n return null;\n } else {\n int space = header.indexOf(32);\n if (space <= 0) {\n return null;\n } else {\n String method = header.substring(0, space);\n if (!this.prefix.equalsIgnoreCase(method)) {\n return null;\n } else {\n String decoded;\n try {\n decoded = new String(BaseEncoding.base64().decode(header.substring(space + 1)), StandardCharsets.UTF_8);\n } catch (IllegalArgumentException var8) {\n this.logger.warn(\"Error decoding credentials\", var8);\n return null;\n }\n\n int i = decoded.indexOf(58);\n if (i <= 0) {\n return null;\n } else {\n String token = decoded.substring(i + 1);\n String username = decoded.substring(0, i);\n return new TokenCredentials(token, username);\n }\n }\n }\n }\n }",
"GetToken.Req getGetTokenReq();",
"OAuth2Token getToken();",
"private HttpHeaders getHeaders(String token) {\r\n UserDetails userDetails = new UserDetails();\r\n userDetails.setEmail(jwtUtil.extractEmail(token));\r\n userDetails.setClientType(ClientType.valueOf((String) jwtUtil.extractAllClaims(token).get(\"clientType\")));\r\n HttpHeaders httpHeaders = new HttpHeaders();\r\n httpHeaders.set(\"Authorization\", jwtUtil.generateToken(userDetails));\r\n return httpHeaders;\r\n }",
"java.lang.String getRemoteToken();",
"public String getJwtFromRequest(HttpServletRequest request) {\n String authHeader = request.getHeader(jwtConfig.getAuthorizationHeader());\n System.out.println(\"auth header is :\" + authHeader);\n System.out.println(\"jwt token is being prepared\");\n if (authHeader != null && authHeader.startsWith(\"Bearer \")) {\n System.out.println(\"jwt token is valid\");\n return authHeader.replace(\"Bearer \", \"\");\n }else{\n System.out.println(\"jwt token is not valid and is null\");\n return null;\n }\n }",
"User getUserByToken(HttpServletResponse response, String token) throws Exception;",
"java.lang.String getToken();",
"java.lang.String getToken();",
"java.lang.String getToken();",
"java.lang.String getToken();",
"java.lang.String getToken();",
"java.lang.String getToken();",
"String getUsernameFromToken(String token);",
"public String getUsernameFromToken(HttpServletRequest request) {\n\t\tfinal String requestTokenHeader = request.getHeader(AUTH);\n\t\tString jwtToken = requestTokenHeader.substring(BEARER.length());\n\t\treturn getClaimFromToken(jwtToken, Claims::getSubject);\n\t}",
"@Override\n public Map<String, String> getHeaders() throws AuthFailureError {\n Map<String, String> headers = new HashMap<>();\n String token = sharedPreferences.getString(\"token\", \"\");\n String auth = \"Bearer \" + token;\n headers.put(\"Authorization\", auth);\n return headers;\n }",
"private UsernamePasswordAuthenticationToken getAuthtication(HttpServletRequest request){\n // Get token from request header.\n String token = request.getHeader(\"Authorization\");\n if (token != null){\n //Get the username from the jwt token\n String username = JwtUtil.getUsernameByToken(token);\n //Check the existence of the username.\n Optional<User> userTry = userRepository.findByUsername(username);\n Collection<GrantedAuthority> authorities = new ArrayList<>();\n if (userTry.isPresent()){\n User user = userTry.get();\n authorities.add(new SimpleGrantedAuthority(user.getRole().getName()));\n return new UsernamePasswordAuthenticationToken(user,token,authorities);\n }\n }\n return null;\n }",
"private CdekAuthToken getAuthToken()\n {\n String authEndpoint = conf.ENDPOINT + \"/oauth/token?grant_type={grant_type}&client_id={client_id}&client_secret={client_secret}\";\n\n HttpHeaders defaultHeaders = new HttpHeaders();\n HttpEntity req = new HttpEntity(defaultHeaders);\n\n return rest.postForObject(authEndpoint, req, CdekAuthToken.class, conf.getAuthData());\n }",
"private static Tuple<Integer, String> getToken() {\n\t\tTuple<Integer, String> result = new Tuple<Integer, String>();\n\t\tresult = GETRequest(AUTH_URL, AUTH_HEADER, \"\", \"\");\n\t\treturn result;\n\t}",
"Pokemon.RequestEnvelop.AuthInfo.JWT getToken();",
"public String getAuthToken() {\n\t\tString token = options.getProperty(\"auth-token\");\n\t\tif(token == null) {\n\t\t\ttoken = options.getProperty(\"Authentication-Token\");\n\t\t}\n\t\treturn trimedValue(token);\n\t}",
"String getToken();",
"String getToken();",
"String getToken();",
"String getToken();",
"String getToken();",
"private boolean isValidToken(String authHeader) {\n AuthorisedTokenData token = authorisedTokensServices.getAuthorisedTokenByToken(authHeader);\n\n return token != null && token.getToken().equals(authHeader);\n }",
"@Override\n public Map<String, String> getHeaders() {\n System.out.println(\"------token:---------\"+token);\n Map<String, String> params = new HashMap<String, String>();\n params.put(\"content-type\", \"application/json\");\n params.put(\"cache-control\", \"no-cache\");\n params.put(\"authorization\",\"Bearer \"+token);\n\n\n return params;\n }",
"@Override\n public Map<String, String> getHeaders() {\n System.out.println(\"------token:---------\"+token);\n Map<String, String> params = new HashMap<String, String>();\n params.put(\"content-type\", \"application/json\");\n params.put(\"cache-control\", \"no-cache\");\n params.put(\"authorization\",\"Bearer \"+token);\n\n\n return params;\n }",
"static public Authentication getAuthentication(HttpServletRequest req) {\n\t\t\n\t\tString token = req.getHeader(\"Authorization\");\n\t\tif (token != null) {\n\t\t\tString user = Jwts.parser()\n\t\t\t\t\t.setSigningKey(SIGNINGKEY)\n\t\t\t\t\t.parseClaimsJws(token.replaceAll(PREFIX, \"\"))\n\t\t\t\t\t.getBody()\n\t\t\t\t\t.getSubject();\n\t\t\t\n\t\t\tif (user != null) {\n\t\t\t\treturn new UsernamePasswordAuthenticationToken(user, null,\n\t\t\t\t\t\temptyList());\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn null;\n\t}",
"public Pokemon.RequestEnvelop.AuthInfo.JWT getToken() {\n return token_;\n }",
"public java.lang.String getOauth_token(){\r\n return localOauth_token;\r\n }",
"private void requestToken(){\n APIAuth auth = new APIAuth(this.prefs.getString(\"email\", \"\"), this.prefs.getString(\"password\", \"\"), this.prefs.getString(\"fname\", \"\") + \" \" +this.prefs.getString(\"lname\", \"\"), this.prefs, null);\n auth.authenticate();\n }",
"public String getToken()\n {\n return token;\n }",
"@Override\n public Map<String, String> getHeaders() throws AuthFailureError {\n Map<String, String> keys = new HashMap<String, String>();\n keys.put(\"token\", TOKEN);\n return keys;\n }",
"@Post(\"/auth\")\n @Consumes({MediaType.APPLICATION_JSON, MediaType.APPLICATION_FORM_URLENCODED})\n public Single<TokenResponse> authenticateOauthToken(HttpRequest<?> request) {\n log.info(\"Processing authentication request with dependent API\");\n Optional<String> authHeader = request.getHeaders().getAuthorization();\n if (authHeader.isPresent()) {\n TokenResponse ret = new TokenResponse();\n ret.setAccessToken(onlyValidAccessToken);\n ret.setTokenType(\"bearer\");\n ret.setExpiresIn(3600);\n\n log.info(\"dependent API successfully authenticated us\");\n return Single.just(ret);\n }\n log.info(\"Authentication with API failed\");\n return Single.error(new HttpStatusException(HttpStatus.UNAUTHORIZED, \"auth missing or wrong (1a)\"));\n }",
"java.lang.String getAuth();",
"java.lang.String getAuth();",
"java.lang.String getAuth();",
"public HashMap<String, String> getHeader() {\n HashMap<String, String> header = new HashMap<String, String>();\n//\t\theader.put(\"Content-Type\", pref.getString(\"application/json\", \"application/json\"));\n /*header.put(\"authId\", pref.getString(KEY_USER_ID, KEY_USER_ID));\n header.put(\"authToken\", pref.getString(KEY_AUTH_TOKEN, KEY_AUTH_TOKEN));*/\n\n\n header.put(\"authId\", pref.getString(KEY_USER_ID, \"1\"));\n header.put(\"authToken\", pref.getString(KEY_AUTH_TOKEN, \"s4nbp5FibJpfEY9q\"));\n\n return header;\n }",
"@GET(\"users/signin\")\r\n Call<User> signIn(@Header(\"Authorization\") String token);",
"public String getToken() {\r\n return token;\r\n }",
"public String getToken() {\r\n return token;\r\n }",
"@Override\n public Map<String, String> getHeaders() throws AuthFailureError {\n HashMap<String, String> headers = new HashMap<String, String>();\n headers.put(\"Authorization\", loggedInUser.getToken_type()+\" \"+loggedInUser.getAccess_token());\n headers.put(\"Content-Type\", \"application/json\");\n headers.put(\"Accept\", \"application/json\");\n return headers;\n }",
"@Override\n public String getHeader(String name) {\n if (name.equalsIgnoreCase(\"Authorization\")) {\n return getAuthorizationHeader();\n } else {\n return super.getHeader(name);\n }\n }",
"public String getToken() {\n return token;\n }",
"public String getToken() {\n return token;\n }",
"public String getToken() {\n return token;\n }",
"public String getToken() {\n return token;\n }",
"public String getToken() {\n return token;\n }",
"@Override\n public Map<String, String> getHeaders() {\n Map<String, String> params = new HashMap<String, String>();\n //params.put(\"Content-Type\", \"application/x-www-form-urlencoded\");\n params.put(\"Authorization\", appUtil.getPrefrence(\"token_type\")+\" \"+appUtil.getPrefrence(\"access_token\"));\n return params;\n }",
"public Pokemon.RequestEnvelop.AuthInfo.JWT getToken() {\n if (tokenBuilder_ == null) {\n return token_;\n } else {\n return tokenBuilder_.getMessage();\n }\n }",
"public User getUserFromRequest() {\n final String requestTokenHeader = request.getHeader(\"Authorization\");\n final String token = requestTokenHeader.substring(7);\n final String username = jwtService.getUsername(token);\n return userRepository.findByUsername(username);\n\t}",
"@Override\n public Map<String, String> getHeaders() throws AuthFailureError {\n Map<String, String> header = new HashMap<String, String>();\n //header.put(\"Content-Type\", \"application/json; charset=UTF-8\");\n header.put(\"Authorization\", \"Bearer \"+LoginMedico.ACCESS_TOKEN);\n return header;\n }",
"public OAuthTokenResponse getToken() {\n return token;\n }",
"RequestToken getOAuthRequestToken() throws MoefouException;",
"@Override\n public Map<String, String> getHeaders() {\n Map<String, String> params = new HashMap<String, String>();\n params.put(\"Content-Type\", \"application/x-www-form-urlencoded\");\n params.put(\"Authorization\", appUtil.getPrefrence(\"token_type\") + \" \" + appUtil.getPrefrence(\"access_token\"));\n return params;\n }",
"@Override\n public Map<String, String> getHeaders() throws AuthFailureError\n {\n Map<String, String> params = new HashMap<String, String>();\n params.put(Keys.Authorization,\"Bearer \"+TripManagement.readValueFromPreferences(getActivity(),\"accesstoken\",\"\"));\n return params;\n }",
"@Override\n public Map<String, String> getHeaders() throws AuthFailureError {\n Map<String, String> headerMap = new HashMap<String, String>();\n headerMap.put(\"Content-Type\", \"application/x-www-form-urlencoded\");\n headerMap.put(\"Authorization\", \"Bearer \" + token);\n return headerMap;\n }",
"AuthenticationToken renewAuthentication(String headerToken);",
"String getToken(String scope, String username, String password) throws AuthorizationException;",
"public String getToken()\n {\n return ssProxy.getToken();\n }",
"public static String getToken() {\n String token = \"96179ce8939c4cdfacba65baab1d5ff8\";\n return token;\n }",
"public String getToken() {\n return token.get();\n }",
"public String getToken() {\n return token_;\n }",
"public String getToken() {\n return token_;\n }",
"public String getToken() {\n return token_;\n }",
"public List<Header> nextHeader(JSONResponse response){\n\t\tList<Header> headers = getHeaders();\n if(response.token == null){\n return headers;\n } else {\n headers.add(new BasicHeader(\"Authorization\", \"Bearer \" + response.token));\n return headers;\n }\n }",
"public void setToken(){\n token=null;\n try {\n OkHttpClient client = new OkHttpClient();\n RequestBody reqbody = RequestBody.create(null, new byte[0]); \n Request request = new Request.Builder()\n .url(\"https://api.mercadolibre.com/oauth/token?grant_type=client_credentials&client_id=\"+clienteID +\"&client_secret=\"+secretKey)\n .post(reqbody)\n .addHeader(\"content-type\", \"application/json\")\n .addHeader(\"cache-control\", \"no-cache\")\n .addHeader(\"postman-token\", \"67053bf3-5397-e19a-89ad-dfb1903d50c4\")\n .build();\n \n Response response = client.newCall(request).execute();\n String respuesta=response.body().string();\n token=respuesta.substring(respuesta.indexOf(\"APP\"),respuesta.indexOf(\",\")-1);\n System.out.println(token);\n } catch (IOException ex) {\n Logger.getLogger(MercadoLibreAPI.class.getName()).log(Level.SEVERE, null, ex);\n token=null;\n }\n }",
"com.didiyun.base.v1.Header getHeader();",
"public static String getToken() {\n \treturn mToken;\n }",
"public String getToken() {\n return this.token;\n }",
"@Override\n public Map<String, String> getHeaders() throws AuthFailureError {\n Map<String, String> headers = new HashMap<>();\n headers.put(\"petalier_session_token\", PSharedPreferences.getSomeStringValue(AppController.getInstance(), \"session_token\"));\n//\n// if (!PSharedPreferences.getSomeStringValue(AppController.getInstance(), \"session_token\").isEmpty()){\n// headers.put(\"Session-Token\", PSharedPreferences.getSomeStringValue(AppController.getInstance(), \"session_token\"));\n// }\n\n return headers;\n }",
"public String getToken() {\n\t\treturn token;\n\t}",
"public String getToken() {\n\t\treturn token;\n\t}",
"private Claims getClaimsFromToken(String authToken) {\n Claims claims = null;\n try {\n claims = Jwts.parser()\n .setSigningKey(SECRET)\n .parseClaimsJws(authToken)\n .getBody();\n } catch (Exception e){\n claims = null;\n }\n return claims;\n }",
"@POST\n @Consumes(org.springframework.http.MediaType.APPLICATION_JSON_UTF8_VALUE)\n @Produces(org.springframework.http.MediaType.APPLICATION_JSON_UTF8_VALUE)\n @Path(\"/token\")\n @ApiOperation(value = \"Gets the authorization\")\n public Response getToken(@RequestBody AuthorizationEntity auth) {\n // same AccessResource for token to generate\n if (httpServletRequest.isSecure()) {\n final NiFiUser user = NiFiUserUtils.getNiFiUser();\n if (user == null) {\n throw new AccessDeniedException(\"No user authenticated in the request.\");\n }\n if (user.getIdentity().equals(auth.getUsername()) || user.getIdentity().equals(auth.getIdentity())) {\n\n LoginAuthenticationToken loginToken = new LoginAuthenticationToken(auth.getUsername(), auth.getUsername(), auth.getExpiration(), auth.getIssuer());\n String jwtToken = jwtService.generateSignedToken(loginToken);\n\n // build the response\n final URI uri = URI.create(generateResourceUri(\"auth\", \"token\"));\n return generateCreatedResponse(uri, jwtToken).build();\n }\n\n }\n return generateNotAuthorizedResponse().build();\n\n }",
"@Override\n public Response intercept(Chain chain) throws IOException {\n Request authorisedRequest = chain.request().newBuilder()\n .header(\"Authorization:\", \"Token \" + sharedPrefsWrapper.getString(KEY))\n .build();\n\n\n return chain.proceed(authorisedRequest);\n }",
"@Override\n public Object getCredentials() {\n return token;\n }",
"protected UsernamePasswordAuthenticationToken getAuthRequest(HttpServletRequest request) {\n\t\tString username = request.getParameter(\"username\");\n\t\tString password = request.getParameter(\"password\");\n\t\treturn new UsernamePasswordAuthenticationToken(username , password);\n\t}",
"public String getToken() {\n return this.token;\n }",
"GetToken.Res getGetTokenRes();",
"public\t Authorization getAuthorization()\n { return (Authorization) this.getHeader(AuthorizationHeader.NAME); }",
"private HttpEntity<?> setTokenToHeaders() {\n HttpHeaders headers = new HttpHeaders();\n headers.set(\"Authorization\", this.token.getToken_type() + \" \" + this.token.getAccess_token());\n headers.setAccept(Collections.singletonList(MediaType.APPLICATION_JSON));\n return new HttpEntity<>(null, headers);\n }"
] |
[
"0.77352816",
"0.76943856",
"0.73471385",
"0.7331064",
"0.72894806",
"0.6959657",
"0.6901381",
"0.68630546",
"0.6812894",
"0.67714435",
"0.67690796",
"0.6745212",
"0.67378855",
"0.6727949",
"0.67056996",
"0.66927433",
"0.66925704",
"0.66556025",
"0.6648153",
"0.6631135",
"0.66267514",
"0.6609374",
"0.6575867",
"0.65488535",
"0.65448844",
"0.65448844",
"0.65448844",
"0.65448844",
"0.65448844",
"0.65448844",
"0.65193576",
"0.64919305",
"0.6464082",
"0.6433773",
"0.6422617",
"0.6386088",
"0.63704896",
"0.6366546",
"0.63617027",
"0.63617027",
"0.63617027",
"0.63617027",
"0.63617027",
"0.6359182",
"0.6342305",
"0.6342305",
"0.6323629",
"0.62786746",
"0.62631345",
"0.625607",
"0.6243076",
"0.62420475",
"0.6214799",
"0.6213724",
"0.6213724",
"0.6213724",
"0.6212408",
"0.6203492",
"0.6195697",
"0.6195697",
"0.61830604",
"0.61572534",
"0.6156552",
"0.6156552",
"0.6156552",
"0.6156552",
"0.6156552",
"0.61519706",
"0.6143197",
"0.61227405",
"0.6117383",
"0.61165726",
"0.6109655",
"0.609622",
"0.60728365",
"0.6067729",
"0.606161",
"0.60380596",
"0.6031346",
"0.60305303",
"0.6028617",
"0.6018667",
"0.6018667",
"0.6018667",
"0.60100496",
"0.60070735",
"0.60068643",
"0.6005938",
"0.60054666",
"0.59867597",
"0.5979985",
"0.5979985",
"0.5974483",
"0.59723604",
"0.5960991",
"0.5953677",
"0.5952353",
"0.5939075",
"0.5937244",
"0.59130776",
"0.5905342"
] |
0.0
|
-1
|
Entry point of main.
|
public static void main(String[] args) throws Exception {
// 決定作品數量及演進世代
int POP_SIZE = 100;
int SELECTED_SIZE = 0;
int GENERATION = 300;
Main main = new Main(
POP_SIZE,
SELECTED_SIZE,
GENERATION,
LogState.DISABLED);
main.composer.draw(Composer.DRAWTYPE_COMBINEDCHART);
System.out.println(header("Persisting Conservatory"));
main.composer.persistAll();
var chart = new LineChart_AWT("Composer " + main.composer.getId());
var gsc = new GoldenSectionClimax(UnaccompaniedCello.RANGE.keySet());
main.composer.getConservatory().keySet().stream()
.sorted((o1, o2) -> o1.getId().compareTo(o2.getId()))
.peek(gsc::updateClimaxIndexes)
.forEach(c
-> IntStream.range(0, c.getSize())
.forEach(i
-> chart.addData(gsc.getClimaxIndexes().get(i), c.getId_prefix(), "" + i)
));
try {
var max = main.composer.getConservatory().keySet().stream()
.max(gsc::compareToPeak)
.orElseThrow();
IntStream.range(0, max.getSize())
.forEach(i -> {
chart.addData(gsc.getStandard(max, i), "standard", "" + i);
});
} catch (NoSuchElementException e) {
System.out.println("Sorry, the Conservatory is empty. Please try again.");
}
chart.createLineChart("SketchNode Rating Chart",
"SketchNode", "Intensity Index", 560, 367, true);
chart.showChartWindow();
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public static void main() {\n \n }",
"public static void main()\n\t{\n\t}",
"public static void main(){\n\t}",
"public static void main(String[] args) {}",
"public static void main(String[] args) {}",
"public static void main(String[] args)\r\t{",
"public static void main() {\n }",
"public static void main(String[] args) {\n \n \n \n\t}",
"public static void main (String []args){\n }",
"public static void main(String[]args) {\n\t\n\t\t\n\n}",
"public static void main(String[] args) {\r\n// Use for unit testing\r\n }",
"public static void main(String[] args) {\r\n \r\n }",
"public static void main(String[] args) {\r\n \r\n }",
"public static void main(String[] args) {\n\t \t\n\t \t\n\t }",
"public static void main(String[] args) {\n \n \n \n \n }",
"public static void main(String[] args){\n\t\t\n\t\t\n \t}",
"public static void main(String args[]) {}",
"public static void main(String args[]) {}",
"public static void main(String args[]) {}",
"public static void main(String[] args) {\n \r\n\t}",
"public static void main(String []args){\n }",
"public static void main(String []args){\n }",
"static void main(String[] args)\n {\n }",
"public static void main(String[] args) {\n \n\n }",
"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\n }",
"public static void main(String args[]) throws Exception\n {\n \n \n \n }",
"public static void main(String []args){\n\n }",
"public static void main (String[] args) {\n\t\t\n\t}",
"static void main(String[] args) {\n }",
"public static void main(String[] args) {\n \n\t}",
"public static void main (String[] args) {\r\n\t\t \r\n\t\t}",
"public static void main(String[] args) {\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 }",
"public static void main(String[] args) {\n \n }",
"public static void main(String[] args) {\n \n }",
"public static void main(String[] args) {\n \n \n }",
"public static void main(String[] args) {\n \n \n }",
"public static void main(String[] args) {\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\n\t\t\n\t\t\n\t}",
"static public void main(String[] args) {\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}",
"public static void main(String[] args) {\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t}",
"public static void main (String[]args) throws IOException {\n }",
"public static void main(String[] args) {\n \n }",
"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}",
"public static void main(String[] args)\r\n {\n \r\n \r\n }",
"public static void main(String[] args) { }",
"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) throws Exception {\n\t\t\t\t\t\t\n\t\t\t\t\n\t\t\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\n\t\t\n\t\t\n\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\t}",
"public static void main(String[] args) {\n\t\t\t\t\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\n }",
"public static void main(String[]args) {\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 \n\t}",
"public Main() {}",
"public static void main(String[] args){\n\t\t\r\n\t}",
"public static void main(String args[]) throws IOException {\r\n\t\t\r\n\t}"
] |
[
"0.7879628",
"0.78502923",
"0.7789284",
"0.77032006",
"0.77032006",
"0.7682624",
"0.7662147",
"0.7659671",
"0.76560014",
"0.7641896",
"0.7633076",
"0.75970733",
"0.75970733",
"0.758431",
"0.75776064",
"0.7562565",
"0.75586325",
"0.75586325",
"0.75586325",
"0.75539726",
"0.755169",
"0.755169",
"0.75508016",
"0.7543546",
"0.75383806",
"0.75383806",
"0.75372857",
"0.7526365",
"0.75212854",
"0.75208014",
"0.75055057",
"0.7505384",
"0.7499604",
"0.7493396",
"0.7493396",
"0.7493396",
"0.7493396",
"0.7493396",
"0.7493396",
"0.7486126",
"0.7486126",
"0.7473356",
"0.7472566",
"0.74648666",
"0.74617296",
"0.7447672",
"0.7445704",
"0.7445245",
"0.7445245",
"0.7445245",
"0.7445245",
"0.7445245",
"0.7445245",
"0.7445245",
"0.7445245",
"0.7445245",
"0.7445245",
"0.7445245",
"0.7445245",
"0.7445245",
"0.7445245",
"0.7445245",
"0.7445245",
"0.7445245",
"0.7445245",
"0.7445245",
"0.7445245",
"0.7445245",
"0.7445245",
"0.7445245",
"0.7445245",
"0.7445245",
"0.7445245",
"0.7445245",
"0.7445245",
"0.7435945",
"0.7434771",
"0.7432815",
"0.7421687",
"0.74202794",
"0.7414767",
"0.74097705",
"0.74071914",
"0.7406075",
"0.7396587",
"0.7396587",
"0.7396587",
"0.7396587",
"0.739276",
"0.7389509",
"0.738912",
"0.7385645",
"0.73837227",
"0.7377215",
"0.7374264",
"0.7373792",
"0.7366051",
"0.7364849",
"0.7358669",
"0.7358501",
"0.7357647"
] |
0.0
|
-1
|
Custom collector to collect single element
|
public static <T> Collector<T, ?, T> toSingleton() {
return Collectors.collectingAndThen(Collectors.toList(), list -> {
if (list.size() != 1) {
// if more than one or no element is present then it should return null
return null;
}
return list.get(0);
});
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"@Override\n public void collect(T elem) {\n value = elem;\n }",
"List<T> collect();",
"T collect(V source);",
"@Override\n\tvoid collect() {\n\t\t\n\t}",
"protected final void collect(T row) {\n collector.collect(row);\n }",
"@Test\n void testCollect() {\n List<Integer> numbers = Stream.of(1, 2, 3, 4)\n .collect(Collectors.toList());\n assertEquals(List.of(1, 2, 3, 4), numbers);\n\n // collect to a Set\n numbers = List.of(1, 1, 2, 2);\n Set<Integer> unique = numbers.stream()\n .collect(Collectors.toSet());\n assertEquals(Set.of(1, 2), unique);\n\n // collect to a different collection like a Queue\n Queue<Integer> queue = numbers.stream()\n .collect(Collectors.toCollection(LinkedList::new));\n assertEquals(Integer.valueOf(1), queue.poll());\n assertEquals(Integer.valueOf(1), queue.poll());\n assertEquals(Integer.valueOf(2), queue.poll());\n assertEquals(Integer.valueOf(2), queue.poll());\n\n // collect to one single String\n List<String> letters = List.of(\"S\", \"t\", \"r\", \"e\", \"a\", \"m\", \"s\");\n String word = letters.stream()\n .collect(Collectors.joining());\n assertEquals(\"Streams\", word);\n\n String another = letters.stream()\n .collect(Collectors.joining(\" \", \"*\", \"!\"));\n assertEquals(\"*S t r e a m s!\", another);\n }",
"public T first() throws EmptyCollectionException;",
"public T first() throws EmptyCollectionException;",
"public Object firstElement();",
"public static <T> T getSingleElement(Iterable<T> iterable) {\n\t\tList<T> list = createList(iterable.iterator());\n\t\treturn getSingleElement(list);\n\t}",
"public static <T> Set<T> toSingleElementSet(T element) {\n return Collections.singleton(element);\n\n }",
"protected static void usingACollector() {\n String string = Stream.of(\"this\", \"is\", \"a\", \"list\")\n .collect(() -> new StringBuilder(), // result Supplier\n (sb, str) -> sb.append(str), // add a single value to the result\n (sb1, sb2) -> sb1.append(sb2)) // combine two results\n .toString();\n\n // Using method reference\n string = Stream.of(\"this\", \"is\", \"a\", \"list\")\n .collect(StringBuilder::new, // result Supplier\n StringBuilder::append, // add a single value to the result\n StringBuilder::append) // combine two results\n .toString();\n\n // Using joining method\n string = Stream.of(\"this\", \"is\", \"a\", \"list\").collect(Collectors.joining());\n }",
"@ProcessElement\n public void processElement(ProcessContext c) {\n Iterator<String> duplicates = c.element().getValue().iterator();\n\n // Shouldn't really have to check hasNext\n if (duplicates.hasNext()) {\n c.output(duplicates.next());\n }\n }",
"public void Collect(Item item){\n\t}",
"private static <T> T identity(Collection<T> collection) {\n return identity(collection.iterator());\n }",
"public Object firstElement() {\n return _queue.firstElement();\n }",
"public E getFirst() {\r\n\t\t// element checks to see if the list is empty\r\n\t\treturn element();\r\n\t}",
"public Object nextElement() {\n/* 75 */ return this.iterator.next();\n/* */ }",
"public static <T> T getSingleElement(Collection<T> collection) {\n\t\tif (collection.size() != 1)\n\t\t\tthrow new IndexOutOfBoundsException(String.format(\n\t\t\t\t\t\"Expected collection to contain a single element, but observed %d elements: %s\", collection.size(),\n\t\t\t\t\tcollection.toString()));\n\t\treturn collection.iterator().next();\n\t}",
"Collect getColl();",
"@Override\r\n\tpublic E getFirst() {\n\t\treturn null;\r\n\t}",
"@Override\r\n\t\tpublic final E getFirst() {\n\t\t\treturn null;\r\n\t\t}",
"@Override\n\tpublic void extractAggFn(List<Expr> collector) {\n\n\t}",
"@Override\n\tpublic int drainTo(Collection<? super E> c) {\n\t\treturn 0;\n\t}",
"public static IDescribable getFirst( Collection<? extends IDescribable> results )\r\n\t{\r\n\t if(( results == null ) || ( results.size() == 0 ))\r\n\t return null;\r\n\t return results.iterator().next();\r\n\t}",
"public void collect(K key, V value) {\n\n }",
"public T caseCollectorArray(CollectorArray object)\r\n {\r\n return null;\r\n }",
"@Override\r\n\tpublic Object first(){\r\n\t\tcheck();\r\n\t\treturn head.value;\r\n\t}",
"@Override\n public Function<List<Integer>, Integer> finisher() {\n return resultList -> resultList.get(0);\n }",
"@Override\r\n\t\tpublic E getFirst() {\n\t\t\treturn pair.getFirst();\r\n\t\t}",
"@Override\r\n\t\tpublic E getFirst() {\n\t\t\treturn pair.getFirst();\r\n\t\t}",
"@Override\n public E element() {\n if (isEmpty()) {\n throw new NoSuchElementException();\n }\n return (E) array[0];\n }",
"public E getFirst();",
"public static java.lang.Object min(java.util.Collection arg0)\n { return null; }",
"@Override\r\n\tpublic E element() {\n\t\treturn null;\r\n\t}",
"public E queryFirst() {\n ValueHolder<E> result = ValueHolder.of(null);\n limit(1);\n doIterate(r -> {\n result.set(r);\n return false;\n });\n\n return result.get();\n }",
"@Override\n public int element() {\n isEmptyList();\n return first.value;\n }",
"@Test\n public void whenAddSeveralIdenticalElementsThenSetHasOnlyOneSuchElement() {\n SimpleSet<Integer> set = new SimpleSet<>();\n set.add(1);\n set.add(2);\n set.add(3);\n set.add(3);\n set.add(2);\n set.add(1);\n\n Iterator<Integer> iterator = set.iterator();\n\n assertThat(iterator.next(), is(1));\n assertThat(iterator.next(), is(2));\n assertThat(iterator.next(), is(3));\n assertThat(iterator.hasNext(), is(false));\n }",
"public O first()\r\n {\r\n if (isEmpty()) return null; \r\n return first.getObject();\r\n }",
"public static <T> T single(\r\n\t\t\t@Nonnull Observable<? extends T> source) {\r\n\t\tCloseableIterator<T> it = toIterable(source).iterator();\r\n\t\ttry {\r\n\t\t\tif (it.hasNext()) {\r\n\t\t\t\tT one = it.next();\r\n\t\t\t\tif (!it.hasNext()) {\r\n\t\t\t\t\treturn one;\r\n\t\t\t\t}\r\n\t\t\t\tthrow new TooManyElementsException();\r\n\t\t\t}\r\n\t\t\tthrow new NoSuchElementException();\r\n\t\t} finally {\r\n\t\t\tCloseables.closeSilently(it);\r\n\t\t}\r\n\t}",
"@Override\r\n\t\tpublic T getFirst() {\n\t\t\treturn pair.getFirst();\r\n\t\t}",
"@SuppressWarnings(\"unchecked\")\n private static <T> Collector<T, Void, Void> collectVoid() {\n return (Collector<T, Void, Void>) VOID_COLLECTOR;\n }",
"public static java.lang.Object min(java.util.Collection arg0, java.util.Comparator arg1)\n { return null; }",
"public Unit first()\n\t{\n\t\tif (size() == 0)\n\t\t{\n\t\t\treturn null;\n\t\t}\n\t\treturn iterator().next();\n\t}",
"public E first() {\n if (isEmpty()) return null;\n return first.item;\n }",
"public final void collect(Collection<? super T> output) {\n Node n = getHead();\n while (true) {\n Node next = (Node) n.get();\n if (next != null) {\n Object v = leaveTransform(next.value);\n if (!NotificationLite.isComplete(v) && !NotificationLite.isError(v)) {\n output.add(NotificationLite.getValue(v));\n n = next;\n } else {\n return;\n }\n } else {\n return;\n }\n }\n }",
"@Nonnull\n @Override\n public Iterable<KeyValueObject<KOUT, VOUT>> collect() {\n return output.collect();\n }",
"@Override\n\t@TimeComplexity(\"O(1)\")\n\tpublic E element()\n\t{\n\t\treturn element;\n\t}",
"Collection<T> getMinElements();",
"Collection<? extends Object> getFullHadith();",
"@Override\n public T getCombinedElement()\n {\n return element;\n }",
"public CollectingConsumer(List<T> collected) {\n this.collected = collected;\n }",
"public Collect_result(Collect_result other) {\r\n }",
"public T getFirst() {\n return this.getHelper(this.indexCorrespondingToTheFirstElement).data;\n }",
"public T getFirst();",
"public T getFirst();",
"public Jode single(Predicate<Jode> filter) {\n return children().single(filter);\n }",
"public A getFirst() { return first; }",
"@Override\r\n\t\tpublic T getFirst() {\n\t\t\tsynchronized (mutex) {\r\n\t\t\t\treturn pair.getFirst();\r\n\t\t\t}\r\n\t\t}",
"public T removeFirst() throws EmptyCollectionException;",
"@Override\n public E element() {\n if (size == 0){\n throw new NoSuchElementException();\n }\n return heap[0];\n }",
"Collection<V> getAllElements();",
"public E getFirst() {\n return peek();\n }",
"void collectV();",
"Optional<X> elem();",
"private static <T, R> R getOf(final Collection<T> collection, Function<T, R> func, BinaryOperator<R> mapper, Function<R, R> sumator) {\n R r = null;\n for (T t: collection) {\n r = mapper.apply(r, func.apply(t));\n }\n return sumator.apply(r);\n }",
"@Override\n public Collection<SimpleModel> mungee(Collection<MockData> src) {\n return src\n .stream()\n .filter(data -> data.getContent() != null)\n .map(SimpleModel::build)\n .collect(Collectors.toList());\n }",
"@Override\n\tpublic void map(Record record, Collector<Record> collector) {\n\n\t\tString document = record.getField(0, StringValue.class).toString();\n\t\tString docArray[] = document.split(\",\");\n\t\tString docIdString = docArray[0];\n\t\tInteger docId = Integer.parseInt(docIdString);\n\t\tStringBuilder text = new StringBuilder();\n\t\tfor (int i = 1; i < docArray.length; i++) {\n\t\t\ttext.append(docArray[i]);\n\t\t}\n\t\tString words = text.toString();\n\t\tHashMap<String, Integer> uniqWords = new HashMap<String, Integer>();\n\t\tHashSet<String> stopWords = Util.STOP_WORDS;\n\t\tfor (String word: words.split(\" \")) {\n\t\t\tif (word.matches(\"[\\\\w!.]+\") && !stopWords.contains(word)) {\n\t\t\t\tif (!uniqWords.containsKey(word)) {\n\t\t\t\t\tuniqWords.put(word, 1);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tInteger count = uniqWords.get(word);\n\t\t\t\t\tcount++;\n\t\t\t\t\tuniqWords.put(word, count);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tfor (String key : uniqWords.keySet()) {\n\t\t\tRecord emitRecord = new Record();\n\t\t\temitRecord.addField(new IntValue(docId));\n\t\t\temitRecord.addField(new StringValue(key));\n\t\t\temitRecord.addField(new IntValue(uniqWords.get(key)));\n\t\t\tcollector.collect(emitRecord);\n\t\t}\n\t\t\n\t}",
"public T first() throws EmptyCollectionException{\n if (front == null){\n throw new EmptyCollectionException(\"list\");\n }\n return front.getElement();\n }",
"@Nullable\n public T firstOrNull() {\n return Query.firstOrNull(iterable);\n }",
"public E removeFirst();",
"public E first() \n throws NoSuchElementException {\n if (entries != null && \n size > 0 ) {\n position = 0;\n E element = entries[position]; \n position++;\n return element;\n } else {\n throw new NoSuchElementException();\n }\n }",
"@Override\n\tprotected ElderMood transformOne(ElderFrequency in) {\n\t\treturn null;\n\t}",
"public static <T> T single(\r\n\t\t\t@Nonnull Observable<? extends T> source,\r\n\t\t\t@Nonnull Func0<? extends T> defaultSupplier) {\r\n\t\tCloseableIterator<T> it = toIterable(source).iterator();\r\n\t\ttry {\r\n\t\t\tif (it.hasNext()) {\r\n\t\t\t\tT one = it.next();\r\n\t\t\t\tif (!it.hasNext()) {\r\n\t\t\t\t\treturn one;\r\n\t\t\t\t}\r\n\t\t\t\tthrow new TooManyElementsException();\r\n\t\t\t}\r\n\t\t} finally {\r\n\t\t\tCloseables.closeSilently(it);\r\n\t\t}\r\n\t\treturn defaultSupplier.invoke();\r\n\t}",
"public E element();",
"public <T,R> TempCollectionStepExtension<R,X> thenExtract(Extractor<T,R> extractor);",
"Object element();",
"Object element();",
"protected abstract T _createWithSingleElement(DeserializationContext ctxt, Object value);",
"@Override\r\n public Entry<K, V> firstEntry() {\n return null;\r\n }",
"private static <T> T identity(Iterator<T> iterator) {\n if( iterator.hasNext() ) {\n T item = iterator.next(); // identity, only if it's the only one\n if( iterator.hasNext() ) {\n throw new IllegalStateException(\"Multiple plugins match\");\n }\n return item;\n }\n return null; // no items in iterator\n }",
"public static <T> T getFirstElement(final Iterable<T> elements) {\n\t\treturn elements.iterator().next();\n\t}",
"@Override\n public Tile getFirst() {\n return tiles.iterator().next();\n }",
"@Override\n public void accept(T event) {\n synchronized(this) {\n collected.add(event);\n }\n }",
"String first(String collection);",
"@Override\r\n\tpublic E removeFirst() {\n\t\treturn null;\r\n\t}",
"@MethodContract(post = @Expression(\"result != null ? contains(result\"))\n public PropertyException getAnElement() {\n if (isEmpty()) {\n return null;\n }\n else {\n Iterator<Set<PropertyException>> iter1 = getElementExceptions().values().iterator();\n Set<PropertyException> s = iter1.next();\n Iterator<PropertyException> iter2 = s.iterator();\n return iter2.next();\n }\n }",
"@Override\n\tpublic Object peek() {\n\t\treturn list.getFirst();\n\t}",
"public interface ICollect {\n\n}",
"default Stream<E> stream() {\n return StreamSupport.stream(this.spliterator(), false);\n }",
"Collect selectByPrimaryKey(Integer id);",
"public T caseElement(Element object)\n {\n return null;\n }",
"Object getContainedValue();",
"void collect(MetricsCollector collector);",
"public Optional<T> getFirstItem() {\n return getData().stream().findFirst();\n }",
"@Override\n public Set<T> asSet() {\n return new AbstractSet<T>() {\n @Override\n public Iterator<T> iterator() {\n return new Iterator<T>() {\n boolean foundNext;\n boolean hasNext;\n T next;\n \n private void findNext() {\n if (!foundNext) {\n hasNext = isPresent();\n if (hasNext) {\n try {\n next = get();\n } catch (NoSuchElementException e) {\n // in case there was a race and the value became absent\n hasNext = false;\n next = null;\n }\n } else {\n next = null;\n }\n foundNext = true;\n }\n }\n \n @Override\n public boolean hasNext() {\n findNext();\n return hasNext;\n }\n\n @Override\n public T next() {\n findNext();\n if (hasNext) {\n // no next after consuming the single present value \n hasNext = false;\n T ret = next;\n next = null;\n return ret;\n }\n throw new NoSuchElementException();\n }\n\n @Override\n public void remove() {\n throw new UnsupportedOperationException();\n }\n };\n }\n\n @Override\n public int size() {\n return isPresent() ? 1 : 0;\n }\n };\n }",
"@Override\n protected Object aggregateResult(Object aggregate, Object nextResult) {\n if (aggregate == null && nextResult == null) {\n return null;\n }\n if (nextResult == null) {\n return aggregate;\n }\n return nextResult;\n }",
"public T peek() throws EmptyCollectionException;",
"public T peek() throws EmptyCollectionException;",
"synchronized Collection getCreatedElements() {\n Collection col = new ArrayList(nestedElements.size());\n Iterator it = nestedElements.entrySet().iterator();\n while (it.hasNext()) {\n Map.Entry entry = (Map.Entry)it.next();\n if (entry.getValue() != null) {\n col.add(entry.getValue());\n }\n }\n return col;\n }"
] |
[
"0.68907875",
"0.60195667",
"0.5752954",
"0.56567687",
"0.5539371",
"0.54686517",
"0.54567474",
"0.54567474",
"0.54166543",
"0.53608716",
"0.53302914",
"0.524375",
"0.5224106",
"0.51935685",
"0.51786536",
"0.51478255",
"0.5137471",
"0.5102935",
"0.5096648",
"0.50583535",
"0.5042598",
"0.5028311",
"0.49857873",
"0.4959838",
"0.49391356",
"0.4936393",
"0.49329627",
"0.4927989",
"0.492419",
"0.49241707",
"0.49241707",
"0.4923338",
"0.4909322",
"0.4886969",
"0.48772624",
"0.4868571",
"0.48682994",
"0.48513162",
"0.48353422",
"0.48311862",
"0.48276272",
"0.48146984",
"0.48133337",
"0.48116225",
"0.48099843",
"0.4802847",
"0.47897425",
"0.47801077",
"0.47753015",
"0.47587624",
"0.47505403",
"0.47484374",
"0.4746728",
"0.47398692",
"0.47373554",
"0.47373554",
"0.4734489",
"0.4725252",
"0.47238636",
"0.47222796",
"0.47102785",
"0.47087753",
"0.47061485",
"0.47053856",
"0.47038895",
"0.47028938",
"0.470072",
"0.47001517",
"0.46982664",
"0.4683009",
"0.4679792",
"0.46749258",
"0.46685368",
"0.4667218",
"0.4665496",
"0.46443576",
"0.46323887",
"0.46323887",
"0.46286243",
"0.4627467",
"0.4627003",
"0.46245518",
"0.46144515",
"0.46136898",
"0.46099272",
"0.46089947",
"0.4595256",
"0.45922056",
"0.4591811",
"0.45890605",
"0.45884326",
"0.4581792",
"0.45807877",
"0.45802292",
"0.45799378",
"0.45766905",
"0.45736536",
"0.45696497",
"0.45696497",
"0.45695028"
] |
0.683108
|
1
|
Play the given audio effect if it exists
|
public void play(String s, Location location)
{
if(contains(s))
{
get(s).play(location);
}
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"private static void playEffect(Clip effect) {\n\n\t\tif (GameFrame.settingsPanel.effectsOn() && effect != null) {\n\t\t\teffect.start();\n\t\t\teffect.setFramePosition(0);\n\t\t}\n\n\t}",
"public void foodSound(){\n if (enableSound){\r\n\t clip.play();\r\n }\r\n\t\t\r\n\t}",
"private void play()\n {\n if(AudioDetector.getInstance().isNoAudio())\n {\n return;\n }\n\n stop();\n musicPlayer.play();\n }",
"private void play() {\n\t\tlog.finest(\"Playing sound\");\n\t\ttone.trigger();\n\t}",
"private void playAudio() {\r\n Play.au(audioFileName, false);\r\n }",
"public void play() {\n if (audio != null) {\n audio.play(sfxVolume);\n }\n }",
"public void StartSound(ISoundOrigin origin, sfxenum_t sound_id);",
"public static void playSoundEffect(String path) {\n Thread thread = new Thread(() -> {\n Player soundEffectPlayer = new Player();\n soundEffectPlayer.setSourceLocation(path);\n soundEffectPlayer.play();\n });\n thread.setDaemon(true);\n thread.start();\n }",
"public void StartSound(ISoundOrigin origin, int sound_id);",
"SoundEffect(final String soundEffectName) throws MediaException {\n audio = new AudioClip(Paths.get(SFX_PATH + soundEffectName).toUri().toString());\n }",
"public void playAudio() {\n\n }",
"public abstract String play(SoundLibrary library, String... sound);",
"private static void playAudio(String musicFile) {\n }",
"private void playSound() {\n if (isFlashOn) {\n mp = MediaPlayer.create(this, R.raw.light_switch_off);\n } else {\n mp = MediaPlayer.create(this, R.raw.light_switch_on);\n }\n mp.setOnCompletionListener(new MediaPlayer.OnCompletionListener() {\n\n @Override\n public void onCompletion(MediaPlayer mp) {\n // TODO Auto-generated method stub\n mp.release();\n }\n });\n mp.start();\n }",
"public void playThemeSound() {\n\t\tAudioPlayer audio = AudioPlayer.getInstance();\n\t\taudio.playSound(MUSIC_FOLDER, THEME);\n\t}",
"public void playAudio() {\n\t\tmusic[currentSong].stop();\n\t\tcurrentSong++;\n\t\tcurrentSong %= music.length;\n\t\tmusic[currentSong].play();\n\t}",
"public void ReproduceAudio() { \r\n\t\ttry {\r\n\t\t\t//en caso de que como nombre pongas \"undertale\" la musica sera diferente.\r\n\t\t\tif (Menu.jugador.equals(\"undertale\") || Menu.jugador.equals(\"Undertale\")) {\r\n\t\t\t\trepro.AbrirFichero(\"C:\\\\Temp\\\\Sonidos\\\\undertale.wav\");\r\n\t\t\t\t//emppieza la musica\r\n\t\t\t\trepro.Play();\r\n\t\t\t//musica por defecto\r\n\t\t\t} else {\r\n\t\t\t\trepro.AbrirFichero(\"C:\\\\Temp\\\\Sonidos\\\\tetris.mp3\");\r\n\t\t\t\trepro.Play();\r\n\t\t\t}\t\r\n\t\t} catch (Exception ex) {\r\n\t\t\tSystem.out.println(\"Error: \" + ex.getMessage());\r\n\t\t}\r\n\t}",
"private void playSound() {\n\t\tif (controllerVars.isLoaded() && !controllerVars.isPlays()) {\n\t\t\tcontrollerVars.getSoundPool().play(controllerVars.getSoundID(), controllerVars.getVolume(), controllerVars.getVolume(), 1, 0, 1f);\n\t\t\tcontrollerVars.COUNTER++;\n\t\t\t//Toast.makeText(act, \"Played sound\", Toast.LENGTH_SHORT).show();optional Playing message \n\t\t\tcontrollerVars.setPlays(true);\n\t\t\tonComplete(controllerVars.getMediaPlayer().getDuration());\n\t\t}\n\t\t//controllerVars.getMediaPlayer().start();\n\t\t//controllerVars.setPlays(true);\n\t}",
"public void playMusic() {\n\t\tthis.music.start();\n\t}",
"public static void playSound(){\r\n try{\r\n Clip clip = AudioSystem.getClip();\r\n clip.open(AudioSystem.getAudioInputStream(new File(\"Cheering.wav\")));\r\n clip.start();\r\n }\r\n catch (Exception exc){\r\n exc.printStackTrace(System.out);\r\n } \r\n }",
"@Override\n public void playSound(int soundId) {\n\n }",
"public void play(boolean music) {\n\t\tplay(1.0f, 1.0f, music);\n\t}",
"public void playAudio() {\n if (done==false)\n {\n file.play();\n }\n}",
"public static void playShootingSound(){\n String musicFile = \"Sounds\\\\Shoot.mp3\";\n Media sound = new Media(new File(musicFile).toURI().toString());\n MediaPlayer mediaPlayer = new MediaPlayer(sound);\n mediaPlayer.setVolume(App.getVolume());\n mediaPlayer.play();\n }",
"PlaySound getSound();",
"public void play() {\n\t\ttry {\n\t\t\taudioInput = AudioSystem.getAudioInputStream(this.music);\n\t\t\tclip.open(audioInput);\n\t\t\tclip.start();\n\t\t} catch (UnsupportedAudioFileException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (LineUnavailableException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"public void playSoundtrack() {\n if(this.musicEnabled) {\n try {\n Clip soundtrackClip = AudioSystem.getClip();\n AudioInputStream inputStream = AudioSystem.getAudioInputStream(new BufferedInputStream(Assets.soundTrack));\n soundtrackClip.open(inputStream);\n soundtrackClip.start();\n soundtrackClip.loop(Clip.LOOP_CONTINUOUSLY);\n } catch (Exception e) {\n e.printStackTrace();\n System.err.println(e.getMessage());\n }\n }\n }",
"private void gameSound(int attack){\n switch (attack){\n case 1:\n mediaPlayer = MediaPlayer.create(Activity_Game.this, R.raw.sound_lightattack);\n break;\n case 2:\n mediaPlayer = MediaPlayer.create(Activity_Game.this, R.raw.sound_strongattack);\n break;\n case 3:\n mediaPlayer = MediaPlayer.create(Activity_Game.this, R.raw.sound_brutalattack);\n break;\n }\n mediaPlayer.start();\n }",
"public void play() {\n\t\tif(hasAudioLoaded()) {\n\t\t\tcurrentClip.start();\n\t\t\tisPlaying = true;\n\t\t}\n\t}",
"public void playAmbientSound() {\n if (!this.isClosed()) {\n super.playAmbientSound();\n }\n\n }",
"public void playMusic() {\r\n try {\r\n File mFile = new File(Filepath);\r\n if (mFile.exists()) {\r\n AudioInputStream audioInput = AudioSystem.getAudioInputStream(mFile);\r\n Clip clip = AudioSystem.getClip();\r\n clip.open(audioInput);\r\n FloatControl gainControl = (FloatControl) clip.getControl(FloatControl.Type.MASTER_GAIN);\r\n gainControl.setValue(-25.0f); //reduces the volume by 25 decibels\r\n clip.start();\r\n clip.loop(Clip.LOOP_CONTINUOUSLY);\r\n\r\n } else {\r\n System.out.println(\"Music File not found\"); // will be thrown if music file is not in the file\r\n }\r\n } catch (Exception ex) {\r\n ex.printStackTrace();\r\n }\r\n }",
"public void playLocal(String audiofile);",
"public void loopSound(boolean commence) {\n if ( commence ) {\n clip.setFramePosition(0);\n clip.loop( Clip.LOOP_CONTINUOUSLY );\n } else {\n clip.stop();\n }\n }",
"public void play(URL paramURL) {\n/* 419 */ AudioClip audioClip = getAudioClip(paramURL);\n/* 420 */ if (audioClip != null) {\n/* 421 */ audioClip.play();\n/* */ }\n/* */ }",
"public void startSound() {\n\t\ttry {\n\t\t\t// Open an audio input stream.\n\t\t\tURL url = this.getClass().getResource(\"/\"+wavMusicFile);\n\t\t\t//System.out.println(\"url: \" + url);\n\t\t\tAudioInputStream audioIn = AudioSystem.getAudioInputStream(url);\n\t\t\t// Get a sound clip resource.\n\t\t\tclip = AudioSystem.getClip();\n\t\t\t// Open audio clip and load samples from the audio input stream.\n\t\t\tclip.open(audioIn);\n\t\t\tclip.start();\n\t\t} catch (UnsupportedAudioFileException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (LineUnavailableException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"public int playAsEffectAt(float pitch, float volume, float x, float y, float z) {\n if (!isStream) {\n return AudioController.INSTANCE.playAsSoundAt(buffer, pitch, volume, false, x, y, z);\n } else {\n System.err.println(\"It is not advised to play a stream as a sound effect\");\n return AudioController.INSTANCE.playAsStreamAt(path, pitch, volume, false, x, y, z);\n }\n }",
"private void playHintAudio() {\n AudioManager audioManager = (AudioManager)getContext().getSystemService(Context.AUDIO_SERVICE);\n int mode = audioManager.getRingerMode();\n Log.d(TAG,\"mode = \" + mode);\n\n if(mode != AudioManager.RINGER_MODE_SILENT && mode != AudioManager.RINGER_MODE_VIBRATE) {\n // prize modify for bug 44603 by zhaojian 20171205 start\n mMediaPlayer = MediaPlayer.create(getContext(),R.raw.hb_sound2);\n Log.d(\"debug\",\"isNotifySound = \" + getConfig().isNotifySound());\n if(getConfig().isNotifySound()) {\n mMediaPlayer.setOnPreparedListener(new MediaPlayer.OnPreparedListener() {\n @Override\n public void onPrepared(MediaPlayer mp) {\n mp.start();\n }\n });\n mMediaPlayer.setOnCompletionListener(new MediaPlayer.OnCompletionListener() {\n @Override\n public void onCompletion(MediaPlayer mp) {\n mp.release();\n }\n });\n mMediaPlayer.start();\n }\n // prize modify for bug 44603 by zhaojian 20171205 end\n }\n }",
"public void continueSound() {\n\t\tclip.start();\n\t}",
"public void play(MediaPlayer choice) {\n if (choice == background) {\n if (!background2.isPlaying() && levelCtrl.level >= levelChange) {\n background2.setVolume(volume, volume);\n background2.start();\n }\n else if (!background.isPlaying()) {\n background.setVolume(volume, volume);\n background.start();\n }\n }\n else if (!choice.isPlaying()) {\n choice.setVolume(volume, volume);\n choice.start();\n }\n }",
"public void playSound() {\n\t\tmediaPlayer.play();\n\t}",
"@Override\n\tpublic void playLivingSound() {\n\t\tgetSoundManager().playLivingSound();\n\t}",
"public void play() {\n\t\tint focusRequestResult = mAudioManager.requestAudioFocus(mOuterEventsListener, AudioManager.STREAM_MUSIC,\n\t\t\t\tAudioManager.AUDIOFOCUS_GAIN);\n\n\t\tif (PrefManager.isIgnoreAudioFocus()\n\t\t\t\t|| focusRequestResult == AudioManager.AUDIOFOCUS_REQUEST_GRANTED) {\n\t\t\tinternalPlay();\n\t\t} else {\n\t\t\terror(Error.AUDIO_FOCUS_ERROR);\n\t\t}\n\t}",
"public void playMusic() {\n\t\ttry {\n\t\t\tsoundManager.playMusic(\"bgroundmusic\");\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\t}",
"SoundEffect(String n) {\n\t\ttry{\n\t\t\tURL url = this.getClass().getClassLoader().getResource(n); //Create url with filename\n\t\t\tAudioInputStream audioInputStream = AudioSystem.getAudioInputStream(url); //Create AudioInputStream with url\n\t\t\tclip = AudioSystem.getClip(); //Assign the wav to clip\n\t\t\tclip.open(audioInputStream); //Open the clip\n\t\t}\n\t\tcatch (UnsupportedAudioFileException e) {\n\t\t\te.printStackTrace(); //Print stack trace for debugging\n\t\t}\n\t\tcatch (IOException e) {\n\t\t\te.printStackTrace(); //Print stack trace for debugging\n\t\t}\n\t\tcatch (LineUnavailableException e) {\n\t\t\te.printStackTrace(); //Print stack trace for debugging\n\t\t}\n\t}",
"public void PlaySound(Context context) {\r\n\t\tif (!this.mp.isPlaying()) {\r\n\t\t\tmp.start();\r\n\t\t}\r\n\t}",
"private void play() {\n /** Memanggil File MP3 \"indonesiaraya.mp3\" */\n try {\n mp.prepare();\n } catch (IllegalStateException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n /** Menjalankan Audio */\n mp.start();\n\n /** Penanganan Ketika Suara Berakhir */\n mp.setOnCompletionListener(new OnCompletionListener() {\n @Override\n public void onCompletion(MediaPlayer mp) {\n stateAwal();\n }\n });\n }",
"@Override\r\n protected void playGameStartAudio() {\n\taudio.playClip();\r\n }",
"private void playSound(String sound) {\r\n try {\r\n BufferedInputStream soundFileStream = new BufferedInputStream(this\r\n .getClass().getResourceAsStream(sound));\r\n AudioInputStream audioInputStream = AudioSystem\r\n .getAudioInputStream(soundFileStream);\r\n AudioFormat audioFormat = audioInputStream.getFormat();\r\n DataLine.Info dataLineInfo = new DataLine.Info(Clip.class, audioFormat);\r\n Clip clip = (Clip) AudioSystem.getLine(dataLineInfo);\r\n clip.open(audioInputStream);\r\n clip.start();\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n }\r\n }",
"public void playSound() {\n if (this.mIsSupportVibrator) {\n this.mVibratorEx.setHwVibrator(\"haptic.control.time_scroll\");\n }\n if (this.mSoundPool == null || this.mSoundId == 0 || !this.mSoundLoadFinished) {\n Log.w(TAG, \"SoundPool is not initialized properly!\");\n } else {\n this.mSoundPool.play(this.mSoundId, 1.0f, 1.0f, 0, 0, 1.0f);\n }\n }",
"public boolean isSound() {\n\t\treturn true;\n\t}",
"public void playSound(SoundType type) {\n if (!gameController.getGameStatPanel().getUserData().isSoundDisabled()) soundMap.get(type).play();\n }",
"private void playAudio(int winLose)\t\t\t\t\t\t\t\n {\n // win\n if(winLose == 1)\n {\n String path = \"src/winningSound.wav\";\n Media media = new Media(new File(path).toURI().toString());\n\n mediaPlayer = new MediaPlayer(media);\n mediaPlayer.setCycleCount(1);\n mediaPlayer.setAutoPlay(true);\n }\n // lose\n else\n {\n String path = \"src/loserSound.wav\";\n Media media = new Media(new File(path).toURI().toString());\n mediaPlayer = new MediaPlayer(media);\n mediaPlayer.setCycleCount(1);\n mediaPlayer.setAutoPlay(true);\n }\n }",
"public void StartMusic(int music_id);",
"public void play(float pitch, float volume, boolean music) {\n\t\tif(!music)\n\t\t\tsound.playAsSoundEffect(pitch, volume * SoundStore.get().getSoundVolume(), false);\n\t\telse\n\t\t\tsound.playAsMusic(pitch, volume * SoundStore.get().getSoundVolume(), false);\n\t\tassert sound.isPlaying();\n\t\tstart = System.currentTimeMillis();\n\t\t\n\t\tthis.music = music;\n\t}",
"public static void play(SoundEffect soundEffect)\n\t{\n\t\t// Prevent the same sound from playing once per tick. This occurred because the mine explosion\n\t\t// lasts for multiple ticks in the world.\n\t\tif ((lastSoundPlayed1 != soundEffect && lastSoundPlayed2 != soundEffect) ||\n\t\t\tnextPlayTime < System.currentTimeMillis())\n\t\t{\n\t\t\tnextPlayTime = System.currentTimeMillis() + soundDelay;\n\t\t\tlastSoundPlayed2 = lastSoundPlayed1;\n\t\t\tlastSoundPlayed1 = soundEffect;\n\t\t\tsoundEffect.play(soundEffectVolume);\n\t\t}\n\t}",
"public void play(boolean audioOnly) {\n\t\tif (audioOnly)\n\t\t\tplay(true, false);\n\t\telse\n\t\t\tplay(false, true);\n\t}",
"public void playWinSounds(){\r\n try {\r\n File mFile = new File(Filepath3);\r\n if (mFile.exists()) {\r\n AudioInputStream audioInput4 = AudioSystem.getAudioInputStream(mFile);\r\n Clip clip4 = AudioSystem.getClip();\r\n clip4.open(audioInput4);\r\n FloatControl gainControl4 = (FloatControl) clip4.getControl(FloatControl.Type.MASTER_GAIN);\r\n gainControl4.setValue(-10.0f); //reduces the volume by 10 decibels\r\n clip4.start();\r\n } else {\r\n System.out.println(\"Music File not found\"); // will be thrown if music file is not in the file\r\n }\r\n } catch (Exception ex) {\r\n ex.printStackTrace();\r\n }\r\n }",
"@SideOnly(Side.CLIENT)\n protected void soundMagic(ResourceLocation activitySound) {\n if (getBaseMetaTileEntity().isActive()) {\n if (activitySoundLoop == null) {\n activitySoundLoop = new SoundLoop(activitySound, getBaseMetaTileEntity(), false, true);\n Minecraft.getMinecraft().getSoundHandler().playSound(activitySoundLoop);\n }\n } else {\n if (activitySoundLoop != null) {\n activitySoundLoop = null;\n }\n }\n }",
"public void play(Sound s, PlayMode mode) throws IOException {\n if (s != null) getClip(s).play(mode);\n }",
"protected void playParticle(){\n\t\teffectData.getPlayParticles().playParticles(effectData, effectData.getDisplayAt());\n\t}",
"public void playSoundFail() {\n\t\tfailSound.play();\n\t}",
"public void playSoundAt(IPos pos, String sound, float volume, float pitch);",
"public void startSound()\n \n {try\n { \n URL url = this.getClass().getClassLoader().getResource(\"Mario Kart Start 2.wav\");\n \n \n \n \n \n AudioInputStream audioIn = AudioSystem.getAudioInputStream(url);\n // Get a sound clip resource.\n startClip = AudioSystem.getClip();\n // Open audio clip and load samples from the audio input stream.\n startClip.open(audioIn); \n \n startClip.start();\n \n \n } \n catch (UnsupportedAudioFileException e)\n {\n e.printStackTrace();\n } \n catch (IOException e) \n {\n e.printStackTrace();\n } \n catch (LineUnavailableException e) \n {\n e.printStackTrace();\n } \n \n }",
"public static Action playSound(final InputStream sound) {\n return new Action() {\n @Override\n protected void perform(ActiveActor a) {\n //MP3.play(sound);\n }\n\n @Override\n public int getCost() {\n return 5;\n }\n\n @Override\n public boolean isExclusive() {\n return false;\n }\n\n @Override\n public Object getData() {\n return sound;\n }\n\n @Override\n public String toString() {\n return \"PlaySound(\" + (sound != null ? sound.toString() : \"null\") + \")\";\n }\n };\n }",
"public static void play(String w) {\n\n\t\ttry {\n\t\t\t// Open an audio input stream.\n\t\t\t//URL url = this.getClass().getClassLoader().getResource(wavMusicFile);\n\t\t\tURL url = new File(w).toURI().toURL();\n\t\t\tAudioInputStream audioIn = AudioSystem.getAudioInputStream(url);\n\t\t\t// Get a sound clip resource.\n\t\t\tClip c = AudioSystem.getClip();\n\t\t\t// Open audio clip and load samples from the audio input stream.\n\t\t\tc.open(audioIn);\n\t\t\tc.start();\n\t\t} catch (UnsupportedAudioFileException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (LineUnavailableException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"public static void music (String fileName)\r\n {\r\n\tAudioPlayer MGP = AudioPlayer.player;\r\n\tAudioStream BGM;\r\n\tAudioData MD;\r\n\r\n\tContinuousAudioDataStream loop = null;\r\n\r\n\ttry\r\n\t{\r\n\t InputStream test = new FileInputStream (\"lamarBackgroundMusic.wav\");\r\n\t BGM = new AudioStream (test);\r\n\t AudioPlayer.player.start (BGM);\r\n\r\n\t}\r\n\tcatch (FileNotFoundException e)\r\n\t{\r\n\t System.out.print (e.toString ());\r\n\t}\r\n\tcatch (IOException error)\r\n\t{\r\n\t System.out.print (error.toString ());\r\n\t}\r\n\tMGP.start (loop);\r\n }",
"static void PlaySound(File Sound)\n {\n try{\n Clip clip = AudioSystem.getClip();\n clip.open(AudioSystem.getAudioInputStream(Sound));\n clip.start();\n //BGM = new AudioStream(new FileInputStream(\"OST.WAV\"));\n //MD = BGM.getData();\n //loop = new ContinuousAudioDataStream(MD);\n }catch(Exception e) {}\n //MGP.start(loop); \n }",
"@Override\r\n public void show()\r\n {\r\n // De inmediato, ponemos en marcha una melodia\r\n if (!juego.getAdminComponentes().get(\"Audios/bgmusic06.ogg\", Music.class).isPlaying())\r\n {\r\n juego.getAdminComponentes().get(\"Audios/bgmusic06.ogg\", Music.class).play();\r\n juego.getAdminComponentes().get(\"Audios/bgmusic06.ogg\", Music.class).setLooping(true);\r\n }\r\n }",
"private static void playSound(String s) {\n try {\n Media hit = new Media(new File(s).toURI().toString());\n MediaPlayer mediaPlayer = new MediaPlayer(hit);\n mediaPlayer.play();\n } catch (Exception ex) {\n ex.printStackTrace();\n }\n }",
"public void play(URL paramURL, String paramString) {\n/* 435 */ AudioClip audioClip = getAudioClip(paramURL, paramString);\n/* 436 */ if (audioClip != null) {\n/* 437 */ audioClip.play();\n/* */ }\n/* */ }",
"private void playSound(String fileName) {\n\t\tAudioClip sound = JApplet.newAudioClip(getClass().getResource(fileName));\n\t\tsound.play();\n\t}",
"public boolean isAudio()\n {return false ;\n }",
"public void launchSound(String nomFichierAudio) {\n try {\n as = new AudioStream(new FileInputStream(nomFichierAudio));\n p.start(as);\n } catch (IOException err) {\n err.printStackTrace();\n }\n }",
"public static void hit_sound() {\n\t\tif (!hit1) {\n\t\t\thit1 = true;\n\t\t\tm_player_hit.setMediaTime(new Time(0));\n\t\t\tm_player_hit.start();\n\t\t} else if (!hit2) {\n\t\t\thit2 = true;\n\t\t\tm_player_hit2.setMediaTime(new Time(0));\n\t\t\tm_player_hit2.start();\n\t\t} else if (!hit3) {\n\t\t\thit3 = true;\n\t\t\tm_player_hit3.setMediaTime(new Time(0));\n\t\t\tm_player_hit3.start();\n\t\t} else if (!hit4) {\n\t\t\thit4 = true;\n\t\t\tm_player_hit4.setMediaTime(new Time(0));\n\t\t\tm_player_hit4.start();\n\t\t} else if (!hit5) {\n\t\t\thit5 = true;\n\t\t\tm_player_hit5.setMediaTime(new Time(0));\n\t\t\tm_player_hit5.start();\n\t\t} else {\n\t\t\thit1 = hit2 = hit3 = hit4 = hit5 = false;\n\t\t\tm_player_hit6.setMediaTime(new Time(0));\n\t\t\tm_player_hit6.start();\n\t\t}\n\n\t}",
"public void Play() {\n superPlaneGodMode = false;\r\n if (!musicPlaying)\r\n backgroundMusic.pause();\r\n if (musicPlaying)\r\n backgroundMusic.start();\r\n paused = false;\r\n }",
"public void play(String loopOption) {\n\t\ttry {\n\t\t\tthis.audioInput = AudioSystem.getAudioInputStream(this.music);\n\t\t\tclip.open(audioInput);\n\t\t\tclip.start();\n\t\t\tif (loopOption.equals(\"infinite\")) {\n\t\t\t\tthis.clip.loop(Clip.LOOP_CONTINUOUSLY);\n\t\t\t}\n\t\t} catch (UnsupportedAudioFileException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (LineUnavailableException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"public void playTriggerSound() {\n ScreenSpeakService service = ScreenSpeakService.getInstance();\n if (service != null) {\n service.getFeedbackController().playAuditory(R.raw.tutorial_trigger);\n }\n }",
"protected void playTheSound(int position) {\n if (mp != null) {\n mp.reset();\n mp.release();\n }\n mp = MediaPlayer.create(this, sons[position]);\n mp.start();\n }",
"public void StartSoundAtVolume(ISoundOrigin origin, int sound_id, int volume);",
"public void play() {\n\t\tplay(true, true);\n\t}",
"void playOnCondition(int soundIndex, boolean condition) {\n\t\tsounds.get(soundIndex).playOnCondition(condition);\n\t}",
"void play(final Context context, final int soundId, final OnCompletionPlayNextListener playNextListener);",
"public void play()\n\t{\n\t\tif (canPlay)\n\t\t{\n\t\t\tsong.play();\n\t\t\tsong.rewind();\n\t\t\tif (theSong == \"SG1\" || theSong == \"SG2\")\n\t\t\t\tcanPlay = false;\n\t\t}\n\t}",
"public void playSound(int sample, boolean looped) {\n\t\t\tm_soundManager.playSound(sample, looped);\n\t\t}",
"public void playDonkeySounds(){\r\n try {\r\n File mFile = new File(Filepath2);\r\n if (mFile.exists()) {\r\n AudioInputStream audioInput3 = AudioSystem.getAudioInputStream(mFile);\r\n Clip clip3 = AudioSystem.getClip();\r\n clip3.open(audioInput3);\r\n FloatControl gainControl3 = (FloatControl) clip3.getControl(FloatControl.Type.MASTER_GAIN);\r\n gainControl3.setValue(-10.0f); //reduces the volume by 10 decibels\r\n clip3.start();\r\n\r\n } else {\r\n System.out.println(\"Music File not found\"); // will be thrown if music file is not in the file\r\n }\r\n } catch (Exception ex) {\r\n ex.printStackTrace();\r\n }\r\n }",
"public void playLooped()\n {\n audioClip.loop(Clip.LOOP_CONTINUOUSLY);\n play();\n }",
"@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tsp3.play(sound_id3, 1.0F, 1.0F, 0, 0, 1.0F);\n\t\t\t}",
"public static void playPickupSound(){\n String musicFile = \"Sounds\\\\Pickup.mp3\";\n Media sound = new Media(new File(musicFile).toURI().toString());\n MediaPlayer mediaPlayer = new MediaPlayer(sound);\n mediaPlayer.setVolume(App.getVolume());\n mediaPlayer.play();\n }",
"@Override\r\n\tpublic String doSound() {\n\t\treturn null;\r\n\t}",
"public static void loadAudio()\n\t{\n\t\ttry\n\t\t{\n\t\t\tmusic = Applet.newAudioClip(new URL(\"file:\" + System.getProperty(\"user.dir\") + \"/sound/Pamgaea.wav\"));\n\t\t\tlaser = Applet.newAudioClip(new URL(\"file:\" + System.getProperty(\"user.dir\") + \"/sound/laser.wav\"));\n\t\t\tlaserContinuous = Applet.newAudioClip(new URL(\"file:\" + System.getProperty(\"user.dir\") + \"/sound/laser_continuous.wav\"));\n\t\t}\n\t\tcatch (Exception e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"public static void startMusic()\r\n\t{\r\n\t\tif ( musicPlayer == null )\r\n\t\t\tmusicPlayer = new MusicPlayer( \"Music2.mid\" );\r\n\t\telse\r\n\t\t\tmusicPlayer.play();\r\n\t}",
"public void playDeadSound() {\n\t\tAudioPlayer audio = AudioPlayer.getInstance();\n\t\taudio.playSound(MUSIC_FOLDER, DEAD);\n\t}",
"@Test\n\tpublic void playWAVTest() throws IllegalArgumentException, IllegalAccessException {\n\t\t\n\t\tif (Configuration.featureamp &&\n\t\t\t\tConfiguration.playengine &&\n\t\t\t\tConfiguration.choosefile &&\n\t\t\t\tConfiguration.wav &&\n\t\t\t\tConfiguration.skins &&\n\t\t\t\tConfiguration.light &&\n\t\t\t\tConfiguration.filesupport &&\n\t\t\t\tConfiguration.showtime &&\n\t\t\t\tConfiguration.tracktime) {\n\t\t\tstart();\n\t\t\tdemo.menuItemWithPath(\"Datei\", \"Datei \\u00F6ffnen\").click();\n\t\t\tdemo.fileChooser().setCurrentDirectory(new File(\"media/\"));\n\t\t\tFile file = new File(\"alarme.wav\");\n\t\t\tdemo.fileChooser().selectFile(file);\n\t\t\tdemo.fileChooser().approveButton().click();\n\t\t\tdemo.button(\"play\").click();\n\t\t\tJMenu menu = (JMenu) MemberModifier.field(Application.class, \"menu\").get(gui);\n\t\t\tassertEquals(menu.getName(), \"menu\");\n\t\t}\n\t\t\n\t}",
"public abstract void makeSound();",
"public static void playSound(String fileName, float volume) {\n\t\t\n\t\tif (Launcher.cHandler.soundEffectsToggle) {\n\t\t\ttry {\n\t\t\t\t// Load the audio file\n\t\t\t\tFile file = new File(\"./audio/\" + fileName + \".wav\");\n\t\t\t\t\n\t\t\t\tAudioInputStream audioIn = AudioSystem.getAudioInputStream(file);\n\t\t\t\t\n\t\t\t\t// Generate the sound clip\n\t\t\t\tClip soundClip = AudioSystem.getClip();\n\t\t\t\tsoundClip.open(audioIn);\n\t\t\t\t\n\t\t\t\t// Set volume\n\t\t\t\tif (volume < 0f || volume > 1f) {\n\t\t\t\t\tthrow new IllegalArgumentException(\"'\" + volume + \"' is not a valid volume.\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tFloatControl gain = (FloatControl) soundClip.getControl(FloatControl.Type.MASTER_GAIN); \n\t\t\t gain.setValue(20f * (float) Math.log10(volume));\n\t\t\t \n\t\t\t\t// Play the clip\n\t\t\t soundClip.start();\n\t\t\t\t\n\t\t\t} catch (UnsupportedAudioFileException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t} catch (LineUnavailableException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}",
"public void PauseSound();",
"private void playYouWinSound()\n {\n try\n {\n java.io.File soundFile = new java.io.File(\n \"C:\\\\Windows\\\\Media\\\\tada.wav\");\n javax.sound.sampled.AudioInputStream audioIn =\n javax.sound.sampled.AudioSystem.getAudioInputStream(\n soundFile);\n javax.sound.sampled.Clip clip =\n javax.sound.sampled.AudioSystem.getClip();\n\n clip.open(audioIn);\n clip.start();\n }\n catch (Exception ex)\n {\n System.out.println(ex);\n }\n }",
"public void playSound(InputStream access)\n {\n if(!mute)\n {\n try{\n InputStream bufferedIn = new BufferedInputStream(access);\n AudioInputStream audioIn = AudioSystem.getAudioInputStream(bufferedIn);\n Clip clip = AudioSystem.getClip();\n clip.open(audioIn);\n clip.start();\n }\n catch(UnsupportedAudioFileException | IOException | LineUnavailableException e1){\n System.out.println(\"Selected Audio File is not compatible/available.\");};\n }\n }",
"public void playSound ( Location location , Sound sound , SoundCategory category , float volume , float pitch ) {\n\t\texecute ( handle -> handle.playSound ( location , sound , category , volume , pitch ) );\n\t}",
"public void playMusic() {\n\t\tif (!isReverse) {\n\t\t\tif (!isWah && !isDistorted)\n\t\t\t\talSourcePlay(musicSourceIndex);\n\t\t\tif (isWah && isDistorted)\n\t\t\t\talSourcePlay(wahDistortSourceIndex);\n\t\t\telse if (isWah)\n\t\t\t\talSourcePlay(wahSourceIndex);\n\t\t\telse if (isDistorted)\n\t\t\t\talSourcePlay(distortSourceIndex);\n\t\t\tif (isFlanging) {\n\t\t\t\tif (!isWah && !isDistorted)\n\t\t\t\t\talSourcePlay(flangeSourceIndex);\n\t\t\t\tif (isWah && isDistorted)\n\t\t\t\t\talSourcePlay(wahDistortFlangeSourceIndex);\n\t\t\t\telse if (isWah)\n\t\t\t\t\talSourcePlay(wahFlangeSourceIndex);\n\t\t\t\telse if (isDistorted)\n\t\t\t\t\talSourcePlay(distortFlangeSourceIndex);\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tif (!isWah && !isDistorted)\n\t\t\t\talSourcePlay(reverseSourceIndex);\n\t\t\telse if (isWah && isDistorted)\n\t\t\t\talSourcePlay(revWahDistortSourceIndex);\n\t\t\telse if (isWah)\n\t\t\t\talSourcePlay(revWahSourceIndex);\n\t\t\telse if (isDistorted)\n\t\t\t\talSourcePlay(revDistortSourceIndex);\n\t\t\tif (isFlanging) {\n\t\t\t\tif (!isWah && !isDistorted)\n\t\t\t\t\talSourcePlay(revFlangeSourceIndex);\n\t\t\t\tif (isWah && isDistorted)\n\t\t\t\t\talSourcePlay(revWahDistortFlangeSourceIndex);\n\t\t\t\telse if (isWah)\n\t\t\t\t\talSourcePlay(revWahFlangeSourceIndex);\n\t\t\t\telse if (isDistorted)\n\t\t\t\t\talSourcePlay(revDistortFlangeSourceIndex);\n\t\t\t}\n\t\t}\n\t}",
"public static void playSound(Player p, Location loc, Sound sound, float pitch, float volume){\n p.playSound(loc, sound, volume, pitch);\n }"
] |
[
"0.7238583",
"0.70819986",
"0.6631349",
"0.66185176",
"0.6603952",
"0.6567662",
"0.65216416",
"0.6515953",
"0.64328516",
"0.638066",
"0.63596475",
"0.63451314",
"0.6332295",
"0.63035524",
"0.6286881",
"0.6271095",
"0.62643814",
"0.6202227",
"0.61985594",
"0.6186964",
"0.61747164",
"0.6172015",
"0.6159589",
"0.61445695",
"0.61395115",
"0.6131213",
"0.61274076",
"0.6124218",
"0.6122334",
"0.61093456",
"0.61089736",
"0.6107939",
"0.61023587",
"0.60777843",
"0.60602015",
"0.6045799",
"0.6038884",
"0.6029471",
"0.6022806",
"0.6022268",
"0.6019752",
"0.59965825",
"0.5991161",
"0.59857017",
"0.59683716",
"0.596576",
"0.59631526",
"0.59536767",
"0.59515595",
"0.5940535",
"0.59374845",
"0.5925391",
"0.5921875",
"0.5913224",
"0.5908569",
"0.5886563",
"0.58783066",
"0.5877191",
"0.5874602",
"0.5873084",
"0.5867106",
"0.5861823",
"0.58579046",
"0.58425826",
"0.5836947",
"0.5831028",
"0.5824654",
"0.58134925",
"0.5812033",
"0.5811414",
"0.58062875",
"0.5802903",
"0.57949215",
"0.57884336",
"0.57850194",
"0.57815915",
"0.5779391",
"0.57776845",
"0.57734823",
"0.5767732",
"0.57677233",
"0.5767573",
"0.5763996",
"0.5760568",
"0.5759287",
"0.57513213",
"0.57509744",
"0.574964",
"0.5748122",
"0.5744487",
"0.5740018",
"0.57339764",
"0.5728615",
"0.57280374",
"0.57255983",
"0.5713046",
"0.57093704",
"0.5708619",
"0.57056975",
"0.5701144",
"0.5700223"
] |
0.0
|
-1
|
Play the given audio effect if it exists
|
public void play(String s, Player p)
{
if(contains(s))
{
get(s).play(p);
}
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"private static void playEffect(Clip effect) {\n\n\t\tif (GameFrame.settingsPanel.effectsOn() && effect != null) {\n\t\t\teffect.start();\n\t\t\teffect.setFramePosition(0);\n\t\t}\n\n\t}",
"public void foodSound(){\n if (enableSound){\r\n\t clip.play();\r\n }\r\n\t\t\r\n\t}",
"private void play()\n {\n if(AudioDetector.getInstance().isNoAudio())\n {\n return;\n }\n\n stop();\n musicPlayer.play();\n }",
"private void play() {\n\t\tlog.finest(\"Playing sound\");\n\t\ttone.trigger();\n\t}",
"private void playAudio() {\r\n Play.au(audioFileName, false);\r\n }",
"public void play() {\n if (audio != null) {\n audio.play(sfxVolume);\n }\n }",
"public void StartSound(ISoundOrigin origin, sfxenum_t sound_id);",
"public static void playSoundEffect(String path) {\n Thread thread = new Thread(() -> {\n Player soundEffectPlayer = new Player();\n soundEffectPlayer.setSourceLocation(path);\n soundEffectPlayer.play();\n });\n thread.setDaemon(true);\n thread.start();\n }",
"public void StartSound(ISoundOrigin origin, int sound_id);",
"SoundEffect(final String soundEffectName) throws MediaException {\n audio = new AudioClip(Paths.get(SFX_PATH + soundEffectName).toUri().toString());\n }",
"public void playAudio() {\n\n }",
"public abstract String play(SoundLibrary library, String... sound);",
"private static void playAudio(String musicFile) {\n }",
"private void playSound() {\n if (isFlashOn) {\n mp = MediaPlayer.create(this, R.raw.light_switch_off);\n } else {\n mp = MediaPlayer.create(this, R.raw.light_switch_on);\n }\n mp.setOnCompletionListener(new MediaPlayer.OnCompletionListener() {\n\n @Override\n public void onCompletion(MediaPlayer mp) {\n // TODO Auto-generated method stub\n mp.release();\n }\n });\n mp.start();\n }",
"public void playThemeSound() {\n\t\tAudioPlayer audio = AudioPlayer.getInstance();\n\t\taudio.playSound(MUSIC_FOLDER, THEME);\n\t}",
"public void playAudio() {\n\t\tmusic[currentSong].stop();\n\t\tcurrentSong++;\n\t\tcurrentSong %= music.length;\n\t\tmusic[currentSong].play();\n\t}",
"public void ReproduceAudio() { \r\n\t\ttry {\r\n\t\t\t//en caso de que como nombre pongas \"undertale\" la musica sera diferente.\r\n\t\t\tif (Menu.jugador.equals(\"undertale\") || Menu.jugador.equals(\"Undertale\")) {\r\n\t\t\t\trepro.AbrirFichero(\"C:\\\\Temp\\\\Sonidos\\\\undertale.wav\");\r\n\t\t\t\t//emppieza la musica\r\n\t\t\t\trepro.Play();\r\n\t\t\t//musica por defecto\r\n\t\t\t} else {\r\n\t\t\t\trepro.AbrirFichero(\"C:\\\\Temp\\\\Sonidos\\\\tetris.mp3\");\r\n\t\t\t\trepro.Play();\r\n\t\t\t}\t\r\n\t\t} catch (Exception ex) {\r\n\t\t\tSystem.out.println(\"Error: \" + ex.getMessage());\r\n\t\t}\r\n\t}",
"private void playSound() {\n\t\tif (controllerVars.isLoaded() && !controllerVars.isPlays()) {\n\t\t\tcontrollerVars.getSoundPool().play(controllerVars.getSoundID(), controllerVars.getVolume(), controllerVars.getVolume(), 1, 0, 1f);\n\t\t\tcontrollerVars.COUNTER++;\n\t\t\t//Toast.makeText(act, \"Played sound\", Toast.LENGTH_SHORT).show();optional Playing message \n\t\t\tcontrollerVars.setPlays(true);\n\t\t\tonComplete(controllerVars.getMediaPlayer().getDuration());\n\t\t}\n\t\t//controllerVars.getMediaPlayer().start();\n\t\t//controllerVars.setPlays(true);\n\t}",
"public void playMusic() {\n\t\tthis.music.start();\n\t}",
"public static void playSound(){\r\n try{\r\n Clip clip = AudioSystem.getClip();\r\n clip.open(AudioSystem.getAudioInputStream(new File(\"Cheering.wav\")));\r\n clip.start();\r\n }\r\n catch (Exception exc){\r\n exc.printStackTrace(System.out);\r\n } \r\n }",
"@Override\n public void playSound(int soundId) {\n\n }",
"public void play(boolean music) {\n\t\tplay(1.0f, 1.0f, music);\n\t}",
"public void playAudio() {\n if (done==false)\n {\n file.play();\n }\n}",
"public static void playShootingSound(){\n String musicFile = \"Sounds\\\\Shoot.mp3\";\n Media sound = new Media(new File(musicFile).toURI().toString());\n MediaPlayer mediaPlayer = new MediaPlayer(sound);\n mediaPlayer.setVolume(App.getVolume());\n mediaPlayer.play();\n }",
"PlaySound getSound();",
"public void play() {\n\t\ttry {\n\t\t\taudioInput = AudioSystem.getAudioInputStream(this.music);\n\t\t\tclip.open(audioInput);\n\t\t\tclip.start();\n\t\t} catch (UnsupportedAudioFileException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (LineUnavailableException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"public void playSoundtrack() {\n if(this.musicEnabled) {\n try {\n Clip soundtrackClip = AudioSystem.getClip();\n AudioInputStream inputStream = AudioSystem.getAudioInputStream(new BufferedInputStream(Assets.soundTrack));\n soundtrackClip.open(inputStream);\n soundtrackClip.start();\n soundtrackClip.loop(Clip.LOOP_CONTINUOUSLY);\n } catch (Exception e) {\n e.printStackTrace();\n System.err.println(e.getMessage());\n }\n }\n }",
"private void gameSound(int attack){\n switch (attack){\n case 1:\n mediaPlayer = MediaPlayer.create(Activity_Game.this, R.raw.sound_lightattack);\n break;\n case 2:\n mediaPlayer = MediaPlayer.create(Activity_Game.this, R.raw.sound_strongattack);\n break;\n case 3:\n mediaPlayer = MediaPlayer.create(Activity_Game.this, R.raw.sound_brutalattack);\n break;\n }\n mediaPlayer.start();\n }",
"public void play() {\n\t\tif(hasAudioLoaded()) {\n\t\t\tcurrentClip.start();\n\t\t\tisPlaying = true;\n\t\t}\n\t}",
"public void playAmbientSound() {\n if (!this.isClosed()) {\n super.playAmbientSound();\n }\n\n }",
"public void playMusic() {\r\n try {\r\n File mFile = new File(Filepath);\r\n if (mFile.exists()) {\r\n AudioInputStream audioInput = AudioSystem.getAudioInputStream(mFile);\r\n Clip clip = AudioSystem.getClip();\r\n clip.open(audioInput);\r\n FloatControl gainControl = (FloatControl) clip.getControl(FloatControl.Type.MASTER_GAIN);\r\n gainControl.setValue(-25.0f); //reduces the volume by 25 decibels\r\n clip.start();\r\n clip.loop(Clip.LOOP_CONTINUOUSLY);\r\n\r\n } else {\r\n System.out.println(\"Music File not found\"); // will be thrown if music file is not in the file\r\n }\r\n } catch (Exception ex) {\r\n ex.printStackTrace();\r\n }\r\n }",
"public void playLocal(String audiofile);",
"public void loopSound(boolean commence) {\n if ( commence ) {\n clip.setFramePosition(0);\n clip.loop( Clip.LOOP_CONTINUOUSLY );\n } else {\n clip.stop();\n }\n }",
"public void play(URL paramURL) {\n/* 419 */ AudioClip audioClip = getAudioClip(paramURL);\n/* 420 */ if (audioClip != null) {\n/* 421 */ audioClip.play();\n/* */ }\n/* */ }",
"public void startSound() {\n\t\ttry {\n\t\t\t// Open an audio input stream.\n\t\t\tURL url = this.getClass().getResource(\"/\"+wavMusicFile);\n\t\t\t//System.out.println(\"url: \" + url);\n\t\t\tAudioInputStream audioIn = AudioSystem.getAudioInputStream(url);\n\t\t\t// Get a sound clip resource.\n\t\t\tclip = AudioSystem.getClip();\n\t\t\t// Open audio clip and load samples from the audio input stream.\n\t\t\tclip.open(audioIn);\n\t\t\tclip.start();\n\t\t} catch (UnsupportedAudioFileException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (LineUnavailableException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"public int playAsEffectAt(float pitch, float volume, float x, float y, float z) {\n if (!isStream) {\n return AudioController.INSTANCE.playAsSoundAt(buffer, pitch, volume, false, x, y, z);\n } else {\n System.err.println(\"It is not advised to play a stream as a sound effect\");\n return AudioController.INSTANCE.playAsStreamAt(path, pitch, volume, false, x, y, z);\n }\n }",
"private void playHintAudio() {\n AudioManager audioManager = (AudioManager)getContext().getSystemService(Context.AUDIO_SERVICE);\n int mode = audioManager.getRingerMode();\n Log.d(TAG,\"mode = \" + mode);\n\n if(mode != AudioManager.RINGER_MODE_SILENT && mode != AudioManager.RINGER_MODE_VIBRATE) {\n // prize modify for bug 44603 by zhaojian 20171205 start\n mMediaPlayer = MediaPlayer.create(getContext(),R.raw.hb_sound2);\n Log.d(\"debug\",\"isNotifySound = \" + getConfig().isNotifySound());\n if(getConfig().isNotifySound()) {\n mMediaPlayer.setOnPreparedListener(new MediaPlayer.OnPreparedListener() {\n @Override\n public void onPrepared(MediaPlayer mp) {\n mp.start();\n }\n });\n mMediaPlayer.setOnCompletionListener(new MediaPlayer.OnCompletionListener() {\n @Override\n public void onCompletion(MediaPlayer mp) {\n mp.release();\n }\n });\n mMediaPlayer.start();\n }\n // prize modify for bug 44603 by zhaojian 20171205 end\n }\n }",
"public void continueSound() {\n\t\tclip.start();\n\t}",
"public void play(MediaPlayer choice) {\n if (choice == background) {\n if (!background2.isPlaying() && levelCtrl.level >= levelChange) {\n background2.setVolume(volume, volume);\n background2.start();\n }\n else if (!background.isPlaying()) {\n background.setVolume(volume, volume);\n background.start();\n }\n }\n else if (!choice.isPlaying()) {\n choice.setVolume(volume, volume);\n choice.start();\n }\n }",
"public void playSound() {\n\t\tmediaPlayer.play();\n\t}",
"@Override\n\tpublic void playLivingSound() {\n\t\tgetSoundManager().playLivingSound();\n\t}",
"public void play() {\n\t\tint focusRequestResult = mAudioManager.requestAudioFocus(mOuterEventsListener, AudioManager.STREAM_MUSIC,\n\t\t\t\tAudioManager.AUDIOFOCUS_GAIN);\n\n\t\tif (PrefManager.isIgnoreAudioFocus()\n\t\t\t\t|| focusRequestResult == AudioManager.AUDIOFOCUS_REQUEST_GRANTED) {\n\t\t\tinternalPlay();\n\t\t} else {\n\t\t\terror(Error.AUDIO_FOCUS_ERROR);\n\t\t}\n\t}",
"public void playMusic() {\n\t\ttry {\n\t\t\tsoundManager.playMusic(\"bgroundmusic\");\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\t}",
"SoundEffect(String n) {\n\t\ttry{\n\t\t\tURL url = this.getClass().getClassLoader().getResource(n); //Create url with filename\n\t\t\tAudioInputStream audioInputStream = AudioSystem.getAudioInputStream(url); //Create AudioInputStream with url\n\t\t\tclip = AudioSystem.getClip(); //Assign the wav to clip\n\t\t\tclip.open(audioInputStream); //Open the clip\n\t\t}\n\t\tcatch (UnsupportedAudioFileException e) {\n\t\t\te.printStackTrace(); //Print stack trace for debugging\n\t\t}\n\t\tcatch (IOException e) {\n\t\t\te.printStackTrace(); //Print stack trace for debugging\n\t\t}\n\t\tcatch (LineUnavailableException e) {\n\t\t\te.printStackTrace(); //Print stack trace for debugging\n\t\t}\n\t}",
"public void PlaySound(Context context) {\r\n\t\tif (!this.mp.isPlaying()) {\r\n\t\t\tmp.start();\r\n\t\t}\r\n\t}",
"private void play() {\n /** Memanggil File MP3 \"indonesiaraya.mp3\" */\n try {\n mp.prepare();\n } catch (IllegalStateException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n /** Menjalankan Audio */\n mp.start();\n\n /** Penanganan Ketika Suara Berakhir */\n mp.setOnCompletionListener(new OnCompletionListener() {\n @Override\n public void onCompletion(MediaPlayer mp) {\n stateAwal();\n }\n });\n }",
"@Override\r\n protected void playGameStartAudio() {\n\taudio.playClip();\r\n }",
"private void playSound(String sound) {\r\n try {\r\n BufferedInputStream soundFileStream = new BufferedInputStream(this\r\n .getClass().getResourceAsStream(sound));\r\n AudioInputStream audioInputStream = AudioSystem\r\n .getAudioInputStream(soundFileStream);\r\n AudioFormat audioFormat = audioInputStream.getFormat();\r\n DataLine.Info dataLineInfo = new DataLine.Info(Clip.class, audioFormat);\r\n Clip clip = (Clip) AudioSystem.getLine(dataLineInfo);\r\n clip.open(audioInputStream);\r\n clip.start();\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n }\r\n }",
"public void playSound() {\n if (this.mIsSupportVibrator) {\n this.mVibratorEx.setHwVibrator(\"haptic.control.time_scroll\");\n }\n if (this.mSoundPool == null || this.mSoundId == 0 || !this.mSoundLoadFinished) {\n Log.w(TAG, \"SoundPool is not initialized properly!\");\n } else {\n this.mSoundPool.play(this.mSoundId, 1.0f, 1.0f, 0, 0, 1.0f);\n }\n }",
"public boolean isSound() {\n\t\treturn true;\n\t}",
"public void playSound(SoundType type) {\n if (!gameController.getGameStatPanel().getUserData().isSoundDisabled()) soundMap.get(type).play();\n }",
"private void playAudio(int winLose)\t\t\t\t\t\t\t\n {\n // win\n if(winLose == 1)\n {\n String path = \"src/winningSound.wav\";\n Media media = new Media(new File(path).toURI().toString());\n\n mediaPlayer = new MediaPlayer(media);\n mediaPlayer.setCycleCount(1);\n mediaPlayer.setAutoPlay(true);\n }\n // lose\n else\n {\n String path = \"src/loserSound.wav\";\n Media media = new Media(new File(path).toURI().toString());\n mediaPlayer = new MediaPlayer(media);\n mediaPlayer.setCycleCount(1);\n mediaPlayer.setAutoPlay(true);\n }\n }",
"public void StartMusic(int music_id);",
"public void play(float pitch, float volume, boolean music) {\n\t\tif(!music)\n\t\t\tsound.playAsSoundEffect(pitch, volume * SoundStore.get().getSoundVolume(), false);\n\t\telse\n\t\t\tsound.playAsMusic(pitch, volume * SoundStore.get().getSoundVolume(), false);\n\t\tassert sound.isPlaying();\n\t\tstart = System.currentTimeMillis();\n\t\t\n\t\tthis.music = music;\n\t}",
"public static void play(SoundEffect soundEffect)\n\t{\n\t\t// Prevent the same sound from playing once per tick. This occurred because the mine explosion\n\t\t// lasts for multiple ticks in the world.\n\t\tif ((lastSoundPlayed1 != soundEffect && lastSoundPlayed2 != soundEffect) ||\n\t\t\tnextPlayTime < System.currentTimeMillis())\n\t\t{\n\t\t\tnextPlayTime = System.currentTimeMillis() + soundDelay;\n\t\t\tlastSoundPlayed2 = lastSoundPlayed1;\n\t\t\tlastSoundPlayed1 = soundEffect;\n\t\t\tsoundEffect.play(soundEffectVolume);\n\t\t}\n\t}",
"public void play(boolean audioOnly) {\n\t\tif (audioOnly)\n\t\t\tplay(true, false);\n\t\telse\n\t\t\tplay(false, true);\n\t}",
"public void playWinSounds(){\r\n try {\r\n File mFile = new File(Filepath3);\r\n if (mFile.exists()) {\r\n AudioInputStream audioInput4 = AudioSystem.getAudioInputStream(mFile);\r\n Clip clip4 = AudioSystem.getClip();\r\n clip4.open(audioInput4);\r\n FloatControl gainControl4 = (FloatControl) clip4.getControl(FloatControl.Type.MASTER_GAIN);\r\n gainControl4.setValue(-10.0f); //reduces the volume by 10 decibels\r\n clip4.start();\r\n } else {\r\n System.out.println(\"Music File not found\"); // will be thrown if music file is not in the file\r\n }\r\n } catch (Exception ex) {\r\n ex.printStackTrace();\r\n }\r\n }",
"@SideOnly(Side.CLIENT)\n protected void soundMagic(ResourceLocation activitySound) {\n if (getBaseMetaTileEntity().isActive()) {\n if (activitySoundLoop == null) {\n activitySoundLoop = new SoundLoop(activitySound, getBaseMetaTileEntity(), false, true);\n Minecraft.getMinecraft().getSoundHandler().playSound(activitySoundLoop);\n }\n } else {\n if (activitySoundLoop != null) {\n activitySoundLoop = null;\n }\n }\n }",
"public void play(Sound s, PlayMode mode) throws IOException {\n if (s != null) getClip(s).play(mode);\n }",
"protected void playParticle(){\n\t\teffectData.getPlayParticles().playParticles(effectData, effectData.getDisplayAt());\n\t}",
"public void playSoundFail() {\n\t\tfailSound.play();\n\t}",
"public void playSoundAt(IPos pos, String sound, float volume, float pitch);",
"public void startSound()\n \n {try\n { \n URL url = this.getClass().getClassLoader().getResource(\"Mario Kart Start 2.wav\");\n \n \n \n \n \n AudioInputStream audioIn = AudioSystem.getAudioInputStream(url);\n // Get a sound clip resource.\n startClip = AudioSystem.getClip();\n // Open audio clip and load samples from the audio input stream.\n startClip.open(audioIn); \n \n startClip.start();\n \n \n } \n catch (UnsupportedAudioFileException e)\n {\n e.printStackTrace();\n } \n catch (IOException e) \n {\n e.printStackTrace();\n } \n catch (LineUnavailableException e) \n {\n e.printStackTrace();\n } \n \n }",
"public static Action playSound(final InputStream sound) {\n return new Action() {\n @Override\n protected void perform(ActiveActor a) {\n //MP3.play(sound);\n }\n\n @Override\n public int getCost() {\n return 5;\n }\n\n @Override\n public boolean isExclusive() {\n return false;\n }\n\n @Override\n public Object getData() {\n return sound;\n }\n\n @Override\n public String toString() {\n return \"PlaySound(\" + (sound != null ? sound.toString() : \"null\") + \")\";\n }\n };\n }",
"public static void play(String w) {\n\n\t\ttry {\n\t\t\t// Open an audio input stream.\n\t\t\t//URL url = this.getClass().getClassLoader().getResource(wavMusicFile);\n\t\t\tURL url = new File(w).toURI().toURL();\n\t\t\tAudioInputStream audioIn = AudioSystem.getAudioInputStream(url);\n\t\t\t// Get a sound clip resource.\n\t\t\tClip c = AudioSystem.getClip();\n\t\t\t// Open audio clip and load samples from the audio input stream.\n\t\t\tc.open(audioIn);\n\t\t\tc.start();\n\t\t} catch (UnsupportedAudioFileException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (LineUnavailableException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"public static void music (String fileName)\r\n {\r\n\tAudioPlayer MGP = AudioPlayer.player;\r\n\tAudioStream BGM;\r\n\tAudioData MD;\r\n\r\n\tContinuousAudioDataStream loop = null;\r\n\r\n\ttry\r\n\t{\r\n\t InputStream test = new FileInputStream (\"lamarBackgroundMusic.wav\");\r\n\t BGM = new AudioStream (test);\r\n\t AudioPlayer.player.start (BGM);\r\n\r\n\t}\r\n\tcatch (FileNotFoundException e)\r\n\t{\r\n\t System.out.print (e.toString ());\r\n\t}\r\n\tcatch (IOException error)\r\n\t{\r\n\t System.out.print (error.toString ());\r\n\t}\r\n\tMGP.start (loop);\r\n }",
"static void PlaySound(File Sound)\n {\n try{\n Clip clip = AudioSystem.getClip();\n clip.open(AudioSystem.getAudioInputStream(Sound));\n clip.start();\n //BGM = new AudioStream(new FileInputStream(\"OST.WAV\"));\n //MD = BGM.getData();\n //loop = new ContinuousAudioDataStream(MD);\n }catch(Exception e) {}\n //MGP.start(loop); \n }",
"@Override\r\n public void show()\r\n {\r\n // De inmediato, ponemos en marcha una melodia\r\n if (!juego.getAdminComponentes().get(\"Audios/bgmusic06.ogg\", Music.class).isPlaying())\r\n {\r\n juego.getAdminComponentes().get(\"Audios/bgmusic06.ogg\", Music.class).play();\r\n juego.getAdminComponentes().get(\"Audios/bgmusic06.ogg\", Music.class).setLooping(true);\r\n }\r\n }",
"private static void playSound(String s) {\n try {\n Media hit = new Media(new File(s).toURI().toString());\n MediaPlayer mediaPlayer = new MediaPlayer(hit);\n mediaPlayer.play();\n } catch (Exception ex) {\n ex.printStackTrace();\n }\n }",
"public void play(URL paramURL, String paramString) {\n/* 435 */ AudioClip audioClip = getAudioClip(paramURL, paramString);\n/* 436 */ if (audioClip != null) {\n/* 437 */ audioClip.play();\n/* */ }\n/* */ }",
"private void playSound(String fileName) {\n\t\tAudioClip sound = JApplet.newAudioClip(getClass().getResource(fileName));\n\t\tsound.play();\n\t}",
"public boolean isAudio()\n {return false ;\n }",
"public void launchSound(String nomFichierAudio) {\n try {\n as = new AudioStream(new FileInputStream(nomFichierAudio));\n p.start(as);\n } catch (IOException err) {\n err.printStackTrace();\n }\n }",
"public static void hit_sound() {\n\t\tif (!hit1) {\n\t\t\thit1 = true;\n\t\t\tm_player_hit.setMediaTime(new Time(0));\n\t\t\tm_player_hit.start();\n\t\t} else if (!hit2) {\n\t\t\thit2 = true;\n\t\t\tm_player_hit2.setMediaTime(new Time(0));\n\t\t\tm_player_hit2.start();\n\t\t} else if (!hit3) {\n\t\t\thit3 = true;\n\t\t\tm_player_hit3.setMediaTime(new Time(0));\n\t\t\tm_player_hit3.start();\n\t\t} else if (!hit4) {\n\t\t\thit4 = true;\n\t\t\tm_player_hit4.setMediaTime(new Time(0));\n\t\t\tm_player_hit4.start();\n\t\t} else if (!hit5) {\n\t\t\thit5 = true;\n\t\t\tm_player_hit5.setMediaTime(new Time(0));\n\t\t\tm_player_hit5.start();\n\t\t} else {\n\t\t\thit1 = hit2 = hit3 = hit4 = hit5 = false;\n\t\t\tm_player_hit6.setMediaTime(new Time(0));\n\t\t\tm_player_hit6.start();\n\t\t}\n\n\t}",
"public void Play() {\n superPlaneGodMode = false;\r\n if (!musicPlaying)\r\n backgroundMusic.pause();\r\n if (musicPlaying)\r\n backgroundMusic.start();\r\n paused = false;\r\n }",
"public void play(String loopOption) {\n\t\ttry {\n\t\t\tthis.audioInput = AudioSystem.getAudioInputStream(this.music);\n\t\t\tclip.open(audioInput);\n\t\t\tclip.start();\n\t\t\tif (loopOption.equals(\"infinite\")) {\n\t\t\t\tthis.clip.loop(Clip.LOOP_CONTINUOUSLY);\n\t\t\t}\n\t\t} catch (UnsupportedAudioFileException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (LineUnavailableException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"public void playTriggerSound() {\n ScreenSpeakService service = ScreenSpeakService.getInstance();\n if (service != null) {\n service.getFeedbackController().playAuditory(R.raw.tutorial_trigger);\n }\n }",
"protected void playTheSound(int position) {\n if (mp != null) {\n mp.reset();\n mp.release();\n }\n mp = MediaPlayer.create(this, sons[position]);\n mp.start();\n }",
"public void StartSoundAtVolume(ISoundOrigin origin, int sound_id, int volume);",
"public void play() {\n\t\tplay(true, true);\n\t}",
"void playOnCondition(int soundIndex, boolean condition) {\n\t\tsounds.get(soundIndex).playOnCondition(condition);\n\t}",
"void play(final Context context, final int soundId, final OnCompletionPlayNextListener playNextListener);",
"public void play()\n\t{\n\t\tif (canPlay)\n\t\t{\n\t\t\tsong.play();\n\t\t\tsong.rewind();\n\t\t\tif (theSong == \"SG1\" || theSong == \"SG2\")\n\t\t\t\tcanPlay = false;\n\t\t}\n\t}",
"public void playSound(int sample, boolean looped) {\n\t\t\tm_soundManager.playSound(sample, looped);\n\t\t}",
"public void playDonkeySounds(){\r\n try {\r\n File mFile = new File(Filepath2);\r\n if (mFile.exists()) {\r\n AudioInputStream audioInput3 = AudioSystem.getAudioInputStream(mFile);\r\n Clip clip3 = AudioSystem.getClip();\r\n clip3.open(audioInput3);\r\n FloatControl gainControl3 = (FloatControl) clip3.getControl(FloatControl.Type.MASTER_GAIN);\r\n gainControl3.setValue(-10.0f); //reduces the volume by 10 decibels\r\n clip3.start();\r\n\r\n } else {\r\n System.out.println(\"Music File not found\"); // will be thrown if music file is not in the file\r\n }\r\n } catch (Exception ex) {\r\n ex.printStackTrace();\r\n }\r\n }",
"public void playLooped()\n {\n audioClip.loop(Clip.LOOP_CONTINUOUSLY);\n play();\n }",
"@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tsp3.play(sound_id3, 1.0F, 1.0F, 0, 0, 1.0F);\n\t\t\t}",
"public static void playPickupSound(){\n String musicFile = \"Sounds\\\\Pickup.mp3\";\n Media sound = new Media(new File(musicFile).toURI().toString());\n MediaPlayer mediaPlayer = new MediaPlayer(sound);\n mediaPlayer.setVolume(App.getVolume());\n mediaPlayer.play();\n }",
"@Override\r\n\tpublic String doSound() {\n\t\treturn null;\r\n\t}",
"public static void loadAudio()\n\t{\n\t\ttry\n\t\t{\n\t\t\tmusic = Applet.newAudioClip(new URL(\"file:\" + System.getProperty(\"user.dir\") + \"/sound/Pamgaea.wav\"));\n\t\t\tlaser = Applet.newAudioClip(new URL(\"file:\" + System.getProperty(\"user.dir\") + \"/sound/laser.wav\"));\n\t\t\tlaserContinuous = Applet.newAudioClip(new URL(\"file:\" + System.getProperty(\"user.dir\") + \"/sound/laser_continuous.wav\"));\n\t\t}\n\t\tcatch (Exception e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"public static void startMusic()\r\n\t{\r\n\t\tif ( musicPlayer == null )\r\n\t\t\tmusicPlayer = new MusicPlayer( \"Music2.mid\" );\r\n\t\telse\r\n\t\t\tmusicPlayer.play();\r\n\t}",
"public void playDeadSound() {\n\t\tAudioPlayer audio = AudioPlayer.getInstance();\n\t\taudio.playSound(MUSIC_FOLDER, DEAD);\n\t}",
"@Test\n\tpublic void playWAVTest() throws IllegalArgumentException, IllegalAccessException {\n\t\t\n\t\tif (Configuration.featureamp &&\n\t\t\t\tConfiguration.playengine &&\n\t\t\t\tConfiguration.choosefile &&\n\t\t\t\tConfiguration.wav &&\n\t\t\t\tConfiguration.skins &&\n\t\t\t\tConfiguration.light &&\n\t\t\t\tConfiguration.filesupport &&\n\t\t\t\tConfiguration.showtime &&\n\t\t\t\tConfiguration.tracktime) {\n\t\t\tstart();\n\t\t\tdemo.menuItemWithPath(\"Datei\", \"Datei \\u00F6ffnen\").click();\n\t\t\tdemo.fileChooser().setCurrentDirectory(new File(\"media/\"));\n\t\t\tFile file = new File(\"alarme.wav\");\n\t\t\tdemo.fileChooser().selectFile(file);\n\t\t\tdemo.fileChooser().approveButton().click();\n\t\t\tdemo.button(\"play\").click();\n\t\t\tJMenu menu = (JMenu) MemberModifier.field(Application.class, \"menu\").get(gui);\n\t\t\tassertEquals(menu.getName(), \"menu\");\n\t\t}\n\t\t\n\t}",
"public abstract void makeSound();",
"public static void playSound(String fileName, float volume) {\n\t\t\n\t\tif (Launcher.cHandler.soundEffectsToggle) {\n\t\t\ttry {\n\t\t\t\t// Load the audio file\n\t\t\t\tFile file = new File(\"./audio/\" + fileName + \".wav\");\n\t\t\t\t\n\t\t\t\tAudioInputStream audioIn = AudioSystem.getAudioInputStream(file);\n\t\t\t\t\n\t\t\t\t// Generate the sound clip\n\t\t\t\tClip soundClip = AudioSystem.getClip();\n\t\t\t\tsoundClip.open(audioIn);\n\t\t\t\t\n\t\t\t\t// Set volume\n\t\t\t\tif (volume < 0f || volume > 1f) {\n\t\t\t\t\tthrow new IllegalArgumentException(\"'\" + volume + \"' is not a valid volume.\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tFloatControl gain = (FloatControl) soundClip.getControl(FloatControl.Type.MASTER_GAIN); \n\t\t\t gain.setValue(20f * (float) Math.log10(volume));\n\t\t\t \n\t\t\t\t// Play the clip\n\t\t\t soundClip.start();\n\t\t\t\t\n\t\t\t} catch (UnsupportedAudioFileException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t} catch (LineUnavailableException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}",
"public void PauseSound();",
"private void playYouWinSound()\n {\n try\n {\n java.io.File soundFile = new java.io.File(\n \"C:\\\\Windows\\\\Media\\\\tada.wav\");\n javax.sound.sampled.AudioInputStream audioIn =\n javax.sound.sampled.AudioSystem.getAudioInputStream(\n soundFile);\n javax.sound.sampled.Clip clip =\n javax.sound.sampled.AudioSystem.getClip();\n\n clip.open(audioIn);\n clip.start();\n }\n catch (Exception ex)\n {\n System.out.println(ex);\n }\n }",
"public void playSound(InputStream access)\n {\n if(!mute)\n {\n try{\n InputStream bufferedIn = new BufferedInputStream(access);\n AudioInputStream audioIn = AudioSystem.getAudioInputStream(bufferedIn);\n Clip clip = AudioSystem.getClip();\n clip.open(audioIn);\n clip.start();\n }\n catch(UnsupportedAudioFileException | IOException | LineUnavailableException e1){\n System.out.println(\"Selected Audio File is not compatible/available.\");};\n }\n }",
"public void playSound ( Location location , Sound sound , SoundCategory category , float volume , float pitch ) {\n\t\texecute ( handle -> handle.playSound ( location , sound , category , volume , pitch ) );\n\t}",
"public void playMusic() {\n\t\tif (!isReverse) {\n\t\t\tif (!isWah && !isDistorted)\n\t\t\t\talSourcePlay(musicSourceIndex);\n\t\t\tif (isWah && isDistorted)\n\t\t\t\talSourcePlay(wahDistortSourceIndex);\n\t\t\telse if (isWah)\n\t\t\t\talSourcePlay(wahSourceIndex);\n\t\t\telse if (isDistorted)\n\t\t\t\talSourcePlay(distortSourceIndex);\n\t\t\tif (isFlanging) {\n\t\t\t\tif (!isWah && !isDistorted)\n\t\t\t\t\talSourcePlay(flangeSourceIndex);\n\t\t\t\tif (isWah && isDistorted)\n\t\t\t\t\talSourcePlay(wahDistortFlangeSourceIndex);\n\t\t\t\telse if (isWah)\n\t\t\t\t\talSourcePlay(wahFlangeSourceIndex);\n\t\t\t\telse if (isDistorted)\n\t\t\t\t\talSourcePlay(distortFlangeSourceIndex);\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tif (!isWah && !isDistorted)\n\t\t\t\talSourcePlay(reverseSourceIndex);\n\t\t\telse if (isWah && isDistorted)\n\t\t\t\talSourcePlay(revWahDistortSourceIndex);\n\t\t\telse if (isWah)\n\t\t\t\talSourcePlay(revWahSourceIndex);\n\t\t\telse if (isDistorted)\n\t\t\t\talSourcePlay(revDistortSourceIndex);\n\t\t\tif (isFlanging) {\n\t\t\t\tif (!isWah && !isDistorted)\n\t\t\t\t\talSourcePlay(revFlangeSourceIndex);\n\t\t\t\tif (isWah && isDistorted)\n\t\t\t\t\talSourcePlay(revWahDistortFlangeSourceIndex);\n\t\t\t\telse if (isWah)\n\t\t\t\t\talSourcePlay(revWahFlangeSourceIndex);\n\t\t\t\telse if (isDistorted)\n\t\t\t\t\talSourcePlay(revDistortFlangeSourceIndex);\n\t\t\t}\n\t\t}\n\t}",
"public static void playSound(Player p, Location loc, Sound sound, float pitch, float volume){\n p.playSound(loc, sound, volume, pitch);\n }"
] |
[
"0.7238583",
"0.70819986",
"0.6631349",
"0.66185176",
"0.6603952",
"0.6567662",
"0.65216416",
"0.6515953",
"0.64328516",
"0.638066",
"0.63596475",
"0.63451314",
"0.6332295",
"0.63035524",
"0.6286881",
"0.6271095",
"0.62643814",
"0.6202227",
"0.61985594",
"0.6186964",
"0.61747164",
"0.6172015",
"0.6159589",
"0.61445695",
"0.61395115",
"0.6131213",
"0.61274076",
"0.6124218",
"0.6122334",
"0.61093456",
"0.61089736",
"0.6107939",
"0.61023587",
"0.60777843",
"0.60602015",
"0.6045799",
"0.6038884",
"0.6029471",
"0.6022806",
"0.6022268",
"0.6019752",
"0.59965825",
"0.5991161",
"0.59857017",
"0.59683716",
"0.596576",
"0.59631526",
"0.59536767",
"0.59515595",
"0.5940535",
"0.59374845",
"0.5925391",
"0.5921875",
"0.5913224",
"0.5908569",
"0.5886563",
"0.58783066",
"0.5877191",
"0.5874602",
"0.5873084",
"0.5867106",
"0.5861823",
"0.58579046",
"0.58425826",
"0.5836947",
"0.5831028",
"0.5824654",
"0.58134925",
"0.5812033",
"0.5811414",
"0.58062875",
"0.5802903",
"0.57949215",
"0.57884336",
"0.57850194",
"0.57815915",
"0.5779391",
"0.57776845",
"0.57734823",
"0.5767732",
"0.57677233",
"0.5767573",
"0.5763996",
"0.5760568",
"0.5759287",
"0.57513213",
"0.57509744",
"0.574964",
"0.5748122",
"0.5744487",
"0.5740018",
"0.57339764",
"0.5728615",
"0.57280374",
"0.57255983",
"0.5713046",
"0.57093704",
"0.5708619",
"0.57056975",
"0.5701144",
"0.5700223"
] |
0.0
|
-1
|
Play the audio effect if it exists
|
public void play(String s, Player p, Location l)
{
if(contains(s))
{
get(s).play(p);
}
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public void foodSound(){\n if (enableSound){\r\n\t clip.play();\r\n }\r\n\t\t\r\n\t}",
"private void play()\n {\n if(AudioDetector.getInstance().isNoAudio())\n {\n return;\n }\n\n stop();\n musicPlayer.play();\n }",
"private void playAudio() {\r\n Play.au(audioFileName, false);\r\n }",
"public void play() {\n if (audio != null) {\n audio.play(sfxVolume);\n }\n }",
"private void play() {\n\t\tlog.finest(\"Playing sound\");\n\t\ttone.trigger();\n\t}",
"private static void playEffect(Clip effect) {\n\n\t\tif (GameFrame.settingsPanel.effectsOn() && effect != null) {\n\t\t\teffect.start();\n\t\t\teffect.setFramePosition(0);\n\t\t}\n\n\t}",
"public void playAudio() {\n\n }",
"private void playSound() {\n if (isFlashOn) {\n mp = MediaPlayer.create(this, R.raw.light_switch_off);\n } else {\n mp = MediaPlayer.create(this, R.raw.light_switch_on);\n }\n mp.setOnCompletionListener(new MediaPlayer.OnCompletionListener() {\n\n @Override\n public void onCompletion(MediaPlayer mp) {\n // TODO Auto-generated method stub\n mp.release();\n }\n });\n mp.start();\n }",
"public void play() {\n\t\tif(hasAudioLoaded()) {\n\t\t\tcurrentClip.start();\n\t\t\tisPlaying = true;\n\t\t}\n\t}",
"public void playThemeSound() {\n\t\tAudioPlayer audio = AudioPlayer.getInstance();\n\t\taudio.playSound(MUSIC_FOLDER, THEME);\n\t}",
"public void playSoundtrack() {\n if(this.musicEnabled) {\n try {\n Clip soundtrackClip = AudioSystem.getClip();\n AudioInputStream inputStream = AudioSystem.getAudioInputStream(new BufferedInputStream(Assets.soundTrack));\n soundtrackClip.open(inputStream);\n soundtrackClip.start();\n soundtrackClip.loop(Clip.LOOP_CONTINUOUSLY);\n } catch (Exception e) {\n e.printStackTrace();\n System.err.println(e.getMessage());\n }\n }\n }",
"@Override\r\n protected void playGameStartAudio() {\n\taudio.playClip();\r\n }",
"public void playMusic() {\n\t\tthis.music.start();\n\t}",
"public void playAudio() {\n\t\tmusic[currentSong].stop();\n\t\tcurrentSong++;\n\t\tcurrentSong %= music.length;\n\t\tmusic[currentSong].play();\n\t}",
"public void playAmbientSound() {\n if (!this.isClosed()) {\n super.playAmbientSound();\n }\n\n }",
"private void playSound() {\n\t\tif (controllerVars.isLoaded() && !controllerVars.isPlays()) {\n\t\t\tcontrollerVars.getSoundPool().play(controllerVars.getSoundID(), controllerVars.getVolume(), controllerVars.getVolume(), 1, 0, 1f);\n\t\t\tcontrollerVars.COUNTER++;\n\t\t\t//Toast.makeText(act, \"Played sound\", Toast.LENGTH_SHORT).show();optional Playing message \n\t\t\tcontrollerVars.setPlays(true);\n\t\t\tonComplete(controllerVars.getMediaPlayer().getDuration());\n\t\t}\n\t\t//controllerVars.getMediaPlayer().start();\n\t\t//controllerVars.setPlays(true);\n\t}",
"private void play() {\n /** Memanggil File MP3 \"indonesiaraya.mp3\" */\n try {\n mp.prepare();\n } catch (IllegalStateException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n /** Menjalankan Audio */\n mp.start();\n\n /** Penanganan Ketika Suara Berakhir */\n mp.setOnCompletionListener(new OnCompletionListener() {\n @Override\n public void onCompletion(MediaPlayer mp) {\n stateAwal();\n }\n });\n }",
"public void play() {\n\t\ttry {\n\t\t\taudioInput = AudioSystem.getAudioInputStream(this.music);\n\t\t\tclip.open(audioInput);\n\t\t\tclip.start();\n\t\t} catch (UnsupportedAudioFileException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (LineUnavailableException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"public void playAudio() {\n if (done==false)\n {\n file.play();\n }\n}",
"public static void playSound(){\r\n try{\r\n Clip clip = AudioSystem.getClip();\r\n clip.open(AudioSystem.getAudioInputStream(new File(\"Cheering.wav\")));\r\n clip.start();\r\n }\r\n catch (Exception exc){\r\n exc.printStackTrace(System.out);\r\n } \r\n }",
"private void playHintAudio() {\n AudioManager audioManager = (AudioManager)getContext().getSystemService(Context.AUDIO_SERVICE);\n int mode = audioManager.getRingerMode();\n Log.d(TAG,\"mode = \" + mode);\n\n if(mode != AudioManager.RINGER_MODE_SILENT && mode != AudioManager.RINGER_MODE_VIBRATE) {\n // prize modify for bug 44603 by zhaojian 20171205 start\n mMediaPlayer = MediaPlayer.create(getContext(),R.raw.hb_sound2);\n Log.d(\"debug\",\"isNotifySound = \" + getConfig().isNotifySound());\n if(getConfig().isNotifySound()) {\n mMediaPlayer.setOnPreparedListener(new MediaPlayer.OnPreparedListener() {\n @Override\n public void onPrepared(MediaPlayer mp) {\n mp.start();\n }\n });\n mMediaPlayer.setOnCompletionListener(new MediaPlayer.OnCompletionListener() {\n @Override\n public void onCompletion(MediaPlayer mp) {\n mp.release();\n }\n });\n mMediaPlayer.start();\n }\n // prize modify for bug 44603 by zhaojian 20171205 end\n }\n }",
"public void playSound() {\n\t\tmediaPlayer.play();\n\t}",
"public void ReproduceAudio() { \r\n\t\ttry {\r\n\t\t\t//en caso de que como nombre pongas \"undertale\" la musica sera diferente.\r\n\t\t\tif (Menu.jugador.equals(\"undertale\") || Menu.jugador.equals(\"Undertale\")) {\r\n\t\t\t\trepro.AbrirFichero(\"C:\\\\Temp\\\\Sonidos\\\\undertale.wav\");\r\n\t\t\t\t//emppieza la musica\r\n\t\t\t\trepro.Play();\r\n\t\t\t//musica por defecto\r\n\t\t\t} else {\r\n\t\t\t\trepro.AbrirFichero(\"C:\\\\Temp\\\\Sonidos\\\\tetris.mp3\");\r\n\t\t\t\trepro.Play();\r\n\t\t\t}\t\r\n\t\t} catch (Exception ex) {\r\n\t\t\tSystem.out.println(\"Error: \" + ex.getMessage());\r\n\t\t}\r\n\t}",
"@Override\n\tpublic void playLivingSound() {\n\t\tgetSoundManager().playLivingSound();\n\t}",
"@Override\r\n public void show()\r\n {\r\n // De inmediato, ponemos en marcha una melodia\r\n if (!juego.getAdminComponentes().get(\"Audios/bgmusic06.ogg\", Music.class).isPlaying())\r\n {\r\n juego.getAdminComponentes().get(\"Audios/bgmusic06.ogg\", Music.class).play();\r\n juego.getAdminComponentes().get(\"Audios/bgmusic06.ogg\", Music.class).setLooping(true);\r\n }\r\n }",
"public void play() {\n\t\tint focusRequestResult = mAudioManager.requestAudioFocus(mOuterEventsListener, AudioManager.STREAM_MUSIC,\n\t\t\t\tAudioManager.AUDIOFOCUS_GAIN);\n\n\t\tif (PrefManager.isIgnoreAudioFocus()\n\t\t\t\t|| focusRequestResult == AudioManager.AUDIOFOCUS_REQUEST_GRANTED) {\n\t\t\tinternalPlay();\n\t\t} else {\n\t\t\terror(Error.AUDIO_FOCUS_ERROR);\n\t\t}\n\t}",
"public void continueSound() {\n\t\tclip.start();\n\t}",
"public void startSound() {\n\t\ttry {\n\t\t\t// Open an audio input stream.\n\t\t\tURL url = this.getClass().getResource(\"/\"+wavMusicFile);\n\t\t\t//System.out.println(\"url: \" + url);\n\t\t\tAudioInputStream audioIn = AudioSystem.getAudioInputStream(url);\n\t\t\t// Get a sound clip resource.\n\t\t\tclip = AudioSystem.getClip();\n\t\t\t// Open audio clip and load samples from the audio input stream.\n\t\t\tclip.open(audioIn);\n\t\t\tclip.start();\n\t\t} catch (UnsupportedAudioFileException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (LineUnavailableException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"public static void playShootingSound(){\n String musicFile = \"Sounds\\\\Shoot.mp3\";\n Media sound = new Media(new File(musicFile).toURI().toString());\n MediaPlayer mediaPlayer = new MediaPlayer(sound);\n mediaPlayer.setVolume(App.getVolume());\n mediaPlayer.play();\n }",
"public boolean isSound() {\n\t\treturn true;\n\t}",
"public void play() {\n\t\tplay(true, true);\n\t}",
"public void StartSound(ISoundOrigin origin, sfxenum_t sound_id);",
"public static void playSoundEffect(String path) {\n Thread thread = new Thread(() -> {\n Player soundEffectPlayer = new Player();\n soundEffectPlayer.setSourceLocation(path);\n soundEffectPlayer.play();\n });\n thread.setDaemon(true);\n thread.start();\n }",
"public void StartSound(ISoundOrigin origin, int sound_id);",
"public boolean isAudio()\n {return false ;\n }",
"public void playSound() {\n if (this.mIsSupportVibrator) {\n this.mVibratorEx.setHwVibrator(\"haptic.control.time_scroll\");\n }\n if (this.mSoundPool == null || this.mSoundId == 0 || !this.mSoundLoadFinished) {\n Log.w(TAG, \"SoundPool is not initialized properly!\");\n } else {\n this.mSoundPool.play(this.mSoundId, 1.0f, 1.0f, 0, 0, 1.0f);\n }\n }",
"public void PlaySound(Context context) {\r\n\t\tif (!this.mp.isPlaying()) {\r\n\t\t\tmp.start();\r\n\t\t}\r\n\t}",
"public void keepLooping() {\n\t\tif(!clip.isActive()) {\n\t\t\tstartSound();\n\t\t}\n\t}",
"@Override\n public void playSound(int soundId) {\n\n }",
"public void loopSound(boolean commence) {\n if ( commence ) {\n clip.setFramePosition(0);\n clip.loop( Clip.LOOP_CONTINUOUSLY );\n } else {\n clip.stop();\n }\n }",
"public void play(boolean music) {\n\t\tplay(1.0f, 1.0f, music);\n\t}",
"public void playMusic() {\n\t\ttry {\n\t\t\tsoundManager.playMusic(\"bgroundmusic\");\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\t}",
"PlaySound getSound();",
"public void Play() {\n superPlaneGodMode = false;\r\n if (!musicPlaying)\r\n backgroundMusic.pause();\r\n if (musicPlaying)\r\n backgroundMusic.start();\r\n paused = false;\r\n }",
"public void playDeadSound() {\n\t\tAudioPlayer audio = AudioPlayer.getInstance();\n\t\taudio.playSound(MUSIC_FOLDER, DEAD);\n\t}",
"private void startPlay() {\n isPlaying = true;\n isPaused = false;\n playMusic();\n }",
"public void startSound()\n \n {try\n { \n URL url = this.getClass().getClassLoader().getResource(\"Mario Kart Start 2.wav\");\n \n \n \n \n \n AudioInputStream audioIn = AudioSystem.getAudioInputStream(url);\n // Get a sound clip resource.\n startClip = AudioSystem.getClip();\n // Open audio clip and load samples from the audio input stream.\n startClip.open(audioIn); \n \n startClip.start();\n \n \n } \n catch (UnsupportedAudioFileException e)\n {\n e.printStackTrace();\n } \n catch (IOException e) \n {\n e.printStackTrace();\n } \n catch (LineUnavailableException e) \n {\n e.printStackTrace();\n } \n \n }",
"public void playMusic() {\r\n try {\r\n File mFile = new File(Filepath);\r\n if (mFile.exists()) {\r\n AudioInputStream audioInput = AudioSystem.getAudioInputStream(mFile);\r\n Clip clip = AudioSystem.getClip();\r\n clip.open(audioInput);\r\n FloatControl gainControl = (FloatControl) clip.getControl(FloatControl.Type.MASTER_GAIN);\r\n gainControl.setValue(-25.0f); //reduces the volume by 25 decibels\r\n clip.start();\r\n clip.loop(Clip.LOOP_CONTINUOUSLY);\r\n\r\n } else {\r\n System.out.println(\"Music File not found\"); // will be thrown if music file is not in the file\r\n }\r\n } catch (Exception ex) {\r\n ex.printStackTrace();\r\n }\r\n }",
"private static void playAudio(String musicFile) {\n }",
"@Override\n public void makeSound() {\n\n }",
"@Override\n public void makeSound() {\n\n }",
"private void jButton14ActionPerformed(java.awt.event.ActionEvent evt) {\n try {\n \n //Make sure a track is loaded and it is at the start \n if (audioObject.isLoaded()) {\n jButton15.setEnabled(true);\n jButton14.setEnabled(false);\n audioObject.playAudio(); \n }\n }\n catch (Exception e) {\n e.printStackTrace();\n }\n }",
"public void play() {\n\t\t\r\n\t}",
"public void play(MediaPlayer choice) {\n if (choice == background) {\n if (!background2.isPlaying() && levelCtrl.level >= levelChange) {\n background2.setVolume(volume, volume);\n background2.start();\n }\n else if (!background.isPlaying()) {\n background.setVolume(volume, volume);\n background.start();\n }\n }\n else if (!choice.isPlaying()) {\n choice.setVolume(volume, volume);\n choice.start();\n }\n }",
"void playSound() {\n Thread thread = new Thread(new Runnable() {\n @Override\n public void run() {\n soundPlaying = true;\n audioTrack.play();\n while (soundPlaying) {\n genWhiteNoise();\n audioTrack.write(noise, 0, SAMPLE_COUNT);\n }\n\n }\n });\n thread.start();\n }",
"private void gameSound(int attack){\n switch (attack){\n case 1:\n mediaPlayer = MediaPlayer.create(Activity_Game.this, R.raw.sound_lightattack);\n break;\n case 2:\n mediaPlayer = MediaPlayer.create(Activity_Game.this, R.raw.sound_strongattack);\n break;\n case 3:\n mediaPlayer = MediaPlayer.create(Activity_Game.this, R.raw.sound_brutalattack);\n break;\n }\n mediaPlayer.start();\n }",
"public static void loadAudio()\n\t{\n\t\ttry\n\t\t{\n\t\t\tmusic = Applet.newAudioClip(new URL(\"file:\" + System.getProperty(\"user.dir\") + \"/sound/Pamgaea.wav\"));\n\t\t\tlaser = Applet.newAudioClip(new URL(\"file:\" + System.getProperty(\"user.dir\") + \"/sound/laser.wav\"));\n\t\t\tlaserContinuous = Applet.newAudioClip(new URL(\"file:\" + System.getProperty(\"user.dir\") + \"/sound/laser_continuous.wav\"));\n\t\t}\n\t\tcatch (Exception e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"@Override\r\n\t\tpublic void run()\r\n\t\t{\r\n\t\t\tLayeredSound.getInstance().add( sound );\r\n\t\t}",
"public void playLooped()\n {\n audioClip.loop(Clip.LOOP_CONTINUOUSLY);\n play();\n }",
"public void play()\n\t{\n\t\tif (canPlay)\n\t\t{\n\t\t\tsong.play();\n\t\t\tsong.rewind();\n\t\t\tif (theSong == \"SG1\" || theSong == \"SG2\")\n\t\t\t\tcanPlay = false;\n\t\t}\n\t}",
"SoundEffect(final String soundEffectName) throws MediaException {\n audio = new AudioClip(Paths.get(SFX_PATH + soundEffectName).toUri().toString());\n }",
"public static void startMusic()\n\t{\n\t\tmusic.loop();\n\t}",
"@SideOnly(Side.CLIENT)\n protected void soundMagic(ResourceLocation activitySound) {\n if (getBaseMetaTileEntity().isActive()) {\n if (activitySoundLoop == null) {\n activitySoundLoop = new SoundLoop(activitySound, getBaseMetaTileEntity(), false, true);\n Minecraft.getMinecraft().getSoundHandler().playSound(activitySoundLoop);\n }\n } else {\n if (activitySoundLoop != null) {\n activitySoundLoop = null;\n }\n }\n }",
"@Override\r\n\tpublic String doSound() {\n\t\treturn null;\r\n\t}",
"public void specialSong()\n {\n if(!mute)\n {\n try {\n \n bclip.stop();\n \n // Open an audio input stream.\n //URL url = this.getClass().getClassLoader().getResource(\"Glitzville.wav\"); \n //if(lastpowerUp.equals(\"RAINBOW\"))\n URL url = this.getClass().getClassLoader().getResource(\"Mario Kart Starman.wav\");\n \n \n \n \n \n AudioInputStream audioIn = AudioSystem.getAudioInputStream(url);\n // Get a sound clip resource.\n sclip = AudioSystem.getClip();\n // Open audio clip and load samples from the audio input stream.\n sclip.open(audioIn); \n \n sclip.start();\n \n \n } catch (UnsupportedAudioFileException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n } catch (LineUnavailableException e) {\n e.printStackTrace();\n } \n }\n }",
"private void playAudio(int winLose)\t\t\t\t\t\t\t\n {\n // win\n if(winLose == 1)\n {\n String path = \"src/winningSound.wav\";\n Media media = new Media(new File(path).toURI().toString());\n\n mediaPlayer = new MediaPlayer(media);\n mediaPlayer.setCycleCount(1);\n mediaPlayer.setAutoPlay(true);\n }\n // lose\n else\n {\n String path = \"src/loserSound.wav\";\n Media media = new Media(new File(path).toURI().toString());\n mediaPlayer = new MediaPlayer(media);\n mediaPlayer.setCycleCount(1);\n mediaPlayer.setAutoPlay(true);\n }\n }",
"@Override\n\tpublic void OnGameStart() {\n\t\tsuper.OnGameStart();\n\t\tMusicManage.setLoopingMusic(tumMusic, true);\n\t\tMusicManage.playMusic(tumMusic);\n\t}",
"public void playGoombaSound() {\n\t\tAudioPlayer audio = AudioPlayer.getInstance();\n\t\taudio.playSound(MUSIC_FOLDER, GOOMBA);\n\t}",
"public void toggleSound() { \n\t\tif (mSoundEnable) {\n\t\t\tmSoundEnable = false; \n\t\t\tif (ResourceManager.getInstance().gameMusic.isPlaying())\n\t\t\t\tResourceManager.getInstance().gameMusic.pause();\n\t\t}\n\t\telse {\n\t\t\tmSoundEnable = true;\n\t\t\tif (!ResourceManager.getInstance().gameMusic.isPlaying()) {\n\t\t\t\tResourceManager.getInstance().gameMusic.play();\n\t\t\t}\n\t\t}\n\t}",
"public void playSelectSong() {\n isStart = false;\n if (getCurrentSong() == 0) {\n audioList.get(getCurrentSong()).setSelect(true);\n playListAdapter.notifyItemChanged(getCurrentSong());\n }\n isPauseResume = false;\n if (player != null) {\n player.stopMedia();\n }\n if (!isDestroyed()) {\n playAudio(audioList.get(getCurrentSong()).getData());\n }\n /*new Handler().postDelayed(new Runnable() {\n @Override\n public void run() {\n if (!isDestroyed()) {\n playAudio(audioList.get(getCurrentSong()).getData());\n }\n }\n }, DELAY_TIME);*/\n }",
"public void play() { \r\n if (midi) \r\n sequencer.start(); \r\n else \r\n clip.start(); \r\n timer.start(); \r\n play.setText(\"Stop\"); \r\n playing = true; \r\n }",
"public boolean playsSound() {\r\n\t\treturn playsSound;\r\n\t}",
"private void playCameraShootSound()\n {\n AudioManager audioManager = (AudioManager) getSystemService(Context.AUDIO_SERVICE);\n int volume = audioManager.getStreamVolume( AudioManager.STREAM_NOTIFICATION);\n if (volume > 0) {\n if (mCameraShootPlayer == null) {\n mCameraShootPlayer = MediaPlayer.create(this, Uri.parse(CAMERA_SOUND_FILE));\n }\n if (mCameraShootPlayer != null) {\n mCameraShootPlayer.start();\n }\n }\n }",
"boolean play();",
"public void playWinSounds(){\r\n try {\r\n File mFile = new File(Filepath3);\r\n if (mFile.exists()) {\r\n AudioInputStream audioInput4 = AudioSystem.getAudioInputStream(mFile);\r\n Clip clip4 = AudioSystem.getClip();\r\n clip4.open(audioInput4);\r\n FloatControl gainControl4 = (FloatControl) clip4.getControl(FloatControl.Type.MASTER_GAIN);\r\n gainControl4.setValue(-10.0f); //reduces the volume by 10 decibels\r\n clip4.start();\r\n } else {\r\n System.out.println(\"Music File not found\"); // will be thrown if music file is not in the file\r\n }\r\n } catch (Exception ex) {\r\n ex.printStackTrace();\r\n }\r\n }",
"public void play(){\n Log.d(TAG, \"startAudio: called\");\n if(mMediaPlayer!=null){\n\n mMediaPlayer.start();\n mProgressBar.setProgress(mMediaPlayer.getCurrentPosition());\n mProgressBar.setMax(mMediaPlayer.getDuration());\n\n // updating progress bar\n seekHandler.postDelayed(updateSeekBar, 5);\n }\n }",
"public void AudioMuerte() {\r\n\t\ttry {\r\n\t\t\tdeath.AbrirFichero(\"C:\\\\Temp\\\\Sonidos\\\\golpe.wav\");\r\n\t\t} catch (Exception e) {\r\n\t\t\tSystem.out.println(\"Error: \" + e);\r\n\t\t}\r\n\t}",
"public static void game_sound() {\n\t\tm_player_game.start();\n\t\tm_player_game.setMediaTime(new Time(0));\n\t}",
"public void play() {\n\t\tmusic.play();\n\t\tsyncPosition();\n\t}",
"private void startPlaying() {\n try {\n mPlayer = new MediaPlayer();\n try {\n mPlayer.setDataSource(audioFile.getAbsolutePath());\n mPlayer.prepare();\n mPlayer.start();\n } catch (IOException e) {\n Log.e(LOG_TAG, \"prepare() failed\");\n }\n showTimer(false);\n } catch (Exception e) {\n logException(e, \"MicManualFragment_startPlaying()\");\n }\n\n }",
"public void playTriggerSound() {\n ScreenSpeakService service = ScreenSpeakService.getInstance();\n if (service != null) {\n service.getFeedbackController().playAuditory(R.raw.tutorial_trigger);\n }\n }",
"public void toggleSound()\n\t{\n\t\tif (sound)\n\t\t\tsound = false;\n\t\telse\n\t\t\tsound = true;\n\t\tnotifyObservers();\n\t}",
"public void enableSound() {\n soundToggle = true;\n }",
"public void pointScore() {\n if (soundToggle == true) {\n scoreSound.start();\n } // if\n }",
"public void start()\n\t{\n\t\tString name = getAudioFileName();\n\t\ttry\n\t\t{\t\t\t\n\t\t\tInputStream in = getAudioStream();\n\t\t\tAudioDevice dev = getAudioDevice();\n\t\t\tplay(in, dev);\n\t\t}\n\t\tcatch (JavaLayerException ex)\n\t\t{\n\t\t\tsynchronized (System.err)\n\t\t\t{\n\t\t\t\tSystem.err.println(\"Unable to play \"+name);\n\t\t\t\tex.printStackTrace(System.err);\n\t\t\t}\n\t\t}\n\t}",
"public void playLocal(String audiofile);",
"private void setUpSound() {\n\t\tAssetManager am = getActivity().getAssets();\n\t\t// activity only stuff\n\t\tgetActivity().setVolumeControlStream(AudioManager.STREAM_MUSIC);\n\n\t\tAudioManager audioManager = (AudioManager) getActivity().getSystemService(Context.AUDIO_SERVICE);\n\t\tsp = new SPPlayer(am, audioManager);\n\t}",
"public void playSound(SoundType type) {\n if (!gameController.getGameStatPanel().getUserData().isSoundDisabled()) soundMap.get(type).play();\n }",
"private void stopAudio() {\r\n // stop playback if possible here!\r\n }",
"public boolean musicOn ()\n\t{\n\t\tif (musicInt == 0)\n\t\t\treturn true;\n\t\telse\n\t\t\treturn false;\n\t}",
"public static void hit_sound() {\n\t\tif (!hit1) {\n\t\t\thit1 = true;\n\t\t\tm_player_hit.setMediaTime(new Time(0));\n\t\t\tm_player_hit.start();\n\t\t} else if (!hit2) {\n\t\t\thit2 = true;\n\t\t\tm_player_hit2.setMediaTime(new Time(0));\n\t\t\tm_player_hit2.start();\n\t\t} else if (!hit3) {\n\t\t\thit3 = true;\n\t\t\tm_player_hit3.setMediaTime(new Time(0));\n\t\t\tm_player_hit3.start();\n\t\t} else if (!hit4) {\n\t\t\thit4 = true;\n\t\t\tm_player_hit4.setMediaTime(new Time(0));\n\t\t\tm_player_hit4.start();\n\t\t} else if (!hit5) {\n\t\t\thit5 = true;\n\t\t\tm_player_hit5.setMediaTime(new Time(0));\n\t\t\tm_player_hit5.start();\n\t\t} else {\n\t\t\thit1 = hit2 = hit3 = hit4 = hit5 = false;\n\t\t\tm_player_hit6.setMediaTime(new Time(0));\n\t\t\tm_player_hit6.start();\n\t\t}\n\n\t}",
"public void play() {\n\t\t//If volume is not muted\n\t\tif (volume != Volume.MUTE) {\n\t\t\t//If the clip is running\n\t\t\tif (clip.isRunning()) {\n\t\t\t\tclip.stop(); //Stop it\n\t\t\t}\n\t\t\tclip.setFramePosition(0); //Rewind\n\t\t\tclip.start(); //Play again\n\t\t}\n\t}",
"public boolean isAudio() {\n\t\t\treturn this == AUDIO;\n\t\t}",
"public void play(boolean audioOnly) {\n\t\tif (audioOnly)\n\t\t\tplay(true, false);\n\t\telse\n\t\t\tplay(false, true);\n\t}",
"public static void startMusic()\r\n\t{\r\n\t\tif ( musicPlayer == null )\r\n\t\t\tmusicPlayer = new MusicPlayer( \"Music2.mid\" );\r\n\t\telse\r\n\t\t\tmusicPlayer.play();\r\n\t}",
"public void playSoundFail() {\n\t\tfailSound.play();\n\t}",
"public void play(URL paramURL) {\n/* 419 */ AudioClip audioClip = getAudioClip(paramURL);\n/* 420 */ if (audioClip != null) {\n/* 421 */ audioClip.play();\n/* */ }\n/* */ }",
"public void playSoundGameWon() {\n\t\tcompletedGameSound.play();\n\t}",
"private void clickSound() {// this function Plays a sound when a button is clicked.\n\t\tif (mp != null) {\n\t\t\tmp.release();\n\t\t}\n\t\tmp = MediaPlayer.create(getApplicationContext(), R.raw.music2);\n\t\tmp.start();// media player is started\n\t}",
"public abstract String play(SoundLibrary library, String... sound);",
"public void playClickSound() {\n\t\tAudioPlayer audio = AudioPlayer.getInstance();\n\t\taudio.playSound(MUSIC_FOLDER, CLICK);\n\t}"
] |
[
"0.7579138",
"0.7362153",
"0.732951",
"0.7225495",
"0.72129375",
"0.70360875",
"0.6951773",
"0.6925792",
"0.6842204",
"0.68367046",
"0.6762017",
"0.67590326",
"0.6758912",
"0.67352474",
"0.67181236",
"0.6702829",
"0.664913",
"0.6644454",
"0.66394156",
"0.663603",
"0.66353685",
"0.6634296",
"0.663383",
"0.6623726",
"0.66092557",
"0.6584145",
"0.65793",
"0.6575906",
"0.65674067",
"0.6566678",
"0.65555924",
"0.655157",
"0.65491736",
"0.65411335",
"0.65299666",
"0.65285987",
"0.6509405",
"0.6504968",
"0.648716",
"0.6484933",
"0.64836895",
"0.64659184",
"0.63932455",
"0.63927424",
"0.639024",
"0.6384588",
"0.63708854",
"0.63699985",
"0.6358364",
"0.63567454",
"0.63567454",
"0.63466454",
"0.6332104",
"0.63278365",
"0.63186485",
"0.6311241",
"0.63086915",
"0.62995327",
"0.62852854",
"0.628458",
"0.6282334",
"0.6282208",
"0.6275721",
"0.6274994",
"0.62704813",
"0.62630236",
"0.6258984",
"0.62506604",
"0.62443316",
"0.6228661",
"0.622723",
"0.6226848",
"0.62207013",
"0.62198365",
"0.62120134",
"0.6211406",
"0.6210961",
"0.62097037",
"0.6206851",
"0.61929065",
"0.619109",
"0.6187601",
"0.6186463",
"0.6179129",
"0.6178169",
"0.6176992",
"0.6174012",
"0.6171485",
"0.61681974",
"0.61586976",
"0.61552525",
"0.6148269",
"0.6148027",
"0.61478955",
"0.6146665",
"0.61452156",
"0.61346436",
"0.61299646",
"0.6129161",
"0.61261433",
"0.6117871"
] |
0.0
|
-1
|
TODO: Return the communication channel to the service.
|
@Override
public IBinder onBind(Intent intent) {
throw new UnsupportedOperationException("Not yet implemented");
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"Channel channel() {\n return channel;\n }",
"public IChannel getChannel() {\n\t\treturn message.getChannel();\n\t}",
"SocketChannel getChannel();",
"EzyChannel getChannel();",
"public Channel getChannel()\n {\n return channel;\n }",
"java.lang.String getChannel();",
"protected Channel getChannel()\n {\n return mChannel;\n }",
"@Override\n public int getChannel()\n {\n return channel;\n }",
"public SocketChannel getChannel() {\n return channel;\n }",
"public Channel getChannel()\n\t{\n\t\treturn channel;\n\t}",
"public Channel getChannel() {\n return channel;\n }",
"private ManagedChannel getManagedChannel() {\n return ManagedChannelBuilder.forAddress(\"localhost\", mGrpcPortNum)\n .usePlaintext()\n .build();\n }",
"public Channel getChannel() {\r\n\t\treturn channel;\r\n\t}",
"public int GetChannel();",
"public ChannelManager getChannelManager() {\n return channelMgr;\n }",
"public String getChannel() {\r\n return channel;\r\n }",
"public String getChannel() {\n return channel;\n }",
"public Channel getChannel() throws ConnectException\n {\n return getChannel(null);\n }",
"public Object getCommunicationChannel()\r\n\t\t\tthrows PersistenceMechanismException {\n\t\treturn null;\r\n\t}",
"public Channel channel()\r\n/* 36: */ {\r\n/* 37: 68 */ return this.channel;\r\n/* 38: */ }",
"public String getChannel() {\r\n\t\treturn this.channel;\r\n\t}",
"private SocketChannel getChannel(){\n if ( key == null ) {\n return getSocket().getChannel();\n } else {\n return (SocketChannel)key.channel();\n }\n }",
"public String getChannel() {\n\t\treturn channel;\n\t}",
"public String getChannel() {\n\t\treturn channel;\n\t}",
"public int getChannel() {\n return channel;\n }",
"public interface Channel\r\n{\r\n /**\r\n * Get a duplex connection for this channel. This method must be called for each request-response message exchange.\r\n * @param msgProps message specific properties\r\n * @param xmlOptions XML formatting options\r\n * @return connection\r\n * @throws IOException on I/O error\r\n * @throws WsConfigurationException on configuration error\r\n */\r\n DuplexConnection getDuplex(MessageProperties msgProps, XmlOptions xmlOptions) throws IOException, \r\n WsConfigurationException;\r\n \r\n /**\r\n * Get a send-only connection for this channel. This method must be called for each message to be sent without a\r\n * response.\r\n * @param msgProps message specific properties\r\n * @param xmlOptions XML formatting options\r\n * @return connection\r\n * @throws IOException on I/O error\r\n * @throws WsConfigurationException on configuration error\r\n */\r\n OutConnection getOutbound(MessageProperties msgProps, XmlOptions xmlOptions) throws IOException, \r\n WsConfigurationException;\r\n \r\n /**\r\n * Get a receive-only connection for this channel. This method must be called for each message to be received, and\r\n * will wait for a message to be available before returning.\r\n * \r\n * @return connection\r\n * @throws IOException on I/O error\r\n * @throws WsConfigurationException on configuration error\r\n */\r\n InConnection getInbound() throws IOException, WsConfigurationException;\r\n \r\n /**\r\n * Close the channel. Implementations should disconnect and free any resources allocated to the channel.\r\n * @throws IOException on I/O error\r\n */\r\n void close() throws IOException;\r\n}",
"public int getChannel() {\r\n\t\treturn channel;\r\n\t}",
"public Byte getChannel() {\n return channel;\n }",
"public SocketChannel getChannel() { return null; }",
"public ChannelFuture getChannelFuture() {\n return channelFuture;\n }",
"public interface ChannelsService {\n\n /**\n * Gets the Facebook data-ref to create send to messenger button.\n *\n * @param callback Callback with the result.\n */\n void createFbOptInState(@Nullable Callback<ComapiResult<String>> callback);\n }",
"private static ManagedChannel getManagedChannel(int port) {\n return ManagedChannelBuilder.forAddress(\"localhost\", port)\n .usePlaintext(true)\n .build();\n }",
"protected SocketChannel getSocket() {\n\t\treturn channel;\n\t}",
"public interface MessagingService {\n\n /**\n * Checks whether message receivers are registered for this channel.\n * \n * @param ccid the channel id\n * @return <code>true</code> if there are message receivers on this channel,\n * <code>false</code> if not.\n */\n boolean hasMessageReceiver(String ccid);\n\n /**\n * Passes the message to the registered message receiver.\n * \n * @param ccid the channel to pass the message on\n * @param serializedMessage the message to send (serialized SMRF message)\n */\n void passMessageToReceiver(String ccid, byte[] serializedMessage);\n\n /**\n * Check whether the messaging component is responsible to send messages on\n * this channel.<br>\n * \n * In scenarios with only one messaging component, this will always return\n * <code>true</code>. In scenarios in which channels are assigned to several\n * messaging components, only the component that the channel was assigned\n * to, returns <code>true</code>.\n * \n * @param ccid\n * the channel ID or cluster controller ID, respectively.\n * @return <code>true</code> if the messaging component is responsible for\n * forwarding messages on this channel, <code>false</code>\n * otherwise.\n */\n boolean isAssignedForChannel(String ccid);\n\n /**\n * Check whether the messaging component was responsible before but the\n * channel has been assigned to a new messaging component in the mean time.\n * \n * @param ccid the channel id\n * @return <code>true</code> if the messaging component was responsible\n * before but isn't any more, <code>false</code> if it either never\n * was responsible or still is responsible.\n */\n boolean hasChannelAssignmentMoved(String ccid);\n}",
"org.apache.drill.exec.proto.UserBitShared.RpcChannel getChannel();",
"public java.lang.String getChannel() {\n java.lang.Object ref = channel_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n channel_ = s;\n return s;\n }\n }",
"public final int getChannel() {\n return device.getChannel();\n }",
"public String getChannelName()\r\n\t{\r\n\t\treturn this.sChannelName;\r\n\t}",
"public ChannelLogger getChannelLogger() {\n return this.channelLogger;\n }",
"public java.lang.String getChannel() {\n java.lang.Object ref = channel_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n channel_ = s;\n }\n return s;\n }\n }",
"public java.lang.String getChannel() {\n java.lang.Object ref = channel_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n channel_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public NotificationsChannel getChannel(String channelId) throws Exception;",
"java.lang.String getChannelName();",
"public java.lang.String getChannel() {\n java.lang.Object ref = channel_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n channel_ = s;\n }\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public TextChannel getSupportChannel() { return supportChannel; }",
"public ChannelLocator getChannelLocator();",
"com.google.protobuf.ByteString\n getChannelBytes();",
"private SmartCardChannel getChannel() throws UsbDeviceException, NotAvailableUSBDeviceException{\n\t\tif(this.channel != null){\n\t\t\treturn this.channel;\n\t\t}\n\t\tif(getUsbInterface() != null){\n\t\t\tif (!getUsbDeviceConnection().claimInterface(getUsbInterface(), true)) {\n\t\t\t\tthrow new NotAvailableUSBDeviceException(\"Imposible acceder al interfaz del dispositivo USB\"); //$NON-NLS-1$\n\t\t\t}\n\t\t\tthis.channel = new SmartCardChannel(getUsbDeviceConnection(), getUsbInterface());\n\t\t\treturn this.channel;\n\t\t}\n\t\tthrow new UsbDeviceException(\"usbInterface cannot be NULL\"); //$NON-NLS-1$\n\t}",
"public String getChannel() {\n if(this.isRFC2812())\n return this.getNumericArg(1);\n else\n return this.getNumericArg(0);\n }",
"@PreAuthorize(\"hasRole('superman')\")\n\tpublic abstract Channel getChannel(String name);",
"public interface Channels {\n \n public void createChannel();\n\n}",
"public int getChannelId( ) {\r\n return channelId;\r\n }",
"public String getChannelId()\n {\n return channelId;\n }",
"public Channel method_4090() {\n return null;\n }",
"public com.google.protobuf.ByteString\n getChannelBytes() {\n java.lang.Object ref = channel_;\n if (ref instanceof java.lang.String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n channel_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"public com.google.protobuf.ByteString\n getChannelBytes() {\n java.lang.Object ref = channel_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n channel_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"@Override\n\tpublic int getChannel() {\n\t\treturn super.getDeviceID();\n\t}",
"public interface ChannelServiceI {\r\n Channel createChannel(Channel channel);\r\n\r\n int updateChannelUser(int id);\r\n\r\n int minusChannelUser(int id);\r\n\r\n List<Channel> getChannelPage(Channel channel);\r\n\r\n int count();\r\n\r\n Channel getChannel(String channelToken);\r\n\r\n List<Channel> getUserChannel(Channel channel);\r\n\r\n int deleteUser(Integer id);\r\n\r\n List<Channel> getUserChannelTotal(Channel channel);\r\n\r\n int updateChannel(Channel channel);\r\n}",
"protected Channel connect() {\n\t\t\tif (channel == null) {\n\t\t\t\tinit();\n\t\t\t}\n\t\t\tSystem.out.println(\"channel === \"+channel);\n\t\t\tif (channel.isDone() && channel.isSuccess())\n\t\t\t\treturn channel.channel();\n\t\t\telse\n\t\t\t\tthrow new RuntimeException(\"Not able to establish connection to server\");\n\t\t}",
"public abstract ManagedChannelBuilder<?> delegate();",
"public io.grpc.channelz.v1.Channel getChannel(int index) {\n if (channelBuilder_ == null) {\n return channel_.get(index);\n } else {\n return channelBuilder_.getMessage(index);\n }\n }",
"public com.google.protobuf.ByteString\n getChannelBytes() {\n java.lang.Object ref = channel_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n channel_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"java.lang.String getChannelToken();",
"java.lang.String getChannelToken();",
"public String getChannelId()\r\n\t{\r\n\t\treturn this.sChannelId;\r\n\t}",
"String getServerConnectionChannelName();",
"public com.google.protobuf.ByteString\n getChannelBytes() {\n java.lang.Object ref = channel_;\n if (ref instanceof java.lang.String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n channel_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"@Bean\n\tpublic DirectChannel requestChooserOutputChannel() {\n\t\treturn MessageChannels.direct().get();\n\t}",
"public ManagedChannelBuilder<?> delegate() {\n return this.delegateBuilder;\n }",
"@Override\n public ScheduledExecutorService getSchedExecService() {\n return channelExecutor;\n }",
"@objid (\"1bb2731c-131f-497d-9749-1f4f1e705acb\")\n Link getChannel();",
"private ManagedChannel emulatedPubSubChannel() {\n if (!useEmulator) {\n throw new RuntimeException(\"You shouldn't be calling this when using the real \"\n + \"(non-emulator) implementation\");\n }\n String hostport = System.getenv(\"PUBSUB_EMULATOR_HOST\");\n return ManagedChannelBuilder.forTarget(hostport).usePlaintext().build();\n }",
"public String getChannelId() {\n return channelId;\n }",
"public Channel method_4112() {\n return null;\n }",
"public Channel method_4121() {\n return null;\n }",
"public SodiumChannel getSodiumChannel() {\n\t\t\treturn sodiumChannel;\n\t\t}",
"public interface ChannelManager {\n int createChannel(String channel, long ttlInSeconds);\n int publishToChannel(String channel, String msg);\n}",
"public interface ChannelConnection {\n public Channel getChannel();\n public Connector getConnector();\n}",
"public io.grpc.channelz.v1.Channel getChannel(int index) {\n return channel_.get(index);\n }",
"public ChannelType getChannelType() {\n return type;\n }",
"@Override\n\tprotected void channelRead0(ChannelHandlerContext ctx, WsClientMessage msg) throws Exception {\n\t}",
"public interface ChatPlayerService extends PlayerService, Chatter\n{\n /**\n * Sets the player's ChatTarget focus.\n * \n * @param focus The new ChatTarget to focus\n */\n void setFocus( ChatTarget focus );\n \n /**\n * Gets the player's current focus.\n * \n * @return The channel the player has focused\n */\n ChatTarget getFocus();\n \n /**\n * Gets the player's BaseComponent name.\n * \n * @return The player's BaseComponent name.\n */\n BaseComponent getComponentName();\n \n /**\n * Gets the ChatManagerImpl.\n * \n * @return The ChatManagerImpl instance\n */\n ChatManager getChatManager();\n \n /**\n * Gets the PrivateMessageTarget from the last inbound PM.\n * \n * @return The PrivateMessageTarget from the last PM received\n */\n PrivateMessageTarget getLastInboundWhisperTarget();\n \n /**\n * Sets the most recent inbound PM's PrivateMessageTarget.\n * \n * @param lastInboundWhisperTarget The new target.\n * @return This ChatPlayerService object.\n */\n ChatPlayerService setLastInboundWhisperTarget( PrivateMessageTarget lastInboundWhisperTarget );\n \n /**\n * Gets a formatted message to show all of the channels the\n * player is currently in.\n * \n * @return A formatted message showing the channels the player is in.\n */\n BaseComponent[] getChannelsJoinedMessage();\n}",
"public String getSubChannel() {\r\n\t\treturn this.subChannel;\r\n\t}",
"public String getChannelId() {\n\t\treturn channelId;\n\t}",
"public ReadableByteChannel getByteChannel() throws IOException {\n InputStream source = getInputStream();\n \n if(source != null) {\n return Channels.newChannel(source);\n }\n return null;\n }",
"public DmaChannel getChannelAt(int i);",
"public interface MessageInputChannel extends\r\n Channel<MessageInput, MessageInputChannelAPI>, OneDimensional, MessageCallback {\r\n\r\n}",
"public int getChannelType( ) {\r\n return 1;\r\n }",
"public interface IRemoteMessageService {\n\n void unsubscribeToMessage(UnSubscribeToMessage cmd);\n\n /**\n * Sets a message element to a specified value\n */\n void setElementValue(SetElementValue cmd);\n\n void zeroizeElement(ZeroizeElement cmd);\n\n /**\n * Notifies service to send message updates to the specified ip address\n */\n SubscriptionDetails subscribeToMessage(SubscribeToMessage cmd);\n\n Set<? extends DataType> getAvailablePhysicalTypes();\n\n boolean startRecording(RecordCommand cmd);\n\n InetSocketAddress getRecorderSocketAddress();\n\n InetSocketAddress getMsgUpdateSocketAddress();\n\n void stopRecording();\n\n void terminateService();\n\n void reset();\n\n void setupRecorder(IMessageEntryFactory factory);\n\n public Map<String, Throwable> getCancelledSubscriptions();\n}",
"@Test\n\tpublic void testChannel() {\n\t\tString requestXml =\n\t\t\t\t\"<FahrenheitToCelsius xmlns=\\\"http://www.w3schools.com/webservices/\\\">\" +\n\t\t\t\t\" <Fahrenheit>55</Fahrenheit>\" +\n\t\t\t\t\"</FahrenheitToCelsius>\";\n\n\t\t// Create the Message object\n\t\tMessage<String> message = MessageBuilder.withPayload(requestXml).build();\n\n\t\t// Send the Message to the handler's input channel\n\t\t//MessageChannel channel = channelResolver.resolveChannelName(\"fahrenheitChannel\");\n\t\tchannel.send(message);\n\t}",
"public Message getMessageWizardChannel() {\n\t\tMessage temp = null;\n\t\t\n\t\ttry {\n\t\t\t//se ia mesajul din buffer\n\t\t\ttemp = bufferWizardChannel.take();\t\n\t\t} catch (InterruptedException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn temp;\n\t\t\n\t}",
"public MessageChannel getGameChannel() {\r\n\t\treturn gameChannel;\r\n\t}",
"public Message getMessageWizardChannel() {\n\t\tMessage msg1=null;\n\t\ttry{\n\t\t\tmsg1=chann1.take();\n\t\t} catch (InterruptedException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn msg1;\n\t}",
"void start(Channel channel, Object msg);",
"@Override\n\tpublic String getChannelId()\n\t{\n\t\treturn null;\n\t}",
"public String getChannelCode() {\n return channelCode;\n }",
"byte[] getChannelCommand() throws IOException {\n ByteArrayOutputStream baos = new ByteArrayOutputStream();\n baos.write(rgbCommand(r, g, b));\n baos.write(wwcwCommand(ww, cw));\n return baos.toByteArray();\n }",
"java.lang.String getChannelId();",
"protected Channel createChannel() throws IOException, TimeoutException, NoSuchAlgorithmException {\n LOGGER.debug(\"Creating channel\");\n Channel channel = connectionProducer.getConnection(config).createChannel();\n LOGGER.debug(\"Created channel\");\n return channel;\n }",
"public org.apache.axis.types.UnsignedInt getChannel() {\n return channel;\n }",
"public interface SendService {\n\n public void sendMessage(RemotingCommand remotingCommand, long timeout);\n}"
] |
[
"0.7437254",
"0.73157257",
"0.7183302",
"0.7135984",
"0.7129005",
"0.71285546",
"0.7090409",
"0.7070889",
"0.7067624",
"0.7038997",
"0.6988283",
"0.6917885",
"0.68884337",
"0.67946744",
"0.67914945",
"0.67852235",
"0.677885",
"0.674656",
"0.67354923",
"0.6681876",
"0.66714543",
"0.6667951",
"0.6658963",
"0.6658963",
"0.6637923",
"0.65924364",
"0.6589948",
"0.65803987",
"0.65801334",
"0.656291",
"0.6394705",
"0.6370899",
"0.6364142",
"0.6360486",
"0.63541204",
"0.63400555",
"0.6295168",
"0.62838054",
"0.6278035",
"0.6249136",
"0.62438136",
"0.62114525",
"0.6202571",
"0.6174055",
"0.6163322",
"0.61605746",
"0.6151532",
"0.614542",
"0.6134949",
"0.61321455",
"0.60943747",
"0.6087775",
"0.60815173",
"0.60634476",
"0.6059933",
"0.60573",
"0.6053354",
"0.6047734",
"0.60389555",
"0.6030655",
"0.6022905",
"0.60092485",
"0.6005142",
"0.6005142",
"0.60051006",
"0.60014427",
"0.6001328",
"0.5996678",
"0.59943444",
"0.59914345",
"0.59837997",
"0.5970838",
"0.59568334",
"0.5928881",
"0.5895364",
"0.58861846",
"0.58624125",
"0.5857131",
"0.58528924",
"0.581504",
"0.581163",
"0.58108175",
"0.58004445",
"0.57914156",
"0.57894915",
"0.578917",
"0.5776858",
"0.57738584",
"0.576785",
"0.57609695",
"0.5759547",
"0.5758005",
"0.57573795",
"0.5743325",
"0.5738268",
"0.5733163",
"0.57316715",
"0.5726644",
"0.5715349",
"0.57023185",
"0.5701523"
] |
0.0
|
-1
|
/ Used to build and start foreground service.
|
private void startForegroundService() {
Log.d(TAG_FOREGROUND_SERVICE, "Start foreground service.");
// Create notification default intent.
Intent intent = new Intent(getApplicationContext(), MainActivity.class);
// Intent intent = new Intent();
PendingIntent pendingIntent = PendingIntent.getActivity(this, 0, intent, 0);
// NotificationCompat.Builder mBuilder =
// (NotificationCompat.Builder) new NotificationCompat.Builder(this)
// .setSmallIcon(R.drawable.ic_launcher_background)
// .setContentTitle("My notification")
// .setContentText("Hello World!");
// Create notification builder.
NotificationCompat.Builder builder = (NotificationCompat.Builder) new NotificationCompat.Builder(this).setSmallIcon(R.drawable.ic_launcher_background)
.setContentTitle("Music player implemented by foreground service.")
.setContentText("Android foreground service is a android service which can run in foreground always, it can be controlled by user via notification.");
// Make notification show big text.
// NotificationCompat.BigTextStyle bigTextStyle = new NotificationCompat.BigTextStyle();
// bigTextStyle.setBigContentTitle("Music player implemented by foreground service.");
// bigTextStyle.bigText("Android foreground service is a android service which can run in foreground always, it can be controlled by user via notification.");
// // Set big text style.
// builder.setStyle(bigTextStyle);
builder.setWhen(System.currentTimeMillis());
builder.setSmallIcon(R.mipmap.ic_launcher);
Bitmap largeIconBitmap = BitmapFactory.decodeResource(getResources(), R.drawable.ic_menu_camera);
builder.setLargeIcon(largeIconBitmap);
// Make the notification max priority.
builder.setPriority(Notification.PRIORITY_MAX);
// Make head-up notification.
builder.setFullScreenIntent(pendingIntent, true);
// Add Play button intent in notification.
Intent playIntent = new Intent(this, MyForeGroundService.class);
playIntent.setAction(ACTION_PLAY);
PendingIntent pendingPlayIntent = PendingIntent.getService(this, 0, playIntent, 0);
NotificationCompat.Action playAction = new NotificationCompat.Action(android.R.drawable.ic_media_play, "Play", pendingPlayIntent);
builder.addAction(playAction);
// Add Pause button intent in notification.
Intent pauseIntent = new Intent(this, MyForeGroundService.class);
pauseIntent.setAction(ACTION_PAUSE);
PendingIntent pendingPrevIntent = PendingIntent.getService(this, 0, pauseIntent, 0);
NotificationCompat.Action prevAction = new NotificationCompat.Action(android.R.drawable.ic_media_pause, "Pause", pendingPrevIntent);
builder.addAction(prevAction);
// Build the notification.
Notification notification = builder.build();
// Start foreground service.
startForeground(1, notification);
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"private void startForegroundService()\n {\n Log.d(\"TAG\", \"Start foreground service.\");\n\n // Create notification default intent.\n Intent intent = new Intent();\n PendingIntent pendingIntent = PendingIntent.getActivity(this, 0, intent, 0);\n\n // Create notification builder.\n NotificationCompat.Builder builder = new NotificationCompat.Builder(this);\n\n // Make notification show big text.\n NotificationCompat.BigTextStyle bigTextStyle = new NotificationCompat.BigTextStyle();\n bigTextStyle.setBigContentTitle(\"Music player implemented by foreground service.\");\n bigTextStyle.bigText(\"Android foreground service is a android service which can run in foreground always, it can be controlled by user via notification.\");\n // Set big text style.\n builder.setStyle(bigTextStyle);\n\n builder.setWhen(System.currentTimeMillis());\n builder.setSmallIcon(R.mipmap.ic_launcher);\n Bitmap largeIconBitmap = BitmapFactory.decodeResource(getResources(), R.mipmap.ic_launcher);\n builder.setLargeIcon(largeIconBitmap);\n // Make the notification max priority.\n builder.setPriority(Notification.PRIORITY_MAX);\n // Make head-up notification.\n builder.setFullScreenIntent(pendingIntent, true);\n\n // Add Play button intent in notification.\n Intent playIntent = new Intent(this, MediaPlayerService.class);\n playIntent.setAction(ACTION_PLAY);\n PendingIntent pendingPlayIntent = PendingIntent.getService(this, 0, playIntent, 0);\n NotificationCompat.Action playAction = new NotificationCompat.Action(android.R.drawable.ic_media_play, \"Play\", pendingPlayIntent);\n builder.addAction(playAction);\n\n // Add Stop button intent in notification.\n Intent pauseIntent = new Intent(this, MediaPlayerService.class);\n pauseIntent.setAction(ACTION_STOP_FOREGROUND_SERVICE);\n PendingIntent pendingPrevIntent = PendingIntent.getService(this, 0, pauseIntent, 0);\n NotificationCompat.Action stopAction = new NotificationCompat.Action(android.R.drawable.ic_media_pause, \"STOP\", pendingPrevIntent);\n builder.addAction(stopAction);\n\n // Build the notification.\n Notification notification = builder.build();\n\n // Start foreground service.\n startForeground(1, notification);\n }",
"@Override\n public void onStart(Intent intent, int nStartId)\n {\n if (Config.LOGD)\n {\n Log.d(TAG, \"Wiper Service Started \");\n }\n\n startForeground(1111, new Notification());\n\n mContext = this;\n // Call function to start background thread\n if ( bWiperConfigReadError != true)\n {\n startWiperService();\n }\n else\n {\n Log.e(TAG,\"Cannot start Wiper, wiperconfig read error\");\n }\n }",
"public void startService() {\r\n Log.d(LOG, \"in startService\");\r\n startService(new Intent(getBaseContext(), EventListenerService.class));\r\n startService(new Intent(getBaseContext(), ActionService.class));\r\n getListenerService();\r\n\r\n }",
"private void startForeground() {\n Notification notification = new NotificationCompat.Builder(this)\n .setContentTitle(getResources().getString(R.string.app_name))\n .setTicker(getResources().getString(R.string.app_name))\n .setContentText(\"Running\")\n .setSmallIcon(R.mipmap.ic_launcher)\n .setContentIntent(null)\n .setOngoing(true)\n .setAutoCancel(true)\n .build();\n startForeground(9999, notification);\n }",
"@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 }",
"@Override\n public int onStartCommand(Intent intent, int flags, int startId) {\n super.onStartCommand(intent, flags, startId);\n // Tapping the notification will open the specified Activity.\n// Intent activityIntent = new Intent(this, MainActivity.class);\n if (intent == null)\n intent = new Intent(this, RNTrafficStatsModule.class);\n\n pendingIntent = PendingIntent.getActivity(getApplicationContext(), 0,\n intent, PendingIntent.FLAG_UPDATE_CURRENT);\n\n // This always shows up in the notifications area when this Service is running.\n not = new Notification.Builder(this).\n setContentTitle(\"TrueService\").\n setContentText(\"Running Speed Tests\")\n .setSmallIcon(R.drawable.random_pic).\n setContentIntent(pendingIntent).\n// addAction(action).\n build();\n startForeground(1, not);\n\n // Other code goes here...\n\n return START_REDELIVER_INTENT;//super.onStartCommand(intent, flags, startId);\n }",
"@Override\r\n public void onCreate() {\n HandlerThread thread = new HandlerThread(\"ServiceStartArguments\",\r\n Process.THREAD_PRIORITY_BACKGROUND);\r\n thread.start();\r\n\r\n // Get the HandlerThread's Looper and use it for our Handler\r\n mServiceLooper = thread.getLooper();\r\n mServiceHandler = new ServiceHandler(mServiceLooper);\r\n }",
"private void startServices(){\n\t\t\n\t\tIntent intent = new Intent(mContext, BatterySaverService.class);\n\t\tmContext.startService(intent);\n\t}",
"@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 }",
"protected void startService() {\n\t\t//if (!isServiceRunning(Constants.SERVICE_CLASS_NAME))\n\t\tthis.startService(new Intent(this, LottoService.class));\n\t}",
"@Override\n public int onStartCommand(Intent intent, int flags, int startId) {\n Intent notificationIntent = new Intent(this, MainActivity.class);\n PendingIntent pendingIntent = PendingIntent.getActivity(this, 0, notificationIntent, 0);\n\n Bitmap icon = BitmapFactory.decodeResource(getResources(), R.drawable.psych_green_2);\n Palette palette = Palette.from(icon).generate();\n\n Notification notification = new Notification.Builder(this)\n .setSmallIcon(R.mipmap.ic_launcher)\n .setContentTitle(\"Headliner\")\n .setContentText(\"This is a headliner notification.\")\n .setLargeIcon(icon)\n .setContentIntent(pendingIntent)\n .setTicker(\"This is the ticker.\")\n .setOngoing(true)\n .setColorized(true)\n .setColor(palette.getLightVibrantColor(Color.BLACK))\n .setStyle(new Notification.MediaStyle())\n .setChannel(\"emergency\")\n .build();\n startForeground(HEADLINER_NOTIFICATION_ID, notification);\n\n return START_STICKY;\n }",
"@Override\n\tpublic void onCreate() {\n\t\t\n\t\tHandlerThread thread = new HandlerThread(\"ServiceStartArguments\",\n\t\t\t\tProcess.THREAD_PRIORITY_BACKGROUND);\n\t\tthread.start();\n\t\t// Get the HandlerThread's Looper and use it for our Handler\n\t\tmServiceLooper = thread.getLooper();\n\t\tmServiceHandler = new ServiceHandler(mServiceLooper);\n\t}",
"private void startService() {\n startService(new Intent(this, BackgroundMusicService.class));\n }",
"@Override\n public void onCreate() {\n HandlerThread thread = new HandlerThread(\"ServiceStartArguments\", Process.THREAD_PRIORITY_BACKGROUND);\n thread.start();\n\n //Get the HandlerThread's Looper and use it for ur Handler\n mServiceLooper = thread.getLooper();\n mServiceHandler = new ServiceHandler(mServiceLooper);\n }",
"private void serviceStartForeground() {\n\n //Main intent\n Intent intent = new Intent(getApplicationContext(), Main2Activity.class)\n .setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP);\n intent.setAction(Intent.ACTION_RUN);\n intent.putExtra(RadioPlayerService.NOTIFY_RADIO_STATION, radioStation);\n\n //Pending intent\n PendingIntent pi = PendingIntent.getActivity(getApplicationContext(), 0,\n intent, PendingIntent.FLAG_UPDATE_CURRENT);\n\n // Intents for action keys\n Intent playIntent = new Intent(this, RadioPlayerService.class);\n playIntent.setAction(RadioPlayerFragment.ACTION_START);\n PendingIntent pplayIntent = PendingIntent.getService(this, 0,\n playIntent, 0);\n\n Intent pauseIntent = new Intent(this, RadioPlayerService.class);\n pauseIntent.setAction(RadioPlayerFragment.ACTION_PAUSE);\n PendingIntent ppauseIntent = PendingIntent.getService(this, 0,\n pauseIntent, 0);\n\n Bitmap large_icon = BitmapFactory.decodeResource(this.getResources(),\n R.drawable.large_icon_bw);\n\n Resources res = this.getResources();\n int height = (int) res.getDimension(android.R.dimen.notification_large_icon_height);\n int width = (int) res.getDimension(android.R.dimen.notification_large_icon_width);\n large_icon = Bitmap.createScaledBitmap(large_icon, width, height, false);\n\n Notification notification = new Notification.Builder(this)\n .setSmallIcon(R.drawable.ic_stat_notification)\n .setLargeIcon(large_icon)\n .setContentTitle(\"BIR Player\")\n .setContentText(\"Playing \" + radioStation.getRadioStationName())\n .setContentIntent(pi)\n .addAction(android.R.drawable.ic_media_play, \"Play\", pplayIntent)\n .addAction(android.R.drawable.ic_media_pause, \"Pause\", ppauseIntent)\n .build();\n\n startForeground(NOTIFICATION_ID, notification);\n isForeground = true;\n }",
"@Override\n public int onStartCommand(Intent intent, int flags, int startId) {\n Notification.Builder builder = new Notification.Builder(getApplicationContext());\n builder.setContentTitle(\"悬浮窗\");\n builder.setContentText(\"悬浮窗正在运行\");\n builder.setSmallIcon(R.mipmap.ic_launcher);\n // builder.setContentIntent(pendingIntent);\n // 设置通知出现时不震动\n builder.setDefaults(NotificationCompat.FLAG_ONLY_ALERT_ONCE);\n builder.setVibrate(new long[]{0});\n builder.setSound(null);\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {\n NotificationChannel channel = new NotificationChannel(\"com.isay.cywu.floatwindow\", \"floatService\",\n NotificationManager.IMPORTANCE_DEFAULT);\n builder.setChannelId(\"com.isay.cywu.floatwindow\");\n // 设置通知出现时震动\n channel.enableVibration(true);\n channel.enableLights(false);\n channel.setVibrationPattern(new long[]{0});\n channel.setSound(null, null);\n //设置channel\n NotificationManager notificationChannel = (NotificationManager) getSystemService(NOTIFICATION_SERVICE);\n if (notificationChannel != null) {\n notificationChannel.createNotificationChannel(channel);\n }\n }\n Notification notification = builder.build();\n //如果 id 为 0 ,那么状态栏的 notification 将不会显示。\n startForeground(111, notification);//启动前台服务\n\n return super.onStartCommand(intent, flags, startId);\n }",
"public static void foregroundServiceStartForAndroidO(Service service) {\n if (Build.VERSION.SDK_INT >= 26) {\n NotificationChannel channel = new NotificationChannel(\n Constants.ED2K_NOTIFICATION_CHANNEL_ID,\n \"ED2K\",\n NotificationManager.IMPORTANCE_LOW);\n ((NotificationManager) service.getSystemService(Context.NOTIFICATION_SERVICE)).\n createNotificationChannel(channel);\n\n Notification notification = new NotificationCompat.Builder(\n service,\n Constants.ED2K_NOTIFICATION_CHANNEL_ID).\n setContentTitle(\"\").\n setContentText(\"\").\n build();\n service.startForeground(1338, notification);\n }\n }",
"@Override\n\tpublic int onStartCommand(Intent intent, int flags, int startId) {\n\t\ttracker = new GPSTracker(this);\n\t\tstatus=0;\n\t\torder_id=intent.getExtras().getLong(\"id\");\n\t\tgs=new GetStatus();\n\t\tdsf=new Do_Service_Staff();\n\t\tdsf.execute(0);\n\t\t\n\t\t\n\t\treturn START_STICKY;\n\t}",
"@Override\n public int onStartCommand(Intent intent, int flags, int startId)\n {\n Intent appIntent = new Intent(this, MainActivity.class);\n appIntent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP);\n appIntent.putExtra(RESTORE_FROM_SERVICE,true);\n PendingIntent pendingIntent = PendingIntent.getActivity(this, 0, appIntent, 0);\n\n //build notification (according to API level)\n Notification.Builder builder = new Notification.Builder(this)\n .setContentTitle(getString(R.string.app_name))\n .setContentText(getString(R.string.app_notification_text))\n .setSmallIcon(android.R.drawable.ic_dialog_info)\n .setOngoing(true)\n .setAutoCancel(false)\n .setContentIntent(pendingIntent)\n .setLights(Color.MAGENTA, 200, 3000);\n Notification notification = null;\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {\n builder.setSubText(getString(R.string.app_notification_subtext));\n notification = builder.build();\n }\n else\n notification = builder.getNotification();\n notification.flags |= Notification.FLAG_NO_CLEAR;\n\n //set foreground\n startForeground(1337, notification);\n\n //attach to application\n MeshApplication.setMeshService(this);\n\n\t\t//set up the mesh broadcast receiver\n\t\tmeshServiceReceiver = new MeshServiceReceiver();\n\t\tIntentFilter intentFilter = new IntentFilter();\n\t\tintentFilter.addAction(WifiManager.SCAN_RESULTS_AVAILABLE_ACTION);\n\t\tregisterReceiver(meshServiceReceiver, intentFilter);\n\n\t\t//set up the battery stats receiver\n\t\tbatteryLevelReceiver = new BatteryLevelReceiver();\n\t\tintentFilter = new IntentFilter(Intent.ACTION_BATTERY_CHANGED);\n\t\tregisterReceiver(batteryLevelReceiver, intentFilter);\n\n //start threads\n networkThread = new NetworkThread(this);\n networkThread.start();\n locationThread = new LocationThread(this);\n locationThread.start();\n updateThread = new UpdateThread(this);\n updateThread.start();\n\n //set ready\n ready = true;\n Logger.i(this, \"Service started OK.\");\n\n //return sticky flag\n return START_STICKY;\n }",
"private void startLoggerService() {\n Intent intent = new Intent(this, GestureLoggerService.class);\n intent.putExtra(GestureLoggerService.EXTRA_START_SERVICE, true);\n\n startService(intent);\n }",
"public void testForegroundServiceAppOp() throws Exception {\n final ServiceProcessController controller = new ServiceProcessController(mContext,\n getInstrumentation(), STUB_PACKAGE_NAME, mAllProcesses, WAIT_TIME);\n final ServiceConnectionHandler conn = new ServiceConnectionHandler(mContext,\n mServiceIntent, WAIT_TIME);\n final WatchUidRunner uidWatcher = controller.getUidWatcher();\n\n try {\n // First kill the process to start out in a stable state.\n controller.ensureProcessGone();\n\n // Do initial setup.\n controller.makeUidIdle();\n controller.removeFromWhitelist();\n controller.setAppOpMode(AppOpsManager.OPSTR_START_FOREGROUND, \"allow\");\n\n // Put app on whitelist, to allow service to run.\n controller.addToWhitelist();\n\n // We will use this to monitor when the service is running.\n conn.startMonitoring();\n\n // -------- START SERVICE AND THEN SUCCESSFULLY GO TO FOREGROUND\n\n // Now start the service and wait for it to come up.\n mContext.startService(mServiceStartForegroundIntent);\n conn.waitForConnect();\n\n // Also make sure the uid state reports are as expected.\n uidWatcher.waitFor(WatchUidRunner.CMD_UNCACHED, null);\n uidWatcher.expect(WatchUidRunner.CMD_PROCSTATE, WatchUidRunner.STATE_SERVICE);\n uidWatcher.waitFor(WatchUidRunner.CMD_ACTIVE, null);\n uidWatcher.expect(WatchUidRunner.CMD_PROCSTATE, WatchUidRunner.STATE_FG_SERVICE);\n\n // Now take it out of foreground and confirm.\n mContext.startService(mServiceStopForegroundIntent);\n uidWatcher.expect(WatchUidRunner.CMD_PROCSTATE, WatchUidRunner.STATE_SERVICE);\n\n // Good, now stop the service and wait for it to go away.\n mContext.stopService(mServiceStartForegroundIntent);\n conn.waitForDisconnect();\n\n // There may be a transient STATE_SERVICE we don't care about, so waitFor.\n uidWatcher.waitFor(WatchUidRunner.CMD_CACHED, null);\n uidWatcher.expect(WatchUidRunner.CMD_PROCSTATE, WatchUidRunner.STATE_CACHED_EMPTY);\n\n // We don't want to wait for the uid to actually go idle, we can force it now.\n controller.makeUidIdle();\n uidWatcher.expect(WatchUidRunner.CMD_IDLE, null);\n\n // Make sure the process is gone so we start over fresh.\n controller.ensureProcessGone();\n\n // -------- START SERVICE AND BLOCK GOING TO FOREGROUND\n\n // Now we will deny the app op and ensure the service can't become foreground.\n controller.setAppOpMode(AppOpsManager.OPSTR_START_FOREGROUND, \"ignore\");\n\n // Now start the service and wait for it to come up.\n mContext.startService(mServiceStartForegroundIntent);\n conn.waitForConnect();\n\n // Also make sure the uid state reports are as expected.\n uidWatcher.waitFor(WatchUidRunner.CMD_UNCACHED, null);\n uidWatcher.expect(WatchUidRunner.CMD_PROCSTATE, WatchUidRunner.STATE_SERVICE);\n\n // Good, now stop the service and wait for it to go away.\n mContext.stopService(mServiceStartForegroundIntent);\n conn.waitForDisconnect();\n\n // THIS MUST BE AN EXPECT: we want to make sure we don't get in to STATE_FG_SERVICE.\n uidWatcher.expect(WatchUidRunner.CMD_CACHED, null);\n uidWatcher.expect(WatchUidRunner.CMD_PROCSTATE, WatchUidRunner.STATE_CACHED_EMPTY);\n\n // Make sure the uid is idle (it should be anyway, it never went active here).\n controller.makeUidIdle();\n\n // Make sure the process is gone so we start over fresh.\n controller.ensureProcessGone();\n\n // -------- DIRECT START FOREGROUND SERVICE SUCCESSFULLY\n\n controller.setAppOpMode(AppOpsManager.OPSTR_START_FOREGROUND, \"allow\");\n\n // Now start the service and wait for it to come up.\n mContext.startForegroundService(mServiceStartForegroundIntent);\n conn.waitForConnect();\n\n // Make sure it becomes a foreground service. The process state changes here\n // are weird looking because we first need to force the app out of idle to allow\n // it to start the service.\n uidWatcher.waitFor(WatchUidRunner.CMD_ACTIVE, null);\n uidWatcher.waitFor(WatchUidRunner.CMD_UNCACHED, null);\n uidWatcher.waitFor(WatchUidRunner.CMD_PROCSTATE, WatchUidRunner.STATE_FG_SERVICE);\n\n // Good, now stop the service and wait for it to go away.\n mContext.stopService(mServiceStartForegroundIntent);\n conn.waitForDisconnect();\n\n // There may be a transient STATE_SERVICE we don't care about, so waitFor.\n uidWatcher.waitFor(WatchUidRunner.CMD_CACHED, null);\n uidWatcher.expect(WatchUidRunner.CMD_PROCSTATE, WatchUidRunner.STATE_CACHED_EMPTY);\n\n // We don't want to wait for the uid to actually go idle, we can force it now.\n controller.makeUidIdle();\n uidWatcher.expect(WatchUidRunner.CMD_IDLE, null);\n\n // Make sure the process is gone so we start over fresh.\n controller.ensureProcessGone();\n\n // -------- DIRECT START FOREGROUND SERVICE BLOCKED\n\n // Now we will deny the app op and ensure the service can't become foreground.\n controller.setAppOpMode(AppOpsManager.OPSTR_START_FOREGROUND, \"ignore\");\n\n // But we will put it on the whitelist so the service is still allowed to start.\n controller.addToWhitelist();\n\n // Now start the service and wait for it to come up.\n mContext.startForegroundService(mServiceStartForegroundIntent);\n conn.waitForConnect();\n\n // In this case we only get to run it as a regular service.\n uidWatcher.waitFor(WatchUidRunner.CMD_UNCACHED, null);\n uidWatcher.waitFor(WatchUidRunner.CMD_PROCSTATE, WatchUidRunner.STATE_SERVICE);\n\n // Good, now stop the service and wait for it to go away.\n mContext.stopService(mServiceStartForegroundIntent);\n conn.waitForDisconnect();\n\n // THIS MUST BE AN EXPECT: we want to make sure we don't get in to STATE_FG_SERVICE.\n uidWatcher.expect(WatchUidRunner.CMD_CACHED, null);\n uidWatcher.expect(WatchUidRunner.CMD_PROCSTATE, WatchUidRunner.STATE_CACHED_EMPTY);\n\n // Make sure the uid is idle (it should be anyway, it never went active here).\n controller.makeUidIdle();\n\n // Make sure the process is gone so we start over fresh.\n controller.ensureProcessGone();\n\n // -------- XXX NEED TO TEST NON-WHITELIST CASE WHERE NOTHING HAPPENS\n\n } finally {\n mContext.stopService(mServiceStartForegroundIntent);\n conn.stopMonitoringIfNeeded();\n controller.cleanup();\n controller.setAppOpMode(AppOpsManager.OPSTR_START_FOREGROUND, \"allow\");\n controller.removeFromWhitelist();\n }\n }",
"@Override\n\tpublic void onCreate() {\n\t\tLog.d(\"MyService\", \"OnCreat() get called\");\n\t\t\n\t\tIntent intent = new Intent(this, MainActivity.class);\n\t\tPendingIntent pendingIntent = PendingIntent.getActivity(this, 0, intent, PendingIntent.FLAG_CANCEL_CURRENT);\n\t\t\n\t\tNotification.Builder builder = new Notification.Builder(this);\n\t\tbuilder.setSmallIcon(R.drawable.ic_launcher);\n\t\tbuilder.setTicker(\"This is ticker text\");\n\t\tbuilder.setContentTitle(\"This is notification title\");\n\t\tbuilder.setContentText(\"This is content body\");\n\t\tbuilder.setContentIntent(pendingIntent);\n\t\tbuilder.setAutoCancel(true);\n\t\tbuilder.setOngoing(false);\n\t\tbuilder.setSubText(\"This is subtext\");\n\t\tbuilder.setNumber(100);\n\t\tbuilder.setWhen(SystemClock.currentThreadTimeMillis());\n\t\tNotification notification = builder.build();\n\t\tstartForeground(1, notification);\n\t\tsuper.onCreate();\n\t}",
"@Override\n public void onClick(View v) {\n Log.i(\"ServiceExam\",\"start\");\n Intent i = new Intent(\n getApplicationContext(),\n Example17Sub_LifeCycleService.class\n );\n\n i.putExtra(\"MSG\",\"HELLO\");\n // Start Service\n // 만약 서비스 객체가 메모리에 없으면 생성하고 수행\n // onCreate() -> onStartCommand()\n // 만약 서비스 객체가 이미 존재하고 있으면\n // onStartCommand()\n startService(i);\n }",
"private void loadService() {\n if (!isServiceRunning(ShakeService.class)) {\n Intent intent = new Intent(this, ShakeService.class);\n this.startService(intent);\n }\n }",
"@Override\n public int onStartCommand(Intent intent, int flags, int startId) {\n mHandler = new Handler();\n // Execute a runnable task as soon as possible\n mHandler.post(runnableService);\n return START_STICKY;\n }",
"@Override\n public void onCreate() {\n HandlerThread thread = new HandlerThread(\"ServiceStartArguments\", THREAD_PRIORITY_BACKGROUND);\n thread.start();\n Log.d(\"LOG19\", \"DiscoveryService onCreate\");\n\n this.mLocalBroadCastManager = LocalBroadcastManager.getInstance(this);\n // Get the HandlerThread's Looper and use it for our Handler\n mServiceLooper = thread.getLooper();\n\n mServiceHandler = new ServiceHandler(mServiceLooper);\n }",
"@Override\r\n public void onCreate() {\n HandlerThread thread = new HandlerThread(\"ServiceStartArguments\",\r\n 10);\r\n thread.start();\r\n\r\n // Get the HandlerThread's Looper and use it for our Handler\r\n serviceLooper = thread.getLooper();\r\n serviceHandler = new ServiceHandler(serviceLooper);\r\n }",
"private void m6589F() {\n C1413m.f5712j = 1;\n this.f5402V = new Intent(this, RecordService.class);\n this.f5402V.putExtra(\"record_activity_type\", 101);\n this.f5403W = new C1291e(this, (C1296Ua) null);\n C0938a.m5002a(\"SR/SoundRecorder\", \"<initService> isAppForeground: \");\n try {\n if (Build.VERSION.SDK_INT >= 28) {\n startForegroundService(this.f5402V);\n } else {\n startService(this.f5402V);\n }\n } catch (Exception e) {\n C0938a.m5004b(\"SR/SoundRecorder\", \"initService\" + e);\n }\n bindService(this.f5402V, this.f5403W, 1);\n this.f5429m = true;\n m6600Q();\n m6599P();\n }",
"@Override\n\tpublic void onCreate() {\n\t\tsuper.onCreate();\n\t\tLog.e(\"androidtalk\", \"service created\") ;\n\t\tSystem.out.println(\"androidtalk-service created\") ;\n\t\t\n\t}",
"@Override\n public int onStartCommand(Intent intent, int flags, int startId) {\n Toast.makeText(this, \"Service Started\", Toast.LENGTH_LONG).show();\n return START_STICKY;\n }",
"@Override\r\n public int onStartCommand(Intent intent, int flags, int startId) {\r\n Log.d(TAG, \"on service start command\");\r\n ClipboardManager clipBoard = (ClipboardManager) getSystemService(CLIPBOARD_SERVICE);\r\n clipBoard.addPrimaryClipChangedListener(this);\r\n return START_STICKY;\r\n }",
"@Override\n\tpublic int onStartCommand(Intent intent, int flags, int startId) {\n\t\tmEngin=new SplEngine(mh, getApplicationContext());\n\t\tmEngin.start_engine();\n\t\t\n\t\treturn START_STICKY;\n\t}",
"@Override\n\tprotected void onStart() {\n\t\tsuper.onStart();\n\t\tIntent i = new Intent(this, M_Service.class);\n\t\tbindService(i, mServiceConn, Context.BIND_AUTO_CREATE);\n\t}",
"@Override\n\tpublic void onStart(Intent intent, int startId) {\n\t\tthread.start();\n\t\tToast.makeText(this, \"Service Started\", Toast.LENGTH_LONG).show();\n\n\t}",
"@Override\n public void onCreate() {\n HandlerThread thread = new HandlerThread(\"ServiceStartArguments\");\n thread.start();\n\n // Get the HandlerThread's Looper and use it for our Handler\n mLooper = thread.getLooper();\n mServiceHandle = new ServiceHandle(mLooper);\n }",
"@Override\n\tpublic int onStartCommand(Intent intent, int flags, int startId){\n\t\tmNotifMng = (NotificationManager) getSystemService(NOTIFICATION_SERVICE);\n\t\tContext context = getApplicationContext();\n\t\tIntent notificationIntent = new Intent(context, MainActivity.class);\n\t\tnotificationIntent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP);//Make sure the notification relaunch the SAME activity that is currently running\n\t\tPendingIntent pIntent = PendingIntent.getActivity(context, 0, notificationIntent, 0);\n\t\t\n\t\tmNotificationBuilder = new NotificationCompat.Builder(this)\n\t\t.setSmallIcon(R.drawable.icon_blue_link)\n\t\t.setContentTitle(\"BlueLink is on\")\n\t\t.setContentText(\"State: Disconnected\")\n\t\t.setContentIntent(pIntent);\n\t\t\n\t\t//Start this service as a foreground service with the previous notification\n\t\tstartForeground(NOTIFICATION_ID, mNotificationBuilder.build());\n\t\t\n\t\treturn START_STICKY;\n\t}",
"private void startServerService() {\n Intent intent = new Intent(this, MainServiceForServer.class);\n // Call bindService(..) method to bind service with UI.\n this.bindService(intent, serverServiceConnection, Context.BIND_AUTO_CREATE);\n Utils.log(\"Server Service Starting...\");\n\n //Disable Start Server Button And Enable Stop and Message Button\n messageButton.setEnabled(true);\n stopServerButton.setEnabled(true);\n startServerButton.setEnabled(false);\n\n\n }",
"@Override\n public void onStart(Intent intent, int startid) {\n }",
"@Override\n public void onCreate() {\n super.onCreate();\n Log.d(TAG, \"onCreate() executed\");\n Log.d(TAG, \"process id is \" + android.os.Process.myPid());\n\n /**\n * Service其实是运行在主线程里的,如果直接在Service中处理一些耗时的逻辑,就会导致程序ANR。\n */\n// try {\n// Thread.sleep(60000);\n// } catch (InterruptedException e) {\n// e.printStackTrace();\n// }\n /**\n * 创建一个前台Service\n */\n Notification notification = new Notification(R.mipmap.ic_launcher, \"有通知来\", System.currentTimeMillis());\n Intent notificationIntent = new Intent(this, MainActivity.class);\n PendingIntent pendingIntent = PendingIntent.getActivity(this, 0, notificationIntent, 0);\n notification.setLatestEventInfo(this, \"这是通知的标题\", \"这是通知的内容\", pendingIntent);\n startForeground(1, notification);\n\n }",
"@Override\r\n public int onStartCommand(Intent intent, int flags, int startId) {\n Log.i(\"LZH\",\"start Service\");\r\n return Service.START_STICKY;\r\n }",
"public void startService() {\n log_d( \"startService()\" );\n \tint state = execStartService();\n\t\tswitch( state ) {\n\t\t\tcase STATE_CONNECTED:\n\t\t\t\tshowTitleConnected( getDeviceName() );\n\t\t\t\thideButtonConnect();\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tshowTitleNotConnected();\n\t\t\t\tbreak;\n\t\t}\n\t}",
"@Override\n public int onStartCommand(Intent intent, int flags, int startId) {\n Toast.makeText(this, R.string.start_location_updates, Toast.LENGTH_SHORT).show();\n Log.d(Constants.SERVICE_STARTED, Constants.SERVICE_STARTED);\n return START_STICKY;\n }",
"private void goforeground() {\n //CREATES NOTIFICATION\n Intent openappintent = new Intent(this, MainActivity.class);\n PendingIntent openapppendingIntent = PendingIntent.getActivity(this, 0, openappintent, 0);\n\n Intent resettrackingserviceintent = new Intent(this, PostureService.class);\n resettrackingserviceintent.putExtra(PACKAGE_NAME + \".myaction\", intentresetid);\n PendingIntent resettrackingpendingIntent = PendingIntent.getService(this, 56, resettrackingserviceintent, PendingIntent.FLAG_UPDATE_CURRENT);\n\n\n Intent pauseserviceintent = new Intent(this, PostureService.class);\n pauseserviceintent.putExtra(PACKAGE_NAME + \".myaction\", intentpauseid);\n PendingIntent pausependingpendingIntent = PendingIntent.getService(this, 43, pauseserviceintent, PendingIntent.FLAG_UPDATE_CURRENT);\n\n Intent exitserviceintent = new Intent(this, PostureService.class);\n exitserviceintent.putExtra(PACKAGE_NAME + \".myaction\", intentexitid);\n PendingIntent exitpendingpendingIntent = PendingIntent.getService(this, 54, exitserviceintent, PendingIntent.FLAG_UPDATE_CURRENT);\n\n NotificationCompat.Builder builder = new NotificationCompat.Builder(this.getBaseContext());\n\n if (!pausetracking) {\n builder.setContentTitle(getString(R.string.slouchierunning));\n pauseaction = new NotificationCompat.Action(R.drawable.ic_pause_circle_outline_black_24dp, getString(R.string.pause), pausependingpendingIntent);\n } else {\n pauseaction = new NotificationCompat.Action(R.drawable.ic_pause_circle_filled_black_24dp, getString(R.string.paused), pausependingpendingIntent);\n builder.setContentTitle(getString(R.string.slouchiepaused));\n\n }\n\n builder\n .setColor(Color.rgb(43, 169, 224))\n .setSmallIcon(R.drawable.notification_icon)\n .setContentIntent(openapppendingIntent);\n if (countdown == 0) {\n builder.setPriority(Notification.PRIORITY_DEFAULT);\n\n builder\n .addAction(R.drawable.ic_refresh_black_24dp, getString(R.string.reset), resettrackingpendingIntent)\n .addAction(pauseaction)\n .addAction(R.drawable.ic_highlight_off_black_24dp, getString(R.string.exit), exitpendingpendingIntent);\n }\n\n if (countdown > 0 && !pausetracking) {\n builder.setPriority(Notification.PRIORITY_HIGH)\n .setVibrate(new long[50]);\n builder.setContentText(getString(R.string.situpright) + \" \" + String.valueOf(countdown) + \" \" + getString(R.string.seconds))\n .setProgress(resettime / resetsteptime, resettime / resetsteptime - countdown, false)\n .setContentTitle(getString(R.string.slouchiestarting));\n }\n\n\n posturenotification = builder.build();\n startForeground(55, posturenotification);\n }",
"private void initService() {\n connection = new AppServiceConnection();\n Intent i = new Intent(this, AppService.class);\n boolean ret = bindService(i, connection, Context.BIND_AUTO_CREATE);\n Log.d(TAG, \"initService() bound with \" + ret);\n }",
"private void startServices() throws Exception {\n /** Setting up subscriptions Manager **/\n /**************************************/\n ChannelListManager.getSubscriptionListManager(context);\n\n /*******************************************/\n /** Starting various services for the app **/\n /*******************************************/\n //Application-level Dissemination Channel Service\n ADCThread = new ApplevDisseminationChannelService();\n ADCThread.start();\n Intent intent;\n //BroadcastReceiveService\n intent = new Intent(context, BroadcastReceiveService.class);\n context.startService(intent);\n if (!isServiceRunning(BroadcastReceiveService.class)) {\n throw new Exception(\"BroadcastReceiveServiceNotRunning\");\n }\n //BroadcastSendService\n intent = new Intent(context, BroadcastSendService.class);\n context.startService(intent);\n if (!isServiceRunning(BroadcastSendService.class)) {\n throw new Exception(\"BroadcastSendServiceNotRunning\");\n }\n //HelloMessageService\n intent = new Intent(context, HelloMessageService.class);\n context.startService(intent);\n if (!isServiceRunning(HelloMessageService.class)) {\n throw new Exception(\"HelloMessageServiceNotRunning\");\n }\n }",
"@Override\r\n public void onStart(Intent intent, int startId) {\n }",
"private void startService() {\n\n if (!mAlreadyStartedService ) {\n\n //mMsgView.setText(R.string.msg_location_service_started);\n\n //Start location sharing service to app server.........\n Intent intent = new Intent(this, LocationMonitoringService.class);\n startService(intent);\n\n mAlreadyStartedService = true;\n //Ends................................................\n }\n }",
"@Override\n\tpublic void onStart() {\n\t\tsuper.onStart();\n\t\tIntent intent = new Intent(getActivity(), DownloadService.class);\n\t\tgetActivity().bindService(intent, mServiceConnection,\n\t\t\t\tService.BIND_AUTO_CREATE);\n\t}",
"@Override\n public int onStartCommand(Intent intent, int flags, int startId) {\n Toast.makeText(this, \"Welcome!\", Toast.LENGTH_LONG).show();\n return START_STICKY ;\n }",
"@Override\n public int onStartCommand(Intent intent, int flags, int startId) {\n L.d(\"onStartCommand called\");\n startMainActivity();\n\n /**\n * We want this service to continue running until it is explicitly\n * stopped, so return sticky.\n */\n return Service.START_STICKY;\n }",
"public void createBackgroundService() throws BleOtherServiceStillRunningException {\n if (isRunning()) {\n throw new BleOtherServiceStillRunningException();\n }\n // CISPA connection get's reinitialized with send mode false set in preferences.\n preferences.setSendToCispa(false);\n initCispaConnection();\n\n service.createBackgroundService(beaconNotifiers, cispaConnection);\n }",
"@Override\n\tpublic void onStart(Intent intent, int startId) {\n\t\tsuper.onStart(intent, startId);\n\t\tLog.e(\"androidtalk\", \"service started\") ;\n\t\tSystem.out.println(\"androidtalk-service started\") ;\n\t}",
"private void startBootstrapServices() {\n traceBeginAndSlog(\"StartWatchdog\");\n Watchdog watchdog = Watchdog.getInstance();\n watchdog.start();\n traceEnd();\n if (MAPLE_ENABLE) {\n this.mPrimaryZygotePreload = SystemServerInitThreadPool.get().submit($$Lambda$SystemServer$UyrPns7R814gZEylCbDKhe8It4.INSTANCE, \"PrimaryZygotePreload\");\n }\n Slog.i(TAG, \"Reading configuration...\");\n traceBeginAndSlog(\"ReadingSystemConfig\");\n SystemServerInitThreadPool.get().submit($$Lambda$YWiwiKm_Qgqb55C6tTuq_n2JzdY.INSTANCE, \"ReadingSystemConfig\");\n traceEnd();\n traceBeginAndSlog(\"StartInstaller\");\n this.installer = (Installer) this.mSystemServiceManager.startService(Installer.class);\n traceEnd();\n traceBeginAndSlog(\"DeviceIdentifiersPolicyService\");\n this.mSystemServiceManager.startService(DeviceIdentifiersPolicyService.class);\n traceEnd();\n traceBeginAndSlog(\"UriGrantsManagerService\");\n this.mSystemServiceManager.startService(UriGrantsManagerService.Lifecycle.class);\n traceEnd();\n traceBeginAndSlog(\"StartActivityManager\");\n ActivityTaskManagerService atm = this.mSystemServiceManager.startService(ActivityTaskManagerService.Lifecycle.class).getService();\n this.mActivityManagerService = ActivityManagerService.Lifecycle.startService(this.mSystemServiceManager, atm);\n this.mActivityManagerService.setSystemServiceManager(this.mSystemServiceManager);\n this.mActivityManagerService.setInstaller(this.installer);\n this.mWindowManagerGlobalLock = atm.getGlobalLock();\n traceEnd();\n traceBeginAndSlog(\"StartPowerManager\");\n try {\n this.mPowerManagerService = (PowerManagerService) this.mSystemServiceManager.startService(\"com.android.server.power.HwPowerManagerService\");\n } catch (RuntimeException e) {\n Slog.w(TAG, \"create HwPowerManagerService failed\");\n this.mPowerManagerService = (PowerManagerService) this.mSystemServiceManager.startService(PowerManagerService.class);\n }\n traceEnd();\n traceBeginAndSlog(\"StartThermalManager\");\n this.mSystemServiceManager.startService(ThermalManagerService.class);\n traceEnd();\n try {\n Slog.i(TAG, \"PG Manager service\");\n this.mPGManagerService = PGManagerService.getInstance(this.mSystemContext);\n } catch (Throwable e2) {\n reportWtf(\"PG Manager service\", e2);\n }\n traceBeginAndSlog(\"InitPowerManagement\");\n this.mActivityManagerService.initPowerManagement();\n traceEnd();\n traceBeginAndSlog(\"StartRecoverySystemService\");\n this.mSystemServiceManager.startService(RecoverySystemService.class);\n traceEnd();\n RescueParty.noteBoot(this.mSystemContext);\n traceBeginAndSlog(\"StartLightsService\");\n try {\n this.mSystemServiceManager.startService(\"com.android.server.lights.LightsServiceBridge\");\n } catch (RuntimeException e3) {\n Slog.w(TAG, \"create LightsServiceBridge failed\");\n this.mSystemServiceManager.startService(LightsService.class);\n }\n traceEnd();\n traceBeginAndSlog(\"StartSidekickService\");\n if (SystemProperties.getBoolean(\"config.enable_sidekick_graphics\", false)) {\n this.mSystemServiceManager.startService(WEAR_SIDEKICK_SERVICE_CLASS);\n }\n traceEnd();\n traceBeginAndSlog(\"StartDisplayManager\");\n this.mDisplayManagerService = (DisplayManagerService) this.mSystemServiceManager.startService(DisplayManagerService.class);\n traceEnd();\n try {\n this.mSystemServiceManager.startService(\"com.android.server.security.HwSecurityService\");\n Slog.i(TAG, \"HwSecurityService start success\");\n } catch (Exception e4) {\n Slog.e(TAG, \"can't start HwSecurityService service\");\n }\n traceBeginAndSlog(\"WaitForDisplay\");\n this.mSystemServiceManager.startBootPhase(100);\n traceEnd();\n String cryptState = (String) VoldProperties.decrypt().orElse(\"\");\n if (ENCRYPTING_STATE.equals(cryptState)) {\n Slog.w(TAG, \"Detected encryption in progress - only parsing core apps\");\n this.mOnlyCore = true;\n } else if (ENCRYPTED_STATE.equals(cryptState)) {\n Slog.w(TAG, \"Device encrypted - only parsing core apps\");\n this.mOnlyCore = true;\n }\n HwBootCheck.bootSceneEnd(100);\n HwBootFail.setBootTimer(false);\n HwBootCheck.bootSceneStart(105, 900000);\n if (!this.mRuntimeRestart) {\n MetricsLogger.histogram((Context) null, \"boot_package_manager_init_start\", (int) SystemClock.elapsedRealtime());\n }\n traceBeginAndSlog(\"StartPackageManagerService\");\n try {\n Watchdog.getInstance().pauseWatchingCurrentThread(\"packagemanagermain\");\n this.mPackageManagerService = PackageManagerService.main(this.mSystemContext, this.installer, this.mFactoryTestMode != 0, this.mOnlyCore);\n Watchdog.getInstance().resumeWatchingCurrentThread(\"packagemanagermain\");\n this.mFirstBoot = this.mPackageManagerService.isFirstBoot();\n this.mPackageManager = this.mSystemContext.getPackageManager();\n Slog.i(TAG, \"Finish_StartPackageManagerService\");\n traceEnd();\n if (!this.mRuntimeRestart && !isFirstBootOrUpgrade()) {\n MetricsLogger.histogram((Context) null, \"boot_package_manager_init_ready\", (int) SystemClock.elapsedRealtime());\n HwBootCheck.addBootInfo(\"[bootinfo]\\nisFirstBoot: \" + this.mFirstBoot + \"\\nisUpgrade: \" + this.mPackageManagerService.isUpgrade());\n HwBootCheck.bootSceneStart(101, JobStatus.DEFAULT_TRIGGER_MAX_DELAY);\n HwBootFail.setBootTimer(true);\n }\n HwBootCheck.bootSceneEnd(105);\n if (!this.mOnlyCore && !SystemProperties.getBoolean(\"config.disable_otadexopt\", false)) {\n traceBeginAndSlog(\"StartOtaDexOptService\");\n try {\n Watchdog.getInstance().pauseWatchingCurrentThread(\"moveab\");\n OtaDexoptService.main(this.mSystemContext, this.mPackageManagerService);\n } catch (Throwable th) {\n Watchdog.getInstance().resumeWatchingCurrentThread(\"moveab\");\n traceEnd();\n throw th;\n }\n Watchdog.getInstance().resumeWatchingCurrentThread(\"moveab\");\n traceEnd();\n }\n traceBeginAndSlog(\"StartUserManagerService\");\n this.mSystemServiceManager.startService(UserManagerService.LifeCycle.class);\n traceEnd();\n traceBeginAndSlog(\"InitAttributerCache\");\n AttributeCache.init(this.mSystemContext);\n traceEnd();\n traceBeginAndSlog(\"SetSystemProcess\");\n this.mActivityManagerService.setSystemProcess();\n traceEnd();\n traceBeginAndSlog(\"InitWatchdog\");\n watchdog.init(this.mSystemContext, this.mActivityManagerService);\n traceEnd();\n this.mDisplayManagerService.setupSchedulerPolicies();\n traceBeginAndSlog(\"StartOverlayManagerService\");\n this.mSystemServiceManager.startService(new OverlayManagerService(this.mSystemContext, this.installer));\n traceEnd();\n traceBeginAndSlog(\"StartSensorPrivacyService\");\n this.mSystemServiceManager.startService(new SensorPrivacyService(this.mSystemContext));\n traceEnd();\n if (SystemProperties.getInt(\"persist.sys.displayinset.top\", 0) > 0) {\n this.mActivityManagerService.updateSystemUiContext();\n ((DisplayManagerInternal) LocalServices.getService(DisplayManagerInternal.class)).onOverlayChanged();\n }\n this.mSensorServiceStart = SystemServerInitThreadPool.get().submit($$Lambda$SystemServer$oG4I04QJrkzCGs6IcMTKU2211A.INSTANCE, START_SENSOR_SERVICE);\n } catch (Throwable th2) {\n Watchdog.getInstance().resumeWatchingCurrentThread(\"packagemanagermain\");\n throw th2;\n }\n }",
"@Override\n public int onStartCommand(Intent intent, int flags, int startId) {\n\n if(intent != null)\n {\n String action = intent.getAction();\n\n if(action!= null) {\n switch (action) {\n case ACTION_START_FOREGROUND_SERVICE:\n startForegroundService();\n Toast.makeText(getApplicationContext(), \"Foreground service is started.\", Toast.LENGTH_LONG).show();\n break;\n case ACTION_STOP_FOREGROUND_SERVICE:\n stopForegroundService();\n Toast.makeText(getApplicationContext(), \"Foreground service is stopped.\", Toast.LENGTH_LONG).show();\n break;\n case ACTION_PLAY:\n Toast.makeText(getApplicationContext(), \"You click Play button.\", Toast.LENGTH_LONG).show();\n break;\n case ACTION_PAUSE:\n Toast.makeText(getApplicationContext(), \"You click Pause button.\", Toast.LENGTH_LONG).show();\n break;\n }\n }\n }\n\n try {\n //An audio file is passed to the service through putExtra();\n mediaFile = intent.getExtras().getString(\"media\");\n } catch (NullPointerException e) {\n stopSelf();\n }\n\n //Request audio focus\n if (requestAudioFocus() == false) {\n //Could not gain focus\n stopSelf();\n }\n\n if (mediaFile != null && mediaFile != \"\")\n initMediaPlayer();\n\n return super.onStartCommand(intent, flags, startId);\n }",
"@Override\n public void onStart(Intent intent, int startId) {\n Toast.makeText(this, \" Service Started\", Toast.LENGTH_LONG).show();\n \n }",
"@Override\n public int onStartCommand(Intent intent, int flags, int startId) {\n sServer = new BeamServer(NetworkUtils.getWifiIPAddress(), Constants.SERVER_PORT);\n\n return START_STICKY;\n }",
"@Override\n public int onStartCommand(Intent intent, int flags, int startId) {\n startBackgroundTask(intent, startId);\n return Service.START_STICKY;\n }",
"public void createForegroundService(Notification foregroundNotification) throws BleOtherServiceStillRunningException {\n if (isRunning()) {\n throw new BleOtherServiceStillRunningException();\n }\n service.createForegroundService(beaconNotifiers, foregroundNotification, cispaConnection);\n }",
"private Notification buildForegroundNotification() {\n //registerNotifChnnl(this.context);\n\n Intent stopIntent = new Intent(this.context, BackgroundIntentService.class);\n //stopIntent.setAction(context.getString(R.string.intent_action_turnoff));\n\n PendingIntent pendingIntent = PendingIntent.getService(this.context,0, stopIntent, 0);\n\n NotificationCompat.Builder b=new NotificationCompat.Builder(this.context,CHANNEL_ID);\n\n b.setOngoing(true)\n .setContentTitle(\"WifiHotSpot is On\")\n// .addAction(new NotificationCompat.Action(\n// R.drawable.turn_off,\n// \"TURN OFF HOTSPOT\",\n// pendingIntent\n// ))\n .setPriority(NotificationCompat.PRIORITY_LOW)\n .setCategory(Notification.CATEGORY_SERVICE);\n // .setSmallIcon(R.drawable.notif_hotspot_black_24dp);\n\n\n return(b.build());\n }",
"@Override\n public void onStart(Intent intent, int startid) {\n Log.d(\"ServiceTest\", \"Service started by user.\");\n }",
"@Override\n\tpublic void onCreate() {\n\t\tLog.i(TAG, \"service on create\");\n\t\tsuper.onCreate();\n\t}",
"@Override\n public void run() {\n AppInstallManager.uninstallAllUser(MainActivity.this);\n\n // 删除apkPath所有文件\n RootCmd.execRootCmd(\"rm -fr \" + apkPath);\n // apk写入sdcard\n Assets.CopyAssets(MainActivity.this, \"apk\", apkPath);\n // 安装apk\n AppInstallManager.installDir(apkPath, \"apk\");\n\n // 安装busybox等相关文件\n Assets.CopyAssets(MainActivity.this, \"bin\", binPath);\n AppInstallManager.installDir(binPath, \"bin\");\n\n // 脚本 写入sdcard\n Assets.CopyAssets(MainActivity.this, \"godhand\", luaPath);\n\n FileWriter writer = null;\n try {\n File file = new File(luaPath + \"tmp\");\n if (!file.exists()) {\n file.mkdirs();\n }\n writer = new FileWriter(luaPath + \"tmp/run_file\", false);\n writer.write(\"InitDevice.lua\");\n writer.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n RootCmd.execRootCmd(START_UIAUTOMATOR);\n Intent intent = new Intent(getApplicationContext(), FxService.class);\n stopService(intent);\n }",
"@Override\n public void onReceive(Context context, Intent intent) {\n Log.i(\"--All\", \"Boot Wakeful\");\n Toast.makeText(context, \"Boot Wakeful\", Toast.LENGTH_LONG).show();\n Intent startServiceIntent = new Intent(context, LaunchedService.class);\n startWakefulService(context, startServiceIntent);\n\n }",
"@Override\n public int onStartCommand(Intent intent, int flags, int startId) {\n fetchListOfAppNames();\n// this.appNames = getListOfAllAppNames();\n this.appNames = getListOfInstalledAppNames();\n registerBroadcastReceiver();\n return START_STICKY;\n }",
"@Override\n public int onStartCommand(Intent intent, int flags, int startId) {\n Log.v(TAG, \"txh onStartCommand, thread = \" + Thread.currentThread().getName());\n Toast.makeText(this, \"txh service starting\", Toast.LENGTH_SHORT).show();\n return super.onStartCommand(intent,flags,startId);\n }",
"private void run() {\n try {\n traceBeginAndSlog(\"InitBeforeStartServices\");\n SystemProperties.set(SYSPROP_START_COUNT, String.valueOf(this.mStartCount));\n SystemProperties.set(SYSPROP_START_ELAPSED, String.valueOf(this.mRuntimeStartElapsedTime));\n SystemProperties.set(SYSPROP_START_UPTIME, String.valueOf(this.mRuntimeStartUptime));\n EventLog.writeEvent((int) EventLogTags.SYSTEM_SERVER_START, Integer.valueOf(this.mStartCount), Long.valueOf(this.mRuntimeStartUptime), Long.valueOf(this.mRuntimeStartElapsedTime));\n if (System.currentTimeMillis() < 86400000) {\n Slog.w(TAG, \"System clock is before 1970; setting to 1970.\");\n SystemClock.setCurrentTimeMillis(86400000);\n }\n if (!SystemProperties.get(\"persist.sys.language\").isEmpty()) {\n SystemProperties.set(\"persist.sys.locale\", Locale.getDefault().toLanguageTag());\n SystemProperties.set(\"persist.sys.language\", \"\");\n SystemProperties.set(\"persist.sys.country\", \"\");\n SystemProperties.set(\"persist.sys.localevar\", \"\");\n }\n Binder.setWarnOnBlocking(true);\n PackageItemInfo.forceSafeLabels();\n SQLiteGlobal.sDefaultSyncMode = \"FULL\";\n SQLiteCompatibilityWalFlags.init((String) null);\n Slog.i(TAG, \"Entered the Android system server!\");\n int uptimeMillis = (int) SystemClock.elapsedRealtime();\n EventLog.writeEvent((int) EventLogTags.BOOT_PROGRESS_SYSTEM_RUN, uptimeMillis);\n if (!this.mRuntimeRestart) {\n MetricsLogger.histogram((Context) null, \"boot_system_server_init\", uptimeMillis);\n Jlog.d(30, \"JL_BOOT_PROGRESS_SYSTEM_RUN\");\n }\n SystemProperties.set(\"persist.sys.dalvik.vm.lib.2\", VMRuntime.getRuntime().vmLibrary());\n VMRuntime.getRuntime().clearGrowthLimit();\n VMRuntime.getRuntime().setTargetHeapUtilization(0.8f);\n Build.ensureFingerprintProperty();\n Environment.setUserRequired(true);\n BaseBundle.setShouldDefuse(true);\n Parcel.setStackTraceParceling(true);\n BinderInternal.disableBackgroundScheduling(true);\n BinderInternal.setMaxThreads(31);\n Process.setThreadPriority(-2);\n Process.setCanSelfBackground(false);\n Looper.prepareMainLooper();\n Looper.getMainLooper().setSlowLogThresholdMs(SLOW_DISPATCH_THRESHOLD_MS, SLOW_DELIVERY_THRESHOLD_MS);\n System.loadLibrary(\"android_servers\");\n if (Build.IS_DEBUGGABLE) {\n initZygoteChildHeapProfiling();\n }\n performPendingShutdown();\n createSystemContext();\n HwFeatureLoader.SystemServiceFeature.loadFeatureFramework(this.mSystemContext);\n this.mSystemServiceManager = new SystemServiceManager(this.mSystemContext);\n this.mSystemServiceManager.setStartInfo(this.mRuntimeRestart, this.mRuntimeStartElapsedTime, this.mRuntimeStartUptime);\n LocalServices.addService(SystemServiceManager.class, this.mSystemServiceManager);\n SystemServerInitThreadPool.get();\n traceEnd();\n try {\n traceBeginAndSlog(\"StartServices\");\n startBootstrapServices();\n startCoreServices();\n startOtherServices();\n SystemServerInitThreadPool.shutdown();\n Slog.i(TAG, \"Finish_StartServices\");\n traceEnd();\n StrictMode.initVmDefaults(null);\n if (!this.mRuntimeRestart && !isFirstBootOrUpgrade()) {\n int uptimeMillis2 = (int) SystemClock.elapsedRealtime();\n MetricsLogger.histogram((Context) null, \"boot_system_server_ready\", uptimeMillis2);\n if (uptimeMillis2 > 60000) {\n Slog.wtf(SYSTEM_SERVER_TIMING_TAG, \"SystemServer init took too long. uptimeMillis=\" + uptimeMillis2);\n }\n }\n LogBufferUtil.closeLogBufferAsNeed(this.mSystemContext);\n if (!VMRuntime.hasBootImageSpaces()) {\n Slog.wtf(TAG, \"Runtime is not running with a boot image!\");\n }\n Looper.loop();\n throw new RuntimeException(\"Main thread loop unexpectedly exited\");\n } catch (Throwable th) {\n Slog.i(TAG, \"Finish_StartServices\");\n traceEnd();\n throw th;\n }\n } catch (Throwable th2) {\n traceEnd();\n throw th2;\n }\n }",
"private void sendHeadlinerNotification() {\n startService(new Intent(this, ForegroundNotificationService.class));\n }",
"public AppiumDriverLocalService StartServer()\n\t{\n\t\tservice = AppiumDriverLocalService.buildDefaultService();\n\t\tservice.start();\n\t\treturn service;\n\t}",
"@Override\r\n public int onStartCommand(Intent intent, int flags, int startId) {\n Message msg = mServiceHandler.obtainMessage();\r\n msg.arg1 = startId;\r\n msg.obj = intent;\r\n mServiceHandler.sendMessage(msg);\r\n\r\n // If we get killed, after returning from here, restart\r\n return START_STICKY;\r\n }",
"public void StartAllServices()\n\t{\n\t\tm_oCommServ.StartCmdService(m_oConfig.CmdPort()); //Giving introducer port here\n\t\t// bring up the heartbeat receiver\n\t\tm_oCommServ.StartHeartBeatRecvr();\n\t\t//breing up the file report recvr\n\t\tm_oCommServ.StartFileReportRecvr();\n\t}",
"public int onStartCommand(android.content.Intent r9, int r10, int r11) {\n /*\n r8 = this;\n r6 = 1;\n r5 = 0;\n r8.lastStartId = r11;\n r8.taskRemoved = r5;\n r2 = 0;\n if (r9 == 0) goto L_0x0025;\n L_0x0009:\n r2 = r9.getAction();\n r7 = r8.startedInForeground;\n r4 = \"foreground\";\n r4 = r9.getBooleanExtra(r4, r5);\n if (r4 != 0) goto L_0x0021;\n L_0x0018:\n r4 = \"com.google.android.exoplayer.downloadService.action.RESTART\";\n r4 = r4.equals(r2);\n if (r4 == 0) goto L_0x0090;\n L_0x0021:\n r4 = r6;\n L_0x0022:\n r4 = r4 | r7;\n r8.startedInForeground = r4;\n L_0x0025:\n if (r2 != 0) goto L_0x002a;\n L_0x0027:\n r2 = \"com.google.android.exoplayer.downloadService.action.INIT\";\n L_0x002a:\n r4 = new java.lang.StringBuilder;\n r4.<init>();\n r7 = \"onStartCommand action: \";\n r4 = r4.append(r7);\n r4 = r4.append(r2);\n r7 = \" startId: \";\n r4 = r4.append(r7);\n r4 = r4.append(r11);\n r4 = r4.toString();\n r8.logd(r4);\n r4 = -1;\n r7 = r2.hashCode();\n switch(r7) {\n case -871181424: goto L_0x009c;\n case -608867945: goto L_0x00b2;\n case -382886238: goto L_0x00a7;\n case 1015676687: goto L_0x0092;\n default: goto L_0x0054;\n };\n L_0x0054:\n r5 = r4;\n L_0x0055:\n switch(r5) {\n case 0: goto L_0x0072;\n case 1: goto L_0x0072;\n case 2: goto L_0x00bd;\n case 3: goto L_0x00e1;\n default: goto L_0x0058;\n };\n L_0x0058:\n r4 = \"DownloadService\";\n r5 = new java.lang.StringBuilder;\n r5.<init>();\n r7 = \"Ignoring unrecognized action: \";\n r5 = r5.append(r7);\n r5 = r5.append(r2);\n r5 = r5.toString();\n android.util.Log.e(r4, r5);\n L_0x0072:\n r3 = r8.getRequirements();\n r4 = r3.checkRequirements(r8);\n if (r4 == 0) goto L_0x00e5;\n L_0x007c:\n r4 = r8.downloadManager;\n r4.startDownloads();\n L_0x0081:\n r8.maybeStartWatchingRequirements(r3);\n r4 = r8.downloadManager;\n r4 = r4.isIdle();\n if (r4 == 0) goto L_0x008f;\n L_0x008c:\n r8.stop();\n L_0x008f:\n return r6;\n L_0x0090:\n r4 = r5;\n goto L_0x0022;\n L_0x0092:\n r7 = \"com.google.android.exoplayer.downloadService.action.INIT\";\n r7 = r2.equals(r7);\n if (r7 == 0) goto L_0x0054;\n L_0x009b:\n goto L_0x0055;\n L_0x009c:\n r5 = \"com.google.android.exoplayer.downloadService.action.RESTART\";\n r5 = r2.equals(r5);\n if (r5 == 0) goto L_0x0054;\n L_0x00a5:\n r5 = r6;\n goto L_0x0055;\n L_0x00a7:\n r5 = \"com.google.android.exoplayer.downloadService.action.ADD\";\n r5 = r2.equals(r5);\n if (r5 == 0) goto L_0x0054;\n L_0x00b0:\n r5 = 2;\n goto L_0x0055;\n L_0x00b2:\n r5 = \"com.google.android.exoplayer.downloadService.action.RELOAD_REQUIREMENTS\";\n r5 = r2.equals(r5);\n if (r5 == 0) goto L_0x0054;\n L_0x00bb:\n r5 = 3;\n goto L_0x0055;\n L_0x00bd:\n r4 = \"download_action\";\n r0 = r9.getByteArrayExtra(r4);\n if (r0 != 0) goto L_0x00d0;\n L_0x00c6:\n r4 = \"DownloadService\";\n r5 = \"Ignoring ADD action with no action data\";\n android.util.Log.e(r4, r5);\n goto L_0x0072;\n L_0x00d0:\n r4 = r8.downloadManager;\t Catch:{ IOException -> 0x00d6 }\n r4.handleAction(r0);\t Catch:{ IOException -> 0x00d6 }\n goto L_0x0072;\n L_0x00d6:\n r1 = move-exception;\n r4 = \"DownloadService\";\n r5 = \"Failed to handle ADD action\";\n android.util.Log.e(r4, r5, r1);\n goto L_0x0072;\n L_0x00e1:\n r8.stopWatchingRequirements();\n goto L_0x0072;\n L_0x00e5:\n r4 = r8.downloadManager;\n r4.stopDownloads();\n goto L_0x0081;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.exoplayer2.offline.DownloadService.onStartCommand(android.content.Intent, int, int):int\");\n }",
"public void doBindService() {\n\r\n\t\tIntent serviceIntent = new Intent(MainActivity.this, LocalService.class);\r\n\r\n\t\tstartService(serviceIntent);\r\n\t\t// bindService(serviceIntent, mServiceConnection, 0);\r\n\t\tbindService(serviceIntent, mServiceConnection, BIND_AUTO_CREATE);\r\n\r\n\t\tmIsBound = true;\r\n\t}",
"@Override\n protected void onStart() {\n super.onStart();\n\n if (mBangingTunesItent == null) {\n mBangingTunesItent = new Intent(this, BangingTunes.class);\n final boolean bindIndicator = bindService(mBangingTunesItent, mServiceConnection, Context.BIND_AUTO_CREATE);\n final ComponentName componentName = startService(mBangingTunesItent);\n }\n }",
"@Override\n public int onStartCommand(Intent intent, int flags, int startId) {\n showLocalNotification();\n return START_STICKY;\n }",
"@Override\n public void onClick(View v) {\n startService(new Intent(MainActivity.this, MyService.class));\n }",
"@Override\n\tpublic void onStart(Intent intent, int startId) {\n\t\tnew RunnableService(new runCallBack(){\n\n\t\t\t@Override\n\t\t\tpublic void start() {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tinitResource();\n\t\t\t\t//获取通讯录信息\n\t\t\t\tinitContactsData();\n\t\t\t\t//同步通讯录\n\t\t\t\tupLoadPhones();\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void end() {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}, true);\n\t\n\t\t\n\t\tsuper.onStart(intent, startId);\n\t}",
"@Override\n public int onStartCommand(Intent intent, int flags, int startId) {\n\n serviceStartNormalMethod = intent.getBooleanExtra(BC_SERVICE_START_METHOD, false);\n\n // This is actually where we receive \"pings\" from activities to start us\n // and keep us running\n pingStamp = System.currentTimeMillis();\n\n // Log.i(TAG, \"SERVICE onStartCommand()\");\n\n return Service.START_NOT_STICKY;\n }",
"private ServiceManage() {\r\n\t\tInitialThreads();\r\n\t}",
"@Override\n\tpublic void onCreate() {\n\t\tsuper.onCreate();\n\n\t\tcontext = this;\n\t\tstartService();\n\t}",
"public static void start(Context context)\n {\n Log.v(TAG, \"Starting!!\");\n Intent intent = new Intent(context, TexTronicsManagerService.class);\n intent.setAction(Action.start.toString());\n context.startService(intent);\n }",
"@Override\n public void onCreate() {\n if (messageServiceUtil == null)\n messageServiceUtil = new MessageServiceUtil();\n messageServiceUtil.startMessageService(this);\n keepService2();\n }",
"@Override\n\tpublic void onReceive(Context arg0, Intent arg1) {\n\t\t\n\t\tIntent intent = new Intent(arg0,AutoUpdateService.class);\n\t\targ0.startService(intent);\n\t}",
"@Override\n\t\t\tpublic void run() {\n\t\t\t\tpt.getContext().startService( new Intent( pt.getContext(), PerfectTimeService.class ) );\n\t\t\t}",
"public static void windowsService(String args[]) {\n String cmd = \"start\";\n if (args.length > 0) {\n cmd = args[0];\n }\n if (\"start\".equals(cmd)) {\n engineLauncherInstance.windowsStart();\n } else {\n engineLauncherInstance.windowsStop();\n }\n }",
"@Override\n\t\tpublic String buildBasicService() {\n\t\t\treturn bulidService();\n\t\t}",
"@Override\r\n\tpublic int onStartCommand(Intent intent, int flags, int startId) {\n\t\tinfos = packageInfo.getRunningProcess();\r\n\t\tLog.v(\"serry\", \"2\");\r\n\t\treturn super.onStartCommand(intent, flags, START_STICKY);\r\n\t}",
"public void onCreate() {\n super.onCreate();\n LogUtil.d(DownloadService.class, \"Service onCreate\");\n\n if (mSystemFacade == null) {\n mSystemFacade = new SystemFacade(this);\n }\n\n dao = DownloadInfoDao.getInstace(getApplication());\n\n mSystemFacade.cancelAllNotifications();\n\n mNetReceiver = new NetworkConnectionChangeReceiver();\n mNetReceiver.regist(this);\n\n updateFromProvider();\n }",
"public void onCreate() {\n super.onCreate();\n // An Android handler thread internally operates on a looper.\n mHandlerThread = new HandlerThread(\"HandlerThreadService.HandlerThread\", Process.THREAD_PRIORITY_BACKGROUND);\n mHandlerThread.start();\n // An Android service handler is a handler running on a specific background thread.\n mServiceHandler = new ServiceHandler(mHandlerThread.getLooper());\n\n // Get access to local broadcast manager\n mLocalBroadcastManager = LocalBroadcastManager.getInstance(this);\n }",
"@TargetApi(Build.VERSION_CODES.JELLY_BEAN_MR1)\n @Override\n public int onStartCommand(Intent intent, int flags, int startId) {\n IntentFilter filter = new IntentFilter(Intent.ACTION_SCREEN_ON);\n filter.addAction(Intent.ACTION_SCREEN_OFF);\n filter.addAction(Intent.ACTION_BATTERY_CHANGED);\n filter.addAction(Intent.ACTION_AIRPLANE_MODE_CHANGED);\n filter.addAction(WifiManager.SUPPLICANT_CONNECTION_CHANGE_ACTION);\n filter.addAction(BluetoothAdapter.ACTION_STATE_CHANGED);\n filter.addAction(SettingsActivity.ACTION_WALLPAPER_CHANGED);\n lockReceiver = new LockReceiver();\n ((LockReceiver) lockReceiver).setDelegate(this);\n registerReceiver(lockReceiver, filter);\n\n // Register the boot receiver\n filter = new IntentFilter(Intent.ACTION_BOOT_COMPLETED);\n filter.addAction(Intent.ACTION_USER_PRESENT);\n filter.addAction(Intent.ACTION_USER_INITIALIZE); // Required API 17 :(\n bootReceiver = new BootReceiver();\n registerReceiver(bootReceiver, filter);\n\n // Register the time receiver\n filter = new IntentFilter(Intent.ACTION_TIME_TICK);\n filter.addAction(Intent.ACTION_TIME_CHANGED);\n filter.addAction(Intent.ACTION_DATE_CHANGED);\n timeReceiver = new TimeReceiver();\n ((TimeReceiver) timeReceiver).setDelegate(this);\n registerReceiver(timeReceiver, filter);\n\n MyPhoneStateListener phoneStateListener = new MyPhoneStateListener();\n TelephonyManager telephonyManager = (TelephonyManager) getSystemService(TELEPHONY_SERVICE);\n// telephonyManager.listen(phoneStateListener, PhoneStateListener.LISTEN_CALL_STATE);\n telephonyManager.listen(phoneStateListener, PhoneStateListener.LISTEN_SIGNAL_STRENGTHS);\n\n startForeground();\n\n // TODO: Should I start the activity here?\n startLockerActivity();\n\n return START_STICKY;\n }",
"private void sendIntenttoServiece() {\n\t\tIntent intent = new Intent(context, RedGreenService.class);\n\t\tintent.putExtra(\"sendclean\", \"sendclean\");\n\t\tcontext.startService(intent);\n\n\t}",
"@Override\n public int onStartCommand(Intent intent, int flags, int startId) {\n Bundle bundle = intent.getExtras();\n String url = bundle.getString(\"downloadUrl\");\n PreferenceUtils.setString(UpdateVersionService.this, \"apkDownloadurl\", url);\n nm.notify(titleId, notification);\n downLoadFile(url);\n return Service.START_STICKY;\n }",
"@Override\n\n public int onStartCommand(Intent intent, int flags, int startId) {\n\n return START_STICKY;\n\n }",
"@Override\n public int onStartCommand(Intent intent, int flags, int startId) {\n //action set by setAction() in activity\n String action = intent.getAction();\n if (action.equals(START_SERVER)) {\n //start your server thread from here\n this.serverThread = new Thread(new ServerThread());\n this.serverThread.start();\n }\n if (action.equals(STOP_SERVER)) {\n //stop server\n if (serverSocket != null) {\n try {\n serverSocket.close();\n } catch (IOException ignored) {}\n }\n }\n\n //configures behaviour if service is killed by system, see documentation\n return START_REDELIVER_INTENT;\n }",
"private void startClipboardMonitor() {\n ComponentName service = startService(new Intent(this,\n ClipboardMonitor.class));\n if (service == null) {\n Log.e(getClass().getName(), \"Can't start service\"\n + ClipboardMonitor.class.getName());\n }\n }",
"@Override\n public int onStartCommand(Intent intent, int flags, int startId) {\n Log.d(TAG, \"Service started\");\n\n self = this;\n\n return super.onStartCommand(intent, flags, startId);\n }",
"@Override\n public void onClick(View v) {\n\n checkAccessibility();\n Intent intent = new Intent(MainActivity.this, FloatBallService.class);\n Bundle data = new Bundle();\n data.putInt(\"type\", FloatBallService.TYPE_ADD);\n intent.putExtras(data);\n startService(intent);\n }",
"@Override\n\tpublic int onStartCommand(Intent intent, int flags, int startId) {\n\n\n\n\t\treturn super.onStartCommand(intent, flags, startId);\n\t}",
"@Override\r\n\tpublic void onStart(Intent intent, int startId) {\r\n\t\thandleCommand(intent);\r\n\t}",
"private void startIChatService() {\n Intent transportService = new Intent();\n transportService.setAction(IChatService.class.getCanonicalName());\n this.startService(transportService);\n Log.i(\"Interface\", \"Started IChatservice\");\n }",
"@Override\n protected void onCreate(@Nullable Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n startService(getIntent().setClass(this, MetronomeService.class));\n finish();\n }"
] |
[
"0.67079717",
"0.6680476",
"0.6663489",
"0.66346496",
"0.66127986",
"0.658612",
"0.65664154",
"0.65516657",
"0.6543066",
"0.6542147",
"0.6529322",
"0.65265626",
"0.65042984",
"0.6478326",
"0.6475135",
"0.6417515",
"0.6338734",
"0.630138",
"0.62367135",
"0.6200521",
"0.61883587",
"0.6186968",
"0.61854553",
"0.6159371",
"0.61569244",
"0.6146254",
"0.614548",
"0.6122651",
"0.612048",
"0.6104282",
"0.60979646",
"0.60849196",
"0.60773075",
"0.6057608",
"0.60553634",
"0.60486025",
"0.60364294",
"0.6026611",
"0.6021145",
"0.60126513",
"0.6005636",
"0.6000892",
"0.5992165",
"0.599116",
"0.598249",
"0.5971339",
"0.59478337",
"0.59378684",
"0.59316593",
"0.5931286",
"0.5925848",
"0.59220254",
"0.5911175",
"0.5910082",
"0.5909651",
"0.58971804",
"0.58859414",
"0.58717847",
"0.5871116",
"0.58601373",
"0.5853264",
"0.58462775",
"0.58375734",
"0.5829572",
"0.58245265",
"0.58237886",
"0.58226377",
"0.5804609",
"0.58013666",
"0.57992756",
"0.5794608",
"0.57840943",
"0.57835674",
"0.5781262",
"0.5770056",
"0.5764489",
"0.57509774",
"0.5744052",
"0.57365376",
"0.57359827",
"0.5735561",
"0.5730066",
"0.5717152",
"0.5713885",
"0.5708257",
"0.57001704",
"0.5693688",
"0.5690976",
"0.5689378",
"0.5685733",
"0.5682246",
"0.5677061",
"0.5665019",
"0.5659821",
"0.565977",
"0.5654439",
"0.5653718",
"0.565084",
"0.56505346",
"0.5649826"
] |
0.67089266
|
0
|
Processes requests for both HTTP GET and POST methods.
|
protected void processRequest(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
response.setContentType("text/html;charset=UTF-8");
ip = request.getLocalAddr();
try {
Timestamp dataNow = GetNow();
Timestamp dataPrec = GetDate(request.getParameter("email"),response.getWriter());
long differenza = (dataNow.getTime()-dataPrec.getTime())/1000;
response.getWriter().println(differenza+"<br>");
if(differenza>90){
response.sendRedirect("LinkScaduto.html");
}
else{
char[] p = generatePswd(8, 12, 1, 1, 1);
String password = String.valueOf(p, 0, p.length) ;
String email = request.getParameter("email");
String ip = request.getLocalAddr();
UpdatePassword(email,password);
String ogget = "Confirm change password";
String testo = "Dear " + email
+ "\n This is your new password:"
+ "\n\n "+password;
Email send = new Email();
send.Send(email,ogget,testo);
response.sendRedirect("LinkValido.html");
}
} catch(IOException e) {}
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"@Override\n protected void doPost(final HttpServletRequest req, final HttpServletResponse resp) throws ServletException, IOException {\n final String method = req.getParameter(METHOD);\n if (GET.equals(method)) {\n doGet(req, resp);\n } else {\n resp.setStatus(HttpServletResponse.SC_METHOD_NOT_ALLOWED);\n }\n }",
"private void processRequest(HttpServletRequest request, HttpServletResponse response) {\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n // only POST should be used\n doPost(request, response);\n }",
"@Override\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp)\n\t\t\tthrows ServletException, IOException {\nSystem.err.println(\"=====================>>>>>123\");\n\t\tString key=req.getParameter(\"method\");\n\t\tswitch (key) {\n\t\tcase \"1\":\n\t\t\tgetProvinces(req,resp);\n\t\t\tbreak;\n\t\tcase \"2\":\n\t\t\tgetCities(req,resp);\t\t\t\n\t\t\tbreak;\n\t\tcase \"3\":\n\t\t\tgetAreas(req,resp);\n\t\t\tbreak;\n\n\t\tdefault:\n\t\t\tbreak;\n\t\t}\n\n\t}",
"@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tprocess(req, resp);\n\t}",
"@Override\r\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\r\n\t\tdoPost(req, resp);\r\n\t}",
"@Override\r\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n processRequest(request, response);\r\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\n\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tdoGet(req, resp);\n\n\t}",
"@Override\r\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tdoPost(req, resp);\r\n\t}",
"@Override\r\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tdoPost(req, resp);\r\n\t}",
"@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tdoPost(req, resp);\n\t}",
"@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tdoPost(req, resp);\n\t}",
"@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tdoPost(req, resp);\n\t}",
"@Override\r\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tdoProcess(req, resp);\r\n\t}",
"@Override\r\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n processRequest(request, response);\r\n }",
"@Override\r\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n processRequest(request, response);\r\n }",
"@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tdoProcess(req, resp);\n\t}",
"@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp)\n\t\t\tthrows ServletException, IOException {\n\t\tdoPost(req, resp);\n\t}",
"@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp)\n\t\t\tthrows ServletException, IOException {\n\t\tdoPost(req, resp);\n\t}",
"@Override\n \tpublic void doGet(HttpServletRequest req, HttpServletResponse resp)\n \t\t\tthrows ServletException, IOException {\n \t\tdoPost(req, resp);\n \t}",
"@Override\r\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp)\r\n\t\t\tthrows ServletException, IOException {\n\t\tdoPost(req, resp);\r\n\t}",
"@Override\r\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp)\r\n\t\t\tthrows ServletException, IOException {\n\t\tdoPost(req, resp);\r\n\t}",
"@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tthis.doPost(req, resp);\n\t}",
"@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tthis.doPost(req, resp);\n\t}",
"@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tthis.doPost(req, resp);\n\t}",
"@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tthis.doPost(req, resp);\n\t}",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\r\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tsuper.doPost(req, resp);\r\n\t\tdoGet(req, resp);\r\n\t}",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\r\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tthis.doPost(req, resp);\r\n\t}",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n\n processRequest(request, response);\n }",
"@Override\n\tprotected void doGet(HttpServletRequest request,\n\t\t\tHttpServletResponse response) throws ServletException, IOException {\n\t\tprocessRequest(request, response);\n\t}",
"@Override\n\tprotected void doGet(HttpServletRequest request,\n\t\t\tHttpServletResponse response) throws ServletException, IOException {\n\t\tprocessRequest(request, response);\n\t}",
"@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp)\n\t\t\tthrows ServletException, IOException {\n\t\tthis.doPost(req, resp);\n\t\t\n\t}",
"@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp)\n\t\t\tthrows ServletException, IOException {\n\n\t\tprocess(req,resp);\n\t}",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }"
] |
[
"0.7004024",
"0.66585696",
"0.66031146",
"0.6510023",
"0.6447109",
"0.64421695",
"0.64405906",
"0.64321136",
"0.6428049",
"0.6424289",
"0.6424289",
"0.6419742",
"0.6419742",
"0.6419742",
"0.6418235",
"0.64143145",
"0.64143145",
"0.6400266",
"0.63939095",
"0.63939095",
"0.639271",
"0.63919044",
"0.63919044",
"0.63903785",
"0.63903785",
"0.63903785",
"0.63903785",
"0.63887113",
"0.63887113",
"0.6380285",
"0.63783026",
"0.63781637",
"0.637677",
"0.63761306",
"0.6370491",
"0.63626",
"0.63626",
"0.63614637",
"0.6355308",
"0.63546896",
"0.63546896",
"0.63546896",
"0.63546896",
"0.63546896",
"0.63546896",
"0.63546896",
"0.63546896",
"0.63546896",
"0.63546896",
"0.63546896",
"0.63546896",
"0.63546896",
"0.63546896",
"0.63546896",
"0.63546896",
"0.63546896",
"0.63546896",
"0.63546896",
"0.63546896",
"0.63546896",
"0.63546896",
"0.63546896",
"0.63546896",
"0.63546896",
"0.63546896",
"0.63546896",
"0.63546896",
"0.63546896",
"0.63546896",
"0.63546896",
"0.63546896",
"0.63546896",
"0.63546896",
"0.63546896",
"0.63546896",
"0.63546896",
"0.63546896",
"0.63546896",
"0.63546896",
"0.63546896",
"0.63546896",
"0.63546896",
"0.63546896",
"0.63546896",
"0.63546896",
"0.63546896",
"0.63546896",
"0.63546896",
"0.63546896",
"0.63546896",
"0.63546896",
"0.63546896",
"0.63546896",
"0.63546896",
"0.63546896",
"0.63546896",
"0.63546896",
"0.63546896",
"0.63546896",
"0.63546896",
"0.63546896"
] |
0.0
|
-1
|
manca id o email
|
private Timestamp GetDate(String email, PrintWriter out){
Timestamp date = null;
//select che ritorna data creazione link
DBConnect db = new DBConnect(ip);
try {
PreparedStatement ps = db.conn.prepareStatement("SELECT countdown FROM users WHERE email = ?");
ps.setString(1, email);
ResultSet rs = db.Query(ps);
rs.next();
String datevalue = rs.getString("countdown");
date = Timestamp.valueOf(datevalue);
} catch (SQLException e) {
}
db.DBClose();
return date;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public void setEmail(String p) { this.idcorreo = p; }",
"String getUserMail();",
"public String adcionarEmail() {\n\t\tpessoa.adicionaEmail(email);\n\t\tthis.email = new Email();\n\t\treturn null;\n\t}",
"@AutoEscape\n\tpublic String getEmailId();",
"java.lang.String getEmail();",
"java.lang.String getEmail();",
"java.lang.String getEmail();",
"java.lang.String getEmail();",
"java.lang.String getEmail();",
"java.lang.String getEmail();",
"public String getEmail() { return (this.idcorreo == null) ? \"\" : this.idcorreo; }",
"String getEmail(int type);",
"String getEmail();",
"String getEmail();",
"String getEmail();",
"String getEmail();",
"String getEmail();",
"@Override\n\tvoid email() {\n\t\tSystem.out.println(\"email id [email protected]\");\n\t\t\n\t}",
"java.lang.String getUserEmail();",
"String getUserMainEmail( int nUserId );",
"public void enterRandomEmailId() {\n String email = \"test\" + Utility.getRandomString(3) + \"@gmail.com\";\n Reporter.addStepLog(\"Enter email \" + email + \" to email field \" + _emailField.toString());\n sendTextToElement(_emailField, email);\n log.info(\"Enter email \" + email + \" to email field \" + _emailField.toString());\n }",
"public void enviarEmail(String c, Ciudadano a){\n\t}",
"public String getEmailId()\r\n {\r\n return emailId;\r\n }",
"public JoinNowPage enterEmailID() {\n\t\temail.sendKeys(\"[email protected]\");\n\t\treturn this;\n\t}",
"public String getEmail() {\r\n // Bouml preserved body begin 00040D82\r\n\t System.out.println(email);\r\n\t return email;\r\n // Bouml preserved body end 00040D82\r\n }",
"public String getEmailId() {\n return emailId;\n }",
"public void setEmailad(String emailad) {\n\tthis.emailad = emailad;\n}",
"public String getEmailad() {\n\treturn emailad;\n}",
"public void setEmailId(String emailId);",
"public String getmailID() {\n\t\treturn _mailID;\n\t}",
"public String getEmailID() {\n\t\treturn emailID;\n\t}",
"public String getEmail() {return email; }",
"public abstract void arhivare(Email email);",
"public String getEmail() {return email;}",
"@Override\n\tvoid email() {\n\t\tSystem.out.println(\"[email protected]\");\n\t\t\n\t}",
"public void setEmail(final String e)\n {\n this.email = e;\n }",
"public String getEmail()\r\n/* 31: */ {\r\n/* 32:46 */ return this.email;\r\n/* 33: */ }",
"public String getEmail()\r\n {\r\n return email;\r\n }",
"@AutoEscape\n public String getEmail();",
"public String getEmailId() {\r\n\t\treturn emailId;\r\n\t}",
"public String getEmail() { return email; }",
"public void setEmailCom(String emailCom);",
"public WebElement getEmail()\n {\n\t\t\n \tWebElement user_emailId = driver.findElement(email);\n \treturn user_emailId;\n \t\n }",
"@AutoEscape\n\tpublic String getEmail_address();",
"private String webId(String web) {\n return \" and \"+\r\n \" p.email_key = \"+getEMailKeyStr(web)+\" and \"+\r\n \" pt.email_key = \"+getEMailKeyStr(web)+\" and \"+\r\n \" ct.email_key = \"+getEMailKeyStr(web)+\" \"\r\n ;\r\n }",
"public String getMailId() {\n\t\treturn mailId;\n\t}",
"public String getEmail(){\n\t\treturn email;\n\t}",
"public String getEmail(){\n\t\treturn email;\n\t}",
"boolean emailExistant(String email, int id) throws BusinessException;",
"public static String getBiblioMail() {\n\t\treturn \"mail\";\n\t}",
"public void setEmail(String email){\r\n this.email = email;\r\n }",
"Professor procurarEmail(String email)throws ProfessorEmailNExisteException;",
"public String getEmail() {\r\n return email;\r\n }",
"public String getEmail() {\r\n return email;\r\n }",
"public String getEmail() {\r\n return email;\r\n }",
"public String getEmail() {\r\n return email;\r\n }",
"public String getEmail() {\r\n return email;\r\n }",
"public String getEmail() {\r\n return email;\r\n }",
"public String getEmail() {\r\n return email;\r\n }",
"public String getEmail() {\r\n return email;\r\n }",
"public String getEmail() {\r\n return email;\r\n }",
"public String getEmail() {\r\n return email;\r\n }",
"public String getEmail() {\r\n return email;\r\n }",
"public void AuthenticatorPinGen(String To,int pin,String name) {\n String to = To;\n String from = \"Your mailing Id\";\n Properties properties= new Properties();\n properties.put(\"mail.smtp.auth\", \"true\");\n properties.put(\"mail.smtp.starttls.enable\", \"true\");\n properties.put(\"mail.smtp.host\", \"smtp.gmail.com\");\n properties.put(\"mail.smtp.port\", 587);\n\n //write your email id and password here(from where you want to send mails to your clients)\n Session session=Session.getDefaultInstance(properties,new javax.mail.Authenticator(){\n protected PasswordAuthentication getPasswordAuthentication(){\n return new PasswordAuthentication(\"Your Email Id\", \"Your Password\");\n }\n });\n try{\n MimeMessage message = new MimeMessage(session);\n message.setFrom(new InternetAddress(from));\n message.addRecipient(Message.RecipientType.TO,new InternetAddress(to));\n //Subject\n message.setSubject(\"Authentication Pin Number\");\n //Body\n message.setText(\"Hello MR.\"+name+\",\\nYour pin number is \"+pin);\n Transport.send(message);\n System.out.println(\"sending\");\n }\n catch (MessagingException e) {\n e.printStackTrace();\n }\n }",
"public abstract String getEmail( String [ ] strLineDataArray );",
"public String getEmailAddress();",
"public synchronized String getMail()\r\n {\r\n return mail;\r\n }",
"@Override\r\n\tpublic String getEmail() {\n\t\treturn email;\r\n\t}",
"public String getEmail() {\n return email;\n }",
"public String getEmail() {\n return email;\n }",
"public void setEmail(Email email) { this.email = email; }",
"public String getEmail()\n {\n return email;\n }",
"public String getEmail()\n {\n return email;\n }",
"public String getEmail_pelanggan(){\r\n \r\n return email_pelanggan;\r\n }",
"@AutoEscape\n\tpublic String getEmailCom();",
"public String getEmail()\n {\n return this.email;\n }",
"@Override\r\n\tpublic String getEmail(String id) {\r\n\t\tString sql = \"SELECT email FROM \\\"Registration DB\\\".\\\"Userdetails\\\" where id=?\";\r\n\t\treturn jdbcTemplate.queryForObject(sql, new Object[] { id }, String.class);\r\n\t}",
"public java.lang.String getEmailAddress();",
"public String getEmail()\n\t{\n\t\treturn this._email;\n\t}",
"public void setEmail(String email) { this.email = email; }",
"void setEmail(String email);",
"void setEmail(String email);",
"public String getAlternateEmail() { return alternateEmail; }",
"public boolean isValidEmaiId(String email) {\r\n\t\tif (email == null || !email.contains(\"@\") || email.length() < 5)\r\n\t\t\treturn false;\r\n\t\tString[] tokens = email.split(\"@\");\r\n\t\tString id = tokens[0];\r\n\t\tString domain = tokens[1];\r\n\t\t// System.out.println(isValidId(id));\r\n\t\t// System.out.println(isValidDomain(domain));\r\n\t\treturn isValidId(id) && isValidDomain(domain);\r\n\t}",
"public String getEmail()\n\t{\n\t\treturn this.email;\n\t}",
"public void setEmail(String email)\r\n/* 36: */ {\r\n/* 37:50 */ this.email = email;\r\n/* 38: */ }",
"public String getEmailAddress() {\r\n return email;\r\n }",
"public String getMailNo() {\n return mailNo;\n }",
"public static String randomEmail() {\n\t\tRandom randomGenerator = new Random(); \n\t\tint randomInt = randomGenerator.nextInt(10000); \n\t\treturn \"username\"+ randomInt +\"@yopmail.com\"; \n\t}",
"@Override\n public String getUserId() {\n return email;\n }",
"void send(String emailName);",
"public void setEmail( String email )\r\n {\r\n this.email = email;\r\n }",
"public String getEmail() {\n return email;\n }",
"public String getEmail() {\n return email;\n }",
"public String getEmail() {\n return email;\n }",
"public String getEmail() {\n return email;\n }",
"public String getEmail() {\n return email;\n }",
"public String getEmail() {\n return email;\n }",
"public String getEmail() {\n return email;\n }",
"public String getEmail() {\n return email;\n }",
"public String getEmail() {\n return email;\n }"
] |
[
"0.7251164",
"0.6940838",
"0.6798809",
"0.67861235",
"0.6744842",
"0.6744842",
"0.6744842",
"0.6744842",
"0.6744842",
"0.6744842",
"0.67119193",
"0.6665658",
"0.6614046",
"0.6614046",
"0.6614046",
"0.6614046",
"0.6614046",
"0.661305",
"0.65777284",
"0.6556428",
"0.6522004",
"0.65217227",
"0.65021104",
"0.64927226",
"0.63342893",
"0.6277369",
"0.6272005",
"0.6267471",
"0.6252307",
"0.62363523",
"0.6216122",
"0.6184475",
"0.61562824",
"0.6155338",
"0.6146513",
"0.61453277",
"0.61425275",
"0.61259884",
"0.6119106",
"0.61167336",
"0.61099166",
"0.6108952",
"0.610851",
"0.608971",
"0.60877025",
"0.6076997",
"0.60756034",
"0.60756034",
"0.6052145",
"0.60141015",
"0.60040617",
"0.6001211",
"0.5999383",
"0.5999383",
"0.5999383",
"0.5999383",
"0.5999383",
"0.5999383",
"0.5999383",
"0.5999383",
"0.5999383",
"0.5999383",
"0.5999383",
"0.5998544",
"0.5996578",
"0.5992178",
"0.59760386",
"0.5972031",
"0.597",
"0.597",
"0.59672004",
"0.59666",
"0.59666",
"0.5959009",
"0.5957725",
"0.595434",
"0.5941069",
"0.59295684",
"0.5928803",
"0.59255326",
"0.5918303",
"0.5918303",
"0.5918138",
"0.5917649",
"0.59161556",
"0.5914492",
"0.59070045",
"0.59059036",
"0.5904268",
"0.5898989",
"0.58961457",
"0.58955234",
"0.588841",
"0.588841",
"0.588841",
"0.588841",
"0.588841",
"0.588841",
"0.588841",
"0.588841",
"0.588841"
] |
0.0
|
-1
|
Handles the HTTP GET method.
|
@Override
protected void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
processRequest(request, response);
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public void doGet( )\n {\n \n }",
"@Override\n\tprotected void executeGet(GetRequest request, OperationResponse response) {\n\t}",
"@Override\n\tprotected Method getMethod() {\n\t\treturn Method.GET;\n\t}",
"@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\t\n\t}",
"@Override\n protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n }",
"@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp)\n\t\t\tthrows ServletException, IOException {\n\t}",
"@Override\r\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t}",
"@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t}",
"@Override\r\n\tprotected void service(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tdoGet(req, resp);\r\n\t}",
"void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException;",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n \n }",
"@Override\r\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n \r\n }",
"@Override\r\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n \r\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n \n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n \n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n \n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n metGet(request, response);\n }",
"public void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException {\r\n\tlogTrace( req, \"GET log\" );\r\n\tString requestId = req.getQueryString();\r\n\tif (requestId == null) return;\r\n\tif (\"get-response\".equals( requestId )) {\r\n\t try {\r\n\t\tonMEVPollsForResponse( req, resp );\r\n\t } catch (Exception e) {\r\n\t\tlogError( req, resp, e, \"MEV polling error\" );\r\n\t\tsendError( resp, \"MEV polling error: \" + e.toString() );\r\n\t }\r\n\t}\r\n }",
"@Override\r\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n \r\n \r\n }",
"@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tsuper.doGet(req, resp);\n\t\t\n\t}",
"@Override\r\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n\r\n }",
"@Override\r\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tsuper.doGet(req, resp);\r\n\t}",
"@Override\r\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tsuper.doGet(req, resp);\r\n\t}",
"public void doGet() throws IOException {\n\n // search ressource\n byte[] contentByte = null;\n try {\n contentByte = ToolBox.readFileByte(RESOURCE_DIRECTORY, this.url);\n this.statusCode = OK;\n ContentType contentType = new ContentType(this.extension);\n sendHeader(statusCode, contentType.getContentType(), contentByte.length);\n } catch (IOException e) {\n System.out.println(\"Ressource non trouvé\");\n statusCode = NOT_FOUND;\n contentByte = ToolBox.readFileByte(RESPONSE_PAGE_DIRECTORY, \"pageNotFound.html\");\n sendHeader(statusCode, \"text/html\", contentByte.length);\n }\n\n this.sendBodyByte(contentByte);\n }",
"public HttpResponseWrapper invokeGET(String path) {\n\t\treturn invokeHttpMethod(HttpMethodType.HTTP_GET, path, \"\");\n\t}",
"@Override\n\tpublic void doGet(HttpServletRequest req, HttpServletResponse resp)\n\t\t\tthrows ServletException, IOException {\n\t\tsuper.doGet(req, resp);\n\t}",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n\n }",
"@Override\n\tprotected void doGet(HttpServletRequest request,\n\t\t\tHttpServletResponse response) throws ServletException, IOException {\n\t}",
"public Result get(Get get) throws IOException;",
"@Override\n public void doGet(HttpServletRequest request, HttpServletResponse response) {\n System.out.println(\"[Servlet] GET request \" + request.getRequestURI());\n\n response.setContentType(FrontEndServiceDriver.APP_TYPE);\n response.setStatus(HttpURLConnection.HTTP_BAD_REQUEST);\n\n try {\n String url = FrontEndServiceDriver.primaryEventService +\n request.getRequestURI().replaceFirst(\"/events\", \"\");\n HttpURLConnection connection = doGetRequest(url);\n\n if (connection.getResponseCode() == HttpURLConnection.HTTP_OK) {\n PrintWriter pw = response.getWriter();\n JsonObject responseBody = (JsonObject) parseResponse(connection);\n\n response.setStatus(HttpURLConnection.HTTP_OK);\n pw.println(responseBody.toString());\n }\n }\n catch (Exception ignored) {}\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n }",
"@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp)\n\t\t\tthrows ServletException, IOException {\n\t\tsuper.doGet(req, resp);\n\t}",
"@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp)\n\t\t\tthrows ServletException, IOException {\n\t\tsuper.doGet(req, resp);\n\t}",
"@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tSystem.out.println(\"get\");\n\t\tthis.doPost(req, resp);\n\t}",
"@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tsuper.doGet(req, resp);\n\t}",
"@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tsuper.doGet(req, resp);\n\t}",
"public void doGet(HttpServletRequest request, HttpServletResponse response)\r\n\t\t\tthrows ServletException, IOException {}",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n \tSystem.out.println(\"---here--get--\");\n processRequest(request, response);\n }",
"@Override\n public final void doGet() {\n try {\n checkPermissions(getRequest());\n // GET one\n if (id != null) {\n output(api.runGet(id, getParameterAsList(PARAMETER_DEPLOY), getParameterAsList(PARAMETER_COUNTER)));\n } else if (countParameters() == 0) {\n throw new APIMissingIdException(getRequestURL());\n }\n // Search\n else {\n\n final ItemSearchResult<?> result = api.runSearch(Integer.parseInt(getParameter(PARAMETER_PAGE, \"0\")),\n Integer.parseInt(getParameter(PARAMETER_LIMIT, \"10\")), getParameter(PARAMETER_SEARCH),\n getParameter(PARAMETER_ORDER), parseFilters(getParameterAsList(PARAMETER_FILTER)),\n getParameterAsList(PARAMETER_DEPLOY), getParameterAsList(PARAMETER_COUNTER));\n\n head(\"Content-Range\", result.getPage() + \"-\" + result.getLength() + \"/\" + result.getTotal());\n\n output(result.getResults());\n }\n } catch (final APIException e) {\n e.setApi(apiName);\n e.setResource(resourceName);\n throw e;\n }\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n \n }",
"public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n }",
"@Override\r\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp)\r\n\t\t\tthrows ServletException, IOException {\n\t\tthis.service(req, resp);\r\n\t}",
"protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t\t\n\t}",
"@RequestMapping(value = \"/{id}\", method = RequestMethod.GET)\n public void get(@PathVariable(\"id\") String id, HttpServletRequest req){\n throw new NotImplementedException(\"To be implemented\");\n }",
"@Override\npublic void get(String url) {\n\t\n}",
"protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tString action = req.getParameter(\"action\");\r\n\t\t\r\n\t\tif(action == null) {\r\n\t\t\taction = \"List\";\r\n\t\t}\r\n\t\t\r\n\t\tswitch(action) {\r\n\t\t\tcase \"List\":\r\n\t\t\t\tlistUser(req, resp);\r\n\t\t\t\t\t\t\r\n\t\t\tdefault:\r\n\t\t\t\tlistUser(req, resp);\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t}",
"@Override\n\tprotected void doGet(HttpServletRequest request, \n\t\t\tHttpServletResponse response) throws ServletException, IOException {\n\t\tSystem.out.println(\"Routed to doGet\");\n\t}",
"@NonNull\n public String getAction() {\n return \"GET\";\n }",
"@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp)\n\t\t\tthrows ServletException, IOException {\n\n\t\tprocess(req,resp);\n\t}",
"protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}",
"protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}",
"protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}",
"protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}",
"protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}",
"protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}",
"protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}",
"protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}",
"protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}",
"protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}",
"protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}",
"protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}",
"@Override\r\nprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t process(req,resp);\r\n\t }",
"@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tprocess(req, resp);\n\t}",
"@Override\n\tpublic HttpResponse get(final String endpoint) {\n\t\treturn httpRequest(HTTP_GET, endpoint, null);\n\t}",
"public void doGet(HttpServletRequest request, HttpServletResponse response)\r\n\t\t\tthrows ServletException, IOException {\r\n\t}",
"@Override\r\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n processRequest(request, response);\r\n System.out.println(\"teste doget\");\r\n }",
"public void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n response.setContentType(\"text/plain\");\n // Actual logic goes here.\n PrintWriter out = response.getWriter();\n out.println(\"Wolken,5534-0848-5100,0299-6830-9164\");\n\ttry \n\t{\n Get g = new Get(Bytes.toBytes(request.getParameter(\"userid\")));\n Result r = table.get(g);\n byte [] value = r.getValue(Bytes.toBytes(\"v\"),\n Bytes.toBytes(\"\"));\n\t\tString valueStr = Bytes.toString(value);\n\t\tout.println(valueStr);\n\t}\n\tcatch (Exception e)\n\t{\n\t\tout.println(e);\n\t}\n }",
"@Override\r\n public void doGet(String path, HttpServletRequest request, HttpServletResponse response)\r\n throws Exception {\r\n // throw new UnsupportedOperationException();\r\n System.out.println(\"Inside the get\");\r\n response.setContentType(\"text/xml\");\r\n response.setCharacterEncoding(\"utf-8\");\r\n final Writer w = response.getWriter();\r\n w.write(\"inside the get\");\r\n w.close();\r\n }",
"@Override\r\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tdoProcess(req, resp);\r\n\t}",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n System.out.println(\"Console: doGET visited\");\n String result = \"\";\n //get the user choice from the client\n String choice = (request.getPathInfo()).substring(1);\n response.setContentType(\"text/plain;charset=UTF-8\");\n PrintWriter out = response.getWriter();\n //methods call appropriate to user calls\n if (Integer.valueOf(choice) == 3) {\n result = theBlockChain.toString();\n if (result != null) {\n out.println(result);\n response.setStatus(200);\n //set status if result output is not generated\n } else {\n response.setStatus(401);\n return;\n }\n }\n //verify chain method\n if (Integer.valueOf(choice) == 2) {\n response.setStatus(200);\n boolean validity = theBlockChain.isChainValid();\n out.print(\"verifying:\\nchain verification: \");\n out.println(validity);\n }\n }",
"@Override\n public DataObjectResponse<T> handleGET(DataObjectRequest<T> request)\n {\n if(getRequestValidator() != null) getRequestValidator().validateGET(request);\n\n DefaultDataObjectResponse<T> response = new DefaultDataObjectResponse<>();\n try\n {\n VisibilityFilter<T, DataObjectRequest<T>> visibilityFilter = visibilityFilterMap.get(VisibilityMethod.GET);\n List<Query> queryList = new LinkedList<>();\n if(request.getQueries() != null)\n queryList.addAll(request.getQueries());\n\n if(request.getId() != null)\n {\n // if the id is specified\n queryList.add(new ById(request.getId()));\n }\n\n DataObjectFeed<T> feed = objectPersister.retrieve(queryList);\n if(feed == null)\n feed = new DataObjectFeed<>();\n List<T> filteredObjects = visibilityFilter.filterByVisible(request, feed.getAll());\n response.setCount(feed.getCount());\n response.addAll(filteredObjects);\n }\n catch(PersistenceException e)\n {\n ObjectNotFoundException objectNotFoundException = new ObjectNotFoundException(String.format(OBJECT_NOT_FOUND_EXCEPTION, request.getId()), e);\n response.setErrorResponse(ErrorResponseFactory.objectNotFound(objectNotFoundException, request.getCID()));\n }\n return response;\n }",
"public void handleGet( HttpExchange exchange ) throws IOException {\n switch( exchange.getRequestURI().toString().replace(\"%20\", \" \") ) {\n case \"/\":\n print(\"sending /MainPage.html\");\n sendResponse( exchange, FU.readFromFile( getReqDir( exchange )), 200);\n break;\n case \"/lif\":\n // send log in page ( main page )\n sendResponse ( exchange, FU.readFromFile(getReqDir(exchange)), 200);\n //\n break;\n case \"/home.html\":\n\n break;\n case \"/book.html\":\n\n break;\n default:\n //checks if user is logged in\n\n //if not send log in page\n //if user is logged in then\n print(\"Sending\");\n String directory = getReqDir( exchange ); // dont need to do the / replace as no space\n File page = new File( getReqDir( exchange) );\n\n // IMPLEMENT DIFFERENT RESPONSE CODE FOR HERE IF EXISTS IS FALSE OR CAN READ IS FALSE\n sendResponse(exchange, FU.readFromFile(directory), 200);\n break;\n }\n }",
"public int handleGET(String requestURL) throws ClientProtocolException, IOException{\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\thttpGet = new HttpGet(requestURL);\t\t\r\n\t\t\t\t\t\t\r\n\t\tinputsource=null;\r\n\t\t\t\r\n\t\toutputString=\"\";\r\n\t\t\r\n\t\t//taking response by executing http GET object\r\n\t\tCloseableHttpResponse response = httpclient.execute(httpGet);\t\t\r\n\t\r\n\t\t/* \r\n\t\t * \tThe underlying HTTP connection is still held by the response object\r\n\t\t\tto allow the response content to be streamed directly from the network socket.\r\n\t\t\tIn order to ensure correct deallocation of system resources\r\n\t\t\tthe user MUST call CloseableHttpResponse.close() from a finally clause.\r\n\t\t\tPlease note that if response content is not fully consumed the underlying\r\n\t\t\tconnection cannot be safely re-used and will be shut down and discarded\r\n\t\t\tby the connection manager.\r\n\t\t */\r\n\t\t\r\n\t\t\tstatusLine= response.getStatusLine().toString();\t\t//status line\r\n\t\t\t\r\n\t\t\tHttpEntity entity1 = response.getEntity();\t\t\t\t//getting response entity from server response \t\r\n\t\t\t\t\t\r\n\t\t\tBufferedReader br=new BufferedReader(new InputStreamReader(entity1.getContent()));\r\n\r\n\t\t\tString line;\r\n\t\t\twhile((line=br.readLine())!=null)\r\n\t\t\t{\r\n\t\t\t\toutputString=outputString+line.toString();\r\n\t }\r\n\t\t\t\r\n\t\t\t//removing spaces around server response string.\r\n\t\t\toutputString.trim();\t\t\t\t\t\t\t\t\t\r\n\t\t\t\r\n\t\t\t//converting server response string into InputSource.\r\n\t\t\tinputsource = new InputSource(new StringReader(outputString));\t\r\n\t\t\t\r\n\t\t\t// and ensure it is fully consumed\r\n\t\t\tEntityUtils.consume(entity1);\t\t\t//consuming entity.\r\n\t\t\tresponse.close();\t\t\t\t\t\t//closing response.\r\n\t\t\tbr.close();\t\t\t\t\t\t\t\t//closing buffered reader\r\n\t\t\t\r\n\t\t\t//returning response code\r\n\t\t\treturn response.getStatusLine().getStatusCode();\r\n\t\r\n\t}",
"@Override\n\tprotected void doGet(SlingHttpServletRequest request, SlingHttpServletResponse response)\n\t\t\tthrows ServletException, IOException {\n\t\t logger.error(\"BISHUNNN CALLED\");\n\t\tString category = request.getParameter(\"category\").trim();\n\t\tGetHttpCall getHttpCall = new GetHttpCall();\n\t\turl = APIConstants.baseURL+category.toLowerCase();\n\t\tresponseString = getHttpCall.execute(url);\n\t\tresponse.getWriter().write(responseString);\n\t}",
"@Override\r\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n //processRequest(request, response);\r\n }",
"@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tPrintWriter out = resp.getWriter();\n\t\tout.print(\"<h1>Hello from your doGet method!</h1>\");\n\t}",
"public void doGet(HttpServletRequest request,\n HttpServletResponse response)\n throws IOException, ServletException {\n response.setContentType(TYPE_TEXT_HTML.label);\n response.setCharacterEncoding(UTF8.label);\n request.setCharacterEncoding(UTF8.label);\n String path = request.getRequestURI();\n logger.debug(RECEIVED_REQUEST + path);\n Command command = null;\n try {\n command = commands.get(path);\n command.execute(request, response);\n } catch (NullPointerException e) {\n logger.error(REQUEST_PATH_NOT_FOUND);\n request.setAttribute(JAVAX_SERVLET_ERROR_STATUS_CODE, 404);\n command = commands.get(EXCEPTION.label);\n command.execute(request, response);\n }\n }",
"public void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tString search = req.getParameter(\"searchBook\");\n\t\tString output=search;\n\n\t\t//redirect output to view search.jsp\n\t\treq.setAttribute(\"output\", output);\n\t\tresp.setContentType(\"text/json\");\n\t\tRequestDispatcher view = req.getRequestDispatcher(\"search.jsp\");\n\t\tview.forward(req, resp);\n\t\t\t\n\t}",
"public void doGet( HttpServletRequest request, HttpServletResponse response )\n throws ServletException, IOException\n {\n handleRequest( request, response, false );\n }",
"public void doGet(HttpServletRequest request, HttpServletResponse response)\n\t\t\tthrows ServletException, IOException {\n\n\t}",
"public void doGet(HttpServletRequest request, HttpServletResponse response)\n\t\t\tthrows ServletException, IOException {\n\n\t}",
"@GET\n @Produces(MediaType.APPLICATION_JSON)\n public Response handleGet() {\n Gson gson = GSONFactory.getInstance();\n List allEmployees = getAllEmployees();\n\n if (allEmployees == null) {\n allEmployees = new ArrayList();\n }\n\n Response response = Response.ok().entity(gson.toJson(allEmployees)).build();\n return response;\n }",
"@Override\n\tprotected void doGet(HttpServletRequest request, HttpServletResponse response)\n\t\t\tthrows IOException, ServletException {\n\t\tsuper.doGet(request, response);\t\t\t\n\t}",
"private static String sendGET(String getURL) throws IOException {\n\t\tURL obj = new URL(getURL);\n\t\tHttpURLConnection con = (HttpURLConnection) obj.openConnection();\n\t\tcon.setRequestMethod(\"GET\");\n\t\tString finalResponse = \"\";\n\n\t\t//This way we know if the request was processed successfully or there was any HTTP error message thrown.\n\t\tint responseCode = con.getResponseCode();\n\t\tSystem.out.println(\"GET Response Code : \" + responseCode);\n\t\tif (responseCode == HttpURLConnection.HTTP_OK) { // success\n\t\t\tBufferedReader in = new BufferedReader(new InputStreamReader(con.getInputStream()));\n\t\t\tString inputLine;\n\t\t\tStringBuffer buffer = new StringBuffer();\n\n\t\t\twhile ((inputLine = in.readLine()) != null) {\n\t\t\t\tbuffer.append(inputLine);\n\t\t\t}\n\t\t\tin.close();\n\n\t\t\t// print result\n\t\t\tfinalResponse = buffer.toString();\n\t\t} else {\n\t\t\tSystem.out.println(\"GET request not worked\");\n\t\t}\n\t\treturn finalResponse;\n\t}",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n //processRequest(request, response);\n }",
"@Override\n \tpublic void doGet(HttpServletRequest req, HttpServletResponse resp)\n \t\t\tthrows ServletException, IOException {\n \t\tdoPost(req, resp);\n \t}",
"public BufferedReader reqGet(final String route) throws\n ServerStatusException, IOException {\n System.out.println(\"first reqGet\");\n return reqGet(route, USER_AGENT);\n }",
"HttpGet getRequest(HttpServletRequest request, String address) throws IOException;",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override \r\nprotected void doGet(HttpServletRequest request, HttpServletResponse response) \r\nthrows ServletException, IOException { \r\nprocessRequest(request, response); \r\n}",
"protected void doGet(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\n String action = request.getParameter(\"action\");\r\n\r\n try {\r\n switch (action)\r\n {\r\n case \"/getUser\":\r\n \tgetUser(request, response);\r\n break;\r\n \r\n }\r\n } catch (Exception ex) {\r\n throw new ServletException(ex);\r\n }\r\n }",
"@Override\n protected void doGet\n (HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tdoProcess(req, resp);\n\t}",
"@Test\r\n\tpublic void doGet() throws Exception {\n\t\tCloseableHttpClient httpClient = HttpClients.createDefault();\r\n\t\t// Create a GET object and pass a url to it\r\n\t\tHttpGet get = new HttpGet(\"http://www.google.com\");\r\n\t\t// make a request\r\n\t\tCloseableHttpResponse response = httpClient.execute(get);\r\n\t\t// get response as result\r\n\t\tSystem.out.println(response.getStatusLine().getStatusCode());\r\n\t\tHttpEntity entity = response.getEntity();\r\n\t\tSystem.out.println(EntityUtils.toString(entity));\r\n\t\t// close HttpClient\r\n\t\tresponse.close();\r\n\t\thttpClient.close();\r\n\t}",
"private void requestGet(String endpoint, Map<String, String> params, RequestListener listener) throws Exception {\n String requestUri = Constant.API_BASE_URL + ((endpoint.indexOf(\"/\") == 0) ? endpoint : \"/\" + endpoint);\n get(requestUri, params, listener);\n }",
"protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t\tint i = request.getRequestURI().lastIndexOf(\"/\") + 1;\n\t\tString action = request.getRequestURI().substring(i);\n\t\tSystem.out.println(action);\n\t\t\n\t\tString view = \"Error\";\n\t\tObject model = \"service Non disponible\";\n\t\t\n\t\tif (action.equals(\"ProductsList\")) {\n\t\t\tview = productAction.productsList();\n\t\t\tmodel = productAction.getProducts();\n\t\t}\n\t\t\n\t\trequest.setAttribute(\"model\", model);\n\t\trequest.getRequestDispatcher(prefix + view + suffix).forward(request, response); \n\t}",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n\t throws ServletException, IOException {\n\tprocessRequest(request, response);\n }",
"protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t\tcommandAction(request,response);\r\n\t}"
] |
[
"0.7589609",
"0.71665615",
"0.71148175",
"0.705623",
"0.7030174",
"0.70291144",
"0.6995984",
"0.697576",
"0.68883485",
"0.6873811",
"0.6853569",
"0.6843572",
"0.6843572",
"0.6835363",
"0.6835363",
"0.6835363",
"0.68195957",
"0.6817864",
"0.6797789",
"0.67810035",
"0.6761234",
"0.6754993",
"0.6754993",
"0.67394847",
"0.6719924",
"0.6716244",
"0.67054695",
"0.67054695",
"0.67012346",
"0.6684415",
"0.6676695",
"0.6675696",
"0.6675696",
"0.66747975",
"0.66747975",
"0.6669016",
"0.66621476",
"0.66621476",
"0.66476154",
"0.66365504",
"0.6615004",
"0.66130257",
"0.6604073",
"0.6570195",
"0.6551141",
"0.65378064",
"0.6536579",
"0.65357745",
"0.64957607",
"0.64672184",
"0.6453189",
"0.6450501",
"0.6411481",
"0.6411481",
"0.6411481",
"0.6411481",
"0.6411481",
"0.6411481",
"0.6411481",
"0.6411481",
"0.6411481",
"0.6411481",
"0.6411481",
"0.6411481",
"0.64067316",
"0.6395873",
"0.6379907",
"0.63737476",
"0.636021",
"0.6356937",
"0.63410467",
"0.6309468",
"0.630619",
"0.630263",
"0.63014317",
"0.6283933",
"0.62738425",
"0.62680805",
"0.62585783",
"0.62553537",
"0.6249043",
"0.62457556",
"0.6239428",
"0.6239428",
"0.62376446",
"0.62359244",
"0.6215947",
"0.62125194",
"0.6207376",
"0.62067443",
"0.6204527",
"0.6200444",
"0.6199078",
"0.61876005",
"0.6182614",
"0.61762017",
"0.61755335",
"0.61716276",
"0.6170575",
"0.6170397",
"0.616901"
] |
0.0
|
-1
|
Handles the HTTP POST method.
|
@Override
protected void doPost(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
processRequest(request, response);
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"@Override\n\tpublic void doPost(Request request, Response response) {\n\n\t}",
"@Override\n protected void doPost(HttpServletRequest req, HttpServletResponse resp) {\n }",
"public void doPost( )\n {\n \n }",
"@Override\n public String getMethod() {\n return \"POST\";\n }",
"public String post();",
"@Override\n\tpublic void doPost(HttpRequest request, AbstractHttpResponse response)\n\t\t\tthrows IOException {\n\t\t\n\t}",
"@Override\n public String getMethod() {\n return \"POST\";\n }",
"public ResponseTranslator post() {\n setMethod(\"POST\");\n return doRequest();\n }",
"protected void doPost(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, java.io.IOException {\n }",
"public void doPost(HttpServletRequest req, HttpServletResponse resp)\n\t\t\tthrows IOException {\n\n\t}",
"public void postData() {\n\n\t}",
"@Override\n public void doPost(HttpServletRequest req, HttpServletResponse res) throws IOException, ServletException {\n logger.warn(\"doPost Called\");\n handle(req, res);\n }",
"@Override\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n metPost(request, response);\n }",
"protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n }",
"@Override\r\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp)\r\n\t\t\tthrows ServletException, IOException {\n\t\tsuper.doPost(req, resp);\r\n\t}",
"@Override\r\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n\r\n }",
"@Override\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp)\n\t\t\tthrows ServletException, IOException {\n\t\tsuper.doPost(req, resp);\n\t}",
"@Override\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp)\n\t\t\tthrows ServletException, IOException {\n\t\tsuper.doPost(req, resp);\n\t}",
"@Override\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp)\n\t\t\tthrows ServletException, IOException {\n\t\tsuper.doPost(req, resp);\n\t}",
"@Override\n\tpublic void postHandle(WebRequest request, ModelMap model) throws Exception {\n\n\t}",
"protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\n }",
"public void doPost(HttpServletRequest request, HttpServletResponse response)\r\n\t\t\tthrows ServletException, IOException {\r\n\r\n\t\t\r\n\t}",
"@Override\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\t\n\t}",
"@Override\n\tprotected HttpMethod requestMethod() {\n\t\treturn HttpMethod.POST;\n\t}",
"@Override\n\tprotected void handlePostBody(HashMap<String, HashMap<String, String>> params, DataFormat format) throws Exception {\n\t}",
"@Override\r\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n }",
"@Override\n\tprotected void doPost(HttpServletRequest request, HttpServletResponse response)\n\t\t\tthrows ServletException, IOException {\n\t}",
"@Override\r\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n \r\n }",
"@Override\r\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n \r\n }",
"@Override\n\n\tpublic void handlePOST(CoapExchange exchange) {\n\t\tFIleStream read = new FIleStream();\n\t\tread.tempWrite(Temp_Path, exchange.getRequestText());\n\t\texchange.respond(ResponseCode.CREATED, \"POST successfully!\");\n\t\t_Logger.info(\"Receive post request:\" + exchange.getRequestText());\n\t}",
"@Override\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n response.getWriter().println(\"go to post method in manager\");\n }",
"@Override\r\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tsuper.doPost(req, resp);\r\n\t}",
"@Override\r\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tsuper.doPost(req, resp);\r\n\t}",
"@Override\r\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tsuper.doPost(req, resp);\r\n\t}",
"@Override\n protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n }",
"@Override\n protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n }",
"public void doPost(HttpServletRequest request, HttpServletResponse response)\n\t\t\tthrows ServletException, IOException {\n\t\t\n\t}",
"@Override\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n \n }",
"public abstract boolean handlePost(FORM form, BindException errors) throws Exception;",
"@Override\n protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n super.doPost(req, resp);\n }",
"public void doPost(HttpServletRequest request, HttpServletResponse response)\n\t\t\tthrows ServletException, IOException {\n\t\n\t\t\t\n\t\t \n\t}",
"@Override\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tsuper.doPost(req, resp);\n\t}",
"@Override\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tsuper.doPost(req, resp);\n\t}",
"@Override\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tsuper.doPost(req, resp);\n\t}",
"public void processPost(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException\n {\n }",
"@Override\n\tpublic void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\n\t}",
"@Override\n\tpublic void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\n\t}",
"public void doPost(HttpServletRequest request, HttpServletResponse response)\n\t\t\tthrows ServletException, IOException {\n\n\n\t}",
"public void doPost(HttpServletRequest request ,HttpServletResponse response){\n\n }",
"@Override\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n\n }",
"protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n}",
"@Override\r\n\tpublic void postHandle(HttpServletRequest request,\r\n\t\t\tHttpServletResponse response, Object handler,\r\n\t\t\tModelAndView modelAndView) throws Exception {\n\r\n\t}",
"public void post(){\n\t\tHttpClient client = new HttpClient();\n\n\t\tPostMethod post = new PostMethod(\"http://211.138.245.85:8000/sso/POST\");\n//\t\tPostMethod post = new PostMethod(\"/eshopclient/product/show.do?id=111655\");\n//\t\tpost.addRequestHeader(\"Cookie\", cookieHead);\n\n\n\t\ttry {\n\t\t\tSystem.out.println(\"��������====\");\n\t\t\tint status = client.executeMethod(post);\n\t\t\tSystem.out.println(status);\n\t\t} catch (HttpException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\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//\t\ttaskCount++;\n//\t\tcountDown--;\n\t}",
"protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}",
"protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}",
"protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}",
"protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}",
"protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}",
"protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}",
"protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}",
"protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}",
"protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}",
"protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}",
"protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}",
"public void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException {\r\n\tlogTrace( req, \"POST log\" );\r\n\tString requestId = req.getQueryString();\r\n\tif (requestId == null) {\r\n\t try {\r\n\t\tServletUtil.bufferedRead( req.getInputStream() );\r\n\t } catch (IOException ex) {\r\n\t }\r\n\t logError( req, resp, new Exception(\"Unrecognized POST\"), \"\" );\r\n\t sendError(resp, \"Unrecognized POST\");\r\n\t} else\r\n\t if (\"post-request\".equals( requestId )) {\r\n\t\ttry {\r\n\t\t onMEVPostsRequest( req, resp );\r\n\t\t} catch (Exception e) {\r\n\t\t try {\r\n\t\t\tServletUtil.bufferedRead( req.getInputStream() );\r\n\t\t } catch (IOException ex) {\r\n\t\t }\r\n\t\t logError( req, resp, e, \"MEV POST error\" );\r\n\t\t sendError( resp, \"MEV POST error: \" + e.toString() );\r\n\t\t}\r\n\t } else if (\"post-response\".equals( requestId )) {\r\n\t\ttry {\r\n\t\t onPVMPostsResponse( req, resp );\r\n\t\t} catch (Exception e) {\r\n\t\t try {\r\n\t\t\tServletUtil.bufferedRead( req.getInputStream() );\r\n\t\t } catch (IOException ex) {\r\n\t\t }\r\n\t\t logError( req, resp, e, \"PVM POST error\" );\r\n\t\t sendError( resp, \"PVM POST error: \" + e.toString() );\r\n\t\t}\r\n\t }\r\n }",
"@Override\n\tpublic void postHandle(HttpServletRequest request,\n\t\t\tHttpServletResponse response, Object handler,\n\t\t\tModelAndView modelAndView) throws Exception {\n\t\t\n\t}",
"@Override\n\tpublic void postHandle(HttpServletRequest request,\n\t\t\tHttpServletResponse response, Object handler,\n\t\t\tModelAndView modelAndView) throws Exception {\n\t\t\n\t}",
"@Override\n\tpublic void postHandle(HttpServletRequest request,\n\t\t\tHttpServletResponse response, Object handler,\n\t\t\tModelAndView modelAndView) throws Exception {\n\t}",
"@Override\r\n\tpublic void postHandle(HttpServletRequest req, HttpServletResponse resp, Object handler, ModelAndView m)\r\n\t\t\tthrows Exception {\n\t\t\r\n\t}",
"@Override\n public final void doPost() {\n try {\n checkPermissions(getRequest());\n final IItem jSonStreamAsItem = getJSonStreamAsItem();\n final IItem outputItem = api.runAdd(jSonStreamAsItem);\n\n output(JSonItemWriter.itemToJSON(outputItem));\n } catch (final APIException e) {\n e.setApi(apiName);\n e.setResource(resourceName);\n throw e;\n\n }\n }",
"@Override\n\tvoid post() {\n\t\t\n\t}",
"@Override\r\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler,\r\n\t\t\tModelAndView modelAndView) throws Exception {\n\t\tSystem.out.println(\"=========interCpetor Post=========\");\r\n\t}",
"public void doPost(HttpServletRequest request, HttpServletResponse response)\n\t\t\tthrows ServletException, IOException {\n\t\tString method = request.getParameter(\"method\");\n\t\tswitch(method){\n\t\tcase \"Crawl\":\n\t\t\tcrawl(request, response);\n\t\t\tbreak;\n\t\tcase \"Extract\":\n\t\t\textract(request, response);\n\t\t\tbreak;\n\t\tcase \"JDBC\":\n\t\t\tjdbc(request, response);\n\t\t\tbreak;\n\t\tcase \"Indexer\":\n\t\t\tindexer(request, response);\n\t\t\tbreak;\n\t\t}\n\t}",
"@Override\r\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n processRequest(request, response);\r\n System.out.println(\"teste dopost\");\r\n }",
"protected void doPost(HttpServletRequest request,\r\n\t\t\tHttpServletResponse response)\r\n\t/* 43: */throws ServletException, IOException\r\n\t/* 44: */{\r\n\t\t/* 45:48 */doGet(request, response);\r\n\t\t/* 46: */}",
"@Override\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp)\n\t\t\tthrows ServletException, IOException {\n\t\tprocess(req, resp);\n\t}",
"@Override\r\n\tpublic void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler,\r\n\t\t\tModelAndView modelAndView) throws Exception {\n\r\n\t}",
"@Override\r\n\tpublic void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler,\r\n\t\t\tModelAndView modelAndView) throws Exception {\n\r\n\t}",
"@Override\r\n\tpublic void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler,\r\n\t\t\tModelAndView modelAndView) throws Exception {\n\r\n\t}",
"@Override\r\n\tpublic void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler,\r\n\t\t\tModelAndView modelAndView) throws Exception {\n\r\n\t}",
"@Override\r\n\tpublic void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler,\r\n\t\t\tModelAndView modelAndView) throws Exception {\n\r\n\t}",
"@Override\r\n\tpublic void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler,\r\n\t\t\tModelAndView modelAndView) throws Exception {\n\r\n\t}",
"@Override\r\n\tpublic void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler,\r\n\t\t\tModelAndView modelAndView) throws Exception {\n\r\n\t}",
"@Override\r\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n processRequest(request, response);\r\n }",
"@Override\r\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\tprocess(req,resp);\r\n\t}",
"public void handlePost(SessionSrvc session, IObjectContext context)\n throws Exception\n {\n }",
"public void doPost(HttpServletRequest request, HttpServletResponse response) {\n\t\tdoGet(request, response);\n\t}",
"public void doPost(HttpServletRequest request, HttpServletResponse response) {\n\t\tdoGet(request, response);\n\t}",
"public void doPost(HttpServletRequest request, HttpServletResponse response) {\r\n\t\tdoGet(request, response);\r\n\t}",
"@Override\r\n\tpublic void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler,\r\n\t\t\tModelAndView modelAndView) throws Exception {\n\t}",
"@Override\n protected void doPost\n (HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\r\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n try {\r\n processRequest(request, response);\r\n } catch (JSONException ex) {\r\n Logger.getLogger(PDCBukUpload.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }",
"@Override\r\n protected void doPost(HttpServletRequest request,\r\n HttpServletResponse response)\r\n throws ServletException,\r\n IOException {\r\n processRequest(request,\r\n response);\r\n\r\n }",
"@Override\r\n\tpublic void doPost(CustomHttpRequest request, CustomHttpResponse response) throws Exception {\n\t\tdoGet(request, response);\r\n\t}",
"@Override\n\tpublic void postHandle(HttpServletRequest request, HttpServletResponse response,\n\t\t\tObject handler, ModelAndView modelAndView) throws Exception {\n\n\t}",
"protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t\tdoHandle(request, response);\n\t}",
"private void postRequest() {\n\t\tSystem.out.println(\"post request, iam playing money\");\n\t}",
"@Override\r\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n processRequest(request, response);\r\n }",
"@Override\n public void postHandle(HttpServletRequest request,\n HttpServletResponse response, Object handler,\n ModelAndView modelAndView) throws Exception {\n\n }",
"@Override\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n try {\n processRequest(request, response);\n } catch (Exception ex) {\n Logger.getLogger(PedidoController.class.getName()).log(Level.SEVERE, null, ex);\n }\n }"
] |
[
"0.73289514",
"0.71383566",
"0.7116213",
"0.7105215",
"0.7100045",
"0.70236707",
"0.7016248",
"0.6964149",
"0.6889435",
"0.6784954",
"0.67733276",
"0.67482096",
"0.66677034",
"0.6558593",
"0.65582114",
"0.6525548",
"0.652552",
"0.652552",
"0.652552",
"0.65229493",
"0.6520197",
"0.6515622",
"0.6513045",
"0.6512626",
"0.6492367",
"0.64817846",
"0.6477479",
"0.64725804",
"0.6472099",
"0.6469389",
"0.6456206",
"0.6452577",
"0.6452577",
"0.6452577",
"0.6450273",
"0.6450273",
"0.6438126",
"0.6437522",
"0.64339423",
"0.64253825",
"0.6422238",
"0.6420897",
"0.6420897",
"0.6420897",
"0.6407662",
"0.64041835",
"0.64041835",
"0.639631",
"0.6395677",
"0.6354875",
"0.63334197",
"0.6324263",
"0.62959254",
"0.6288832",
"0.6288832",
"0.6288832",
"0.6288832",
"0.6288832",
"0.6288832",
"0.6288832",
"0.6288832",
"0.6288832",
"0.6288832",
"0.6288832",
"0.6280875",
"0.6272104",
"0.6272104",
"0.62711537",
"0.62616795",
"0.62544584",
"0.6251865",
"0.62274224",
"0.6214439",
"0.62137586",
"0.621211",
"0.620854",
"0.62023044",
"0.61775357",
"0.61775357",
"0.61775357",
"0.61775357",
"0.61775357",
"0.61775357",
"0.61775357",
"0.61638993",
"0.61603814",
"0.6148914",
"0.61465937",
"0.61465937",
"0.614548",
"0.6141879",
"0.6136717",
"0.61313903",
"0.61300284",
"0.6124381",
"0.6118381",
"0.6118128",
"0.61063534",
"0.60992104",
"0.6098801",
"0.6096766"
] |
0.0
|
-1
|
Returns a short description of the servlet.
|
@Override
public String getServletInfo() {
return "Short description";
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public String getServletInfo()\n {\n return \"Short description\";\n }",
"public String getServletInfo() {\n return \"Short description\";\n }",
"public String getServletInfo() {\n return \"Short description\";\n }",
"public String getServletInfo() {\n return \"Short description\";\n }",
"public String getServletInfo() {\n return \"Short description\";\n }",
"public String getServletInfo() {\n return \"Short description\";\n }",
"public String getServletInfo() {\n return \"Short description\";\n }",
"public String getServletInfo() {\n return \"Short description\";\n }",
"public String getServletInfo() {\n return \"Short description\";\n }",
"public String getServletInfo() {\n return \"Short description\";\n }",
"public String getServletInfo() {\n return \"Short description\";\n }",
"public String getServletInfo() {\r\n return \"Short description\";\r\n }",
"public String getServletInfo() {\r\n return \"Short description\";\r\n }",
"public String getServletInfo() {\r\n return \"Short description\";\r\n }",
"public String getServletInfo() {\r\n return \"Short description\";\r\n }",
"public String getServletInfo() {\r\n return \"Short description\";\r\n }",
"public String getServletInfo() {\r\n return \"Short description\";\r\n }",
"@Override\r\n public String getServletInfo() {\r\n return \"Short description\";\r\n }",
"@Override\r\n public String getServletInfo() {\r\n return \"Short description\";\r\n }",
"@Override\n public String getServletInfo() {\n return \"Short description\";\n }",
"@Override\n public String getServletInfo() {\n return \"Short description\";\n }",
"@Override\n public String getServletInfo() {\n return \"Short description\";\n }",
"@Override\n\tpublic String getServletInfo() {\n\t\treturn \"Short description\";\n\t}",
"@Override\n\tpublic String getServletInfo() {\n\t\treturn \"Short description\";\n\t}",
"@Override\n\tpublic String getServletInfo() {\n\t\treturn \"Short description\";\n\t}",
"@Override\n\tpublic String getServletInfo() {\n\t\treturn \"Short description\";\n\t}",
"@Override\n\tpublic String getServletInfo() {\n\t\treturn \"Short description\";\n\t}",
"@Override\n\tpublic String getServletInfo() {\n\t\treturn \"Short description\";\n\t}",
"@Override\r\n public String getServletInfo()\r\n {\r\n return \"Short description\";\r\n }",
"@Override\n public String getServletInfo()\n {\n return \"Short description\";\n }",
"@Override\r\n\tpublic String getServletInfo() {\r\n\t\treturn \"Short description\";\r\n\t}",
"@Override\r\n public String getServletInfo()\r\n {\r\n return \"Short description\";\r\n }",
"@Override\n public String getServletInfo() {\n return \"Short description\";\n }"
] |
[
"0.87634975",
"0.8732279",
"0.8732279",
"0.8732279",
"0.8732279",
"0.8732279",
"0.8732279",
"0.8732279",
"0.8732279",
"0.8732279",
"0.8732279",
"0.8699131",
"0.8699131",
"0.8699131",
"0.8699131",
"0.8699131",
"0.8699131",
"0.8531295",
"0.8531295",
"0.85282224",
"0.85282224",
"0.85282224",
"0.8527433",
"0.8527433",
"0.8527433",
"0.8527433",
"0.8527433",
"0.8527433",
"0.8516995",
"0.8512296",
"0.8511239",
"0.8510324",
"0.84964365"
] |
0.0
|
-1
|
transverse graph using bfs
|
static void bfs(int[][] G){
Queue<Integer> q = new LinkedList<Integer>();
for (int ver_start = 0; ver_start < N; ver_start ++){
if (visited[ver_start]) continue;
q.add(ver_start);
visited[ver_start] = true;
while(!q.isEmpty()){
int vertex = q.remove();
System.out.print((vertex+1) + " ");
for (int i=0; i<N; i++){
if (G[vertex][i] == 1 && !visited[i]){
// find neigbor of current vertex and not visited
// add into the queue
q.add(i);
visited[i] = true;
}
}
}
System.out.println("--");
}
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"private void bfs() {\n\t\tQueue<Node> q = new ArrayDeque<>();\n\t\tq.add(treeNodes.get(0));\n\t\twhile (!q.isEmpty()) {\n\t\t\tint size = q.size();\n\t\t\tfor (int i = 0; i < size; i++) {\n\t\t\t\tNode curr = q.poll();\n\t\t\t\ttime += curr.informTime;\n\t\t\t\tSet<Node> nextNodes = curr.nextNodes;\n\t\t\t\tif (nextNodes == null || curr.id == treeNodes.get(0).id)\n\t\t\t\t\tcontinue;\n\t\t\t\tfor (Node node : nextNodes) {\n\t\t\t\t\tq.add(node);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t}",
"static void bfs(String label) {\n\n /* Add a graph node to the queue. */\n queue.addLast(label);\n graphVisited.put(label, true);\n\n while (!queue.isEmpty()) {\n\n /* Take a node out of the queue and add it to the list of visited nodes. */\n if (!graphVisited.containsKey(queue.getFirst()))\n graphVisited.put(queue.getFirst(), true);\n\n String str = queue.removeFirst();\n\n /*\n For each unvisited vertex from the list of the adjacent vertices,\n add the vertex to the queue.\n */\n for (String lab : silhouette.get(str)) {\n if (!graphVisited.containsKey(lab) && lab != null && !queue.contains(lab))\n queue.addLast(lab);\n }\n }\n }",
"private void resolverBFS() {\n\t\tQueue<Integer> cola = new LinkedList<Integer>();\n\t\tint[] vecDistancia = new int[nodos.size()];\n\t\tfor (int i = 0; i < vecDistancia.length; i++) {\n\t\t\tvecDistancia[i] = -1;\n\t\t\trecorrido[i] = 0;\n\t\t}\n\t\tint nodoActual = 0;\n\t\tcola.add(nodoActual);\n\t\tvecDistancia[nodoActual] = 0;\n\t\trecorrido[nodoActual] = -1;\n\t\twhile (!cola.isEmpty()) {\n\t\t\tif (tieneAdyacencia(nodoActual, vecDistancia)) {\n\t\t\t\tfor (int i = 1; i < matrizAdyacencia.length; i++) {\n\t\t\t\t\tif (matrizAdyacencia[nodoActual][i] != 99 && vecDistancia[i] == -1) {\n\t\t\t\t\t\tcola.add(i);\n\t\t\t\t\t\tvecDistancia[i] = vecDistancia[nodoActual] + 1;\n\t\t\t\t\t\trecorrido[i] = nodoActual;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tcola.poll();\n\t\t\t\tif (!cola.isEmpty()) {\n\t\t\t\t\tnodoActual = cola.peek();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public void bfs(int s) {\n boolean[] visited = new boolean[v];\n int level = 0;\n parent[s] = 0;\n levels[s] = level;\n Queue<Integer> queue = new LinkedList<>();\n queue.add(s);\n visited[s] = true;\n while (!queue.isEmpty()){\n Integer next = queue.poll();\n System.out.print(next+\", \");\n Iterator<Integer> it = adj[next].listIterator();\n\n while (it.hasNext()){\n Integer i = it.next();\n if(!visited[i]){\n visited[i] = true;\n levels[i] = level;\n parent[i] = next;\n queue.add(i);\n }\n }\n\n level++;\n }\n }",
"private void bfs(Graph G, int s){\n queue.add(s);\n visited[s] = true;\n while (!queue.isEmpty()) {\n int v = queue.removeFirst();\n for (int w : G.adj(v)) {\n if (!visited[w]) {\n queue.add(w);\n visited[w] = true;\n edgeTo[w] = v;\n }\n }\n }\n }",
"public static String BFS(Graph grafo, Vertice vertice) {\r\n\t\tArrayList<Integer> busca = new ArrayList<Integer>(); // vertice nivel pai em ordem de descoberta\r\n\t\tArrayList<Vertice> aux1 = new ArrayList<Vertice>(); // fila de nos pais a serem visitados\r\n\t\tArrayList<Vertice> aux2 = new ArrayList<Vertice>(); // fila de nos filhos a serem visitdados\r\n\r\n\t\tint nivel = 0;\r\n\r\n\t\taux1.add(vertice);// adiciona a raiz a aux1 para inicio da iteracao\r\n\t\tvertice.setPai(0);// seta o pai da raiz para zero\r\n\r\n\t\twhile (aux1.size() > 0) {\r\n\t\t\tfor (int i = 0; i < aux1.size(); i++) {\r\n\t\t\t\tif (aux1.get(i).statusVertice() == false) {// verifrifica se o no ja nao foi atingido por outra ramificacao.\r\n\t\t\t\t\tbusca.add(aux1.get(i).getValor());\r\n\t\t\t\t\tbusca.add(nivel);\r\n\t\t\t\t\tbusca.add(aux1.get(i).getPai());\r\n\t\t\t\t\tvertice.alteraStatusVertice(true);\r\n\r\n\t\t\t\t\tfor (int j = 0; i < vertice.getArestas().size(); j++) {\r\n\t\t\t\t\t\tproxVertice(vertice, vertice.getArestas().get(j)).setPai(aux1.get(i).getValor());// associa o no pai\r\n\t\t\t\t\t\taux2.add(proxVertice(vertice, vertice.getArestas().get(j)));// adiciona lista dos proximos nos filhos serem percorridos\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\taux1 = aux2; // todos os nos pai ja foram percoridos, filhos se tornam a lista de nos pai\r\n\t\t\t\t\taux2.clear(); // lista de nos filhos e esvaziada para o proximo ciclo de iteracoes\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tnivel++;\r\n\t\t}\r\n\r\n\t\tresetStatusVertex(grafo);\r\n\r\n\t\treturn criaStringDeSaida(grafo, busca);// formata o resutltado da busca para a string esperada\r\n\t}",
"private void bfs(Node node, HashSet<Integer> visited) {\n\t\tLinkedList<Node> queue = new LinkedList<Node>();\n\t\tvisited.add(node.id);\n\t\tqueue.add(node);\n\t\twhile(!queue.isEmpty()) {\n\t\t\tNode s = queue.remove();\n\t\t\tSystem.out.println(s.id);\n\t\t\tfor(Node n : s.adj) {\n\t\t\t\tif(!visited.contains(n.id)) {\n\t\t\t\t\tqueue.add(n);\n\t\t\t\t\tvisited.add(n.id);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t}",
"private int bfs(String source, String destination, Map<String, List<String>> graph) {\n\n class Node {\n String word;\n int distance = 0;\n\n public Node(String word, int distance) {\n this.word = word;\n this.distance = distance;\n }\n }\n\n final Queue<Node> queue = new LinkedList<>();\n Set<String> visited = new HashSet<>();\n queue.offer(new Node(source, 0)); //distance of source to source is 0\n visited.add(source);\n\n while (!queue.isEmpty()) {\n\n final Node node = queue.poll();\n final int distance = node.distance;\n\n //if we reached the destination node\n if (node.word.equals(destination)) {\n return distance + 1;\n }\n\n //try all word which is 1 weight away\n for (String neighbour : graph.getOrDefault(node.word, new ArrayList<>())) {\n if (!visited.contains(neighbour)) {\n visited.add(neighbour);\n queue.offer(new Node(neighbour, distance + 1));\n }\n }\n\n\n }\n return 0;\n }",
"public static void bfs(int a, int b) {\n\t\t\r\n\t\tQueue<Node> q = new LinkedList<>();\r\n\t\t\r\n\t\tq.add(new Node(a,b));\r\n\t\t\r\n\t\twhile(!q.isEmpty()) {\r\n\t\t\t\r\n\t\t\tNode n = q.remove();\r\n\t\t\t\r\n\t\t\tint x = n.x;\r\n\t\t\tint y = n.y;\r\n\t\t\t\r\n\t\t\tif(x+1 <= N && map[x+1][y] > map[x][y]) {\r\n\t\t\t\tif(visited[x+1][y] != 1) {\r\n\t\t\t\t\tq.add(new Node(x+1,y));\r\n\t\t\t\t\tvisited[x+1][y] = cnt;\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\t\t\tif(x-1 > 0 && map[x-1][y] > map[x][y]) {\r\n\t\t\t\tif(visited[x-1][y] != 1) {\r\n\t\t\t\t\tq.add(new Node(x-1,y));\r\n\t\t\t\t\tvisited[x-1][y] = cnt;\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\t\t\tif(y-1 > 0 && map[x][y-1] > map[x][y]) {\r\n\t\t\t\tif(visited[x][y-1] != 1) {\r\n\t\t\t\t\tq.add(new Node(x,y-1));\r\n\t\t\t\t\tvisited[x][y-1] = cnt;\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\t\t\tif(y+1 <=N && map[x][y+1] > map[x][y]) {\r\n\t\t\t\tif(visited[x][y+1] != 1) {\r\n\t\t\t\t\tq.add(new Node(x,y+1));\r\n\t\t\t\t\tvisited[x][y+1] = cnt;\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\t\t\t\r\n\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\t\r\n\t\t\r\n\t}",
"private void BFS() {\n\n int fruitIndex = vertices.size()-1;\n Queue<GraphNode> bfsQueue = new LinkedList<>();\n bfsQueue.add(vertices.get(0));\n while (!bfsQueue.isEmpty()) {\n GraphNode pollNode = bfsQueue.poll();\n pollNode.setSeen(true);\n for (GraphNode node : vertices) {\n if (node.isSeen()) {\n continue;\n } else if (node.getID() == pollNode.getID()) {\n continue;\n } else if (!los.isIntersects(pollNode.getPoint(), node.getPoint())) {\n pollNode.getNeigbours().add(node);\n if (node.getID() != fruitIndex) {\n bfsQueue.add(node);\n node.setSeen(true);\n }\n }\n }\n }\n }",
"public void bft() {\r\n\t\tHashMap<String, Boolean> processed = new HashMap<>();\r\n\t\tLinkedList<Pair> queue = new LinkedList<>();\r\n\r\n\t\tArrayList<String> vnames = new ArrayList<>(vces.keySet());\r\n\t\tfor (String vname : vnames) {\r\n\t\t\tif (processed.containsKey(vname)) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\tPair rootpair = new Pair(vname, vname);\r\n\t\t\tqueue.addLast(rootpair);\r\n\t\t\twhile (queue.size() != 0) {\r\n\t\t\t\t// 1. removeFirst\r\n\t\t\t\tPair rp = queue.removeFirst();\r\n\r\n\t\t\t\t// 2. check if processed, mark if not\r\n\t\t\t\tif (processed.containsKey(rp.vname)) {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\tprocessed.put(rp.vname, true);\r\n\r\n\t\t\t\t// 3. Check, if an edge is found\r\n\t\t\t\tSystem.out.println(rp.vname + \" via \" + rp.psf);\r\n\r\n\t\t\t\t// 4. Add the unprocessed nbrs back\r\n\t\t\t\tArrayList<String> nbrnames = new ArrayList<>(rp.vtx.nbrs.keySet());\r\n\t\t\t\tfor (String nbrname : nbrnames) {\r\n\t\t\t\t\tif (!processed.containsKey(nbrname)) {\r\n\t\t\t\t\t\tPair np = new Pair(nbrname, rp.psf + nbrname);\r\n\t\t\t\t\t\tqueue.addLast(np);\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}",
"ArrayList<Node> BFTIter(final Graph graph)\n {\n ArrayList<Node> BFT_Order = new ArrayList<Node>();\n int numNodes = graph.numNodes;\n boolean visited[] = new boolean[numNodes];\n Queue<Node> queue = new LinkedList<Node>();\n\n // Loop through all nodes in graph to find unconnected nodes\n for ( int i = 0; i < numNodes; i++ )\n {\n Node currNode = graph.nodeList.get(i);\n\n if ( !visited[currNode.id] )\n {\n visited[i] = true;\n queue.add(currNode);\n }\n else\n continue;\n\n while ( !queue.isEmpty() )\n {\n currNode = queue.remove();\n BFT_Order.add(currNode);\n\n int numEdges = currNode.connectedNodes.size();\n\n for ( int j = 0; j < numEdges; j++ )\n {\n Node edgeNode = currNode.connectedNodes.get(j);\n\n if ( !visited[edgeNode.id] )\n {\n visited[edgeNode.id] = true;\n queue.add(edgeNode);\n }\n }\n\n } \n\n } \n\n return BFT_Order;\n \n }",
"public void bfs(Vertex<T> start) {\n\t\t\t// BFS uses Queue data structure\n\t\t\tQueue<Vertex<T>> que = new LinkedList<Vertex<T>>();\n\t\t\tstart.visited = true;\n\t\t\tque.add(start);\n\t\t\tprintNode(start);\n\n\t\t\twhile (!que.isEmpty()) {\n\t\t\t\tVertex<T> n = (Vertex<T>) que.remove();\n\t\t\t\tVertex<T> child = null;\n\t\t\t\twhile ((child = getUnvisitedChildren(n)) != null) {\n\t\t\t\t\tchild.visited = true;\n\t\t\t\t\tque.add(child);\n\t\t\t\t\tprintNode(child);\n\t\t\t\t}\n\t\t\t}\n\t\t}",
"public void bfs(GraphNode source)\n {\n Queue<GraphNode> q = new ArrayDeque<>();\n q.add(source);\n HashMap<GraphNode,Boolean> visit =\n new HashMap<GraphNode,Boolean>();\n visit.put(source,true);\n while (!q.isEmpty())\n {\n GraphNode u = q.poll();\n System.out.println(\"Value of Node \" + u.val);\n System.out.println(\"Address of Node \" + u);\n if (u.neighbours != null)\n {\n List<GraphNode> v = u.neighbours;\n for (GraphNode g : v)\n {\n if (visit.get(g) == null)\n {\n q.add(g);\n visit.put(g,true);\n }\n }\n }\n }\n System.out.println();\n }",
"@Override\n public void bfs() {\n\n }",
"HashMap<GamePiece, GamePiece> bfs(GamePiece from) {\n ArrayDeque<GamePiece> worklist = new ArrayDeque<GamePiece>();\n ArrayList<GamePiece> seen = new ArrayList<GamePiece>();\n HashMap<GamePiece, GamePiece> graph = new HashMap<GamePiece, GamePiece>();\n worklist.addFirst(from);\n graph.put(from, from);\n while (worklist.size() > 0) {\n GamePiece next = worklist.removeFirst();\n if (seen.contains(next)) {\n // if seen has the next element, don't do anything with it\n }\n else {\n for (String s : this.directions) {\n if (next.hasNeighbor(s) && next.connected(s)) {\n worklist.addFirst(next.neighbors.get(s));\n graph.put(next.neighbors.get(s), next);\n }\n }\n seen.add(next);\n }\n }\n return graph;\n }",
"private void bfs(int nodeKey) {\n Queue<Integer> q = new LinkedList<>();\n // initialize all the nodes\n for (node_data node : G.getV())\n node.setTag(0);\n\n int currentNode = nodeKey;\n\n // iterate the graph and mark nodes that have been visited\n while (G.getNode(currentNode) != null) {\n for (edge_data edge : G.getE(currentNode)) {\n node_data dest = G.getNode(edge.getDest());\n if (dest.getTag() == 0) {\n q.add(dest.getKey());\n }\n G.getNode(currentNode).setTag(1);\n }\n if(q.peek()==null)\n currentNode=-1;\n else\n currentNode = q.poll();\n }\n }",
"public static void main(String[] args) {\n\n BDNode a = new BDNode(\"A\");\n BDNode b = new BDNode(\"B\");\n BDNode c = new BDNode(\"C\");\n BDNode d = new BDNode(\"D\");\n BDNode e = new BDNode(\"E\");\n\n a.link(b);\n a.link(d);\n b.link(a);\n b.link(c);\n b.link(e);\n c.link(b);\n c.link(d);\n d.link(a);\n d.link(c);\n d.link(e);\n e.link(b);\n e.link(d);\n\n BDNode target = e;\n\n/*\n // BFS\n Queue<BDNode> queue = new LinkedList<>();\n queue.offer(a);\n\n while(!queue.isEmpty()) {\n BDNode n = queue.poll();\n n.visit();\n System.out.println(n); // 찾는 여정 출력\n\n if(n.equals(target)) {\n System.out.println(\"BFS Found! \" + n);\n break;\n }\n\n for (BDNode l : n.links) {\n if(l.isVisited()) continue;\n if (queue.contains(l)) continue;\n queue.offer(l);\n }\n\n // 위랑 같은 표현\n// n.links.stream()\n// .filter(l -> !queue.contains(l))\n// .forEach(queue::offer);\n }\n*/\n\n // DFS\n Stack<BDNode> stack = new Stack<>();\n stack.push(a);\n\n while(!stack.isEmpty()) {\n BDNode n = stack.pop();\n n.visit();\n System.out.println(n); // 찾는 여정 출력\n\n if (n.equals(target)) {\n System.out.println(\"DFS Found! \" + n);\n break;\n }\n\n for (BDNode l : n.links) {\n if (l.isVisited()) continue;\n if (stack.contains(l)) continue;\n\n stack.push(l);\n }\n }\n\n\n }",
"public void bfs()\n{\n Queue q=new LinkedList();\n q.add(this.rootNode);\n printNode(this.rootNode);\n rootNode.visited=true;\n while(!q.isEmpty())\n {\n Node n=(Node)q.remove();\n Node child=null;\n while((child=getUnvisitedChildNode(n))!=null)\n {\n child.visited=true;\n printNode(child);\n q.add(child);\n }\n }\n //Clear visited property of nodes\n clearNodes();\n}",
"public void bfs(Queue<Integer> queue, int visited[]) {\n if (queue.isEmpty()) {\n return;\n }\n\n int root = queue.poll();\n\n if (visited[root] == 1) {\n bfs(queue, visited);\n return;//alreadu into consideration\n }\n\n\n System.out.printf(\"Exploring of node %d has started\\n\", root);\n visited[root] = 1;\n\n\n for (int i = 0; i < adjMatrix[root].size(); i++) {\n if (visited[adjMatrix[root].get(i)] == 1 || visited[adjMatrix[root].get(i)] == 2) {\n continue;\n }\n queue.add(adjMatrix[root].get(i));\n }\n bfs(queue, visited);\n System.out.printf(\"Exploring of node %d has end\\n\", root);\n visited[root] = 2;\n }",
"public AbstractGraph<V>.Tree bfs(int v);",
"public AbstractGraph<V>.Tree bfs(int v);",
"int main()\n{\n // Create a graph given in the above diagram\n Graph g(4);\n g.addEdge(0, 1);\n g.addEdge(0, 2);\n g.addEdge(1, 2);\n g.addEdge(2, 0);\n g.addEdge(2, 3);\n g.addEdge(3, 3);\n \n cout << \"Following is Breadth First Traversal \"\n << \"(starting from vertex 2) n\";\n g.BFS(2);\n \n return 0;\n}",
"public void BFS() {\r\n\t\tQueue queue = new Queue();\r\n\t\tqueue.enqueue(this.currentVertex);\r\n\t\tcurrentVertex.printVertex();\r\n\t\tcurrentVertex.visited = true;\r\n\t\twhile (!queue.isEmpty()) {\r\n\t\t\tVertex vertex = (Vertex) queue.dequeue();\r\n\t\t\tVertex child = null;\r\n\t\t\twhile ((child = getUnvisitedChildVertex(vertex)) != null) {\r\n\t\t\t\tchild.visited = true;\r\n\t\t\t\tchild.printVertex();\r\n\t\t\t\tqueue.enqueue(child);\r\n\t\t\t}\r\n\t\t}\r\n\t\tclearVertexNodes();\r\n\t\tprintLine();\r\n\t}",
"void Graph::BFS(int s)\n{\n bool *visited = new bool[V];\n for(int i = 0; i < V; i++)\n visited[i] = false;\n \n // Create a queue for BFS\n list<int> queue;\n \n // Mark the current node as visited and enqueue it\n visited[s] = true;\n queue.push_back(s);\n \n // 'i' will be used to get all adjacent vertices of a vertex\n list<int>::iterator i;\n \n while(!queue.empty())\n {\n // Dequeue a vertex from queue and print it\n s = queue.front();\n cout << s << \" \";\n queue.pop_front();\n \n // Get all adjacent vertices of the dequeued vertex s\n // If a adjacent has not been visited, then mark it visited\n // and enqueue it\n for(i = adj[s].begin(); i != adj[s].end(); ++i)\n {\n if(!visited[*i])\n {\n visited[*i] = true;\n queue.push_back(*i);\n }\n }\n }",
"void BFS(int s)\n {\n /* List of visited vertices; all false in the beginning) */\n boolean visited[] = new boolean[V];\n\n /* Queue data structure is used for BFS */\n LinkedList<Integer> queue = new LinkedList<>();\n\n /* Mark starting node s as visited and enqueue it */\n visited[s]=true;\n queue.add(s);\n\n /* Until queue is empty, dequeue a single node in queue and look for it's neighboring vertices.\n * If an adjecent node hasn't been visited yet, set it as visited and enqueue this node. s*/\n while (queue.size() != 0)\n {\n /* Dequeue */\n s = queue.poll();\n System.out.print( s + \" \");\n\n /* Get all adjacent vertices */\n Iterator<Integer> i = adj[s].listIterator();\n while (i.hasNext())\n {\n int n = i.next();\n if (!visited[n])\n {\n visited[n] = true;\n queue.add(n);\n }\n }\n }\n }",
"private static void BFS(int[][] adjacencyMatrix) {\n\t\tint n = adjacencyMatrix.length;\n\t\tboolean visited[] = new boolean[n];\n\t\tfor(int i=0;i<n;i++) {\n\t\t\tif(!visited[i]) {\n\t\t\tprintBFS(adjacencyMatrix,i,visited);\n\t\t\t}\n\t\t}\n\t\t\t\n\t\t\n\t}",
"public void CFC() {\n\t\tthis.DFS(null);\n\t\tGrafo d2 = this.reverse();\n\n\t\tList<Vertice> decreasing_f2 = new ArrayList<Vertice>();\n\t\tfor (Vertice v1 : this.vertices.values()) {\n\t\t\tVertice v2 = d2.vertices.get(v1.id);\n\t\t\tv2.size = v1.f;\n\t\t\tdecreasing_f2.add(v2);\n\t\t}\n\t\tCollections.sort(decreasing_f2);\n\n\t\td2.DFS(decreasing_f2);\n\n\t\tthis.reset();\n\t\tfor (Vertice v21 : d2.vertices.values()) {\n\t\t\tVertice v11 = this.vertices.get(v21.id);\n\t\t\tif (v21.parent != null) {\n\t\t\t\tVertice v12 = this.vertices.get(v21.parent.id);\n\t\t\t\tv11.parent = v12;\n\t\t\t}\n\t\t}\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 }",
"void BFS(int s) {\n // Mark all the vertices as not visited(By default\n // set as false)\n boolean visited[] = new boolean[V];\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 queue.add(s);\n\n while (queue.size() != 0) {\n // Dequeue a vertex from queue and print it\n s = queue.poll();\n System.out.print(s + \" \");\n\n // Get all adjacent vertices of the dequeued vertex s\n // If a adjacent has not been visited, then mark it\n // visited and enqueue it\n Iterator<Integer> i = adj [s].listIterator();\n while (i.hasNext()) {\n int n = i.next();\n if (!visited [n]) {\n visited [n] = true;\n queue.add(n);\n }\n }\n }\n }",
"public void logicalToBoltGraph() {\n\t\tDefaultDirectedGraph<FStream, IndexedEdge<FStream>> G = (DefaultDirectedGraph<FStream, IndexedEdge<FStream>>) _graph.clone();\n\t\tint bolt_counter = 0;\n\n\t\tremoveMerges(G);\n\t\t\n\t\tArrayDeque<FStream> stack = new ArrayDeque<FStream>();\n\t\t\t\t\n\t\t// Look for the actual spouts in the graph.\n\t\tfor (FStream n : G.vertexSet()) {\n\t\t\tif (n.getType() == FStream.NodeType.SPOUT) {\n\t\t\t\tstack.add(n);\n\t\t\t}\n\t\t}\n\t\t\n\t\t// State for building the topology.\n\t\tboltMap = new HashMap<FStream, FlexyBolt>();\n\t\t// The edges link specific internal nodes between the bolts -- yes, it hurts my head too.\n\t\tboltG =\tnew DefaultDirectedGraph<FlexyBolt, IndexedEdge<FStream>>(new ErrorEdgeFactory());\n\t\tint edge_counter = 0;\n\n\t\t// Track through the stack and build up subgraphs.\n\t\twhile (stack.size() > 0) {\n\t\t\tFStream n = stack.pollFirst();\n\t\t\t\n\t\t\tFlexyBolt b = null;\n\t\t\tswitch (n.getType()) {\n\t\t\tcase SPOUT:\n\t\t\t\t// Create a bolt and link it into the map.\n\t\t\t\tb = new FlexyBolt(bolt_counter++, n);\n\t\t\t\tboltG.addVertex(b);\n\t\t\t\tbreak;\n\t\t\tcase FUNCTION: \n\t\t\tcase PROJECTION:\n\t\t\t\t// Pull the previous node.\n\t\t\t\tFStream prev_n = \n\t\t\t\t\t\t(new ArrayList<IndexedEdge<FStream>>(G.incomingEdgesOf(n)))\n\t\t\t\t\t\t\t\t.get(0).source; // Yuck.\n\t\t\t\t\n\t\t\t\t// Pull the bolt.\n\t\t\t\tb = boltMap.get(prev_n);\n\t\t\t\t// Link this node into the bolt.\n\t\t\t\tb.link(prev_n, n);\n\t\t\t\tbreak;\n\t\t\tcase SHUFFLE:\n\t\t\t\t// Create a bolt and link it into the map.\n\t\t\t\tb = new FlexyBolt(bolt_counter++, n);\n\t\t\t\tboltG.addVertex(b);\n\t\t\t\t\n\t\t\t\t// Add edges for all previous nodes\n\t\t\t\tfor (IndexedEdge<FStream> edge : G.incomingEdgesOf(n)) {\n\t\t\t\t\tFlexyBolt prev_b = boltMap.get(edge.source);\n\t\t\t\t\tprev_b.expose(edge.source);\n\t\t\t\t\t\n\t\t\t\t\tedge_counter += 1;\n\t\t\t\t\tIndexedEdge<FStream> e = new IndexedEdge<FStream>(edge.source, n, edge_counter);\n\t\t\t\t\t\n\t\t\t\t\tboltG.addEdge(prev_b, b, e);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase GROUPBY:\n\t\t\t\t// Create a new bolt for the Stage1/Store portion.\n\t\t\t\tb = new FlexyBolt(bolt_counter++, n);\n\t\t\t\tboltG.addVertex(b);\n\t\t\t\t\n\t\t\t\t// Link it to the preceding bolts.\n\t\t\t\tfor (IndexedEdge<FStream> edge : G.incomingEdgesOf(n)) {\n\t\t\t\t\tFlexyBolt prev_b = boltMap.get(edge.source);\n\n\t\t\t\t\t// Link this node into the bolt for Stage0 Aggregation.\n\t\t\t\t\tFStream s0_agg = n.copy();\n\t\t\t\t\ts0_agg.setStage0Agg(true);\n\t\t\t\t\tprev_b.link(edge.source, s0_agg);\n\t\t\t\t\tprev_b.expose(s0_agg);\n\t\t\t\t\tboltMap.put(s0_agg, prev_b);\n\t\t\t\t\t\n\t\t\t\t\tedge_counter += 1;\n\t\t\t\t\tIndexedEdge<FStream> e = new IndexedEdge<FStream>(s0_agg, n, edge_counter);\n\t\t\t\t\t\n\t\t\t\t\tboltG.addEdge(prev_b, b, e);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tthrow new RuntimeException(\"Unexpected node type: \" + n + \" \" + n.getType());\n\t\t\t}\n\t\t\t\n\t\t\t// Map the bolt.\n\t\t\tboltMap.put(n, b);\n\t\t\t\n\t\t\t// For all the adjacent nodes, add them to the stack.\n\t\t\tfor (IndexedEdge<FStream> edge : G.outgoingEdgesOf(n)) {\n\t\t\t\tif (!boltMap.containsKey(edge.target)) {\n\t\t\t\t\tstack.addLast(edge.target);\n\t\t\t\t}\n\t\t\t}\n\t\t} \n\t}",
"public static Integer[] LexBFS(Graph<Integer,String> g) {\n\t\tGraph<myVertex,String> h = new SparseGraph<myVertex,String>();\r\n\t\th = convertToWeighted(g);\r\n\t\tfinal int N = g.getVertexCount();\r\n\t\t//System.out.print(\"Done. Old graph: \"+N+\" vertices. New graph \" +h.getVertexCount()+\"\\n\");\r\n\t\t\r\n\t\t//System.out.print(\"New graph is:\\n\"+h+\"\\n\");\r\n\t\tmyVertex[] queue = new myVertex[N];\r\n\t\t\r\n\t\tIterator<myVertex> a = h.getVertices().iterator();\r\n\t\tqueue[0] = a.next(); // start of BFS search. Now add neighbours.\r\n\t\tint indexCounter = 1;\r\n\t\tint pivot = 0;\r\n\t\t//System.out.print(\"Initial vertex is: \"+queue[0]+\" \");\r\n\t\tSystem.out.print(\"STATUS REPORT:\\n queue = \"+queue+\"\\n indexCounter=\" + indexCounter+\"\\n pivot=\"+pivot+\"\\n\");\r\n\t\tIterator<myVertex> b = h.getNeighbors(queue[0]).iterator();\r\n\t\twhile (b.hasNext()) {\r\n\t\t\tqueue[indexCounter] = b.next();\r\n\t\t\tqueue[indexCounter].label.add(N);\r\n\t\t\tqueue[indexCounter].setColor(1); // 1 = grey = queued\r\n\t\t\tindexCounter++;\r\n\t\t}\r\n\t\t//System.out.print(\"with \"+(indexCounter-1) +\" neighbours\\n\");\r\n\t\t//System.out.print(\"STATUS REPORT:\\n queue = \"+queue+\"\\n indexCounter=\" + indexCounter+\"\\n pivot=\"+pivot+\"\\n\");\r\n\t\tqueue[0].setColor(2); // 2 = black = processed\r\n\t\t// indexCounter counts where the next grey vertex will be enqueued\r\n\t\t// pivot counts where the next grey vertex will be processed and turned black\r\n\r\n\t\tpivot = 1;\r\n\r\n\t\t//System.out.print(\"STATUS REPORT:\\n queue = \"+queue+\"\\n indexCounter=\" + indexCounter+\"\\n pivot=\"+pivot+\"\\n\");\r\n\t\twhile (pivot < indexCounter) {\r\n\t\t\t// first, find the highest labelled entry in the rest of the queue\r\n\t\t\t// and move it to the pivot position. This should be improved upon\r\n\t\t\t// by maintaining sorted order upon adding elements to the queue\r\n\t\t\t\r\n\t\t\t//System.out.print(\"choosing next vertex...\\n\");\r\n\t\t\tint max = pivot;\r\n\t\t\tfor (int i = pivot+1; i<indexCounter; i++) {\r\n\t\t\t\t//indexCounter is the next available spot, so indexCounter-1 is the last\r\n\t\t\t\t//entry i.e. it is last INDEX where queue[INDEX] is non-empty.\r\n\t\t\t\tif (queue[i].comesBefore(queue[max])) {\r\n\t\t\t\t\tmax = i;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t//System.out.print(\"STATUS REPORT:\\n queue = \"+queue+\"\\n indexCounter=\" + indexCounter+\"\\n pivot=\"+pivot+\"\\n\");\r\n\t\t\t// at the end of this for-loop, found the index \"max\" of the element of\r\n\t\t\t// the queue with the lexicographically largest label. Swap it with pivot.\r\n\t\t\tmyVertex temp = queue[pivot];\r\n\t\t\tqueue[pivot] = queue[max];\r\n\t\t\tqueue[max] = temp;\r\n\r\n\t\t\t//System.out.print(\"Chose vertex: \"+temp+\" to visit next\\n\");\r\n\t\t\t//System.out.print(\"STATUS REPORT:\\n queue = \"+queue+\"\\n indexCounter=\" + indexCounter+\"\\n pivot=\"+pivot+\"\\n\");\r\n\t\t\t\r\n\t\t\t// process the pivot point => find and mark its neighbours, turn it black.\r\n\t\t\tb = h.getNeighbors(queue[pivot]).iterator();\r\n\t\t\twhile (b.hasNext()) {\r\n\t\t\t\tmyVertex B = b.next();\r\n\t\t\t\tif (B.color == 0) {\r\n\t\t\t\t\t// found a vertex which has not been queued...\r\n\t\t\t\t\tqueue[indexCounter] = B;\r\n\t\t\t\t\tB.label.add(N-pivot);\r\n\t\t\t\t\tB.setColor(1);\r\n\t\t\t\t\tindexCounter++;\r\n\t\t\t\t}\r\n\t\t\t\telse if (B.color == 1) {\r\n\t\t\t\t\t// found a vertex in the queue which has not been processed...\r\n\t\t\t\t\tB.label.add(N-pivot);\r\n\t\t\t\t}\r\n\t\t\t\telse if (B.color != 2) {\r\n\t\t\t\t\tSystem.out.print(\"Critical Error: found a vertex in LexBFS process \");\r\n\t\t\t\t\tSystem.out.print(\"which has been visited but is not grey or black.\\n\");\r\n\t\t\t\t}\t\t\t\t\r\n\t\t\t\t//System.out.print(\"STATUS REPORT:\\n queue = \"+queue+\"\\n indexCounter=\" + indexCounter+\"\\n pivot=\"+pivot+\"\\n\");\r\n\t\t\t}\r\n\t\t\tqueue[pivot].setColor(2); //done processing current pivot\r\n\t\t\tpivot ++;\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t//LexBFS done; produce integer array to return;\r\n\t\t//System.out.print(\"STATUS REPORT:\\n queue = \"+queue+\"\\n indexCounter=\" + indexCounter+\"\\n pivot=\"+pivot+\"\\n\");\r\n\t\tInteger[] LBFS = new Integer[N]; // N assumes the graph is connected...\r\n\t\tfor (int i = 0; i<N; i++) {\r\n\t\t\tLBFS[i] = queue[i].id;\r\n\t\t}\r\n\t\t//System.out.print(\"STATUS REPORT:\\n queue = \"+queue+\"\\n indexCounter=\" + indexCounter+\"\\n pivot=\"+pivot+\"\\n\");\r\n\t\t//System.out.print(\"Returning array: \" + LBFS);\r\n\t\treturn LBFS;\r\n\t}",
"private static <V> Graph<V> unirGrafos(Graph<V> grafo1, Graph<V> grafo2) {\n V[] array = grafo2.getValuesAsArray();\n double[][] matriz = grafo2.getGraphStructureAsMatrix();\n for (int x = 0; x < array.length; x++) {\n grafo1.addNode(array[x]);\n for (int y = 0; y < array.length; y++) {\n if (matriz[x][y] != -1) {\n if (!grafo2.isDirected()) {\n matriz[y][x] = -1;\n }\n grafo1.addNode(array[y]);\n grafo1.addEdge(array[x], array[y], grafo2.getWeight(array[x], array[y]));\n }\n }\n }\n return grafo1;\n }",
"void BFS(int s, int d) \r\n { \r\n int source = s;\r\n int destination = d;\r\n boolean visited[] = new boolean[V];\r\n int parent[] = new int[V];\r\n \r\n // Create a queue for BFS \r\n LinkedList<Integer> queue = new LinkedList<Integer>(); \r\n \r\n // Mark the current node as visited and enqueue it \r\n \r\n visited[s]=true; \r\n queue.add(s); \r\n System.out.println(\"Search Nodes: \");\r\n while (queue.size() != 0) \r\n { \r\n int index = 0;\r\n \r\n // Dequeue a vertex from queue and print it \r\n \r\n s = queue.poll();\r\n \r\n System.out.print(convert2(s)); \r\n \r\n if(s == destination)\r\n {\r\n break;\r\n }\r\n \r\n System.out.print(\" -> \");\r\n while(index < adj[s].size()) \r\n { \r\n \r\n \r\n int n = adj[s].get(index); \r\n if (!visited[n]) \r\n { \r\n visited[n] = true;\r\n parent[n] = s;\r\n queue.add(n); \r\n }\r\n index = index+ 2;\r\n \r\n \r\n }\r\n \r\n \r\n \r\n }\r\n int check = destination;\r\n int cost = 0, first, second = 0;\r\n String string = \"\" + convert2(check);\r\n while(check!=source)\r\n {\r\n \r\n first = parent[check];\r\n string = convert2(first) + \" -> \" + string;\r\n while(adj[first].get(second) != check)\r\n {\r\n second++;\r\n }\r\n cost = cost + adj[first].get(second +1);\r\n check = first;\r\n second = 0;\r\n \r\n }\r\n \r\n System.out.println(\"\\n\\nPathway: \");\r\n \r\n System.out.println(string);\r\n \r\n \r\n System.out.println(\"\\nTotal cost: \" + cost);\r\n }",
"private Graph constructReversedGraph() {\n Graph Gt = new Graph(this.nodes.size());\n for (int i = 0; i < this.nodes.size(); i++) {\n // the from node in the original graph\n Node from = this.nodes.get(i);\n // set the finishing time from the original graph to the same node in G^t so we can sort by finishing times\n Gt.getNodes().get(i).setF(from.getF());\n for (int j = 0; j < from.getAdjacencyList().size(); j++) {\n Node to = from.getAdjacencyList().get(j);\n Gt.addEdge(to.getName(), from.getName());\n }\n }\n return Gt;\n }",
"private void transPose(graph g) {\n\t\tIterator it = g.getV().iterator();\n\t\twhile (it.hasNext()) {\n\t\t\tnode_data temp = (node_data) it.next();\n\t\t\tif(g.getE(temp.getKey())!=null) {\n\t\t\t\tIterator it1 = g.getE(temp.getKey()).iterator();\n\t\t\t\twhile (it1.hasNext()) {\n\t\t\t\t\tedge_data temp1 = (edge_data) it1.next();\n\t\t\t\t\tif (temp1 != null && temp1.getTag() == 0) {\n\t\t\t\t\t\tif (g.getEdge(temp1.getDest(), temp1.getSrc()) != null) {\n\t\t\t\t\t\t\tEdge temps = new Edge((Edge)g.getEdge(temp1.getSrc(),temp1.getDest()));\n\t\t\t\t\t\t\tdouble weight1 = g.getEdge(temp1.getSrc(),temp1.getDest()).getWeight();\n\t\t\t\t\t\t\tdouble weight2 = g.getEdge(temp1.getDest(),temp1.getSrc()).getWeight();\n\t\t\t\t\t\t\tg.connect(temp1.getSrc(),temp1.getDest(),weight2);\n\t\t\t\t\t\t\tg.connect(temps.getDest(),temps.getSrc(),weight1);\n\t\t\t\t\t\t\tg.getEdge(temps.getDest(), temps.getSrc()).setTag(1);\n\t\t\t\t\t\t\tg.getEdge(temps.getSrc(),temps.getDest()).setTag(1);\n\t\t\t\t\t\t\tit1 = g.getE(temp.getKey()).iterator();\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tg.connect(temp1.getDest(), temp1.getSrc(), temp1.getWeight());\n\t\t\t\t\t\t\tg.getEdge(temp1.getDest(), temp1.getSrc()).setTag(1);\n\t\t\t\t\t\t\tg.removeEdge(temp1.getSrc(), temp1.getDest());\n\t\t\t\t\t\t\tit1 = g.getE(temp.getKey()).iterator();\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}",
"public void dft() {\r\n\t\tHashMap<String, Boolean> processed = new HashMap<>();\r\n\t\tLinkedList<Pair> stack = new LinkedList<>();\r\n\r\n\t\tArrayList<String> vnames = new ArrayList<>(vces.keySet());\r\n\t\tfor (String vname : vnames) {\r\n\t\t\tif (processed.containsKey(vname)) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\tPair rootpair = new Pair(vname, vname);\r\n\t\t\tstack.addFirst(rootpair);\r\n\t\t\twhile (stack.size() != 0) {\r\n\t\t\t\t// 1. removeFirst\r\n\t\t\t\tPair rp = stack.removeFirst();\r\n\r\n\t\t\t\t// 2. check if processed, mark if not\r\n\t\t\t\tif (processed.containsKey(rp.vname)) {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\tprocessed.put(rp.vname, true);\r\n\r\n\t\t\t\t// 3. Check, if an edge is found\r\n\t\t\t\tSystem.out.println(rp.vname + \" via \" + rp.psf);\r\n\r\n\t\t\t\t// 4. Add the unprocessed nbrs back\r\n\t\t\t\tArrayList<String> nbrnames = new ArrayList<>(rp.vtx.nbrs.keySet());\r\n\t\t\t\tfor (String nbrname : nbrnames) {\r\n\t\t\t\t\tif (!processed.containsKey(nbrname)) {\r\n\t\t\t\t\t\tPair np = new Pair(nbrname, rp.psf + nbrname);\r\n\t\t\t\t\t\tstack.addFirst(np);\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}",
"ArrayList<Node> BFTRec(final Graph graph)\n {\n ArrayList<Node> BFT_Order = new ArrayList<Node>();\n int numNodes = graph.numNodes;\n boolean visited[] = new boolean[numNodes];\n\n // Start at every node to ensure that all nodes are visited for unconnected graphs\n for ( int i = 0; i < numNodes; i++ )\n {\n if ( !visited[i] )\n {\n visited[i] = true;\n Node currNode = graph.nodeList.get(i);\n Queue<Node> queue = new LinkedList<Node>();\n queue.add(currNode);\n BFT_Order.addAll( BFTRec_Helper(queue, visited) ); \n\n }\n }\n return BFT_Order;\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 static void main(String[] args) {\nDGraph g=new DGraph();\r\nDirectedDFS d=new DirectedDFS(g);\r\nfor(Iterator<Integer> i=d.preorder.iterator();i.hasNext();)\r\n{\r\n\tSystem.out.print(i.next()+\" \");\r\n}\r\nSystem.out.println();\r\nfor(Iterator<Integer> i=d.postorder.iterator();i.hasNext();)\r\n{\r\n\tSystem.out.print(i.next()+\" \");\r\n}\r\nSystem.out.println();\r\n\r\n/*for(Iterator i=d.topologicalorder.iterator();i.hasNext();)\r\n{\r\n\tSystem.out.print(i.next()+\" \");\r\n}\r\nSystem.out.println();*/\r\n\r\n\r\n\tfor(int w:d.reversepost())\r\n\t\tSystem.out.print(w+\" \");\r\n\t//System.out.println(d.topologicalorder.pop());\r\n\t}",
"private String bfs(){\n String ans=\"\";\n //Base Case\n if (mRoot == null)\n return \"\";\n if (mRoot.mIsLeaf)\n return mRoot.toString();\n //create a queue for nodes and a queue for signs\n Queue<BTNode> q = new QueueAsLinkedList<>();\n Queue<Character> s = new QueueAsLinkedList<>();\n BTNode currNode = mRoot;\n q.enqueue(currNode);\n return getBfsOutput(ans, q, s, currNode);\n }",
"public void bfs(Pair<Integer, Integer> current, Pair<Integer, Integer> goal) {\n var visited = new HashSet<Pair<Integer, Integer>>(300);\n var queue = new LinkedList<Pair<Integer, Integer>>();\n \n visited.add(current);\n queue.add(current);\n \n while (!queue.isEmpty()) {\n var toVisit = queue.poll();\n if (goal.equals(toVisit)) {\n goal.setParent(toVisit);\n toVisit.setChild(goal);\n break;\n }\n var neighbors = Utils.getNeighbors(toVisit);\n neighbors.forEach(p -> {\n // only move through SAFE tiles!\n // unless the neighbor is goal node!\n if (p.equals(goal) ||\n (!visited.contains(p) &&\n grid[p.getA()][p.getB()].getTileTypes().contains(Tile.SAFE)))\n {\n visited.add(p);\n p.setParent(toVisit);\n toVisit.setChild(p);\n queue.add(p);\n }\n });\n }\n }",
"public static void main(String[] args) {\n Graph graph = new Graph(16);\n graph.addEdge(0,1);\n graph.addEdge(1,2);\n graph.addEdge(2,3);\n graph.addEdge(3,4);\n graph.addEdge(4,5);\n graph.addEdge(5,6);\n graph.addEdge(6,7);\n graph.addEdge(8,9);\n graph.addEdge(9,10);\n graph.addEdge(10,11);\n graph.addEdge(11,12);\n graph.addEdge(13,14);\n graph.addEdge(14,15);\n graph.addEdge(15,0);\n graph.addEdge(0,8);\n graph.addEdge(1,10);\n graph.addEdge(2,9);\n graph.addEdge(3,11);\n graph.addEdge(3,14);\n graph.addEdge(4,7);\n graph.addEdge(4,13);\n graph.addEdge(5,8);\n graph.addEdge(5,15);\n graph.printGraph();\n System.out.println(\"DFS Traversal\");\n graph.DFS(3);\n System.out.println();\n System.out.println(\"BFS Traversal\");\n graph.BFS(3);\n// System.out.println();\n// for (int i=0; i<graph.vertices; i++)\n// {\n// if(graph.visited[i]!=true)\n// {\n// graph.DFS(i);\n// }\n// }\n\n }",
"@Override\n\tpublic List<Node<E>> bfs(DirectedGraph<E> graph) {\n\t\tList<Node<E>> returnList = new ArrayList<>(); // O(1)\n\t\tHashSet<Node<E>> visitedList = new HashSet<>(); // O(1)\n\t\tHashSet<Node<E>> hashSet = new HashSet<>(); // O(1)\n\n\t\t// If the graph does contains heads, iterate from the head.\n\t\tif(graph.headCount() > 0) { // O(1)\n\t\t\tIterator<Node<E>> heads = graph.heads(); // O(1)\n\t\t\twhile(heads.hasNext()) { // O(n)\n\t\t\t\tNode<E> node = heads.next(); // O(1)\n\n\t\t\t\tif(!visitedList.contains(node)) { // O(1)\n\t\t\t\t\tnode.num = visitedList.size(); // O(1)\n\t\t\t\t\tvisitedList.add(node); // O(1)\n\t\t\t\t\thashSet.add(node); // O(1)\n\t\t\t\t\treturnList.add(node); // O(1)\n\t\t\t\t\treturnList = bfsRecursive(hashSet, visitedList, returnList); // O(1)\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// Else start from the first node in the graph.\n\t\telse {\n\t\t\thashSet.add(graph.getNodeFor(graph.allItems().get(0))); // O(1)\n\t\t\treturnList = bfsRecursive(hashSet, visitedList, returnList); // O(1)\n\t\t}\n\t\treturn returnList;\n\t}",
"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 void transferLocal(Graph graph) {\n Set<NodePair> nonadjacencies = nonadjacencies(graph);\n for (Graph pag : input) {\n for (Edge edge : pag.getEdges()) {\n NodePair graphNodePair = new NodePair(graph.getNode(edge.getNode1().getName()), graph.getNode(edge.getNode2().getName()));\n if (nonadjacencies.contains(graphNodePair)) {\n continue;\n }\n if (!graph.isAdjacentTo(graphNodePair.getFirst(), graphNodePair.getSecond())) {\n graph.addEdge(new Edge(graphNodePair.getFirst(), graphNodePair.getSecond(), edge.getEndpoint1(), edge.getEndpoint2()));\n continue;\n }\n Endpoint first = edge.getEndpoint1();\n Endpoint firstCurrent = graph.getEndpoint(graphNodePair.getSecond(), graphNodePair.getFirst());\n if (!first.equals(Endpoint.CIRCLE)) {\n if ((first.equals(Endpoint.ARROW) && firstCurrent.equals(Endpoint.TAIL)) ||\n (first.equals(Endpoint.TAIL) && firstCurrent.equals(Endpoint.ARROW))) {\n graph.setEndpoint(graphNodePair.getSecond(), graphNodePair.getFirst(), Endpoint.CIRCLE);\n } else {\n graph.setEndpoint(graphNodePair.getSecond(), graphNodePair.getFirst(), edge.getEndpoint1());\n }\n }\n Endpoint second = edge.getEndpoint2();\n Endpoint secondCurrent = graph.getEndpoint(graphNodePair.getFirst(), graphNodePair.getSecond());\n if (!second.equals(Endpoint.CIRCLE)) {\n if ((second.equals(Endpoint.ARROW) && secondCurrent.equals(Endpoint.TAIL)) ||\n (second.equals(Endpoint.TAIL) && secondCurrent.equals(Endpoint.ARROW))) {\n graph.setEndpoint(graphNodePair.getFirst(), graphNodePair.getSecond(), Endpoint.CIRCLE);\n } else {\n graph.setEndpoint(graphNodePair.getFirst(), graphNodePair.getSecond(), edge.getEndpoint2());\n }\n }\n }\n for (Triple triple : pag.getUnderLines()) {\n Triple graphTriple = new Triple(graph.getNode(triple.getX().getName()), graph.getNode(triple.getY().getName()), graph.getNode(triple.getZ().getName()));\n if (graphTriple.alongPathIn(graph)) {\n graph.addUnderlineTriple(graphTriple.getX(), graphTriple.getY(), graphTriple.getZ());\n definiteNoncolliders.add(graphTriple);\n }\n }\n }\n }",
"public BFS(Graph graph, Visitor vis)\n {\n this.graph = graph;\n this.filt = graph.getFilter();\n this.colors = new Color[graph.nodeAttrSize()];\n this.bfsNumbers = new int[graph.nodeAttrSize()];\n this.bfsNum = 0;\n this.visitor = vis;\n Arrays.fill(colors, Color.white);\n queue = new LinkedList<Node>();\n }",
"public static void main( String[] args ){\n AdjListsGraph<String> a = new AdjListsGraph<String>( \"Sample-Graph.tgf\" );\n System.out.println( a );\n System.out.println( \"Number of vertices (5):\" + a.getNumVertices());\n System.out.println( \"Number of arcs (7):\" + a.getNumArcs());\n System.out.println( \"isEdge A<-->B (TRUE):\" + a.isEdge(\"A\", \"B\"));\n System.out.println( \"isArc A-->C (TRUE):\" + a.isArc( \"A\",\"C\"));\n System.out.println( \"isEdge D<-->E (FALSE):\" + a.isEdge( \"D\",\"E\" ));\n System.out.println( \"isArc D -> E (TRUE):\" + a.isArc( \"D\",\"E\" ));\n System.out.println( \"isArc E -> D (FALSE):\" + a.isArc( \"E\",\"D\" ));\n System.out.println( \"Removing vertex A.\");\n a.removeVertex( \"A\" );\n System.out.println( \"Adding edge B<-->D\");\n a.addEdge( \"B\",\"D\" );\n System.out.println( \"Number of vertices (4):\" + a.getNumVertices());\n System.out.println( \"Number of arcs (5):\" + a.getNumArcs());\n System.out.println( a );\n System.out.println( \"Adj to B ([C,D]):\" + a.getSuccessors( \"B\" ) );\n System.out.println( \"Adj to C ([B]):\" + a.getSuccessors( \"C\" ));\n System.out.println( \"Adding A (at the end of vertices).\" );\n a.addVertex( \"A\" ); \n System.out.println( \"Adding B (should be ignored).\" );\n a.addVertex( \"B\" );\n System.out.println( \"Saving the graph into BCDEA.tgf\" );\n a.saveToTGF( \"BCDEA.tgf\" );\n System.out.println( \"Adding F->G->H->I->J->K->A.\" );\n a.addVertex( \"F\" );\n a.addVertex( \"G\" );\n a.addArc( \"F\", \"G\" );\n a.addVertex( \"H\" );\n a.addArc( \"G\", \"H\" );\n a.addVertex( \"I\" );\n a.addArc( \"H\", \"I\" );\n a.addVertex( \"J\" );\n a.addArc( \"I\", \"J\" );\n a.addVertex( \"K\" );\n a.addArc( \"J\", \"K\" );\n a.addArc( \"K\", \"A\" );\n System.out.println( a );\n System.out.println( \"Saving the graph into A-K.tgf\" );\n a.saveToTGF( \"A-K.tgf\" );\n }",
"Set<String> bfsTraversal(Graph graph, String root) {\n Set<String> seen = new LinkedHashSet<String>();\n Queue<String> queue = new LinkedList<String>();\n queue.add(root);\n seen.add(root);\n\n while (!queue.isEmpty()) {\n String node = queue.poll();\n for (Node n : graph.getAdjacentNodes(node)) {\n if (!seen.contains(n.data)) {\n seen.add(n.data);\n queue.add(n.data);\n }\n }\n }\n\n return seen;\n }",
"private static void bfs(State curr) {\n curr.buildStack(curr.getSuccessors(curr));\r\n \r\n if(curr.isGoalState()) \r\n System.out.println(curr.getOrderedPair()+\" Goal\");//initial is goal state\r\n else\r\n System.out.println(curr.getOrderedPair());//initial\r\n \r\n curr.close.add(curr);\r\n while(!curr.open.isEmpty()&&!curr.isGoalState()) {\r\n curr.buildStack(curr.getSuccessors(curr));\r\n curr.printHelp(curr, 3);\r\n curr = curr.open.get(0);\r\n curr.close.add(curr.open.remove(0));\r\n }\r\n \r\n if(curr.isGoalState()) {\r\n System.out.println(curr.getOrderedPair() + \" Goal\");\r\n curr.printPath(curr);\r\n }\r\n }",
"public void dfs() {\n\t\tfor (Vertice v : vertices) {\n\t\t\tv.setVisited(false);\n\t\t}\n\t\tfor (Vertice v : vertices) {\n\t\t\tif (!v.getVisited()) {\n\t\t\t\tVisitar(v, -1);\n\t\t\t}\n\t\t}\n\t}",
"public String BFS(int g) {\n\t\t//TODO\n\t}",
"public static void main (String[] args) {\n\t GraphListBfs g = new GraphListBfs(7);\n\t g.addEdge(0,1);\n\t g.addEdge(0,4);\n\t g.addEdge(1,2);\n\t g.addEdge(1,3);\n\t g.addEdge(1,4);\n\t g.addEdge(2,3);\n\t g.addEdge(3,4);\n\t\n\t g.bfs(0);\n\t}",
"void bfs(SimpleVertex simpleVertex) {\n\t\twhile (true) {\n\t\t\tif (simpleVertex.isVisited == false) {\n\n\t\t\t\tif (simpleVertex.isAdded == false) {\n\t\t\t\t\tqueue.add(simpleVertex);\n\t\t\t\t\tsimpleVertex.isAdded = true;\n\t\t\t\t}\n\t\t\t\tsimpleVertex.isVisited = true;\n\t\t\t\tSystem.out.print(simpleVertex.Vertexname + \" \");\n\n\t\t\t\tfor (int i = 0; i < simpleVertex.neighborhood.size(); i++) {\n\t\t\t\t\tSimpleEdge node = simpleVertex.neighborhood.get(i);\n\n\t\t\t\t\tif (node.two.isAdded == false)\n\t\t\t\t\t\tqueue.add(node.two);\n\t\t\t\t\tnode.two.isAdded = true;\n\n\t\t\t\t}\n\t\t\t\tqueue.poll();\n\t\t\t\tif (!queue.isEmpty())\n\t\t\t\t\tbfs(queue.peek());\n\t\t\t}\n\t\t\tbreak;\n\t\t}\n\n\t}",
"public static void main(String[] args) throws IOException {\n File file = new File(args[0]);\r\n //FileOutputStream f = new FileOutputStream(\"prat_dfs_data2.txt\");\r\n //System.setOut(new PrintStream(f));\r\n BufferedReader reader = new BufferedReader(new FileReader(file));\r\n String line;\r\n line = reader.readLine();\r\n int nodecount = 0;\r\n HashMap <String , Integer> nodeMap = new HashMap <String , Integer>(); \r\n while ((line = reader.readLine()) != null ) {\r\n String data[] = line.split(\",(?=(?:[^\\\"]*\\\"[^\\\"]*\\\")*[^\\\"]*$)\");\r\n if (!nodeMap.containsKey(data[0].replaceAll(\"^\\\"|\\\"$\", \"\"))){\r\n nodeMap.put(data[0].replaceAll(\"^\\\"|\\\"$\", \"\"), nodecount);\r\n nodecount++;\r\n }\r\n }\r\n reader.close();\r\n Vertex adjList[] = new Vertex[nodecount];\r\n Vertex sortVer[] = new Vertex[nodecount];\r\n for(int it = 0; it < nodecount; it++){\r\n adjList[it] = new Vertex(it);\r\n }\r\n nodeMap.forEach((k, v) -> adjList[v].val = k);\r\n File file2 = new File(args[1]);\r\n BufferedReader reader2 = new BufferedReader(new FileReader(file2));\r\n line = reader2.readLine();\r\n while ((line = reader2.readLine()) !=null) {\r\n String data[] = line.split(\",(?=(?:[^\\\"]*\\\"[^\\\"]*\\\")*[^\\\"]*$)\");\r\n String source = data[0].replaceAll(\"^\\\"|\\\"$\", \"\");\r\n String target = data[1].replaceAll(\"^\\\"|\\\"$\", \"\");\r\n\r\n int weight = Integer.parseInt(data[2]);\r\n Vertex current = adjList[nodeMap.get(source)];\r\n Vertex newbie = new Vertex(nodeMap.get(target));\r\n current.countN++;\r\n current.co_occur += weight;\r\n if (adjList[nodeMap.get(source)].next == null){\r\n current.next = newbie;\r\n newbie.prev = current;\r\n }\r\n else{\r\n current.next.prev = newbie;\r\n newbie.next = current.next;\r\n current.next = newbie;\r\n newbie.prev = current;\r\n }\r\n Vertex current1 = adjList[nodeMap.get(target)];\r\n Vertex newbie1 = new Vertex(nodeMap.get(source));\r\n current1.co_occur += weight;\r\n current1.countN++;\r\n if (current1.next == null){\r\n current1.next = newbie1;\r\n newbie1.prev = current1;\r\n }\r\n else{\r\n current1.next.prev = newbie1;\r\n newbie1.next = current1.next;\r\n current1.next = newbie1;\r\n newbie1.prev = current1;\r\n }\r\n }\r\n reader2.close();\r\n \r\n for(int it = 0; it < nodecount; it++){\r\n sortVer[it] = new Vertex(adjList[it].id);\r\n sortVer[it].val = adjList[it].val;\r\n sortVer[it].co_occur = adjList[it].co_occur;\r\n }\r\n if (args[2].equals(\"average\")){\r\n double countdeg = 0;\r\n for(int it = 0; it<nodecount; it++){\r\n countdeg+= (double) adjList[it].countN;\r\n }\r\n countdeg = countdeg / (double) (nodecount);\r\n System.out.printf(\"%.2f\", countdeg);\r\n System.out.println();\r\n //long toc= System.nanoTime();\r\n //System.out.println((toc- startTime)/1000000000.0);\r\n }\r\n \r\n if(args[2].equals(\"rank\")){\r\n Graph.mergesort(sortVer, 0, nodecount-1);\r\n // long toc= System.nanoTime();\r\n // System.out.println((toc- startTime)/1000000000.0);\r\n System.out.print(sortVer[0].val);\r\n for(int kk=1; kk<nodecount; kk++){\r\n System.out.print(\",\" + sortVer[kk].val.toString());\r\n }\r\n System.out.println();\r\n }\r\n if(args[2].equals(\"independent_storylines_dfs\")){\r\n boolean visited[] = new boolean[nodecount];\r\n int ind = 0;\r\n ArrayList<ArrayList<Vertex>> comps = new ArrayList<ArrayList<Vertex>>();\r\n for(int it1 = 0; it1<nodecount; it1++){\r\n visited[it1] = false;\r\n }\r\n for(int it1 = 0; it1<nodecount; it1++){\r\n if (visited[it1] == false){\r\n ArrayList<Vertex> temp = new ArrayList<Vertex>();\r\n Graph.dfs(it1, visited, ind, adjList, temp);\r\n ind++;\r\n Graph.mergesort2(temp, 0, temp.size()-1);\r\n comps.add(temp);\r\n }\r\n }\r\n Graph.mergesort3(comps, 0, comps.size()-1);\r\n // long toc= System.nanoTime();\r\n // System.out.println((toc- startTime)/1000000000.0);\r\n for(int a1 = 0; a1 < ind; a1++){\r\n System.out.print(comps.get(a1).get(0).val);\r\n for(int j1 = 1; j1<comps.get(a1).size(); j1++){\r\n System.out.print(\",\" + comps.get(a1).get(j1).val);\r\n }\r\n System.out.println();\r\n }\r\n }\r\n }",
"public void BFS() {\r\n\t\tSet<Vertex> visited = new HashSet<Vertex>();\r\n\r\n\t\t// Create a queue for BFS\r\n\t\tQueue<Vertex> queue = new LinkedList<Vertex>();\r\n\r\n\t\tBFS(this.vertices[3], visited, queue); // BFS starting with 40\r\n\r\n\t\t// Call the helper function to print BFS traversal\r\n\t\t// starting from all vertices one by one\r\n\t\tfor (int i = 0; i < N; ++i)\r\n\t\t\tif (!visited.contains(this.vertices[i]))\r\n\t\t\t\tBFS(this.vertices[i], visited, queue);\r\n\t}",
"public static int runBFS(int[][]map, coordinate src1, coordinate src2){\n\t \n boolean visited[][] = new boolean[dim][dim]; //visited boolean 2d array that is the same size as 2d map\n coordinate visit1[][]=new coordinate[dim][dim]; // this is the one used to hold previous location\n coordinate visit2[][]=new coordinate[dim][dim]; // this is the one used to hold previous location\n\t \n\t visit1[0][0]=new coordinate(0,0); //same as BFS\n \n\t visit2[dim-1][dim-1] = new coordinate(dim-1,dim-1);\n\t //marked both the 0,0 and dim-1, dim-1 srcs as visited\n\t \n\t Queue<QueueNode> queue1 = new LinkedList<>(); //queue for src1\n\t Queue<QueueNode> queue2 = new LinkedList<>(); //queue for src2\n\t \n\t QueueNode sn1 = new QueueNode(src1, 0, src1); //src node 1 queue node\n\t QueueNode sn2 = new QueueNode(src2, 0, src2);\n\t \n\t ArrayList<coordinate> pathHold1 = new ArrayList<>(); //for first path\n\t ArrayList<coordinate> pathHold2 = new ArrayList<>(); //for second path \n\t \n\t visited[src1.x][src1.y] = true; //mark the start node as visited inside of the visited boolean 2d array for first src\n\t visited[src2.x][src2.y] = true; //mark the start node as visited inside of the visited boolean 2d array for second src\n\t \n\t System.out.println();\n\t \n\t queue1.add(sn1);\n\t queue2.add(sn2);\n\t //added the start nodes\n\t \n\t QueueNode current1 = null;\n\t QueueNode current2 = null;\n\t //to be used later to hold current node being looked at\n\t coordinate c1 = null;\n\t coordinate c2 = null;\n\t\t//coordinates to be examined\n\t \n\t while(!queue1.isEmpty()&&!queue2.isEmpty()){\n\t //keep iterating so long as queues have items -- but if one becomes empty, check at each iteration\n\t\t\t//to avoid null pointer so we are not dequeuing from empty queue\n int maxFringe = 0;\n\t\t//use this to check max fringe at each time we add to either queue\n if(queue1.size()>maxFringe || queue2.size()>0) {\n \t if(queue1.size()>maxFringe) {\n \t\t maxFringe=queue1.size();\n \t }else {\n \t\t maxFringe=queue2.size();\n \t }\n }\n\t \n\t \tif(!queue1.isEmpty()) { \n\t\t\t\t//while first queue is not empty, pop\n\t \t\t current1 = queue1.peek(); // this is n\n\t c1 = current1.point;\n\t \t\t visited[c1.x][c1.y]=true; //mark this node as visited, will check neighbors later\n\t boolean inFringe = false;\n\t inFringe = compareFringe(c1, queue2); //see if intersect or not\n\t \n\t \n\t // compare current point to the queue2 fringe. If not in fringe\n\t if(inFringe) {\n\t \t //we have found the duplicate \n\t \t System.out.println(\"duplicate\");\n\t \t intersect = c1;\n\t\t System.out.println(\"Intersect is :\"+c1.x+\",\"+c1.y);\n\t\t visit1[c1.x][c1.y]=current1.prev; //set prev node or where we came from\n\t\t \n\t\t System.out.println(\"We have reached our goal!\");\n\t\t \n\t\t if(current2 != null) {\n\t\t\t\t\t //so long as paths have values, add length and return\n\t\t return current1.pathTotal+current2.pathTotal;\n\t\t }else {\n\t\t\t\t\t //else return only one path \n\t\t \t return current1.pathTotal;\n\t\t }\n\t }\n\t\t\t\t//this is getting the neighbors, same as BFS\n\t \n\t int row1 = 0;\n\t int col1 = 0;\n\t \n\t for (int i = 0; i < 4; i++) { \n\t row1= c1.x + rowNum1[i]; \n\t col1 = c1.y + colNum1[i]; \n\t //grab neighbor of current\n\t if (cellValid(row1, col1) && map[row1][col1] == 1 && !visited[row1][col1]){ \n\t \t \n\t // mark cell as visited and enqueue it \n\t visited[row1][col1] = true; //we visited the node so mark it\n\t visit1[row1][col1] = new coordinate(c1.x, c1.y); //set prev as current coord\n\n\t QueueNode Adjcell = new QueueNode(new coordinate(row1, col1), current1.pathTotal + 1, new coordinate(row1-rowNum1[i], col1-colNum1[i])); \n\t queue1.add(Adjcell); //make it a queueNode to add to q1 for first path\n\t }else if(cellValid(row1, col1) && map[row1][col1] == 1 && (visited[row1][col1]&&visit2[row1][col1]!=null)){\n\t \t // System.out.println(\"already visited\"+row1+\",\"+col1); \n\t\t\t\t //check if already visited and valid (not off grid) and = 1 so we can take path -- \n\t\t\t\t //if so, this means we found intersect\n\t\t\t\t //make sure node has been visited in other path to guarantee it is intersect\n\t \t intersect=new coordinate(row1,col1); //set intersect\n\t \t visit1[intersect.x][intersect.y]=new coordinate(c1.x, c1.y); //set where we came from\n\t \t //current1.pathTotal++;\n\t \t printfin(visit1, visit2); //used to print final path -- set map\n \n int nodesExplored1 = 0;\n int nodesExplored2 = 0;\n for(coordinate coor : pathHold1){\n nodesExplored1++;\n }\n for(coordinate coor : pathHold2){\n nodesExplored2++;\n }\n\t\t\t\t \n\t\t\t\t //get number of nodes expanded in each path, add together\n\n int fin = nodesExplored1+nodesExplored2; //this is final explored nodes in each path\n System.out.println(\"Nodes explored: \" + fin);\n \n\t \t return pathsize; //return total pathsize\n\t \t //break;\n\t }\n\t \n\t \n\t } \n\t //once all of the neighbors have been visited, dequeue from queue 1 in path 1\n\t queue1.remove(); \n\t pathHold1.add(c1); //add to explored\n\t \n\t }\n\t \t//now to the same in path2 from (dim-1, dim-1) as src2\n\t \tif(!queue2.isEmpty()) {\n\t \t\t\n\t \t\t current2 = queue2.peek(); // this is n\n\t c2 = current2.point;\n\t \t\t visited[c2.x][c2.y]=true;\n\t boolean inFringe = false;\n\t inFringe = compareFringe(c2, queue1);\n\t \n\t // compare current point to the queue2 fringe. If not in fringe\n\t if(inFringe) {\n\t \t //we have found the duplicate \n\t \t System.out.println(\"duplicate\");\n\t \t intersect = c2;\n\t\t // System.out.println(\"Intersect is :\"+c2.x+\",\"+c2.y);\n\t\t visit2[c2.x][c2.y]=current2.prev;\n\t\t \n\t\t System.out.println(\"We have reached our goal!\");\n\t\t \n\t\t \n\t\t if(current1 != null) {\n\t\t\t return current1.pathTotal+current2.pathTotal;\n\t\t\t }else {\n\t\t\t \t return current2.pathTotal;\n\t\t\t }\n\t }\n\t \n\t \t// get neighbors\n\t int row2 = 0;\n\t int col2 = 0;\n\t \n\t for (int i = 0; i < 4; i++) { \n\t row2= c2.x + rowNum2[i]; \n\t col2 = c2.y + colNum2[i]; \n\t \n\t \n\t if (cellValid(row2, col2) && map[row2][col2] == 1 && !visited[row2][col2]){ \n\t \t \n\t // mark cell as visited and enqueue it \n\t visited[row2][col2] = true; \n\t visit2[row2][col2] = new coordinate(c2.x, c2.y);\n\n\t QueueNode Adjcell2 = new QueueNode(new coordinate(row2, col2), current2.pathTotal + 1, new coordinate(row2-rowNum2[i], col2-colNum2[i])); \n\t queue2.add(Adjcell2);\n\t }else if(cellValid(row2, col2) && map[row2][col2] == 1 && (visited[row2][col2]&&visit1[row2][col2]!=null)){\n\t \t \n\t \t intersect=new coordinate(row2,col2);\n\t \t \n\t \t visit2[intersect.x][intersect.y]=new coordinate(c2.x, c2.y);\n\t \n\t \n\t printfin(visit1, visit2);\n\t int nodesExplored1 = 0;\n int nodesExplored2 = 0;\n for(coordinate coor : pathHold1){\n nodesExplored1++;\n }\n for(coordinate coor : pathHold2){\n nodesExplored2++;\n }\n\n int fin = nodesExplored1+nodesExplored2;\n System.out.println(\"Nodes explored: \" + fin);\n\t \t return pathsize;\n\t \t \n\t }\n\t \n\t } \n\t //once all of the neighbors have been visited, dequeue \n\t queue2.remove(); \n\t pathHold2.add(c2);\n\t \t\t\n\t \t}\n\n\t }\n \n int nodesExplored1 = 0;\n int nodesExplored2 = 0;\n for(coordinate coor : pathHold1){\n nodesExplored1++;\n }\n for(coordinate coor : pathHold2){\n nodesExplored2++;\n }\n\n int fin = nodesExplored1+nodesExplored2;\n System.out.println(\"Nodes explored: \" + fin);\n\t //if here, means no path was found\n\t return -1;\n\t \n\t }",
"private void compute() {\n InputReader sc = null;\n try {\n sc = new InputReader(new FileInputStream(new File(\"./resources/worldtour\")));\n } catch (FileNotFoundException ex) {\n throw new IllegalArgumentException(ex);\n }\n\n //Build Graph\n Graph G = new Graph(sc);\n adj = new int[G.totalVertices + 1][G.totalVertices + 1];\n\n //Run BFS from each vertex and fill adjacency matrix\n for (int v = 1; v <= G.totalVertices; v++) {\n Bfs bfs = new Bfs(G, v, adj);\n }\n\n //printAdjMatrix();\n // Find the farthest 3 cities to each city\n City[][] threeFurthestTo = new City[G.totalVertices + 1][4];\n // Find the farthest 3 cities from each city\n City[][] threeFurthestFrom = new City[G.totalVertices + 1][4];\n\n for (int i = 1; i <= G.totalVertices; i++) {\n City[] source = new City[G.totalVertices + 1];\n int sourceIdx = 1;\n City[] dest = new City[G.totalVertices + 1];\n int destIdx = 1;\n for (int j = 1; j <= G.totalVertices; j++) {\n if (adj[j][i] > 0) {\n source[sourceIdx] = new City(j, adj[j][i]);\n sourceIdx++;\n }\n if (adj[i][j] > 0) {\n dest[destIdx] = new City(j, adj[i][j]);\n destIdx++;\n }\n }\n Arrays.sort(source, 1, sourceIdx);\n threeFurthestTo[i][1] = source[1];\n threeFurthestTo[i][2] = source[2];\n threeFurthestTo[i][3] = source[3];\n Arrays.sort(dest, 1, destIdx);\n threeFurthestFrom[i][1] = dest[1];\n threeFurthestFrom[i][2] = dest[2];\n threeFurthestFrom[i][3] = dest[3];\n }\n\n //printMax3To(threeFurthestTo);\n //printMax3From(threeFurthestFrom);\n //For every path a -> x -> y -> b find the largest path\n int max = 0;\n int[] result = new int[4];\n for (int x = 1; x <= G.totalVertices; x++) {\n for (int y = 1; y <= G.totalVertices; y++) {\n if (adj[x][y] > 0) {\n for (int a = 1; a < 4; a++) {\n City start = threeFurthestTo[x][a];\n if (start != null) {\n for (int b = 1; b < 4; b++) {\n City end = threeFurthestFrom[y][b];\n if (end != null) {\n int startCityId = start.cityId;\n int endCityId = end.cityId;\n if (isDistinctCity(startCityId, x, y, endCityId)) {\n int sum = adj[startCityId][x] + adj[x][y] + adj[y][endCityId];\n if (sum > max) {\n result[0] = startCityId;\n result[1] = x;\n result[2] = y;\n result[3] = endCityId;\n max = sum;\n }\n }\n }\n }\n }\n }\n }\n }\n }\n\n for (int x : result) {\n System.out.print(x + \" \");\n }\n }",
"private static boolean bfs(int u, int v) {\n int i;\n String[] color = new String[Graph.size()];\n // init the arr\n for (i = 0; i < color.length; i++) {\n color[i] = \"White\";\n }\n\n color[u] = \"Grey\";\n\n Queue<Integer> q = new LinkedList<>();\n q.add(u);\n\n while (!q.isEmpty()) {\n int current = q.poll();\n\n // iterating through the current neighbours\n for (i = 0; i < Graph.get(current).size(); i++) {\n int neighbour = Graph.get(current).get(i);\n\n // it means we reach v from another way so the graph is connected even tough we deleted an edge.\n if (neighbour == v) {\n return true;\n }\n\n // checking if the neighbours are white, if so turn them to grey.\n if (color[neighbour].equals(\"White\")) {\n color[neighbour] = \"Grey\";\n }\n\n // entering next neighbour to the queue.\n if (!color[neighbour].equals(\"Black\"))\n q.add(neighbour);\n }\n // after we finished with the current vertex.\n color[current] = \"Black\";\n\n\n }\n return false;\n }",
"private void bfs(int[][] board){\n int[][] original = {{1,2,3},{4,5,0}};\n LinkedList<Cell> queue = new LinkedList<>();\n HashMap<Cell,int[][]> states = new HashMap<Cell,int[][]>();\n Set<String> seen = new HashSet<>();\n queue.offer(new Cell(1,2));\n states.put(queue.peekFirst(),original);\n int step = 0;\n while(step <= maxStep){\n int sz = queue.size();\n while(sz-- > 0){\n Cell cur = queue.pollFirst();\n int[][] curBoard = states.get(cur);\n if(seen.contains(this.toStr(curBoard))){\n continue;\n }\n seen.add(this.toStr(curBoard));\n \n if (isSame(curBoard,board)){\n this.res = step;\n return;\n }\n // move around\n for(int i = 0; i < 4; ++i){\n int r = cur.row + dr[i];\n int c = cur.col + dc[i];\n if(r < 0 || c < 0 || r > 1 || c > 2) continue; \n Cell next = new Cell(r, c);\n queue.offer(next);\n int[][] nextboard = this.clone(curBoard);\n nextboard[cur.row][cur.col] = nextboard[r][c];\n nextboard[r][c] = 0;\n states.put(next,nextboard);\n }\n }\n ++step;\n }\n return;\n }",
"public static void bfs (String input)\r\n\t{\r\n\t\tNode root_bfs = new Node (input);\r\n\t\tNode current = new Node(root_bfs.getState());\r\n\t\t\r\n\t\tArrayList<String> visited = new ArrayList<String>();\r\n\t\tArrayList<String> children = new ArrayList<String>();\r\n\t\tQueue<Node> queue_bfs = new LinkedList<Node>();\r\n\t\t\r\n\t\tint nodes_popped = 0;\r\n\t\tint queue_max_size = 0;\r\n\t\tint queue_size = 0;\r\n\t\tcurrent.cost = 0;\r\n\t\t\r\n\t\t// Initial check for goal state\r\n\t\tgoal_bfs = isGoal(current.getState());\r\n\t\t\r\n\t\twhile(!goal_bfs)\r\n\t\t{\r\n\t\t\t// Add the current node to the visited array\r\n\t\t\tvisited.add(current.getState());\r\n\t\t\t// Get the nodes children from the successor function\r\n\t\t\tchildren = Successor.findChildren(current.getState());\r\n\t\t\t\r\n\t\t\tfor (String a : children)\r\n\t\t\t{\r\n\t\t\t\t// State checking, don't add already visited nodes to the queue\r\n\t\t\t\tif (visited.contains(a))\r\n\t\t\t\t{\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t\t// Create child node from the children array and add it to the current node\r\n\t\t\t\t\tNode nino = new Node(a);\r\n\t\t\t\t\tcurrent.children_nodes.add(nino);\r\n\t\t\t\t\t\r\n\t\t\t\t\t// Obtaining the path cost\r\n\t\t\t\t\tint cost = isCost(current.getState(), nino.getState());\r\n\t\t\t\t\tnino.cost = cost;\r\n\t\t\t\t\tnino.parent = current;\r\n\t\t\t\t\t\r\n\t\t\t\t\t// State check and adding the child to the queue. Increasing size counter\r\n\t\t\t\t\tif (!queue_bfs.contains(nino))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tqueue_bfs.add(nino);\r\n\t\t\t\t\t\tqueue_size++;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// Pop a node off the queue\r\n\t\t\tcurrent = queue_bfs.poll();\r\n\t\t\tnodes_popped++;\r\n\t\t\t\r\n\t\t\t// Added this because my queue size variable was always one off based on where my goal check is\r\n\t\t\tif (queue_size > queue_max_size)\r\n\t\t\t{\r\n\t\t\t\tqueue_max_size = queue_size;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// Decrease queue size because a node has been popped and check for goal state\r\n\t\t\tqueue_size--;\r\n\t\t\tgoal_bfs = isGoal(current.getState());\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t// Now that a solution has been found, set the boolean back to false for another run\r\n\t\tgoal_bfs = false;\r\n\t\tSystem.out.println(\"BFS Solved!!\");\r\n\t\t\r\n\t\t// Send metrics to be printed to the console\r\n\t\tSolution.performSolution(current, root_bfs, nodes_popped, queue_max_size);\r\n\t\t\t\r\n\t}",
"public void breadthFirstTraverse() {\n\t\t// track whether vertex was visited\n\t\tHashMap<Integer, Boolean> visited = buildVisited();\n\t\t// store neighbors\n\t\tQueue<Integer> queue = new LinkedList<Integer>();\n\n\t\t// arbitrarily add first element\n\t\tInteger current = (Integer) edges.keySet().toArray()[0];\n\t\tqueue.add(current);\n\n\t\twhile (queue.peek() != null) {\n\n\t\t\tcurrent = queue.remove();\n\t\t\tSystem.out.println(\"current: \" + current);\n\t\t\tvisited.put(current, true);\n\n\t\t\tfor (Integer neighbor: edges.get(current)) {\n\t\t\t\tif (!visited.get(neighbor)) {\n\t\t\t\t\tqueue.add(neighbor);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"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 void bfs(DSAGraphVertex vx, DSAStack visited, DSAQueue queue, DSAGraphVertex target)\n\t{\n\n\t\ttry {\n\t\t\tif(vx != null) //base case if it's null end recursion\n\t\t\t{\n\t\t\t\tvisited.push(vx); //push onto visited stack\n\t\t\t\tIterator<DSAGraphVertex> itr = vx.getAdjacent().iterator();\n\n\t\t\t\tdo{\n\t\t\t\t\twhile (itr.hasNext())\n\t\t\t\t\t{\n\t\t\t\t\t\tvx = itr.next();\n\t\t\t\t\t\tif(!vx.getVisited() && !vx.equals(target)) //if not visited and is not target traverse here\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tqueue.enqueue(vx); //adds to output queue\n\t\t\t\t\t\t\tvx.setVisited(); //sets to visited\n\t\t\t\t\t\t\tbfs(vx, visited, queue, target);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tvisited.pop();\n\n\t\t\t\t} while(!visited.isEmpty());\n\t\t\t}\n\t\t}\n\t\tcatch (IllegalArgumentException e) //catches empty stack exceptions\n\t\t{\n\t\t\t//System.out.println(e.getMessage());\n\t\t}\n\n\n\t}",
"@Override\n\tpublic List<Node<E>> bfs(DirectedGraph<E> graph, Node<E> root) {\n\t\tHashSet<Node<E>> visitedList = new HashSet<>();\n\t\tList<Node<E>> returnList = new ArrayList<>();\n\t\tHashSet<Node<E>> hashSet = new HashSet<>(); \n\t\thashSet.add(root);\n\n\t\treturn bfsRecursive(hashSet, visitedList, returnList);\n\t}",
"void graph2() {\n\t\tconnect(\"1\", \"7\");\n\t\tconnect(\"1\", \"8\");\n\t\tconnect(\"1\", \"9\");\n\t\tconnect(\"9\", \"1\");\n\t\tconnect(\"9\", \"0\");\n\t\tconnect(\"9\", \"4\");\n\t\tconnect(\"4\", \"8\");\n\t\tconnect(\"4\", \"3\");\n\t\tconnect(\"3\", \"4\");\n\t}",
"public static void main(String[] args) {\n\n G g = new G(6, true, new int[][] { {0, 1}, {1, 2}, {2, 3}, {3, 4}, {4, 0}, {3, 5} });\n\n g.print();\n g.dfs();\n g.bfs();\n\n System.out.println();\n System.out.println();\n\n // 1 -> 2\n // 0 / \\/\n // \\ 4 -> 3 -> 5\n\n G gDirected = new G(6, false, new int[][] { {0, 1}, {1, 2}, {2, 3}, {3, 5}, {0, 4}, {4, 3} });\n\n gDirected.print();\n gDirected.dfs();\n gDirected.bfs();\n gDirected.topoSort();\n }",
"private void breadthHelper(Graph<VLabel, ELabel>.Vertex v) {\n LinkedList<Graph<VLabel, ELabel>.Vertex> fringe =\n new LinkedList<Graph<VLabel, ELabel>.Vertex>();\n fringe.add(v);\n while (fringe.size() > 0) {\n Graph<VLabel, ELabel>.Vertex curV = fringe.poll();\n try {\n if (!_marked.contains(curV)) {\n _marked.add(curV);\n try {\n visit(curV);\n } catch (RejectException rExc) {\n fringe.add(curV);\n continue;\n }\n for (Graph<VLabel, ELabel>.Edge e: _graph.outEdges(curV)) {\n Graph<VLabel, ELabel>.Vertex child = e.getV(curV);\n if (!_marked.contains(child)) {\n try {\n preVisit(e, curV);\n fringe.add(child);\n } catch (RejectException rExc) {\n int unused = 0;\n }\n }\n }\n fringe.add(curV);\n } else {\n postVisit(curV);\n while (fringe.remove(curV)) {\n continue;\n }\n }\n } catch (StopException sExc) {\n _finalVertex = curV;\n return;\n }\n }\n }",
"int fordFulkerson(int graph[][], int s, int t) {\n 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\n 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)\n\n for (u = 0; u < MaxFlow.graph.getNumOfNode(); u++)\n for (v = 0; v < MaxFlow.graph.getNumOfNode(); v++)\n rGraph[u][v] = graph[u][v]; //store the graph capacities\n\n int parent[] = new int[MaxFlow.graph.getNumOfNode()]; // This array is filled by BFS and to store path\n int max_flow = 0; // There is no flow initially\n\n while (bfs(rGraph, s, t, parent)) { // Augment the flow while there is path from source to sink\n 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.\n for (v = t; v != s; v = parent[v]) { //when v=0 stop the loop\n u = parent[v];\n path_flow = Math.min(path_flow, rGraph[u][v]);\n }\n\n for (v = t; v != s; v = parent[v]) { // update residual capacities of the edges and reverse edges along the path\n u = parent[v];\n rGraph[u][v] -= path_flow; //min the path cap\n rGraph[v][u] += path_flow; //add the path cap\n\n }\n System.out.println(\"Augmenting Path \"+ path_flow);\n max_flow += path_flow; // Add path flow to overall flow\n }\n return max_flow; // Return the overall flow\n }",
"public BreadthFirstTraversal(Graph<V> graph) {\n super(graph);\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 }",
"private boolean bfs(final int[][] resGraph, final int source, final int target, final int[] parent)\n {\n // Create a visited array and mark all vertices as not visited\n final boolean[] visited = new boolean[V];\n\n // Create a queue, enqueue source vertex\n // and mark source vertex as visited\n final Deque<Integer> queue= new ArrayDeque<>();\n //We start from s, marking as visited.\n queue.push(source);\n visited[source] = true;\n parent[source] = -1;\n\n // Standard BFS Loop\n while (!queue.isEmpty()) {\n final int u = queue.pollFirst();\n\n for (int v=0; v<V; v++) {\n if (!visited[v] && resGraph[u][v] > 0) {\n //Put the neighbors to the queue\n queue.push(v);\n //keep track for augmenting path\n parent[v] = u;\n visited[v] = true;\n }\n }\n }\n //augmenting path is found\n return visited[target];\n }",
"public static void main(String args[])\n\t{\n\t\tList<Vertex> v = new LinkedList<Vertex>();\n\t\tVertex v1 = new Vertex(1);\n\t\tVertex v2 = new Vertex(2);\n\t\tVertex v3 = new Vertex(3);\n \t\tVertex v4 = new Vertex(4);\n\t\t\n \t\t//Setting adjList for each vertex\n \t\tList<Vertex> adjList = new LinkedList<Vertex>();\n\t\tadjList.add(v2);\n\t\tadjList.add(v3);\n\t\tv1.setAdjList(adjList);\n\t\t\n\t\tadjList = new LinkedList<Vertex>();\n\t\tadjList.add(v4);\n\t\tv2.setAdjList(adjList);\n\t\t\n\t\tadjList = new LinkedList<Vertex>();\n\t\tadjList.add(v2);\n\t\tv3.setAdjList(adjList);\n\t\t\n\t\tadjList = new LinkedList<Vertex>();\n\t\tadjList.add(v3);\n\t\tv4.setAdjList(adjList);\n\t\t\n\t\tv.add(v1);\n\t\tv.add(v2);\n \t\tv.add(v3);\n\t\tv.add(v4);\n\n\t\tEdge e1 = new Edge(1, 2);\n\t\tList<Edge> e = new LinkedList<Edge>();\n\t\te.add(e1);\n\t\te1 = new Edge(1, 3);\n\t\te.add(e1);\n\t\te1 = new Edge(2, 4);\n\t\te.add(e1);\n\t\te1 = new Edge(4, 3);\n\t\te.add(e1);\n\t\te1 = new Edge(3, 2);\n\t\te.add(e1);\n\t\t\n\t\t\n\t\tGraph g = new Graph(v, e);\n\t\tg.bfs(v4);\n\t\t\n\t\t//v has all vertices\n\t\tg.unconnected(v2, v);\n\t}",
"public static void bfs(gNode[] G, boolean[] visited, int[] path, int s){\n\t\tQueue<Integer> Q = new LinkedList<Integer>();\n\n\t\tQ.add(s);\n\t\tvisited[s] = true;\n\t\twhile(!Q.isEmpty()){\n\t\t\ts = Q.poll();\n\t\t\tfor(gNode t=G[s]; t!= null; t=t.dest){\n\t\t\t\tSystem.out.println(\"BFS\");\n\t\t\t\tif(!visited[t.item]){\t\t//once an item has been visited, set it equal to true\n\t\t\t\t\tvisited[t.item] = true;\n\t\t\t\t\tpath[t.item] = s;\t\t//change the int value of the path\n\t\t\t\t\tQ.add(t.item);\n\t\t\t\t\tSystem.out.println(t.item);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\t\n\t}",
"public boolean isBipartite(List<GraphNode> graph) {\n Map<GraphNode, Integer> group = new HashMap<>();\n for (GraphNode node: graph) {\n if (!bfs(group, node)) {\n return false;\n }\n }\n return true;\n }",
"public void mst() {\n int currentVertexIndex = 0;\r\n dfsStack.push(0);\r\n vertexList[0].wasVisited = true;\r\n// System.out.println(vertexList[dfsStack.peek()]);\r\n while (dfsStack.top != -1) {\r\n\r\n\r\n currentVertexIndex = this.getAdjUnvisitedVert(dfsStack.peek());\r\n if (currentVertexIndex != -1) {\r\n System.out.print(vertexList[dfsStack.peek()]);\r\n dfsStack.push(currentVertexIndex);\r\n vertexList[currentVertexIndex].wasVisited = true;\r\n System.out.print(vertexList[dfsStack.peek()]);\r\n System.out.print(\", \");\r\n\r\n\r\n } else {\r\n currentVertexIndex = dfsStack.pop();\r\n\r\n }\r\n }\r\n for (Vertex x : vertexList) {\r\n x.wasVisited = false;\r\n }\r\n }",
"private int bfs(String source, String destination, final Set<String> uniqueWords) {\n\n class Node {\n String word;\n int distance;\n\n public Node(String word, int distance) {\n this.word = word;\n this.distance = distance;\n }\n }\n\n final Queue<Node> queue = new LinkedList<>();\n Set<String> visited = new HashSet<>();\n queue.offer(new Node(source, 0)); //distance of source to source is 0\n visited.add(source);\n\n while (!queue.isEmpty()) {\n\n final Node node = queue.poll();\n final int distance = node.distance;\n\n //if we reached the destination node\n if (node.word.equals(destination))\n return distance + 1;\n\n //try all word which is 1 weight away\n for (String neighbour : getNeighbour(node.word, uniqueWords)) {\n if (!visited.contains(neighbour)) {\n visited.add(neighbour);\n queue.offer(new Node(neighbour, distance + 1));\n }\n }\n\n\n }\n return 0;\n }",
"public static void main(String[] args) {\n\n\t\t\n\t\tGraph g = new Graph(9);\n\t\tg.addEdge(0, 1);\n\t\tg.addEdge(1, 2);\n\t\tg.addEdge(1, 3);\n\t\tg.addEdge(2, 4);\n\t\tg.addEdge(2, 3);\n\t\tg.addEdge(3, 4);\n\t\tg.addEdge(3, 5);\n\t\tg.addEdge(5, 6);\n\t\tg.addEdge(5, 7);\n\t\tg.addEdge(6, 8);\n\t\t\n\t\t\n\t\tSystem.out.println(\"0부터 넓이 우선 탐색 \");\n\t\tg.bfs();\n\t\t\n\t\t\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\tGraph g = new Graph();\n\t\tg.addEdge(0, 1, 12);\n\t\tg.addEdge(0, 4, 1);\n\t\tg.addEdge(1, 2, 1);\n\t\tg.addEdge(1, 3, 1);\n\t\tg.addEdge(1, 4, 1);\n\t\tg.addEdge(2, 3, 1);\n\t\tg.addEdge(2, 4, 1);\n\t\tfor(Node n : g.getNodes()){\n\t\t\tSystem.out.print(\"Vertex \" + n.id + \" is connected to: \");\n\t\t\tfor(Node n1 :n.adj) {\n\t\t\t\tSystem.out.print(n1.id + \" \");\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\t\tSystem.out.println(\"--------------------BFS------------------\");\n\t\tg.bfs(0);\n\t}",
"public void dfs() {\n int currentVertexIndex = 0;\r\n dfsStack.push(0);\r\n vertexList[0].wasVisited = true;\r\n System.out.println(vertexList[dfsStack.peek()]);\r\n while (dfsStack.top != -1) {\r\n\r\n\r\n currentVertexIndex = this.getAdjUnvisitedVert(dfsStack.peek());\r\n if (currentVertexIndex != -1) {\r\n dfsStack.push(currentVertexIndex);\r\n vertexList[currentVertexIndex].wasVisited = true;\r\n System.out.println(vertexList[dfsStack.peek()]);\r\n\r\n\r\n } else {\r\n currentVertexIndex = dfsStack.pop();\r\n\r\n }\r\n }\r\n// reset wasVisted\r\n for (Vertex x : vertexList) {\r\n x.wasVisited = false;\r\n }\r\n }",
"private static void printBFS(int[][] adjacencyMatrix, int sv, boolean[] visited) {\n\t\tint n= adjacencyMatrix.length;\n\t\tvisited[sv]= true;\n\t\tQueue<Integer> queue = new LinkedList<Integer>();\n\t\tqueue.add(sv);\n\t\twhile(!queue.isEmpty()) {\n\t\t\tint frontnode = queue.poll();\n\t\t\tSystem.out.print(frontnode+\" \");\n\t\t\tfor(int i=0;i<n;i++) {\n\t\t\t\tif(adjacencyMatrix[frontnode][i] == 1 && !visited[i]) {\n\t\t\t\t\tvisited[i]= true;\n\t\t\t\t\tqueue.add(i);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\t\t\n\t}",
"private void bfs(Dungeon d, Site s) {\n\t\t\n\t\t// use a queue to do BFS, and initialize instance variables\n\t\tQueue<Site> q = new LinkedList<Site>();\n\t\tfor (int x = 0; x < d.size(); x++)\n\t\t\tfor (int y = 0; y < d.size(); y++)\n\t\t\t\tdistTo[x][y] = INFINITY; \n\t\tdistTo[s.getX()][s.getY()] = 0;\n\t\tmarked[s.getX()][s.getY()] = true;\n\t\t\n\t\t// pop site from queue until it's empty\n\t\tq.offer(s);\n\t\twhile (!q.isEmpty()) {\n\t\t\t\n\t\t\t// pop the next site in the queue\n\t\t\tSite v = q.poll(); \t \n\t\t\tint x = v.getX();\n\t\t\tint y = v.getY();\n\n\t\t\t// 4 adjacent sites\n\t\t\tSite east = new Site(x + 1, y);\n\t\t\tSite west = new Site(x - 1, y);\n\t\t\tSite north = new Site(x, y - 1);\n\t\t\tSite south = new Site(x, y + 1);\n\n\t\t\t// BFS the rest of the dungeon\n\t\t\tif (d.isLegalMove(v, east) && !marked[east.getX()][east.getY()]) {\n\t\t\t\tedgeTo[east.getX()][east.getY()] = v;\n\t\t\t\tdistTo[east.getX()][east.getY()] = distTo[x][y] + 1;\n\t\t\t\tmarked[east.getX()][east.getY()] = true;\n\t\t\t\tq.offer(east);\n\t\t\t}\n\t\t\tif (d.isLegalMove(v, west) && !marked[west.getX()][west.getY()]) {\n\t\t\t\tedgeTo[west.getX()][west.getY()] = v;\n\t\t\t\tdistTo[west.getX()][west.getY()] = distTo[x][y] + 1;\n\t\t\t\tmarked[west.getX()][west.getY()] = true;\n\t\t\t\tq.offer(west);\n\t\t\t}\n\t\t\tif (d.isLegalMove(v, north) && !marked[north.getX()][north.getY()]) {\n\t\t\t\tedgeTo[north.getX()][north.getY()] = v;\n\t\t\t\tdistTo[north.getX()][north.getY()] = distTo[x][y] + 1;\n\t\t\t\tmarked[north.getX()][north.getY()] = true;\n\t\t\t\tq.offer(north);\n\t\t\t}\n\t\t\tif (d.isLegalMove(v, south) && !marked[south.getX()][south.getY()]) {\n\t\t\t\tedgeTo[south.getX()][south.getY()] = v;\n\t\t\t\tdistTo[south.getX()][south.getY()] = distTo[x][y] + 1;\n\t\t\t\tmarked[south.getX()][south.getY()] = true;\n\t\t\t\tq.offer(south);\n\t\t\t}\n\n\t\t}\n\n\t}",
"public Set<Vec3i> transConnections();",
"public void dfs(int[][] graph, int u) {\n int degree = 0;\n int v = -1;\n int anyv = -1;\n for (int col=0; col<n; col++){\n if (graph[u][col]!=1){\n continue;\n }\n if (isBridge(graph, u, col)){\n anyv=col;\n continue;\n }\n v=col;\n break;\n }\n //no edge anymore\n if (v==-1){\n //last edge.\n v = anyv;\n }\n if (v==-1){\n return;\n }\n\n //remove edge u->v\n graph[u][v]=0;\n graph[v][u]=0;\n path.add(String.format(\"%d->%d\", u, v));\n dfs(graph, v);\n }",
"public static void breadthFirstSearch(ArrayList<Node> graph) {\n\t\tSystem.out.println(\"BFS:\");\n\t\tif(graph.size() == 0) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tGraphUtils.cleanGraph(graph);\n\n\t\tQueue<Node> queue = new LinkedList<Node>();\n\t\tfor(Node node : graph) {\n\t\t\tif(node.state != Node.State.UNDISCOVERED) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tnode.state = Node.State.DISCOVERED;\n\t\t\tqueue.add(node);\n\t\t\t\n\t\t\twhile(!queue.isEmpty()) {\n\t\t\t\tnode = queue.remove();\n\t\t\t\t\n\t\t\t\t//process node\n\t\t\t\tSystem.out.print(node.name + \" -> \");\n\t\t\t\t\n\t\t\t\tfor(Edge e : node.edges) {\n\t\t\t\t\t//process edge\n\t\t\t\t\tNode neighbor = e.getNeighbor(node);\n\t\t\t\t\t\n\t\t\t\t\t//first time we see this node it gets added to the queue for later processing\n\t\t\t\t\tif(neighbor.state == Node.State.UNDISCOVERED) {\n\t\t\t\t\t\tneighbor.state = Node.State.DISCOVERED;\n\t\t\t\t\t\tqueue.add(neighbor);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//finished with this node\n\t\t\t\tnode.state = Node.State.COMPLETE;\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println();\n\t\tGraphUtils.cleanGraph(graph);\n\t}",
"public void test4_b_parametric() { // Schedule found: (m + 1)i + j + (-m - 2)\n\t\t/* RelTrafo1: (i, j) - (i, j - 1) = (0, 1)\n\t\t * RelTrafo2: (i, j) - (i - 1, j + m) = (1, -m)\n\t\t * (m + 1) - m + (-m - 2) = -m - 1\n\t\t *//*\n\t\tGDGraph gdGraph = new GDGraph();\n\t\tGDGVertex gdVertex = gdGraph.addVertex();\n\t\tGDGEdge gdEdge1 = gdGraph.addEdge(gdVertex, gdVertex);\n\t\tGDGEdge gdEdge2 = gdGraph.addEdge(gdVertex, gdVertex);\n\n\t\tgdEdge1.dataDependence = convertIntTableToAffineTrafoRational(new int[][]{ // (i, j - 1) \n\t\t\t\t{ 1, 0, 0, 0},\n\t\t\t\t{ 0, 1, 0, -1},\n\t\t\t\t{ 0, 0, 0, 1}\n });\n\t\tgdEdge1.producedDomain = convertIntTableToPIPDRational(new int[][]{ // (0..+inf, 1..+inf)\n\t\t\t\t{ 1, 0, 0, 0},\n\t\t\t\t{ 0, 1, 0, -1}\n\t\t}, new int[][]{\n\t\t\t\t{ 1, 0}\n\t\t});\n\n\t\tgdEdge2.dataDependence = convertIntTableToAffineTrafoRational(new int[][]{ // (i - 1, j + m) \n\t\t\t\t{ 1, 0, 0, -1},\n\t\t\t\t{ 0, 1, 1, 0},\n\t\t\t\t{ 0, 0, 0, 1}\n });\t\t\n\t\tgdEdge2.producedDomain = convertIntTableToPIPDRational(new int[][]{ // (1..+inf, 0..+inf)\n\t\t\t\t{ 1, 0, 0, -1},\n\t\t\t\t{ 0, 1, 0, 0}\n\t\t}, new int[][]{\n\t\t\t\t{ 1, 0}\n\t\t});\n\n\t\tgdVertex.computationDomain = convertIntTableToPIPDRational(new int[][]{ // (1..+inf, 1..+inf)\n\t\t\t\t{ 1, 0, 0, -1},\n\t\t\t\t{ 0, 1, 0, -1}\n\t\t}, new int[][]{\n\t\t\t\t{ 1, 0}\n\t\t});\n\t\t\n\t\tgdGraph.calculateFeautrierSchedule(true, true);\n\t\n\t\tgdGraph.<Rational>codeGeneration(Rational.ZERO, Rational.ONE);\n\t*/}",
"@Override\r\n\tpublic boolean BFS(E src) {\r\n\t\tif(containsVertex(src)) {\r\n\t\t\tVertex<E> s = vertices.get(src);\r\n\t\t\tlastSrc = s;\r\n\t\t\tvertices.forEach((E e, Vertex<E> u) -> {\r\n\t\t\t\tu.setColor(Color.WHITE);\r\n\t\t\t\tu.setDistance(Integer.MAX_VALUE);\r\n\t\t\t\tu.setPredecessor(null);\r\n\t\t\t});\r\n\t\t\ts.setColor(Color.GRAY);\r\n\t\t\ts.setDistance(0);\r\n\t\t\t//s.predecessor is already null so skip that step\r\n\t\t\tQueue<Vertex<E>> queue = new Queue<>();\r\n\t\t\tqueue.enqueue(s);\r\n\t\t\ttry {\r\n\t\t\t\twhile(!queue.isEmpty()) {\r\n\t\t\t\t\tVertex<E> u = queue.dequeue();\r\n\t\t\t\t\tArrayList<Edge<E>> adj = adjacencyLists.get(u.getElement());\r\n\t\t\t\t\tfor(Edge<E> ale: adj) {\r\n\t\t\t\t\t\tVertex<E> v = vertices.get(ale.getDst());\r\n\t\t\t\t\t\tif(v.getColor() == Color.WHITE) {\r\n\t\t\t\t\t\t\tv.setColor(Color.GRAY);\r\n\t\t\t\t\t\t\tv.setDistance(u.getDistance()+1);\r\n\t\t\t\t\t\t\tv.setPredecessor(u);\r\n\t\t\t\t\t\t\tqueue.enqueue(v);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tu.setColor(Color.BLACK);\r\n\t\t\t\t}\r\n\t\t\t} catch (Exception emptyQueueException) {\r\n\t\t\t\t//-_-\r\n\t\t\t}\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\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 static void main(String[] args) {\n\r\n\t\tgraph g=new graph(5);\r\n\t\tg.addEdge(0, 1);\r\n\t\tg.addEdge(0, 2);\r\n\t\tg.addEdge(1, 3);\r\n\t\tg.addEdge(3, 4);\r\n\t\tg.addEdge(4, 2);\r\n\t\tg.print();\r\n\t\tg.BFS(2);\r\n\t}",
"public void BFS(Graph graph, Integer source, boolean[] visited) {\n\n\t\tQueue<Integer> q = new ArrayDeque<>();\n\n\t\tq.add(source);\n\t\tvisited[source] = true;\n\n\t\twhile (!q.isEmpty()) {\n\t\t\tInteger u = q.poll();\n\t\t\tSystem.out.print(\" \" + u);\n\t\t\tList<Edge> edgeList = graph.adjacencyList.get(u);\n\t\t\tfor (Edge e : edgeList) {\n\t\t\t\tInteger v = e.getDestination();\n\t\t\t\tif (visited[v] == false) {\n\t\t\t\t\tvisited[v] = true;\n\t\t\t\t\tq.add(v);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public void topologicalSort() {\n HashMap<Integer, Integer> inDegrees = new HashMap<>();\n Queue<Integer> queue = new LinkedList<>();\n int numTotalNodes = 0;\n\n // Build the inDegree HashMap\n for (Entry<Integer, LinkedList<Edge<Integer>>> entry : g.adj.entrySet()) {\n LinkedList<Edge<Integer>> vList = entry.getValue();\n int currentVertex = entry.getKey();\n\n inDegrees.put(currentVertex, inDegrees.getOrDefault(currentVertex, 0));\n for (Edge<Integer> e : vList) {\n inDegrees.put(e.dest, inDegrees.getOrDefault(e.dest, 0) + 1);\n numTotalNodes++;\n }\n }\n\n // Add Elements with inDegree zero toe the queue\n for (int v : inDegrees.keySet()) {\n if (inDegrees.get(v) > 0)\n continue;\n queue.add(v);\n }\n\n int visitedNodes = 0;\n\n while (!queue.isEmpty()) {\n int v = queue.remove();\n System.out.print(v + \" \");\n for (int u : g.getNeighbors(v)) {\n int inDeg = inDegrees.get(u) - 1;\n if (inDeg == 0)\n queue.add(u);\n inDegrees.put(u, inDeg);\n }\n visitedNodes++;\n }\n\n if (visitedNodes != numTotalNodes) {\n System.out.println(\"Graph is not a DAG\");\n }\n }",
"public static void bfs(Vertex[] vertices, int start, int dest)\r\n\t{\r\n\t\tint[] parent = new int[vertices.length];\r\n\t\tboolean[] seen = new boolean[vertices.length];\r\n\t\tLinkedList<Integer> queue;\r\n\t\t\r\n\t\tqueue = new LinkedList<Integer>();\r\n\t\tseen[start] = true;\r\n\t\tqueue.add(start);\r\n\t\t\r\n\t\tint current = Integer.MIN_VALUE;\r\n\t\twhile(!queue.isEmpty())\r\n\t\t{\r\n\t\t\tcurrent = queue.poll();\r\n\t\t\tArrayList<Integer> neighbors = vertices[current].getNeighbors();\r\n\t\t\tfor(int n = 0; n < neighbors.size(); n++)\r\n\t\t\t{\r\n\t\t\t\tif(!seen[neighbors.get(n)])\r\n\t\t\t\t{\r\n\t\t\t\t\tseen[neighbors.get(n)] = true;\r\n\t\t\t\t\tqueue.add(neighbors.get(n));\r\n\t\t\t\t\tparent[neighbors.get(n)] = current;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// backtrack to update number of paths\r\n\t\tint y = dest;\r\n\t\twhile(y != start)\r\n\t\t{\r\n\t\t\tif(parent[y] != start)\r\n\t\t\t{\r\n\t\t\t\tvertices[parent[y]].incrementNumPaths();\r\n\t\t\t}\r\n\t\t\ty = parent[y];\r\n\t\t}\r\n\t}",
"void downgradeLastEdge();",
"public void updateGraph(){\n int cont=contador;\n eliminar(0);\n construir(cont);\n }",
"@SuppressWarnings({ \"rawtypes\", \"unchecked\" })\n public List<Edge<T>> viterbiPath() {\n final int numNodes = nodeList.size();\n double[] d_v = new double[numNodes];\n Arrays.fill(d_v, annihilator());\n d_v[ROOT_ID] = identity();\n Edge[] p_v = new Edge[numNodes]; \n \n // Forward pass\n for (int v = ROOT_ID+1; v < numNodes; ++v) {\n List<Edge<T>> edgeList = nodeList.get(v).backwardStar();\n for (Edge<T> edge : edgeList) {\n int u = edge.start().id();\n double bestCost = d_v[v];\n double transitionCost = score(d_v[u], edge.weight());\n if (compare(bestCost, transitionCost) == transitionCost) {\n // Do an update to the best cost\n d_v[v] = transitionCost;\n p_v[v] = edge;\n }\n }\n }\n \n // Backout the solution\n List<Edge<T>> bestPath = new LinkedList<Edge<T>>();\n Edge<T> bestEdge = p_v[numNodes-1];\n bestEdge = p_v[bestEdge.start().id()]; // Skip the goal node\n while(bestEdge.start().id() != ROOT_ID) {\n bestPath.add(0, bestEdge); // O(c) pre-pend\n bestEdge = p_v[bestEdge.start().id()];\n }\n\n return bestPath;\n }",
"public static void bfs(TreeNode root){\n Queue<TreeNode> queue=new LinkedList<>();\n queue.add(root);\n System.out.println(root.val);\n root.visited=true;\n\n while (!queue.isEmpty()){\n TreeNode node=queue.remove();\n TreeNode child=null;\n if((child=getUnVisitedChiledNode(node))!=null){\n child.visited=true;\n System.out.println(child.val);\n queue.add(child);\n }\n }\n // cleearNodes();\n }",
"public boolean isBipartiteUndirectedGraph (){\r\n int[] vertices = new int[getNumV()];\r\n for (int i = 0; i < getNumV(); ++i)\r\n vertices[i] = -1;\r\n\r\n vertices[0] = 1;\r\n\r\n Stack <Integer> q = new Stack<Integer>();\r\n q.push(0);\r\n\r\n while (!q.isEmpty()) {\r\n int current = q.pop();\r\n Iterator<Edge> iter = edgeIterator(current);\r\n while (iter.hasNext()) {\r\n Edge edge = iter.next();\r\n int neighbor = edge.getDest();\r\n if (vertices[neighbor] == -1) {\r\n vertices[neighbor] = 1 - vertices[current];\r\n q.push(neighbor);\r\n }\r\n else if (vertices[neighbor] == vertices[current])\r\n return false;\r\n }\r\n }\r\n return true;\r\n }",
"private String topologicalSortDfs(int indegree[], HashMap<Character, Set<Character>> adjList){\n \n // we ll use stringbuilder to update the characters instead of string\n // we ll insert all elements into queue who has indegree==0 initially, which means they dont have any dependency so they can come at any time//\n // so insert all indgree==0 into queu and do a stanmdard queue template\n StringBuilder sb = new StringBuilder();\n Queue<Character> q = new LinkedList();\n int totalChars = adjList.size(); // to check at end if all are present\n \n \n // loop thru all keys in graph and check the indegree of that character in indegree if its has zero , if so then add to queue initially\n // initial push to queue\n for(char c: adjList.keySet()){\n if(indegree[c-'a'] == 0){\n \n sb.append(c);\n q.offer(c);// so u need to add all orphan nodes to sb , since it contains results\n }\n \n } \n // now we need to find nodes which has dependency, take it out and reduce the indegree and check if indegreeis zero then add tio queue\n \n // stand ard queue template\n while(!q.isEmpty()){\n // take the elemnt \n char curr = q.poll();\n \n if(adjList.get(curr) == null || adjList.get(curr).size()==0 ){\n // we shud not do antthing, and pick the next nodes in the queue\n continue;\n }\n // if we have some elements in the adj list which means we have a dependency\n // So what do we do here:??\n // i think we can take it and reduce the indgree ??\n // Since we are. removing this particular current element, so we need to reduce all its neighbour indegree becios we removed aos we need to update the indegree of all its neiughbours\n for(char neighbour : adjList.get(curr)){\n indegree[neighbour-'a']--;\n //also check if it becomes zero after update we need to push to queu and sb\n if(indegree[neighbour-'a'] == 0){\n //add to q and sb\n q.offer(neighbour);\n sb.append(neighbour);\n \n }\n }\n \n }\n \n // once we are out of queue, which means we processed all nodes\n // if total chars is sb length, which means we got all chars /nodes so we can return else \"\"\n return sb.length() == totalChars ? sb.toString() : \"\";\n }",
"public void doDfsGraphMatrix(char[][] grid) {\n boolean[] myVisited = new boolean[8];\n // row number represents node, so row number will be pushed to stack\n Stack<Integer> stack = new Stack<>();\n stack.push(0);\n myVisited[0] = true;\n // should be same idea, when adj list, loop the row\n while (!stack.isEmpty()) {\n int r = stack.pop();\n System.out.print(\"[\" + r + \"] \");\n for (int c = 0; c < grid[r].length; c++) {\n // when there is a path\n if (grid[r][c] == '1' && !visited[c]) {\n stack.push(c);\n visited[c] = true;\n }\n }\n }\n\n\n }",
"public FixedGraph(int numOfVertices, int b, int seed) {\r\n super(numOfVertices);\r\n int adjVertex;\r\n double x = 0;\r\n int[] numOfEdges = new int[numOfVertices];\r\n Vector<Integer> graphVector = new Vector<Integer>();\r\n connectivity = b;\r\n\r\n\r\n Random random = new Random(seed);\r\n graphSeed = seed;\r\n\r\n for (int v = 0; v < numOfVertices; v++) {\r\n graphVector.add(new Integer(v));\r\n }\r\n\r\n for (int i = 0; i < numOfVertices; i++) {\r\n\r\n while ((numOfEdges[i] < b) && (graphVector.isEmpty() == false)) {\r\n x = random.nextDouble();\r\n do {\r\n adjVertex = (int) (x * numOfVertices);\r\n\r\n } while (adjVertex >= numOfVertices);\r\n\r\n\r\n if ((i == adjVertex) || (numOfEdges[adjVertex] >= b)) {\r\n if (numOfEdges[adjVertex] >= b) {\r\n for (int v = 0; v < graphVector.size(); v++) {\r\n\r\n int compInt = ((Integer) graphVector.elementAt(v)).intValue();\r\n if (adjVertex == compInt) {\r\n graphVector.removeElementAt(v);\r\n }\r\n if (graphVector.isEmpty() == true) {\r\n System.out.println(\"Graph Vector Empty\");\r\n }\r\n }\r\n\r\n }\r\n\r\n }\r\n if ((i != adjVertex) && (adjVertex < numOfVertices) && (numOfEdges[adjVertex] < b) && (super.isAdjacent(i, adjVertex) == false) && (numOfEdges[i] < b)) {\r\n super.addEdge(i, adjVertex);\r\n if (super.isAdjacent(i, adjVertex)) {\r\n numOfEdges[i] = numOfEdges[i] + 1;\r\n numOfEdges[adjVertex] = numOfEdges[adjVertex] + 1;\r\n }\r\n System.out.print(\"*\");\r\n\r\n }\r\n\r\n if (numOfEdges[i] >= b) {\r\n for (int v = 0; v < graphVector.size(); v++) {\r\n\r\n int compInt = ((Integer) graphVector.elementAt(v)).intValue();\r\n if (i == compInt) {\r\n graphVector.removeElementAt(v);\r\n }\r\n if (graphVector.isEmpty() == true) {\r\n System.out.println(\"Graph Vector Empty\");\r\n }\r\n }\r\n break;\r\n }\r\n if (graphVector.size() < b) {\r\n //boolean deadlock = false;\r\n System.out.println(\"Graph size= \" + graphVector.size());\r\n\r\n for (int v = 0; v < graphVector.size(); v++) {\r\n\r\n int compInt = ((Integer) graphVector.elementAt(v)).intValue();\r\n //System.out.println(\"i:= \" + i + \" and compInt:= \" + compInt);\r\n if (super.isAdjacent(i, compInt) || (i == compInt)) {\r\n //System.out.println(\"\" + i + \" adjacent to \" + compInt + \" \" + super.isAdjacent(i, compInt));\r\n // deadlock = false;\r\n } else {\r\n if ((numOfEdges[compInt] < b) && (numOfEdges[i] < b) && (i != compInt)) {\r\n super.addEdge(i, compInt);\r\n numOfEdges[i] = numOfEdges[i] + 1;\r\n numOfEdges[compInt] = numOfEdges[compInt] + 1;\r\n if (numOfEdges[i] >= b) {\r\n for (int w = 0; w < graphVector.size(); w++) {\r\n\r\n int compW = ((Integer) graphVector.elementAt(w)).intValue();\r\n if (i == compW) {\r\n graphVector.removeElementAt(w);\r\n }\r\n if (graphVector.isEmpty() == true) {\r\n System.out.println(\"Graph Vector Empty\");\r\n }\r\n }\r\n break;\r\n }\r\n if (numOfEdges[compInt] >= b) {\r\n for (int w = 0; w < graphVector.size(); w++) {\r\n\r\n int compW = ((Integer) graphVector.elementAt(w)).intValue();\r\n if (compInt == compW) {\r\n graphVector.removeElementAt(w);\r\n }\r\n if (graphVector.isEmpty() == true) {\r\n System.out.println(\"Graph Vector Empty\");\r\n }\r\n }\r\n\r\n }\r\n // deadlock = true;\r\n }\r\n }\r\n }\r\n break;\r\n }\r\n }\r\n\r\n System.out.println();\r\n }\r\n\r\n }"
] |
[
"0.6401563",
"0.6372221",
"0.6241536",
"0.6241152",
"0.6167306",
"0.61387205",
"0.6063156",
"0.6027268",
"0.601698",
"0.6012635",
"0.59979945",
"0.5988858",
"0.5958736",
"0.59543806",
"0.5949613",
"0.5949177",
"0.59076506",
"0.5887444",
"0.5883528",
"0.58728534",
"0.58658004",
"0.58658004",
"0.5855048",
"0.58203965",
"0.5819057",
"0.57779104",
"0.57623845",
"0.5754226",
"0.5749595",
"0.5733534",
"0.5701871",
"0.570161",
"0.5692201",
"0.56892455",
"0.56664264",
"0.56440955",
"0.5642066",
"0.56142324",
"0.558917",
"0.5574279",
"0.55730754",
"0.5571455",
"0.5563272",
"0.55618334",
"0.5551469",
"0.5545377",
"0.55391216",
"0.5531836",
"0.5507475",
"0.54938555",
"0.5492357",
"0.5489569",
"0.5479129",
"0.54760855",
"0.54478985",
"0.54452324",
"0.54444706",
"0.54426545",
"0.5442034",
"0.5435593",
"0.54150593",
"0.5414532",
"0.541137",
"0.5408046",
"0.5396563",
"0.5377365",
"0.5373762",
"0.53506356",
"0.53291184",
"0.53194255",
"0.5319109",
"0.53145874",
"0.5311475",
"0.52919513",
"0.5276598",
"0.5267025",
"0.5262531",
"0.5258419",
"0.52447426",
"0.52369094",
"0.5222859",
"0.5217917",
"0.5208681",
"0.5205196",
"0.5204427",
"0.5203708",
"0.51840323",
"0.51837605",
"0.51795155",
"0.5174387",
"0.51699907",
"0.5167684",
"0.51647747",
"0.51479334",
"0.51442987",
"0.5137492",
"0.51373845",
"0.51277304",
"0.5112438",
"0.5099741"
] |
0.63311964
|
2
|
transverse graph using dfs
|
static void dfs(int[][] G){
Stack<Integer> s = new Stack<Integer>();
for (int ver_start=0; ver_start<N; ver_start++){
if (visited[ver_start]) continue;
s.push(ver_start);
visited[ver_start] = true;
while(!s.isEmpty()){
int vertex = s.pop();
System.out.print((vertex+1) + " ");
for (int i=0; i<N; i++){
if (G[vertex][i] == 1 && !visited[i]){
// find neigbor of current vertex and not visited
// add into the stack
s.push(i);
visited[i] = true;
}
}
}
System.out.println();
}
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public void dfs() {\n\t\tfor (Vertice v : vertices) {\n\t\t\tv.setVisited(false);\n\t\t}\n\t\tfor (Vertice v : vertices) {\n\t\t\tif (!v.getVisited()) {\n\t\t\t\tVisitar(v, -1);\n\t\t\t}\n\t\t}\n\t}",
"void graph2() {\n\t\tconnect(\"1\", \"7\");\n\t\tconnect(\"1\", \"8\");\n\t\tconnect(\"1\", \"9\");\n\t\tconnect(\"9\", \"1\");\n\t\tconnect(\"9\", \"0\");\n\t\tconnect(\"9\", \"4\");\n\t\tconnect(\"4\", \"8\");\n\t\tconnect(\"4\", \"3\");\n\t\tconnect(\"3\", \"4\");\n\t}",
"private void transPose(graph g) {\n\t\tIterator it = g.getV().iterator();\n\t\twhile (it.hasNext()) {\n\t\t\tnode_data temp = (node_data) it.next();\n\t\t\tif(g.getE(temp.getKey())!=null) {\n\t\t\t\tIterator it1 = g.getE(temp.getKey()).iterator();\n\t\t\t\twhile (it1.hasNext()) {\n\t\t\t\t\tedge_data temp1 = (edge_data) it1.next();\n\t\t\t\t\tif (temp1 != null && temp1.getTag() == 0) {\n\t\t\t\t\t\tif (g.getEdge(temp1.getDest(), temp1.getSrc()) != null) {\n\t\t\t\t\t\t\tEdge temps = new Edge((Edge)g.getEdge(temp1.getSrc(),temp1.getDest()));\n\t\t\t\t\t\t\tdouble weight1 = g.getEdge(temp1.getSrc(),temp1.getDest()).getWeight();\n\t\t\t\t\t\t\tdouble weight2 = g.getEdge(temp1.getDest(),temp1.getSrc()).getWeight();\n\t\t\t\t\t\t\tg.connect(temp1.getSrc(),temp1.getDest(),weight2);\n\t\t\t\t\t\t\tg.connect(temps.getDest(),temps.getSrc(),weight1);\n\t\t\t\t\t\t\tg.getEdge(temps.getDest(), temps.getSrc()).setTag(1);\n\t\t\t\t\t\t\tg.getEdge(temps.getSrc(),temps.getDest()).setTag(1);\n\t\t\t\t\t\t\tit1 = g.getE(temp.getKey()).iterator();\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tg.connect(temp1.getDest(), temp1.getSrc(), temp1.getWeight());\n\t\t\t\t\t\t\tg.getEdge(temp1.getDest(), temp1.getSrc()).setTag(1);\n\t\t\t\t\t\t\tg.removeEdge(temp1.getSrc(), temp1.getDest());\n\t\t\t\t\t\t\tit1 = g.getE(temp.getKey()).iterator();\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}",
"public DirectedGraph getTranspose() {\n\t\tDirectedGraph newGraph = new DirectedGraph(V);\n\t\tfor (int v = 0; v < V; v++) {\n\t\t\t// Recur for all the vertices adjacent to this vertex\n\t\t\tIterator<Integer> i = this.getAdjacents(v).iterator();\n\t\t\twhile (i.hasNext())\n\t\t\t\tnewGraph.adj[i.next()].add(v);\n\n\t\t}\n\t\treturn newGraph;\n\t}",
"private void transferLocal(Graph graph) {\n Set<NodePair> nonadjacencies = nonadjacencies(graph);\n for (Graph pag : input) {\n for (Edge edge : pag.getEdges()) {\n NodePair graphNodePair = new NodePair(graph.getNode(edge.getNode1().getName()), graph.getNode(edge.getNode2().getName()));\n if (nonadjacencies.contains(graphNodePair)) {\n continue;\n }\n if (!graph.isAdjacentTo(graphNodePair.getFirst(), graphNodePair.getSecond())) {\n graph.addEdge(new Edge(graphNodePair.getFirst(), graphNodePair.getSecond(), edge.getEndpoint1(), edge.getEndpoint2()));\n continue;\n }\n Endpoint first = edge.getEndpoint1();\n Endpoint firstCurrent = graph.getEndpoint(graphNodePair.getSecond(), graphNodePair.getFirst());\n if (!first.equals(Endpoint.CIRCLE)) {\n if ((first.equals(Endpoint.ARROW) && firstCurrent.equals(Endpoint.TAIL)) ||\n (first.equals(Endpoint.TAIL) && firstCurrent.equals(Endpoint.ARROW))) {\n graph.setEndpoint(graphNodePair.getSecond(), graphNodePair.getFirst(), Endpoint.CIRCLE);\n } else {\n graph.setEndpoint(graphNodePair.getSecond(), graphNodePair.getFirst(), edge.getEndpoint1());\n }\n }\n Endpoint second = edge.getEndpoint2();\n Endpoint secondCurrent = graph.getEndpoint(graphNodePair.getFirst(), graphNodePair.getSecond());\n if (!second.equals(Endpoint.CIRCLE)) {\n if ((second.equals(Endpoint.ARROW) && secondCurrent.equals(Endpoint.TAIL)) ||\n (second.equals(Endpoint.TAIL) && secondCurrent.equals(Endpoint.ARROW))) {\n graph.setEndpoint(graphNodePair.getFirst(), graphNodePair.getSecond(), Endpoint.CIRCLE);\n } else {\n graph.setEndpoint(graphNodePair.getFirst(), graphNodePair.getSecond(), edge.getEndpoint2());\n }\n }\n }\n for (Triple triple : pag.getUnderLines()) {\n Triple graphTriple = new Triple(graph.getNode(triple.getX().getName()), graph.getNode(triple.getY().getName()), graph.getNode(triple.getZ().getName()));\n if (graphTriple.alongPathIn(graph)) {\n graph.addUnderlineTriple(graphTriple.getX(), graphTriple.getY(), graphTriple.getZ());\n definiteNoncolliders.add(graphTriple);\n }\n }\n }\n }",
"public void updateGraph(){\n int cont=contador;\n eliminar(0);\n construir(cont);\n }",
"private Graph constructReversedGraph() {\n Graph Gt = new Graph(this.nodes.size());\n for (int i = 0; i < this.nodes.size(); i++) {\n // the from node in the original graph\n Node from = this.nodes.get(i);\n // set the finishing time from the original graph to the same node in G^t so we can sort by finishing times\n Gt.getNodes().get(i).setF(from.getF());\n for (int j = 0; j < from.getAdjacencyList().size(); j++) {\n Node to = from.getAdjacencyList().get(j);\n Gt.addEdge(to.getName(), from.getName());\n }\n }\n return Gt;\n }",
"public void dfs(int[][] graph, int u) {\n int degree = 0;\n int v = -1;\n int anyv = -1;\n for (int col=0; col<n; col++){\n if (graph[u][col]!=1){\n continue;\n }\n if (isBridge(graph, u, col)){\n anyv=col;\n continue;\n }\n v=col;\n break;\n }\n //no edge anymore\n if (v==-1){\n //last edge.\n v = anyv;\n }\n if (v==-1){\n return;\n }\n\n //remove edge u->v\n graph[u][v]=0;\n graph[v][u]=0;\n path.add(String.format(\"%d->%d\", u, v));\n dfs(graph, v);\n }",
"public void dfs() {\n int currentVertexIndex = 0;\r\n dfsStack.push(0);\r\n vertexList[0].wasVisited = true;\r\n System.out.println(vertexList[dfsStack.peek()]);\r\n while (dfsStack.top != -1) {\r\n\r\n\r\n currentVertexIndex = this.getAdjUnvisitedVert(dfsStack.peek());\r\n if (currentVertexIndex != -1) {\r\n dfsStack.push(currentVertexIndex);\r\n vertexList[currentVertexIndex].wasVisited = true;\r\n System.out.println(vertexList[dfsStack.peek()]);\r\n\r\n\r\n } else {\r\n currentVertexIndex = dfsStack.pop();\r\n\r\n }\r\n }\r\n// reset wasVisted\r\n for (Vertex x : vertexList) {\r\n x.wasVisited = false;\r\n }\r\n }",
"protected void resetGraph() {\n for (List<Edge> path : graph) {\r\n for (Edge e : path) {\r\n e.flow = 0;\r\n }\r\n }\r\n }",
"public static void main(String[] args) throws IOException {\n File file = new File(args[0]);\r\n //FileOutputStream f = new FileOutputStream(\"prat_dfs_data2.txt\");\r\n //System.setOut(new PrintStream(f));\r\n BufferedReader reader = new BufferedReader(new FileReader(file));\r\n String line;\r\n line = reader.readLine();\r\n int nodecount = 0;\r\n HashMap <String , Integer> nodeMap = new HashMap <String , Integer>(); \r\n while ((line = reader.readLine()) != null ) {\r\n String data[] = line.split(\",(?=(?:[^\\\"]*\\\"[^\\\"]*\\\")*[^\\\"]*$)\");\r\n if (!nodeMap.containsKey(data[0].replaceAll(\"^\\\"|\\\"$\", \"\"))){\r\n nodeMap.put(data[0].replaceAll(\"^\\\"|\\\"$\", \"\"), nodecount);\r\n nodecount++;\r\n }\r\n }\r\n reader.close();\r\n Vertex adjList[] = new Vertex[nodecount];\r\n Vertex sortVer[] = new Vertex[nodecount];\r\n for(int it = 0; it < nodecount; it++){\r\n adjList[it] = new Vertex(it);\r\n }\r\n nodeMap.forEach((k, v) -> adjList[v].val = k);\r\n File file2 = new File(args[1]);\r\n BufferedReader reader2 = new BufferedReader(new FileReader(file2));\r\n line = reader2.readLine();\r\n while ((line = reader2.readLine()) !=null) {\r\n String data[] = line.split(\",(?=(?:[^\\\"]*\\\"[^\\\"]*\\\")*[^\\\"]*$)\");\r\n String source = data[0].replaceAll(\"^\\\"|\\\"$\", \"\");\r\n String target = data[1].replaceAll(\"^\\\"|\\\"$\", \"\");\r\n\r\n int weight = Integer.parseInt(data[2]);\r\n Vertex current = adjList[nodeMap.get(source)];\r\n Vertex newbie = new Vertex(nodeMap.get(target));\r\n current.countN++;\r\n current.co_occur += weight;\r\n if (adjList[nodeMap.get(source)].next == null){\r\n current.next = newbie;\r\n newbie.prev = current;\r\n }\r\n else{\r\n current.next.prev = newbie;\r\n newbie.next = current.next;\r\n current.next = newbie;\r\n newbie.prev = current;\r\n }\r\n Vertex current1 = adjList[nodeMap.get(target)];\r\n Vertex newbie1 = new Vertex(nodeMap.get(source));\r\n current1.co_occur += weight;\r\n current1.countN++;\r\n if (current1.next == null){\r\n current1.next = newbie1;\r\n newbie1.prev = current1;\r\n }\r\n else{\r\n current1.next.prev = newbie1;\r\n newbie1.next = current1.next;\r\n current1.next = newbie1;\r\n newbie1.prev = current1;\r\n }\r\n }\r\n reader2.close();\r\n \r\n for(int it = 0; it < nodecount; it++){\r\n sortVer[it] = new Vertex(adjList[it].id);\r\n sortVer[it].val = adjList[it].val;\r\n sortVer[it].co_occur = adjList[it].co_occur;\r\n }\r\n if (args[2].equals(\"average\")){\r\n double countdeg = 0;\r\n for(int it = 0; it<nodecount; it++){\r\n countdeg+= (double) adjList[it].countN;\r\n }\r\n countdeg = countdeg / (double) (nodecount);\r\n System.out.printf(\"%.2f\", countdeg);\r\n System.out.println();\r\n //long toc= System.nanoTime();\r\n //System.out.println((toc- startTime)/1000000000.0);\r\n }\r\n \r\n if(args[2].equals(\"rank\")){\r\n Graph.mergesort(sortVer, 0, nodecount-1);\r\n // long toc= System.nanoTime();\r\n // System.out.println((toc- startTime)/1000000000.0);\r\n System.out.print(sortVer[0].val);\r\n for(int kk=1; kk<nodecount; kk++){\r\n System.out.print(\",\" + sortVer[kk].val.toString());\r\n }\r\n System.out.println();\r\n }\r\n if(args[2].equals(\"independent_storylines_dfs\")){\r\n boolean visited[] = new boolean[nodecount];\r\n int ind = 0;\r\n ArrayList<ArrayList<Vertex>> comps = new ArrayList<ArrayList<Vertex>>();\r\n for(int it1 = 0; it1<nodecount; it1++){\r\n visited[it1] = false;\r\n }\r\n for(int it1 = 0; it1<nodecount; it1++){\r\n if (visited[it1] == false){\r\n ArrayList<Vertex> temp = new ArrayList<Vertex>();\r\n Graph.dfs(it1, visited, ind, adjList, temp);\r\n ind++;\r\n Graph.mergesort2(temp, 0, temp.size()-1);\r\n comps.add(temp);\r\n }\r\n }\r\n Graph.mergesort3(comps, 0, comps.size()-1);\r\n // long toc= System.nanoTime();\r\n // System.out.println((toc- startTime)/1000000000.0);\r\n for(int a1 = 0; a1 < ind; a1++){\r\n System.out.print(comps.get(a1).get(0).val);\r\n for(int j1 = 1; j1<comps.get(a1).size(); j1++){\r\n System.out.print(\",\" + comps.get(a1).get(j1).val);\r\n }\r\n System.out.println();\r\n }\r\n }\r\n }",
"public static void main(String[] args) {\nDGraph g=new DGraph();\r\nDirectedDFS d=new DirectedDFS(g);\r\nfor(Iterator<Integer> i=d.preorder.iterator();i.hasNext();)\r\n{\r\n\tSystem.out.print(i.next()+\" \");\r\n}\r\nSystem.out.println();\r\nfor(Iterator<Integer> i=d.postorder.iterator();i.hasNext();)\r\n{\r\n\tSystem.out.print(i.next()+\" \");\r\n}\r\nSystem.out.println();\r\n\r\n/*for(Iterator i=d.topologicalorder.iterator();i.hasNext();)\r\n{\r\n\tSystem.out.print(i.next()+\" \");\r\n}\r\nSystem.out.println();*/\r\n\r\n\r\n\tfor(int w:d.reversepost())\r\n\t\tSystem.out.print(w+\" \");\r\n\t//System.out.println(d.topologicalorder.pop());\r\n\t}",
"public static void main(String args[]) {\n int V = 4;\n Graph g = new Graph(V);\n g.addEdge(0, 1);\n g.addEdge(0, 2);\n g.addEdge(1, 2);\n g.addEdge(2, 0);\n g.addEdge(2, 3);\n g.addEdge(3, 3);\n\n int src = 1;\n int dest = 3;\n boolean[] visited = new boolean[V];\n\n // To store the complete path between source and destination\n Stack<Integer> path1 = new Stack<>();\n\n if (hasPathDFS(g, src, dest, visited, path1)) {\n System.out.println(\"There is a path from \" + src + \" to \" + dest);\n System.out.println(\"The complete path is \" + path1);\n } else System.out.println(\"There is no path from \" + src + \" to \" + dest);\n\n src = 3;\n dest = 1;\n // To store the complete path between source and destination\n Stack<Integer> path2 = new Stack<>();\n\n if (hasPathDFS(g, src, dest, visited, path2)) System.out.println(\"There is a path from \" + src + \" to \" + dest);\n else System.out.println(\"There is no path from \" + src + \" to \" + dest);\n\n // total number of nodes in the graph (labeled from 0 to 7)\n int n = 8;\n\n // List of graph edges as per the above diagram\n Graph g2 = new Graph(n);\n /**\n * There is a path from 1 to 3\n * The complete path is [1, 2, 3]\n * There is no path from 3 to 1\n * There is a path from 0 to 7\n * The complete path is [0, 3, 4, 6, 7]\n */\n\n g2.addEdge(0, 3);\n g2.addEdge(1, 0);\n g2.addEdge(1, 2);\n g2.addEdge(1, 4);\n g2.addEdge(2, 7);\n g2.addEdge(3, 4);\n g2.addEdge(3, 5);\n g2.addEdge(4, 3);\n g2.addEdge(4, 6);\n g2.addEdge(5, 6);\n g2.addEdge(6, 7);\n\n // source and destination vertex\n src = 0;\n dest = 7;\n\n // To store the complete path between source and destination\n Stack<Integer> path = new Stack<>();\n boolean[] visited2 = new boolean[n];\n\n if (hasPathDFS(g2, src, dest, visited2, path)) {\n System.out.println(\"There is a path from \" + src + \" to \" + dest);\n System.out.println(\"The complete path is \" + path);\n } else System.out.println(\"There is no path from \" + src + \" to \" + dest);\n\n\n }",
"private static void simplify (GraphDirected<NodeCppOSMDirected, EdgeCppOSMDirected> osmGraph) {\n \t\tfinal Iterator<NodeCppOSMDirected> iteratorNodes = osmGraph.getNodes().iterator();\n \t\twhile (iteratorNodes.hasNext()) {\n \t\t\tfinal NodeCppOSMDirected node = iteratorNodes.next();\n \t\t\t// one in one out\n \t\t\tif (node.getInDegree() == 1 && node.getOutDegree() == 1) {\n \t\t\t\t// get the ids of the two connected nodes\n \t\t\t\tfinal Long currentNodeId = node.getId();\n \t\t\t\tfinal List<EdgeCppOSMDirected> edges = node.getEdges();\n \t\t\t\tfinal EdgeCppOSMDirected edge1 = edges.get(0);\n \t\t\t\tfinal EdgeCppOSMDirected edge2 = edges.get(1);\n \t\t\t\tfinal Long node1id = edge1.getNode1().getId() == (currentNodeId) ? edge2.getNode1().getId() : edge1.getNode1().getId();\n \t\t\t\tfinal Long node2id = edge1.getNode1().getId() == (currentNodeId) ? edge1.getNode2().getId() : edge2.getNode2().getId();\n \t\t\t\tif (node2id == node1id){\n \t\t\t\t\t// we are in a deadend and do not erase ourself\n \t\t\t\t\tcontinue;\n \t\t\t\t}\n \t\t\t\t// concat the list in the right way\n \t\t\t\tList<WayNodeOSM> newMetaNodes = concatMetanodes(edge1.getMetadata().getNodes(), edge2.getMetadata().getNodes(), currentNodeId);\n \t\t\t\t// add a new edge\n \t\t\t\t// TODO: Handle way properly - what would name be in this context?\n \t\t\t\tosmGraph.getNode(node1id).connectWithNodeWeigthAndMeta(osmGraph.getNode(node2id), edge1.getWeight() + edge2.getWeight(),\n \t\t\t\t\t\tnew WayOSM(0, WayOSM.WayType.UNSPECIFIED, \"unknown\", newMetaNodes));\n \t\t\t\t// remove the old node\n \t\t\t\t// do this manually because we otherwise corrupt the iterator\n \t\t\t\tnode.removeAllEdges();\n \t\t\t\titeratorNodes.remove();\n \t\t\t\tcontinue;\n \t\t\t}\n \t\t\t// two in two out\n \t\t\tif (node.getInDegree() == 2 && node.getOutDegree() == 2) {\n \t\t\t\tfinal long currentNodeId = node.getId();\n \t\t\t\t//check the connections\n \t\t\t\tArrayList<EdgeCppOSMDirected> incomingEdges = new ArrayList<>();\n \t\t\t\tArrayList<EdgeCppOSMDirected> outgoingEdges = new ArrayList<>();\n \t\t\t\tfor(EdgeCppOSMDirected edge : node.getEdges()) {\n \t\t\t\t\tif(edge.getNode1().getId() == currentNodeId){\n \t\t\t\t\t\toutgoingEdges.add(edge);\n \t\t\t\t\t}\n \t\t\t\t\telse {\n \t\t\t\t\t\tincomingEdges.add(edge);\n \t\t\t\t\t}\n \t\t\t\t}\n \t\t\t\t//TODO make this condition better\n \t\t\t\tif(outgoingEdges.get(0).getNode2().equals(incomingEdges.get(0).getNode1())){\n \t\t\t\t\t//out0 = in0\n \t\t\t\t\tif(!outgoingEdges.get(1).getNode2().equals(incomingEdges.get(1).getNode1())){\n \t\t\t\t\t\tcontinue;\n \t\t\t\t\t}\n \t\t\t\t\tif(outgoingEdges.get(0).getWeight() != incomingEdges.get(0).getWeight()){\n \t\t\t\t\t\tcontinue;\n \t\t\t\t\t}\n \t\t\t\t\tif(outgoingEdges.get(1).getWeight() != incomingEdges.get(1).getWeight()){\n \t\t\t\t\t\tcontinue;\n \t\t\t\t\t}\n \t\t\t\t}\n \t\t\t\telse {\n \t\t\t\t\t//out0 should be in1\n \t\t\t\t\t//therefore out1 = in0\n \t\t\t\t\tif(!outgoingEdges.get(0).getNode2().equals(incomingEdges.get(1).getNode1())){\n \t\t\t\t\t\tcontinue;\n \t\t\t\t\t}\n \t\t\t\t\tif(!outgoingEdges.get(1).getNode2().equals(incomingEdges.get(0).getNode1())){\n \t\t\t\t\t\tcontinue;\n \t\t\t\t\t}\n \t\t\t\t\tif(outgoingEdges.get(0).getWeight() != incomingEdges.get(1).getWeight()){\n \t\t\t\t\t\tcontinue;\n \t\t\t\t\t}\n \t\t\t\t\tif(outgoingEdges.get(1).getWeight() != incomingEdges.get(0).getWeight()){\n \t\t\t\t\t\tcontinue;\n \t\t\t\t\t}\n \t\t\t\t}\n \n \t\t\t\t// get the ids of the two connected nodes\n \t\t\t\tfinal NodeCppOSMDirected node1 = incomingEdges.get(0).getNode1();\n \t\t\t\tfinal NodeCppOSMDirected node2 = incomingEdges.get(1).getNode1();\n \t\t\t\t// \t\t\tif (node1.equals(node2)){\n \t\t\t\t// \t\t\t\t// we are in a loop and do not erase ourself\n \t\t\t\t// \t\t\t\tcontinue;\n \t\t\t\t// \t\t\t}\n \t\t\t\t// concat the list in the right way\n \t\t\t\tList<WayNodeOSM> metaNodes1 = incomingEdges.get(0).getMetadata().getNodes();\n \t\t\t\tList<WayNodeOSM> metaNodes2 = incomingEdges.get(1).getMetadata().getNodes();\n \t\t\t\tdouble weight = incomingEdges.get(0).getWeight() +incomingEdges.get(1).getWeight();\n \t\t\t\tList<WayNodeOSM> newMetaNodes = concatMetanodes(metaNodes1, metaNodes2, currentNodeId);\n \t\t\t\t// add a new edge\n \t\t\t\t// TODO: Handle way properly - what would name be in this context?\n \t\t\t\tnode1.connectWithNodeWeigthAndMeta(node2, weight,\n \t\t\t\t\t\tnew WayOSM(0, WayOSM.WayType.UNSPECIFIED, \"unknown\", newMetaNodes));\n \t\t\t\tnode2.connectWithNodeWeigthAndMeta(node1, weight,\n \t\t\t\t\t\tnew WayOSM(0, WayOSM.WayType.UNSPECIFIED, \"unknown\", newMetaNodes));\n \t\t\t\t// remove the old node\n \t\t\t\t// do this manually because we otherwise corrupt the iterator\n \t\t\t\tnode.removeAllEdges();\n \t\t\t\titeratorNodes.remove();\n \t\t\t}\n \t\t}\n \t}",
"private static <V> Graph<V> unirGrafos(Graph<V> grafo1, Graph<V> grafo2) {\n V[] array = grafo2.getValuesAsArray();\n double[][] matriz = grafo2.getGraphStructureAsMatrix();\n for (int x = 0; x < array.length; x++) {\n grafo1.addNode(array[x]);\n for (int y = 0; y < array.length; y++) {\n if (matriz[x][y] != -1) {\n if (!grafo2.isDirected()) {\n matriz[y][x] = -1;\n }\n grafo1.addNode(array[y]);\n grafo1.addEdge(array[x], array[y], grafo2.getWeight(array[x], array[y]));\n }\n }\n }\n return grafo1;\n }",
"private void doFinalOrientation(Graph graph) {\n discrimGraphs.clear();\n Set<Graph> currentDiscrimGraphs = new HashSet<>();\n currentDiscrimGraphs.add(graph);\n while (changeFlag) {\n changeFlag = false;\n currentDiscrimGraphs.addAll(discrimGraphs);\n discrimGraphs.clear();\n for (Graph newGraph : currentDiscrimGraphs) {\n doubleTriangle(newGraph);\n awayFromColliderAncestorCycle(newGraph);\n if (!discrimPaths(newGraph)) {\n if (changeFlag) {\n discrimGraphs.add(newGraph);\n } else {\n finalResult.add(newGraph);\n }\n }\n }\n currentDiscrimGraphs.clear();\n }\n changeFlag = true;\n }",
"void dfs(){\n // start from the index 0\n for (int vertex=0; vertex<v; vertex++){\n // check visited or not\n if (visited[vertex]==false){\n Explore(vertex);\n }\n }\n }",
"void graph4() {\n\t\tconnect(\"8\", \"9\");\n\t\tconnect(\"3\", \"1\");\n\t\tconnect(\"3\", \"2\");\n\t\tconnect(\"3\", \"9\");\n\t\tconnect(\"4\", \"3\");\n\t\t//connect(\"4\", \"5\");\n\t\t//connect(\"4\", \"7\");\n\t\t//connect(\"5\", \"7\");\t\t\n\t}",
"private void constructTransitionTransposeMatrix() {\r\n\t\tfor(int i=0; i<getNodeCnt(); i++) {\r\n\t\t\tArrayList<NodeTransition> transitionList = new ArrayList<NodeTransition>();\r\n\t\t\tmTransitionTranspose.add( transitionList );\r\n\t\t}\r\n\t\tfor(Node node: mNodes) {\r\n\t\t\tint fromId = node.getId();\r\n\t\t\tint outDegree = node.getOutDegree();\r\n\t\t\t\r\n\t\t\tSet<Integer> outEdges = getOutEdges(fromId);\r\n\t\t\tfor(Integer edgeId: outEdges) {\r\n\t\t\t\tint toId = getEdge(edgeId).getToId();\r\n\t\t\t\tdouble pTransition = (double) getEdge(edgeId).getWeight() / (double) outDegree;\r\n\t\t\t\t\r\n\t\t\t\tArrayList<NodeTransition> transitionList = mTransitionTranspose.get(toId);\r\n\t\t\t\ttransitionList.add( new NodeTransition(fromId, pTransition) );\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"ArrayList<Node> DFSIter( Graph graph, final Node start, final Node end)\n {\n boolean visited[] = new boolean[graph.numNodes];\n Stack<Node> stack = new Stack<Node>();\n Map< Node,Node> parentPath = new HashMap< Node,Node>(); \n stack.push(start);\n\n while ( !stack.isEmpty() )\n {\n Node currNode = stack.pop();\n // end loop when goal node is found\n if ( currNode == end )\n break;\n // If node has already been visited, skip it\n if ( visited[currNode.id] )\n continue;\n else\n {\n visited[currNode.id] = true;\n int numEdges = currNode.connectedNodes.size();\n\n for ( int i = 0; i < numEdges; i++ )\n {\n Node edgeNode = currNode.connectedNodes.get(i);\n if ( !visited[edgeNode.id] )\n {\n stack.push( edgeNode );\n parentPath.put( edgeNode, currNode);\n }\n }\n \n }\n }\n\n ArrayList<Node> path = new ArrayList<Node>();\n Node currNode = end;\n while ( currNode != null )\n {\n path.add(0, currNode);\n currNode = parentPath.get(currNode);\n }\n\n return path;\n }",
"private void updateOriginalNodesInMirror() {\n for (Node node : originalGraph.nodes()) {\n if (!mirrorGraph.has(node)) {\n mirrorGraph.add(node);\n }\n originalAttributesToMirror(node);\n }\n }",
"void graph3() {\n\t\tconnect(\"0\", \"0\");\n\t\tconnect(\"2\", \"2\");\n\t\tconnect(\"2\", \"3\");\n\t\tconnect(\"3\", \"0\");\n\t}",
"public void loadGraph2(String path) throws FileNotFoundException, IOException {\n\n\t\ttry (BufferedReader br = new BufferedReader(\n\n\t\t\t\tnew InputStreamReader(new FileInputStream(path), StandardCharsets.UTF_8), 1024 * 1024)) {\n\n\t\t\tString line;\n\n\t\t\twhile ((line = br.readLine()) != null) {\n\n\t\t\t\tif (line == null) // end of file\n\t\t\t\t\tbreak;\n\n\n\t\t\t\tint a = 0;\n\t\t\t\tint left = -1;\n\t\t\t\tint right = -1;\n\n\t\t\t\tfor (int pos = 0; pos < line.length(); pos++) {\n\t\t\t\t\tchar c = line.charAt(pos);\n\t\t\t\t\tif (c == ' ' || c == '\\t') {\n\t\t\t\t\t\tif (left == -1)\n\t\t\t\t\t\t\tleft = a;\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tright = a;\n\n\t\t\t\t\t\ta = 0;\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tif (c < '0' || c > '9') {\n\t\t\t\t\t\tSystem.out.println(\"Erreur format ligne \");\n\t\t\t\t\t\tSystem.exit(1);\n\t\t\t\t\t}\n\t\t\t\t\ta = 10 * a + c - '0';\n\t\t\t\t}\n\t\t\t\tright = a;\n\t\t\n\t\t\t\t// s'assurer qu'on a toujours de la place dans le tableau\n\t\t\t\tif (adjVertices.length <= left || adjVertices.length <= right) {\n\t\t\t\t\tensureCapacity(Math.max(left, right) + 1);\n\t\t\t\t}\n\n\t\t\t\tif (adjVertices[left] == null) {\n\t\t\t\t\tadjVertices[left] = new Sommet(left);\n\t\t\t\t}\n\n\t\t\t\tif (adjVertices[right] == null) {\n\t\t\t\t\tadjVertices[right] = new Sommet(right);\n\t\t\t\t}\n\n\t\t\t\tif (adjVertices[left].listeAdjacence.contains(adjVertices[right])) {\n\t\t\t\t\tcontinue;\n\t\t\t\t} else {\n\t\t\t\t\tadjVertices[left].listeAdjacence.add(adjVertices[right]);\n\t\t\t\t\tadjVertices[right].listeAdjacence.add(adjVertices[left]);\n\t\t\t\t\tnombreArrete++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tfor (int i = 0; i < adjVertices.length; i++) {\n\t\t\tif (adjVertices[i] == null)\n\t\t\t\tnombreTrous++;\n\t\t}\n\t\tnumberOfNode = adjVertices.length - nombreTrous;\n\t\tSystem.out.println(\"-----------------------------------------------------------------\");\n\t\tSystem.out.println(\"Loading graph done !\");\n\t\tSystem.out.println(\"-----------------------------------------------------------------\");\n\n\t\tSystem.out.println(\"nombreTrous \" + nombreTrous);\n\t\tSystem.out.println(\"numberOfNode \" + numberOfNode);\n\t\t\n\t}",
"public List<List<Integer>> allPathsSourceTarget(int[][] graph) {\n \n boolean[] visited = new boolean[graph.length];\n \n List<Integer> paths = new ArrayList();\n paths.add(0);\n \n List<List<Integer>> allPaths = new ArrayList();\n \n dfs(0,graph.length-1, paths,allPaths,visited,graph);\n \n return allPaths;\n }",
"public void drawGraph()\n\t{\n\t\tMatrixStack transformStack = new MatrixStack();\n\t\ttransformStack.getTop().mul(getWorldTransform());\n\t\tdrawSelfAndChildren(transformStack);\n\t}",
"private void bubbleUpNodeTable(DAGraph<DataT, NodeT> from, LinkedList<String> path) {\n if (path.contains(from.rootNode.key())) {\n path.push(from.rootNode.key()); // For better error message\n throw logger.logExceptionAsError(\n new IllegalStateException(\"Detected circular dependency: \" + String.join(\" -> \", path)));\n }\n path.push(from.rootNode.key());\n for (DAGraph<DataT, NodeT> to : from.parentDAGs) {\n this.merge(from.nodeTable, to.nodeTable);\n this.bubbleUpNodeTable(to, path);\n }\n path.pop();\n }",
"public static void MakeDirectedNoCycle(graphUndir G) {\r\n\r\n\t\tfor (int i = 0; i < G.Adj.size(); i++) {\r\n\t\t\tG.Adj.elementAt(i).color = \"grey\";\r\n\t\t\tSystem.out.println(G.Adj.elementAt(i).name + \" is \"\r\n\t\t\t\t\t+ G.Adj.elementAt(i).color);\r\n\t\t\tfor (int j = 0; j < G.Adj.elementAt(i).next.size(); j++) {\r\n\t\t\t\tif (G.Adj.elementAt(i).next.elementAt(j).color == \"white\") {\r\n\t\t\t\t\tG.Adj.elementAt(i).next.elementAt(j).color = \"grey\";\r\n\t\t\t\t\tSystem.out\r\n\t\t\t\t\t\t\t.println(G.Adj.elementAt(i).next.elementAt(j).name\r\n\t\t\t\t\t\t\t\t\t+ \" is \"\r\n\t\t\t\t\t\t\t\t\t+ G.Adj.elementAt(i).next.elementAt(j).color);\r\n\t\t\t\t} else if (G.Adj.elementAt(i).next.elementAt(j).color == \"black\") {\r\n\t\t\t\t\tSystem.out\r\n\t\t\t\t\t\t\t.println(G.Adj.elementAt(i).next.elementAt(j).name\r\n\t\t\t\t\t\t\t\t\t+ \" is rempved from \"\r\n\t\t\t\t\t\t\t\t\t+ G.Adj.elementAt(i).name);\r\n\t\t\t\t\tG.Adj.elementAt(i).next.remove(j);\r\n\t\t\t\t\tj--;\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\t\t\tG.Adj.elementAt(i).color = \"black\";\r\n\t\t\tSystem.out.println(G.Adj.elementAt(i).name + \" is \"\r\n\t\t\t\t\t+ G.Adj.elementAt(i).color);\r\n\r\n\t\t}\r\n\r\n\t}",
"public void dfs(int v) {\n marked[v] = true;\n onStack[v] = true;\n for (DirectedEdge e : G.incident(v)) {\n int w = e.to();\n if (hasCycle())\n return;\n else if (!marked[w]) {\n parent[w] = v;\n dfs(w);\n } else if (onStack[w]) {\n cycle = new Stack<>();\n cycle.push(w);\n for (int u = v; u != w; u = parent[u])\n cycle.push(u);\n cycle.push(w);\n return;\n }\n }\n onStack[v] = false;\n reversePost.push(v);\n }",
"protected void merge(FlowGraph graph){\r\n for(FlowGraphNode node : this.from){\r\n node.addTo(graph.start);\r\n node.to.remove(this);\r\n }\r\n for(FlowGraphNode node : this.to){\r\n graph.end.addTo(node);\r\n node.from.remove(this);\r\n }\r\n }",
"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 }",
"@Override\n public void dfs() {\n\n }",
"public Set<Vec3i> transConnections();",
"public static ArrayList<String> connectors2(Graph g) {\n boolean[] visits = new boolean[g.members.length]; \n for (int i=0;i<=g.members.length-1;i++) {\n \tvisits[i]=false;\n }\n int[] dfsnum = new int[g.members.length];\n int[] back = new int[g.members.length];\n ArrayList<String> answer = new ArrayList<String>();\n\n //driver portion\n for (Person person : g.members) {\n //if it hasn't been visited\n if (visits[g.map.get(person.name)]==false){\n //for different islands\n dfsnum = new int[g.members.length];\n dfs(g.map.get(person.name), g.map.get(person.name), g, visits, dfsnum, back, answer);\n }\n }\n \n //check if vertex has one neighbor\n for (int i = 0; i < answer.size(); i++) {\n Friend ptr = g.members[g.map.get(answer.get(i))].first;\n //counts number of neighbors\n int count = 0;\n while (ptr != null) {\n ptr = ptr.next;\n count++;\n }\n if (count == 1) answer.remove(i);\n if (count == 0) answer.remove(i);\n } \n for (Person member : g.members) {\n if (member.first!=null&& member.first.next == null) {\n if (answer.contains(g.members[member.first.fnum].name)==false)\n \t\t answer.add(g.members[member.first.fnum].name);\n }\n }\n answer=modify(answer,g);\n if (answer==null||answer.size()==0) return null;\n return answer;\n }",
"private void dfs(String source) {\n visited.add(source);\n\n System.out.println(source);\n\n for (Object vertex : graph.get(source)) {\n if (!visited.contains(vertex))\n dfs((String) vertex);\n }\n }",
"public void reverseDi() {\n int hi = size - 1;\n int lo = 0;\n\n while (lo < hi) {\n Node left = getNodeAt(lo);\n Node right = getNodeAt(hi);\n\n Object temp = left.data;\n left.data = right.data;\n right.data = temp;\n\n lo++;\n hi--;\n }\n }",
"String targetGraph();",
"public void CFC() {\n\t\tthis.DFS(null);\n\t\tGrafo d2 = this.reverse();\n\n\t\tList<Vertice> decreasing_f2 = new ArrayList<Vertice>();\n\t\tfor (Vertice v1 : this.vertices.values()) {\n\t\t\tVertice v2 = d2.vertices.get(v1.id);\n\t\t\tv2.size = v1.f;\n\t\t\tdecreasing_f2.add(v2);\n\t\t}\n\t\tCollections.sort(decreasing_f2);\n\n\t\td2.DFS(decreasing_f2);\n\n\t\tthis.reset();\n\t\tfor (Vertice v21 : d2.vertices.values()) {\n\t\t\tVertice v11 = this.vertices.get(v21.id);\n\t\t\tif (v21.parent != null) {\n\t\t\t\tVertice v12 = this.vertices.get(v21.parent.id);\n\t\t\t\tv11.parent = v12;\n\t\t\t}\n\t\t}\n\t}",
"public void buildGraph() {\n //System.err.println(\"Build Graph \"+this);\n if (node instanceof eu.mihosoft.ext.j3d.com.sun.j3d.scenegraph.io.SceneGraphIO)\n ((eu.mihosoft.ext.j3d.com.sun.j3d.scenegraph.io.SceneGraphIO)node).restoreSceneGraphObjectReferences( control.getSymbolTable() );\n }",
"private void updateOriginalEdgesInMirror() {\n for (Edge edge : originalGraph.edges()) {\n if (!directEdgeMap.containsKey(edge)) {\n constructMirrorEdge(edge);\n }\n MirrorEdge mirrorEdge = directEdgeMap.get(edge);\n updateMirrorEdgeBends(edge, mirrorEdge);\n updateMirrorEdgeSegments(mirrorEdge);\n originalAttributesToMirror(edge);\n }\n }",
"public void mst() {\n int currentVertexIndex = 0;\r\n dfsStack.push(0);\r\n vertexList[0].wasVisited = true;\r\n// System.out.println(vertexList[dfsStack.peek()]);\r\n while (dfsStack.top != -1) {\r\n\r\n\r\n currentVertexIndex = this.getAdjUnvisitedVert(dfsStack.peek());\r\n if (currentVertexIndex != -1) {\r\n System.out.print(vertexList[dfsStack.peek()]);\r\n dfsStack.push(currentVertexIndex);\r\n vertexList[currentVertexIndex].wasVisited = true;\r\n System.out.print(vertexList[dfsStack.peek()]);\r\n System.out.print(\", \");\r\n\r\n\r\n } else {\r\n currentVertexIndex = dfsStack.pop();\r\n\r\n }\r\n }\r\n for (Vertex x : vertexList) {\r\n x.wasVisited = false;\r\n }\r\n }",
"public void setNodesToUnvisited(){\n for(GraphNode node: graphNode){\n if(node.visited){\n node.visited = false;\n }\n }\n }",
"public static void generateAndSaveExampleGraph() {\n EuclidDirectedGraph graph1 = new EuclidDirectedGraph();\n //vertexes added and created edge\n BoundsGraphVertex ver1 = new BoundsGraphVertex(10, 10, \"source\");\n BoundsGraphVertex ver2 = new BoundsGraphVertex(10, 30, \"secondNode\");\n BoundsGraphVertex ver3 = new BoundsGraphVertex(10, 40, \"thirdNode\");\n BoundsGraphVertex ver4 = new BoundsGraphVertex(10, 50, \"sink\");\n BoundsGraphVertex ver5 = new BoundsGraphVertex(10, 60, \"fiveNode - loop from second\");\n BoundsGraphVertex ver6 = new BoundsGraphVertex(10, 70, \"sixNode - loop from five\");\n BoundsGraphVertex ver7 = new BoundsGraphVertex(10, 80, \"sevenNode - loop from six to third\");\n\n graph1.addNode(ver1);\n graph1.addNode(ver2);\n graph1.addNode(ver3);\n graph1.addNode(ver4);\n graph1.addNode(ver5);\n graph1.addNode(ver6);\n graph1.addNode(ver7);\n //use .addEuclidEdge to compute edge's length automatically\n graph1.addEuclidEdge(ver1, ver2);\n graph1.addEuclidEdge(ver2, ver3);\n graph1.addEuclidEdge(ver3, ver4);\n graph1.addEuclidEdge(ver2, ver5);\n graph1.addEuclidEdge(ver5, ver6);\n graph1.addEuclidEdge(ver6, ver7);\n graph1.addEuclidEdge(ver7, ver3);\n //created graph #2\n EuclidDirectedGraph graph2 = new EuclidDirectedGraph();\n try {\n //save into file from graph #1\n XMLSerializer.write(graph1, \"input.xml\", false);\n //read from file into graph #2\n graph2 = (EuclidDirectedGraph) XMLSerializer.read(\"input.xml\");\n } catch (Exception e) {\n e.printStackTrace();\n }\n }",
"public Digraph reverse() {\n Digraph reverse = new Digraph(ver);\n for (int v = 0; v < ver; v++) {\n for (int w : adj(v)) {\n reverse.addEdge(w, v);\n }\n }\n return reverse;\n }",
"private GraphPattern translateToGP(){\r\n\r\n\t\t//Generate the graph pattern object\r\n\t\tGraphPattern gp = new GraphPattern();\r\n\r\n\r\n\t\t//For each Node object, create an associated MyNode object\r\n\t\tint nodeCount = 0;\r\n\t\tfor (Node n : allNodes){\r\n\t\t\tMyNode myNode = new MyNode(nodeCount, \"PERSON\");\r\n\t\t\tnodesMap.put(n, myNode);\r\n\t\t\tgp.addNode(myNode);\r\n\r\n\t\t\tnodeCount++;\r\n\t\t}\r\n\r\n\t\t//For k random MyNodes add the id as an attribute/property.\r\n\t\t//This id is used for cypher queries.\r\n\t\t//This process uses simple random sampling\r\n\t\tif (rooted > allNodes.size()){\r\n\t\t\trooted = allNodes.size();\r\n\t\t}\r\n\r\n\t\tList<Node> allNodesClone = new ArrayList<Node>();\r\n\t\tallNodesClone.addAll(allNodes);\r\n\r\n\t\tfor (int i = 0; i < rooted; i++){\r\n\t\t\t//Pick a random node from allNodes and get it's corresponding MyNode\r\n\t\t\tint idx = random.nextInt(allNodesClone.size());\r\n\t\t\tNode node = allNodesClone.get(idx);\r\n\t\t\tMyNode myNode = nodesMap.get(node);\r\n\r\n\t\t\t//Add the property to myNode\r\n\t\t\ttry (Transaction tx = graphDb.beginTx()){\r\n\t\t\t\tmyNode.addAttribute(\"id\", node.getProperty(\"id\")+\"\");\r\n\t\t\t\ttx.success();\r\n\t\t\t}\r\n\t\t\t//Remove the node from allNodesClone list.\r\n\t\t\tallNodesClone.remove(idx);\r\n\t\t}\r\n\r\n\t\t//Process the relationships\r\n\t\tint relCount = 0;\r\n\t\tString relPrefix = \"rel\";\r\n\r\n\t\tfor (Relationship r : rels){\r\n\r\n\t\t\tMyNode source = null, target = null;\r\n\t\t\tRelType type = null;\r\n\r\n\t\t\t//For each relationship in rels, create a corresponding relationship in gp.\r\n\t\t\ttry (Transaction tx = graphDb.beginTx()){\r\n\t\t\t\tsource = nodesMap.get(r.getStartNode());\r\n\t\t\t\ttarget = nodesMap.get(r.getEndNode());\r\n\t\t\t\ttype = GPUtil.translateRelType(r.getType());\r\n\t\t\t\ttx.success();\r\n\t\t\t}\r\n\r\n\t\t\tMyRelationship rel = new MyRelationship(source, target, type, relCount);\r\n\t\t\trelCount++;\r\n\r\n\t\t\tif (relCount >= 25){\r\n\t\t\t\trelCount = 0;\r\n\t\t\t\trelPrefix = relPrefix + \"l\";\r\n\t\t\t}\r\n\r\n\t\t\tgp.addRelationship(rel);\r\n\t\t\trelsMap.put(r, rel);\r\n\t\t}\r\n\r\n\t\t//Set the attribute requirements\r\n\t\tattrsReq(gp, true);\r\n\t\tattrsReq(gp, false);\r\n\t\treturn gp;\r\n\t}",
"private Graph simpleMigrationPerPattern(Graph graph, Storyboard storyboard) {\n srcGraphPO = new GraphPO(graph);\n\n GraphPO tgtGraphPO = (GraphPO) new GraphPO().withPattern(srcGraphPO.getPattern()).withModifier(Pattern.CREATE);\n tgtGraphPO.findNextMatch();\n\n Graph result = tgtGraphPO.getCurrentMatch();\n\n storyboard.addPattern(srcGraphPO, false);\n\n // ==========================================================================\n // copy nodes\n int noOfMatches = 0;\n\n srcGraphPO = new GraphPO(graph);\n\n NodePO srcNodePO = srcGraphPO.hasNodes();\n\n tgtGraphPO = (GraphPO) new GraphPO(tgtGraphPO.getCurrentMatch())\n .withPattern(srcGraphPO.getPattern());\n\n srcGraphPO.startCreate();\n\n NodePO tgtNodePO = tgtGraphPO.hasGcsNode();\n\n tgtNodePO.hasOrig(srcNodePO);\n\n while (srcGraphPO.getPattern().getHasMatch()) {\n tgtNodePO.withText(srcNodePO.getName());\n\n noOfMatches++;\n\n srcGraphPO.getPattern().findNextMatch();\n }\n\n systemout = \"Number of migrated nodes: \" + noOfMatches;\n\n storyboard.addPattern(srcGraphPO, false);\n\n // ==========================================================================\n noOfMatches = 0;\n\n srcGraphPO = new GraphPO(graph);\n\n EdgePO srcEdgePO = srcGraphPO.hasEdges();\n\n tgtGraphPO = new GraphPO(tgtGraphPO.getCurrentMatch()).withPattern(srcGraphPO.getPattern());\n\n tgtGraphPO.startCreate();\n\n EdgePO tgtEdgePO = tgtGraphPO.hasGcsEdge();\n\n boolean done = false;\n\n while (tgtEdgePO.getPattern().getHasMatch()) {\n tgtEdgePO.withText(srcEdgePO.getName());\n\n copySrcNodePO = new EdgePO(srcEdgePO.getCurrentMatch())\n .hasSrc()\n .hasCopy();\n\n EdgePO copyEdgePO = new EdgePO(tgtEdgePO.getCurrentMatch()).withPattern(copySrcNodePO.getPattern());\n\n copySrcNodePO.startCreate();\n\n copyEdgePO.hasSrc(copySrcNodePO);\n\n\n copyTgtNodePO = new EdgePO(srcEdgePO.getCurrentMatch())\n .hasTgt()\n .hasCopy();\n\n EdgePO copyEdgePO2 = new EdgePO(tgtEdgePO.getCurrentMatch()).withPattern(copyTgtNodePO.getPattern());\n\n copyTgtNodePO.startCreate();\n\n copyEdgePO2.hasTgt(copyTgtNodePO);\n\n noOfMatches++;\n\n tgtEdgePO.getPattern().findNextMatch();\n }\n\n systemout += \"\\nNumber of migrated Edges: \" + noOfMatches;\n\n storyboard.addPattern(tgtEdgePO, false);\n storyboard.addPattern(copySrcNodePO, false);\n storyboard.addPattern(copyTgtNodePO, false);\n\n return result;\n }",
"@Test\n public void cyclicalGraphs3Test() throws Exception {\n // Test graphs with multiple loops. g1 has two different loops, which\n // have to be correctly matched to g2 -- which is build in a different\n // order but is topologically identical to g1.\n\n ChainsTraceGraph g1 = new ChainsTraceGraph();\n List<EventNode> g1Nodes = addNodesToGraph(g1, new String[] { \"a\", \"b\",\n \"c\", \"d\", \"b\", \"c\" });\n\n // Create loop1 in g1, with the first 4 nodes.\n g1Nodes.get(0).addTransition(g1Nodes.get(1), Event.defTimeRelationStr);\n g1Nodes.get(1).addTransition(g1Nodes.get(2), Event.defTimeRelationStr);\n g1Nodes.get(2).addTransition(g1Nodes.get(3), Event.defTimeRelationStr);\n g1Nodes.get(3).addTransition(g1Nodes.get(0), Event.defTimeRelationStr);\n\n // Create loop2 in g1, with the last 2 nodes, plus the initial node.\n g1Nodes.get(0).addTransition(g1Nodes.get(4), Event.defTimeRelationStr);\n g1Nodes.get(4).addTransition(g1Nodes.get(5), Event.defTimeRelationStr);\n g1Nodes.get(5).addTransition(g1Nodes.get(0), Event.defTimeRelationStr);\n\n exportTestGraph(g1, 0);\n\n // //////////////////\n // Now create g2, by generating the two identical loops in the reverse\n // order.\n\n ChainsTraceGraph g2 = new ChainsTraceGraph();\n List<EventNode> g2Nodes = addNodesToGraph(g2, new String[] { \"a\", \"b\",\n \"c\", \"d\", \"b\", \"c\" });\n\n // Create loop2 in g2, with the last 2 nodes, plus the initial node.\n g2Nodes.get(0).addTransition(g2Nodes.get(4), Event.defTimeRelationStr);\n g2Nodes.get(4).addTransition(g2Nodes.get(5), Event.defTimeRelationStr);\n g2Nodes.get(5).addTransition(g2Nodes.get(0), Event.defTimeRelationStr);\n\n // Create loop1 in g2, with the first 4 nodes.\n g2Nodes.get(0).addTransition(g2Nodes.get(1), Event.defTimeRelationStr);\n g2Nodes.get(1).addTransition(g2Nodes.get(2), Event.defTimeRelationStr);\n g2Nodes.get(2).addTransition(g2Nodes.get(3), Event.defTimeRelationStr);\n g2Nodes.get(3).addTransition(g2Nodes.get(0), Event.defTimeRelationStr);\n\n exportTestGraph(g2, 1);\n\n // //////////////////\n // Now test that the two graphs are identical for all k starting at the\n // initial node.\n\n for (int k = 1; k < 7; k++) {\n testKEqual(g1Nodes.get(0), g2Nodes.get(0), k);\n }\n }",
"private static void simplify (GraphUndirected<NodeCppOSM, EdgeCppOSM> osmGraph) {\n \t\tfinal Iterator<NodeCppOSM> iteratorNodes = osmGraph.getNodes().iterator();\n \t\twhile (iteratorNodes.hasNext()) {\n \t\t\tfinal NodeCppOSM node = iteratorNodes.next();\n \t\t\tif (node.getDegree() == 2) {\n \t\t\t\t// get the ids of the two connected nodes\n \t\t\t\tfinal Long currentNodeId = node.getId();\n \t\t\t\tfinal List<EdgeCppOSM> edges = node.getEdges();\n \t\t\t\tfinal EdgeCppOSM edge1 = edges.get(0);\n \t\t\t\tfinal EdgeCppOSM edge2 = edges.get(1);\n \t\t\t\tfinal Long node1id = edge1.getNode1().getId() == (currentNodeId) ? edge1.getNode2().getId() : edge1.getNode1().getId();\n \t\t\t\tfinal Long node2id = edge2.getNode1().getId() == (currentNodeId) ? edge2.getNode2().getId() : edge2.getNode1().getId();\n \t\t\t\tif (currentNodeId == node1id){\n \t\t\t\t\t// we are in a loop and do not erase ourself\n \t\t\t\t\tcontinue;\n \t\t\t\t}\n \t\t\t\t// concat the list in the right way\n \t\t\t\tList<WayNodeOSM> newMetaNodes = concatMetanodes(edge1.getMetadata().getNodes(), edge2.getMetadata().getNodes(), currentNodeId);\n \t\t\t\t// add a new edge\n \t\t\t\t// TODO: Handle way properly - what would name be in this context?\n \t\t\t\t// TODO: names\n \t\t\t\tosmGraph.getNode(node1id).connectWithNodeWeigthAndMeta(osmGraph.getNode(node2id), edge1.getWeight() + edge2.getWeight(),\n\t\t\t\t\t\tnew WayOSM(0, WayOSM.WayType.UNSPECIFIED, edge1.getMetadata().getName()+edge2.getMetadata().getName(), newMetaNodes));\n \t\t\t\t// remove the old node\n \t\t\t\t// do this manually because we otherwise corrupt the iterator\n \t\t\t\tnode.removeAllEdges();\n \t\t\t\titeratorNodes.remove();\n \t\t\t}\n \t\t}\n \t}",
"public void dfs(DirectedGraph graph, int node){\n onStack[node] = true;\n // marked the node as visited\n marked[node] = true;\n // traverse through the neigh of the node\n for(int neigh: graph.adj[node]){\n // if the cycle stack is not empty then we have cycle\n if (this.hasCycle()) return;\n else if (!marked[neigh]){\n // assign node as neigh parent to check cycle later\n parent[neigh] = node;\n // traverse through unvisited node\n dfs(graph,neigh);\n // if neigh is already visited and onstack then trace back to\n // check if the parent of node is the same as neigh\n }else if (onStack[neigh]){\n// System.out.println(\"neigh = \"+ neigh + \" node = \"+ node);\n // put all the vertex in the cycle to the stack\n int v = node;\n cycle.push(v);\n while(v != neigh){\n v = parent[v];\n cycle.push(v);\n }\n if(cycle.size() < 3) cycle = new Stack<>();\n else {\n System.out.print(\"The cycle is \");\n for (int vertex : cycle) System.out.print(vertex + \",\");\n System.out.println();\n }\n\n }\n }\n onStack[node] = false;\n }",
"private void dfs(DigrafoAristaPonderada G, int v) {\n enPila[v] = true;\n marcado[v] = true;\n for (AristaDirigida a : G.ady(v)) {\n int w = a.hacia();\n\n // short circuit if directed ciclo found\n if (ciclo != null) return;\n\n //found new vertex, so recur\n else if (!marcado[w]) {\n aristaHacia[w] = a;\n dfs(G, w);\n }\n\n // trace back directed ciclo\n else if (enPila[w]) {\n ciclo = new Pila<AristaDirigida>();\n while (a.desde() != w) {\n ciclo.push(a);\n a = aristaHacia[a.desde()];\n }\n ciclo.push(a);\n return;\n }\n }\n\n enPila[v] = false;\n }",
"public boolean reducible() {\n if (dfsTree.back.isEmpty()) {\n return true;\n }\n int size = controlFlow.transitions.length;\n boolean[] loopEnters = dfsTree.loopEnters;\n TIntHashSet[] cycleIncomings = new TIntHashSet[size];\n // really this may be array, since dfs already ensures no duplicates\n TIntArrayList[] nonCycleIncomings = new TIntArrayList[size];\n int[] collapsedTo = new int[size];\n int[] queue = new int[size];\n int top;\n for (int i = 0; i < size; i++) {\n if (loopEnters[i]) {\n cycleIncomings[i] = new TIntHashSet();\n }\n nonCycleIncomings[i] = new TIntArrayList();\n collapsedTo[i] = i;\n }\n\n // from whom back connections\n for (Edge edge : dfsTree.back) {\n cycleIncomings[edge.to].add(edge.from);\n }\n // from whom ordinary connections\n for (Edge edge : dfsTree.nonBack) {\n nonCycleIncomings[edge.to].add(edge.from);\n }\n\n for (int w = size - 1; w >= 0 ; w--) {\n top = 0;\n // NB - it is modified later!\n TIntHashSet p = cycleIncomings[w];\n if (p == null) {\n continue;\n }\n TIntIterator iter = p.iterator();\n while (iter.hasNext()) {\n queue[top++] = iter.next();\n }\n\n while (top > 0) {\n int x = queue[--top];\n TIntArrayList incoming = nonCycleIncomings[x];\n for (int i = 0; i < incoming.size(); i++) {\n int y1 = collapsedTo[incoming.getQuick(i)];\n if (!dfsTree.isDescendant(y1, w)) {\n return false;\n }\n if (y1 != w && p.add(y1)) {\n queue[top++] = y1;\n }\n }\n }\n\n iter = p.iterator();\n while (iter.hasNext()) {\n collapsedTo[iter.next()] = w;\n }\n }\n\n return true;\n }",
"public OrientGraph getGraphTx();",
"static void graphCheck(int u) {\n\t\tdfs_num[u] = DFS_GRAY; // color this as DFS_GRAY (temp)\r\n\t\tfor (int j = 0; j < (int) AdjList[u].size(); j++) {\r\n\t\t\tEdge v = AdjList[u].get(j);\r\n\t\t\tif (dfs_num[v.to] == DFS_WHITE) { // Tree Edge, DFS_GRAY to\r\n\t\t\t\t\t\t\t\t\t\t\t\t// DFS_WHITE\r\n\t\t\t\tdfs_parent[v.to] = u; // parent of this children is me\r\n\t\t\t\tgraphCheck(v.to);\r\n\t\t\t} else if (dfs_num[v.to] == DFS_GRAY) { // DFS_GRAY to DFS_GRAY\r\n\t\t\t\tif (v.to == dfs_parent[u]) // to differentiate these two\r\n\t\t\t\t\t\t\t\t\t\t\t// cases\r\n\t\t\t\t\tSystem.out.printf(\" Bidirectional (%d, %d) - (%d, %d)\\n\",\r\n\t\t\t\t\t\t\tu, v.to, v.to, u);\r\n\t\t\t\telse\r\n\t\t\t\t\t// la mas usada pillar si tiene un ciclo\r\n\t\t\t\t\tSystem.out.printf(\" Back Edge (%d, %d) (Cycle)\\n\", u, v.to);\r\n\t\t\t} else if (dfs_num[v.to] == DFS_BLACK) // DFS_GRAY to DFS_BLACK\r\n\t\t\t\tSystem.out.printf(\" Forward/Cross Edge (%d, %d)\\n\", u, v.to);\r\n\t\t}\r\n\t\tdfs_num[u] = DFS_BLACK; // despues de la recursion DFS_BLACK (DONE)\r\n\t}",
"private void DFS() {\n\t\tfor(Node node: nodeList) {\r\n\t\t\tif(!node.isVisited())\r\n\t\t\t\tdfsVisit(node);\r\n\t\t}\r\n\t}",
"public void joinGraph(IGraph graph);",
"private final void restoreOriginalGraph() {\n // Safeguard against multiple restores\n if (startIndex == -1) return;\n \n markEdgesFrom(startIndex, false);\n markEdgesFrom(endIndex, false);\n markHasEdgeToGoal(false);\n nOutgoingEdgess[endIndex] = endOriginalSize;\n nOutgoingEdgess[startIndex] = startOriginalSize;\n nEdges = originalNEdges;\n\n nNodes = originalSize;\n startIndex = -1;\n endIndex = -1;\n }",
"private static <V, I> void dfsCopy(final DAG<V, I> srcDAG, final V src, final DAG<V, I> destDAG) {\n final Map<V, I> edges = srcDAG.getEdges(src);\n for (final Map.Entry<V, I> edge : edges.entrySet()) {\n final V nextVertex = edge.getKey();\n final boolean newVertexAdded = destDAG.addVertex(nextVertex);\n destDAG.addEdge(src, nextVertex, edge.getValue());\n if (newVertexAdded) {\n dfsCopy(srcDAG, nextVertex, destDAG);\n }\n }\n }",
"public Graph createGraph() {\n String fileName;\n// fileName =\"./428333.edges\";\n String line;\n Graph g = new Graph();\n// List<String> vertexNames = new ArrayList<>();\n// try\n// {\n// BufferedReader in=new BufferedReader(new FileReader(fileName));\n// line=in.readLine();\n// while (line!=null) {\n////\t\t\t\tSystem.out.println(line);\n// String src = line.split(\" \")[0];\n// String dst = line.split(\" \")[1];\n//// vertexNames.add(src);\n//// vertexNames.add(dst);\n//// System.out.println(src+\" \"+dst);\n// g.addEdge(src, dst, 1);\n// line=in.readLine();\n// }\n// in.close();\n// } catch (Exception e) {\n//\t\t\te.printStackTrace();\n// }\n\n fileName=\"./788813.edges\";\n// List<String> vertexNames = new ArrayList<>();\n try\n {\n BufferedReader in=new BufferedReader(new FileReader(fileName));\n line=in.readLine();\n while (line!=null) {\n//\t\t\t\tSystem.out.println(line);\n String src = line.split(\" \")[0];\n String dst = line.split(\" \")[1];\n g.addEdge(src, dst, 1);\n line=in.readLine();\n }\n in.close();\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n// Graph g = new Graph(new String[]{\"v0\", \"v1\", \"v2\", \"v3\", \"v4\", \"v5\", \"v6\", \"v7\", \"v8\"});\n// // Add the required edges.\n// g.addEdge(\"v0\", \"v1\", 4); g.addEdge(\"v0\", \"v7\", 8);\n// g.addEdge(\"v1\", \"v2\", 8); g.addEdge(\"v1\", \"v7\", 11); g.addEdge(\"v2\", \"v1\", 8);\n// g.addEdge(\"v2\", \"v8\", 2); g.addEdge(\"v2\", \"v5\", 4); g.addEdge(\"v2\", \"v3\", 7);\n// g.addEdge(\"v3\", \"v2\", 7); g.addEdge(\"v3\", \"v5\", 14); g.addEdge(\"v3\", \"v4\", 9);\n// g.addEdge(\"v4\", \"v3\", 9); g.addEdge(\"v4\", \"v5\", 10);\n// g.addEdge(\"v5\", \"v4\", 10); g.addEdge(\"v5\", \"v3\", 9); g.addEdge(\"v5\", \"v2\", 4);\n// g.addEdge(\"v5\", \"v6\", 2);\n// g.addEdge(\"v6\", \"v7\", 1); g.addEdge(\"v6\", \"v8\", 6); g.addEdge(\"v6\", \"v5\", 2);\n// g.addEdge(\"v7\", \"v0\", 8); g.addEdge(\"v7\", \"v8\", 7); g.addEdge(\"v7\", \"v1\", 11);\n// g.addEdge(\"v7\", \"v6\", 1);\n// g.addEdge(\"v8\", \"v2\", 2); g.addEdge(\"v8\", \"v7\", 7); g.addEdge(\"v8\", \"v6\", 6);\n\n//\n return g;\n }",
"public void doDfsGraphMatrix(char[][] grid) {\n boolean[] myVisited = new boolean[8];\n // row number represents node, so row number will be pushed to stack\n Stack<Integer> stack = new Stack<>();\n stack.push(0);\n myVisited[0] = true;\n // should be same idea, when adj list, loop the row\n while (!stack.isEmpty()) {\n int r = stack.pop();\n System.out.print(\"[\" + r + \"] \");\n for (int c = 0; c < grid[r].length; c++) {\n // when there is a path\n if (grid[r][c] == '1' && !visited[c]) {\n stack.push(c);\n visited[c] = true;\n }\n }\n }\n\n\n }",
"public static void main(String[] args) {\n Graph graph = new Graph(16);\n graph.addEdge(0,1);\n graph.addEdge(1,2);\n graph.addEdge(2,3);\n graph.addEdge(3,4);\n graph.addEdge(4,5);\n graph.addEdge(5,6);\n graph.addEdge(6,7);\n graph.addEdge(8,9);\n graph.addEdge(9,10);\n graph.addEdge(10,11);\n graph.addEdge(11,12);\n graph.addEdge(13,14);\n graph.addEdge(14,15);\n graph.addEdge(15,0);\n graph.addEdge(0,8);\n graph.addEdge(1,10);\n graph.addEdge(2,9);\n graph.addEdge(3,11);\n graph.addEdge(3,14);\n graph.addEdge(4,7);\n graph.addEdge(4,13);\n graph.addEdge(5,8);\n graph.addEdge(5,15);\n graph.printGraph();\n System.out.println(\"DFS Traversal\");\n graph.DFS(3);\n System.out.println();\n System.out.println(\"BFS Traversal\");\n graph.BFS(3);\n// System.out.println();\n// for (int i=0; i<graph.vertices; i++)\n// {\n// if(graph.visited[i]!=true)\n// {\n// graph.DFS(i);\n// }\n// }\n\n }",
"private void dfs(Node s, HashSet<Integer> visited) {\n\t\tif(visited.contains(s.id)) {\n\t\t\treturn;\n\t\t}\n\t\tSystem.out.println(s.id);\n\t\tvisited.add(s.id);\n\t\tfor(Node n :s.adj) {\n\t\t\tdfs(n,visited);\n\t\t}\n\t}",
"public void topologicalSort() {\n HashMap<Integer, Integer> inDegrees = new HashMap<>();\n Queue<Integer> queue = new LinkedList<>();\n int numTotalNodes = 0;\n\n // Build the inDegree HashMap\n for (Entry<Integer, LinkedList<Edge<Integer>>> entry : g.adj.entrySet()) {\n LinkedList<Edge<Integer>> vList = entry.getValue();\n int currentVertex = entry.getKey();\n\n inDegrees.put(currentVertex, inDegrees.getOrDefault(currentVertex, 0));\n for (Edge<Integer> e : vList) {\n inDegrees.put(e.dest, inDegrees.getOrDefault(e.dest, 0) + 1);\n numTotalNodes++;\n }\n }\n\n // Add Elements with inDegree zero toe the queue\n for (int v : inDegrees.keySet()) {\n if (inDegrees.get(v) > 0)\n continue;\n queue.add(v);\n }\n\n int visitedNodes = 0;\n\n while (!queue.isEmpty()) {\n int v = queue.remove();\n System.out.print(v + \" \");\n for (int u : g.getNeighbors(v)) {\n int inDeg = inDegrees.get(u) - 1;\n if (inDeg == 0)\n queue.add(u);\n inDegrees.put(u, inDeg);\n }\n visitedNodes++;\n }\n\n if (visitedNodes != numTotalNodes) {\n System.out.println(\"Graph is not a DAG\");\n }\n }",
"@RequestMapping(value=\"/async/graph\", method=RequestMethod.GET)\n\tpublic @ResponseBody GraphPojo getGraph() {\n\t\tList<Collection> collections = collectionService.findAllCurrent();\n\t\tList<Agent> agents = agentService.findAllCurrent();\n\t\tList<NodePojo> nodes = new ArrayList<NodePojo>();\n\t\tList<EdgePojo> edges = new ArrayList<EdgePojo>();\n\t\tList<String> nodeIds = new ArrayList<String>();\n\t\t\n\t\tNodePojo node;\n\t\tEdgePojo edge;\n\t\t\n\t\t// Nodes\n\t\tfor (Collection c : collections) {\n\t\t\tnode = new NodePojo();\n\t\t\tnode.setId(c.getEntityId());\n\t\t\tnode.setLabel(c.getLocalizedDescriptions().get(0).getTitle());\n\t\t\tnode.setType(\"collection\");\n\t\t\tnodes.add(node);\n\t\t\tnodeIds.add(node.getId());\n\t\t}\n\t\tfor (Agent agent : agents) {\n\t\t\tnode = new NodePojo();\n\t\t\tnode.setId(agent.getEntityId());\n\t\t\t\n\t\t\tif (agent.getForeName()==null) {\n\t\t\t\tnode.setType(\"organization\");\n\t\t\t} else {\n\t\t\t\tnode.setType(\"person\");\n\t\t\t}\n\t\t\t\n\t\t\tString name = (agent.getForeName()==null? \"\": (agent.getForeName() + \" \")) + agent.getName() ;\n\t\t\tnode.setLabel(name);\n\t\t\tnodes.add(node);\n\t\t\tnodeIds.add(node.getId());\n\t\t}\n\t\t\n\t\t// Edges\n\t\tfor (Collection c : collections) {\n\t\t\tif (c.getRelations()!=null) {\n\t\t\t\tfor (CollectionRelation cr : c.getRelations()) {\n\t\t\t\t\tedge = new EdgePojo();\n\t\t\t\t\tedge.setSource(cr.getSourceEntityId());\n\t\t\t\t\tedge.setTarget(cr.getTargetEntityId());\n\t\t\t\t\t\n\t\t\t\t\tif (!edges.contains(edge) && nodeIds.contains(edge.getSource()) && nodeIds.contains(edge.getTarget())) {\n\t\t\t\t\t\tedges.add(edge);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (c.getAgentRelations()!=null && c.getAgentRelations().size()!=0) {\n\t\t\t\tfor (CollectionAgentRelation car : c.getAgentRelations()) {\n\t\t\t\t\tedge = new EdgePojo();\n\t\t\t\t\tedge.setSource(c.getEntityId());\n\t\t\t\t\tedge.setTarget(car.getAgentId());\n\t\t\t\t\tif (!edges.contains(edge) && nodeIds.contains(edge.getSource()) && nodeIds.contains(edge.getTarget())) {\n\t\t\t\t\t\tedges.add(edge);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tfor (Agent agent : agents) {\n\t\t\tif (agent.getParentAgentId()!=null && !agent.getParentAgentId().isEmpty()) {\n\t\t\t\tedge = new EdgePojo();\n\t\t\t\tedge.setSource(agent.getEntityId());\n\t\t\t\tedge.setTarget(agent.getParentAgentId());\n\t\t\t\t\n\t\t\t\tif (!edges.contains(edge) && nodeIds.contains(edge.getSource()) && nodeIds.contains(edge.getTarget())) {\n\t\t\t\t\tedges.add(edge);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tGraphPojo graph = new GraphPojo();\n\t\tgraph.setNodes(nodes);\n\t\tgraph.setEdges(edges);\n\t\t\n\t\treturn graph;\t\t\n\t}",
"private void transplant(Node u, Node v) {\n\t\tif (u.getParent() == mSentinel) {// if u is the root\n\t\t\tthis.mRoot = v;// simply make v the root\n\t\t} else if (u == u.getParent().getLeftChild()) {// if u is a left child\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// then make v u's\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// parent's left child\n\t\t\tu.getParent().setLeftChild(v);\n\n\t\t} else {\n\t\t\tu.getParent().setrightChild(v);// otherwise u is a right child and\n\t\t\t\t\t\t\t\t\t\t\t// we should make v u's parent's\n\t\t\t\t\t\t\t\t\t\t\t// right child\n\t\t}\n\n\t\tif (v != mSentinel) {\n\t\t\tv.setParent(u.getParent());// and of course if v is not empty make\n\t\t\t\t\t\t\t\t\t\t// u's parent - v's parent\n\t\t}\n\t}",
"public static void traversals(Node node){\r\n System.out.println(\"Node Pre \" + node.data);\r\n for(Node child : node.children){\r\n System.out.println(\"Edge Pre \" + node.data + \"--\" + child.data);\r\n traversals(child);\r\n System.out.println(\"Edge Post \" + node.data + \"--\" + child.data);\r\n }\r\n System.out.println(\"Node Post \" + node.data);\r\n }",
"public interface DirectedGraph {\n\n /**\n * Set a graph label\n * @param label a graph label\n */\n void setGraphLabel(String label);\n\n /**\n * @return the graph label\n */\n String getGraphLabel();\n\n /**\n * Add a node in graph\n * @param node\n * @throws IllegalArgumentException if node is negative\n */\n void addNode(int node);\n\n /**\n * Associating metadata to node\n * @param node the node id\n * @param key the metadata key\n * @param value the metadata value\n */\n void addNodeMetadata(int node, String key, String value);\n\n /**\n * Get the value of the metadata associated with the given node\n * @param node the node to get metadata for\n * @param key the metadata key\n * @return the value or null if not found\n */\n String getNodeMetadataValue(int node, String key);\n\n /**\n * @return the node given the label or -1 if not found\n */\n int getNodeFromMetadata(String metadata);\n\n /**\n * Add an edge in graph from tail to head and return its index\n * @param tail predecessor node\n * @param head successor node\n * @return the edge id or -1 if already exists\n */\n int addEdge(int tail, int head);\n\n /**\n * Set an edge label\n * @param edge a edge id\n * @param label a node label\n */\n void setEdgeLabel(int edge, String label);\n\n /**\n * @return the edge label\n */\n String getEdgeLabel(int edge);\n\n /**\n * @return an array of graph nodes\n */\n int[] getNodes();\n\n /**\n * @return an array of graph edges\n */\n int[] getEdges();\n\n /**\n * @return the edge id from end points or -1 if not found\n */\n int getEdge(int tail, int head);\n\n /**\n * Get the incoming and outcoming edges for the given nodes\n * @param nodes the nodes\n * @return edge indices\n */\n int[] getEdgesIncidentTo(int... nodes);\n\n /**\n * Get the incoming edges to the given nodes\n * @param nodes the nodes\n * @return edge indices\n */\n int[] getInEdges(int... nodes);\n\n /**\n * Get the outcoming edges from the given nodes\n * @param nodes the nodes\n * @return edge indices\n */\n int[] getOutEdges(int... nodes);\n\n /**\n * @return the tail node of the given edge or -1 if not found\n */\n int getTailNode(int edge);\n\n /**\n * @return the head node of the given edge or -1 if not found\n */\n int getHeadNode(int edge);\n\n /**\n * @return true if node belongs to graph else false\n */\n boolean containsNode(int node);\n\n /**\n * @return true if edge belongs to graph else false\n */\n boolean containsEdge(int edge);\n\n /**\n * @return true if tail -> head edge belongs to graph else false\n */\n boolean containsEdge(int tail, int head);\n\n /**\n * @return ancestors of the given node\n */\n int[] getAncestors(int node);\n\n /**\n * @return descendants of the given node\n */\n int[] getDescendants(int node);\n\n /**\n * @return descendants of the given node\n */\n int[] getDescendants(int node, int maxDepth);\n\n /**\n * @return true if queryDescendant is a descendant of queryAncestor\n */\n boolean isAncestorOf(int queryAncestor, int queryDescendant);\n\n /**\n * @return the predecessors of the given node\n */\n int[] getPredecessors(int node);\n\n /**\n * @return the successors of the given node\n */\n int[] getSuccessors(int node);\n\n /**\n * @return the number of head ends adjacent to the given node\n */\n int getInDegree(int node);\n\n /**\n * @return the number of tail ends adjacent to the given node\n */\n int getOutDegree(int node);\n\n /**\n * @return the sources (indegree = 0) of the graph\n */\n int[] getSources();\n\n /**\n * @return the sinks (outdegree = 0) of the graph\n */\n int[] getSinks();\n\n /**\n * @return the subgraph of this graph composed of given nodes\n */\n DirectedGraph calcSubgraph(int... nodes);\n\n /**\n * @return the total number of graph nodes\n */\n default int countNodes() {\n\n return getNodes().length;\n }\n\n /**\n * @return the total number of graph edges\n */\n default int countEdges() {\n\n return getEdges().length;\n }\n\n /**\n * @return true if queryDescendant is a descendant of queryAncestor\n */\n default boolean isDescendantOf(int queryDescendant, int queryAncestor) {\n\n return isAncestorOf(queryAncestor, queryDescendant);\n }\n\n default boolean isSource(int node) {\n return getInDegree(node) == 0 && getOutDegree(node) > 0;\n }\n\n default boolean isSink(int node) {\n return getInDegree(node) > 0 && getOutDegree(node) == 0;\n }\n\n /**\n * The height of a rooted tree is the length of the longest downward path to a leaf from the root.\n *\n * @return the longest path from the root or -1 if it is not a tree\n */\n default int calcHeight() throws NotATreeException {\n\n int[] roots = getSources();\n\n if (roots.length == 0) {\n throw new NotATreeException();\n }\n\n class WrappedCalcLongestPath {\n private int calcLongestPath(int node, TIntList path) throws CycleDetectedException {\n\n if (!containsNode(node)) {\n throw new IllegalArgumentException(\"node \"+ node + \" was not found\");\n }\n\n if (isSink(node)) {\n return path.size()-1;\n }\n\n TIntList lengths = new TIntArrayList();\n for (int edge : getOutEdges(node)) {\n\n int nextNode = getHeadNode(edge);\n\n TIntList newPath = new TIntArrayList(path);\n newPath.add(nextNode);\n\n if (path.contains(nextNode)) {\n throw new CycleDetectedException(newPath);\n }\n\n lengths.add(calcLongestPath(nextNode, newPath));\n }\n\n return lengths.max();\n }\n }\n\n // it is ok if there are multiple roots (see example of enzyme-classification-cv where it misses the root that\n // connect children EC 1.-.-.-, EC 2.-.-.-, ..., EC 6.-.-.-)\n /*if (roots.length > 1) {\n throw new NotATreeMultipleRootsException(roots);\n }*/\n\n return new WrappedCalcLongestPath().calcLongestPath(roots[0], new TIntArrayList(new int[] {roots[0]}));\n }\n\n class NotATreeException extends Exception {\n\n public NotATreeException() {\n\n super(\"not a tree\");\n }\n }\n\n class NotATreeMultipleRootsException extends NotATreeException {\n\n private final int[] roots;\n\n public NotATreeMultipleRootsException(int[] roots) {\n\n super();\n this.roots = roots;\n }\n\n @Override\n public String getMessage() {\n\n return super.getMessage() + \", roots=\" + Arrays.toString(this.roots);\n }\n }\n\n class CycleDetectedException extends NotATreeException {\n\n private final TIntList path;\n\n public CycleDetectedException(TIntList path) {\n\n super();\n\n this.path = path;\n }\n\n @Override\n public String getMessage() {\n\n return super.getMessage() + \", path=\" + this.path;\n }\n }\n}",
"private void dfsVisit(Node node) {\n\t\tStack<Node>stack = new Stack<>();\r\n\t\tstack.push(node); //add source node to queue\r\n\t\twhile(!stack.isEmpty()) {\r\n\t\t\tNode presentNode = stack.pop();\r\n\t\t\tpresentNode.setVisited(true);\r\n\t\t\tSystem.out.print(presentNode.getName()+\" \");\r\n\t\t\tfor(Node neighbor: presentNode.getNeighbors()) { //for each neighbor of present node\r\n\t\t\t\tif(!neighbor.isVisited()) { //if neighbor is not visited then add it to queue\r\n\t\t\t\t\tstack.push(neighbor);\r\n\t\t\t\t\tneighbor.setVisited(true);\r\n\t\t\t\t}\r\n\t\t\t}//end of for loop\r\n\t\t}//end of while loop\r\n\t\t\r\n\t}",
"private DirectedGraph<State, UniqueEdge> getGraph() {\r\n \t\tDirectedGraph<State, UniqueEdge> graph = new DirectedMultigraph<State, UniqueEdge>(\r\n \t\t\t\tUniqueEdge.class);\r\n \t\tfor (State source : states.values()) {\r\n \t\t\tgraph.addVertex(source);\r\n \t\t\tint index = source.getIndex();\r\n \t\t\tTransition transition = transitions.get(index);\r\n \t\t\tList<NextStateInfo> nextState = transition.getNextStateInfo();\r\n \t\t\tfor (NextStateInfo info : nextState) {\r\n \t\t\t\tState target = info.getTargetState();\r\n \t\t\t\tgraph.addVertex(target);\r\n \t\t\t\tgraph.addEdge(source, target, new UniqueEdge(info.getAction()));\r\n \t\t\t}\r\n \t\t}\r\n \r\n \t\treturn graph;\r\n \t}",
"private void resolverBFS() {\n\t\tQueue<Integer> cola = new LinkedList<Integer>();\n\t\tint[] vecDistancia = new int[nodos.size()];\n\t\tfor (int i = 0; i < vecDistancia.length; i++) {\n\t\t\tvecDistancia[i] = -1;\n\t\t\trecorrido[i] = 0;\n\t\t}\n\t\tint nodoActual = 0;\n\t\tcola.add(nodoActual);\n\t\tvecDistancia[nodoActual] = 0;\n\t\trecorrido[nodoActual] = -1;\n\t\twhile (!cola.isEmpty()) {\n\t\t\tif (tieneAdyacencia(nodoActual, vecDistancia)) {\n\t\t\t\tfor (int i = 1; i < matrizAdyacencia.length; i++) {\n\t\t\t\t\tif (matrizAdyacencia[nodoActual][i] != 99 && vecDistancia[i] == -1) {\n\t\t\t\t\t\tcola.add(i);\n\t\t\t\t\t\tvecDistancia[i] = vecDistancia[nodoActual] + 1;\n\t\t\t\t\t\trecorrido[i] = nodoActual;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tcola.poll();\n\t\t\t\tif (!cola.isEmpty()) {\n\t\t\t\t\tnodoActual = cola.peek();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"private void doDdpOrientation(Graph graph, Node l, Node a, Node b, Node c) {\n changeFlag = true;\n for (IonIndependenceFacts iif : separations) {\n if ((iif.getX().equals(l) && iif.getY().equals(c)) ||\n iif.getY().equals(l) && iif.getX().equals(c)) {\n for (List<Node> condSet : iif.getZ()) {\n if (condSet.contains(b)) {\n graph.setEndpoint(c, b, Endpoint.TAIL);\n discrimGraphs.add(graph);\n return;\n }\n }\n break;\n }\n }\n Graph newGraph1 = new EdgeListGraph(graph);\n newGraph1.setEndpoint(a, b, Endpoint.ARROW);\n newGraph1.setEndpoint(c, b, Endpoint.ARROW);\n discrimGraphs.add(newGraph1);\n Graph newGraph2 = new EdgeListGraph(graph);\n newGraph2.setEndpoint(c, b, Endpoint.TAIL);\n discrimGraphs.add(newGraph2);\n }",
"public void makeWeakRepresentative() {\n\t\t\tif (mPrimaryEdge == null) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t// hash map from store indices we have seen on the primary path to the previous destination/new source of\n\t\t\t// the primary edge (or in other words, to the new candidate for weak-i equivalence class).\n\t\t\tfinal HashMap<CCTerm, ArrayNode> seenStores = new HashMap<CCTerm, ArrayNode>();\n\t\t\t// for each index, the information about secondary edge that we later need to invert.\n\t\t\tfinal HashMap<CCTerm, ArrayNode> todoSecondary = new HashMap<CCTerm, ArrayNode>();\n\t\t\tfinal HashMap<CCTerm, CCAppTerm> todoSecondaryStores = new HashMap<CCTerm, CCAppTerm>();\n\t\t\t// the select information for the new root node.\n\t\t\tfinal HashMap<CCTerm, CCAppTerm> newSelectMap = new HashMap<CCTerm, CCAppTerm>();\n\t\t\tArrayNode node = this;\n\t\t\tArrayNode prev = null;\n\t\t\tCCAppTerm prevStore = null;\n\t\t\twhile (node.mPrimaryEdge != null) {\n\t\t\t\t// invert the last primary edge\n\t\t\t\tfinal ArrayNode next = node.mPrimaryEdge;\n\t\t\t\tfinal CCAppTerm nextStore = node.mPrimaryStore;\n\t\t\t\tnode.mPrimaryEdge = prev;\n\t\t\t\tnode.mPrimaryStore = prevStore;\n\n\t\t\t\tfinal CCTerm index = getIndexFromStore(nextStore).getRepresentative();\n\t\t\t\tfinal ArrayNode old = seenStores.put(index, next);\n\t\t\t\tif (old == node) {\n\t\t\t\t\t// the node is in the middle of two consecutive stores on the same\n\t\t\t\t\t// index. There is no need to move the secondary information\n\t\t\t\t\t// around.\n\t\t\t\t\t//\n\t\t\t\t\t// This branch is intentionally left empty!\n\t\t\t\t} else if (node.mSecondaryEdge != null) { //NOPMD\n\t\t\t\t\tif (old == null) {\n\t\t\t\t\t\t// we have to invert the secondary edge in the end, but\n\t\t\t\t\t\t// we should wait until the inversion of the primary edges\n\t\t\t\t\t\t// is completed.\n\t\t\t\t\t\ttodoSecondary.put(index, node.mSecondaryEdge);\n\t\t\t\t\t\ttodoSecondaryStores.put(index, node.mSecondaryStore);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// insert the secondary edge of node into old node. The reasoning is that\n\t\t\t\t\t\t// the old node is connected using only primary edges on different indices, so it has\n\t\t\t\t\t\t// the same weak-i representative as node.\n\t\t\t\t\t\tassert (getIndexFromStore(old.mPrimaryStore).getRepresentative() == index);\n\t\t\t\t\t\tassert (old.mSecondaryEdge == null);\n\t\t\t\t\t\told.mSecondaryEdge = node.mSecondaryEdge;\n\t\t\t\t\t\told.mSecondaryStore = node.mSecondaryStore;\n\t\t\t\t\t}\n\t\t\t\t\tnode.mSecondaryEdge = null;\n\t\t\t\t\tnode.mSecondaryStore = null;\n\t\t\t\t} else if (!node.mSelects.isEmpty()) {\n\t\t\t\t\tif (old == null) {\n\t\t\t\t\t\t// assertion holds, because index was not in seenStores.\n\t\t\t\t\t\tassert node.mSelects.get(index) != null;\n\t\t\t\t\t\t// we need to move the select information into the new root node.\n\t\t\t\t\t\tnewSelectMap.put(index, node.mSelects.get(index)); \n\t\t\t\t\t} else {\n\t\t\t\t\t\t// old is weak-i equivalent to node and can be used as new weak-i representative.\n\t\t\t\t\t\told.mSelects = node.mSelects;\n\t\t\t\t\t}\n\t\t\t\t\tnode.mSelects = Collections.emptyMap();\n\t\t\t\t}\n\n\t\t\t\tprev = node;\n\t\t\t\tnode = next;\n\t\t\t\tprevStore = nextStore;\n\t\t\t}\n\t\t\tnode.mPrimaryEdge = prev;\n\t\t\tnode.mPrimaryStore = prevStore;\n\t\t\tmConstTerm = node.mConstTerm;\n\t\t\tnode.mConstTerm = null;\n\t\t\tfinal Map<CCTerm, CCAppTerm> rootSelects = node.mSelects;\n\t\t\tnode.mSelects = Collections.emptyMap();\n\t\t\tfor (final Entry<CCTerm, ArrayNode> entry : seenStores.entrySet()) {\n\t\t\t\t// The seen stores get the new representatives of their weak-i equivalence groups\n\t\t\t\tfinal CCTerm index = entry.getKey();\n\t\t\t\tfinal CCAppTerm select = rootSelects.remove(index);\n\t\t\t\tif (select != null) {\n\t\t\t\t\tentry.getValue().mSelects = \n\t\t\t\t\t\tCollections.singletonMap(index, select);\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Now invert the secondary edges\n\t\t\tfor (final Entry<CCTerm, ArrayNode> entry : todoSecondary.entrySet()) {\n\t\t\t\tfinal CCTerm index = entry.getKey();\n\t\t\t\tArrayNode dest = entry.getValue();\n\t\t\t\tdest = dest.findSecondaryNode(index);\n\t\t\t\tif (dest.mSecondaryEdge != null) {\n\t\t\t\t\tdest.makeWeakIRepresentative();\n\t\t\t\t}\n\t\t\t\tdest.mSecondaryEdge = this;\n\t\t\t\tdest.mSecondaryStore = todoSecondaryStores.get(index);\n\t\t\t\tnewSelectMap.putAll(dest.mSelects);\n\t\t\t\tdest.mSelects = Collections.emptyMap();\n\t\t\t}\n\t\t\tnewSelectMap.putAll(rootSelects);\n\t\t\tmSelects = newSelectMap;\n\t\t}",
"public static void main(String[] args) {\n\n BDNode a = new BDNode(\"A\");\n BDNode b = new BDNode(\"B\");\n BDNode c = new BDNode(\"C\");\n BDNode d = new BDNode(\"D\");\n BDNode e = new BDNode(\"E\");\n\n a.link(b);\n a.link(d);\n b.link(a);\n b.link(c);\n b.link(e);\n c.link(b);\n c.link(d);\n d.link(a);\n d.link(c);\n d.link(e);\n e.link(b);\n e.link(d);\n\n BDNode target = e;\n\n/*\n // BFS\n Queue<BDNode> queue = new LinkedList<>();\n queue.offer(a);\n\n while(!queue.isEmpty()) {\n BDNode n = queue.poll();\n n.visit();\n System.out.println(n); // 찾는 여정 출력\n\n if(n.equals(target)) {\n System.out.println(\"BFS Found! \" + n);\n break;\n }\n\n for (BDNode l : n.links) {\n if(l.isVisited()) continue;\n if (queue.contains(l)) continue;\n queue.offer(l);\n }\n\n // 위랑 같은 표현\n// n.links.stream()\n// .filter(l -> !queue.contains(l))\n// .forEach(queue::offer);\n }\n*/\n\n // DFS\n Stack<BDNode> stack = new Stack<>();\n stack.push(a);\n\n while(!stack.isEmpty()) {\n BDNode n = stack.pop();\n n.visit();\n System.out.println(n); // 찾는 여정 출력\n\n if (n.equals(target)) {\n System.out.println(\"DFS Found! \" + n);\n break;\n }\n\n for (BDNode l : n.links) {\n if (l.isVisited()) continue;\n if (stack.contains(l)) continue;\n\n stack.push(l);\n }\n }\n\n\n }",
"private void dfs(int vertex, int parent, int currentE) {\n System.out.println(\"Going from \" + parent + \" to \" + vertex);\n currentE++;\n assert g.isDirected();\n if (!lowLink.containsKey(vertex)) {\n lowLink.put(vertex, currentE);\n } else {\n if (parent >= 0) {\n if (lowLink.get(vertex) < lowLink.get(parent)) { //We've been there\n lowLink.put(parent, lowLink.get(vertex));\n }\n }\n return;\n }\n\n //Remove backward edge\n g.removeEdge(vertex, parent);\n\n for (var head : g.getHeads(vertex)) {\n dfs(head, vertex, currentE);\n if (lowLink.get(head) < lowLink.get(vertex)) {\n lowLink.put(vertex, lowLink.get(head));\n }\n // Apply bridge criteria:\n // lowlink(head) > e(tail)\n if (lowLink.get(head) > currentE) {\n bridges.add(new Graph.Edge(vertex, head));\n }\n }\n }",
"@Override\n\tpublic graph copy() {\n\t\tgraph copy = new DGraph();\n\t\tCollection<node_data> nColl = this.GA.getV();\n\t\tfor (node_data node : nColl) {\n\t\t\tnode_data temp = new Node((Node) node );\n\t\t\tcopy.addNode(node);\n\t\t}\n\t\tCollection<node_data> nColl2 = this.GA.getV();\n\t\tfor (node_data node1 : nColl2) {\n\t\t\tCollection<edge_data> eColl = this.GA.getE(node1.getKey());\n\t\t\tif (eColl!=null) {\n\t\t\t\tfor (edge_data edge : eColl) {\n\t\t\t\t\tcopy.connect(edge.getSrc(), edge.getDest(), edge.getWeight());\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn copy;\n\t}",
"public static void main(String[] args) {\n\t\tint[][] edges = {{0,1},{1,2},{1,3},{4,5}};\n\t\tGraph graph = createAdjacencyList(edges, true);\n\t\tSystem.out.println(\"Number of connected graphs(Adjacency List) unDirected : \"+getNumberOfConnectedComponents(graph));\n\t\tSystem.out.println(\"Number of connected graphs(Adjacency List) Directed: \"+getNumberOfConnectedComponents(createAdjacencyList(edges, false)));\n\t\t\n\t\t//Shortest Distance & path\n\t\tint[][] edgesW = {{0,1,1},{1,2,4},{2,3,1},{0,3,3},{0,4,1},{4,3,1}};\n\t\tgraph = createAdjacencyList(edgesW, true);\n\t\tSystem.out.println(\"Shortest distance : \"+ getShortestDistance(graph, 0, 3));\n\t\t\n\t\t//Graph represented in Adjacency Matrix\n\t\tint[][] adjacencyMatrix = {{0,1,0,0,1,0},{1,0,1,1,0,0},{0,1,0,1,0,0},{0,1,0,0,0,0},{0,0,0,0,0,0},{0,0,0,0,0,0}};\n\t\t\n\t\t// Connected components or Friends circle\n\t\tSystem.out.println(\"Number of connected graphs(Adjacency Matrix) unDirected Recursive: \"+getNumberOfConnectedComponents(adjacencyMatrix));\n\t\tSystem.out.println(\"Number of connected graphs(Adjacency Matrix) unDirected Iterative: \"+getNumberOfConnectedComponents(adjacencyMatrix));\n\n\t\tSystem.out.println(\"Shortest distance : \"+ getShortestDistance(adjacencyMatrix, 0, 3));\n\t\t\n\t\t// Number of Islands\n\t\tint[][] islandGrid = {{1,1,0,1},{0,1,0,0},{0,0,1,1},{0,1,1,0}};\n\t\tSystem.out.println(\"Number of islands Recursive: \"+ getNumberOfIslands(islandGrid));\n\t\t// re-initialize\n\t\tint[][] islandGridIterative = {{1,1,0,0},{0,1,0,0},{0,0,1,1},{0,1,1,0}};\n\t\tSystem.out.println(\"Number of islands Iterative: \"+ getNumberOfIslandsIterative(islandGridIterative));\n\n\n\t}",
"Set<String> dfsTraversal(Graph graph, String root) {\n Set<String> seen = new LinkedHashSet<String>();\n Stack<String> stack = new Stack<String>();\n stack.push(root);\n\n while (!stack.isEmpty()) {\n String node = stack.pop();\n if (!seen.contains(node)) {\n seen.add(node);\n for (Node n : graph.getAdjacentNodes(node)) {\n stack.push(n.data);\n }\n\n }\n }\n\n return seen;\n }",
"public interface IUndirectedGraph extends IGraph{\n\n /**\n * Check the presence of an edge between two nodes.\n *\n * @param x the source node\n * @param y the destination node\n * @return true if there is an edge between x and y\n */\n default boolean isEdge(int x, int y) {\n return getNeighbors(x).contains(y);\n }\n\n /**\n * Remove the edge between two nodes if exist.\n * @param x the source node\n * @param y the destination node\n */\n void removeEdge(int x, int y);\n\n /**\n * Add an edge between two nodes, if not already present.\n * The two nodes must be distincts.\n * @param x the source node\n * @param y the destination node\n */\n void addEdge(int x, int y);\n\n /**\n * Get the neighboors of a node\n * @param x the node\n * @return a new int array representing the neighbors\n */\n List<Integer> getNeighbors(int x);\n\n @Override\n default int[][] getGraph() {\n int order = getOrder();\n int[][] adjencyMatrix = new int[order][order];\n for (int i = 0; i < order; i++) {\n List<Integer> succ = getNeighbors(i);\n for (Integer s : succ) {\n adjencyMatrix[i][s] = 1;\n }\n }\n return adjencyMatrix;\n }\n\n @Override\n default boolean isDirected(){\n return false;\n }\n}",
"public void dft() {\r\n\t\tHashMap<String, Boolean> processed = new HashMap<>();\r\n\t\tLinkedList<Pair> stack = new LinkedList<>();\r\n\r\n\t\tArrayList<String> vnames = new ArrayList<>(vces.keySet());\r\n\t\tfor (String vname : vnames) {\r\n\t\t\tif (processed.containsKey(vname)) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\tPair rootpair = new Pair(vname, vname);\r\n\t\t\tstack.addFirst(rootpair);\r\n\t\t\twhile (stack.size() != 0) {\r\n\t\t\t\t// 1. removeFirst\r\n\t\t\t\tPair rp = stack.removeFirst();\r\n\r\n\t\t\t\t// 2. check if processed, mark if not\r\n\t\t\t\tif (processed.containsKey(rp.vname)) {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\tprocessed.put(rp.vname, true);\r\n\r\n\t\t\t\t// 3. Check, if an edge is found\r\n\t\t\t\tSystem.out.println(rp.vname + \" via \" + rp.psf);\r\n\r\n\t\t\t\t// 4. Add the unprocessed nbrs back\r\n\t\t\t\tArrayList<String> nbrnames = new ArrayList<>(rp.vtx.nbrs.keySet());\r\n\t\t\t\tfor (String nbrname : nbrnames) {\r\n\t\t\t\t\tif (!processed.containsKey(nbrname)) {\r\n\t\t\t\t\t\tPair np = new Pair(nbrname, rp.psf + nbrname);\r\n\t\t\t\t\t\tstack.addFirst(np);\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}",
"public void updateOriginal() {\n for (Node node : originalGraph.nodes()) {\n mirrorAttributesToOriginal(node);\n }\n for (Edge edge : originalGraph.edges()) {\n mirrorAttributesToOriginal(directEdgeMap.get(edge));\n }\n }",
"public static void main(String[] args) {\n\n\t\tScanner sc = new Scanner(System.in);\n\t\tint V = sc.nextInt();\n\t\tint E = sc.nextInt();\n\n\t\tList<Integer>[]adjList = new ArrayList[10010];\n\t\tList<Integer>[]reverseAdjList = new ArrayList[10010];\n\n\t\tList<List<Integer>>scc = new ArrayList<List<Integer>>();\n\t\tint visited[] = new int[10010];\n\n\t\tfor(int i = 1 ; i <= V ; i++){\n\t\t\tadjList[i] = new ArrayList<Integer>();\n\t\t\treverseAdjList[i] = new ArrayList<Integer>();\n\t\t}\n\n\t\tfor(int i = 1 ; i <= E ; i++){\n\n\t\t\tint start = sc.nextInt();\n\t\t\tint end = sc.nextInt();\n\t\t\tadjList[start].add(end);\n\t\t\treverseAdjList[end].add(start);\n\t\t}\n\n\n\t\t//선작업 DFS 스택에 담음.\n\t\tStack <Integer>stack = new Stack<Integer>();\n\t\tfor(int i = 1 ; i <= V ; i++){\n\t\t\tif(visited[i] == 0){\n\t\t\t\tdfs(i,visited,stack,adjList);\n\t\t\t}\n\t\t}\n\n\n\t\t//후작업 역 DFS\n\t\tvisited = new int[10010];\n\n\t\tint r = 0;\n\t\twhile(!stack.isEmpty()){\n\n\t\t\tint here = stack.peek();\n\t\t\tstack.pop();\n\t\t\tif(visited[here] == 1){\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tscc.add(new ArrayList<Integer>());\n\t\t\t++r;\n\t\t\treverseDFS(here, r-1, visited, scc, reverseAdjList);\n\n\t\t}\n\n\t\tSystem.out.println(r);\n\t\tfor(int i = 0 ; i < r ; i++){\n\t\t\tList <Integer>temp = scc.get(i);\n\t\t\tCollections.sort(temp);\n\t\t}\n\n\t\tscc.sort(new Comparator<List<Integer>>() {\n\t\t\t@Override\n\t\t\tpublic int compare(List<Integer> o1, List<Integer> o2) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tif(o1.get(0)< o2.get(0)){\n\t\t\t\t\treturn -1;\n\t\t\t\t}else if(o1.get(0) > o2.get(0)){\n\t\t\t\t\treturn 1;\n\t\t\t\t}\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t});\n\n\t\t\tfor(List <Integer>list : scc){\n\t\t\t\tfor(int i = 0 ; i < list.size() ; i++){\n\t\t\t\t\tSystem.out.print(list.get(i) + \" \");\n\t\t\t\t}\n\t\t\t\tSystem.out.println(\"-1\");\n\t\t\t}\n\n\t}",
"public void setGraph(Graph<V,E> graph);",
"public AbstractGraph<V>.Tree dfs(int v);",
"public AbstractGraph<V>.Tree dfs(int v);",
"private KeyedGraph<VWBetw, Edge> prepareGraph(final DataSet edges) {\n KeyedGraph<VWBetw, Edge> graph;\n \n // Get the graph orientation.\n int graphType = -1;\n if (globalOrientation != null) {\n graphType = globalOrientation.equalsIgnoreCase(DIRECTED)\n ? GraphSchema.DIRECT\n : globalOrientation.equalsIgnoreCase(REVERSED)\n ? GraphSchema.DIRECT_REVERSED\n : globalOrientation.equalsIgnoreCase(UNDIRECTED)\n ? GraphSchema.UNDIRECT\n : -1;\n } else if (graphType == -1) {\n LOGGER.warn(\"Assuming a directed graph.\");\n graphType = GraphSchema.DIRECT;\n }\n \n // Create the graph.\n if (weightsColumn != null) {\n graph = new WeightedGraphCreator<VWBetw, Edge>(\n edges,\n graphType,\n edgeOrientationColumnName,\n VWBetw.class,\n Edge.class,\n weightsColumn).prepareGraph();\n } else {\n throw new UnsupportedOperationException(\n \"ST_Distance has not yet been implemented for \"\n + \"unweighted graphs.\");\n }\n return graph;\n }",
"public void dfs()\n{\n Stack s=new Stack();\n s.push(this.rootNode);\n rootNode.visited=true;\n printNode(rootNode);\n while(!s.isEmpty())\n {\n Node n=(Node)s.peek();\n Node child=getUnvisitedChildNode(n);\n if(child!=null)\n {\n child.visited=true;\n printNode(child);\n s.push(child);\n }\n else\n {\n s.pop();\n }\n }\n //Clear visited property of nodes\n clearNodes();\n}",
"public void reinitialiserLeControleurGraphique()\n\t{\n\t\tthis.unControleur = new ControleurGraphique(this);\n\t}",
"public static void main(String[] args) {\r\n\t\tgraphUndir G = new graphUndir();\r\n\t\tString str = \"abcd\";\r\n\t\tchar[] ch = str.toCharArray();\r\n\t\tVertex[] nd = new Vertex[ch.length];\r\n\t\tfor (int i = 0; i < ch.length; i++) {\r\n\t\t\tnd[i] = new Vertex(ch[i]);\r\n\t\t\tG.AddVertex(nd[i]);\r\n\t\t}\r\n\t\tG.AddEdge(nd[0], nd[2]);\r\n\t\tG.AddEdge(nd[0], nd[1]);\r\n\t\tG.AddEdge(nd[1], nd[2]);\r\n\t\tG.AddEdge(nd[3], nd[1]);\r\n\r\n\t\t/* prints the graph before function */\r\n\t\tSystem.out.println(\"graph before:\");\r\n\t\tG.PrintG();\r\n\r\n\t\t/* Sending to function */\r\n\t\tMakeDirectedNoCycle(G);\r\n\r\n\t\t/* prints the graph after function */\r\n\t\tSystem.out.println();\r\n\t\tSystem.out.println(\"graph after:\");\r\n\t\tG.PrintG();\r\n\r\n\t}",
"public static void convertToWebgraphUndirected() {\n\t\tObjectArrayList<File> list = Utilities.getUndirectedGraphList(LoadMethods.ASCII);\n\t\tUtilities.outputLine(\"Converting \" + list.size() + \" undirected graphs...\", 1);\n\n\t\tint k = 0;\n\t\tfor (File f : list) {\n\t\t\t\n\t\t\tgraph.Undir g = Undir.load(f.getPath(), GraphTypes.ADJLIST, LoadMethods.ASCII);\n\t\t\tString output = \"Undirected/\" + f.getName();\n\n\t\t\tif (output.lastIndexOf('.') >= 0) {\n\t\t\t\toutput = output.substring(0, output.lastIndexOf('.'));\n\t\t\t}\n\t\t\tUtilities.output(++k + \" - \" + f.getPath(), 1);\n\t\t\tg.exportAsWebgraph(output);\n\t\t\tUtilities.outputLine(\" => \" + Utilities.webGraphPath + output, 1);\n\t\t}\n\t}",
"public void getAllPaths(Graph<Integer> graph) {\n\t\tTopologicalSort obj = new TopologicalSort();\r\n\t\tStack<Vertex<Integer>> result = obj.sort(graph);\r\n\t\t\r\n\t\t// source (one or multiple) must lie at the top\r\n\t\twhile(!result.isEmpty()) {\r\n\t\t\tVertex<Integer> currentVertex = result.pop();\r\n\t\t\t\r\n\t\t\tif(visited.contains(currentVertex.getId())) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tstack = new Stack<Vertex<Integer>>();\r\n\t\t\tSystem.out.println(\"Paths: \");\r\n\t\t\tvisited = new ArrayList<Long>();\r\n\t\t\tdfs(currentVertex);\r\n\t\t\t//System.out.println(stack);\r\n\t\t\t//GraphUtil.print(stack);\t\t\t\r\n\t\t}\r\n\r\n\t}",
"private void initGraph() {\n nodeMap = Maps.newIdentityHashMap();\n stream.forEach(t -> {\n Object sourceKey = sourceId.extractValue(t.get(sourceId.getTableId()));\n Object targetKey = targetId.extractValue(t.get(targetId.getTableId()));\n ClosureNode sourceNode = nodeMap.get(sourceKey);\n ClosureNode targetNode = nodeMap.get(targetKey);\n if (sourceNode == null) {\n sourceNode = new ClosureNode(sourceKey);\n nodeMap.put(sourceKey, sourceNode);\n }\n if (targetNode == null) {\n targetNode = new ClosureNode(targetKey);\n nodeMap.put(targetKey, targetNode);\n }\n sourceNode.next.add(targetNode);\n });\n\n }",
"public static void dfs(int a, Vertex [] v){\n assert !v[a].visited;\n\n v[a].visited = true;\n\n // traverse over all the outgoing edges\n\n for(int b : v[a].edges){\n v[b].d = Math.max(v[b].d , v[a].d + 1);\n v[b].in --;\n\n if(v[b].in == 0 && !v[b].visited){\n dfs(b,v);\n }\n }\n\n\n }",
"void detachFromGraphView();",
"public DirectedAcyclicGraphImpl() {\r\n super();\r\n topologicalsorting = new TopologicalSorting( this );\r\n }",
"public OrientGraph getGraph();",
"public static void complementaryGraph(mxAnalysisGraph aGraph) {\n ArrayList<ArrayList<mxCell>> oldConnections = new ArrayList<ArrayList<mxCell>>();\n mxGraph graph = aGraph.getGraph();\n Object parent = graph.getDefaultParent();\n //replicate the edge connections in oldConnections\n Object[] vertices = aGraph.getChildVertices(parent);\n int vertexCount = vertices.length;\n\n for (int i = 0; i < vertexCount; i++) {\n mxCell currVertex = (mxCell)vertices[i];\n int edgeCount = currVertex.getEdgeCount();\n mxCell currEdge = new mxCell();\n ArrayList<mxCell> neighborVertexes = new ArrayList<mxCell>();\n\n for (int j = 0; j < edgeCount; j++) {\n currEdge = (mxCell)currVertex.getEdgeAt(j);\n\n mxCell source = (mxCell)currEdge.getSource();\n mxCell destination = (mxCell)currEdge.getTarget();\n\n if (!source.equals(currVertex)) {\n neighborVertexes.add(j, source);\n }\n else {\n neighborVertexes.add(j, destination);\n }\n\n }\n\n oldConnections.add(i, neighborVertexes);\n }\n\n //delete all edges and make a complementary model\n Object[] edges = aGraph.getChildEdges(parent);\n graph.removeCells(edges);\n\n for (int i = 0; i < vertexCount; i++) {\n ArrayList<mxCell> oldNeighbors = new ArrayList<mxCell>();\n oldNeighbors = oldConnections.get(i);\n mxCell currVertex = (mxCell)vertices[i];\n\n for (int j = 0; j < vertexCount; j++) {\n mxCell targetVertex = (mxCell)vertices[j];\n boolean shouldConnect = true; // the decision if the two current vertexes should be connected\n\n if (oldNeighbors.contains(targetVertex)) {\n shouldConnect = false;\n }\n else if (targetVertex.equals(currVertex)) {\n shouldConnect = false;\n }\n else if (areConnected(aGraph, currVertex, targetVertex)) {\n shouldConnect = false;\n }\n\n if (shouldConnect) {\n graph.insertEdge(parent, null, null, currVertex, targetVertex);\n }\n }\n\n }\n }",
"void downgradeLastEdge();",
"public void buildGraph(){\n\t}",
"public List<Graph> createGraphs(Graph g) {\n List<Graph> gg = new ArrayList<>();\n Graph tmpG = g, tmp;\n\n boolean hasDisconnG = true;\n while (hasDisconnG) {\n // get one vertex as source vertex\n List<Vertex> vertexes = new ArrayList<>(tmpG.getVertices().values());\n calcSP(tmpG, vertexes.get(0));\n gg.add(tmpG);\n hasDisconnG = false;\n List<Vertex> vv = new ArrayList<>();\n for (Vertex v : tmpG.getVertices().values()) {\n if (v.minDistance == Double.POSITIVE_INFINITY) {\n // System.out.println(\"Vertex: \" + v.name + \", dist: \" + v.minDistance);\n vv.add(v);\n hasDisconnG = true;\n }\n }\n\n if (hasDisconnG) {\n tmp = new Graph();\n for (Vertex v: vv) {\n tmpG.removeVertex(v.name);\n for (Edge e: v.neighbours) {\n tmp.addEdge(v.name, e.target.name, 1);\n }\n }\n tmpG = tmp;\n }\n }\n return gg;\n }",
"public List<Integer> topologicalOrder(int vertices, int[][] edges) {\n\t\tList<Integer> result = new ArrayList<>();\n\n\t\tMap<Integer, List<Integer>> graph = new HashMap<>();\n\t\tMap<Integer, Integer> freqMap = new HashMap<>();\n\n\t\t// Initialize\n\t\tfor (int i = 0; i < vertices; ++i) {\n\t\t\tgraph.put(i, new ArrayList<>());\n\t\t\tfreqMap.put(i, 0);\n\t\t}\n\n\t\tfor (int i = 0; i < edges.length; ++i) {\n\t\t\tgraph.get(edges[i][0]).add(edges[i][1]);\n\t\t\tfreqMap.put(edges[i][1], freqMap.get(edges[i][1]) + 1);\n\t\t}\n\n\t\tList<Integer> sources = freqMap.entrySet().stream().filter(x -> x.getValue() == 0).map(y -> y.getKey())\n\t\t\t\t.collect(Collectors.toList());\n\n\t\tQueue<Integer> sourceQueue = new LinkedList<>(sources);\n\n\t\twhile (!sourceQueue.isEmpty()) {\n\t\t\tint source = sourceQueue.poll();\n\t\t\tresult.add(source);\n\t\t\tfor (int elem : graph.get(source)) {\n\t\t\t\tif (freqMap.get(elem) == 1) {\n\t\t\t\t\tsourceQueue.offer(elem);\n\t\t\t\t\tfreqMap.remove(elem);\n\t\t\t\t} else {\n\t\t\t\t\tfreqMap.put(elem, freqMap.get(elem) - 1);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// If length is not same, then there is a cycle\n\t\treturn result.size() == vertices ? result : new ArrayList<>();\n\t}",
"protected void merge(FlowGraphNode victim){\r\n for(FlowGraphNode node : victim.to){\r\n this.addTo(node);\r\n node.from.remove(victim);\r\n }\r\n for(FlowGraphNode node : victim.from){\r\n node.addTo(this);\r\n node.to.remove(victim);\r\n }\r\n }",
"private void dfsVisit(Node node, MyArrayList<Node> component) {\n Stack<Node> stack = new Stack<Node>();\n Node v = node;\n // while there are still nodes in the stack to be processed\n while (v != null) {\n if (v.getColor() == Color.WHITE) {\n t++;\n v.setD(t);\n v.setColor(Color.GRAY);\n // when we turn a vertex gray, we add it to the current component\n component.add(v);\n // we push this to the stack again and when we reach a gray vertex in the stack,\n // we know that all of its children have been processed and we can assign a finishing time\n stack.push(v);\n for (int i = 0; i < v.getAdjacencyList().size(); i++) {\n Node u = v.getAdjacencyList().get(i);\n if (u.getColor() == Color.WHITE) {\n u.setParent(v);\n stack.push(u);\n }\n }\n } else if (v.getColor() == Color.GRAY){\n // if the node in the stack is already gray, then we know we have finished all of its children\n // and it can be turned black\n t++;\n v.setF(t);\n v.setColor(Color.BLACK);\n }\n v = stack.pop();\n }\n }"
] |
[
"0.6376489",
"0.61228496",
"0.61034006",
"0.60403985",
"0.5880599",
"0.58292747",
"0.58237004",
"0.5719574",
"0.56614107",
"0.56604034",
"0.564279",
"0.5639879",
"0.56386477",
"0.55782753",
"0.5569513",
"0.5548388",
"0.5526129",
"0.5522277",
"0.55196863",
"0.543082",
"0.5408499",
"0.5398276",
"0.53928846",
"0.5388157",
"0.5381728",
"0.5379738",
"0.53730315",
"0.53612214",
"0.53510755",
"0.53463703",
"0.5341564",
"0.53415227",
"0.53182423",
"0.5309625",
"0.53063756",
"0.5296447",
"0.5291532",
"0.52814394",
"0.52670956",
"0.52648914",
"0.52636945",
"0.5241458",
"0.52241194",
"0.5221395",
"0.52050024",
"0.5194644",
"0.5194037",
"0.5176298",
"0.5173292",
"0.5172118",
"0.5164437",
"0.5163976",
"0.5162636",
"0.5161054",
"0.51521087",
"0.5134927",
"0.5132858",
"0.51313156",
"0.51259416",
"0.512184",
"0.5121285",
"0.5108007",
"0.5094504",
"0.50903916",
"0.50902194",
"0.50848335",
"0.5083096",
"0.50809675",
"0.50665176",
"0.5058874",
"0.50547135",
"0.50520784",
"0.50500554",
"0.5049907",
"0.5049439",
"0.504902",
"0.5039331",
"0.5039049",
"0.50385064",
"0.50374055",
"0.50324",
"0.50324",
"0.50244766",
"0.5020401",
"0.50183386",
"0.5006957",
"0.5005127",
"0.50050384",
"0.50031614",
"0.49994126",
"0.4998546",
"0.49868143",
"0.49832505",
"0.49785876",
"0.4977807",
"0.49777803",
"0.4975869",
"0.4975379",
"0.49744812",
"0.4972765"
] |
0.514109
|
55
|
/ Main method Contains the "game" loop
|
public static void main(String[] args) {
//Instantiate all variables
Random rand = new Random();
scan = new Scanner(System.in);
type = new String[]{"Modus Ponens", "Modus Tollens", "Process of Elimination", "Chain Rule", "Affirming the Consequent", "Denying the Antecedent", "Begging the Question"};
premise = new String[]{"I study hard", "you have a current password", "it is raining", "it is after 10PM", "the weather is nice", "the dog is barking", "the house is on fire", "you work hard", "you stay inside all day", "you participate in the race", "you take the new position"};
conclusion = new String[]{"I will get an A", "you can log on to the network", "the road will get wet", "the store will be closed", "Joe will take a walk", "the neighbors will get mad", "everything is ruined", "you will pass the test", "you will get the job", "long distance space travel is possibe", "the stock market will crash"};
auth = new String[]{"The boss says", "My father told me that", "According to the news", "According to the internet", "Scientists agree that", "Elon Musk assures us that", "It has been proven that"};
while(running) { // Main loop
try {
mode = "";
menu();
System.out.print("\nSelect argument: ");
String selection = scan.next();
System.out.print("\033[H\033[2J");
System.out.flush(); // clear the console
if(Integer.parseInt(selection) < 1 || Integer.parseInt(selection) > 8)
{
System.err.println("\nSelection must be within range\n");
}
else if(Integer.parseInt(selection) >= 1 && Integer.parseInt(selection) <= 7){
while(mode == ""){ // inner loop to ensure that proper input was entered
System.out.println("\nYou have selected: "+type[Integer.parseInt(selection)-1]);
System.out.print("\n1. Automatic:\n2. User input:\n\nSelect mode: ");
mode = scan.next();
if(Integer.parseInt(mode) != 1 && Integer.parseInt(mode) != 2) {
System.err.println("\nSelection must be within range\n");
mode = "";
end();
continue;
}
}
scan.nextLine(); // Clear the scanner for next input
}
else if(Integer.parseInt(selection) == 8) { // Quit
System.out.println("Goodbye");
System.exit(1);
}
else
System.err.println("You entered invalid input, please try again");
String autho = auth[rand.nextInt(auth.length)];
if(Integer.parseInt(mode) == 1)
auto = true;
else
auto = false;
if(Integer.parseInt(selection) == 1) { // Modus Ponens
String prem = "";
String conc = "";
if(auto){ // if Auto was selected
prem = premise[rand.nextInt(premise.length)];
conc = conclusion[rand.nextInt(conclusion.length)];
}else{ // if Manual was selected
System.out.print("\nEnter a premise: ");
prem = scan.nextLine();
System.out.print("\nEnter a conclusion: ");
conc = scan.nextLine();
}
System.out.println("\nGenerated argument: ");
System.out.println("\n\""+auth[rand.nextInt(auth.length)]+", if "+prem+", then "+conc+". " +prem+", therefore, "+conc+".\"");
end();
}
if(Integer.parseInt(selection) == 2){ // Modus Tollens
String prem = "";
String conc = "";
if(auto){ // if Auto was selected
prem = premise[rand.nextInt(premise.length)];
conc = conclusion[rand.nextInt(conclusion.length)];
}else{ // if Manual was selected
System.out.print("\nEnter a premise: ");
prem = scan.nextLine();
System.out.print("\nEnter a conclusion: ");
conc = scan.nextLine();
}
System.out.println("\nGenerated argument: ");
System.out.println("\n\""+auth[rand.nextInt(auth.length)]+", if "+prem+", then "+conc+". It is not the case that " +prem+", therefore, it is not the case that "+conc+".\"");
end();
}
if(Integer.parseInt(selection) == 3){ // Process of Elimination
int prem1int = rand.nextInt(premise.length);
int prem2int = rand.nextInt(premise.length);
String prem = "";
String prem2 = "";
if(auto){ // if Auto was selected
while(prem1int == prem2int){
prem2int = rand.nextInt(premise.length);
}
prem = premise[prem1int];
prem2 = premise[prem2int];
}else{ // if Manual was selected
System.out.print("\nEnter a premise: ");
prem = scan.nextLine();
System.out.print("\nEnter another premise: ");
prem2 = scan.nextLine();
}
System.out.println("\nGenerated argument: ");
int flip = rand.nextInt(2);
if(flip == 1){
System.out.println("\n\""+auth[rand.nextInt(auth.length)]+", it is either the case that "+prem+" or, "+prem2+". It is not the case that " +prem+", therefore, "+prem2+".\"");
}
else{
System.out.println("\"\n"+auth[rand.nextInt(auth.length)]+", it is either the case that "+prem+" or, "+prem2+". It is not the case that " +prem2+", therefore, "+prem+".\"");
}
end();
}
if(Integer.parseInt(selection) == 4){ // Chain rule
int prem1int = rand.nextInt(premise.length);
int prem2int = rand.nextInt(premise.length);
int prem3int = rand.nextInt(premise.length);
String prem = "";
String prem2 = "";
String prem3 = "";
if(auto){ // if Auto was selected
while(prem1int == prem3int){
prem2int = rand.nextInt(premise.length);
prem3int = rand.nextInt(premise.length);
}
prem = premise[prem1int];
prem2 = conclusion[prem2int];
prem3 = premise[prem3int];
}else{ // if Manual was selected
System.out.print("\nEnter a premise: ");
prem = scan.nextLine();
System.out.print("\nEnter another premise: ");
prem2 = scan.nextLine();
System.out.print("\nEnter one more premise: ");
prem3 = scan.nextLine();
}
System.out.println("\nGenerated argument: ");
System.out.println("\n\""+auth[rand.nextInt(auth.length)]+", if "+prem+", then "+prem2+". If "+prem2+", then "+prem3+". "+prem+", therefore, "+prem3+".\"");
end();
}
if(Integer.parseInt(selection) == 5){ // Affirming the Consequent
String prem = "";
String conc = "";
if(auto){ // if Auto was selected
prem = premise[rand.nextInt(premise.length)];
conc = conclusion[rand.nextInt(conclusion.length)];
}else{ // if Manual was selected
System.out.print("\nEnter a premise: ");
prem = scan.nextLine();
System.out.print("\nEnter a conclusion: ");
conc = scan.nextLine();
}
System.out.println("\nGenerated argument: ");
System.out.println("\n\""+auth[rand.nextInt(auth.length)]+", if "+prem+", then "+conc+". " +conc+", therefore, "+prem+".\"");
end();
}
if(Integer.parseInt(selection) == 6){ //Denying the Antecedent
String prem = "";
String conc = "";
if(auto){ // if Auto was selected
prem = premise[rand.nextInt(premise.length)];
conc = conclusion[rand.nextInt(conclusion.length)];
}else{ // if Manual was selected
System.out.print("\nEnter a premise: ");
prem = scan.nextLine();
System.out.print("\nEnter a conclusion: ");
conc = scan.nextLine();
}
System.out.println("\nGenerated argument: ");
System.out.println("\n\""+auth[rand.nextInt(auth.length)]+", if "+prem+", then "+conc+". It is not the case that " +conc+", therefore, it is not the case that "+prem+".\"");
end();
}
if(Integer.parseInt(selection) == 7){ // Begging the Question
String prem = "";
if(auto){ // if Auto was selected
prem = premise[rand.nextInt(premise.length)];
}else{ // if Manual was selected
System.out.print("\nEnter a premise: ");
prem = scan.nextLine();
}
System.out.println("\nGenerated argument: ");
System.out.println("\n\""+prem+", therefore, "+prem+".\"");
end();
}
}catch(Exception e) { // Handle any input errors here
System.err.println("\nPlease select a valid argument\n" + e.getMessage());
}
}
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public void run() {\n \twhile(true) {\n \t \tsetupGame();\n \tplayGame();\n \t}\n }",
"public static void main(String[] args) {\n boolean stillPlaying = true;\r\n // the boolean above passes through the while function, which will start \r\n // the method newGame()\r\n while(stillPlaying==true){\r\n // the stillPlaying may no longer still be equal to the newGame, as the \r\n // newGame may return a boolean stating false. That will close the loop, \r\n // stop the game, and print the results.\r\n stillPlaying = newGame(attempts);\r\n }\r\n }",
"public void run() {\n\t\tprepareVariables(true);\n\t\t\n\t\t// Prepares Map Tables for Song and Key Info.\n\t\tprepareTables();\n\t\t\n\t\t// Selects a Random Song.\n\t\tchooseSong(rgen.nextInt(0, songlist.size()-1));\n\t\t\n\t\t// Generates layout.\n\t\tgenerateLabels();\n\t\tgenerateLines();\n\t\t\n\t\t// Listeners\n\t\taddMouseListeners();\n\t\taddKeyListeners();\n\t\t\n\t\t// Game Starts\n\t\tplayGame();\n\t}",
"public void run()\n\t{\n\t\ttry \n\t\t{\n\t\t\twhile (lost != true)\n\t\t\t{\n\t\t\t\tSystem.out.print(\"\");\n\t\t\t\twhile (view.getInGamePanel().getGameStart() == true)\n\t\t\t\t{\n\t\t\t\t\tloop();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tcatch (Exception exception) \n\t\t{\n\t\t}\n\t}",
"public void run() {\n\t\t\n\t\t//* Initializing starting variables ** //\n\t\t\n\t\tturns = NTURNS;\n\t\tstartturn = true; \n\t\tgameover = false;\n\t\t\t\t\n\t\t//* setup game board** //\n\t\t\n\t\tturns--;\n\t\tsetupBricks();\n\t\tsetupPaddle();\n\t\tsetupScoreboard();\n\n\t\t\n\t\n\t\t//* play game** //\n\t\t\t\t\n\t\t\n\t\twhile (turns >= 0) {\n\t\t\t\n\t\t\tif (startturn == true) {\n\t\t\t\t// starttext = new GLabel(\"Click mouse to start turn\", WIDTH / 2, HEIGHT / 2);\n\t\t\t\t// add(starttext);\n\t\t\t\tupdateScoreboard();\n\t\t\t\tplayBall();\n\t\t\t\twaitForClick();\n\t\t\t\tstartturn = false;\n\t\t\t}\n\t\t\t\n\t\t\tcheckWalls();\n\t\t\tcheckCollision();\n\t\t\tmoveBall();\n\t\t\tcheckWin();\n\n\t\t}\n\t\tshowLose();\n\t\t\n\t}",
"public static void main(String[] args) {\n game();\n }",
"public static void main(String[] args) {\n Model model = new Model();\n View view = new View(model);\n Controller controller = new Controller(model, view);\n\n /*main program (each loop):\n -player token gets set\n -game status gets shown visually and user input gets requested\n -game grid gets updated\n -if the game is determined: messages gets shown and a system exit gets called*/\n while (model.turnCounter < 10) {\n model.setToken();\n view.IO();\n controller.update();\n if (controller.checker()){\n System.out.println(\"player \" + model.playerToken + \" won!\");\n System.exit(1);\n }\n System.out.println(\"draw\");\n }\n }",
"public static void main(String[] args) throws InterruptedException {\n runGame();\n System.out.println(\"Game has finished\");\n\n }",
"public void run() \r\n {\r\n // get the instance of the graphics object\r\n Graphics g = getGraphics();\r\n\r\n // The main game loop\r\n while(true) \r\n {\r\n GameUpdate(); // update game\r\n GameDraw(g); // draw game\r\n } \r\n }",
"public static void main(String[] args){\n Executor game = new Executor();\n\n System.out.println();\n System.out.println();\n game.introduction();\n\n while (! game.gameOver){\n game.day();\n\n if (! game.gameOver){\n wait(2000);\n game.endOfDay();\n }\n\n }\n\n }",
"public void runGame()\r\n\t{\r\n\t\tmainFrame.runGame();\r\n\t}",
"public void mainLoop() {\r\n while (isRunning()) {\r\n update();\r\n }\r\n }",
"@Override\r\n public int playGameLoop() {\r\n return 0;\r\n }",
"public static void main(String[] args) {\n init();\n\n //take input from the players before starting the game\n input();\n\n //the gameplay begins from here\n System.out.println();\n System.out.println();\n System.out.println(\"***** Game starts *****\");\n play();\n }",
"public void run() {\n\t\ttry {\n\t\t\tplayTheGame();\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\"Exiting the game Due to Error\" + e);\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"public void runGame() {\r\n\t\ttry {\r\n\t\t\thost.startNewGame(width, height, false);\r\n\t\t\tguest.startNewGame(width, height, true);\r\n\t\t\tnotifyStartGame(width, height);\r\n\t\t} catch(Exception e) {return;}\r\n\t\twhile(!game.isGameOver()) {\r\n\t\t\tcurrentPlayer = game.getCurrentPlayer();\r\n\t\t\tMove move;\r\n\t\t\ttry {\r\n\t\t\t\tmove = currentPlayer.getNextMove();\r\n\t\t\t} catch(Exception e) { return ;}\r\n\t\t\t\r\n\t\t\ttry {\r\n\t\t\t\tif(game.isValidMove(move)) {\r\n\t\t\t\t\tgame.registerMove(move);\r\n\t\t\t\t\thost.registerMove(move);\r\n\t\t\t\t\tguest.registerMove(move);\r\n\t\t\t\t\tnotifyMove(move);\r\n\t\t\t\t}\r\n\t\t\t} catch (IllegalMove e) { }\r\n\t\t\tcatch (Exception e) { return; }\r\n\t\t}\r\n\n\t\ttry {\r\n\t\t\thost.finishGame(game.getResult(host));\r\n\t\t\tguest.finishGame(game.getResult(guest));\r\n\t\t\tnotifyFinishGame(game.getResult(host));\r\n\t\t} catch( Exception e) { return; }\n\t}",
"public static void main(String[] args) {\n\t\tgame(1);\r\n\t}",
"public static void main(String[] args) {\n // TODO code application logic here\n //play();//This method will start the 20 minute battle scene music\n gameplay = true;\n while(gameplay) {\n /*#extra credit made a separate class and music selector below:*/\n Luong_7_audioclass pl = new Luong_7_audioclass();//this is how to use classes, pl._ to start the methods\n pl.soundsystem_commands();//this is the object used to call upon the public method sound system\n intro();//starts the game \n } \n }",
"public static void main(String[] args) \r\n\t{\n\t\t\r\n\t\tboolean playing = false;\r\n\t\t\r\n\t\twhile(true)\r\n\t\t{\r\n\t\t\tString option = menu();\r\n\t\t\t\r\n\t\t\tSystem.out.println(\"\\n\\n\\n\\n\\n\\n\");\r\n\t\t\t\r\n\t\t\tif(option.equals(\"1\"))\r\n\t\t\t{\r\n\t\t\t\tcreateGame();\r\n\t\t\t\tplaying = true;\r\n\t\t\t}\r\n\t\t\telse if(option.equals(\"2\"))\r\n\t\t\t{\r\n\t\t\t\tcontinueGame();\r\n\t\t\t\tplaying = true;\r\n\t\t\t}\r\n\t\t\telse if(option.equals(\"3\"))\r\n\t\t\t{\r\n\t\t\t\tdeleteGames();\r\n\t\t\t}\r\n\t\t\telse if(option.equals(\"4\"))\r\n\t\t\t{\r\n\t\t\t\tGameManager.instance().viewHallOfFame();\r\n\t\t\t\tinput.nextLine();\r\n\t\t\t}\r\n\t\t\telse if(option.equals(\"5\"))\r\n\t\t\t{\r\n\t\t\t\tSystem.out.println(\"Thanks for playing Rogue Lands\");\r\n\t\t\t\t\r\n\t\t\t\tSystem.exit(0);\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tSystem.out.println(\"Invalid option\");\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(playing)\r\n\t\t\t{\t\r\n\t\t\t\tboolean ans = Game.instance().Load();\r\n\t\t\t\t\r\n\t\t\t\tif(!ans) continue;\r\n\t\t\t\t\r\n\t\t\t\tGame.instance().AssembleScene();\r\n\t\t\t\t\r\n\t\t\t\tGame.instance().Setup();\r\n\t\t\t\t\r\n\t\t\t\tGame.instance().Play();\r\n\t\t\t\t\r\n\t\t\t\tplaying = false;\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public static void main(String[] args) {\n MainGameClass mg=new MainGameClass();\n mg.start();\n \n \n \n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t}",
"public static void main(String[] args){\n GameFrame frame = new GameFrame(1);\n frame.run();\n }",
"public static void main(String[] args) {\n printStatistics();\n System.out.println(\" ____Witcher Game Started____\");\n\n while (!gameOver()){\n round();\n }\n\n\n }",
"protected void runGame() {\n\t\tScanner sc = new Scanner(System.in);\n\t\tthis.getRndWord(filePosition);\n\t\twhile((! this.word.isFinished()) && (this.numOfWrongGuess <= this.allowance)) {\n\t\t\tthis.showInfo();\n\t\t\tthis.tryGuess(this.getGuessLetter(sc));\n\t\t}\n\t\tif (this.word.isFinished()) {\n\t\t\tthis.showStat();\n\t\t}else {\n\t\t\tthis.showFacts();\n\t\t}\n\t\tsc.close();\n\n\n\t}",
"public static void main(String args[]) {\n (new Game()).play();\n }",
"public void run() {\n\t\toutput.println(\"This is a tic-tac-toe game\\n\");\r\n\t\t\r\n\t\t//output.println(\"REQUEST 1. PvP 2.PvE\");\r\n\t\t//mode = input.nextInt();\t\t\r\n\t\tgameMode(2);\r\n\t\t\r\n\t\t\r\n\t}",
"public static void main(String[] args) {\n Game game = new Game(\"Programming 2 Project\",600,600);\n game.start();\n \n }",
"public static void main(String[] args) {\n setUpGamePlayer();\r\n \r\n //display of game board for computer\r\n setUpGameComp();\r\n System.out.println();\r\n \r\n System.out.println();\r\n System.out.println();\r\n \r\n //starting game\r\n // code incomplete to play game\r\n //playGame();\r\n }",
"public void run() {\n gameLogic = new GameLogic(drawManager.getGameFrame());\n long lastLoopTime = System.nanoTime();\n final int TARGET_FPS = 60;\n final long OPTIMAL_TIME = 1000000000 / TARGET_FPS;\n loop(lastLoopTime, OPTIMAL_TIME);\n }",
"protected void gameLoop() {\r\n init();\r\n recalculateViewport();\r\n\r\n long lastTime, lastFPS;\r\n lastTime = lastFPS = System.nanoTime();\r\n currentFramesPerSecond = 0;\r\n\r\n while(!Display.isCloseRequested()) {\r\n long deltaTime = System.nanoTime() - lastTime;\r\n lastTime += deltaTime;\r\n\r\n if(Display.wasResized())\r\n recalculateViewport();\r\n EventManager.getEventManager().processEventQueue();\r\n InputManager.getInputManager().update();\r\n update(deltaTime / 1e9);\r\n\r\n render();\r\n Display.update();\r\n\r\n currentFramesPerSecond++;\r\n if(System.nanoTime() - lastFPS >= 1e9) {\r\n lastFPS += 1e9;\r\n if(displayFPS){\r\n System.out.println(currentFramesPerSecond);\r\n }\r\n context.fps = currentFramesPerSecond;\r\n currentFramesPerSecond = 0;\r\n }//End if\r\n Display.sync(fps);\r\n }//End while\r\n System.exit(0);\r\n }",
"@Override\n\t\t\tpublic void run() {\n\t\t\t\t\n\t\t\t\twhile(true){\n\t\t\t\t\t\n\t\t\t\t\tlong time = System.currentTimeMillis();\n\t\t\t\t\tgameLoop();\n\t\t\t\t\t\n\t\t\t\t\tlong waitTime = 100 - time;\n\t\t\t\t\t\n\t\t\t\t\tif(waitTime < 10){\n\t\t\t\t\t\t\n\t\t\t\t\t\twaitTime = 10;\n\t\t\t\t\t}\n\t\t\t\t\ttry {\n\t\t\t\t\t\tThread.sleep(waitTime);\n\t\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}",
"public static void main(String[] args) {\n\n\t\t// Aus diese Schleife sorgt dafür, das man ohne großen aufwand immer neu spielen kann\n\t\t// hier wird auch das spiel raus gestartet\n\t\twhile (true){\n\n\t\tboard = new Board(); //erstellt das Fenster des Spielfeldes\n\t\tgui = new GUI();\t//erstellt das Fenster des Einstellungs/Start fensters\n\t\tgui.checkBtnPlay(); //wird von hier aufgerufen damit gui nicht = null ist und objekt erstellung abgeschlossen wird\n\t\t\t\t\t\t\t//in dieser Funktion wird auch das spiel gestartet\n\n\t\t//Wenn man hier angekommen ist ist das Aktuelle spiel zuende\n\t\tboard.dispose();\n\n\n\n\t\t//Zurück setzen der der Richtung\n\t\t// 4 heißt keine Bewegung\n\t\tGame.p1direction = 4;\n\t\tGame.p2direction = 4;\n\t}\n\n\n\t\t\n\t}",
"public void run() { //this is the running method\n\t\twhile (running) {\n\t\t\t//System.out.println(\"Running...\"); //this is to show in the console that the game is running\n\t\t\t/**\n\t\t\t * use tick(); or update(); this just \n\t\t\t */\n\t\t\t\n\t\t\tupdate();\n\t\t\trender();\n\t\t}\n\t}",
"@Override\n //Runs the game. Contains the overall game loop\n public void run() {\n Pool.initializePool();\n //Initialize the game\n initializeGame();\n \n //Main game loop\n while (true) {\n //Sequence of evaluating for each bird its coordinate as well as the\n //next tube's, updates the game by detecting collisions and if the bird\n //should flap, and learns by determining the fitness of the best bird. \n eval();\n update();\n learn();\n\n //Redraws the game\n repaint();\n \n //Adjusts the speed of the game by reducing the sleeptime. Adjusted if \n //user clicks mouse button\n try {\n if(!speedUp)\n Thread.sleep(20L);\n else\n Thread.sleep(2L);\n } catch (final InterruptedException e) {\n }\n }\n }",
"public static void main(String[] args) {\n\t\tint[][] grid = { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, \n\t { 0, 0, 0, 1, 1, 1, 0, 0, 0, 0 }, \n\t { 0, 0, 0, 1, 0, 1, 0, 0, 0, 0 }, \n\t { 0, 0, 0, 1, 1, 1, 0, 0, 0, 0 }, \n\t { 0, 0, 0, 1, 0, 1, 0, 0, 0, 0 }, \n\t { 0, 0, 0, 1, 1, 1, 0, 0, 0, 0 }, \n\t { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, \n\t { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, \n\t { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, \n\t { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } \n\t };\n\t\tplay(grid);\n\t\t\n\t}",
"public static void main(String[] args)\n {\n Game game = new Game(8);\n \n Turn turn = game.nextTurn();\n printStatus(turn);\n \n turn = game.nextTurn();\n printStatus(turn);\n }",
"public void run(){\t\t\n\t\tSystem.out.println(\"Welcome to Tic Tac Toe!\");\n\t\tdo{\n\t\t\tSystem.out.printf(\"\\n>\");\n\t\t\tchooseFunction();\n\t\t}while(true);\t\t\n\t}",
"public void mainloop(){\n\t\t\twhile(!lost){\r\n\t\t\t\t//Pacman will only turn at closest opening\r\n\t\t\t\tif(nextTurn.equals(\"up\")){\r\n\t\t\t\t\tTurn(\"up\");\r\n\t\t\t\t}\r\n\t\t\t\telse if(nextTurn.equals(\"down\")){\r\n\t\t\t\t\tTurn(\"down\");\r\n\t\t\t\t}\r\n\t\t\t\telse if(nextTurn.equals(\"right\")){\r\n\t\t\t\t\tTurn(\"right\");\r\n\t\t\t\t}\r\n\t\t\t\telse if(nextTurn.equals(\"left\")){\r\n\t\t\t\t\tTurn(\"left\");\r\n\t\t\t\t}\r\n\t\t\t\t//if no walls in front of pacman\r\n\t\t\t\tif(!checkWallCollision()){\r\n\t\t\t\t\tpacman.move();\r\n\t\t\t\t\tcheckGame();\r\n\t\t\t\t\tchangeIcon();\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tcheckGame();\r\n\t\t\t\tg1.move();\r\n\t\t\t\tg2.move();\r\n\t\t\t\tg3.move();\r\n\t\t\t\tg1.sprite.setLocation(g1.xpos, g1.ypos);\r\n\t\t\t\tg2.sprite.setLocation(g2.xpos, g2.ypos);\r\n\t\t\t\tg3.sprite.setLocation(g3.xpos, g3.ypos);\r\n\t\t\t\t\r\n\t\t\t\tcheckFoodCollision();\r\n\t\t\t\tpacmansprite.setLocation(pacman.xpos, pacman.ypos);\r\n\t\t\t\t\r\n\t\t\t\t//System.out.println(\"x:\"+pacman.xpos+\" y:\"+pacman.ypos);\r\n\t\t\t\t//pause the game for 0.01 seconds so pacman moves smoothly \r\n\t\t\t\ttry {\r\n\t\t\t\t\tThread.sleep(10);\r\n\t\t\t\t} catch (InterruptedException 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\tcheckwarp();\r\n\t\t\t}\r\n\t}",
"public void run(){\n resetGame();\n this.addMouseListener(this);\n this.addMouseMotionListener(this);\n\n waitForClick();\n runOneGame();\n waitForClick();\n runOneGame();\n waitForClick();\n runOneGame();\n\n if(brickManager.getNumberOfBricks() > 0){\n System.out.println(\"You lost :(\");\n }\n\n else if(brickManager.getNumberOfBricks() == 0){\n System.out.println(\"You won!\");\n }\n\n getWindowFrame().dispose();\n\n }",
"public void run(){\n\t\twhile(game_running){\n\t\t\tif(singleplayer){\n\t\t\t\tcomputeDelta(); //Zeit für vorausgehenden Schleifendurchlauf wird errechnet\n\t\t\t\t//Erst Methoden abarbeiten, wenn Spiel gestartet ist\n\t\t\t\tif(isStarted()){\n\t\t\t\t\t\n\t\t\t\t\tcheckKeys(); //Tastaturabfrage\n\t\t\t\t\tdoLogic(); //Ausführung der Logik\n\t\t\t\t\tmoveObjects(); //Bewegen von Objekten\n\t\t\t\t\t\n\t\t\t\t}\n\n\t\t\t\trepaint();\n\t\t\t\t\n\t\t\t\ttry{\n\t\t\t\t\tif(System.nanoTime()-last < 16666666){\n\t\t\t\t\t\tThread.sleep((16666666 - (System.nanoTime() - last))/1000000); //Zum flüssigen Spiellauf und stabiler FPS-Rate\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t}catch (InterruptedException e){}\n\t\t\t} else{\n\t\t\t\tif(serverMode){\n\t\t\t\t\t //Zeit für vorausgehenden Schleifendurchlauf wird errechnet\n\t\t\t\t\t//Erst Methoden abarbeiten, wenn Spiel gestartet ist\n\t\t\t\t\tcomputeDelta();\n\t\t\t\t\tif(isStarted()){\n\t\t\t\t\t\t\n\t\t\t\t\t\tcheckKeys(); //Tastaturabfrage\n\t\t\t\t\t\tdoLogic(); //Ausführung der Logik\n\t\t\t\t\t\tmoveObjects(); //Bewegen von Objekten\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\n\t\t\t\t\trepaint();\n\t\t\t\t\t\n\t\t\t\t\t//System.out.println(System.nanoTime() - last);\n\t\t\t\t\ttry{\n\t\t\t\t\t\tif(!isStarted()){\n\t\t\t\t\t\t\tThread.sleep(20);\n\t\t\t\t\t\t}else if(System.nanoTime()-last < 16666666){\n\t\t\t\t\t\t\tThread.sleep((16666666 - (System.nanoTime() - last))/1000000);\n\t\t\t\t\t\t}\n//\t\t\t\t\t\tif(System.nanoTime()-last < 16666666){\n//\t\t\t\t\t\t\tThread.sleep((16666666 - (System.nanoTime() - last))/1000000); //Zum flüssigen Spiellauf und stabiler FPS-Rate\n//\t\t\t\t\t\t}\n\t\t\t\t\t}catch (InterruptedException e){}\n\t\t\t\t}else if(clientMode){\n\t\t\t\t\tcomputeDelta();\n\t\t\t\t\tif(isStarted()){\n\t\t\t\t\t\tcheckKeys();\n\t\t\t\t\t\tdoLogic();\n\t\t\t\t\t\tmoveObjects();\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\trepaint();\n\t\t\t\t\t\n\t\t\t\t\t//System.out.println(System.nanoTime() - last);\n\t\t\t\t\ttry{\n\t\t\t\t\t\t//Thread.sleep(20);\n\t\t\t\t\t\tif(!isStarted()){\n\t\t\t\t\t\t\tThread.sleep(20);\n\t\t\t\t\t\t}else if(System.nanoTime()-last < 16666666){\n\t\t\t\t\t\t\tThread.sleep((16666666 - (System.nanoTime() - last))/1000000);\n\t\t\t\t\t\t}\n//\t\t\t\t\t\tif(System.nanoTime()-last < 16666666){\n//\t\t\t\t\t\t\tThread.sleep((16666666 - (System.nanoTime() - last))/1000000); //Zum flüssigen Spiellauf und stabiler FPS-Rate\n//\t\t\t\t\t\t}\n\t\t\t\t\t}catch (InterruptedException e){}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t}\t\n\t}",
"public static void runGame() {\n Scanner read = new Scanner(System.in);\n Random generator = new Random();\n \n //get username\n String userName = getUserName(read);\n\n //get number of rounds\n int rounds = getRounds(read, userName);\n \n //play the game!\n playGame(read, generator, userName, rounds);\n }",
"public void run() {\n addMouseListeners();\n playGame();\n }",
"@Override\r\n\tpublic void gameLoopLogic(double time) {\n\r\n\t}",
"public void run() {\n board = new Board();\n\n // Initialiseer de game board and\n // print this with empty content\n initGame();\n board.paint();\n\n //speel één maal (spelers spelen om de beurt)\n do {\n playerTurn(currentPlayer);\n board.paint();\n updateGame(currentPlayer);\n\n // game-over ? print een message\n if (currentState == GameState.CROSS_WON) {\n System.out.println(\"'X' won! thanks for playing!\");\n } else if (currentState == GameState.NOUGHT_WON) {\n System.out.println(\"'O' won! thanks for playing!\");\n } else if (currentState == GameState.DRAW) {\n System.out.println(\"It's Draw! thanks for playing!\");\n }\n // andere speler's beurt\n currentPlayer = (currentPlayer == Mark.CROSS) ? Mark.NOUGHT : Mark.CROSS;\n }\n // repeat tot game-over\n while (currentState == GameState.PLAYING);\n\n }",
"public void gameLoop() {\r\n // make the whites of the eyes move from side to side\r\n if (whiteRight == 210){\r\n whiteRight += 20;\r\n }\r\n else if (whiteRight == 230){\r\n whiteRight -= 30;\r\n }\r\n else if (whiteRight == 200){\r\n whiteRight += 10;\r\n }\r\n if (whiteLeft == 350){\r\n whiteLeft += 20;\r\n }\r\n else if (whiteLeft == 370){\r\n whiteLeft -= 30;\r\n }\r\n else if (whiteLeft == 340){\r\n whiteLeft += 10;\r\n }\r\n // make the eyebrows move up and down\r\n if (eyebrowMove == 150){\r\n eyebrowMove -= 100;\r\n }\r\n else if (eyebrowMove == 50){\r\n eyebrowMove += 100;\r\n }\r\n // make the mustache move up and down\r\n if (mustache == 590){\r\n mustache +=20;\r\n }\r\n else if (mustache == 610){\r\n mustache -=40;\r\n }\r\n else if (mustache == 570){\r\n mustache +=20;\r\n }\r\n // make the tongue move up and down\r\n if (tongue == 700){\r\n tongue += 15;\r\n }\r\n else if (tongue == 715){\r\n tongue -= 15;\r\n }\r\n }",
"public static void main(String[] args) {\n GameEx gameEx = new GameEx();\n\n gameEx.play();\n }",
"public static void main(String[] args) throws Exception\n {\n StdDraw.setCanvasSize(1920, 1080);\n StdDraw.setXscale(0, 1920);\n StdDraw.setYscale(0, 1080);\n //enable the calcul off the next screen before displaying\n //increase fluidity\n StdDraw.enableDoubleBuffering();\n\n int level;\n int number_of_wins = 0;\n RefreshTimer refresh_timer; //needed to get the same refresh rate\n //between every computer\n\n// StdAudio.loop(\"audio/background_low.wav\");\n //this music had to be remove for the zip to be less than 20MB...\n\n while (true) //the whole ame loop\n {\n IngameTimer timer1 = null; //timers for respawn\n IngameTimer timer2 = null;\n StdDraw.clear();\n int lives = 3; //chosen number of lives\n int lives2 = 3;\n Wrapper.first_player_points = 0;\n Wrapper.second_player_points = 0;\n //draw the menu screen, waiting for a key pressed\n while(true)\n {\n if (StdDraw.isKeyPressed(77)) //M key\n {\n DrawAll.drawMore();\n StdDraw.show();\n while (!StdDraw.isKeyPressed(82)) //R key\n {\n if (StdDraw.isKeyPressed(27))\n System.exit(0);\n }\n }\n else\n {\n DrawAll.drawStart();\n StdDraw.show();\n if (StdDraw.isKeyPressed(49)) //1 key\n {\n level = 1;\n break;\n }\n\n if (StdDraw.isKeyPressed(50)) //2 key\n {\n level = 2;\n break;\n }\n if (StdDraw.isKeyPressed(51)) //3 key\n {\n level = 3;\n break;\n }\n if (StdDraw.isKeyPressed(27)) //escape key\n System.exit(0);\n }\n }\n StdAudio.close();\n StdAudio.play(\"audio/start_click_v2.wav\");\n //create a new SpaceInvaders object and initliaze Wrapper variables\n Wrapper.initializeVariables();\n SpaceInvaders SI = new SpaceInvaders(level, number_of_wins);\n refresh_timer = new RefreshTimer(1); //just to avoid a null\n //comparision every iteration of the loop below\n //THE PLAYING PART\n while (SI.aliensWon() == 0)\n {\n if (refresh_timer.getTime() == 0)\n {\n refresh_timer = new RefreshTimer(20);\n\n //restart if no aliens left\n if (SI.aliensLeft() == 0)\n {\n DrawAll.drawWon();\n StdDraw.show();\n StdAudio.play(\"audio/win.wav\");\n WaitTimer timer = new WaitTimer(3000);\n synchronized (Wrapper.lock){Wrapper.lock.wait();}\n SI = new SpaceInvaders(level, ++number_of_wins);\n Wrapper.initializeVariables();\n }\n\n //pause screen\n if (StdDraw.isKeyPressed(80))\n {\n SI.pause();\n DrawAll.drawPause();\n StdDraw.show();\n while(true)\n {\n if (StdDraw.isKeyPressed(27)) //escape key\n System.exit(0);\n\n if (StdDraw.isKeyPressed(82)) //R key\n break;\n }\n SI.resume();\n }\n\n //calcul part\n SI.movePlayer();\n SI.updateBullets();\n SI.updateAliens();\n\n if (level != 2)\n SI.updateProtections();\n\n if (level == 1)\n {\n if (SI.player.isAlive() == 1)\n SI.updateBonus();\n if (Wrapper.extraLife() == 1)\n lives++;\n }\n\n //drawing part\n StdDraw.clear();\n //draw background\n DrawAll.drawBackground();\n //go SpaceInvaders.java to see what it draws\n SI.drawEverything();\n //draw rocket lives\n DrawAll.drawLivesFirst(lives);\n\n if (level != 3)\n DrawAll.drawPoints(SI);\n else\n {\n DrawAll.drawPointsMulti(SI);\n DrawAll.drawLivesSecond(lives2);\n }\n\n //check if player is still alive\n if (SI.player.isAlive() == 0)\n {\n DrawAll.drawDead(SI.player);\n if (timer1 == null)\n {\n timer1 = new IngameTimer(1000);\n lives--;\n if (lives == 0)\n break;\n }\n else if (timer1.time == 0)\n {\n timer1 = null;\n if (level != 3)\n SI.restart();\n else\n SI.player.restart();\n Wrapper.repositioning();\n }\n if (level != 3)\n DrawAll.drawDeadScreen();\n }\n\n //check game state (finished, lost, win\n if (SI.player2.isAlive() == 0)\n {\n DrawAll.drawDead(SI.player2);\n if (timer2 == null)\n {\n timer2 = new IngameTimer(1000);\n lives2--;\n if (lives2 == 0)\n break;\n }\n else if (timer2.time == 0)\n {\n timer2 = null;\n SI.player2.restart();\n }\n }\n }\n //need to pause the display of the images, otherwise\n //we literally see nothing\n StdDraw.show(10);\n }\n\n number_of_wins = 0;\n\n StdAudio.play(\"audio/game_over_v3.wav\");\n\n if (SI.aliensWon() == 1)\n {\n DrawAll.drawAliensWon();\n DrawAll.drawDead(SI.player);\n }\n\n if (lives == 0 && level != 3)\n DrawAll.drawAliensWon();\n else if (lives == 0)\n DrawAll.drawDeadPlayer1();\n else if (lives2 == 0)\n DrawAll.drawDeadPlayer2();\n\n StdDraw.show();\n\n WaitTimer timer = new WaitTimer(1000);\n synchronized (Wrapper.lock){Wrapper.lock.wait();}\n\n IngameTimer timer3 = null;\n int n = 5;\n int changed;\n if (level != 3)\n changed = Scoreboard.checkSolo();\n else\n changed = Scoreboard.checkMulti();\n\n //wait for key pressed\n while(true)\n {\n if (n == -1)\n break;\n else if (timer3 == null)\n timer3 = new IngameTimer(1200);\n else if (timer3.time == 0)\n {\n DrawAll.drawGameOver(level, SI.aliensWon(),\n lives, lives2, n, changed);\n n--;\n timer3 = null;\n StdDraw.show();\n }\n if (StdDraw.isKeyPressed(27)) //escape key\n {\n System.exit(0);\n break;\n }\n if (StdDraw.isKeyPressed(82)) //r key\n {\n break;\n }\n }\n }\n }",
"public void mainGameLoop(GraphicsContext gc, Scene scene) {\n if (isGameOver()) {\n resetGame();\n initGame();\n return;\n }\n renderGame(gc, scene);\n renderGameScore(gc);\n }",
"public static void main(String[] args) {\n\t\tGame game = new Game();\n\t\t//game.playGame();\n\t}",
"public void run() {\n\t\t// Set the window to a nice size for our game\n\t\tsetSize(APPLICATION_WIDTH, APPLICATION_HEIGHT);\n\t\tdrawWall();\n\t\tGRect paddle = addPaddle();\n\t\tGOval ball = makeBall();\n\t\t//pause(500);\n\t\tbounceBall(ball);\n\t\tGObject collider = checkCollision(ball);\n\t\tif (collider == null) {\n\t\t\t//continue;\n\t\t}\n\t\telse if (collider == paddle) {\n\t\t\t\n\t\t}\n\t\telse if (collider == brick) {\n\t\t\tremove(brick);\n\t\t}\n\t\t\n\t}",
"public static void runGame() {\n //Create instance of Datacontroller for sample data\n DataController dataController = DataController.getInstance();\n Encounter encounter;\n Scanner scan = new Scanner( System.in);\n\n int commandNum; //Variable that determines state of game\n\n while(true) {\n //TODO: Enter list of options for movement at every iteration\n System.out.println(\"Please enter your command\");\n System.out.println(\"1. Exit Game\\n2. Enter Combat\\n3. Items\");\n commandNum = scan.nextInt();\n\n switch (commandNum) {\n case 1: //Exit Game\n return;\n case 2: // Join Controller.Encounter\n encounter = new Encounter(dataController.getPlayer(),dataController.getEnemy());\n try {\n encounter.startFight();\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n break;\n case 3: // View Menu TODO: create menu class\n\n }\n }\n }",
"@Override\n\tpublic void gameLoop() {\n\t\tScanner scanner = new Scanner(System.in);\n\t\tLabyrinthMap map = getLabyrinthMap();\n\t\tDirection d;\n\t\twhile (!map.isDone()) {\n\t\t\trenderManager.render(map);\n\t\t\td = readDirectionFromKeyboard(scanner);\n\t\t\tmap.updateMap(d);\n\t\t}\n\t\tSystem.out.println(\"Labirinto Finalizado!\");\n\t}",
"public void run() { \n while(true) {\n if(!isFirst && health > 0 && state == STATE.GAME) {\n \tmanager.physic(); // Calculates the targeting and shooting of towers\n \tenemyCreator(); // Creates enemies\n \tfor(int i= 0; i < enemies.length; i++) {\n \t\tif(enemies[i].isAlive) {\n \t\t\tenemies[i].move(); // Moves the enemies if alive\n \t\t}\n \t}\n }\n else if(health < 1) { // If the user lost\n \tfor(int i = 0; i < enemies.length; i++)\n \t\tenemies[i].deleteEnemy(); // Deletes all enemies on the screen\n \t\n \tif(isFirstAfterLoss){\n \t\tCheckScore();// Checks if there is a high score\n \t\tisFirstAfterLoss = false;\n \t\tsave.writeHighScore(); // Writes high score info to text file\n \t}\n \tstate = STATE.POSTGAME; // Sets the state to postgame \t\n }\n \t\n \n repaint();// Calls the paint method\n \n try {\n Thread.sleep(1);// Delay\n } \n catch (Exception ex) {\n System.out.println(ex.getMessage());\n }\n }\n }",
"private void loop() {\r\n\t\tfloat elapsed;\r\n\t\tfloat accumulated = 0f;\r\n\t\tfloat interval = 1f / TARGET_UPS;\r\n\t\tdouble time;\r\n\t\tdouble lastCall = System.nanoTime();\r\n\t\t\r\n\t\trunning = true;\r\n\t\t//loop while running and the window hasn't received a close command\r\n\t\twhile (running) {\r\n\t\t\ttime = System.nanoTime();\r\n\t\t\t\r\n\t\t\telapsed = (float) ((time-lastCall) / 1e9);\r\n\t\t\tlastCall = time;\r\n\t\t\t\r\n\t\t\taccumulated += elapsed;\r\n\t\t\t\r\n\t\t\twhile (accumulated >= interval) {\r\n\t\t\t\tupdate();\r\n\t\t\t\taccumulated -= interval;\r\n\t\t\t}\r\n\t\t\t//render once per loop, then wait until the render time slot is over before restarting\r\n\t\t\tgame.render();\r\n\t\t\tsync(lastCall/1e9);\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t}",
"@Override\n public void run() {\n try {\n init();\n gameLoop();\n } catch (LWJGLException lwjgle) {\n lwjgle.printStackTrace();\n } finally {\n cleanup();\n }\n\n System.exit(0);\n }",
"public void gameLoop() {\n while (!d_TournamentEnded) {\n d_CurrentPhase.run();\n }\n }",
"public static void main(String[] args)\n {\n //Create an instance of the game\n game Game = new game(PAGE_HEIGHT,PAGE_WIDTH,PAGE_TITLE);\n \n //Start the game loop\n Game.start();\n }",
"private void run() {\n int num = 0; // Current level number\n while (loadLevel(++num))\n if (!playLevel() || !win.question(\"Next level\")) {\n exit(\"Bye.\");\n return;\n }\n exit(\"No more Levels\");\n }",
"public static void main(String args[]) {\n (new Game()).start();\n }",
"public void run() {\n initialize();\n float currentTime = System.nanoTime();\n float previousTime = currentTime;\n float dt = 0.0f;\n while (!exit) {\n currentTime = System.nanoTime();\n dt = Math.max((currentTime - previousTime) / 1000000.0f, 20.0f);\n input(win.getInputHandler(), dt);\n update(dt);\n render(dt);\n waitFPS();\n previousTime = currentTime;\n postOperation();\n }\n dispose();\n }",
"public void runProgram()\n\t{\n\t\tintro();\n\t\tfindLength();\n\t\tguessLetter();\n\t\tguessName();\n\t}",
"public void run() {\n\t\tlong lastLoopTime = System.nanoTime();\n\t\tfinal int TARGET_FPS = 60;\n\t\tfinal long OPTIMAL_TIME = 1000000000 / TARGET_FPS;\n\n\t\t// keep looping round til the game ends\n\t\twhile (true) {\n\t\t\t// work out how long its been since the last update, this\n\t\t\t// will be used to calculate how far the entities should\n\t\t\t// move this loop\n\t\t\tlong now = System.nanoTime();\n\t\t\tlong updateLength = now - lastLoopTime;\n\t\t\tlastLoopTime = now;\n\n\t\t\t// update the frame counter\n\t\t\tlastFpsTime += updateLength;\n\t\t\tfps++;\n\n\t\t\t// update our FPS counter if a second has passed since\n\t\t\t// we last recorded\n\t\t\tif (lastFpsTime >= 1000000000) {\n\t\t\t\tSystem.out.println(\"(FPS: \" + fps + \")\");\n\t\t\t\tlastFpsTime = 0;\n\t\t\t\tfps = 0;\n\t\t\t}\n\n\t\t\t// update the game logic\n\t\t\ttick();\n\n\t\t\t// render\n\t\t\tglWindow.display();\n\n\t\t\t// sleep the current thread for the appropriate amount of time\n\t\t\ttry {\n\t\t\t\tThread.sleep(Math.max(0, (lastLoopTime - System.nanoTime() + OPTIMAL_TIME) / 1000000));\n\t\t\t}\n\t\t\tcatch (InterruptedException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}",
"@Override\n\tpublic void run() {\n\t\ttry{\n\t\t\tThread.sleep(100);\n\t\t}\n\t\tcatch(InterruptedException e){\n\t\t\t\n\t\t}\n\t\t\n\t\t//run the game loop\n\t\twhile(true){\n\t\t\t//allows for smooth motion of the game\n\t\t\ttry{\n\t\t\t\tThread.sleep(8);\n\t\t\t}\n\t\t\tcatch(InterruptedException e){\n\t\t\t\t\n\t\t\t}\n\t\t\tmoveBall();\n\t\t\tmovePlayer(1);\n\t\t\tmovePlayer(2);\n\t\t}\n\t}",
"@Override\n /**\n * Runs the game loop\n */\n public final void run() {\n initialize();\n\n // Timing variables\n long accumulator = 0L;\n long lastTime = System.nanoTime();\n long startTime;\n\n // Main game loop\n while(isRunning) {\n // Get times\n startTime = System.nanoTime();\n accumulator += startTime - lastTime;\n lastTime = startTime;\n\n // Update while the elapsed time is greater than the time interval\n while(accumulator >= NS_PER_UPDATE) {\n accumulator -= NS_PER_UPDATE;\n updateGame();\n }\n\n // Render to the screen\n renderer.beginRender();\n renderGame();\n renderer.endRender();\n }\n\n // Clean up the game components here\n terminate();\n }",
"public static void main(String[] args) {\n\t\tJFrame frame = new JFrame(\"TDGame\"); //Create a JFrame Object and set its options\n\t\tframe.setSize(960, 640);\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tframe.setResizable(false);\n\t\t\n\t\tlong curTime = System.currentTimeMillis();\n\t\t\n\t\tGameComponent game = new GameComponent(curTime);\n\t\t\n\t\tframe.addMouseListener(game);\n\t\tframe.add(game);\n\t\tframe.setVisible(true);\n\t\t\n\t\twhile(true) {\n\t\t\tcurTime = System.currentTimeMillis();\n\t\t\tgame.update(curTime);\n\t\t\t\n\t\t\tframe.repaint();\n\t\t\ttry {\n\t\t\t\tThread.sleep((long) DELAY);\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\t\n\t}",
"@Override\n public void run()\n {\n while (playing)\n {\n // Get the user inputs and update the game data\n update();\n // Draw it to the screen\n draw();\n // control the FPS\n control();\n\n }\n }",
"public static void main(String[] args) throws IOException, InterruptedException {\n GameFrame gameFrame = new GameFrame();\n gameFrame.run();\n System.exit(0);\n }",
"public static void main(String[] args) {\r\n\r\n game.getCurrentPlayer().takeTurn();\r\n game.printGrid();\r\n while (!game.gameEnd()) {\r\n game.nextPlayer();\r\n game.getCurrentPlayer().takeTurn();\r\n game.printGrid();\r\n }\r\n }",
"public static void main(String[] args) {\n // TODO code application logic here\n GameController.start();\n boolean active=true;\n Scanner input = new Scanner(System.in);\n while(active){\n GameController.printBoard();\n System.out.print(GameController.getTurn()+\"'s move: \");\n String move = input.nextLine();\n GameController.playerMove(move);\n }\n }",
"public void playConsole(){\n consoleWelcome();\n \n while (! finished) {\n if (gameOver) {\n Logger.Log(\"Your adventure is over...\");\n break;\n }\n Command command = parser.getCommand();\n finished = processCommand(command); \n }\n if (!gameOver) { \n Logger.Log(\"Thank you for playing. Good bye.\");\n }\n }",
"public void loop(){\n\t\t\n\t}",
"public static void main(String[] args) \r\n {\r\n // creates ball object\r\n // this ball object is passed around by reference, as is the default in java\r\n // this means the same exact object is being passes, not copies\r\n // equivalent to &Ball in C++\r\n Ball mainBall = new Ball(BALLPIXELRADIUS);\r\n // adds the initial ball with initial coordinates to the panel\r\n // and draws the first frame of the game\r\n drawPanel panel = new drawPanel(mainBall, WIDTH, HEIGHT);\r\n \r\n // creates object of MyFrame class, which is an extended JFrame\r\n myFrame frame = new myFrame(panel, WIDTH, HEIGHT);\r\n // creates object of moveBallClass, which has functions to move the ball\r\n moveBallClass move = new moveBallClass(mainBall, WIDTH, HEIGHT);\r\n \r\n // main game loop\r\n while(true)\r\n {\r\n \r\n // updates the coordinates of the ball by moving it\r\n move.moveBall();\r\n // adds the balls new coordinates to the drawPanel class, with a \r\n // function I created. This is then drawn on screen\r\n panel.addNewBall(mainBall);\r\n // repaints the panel with updated ball information\r\n panel.repaint();\r\n pause(18);\r\n }\r\n\r\n \r\n \r\n }",
"public static void main(String[] args) {\n clock = new GameClock();\n ProjectGame game = new ProjectGame();\n game.start();\n\n\n }",
"public static void main(String[] args)\r\n\t{\r\n\t\tnew SimpleGame();\r\n\t}",
"public static void main(String[] args) throws IOException{\n\t\tRNGFactory rngf = RNGFactory.getInstance();\n\t\tGameFactory gf = GameFactory.getInstance();\n\t\tBufferedReader br=new BufferedReader(new InputStreamReader(System.in));\n\t\tRandomInterface rng;\n\t\tGame game;\n\t\t//Allows the user to play muiltiple games without restarting\n\t\tboolean playAgain = false;\n\t\tdo{\n\t\t\t//Check if the user wishes to use a specified RandomInterface or the default\n\t\t\t//LCG method from the original files\n\t\t\tSystem.out.println(\"Hello would you like to choose a Random Number Generator? (y/n)\");\n\t\t\tif(br.readLine().equalsIgnoreCase(\"y\")){\n\t\t\t\tSystem.out.println(\"Would you like to use Java's RNG (j) or Linear Congruential Method(l) ? (j/l)\");\n\t\t\t\trng = rngf.getRNG(br.readLine());\n\t\t\t}else{\n\t\t\t\trng = rngf.getRNG(\"l\");\n\t\t\t}\n\t\t\t//Check which game the user wants to play\n\t\t\tSystem.out.print(\"Card (c) or Die (d) game? \");\n\t\t\tgame = gf.getGame(br.readLine(), rng);\n\t\t\t\n\t\t\t//While the game still requires user input ask them for the input and\n\t\t\t//display relevant information\n\t\t\twhile(game.requiresInput()){\n\t\t\t\tSystem.out.println(game.askForInput());\n\t\t\t\tSystem.out.println(game.nextMove(br.readLine()));\n\t\t\t}\n\t\t\t\n\t\t\t//Print results of game out to the user\n\t\t\tSystem.out.println(game.getResults());\t\n\t\t\t\n\t\t\t//Check if they would like to continue playing games\n\t\t\tSystem.out.println(\"Would you like to play again? (y/n)\");\n\t\t\tif(br.readLine().equalsIgnoreCase(\"y\")){\n\t\t\t\tplayAgain = true;\n\t\t\t}else{\n\t\t\t\tplayAgain = false;\n\t\t\t}\n\t\t}while(playAgain);\n\t}",
"public static void main(String[] args) {\n\t\tGame myGame = new Game();\n\t\tmyGame.start();\n\t}",
"public static void main(String[] args) {\n\t\tUtil.debug = true;\n\t\tTitleScreen screen = new TitleScreen(WIDTH, HEIGHT);\n\n\t\twhile (!screen.getMadeGame())\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\tThread.sleep(100);\n\t\t\t}\n\t\t\tcatch (InterruptedException e)\n\t\t\t{\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\n\t\tscreen.stopMusic();\n\t\tscreen.dispose();\n\t\tGameBoard g = new GameBoard(WIDTH, HEIGHT);\n\t\tg.gameLoop();\n\t}",
"public void run() {\r\n this.createBallsOnTopOfPaddle();\r\n this.running = true;\r\n this.runner.run(new CountdownAnimation(2, 3, sprites));\r\n this.runner.run(this);\r\n }",
"public void start(){\n isRunning = true;\n\n // This is where the magic happens\n Thread loop = new Thread(){\n\t\t\tpublic void run(){\n\t\t final double targetHertz = 30; // target updates per second\n\t\t final double updateTime = 1e9 / targetHertz; // target time between updates\n\t\t final int maxUpdates = 5; // max updates before a render is forced\n\t\t \n\t\t final double targetFps = 60; // target frames per second (fps)\n\t\t final double renderTime = 1e9 / targetFps; // target time between renders\n\t\t \n\t\t double lastUpdate = System.nanoTime();\n\t\t double lastRender = System.nanoTime();\n\n\t\t while (isRunning){\n\t\t \tdouble now = System.nanoTime();\n\t\t \t\n\t\t \tint updates = 0;\n\t\t \twhile (now - lastUpdate > updateTime && updates < maxUpdates){ // Update the game as much as possible before drawing\n\t\t \t\tgamePanel.update();\n\t\t \t\tlastUpdate += updateTime;\n\t\t \t\tupdates++;\n\t\t \t}\n\t\t \t\n\t\t \tif (now - lastUpdate > updateTime){ // Compensate for really long updates\n\t\t \t\tlastUpdate = now - updateTime;\n\t\t \t}\n\t\t \t\n\t\t \t// Draw the game\n\t\t \tgamePanel.repaint();\n\t\t \tlastRender = now;\n\t\t \t\n\t\t \t// kill some time until next draw\n\t\t \t\n\t\t \twhile (now - lastRender < renderTime && now - lastUpdate < updateTime){\n\t\t \t\tThread.yield();\n\t\t \t\t\n\t\t \t\ttry { Thread.sleep(1);} catch (Exception e) { }\n\t\t \t\t\n\t\t \t\tnow = System.nanoTime();\n\t\t \t}\n\t\t }\n\t\t\t}\n\t\t};\n\t\tloop.start();\n }",
"public abstract void loop();",
"public static void main(String[] args) {\r\n\t\tnew GameFullVersion();\r\n\t\t\r\n\t\t//initialize game board\r\n\t\tboard.addRandom();\r\n\t\tboard.addRandom();\r\n\t\t\r\n\t\t//show instructions\r\n\t\tJOptionPane.showMessageDialog(null, \"Use the arrow keys to move the \"\r\n\t\t\t\t+ \"tiles.\", \"Directions:\", JOptionPane.INFORMATION_MESSAGE);\r\n\t\t\r\n\t\t//game loop\r\n\t\twhile (!winCheck(board)) {\r\n\t\t\tif (board.getFreeList().isEmpty() && canMerge(board).isEmpty()) {\r\n\t\t\t\tint answer = JOptionPane.showConfirmDialog(null, \"GAME OVER!!! \"\r\n\t\t\t\t\t\t+ \"\\nWould you like to restart?\", \"Sorry.\", \r\n\t\t\t\t\t\tJOptionPane.YES_NO_OPTION);\r\n\t\t\t\tif (answer == JOptionPane.YES_OPTION) {\r\n\t\t\t\t\tboard = new GameBoard();\r\n\t\t\t\t\tboard.addRandom();\r\n\t\t\t\t\tboard.addRandom();\r\n\t\t\t\t}\r\n\t\t\t\telse break;\r\n\t\t\t}\r\n\t\t}\r\n\t\tSystem.exit(0);\r\n\t}",
"public void loop() {\n\t\tloop(1.0f, 1.0f);\n\t}",
"public ConsoleGame() {\n\t\tSystem.out.println(\"Welcome to Quoridor!\");\n\t\twhile (!setUp());\n\t}",
"private void gameLoop() {\n\n\t\tlong elapsedTime = 0;\n\t\tlong newTime;\n\t\tlong oldTime = System.nanoTime();\n\t\tlong expectedTime = 1000000000 / 60;\n\t\tdouble delta;\n\n\t\tint frames = 0;\n\t\tlong frameTimer = 0;\n\n\t\twhile (!Display.isCloseRequested() && !gameOver) {\n\n\t\t\t// get new time, find elapsed time, determine delta\n\t\t\tnewTime = System.nanoTime();\n\t\t\telapsedTime = newTime - oldTime;\n\t\t\tdelta = (double)elapsedTime / (double)expectedTime;\n\t\t\toldTime = newTime;\n\n\t\t\t// update frame count\n\t\t\tframes++;\n\t\t\tframeTimer += elapsedTime;\n\n\t\t\t// if a second has passed, print the fps\n\t\t\tif (frameTimer >= 1000000000) {\n\t\t\t\tSystem.out.println(\"FPS: \" + frames);\n\t\t\t\tSystem.out.println(delta);\n\t\t\t\tframeTimer = Math.max(0, frameTimer - 1000000000);\n\t\t\t\tframes = 0;\n\t\t\t}\n\n\t\t\t// update game state\n\t\t\tsoundManager.update();\n\t\t\tstateManager.update(delta);\n\t\t\tstateManager.render();\n\t\t\tgui.update();\n\t\t\tDisplay.update();\t\n\n\t\t\t// sleep until 1/60 of a second has passed\n\t\t\tif (newTime - oldTime < expectedTime) {\n\n\t\t\t\twhile (newTime - oldTime < expectedTime) {\n\n\t\t\t\t\tnewTime = System.nanoTime();\n\n\t\t\t\t\ttry {\n\t\t\t\t\t\tThread.sleep(0);\n\t\t\t\t\t} catch (InterruptedException e) { } \n\n\t\t\t\t} \n\t\t\t}\n\t\t\telse {\n\n\t\t\t\ttry {\n\t\t\t\t\tThread.sleep(0);\n\t\t\t\t} catch (InterruptedException e) { }\n\t\t\t}\n\n\t\t}\n\t}",
"public void game(){\n gameMusic.loop(pitch, volume);\n }",
"private void loop() {\n\t\tFrameBuffer fb = new FrameBuffer();//TODO:\n\t\t\n\t\tif(active_console){\n\t\t\tconsole = new Console();\n\t\t\tThread c = new Thread(console);\n\t\t\tc.start();\n\t\t}\n\n\t\twhile ( !glfwWindowShouldClose(window) ) {\n\t\t\tglClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); // clear the framebuffer\n\t\t\t\n\t\t\tcam.update();\n\t\t\t\n\t\t\tfb.bind();//TODO:\n\t\t\tdraw();\n\t\t\tfb.rebind();//TODO:\n\t\t\t\n\t\t\tfb.render();//TODO:\n\t\t\t\n\t\t\tglfwSwapBuffers(window); // swap the color buffers\n\t\t\t\n\t\t\t// Poll for window events. The key callback above will only be\n\t\t\t// invoked during this call.\n\t\t\tglfwPollEvents();\n\t\t}\n\n\t\t//phisics.phisicsStop();\n\t\tif(active_console){\n\t\tconsole.consoleStop();\n\t\t}\n\t}",
"public void loop(){\n\t}",
"@Override\n\tpublic void run() {\n\t\tgameImpl.render();\n\t\tgameImpl.update();\n\t}",
"public static void main(String[] args) { \n \tprintAvailableMaps();\n \t\n\t\tGame game = new Game();\n\t\tScanner input = game.openFile();\n \tgame.readMapFile(input);\n \tgame.prepareTable();\n \tTapeHead player = game.preparePlayer();\n \t//game.print();\n \twhile(true) {\n \t\tgame.GameRunning(player);\n \t} \n }",
"@Override\n\t public void run() {\n\t \tSnakeGame game = new SnakeGame();\n\t }",
"public final void start() {\n logger.info(\"Application started.\");\n try {\n getAttributes();\n\n initSystem();\n\n assertDisplayCreated();\n\n timer = Timer.getTimer();\n \n initGame();\n\n //main loop\n while (!finished && !display.isClosing()) {\n //determine time elapsed since last frame\n updateTime();\n\n //handle input events prior to updating the scene\n // - some applications may want to put this into update of the game state\n InputSystem.update();\n\n //update game state, pass amount of elapsed time\n update(frametime);\n\n //render, do not use interpolation parameter\n render(-1.0f);\n\n //swap buffers\n display.getRenderer().displayBackBuffer();\n\n Thread.yield();\n }\n } catch (Throwable t) {\n logger.logp(Level.SEVERE, this.getClass().toString(), \"start()\", \"Exception in game loop\", t);\n } finally {\n cleanup();\n }\n logger.info(\"Application ending.\");\n\n if (display != null) {\n display.reset();\n }\n quit();\n }",
"public static void main(String[] args) {\n\n ConsoleChessGui gui = new ConsoleChessGui();\n GameController gameController = new GameController(gui);\n gameController.run();\n\n\n\n\n }",
"public static void main(String[] args){\n\t\tnew GamePanel(790,630); //Sonst grauer Streifen an den Rändern rechts und unten\n\t}",
"public static void main(String[] args) {\n\t\tint randNum,num;\n\t\tGuessGame player=new GuessGame();\n\t\twhile(true) {\n\t\t\t//生成随机数\n\t\t\trandNum=player.RandomNum();\t\n\t\t\tSystem.out.println(\"请输入你猜的数字(你只有3次机会)\");\n\t\t\tfor(int i=3;i>0;i--) {\n\t\t\t\tnum=player.inputNum();\n\t\t\t\tif(player.isTrue(randNum, num)) {\n\t\t\t\t\tSystem.out.println(\"你猜对了,你的得分是:\"+player.counter);\n\t\t\t\t\tbreak;\n\t\t\t\t}else {\n\t\t\t\t\tif(i-1!=0)\n\t\t\t\t\t\tSystem.out.println(\"你猜错了,你还有\"+(i-1)+\"次机会\");\n\t\t\t\t\t\t\n\t\t\t\t\telse {\n\t\t\t\t\t\tSystem.out.println(\"你猜错了,已经没有机会了。\");\n\t\t\t\t\t\tSystem.out.println(\"最终得分:\"+player.counter);\n\t\t\t\t\t\tSystem.out.println(\"随机数为:\"+randNum);\n\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(\"游戏结束,按“1”,重玩,按“0”退出\");\n\t\t\tif(player.inputNum()==0)\n\t\t\t\tbreak;\n\t\t\telse\n\t\t\t\tplayer.counter=0;//重置分数为0\t\t\t\n\t\t}\t\t\n\t}",
"@Override\n public void run(){\n Initialize();\n // Load game files (images, sounds, ...)\n LoadContent();\n \n Framework.gameState = Framework.GameState.PLAYING;\n }",
"@Override\n public void run(){\n Initialize();\n // Load game files (images, sounds, ...)\n LoadContent();\n \n Framework.gameState = Framework.GameState.PLAYING;\n }",
"public static void main(String[] args) {\n\t\t// MarioGame game = new MarioGame();\n//\t\tChessGame game = new ChessGame();\n\n//\t\tGamingConsole game = new MarioGame();\n\t\tChessGame game = new ChessGame();\n\t\tgame.up();\n\t\tgame.down();\n\t\tgame.left();\n\t\tgame.right();\n\t}",
"public static void main(String[] args) {\n SwingUtilities.invokeLater(new Game());\n }",
"public static void main(String[] args) {\n\n\t\t\n\t\tScanner scan = new Scanner(System.in);\n\t\tboolean playAgain = true;\n\t\tEvents events = new Events();\n\n\t\twhile (playAgain) {\n\n\t\t\t// Run setup\n\t\t\tPerson player = new Person();\n\t\t\tWerewolf wWolf= new Werewolf();\n\t\t\tCompass goldenCompass = new Compass();\n\t\t\tTreasure coins = new Treasure();\n\t\t\tint[] treasureLoc = coins.getLocation();\n\t\t\t// System.out.println(\"Treasure location is:\" + treasureLoc[0] + \" \" +\n\t\t\t// treasureLoc[1]);\n\n\t\t\tgoldenCompass.treasureDistUpdate(player.getPosition(), treasureLoc);\n\t\t\tgoldenCompass.werewolfDistUpdate(player.getPosition(), wWolf.getPosition());\n\t\t\tgoldenCompass.footStepDirection(player.getPosition(), wWolf.getPosition());\n\t\t\tint eventCount = 1;\n\n\t\t\tboolean gameEnded = false;\n\n\t\t\t// start\n\t\t\tSystem.out.println(\"Grey foggy clouds float oppressively close to you, \"\n\t\t\t\t\t+ \"reflected in the murky grey water which reaches up your shins. \"\n\t\t\t\t\t+ \"Some black plants barely poke out of the shallow water. \"\n\t\t\t\t\t+ \"Try 'North', 'South', 'East', 'West', 'Give Up'\"\n\t\t\t\t\t+ \"You notice a small watch-like device in your left hand. \"\n\t\t\t\t\t+ \"It has hands like a watch, but the hands don't seem to tell time.\");\n\t\t\t\n\t\t\tSystem.out.println(\"Valid game inputs: 'North', 'South', 'East', 'West', 'Give Up'\");\n\t\t\tSystem.out.println(\"\");\n\n\t\t\t// game loop\n\t\t\twhile (goldenCompass.getTreasureDistance() > 0.1 & gameEnded == false) {\n\n\t\t\t\tSystem.out.println(\"Compass reads '\" + (Math.round(goldenCompass.getTreasureDistance()* 100.0) / 100.0) + \"m'\");\n\t\t\t\tSystem.out.println(\"You here footsteps... Maybe \" + (Math.round(goldenCompass.getWerewolfDistance()* 100.0) / 100.0) + \"m mostly to the \" + goldenCompass.getWolfDirection());\n\t\t\t\tSystem.out.println(\"\");\n\t\t\t\tString playerInput = scan.nextLine();\n\n\t\t\t\tif (playerInput.equals(\"North\") || playerInput.equals(\"East\") || playerInput.equals(\"South\")\n\t\t\t\t\t\t|| playerInput.equals(\"West\")) {\n\n\t\t\t\t\tplayer.move(playerInput);\n\t\t\t\t\twWolf.move();\n\t\t\t\t\twWolf.move();\n\t\t\t\t\t\n\t\t\t\t\teventCount++;\n\t\t\t\t\tif (eventCount==3) { \n\t\t\t\t\tevents.InstigateEvent();\n\t\t\t\t\teventCount=0;\n\t\t\t\t\t}\n\n\n\t\t\t\t} else if (playerInput.equals(\"Give Up\")) {\n\t\t\t\t\tgameEnded = true;\n\t\t\t\t\tSystem.out.println(\"You quit the game\");\n\t\t\t\t} else {\n\t\t\t\t\tSystem.out.println(\"Not a valid input: please enter 'North' ect.\");\n\t\t\t\t}\n\n\t\t\t\tgoldenCompass.treasureDistUpdate(player.getPosition(), treasureLoc);\n\t\t\t\tgoldenCompass.werewolfDistUpdate(player.getPosition(), wWolf.getPosition());\n\t\t\t\tif (goldenCompass.getWerewolfDistance()<0.1) {\n\t\t\t\t\tSystem.out.println(\"The Werewolf has got you. Your vision turns black... \");\n\t\t\t\t\tSystem.out.println(\"\");\n\t\t\t\t\tgameEnded = true;\n\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\tgoldenCompass.footStepDirection(player.getPosition(), wWolf.getPosition());\n\n\t\t\t}\n\n\t\t\tif (gameEnded) {\n\t\t\t\t// do nothing\n\t\t\t} else if (goldenCompass.getTreasureDistance() < 0.1) {\n\t\t\t\tSystem.out.println(\"You found the tresure, you win!\");\n\n\t\t\t}\n\n\t\t\tSystem.out.println(\"Do you want to carry on playing? Enter 'Yes' to play again\");\n\t\t\tString playerInput = scan.nextLine();\n\n\t\t\tif (playerInput.equals(\"Yes\")) {\n\t\t\t\t// do nothing\n\t\t\t} else {\n\t\t\t\tplayAgain = false;\n\t\t\t\tSystem.out.println(\"Thankyou for playing. Ending Game\");\n\t\t\t}\n\n\t\t}\n\t\tscan.close();\n\n\t}",
"public void run()\n\t{\n\t\tfloat oneFrame = 1000000000.0f / gameFPS;\n\t\t//same but for animation frames\n\t\tfloat oneAnimFrame = 1000000000.0f / animFPS;\n\t\t//current time in nanoseconds\n\t\tlong now = 0;\n\t\t//holds time of last iteration of game loop\n\t\tlong last = System.nanoTime();\n\t\t//how many frames have passed (can be a fraction)\n\t\tfloat delta = 0;\n\t\t//same but for anim frames\n\t\tfloat animDelta = 0;\n\t\t\n\t\t//for counting and displaying only \n\t\tint countFrames = 0;\n\t\tlong lastMilli = System.currentTimeMillis();\n\t\t\n\t\trequestFocus();\n\t\t//game loop\n\t\twhile (playing)\n\t\t{\n\t\t\t\n\t\t\tnow = System.nanoTime();\n\t\t\t//(now - last) time elapsed, divided by oneFrame gives\n\t\t\t//what fraction of a frame has passed\n\t\t\tdelta += (now - last) / oneFrame;\n\t\t\tanimDelta += (now - last) / oneAnimFrame;\n\t\t\tlast = now;\n\t\t\t//keep calling tick for as many frames have passed\n\t\t\t//if it's at least 1\n\t\t\tif (delta >= 1.0f)\n\t\t\t{\n\t\t\t\tcountFrames++;\n\t\t\t\twhile (delta >= 1.0f)\n\t\t\t\t{\n\t\t\t\t\t\n\t\t\t\t\ttick();\n\t\t\t\t\tdelta--;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (animDelta >= 1.0f)\n\t\t\t{\n\t\t\t\twhile (animDelta >= 1.0f)\n\t\t\t\t{\n\t\t\t\t\t\n\t\t\t\t\tanimTick();\n\t\t\t\t\tanimDelta--;\n\t\t\t\t}\n\t\t\t}\n\t\t\trender();\n\t\t\tcountFrames++;\n\t\t\tif (Math.abs(System.currentTimeMillis() - lastMilli) >= 1000)\n\t\t\t{\n\t\t\t\tFPS = countFrames;\n\t\t\t\tcountFrames = 0;\n\t\t\t\tlastMilli = System.currentTimeMillis();\n\t\t\t}\n\t\t}\n\t}",
"public void run() {\r\n\t\tGameArchive ga = GameArchive.getInstance();\r\n\t\tga.newGame();\r\n\t\t_game = ga.getCurrentGame();\r\n\t\tint startRound = 1;\r\n\t\tint endRound = (int)(1.0*cardFinder.getCardsInDeck() /_playerCollection.size());\r\n\t\tint dealer = -1;\r\n\t\tint lead = 0;\r\n\t\tint inc = 1;\r\n\t\tif(go.getGameSpeed().equals(GameSpeed.QUICK_PLAY)) {\r\n\t\t\tinc = 2;\r\n\t\t\tif(_playerCollection.size() != 4) {\r\n\t\t\t\tstartRound = 2;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\r\n\t\tList<Integer> playerIds = getPlayerId();\r\n\t\tList<String> playerNames = getPlayerNames();\r\n\t\tfor (int i = 0; i < playerIds.size(); i++) {\r\n\t\t\t_game.addPlayer(playerIds.get(i), playerNames.get(i));\r\n\t\t}\r\n\t\tgameEventNotifier.notify(new NewGameEvent(playerIds,playerNames));\r\n\t\tfor (int roundId = startRound; roundId < endRound + 1; roundId = roundId + inc) {\r\n\t\t\tdealer = (dealer + 1)% _playerCollection.size();\r\n\t\t\tlead = (dealer + 1)% _playerCollection.size();\r\n\t\t\tgameEventNotifier.notify(new NewRoundEvent(roundId));\r\n\t\t\t_game.newRound(roundId);\r\n\t\t\tRound round = _game.getCurrentRound();\r\n\t\t\tCard trump = dealCards(roundId, dealer, lead);\r\n\t\t\tgameEventNotifier.notify(new NewTrumpEvent(trump));\r\n\t\t\tround.setTrump(trump);\r\n\r\n\t\t\tif(trump != null && trump.getValue().equals(Value.WIZARD)) {\r\n\t\t\t\tPlayer trumpPicker = _playerCollection.get(dealer);\r\n\t\t\t\t//_logger.info(trumpPicker.getName() + \" gets to pick trump.\");\r\n\t\t\t\ttrump = new Card(null, trumpPicker.pickTrump(), -1);\r\n\t\t\t\tgameEventNotifier.notify(new NewTrumpEvent(trump));\r\n\t\t\t\tround.setTrump(trump);\r\n\t\t\t}\r\n\t\t\tint cardsDealt = roundId;\r\n\t\t\tBid bid = bid(trump, lead, cardsDealt, round);\r\n\t\t\tif(go.getBidType().equals(BidType.HIDDEN)) {\r\n\t\t\t\tfor(IndividualBid individualBid :bid.getBids()) {\r\n\t\t\t\t\tgameEventNotifier.notify(new PlayerBidEvent(individualBid.getPlayer().getId(), individualBid.getBid()));\r\n\t\t\t\t\tround.setBid(individualBid.getPlayer().getId(), individualBid.getBid());\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tRoundSummary roundSummary = new RoundSummary();\r\n\t\t\tfor (int i = 0; i < roundId; i++) {\r\n\t\t\t\tTrickTracker trickTracker = playTrick(trump, lead, round);\r\n\t\t\t\troundSummary.addTrickTracker(trickTracker);\r\n\t\t\t\tint playerIdWhoWon = trickTracker.winningPlay().getPlayerId();\r\n\t\t\t\tlead = findPlayerIndex(playerIdWhoWon);\r\n\t\t\t}\r\n\t\t\tif(go.getBidType().equals(BidType.SECRET)) {\r\n\t\t\t\tfor(IndividualBid individualBid :bid.getBids()) {\r\n\t\t\t\t\tgameEventNotifier.notify(new PlayerBidEvent(individualBid.getPlayer().getId(), individualBid.getBid()));\r\n\t\t\t\t\tround.setBid(individualBid.getPlayer().getId(), individualBid.getBid());\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tscoreRound(roundSummary, bid, _game);\r\n\t\t\tthis.overallScores.displayScore();\r\n\t\t}\r\n\t\tCollection<Integer> winningPlayerIds = calcWinningIds();\r\n\t\tCollection<String> winningPlayers = getPlayerNames(winningPlayerIds);\r\n\t\tfor(int winningIds:winningPlayerIds) {\r\n\t\t\t_game.addWinner(winningIds);\r\n\t\t}\r\n\t\tgameEventNotifier.notify(new GameOverEvent(winningPlayerIds, winningPlayers));\r\n\t}",
"public static void main(String[] args) {\n Game game = new HaMGame();\n game.playGame();\n }"
] |
[
"0.7917146",
"0.7864303",
"0.78050405",
"0.78039455",
"0.76873326",
"0.76036185",
"0.7584336",
"0.7540097",
"0.7520956",
"0.7505399",
"0.7488428",
"0.74806863",
"0.74791926",
"0.7476421",
"0.74729323",
"0.74605864",
"0.74292094",
"0.7410888",
"0.73619556",
"0.7359243",
"0.7345029",
"0.73360246",
"0.7317284",
"0.7315673",
"0.73136955",
"0.72964656",
"0.7263156",
"0.72419477",
"0.7225351",
"0.72209805",
"0.7210625",
"0.72104317",
"0.72063226",
"0.7204731",
"0.7194322",
"0.7180679",
"0.71686614",
"0.71314555",
"0.71301067",
"0.7110126",
"0.7102022",
"0.7084626",
"0.7079339",
"0.7078861",
"0.7077785",
"0.70756793",
"0.7075593",
"0.70609796",
"0.7039032",
"0.7036689",
"0.7028341",
"0.70271945",
"0.70254415",
"0.7021717",
"0.70157367",
"0.7001585",
"0.699937",
"0.6993189",
"0.69911486",
"0.69887596",
"0.6982396",
"0.6978541",
"0.6962749",
"0.6957561",
"0.69465494",
"0.6943655",
"0.69379866",
"0.6935005",
"0.6931214",
"0.69277924",
"0.6924747",
"0.6923206",
"0.692235",
"0.69153976",
"0.6914884",
"0.69071317",
"0.6905157",
"0.6902854",
"0.6901836",
"0.6895435",
"0.6891975",
"0.68837315",
"0.688185",
"0.6879361",
"0.6879063",
"0.68748343",
"0.6874617",
"0.6872476",
"0.687101",
"0.6870319",
"0.6859483",
"0.68501985",
"0.6844397",
"0.6843496",
"0.6843496",
"0.6816681",
"0.68130815",
"0.6800622",
"0.68005085",
"0.6798994",
"0.6797325"
] |
0.0
|
-1
|
/ Menu method Print the menu to the console
|
public static void menu() {
System.out.println("\nPlease select which type of argument to generate by entering the associated number.\n");
for(int i = 0; i < type.length; i++) {
System.out.println((i+1)+". "+type[i]);
}
System.out.println("8. Quit");
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public static void menu() {\n\t\tSystem.out.println(\"Menu:\");\n\t\tSystem.out.println(\"1: Create\");\n\t\tSystem.out.println(\"2: Merge\");\n\t\tSystem.out.println(\"3: Collection\");\n\t\tSystem.out.println(\"4: Upgrades\");\n\t\tSystem.out.println(\"5: Sell\");\n\t\tSystem.out.println(\"6: Identify Crystal\");\n\t\tSystem.out.println(\"\");\n\t}",
"protected void printMenu() {\n System.out.println(\"\\nChoose an option:\");\n }",
"private void printMenu() {\n\t\tSystem.out.printf(\"\\n********** MiRide System Menu **********\\n\\n\");\n\n\t\tSystem.out.printf(\"%-30s %s\\n\", \"Create Car\", \"CC\");\n\t\tSystem.out.printf(\"%-30s %s\\n\", \"Book Car\", \"BC\");\n\t\tSystem.out.printf(\"%-30s %s\\n\", \"Complete Booking\", \"CB\");\n\t\tSystem.out.printf(\"%-30s %s\\n\", \"Display ALL Cars\", \"DA\");\n\t\tSystem.out.printf(\"%-30s %s\\n\", \"Search Specific Car\", \"SS\");\n\t\tSystem.out.printf(\"%-30s %s\\n\", \"Search Available Cars\", \"SA\");\n\t\tSystem.out.printf(\"%-30s %s\\n\", \"Seed Data\", \"SD\");\n\t\tSystem.out.printf(\"%-30s %s\\n\", \"Load Cars\", \"LC\");\n\t\tSystem.out.printf(\"%-30s %s\\n\", \"Exit Program\", \"EX\");\n\t\tSystem.out.println(\"\\nEnter your selection: \");\n\t\tSystem.out.println(\"(Hit enter to cancel any operation)\");\n\t}",
"public static void printMenu()\r\n\t{\r\n\t\tSystem.out.println(\"A) Add Scene\");\r\n\t\tSystem.out.println(\"R) Remove Scene\");\r\n\t\tSystem.out.println(\"S) Show Current Scene\");\r\n\t\tSystem.out.println(\"P) Print Adventure Tree\");\r\n\t\tSystem.out.println(\"B) Go Back A Scene\");\r\n\t\tSystem.out.println(\"F) Go Forward A Scene \");\r\n\t\tSystem.out.println(\"G) Play Game\");\r\n\t\tSystem.out.println(\"N) Print Path To Cursor\");\r\n\t\tSystem.out.println(\"M) Move Scene\");\r\n\t\tSystem.out.println(\"Q) Quit\");\r\n\t\tSystem.out.println();\r\n\t}",
"private void displayMenu()\r\n {\r\n System.out.println();\r\n System.out.println(\"--------- Main Menu -------------\");\r\n System.out.println(\"(1) Search Cars\");\r\n System.out.println(\"(2) Add Car\");\r\n System.out.println(\"(3) Delete Car\");\r\n System.out.println(\"(4) Exit System\");\r\n System.out.println(\"(5) Edit Cars\");\r\n }",
"public void printMenu()\n\t{\n\t\tSystem.out.println(SearchMenu.MENU_HEAD);\n\t\tSystem.out.println(SearchMenu.TYPE_MESSAGE );\n\t\tSystem.out.println(SearchMenu.QUIT);\n\t\tSystem.out.println(SearchMenu.MENU_TAIL);\n\t\tSystem.out.println(SearchMenu.INPUT_PROMPT);\n\t}",
"private void printMenu()\n {\n System.out.println(\"\");\n System.out.println(\"*** Salg ***\");\n System.out.println(\"(0) Tilbage\");\n System.out.println(\"(1) Opret\");\n System.out.println(\"(2) Find\");\n System.out.println(\"(3) Slet\");\n System.out.print(\"Valg: \");\n }",
"public void printMenu()\n\t{\n\t\tSystem.out.println(ChatMenu.MENU_HEAD);\n\t\tSystem.out.println(ChatMenu.TYPE_MESSAGE);\n\t\tSystem.out.println(ChatMenu.QUIT);\n\t\tSystem.out.println(ChatMenu.MENU_TAIL);\n\t\tSystem.out.println(ChatMenu.INPUT_PROMPT);\n\t}",
"public static void printMenu() {\n System.out.print(\"\\n(A)dd Item (R)emove Item (F)ind Item (I)nitialize Tree (N)ew Tree (Q)uit\\n\");\n }",
"public static void printMenu(){\n System.out.print(\"1. List all writing groups\\n\" +\n \"2. List all the data for one writing group\\n\"+\n \"3. List all publishers\\n\"+\n \"4. List all the data for one publisher\\n\"+\n \"5. List all books\\n\"+\n \"6. List all the data for one book\\n\"+\n \"7. Insert new book\\n\"+\n \"8. Insert new publisher\\n\"+\n \"9. Remove a book\\n\"+\n \"10. Quit\\n\\n\");\n }",
"public static void f_menu() {\n System.out.println(\"----------------------------------------\");\n System.out.println(\"--------------DIGITALSOFT---------------\");\n System.out.println(\"-----version:1.0------28/04/2020.-------\");\n System.out.println(\"-----Angel Manuel Correa Rivera---------\");\n System.out.println(\"----------------------------------------\");\n }",
"public void printMenu()\n\t{\n\t\tSystem.out.println(ChatMenu.MENU_HEAD);\n\t\tSystem.out.println(ChatMenu.TYPE_MESSAGE + ChatMaintainer.CS().getPartner());\n\t\tSystem.out.println(ChatMenu.QUIT);\n\t\tSystem.out.println(ChatMenu.MENU_TAIL);\n\t\tSystem.out.println(ChatMenu.INPUT_PROMPT);\n\t}",
"public static void readMenu(){\n\t\tSystem.out.println(\"Menu....\");\n\t\tSystem.out.println(\"=====================\");\n\t\tSystem.out.println(\"1. Book A Ticket\\t2. See Settings\\n3. Withdraw\\t4. Deposit\");\n\n\t}",
"private static void showMenu() {\n System.out.println(\"1. Dodaj zadanie\");\n System.out.println(\"2. Wykonaj zadanie.\");\n System.out.println(\"3. Zamknij program\");\n }",
"private void printMenu() {\n\t\tSystem.out.println(\"Select an option :\\n----------------\");\n\t\tfor (int i = 0, size = OPTIONS.size(); i < size; i++) {\n\t\t\tSystem.out.println(OPTIONS.get(i));\n\t\t}\n\t}",
"void printMainMenu(){\n\t\tSystem.out.println(\"\\n\\nMarketo Music\");\n\t\tSystem.out.println(\"Main Menu\");\n\t\tSystem.out.println(\"1. Create Playlist: create <playlist name>\");\n\t\tSystem.out.println(\"2. Edit Playlist: edit <playlist id>\");\n\t\tSystem.out.println(\"3. Print Song: song <song id>\");\n\t\tSystem.out.println(\"4. Print Playlist: playlist <playlist id>\");\n\t\tSystem.out.println(\"5. Print All Songs or Playlists: print song/playlist\");\n\t\tSystem.out.println(\"6. Search Song: search artist/title <string of words to be searched>\");\n\t\tSystem.out.println(\"7. Sort songs: sort artist/title\");\n\t\tSystem.out.println(\"8. Quit: quit\");\n\t\tSystem.out.print(\"Enter a Command : \");\n\t}",
"public void printMenu()\n {\n String menu = (\"------------- Menu -------------\\nDisplay collection\\nCheck out materials\\nQuit\\n--------------------------------\\nPlease click one of the buttons to the right\");\n jTextPane1.setText(menu);\n jButton1.enableInputMethods(true);\n jButton2.enableInputMethods(true);\n jButton3.enableInputMethods(true);\n jButton4.enableInputMethods(false);\n }",
"private void menu() { \r\n\t\tSystem.out.println(\" ---------WHAT WOULD YOU LIKE TO DO?---------\");\r\n\t\tSystem.out.println(\"1) Move\");\r\n\t\tSystem.out.println(\"2) Save\");\r\n\t\tSystem.out.println(\"3) Quit\");\r\n\t\t\r\n\t}",
"@Override\r\n\tpublic void menu() {\n\t\tSystem.out.println(\"go to menu\");\r\n\t\t\r\n\t}",
"public static void f_menu(){\n System.out.println(\"_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/\");\n System.out.println(\"_/_/_/_/_/_/softvectorwhith/_/_/_/_/_/_/\");\n System.out.println(\"/_/_/_/version 1.0 2020-oct-29_/_/_/_/_/\");\n System.out.println(\"/_/maked by Andres Felipe Torres Lopez_/\");\n System.out.println(\"_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/\");\n }",
"private static void printMainMenu() {\n\t\tprintln(\"Main Menu:\");\n\t\tprintln(\"\\tI: Import Movie <Title>\");\n\t\tprintln(\"\\tD: Delete Movie <Title>\");\n\t\tprintln(\"\\tS: Sort Movies\");\n\t\tprintln(\"\\tA: Sort Actors\");\n\t\tprintln(\"\\tQ: Quit\");\n\t}",
"private void displayMenu()\r\n {\r\n System.out.println(\"\\nWelcome to Car Park System\");\r\n System.out.println(\"=============================\");\r\n System.out.println(\"(1)Add a Slot \");\r\n System.out.println(\"(2)Delete a Slot\");\r\n System.out.println(\"(3)List all Slots\");\r\n System.out.println(\"(4)Park a Car\");\r\n System.out.println(\"(5)Find a Car \");\r\n System.out.println(\"(6)Remove a Car\");\r\n System.out.println(\"(7)Exit \");\r\n System.out.println(\"\\nSelect an Option: \");\r\n }",
"public static void WriteMainMenu(){\r\n System.out.println(\"\\n=================Welcome to McDonalds=================\");\r\n System.out.println(\"1. Take Order \\n2. Edit McDonalds Menu \\n3. Exit application \");\r\n }",
"public void displayMenu()\n {\n System.out.println(\"-----------------Welcome to 256 Game------------------\");\n System.out.println(\"press 1 to register a player\");\n System.out.println(\"press 2 to start a new game\");\n System.out.println(\"press 3 to view a help menu\");\n System.out.println(\"press 4 to exist\");\n System.out.println(\"------------------------------------------------------\");\n }",
"public static void displayMenu() {\r\n System.out.print(\"\\nName Saver Server Menu\\n\\n\"\r\n +\"1. Add a name\\n2. Remove a name\\n3. List all names\\n\"\r\n +\"4. Check if name recorded\\n5. Exit\\n\\n\"\r\n +\"Enter selection [1-5]:\");\r\n }",
"public void mainMenu() {\n\n System.out.println(\"\\n HOTEL RESERVATION SYSTEM\");\n System.out.println(\"+------------------------------------------------------------------------------+\");\n System.out.println(\" COMMANDS:\");\n System.out.println(\" - View Tables\\t\\t(1)\");\n System.out.println(\" - Add Records\\t\\t(2)\");\n System.out.println(\" - Update Records\\t(3)\");\n System.out.println(\" - Delete Records\\t(4)\");\n System.out.println(\" - Search Records\\t(5)\");\n System.out.println(\"+------------------------------------------------------------------------------+\");\n System.out.print(\" > \");\n }",
"public void menu()\n {\n System.out.println(\"\\n\\t\\t============================================\");\n System.out.println(\"\\t\\t|| Welcome to the Movie Database ||\");\n System.out.println(\"\\t\\t============================================\");\n System.out.println(\"\\t\\t|| (1) Search Movie ||\");\n System.out.println(\"\\t\\t|| (2) Add Movie ||\");\n System.out.println(\"\\t\\t|| (3) Delete Movie ||\");\n System.out.println(\"\\t\\t|| (4) Display Favourite Movies ||\");\n System.out.println(\"\\t\\t|| (5) Display All Movies ||\");\n System.out.println(\"\\t\\t|| (6) Edit movies' detail ||\");\n System.out.println(\"\\t\\t|| (7) Exit System ||\");\n System.out.println(\"\\t\\t=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\");\n System.out.print( \"\\t\\tPlease insert your option: \");\n }",
"static void displayMenu(){\n\t\tSystem.out.println(\"\");\n\t\tSystem.out.println(\"Select operation:\");\n\t\tSystem.out.println(\"1-List movies\");\n\t\tSystem.out.println(\"2-Show movie details\");\n\t\tSystem.out.println(\"3-Add a movie\");\n\t\tSystem.out.println(\"4-Add an example set of 5 movies\");\n\t\tSystem.out.println(\"5-Exit\");\n\t}",
"public static void printMenu(){\r\n try{\r\n Thread.sleep(100);\r\n }catch(Exception e){}\r\n System.out.println(\"Use numbers to choose a option:\");\r\n System.out.println(\"1.- New Order.\");\r\n System.out.println(\"2.- Add to exist Order.\");\r\n System.out.println(\"3.- Show Order.\");\r\n System.out.println(\"4.- Administration.\");\r\n System.out.println(\"5.- Exit.\");\r\n System.out.print(\"-> \");\r\n }",
"private void displayMenu() {\r\n System.out.println(\"\\nSelect an option from below:\");\r\n System.out.println(\"\\t1. View current listings\");\r\n System.out.println(\"\\t2. List your vehicle\");\r\n System.out.println(\"\\t3. Remove your listing\");\r\n System.out.println(\"\\t4. Check if you won bid\");\r\n System.out.println(\"\\t5. Save listings file\");\r\n System.out.println(\"\\t6. Exit application\");\r\n\r\n }",
"private void printMainMenu(){\n\t\tprint(\"Please choose from the options below\", System.lineSeparator()+\"1.Login\", \"2.Exit\");\n\t}",
"private static void showMenu(){\r\n\t\tSystem.out.println();\r\n\t\tSystem.out.println(\"What would you like to do?\");\r\n\t\tSystem.out.println(\"0) Show Shape information\");\r\n\t\tSystem.out.println(\"1) Create Shape\");\r\n\t\tSystem.out.println(\"2) Calculate perimeter\");\r\n\t\tSystem.out.println(\"3) Calculate area\");\r\n\t\tSystem.out.println(\"4) Scale shape\");\r\n\t}",
"private void mainMenu() {\n System.out.println(\"Canteen Management System\");\n System.out.println(\"-----------------------\");\n System.out.println(\"1. Show Menu\");\n System.out.println(\"2.AcceptReject\");\n System.out.println(\"3.place orders\");\n System.out.println(\"4.show orders\");\n System.out.println(\"5. Exit\");\n mainMenuDetails();\n }",
"private String print_Menu()\n\t{\n\t\tSystem.out.println(\"\\n----------CS542 Link State Routing Simulator----------\");\n\t\tSystem.out.println(\"(1) Create a Network Topology\");\n\t\tSystem.out.println(\"(2) Build a Forward Table\");\n\t\tSystem.out.println(\"(3) Shortest Path to Destination Router\");\n\t\tSystem.out.println(\"(4) Modify a Topology (Change the status of the Router)\");\n\t\tSystem.out.println(\"(5) Best Router for Broadcast\");\n\t\tSystem.out.println(\"(6) Exit\");\n\t\tSystem.out.print(\"Master Command: \");\n\n\t\treturn scan.next();\n\t}",
"private void printMainMenu() {\n\t\tSystem.out.println(\"1. Go adventuring\");\n\t\tSystem.out.println(\"2. Enter tavern\");\n\t\tSystem.out.println(\"3. Show details about your character\");\n\t\tSystem.out.println(\"4. Exit game\");\n\t}",
"public void menuDisplay() {\n\t\t\n\t\tjava.lang.System.out.println(\"\");\n\t\tjava.lang.System.out.println(\"~~~~~~~~~~~~Display System Menu~~~~~~~~~~~~\");\n\t\tjava.lang.System.out.println(\"**** Enter a Number from the Options Below ****\");\n\t\tjava.lang.System.out.println(\"Choice 1 – Print System Details\\n\" + \n\t\t\t\t\t\t \"Choice 2 - Display System Properties\\n\" +\n\t\t\t\t\t\t \"Choice 3 – Diagnose System\\n\" + \n\t\t\t\t\t\t \"Choice 4 – Set Details\\n\" + \n\t\t\t\t\t\t \"Choice 5 – Quit the program\");\n\t\t\n\t}",
"public void showMenu() {\n\t\tSystem.out.println();\n\t\tSystem.out.println(\"\\t1. Show vertices\");\n\t\tSystem.out.println(\"\\t2. Show adjacent vertices\");\n\t\tSystem.out.println(\"\\t3. Get vertex count\");\n\t\tSystem.out.println(\"\\t4. Get edge count\");\n\t\tSystem.out.println(\"\\t5. Add vertex\");\n\t\tSystem.out.println(\"\\t6. Add edge\");\n\t\tSystem.out.println(\"\\t7. Remove vertex\");\n\t\tSystem.out.println(\"\\t8. Remove edge\");\n\t\tSystem.out.println(\"\\t9. Check connectivity\");\n\t\tSystem.out.println(\"\\t0. Check adjacency\");\n\t\tSystem.out.println(\"\\tTRAVERSAL ALGORITHMS\");\n\t\tSystem.out.println(\"\\t11. Depth-first traversal\");\n\t\tSystem.out.println(\"\\t12. Breadth-first traversal\");\n\t\t\n\t\tSystem.out.println(\"\\tINPUT -1 TO EXIT\");\n\t\tSystem.out.println();\n\t}",
"private void mainMenu() {\r\n System.out.println(\"Canteen Management System\");\r\n System.out.println(\"-----------------------\");\r\n System.out.println(\"1. Show Menu\");\r\n System.out.println(\"2. Employee Login\");\r\n System.out.println(\"3. Vendor Login\");\r\n System.out.println(\"4. Exit\");\r\n mainMenuDetails();\r\n }",
"private static void displayMenu() {\n\t\tSystem.out.println(\"\\n\\nWelcome to Seneca@York Bank!\\n\" +\n\t\t\t\t\"1. Open an account.\\n\" +\n\t\t\t\t\"2. Close an account.\\n\" +\n\t\t\t\t\"3. Deposit money.\\n\" +\n\t\t\t\t\"4. Withdraw money.\\n\" +\n\t\t\t\t\"5. Display accounts. \\n\" +\n\t\t\t\t\"6. Display a tax statement.\\n\" +\n\t\t\t\t\"7. Exit\\n\");\n\t}",
"public void menu() {\n System.out.println(\n \" Warehouse System\\n\"\n + \" Stage 3\\n\\n\"\n + \" +--------------------------------------+\\n\"\n + \" | \" + ADD_CLIENT + \")\\tAdd Client |\\n\"\n + \" | \" + ADD_PRODUCT + \")\\tAdd Product |\\n\"\n + \" | \" + ADD_SUPPLIER + \")\\tAdd Supplier |\\n\"\n + \" | \" + ACCEPT_SHIPMENT + \")\\tAccept Shipment from Supplier |\\n\"\n + \" | \" + ACCEPT_ORDER + \")\\tAccept Order from Client |\\n\"\n + \" | \" + PROCESS_ORDER + \")\\tProcess Order |\\n\"\n + \" | \" + CREATE_INVOICE + \")\\tInvoice from processed Order |\\n\"\n + \" | \" + PAYMENT + \")\\tMake a payment |\\n\"\n + \" | \" + ASSIGN_PRODUCT + \")\\tAssign Product to Supplier |\\n\"\n + \" | \" + UNASSIGN_PRODUCT + \")\\tUnssign Product to Supplier |\\n\"\n + \" | \" + SHOW_CLIENTS + \")\\tShow Clients |\\n\"\n + \" | \" + SHOW_PRODUCTS + \")\\tShow Products |\\n\"\n + \" | \" + SHOW_SUPPLIERS + \")\\tShow Suppliers |\\n\"\n + \" | \" + SHOW_ORDERS + \")\\tShow Orders |\\n\"\n + \" | \" + GET_TRANS + \")\\tGet Transaction of a Client |\\n\"\n + \" | \" + GET_INVOICE + \")\\tGet Invoices of a Client |\\n\"\n + \" | \" + SAVE + \")\\tSave State |\\n\"\n + \" | \" + MENU + \")\\tDisplay Menu |\\n\"\n + \" | \" + EXIT + \")\\tExit |\\n\"\n + \" +--------------------------------------+\\n\");\n }",
"static void DisplayMainMenu()\n {\n \tSystem.out.println(\"******\");\n \tSystem.out.println(\"Menu\");\n \tSystem.out.println(\"******\");\n \tSystem.out.println(\"Enter Selection\");\n \tSystem.out.println(\"1) Send Message\");\n \tSystem.out.println(\"2) Receive Message\");\n \tSystem.out.println(\"3) Run regression test\");\n }",
"private void displayMenu() {\n System.out.println(\"\\nSelect from:\");\n System.out.println(\"\\t1 -> add item to to-do list\");\n System.out.println(\"\\t2 -> remove item from to-do list\");\n System.out.println(\"\\t3 -> view to-do list\");\n System.out.println(\"\\t4 -> save work room to file\");\n System.out.println(\"\\t5 -> load work room from file\");\n System.out.println(\"\\t6 -> quit\");\n }",
"static void montaMenu() {\n System.out.println(\"\");\r\n System.out.println(\"1 - Novo cliente\");\r\n System.out.println(\"2 - Lista clientes\");\r\n System.out.println(\"3 - Apagar cliente\");\r\n System.out.println(\"0 - Finalizar\");\r\n System.out.println(\"Digite a opcao desejada: \");\r\n System.out.println(\"\");\r\n }",
"private void displayMenu() {\n\t\tSystem.out.println(\"********Loan Approval System***********\");\n\t\tSystem.out.println(\"\\n\");\n\t\tSystem.out.println(\n\t\t\t\t\"Choose the following options:\\n(l)Load Applicaitons\\n(s)Set the Budget\\n(m)Make a decision\\n(p)Print\\n(u)Update the application\");\n\n\t}",
"public void displayMenu() {\r\n\t\tSystem.out.println(\"Enter a number between 0 and 8 as explained below: \\n\");\r\n\t\tSystem.out.println(\"[\" + ADD_CUSTOMER + \"] Add a customer.\");\r\n\t\tSystem.out.println(\"[\" + ADD_MODEL + \"] Add a model.\");\r\n\t\tSystem.out.println(\"[\" + ADD_TO_INVENTORY + \"] Add a washer to inventory.\");\r\n\t\tSystem.out.println(\"[\" + PURCHASE + \"] Purchase a washer.\");\r\n\t\tSystem.out.println(\"[\" + LIST_CUSTOMERS + \"] Display all customers.\");\r\n\t\tSystem.out.println(\"[\" + LIST_WASHERS + \"] Display all washers.\");\r\n\t\tSystem.out.println(\"[\" + DISPLAY_TOTAL + \"] Display total sales.\");\r\n\t\tSystem.out.println(\"[\" + SAVE + \"] Save data.\");\r\n\t\tSystem.out.println(\"[\" + EXIT + \"] to Exit\");\r\n\t}",
"public static void menuInicial() {\n System.out.println(\"Boas vindas à Arena pokemon Treinador!!!\");\n System.out.println(\"Digite 1 para fazer sua inscrição\");\n System.out.println(\"Digite 2 para sair\");\n\n }",
"private static void mostrarMenu() {\n\t\tSystem.out.println(\"------------------------------\");\n\t\tSystem.out.println(\"-----------OPCIONES-----------\");\n\t\tSystem.out.println(\"------------------------------\");\n\t\tSystem.out.println();\n\t\tSystem.out.println(\"\\n\\t1) Mostrar los procesos\");\n\t\tSystem.out.println(\"\\n\\t2) Parar un proceso\");\n\t\tSystem.out.println(\"\\n\\t3) Arrancar un proceso\");\n\t\tSystem.out.println(\"\\n\\t4) A�adir un proceso\");\n\t\tSystem.out.println(\"\\n\\t5) Terminar ejecucion\");\n\t\tSystem.out.println(\"\\n------------------------------\");\n\t}",
"@Override\n\tpublic void showmenu() {\n\t\t\n\t\tint choice;\n \n System.out.println(\"请选择1.查询 2.退出\");\n choice=console.nextInt();\n \n switch (choice){\n \n case 1:\n Menu.searchMenu();\n break;\n default:\n \tSystem.out.println(\"感谢您使用本系统 欢迎下次使用!\");\n System.exit(0);\n }\n \n \n\t}",
"private void presentMenu() {\n System.out.println(\"\\nHi there, kindly select what you would like to do:\");\n System.out.println(\"\\ta -> add a task\");\n System.out.println(\"\\tr -> remove a task\");\n System.out.println(\"\\tc -> mark a task as complete\");\n System.out.println(\"\\tm -> modify a task\");\n System.out.println(\"\\tv -> view all current tasks as well as tasks saved previously\");\n System.out.println(\"\\tct -> view all completed tasks\");\n System.out.println(\"\\ts -> save tasks to file\");\n System.out.println(\"\\te -> exit\");\n }",
"public static void printMenu(BankAgency ag) {\n\t\tSystem.out.println(\"Menu of \" + ag.getAgencyName() + \" (\" + ag.getAgencyLoc() + \")\");\n\t\tSystem.out.println(\"1 - List of the Agency accounts\");\n\t\tSystem.out.println(\"2 - See an account (by its number)\");\n\t\tSystem.out.println(\"3 - Operation on account\");\n\t\tSystem.out.println(\"4 - Account management\");\n\t\tSystem.out.println(\"0 - Quit\");\n\t\tSystem.out.print(\"Choice -> \");\n\t}",
"public static void f_menu(){\n System.out.println(\"------------------------------------------------\");\n System.out.println(\"------------------------------------------------\");\n System.out.println(\"-------------Soft_AVERAGE_HEIGHT-----------------\");\n System.out.println(\"-------------version 1.0 23-oct-2020------------\");\n System.out.println(\"-------------make by Esteban Gaona--------------\");\n System.out.println(\"-------------------------------------------------\");\n System.out.println(\"-------------------------------------------------\");\n}",
"public void PrintMenu() throws IOException {\r\n\t\t//loop the menu until the user chooses to quit\r\n\t\twhile (true) {\r\n\t\t\tSystem.out.println(\"Welcome to the EnigmaMachine command interface!\");\r\n\t\t\tSystem.out.println(\"Enter 1 to add the plugs\");\r\n\t\t\tSystem.out.println(\"Enter 2 to add the rotors\");\r\n\t\t\tSystem.out.println(\"Enter 3 to add the reflector\");\r\n\t\t\tSystem.out.println(\"Enter 4 to enter the message\");\r\n\t\t\tSystem.out.println(\"Enter 5 to quit the menu and start the machine\");\r\n\t\t\t\r\n\t\t\tint option = this.readIntegerFromCmd();\r\n\t\t\t//jump to different method according to the input of the user\r\n\t\t\tif (option == 1) {\r\n\t\t\t\tthis.addPlug();\r\n\t\t\t}else if (option == 2) {\r\n\t\t\t\tthis.addRotors();\r\n\t\t\t}else if (option == 3) {\r\n\t\t\t\tthis.addReflector();\r\n\t\t\t}else if (option == 4) {\r\n\t\t\t\tthis.addMessage();\r\n\t\t\t}else if (option == 5) {\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public static void mainMenu() {\r\n\t\tSystem.out.println(\"============= Text-Werkzeuge =============\");\r\n\t\tSystem.out.println(\"Bitte Aktion auswählen:\");\r\n\t\tSystem.out.println(\"1: Text umkehren\");\r\n\t\tSystem.out.println(\"2: Palindrom-Test\");\r\n\t\tSystem.out.println(\"3: Wörter zählen\");\r\n\t\tSystem.out.println(\"4: Caesar-Chiffre\");\r\n\t\tSystem.out.println(\"5: Längstes Wort ermitteln\");\r\n\t\tSystem.out.println(\"0: Programm beenden\");\r\n\t\tSystem.out.println(\"==========================================\");\r\n\t}",
"public static void main(String[] args) throws IOException {\n\n\n Menu.displayMenu();\n }",
"public void menu() {\n m.add(\"Go adventuring!!\", this::goAdventuring );\n m.add(\"Display information about your character\", this::displayCharacter );\n m.add(\"Visit shop\", this::goShopping);\n m.add (\"Exit game...\", this::exitGame);\n }",
"public static void mainMenu() \n\t{\n\t\t// display menu\n\t\tSystem.out.print(\"\\nWhat would you like to do?\" +\n\t\t\t\t\"\\n1. Enter a new pizza order (password required)\" +\n\t\t\t\t\"\\n2. Change information of a specific order (password required)\" +\n\t\t\t\t\"\\n3. Display details for all pizzas of a specific size (s/m/l)\" +\n\t\t\t\t\"\\n4. Statistics of today's pizzas\" +\n\t\t\t\t\"\\n5. Quit\" +\n\t\t\t\t\"\\nPlease enter your choice: \");\t\n\t}",
"public static void displayMenu(){\n //*Displays the Menu\n System.out.printf( \"%-15s%-10s%-40s%-5s\\n\", \"Food Item\", \"Size\", \"Options\", \"Price\" );\n System.out.printf( \"%-15s%-10s%-40s%-5s\\n\", \"---------\", \"----\", \"-------\", \"-----\" );\n System.out.printf( \"%-15s%-10s%-40s%-5s\\n\", \"Drink\", \"S,M,L\", \"Sprite, Rootbeer, and Orange Fanta\", \"$5.50 for small, +$.50 for each size increase\\n\" );\n System.out.printf( \"%-15s%-10s%-40s%-5s\\n\", \"Burger\", \"N/A\", \"Extra Patty, bacon, cheese, lettuce\", \"$3.00 for a burger, +$.50 for additional toppings\" );\n System.out.printf( \"%-15s%-10s%-40s%-5s\\n\", \"\", \"\", \"tomato, pickles, onions\", \"\\n\" );\n System.out.printf( \"%-15s%-10s%-40s%-5s\\n\", \"Pizza\", \"S,M,L\", \"Pepperoni, sausage, peppers, chicken\", \"$5.00 for small, +$2.50 for each size increase,\" );\n System.out.printf( \"%-15s%-10s%-40s%-5s\\n\", \"\", \"\", \"salami, tomatoes, olives, anchovies\", \"+$1.00 for each extra topping\" );\n }",
"static void mostrarMenu(){\n \t\t\n\t\tout.println();\n\t\tout.println(\"1. Crear lavadora.\");\n\t\tout.println(\"2. Mostrar lavadoras.\");\n\t\tout.println(\"3. Seleccionar lavadora.\");\n\t\tout.println(\"4. Cargar agua.\");\n\t\tout.println(\"5. Cargar ropa.\");\n\t\tout.println(\"6. Cargar detergente.\");\n\t\tout.println(\"7. Especificar tiempo.\");\n\t\tout.println(\"8. Drenar.\");\n\t\tout.println(\"9. Mostrar estado de la lavadora.\");\n\t\tout.println(\"10. Mostrar estado de la ropa.\");\n\t\tout.println(\"11. Pausar o Reanudar lavadora\");\n\t\tout.println(\"12. Probar sistema.\");\n\t\tout.println(\"13. Reiniciar sistema.\");\n\t\tout.println(\"22. Salir\");\n\t\tout.println((SELECTNOW != -1) ? \"!/*!/* Lv seleccionada: \" + SELECTNOW + \" !/*!/*\": \"\");\n\t\tout.println();\n\t}",
"public void displaymenu()\r\n\t{\r\n\t\tSystem.out.println(\"Welcome to the COMP2396 Authentication system!\");\r\n\t\tSystem.out.println(\"1. Authenticate user\");\r\n\t\tSystem.out.println(\"2. Add user record\");\r\n\t\tSystem.out.println(\"3. Edit user record\");\r\n\t\tSystem.out.println(\"4. Reset user password\");\r\n\t\tSystem.out.println(\"What would you like to perform?\");\r\n\t}",
"void printPlaylistMenu(){\n\t\tSystem.out.println(\"\\n\\nPlaylist Menu:\");\n\t\tSystem.out.println(\"1. Delete Song: delete <song id>\");\n\t\tSystem.out.println(\"2. Insert Song: insert <song id>\");\n\t\tSystem.out.println(\"3. Search and Insert Song: insert_search title/artist <string of words to be searched>\");\n\t\tSystem.out.println(\"4. Print Playlist: print\");\n\t\tSystem.out.println(\"5. Sort songs: sort artist/title\");\n\t\tSystem.out.println(\"6. Search Song: search artist/title <string of words to be searched>\");\n\t\tSystem.out.println(\"7. Main Menu: main\");\n\t\tSystem.out.print(\"Enter a Command : \");\n\t}",
"public static void afficherMenu() {\r\n System.out.println(\"\\n## Menu de l'application ##\\n\" +\r\n \" Actions Membres :\\n\"+\r\n \" [ 1] : Inscription d'un Membre\\n\" +\r\n \" [ 2] : Désinscription d'un Membre\\n\" +\r\n \" ( 3) : Afficher liste des Membres\\n\" +\r\n \" [ 4] : Payer Cotisation\\n\" +\r\n \" Actions vote Arbres d'un Membre :\\n\" +\r\n \" ( 5) : Voter pour un Arbre\\n\" +\r\n \" ( 6) : Afficher liste des votes\\n\" +\r\n \" ( 7) : Retirer un vote\\n\" +\r\n \" ( 8) : Supprimer les votes d'un Membre.\\n\" +\r\n \" ( 9) : Remplacer un vote\\n\" +\r\n \" Actions Arbres :\\n\" +\r\n \" (10) : Afficher la liste des Arbres\\n\" +\r\n // ...\r\n \" Actions Administration :\\n\" +\r\n \" (11) : Nommer nouveau Président\\n\" +\r\n // ...\r\n \"\\n ( 0) : Quitter l'application\\n\" +\r\n \" - Veuillez saisir une action. -\");\r\n }",
"private void showMenu() {\n\t Scanner sc = new Scanner(System.in);\n\t Arguments argument = Arguments.INVALID;\n\t System.out.println(\"Enter command of your choice in the correct format\");\n\t do\n\t {\n\t \tString command = sc.nextLine();\n\t \tString[] arguments = command.split(\" +\");\n\t \targument = validateAndReturnType(arguments);\n\t \tswitch(argument) {\n\t\t \tcase INCREASE:\n\t\t \t\tincrease(arguments);\n\t\t \t\tbreak;\n\t\t \tcase REDUCE:\n\t\t \t\treduce(arguments);\n\t\t \t\tbreak;\n\t\t\t\tcase COUNT:\n\t\t\t\t\tcount(arguments);\n\t\t\t\t\tbreak;\n\t\t\t\tcase INRANGE:\n\t\t\t\t\tinRange(arguments);\n\t\t\t\t\tbreak;\n\t\t\t\tcase NEXT:\n\t\t\t\t\tnext(arguments);\n\t\t\t\t\tbreak;\n\t\t\t\tcase PREVIOUS:\n\t\t\t\t\tprevious(arguments);\n\t\t\t\t\tbreak;\n\t\t\t\tcase QUIT:\n\t\t\t\t\tSystem.exit(0);\n\t\t\t\tcase INVALID:\n\t\t\t\t\tSystem.out.println(\"Please enter a valid command\");\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tSystem.out.println(\"Invalid command. Enter a command in the correct format\");\n\t \t}\n\t } while(argument != Arguments.QUIT);\n\t}",
"private void displayMainMenu () {\n System.out.println();\n System.out.println(\n \"Enter the number of the action to perform: \");\n System.out.println(\n \"Run game...............\" + PLAY_GAME);\n System.out.println(\n \"Exit...................\" + EXIT);\n }",
"private void printLoggedInMenu(){\n\t\tprint(\"Please choose from the options below\"+System.lineSeparator(), \n\t\t\"1.Search Users\", \"2.Search Movies\", \"3.View Feed\", \"4.View Profile\", \"5.Logout\", \"6.Exit\");\n\t}",
"private void displayMenuOptions()\n {\n // display user options menu\n System.out.println(\"\");\n System.out.println(\"----------------------------------------------------\");\n System.out.println(\"\");\n System.out.println(\"COMMAND OPTIONS:\");\n System.out.println(\"\");\n System.out.println(\" 'on' to force power controller to ON state\");\n System.out.println(\" 'off' to force power controller to OFF state\");\n System.out.println(\" 'status' to see current power controller state\");\n System.out.println(\" 'sunrise' to display sunrise time.\");\n System.out.println(\" 'sunset' to display sunset time.\");\n System.out.println(\" 'next' to display next scheduled event.\");\n System.out.println(\" 'time' to display current time.\");\n System.out.println(\" 'coord' to display longitude and latitude.\");\n System.out.println(\" 'help' to display this menu.\");\n System.out.println(\"\");\n System.out.println(\"PRESS 'CTRL-C' TO TERMINATE\");\n System.out.println(\"\");\n System.out.println(\"----------------------------------------------------\");\n System.out.println(\"\");\n }",
"private static void menu()\r\n\t{\r\n\t\tSystem.out.println(\"0. ** FOR INSTRUCTOR **\");\r\n\t\tSystem.out.println(\" Seed 5 URLs, set 3 keywords, creates 1000 Producers and 10 Consumers\");\r\n\t\tSystem.out.println();\r\n\t\tSystem.out.println(\"1. Add seed url\");\r\n\t\tSystem.out.println(\"2. Add consumer (Parser)\");\r\n\t\tSystem.out.println(\"3. Add producer (Fetcher)\");\r\n\t\tSystem.out.println(\"4. Add keyword search\");\r\n\t\tSystem.out.println(\"5. Print stats\");\r\n\t}",
"public void print() {\n stdout(name + \", \" + description);\n stdout(\"-----------------------------------\");\n for (MenuComponent menuComponent : components) {\n menuComponent.print();\n }\n stdout(\"\\n\");\n }",
"private static void displayMenu() {\n System.out.println(\"Menu : \");\n System.out.println(\"Type any number for selection\");\n for (int i = 1; i <= totalPlayers; i++) {\n System.out.println(i + \")View \" + playerList.get(i - 1) + \" cards\");\n }\n System.out.println(\"8)Display Each Player's Hand Strength\");\n System.out.println(\"9)Declare Winner\");\n System.out.println(\"10)Exit\");\n }",
"private static void printFileOperationMenu() {\n System.out.println(\"-------------------------------------\");\n System.out.println(\"File operation menu\");\n System.out.println(\"1. Retrieve file names from directory\");\n System.out.println(\"2. Add a file.\");\n System.out.println(\"3. Delete a file.\");\n System.out.println(\"4. Search a file.\");\n System.out.println(\"5. Change directory.\");\n System.out.println(\"6. Exit to main menu.\");\n\n }",
"private static void displayMainMenu() {\n\t\tSystem.out.println(\"\\t Main Menu Help \\n\" \n\t\t\t\t+ \"====================================\\n\"\n\t\t\t\t+ \"au <username> : Registers as a new user \\n\"\n\t\t\t\t+ \"du <username> : De-registers a existing user \\n\"\n\t\t\t\t+ \"li <username> : To login \\n\"\n\t\t\t\t+ \"qu : To exit \\n\"\n\t\t\t\t+\"====================================\\n\");\n\t}",
"public static void menu(){\n System.out.println(\"-Ingrese el número correspondiente-\");\n System.out.println(\"------------ Opciones -------------\");\n System.out.println(\"------------ 1. Sumar -------------\");\n System.out.println(\"------------ 2. Restar ------------\");\n System.out.println(\"------------ 3. Multiplicar -------\");\n System.out.println(\"------------ 4. Dividir -----------\");\n }",
"public void menu(){\n\t\tSystem.out.println();\n\t\tSystem.out.println(\"<=======|\" + name + \"|=======>\");\n\t\tSystem.out.println(\"------------------------------------------------\");\n\t\tSystem.out.println(\"1 -> Jouer\");\n\t\tSystem.out.println(\"2 -> Creer votre personnage\");\n\t\tSystem.out.println(\"3 -> Charger\");\n\t\tSystem.out.println(\"4 -> Best Score\");\n\t\tSystem.out.println(\"5 -> Instruction\");\n\t\tSystem.out.println(\"6 -> Quitter\");\n\t\tSystem.out.println(\"------------------------------------------------\");\n\t\tint choice = in.nextInt();\n\n\t\t\tswitch (choice){\n\t\t\t\tcase 1:\n\t\t\t\t\tstartPlay();\n\t\t\t\t\tbreak;\n\t\t\t\tcase 2:\n\t\t\t\t\tcreateChar();\n\t\t\t\t\tbreak;\n\t\t\t\tcase 3 :\n\t\t\t\t\tchargeGame();\n\t\t\t\tcase 4:\n\t\t\t\t\tSystem.out.print(\" NOM -\");\n\t\t\t\t\tSystem.out.print(\" GENRE -\");\n\t\t\t\t\tSystem.out.print(\" SANTEE -\");\n\t\t\t\t\tSystem.out.print(\" FORCE -\");\n\t\t\t\t\tSystem.out.print(\" ARMES -\");\n\t\t\t\t\tSystem.out.println(\" ARGENT -\");\n\t\t\t\t\tSystem.out.println(\"\");\n\t\t\t\t\tbdd.dbQuery(\"SELECT * FROM score ORDER BY health DESC\");\n\t\t\t\t\tmenu();\n\t\t\t\t\tbreak;\n\t\t\t\tcase 5:\n\t\t\t\t\trules();\n\t\t\t\t\tbreak;\n\t\t\t\tcase 6:\n\t\t\t\t\texit();\n\t\t\t\tdefault:\n\t\t\t\t\tSystem.out.println(\"Choix non valide\");\n\t\t\t\t\tmenu();\n\t\t\t}\n\t}",
"public void showMenu() {\n\t\tSystem.out.println(\"Please, choose one option!\");\n\t\tSystem.out.println(\"[ 1 ] - Highest Company Capital\");\n\t\tSystem.out.println(\"[ 2 ] - Lowest Company Capital\");\n\t\tSystem.out.println(\"[ 3 ] - Best Investor of the Day\");\n\t\tSystem.out.println(\"[ 4 ] - Worst Investor of the Day\");\n\t\tSystem.out.println(\"[ 0 ] - Exit\");\n\t}",
"static void mainMenu ()\r\n \t{\r\n \t\tfinal byte width = 45; //Menu is 45 characters wide.\r\n \t\tString label [] = {\"Welcome to my RedGame 2 compiler\"};\r\n \t\t\r\n \t\tMenu front = new Menu(label, \"Main Menu\", (byte) width);\r\n \t\t\r\n \t\tMenu systemTests = systemTests(); //Gen a test object.\r\n \t\tMenu settings = settings(); //Gen a setting object.\r\n \t\t\r\n \t\tfront.addOption (systemTests);\r\n \t\tfront.addOption (settings);\r\n \t\t\r\n \t\tfront.select();\r\n \t\t//The program should exit after this menu has returned. CLI-specific\r\n \t\t//exit operations should be here:\r\n \t\t\r\n \t\tprint (\"\\nThank you for using my program.\");\r\n \t}",
"@Override\r\n public final void display() {\r\n System.out.println(\"\\n\\t===============================================================\");\r\n System.out.println(\"\\tEnter the letter associated with one of the following commands:\");\r\n \r\n for (String[] menuItem : HelpMenuView.menuItems) {\r\n System.out.println(\"\\t \" + menuItem[0] + \"\\t\" + menuItem[1]);\r\n }\r\n System.out.println(\"\\t===============================================================\\n\");\r\n }",
"private void printMovieMenu(){\n\t\tprint(\"Please choose from the options below\"+System.lineSeparator(), \"1.Search by Actor\", \"2.Search by Title\", \"3.Search by Genre\",\"4.Back to Login Menu\");\n\t}",
"private static void displayUserMenu() {\n\t\tSystem.out.println(\"\\t User Menu Help \\n\" \n\t\t\t\t+ \"====================================\\n\"\n\t\t\t\t+ \"ar <reponame> : To add a new repo \\n\"\n\t\t\t\t+ \"dr <reponame> : To delete a repo \\n\"\n\t\t\t\t+ \"or <reponame> : To open repo \\n\"\n\t\t\t\t+ \"lr : To list repo \\n\"\n\t\t\t\t+ \"lo : To logout \\n\"\n\t\t\t\t+ \"====================================\\n\");\n\t}",
"void Menu();",
"private static void MainMenuRec(){\n System.out.println(\"Choose one of the following:\");\n System.out.println(\"-----------------------------\");\n System.out.println(\"1. Book room\");\n System.out.println(\"2. Check-out\");\n System.out.println(\"3. See room list\");\n System.out.println(\"4. Create a new available room\");\n System.out.println(\"5. Delete a room\");\n System.out.println(\"6. Make a room unavailable\");\n System.out.println(\"7. Make a (unavailable) room available\");\n System.out.println(\"8. Back to main menu\");\n System.out.println(\"-----------------------------\");\n }",
"private void displayOptions() {\n\t\tSystem.out.println();\n\t\tSystem.out.println(\"Main System Menu\");\n\t\tSystem.out.println(\"----------------\");\n\t\tSystem.out.println(\"A)dd polling place\");\n\t\tSystem.out.println(\"C)lose the polls\");\n\t\tSystem.out.println(\"R)esults\");\n\t\tSystem.out.println(\"P)er-polling-place results\");\n\t\tSystem.out.println(\"E)liminate lowest candidate\");\n\t\tSystem.out.println(\"?) display this menu of choices again\");\n\t\tSystem.out.println(\"Q)uit\");\n\t\tSystem.out.println();\n\t}",
"public static void f_menu(){\n System.out.println(\"╔══════════════════════╗\");\r\n System.out.println(\"║ SoftAverageHeight ║\");\r\n System.out.println(\"║Version 1.0 20200428 ║\");\r\n System.out.println(\"║Created by:Andres Diaz║\");\r\n System.out.println(\"╚══════════════════════╝\");\r\n\r\n }",
"public void menu() {\n\t\tstate.menu();\n\t}",
"public void menu()\r\n\t{\r\n\t\t//TODO\r\n\t\t//Exits for now\r\n\t\tSystem.exit(0);\r\n\t}",
"public void mostrar() {\n\t\tHerramientas.println(menu);\n\t}",
"public static void structEngineerUpMenu(){\n\n //Displaying the menu options by using the system out method\n System.out.println(\"1 - Would you like to view all of the Structural Engineer's Information\");\n System.out.println(\"2 - Would you like to search for a Structural Engineer's Information\");\n System.out.println(\"3 - Adding a new Structural Engineer's Information\\n\");\n\n System.out.println(\"0 - Back to main menu\\n\");\n }",
"private void displayEditMenu()\r\n {\r\n System.out.println();\r\n System.out.println(\"--------- Edit Menu ------------\");\r\n System.out.println(\"(1) Edit Car Colour\");\r\n System.out.println(\"(2) Edit Car Price\");\r\n System.out.println(\"(3) Back to Main Menu\");\r\n }",
"private static void mostrarMenu() {\n\t\tSystem.out.println(\"AVAILABLE ORDERS\");\n\t\tSystem.out.println(\"================\");\n\t\tSystem.out\n\t\t\t\t.println(\"HELP - shows information on \" +\n\t\t\t\t\t\t\"available orders\");\n\t\tSystem.out\n\t\t\t\t.println(\"DIR - displays the content \" +\n\t\t\t\t\t\t\"of current directory\");\n\t\tSystem.out\n\t\t .println(\"DIRGALL - displays the content\" +\n\t\t\t\t \" of current directory\");\n System.out\n\t\t .println(\" and all its internal\" +\n\t\t\t\t \" subdirectories\"); \t\t\n\t\tSystem.out\n\t\t\t\t.println(\"CD dir - changes the current \" +\n\t\t\t\t\t\t\"directory to its subdirectory [dir]\");\n\t\tSystem.out\n\t\t\t\t.println(\"CD .. - changes the current \" +\n\t\t\t\t\t\t\"directory to its father directory\");\n\t\tSystem.out\n\t\t\t\t.println(\"WHERE - shows the path and name \" +\n\t\t\t\t\t\t\"of current directory\");\n\t\tSystem.out\n\t\t\t\t.println(\"FIND text - shows all the images \" +\n\t\t\t\t\t\t\"whose name includes [text]\");\n\t\tSystem.out\n\t\t\t\t.println(\"DEL text - information and delete \" +\n\t\t\t\t\t\t\"a picture named [text] of current \" +\n\t\t\t\t\t\t\"directory\");\n\t\tSystem.out\n\t\t\t\t.println(\"MOVE text - move an image named \" +\n\t\t\t\t\t\t\"[text] to another directory\");\n\t\tSystem.out\n\t\t\t\t.println(\"IMG time - displays a carousel \" +\n\t\t\t\t\t\t\"with the images in current directory;\");\n\t\tSystem.out\n\t\t\t\t.println(\" each image is displayed\" +\n\t\t\t\t\t\t\" [time] seconds\");\n\t\tSystem.out\n\t\t\t\t.println(\"IMGALL time - displays a carousel with\" +\n\t\t\t\t\t\t\" the images in current directory;\");\n\t\tSystem.out\n\t\t\t\t.println(\" and in all its internal\" +\n\t\t\t\t\t\t\" subdirectories; each image is\");\n\t\tSystem.out.println(\" displayed [time] \" +\n\t\t\t\t\"seconds\");\n\t\tSystem.out.println(\"BIGIMG - displays the bigest image int the current\" +\n\t\t\t\t\"directory\");\n\t\tSystem.out.println(\"END - ends of program \" +\n\t\t\t\t\"execution\");\n\t}",
"private static void displayRepoMenu() {\n\t\tSystem.out.println(\"\\t Repo Menu Help \\n\" \n\t\t\t\t+ \"====================================\\n\"\n\t\t\t\t+ \"su <username> : To subcribe users to repo \\n\"\n\t\t\t\t+ \"ci: To check in changes \\n\"\n\t\t\t\t+ \"co: To check out changes \\n\"\n\t\t\t\t+ \"rc: To review change \\n\"\n\t\t\t\t+ \"vh: To get revision history \\n\"\n\t\t\t\t+ \"re: To revert to previous version \\n\"\n\t\t\t\t+ \"ld : To list documents \\n\"\n\t\t\t\t+ \"ed <docname>: To edit doc \\n\"\n\t\t\t\t+ \"ad <docname>: To add doc \\n\"\n\t\t\t\t+ \"dd <docname>: To delete doc \\n\"\n\t\t\t\t+ \"vd <docname>: To view doc \\n\"\n\t\t\t\t+ \"qu : To quit \\n\" \n\t\t\t\t+ \"====================================\\n\");\n\t}",
"public static void Menus(String[] Menu){\r\n for(int i = 0;i<Menu.length;i++){\r\n System.out.print(Menu[i]);\r\n }\r\n }",
"private void mainMenu() {\r\n System.out.println(\"Please choose an option: \");\r\n System.out.println(\"1. New Player\");\r\n System.out.println(\"2. New VIP Player\");\r\n System.out.println(\"3. Quit\");\r\n }",
"public void run(){\n ArrayList<String> menuItems = new ArrayList<>();\n menuItems.add(\"Play the Game\");\n menuItems.add(\"Close the Program\");\n menuItems.add(\"Show the highest score\");\n String menu = CollectionTools.collectionPrinter('S', menuItems);\n runMenu(menu);\n }",
"private void displayColourMenu()\r\n {\r\n System.out.println();\r\n System.out.println(\"------------- Colour Menu ---------------\");\r\n System.out.println(\"(1) To edit Colour1\");\r\n System.out.println(\"(2) To edit Colour2\");\r\n System.out.println(\"(3) To edit Colour3\");\r\n }",
"public static void main(String[] args) {\n System.out.println(\"\\t\\t____________________________________\"); \r\n System.out.println(\"\\t\\t| |\");\r\n System.out.println(\"\\t\\t| Maintain Delivery man module |\");\r\n System.out.println(\"\\t\\t|____________________________________|\\n\\n\");\r\n mainMenu(); //call main menu \r\n }",
"public static void help() {\n System.out.println(\"MENU : \");\n System.out.println(\"Step 1 to create a default character.\"); // create and display a character\n System.out.println(\"Step 2 to display characters.\");\n System.out.println(\"Step 3 to choice a character for list his details. \");\n System.out.println(\"Step 4 to start fight between 2 characters\");\n System.out.println(\"step 5 to remove a character.\");\n System.out.println(\"step 6 to create a Warrior.\");\n System.out.println(\"step 7 to create a Wizard.\");\n System.out.println(\"step 8 to create a Thief.\");\n System.out.println(\"Step 9 to exit the game. \");\n System.out.println(\"Step 0 for help ....\");\n\n }",
"public void readTheMenu();",
"private static String getMenu() { // method name changes Get_menu to getMenu()\r\n\t\tStringBuilder sb = new StringBuilder();\r\n\t\t\r\n\t\tsb.append(\"\\nLibrary Main Menu\\n\\n\")\r\n\t\t .append(\" M : add member\\n\")\r\n\t\t .append(\" LM : list members\\n\")\r\n\t\t .append(\"\\n\")\r\n\t\t .append(\" B : add book\\n\")\r\n\t\t .append(\" LB : list books\\n\")\r\n\t\t .append(\" FB : fix books\\n\")\r\n\t\t .append(\"\\n\")\r\n\t\t .append(\" L : take out a loan\\n\")\r\n\t\t .append(\" R : return a loan\\n\")\r\n\t\t .append(\" LL : list loans\\n\")\r\n\t\t .append(\"\\n\")\r\n\t\t .append(\" P : pay fine\\n\")\r\n\t\t .append(\"\\n\")\r\n\t\t .append(\" T : increment date\\n\")\r\n\t\t .append(\" Q : quit\\n\")\r\n\t\t .append(\"\\n\")\r\n\t\t .append(\"Choice : \");\r\n\t\t \r\n\t\treturn sb.toString();\r\n\t}",
"static void afficherMenu() {\n\t\tSystem.out.println(\"\\n\\n\\n\\t\\tMENU PRINCIPAL\\n\");\n\t\tSystem.out.println(\"\\t1. Additionner deux nombres\\n\");\n\t\tSystem.out.println(\"\\t2. Soustraire deux nombres\\n\");\n\t\tSystem.out.println(\"\\t3. Multiplier deux nombres\\n\");\n\t\tSystem.out.println(\"\\t4. Deviser deux nombres\\n\");\n\t\tSystem.out.println(\"\\t0. Quitter\\n\");\n\t\tSystem.out.print(\"\\tFaites votre choix : \");\n\t}",
"private void displayPlayerMenu () {\n System.out.println();\n System.out.println(\"Player Selection Menu:\");\n System.out.println(\n \"Timid player...........\" + TIMID);\n System.out.println(\n \"Greedy player..........\" + GREEDY);\n System.out.println(\n \"Clever player..........\" + CLEVER);\n System.out.println(\n \"Interactive player.....\" + INTERACTIVE);\n }",
"public static void imprimirMenu() {\r\n\tSystem.out.println(\"---------------------------menu---------------------------\");\r\n\tSystem.out.println(\"opciones: (ingrese como RF#)\");\r\n\tSystem.out.println(\"RF1: iniciar sesion \");\r\n System.out.println(\"RF2: registrarse al sistema\");\r\n\tSystem.out.println(\"RF3: Salir\");\r\n\t\r\n }",
"public static void customerUpMenu(){\n\n //Displaying the menu options by using the system out method\n System.out.println(\"1 - Would you like to view all of the customers\");\n System.out.println(\"2 - Would you like to search for a customer's information\");\n System.out.println(\"3 - Adding a new customer's details\\n\");\n\n System.out.println(\"0 - Back to main menu\\n\");\n }"
] |
[
"0.86882275",
"0.85470366",
"0.84972185",
"0.84526",
"0.8390276",
"0.8374118",
"0.8352562",
"0.8322411",
"0.83131933",
"0.829817",
"0.8286219",
"0.8241524",
"0.81893176",
"0.8133979",
"0.8124869",
"0.8089662",
"0.80655783",
"0.80531454",
"0.80264413",
"0.80055016",
"0.79716325",
"0.7955242",
"0.79365844",
"0.7911108",
"0.7865789",
"0.78613913",
"0.7848932",
"0.7837866",
"0.7837866",
"0.7829036",
"0.78245443",
"0.7817474",
"0.7805914",
"0.78026456",
"0.77989644",
"0.7785837",
"0.77660865",
"0.77464855",
"0.773932",
"0.77275294",
"0.7715281",
"0.76777977",
"0.7675956",
"0.76649517",
"0.7634849",
"0.7622772",
"0.76036847",
"0.75907236",
"0.7586726",
"0.7560284",
"0.75490785",
"0.75366974",
"0.7535785",
"0.75221413",
"0.7509112",
"0.7501775",
"0.748516",
"0.7481091",
"0.7444575",
"0.7440407",
"0.74294055",
"0.74179614",
"0.741043",
"0.73873764",
"0.7387339",
"0.7386636",
"0.73862135",
"0.73843527",
"0.7383992",
"0.737211",
"0.7367091",
"0.7358451",
"0.7354589",
"0.73342526",
"0.73241496",
"0.7286921",
"0.7275172",
"0.7274295",
"0.7264073",
"0.7260715",
"0.725755",
"0.7256909",
"0.7250262",
"0.72383314",
"0.7232775",
"0.72261745",
"0.7211115",
"0.7204586",
"0.72029406",
"0.7194532",
"0.71910256",
"0.71827984",
"0.71798456",
"0.7170391",
"0.71663165",
"0.7157902",
"0.71479976",
"0.7145046",
"0.7135741",
"0.71260345"
] |
0.72964877
|
75
|
/ End method After an argument is generated, this method is called to / prompt the user to continue and clears the console
|
public static void end(){
try{
System.out.println("\nPress Enter key to continue: ");
System.in.read();
System.out.print("\033[H\033[2J");
System.out.flush();
}catch(Exception e){
System.err.println(e.getMessage());
}
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public static void prompt() {\n\t\tSystem.out.printf(\"\\n입력 > \");\n\t}",
"public static void pause(){\n System.out.print(\"Enter anything to continue: \"); // prompts the user to enter anything\n input.nextLine(); // receiving the user's input, but not storing it\n clear(); // clears the screen\n }",
"private void prompt() {\n System.out.print(Strings.MAIN_PROMPT);\n System.out.flush();\n }",
"private void prompt() {\n System.out.print(\"> \");\n System.out.flush();\n }",
"static void pause()\n {\n // No non-blocking IO (raw input and non echoing inputs, please google these don't disturb me) support without diving into third party land, or hideously long code; be content with regular old interactive input\n System.out.println(\"\\nType \\\"cls\\\" or \\\"clear\\\" (or anything really) to clear the screen ...\");\n input.next();\n }",
"public void clearPrompt()\n\t{\n\t\tpromptTarget = \"\";\n\t\tpromptType = \"\";\n\t\ttempPrompt = \"\";\n\t\tshowPrompt = true;\n\t}",
"public static void toContinue() {\n System.out.println(EOF + \"Presiona ENTER para continuar...\");\n new Scanner(System.in).nextLine();\n }",
"abstract void mainPrompt();",
"private void promptForSomething() {\n userInputValue = prompt(\"Please enter something: \", true);\n System.out.println(\"Thank you. You can see your input by choosing the Display Something menu\");\n }",
"public void consoleReset() { }",
"public void consoleReset() { }",
"public void generalPrompt() {\n System.out.println(\"What would you like to do?\");\n }",
"public static void clearConsole() {\n\t}",
"static void clearScreen() {\n System.out.println(\"Press \\\"ENTER\\\" to continue...\");\n Scanner scan= new Scanner(System.in);\n scan.nextLine();\n for (int i = 0; i < 50; ++i) System.out.println();\n }",
"private boolean promptCommand() {}",
"public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tString inputString;\n\t\t\n\t\tdo {\n\t\t\tSystem.out.print(\">\");\n\t\t\tinputString = sc.nextLine();\n\t\t\tSystem.out.println(inputString);\n\t\t}while(!inputString.equals(\"q\"));\n\t\t\n\t\tSystem.out.println(\"end\");\n\t}",
"public static void showPrompt() {\r\n \r\n System.out.print(\"> \");\r\n \r\n }",
"public void takeUserInput() {\n\t\t\r\n\t}",
"public void endInput() {\n this.currentIndex = 1;\n this.currentUnit = null;\n this.currentChName = null;\n this.currentState = states.EMPTY;\n JTVProg.mainWindow.tvFillBut.setEnabled(false);\n JTVProg.mainWindow.tvProcBut.setEnabled(true);\n }",
"private static void prompt(boolean isTestRun) {\n if (!isTestRun)\n System.out.print(\"> \");\n }",
"protected abstract void fillPromptText();",
"public void endCommand();",
"private static void askForContinue() {\n\t\t\t\n\t\t}",
"protected void end() {\n \tSystem.out.println(\"end ReturnToStart\");\n }",
"public static void checkFromUser() {\n\t\tif (askUser(\"Please type y to execute program and any other key to stop\").contentEquals(\"y\")) {\n\t\t\tSystem.out.println(\"Continuing\");\n\t\t}\n\t\telse {\n\t\t\tSystem.out.println(\"Terminating program\");\n\t\t\tSystem.exit(0); \n\t\t}\n\t\tSystem.out.println(\"Calculating the greatest house income, the greatest income after expenditure and greatest savings from the given 3 families\");\n\t}",
"private static void driver() {\n Scanner scnr = new Scanner(System.in);\n String promptCommandLine = \"\\nENTER COMMAND: \";\n\n System.out.print(MENU);\n System.out.print(promptCommandLine);\n String line = scnr.nextLine().trim();\n char c = line.charAt(0);\n\n while (Character.toUpperCase(c) != 'Q') {\n processUserCommandLine(line);\n System.out.println(promptCommandLine);\n line = scnr.nextLine().trim();\n c = line.charAt(0);\n }\n scnr.close();\n }",
"public static void printPrompt() {\n System.out.print(\" > \");\n }",
"private void clearCommandPromptScreen() {\r\n //------------------------------------------------------------\r\n if(APP_INSTANCE.isWindows) {\r\n try {\r\n ProcessBuilder builder = new ProcessBuilder(\"cmd.exe\", \"/c\", \"@echo off & cls & color E\");\r\n Process process = builder.inheritIO().start();\r\n process.waitFor();\r\n } catch (IOException e) {\r\n //> If this fails, its no biggie...\r\n } catch (InterruptedException e) {\r\n e.printStackTrace();\r\n }\r\n }else {\r\n for (int ii = 0; ii < 50; ii++) {\r\n System.out.println(\"\");\r\n }\r\n }\r\n }",
"private void askUser()\n { \n System.out.println(\"What is your command?\");\n\n String command = scanner.nextLine();\n commandPrompt(command);\n }",
"public void quitProgram(){}",
"private void exit() {\n audrey.setExtractingSample(false);\n // If we just extracted argument samples, let the following event know that we're done with\n // arguments.\n instrumentationContext.setLookingForFirstStatement(false);\n }",
"public static void displayEndingMessage() {\n\t\tSystem.out.println(\"Thank you for using my program!\");\n\t}",
"public static void main(String[] args)\n {\n Scanner scan = new Scanner(System.in);\n while ((quit.equals(question)!=true)){\n question = scan.nextLine();\n System.out.println (question);\n\n }\n }",
"private static void promptName() {\n\t\tSystem.out.print(\"Please enter a name: \");\n\t}",
"private static void pause() {\n System.out.println(\"Press Any Key To Continue...\");\n new java.util.Scanner(System.in).nextLine();\n }",
"private void showExecutionEnd() {\n log.info(\"##############################################################\");\n log.info(\"Application created: Press Cancel to end dialog\");\n log.info(\"##############################################################\");\n }",
"private void remindGoal()\n {\n System.out.println(\"you have to Pick up all three items and get back outside!\");\n }",
"protected abstract void hidePrompt();",
"static void actionPrompt() {\n prompt:\n while (true) {\n String line = \"\";\n System.out.println(\"\\nWhat do you want to do: (S)ave, (F)ill, (L)ine, (V)isible, (Q)uit: \");\n while (line.length() < 1)\n line = scan.nextLine().toUpperCase();\n char action = line.charAt(0);\n switch (action) {\n case 'Q':\n break prompt;\n case 'V':\n visible(); break;\n case 'L':\n line(); break;\n case 'F':\n fill(); break;\n case 'S':\n save(); break;\n default:\n System.out.println(\"Not a valid command.\");\n }\n }\n }",
"private void exitWithoutSave()\n {\n String reply = \"\";\n Scanner console = new Scanner(System.in);\n \n do\n {\n boolean valid = false;\n while (!valid)\n {\n System.out.print(\"\\t\\tSo, you want to exit without saving your changes?(y/n) \");\n reply = console.nextLine().trim().toLowerCase();\n valid = validation.checkNoBlank(reply);\n }\n reply = reply.substring(0, 1);\n if (reply.equals(\"y\"))\n exitRegards();\n else\n if (reply.equals(\"n\"))\n return; \n else\n System.out.println(\"\\t\\tPlease enter your answer again (y/n) \");\n }while (!reply.equals(\"n\") && !reply.equals(\"y\")); \n }",
"@FXML\n\tpublic void onProcessCommand() {\n\t\tString command = prompt.getText().trim();\n\t\tif (!command.isEmpty()) {\n\t\t\t// Print what the user entered to the screen\n\t\t\tscreen.appendText(\"> \" + command + \"\\n\");\n\t\t\tswitch (command) {\n\t\t\t\tcase \"clear\":\n\t\t\t\t\tscreen.clear();\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\t// Print the output of the commandName\n\t\t\t\t\tscreen.appendText(commandDispatch.processCommand(command) + \"\\n\");\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\t// Clear the prompt - ready for new input\n\t\t\tprompt.clear();\n\t\t}\n\t}",
"public void repl(String prompt, String end) {\n BufferedReader input;\n String line;\n Object[] result;\n\n input = new BufferedReader(new InputStreamReader(System.in));\n while (true) {\n System.out.print(prompt);\n try {\n line = input.readLine();\n } catch (IOException e) {\n System.out.println(\"io error: \" + e.toString());\n return;\n }\n if (line == null) {\n // EOF (ctrl-d on unix, ctrl-c on windows)\n return;\n }\n if (line.equals(end)) {\n return;\n }\n result = run(\"\", new StringReader(line));\n if ((result != null) && (result.length > 0)) {\n System.out.println(result[0]);\n }\n }\n }",
"private final static void clearConsole()\t{\n\t\tSystem.out.print(\"\\033[H\\033[2J\"); \n\t\tSystem.out.flush();\n\t}",
"private final static void pulsaEnter() {\n\t\tSystem.out.println();\n\t\tSystem.out.println(\"\\nPulsa Enter para continuar...\");\n\t\tkb.nextLine();\n\t}",
"public abstract void printPromptMessage();",
"public void setPrompt() {\n\t\tcommandLine.append(\"$ \");\n\t}",
"public static void enterToContinue()\r\n\t{\r\n\t\tScanner keyboard = new Scanner(System.in);\r\n\t\tSystem.out.println(\"Press enter to continue the game : \");\r\n\t\tkeyboard.nextLine();\r\n\t}",
"@Override\n\tpublic void inputEnded() {\n\t\t\n\t}",
"public void exit() {\n System.out.println(\"Thank you for playing Nim\");\n }",
"public static void displayProgramEnd() \r\n {\n }",
"static void quit()\n {\n clrscr();\n System.out.println(\"You don't suck in life human. Life sucks you in.\");\n System.exit(0);\n }",
"public abstract void promptForInput(final String msg);",
"@Override\n\tpublic void askReset() {\n\t}",
"@Override\n\tpublic void inputEnded() {\n\n\t}",
"void askEndTurn();",
"public void clear()\r\n {\r\n \tdisplayUserInput = \" \";\r\n \t\r\n }",
"public void requestExit()\r\n {\r\n // WE MAY HAVE TO SAVE CURRENT WORK\r\n boolean continueToExit = true;\r\n if (!saved)\r\n {\r\n // THE USER CAN OPT OUT HERE\r\n continueToExit = promptToSave();\r\n }\r\n \r\n // IF THE USER REALLY WANTS TO EXIT THE APP\r\n if (continueToExit)\r\n {\r\n // EXIT THE APPLICATION\r\n System.exit(0);\r\n }\r\n }",
"public static void keepGoing() {\n System.out.println(\"Would you like to continue? \");\n char contin= sc.next().charAt(0); \n }",
"public void quit(String dummy) {\n if (showOptions(\"Really quit?\", \"Quit?\", \"question\",\n \"Yes\", \"Yes\", \"No\") == 0) {\n System.exit(1);\n }\n }",
"private void ending() {\n\t\tstartView.ending();\n\t\tSystem.exit(-1);\n\t}",
"public void finish(){\n \t\tString congrats=\"Congratulations, you won in \" + model.getNumberOfSteps()+\" steps! \";\n \t\tJFrame frame = new JFrame();\n\t\tString[] options = new String[2];\n\t\toptions[0] = new String(\"Play again\");\n\t\toptions[1] = new String(\"Quit\");\n\t\tint result= JOptionPane.showOptionDialog(frame.getContentPane(),congrats,\"Won! \", 0,JOptionPane.INFORMATION_MESSAGE,null,options,null);\n\t\tif (result == JOptionPane.NO_OPTION) {\n\t\t\t\t\tSystem.exit(0);\n\t\t\t\t}\n\t\t\t\tif (result == JOptionPane.YES_OPTION) {\n\t\t\t\t\tcontroller.reset(); }\n \t}",
"public static void main(String[] args) {\n\t\t\r\n\t\tSystem.out.println(\"Imprime por pantalla la caca esta\");\r\n\t\t\r\n\t\tScanner entrada=new Scanner(System.in);\r\n\t\t\r\n\t\tString a=entrada.nextLine();\r\n\t\t\r\n\t\tSystem.out.println(a);\r\n\t\t\r\n\t\tString caca=JOptionPane.showInputDialog(\"HOlaaa\");\r\n\t\t\r\n\t\tSystem.out.println(caca);\r\n\t\t\r\n\t\t\r\n\t\t\r\n\r\n\t}",
"@FXML\n private void handleUserInput() {\n String input = userInput.getText();\n if (input.toLowerCase().equals(\"bye\")) {\n String response = cait.getResponse(input);\n dialogContainer.getChildren().addAll(\n DialogBox.getUserDialog(input, userImage),\n DialogBox.getCaitDialog(response, caitImage)\n );\n userInput.clear();\n Platform.exit();\n }\n String response = cait.getResponse(input);\n dialogContainer.getChildren().addAll(\n DialogBox.getUserDialog(input, userImage),\n DialogBox.getCaitDialog(response, caitImage)\n );\n userInput.clear();\n }",
"public void printPrompt() {\r\n\t\tif (!promptVisible) {\r\n\t\t\tsetPromptVisible(true);\r\n\t\t}\r\n\t\tprompt(rPrompt);\r\n\t}",
"private void doExit() {\n\t\tif (userMadeChanges()) {\n showSaveChangesBeforeExitPrompt();\n\t\t} else {\n\t\t\tfinish();\n\t\t}\n\t}",
"public void clear()\n\t{\n\t\tstatus.setTextFill(BLACK);\n\t\tstatus.setText(\"awaiting input...\");\n\t\tusername.setText(\"\");\n\t\taddress.setText(\"\");\n\t\tport.setText(\"\");\n\t}",
"private void quit()\n\t{\n\t\tapplicationView.showChatbotMessage(quitMessage);\n\t\tSystem.exit(0);\n\t\t\n\t}",
"public void quit(String dummy) {\n System.exit(1);\n }",
"private static void exitAsInvalidInput() {\n\t\tSystem.out.println(\n\t\t\t\t\"You have entered invalid input. Exiting the system now.\");\n\t\tSystem.exit(0);\n\t}",
"public void Sair() {\r\n\t\t\t\r\n\t\t\tnome = JOptionPane.showInputDialog(\"Informe o seu nome ou SAIR para finalizar\");\r\n }",
"public void quit(){\n this.println(\"Bad news!!! The library has been cancelled!\");\n System.exit(0);\n\n }",
"public void exitOptions()\n {\n System.out.println(\"\\n\\t\\t:::::::::::::::::::::::::::::::::::::::::\");\n System.out.println(\"\\t\\t| Select Options Below : |\");\n System.out.println(\"\\t\\t:::::::::::::::::::::::::::::::::::::::::\");\n System.out.println(\"\\t\\t| [1] Exit and Save Changes |\");\n System.out.println(\"\\t\\t| [2] Exit Without Save Any Changes |\");\n System.out.println(\"\\t\\t| [3] Back To Menu |\");\n System.out.println(\"\\t\\t=========================================\");\n System.out.print(\"\\t\\t Input the option number : \");\n }",
"protected static void quitingProgram(boolean isFromConsole) {\n\n // If the user tried to terminate the program from the console.\n if (isFromConsole) {\n\n // Asking for Confirmation to terminate the program.\n Scanner sc = new Scanner(System.in);\n System.out.print(\"Press Y to Exit\\n\" +\n \"Press C to continue\\n\" +\n \"\\t: \");\n String text = formattingWhitespace(sc.nextLine());\n\n // If user wants to terminate the program.\n if (text.equalsIgnoreCase(\"Y\")) {\n System.out.println(\"Quiting Program...\");\n System.exit(0);\n }\n // If user wants to continue the program.\n else if (text.equalsIgnoreCase(\"C\")) {\n System.out.println(\"Continuing program\");\n mainMenu();\n }\n // User entering an Invalid Input.\n else {\n System.out.println(\"Invalid Input\");\n quitingProgram(true);\n }\n }\n // If the user tried to terminate the program from the GUI.\n else {\n // Asking for Confirmation to terminate the program.\n String result = ConfirmBox.display(\"Confirm Exit\", \"Are you sure you want to exit?\", \"Yes\", \"No\");\n\n // Checking the confirmation\n if (result.equalsIgnoreCase(\"yes\")) {\n System.out.println(\"Quiting Program...\");\n System.exit(0);\n }\n }\n }",
"public UserInteractionConsole() {\n setupVariables();\n\n System.out.println(\"Select an Option\");\n int choice = userInteractionTree();\n while (true) {\n if (choice < 8) {\n courseOptions(choice);\n } else if (choice < 12) {\n scheduleOptions(choice);\n } else if (choice == 12) {\n saveAndExit();\n break;\n } else {\n break;\n }\n System.out.println(\"\\n\\nSelect an Option\");\n choice = userInteractionTree();\n }\n\n }",
"public void giveUp(){\r\n System.out.println(\"You are such a loser. Glad that you give up!\");\r\n System.exit(0);\r\n }",
"public static void tryAgain() {\n Input input = new Input(new Scanner(System.in));\n System.out.println(\"Do you want to choose another option? [ yes/no ]\");\n String more = input.getString();\n if (more.equalsIgnoreCase(\"yes\")) {\n askUser();\n } else {\n endGame();\n }\n }",
"private static void pause(String message) {\n System.out.println(message);\n new java.util.Scanner(System.in).nextLine();\n }",
"public static void printExitMessage() {\n printLine();\n System.out.println(\" Bye Bye for now! See you soon!\");\n printLine();\n }",
"public static void pressEnterToContinue() {\n\t\tScanner input = new Scanner(System.in);\n\t\tSystem.out.println(\"Press Enter to continue...\");\n\t\tinput.nextLine();\n\t}",
"public void input_entered() {\n\t\t_last_column = 0;\n\t\t_last_line = 0;\n\t\t_last_printed = '\\n';\n\t}",
"@Override\n\t\t\tpublic void cancel() {\n\t\t\t\tSystem.exit(0);\n\t\t\t}",
"private static void printUsageAndExit() {\n printUsageAndExit(null);\n }",
"public final static void clearConsole()\n {\n try {\n Runtime.getRuntime().exec(\"clear\");\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"private static void exitArgumentError() {\n\t\tSystem.out.println(\"To run the application, please input the following arguments:\");\n\t\tSystem.out.println(\"java -jar aqmaps.jar DD MM YY latitude longitude random_seed port_number\");\n\t\tSystem.exit(1); \n\t}",
"private void endingAction() {\n this.detectChanges();\n if (this.isModifed) {\n //System.out.println(JOptionPane.showConfirmDialog(null, \"Do you want to save unsaved changes?\", \"Hey User!\", JOptionPane.YES_NO_CANCEL_OPTION));\n switch (JOptionPane.showConfirmDialog(null, \"Do you want to save current data?\", \"Hey User!\", JOptionPane.YES_NO_CANCEL_OPTION)) {\n case 0: {\n if (this.file != null) {\n INSTANCE.saveData();\n INSTANCE.dispose();\n System.exit(0);\n break;\n }\n }\n\n case 1: {\n INSTANCE.dispose();\n System.exit(0);\n break;\n }\n }\n\n //cancel op 2\n //no op 1\n //yes op 0\n } else {\n INSTANCE.dispose();\n System.exit(0);\n }\n }",
"protected void end() {\n \t// theres nothing to end\n }",
"protected void end() {\n \t//Just let the lift keep holding the current motion magic\n \t//setpoint after this command ends\n \tRobot.debug.Stop();\n }",
"public void cancelarIniciarSesion(){\n System.exit(0);\n }",
"public static void printPrompt(String prompt) {\n System.out.print(prompt + \" \");\n System.out.flush();\n }",
"public static void exitProgram() {\n\r\n System.out.println(\"Thank you for using 'Covid 19 Vaccination Center Program'. \\n Stay safe!\");\r\n System.exit(0);\r\n }",
"public void advance() {\r\n this.command = in.nextLine();\r\n }",
"void suspendInput();",
"@FXML\n private void handleUserInput() {\n String input = userInput.getText();\n String response = duke.getResponse(input);\n dialogContainer.getChildren().addAll(\n DialogBox.getUserDialog(input, userIcon),\n DialogBox.getDukeDialog(response, mrRobotIcon)\n );\n userInput.clear();\n if (response.equals(\"Goodbye friend.\")) {\n Platform.exit();\n }\n }",
"private static void printUsageAndExit() {\n\t\t printUsageAndExit(null);\n\t\t }",
"@Override\n public void done() {\n Toolkit.getDefaultToolkit().beep();\n //close_plan_btn.setEnabled(true);\n setCursor(null); //turn off the wait cursor\n JOptionPane.showMessageDialog(null, \"Plan released !\\n\");\n\n }",
"public static void main(String[]args) {\n\t\n\t \n\tArgsHandler handler = new ArgsHandler(args);\n if (!handler.empty()) {\n handler.execute();\n }\n \n final int exit = 0;\n final int setValues = 1;\n final int getValues = 2;\n final int execute2 = 3;\n final int printResult = 4;\n String word = null;\n \n /**\n * Our dialog menu with checking of input argumet's of program \n */\n do {\n UI.mainMenu();\n UI.enterChoice();\n switch (UI.getChoice()) {\n case exit:\n if (ArgsHandler.isDebug()) {\n System.out.println(\"\\nYou chosen 0. Exiting...\");\n System.out.format(\"%n############################################################### DEBUG #############################################################\");\n }\n break;\n case setValues:\n if (ArgsHandler.isDebug()) {\n \tSystem.out.format(\"%n############################################################### DEBUG #############################################################\");\n System.out.println(\"\\nYou chosen 1. Setting values...\");\n }\n word = UI.enterValues();\n break;\n case getValues:\n if (ArgsHandler.isDebug()) {\n \tSystem.out.format(\"%n############################################################### DEBUG #############################################################\");\n System.out.println(\"\\nYou chosen 2. Getting values...\");\n }\n if (word != null ) {\n UI.printText(word);\n } else {\n System.out.format(\"%nFirst you need to add values.\");\n }\n break; \n case execute2:\n if (ArgsHandler.isDebug()) {\n \tSystem.out.format(\"%n############################################################### DEBUG #############################################################\");\n System.out.println(\"\\nYou chosen 3. Executing task...\");\n }\n if (word != null) {\n \t final String []lines = NewHelper.DivString(word);\n \t System.out.println(\"\\nTask done...\");\n \t if (ArgsHandler.isDebug()) {\n \t System.out.format(\"%n############################################################### DEBUG #############################################################\");\n \t }\n } else {\n System.out.format(\"%nFirst you need to add values.\");\n }\n break;\n case printResult:\n if (ArgsHandler.isDebug()) {\n \tSystem.out.format(\"%n############################################################### DEBUG #############################################################\");\n System.out.format(\"%nYou chosen 4. \"\n + \"Printing out result...%n\");\n }\n if (word != null) {\n \tfinal String[] lines2 = NewHelper.DivString(word);\n \tfor (final String line2 : lines2) {\n NewHelper.printSymbols(line2);\n NewHelper.printSymbolNumbers(line2);\n \t}\n \tif(ArgsHandler.isDebug()) {\n \tSystem.out.format(\"%n############################################################### DEBUG #############################################################\");\n } \n \telse {\n System.out.format(\"%nFirst you need to add values.\"); \n }\n break;\n }\n default:\n System.out.println(\"\\nEnter correct number.\");\n }\n } while (UI.getChoice() != 0);\n}",
"private static void inputInstallerCommand() {\n\t\tScanner scanner = new Scanner(System.in);\n\t\tString commandLine = scanner.nextLine();\n\t\t//Case-sensitive ans should be always Upper case\n\t\tif (!commandLine.equals(\"END\")) {\n\t\t\tcallIstallerCommand(commandLine);\n\t\t\tinputInstallerCommand();\n\t\t}\n\t}",
"void drawPrompt(String message);",
"public void endGame() {\n dispose();\n System.out.println(\"Thank you for playing\");\n System.exit(0);\n }",
"@FXML\n private void handleUserInput() {\n String input = userInput.getText();\n CommandResult dukeResponse;\n try {\n dukeResponse = duke.getResponse(input);\n runDialogContainer(input, dukeResponse);\n if (dukeResponse.isExit()) {\n runExitDialogContainer();\n }\n } catch (DukeException e) {\n runDialogContainer(input, e.getMessage());\n }\n userInput.clear();\n }"
] |
[
"0.66717386",
"0.66354203",
"0.65872335",
"0.65611535",
"0.649163",
"0.6445129",
"0.63853914",
"0.63498795",
"0.6277094",
"0.6271038",
"0.6271038",
"0.62173176",
"0.6197558",
"0.6180479",
"0.6158957",
"0.6137462",
"0.6136642",
"0.6118448",
"0.60774267",
"0.6066539",
"0.6049346",
"0.6032801",
"0.60275704",
"0.6026082",
"0.60139513",
"0.6009584",
"0.60087895",
"0.5984502",
"0.59745353",
"0.5968147",
"0.5956297",
"0.59499025",
"0.5938298",
"0.5922101",
"0.59188426",
"0.59119654",
"0.59108496",
"0.58912265",
"0.5887928",
"0.58789426",
"0.58788246",
"0.5878163",
"0.58537936",
"0.5837425",
"0.5808368",
"0.57934487",
"0.57889587",
"0.57583356",
"0.5754496",
"0.57534856",
"0.5748174",
"0.5728188",
"0.5723273",
"0.5720542",
"0.57163143",
"0.57089835",
"0.56797457",
"0.56732935",
"0.56689465",
"0.5664598",
"0.56484264",
"0.5645856",
"0.5638594",
"0.56323904",
"0.5627546",
"0.5626987",
"0.5606622",
"0.55972576",
"0.55967253",
"0.55908126",
"0.5584289",
"0.557972",
"0.5578054",
"0.5575451",
"0.55731285",
"0.5554552",
"0.5548329",
"0.5542538",
"0.55385715",
"0.55314994",
"0.55306375",
"0.5524226",
"0.5513822",
"0.5509324",
"0.55057824",
"0.5504767",
"0.5502291",
"0.54989535",
"0.54970163",
"0.54943997",
"0.5494075",
"0.5483997",
"0.5482571",
"0.54810375",
"0.5472563",
"0.54671293",
"0.54614073",
"0.5456506",
"0.5442362",
"0.5441332"
] |
0.66592044
|
1
|
End of variables declaration//GENEND:variables
|
public String getPath() {
return path;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public void lavar() {\n\t\t// TODO Auto-generated method stub\n\t\t\n\t}",
"public void mo38117a() {\n }",
"@Override\r\n\tpublic void initVariables() {\n\t\t\r\n\t}",
"private void assignment() {\n\n\t\t\t}",
"private void kk12() {\n\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"public void mo21779D() {\n }",
"public final void mo51373a() {\n }",
"protected boolean func_70041_e_() { return false; }",
"public void mo4359a() {\n }",
"public void mo21782G() {\n }",
"private void m50366E() {\n }",
"public void mo12930a() {\n }",
"public void mo115190b() {\n }",
"public void method_4270() {}",
"public void mo1403c() {\n }",
"public void mo3376r() {\n }",
"public void mo3749d() {\n }",
"public void mo21793R() {\n }",
"protected boolean func_70814_o() { return true; }",
"public void mo21787L() {\n }",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"public void mo21780E() {\n }",
"public void mo21792Q() {\n }",
"public void mo21791P() {\n }",
"public void mo12628c() {\n }",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"public void mo97908d() {\n }",
"public void mo21878t() {\n }",
"public void mo9848a() {\n }",
"public void mo21825b() {\n }",
"public void mo23813b() {\n }",
"public void mo3370l() {\n }",
"public void mo21879u() {\n }",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"public void mo21785J() {\n }",
"public void mo21795T() {\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 m23075a() {\n }",
"public void mo21789N() {\n }",
"@Override\n\tpublic void einkaufen() {\n\t}",
"public void mo21794S() {\n }",
"public final void mo12688e_() {\n }",
"@Override\r\n\tvoid func04() {\n\t\t\r\n\t}",
"private Rekenhulp()\n\t{\n\t}",
"public void mo6944a() {\n }",
"public static void listing5_14() {\n }",
"public void mo1405e() {\n }",
"public final void mo91715d() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\r\n\tprotected void func03() {\n\t\t\r\n\t}",
"public void mo9137b() {\n }",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"public void func_70295_k_() {}",
"void mo57277b();",
"public void mo21877s() {\n }",
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"public void Tyre() {\n\t\t\r\n\t}",
"void berechneFlaeche() {\n\t}",
"public void mo115188a() {\n }",
"public void mo21880v() {\n }",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"public void mo21784I() {\n }",
"private stendhal() {\n\t}",
"@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"public void mo56167c() {\n }",
"public void mo44053a() {\n }",
"public void mo21781F() {\n }",
"public void mo2740a() {\n }",
"public void mo21783H() {\n }",
"public void mo1531a() {\n }",
"double defendre();",
"private zzfl$zzg$zzc() {\n void var3_1;\n void var2_-1;\n void var1_-1;\n this.value = var3_1;\n }",
"public void stg() {\n\n\t}",
"void m1864a() {\r\n }",
"private void poetries() {\n\n\t}",
"public void skystonePos4() {\n }",
"public void mo2471e() {\n }",
"@Override\n\tprotected void getExras() {\n\n\t}",
"private void yy() {\n\n\t}",
"@Override\n\tpublic void verkaufen() {\n\t}",
"@AnyLogicInternalCodegenAPI\n private void setupPlainVariables_Main_xjal() {\n }",
"static void feladat4() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\t\t\tpublic void func02() {\n\t\t\t\t\r\n\t\t\t}",
"public void init() { \r\n\t\t// TODO Auto-generated method\r\n\t }",
"public void furyo ()\t{\n }",
"public void verliesLeven() {\r\n\t\t\r\n\t}",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"protected void mo6255a() {\n }"
] |
[
"0.6359434",
"0.6280371",
"0.61868024",
"0.6094568",
"0.60925734",
"0.6071678",
"0.6052686",
"0.60522056",
"0.6003249",
"0.59887564",
"0.59705925",
"0.59680873",
"0.5967989",
"0.5965816",
"0.5962006",
"0.5942372",
"0.5909877",
"0.5896588",
"0.5891321",
"0.5882983",
"0.58814824",
"0.5854075",
"0.5851759",
"0.58514243",
"0.58418584",
"0.58395296",
"0.5835063",
"0.582234",
"0.58090156",
"0.5802706",
"0.5793836",
"0.57862717",
"0.5784062",
"0.5783567",
"0.5782131",
"0.57758564",
"0.5762871",
"0.5759349",
"0.5745087",
"0.57427835",
"0.573309",
"0.573309",
"0.573309",
"0.573309",
"0.573309",
"0.573309",
"0.573309",
"0.57326084",
"0.57301426",
"0.57266665",
"0.57229686",
"0.57175463",
"0.5705802",
"0.5698347",
"0.5697827",
"0.569054",
"0.5689405",
"0.5686434",
"0.56738997",
"0.5662217",
"0.56531453",
"0.5645255",
"0.5644223",
"0.5642628",
"0.5642476",
"0.5640595",
"0.56317437",
"0.56294966",
"0.56289655",
"0.56220204",
"0.56180173",
"0.56134313",
"0.5611337",
"0.56112075",
"0.56058615",
"0.5604383",
"0.5602629",
"0.56002104",
"0.5591573",
"0.55856615",
"0.5576992",
"0.55707216",
"0.5569681",
"0.55570376",
"0.55531484",
"0.5551123",
"0.5550893",
"0.55482954",
"0.5547471",
"0.55469507",
"0.5545719",
"0.5543553",
"0.55424106",
"0.5542057",
"0.55410767",
"0.5537739",
"0.55269134",
"0.55236584",
"0.55170715",
"0.55035424",
"0.55020875"
] |
0.0
|
-1
|
This method was generated by MyBatis Generator. This method returns the value of the database column teacher.teacher_id
|
public Integer getTeacherId() {
return teacherId;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public int getTeacherid() {\r\n return teacherid;\r\n }",
"public String getTeacherId() {\n return teacherId;\n }",
"public Teacher findTeacherId(Integer t_id) {\n\t\tCourtyardMapper courtyardMapper = this.getSqlSession().getMapper(CourtyardMapper.class);\n\t\tTeacher teacher = courtyardMapper.findTeacherId(t_id);\n\t\tSystem.out.println(\"--Into Dao Method of findTeacherId!!!--\");\n\t\treturn teacher;\n\t}",
"public void setTeacherId(Integer teacherId) {\n this.teacherId = teacherId;\n }",
"public void setTeacherId(Integer teacherId) {\n this.teacherId = teacherId;\n }",
"private int getTeacherID(){\n return getSharedPreferences(\"TEACHER_INFO\", Context.MODE_PRIVATE).\n getInt(\"ID_TEACHER\",0);\n }",
"public Long getResearchteacherid() {\r\n\t\treturn researchteacherid;\r\n\t}",
"@Override\n\tpublic Integer do_insertTeacher(Teacher teacher) {\n\t\tString id = teacherDAO.getLastTeacherID();\n\t\tInteger int_id = Integer.valueOf(id.substring(2, id.length()));\n\t\tteacher.setT_id(id.substring(0, 2)+(int_id+1));\n\t\treturn teacherDAO.do_insertTeacher(teacher);\n\t}",
"public String getTeacherRoleId() {\n return teacherRoleId;\n }",
"public boolean updateTeacherT_id(Teacher teacher) {\n\t\tCourtyardMapper courtyardMapper = this.getSqlSession().getMapper(CourtyardMapper.class);\n\t\tcourtyardMapper.updateTeacherT_id(teacher);\n\t\tSystem.out.println(\"--Into Dao Method of updateTeacherT_id!!!--\");\n\t\treturn true;\n\t}",
"Teacher selectByPrimaryKey(Integer pkid);",
"public void setTeacherId(String teacherId) {\n this.teacherId = teacherId;\n }",
"public static Teachers getTeacher(int teacher_id) {\n\n Teachers teacher = null;\n\n String sql = \"SELECT * FROM teachers WHERE teacher_id = \" + teacher_id;\n\n try (Connection connection = Database.getConnection();\n Statement statement = connection.createStatement();\n ResultSet set = statement.executeQuery(sql)) {\n\n if (set.next())\n teacher = new Teachers(set.getInt(\"teacher_id\"),\n set.getString(\"name\"),\n set.getInt(\"age\"),\n set.getString(\"gender\"),\n set.getString(\"email_id\"));\n\n } catch (SQLException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n\n return teacher;\n }",
"@Override\n\tpublic List<Teacher> getTeaNameAndID() {\n\t\treturn teacherDAO.getTeaNameAndID();\n\t}",
"@Override\r\n\t@Transactional\r\n\tpublic int saveTeacher(Teacher teacher) {\n\t\tString username = UserNameUtil.createUsername(teacher.getFirstName());\r\n\t\tSystem.out.println(username);\r\n\t\tList<String> roles = new ArrayList<String>();\r\n\t\troles.add(RoleConstants.TEACHER);\r\n\t\tint id = commonDao.createUserAndSetRoles(username, roles);\r\n\t\tSystem.out.println(\"user id : \"+ id );\r\n\t\tteacher.setTeacherId(id);\r\n\t\tint status = schoolDao.saveTeacher(teacher);\r\n\t\treturn status;\r\n\t}",
"@Override\n\tpublic Integer getTeacherForCount() {\n\t\treturn teacherDAO.getTeacherForCount();\n\t}",
"@Override\r\n\t\tpublic TeacherDto getTeacherById(long teacherId) {\n\t\t\tTeacherDto obj = TeacherTransformer.getTeacherEntityToDto(teacherRepository.findById(teacherId).get());\r\n\t\t\treturn obj;\r\n\r\n\t\t}",
"public String getTeacherName() {\n/* 31 */ return this.teacherName;\n/* */ }",
"public List<Teacher> findTeacherList(Integer i_id) {\n\t\tCourtyardMapper courtyardMapper = this.getSqlSession().getMapper(CourtyardMapper.class);\n\t\tList<Teacher> teachers = courtyardMapper.findTeacherList(i_id);\n\t\tSystem.out.println(\"--Into Dao Method of findTeacherList!!!--\");\n\t\treturn teachers;\n\t}",
"public String getTeacherName() {\n return teacherName;\n }",
"ac_teacher_instrument selectByPrimaryKey(Integer acTeacherInstrumentId);",
"@Override\r\n\tpublic List<Integer> getAllTeacherId() {\n\t\tsession = sessionFactory.openSession();\r\n\t\tTransaction tran = session.beginTransaction();\r\n\t\tString hql = \"select id from Teacher where state=:state\";\t\t\r\n\t\t@SuppressWarnings(\"unchecked\")\r\n\t\tList<Integer> lists = session.createQuery(hql).setInteger(\"state\", 0).list();\r\n\t\ttran.commit();\r\n\t\tsession.close();\r\n\t\tlogger.debug(\"use the method named :getAllTeacherId()\");\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}",
"public String getCourseTeacher() {\n return courseTeacher;\n }",
"@Override\n\tpublic Integer do_updateTeacher(Teacher teacher) {\n\t\treturn teacherDAO.do_updateTeacher(teacher);\n\t}",
"@Override\n\tpublic Teacher getById(long id) {\n\t\treturn null;\n\t}",
"public com.heman.bysj.jooq.tables.pojos.Teacher fetchOneByTid(Integer value) {\n return fetchOne(Teacher.TEACHER.TID, value);\n }",
"public Student getTeacher() {\n // TODO implement here\n return teacher;\n }",
"@Override\n\tpublic TeacherInfo getTeacherInfo(String id) {\n\t\treturn userMapper.getTeacherInfo(id);\n\t}",
"@Override\n\tpublic List<Map<String, Object>> getTeacher() {\n\t\treturn getSession().selectList(getNamespace() + \"getTeacher\");\n\t}",
"public int getStudentId();",
"@Override\r\n\t//得到任一都是老师对应的课程种类Id\r\n\tpublic List<Integer> getAllcourseCategoryIDsFormTeacher(int teacherId) {\n\t\tsession = sessionFactory.openSession();\r\n\t\tTransaction tran = session.beginTransaction();\r\n\t\tString hql = \"select courseCategoryIds from Teacher where state=:state and id=:teacherId\";\t\t\r\n\t\t@SuppressWarnings(\"unchecked\")\r\n\t\tList<String> lists = session.createQuery(hql).setInteger(\"state\", 0).setInteger(\"teacherId\",teacherId).list();\r\n\t\ttran.commit();\r\n\t\tsession.close();\r\n\t\tList<Integer> list =new ArrayList<Integer>();\r\n\t\tlogger.debug(\"use the method named :getAllcourseCategoryIDsFormTeacher(int teacherId)\");\r\n\t\tif (lists.size() > 0) {\r\n\t\t\tString[] target= lists.get(0).split(\",\");\r\n\t\t\tfor(int i=0;i<target.length;i++){\r\n\t\t\t\tlist.add(Integer.parseInt(target[i]));\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\treturn list;\r\n\t}",
"public TeamStudentPK getId() {\r\n\t\treturn this.id;\r\n\t\t\r\n\t}",
"@Override\n\tpublic Teacher findOne(int id) {\n\t\treturn dao.findOne(id);\n\t}",
"public long getPersonId();",
"private void viewTeacher() {\n //Lesen wir die ID\n Scanner sc = new Scanner(System.in);\n System.out.print(\"ID of the teacher to be viewed: \");\n long ID = sc.nextLong();\n\n Teacher t = ctrl.getTeacherRepo().findOne(ID);\n if (t != null)\n System.out.println(t.toString());\n else\n System.out.println(\"Teacher with this ID doesn't exist!\");\n }",
"public long getEmployeeId();",
"int getDoctorId();",
"int getDoctorId();",
"public BigDecimal getTeachid() {\n return teachid;\n }",
"public int getExamId();",
"public String getTraderEmployeeId() {\n return traderEmployeeId;\n }",
"public final Long getId_etudiant() {\n return this.id_etudiant;\n }",
"public int getId() \r\n {\r\n return studentId;\r\n }",
"public Teacher get(String id) {\n Session session = sessionFactory.getCurrentSession();\n Transaction transaction = session.beginTransaction();\n Teacher teacher = (Teacher) session.get(Teacher.class, id);\n transaction.commit();\n return teacher;\n }",
"TeacherRecord getTeacher(String recordId, String clientId) throws Exception;",
"@Query(value =\"select teaching_hours_used from teacher_hours where user_id = :teacherId \", nativeQuery = true)\n int getHoursUsed(@Param(\"teacherId\") Integer teacherId);",
"@Produces(MediaType.APPLICATION_JSON)\n @Override\n public Boolean deleteTeacherById(int teacherId) {\n List<Lesson> lessonsAttachedToThisTeacher = lessonService.findAllLessonsByTeacher(teacherId).getBody();\n if (lessonsAttachedToThisTeacher != null) {\n for (Lesson lesson : lessonsAttachedToThisTeacher) {\n lessonService.removeLesson(lesson.getId());\n }\n }\n List<Map<String, Object>> eaattrList =\n learningCenterDataBaseUtil.getEntityAttrIdRelAttrNameByEntityName(\"Teacher\");\n // removing rows from value table\n for (Map<String, Object> eaAttr : eaattrList) {\n learningCenterDataBaseUtil.removeRowFromValue(\n teacherId,\n Integer.valueOf(eaAttr.get(\"entity_attribute_id\").toString())\n );\n }\n // removing row from object table\n learningCenterDataBaseUtil.removeRowFromObject(teacherId);\n return true;\n }",
"public static Teachers getTeacherWithClassesAndSubjects(int teacher_id) {\n\n Teachers teacher = null;\n\n String sql = \"SELECT * FROM teachers WHERE teacher_id = \" + teacher_id;\n\n try (Connection connection = Database.getConnection();\n Statement statement = connection.createStatement();\n ResultSet set = statement.executeQuery(sql)) {\n\n if (set.next()) {\n\n int teacherId = set.getInt(\"teacher_id\");\n\n List<Classes> classes = ClassSubjectsTeachersDAO\n .getClassesWithTeacherId(connection, teacherId);\n List<Subjects> subjects = ClassSubjectsTeachersDAO\n .getSubjectsWithTeacherId(connection, teacherId);\n\n teacher = new Teachers(teacherId,\n set.getString(\"name\"),\n set.getInt(\"age\"),\n set.getString(\"gender\"),\n set.getString(\"email_id\"),\n subjects, classes);\n }\n\n } catch (SQLException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n\n return teacher;\n }",
"int getEmployeeId();",
"@Query(value =\"select teaching_hours_left from teacher_hours where user_id = :teacherId \", nativeQuery = true)\n int getHoursLeft(@Param(\"teacherId\") Integer teacherId);",
"public int getEmployeeId();",
"public void setTeacherRoleId(String teacherRoleId) {\n this.teacherRoleId = teacherRoleId == null ? null : teacherRoleId.trim();\n }",
"public int getEmpID() {\n return empID;\n }",
"@Override\n\tpublic long getEmpId() {\n\t\treturn _employee.getEmpId();\n\t}",
"public long getStudentID();",
"public String getTutorId() {\n return tutorId;\n }",
"public int getEmpId() {\n return id;\n }",
"public Long getPersonaId();",
"public BigDecimal getEmployerId() {\n return getEmployerIdProperty().getValue();\n }",
"public int getMovieTmdbId() {\n Integer res = getIntegerOrNull(MovieColumns.TMDB_ID);\n if (res == null)\n throw new NullPointerException(\"The value of 'tmdb_id' in the database was null, which is not allowed according to the model definition\");\n return res;\n }",
"public java.lang.Long getTiag_id();",
"private int getEmployeeId() {\r\n\t\t// TODO Auto-generated method stub\r\n\t\tint employeeId1 = 0;\r\n\t\tString sql = \"SELECT Patient_Id_Sequence.NEXTVAL FROM DUAL\";\r\n\t\ttry {\r\n\t\t\tPreparedStatement pstmt = con.prepareStatement(sql);\r\n\t\t\tResultSet res = pstmt.executeQuery();\r\n\t\t\tif (res.next()) {\r\n\t\t\t\temployeeId1 = res.getInt(1);\r\n\t\t\t}\r\n\t\t} catch (SQLException e) {\r\n\t\t\tSystem.out.println(\"error while fetching data from database\");\r\n\t\t}\r\n\t\treturn employeeId1;\r\n\r\n\t}",
"public void add(Teacher teacher) {\n Session session = sessionFactory.getCurrentSession();\n Transaction transaction = session.beginTransaction();\n session.save(teacher);\n transaction.commit();\n }",
"public Long getQuestionId();",
"public void setResearchteacherid(Long researchteacherid) {\r\n\t\tthis.researchteacherid = researchteacherid;\r\n\t}",
"public static Ring getRingByTeacherId(int teacherId) {\n\r\n String sql = \"select r.* from ring r \\n\"\r\n + \"join Teacher t \\n\"\r\n + \"on t.ringId = r.ringId \\n\"\r\n + \"where t.teacherId = ?\";\r\n\r\n Connection conn = DB.connect();\r\n PreparedStatement st;\r\n ResultSet rs;\r\n Ring ring;\r\n try {\r\n st = conn.prepareStatement(sql);\r\n st.setInt(1, teacherId);\r\n rs = st.executeQuery();\r\n System.out.println(sql);\r\n if (rs.next()) {\r\n ring = new Ring();\r\n \r\n ring.setRingId(rs.getInt(\"ringId\"));\r\n ring.setSchoolId(rs.getInt(\"schoolId\"));\r\n //ring.setDate(rs.getDate(\"date\"));\r\n ring.setName(rs.getString(\"name\"));\r\n ring.setMaxStudentNumber(rs.getInt(\"maxStudentNumber\"));\r\n \r\n return ring;\r\n }\r\n } catch (SQLException ex) {\r\n Logger.getLogger(User.class.getName()).log(Level.SEVERE, null, ex);\r\n \r\n }\r\n return null;\r\n }",
"protected int GetID() {\n\t\treturn this.JunctionID;\n\t}",
"public int getId_traveller() {\r\n return id_traveller;\r\n }",
"@Override\n\tpublic String getId() {\n\t\tString pName = ctx.getCallerPrincipal().getName();\n\t\tPerson p = userEJB.findPerson(pName);\n\t\tString id = p.getId()+\"\";\n\t\treturn id;\n\t\t\n\t}",
"@Override\n\tpublic long getPrimaryKey() {\n\t\treturn _employee.getPrimaryKey();\n\t}",
"public Teacher(final String id) {\n this._id = id;\n \n }",
"@Query(value = \"select last_insert_id() from orden limit 1;\",nativeQuery = true)\n\tpublic Integer getLastId();",
"public int getEmpId() {\n\t\treturn empId; \n\t}",
"public boolean saveTeacher(Map map) {\n\t\tCourtyardMapper courtyardMapper = this.getSqlSession().getMapper(CourtyardMapper.class);\n\t\tcourtyardMapper.saveTeacher(map);\n\t\tSystem.out.println(\"--Into Dao Method of saveTeacher!!!--\");\n\t\treturn true;\n\t}",
"public long getLichChiTietId();",
"@Override\n\tpublic long getEmployeeId() {\n\t\treturn _userSync.getEmployeeId();\n\t}",
"@Override\r\n\tpublic int getLastId() {\n\t\treturn adminDAO.getLastId();\r\n\t}",
"@Override\n\tpublic long getStudentId() {\n\t\treturn model.getStudentId();\n\t}",
"public Integer getId() {\n\t\treturn getPatientId();\n\t}",
"public String getResearchteachername() {\r\n\t\treturn researchteachername;\r\n\t}",
"@Override\n\tpublic void update(Teacher teacher) {\n\t\tteacherDao.update(teacher);\n\t}",
"public String getEmpID() {\r\n return empID;\r\n }",
"public int getEmpId() {\n\t\treturn empId;\n\t}",
"public int getEmpId() {\n\t\treturn empId;\n\t}",
"public Long getIdPerson() {\n\t\treturn this.idPerson;\n\t}",
"public int getId() {\n\n\t\treturn id; // returns student id\n\n\t}",
"java.lang.String getPatientId();",
"public String getId()\r\n {\r\n return departmentBean.getId();\r\n }",
"@Projection(name = \"IdTeacher\", types = TblTeacher.class)\npublic interface Teacher {\n\n int getId();\n\n String getUserCode();\n\n String getLoginCode();\n\n String getName();\n\n String getSex();\n\n String getDep();\n\n String getBirthday();\n String getEdu();\n\n String getEntryTime();\n\n String getPhone();\n\n String getAddress();\n\n String getPassword();\n\n Integer getIsAdmin();\n}",
"public int getEmployeeId() {\n return employeeId_;\n }",
"@Override\n\tpublic void update(Teacher teacher) {\n\t\tdao.update(teacher);\n\t}",
"public Integer getIdPerson() {\r\n return idPerson;\r\n }",
"public int getId() {\n return tableId;\n }",
"public long getId() {\n return ctTableColumn.getId();\n }",
"public int getEmployeeId() {\r\n\t\r\n\t\treturn employeeId;\r\n\t}",
"@Override\n\tpublic long getPrimaryKey() {\n\t\treturn _phieugiahan.getPrimaryKey();\n\t}",
"int getSkillId();",
"public java.lang.String getPrimaryKey() {\n\t\treturn _primarySchoolStudent.getPrimaryKey();\n\t}",
"@Id\n\t@Column(name=\"id_trabajador\")\n\t@GeneratedValue(strategy=GenerationType.IDENTITY)\n\tpublic Integer getIdTrabajador() {\n\t\treturn idTrabajador;\n\t}"
] |
[
"0.7534777",
"0.75004137",
"0.690674",
"0.6805785",
"0.6805785",
"0.6718325",
"0.66733813",
"0.6659815",
"0.66307",
"0.6591227",
"0.655723",
"0.6484694",
"0.63732356",
"0.6286159",
"0.601184",
"0.5974315",
"0.58983946",
"0.5782713",
"0.5775636",
"0.5772214",
"0.5761795",
"0.5761517",
"0.56893754",
"0.5681276",
"0.56660795",
"0.56591505",
"0.5633527",
"0.56253475",
"0.56202203",
"0.5598224",
"0.5566145",
"0.55396837",
"0.55048823",
"0.5494583",
"0.5494014",
"0.5489342",
"0.5478275",
"0.5478275",
"0.5476695",
"0.54741275",
"0.54720443",
"0.5466004",
"0.5454717",
"0.5440934",
"0.5431141",
"0.5427039",
"0.54219043",
"0.54130095",
"0.5401844",
"0.53877914",
"0.53836906",
"0.5379914",
"0.5379336",
"0.53775966",
"0.5370333",
"0.5366544",
"0.53623474",
"0.5347632",
"0.5332097",
"0.53245723",
"0.53157675",
"0.53141415",
"0.5311242",
"0.5306709",
"0.5299855",
"0.5294187",
"0.52906036",
"0.5287634",
"0.5282672",
"0.5281273",
"0.52774054",
"0.52683485",
"0.5263938",
"0.5253938",
"0.52485937",
"0.5237672",
"0.5236472",
"0.5233014",
"0.52217966",
"0.52172077",
"0.52119684",
"0.52093375",
"0.5201477",
"0.5201477",
"0.51982635",
"0.51968026",
"0.51956576",
"0.51879674",
"0.5179417",
"0.5172931",
"0.5164012",
"0.51517594",
"0.5150917",
"0.5143673",
"0.5130323",
"0.51252496",
"0.5124942",
"0.51222885",
"0.5121865"
] |
0.77564216
|
1
|
This method was generated by MyBatis Generator. This method sets the value of the database column teacher.teacher_id
|
public void setTeacherId(Integer teacherId) {
this.teacherId = teacherId;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public void setTeacherId(String teacherId) {\n this.teacherId = teacherId;\n }",
"public boolean updateTeacherT_id(Teacher teacher) {\n\t\tCourtyardMapper courtyardMapper = this.getSqlSession().getMapper(CourtyardMapper.class);\n\t\tcourtyardMapper.updateTeacherT_id(teacher);\n\t\tSystem.out.println(\"--Into Dao Method of updateTeacherT_id!!!--\");\n\t\treturn true;\n\t}",
"public Integer getTeacherId() {\n return teacherId;\n }",
"public Integer getTeacherId() {\n return teacherId;\n }",
"public int getTeacherid() {\r\n return teacherid;\r\n }",
"public String getTeacherId() {\n return teacherId;\n }",
"@Override\n\tpublic Integer do_insertTeacher(Teacher teacher) {\n\t\tString id = teacherDAO.getLastTeacherID();\n\t\tInteger int_id = Integer.valueOf(id.substring(2, id.length()));\n\t\tteacher.setT_id(id.substring(0, 2)+(int_id+1));\n\t\treturn teacherDAO.do_insertTeacher(teacher);\n\t}",
"@Override\n\tpublic void update(Teacher teacher) {\n\t\tteacherDao.update(teacher);\n\t}",
"@Override\n\tpublic void update(Teacher teacher) {\n\t\tdao.update(teacher);\n\t}",
"@Override\r\n\t@Transactional\r\n\tpublic int saveTeacher(Teacher teacher) {\n\t\tString username = UserNameUtil.createUsername(teacher.getFirstName());\r\n\t\tSystem.out.println(username);\r\n\t\tList<String> roles = new ArrayList<String>();\r\n\t\troles.add(RoleConstants.TEACHER);\r\n\t\tint id = commonDao.createUserAndSetRoles(username, roles);\r\n\t\tSystem.out.println(\"user id : \"+ id );\r\n\t\tteacher.setTeacherId(id);\r\n\t\tint status = schoolDao.saveTeacher(teacher);\r\n\t\treturn status;\r\n\t}",
"public void addClassToTeacher(Classes teacher_class) {\n db.addClassToTeacher(teacher_class);\n }",
"public void setTeacherRoleId(String teacherRoleId) {\n this.teacherRoleId = teacherRoleId == null ? null : teacherRoleId.trim();\n }",
"@Override\n\tpublic Integer do_updateTeacher(Teacher teacher) {\n\t\treturn teacherDAO.do_updateTeacher(teacher);\n\t}",
"public String getTeacherRoleId() {\n return teacherRoleId;\n }",
"public void add(Teacher teacher) {\n Session session = sessionFactory.getCurrentSession();\n Transaction transaction = session.beginTransaction();\n session.save(teacher);\n transaction.commit();\n }",
"public Teacher findTeacherId(Integer t_id) {\n\t\tCourtyardMapper courtyardMapper = this.getSqlSession().getMapper(CourtyardMapper.class);\n\t\tTeacher teacher = courtyardMapper.findTeacherId(t_id);\n\t\tSystem.out.println(\"--Into Dao Method of findTeacherId!!!--\");\n\t\treturn teacher;\n\t}",
"public void setTeacher(Student s) {\n // TODO implement here\n \tthis.teacher = s;\n }",
"public void edit(Teacher teacher) {\n Session session = sessionFactory.getCurrentSession();\n Teacher existingTeacher = (Teacher) session.get(Teacher.class, teacher.getEmail());\n Transaction transaction = session.beginTransaction();\n\n existingTeacher.setName(teacher.getName());\n existingTeacher.setCountry(teacher.getCountry());\n existingTeacher.setInfo(teacher.getInfo());\n existingTeacher.setPicture(teacher.getPicture());\n existingTeacher.setBirthDate(teacher.getBirthDate());\n existingTeacher.setUniversity(teacher.getUniversity());\n existingTeacher.setPost(teacher.getPost());\n existingTeacher.setDegree(teacher.getDegree());\n\n session.save(existingTeacher);\n transaction.commit();\n }",
"public void setResearchteacherid(Long researchteacherid) {\r\n\t\tthis.researchteacherid = researchteacherid;\r\n\t}",
"public Long getResearchteacherid() {\r\n\t\treturn researchteacherid;\r\n\t}",
"public Teacher(final String id) {\n this._id = id;\n \n }",
"public void update(Teacher o) throws SQLException {\n\t\t\r\n\t}",
"Teacher selectByPrimaryKey(Integer pkid);",
"public void addTeacher(Teacher teacher) {\n\t\tteachersRepository.save(teacher);\r\n\t\t//teachersList.add(teacher);\r\n\t}",
"private int getTeacherID(){\n return getSharedPreferences(\"TEACHER_INFO\", Context.MODE_PRIVATE).\n getInt(\"ID_TEACHER\",0);\n }",
"public void setCourseTeacher(String courseTeacher) {\n this.courseTeacher = courseTeacher;\n }",
"int updateByPrimaryKey(Teacher record);",
"public void updateTeacher(int teacherID, int newTeacherID) {\n\n for (int i = 0; i < this.teachers.size(); i++) {\n if (getTeacherID(i) == teacherID) {\n this.teachers.set(i, newTeacherID);\n }\n }\n\n }",
"@Override\n\tpublic void create(Teacher teacher) {\n\t\tdao.create(teacher);\n\t}",
"@Override\r\n\tpublic void insertTea(Teacher teacher) {\n\r\n\t}",
"public boolean saveTeacher(Map map) {\n\t\tCourtyardMapper courtyardMapper = this.getSqlSession().getMapper(CourtyardMapper.class);\n\t\tcourtyardMapper.saveTeacher(map);\n\t\tSystem.out.println(\"--Into Dao Method of saveTeacher!!!--\");\n\t\treturn true;\n\t}",
"private void updateTeacherProfileInfo() {\n\t\t\n\t\tteacher.setLastName(tLastNameTF.getText());\n\t\tteacher.setFirstName(tFirstNameTF.getText());\n\t\tteacher.setSchoolName(tSchoolNameTF.getText());\n\t\t\n\t\t//Update Teacher profile information in database\n\t\t\n\t}",
"public static Teachers getTeacher(int teacher_id) {\n\n Teachers teacher = null;\n\n String sql = \"SELECT * FROM teachers WHERE teacher_id = \" + teacher_id;\n\n try (Connection connection = Database.getConnection();\n Statement statement = connection.createStatement();\n ResultSet set = statement.executeQuery(sql)) {\n\n if (set.next())\n teacher = new Teachers(set.getInt(\"teacher_id\"),\n set.getString(\"name\"),\n set.getInt(\"age\"),\n set.getString(\"gender\"),\n set.getString(\"email_id\"));\n\n } catch (SQLException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n\n return teacher;\n }",
"public TeacherDao() {\n super(Teacher.TEACHER, com.heman.bysj.jooq.tables.pojos.Teacher.class);\n }",
"@Produces(MediaType.APPLICATION_JSON)\n @Override\n public Boolean deleteTeacherById(int teacherId) {\n List<Lesson> lessonsAttachedToThisTeacher = lessonService.findAllLessonsByTeacher(teacherId).getBody();\n if (lessonsAttachedToThisTeacher != null) {\n for (Lesson lesson : lessonsAttachedToThisTeacher) {\n lessonService.removeLesson(lesson.getId());\n }\n }\n List<Map<String, Object>> eaattrList =\n learningCenterDataBaseUtil.getEntityAttrIdRelAttrNameByEntityName(\"Teacher\");\n // removing rows from value table\n for (Map<String, Object> eaAttr : eaattrList) {\n learningCenterDataBaseUtil.removeRowFromValue(\n teacherId,\n Integer.valueOf(eaAttr.get(\"entity_attribute_id\").toString())\n );\n }\n // removing row from object table\n learningCenterDataBaseUtil.removeRowFromObject(teacherId);\n return true;\n }",
"private void addTeacher() {\n\t\t\n\t\tString lastName = tLastNameTF.getText();\n\t\tString firstName = tFirstNameTF.getText();\n\t\tString schoolName = tSchoolNameTF.getText();\n\t\tString userName = tUsernameTF.getText();\n\t\tchar[] password = tPasswordPF1.getPassword();\n\t\tString sA1 = tSecurityQ1TF.getText();\n\t\tString sQ1 = (String)tSecurityList1.getSelectedItem();\n\t\tString sA2 = tSecurityQ2TF.getText();\n\t\tString sQ2 = (String)tSecurityList2.getSelectedItem();\n\t\t\n\t\tteacher = new Teacher(lastName, firstName, schoolName, userName, password, sA1, sQ1, sA2, sQ2);\n\t\t\n\t\t//Add teacher to database \n\t\t\n\t}",
"public void setTeacherName(String teacherName) {\n this.teacherName = teacherName == null ? null : teacherName.trim();\n }",
"@Override\r\n\tpublic void editTea(Teacher teacher) {\n\r\n\t}",
"private void setEmployeeID() {\n try {\n employeeID = userModel.getEmployeeID(Main.getCurrentUser());\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }",
"private void updateFromListTeacher(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\n\t\tint id=Integer.parseInt(req.getParameter(\"teacherid\"));\n\t\ttry {\n\t\t\tTeacher teacher=teacherDAO.getTeacher(id);\n\t\t\treq.setAttribute(\"teacher\", teacher);\n\t\t\treq.getServletContext().getRequestDispatcher(\"/updateTeacher.jsp\")\n\t\t\t.forward(req, resp);\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"@Test\n public void setTutor() {\n Employee em = employeeService.findById(5);\n System.out.println(\"=======\" + em.getName());\n Student student1 = studentService.findById(22);\n System.out.println(\"*********\" + student1.getName());\n student1.setTutor(em);\n studentService.update(student1);\n studentService.saveOrUpdate(student1);\n }",
"public com.heman.bysj.jooq.tables.pojos.Teacher fetchOneByTid(Integer value) {\n return fetchOne(Teacher.TEACHER.TID, value);\n }",
"private void saveData(){\n databaseReference.setValue(new Teacher(0, \"\", 0.0));\n }",
"public void setTeachid(BigDecimal teachid) {\n this.teachid = teachid;\n }",
"@Override\n\tpublic Teacher getById(long id) {\n\t\treturn null;\n\t}",
"public String getTeacherName() {\n/* 31 */ return this.teacherName;\n/* */ }",
"public void setStudentId(int studentId);",
"@Override\n\tpublic void modifyTeacherCourse(TeacherCourse tc) {\n\t\tcd.updateTeacherCourse(tc);\n\t}",
"public List<Teacher> findTeacherList(Integer i_id) {\n\t\tCourtyardMapper courtyardMapper = this.getSqlSession().getMapper(CourtyardMapper.class);\n\t\tList<Teacher> teachers = courtyardMapper.findTeacherList(i_id);\n\t\tSystem.out.println(\"--Into Dao Method of findTeacherList!!!--\");\n\t\treturn teachers;\n\t}",
"public void setTeacherLogin(String newTeacherLogin) {\n\t\tthis.teacherLogin = newTeacherLogin;\n\t}",
"@Override\n\tpublic ResponseEntity<?> postPutTeacher(UTeacherEntity teacher, UserDTO newTeacher) {\n\t\tif (newTeacher.getTeacherTitle() == null) {\n\t\t\treturn new ResponseEntity<RestError>(new RestError(2, \"Title must be provided\"), HttpStatus.BAD_REQUEST);\n\t\t}\n\t\tif (newTeacher.getTeacherNoOfLicence() == null) {\n\t\t\treturn new ResponseEntity<RestError>(new RestError(2, \"Teacher number of licence must be provided\"),\n\t\t\t\t\tHttpStatus.BAD_REQUEST);\n\t\t}\n\t\tteacher.setName(newTeacher.getName());\n\t\tteacher.setLastName(newTeacher.getLastName());\n\t\tteacher.setEmail(newTeacher.getEmail());\n\t\tteacher.setTitle(newTeacher.getTeacherTitle());\n\t\tteacher.setNoOfLicence(newTeacher.getTeacherNoOfLicence());\n\t\tteacherRepo.save(teacher);\n\t\tlogger.error(\"Error occured while creating tgs\");\n\t\tlogger.info(\"Admin (email: \" + AuthController.getEmail() + \") added new/updated teacher \" + teacher);\n\n\t\treturn new ResponseEntity<UTeacherEntity>(teacher, HttpStatus.OK);\n\t}",
"int updateByPrimaryKey(ac_teacher_instrument record);",
"public void insert(Teacher o) throws SQLException {\n\t\t\r\n\t}",
"public void setStudentID(long studentID);",
"@RequestMapping(\"/upgrade/{id}\") public String upgradeToTeacher(@PathVariable(\"id\") long id, Model model){\n Student student = students.findById(id).get();\n model.addAttribute(\"newTeacher\", adminService.studentToTeacher(student));\n model.addAttribute(\"dpmnts\", dpmnts.findAll());\n students.delete(student);\n return \"admin/addteacher\";\n }",
"@Override\r\n\t\tpublic TeacherDto getTeacherById(long teacherId) {\n\t\t\tTeacherDto obj = TeacherTransformer.getTeacherEntityToDto(teacherRepository.findById(teacherId).get());\r\n\t\t\treturn obj;\r\n\r\n\t\t}",
"@Override\n\tpublic List<Teacher> getTeaNameAndID() {\n\t\treturn teacherDAO.getTeaNameAndID();\n\t}",
"@Override\n\tpublic int insertTeacher(Sy05 record) {\n\t\treturn 0;\n\t}",
"public void setId(final TeamStudentPK id) {\r\n\t\tthis.id = id;\r\n\t}",
"@Override\n\tpublic Integer getTeacherForCount() {\n\t\treturn teacherDAO.getTeacherForCount();\n\t}",
"public String getTeacherName() {\n return teacherName;\n }",
"@Override\r\n\t\tpublic boolean addTeacher(TeacherDto teacherDto) {\n\t\t\ttry{\r\n\t\t\t\tList<Teacher> list = teacherRepository.findBySubjectAndStudentid(teacherDto.getSubject(), teacherDto.getStudentid());\r\n\t\t\t\t\t\tif (list.size() > 0) {\r\n\t\t\t\treturn false;\r\n\t\t\t} else {\t\t\r\n\t\t\tArrayList arr=new ArrayList<>();\r\n\t\t\tarr.add(\"MATHS\");\r\n\t\t\tarr.add(\"PHYSICS\");\r\n\t\t\tarr.add(\"CHEMISTRY\");\r\n\t\t\tif(!arr.contains(teacherDto.getSubject()))\r\n\t\t\t{\r\n\t\t\tTeacher teacher=teacherRepository.save(TeacherTransformer.getTeacherDtoToEntity(teacherDto));\r\n\t\t\tStudent student = restTemplate.getForObject(\"http://localhost:8080/studentservice/students/\" + teacher.getStudentid(),Student.class);\r\n\t if(teacher.getSubject().toUpperCase().equals(\"MATHS\"))\r\n\t\t\t{\r\n\t\t\t\tstudent.setMaths(teacher.getMarks());\r\n\t\t\t}else if(teacher.getSubject().toUpperCase().equals(\"PHYSICS\"))\r\n\t\t\t{\r\n\t\t\t\tstudent.setPhysics(teacher.getMarks());\r\n\t\t\t}\r\n\t\t\telse if(teacher.getSubject().toUpperCase().equals(\"CHEMISTRY\")) \r\n\t\t\t{\r\n\t\t\t\tstudent.setChemistry(teacher.getMarks());\r\n\t\t\t}else {}\r\n\t\t\t\t\trestTemplate.postForObject(\"http://localhost:8080/studentservice/students/update\", StudentTransformer.getStudentEntityToDto(student), StudentDto.class);\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\r\n\t\t}\r\n\t\t\t}catch(Exception e)\r\n\t\t\t{\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}",
"public static Teachers getTeacherWithClassesAndSubjects(int teacher_id) {\n\n Teachers teacher = null;\n\n String sql = \"SELECT * FROM teachers WHERE teacher_id = \" + teacher_id;\n\n try (Connection connection = Database.getConnection();\n Statement statement = connection.createStatement();\n ResultSet set = statement.executeQuery(sql)) {\n\n if (set.next()) {\n\n int teacherId = set.getInt(\"teacher_id\");\n\n List<Classes> classes = ClassSubjectsTeachersDAO\n .getClassesWithTeacherId(connection, teacherId);\n List<Subjects> subjects = ClassSubjectsTeachersDAO\n .getSubjectsWithTeacherId(connection, teacherId);\n\n teacher = new Teachers(teacherId,\n set.getString(\"name\"),\n set.getInt(\"age\"),\n set.getString(\"gender\"),\n set.getString(\"email_id\"),\n subjects, classes);\n }\n\n } catch (SQLException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n\n return teacher;\n }",
"@Override\n\tpublic long create(Teacher teacher) {\n\t\treturn 0;\n\t}",
"int updateByPrimaryKeySelective(ac_teacher_instrument record);",
"@Override\n\tpublic boolean update(Teacher teacher) {\n\t\treturn false;\n\t}",
"@PutMapping(\"/{id}\")\n public TeacherDTO updateById(@RequestBody TeacherDTO teacherDTO, @PathVariable Long id, Locale locale) {\n Teacher teacher = teacherService.updateById(convertToEntity(teacherDTO), id, locale);\n return convertToDto(teacher);\n }",
"ac_teacher_instrument selectByPrimaryKey(Integer acTeacherInstrumentId);",
"public String getCourseTeacher() {\n return courseTeacher;\n }",
"public void setHC_EmployeeGrade2_ID (int HC_EmployeeGrade2_ID);",
"public void addteacher(Teacher Te){\n this.tlist.add(Te);\n }",
"private void viewTeacher() {\n //Lesen wir die ID\n Scanner sc = new Scanner(System.in);\n System.out.print(\"ID of the teacher to be viewed: \");\n long ID = sc.nextLong();\n\n Teacher t = ctrl.getTeacherRepo().findOne(ID);\n if (t != null)\n System.out.println(t.toString());\n else\n System.out.println(\"Teacher with this ID doesn't exist!\");\n }",
"public static void setsemesterId(int semesterId) {\n ListOfSubjects.semesterId =semesterId;\n\n }",
"void update(int id, int teacherid, int noteid );",
"void save(Teacher teacher);",
"public void setTeacherOpView(int id) {\n\t\t\tviewTeacherOp = new TeacherOpView(id);\r\n\t\t\t//viewInsert.addBtnListener(listener);\r\n\t\t\t\r\n\t\t}",
"@Override\r\n\t//得到任一都是老师对应的课程种类Id\r\n\tpublic List<Integer> getAllcourseCategoryIDsFormTeacher(int teacherId) {\n\t\tsession = sessionFactory.openSession();\r\n\t\tTransaction tran = session.beginTransaction();\r\n\t\tString hql = \"select courseCategoryIds from Teacher where state=:state and id=:teacherId\";\t\t\r\n\t\t@SuppressWarnings(\"unchecked\")\r\n\t\tList<String> lists = session.createQuery(hql).setInteger(\"state\", 0).setInteger(\"teacherId\",teacherId).list();\r\n\t\ttran.commit();\r\n\t\tsession.close();\r\n\t\tList<Integer> list =new ArrayList<Integer>();\r\n\t\tlogger.debug(\"use the method named :getAllcourseCategoryIDsFormTeacher(int teacherId)\");\r\n\t\tif (lists.size() > 0) {\r\n\t\t\tString[] target= lists.get(0).split(\",\");\r\n\t\t\tfor(int i=0;i<target.length;i++){\r\n\t\t\t\tlist.add(Integer.parseInt(target[i]));\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\treturn list;\r\n\t}",
"public final void setId_etudiant(final Long id_etudiant) {\n this.id_etudiant = id_etudiant;\n }",
"@Override\n\tpublic TeacherInfo getTeacherInfo(String id) {\n\t\treturn userMapper.getTeacherInfo(id);\n\t}",
"public Student getTeacher() {\n // TODO implement here\n return teacher;\n }",
"public void setEmployeeId(long employeeId);",
"@Override\n public Teacher getModel() {\n return teacher;\n }",
"public void approveTeacherAccount(TeacherUser teacher) {\n\t\tteacher.setIsApproved(true);\n\t}",
"@Override\n\tpublic Teacher findOne(int id) {\n\t\treturn dao.findOne(id);\n\t}",
"public void setEmpId(int parseInt) {\n\t\t\n\n\n\t\t\n\t}",
"@Override\r\n\tpublic List<Integer> getAllTeacherId() {\n\t\tsession = sessionFactory.openSession();\r\n\t\tTransaction tran = session.beginTransaction();\r\n\t\tString hql = \"select id from Teacher where state=:state\";\t\t\r\n\t\t@SuppressWarnings(\"unchecked\")\r\n\t\tList<Integer> lists = session.createQuery(hql).setInteger(\"state\", 0).list();\r\n\t\ttran.commit();\r\n\t\tsession.close();\r\n\t\tlogger.debug(\"use the method named :getAllTeacherId()\");\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}",
"private void addorUpdteTeacher(HttpServletRequest req, HttpServletResponse resp,boolean update) throws ServletException, IOException {\n\t\tString url=\"/listTeacher.jsp\";\n\t\tTeacher teacher=new Teacher();\n\t\tString firstName=req.getParameter(\"firstName\");\n\t\tString lastName=req.getParameter(\"lastName\");\n\t\tString designation=req.getParameter(\"designation\");\n\t\tteacher.setFirstName(firstName);\n\t\tteacher.setLastName(lastName);\n\t\tteacher.setDesignation(designation);\n\t\t\n\t\t\ttry {\n\t\t\t\tif(!update) {\n\t\t\t\tteacherDAO.addTeacher(teacher);\n\t\t\t\t}else {\n\t\t\t\t\tint id=Integer.parseInt(req.getParameter(\"teacherid\"));\n\t\t\t\t\tteacher.setId(id);\n\t\t\t\t\tteacherDAO.updateTeacher(teacher);\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t} catch (SQLException e) {\n\t\t\t\treq.setAttribute(\"message\", e.getMessage());\n\t\t\t\tif(!update)\n\t\t\t\t\turl=\"/addTeacher.jsp\";\n\t\t\t\telse \n\t\t\t\t\turl=\"/updateTeacher.jsp\";\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\n\t\t\n\t\t\n\t\treq.getRequestDispatcher(url)\n\t\t.forward(req, resp);;\n\t\t\n\n\t}",
"private void updateTeacherSecurityInfo() {\n\t\t\n\t\tteacher.setPassword(tOldPasswordPF.getPassword());\n\t\tteacher.setSecuirtyAnswer1(tSecurityQ1TF.getText());\n\t\tteacher.setSecurityQuestion1((String)tSecurityList1.getSelectedItem());\n\t\tteacher.setSecurityAnswer2(tSecurityQ2TF.getText());\n\t\tteacher.setSecurityQuestion2((String)tSecurityList1.getSelectedItem());\n\t\t\n\t\t//Update Teacher security information in database\n\t\t\n\t}",
"public boolean resultSetByCourseNext(Teacher teacher) {\n boolean found = false;\n try{\n if(resultSet.next()){\n found = true;\n teacher.setId(resultSet.getString(\"idUser\"));\n teacher.setEmail(resultSet.getString(\"email\"));\n teacher.setPassword(resultSet.getString(\"password\"));\n teacher.setLastName(resultSet.getString(\"last_name\"));\n teacher.setFirstName(resultSet.getString(\"first_name\"));\n teacher.setPermission(resultSet.getString(\"permission\"));\n teacher.setIdCourse(resultSet.getString(\"id_CourseT\"));\n }\n } catch (SQLException throwables) {\n throwables.printStackTrace();\n }\n return found;\n }",
"public void setRole() throws SQLException\r\n\t{\r\n\t\tString SQL_USER = \"UPDATE user SET role = 'Student' WHERE id=?;\";\t\t\r\n\t\ttry\r\n\t\t{\r\n\t\t\t//Prepare the statement\r\n\t\t\tPreparedStatement statement = this.getConn().prepareStatement(SQL_USER);\r\n\r\n\t\t\t//Bind the variables\r\n\t\t\tstatement.setInt(1, userId);\r\n\r\n\t\t\t//Execute the update\r\n\t\t\tstatement.executeUpdate();\r\n\r\n\t\t} catch (SQLException e)\r\n\t\t{\r\n\t\t\tGWT.log(\"Error in SQL: Student->setRole()\", e);\r\n\t\t\tthis.getConn().rollback();\r\n\t\t\tthrow e;\t\r\n\t\t}\r\n\t\t\r\n\t\t//commit change\r\n\t\tDatabase.get().commit();\r\n\t}",
"public String getTutorId() {\n return tutorId;\n }",
"@Override\r\n\tpublic Student findTea(Teacher teacher) {\n\t\treturn null;\r\n\t}",
"@Override\r\n\tpublic List<Courseschedule> getCourseschedulesByTeacherId(int teacherId) {\n\t\tsession = sessionFactory.openSession();\r\n\t\tTransaction tran = session.beginTransaction();\r\n\t\tString hql = \"from Courseschedule where teacherId=:teacherId and state=:state\";\t\t\r\n\t\t@SuppressWarnings(\"unchecked\")\r\n\t\tList<Courseschedule> lists = session.createQuery(hql).setInteger(\"teacherId\", teacherId).setInteger(\"state\", 0).list();\r\n\t\ttran.commit();\r\n\t\tsession.close();\r\n\t\tlogger.debug(\"use the method named :getCourseschedulesByTeacherId(int teacherId)\");\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}",
"TeacherRecord getTeacher(String recordId, String clientId) throws Exception;",
"public TeacherDao(Configuration configuration) {\n super(Teacher.TEACHER, com.heman.bysj.jooq.tables.pojos.Teacher.class, configuration);\n }",
"@Override\n\tpublic ResponseEntity<?> subjectTeacher(Integer tId, Integer sId) {\n\t\tif (teacherRepo.existsById(tId)) {\n\t\t\tfor (Grade_Subject gs : gradeSubjectRepo.findBySubject_idAndGrade_LabelIsGreaterThan(sId, 4)) {\n\t\t\t\taddGradeSubject(tId, gs.getId());\n\t\t\t\tlogger.error(\"Error occured while creating tgs\");\n\t\t\t\tlogger.info(\"Admin (email: \" + AuthController.getEmail()\n\t\t\t\t\t\t+ \") added new grade_subject to subject teacher #id \" + tId);\n\t\t\t}\n\t\t\treturn new ResponseEntity<List<Teacher_Grade_Subject>>(teacherGradeSubjectRepo.findByTeacher_id(tId),\n\t\t\t\t\tHttpStatus.OK);\n\t\t} else {\n\t\t\treturn new ResponseEntity<RestError>(new RestError(10, \"There is no teacher with such ID\"),\n\t\t\t\t\tHttpStatus.NOT_FOUND);\n\t\t}\n\t}",
"public Session(int teacherId, int classId) {\n\t\tthis.teacherId = teacherId;\n\t\tthis.schoolClass = new SchoolClass(classId);\n\t\tthis.setSessionState(SessionState.Paused);\n\t}",
"private void setStudentId() {\n\t id++;\n\t this.studentId=gradeYear+\"\"+id;\n }",
"@Override\r\n\tpublic void deleteTea(Teacher teacher) {\n\r\n\t}"
] |
[
"0.73193806",
"0.7189143",
"0.7072661",
"0.7072661",
"0.6996694",
"0.6939194",
"0.66379535",
"0.6618233",
"0.660545",
"0.6595657",
"0.6361133",
"0.6341879",
"0.6341029",
"0.62816155",
"0.6253609",
"0.6102831",
"0.6095222",
"0.6075483",
"0.6074467",
"0.60227746",
"0.5968314",
"0.592007",
"0.590567",
"0.5825874",
"0.58257747",
"0.58223635",
"0.5808058",
"0.57965857",
"0.578176",
"0.576068",
"0.5709373",
"0.5681271",
"0.567975",
"0.56341404",
"0.55450577",
"0.5537906",
"0.5535115",
"0.5488816",
"0.5466723",
"0.5427192",
"0.5409238",
"0.5370652",
"0.53635085",
"0.53386563",
"0.5322582",
"0.52999675",
"0.52820164",
"0.52792",
"0.5265277",
"0.526011",
"0.5258816",
"0.52470845",
"0.52401733",
"0.5239574",
"0.52034366",
"0.5177014",
"0.51725936",
"0.51711476",
"0.51623243",
"0.5155347",
"0.5134297",
"0.5128365",
"0.51058024",
"0.5087881",
"0.5043736",
"0.5035961",
"0.5025398",
"0.50252676",
"0.5024797",
"0.50203055",
"0.5005055",
"0.50002533",
"0.49934843",
"0.49877912",
"0.49826112",
"0.49771568",
"0.49727783",
"0.49626115",
"0.49616042",
"0.4957849",
"0.4939945",
"0.4939166",
"0.4936646",
"0.4918299",
"0.4900388",
"0.48876962",
"0.4876732",
"0.48746622",
"0.48723385",
"0.48664743",
"0.48638618",
"0.48595506",
"0.4843127",
"0.4842773",
"0.48288947",
"0.48235175",
"0.4815993",
"0.48145145",
"0.48031703"
] |
0.76624566
|
1
|
This method was generated by MyBatis Generator. This method returns the value of the database column teacher.teacher_name
|
public String getTeacherName() {
return teacherName;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public String getTeacherName() {\n/* 31 */ return this.teacherName;\n/* */ }",
"@Override\n\tpublic List<Teacher> getTeaNameAndID() {\n\t\treturn teacherDAO.getTeaNameAndID();\n\t}",
"public String getTeacherId() {\n return teacherId;\n }",
"public String getResearchteachername() {\r\n\t\treturn researchteachername;\r\n\t}",
"@Override\n\tpublic List<Map<String, Object>> getTeacher() {\n\t\treturn getSession().selectList(getNamespace() + \"getTeacher\");\n\t}",
"public int getTeacherid() {\r\n return teacherid;\r\n }",
"public String getTeachernames() {\r\n return teachernames;\r\n }",
"public Integer getTeacherId() {\n return teacherId;\n }",
"public Integer getTeacherId() {\n return teacherId;\n }",
"public String getCourseTeacher() {\n return courseTeacher;\n }",
"public String getTeacherRoleId() {\n return teacherRoleId;\n }",
"public Student getTeacher() {\n // TODO implement here\n return teacher;\n }",
"Teacher selectByPrimaryKey(Integer pkid);",
"public void setTeacherName(String teacherName) {\n this.teacherName = teacherName == null ? null : teacherName.trim();\n }",
"public Teacher findTeacherId(Integer t_id) {\n\t\tCourtyardMapper courtyardMapper = this.getSqlSession().getMapper(CourtyardMapper.class);\n\t\tTeacher teacher = courtyardMapper.findTeacherId(t_id);\n\t\tSystem.out.println(\"--Into Dao Method of findTeacherId!!!--\");\n\t\treturn teacher;\n\t}",
"@Override\n\tpublic Integer getTeacherForCount() {\n\t\treturn teacherDAO.getTeacherForCount();\n\t}",
"@Override\n\tpublic List<Users> listTeacher() {\n\t\treturn genericDAO.listTeacher();\n\t}",
"public static Teachers getTeacher(int teacher_id) {\n\n Teachers teacher = null;\n\n String sql = \"SELECT * FROM teachers WHERE teacher_id = \" + teacher_id;\n\n try (Connection connection = Database.getConnection();\n Statement statement = connection.createStatement();\n ResultSet set = statement.executeQuery(sql)) {\n\n if (set.next())\n teacher = new Teachers(set.getInt(\"teacher_id\"),\n set.getString(\"name\"),\n set.getInt(\"age\"),\n set.getString(\"gender\"),\n set.getString(\"email_id\"));\n\n } catch (SQLException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n\n return teacher;\n }",
"@Override\n\tpublic List<User> showTeacher() {\n\t\treturn userDao.showTeacher();\n\t}",
"java.lang.String getEmployeeName();",
"@Override\n\tpublic TeacherInfo getTeacherInfo(String id) {\n\t\treturn userMapper.getTeacherInfo(id);\n\t}",
"public com.heman.bysj.jooq.tables.pojos.Teacher fetchOneByUsername(String value) {\n return fetchOne(Teacher.TEACHER.USERNAME, value);\n }",
"@Override\n public java.lang.String getSecondLastName() {\n return _entityCustomer.getSecondLastName();\n }",
"public void setTeacherId(String teacherId) {\n this.teacherId = teacherId;\n }",
"@Override\r\n\tpublic Teacher getModel() {\n\t\treturn teacher;\r\n\t}",
"@Override\n public Teacher getModel() {\n return teacher;\n }",
"@Override\n\tpublic Teacher findByName(String name) {\n\t\tSession session=sessionFactory.getCurrentSession();\n\t\tString hql=\"from Teacher t where name=?\";\n\t\tQuery query=session.createQuery(hql);\n\t\tquery.setParameter(0, name);\n\t\tList<Teacher> tlist=query.list();\n\t\tTeacher teacher=tlist.get(0);\n\t\treturn teacher;\n\t}",
"public String getLastNameFieldName() {\n return getStringProperty(LAST_NAME_FIELD_NAME_KEY);\n }",
"public String getLastName(){\n return(this.lastName);\n }",
"public String getLastName()\r\n\t{\r\n\t\treturn lastName.getModelObjectAsString();\r\n\t}",
"public Long getResearchteacherid() {\r\n\t\treturn researchteacherid;\r\n\t}",
"public ArrayList<Teacher> getTeacherList()\r\n\t {\r\n\t\t return teacherList;\r\n\t }",
"public List<Teacher> getTeachers() {\n\t\tList<Teacher> teachers = this.hibernateTemplate.loadAll(Teacher.class);\n\t\treturn teachers;\n\t}",
"public void setTeacherId(Integer teacherId) {\n this.teacherId = teacherId;\n }",
"public void setTeacherId(Integer teacherId) {\n this.teacherId = teacherId;\n }",
"public String getTname() {\r\n return tname;\r\n }",
"public String getPropertyName(){\n return SimpleTableField.mapPropName(this.columnName);\n }",
"public Teacher findTeacherByLsbh(String lsbh) {\n\t\tList<Teacher> list = new ArrayList<Teacher>();\n\t\tString sql = \"from Teacher where lsbh = ?\";\n\t\ttry {\n\t\t\tlist = this.getHibernateTemplate().find(sql, lsbh);\n\t\t} catch (DataAccessException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\tif(list.isEmpty())\n\t\t\treturn null;\n\t\telse \n\t\t\treturn list.get(0);\n\t}",
"public String getName() \r\n {\r\n return studentName;\r\n }",
"public List<com.heman.bysj.jooq.tables.pojos.Teacher> fetchByName(String... values) {\n return fetch(Teacher.TEACHER.NAME, values);\n }",
"@Column(length = 50, nullable = false)\n public String getLastName() {\n return lastName;\n }",
"public List<Teacher> findTeacherList(Integer i_id) {\n\t\tCourtyardMapper courtyardMapper = this.getSqlSession().getMapper(CourtyardMapper.class);\n\t\tList<Teacher> teachers = courtyardMapper.findTeacherList(i_id);\n\t\tSystem.out.println(\"--Into Dao Method of findTeacherList!!!--\");\n\t\treturn teachers;\n\t}",
"@Override\n\tpublic List<TeacherInfo> getTeacherInfoList() {\n\t\treturn userMapper.getTeacherInfoList();\n\t}",
"@Override\r\n\t@Transactional\r\n\tpublic int saveTeacher(Teacher teacher) {\n\t\tString username = UserNameUtil.createUsername(teacher.getFirstName());\r\n\t\tSystem.out.println(username);\r\n\t\tList<String> roles = new ArrayList<String>();\r\n\t\troles.add(RoleConstants.TEACHER);\r\n\t\tint id = commonDao.createUserAndSetRoles(username, roles);\r\n\t\tSystem.out.println(\"user id : \"+ id );\r\n\t\tteacher.setTeacherId(id);\r\n\t\tint status = schoolDao.saveTeacher(teacher);\r\n\t\treturn status;\r\n\t}",
"public String getEmphcolumn()\n {\n return emphColumn;\n }",
"@Override\n\tpublic List<Student> getStudentsByTeacher(String teacherName) {\n\t\tCollection<Student> allStudents = getAllEntities(); \n\t\t\n\t\t/** Here add students only bounded to this teacher */\n\t\tList<Student> studentsByTeacher = new ArrayList<>();\n\t\t\n\t\t/** Loop through all students in collection */\n\t\tfor(Student student : allStudents) { \n\t\t\tHibernate.initialize(student.getSubjects());\n\t\t\tfor(int i = 0; i < student.getTeachers().size(); i++) {\n\t\t\t\t/** Compare passed argument's teacher's name with teacher names bounded with students */\n\t\t\t\tif(teacherName.equals(student.getTeachers().get(i).getUsername())) {\n\t\t\t\t\tstudentsByTeacher.add(student);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn studentsByTeacher;\n\t}",
"public String getLastName(){\n\t\treturn this.lastName;\n\t}",
"String getItem(int id) {\n return answers.get(id).getTeacher();\n }",
"public String getLastName(){\r\n\t\treturn lastName;\r\n\t}",
"@Override\r\n\t\tpublic TeacherDto getTeacherById(long teacherId) {\n\t\t\tTeacherDto obj = TeacherTransformer.getTeacherEntityToDto(teacherRepository.findById(teacherId).get());\r\n\t\t\treturn obj;\r\n\r\n\t\t}",
"public String getLastname() {\n return (String) get(\"lastname\");\n }",
"@SuppressWarnings(\"unchecked\")\n\tpublic List<Teacher> findAllTeacher(){\n\t\tList<Teacher> teachers = new ArrayList<Teacher>();\n\t\tSession session = null;\n\t\ttry{\n\t\t\tsession = HibernateSessionFactory.getSession();\n\t\t\tteachers = session.getNamedQuery(\"findAllTeacher\").list();\n\t\t}catch(Exception e){\n\t\t\tthrow e;\n\t\t} finally{\n\t\t\tsession.close();\n\t\t}\n\t\treturn teachers;\n\t}",
"@AutoEscape\n\tpublic String getStudentName();",
"public String getName(){\r\n\t\tString s=\"\";\r\n\r\n\t\tif(getPersonId() != null && getPersonId().length() != 0)\r\n\t\t\ts += \" \" + getPersonId();\r\n\t\t\r\n\t\tif(getStudySubjectId() != null && getStudySubjectId().length() != 0)\r\n\t\t\ts += \" \" + getStudySubjectId();\r\n\r\n\t\tif(getSecondaryId() != null && getSecondaryId().length() != 0)\r\n\t\t\ts += \" \" + getSecondaryId();\r\n\r\n\t\treturn s;\r\n\t}",
"public static String getEmployeeName(String id){\n return \"select e_fname from employee where e_id = '\"+id+\"'\";\n }",
"public ArrayList<Teacher> getTeachersInField(){\r\n\t\treturn CourseFieldController.getFieldTeachers(this);\r\n\t}",
"public StrColumn getName() {\n return delegate.getColumn(\"name\", DelegatingStrColumn::new);\n }",
"public StrColumn getName() {\n return delegate.getColumn(\"name\", DelegatingStrColumn::new);\n }",
"public java.lang.String getStudent_name() {\n\t\treturn _primarySchoolStudent.getStudent_name();\n\t}",
"@Override\n\tpublic ArrayList<Teacher> fetchDetails() throws myException {\n\t\tConnection con = GetConnection.getConnection();\n\t\tResultSet rs = null;\n\t\tString query = \"select * from teacher\";\n\t\tStatement st = null;\n\t\ttry {\n\t\t\tst = con.createStatement();\n\t\t\trs = st.executeQuery(query);\n\t\t} catch (Exception e) {\n\t\t\tthrow new myException(e.getMessage());\n\t\t}\n\t\tArrayList<Teacher> ls3 = new ArrayList<Teacher>();\n\t\ttry {\n\t\t\twhile (rs.next()) {\n\t\t\t\t// Teacher teacher = new Teacher();\n\t\t\t\tString name = rs.getString(\"teacherName\");\n\t\t\t\tShort id = rs.getShort(\"teacherId\");\n\t\t\t\tShort yoe = rs.getShort(\"yOE\");\n\t\t\t\tSubject[] subject = null;// getSubjects(name);\n\t\t\t\tTeacher teacher = new Teacher(name, id, yoe, subject);\n\t\t\t\tls3.add(teacher);\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\tthrow new myException(e.getMessage());\n\t\t}\n\t\treturn ls3;\n\t}",
"public String getLastName(){\n\t\treturn lastName;\n\t}",
"public String getTempleteName() {\n return templeteName;\n }",
"public Teacher get(String id) {\n Session session = sessionFactory.getCurrentSession();\n Transaction transaction = session.beginTransaction();\n Teacher teacher = (Teacher) session.get(Teacher.class, id);\n transaction.commit();\n return teacher;\n }",
"@Override\n\tpublic Integer do_insertTeacher(Teacher teacher) {\n\t\tString id = teacherDAO.getLastTeacherID();\n\t\tInteger int_id = Integer.valueOf(id.substring(2, id.length()));\n\t\tteacher.setT_id(id.substring(0, 2)+(int_id+1));\n\t\treturn teacherDAO.do_insertTeacher(teacher);\n\t}",
"@Override\r\n\tpublic List<TheaterVO> getTheatername() {\n\t\tList<TheaterVO> list = null;\r\n\t\tCriteriaBuilder cb=entityManager.getCriteriaBuilder();\r\n\t\tCriteriaQuery<TheaterVO> cq=cb.createQuery(TheaterVO.class);\r\n\t\tRoot<TheaterVO> root = cq.from(TheaterVO.class);\r\n\t\tcq.select(root);\r\n\t\ttry{\r\n\t\t\tTypedQuery<TheaterVO> tq = entityManager.createQuery(cq);\r\n\t\t\tlist=tq.getResultList();\r\n\t\t\treturn list;\r\n\t\t}catch(Exception e){\r\n\t\t\treturn list;\r\n\t\t}\r\n\t}",
"String getDoctorName();",
"public String getEmployeeDepartment(){\n return profile.getDepartment();\n }",
"java.lang.String getSchoolName();",
"@Override\n\t@Column(name = \"leadTypeName\", length = 5, nullable = false)\n\tpublic String getName()\n\t{\n\t\treturn super.getName();\n\t}",
"public String getLastName() {\n return lastNameField.getText();\n }",
"@Projection(name = \"IdTeacher\", types = TblTeacher.class)\npublic interface Teacher {\n\n int getId();\n\n String getUserCode();\n\n String getLoginCode();\n\n String getName();\n\n String getSex();\n\n String getDep();\n\n String getBirthday();\n String getEdu();\n\n String getEntryTime();\n\n String getPhone();\n\n String getAddress();\n\n String getPassword();\n\n Integer getIsAdmin();\n}",
"public void setCourseTeacher(String courseTeacher) {\n this.courseTeacher = courseTeacher;\n }",
"public List<Teacher> getTeacherBySellWayId(int sellWayId) {\n\t\treturn simpleDao.getForList(\"ContractIPhone_NS.getTeacherBySellWayId\", sellWayId);\n\t}",
"public String getAuthorLastName() {\r\n return author.getLastName();\r\n }",
"public String getName(){\n\t\t\treturn tableName;\n\t\t}",
"@Column(length = 100, nullable = false)\n\tpublic String getLastName() {\n\t\treturn lastName;\n\t}",
"@Override\n\tpublic Teacher getById(long id) {\n\t\treturn null;\n\t}",
"@Override\n public String getLName() {\n\n if(this.lName == null){\n\n this.lName = TestDatabase.getInstance().getClientField(token, id, \"lName\");\n }\n\n return lName;\n }",
"public TeacherPage setNameTextField() {\n return setNameTextField(data.get(\"NAME\"));\n }",
"public String getLastname() throws Exception\r\n\t{\r\n\t\tString SQL_USER = \"SELECT lastname FROM user WHERE id=?;\";\t\t\r\n\t\tString returnValue=\"\";\t\r\n\t\ttry\r\n\t\t{\r\n\t\t\tPreparedStatement statement = this.getConn().prepareStatement(SQL_USER);\r\n\t\t\tstatement.setInt(1, userId);\r\n\t\t\tResultSet result = statement.executeQuery();\r\n\r\n\t\t\t// If this returns true, then the user already exists.\r\n\t\t\tif (!result.next())\r\n\t\t\t{\r\n\t\t\t\tthrow new Exception(\"No student found! (getLastname)\");\r\n\t\t\t}\r\n\r\n\t\t\t// Return the successfully user.\r\n\t\t\treturnValue = result.getString(\"lastname\");\r\n\t\t} catch (Exception e)\r\n\t\t{\r\n\t\t\tGWT.log(\"Error in getLastname()\", e);\r\n\t\t\tthis.getConn().rollback();\r\n\t\t\tthrow e;\r\n\t\t}\r\n\t\treturn returnValue;\r\n\t}",
"public String getName(){\n\n //returns the value of the name field\n return this.name;\n }",
"@AutoEscape\n\tpublic String getLast_name();",
"public String returnLastName() {\n\t\treturn this.registration_lastname.getAttribute(\"value\");\r\n\t}",
"public String getEmployeeName();",
"private int getTeacherID(){\n return getSharedPreferences(\"TEACHER_INFO\", Context.MODE_PRIVATE).\n getInt(\"ID_TEACHER\",0);\n }",
"public String getName (){\r\n return firstName + \" \" + lastName;\r\n }",
"public String getLastName()\n\t{\n\t\treturn getLastName( getSession().getSessionContext() );\n\t}",
"public String getLastName()\n\t{\n\t\treturn getLastName( getSession().getSessionContext() );\n\t}",
"public String getLastName() {\r\n return lastName;\r\n }",
"public String getLastName() {\r\n\t\treturn lastName;\t\t\r\n\t}",
"@Override\r\n\tpublic Student findTea(Teacher teacher) {\n\t\treturn null;\r\n\t}",
"public String getLastName()\r\n {\r\n return lastName;\r\n }",
"public String getLastName()\r\n {\r\n return lastName;\r\n }",
"public String getLastName()\r\n {\r\n return lastName;\r\n }",
"public List<Teacher> select(String where) throws SQLException {\n\t\tList<Teacher> list=null;\r\n\t\tConnection conn = DbConn.getDbConn();\r\n\t\tif(where ==null) where=\"1=1\";\r\n\t\tString conums=\" id ,no ,password ,name ,deptId ,sex ,phone \"\r\n\t\t\t\t+ \",email ,identityCard ,roleId ,photoUrl\"\r\n\t\t\t\t+ \" ,remark ,teacherstatus ,regTime ,loginTime ,loginIp \";\r\n\t\tString sql=String.format(\"SELECT \" +conums\t+ \" FROM teacher \"\r\n\t\t\t\t+ \" where %s\",where);\r\n\t\tif(conn!=null){\r\n\t\t\tPreparedStatement pstm = conn.prepareStatement(sql);\r\n\t\t\tResultSet rs=pstm.executeQuery();\r\n\t\t\tlist = new ArrayList<Teacher>();\r\n\t\t\twhile(rs.next()){\r\n\t\t\t\tTeacher c = new Teacher();\r\n\t\t\t\tc.setId(rs.getInt(1));\r\n\t\t\t\t\r\n\t\t\t\tc.setNo(rs.getString(2));\r\n\t\t\t\t\r\n\t\t\t\tc.setName(rs.getString(3));\r\n\t\t\t\t\r\n\t\t\t\tList <Department> d=new DepartmentDao().select(\"id=\"+rs.getInt(4));\r\n\t\t\t\tif(d!=null && !d.isEmpty())\r\n\t\t\t\tc.setDepartment(d.get(0));\r\n\t\t\t\t\r\n\t\t\t\tc.setSex(rs.getString(5));\r\n\t\t\t\tc.setPhone(rs.getString(6));\r\n\t\t\t\tc.setEmail(rs.getString(7));\r\n\t\t\t\tc.setIdentityCard(rs.getString(8));\r\n\t\t\t\t//--------------------------------\r\n\t\t\t\t//c.setUserrole(userrole);\r\n\t\t\t\t//--------------------------------\r\n\t\t\t\t c.setUserrole(null);\r\n\t\t\t\t c.setPhotoUrl(rs.getString(10));\r\n\t\t\t\t c.setRemark(rs.getString(11));\r\n\t\t\t\t c.setTeacherstatus(rs.getString(12));\r\n\t\t\t\t c.setRegTime(rs.getDate(13));\r\n\t\t\t\t c.setLoginTime(rs.getDate(14));\r\n\t\t\t\t c.setLoginIp(rs.getString(15));\r\n\t\t\t\tList<Teacher> t=new TeacherDao().select(\"id=\"+rs.getInt(5));\r\n\t\t\t\t\r\n\t\t\t\tlist.add(c);\r\n\t\t\t}\r\n\t\t\trs.close();\r\n\t\t\tDbConn.closeConn(conn);\r\n\t\t}\r\n\t\t\r\n\t\treturn list;\r\n\t}",
"public String getLast_name() {\r\n return last_name;\r\n }",
"@Override\r\n\tpublic TeacherDomain getModel() {\n\t\treturn teacherDomain;\r\n\t}",
"public String getLastName()\r\n\t{\r\n\t\treturn lastName;\r\n\t}",
"public String getLastName() {\n return this.lastName;\n }",
"public String getName(){\n\t\treturn this.tournamentName;\n\t}"
] |
[
"0.72106576",
"0.68483907",
"0.65781116",
"0.64816505",
"0.64760566",
"0.6436863",
"0.6408479",
"0.6369911",
"0.6369911",
"0.62737614",
"0.6158612",
"0.6142891",
"0.5963735",
"0.5930171",
"0.5784053",
"0.5752387",
"0.56980366",
"0.5672939",
"0.56082976",
"0.5602028",
"0.5601582",
"0.55917567",
"0.5515981",
"0.55104154",
"0.54907525",
"0.5486846",
"0.54809654",
"0.54455173",
"0.5431737",
"0.54272896",
"0.5414118",
"0.5402758",
"0.5397622",
"0.5393279",
"0.5393279",
"0.5391896",
"0.5388037",
"0.5383149",
"0.53742605",
"0.5361027",
"0.5336414",
"0.53355813",
"0.53213435",
"0.5321302",
"0.52856106",
"0.52746993",
"0.52724034",
"0.5254067",
"0.52428854",
"0.5239706",
"0.5232386",
"0.52267116",
"0.52219135",
"0.5220267",
"0.52198666",
"0.5214345",
"0.52124536",
"0.52124536",
"0.5210144",
"0.52036816",
"0.5200224",
"0.5196788",
"0.518882",
"0.5180258",
"0.5179141",
"0.51746655",
"0.51619124",
"0.5157736",
"0.51573265",
"0.5156125",
"0.515353",
"0.5151975",
"0.5151667",
"0.51512676",
"0.515101",
"0.5148392",
"0.51373935",
"0.5137068",
"0.51364654",
"0.51304173",
"0.5130387",
"0.5128752",
"0.5128445",
"0.5117597",
"0.51154983",
"0.511345",
"0.5111732",
"0.5111732",
"0.51105434",
"0.51072055",
"0.5104238",
"0.5102838",
"0.5102838",
"0.5102838",
"0.5100781",
"0.5099452",
"0.5097368",
"0.50940543",
"0.5091097",
"0.5090738"
] |
0.7283587
|
0
|
This method was generated by MyBatis Generator. This method sets the value of the database column teacher.teacher_name
|
public void setTeacherName(String teacherName) {
this.teacherName = teacherName == null ? null : teacherName.trim();
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public String getTeacherName() {\n/* 31 */ return this.teacherName;\n/* */ }",
"public String getTeacherName() {\n return teacherName;\n }",
"public void setTeacherId(String teacherId) {\n this.teacherId = teacherId;\n }",
"public void setTeacherId(Integer teacherId) {\n this.teacherId = teacherId;\n }",
"public void setTeacherId(Integer teacherId) {\n this.teacherId = teacherId;\n }",
"public void addClassToTeacher(Classes teacher_class) {\n db.addClassToTeacher(teacher_class);\n }",
"public void setTeacher(Student s) {\n // TODO implement here\n \tthis.teacher = s;\n }",
"@Override\r\n\t@Transactional\r\n\tpublic int saveTeacher(Teacher teacher) {\n\t\tString username = UserNameUtil.createUsername(teacher.getFirstName());\r\n\t\tSystem.out.println(username);\r\n\t\tList<String> roles = new ArrayList<String>();\r\n\t\troles.add(RoleConstants.TEACHER);\r\n\t\tint id = commonDao.createUserAndSetRoles(username, roles);\r\n\t\tSystem.out.println(\"user id : \"+ id );\r\n\t\tteacher.setTeacherId(id);\r\n\t\tint status = schoolDao.saveTeacher(teacher);\r\n\t\treturn status;\r\n\t}",
"@Override\n\tpublic void update(Teacher teacher) {\n\t\tteacherDao.update(teacher);\n\t}",
"@Override\n\tpublic void update(Teacher teacher) {\n\t\tdao.update(teacher);\n\t}",
"public String getTeacherId() {\n return teacherId;\n }",
"public int getTeacherid() {\r\n return teacherid;\r\n }",
"private void updateTeacherProfileInfo() {\n\t\t\n\t\tteacher.setLastName(tLastNameTF.getText());\n\t\tteacher.setFirstName(tFirstNameTF.getText());\n\t\tteacher.setSchoolName(tSchoolNameTF.getText());\n\t\t\n\t\t//Update Teacher profile information in database\n\t\t\n\t}",
"public boolean updateTeacherT_id(Teacher teacher) {\n\t\tCourtyardMapper courtyardMapper = this.getSqlSession().getMapper(CourtyardMapper.class);\n\t\tcourtyardMapper.updateTeacherT_id(teacher);\n\t\tSystem.out.println(\"--Into Dao Method of updateTeacherT_id!!!--\");\n\t\treturn true;\n\t}",
"public void setCourseTeacher(String courseTeacher) {\n this.courseTeacher = courseTeacher;\n }",
"public TeacherPage setNameTextField() {\n return setNameTextField(data.get(\"NAME\"));\n }",
"public void add(Teacher teacher) {\n Session session = sessionFactory.getCurrentSession();\n Transaction transaction = session.beginTransaction();\n session.save(teacher);\n transaction.commit();\n }",
"@Override\n\tpublic Integer do_updateTeacher(Teacher teacher) {\n\t\treturn teacherDAO.do_updateTeacher(teacher);\n\t}",
"public Integer getTeacherId() {\n return teacherId;\n }",
"public Integer getTeacherId() {\n return teacherId;\n }",
"private void addTeacher() {\n\t\t\n\t\tString lastName = tLastNameTF.getText();\n\t\tString firstName = tFirstNameTF.getText();\n\t\tString schoolName = tSchoolNameTF.getText();\n\t\tString userName = tUsernameTF.getText();\n\t\tchar[] password = tPasswordPF1.getPassword();\n\t\tString sA1 = tSecurityQ1TF.getText();\n\t\tString sQ1 = (String)tSecurityList1.getSelectedItem();\n\t\tString sA2 = tSecurityQ2TF.getText();\n\t\tString sQ2 = (String)tSecurityList2.getSelectedItem();\n\t\t\n\t\tteacher = new Teacher(lastName, firstName, schoolName, userName, password, sA1, sQ1, sA2, sQ2);\n\t\t\n\t\t//Add teacher to database \n\t\t\n\t}",
"public void setTeacherRoleId(String teacherRoleId) {\n this.teacherRoleId = teacherRoleId == null ? null : teacherRoleId.trim();\n }",
"public void setTeachernames(String teachernames) {\r\n this.teachernames = teachernames;\r\n }",
"public String getResearchteachername() {\r\n\t\treturn researchteachername;\r\n\t}",
"public String getTeacherRoleId() {\n return teacherRoleId;\n }",
"public void update(Teacher o) throws SQLException {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void insertTea(Teacher teacher) {\n\r\n\t}",
"public TeacherPage fill() {\n setNameTextField(\"TeacherName\");\n setSurnameTextField(\"TeacherSurname\");\n setEmailEmailField(\"[email protected]\");\n return this;\n }",
"public void setResearchteachername(String researchteachername) {\r\n\t\tthis.researchteachername = researchteachername;\r\n\t}",
"public void edit(Teacher teacher) {\n Session session = sessionFactory.getCurrentSession();\n Teacher existingTeacher = (Teacher) session.get(Teacher.class, teacher.getEmail());\n Transaction transaction = session.beginTransaction();\n\n existingTeacher.setName(teacher.getName());\n existingTeacher.setCountry(teacher.getCountry());\n existingTeacher.setInfo(teacher.getInfo());\n existingTeacher.setPicture(teacher.getPicture());\n existingTeacher.setBirthDate(teacher.getBirthDate());\n existingTeacher.setUniversity(teacher.getUniversity());\n existingTeacher.setPost(teacher.getPost());\n existingTeacher.setDegree(teacher.getDegree());\n\n session.save(existingTeacher);\n transaction.commit();\n }",
"@Override\n\tpublic List<Teacher> getTeaNameAndID() {\n\t\treturn teacherDAO.getTeaNameAndID();\n\t}",
"public void addTeacher(Teacher teacher) {\n\t\tteachersRepository.save(teacher);\r\n\t\t//teachersList.add(teacher);\r\n\t}",
"public String getTeachernames() {\r\n return teachernames;\r\n }",
"@Override\n\tpublic Integer do_insertTeacher(Teacher teacher) {\n\t\tString id = teacherDAO.getLastTeacherID();\n\t\tInteger int_id = Integer.valueOf(id.substring(2, id.length()));\n\t\tteacher.setT_id(id.substring(0, 2)+(int_id+1));\n\t\treturn teacherDAO.do_insertTeacher(teacher);\n\t}",
"public void setTeacherLogin(String newTeacherLogin) {\n\t\tthis.teacherLogin = newTeacherLogin;\n\t}",
"@Override\n\tpublic void create(Teacher teacher) {\n\t\tdao.create(teacher);\n\t}",
"@Override\r\n\tpublic void editTea(Teacher teacher) {\n\r\n\t}",
"public String getCourseTeacher() {\n return courseTeacher;\n }",
"public TeacherDao() {\n super(Teacher.TEACHER, com.heman.bysj.jooq.tables.pojos.Teacher.class);\n }",
"private void createLocalTeacherUserData(FirebaseUser user){\n String name = usernameTextView.getText().toString();\n TeacherManager.createTeacher(name, user.getUid(), newSchoolID);\n }",
"public Teacher(final String id) {\n this._id = id;\n \n }",
"@Override\n public Teacher getModel() {\n return teacher;\n }",
"public com.heman.bysj.jooq.tables.pojos.Teacher fetchOneByUsername(String value) {\n return fetchOne(Teacher.TEACHER.USERNAME, value);\n }",
"Teacher selectByPrimaryKey(Integer pkid);",
"@Override\n\tpublic List<Student> getStudentsByTeacher(String teacherName) {\n\t\tCollection<Student> allStudents = getAllEntities(); \n\t\t\n\t\t/** Here add students only bounded to this teacher */\n\t\tList<Student> studentsByTeacher = new ArrayList<>();\n\t\t\n\t\t/** Loop through all students in collection */\n\t\tfor(Student student : allStudents) { \n\t\t\tHibernate.initialize(student.getSubjects());\n\t\t\tfor(int i = 0; i < student.getTeachers().size(); i++) {\n\t\t\t\t/** Compare passed argument's teacher's name with teacher names bounded with students */\n\t\t\t\tif(teacherName.equals(student.getTeachers().get(i).getUsername())) {\n\t\t\t\t\tstudentsByTeacher.add(student);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn studentsByTeacher;\n\t}",
"@Override\n\tpublic ResponseEntity<?> postPutTeacher(UTeacherEntity teacher, UserDTO newTeacher) {\n\t\tif (newTeacher.getTeacherTitle() == null) {\n\t\t\treturn new ResponseEntity<RestError>(new RestError(2, \"Title must be provided\"), HttpStatus.BAD_REQUEST);\n\t\t}\n\t\tif (newTeacher.getTeacherNoOfLicence() == null) {\n\t\t\treturn new ResponseEntity<RestError>(new RestError(2, \"Teacher number of licence must be provided\"),\n\t\t\t\t\tHttpStatus.BAD_REQUEST);\n\t\t}\n\t\tteacher.setName(newTeacher.getName());\n\t\tteacher.setLastName(newTeacher.getLastName());\n\t\tteacher.setEmail(newTeacher.getEmail());\n\t\tteacher.setTitle(newTeacher.getTeacherTitle());\n\t\tteacher.setNoOfLicence(newTeacher.getTeacherNoOfLicence());\n\t\tteacherRepo.save(teacher);\n\t\tlogger.error(\"Error occured while creating tgs\");\n\t\tlogger.info(\"Admin (email: \" + AuthController.getEmail() + \") added new/updated teacher \" + teacher);\n\n\t\treturn new ResponseEntity<UTeacherEntity>(teacher, HttpStatus.OK);\n\t}",
"public boolean saveTeacher(Map map) {\n\t\tCourtyardMapper courtyardMapper = this.getSqlSession().getMapper(CourtyardMapper.class);\n\t\tcourtyardMapper.saveTeacher(map);\n\t\tSystem.out.println(\"--Into Dao Method of saveTeacher!!!--\");\n\t\treturn true;\n\t}",
"public Student getTeacher() {\n // TODO implement here\n return teacher;\n }",
"public void setLastname(String lastname) throws SQLException\r\n\t{\r\n\t\tif (lastname == null)\r\n\t\t{\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\tString SQL_USER = \"UPDATE user SET lastname =? WHERE id=?;\";\t\t\r\n\t\ttry\r\n\t\t{\r\n\t\t\t//Prepare the statement\r\n\t\t\tPreparedStatement statement = this.getConn().prepareStatement(SQL_USER);\r\n\r\n\t\t\t//Bind the variables\r\n\t\t\tstatement.setString(1, lastname);\r\n\t\t\tstatement.setInt(2, userId);\r\n\r\n\t\t\t//Execute the update\r\n\t\t\tstatement.executeUpdate();\r\n\r\n\t\t} catch (SQLException e)\r\n\t\t{\r\n\t\t\tGWT.log(\"Error in SQL: Student->setLastname(String \"+ lastname + \")\", e);\r\n\t\t\tthis.getConn().rollback();\r\n\t\t\tthrow e;\t\r\n\t\t}\r\n\t\t\r\n\t\t//commit change\r\n\t\tDatabase.get().commit();\r\n\t}",
"@Override\r\n\tpublic Teacher getModel() {\n\t\treturn teacher;\r\n\t}",
"private void saveData(){\n databaseReference.setValue(new Teacher(0, \"\", 0.0));\n }",
"@Override\n\tprotected void onActivityResult(int requestCode, int resultCode, Intent data) {\n\t\tif (requestCode == 1) {\n\t\t\tname_of_teacher.setText(data.getStringExtra(\"teacherName\"));\n\t\t\tname_of_teacher.setTag(data.getStringExtra(\"uuid\"));\n\t\t} else if (requestCode == 2) {\n\t\t\tname_of_class.setText(data.getStringExtra(\"className\"));\n\t\t\tname_of_class.setTag(data.getStringExtra(\"uuid\"));\n\t\t}\n\t\tsuper.onActivityResult(requestCode, resultCode, data);\n\t}",
"public void updateTeacher(int teacherID, int newTeacherID) {\n\n for (int i = 0; i < this.teachers.size(); i++) {\n if (getTeacherID(i) == teacherID) {\n this.teachers.set(i, newTeacherID);\n }\n }\n\n }",
"public void setStudentLastName(String studentLastName){\r\n this.studentLastName.set(studentLastName);\r\n }",
"public void insert(Teacher o) throws SQLException {\n\t\t\r\n\t}",
"public static void setLastName(String name){\n setUserProperty(Constants.ZeTarget_keyForUserPropertyLName,name);\n }",
"@Override\n\tpublic List<Map<String, Object>> getTeacher() {\n\t\treturn getSession().selectList(getNamespace() + \"getTeacher\");\n\t}",
"@Override\n\tpublic void modifyTeacherCourse(TeacherCourse tc) {\n\t\tcd.updateTeacherCourse(tc);\n\t}",
"public Teacher findTeacherId(Integer t_id) {\n\t\tCourtyardMapper courtyardMapper = this.getSqlSession().getMapper(CourtyardMapper.class);\n\t\tTeacher teacher = courtyardMapper.findTeacherId(t_id);\n\t\tSystem.out.println(\"--Into Dao Method of findTeacherId!!!--\");\n\t\treturn teacher;\n\t}",
"@Test\n public void setTutor() {\n Employee em = employeeService.findById(5);\n System.out.println(\"=======\" + em.getName());\n Student student1 = studentService.findById(22);\n System.out.println(\"*********\" + student1.getName());\n student1.setTutor(em);\n studentService.update(student1);\n studentService.saveOrUpdate(student1);\n }",
"public void addteacher(Teacher Te){\n this.tlist.add(Te);\n }",
"Employee setLastname(String lastname);",
"public void setStudentName(String studentName);",
"private void updateFromListTeacher(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\n\t\tint id=Integer.parseInt(req.getParameter(\"teacherid\"));\n\t\ttry {\n\t\t\tTeacher teacher=teacherDAO.getTeacher(id);\n\t\t\treq.setAttribute(\"teacher\", teacher);\n\t\t\treq.getServletContext().getRequestDispatcher(\"/updateTeacher.jsp\")\n\t\t\t.forward(req, resp);\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"@Override\n\tpublic List<Users> listTeacher() {\n\t\treturn genericDAO.listTeacher();\n\t}",
"public void setLastName (String ticketLastName)\r\n {\r\n lastName = ticketLastName;\r\n }",
"@Override\n\tpublic int insertTeacher(Sy05 record) {\n\t\treturn 0;\n\t}",
"public void setTname(String tname) {\r\n this.tname = tname;\r\n }",
"@Override\n\tpublic Integer getTeacherForCount() {\n\t\treturn teacherDAO.getTeacherForCount();\n\t}",
"@Override\n\tpublic Teacher findByName(String name) {\n\t\tSession session=sessionFactory.getCurrentSession();\n\t\tString hql=\"from Teacher t where name=?\";\n\t\tQuery query=session.createQuery(hql);\n\t\tquery.setParameter(0, name);\n\t\tList<Teacher> tlist=query.list();\n\t\tTeacher teacher=tlist.get(0);\n\t\treturn teacher;\n\t}",
"@Override\n\tpublic boolean update(Teacher teacher) {\n\t\treturn false;\n\t}",
"@Override\r\n\t\tpublic boolean addTeacher(TeacherDto teacherDto) {\n\t\t\ttry{\r\n\t\t\t\tList<Teacher> list = teacherRepository.findBySubjectAndStudentid(teacherDto.getSubject(), teacherDto.getStudentid());\r\n\t\t\t\t\t\tif (list.size() > 0) {\r\n\t\t\t\treturn false;\r\n\t\t\t} else {\t\t\r\n\t\t\tArrayList arr=new ArrayList<>();\r\n\t\t\tarr.add(\"MATHS\");\r\n\t\t\tarr.add(\"PHYSICS\");\r\n\t\t\tarr.add(\"CHEMISTRY\");\r\n\t\t\tif(!arr.contains(teacherDto.getSubject()))\r\n\t\t\t{\r\n\t\t\tTeacher teacher=teacherRepository.save(TeacherTransformer.getTeacherDtoToEntity(teacherDto));\r\n\t\t\tStudent student = restTemplate.getForObject(\"http://localhost:8080/studentservice/students/\" + teacher.getStudentid(),Student.class);\r\n\t if(teacher.getSubject().toUpperCase().equals(\"MATHS\"))\r\n\t\t\t{\r\n\t\t\t\tstudent.setMaths(teacher.getMarks());\r\n\t\t\t}else if(teacher.getSubject().toUpperCase().equals(\"PHYSICS\"))\r\n\t\t\t{\r\n\t\t\t\tstudent.setPhysics(teacher.getMarks());\r\n\t\t\t}\r\n\t\t\telse if(teacher.getSubject().toUpperCase().equals(\"CHEMISTRY\")) \r\n\t\t\t{\r\n\t\t\t\tstudent.setChemistry(teacher.getMarks());\r\n\t\t\t}else {}\r\n\t\t\t\t\trestTemplate.postForObject(\"http://localhost:8080/studentservice/students/update\", StudentTransformer.getStudentEntityToDto(student), StudentDto.class);\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\r\n\t\t}\r\n\t\t\t}catch(Exception e)\r\n\t\t\t{\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}",
"public Long getResearchteacherid() {\r\n\t\treturn researchteacherid;\r\n\t}",
"public TeacherPage setSurnameTextField() {\n return setSurnameTextField(data.get(\"SURNAME\"));\n }",
"public static Teachers getTeacher(int teacher_id) {\n\n Teachers teacher = null;\n\n String sql = \"SELECT * FROM teachers WHERE teacher_id = \" + teacher_id;\n\n try (Connection connection = Database.getConnection();\n Statement statement = connection.createStatement();\n ResultSet set = statement.executeQuery(sql)) {\n\n if (set.next())\n teacher = new Teachers(set.getInt(\"teacher_id\"),\n set.getString(\"name\"),\n set.getInt(\"age\"),\n set.getString(\"gender\"),\n set.getString(\"email_id\"));\n\n } catch (SQLException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n\n return teacher;\n }",
"public void setResearchteacherid(Long researchteacherid) {\r\n\t\tthis.researchteacherid = researchteacherid;\r\n\t}",
"@Override\n\tpublic List<User> showTeacher() {\n\t\treturn userDao.showTeacher();\n\t}",
"public void setLastName(final String value)\n\t{\n\t\tsetLastName( getSession().getSessionContext(), value );\n\t}",
"public void setLastName(final String value)\n\t{\n\t\tsetLastName( getSession().getSessionContext(), value );\n\t}",
"private void addorUpdteTeacher(HttpServletRequest req, HttpServletResponse resp,boolean update) throws ServletException, IOException {\n\t\tString url=\"/listTeacher.jsp\";\n\t\tTeacher teacher=new Teacher();\n\t\tString firstName=req.getParameter(\"firstName\");\n\t\tString lastName=req.getParameter(\"lastName\");\n\t\tString designation=req.getParameter(\"designation\");\n\t\tteacher.setFirstName(firstName);\n\t\tteacher.setLastName(lastName);\n\t\tteacher.setDesignation(designation);\n\t\t\n\t\t\ttry {\n\t\t\t\tif(!update) {\n\t\t\t\tteacherDAO.addTeacher(teacher);\n\t\t\t\t}else {\n\t\t\t\t\tint id=Integer.parseInt(req.getParameter(\"teacherid\"));\n\t\t\t\t\tteacher.setId(id);\n\t\t\t\t\tteacherDAO.updateTeacher(teacher);\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t} catch (SQLException e) {\n\t\t\t\treq.setAttribute(\"message\", e.getMessage());\n\t\t\t\tif(!update)\n\t\t\t\t\turl=\"/addTeacher.jsp\";\n\t\t\t\telse \n\t\t\t\t\turl=\"/updateTeacher.jsp\";\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\n\t\t\n\t\t\n\t\treq.getRequestDispatcher(url)\n\t\t.forward(req, resp);;\n\t\t\n\n\t}",
"private void updateTeacherSecurityInfo() {\n\t\t\n\t\tteacher.setPassword(tOldPasswordPF.getPassword());\n\t\tteacher.setSecuirtyAnswer1(tSecurityQ1TF.getText());\n\t\tteacher.setSecurityQuestion1((String)tSecurityList1.getSelectedItem());\n\t\tteacher.setSecurityAnswer2(tSecurityQ2TF.getText());\n\t\tteacher.setSecurityQuestion2((String)tSecurityList1.getSelectedItem());\n\t\t\n\t\t//Update Teacher security information in database\n\t\t\n\t}",
"void save(Teacher teacher);",
"public List<com.heman.bysj.jooq.tables.pojos.Teacher> fetchByName(String... values) {\n return fetch(Teacher.TEACHER.NAME, values);\n }",
"@Override\r\n\tpublic Student findTea(Teacher teacher) {\n\t\treturn null;\r\n\t}",
"public ArrayList<Teacher> getTeacherList()\r\n\t {\r\n\t\t return teacherList;\r\n\t }",
"int updateByPrimaryKey(Teacher record);",
"public Person TeacherPerson(String name, String gender, String assumptionDate)\n {\n this._name =new String(name);\n this._gender = new String(gender);\n this._assumptionDate = new String(assumptionDate);\n this._userType = new String(\"Teacher\");\n\n return this;\n }",
"public TeacherPage setNameTextField(String nameValue) {\n name.sendKeys(Keys.chord(Keys.CONTROL, \"a\", Keys.DELETE));\n name.sendKeys(nameValue);\n return this;\n }",
"public void setLastName(final SessionContext ctx, final String value)\n\t{\n\t\tsetProperty(ctx, LASTNAME,value);\n\t}",
"public void setLastName(final SessionContext ctx, final String value)\n\t{\n\t\tsetProperty(ctx, LASTNAME,value);\n\t}",
"public void setLastName(java.lang.String newLastName);",
"public void setLastName(String newLastName)\r\n {\r\n lastName = newLastName;\r\n }",
"public void setLastName(String lastName) {\n if(lastName.length()>0)\n this.lastName = lastName;\n else this.lastName =\"undefined\";\n\n }",
"@Override\r\n\tpublic TeacherDomain getModel() {\n\t\treturn teacherDomain;\r\n\t}",
"private void refresh(TeachersBean teacher) {\n\t\tTeacherService teacherservice = new TeacherService(teacher);\n\t\tsubjectname=teacher.getSubject().getSubjectname();\n\t\tSet<AssignmentBean> temp = teacherservice.readTeacher().getSubject().getAssignments();\n\t\tfor (AssignmentBean assignmentBean : temp) {\n\t\t\tassignmentslist.add(assignmentBean);\n\t\t\t\n\t\t}\n\t\t\n\t\tStudentService studentservice = new StudentService(null);\n\t\tstudentslist=studentservice.getAllStudentofSubject(teacherservice.readTeacher().getSubject());\n\t}",
"void lastName( String key, String value ){\n developer.lastName = value;\n }",
"public void setLastName(String lastName);",
"Employee setFirstname(String firstname);",
"@Override\n\tpublic TeacherInfo getTeacherInfo(String id) {\n\t\treturn userMapper.getTeacherInfo(id);\n\t}",
"public void setFirstname(String firstname) throws SQLException\r\n\t{\r\n\t\tif (firstname == null)\r\n\t\t{\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\tString SQL_USER = \"UPDATE user SET firstname =? WHERE id=?;\";\t\t\r\n\t\ttry\r\n\t\t{\r\n\t\t\t//Prepare the statement\r\n\t\t\tPreparedStatement statement = this.getConn().prepareStatement(SQL_USER);\r\n\r\n\t\t\t//Bind the variables\r\n\t\t\tstatement.setString(1, firstname);\r\n\t\t\tstatement.setInt(2, userId);\r\n\r\n\t\t\t//Execute the update\r\n\t\t\tstatement.executeUpdate();\r\n\r\n\t\t} catch (SQLException e)\r\n\t\t{\r\n\t\t\tGWT.log(\"Error in SQL: Student->setFirstname(String \"+ firstname + \")\", e);\r\n\t\t\tthis.getConn().rollback();\r\n\t\t\tthrow e;\t\r\n\t\t}\r\n\t\t\r\n\t\t//commit change\r\n\t\tDatabase.get().commit();\r\n\t}"
] |
[
"0.6601437",
"0.6558226",
"0.63347685",
"0.6332015",
"0.6332015",
"0.6323958",
"0.6302152",
"0.6249584",
"0.62431836",
"0.6230599",
"0.6181034",
"0.6098393",
"0.60832536",
"0.6056146",
"0.6010105",
"0.5973544",
"0.5966243",
"0.59371173",
"0.5933781",
"0.5933781",
"0.5921356",
"0.5897138",
"0.5869476",
"0.58394164",
"0.58375657",
"0.5831442",
"0.5826702",
"0.57681626",
"0.5761689",
"0.57477707",
"0.5732352",
"0.57193977",
"0.56955385",
"0.56824875",
"0.56742656",
"0.56530565",
"0.56065166",
"0.5547645",
"0.5535509",
"0.5487221",
"0.5453261",
"0.54431367",
"0.5442031",
"0.5410755",
"0.540948",
"0.540392",
"0.5371491",
"0.5367186",
"0.5304398",
"0.5299728",
"0.5267189",
"0.52112126",
"0.5202123",
"0.5200326",
"0.5187943",
"0.5180458",
"0.5179605",
"0.5168058",
"0.5164186",
"0.5161389",
"0.5153624",
"0.5151648",
"0.5140646",
"0.51269114",
"0.5115596",
"0.5099761",
"0.507752",
"0.50647765",
"0.5040927",
"0.5023332",
"0.50154865",
"0.5009702",
"0.5004025",
"0.49907106",
"0.49857184",
"0.49840024",
"0.49813172",
"0.49794835",
"0.49794835",
"0.49671257",
"0.49498984",
"0.49404967",
"0.49394003",
"0.49341637",
"0.49276122",
"0.4917526",
"0.49138093",
"0.48950702",
"0.48936787",
"0.48936787",
"0.4884943",
"0.48834932",
"0.48748103",
"0.48630607",
"0.4861242",
"0.48304713",
"0.48293918",
"0.48169267",
"0.4801632",
"0.47827187"
] |
0.6854988
|
0
|
Aurre: Post: Zerrendan Pelikula dagoen ala ez adierazten du, badago true bueltatzen du, bestela false
|
public boolean badago(Pelikula pPelikula) {
return this.lista.contains(pPelikula);
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public boolean aufnehmen (T posten)\n {\n // Pruefen, ob der Posten mit Bezeichnung und Ausfuehrung schon vorhanden ist\n int index = istVerfuegbar ( posten.getBezeichnung()\n , posten.getAusfuehrung()\n , posten.getAnzahl()); \n\n // Ist der Posten schon vorhanden, so soll die Methode false zurueckliefern\n if (index >= 0)\n {\n return false;\n }\n \n // Aufnehmen des Postens in das Magazin\n return magazin.add (posten);\n }",
"boolean isPostive();",
"public boolean tienePapel()\n {\n //COMPLETE\n return this.hojas > 0;\n }",
"public boolean tienePrepaga() {\r\n\t\treturn obraSocial != null;\r\n\t}",
"public boolean pobjeda() {\r\n\t\treturn !igrajPoslijePobjede && pobjeda;\t\r\n\t}",
"private boolean verificarMascota(Perro perro, int edad){\n //Propiedades del perro a evaluar\n String raza = perro.getRaza();\n String tamano = perro.getTamano();\n\n boolean bandera = false;\n\n //Si hay un niño pequeño, y se le asigna un perro con tamaño pequeño y no es raza peligrosa\n if (edad < 10 && tamano.equals(\"pequeno\") && verificarRaza(raza))\n bandera = true;\n \n //Si hay un niño grande y se le asigna un perro con tamaño pequeño o mediano y no es raza peligrosa\n else if (18 > edad && edad > 10 && (tamano.equals(\"pequeno\") || tamano.equals(\"mediano\")) && verificarRaza(raza))\n bandera = true;\n\n //Si no hay niños \n else if (edad > 18)\n bandera = true;\n\n //Si la familia no es apta\n else\n bandera = false;\n\n return bandera;\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 boolean addPost (Message post) {\n Logger.write(\"VERBOSE\", \"DB\", \"addPost(...)\");\n \n try {\n execute(DBStrings.addPost.replace(\"__SIG__\", post.getSig())\n .replace(\"__msgText__\", post.POSTgetText())\n .replace(\"__time__\", Long.toString(post.getTimestamp()))\n .replace(\"__recieverKey__\", post.POSTgetWall())\n .replace(\"__sendersKey__\", Crypto.encodeKey(getSignatory(post))));\n String[] visibleTo = post.POSTgetVisibleTo();\n for (int i = 0; i < visibleTo.length; i++)\n execute(DBStrings.addPostVisibility.replace(\"__postSig__\", post.getSig()).replace(\"__key__\", visibleTo[i]));\n return true;\n } catch (java.sql.SQLException e) {\n Logger.write(\"ERROR\", \"DB\", \"SQLException: \" + e);\n return false;\n }\n }",
"public boolean avanti();",
"private void peliLoppuuUfojenTuhoamiseen() {\n if (tuhotut == Ufolkm) {\n ingame = false;\n Loppusanat = \"STEVE HOLT!\";\n }\n }",
"public boolean Victoria(){\n boolean respuesta=false;\n if(!(this.palabra.contains(\"-\"))&& this.oportunidades>0 && !(this.palabra.isEmpty())){\n this.heGanado=true;\n respuesta=true;\n }\n return respuesta;\n }",
"public String apavada_para_rupa(String X_anta, String X_adi)\n {\n\n // this will deal with para_rupa and purva_rupa aapavaads\n\n // making life easier by dealing with ITRANS CODING\n\n Log.info(\"*******ENTERED AAPAVADA NIYAMA 2**********\");\n String anta = EncodingUtil.convertSLPToUniformItrans(X_anta); // anta\n // is\n // ITRANS\n // equivalent\n String adi = EncodingUtil.convertSLPToUniformItrans(X_adi); // adi is\n // ITRANS\n // equivalent\n\n String return_me = \"UNAPPLICABLE\";\n\n // 216\n\n // 218 Vik Semantic Dependency\n // **********ELSE IF****************//\n if (VowelUtil.isAkaranta(anta) && (adi.equals(\"eva\")))\n\n {\n Log.info(\" Rules 215 applies\");\n return_me = utsarga_sandhi(X_anta, X_adi) + \", \" + para_rupa(X_anta, X_adi) + \"**\";\n\n comments.start_adding_notes();\n comments.setSutraNum(\"\");\n comments.setVartikaPath(\"eve caniyoge\");\n comments.setSutraProc(\"para-rupa-ekadesh\");\n comments.setSource(Comments.vartika);\n String cond1 = depend + \"akaranta word followed by the word 'eva' used to imply uncertainity.\\n\" + \" <a> (a/A/a3) + eva (implying uncertainty) = para-rupa ekadesha\\n\" + \"Blocks all other rules. If the condition of uncertainty is \" + \"not expressed this rule doesnot apply.\";\n comments.setConditions(cond1);\n }\n // **********END OF ELSE IF****************//\n\n // 217 Vik Semantic Dependency not working\n // **********ELSE IF****************//\n else if (is_akaranta_upsarga(X_anta) && (X_adi.startsWith(\"e\") || X_adi.startsWith(\"o\"))) // USing\n // X_adi,\n // switched\n // to\n // Sharfe\n // Encoding\n {\n Log.info(\" Came in Rule 217 \");\n return_me = utsarga_sandhi(X_anta, X_adi) + \", \" + para_rupa(X_anta, X_adi) + \"**\";\n\n comments.start_adding_notes();\n comments.setSutraNum(\"6.1.97\");\n comments.setSutraPath(\"e~Ni pararUpam\");\n comments.setSutraProc(\"para-rupa-ekadesh\");\n comments.setSource(Comments.sutra);\n String cond1 = depend + \"akaranta-upsarga followed by verbal form beginning with \" + \"'e' or 'o' results in 'para-rupa-ekadesha.\\n\" + \"<akranta-upasarga> a/A/a3 + <e~N> e/o-initial Verbal Form = para-rupa ekadesha\\n\" + \"This Condition will block autsargic vriddhi.\";\n comments.setConditions(cond1);\n\n }\n // **********END OF ELSE IF****************//\n\n // Removed Below We are not dealing with Internal sandhi any more\n\n /***********************************************************************\n * // From SKT Pathan Path Pg. 107 //**********ELSE IF\n **********************************************************************/\n //\n // else if ( /*(sandhi.internal == true ) && */ Vowel.is_aganta(X_anta)\n /***********************************************************************\n * && X_adi.equals(\"am\") ) { return_me = purva_rupa(X_anta,X_adi);\n * //sandhi_notes = PRV + apavada + sutra + \"'ami pUrvaH'(6.1.107).\" +\n * \"\\nBlocks Ayadi Sandhi\"; vowel_notes.start_adding_notes();\n * vowel_notes.set_sutra_num(\"6.1.107\") ; vowel_notes.setSutraPath(\"ami\n * pUrvaH\") ; vowel_notes.set_sutra_proc(\"purva-rupa-ekadesh\");\n * vowel_notes.set_source(tippani.sutra) ; String cond1 =\"Blocks Ayadi\n * Sandhi.\"; vowel_notes.set_conditions(cond1); } //**********END OF\n * ELSE IF\n **********************************************************************/\n //\n // 219\n // 220\n // **********ELSE IF****************//\n else if (anta.equals(\"sIma\") && (adi.equals(\"anta\"))) // USing X_adi,\n // switched to\n // Sharfe\n // Encoding\n {// checked:29-6\n Log.info(\" Rules 220 applies\");\n return_me = utsarga_sandhi(X_anta, X_adi) + \", \" + para_rupa(X_anta, X_adi) + \"**\";\n\n comments.start_adding_notes();\n comments.setSutraNum(\"\");\n comments.setVartikaPath(\"sImantaH kesheSu\");\n comments.setSutraProc(\"para-rupa-ekadesh\");\n comments.setSource(Comments.vartika);\n String cond1 = depend + \"if the word sImanta is used in relation to hairs of the \" + \"the head(kesha) this is the correct form.Otherwise not.\\n\" + \"sIma + anta = para-rupa ekadesh. If used in relation to hairs\";\n comments.setConditions(cond1);\n }\n\n // **********END OF ELSE IF****************//\n // 221\n else if (VowelUtil.isAkaranta(X_anta) && (adi.equals(\"otu\") || adi.equals(\"oSTha\"))) // USing\n // X_adi,\n // switched\n // to\n // Sharfe\n // Encoding\n {// checked:29-6\n Log.info(\" Rules 220 applies\");\n return_me = utsarga_sandhi(X_anta, X_adi) + \", \" + para_rupa(X_anta, X_adi) + \"**\";\n\n comments.start_adding_notes();\n comments.setSutraNum(\"\");\n comments.setVartikaPath(\"otvoSThayoH samAse vA\");\n comments.setSutraProc(\"para-rupa-ekadesh\");\n comments.setSource(Comments.vartika);\n String cond1 = depend + \"This is a optional form which is permitted along \" + \"with the regular form if an akaranta word is followed by 'otu' and 'oSTha' \" + \"to form a Compund Word.\\n\" + \" a + otu/oSTha = para-rupa, other Sandhis permitted\";\n comments.setConditions(cond1);\n\n }\n // 222\n // 223a -now working... make diff rule for \"A\" or consider it...did\n // check 223b\n // **********ELSE IF****************//\n else if (VowelUtil.isAkaranta(X_anta) && (adi.equals(\"om\") && adi.equals(\"A\"))) // USing\n // X_adi,\n // switched\n // to\n // Sharfe\n // Encoding\n {// checked:29-6\n return_me = para_rupa(X_anta, X_adi);\n // sandhi_notes = PAR + apavada + sutra + \"'omA~Nosca'(6.1.92).\" +\n // \"\\nBlocks Vrddhi Sandhi\";\n comments.start_adding_notes();\n comments.setSutraNum(\"6.1.92\");\n comments.setSutraPath(\"omA~Noshca\");\n comments.setSutraProc(\"para-rupa ekadesh\");\n comments.setSource(Comments.sutra);\n String cond1 = \"om/aa~N + iti = para-rupa sandhi.Blocks Vrddhi and/or Dirgha Sandhi\";\n comments.setConditions(cond1);\n }\n // **********END OF ELSE IF****************//\n\n // 223b\n // **********ELSE IF****************//\n /*\n * else if (Vowel.is_akaranta(X_anta) && adi.equals(\"A\") ) // USing\n * X_adi, switched to Sharfe Encoding { return_me =\n * utsarga_sandhi(X_anta,X_adi) + \", \" + para_rupa(X_anta,X_adi) + \"**\";\n * /*sandhi_notes = usg1 + sandhi_notes + \"\\n\" + usg2 ; //sandhi_notes+=\n * PAR + apavada + sutra + \"'omA~Nosca'(6.1.92).\" + depend + //\n * \"\\nCondition: If the 'A' of String 2 is 'A~N' then this rule is used \"+ // \"\n * which blocks Dirgha Sandhi\"; // vowel_notes.start_adding_notes();\n * vowel_notes.set_sutra_num(\"6.1.92\") ;\n * vowel_notes.setSutraPath(\"omA~Nosca\") ;\n * vowel_notes.set_sutra_proc(\"para-rupa ekadesh\");\n * vowel_notes.set_source(tippani.sutra) ; String cond1 =\"If the 'A' of\n * String 2 is 'A~N' then this rule is used \"+ \" which blocks Dirgha\n * Sandhi\"; vowel_notes.set_conditions(cond1);\n * }\n */\n // **********END OF ELSE IF****************//\n // 224 Vik Semantic Dependency - apadAnta\n // **********ELSE IF****************//\n else if ( /*\n * (sandhi.internal == true ) && (SandhiBean.padanta ==\n * false) &&\n */\n VowelUtil.isAkaranta(X_anta) && adi.equals(\"us\"))\n {// checked:29-6\n return_me = para_rupa(X_anta, X_adi);\n comments.start_adding_notes();\n comments.setSutraNum(\"6.1.63\");\n comments.setSutraPath(\"usyapadAntAt\");\n comments.setSutraProc(\"para-rupa ekadesh\");\n comments.setSource(Comments.sutra);\n String cond1 = \"Non-padanta <a> + 'us' affix = para-rupa.Blocks Vrddhi Sandhi\";\n comments.setConditions(cond1);\n }\n // **********END OF ELSE IF****************//\n\n // 225 Vik Semantic Dependency - apadAnta\n // **********ELSE IF****************//\n // else if ( /*(sandhi.internal == true )&& ( SandhiBean.padanta ==\n // false) && */\n /*\n * X_anta.endsWith(\"a\") && ( X_adi.startsWith(\"a\") ||\n * X_adi.startsWith(\"e\") || X_adi.startsWith(\"o\") ) ) {//checked:29-6\n * \n * return_me = para_rupa(X_anta,X_adi);\n * vowel_notes.start_adding_notes(); vowel_notes.set_sutra_num(\"6.1.94\") ;\n * vowel_notes.setSutraPath(\"ato guNe\") ;\n * vowel_notes.set_sutra_proc(\"para-rupa ekadesh\");\n * vowel_notes.set_source(tippani.sutra) ; String cond1 =\"Blocks Vrddhi\n * Sandhi\"; vowel_notes.set_conditions(cond1); }\n */// **********END OF ELSE IF****************//\n // 226 - 231\n // 232 Vik Semantic Dependency - padanta\n // Purva Rupa Sandhi Begins\n // **********ELSE IF****************//\n else if ( /* (SandhiBean.padanta == true ) && */\n (X_anta.endsWith(\"e\") || X_anta.endsWith(\"o\")) && X_adi.startsWith(\"a\"))\n {// checked:29-6\n if (anta.equals(\"go\"))\n ; // condition will be handled elsewhere\n else\n {\n\n return_me = utsarga_sandhi(X_anta, X_adi) + \", \" + purva_rupa(X_anta, X_adi);\n\n comments.start_adding_notes();\n comments.setSutraNum(\"6.1.105\");\n comments.setSutraPath(\"e~NaH padAntAdati\");\n comments.setSutraProc(\"purva-rupa ekadesh\");\n comments.setSource(Comments.sutra);\n String cond1 = padanta + \"If a padanta word ending in either 'e' or 'o' is followed by an 'a' purva-rupa ekadesh takes place\" + \"\\npadanta <e~N> 'e/o' + 'a' = purva-rupa ekadesha. Blocks Ayadi Sandhi\";\n comments.setConditions(cond1);\n\n }\n }\n // **********END OF ELSE IF****************//\n\n Log.info(\"return_me == \" + return_me);\n Log.info(\"*******EXITED AAPAVADA NIYAMA 2**********\");\n\n if (return_me.equals(\"UNAPPLICABLE\"))\n {\n return_me = apavada_prakruti_bhava(X_anta, X_adi); // search for\n // more apavada\n // rules\n }\n return return_me; // apavada rules formulated by Panini apply\n }",
"boolean hasPlainRedeem();",
"private boolean estPlein() {\n return (nbAssoc == associations.length);\n }",
"public static boolean adalahTinggiSeimbang (PohonAVL p) {\n\t// Write your codes in here\n //...\n // Write your codes in here\n \n if(p == null) return true;\n \n if(Math.abs(tinggi(p.kiri)-tinggi(p.kanan)) <= 1 && adalahTinggiSeimbang(p.kiri) && adalahTinggiSeimbang(p.kanan)) return true;\n \n return false;\n \n }",
"private boolean isWhiteBearArticle(Document parsed) {\n boolean isCorrect = false;\n Element heading = parsed.getElementById(\"heading\");\n if (heading == null) {\n return false;\n }\n if (heading.text().equals(DirectoryParser.HEADING_TEST_STRING)) {\n isCorrect = true;\n }\n Elements selected = parsed.getElementsByTag(\"article\");\n if (selected.size() != 1) {\n return false;\n } else {\n Attributes articleAttributes = selected.first().attributes();\n if (articleAttributes.size() > 1) {\n return false;\n }\n if (articleAttributes.asList().contains(new Attribute(\"id\", \"main\"))) {\n isCorrect = true;\n }\n }\n selected = parsed.getElementsByClass(\"mainText\");\n if (selected.size() != 1) {\n return false;\n }\n return isCorrect;\n }",
"@Override\n\tpublic boolean vender(String placa) {\n\t\treturn false;\n\t}",
"public boolean kraj() {\r\n\t\treturn (broj_slobodnih == 0 && !mozeLiSeSpojiti());\r\n\t}",
"public boolean hasPlainRedeem() {\n return dataCase_ == 3;\n }",
"boolean hasHasAlcoholBloodContent();",
"boolean isAfuerMayorDentro(char dentro, char afuera){\n return peso(afuera)>peso(dentro);\r\n }",
"@Override\n\tpublic boolean paie() {\n\n\t\treturn true;\n\t}",
"public String apavada_prakruti_bhava(String X_anta, String X_adi)\n {\n\n Log.info(\"*******ENTERED AAPAVADA NIYAMA 3**********\");\n String anta = EncodingUtil.convertSLPToUniformItrans(X_anta); // anta\n // is\n // ITRANS\n // equivalent\n String adi = EncodingUtil.convertSLPToUniformItrans(X_adi); // adi is\n // ITRANS\n // equivalent\n\n String return_me = \"UNAPPLICABLE\";\n // 249\n if (VowelUtil.isPlutanta(X_anta) && X_adi.equals(\"iti\"))\n {// checked:29-6\n\n return_me = prakruti_bhava(X_anta, X_adi) + \", \" + utsarga_sandhi(X_anta, X_adi) + \"**\";\n ;\n /*\n * sandhi_notes = usg1 + sandhi_notes + \"\\nRegular Sandhis which\n * were being blocked by \" + \"pluta-pragRRihyA-aci-nityam(6.1.121)\n * are allowed by \" + \" 'apluta-vadupasthite' (6.2.125)\" + \"\\n\" +\n * usg2 ;\n * \n * sandhi_notes+= Prkr + apavada + depend + sutra +\n * \"pluta-pragRRihyA aci nityam' (6.1.121)\" + \"\\nCondition: Only if\n * String 1 is a Vedic Usage(Arsha-prayoga)\";\n * \n * //This note below goes after the Notes returned fropm\n * utsarga_sandhi above String cond1 = \"\\nRegular Sandhis which were\n * being blocked by \" + \"'pluta-pragRRihyA-aci-nityam'(6.1.121) are\n * allowed by \" + \" 'apluta-vadupasthite' (6.2.125)\";\n * vowel_notes.append_condition(cond1); ;\n */\n // We have to remove vriddhi_sandhi default notes\n // this is done by\n comments.decrementPointer();\n\n comments.start_adding_notes();\n comments.setSutraNum(\"6.1.121\");\n comments.setSutraPath(\"pluta-pragRRihyA aci nityam\");\n comments.setSutraProc(\"Prakruti Bhava\");\n comments.setSource(Comments.sutra);\n String cond1 = \"pluta-ending word or a pragRRihya followed by any Vowel result in Prakruti bhava sandhi.\\n\" + \"<pluta-ending> || pragRRihya + vowel = prakruti bhava.\";\n comments.setConditions(cond1);\n\n comments.start_adding_notes();\n comments.setSutraNum(\"6.2.125\");\n comments.setSutraPath(\"apluta-vadupasthite\");\n comments.setSutraProc(\"utsargic Sandhis Unblocked\");\n comments.setSource(Comments.sutra);\n String cond2 = depend + \"According to 6.1.121 plutantas followed by Vowels result in prakruti-bhaava\\n\" + \"However if the word 'iti' used is non-Vedic, then regular sandhis block 6.1.121.\";\n\n comments.setConditions(cond2);\n\n }\n\n // 250\n else if ((X_anta.endsWith(\"I3\") || X_anta.endsWith(\"i3\")) && VowelUtil.isAjadi(X_adi))\n // was making mistake of using vowel.is_Vowel(X_adi) */ )\n {// checked:29-6\n Log.info(\"came in 250\");\n return_me = utsarga_sandhi(X_anta, X_adi); // fixed error above:\n // was sending ITRANS\n // values rather than\n // SLP\n /*\n * sandhi_notes += apavada + sutra + \"'I3 cAkravarmaNasya'\n * (6.1.126)\" + \"Blocks 'pluta-pragRRihyA aci nityam' (6.1.121)\";\n */\n // vowel_notes.start_adding_notes();\n // vowel_notes.set_sutra_num(\"6.1.126\") ;\n // vowel_notes.setSutraPath(\"I3 cAkravarmaNasya\") ;\n // vowel_notes.set_sutra_proc(\"para-rupa ekadesh\");\n // vowel_notes.set_source(tippani.sutra) ;\n String cond1 = \"According to chaakravarman pluta 'i' should be trated as non-plutanta.\\n\" + \"Given in Panini Sutra 'I3 cAkravarmaNasya' (6.1.126). This sutra allows General Sandhis to operate by blocking\" + \"'pluta-pragRRihyA aci nityam' (6.1.121)\";\n comments.append_condition(cond1);\n\n }\n // prakrutibhava starts\n // 233-239 Vedic Usages\n // 243 : error (now fixed) shivA# isAgacha printing as sh-kaar ha-kaar\n // ikaar etc should be shakaar ikaar\n // **********ELSE IF****************//\n else if ((VowelUtil.isPlutanta(X_anta) || this.pragrhya == true) && VowelUtil.isAjadi(X_adi))\n // was making mistake of using Vowel.is_Vowel(X_adi) */ )\n {// checked:29-6\n Log.info(\"came in 243\");\n return_me = prakruti_bhava(X_anta, X_adi); // fixed error above:\n // was sending ITRANS\n // values rather than\n // SLP\n // sandhi_notes = Prkr + sutra + \"pluta-pragRRihyA aci nityam'\n // (6.1.121)\";\n comments.start_adding_notes();\n comments.setSutraNum(\"6.1.121\");\n comments.setSutraPath(\"pluta-pragRRihyA aci nityam\");\n comments.setSutraProc(\"prakruti bhava\");\n comments.setSource(Comments.sutra);\n String cond1 = \"pragRRihyas or plutantas followed by any vowel result in NO SANDHI which is prakruti bhava\"; // Fill\n // Later\n comments.setConditions(cond1);\n\n }\n // **********END OF ELSE IF****************//\n\n // **********ELSE IF****************//\n else if (anta.equals(\"go\") && adi.equals(\"indra\")) // Avan~Na Adesh\n {// checked:29-6\n String avang_adesh = EncodingUtil.convertSLPToUniformItrans(\"gava\"); // transform\n // ITRANS\n // gava\n // to\n // SLP\n return_me = guna_sandhi(avang_adesh, X_adi);\n // We have to remove guna_sandhi default notes\n // this is done by\n comments.decrementPointer();\n\n comments.start_adding_notes();\n comments.setSutraNum(\"6.1.120\");\n comments.setSutraPath(\"indre ca\");\n comments.setSutraProc(\"ava~nga Adesha followed by Guna Sandhi\");\n comments.setSource(Comments.sutra);\n String cond1 = \"Blocks Prakruti Bhava, and Ayadi Sandhi.\\n go + indra = go + ava~N + indra = gava + indra = gavendra.\"; // Fill\n // Later\n comments.setConditions(cond1);\n }\n // **********END OF ELSE IF****************//\n\n // 241 242 Vik.\n // **********ELSE IF****************//\n else if (anta.equals(\"go\") && VowelUtil.isAjadi(X_adi))\n {// checked:29-6\n\n return_me = utsarga_sandhi(X_anta, X_adi); //\n String avang_adesh = EncodingUtil.convertSLPToUniformItrans(\"gava\"); // transform\n // ITRANS\n // gava\n // to\n // SLP\n return_me += \", \" + utsarga_sandhi(avang_adesh, X_adi);\n\n // We have to remove utsarga_sandhi default notes\n // this is done by\n comments.decrementPointer();\n\n comments.start_adding_notes();\n comments.setSutraNum(\"6.1.119\");\n comments.setSutraPath(\"ava~N sphoTayanasya\");\n comments.setSutraProc(\"ava~nga Adesha followed by Regular Vowel Sandhis\");\n comments.setSource(Comments.sutra);\n String cond1 = padanta + \"View Only Supported by Sphotaayana Acharya.\\n\" + \"padanta 'go' + Vowel gets an avana~N-adesh resulting in gava + Vowel.\"; // Fill\n // Later...filled\n comments.setConditions(cond1);\n\n if (X_adi.startsWith(\"a\"))\n {\n return_me += \", \" + prakruti_bhava(X_anta, X_adi);\n\n comments.start_adding_notes();\n comments.setSutraNum(\"6.1.118\");\n comments.setSutraPath(\"sarvatra vibhaaSaa goH\");\n comments.setSutraProc(\"Optional Prakruti Bhava for 'go'(cow)implying words ending in 'e' or 'o'.\");\n comments.setSource(Comments.sutra);\n String cond2 = \"Padanta Dependency. Prakruti bhava if 'go' is followed by any other Phoneme.\"; // Fill\n // Later\n comments.setConditions(cond2);\n\n return_me += \", \" + purva_rupa(X_anta, X_adi);\n\n comments.start_adding_notes();\n comments.setSutraNum(\"6.1.105\");\n comments.setSutraPath(\"e~NaH padAntAdati\");\n comments.setSutraProc(\"purva-rupa ekadesh\");\n comments.setSource(Comments.sutra);\n String cond3 = padanta + \"If a padanta word ending in either 'e' or 'o' is followed by an 'a' purva-rupa ekadesh takes place\" + \"\\npadanta <e~N> 'e/o' + 'a' = purva-rupa ekadesha. Blocks Ayadi Sandhi\";\n comments.setConditions(cond3);\n\n }\n }\n // **********END OF ELSE IF****************//\n\n // 243\n\n // 244\n\n // 246 -250 , 253-260\n\n Log.info(\"return_me == \" + return_me);\n Log.info(\"*******EXITED AAPAVADA NIYAMA3s**********\");\n\n return return_me; // apavada rules formulated by Panini\n }",
"protected boolean m9200e() {\n return this.this$0.b._getEtat() != 0;\n }",
"private boolean postoji(String ime)\n {\n Vaspitac v = this.head;\n while(v != null && !ime.equals(v.ime))\n v = v.next;\n\n // sada samo pitamo da li je v null, \n // jer ako jeste to znaci da smo dosli do kraja liste\n // i da vaspitac sa zadatim imenom ne postoji\n //\n // ternarni operator, \n // return a ? b : c;\n // ako je uslov a tacan vraca b, u suprotnom vraca c\n return v == null ? false : true;\n }",
"private boolean verificarRaza(String raza){\n //Arreglo de Strings con las razas peligrosas\n String[] razas_peligrosas = {\n \"Pit bull terrier\", \n \"American Staffordshire terrier\", \n \"Tosa Inu\",\n \"Dogo argentino\",\n \"Dogo Guatemalteco\",\n \"Fila brasileño\",\n \"Presa canario\",\n \"Doberman\",\n \"Gran perro japones\", \n \"Mastin napolitano\",\n \"Presa Mallorqui\",\n \"Dogo de burdeos\",\n \"Bullmastiff\",\n \"Bull terrier inglés\",\n \"Bulldog americano\",\n \"Rhodesiano\",\n \"Rottweiler\"\n };\n\n boolean bandera = true;\n\n //Ciclo que recorre todos los elementos del arreglo hasta que encuentra uno y termina el ciclo.\n for (int i = 0; i < razas_peligrosas.length; i++){\n if (raza.equals(razas_peligrosas[i])){\n bandera = false;\n break;\n }\n }\n\n return bandera;\n }",
"public static boolean daLiJePrestupnaGodina(int godina) {\r\n\t\tif ((godina % 4 == 0) && (godina % 100 != 0))\r\n\t\t\treturn true;\r\n\t\tif (godina % 400 == 0)\r\n\t\t\treturn true;\r\n\t\treturn false;\r\n\t}",
"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 }",
"protected boolean asEaten() {\n return false;\n }",
"public boolean isTibetan();",
"public boolean esMayorDeEdad(){\r\n \t\tboolean mayor=false;\r\n \t\tif (obtenerAnios()>=18){\r\n\t\t\tmayor=true;\r\n\t\t}\r\n\t\treturn mayor;\r\n\t}",
"@Override\n\tpublic boolean paie() {\n\t\treturn false;\n\t}",
"public boolean getIncluyeInformeAvance() {\n\t\treturn this.adjuntos.size() > 0;\n\t}",
"public Boolean gorbiernoConPrestamos() {\n if (super.getMundo().getGobierno().getPrestamos().size() > 0)\n return true;\n return false;\n }",
"public boolean hasPlainRedeem() {\n return dataCase_ == 3;\n }",
"public boolean estPlein() {\n return this.tapis.size() == capacite;\n }",
"private boolean m72696hm() {\n if (!this.aet || !this.aev || TextUtils.isEmpty(this.aeq)) {\n return false;\n }\n this.aet = false;\n this.aeu = true;\n m72698ho();\n return true;\n }",
"public boolean canConstruct(String ransomNote, String magazine) {\n int[] count = new int[26];\n System.out.println(Arrays.toString(count));\n for (char ch : magazine.toCharArray()) {\n count[(int) ch - (int) 'a'] += 1;\n }\n System.out.println(Arrays.toString(count));\n for (char ch : ransomNote.toCharArray()) {\n count[(int) ch - (int) 'a'] -= 1;\n }\n System.out.println(Arrays.toString(count));\n for (int i : count) {\n if (i < 0)\n return false;\n }\n return true;\n }",
"private boolean isLoptaNaPodlozi(){\n\t\tif (loptaY >= LOPTA_MIN_Y && loptaY <= LOPTA_MAX_Y){\n\t\t\treturn true;\n\t\t}else {\n\t\t\treturn false;\n\t\t}\n\t}",
"boolean hasBunho();",
"boolean hasBunho();",
"private String elaboraAvvisoScrittura() {\n String testo = VUOTA;\n\n if (usaHeadNonScrivere) {\n testo += TAG_NON_SCRIVERE;\n testo += A_CAPO;\n }// end of if cycle\n\n return testo;\n }",
"public boolean prestamo(){\n boolean prestado = true;\n if (cantPres < cantLibro) {\n cantPres++;\n } else {\n prestado = false;\n }\n return prestado;\n }",
"public boolean validateGeslacht(){\n String geslacht = getGeslacht();\n String toernooiSoort = getToernooiSoort();\n\n if(!geslacht.equals(\"F\") && toernooiSoort.equals(\"PinkRibbon\")){\n return false;\n }\n else if(geslacht.equals(\"poepieScheetje\") || toernooiSoort.equals(\"askjeBlap\")){\n return true;\n }\n else{return true;}\n }",
"@Test\n public void getTarjetaPrepagoTest()\n {\n TarjetaPrepagoEntity entity = data.get(0);\n TarjetaPrepagoEntity resultEntity = tarjetaPrepagoLogic.getTarjetaPrepago(entity.getId());\n Assert.assertNotNull(resultEntity);\n Assert.assertEquals(entity.getId(), resultEntity.getId());\n Assert.assertEquals(entity.getNumTarjetaPrepago(), resultEntity.getNumTarjetaPrepago());\n Assert.assertEquals(entity.getSaldo(), resultEntity.getSaldo(), 0.001);\n Assert.assertEquals(entity.getPuntos(), resultEntity.getPuntos(),0.001);\n }",
"boolean sprawdz_przegrana(){\n for(int i=0;i<figura_jakas.getWspolzedne_figorki().size();i++)\n if(sprawdz_kolizje_z_innymi_klockami(0))\n return true;\n return false;\n }",
"public boolean hitTanques(List<Enemigo> enemigos){\n for (int i = 0; i < enemigos.size(); i++){\n if (hitTanqueEnemigo(enemigos.get(i)))\n {\n return true;//para que desaparezca la bala, pero hittanquealiado se encarga de matar al enemigo\n }\n }\n return false;\n }",
"public boolean isPredeterminado()\r\n/* 154: */ {\r\n/* 155:264 */ return this.predeterminado;\r\n/* 156: */ }",
"public boolean isPost();",
"public boolean isPost();",
"public boolean getNedlukket(){\n return datoForNedlukning.isBefore(LocalDate.now());\n }",
"private static void verifyAnkiNotesIntegrity() throws ClassNotFoundException {\n List<AnkiNote> notesWithoutPron = new AnkiDatabase().getNotesWithoutPron();\n for (AnkiNote note : notesWithoutPron) {\n String deutsch = note.getDeutsch();\n String tags = note.getTags();\n String articleError = \"Note has flag %s, but does not start with %s: %s%n\";\n //Notes with tag Femininum must have german field starting with e or r/e\n if (tags.contains(\"Femininum\") && !(deutsch.startsWith(\"e \") || deutsch.startsWith(\"r/e \"))) {\n System.err.printf(articleError, \"Femininum\", \"e or r/e\", note);\n }\n\n //Notes with tag Maskulinum must start with r or r/e or r/s\n if (tags.contains(\"Maskulinum\")\n && !(deutsch.startsWith(\"r \") || deutsch.startsWith(\"r/e \")\n || deutsch.startsWith(\"r/s \"))) {\n System.err.printf(articleError, \"Maskulinum\", \"r or r/e\", note);\n }\n\n //Notes with tag Neutrum must start with s or (s)\n if (tags.contains(\"Neutrum\")\n && !(deutsch.startsWith(\"s \") || deutsch.startsWith(\"(s) \")\n || deutsch.startsWith(\"r/s \"))) {\n System.err.printf(articleError, \"Neutrum\", \"s or (s)\", note);\n }\n\n //No nbsp; in notes!\n if (note.getFlds().contains(\"nbsp;\")) {\n System.err.printf(\"Note contains nbsp; :%s%n\", note);\n }\n\n //No special characters in words!\n String word = note.getWord();\n if (word != null && (word.contains(\"<\") || word.contains(\" \") || word.contains(\">\") || word.contains(\"\"))) {\n System.err.printf(\"Note contains one of characters <, ,>,-: %s%n\", note);\n }\n\n //When note has Maskulinum, Femininum or Neutrum, then it must have wort\n if ((tags.contains(\"Maskulinum\") || tags.contains(\"Femininum\") || tags.contains(\"Neutrum\"))\n && !tags.contains(\"wort\")) {\n System.err.printf(\"Note has Maskulinu, Femininum or Neutrum, but doesn't have wort: %s%n\", note);\n }\n }\n }",
"@Override\n public Task<Boolean> then(@NonNull Task task) throws Exception {\n return addPostScoreToUser(postObject.getOp(), 1L).continueWithTask(new Continuation<Long, Task<Boolean>>() {\n @Override\n public Task<Boolean> then(@NonNull Task<Long> task) throws Exception {\n // Add post to user's upvoted posts\n return addPostToUserUpvoted(postReference, postObject.getOp()).continueWith(new Continuation<Void, Boolean>() {\n @Override\n public Boolean then(@NonNull Task task) throws Exception {\n // Not upvoting post anymore\n upvotingPost = false;\n return true;\n }\n });\n }\n });\n }",
"private boolean diaHabilDomingoPlacaA(int diaActual){\n\t\treturn diaActual == DOMINGO;\n\t}",
"public boolean mataGato() {\r\n\t\treturn true;\r\n\t}",
"public boolean erTom(){\n return hode.neste == hale;\n }",
"public void eisagwgiAstheni() {\n\t\t// Elegxw o arithmos twn asthenwn na mhn ypervei ton megisto dynato\n\t\tif(numOfPatient < 100)\n\t\t{\n\t\t\tSystem.out.println();\n\t\t\tpatient[numOfPatient] = new Asthenis();\n\t\t\tpatient[numOfPatient].setFname(sir.readString(\"DWSTE TO ONOMA TOU ASTHENH: \")); // Pairnei to onoma tou asthenh apo ton xrhsth\n\t\t\tpatient[numOfPatient].setLname(sir.readString(\"DWSTE TO EPWNYMO TOU ASTHENH: \")); // Pairnei to epitheto tou asthenh apo ton xrhsth\n\t\t\tpatient[numOfPatient].setAMKA(rnd.nextInt(1000000)); // To sistima dinei automata ton amka tou asthenous\n\t\t\tSystem.out.println();\n\t\t\t\n\t\t\t//Elegxos monadikotitas tou amka tou astheni\n\t\t\th = rnd.nextInt(1000000);\n\t\t\tfor(int i = 0; i < numOfPatient; i++)\n\t\t\t{\n\t\t\t\tif(patient[i].getAMKA() == h)\n\t\t\t\t{\n\t\t\t\t\tSystem.out.println();\n\t\t\t\t\tSystem.out.println(\"O KWDIKOS AUTOS YPARXEI HDH!\");\n\t\t\t\t\th = rnd.nextInt(1000000);\n\t\t\t\t\tSystem.out.println();\n\t\t\t\t}\n\t\t\t}\n\t\t\tnumOfPatient++;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tSystem.out.println(\"DEN MPOREITE NA EISAGETE ALLOUS ASTHENEIS!\");\n\t\t\tSystem.out.println(\"EXEI SYMPLHRWTHEI O PROVLEPOMENOS ARITHMOS!\");\n\t\t}\n\t}",
"@Override\n\tpublic void checkeoDeBateria() {\n\n\t}",
"public abstract boolean isParseCorrect();",
"public boolean canConstruct(String ransomNote, String magazine) {\n\t\t\n\t\tint[] arr = new int[26];\n\t\tfor(char c : magazine.toCharArray()) arr[c - 'a']++;\n\t\tfor(char c : ransomNote.toCharArray()) {\n\t\t\tif(--arr[c - 'a'] < 0) return false;\n\t\t}\n\t\treturn true;\n\t}",
"Boolean getPartiallyCorrect();",
"public String apavada_vriddhi(String X_anta, String X_adi)\n {\n\n Log.info(\"*******ENTERED AAPAVADA NIYAMA UNO**********\");\n Log.info(\"X_adi == \" + X_adi);\n String anta = EncodingUtil.convertSLPToUniformItrans(X_anta);\n // x.transform(X_anta); // anta is ITRANS equivalent\n String adi = EncodingUtil.convertSLPToUniformItrans(X_adi);\n // x.transform(X_adi); // adi is ITRANS equivalent\n\n Log.info(\"adi == \" + adi);\n\n String return_me = \"UNAPPLICABLE\";\n\n boolean bool1 = VowelUtil.isAkaranta(X_anta) && (adi.equals(\"eti\") || adi.equals(\"edhati\"));\n boolean bool2 = VowelUtil.isAkaranta(X_anta) && adi.equals(\"UTh\");\n\n // 203\n // **********IF****************//\n if (X_anta.endsWith(\"f\") && X_adi.startsWith(\"f\")) // watch out!!! must\n // be SLP not ITRANS\n {// checked:29-6\n String strip1 = VarnaUtil.stripAntyaVarna(X_anta);\n String strip2 = VarnaUtil.stripAdiVarna(X_adi);\n\n return_me = utsarga_sandhi(X_anta, X_adi) + \", \" + strip1 + \"f\" + strip2;\n\n comments.start_adding_notes();\n comments.setSutraNum(\"\");\n comments.setVartikaPath(\"RRiti RRi vA vacanam\");\n comments.setSutraProc(\"hrasva RRikara ekadesh\");\n comments.setSource(Comments.vartika);\n String cond1 = \"small RRi followed by small RRi merge to become small RRi.\\n\" + \"RRi + RRi = RRi\";\n comments.setConditions(cond1);\n\n } // end of main if\n // **********END OF IF****************//\n\n // 204\n // **********IF****************//\n else if (X_anta.endsWith(\"f\") && X_adi.startsWith(\"x\")) // watch out!!!\n // must be SLP\n // not ITRANS\n { // checked:29-6 // SLP x = ITRANS LLi\n String strip1 = VarnaUtil.stripAntyaVarna(X_anta);\n String strip2 = VarnaUtil.stripAdiVarna(X_adi);\n\n return_me = utsarga_sandhi(X_anta, X_adi) + \", \" + strip1 + \"x\" + strip2; // SLP\n // x =\n // ITRANS\n // LLi\n\n comments.start_adding_notes();\n comments.setSutraNum(\"\");\n comments.setVartikaPath(\"LLiti LLi vA vacanam\");\n comments.setSutraProc(\"hrasva LLikara ekadesh\");\n comments.setSource(Comments.vartika);\n String cond1 = \" RRi/RRI followed by small LLi merge to become small LLi.\\n RRi/RRI + LLi = LLi\";\n comments.setConditions(cond1);\n\n } // end of main if\n // **********END OF IF****************//\n\n // 207a-b\n // **********ELSE IF****************//\n else if (bool1 || bool2)\n {\n // checked:29-6\n return_me = vriddhi_sandhi(X_anta, X_adi);\n\n // We have to remove vriddhi_sandhi default notes\n // this is done by\n comments.decrementPointer();\n comments.start_adding_notes();\n comments.setSutraNum(\"6.1.86\");\n comments.setSutraPath(\"eti-edhati-UThsu\");\n comments.setSutraProc(\"vRRiddhi-ekadesh\");\n comments.setSource(Comments.sutra);\n\n String cond1 = \"akaara followed by declensions of 'iN', 'edha' and 'UTh\" + \"<eti/edhati/UTh> are replaced by their vRRiddhi counterpart.\\n\" + \"a/A/a3 + eti/edhati/UTha = VRRiddhi Counterpart.\\n\" + \"Pls. Note.My Program cannot handle all the declensions of given roots.\" + \"Hence will only work for one instance of Third Person Singular Form\";\n comments.setConditions(cond1);\n\n String cond2 = \"Blocks para-rupa Sandhi given by 'e~ni pararUpam' which had blocked Normal Vriddhi Sandhi\";\n\n if (bool1)\n comments.append_condition(cond2);\n else if (bool2) comments.append_condition(\"Blocks 'Ad guNaH'\");\n\n }\n\n // **********END OF ELSE IF****************//\n\n // 208\n // **********ELSE IF****************//\n else if (anta.equals(\"akSa\") && adi.equals(\"UhinI\"))\n {// checked:29-6\n return_me = \"akzOhiRI\"; // u to have give in SLP..had\n // ITRANS....fixed\n // not sending to vrridhit_sandhi becose of Na-inclusion\n // vriddhi_sandhi(X_anta,X_adi);\n // We have to remove vriddhi_sandhi default notes\n // this is done by\n // ***/vowel_notes.decrement_pointer();/***/\n\n comments.start_adding_notes();\n comments.setSutraNum(\"\");\n comments.setVartikaPath(\"akSAdUhinyAm\");\n comments.setSutraProc(\"vRRiddhi-ekadesh\");\n comments.setSource(Comments.vartika);\n String cond1 = \"akSa + UhinI = akshauhiNI.Vartika blocks guna-sandhi ato allow vRRiddhi-ekadesh\";\n comments.setConditions(cond1);\n\n }\n // **********END OF ELSE IF****************//\n\n // 209\n // **********ELSE IF****************//\n else if (anta.equals(\"pra\") && (adi.equals(\"Uha\") || adi.equals(\"UDha\") || adi.equals(\"UDhi\") || adi.equals(\"eSa\") || adi.equals(\"eSya\")))\n // checked:29-6\n {\n return_me = vriddhi_sandhi(X_anta, X_adi);\n\n // We have to remove vriddhi_sandhi default notes\n // this is done by\n /***/\n comments.decrementPointer();\n /***/\n\n comments.start_adding_notes();\n comments.setSutraNum(\"\");\n comments.setVartikaPath(\"prAd-Uha-UDha-UDhi-eSa-eSyeSu\");\n comments.setSutraProc(\"vRRiddhi-ekadesh\");\n comments.setSource(Comments.vartika);\n String cond1 = \"upasarga 'pra' + <prAd/Uha/UDha/UDhi/eSa/eSya> = vRRiddhi-ekadesha.\" + \"\\nVartika blocks para-rupa Sandhi and/or guna Sandhi to allow vRRidhi-ekadesh.\";\n\n comments.setConditions(cond1);\n\n }\n\n // **********END OF ELSE IF****************//\n\n // 210\n // **********ELSE IF****************//\n else if (anta.equals(\"sva\") && (adi.equals(\"ira\") || adi.equals(\"irin\")))\n {\n // checked:29-6\n return_me = vriddhi_sandhi(X_anta, X_adi);\n // We have to remove vriddhi_sandhi default notes\n // this is done by\n /***/\n comments.decrementPointer();\n /***/\n\n comments.start_adding_notes();\n comments.setSutraNum(\"\");\n comments.setVartikaPath(\"svaadireriNoH\");\n comments.setSutraProc(\"vRRiddhi-ekadesh\");\n comments.setSource(Comments.vartika);\n String cond1 = \"sva + <ira/irin> = vRRIddhi.\\n Blocks Guna Sandhi.\" + \"\\nPls. note. My program does not cover sandhi with declensions.\";\n comments.setConditions(cond1);\n }\n\n // **********END OF ELSE IF****************//\n\n // 211 Vik. Semantic Dependency\n // **********ELSE IF****************//\n else if (VowelUtil.isAkaranta(X_anta) && X_adi.equals(\"fta\"))// adi.equals(\"RRita\"))\n {\n // checked:29-6\n // not working for 'a' but working for 'A'. Find out why...fixed\n\n return_me = utsarga_prakruti_bhava(X_anta, X_adi) + \", \" + vriddhi_sandhi(X_anta, X_adi) + \"**\";\n\n // We have to remove vriddhi_sandhi default notes\n // this is done by\n /***/\n comments.decrementPointer();\n /***/\n\n comments.start_adding_notes();\n comments.setSutraNum(\"\");\n comments.setVartikaPath(\"RRite ca tRRitIyAsamAse\");\n comments.setSutraProc(\"Vriddhi-ekadesh\");\n comments.setSource(Comments.vartika);\n String cond1 = \"If an akaranta ('a/aa/a3'-terminating phoneme) is going to form a Tritiya Samas compound with a RRi-initial word\" + \" vRRiddhi-ekadesha takes place blocking other rules.\\n\" + \"a/A/a3 + RRi -> Tritiya Samaasa Compound -> vRRiddhi-ekadesh\" + depend;\n comments.setConditions(cond1);\n }\n // **********END OF ELSE IF****************//\n\n // 212-213\n // **********ELSE IF****************//\n else if ((anta.equals(\"pra\") || anta.equals(\"vatsatara\") || anta.equals(\"kambala\") || anta.equals(\"vasana\") || anta.equals(\"RRiNa\") || anta.equals(\"dasha\")) && adi.equals(\"RRiNa\"))\n\n // checked:29-6\n { // pra condition not working...fixed now . 5 MAR 05\n // return_me = guna_sandhi(X_anta,X_adi) + \", \" +\n // prakruti_bhava(X_anta,X_adi)\n\n return_me = vriddhi_sandhi(X_anta, X_adi);\n // We have to remove vriddhi_sandhi default notes\n // this is done by\n /***/\n comments.decrementPointer();\n /***/\n\n comments.start_adding_notes();\n // vowel_notes.set_sutra_num(\"\") ;\n comments.setVartikaPath(\"pra-vatsatara-kambala-vasanArNa dashaanAm RRiNe\");\n comments.setSutraProc(\"Vriddhi-ekadesh\");\n comments.setSource(Comments.vartika);\n String cond1 = \"If 'pra' etc are followed by the word 'RRiNa',\" + \" vRRiddhi-ekadesh takes place blocking Guna and Prakruti Bhava Sandhis.\" + \"\\n<pra/vatsatara/kambala/vasana/RRiNa/dash> + RRiNa = vRRiddhi\";\n comments.setConditions(cond1);\n }\n // ???? also implement prakruti bhava\n\n /**\n * **YEs ACCORDING TO SWAMI DS but not according to Bhaimi Bhashya else\n * if ( adi.equals(\"RRiNa\") && (anta.equals(\"RRiNa\") ||\n * anta.equals(\"dasha\")) ) { return_me = vriddhi_sandhi(X_anta,X_adi);\n * //*sandhi_notes = VE + apavada + vartika + \"'RRiNa dashAbhyAm ca'.\" +\n * \"\\nBlocks Guna and Prakruti Bhava Sandhi\";\n * \n * vowel_notes.start_adding_notes(); vowel_notes.set_sutra_num(\"\") ;\n * vowel_notes.set_vartika_path(\"RRiNa dashAbhyAm ca\") ;\n * vowel_notes.set_sutra_proc(\"Vriddhi-ekadesh\");\n * vowel_notes.set_source(tippani.vartika) ; String cond1 =depend +\n * \"Blocks Guna and Prakruti Bhava Sandhi\";\n * vowel_notes.set_conditions(cond1);\n * /* return_me = utsarga_prakruti_bhava(X_anta,X_adi) + \", \" +\n * vriddhi_sandhi(X_anta,X_adi) + \"**\"; sandhi_notes = usg1 +\n * sandhi_notes; sandhi_notes+= \"\\n\" + usg2 + VE +apavada + vartika +\n * \"'RRiNa dashAbhyAm ca'.\" + depend; // .... this was when I assumed\n * this niyama is optional with other // ???? also implement prakruti\n * bhava }\n */\n // **********END OF ELSE IF****************//\n // 214 Vik. Semantic Dependency\n // **********ELSE IF****************//\n else if (anta.equals(\"A\") && VowelUtil.isAjadi(X_adi))\n {\n // checked:29-6\n // rules is A + Vowel = VRddhi\n\n return_me = utsarga_sandhi(X_anta, X_adi) + \", \" + vriddhi_sandhi(X_anta, X_adi) + \"**\";\n /*******************************************************************\n * sandhi_notes = usg1 + sandhi_notes + \"\\n\" + usg2 ; // We have to\n * remove vriddhi_sandhi default notes // this is done by /\n ******************************************************************/\n comments.decrementPointer();\n /***/\n\n comments.start_adding_notes();\n comments.setSutraNum(\"6.1.87\");\n comments.setSutraPath(\"ATashca\");\n comments.setSutraProc(\"Vriddhi-ekadesh\");\n comments.setSource(Comments.vartika);\n String cond1 = depend + \"if String 1 equals 'aa' and implies 'AT'-Agama and \" + \"String 2 is a verbal form. E.g. A + IkSata = aikSata not ekSata.\\n\" + \" 'aa' + Verbal Form = vRRiddhi-ekadesh\";\n comments.setConditions(cond1);\n }\n // **********END OF ELSE IF****************//\n\n // **********ELSE IF****************//\n // akaranta uparga mein error....fixed 4 MAR\n // 215 Vik Semantic Dependency\n else if (is_akaranta_upsarga(X_anta) && X_adi.startsWith(\"f\")) // RRi\n // ==\n // SLP\n // 'f'USing\n // X_adi,\n // switched\n // to\n // Sharfe\n // Encoding\n { // according to Vedanga Prakash Sandhi Vishaya RRIkara is being\n // translated\n // but checked with SC Basu Trans. it is RRIta not RRikara\n // checked:29-6\n\n Log.info(\" Rules 215 applies\");\n return_me = utsarga_sandhi(X_anta, X_adi) + \", \" + vriddhi_sandhi(X_anta, X_adi) + \"**\";\n // We have to remove vriddhi_sandhi default notes\n // this is done by\n // vowel_notes.decrement_pointer();\n\n // July 14 2005.. I have removed the above line\n // vowel_notes.decrement_pointer();\n\n comments.start_adding_notes();\n comments.setSutraNum(\"6.1.88\");\n comments.setSutraPath(\"upasargAdRRiti dhAtau\");\n comments.setSutraProc(\"Vriddhi-ekadesh\");\n comments.setSource(Comments.vartika);\n String cond1 = depend + \"akaranta upsarga(preverb) followed by verbal form begining with short RRi.\\n \" + \"preverb ending in <a> + verbal form begining with RRi = vRRiddhi-ekadesha\\n\";\n\n /*\n * \"By 6.1.88 it should block all \" + \"optional forms but by 'vA\n * supyApishaleH' (6.1.89) subantas are \" + \"permitted the Guna\n * option.\";\n */\n comments.setConditions(cond1);\n }\n // **********END OF ELSE IF****************//\n\n Log.info(\"return_me == \" + return_me);\n Log.info(\"*******EXITED AAPAVADA NIYAMA UNO**********\");\n\n if (return_me.equals(\"UNAPPLICABLE\"))\n {\n return_me = apavada_para_rupa(X_anta, X_adi); // search for more\n // apavada rules\n }\n return return_me; // apavada rules formulated by Panini apply\n }",
"public final boolean mo75314al() {\n if (C25352e.m83221d(this.f77546j)) {\n Aweme aweme = this.f77546j;\n C7573i.m23582a((Object) aweme, \"mAweme\");\n Video video = aweme.getVideo();\n C7573i.m23582a((Object) video, \"mAweme.video\");\n if (video.getHeight() >= 300) {\n if (!C34269d.m110856a(mo75261ab())) {\n return m110458as();\n }\n if (TextUtils.isEmpty(C25352e.m83302M(this.f77546j))) {\n return m110458as();\n }\n if (!C19929d.m65759a(C25352e.m83302M(this.f77546j))) {\n return m110458as();\n }\n if (C25384x.m83529a(this.f77546j)) {\n return false;\n }\n return m110458as();\n }\n }\n return false;\n }",
"public void hitunganRule1(){\n penebaranBibitSedikit = 1200;\r\n hariPanenSedang = 50;\r\n \r\n //menentukan niu\r\n nBibit = (1500 - penebaranBibitSedikit) / (1500 - 500);\r\n \r\n //menentukan niu hari panen sedang\r\n if ((hariPanenSedang >=40) && (hariPanenSedang <=80)) {\r\n nPanen = (hariPanenSedang - 40) / (80 - 40);\r\n }\r\n \r\n //tentukan alpha predikat (karena grafik segitiga)\r\n if (nBibit < nPanen) {\r\n a1 = nBibit;\r\n }else if (nBibit > nPanen) {\r\n a1 = nPanen;\r\n }\r\n \r\n //tentukan Z1\r\n z1 = (penebaranBibitSedikit + hariPanenSedang) * 700;\r\n System.out.println(\"a1 = \" + String.valueOf(a1));\r\n System.out.println(\"z1 = \" + String.valueOf(z1));\r\n }",
"public static String shorten(String longPost) {\n\t\tString shortPost = \"\";\n\n\t\tfor (int i = 0; i < longPost.length(); i++) {\n\n\t\t\tString letter = longPost.substring(i, i + 1);\n\n\t\t\tif (\"aeiouAEIOU\".contains(letter)) {\n\t\t\t\tletter.replace(letter, \"\");\n\t\t\t\t// count++;\n\t\t\t} else {\n\t\t\t\tshortPost = shortPost + letter;\n\t\t\t}\n\n\t\t}\n\t\t\n\t\t//Reemplazar vocales por vocales\n\t\t\n//\t\tfor (int i = 0; i < longPost.length(); i++) {\n//\n//\t\t\tString letter = longPost.substring(i, i + 1);\n//\n//\t\t\tif (\"aeiouAEIOU\".contains(letter)) {\n//\t\t\t\tshortPost = shortPost + letter.replace(letter, \"e\");\n//\t\t\t\t// count++;\n//\t\t\t} else {\n//\t\t\t\tshortPost = shortPost + letter;\n//\t\t\t}\n//\n//\t\t}\n\t\t\n\t\t// Otra forma de hacerlo que ocupa menos\n\n//\t\tfor (int i = 0; i < longPost.length(); i++) {\n//\n//\t\t\tif (!\"aeiouAEIOU\".contains(longPost.substring(i, i + 1))) {\n//\t\t\t\tshortPost = shortPost + longPost.substring(i, i + 1);\n//\t\t\t\t// count++;\n//\t\t\t}\n//\n//\t\t}\n\n\t\treturn shortPost;\n\t}",
"public boolean tieneRepresentacionGrafica();",
"private boolean getNeedTitle()\r\n\t{\n\t\tif (new EditionSpeService().ficheProducteurNeedEngagement()==false)\r\n\t\t{\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\t// Si on interdit d'afficher un des deux blocs : pas de titre\r\n\t\tif ((peMesContrats.canPrintContrat==ImpressionContrat.JAMAIS) || (peMesContrats.canPrintContratEngagement==ImpressionContrat.JAMAIS))\r\n\t\t{\t\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\t// Sinon, il faut un titre\r\n\t\treturn true;\r\n\t}",
"public void atrapar() {\n if( una == false) {\n\t\tif ((app.mouseX > 377 && app.mouseX < 591) && (app.mouseY > 336 && app.mouseY < 382)) {\n\t\t\tint aleotoridad = (int) app.random(0, 4);\n\n\t\t\tif (aleotoridad == 3) {\n\n\t\t\t\tSystem.out.print(\"Lo atrapaste\");\n\t\t\t\tcambioEnemigo = 3;\n\t\t\t\tsuerte = true;\n\t\t\t\tuna = true;\n\t\t\t}\n\t\t\tif (aleotoridad == 1 || aleotoridad == 2 || aleotoridad == 0) {\n\n\t\t\t\tSystem.out.print(\"Mala Suerte\");\n\t\t\t\tcambioEnemigo = 4;\n\t\t\t\tmal = true;\n\t\t\t\tuna = true;\n\t\t\t}\n\n\t\t}\n }\n\t}",
"public boolean asignarMascota(Perro perro){\n boolean bandera = false;\n Persona[] miembros_familia;\n familia_asignada = \"\";\n\n while (!bandera){\n //Recorrer todo el arreglo de Familia\n for (int i = 0; i <= numero_familias; i++){\n //Obtener los miembros de la familia actual \n miembros_familia = familias[i].getMiembros();\n\n //Recorrer cada miembro del arreglo de Persona\n for (int j = 0; j < miembros_familia.length; j++){ \n //Obtener edad del miembro\n int edad = miembros_familia[j].getEdad();\n\n //Verificar si el miembro al que se analiza puede tener la mascota y si esa familia puede tener perro\n if(verificarMascota(perro, edad)){\n if (familias[i].getNumeroMascotas() < 4){\n bandera = true;\n familias[i].setNumeroMascotas();\n familia_asignada = familias[i].getApellido();\n j = miembros_familia.length;\n i = familias.length;\n }\n }\n else{\n j = miembros_familia.length;\n }\n }\n }\n break;\n }\n return bandera;\n }",
"public boolean is_akaranta_upsarga(String s1) // / s1 is guaranteed SLP\n // not ITRANS\n {\n\n if (s1.length() > 5) return false;\n\n String upsarga_array[] =\n { \"pra\", \"parA\", \"apa\", \"sam\", \"anu\", \"ava\", \"nis\", \"nir\", \"dus\", \"dur\", \"vi\", \"AN\", \"ni\", \"aDi\", \"api\", \"ati\", \"su\", \"ut\", \"aBi\", \"prati\", \"pari\", \"upa\" }; // all\n // are\n // in\n // SLP\n\n for (int i = 0; i < upsarga_array.length; i++)\n {\n if ((s1).equals(upsarga_array[i]) && VowelUtil.isAkaranta(s1)) return true;\n }\n\n return false;\n\n }",
"public boolean vegallomasonVan()\r\n\t{\r\n\t\treturn vegallomas;\r\n\t}",
"private boolean checkForValidForcePost(ATMSparrowMessage atmSparrowMessage, BankFusionEnvironment env) {\n boolean isValidForcePost = true;\n String transctionType = atmSparrowMessage.getMessageType() + atmSparrowMessage.getTransactionType();\n if (Integer.parseInt(atmSparrowMessage.getForcePost()) > 3 && !transctionType.equals(\"623\")) {\n isValidForcePost = false;\n Object[] field = new Object[] { atmSparrowMessage.getForcePost() };\n // populateErrorDetails(ATMConstants.NOTAUTHORIZED_MESSAGE_FLAG,\n // ATMConstants.CRITICAL, 7535, BankFusionMessages.ERROR_LEVEL,\n populateErrorDetails(ATMConstants.NOTAUTHORIZED_MESSAGE_FLAG, ATMConstants.CRITICAL,\n ChannelsEventCodes.E_INVALID_FORCE_POST_VALUE_FOR_LOCAL_FIN_MESG, BankFusionMessages.ERROR_LEVEL,\n atmSparrowMessage, field, env);\n }\n return isValidForcePost;\n }",
"public String getPalavraEmbaralhada(String palavra);",
"private boolean isLava() {\n/* 317 */ return this.isLava;\n/* */ }",
"public void verifyContentsOfBoostedPost(String... strings) {\n ExtentTestManager.getTest().log(LogStatus.INFO, \" \" + strings[0] + \" :: All the contents in Bookmarked post section with following assertion :\");\n\n verifyDisplayOfBoostedUserProfileName();\n verifyDispalyOfBoostedUserProfileImage();\n verifyDisplayOfBoostedButton();\n verifyDisplayOfTargetCount();\n verifyDisplayOfViews();\n verifyDisplayOfPostActivityTime();\n\n }",
"public void nastaviIgru() {\r\n\t\t// nastavi igru poslije pobjede\r\n\t\tigrajPoslijePobjede = true;\r\n\t}",
"private boolean m72694hk() {\n if (this.aer == null || this.mIntent == null || this.aeo.isEmpty() || this.aep.isEmpty()) {\n return false;\n }\n Collections.unmodifiableList(this.aep);\n return true;\n }",
"private boolean correcto() {\r\n return (casillas.size()>numCasillaCarcel); //&&tieneJuez\r\n }",
"public boolean ePedina(int pezzo)\n { return ( (pezzo==PEDINA_BIANCA) || (pezzo==PEDINA_NERA) ); }",
"boolean getCorrect();",
"@Override\n\tpublic boolean preSave() {\n\t\tif(!cuentaPapaCorrecta(instance)) {\n\t\t\tFacesMessages.instance().add(\n\t\t\t\t\tsainv_messages.get(\"cuentac_error_ctapdrno\"));\n\t\t\treturn false;\n\t\t}\n\t\tif(!cuentaEsUnica()) {\n\t\t\tFacesMessages.instance().add(\n\t\t\t\t\tsainv_messages.get(\"cuentac_error_ctaexis\"));\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}",
"boolean hasHadithText();",
"public boolean getAccepted_tou();",
"public boolean getMustUnderstand();",
"public Personnage attaqueSurPersonnage() {\n\t\tdouble rand = Math.random();\n\t\t\tif (rand >= 0.85){\n\t\t\t\tfrappeMonstre = monstre.getCaracter().getForce() * 2;\n\t\t\t\tjoueur.setDiminutionPV(frappeMonstre);\n\t\t\t\tsetVictimeKO(joueur);\n\t\t\t\tetatAttaque = 'C';\n\t\t\t\treturn joueur;\n\t\t\t}\n\t\t\telse if ((rand < 0.85) && (rand >= 0.15)){\n\t\t\t\tfrappeMonstre = monstre.getCaracter().getForce();\n\t\t\t\tjoueur.setDiminutionPV(frappeMonstre);\n\t\t\t\tsetVictimeKO(joueur);\n\t\t\t\tetatAttaque = 'N';\n\t\t\t\treturn joueur;\n\t\t\t}\n\t\t\telse{\n\t\t\t\tetatAttaque = 'F';\n\t\t\t\tfrappeMonstre = 0;\n\t\t\t\treturn joueur;\n\t\t\t}\n\t\t}",
"public boolean czyUstalonyGracz()\n\t{\n\t\treturn (pojazd != null);\n\t}",
"public boolean jeu() {\n int k;\n\n String compJoueur = \"\";\n String compOrdi = \"\";\n String reponse;\n\n boolean victoireJoueur = false;\n boolean victoireOrdi = false;\n String mystJoueur = challenger.nbMystere(); /**nb que le joueur doit trouver*/\n String mystOrdi = defenseur.nbMystere(); /**nb que l'ordinateur doit trouver*/\n String propOrdi = defenseur.proposition(); /**ordinateur genere un code aleatoire en premiere proposition*/\n log.info(\"Proposition ordinateur : \" + propOrdi); /**afficher proposition ordinateur*/\n String propJoueur = \"\";\n String goodResult = MethodesRepetitives.bonResultat();\n\n\n for (k = 1; !victoireJoueur && !victoireOrdi && k <= nbEssais; k++) { /**si ni le joueur ou l'ordinateur n'ont gagne et si le nombre d'essais n'est pas atteind, relancer*/\n\n compOrdi = MethodesRepetitives.compare(mystOrdi, propOrdi); /**lancer la methode de comparaison du niveau defenseur*/\n log.info(\"Reponse Ordinateur :\" + compOrdi); /**afficher la comparaison*/\n propJoueur = challenger.proposition(); /**demander une saisie au joueur selon le mode challenger*/\n compJoueur = MethodesRepetitives.compare(mystJoueur, propJoueur); /**comparer selon le mode challenger*/\n log.info(\"Reponse Joueur :\" + compJoueur); /**afficher la comparaison*/\n\n if (compOrdi.equals(goodResult)) { /**si l'ordinateur a gagne, changement de la valeur victoireOrdi*/\n victoireOrdi = true;\n }else if(compJoueur.equals(goodResult)) {/**si le joueur a gagne changement de la valeur victoireJoeur*/\n victoireJoueur = true;\n } else if (k < nbEssais) { /**sinon redemander un code a l'ordinateur selon les symboles de comparaison*/\n propOrdi = defenseur.ajuste(propOrdi, compOrdi);\n log.info(\"Proposition Ordinateur :\" + propOrdi);\n }\n }\n\n if (victoireOrdi || !victoireJoueur)/**si l'ordinateur ou le joueur perdent alors perdu sinon gagne*/\n victoireJoueur = false;\n else\n victoireJoueur = true;\n\n return victoireJoueur;\n\n\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 }",
"public boolean isBancrupt(){\r\n \treturn _budget <= 0;\r\n }",
"public boolean kosong() {\r\n return ukuran == 0;\r\n }",
"private final boolean m110458as() {\n String str;\n String str2;\n if (this.f89205aX == null || this.f89207aZ == null || this.f89210bb == null || this.f89209ba == null || !C25352e.m83221d(this.f77546j)) {\n return false;\n }\n this.f89212bd = (RelativeLayout) this.itemView.findViewById(R.id.eh4);\n Aweme aweme = this.f77546j;\n C7573i.m23582a((Object) aweme, \"mAweme\");\n if (aweme.isAppAd() && DownloaderManagerHolder.m75524a().mo51673b(C25352e.m83241x(this.f77546j))) {\n return false;\n }\n this.f89204aW = true;\n Aweme aweme2 = this.f77546j;\n C7573i.m23582a((Object) aweme2, \"mAweme\");\n String str3 = null;\n if (aweme2.isAppAd()) {\n Context ab = mo75261ab();\n Aweme aweme3 = this.f77546j;\n C7573i.m23582a((Object) aweme3, \"mAweme\");\n AwemeRawAd awemeRawAd = aweme3.getAwemeRawAd();\n if (awemeRawAd != null) {\n str2 = awemeRawAd.getCreativeIdStr();\n } else {\n str2 = null;\n }\n String str4 = \"bg_download_button\";\n Aweme aweme4 = this.f77546j;\n C7573i.m23582a((Object) aweme4, \"mAweme\");\n AwemeRawAd awemeRawAd2 = aweme4.getAwemeRawAd();\n if (awemeRawAd2 != null) {\n str3 = awemeRawAd2.getLogExtra();\n }\n C24976t.m82210e(ab, str2, str4, str3);\n } else {\n Context ab2 = mo75261ab();\n Aweme aweme5 = this.f77546j;\n C7573i.m23582a((Object) aweme5, \"mAweme\");\n AwemeRawAd awemeRawAd3 = aweme5.getAwemeRawAd();\n if (awemeRawAd3 != null) {\n str = awemeRawAd3.getCreativeIdStr();\n } else {\n str = null;\n }\n String str5 = \"bg_more_button\";\n Aweme aweme6 = this.f77546j;\n C7573i.m23582a((Object) aweme6, \"mAweme\");\n AwemeRawAd awemeRawAd4 = aweme6.getAwemeRawAd();\n if (awemeRawAd4 != null) {\n str3 = awemeRawAd4.getLogExtra();\n }\n C24976t.m82210e(ab2, str, str5, str3);\n }\n LinearLayout linearLayout = this.f89205aX;\n if (linearLayout != null) {\n linearLayout.setAlpha(0.0f);\n }\n RelativeLayout relativeLayout = this.f89212bd;\n if (relativeLayout != null) {\n relativeLayout.setAlpha(1.0f);\n }\n RelativeLayout relativeLayout2 = this.f89212bd;\n if (relativeLayout2 != null) {\n ViewPropertyAnimator animate = relativeLayout2.animate();\n if (animate != null) {\n ViewPropertyAnimator alpha = animate.alpha(0.0f);\n if (alpha != null) {\n ViewPropertyAnimator duration = alpha.setDuration(150);\n if (duration != null) {\n ViewPropertyAnimator withEndAction = duration.withEndAction(new C34221o(this));\n if (withEndAction != null) {\n withEndAction.start();\n }\n }\n }\n }\n }\n C28418f a = C28418f.m93413a();\n C7573i.m23582a((Object) a, \"FeedSharePlayInfoHelper.inst()\");\n a.f74934d = true;\n C28418f a2 = C28418f.m93413a();\n C7573i.m23582a((Object) a2, \"FeedSharePlayInfoHelper.inst()\");\n a2.f74935e = true;\n return true;\n }",
"protected boolean func_70814_o() { return true; }",
"private boolean isAlfabetico(char unChar) {\r\n\t\tswitch (unChar) {\r\n\t\tcase 'A':\r\n\t\t\treturn true;\r\n\t\tcase 'B':\r\n\t\t\treturn true;\r\n\t\tcase 'C':\r\n\t\t\treturn true;\r\n\t\tcase 'D':\r\n\t\t\treturn true;\r\n\t\tcase 'E':\r\n\t\t\treturn true;\r\n\t\tcase 'F':\r\n\t\t\treturn true;\r\n\t\tcase 'G':\r\n\t\t\treturn true;\r\n\t\tcase 'H':\r\n\t\t\treturn true;\r\n\t\tcase 'I':\r\n\t\t\treturn true;\r\n\t\tcase 'J':\r\n\t\t\treturn true;\r\n\t\tcase 'K':\r\n\t\t\treturn true;\r\n\t\tcase 'L':\r\n\t\t\treturn true;\r\n\t\tcase 'M':\r\n\t\t\treturn true;\r\n\t\tcase 'N':\r\n\t\t\treturn true;\r\n\t\tcase 'Ñ':\r\n\t\t\treturn true;\r\n\t\tcase 'O':\r\n\t\t\treturn true;\r\n\t\tcase 'P':\r\n\t\t\treturn true;\r\n\t\tcase 'Q':\r\n\t\t\treturn true;\r\n\t\tcase 'R':\r\n\t\t\treturn true;\r\n\t\tcase 'S':\r\n\t\t\treturn true;\r\n\t\tcase 'T':\r\n\t\t\treturn true;\r\n\t\tcase 'U':\r\n\t\t\treturn true;\r\n\t\tcase 'V':\r\n\t\t\treturn true;\r\n\t\tcase 'W':\r\n\t\t\treturn true;\r\n\t\tcase 'X':\r\n\t\t\treturn true;\r\n\t\tcase 'Y':\r\n\t\t\treturn true;\r\n\t\tcase 'Z':\r\n\t\t\treturn true;\r\n\t\tcase 'a':\r\n\t\t\treturn true;\r\n\t\tcase 'b':\r\n\t\t\treturn true;\r\n\t\tcase 'c':\r\n\t\t\treturn true;\r\n\t\tcase 'd':\r\n\t\t\treturn true;\r\n\t\tcase 'e':\r\n\t\t\treturn true;\r\n\t\tcase 'f':\r\n\t\t\treturn true;\r\n\t\tcase 'g':\r\n\t\t\treturn true;\r\n\t\tcase 'h':\r\n\t\t\treturn true;\r\n\t\tcase 'i':\r\n\t\t\treturn true;\r\n\t\tcase 'j':\r\n\t\t\treturn true;\r\n\t\tcase 'k':\r\n\t\t\treturn true;\r\n\t\tcase 'l':\r\n\t\t\treturn true;\r\n\t\tcase 'm':\r\n\t\t\treturn true;\r\n\t\tcase 'n':\r\n\t\t\treturn true;\r\n\t\tcase 'ñ':\r\n\t\t\treturn true;\r\n\t\tcase 'o':\r\n\t\t\treturn true;\r\n\t\tcase 'p':\r\n\t\t\treturn true;\r\n\t\tcase 'q':\r\n\t\t\treturn true;\r\n\t\tcase 'r':\r\n\t\t\treturn true;\r\n\t\tcase 's':\r\n\t\t\treturn true;\r\n\t\tcase 't':\r\n\t\t\treturn true;\r\n\t\tcase 'u':\r\n\t\t\treturn true;\r\n\t\tcase 'v':\r\n\t\t\treturn true;\r\n\t\tcase 'w':\r\n\t\t\treturn true;\r\n\t\tcase 'x':\r\n\t\t\treturn true;\r\n\t\tcase 'y':\r\n\t\t\treturn true;\r\n\t\tcase 'z':\r\n\t\t\treturn true;\r\n\t\tcase ' ':\r\n\t\t\treturn true;\r\n\t\tcase '*':\r\n\t\t\treturn true;// debido a búsquedas\r\n\t\tdefault:\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}",
"public void ispisiSveNapomene() {\r\n\t\tint i = 0;// redni broj napomene\r\n\t\tint brojac = 0;\r\n\t\tfor (Podsjetnik podsjetnik : lista) {\r\n\r\n\t\t\ti++;\r\n\t\t\tSystem.out.println(i + \")\" + podsjetnik);\r\n\t\t\tbrojac = i;\r\n\t\t}\r\n\t\tif (brojac == 0) {\r\n\t\t\tSystem.out.println(\"Nema unesenih napomena!!\");\r\n\t\t}\r\n\r\n\t}",
"public boolean voikoSulkea() {\n handleTallenna();\n return true;\n }",
"public final boolean mo86957ao() {\n Aweme aweme = this.f77546j;\n C7573i.m23582a((Object) aweme, \"mAweme\");\n Video video = aweme.getVideo();\n C7573i.m23582a((Object) video, \"mAweme.video\");\n int height = video.getHeight() * 3;\n Aweme aweme2 = this.f77546j;\n C7573i.m23582a((Object) aweme2, \"mAweme\");\n Video video2 = aweme2.getVideo();\n C7573i.m23582a((Object) video2, \"mAweme.video\");\n if (height >= video2.getWidth() * 4) {\n return true;\n }\n return false;\n }",
"private synchronized boolean ProvjeriNoviDatum(Timestamp datum) {\n boolean doKraja = false;\n String datumKraj = konf.getKonfig().dajPostavku(\"preuzimanje.kraj\");\n SimpleDateFormat formatter = new SimpleDateFormat(\"dd.MM.yyyy\");\n Date datumProvjere = new Date(datum.getTime());\n try {\n Date date = formatter.parse(datumKraj);\n if (date.equals(datumProvjere)) {\n doKraja = true;\n }\n } catch (ParseException ex) {\n\n }\n return doKraja;\n }",
"boolean puedoHipotecar(Casilla casilla){\n //Para poder hipotecar la casilla tiene que ser propiedad del jugador.\n return this.esDeMipropiedad(casilla);\n }",
"public boolean isAtivada() {\n return ativada;\n }",
"public boolean func_145773_az() { return true; }"
] |
[
"0.6048058",
"0.60097516",
"0.5702379",
"0.5682133",
"0.566487",
"0.56309193",
"0.55695426",
"0.5536383",
"0.5454943",
"0.5402307",
"0.5393558",
"0.5388139",
"0.53329736",
"0.53143007",
"0.531324",
"0.530609",
"0.52823985",
"0.5271532",
"0.52614087",
"0.5245751",
"0.5238265",
"0.5237827",
"0.523655",
"0.5236393",
"0.52361226",
"0.52350473",
"0.52299505",
"0.52281255",
"0.5227525",
"0.5215535",
"0.5213748",
"0.5211952",
"0.520133",
"0.51991975",
"0.5185798",
"0.51830775",
"0.51797616",
"0.5174217",
"0.51733243",
"0.51712316",
"0.51712316",
"0.51557636",
"0.51537925",
"0.51513404",
"0.5149882",
"0.5148935",
"0.51337695",
"0.51331407",
"0.5123731",
"0.5123731",
"0.51098096",
"0.51065326",
"0.5103244",
"0.5091786",
"0.50757194",
"0.50727177",
"0.5071482",
"0.5068125",
"0.5065675",
"0.5065022",
"0.5063369",
"0.50522846",
"0.50475097",
"0.50467587",
"0.50460905",
"0.5045525",
"0.5033749",
"0.5030062",
"0.50264275",
"0.50237024",
"0.5020961",
"0.50201875",
"0.5013292",
"0.50103045",
"0.50084734",
"0.5007529",
"0.499839",
"0.49929613",
"0.49926236",
"0.4989248",
"0.49888316",
"0.4988078",
"0.49857646",
"0.49847177",
"0.49822453",
"0.49809286",
"0.49790278",
"0.49783832",
"0.49736232",
"0.49731934",
"0.49659675",
"0.49640816",
"0.49604633",
"0.49590907",
"0.49503216",
"0.49495158",
"0.49454436",
"0.49436808",
"0.49426192",
"0.49423248"
] |
0.5431134
|
9
|
Aurre: Post: Pelikula ez badago zerrendan gehitzen du
|
public void pelikulaGehitu(Pelikula pPelikula) {
if(!this.badago(pPelikula)) {
this.lista.add(pPelikula);
}
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"@Override\n\tvoid post() {\n\t\t\n\t}",
"void post(Post post) {\n if (post instanceof Video) {\n vd.compressVideo((Video) post);\n } else if (post instanceof Image) {\n id.decorateImage((Image) post);\n } else if (post instanceof Text) {\n tg.checkGrammar((Text) post);\n }\n }",
"void savePost(Post post);",
"public Post(int id, Usuario autor, String conteudo) {\n this.id = id;\n this.autor = autor;\n this.conteudo = conteudo;\n this.postado = LocalDateTime.now();\n this.editado = null;\n this.ativou();\n }",
"public Post(String user, String postContent, String webAddress) {\n this.orderPosted = nextOrderPosted;\n nextOrderPosted++;\n this.user = user;\n this.postContent = postContent;\n this.webAddress = webAddress;\n// this.myAuthor=myAuthor;\n\n }",
"Post save(Post post) throws Exception;",
"public void postularse() {\n\t\t\n\t\ttry {\t\t\t\n\n\t\t\tPostulante postulante= new Postulante();\n\t\t\tpostulante.setLegajo(Integer.valueOf(this.txtLegajo.getText()));\n\t\t\tpostulante.setFamiliaresACargo(Integer.valueOf(this.txtFamiliaresACargo.getText()));\n\t\t\tpostulante.setNombre(txtNombre.getText());\n\t\t\tpostulante.setApellido(txtApellido.getText());\n\t\t\t//postulante.setFechaDeNacimiento(this.txtFechaDeNaciminto.getText());\n\t\t\tpostulante.setCarrera(this.cmbCarrera.getSelectedItem().toString());\n\t\t\tpostulante.setNacionalidad(this.txtNacionalidad.getText());\n\t\t\tpostulante.setLocalidad(this.txtLocalidad.getText());\n\t\t\tpostulante.setProvincia(this.txtProvincia.getText());\n\t\t\t//postulante.setSituacionSocial(this.txtSituacionSocial.getText());\n\t\t\tpostulante.setDomicilio(this.txtDomicilio.getText());\n\t\t\tpostulante.setCodigoPostal(this.txtCodigoPostal.getText());\n\t\t\tpostulante.setEmail(this.txtEmail.getText());\n\t\t\tpostulante.setTelefono(Long.valueOf(this.txtTelefono.getText()));\n\t\t\t\n\t\t\t\n\t\t\tint ingresos=0, miembrosEconomicamenteActivos = 0;\n\t\t\tfor(Familiar familiar: familiares) {\n\t\t\t\tingresos+=familiar.getIngresos();\n\t\t\t\tif(ingresos > 0) {\n\t\t\t\t\tmiembrosEconomicamenteActivos++;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tpostulante.setCantidadDeFamiliares(familiares.size());\n\t\t\tdouble promedio = Math.random() * (61) + 30 ; \n\t\t\tpostulante.setPromedio((int) promedio);\n\t\t\t\n\t\t\t\n\t\t\tint pIngresos, pActLaboral = 0, pVivienda = 0, pSalud = 0, pDependencia, pPromedio, pRendimiento, pDesarrollo;\n\t\t\t\n\t\t\t//Puntaje Ingresos\n\t\t\tint canastaBasicaPostulante = familiares.size() * canastaBasicaPromedio; \n\t\t\tif(ingresos <= canastaBasicaPostulante) {\n\t\t\t\tpIngresos = 30;\n\t\t\t}\n\t\t\telse if(ingresos >= (2*canastaBasicaPostulante)) {\n\t\t\t\tpIngresos = 0;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tpIngresos = (int) (30 - 0.15 * (familiares.size() - ingresos));\n\t\t\t}\n\t\t\t\n\t\t\t//Puntaje Condicion Actividad Laboral\n\t\t\t\n\t\t\t\n\t\t\tint puntajeMiembros = 0;\n\t\t\t\n\t\t\tfor (Familiar familiar: familiares) {\n\t\t\t\t\tif(familiar.getIngresos() == 0) {\n\t\t\t\t\t\tpuntajeMiembros = puntajeMiembros + 5;\n\t\t\t\t\t}\n\t\t\t\t\telse if(familiar.getIngresos() < salarioMinimo) {\n\t\t\t\t\t\tpuntajeMiembros = puntajeMiembros + 3;\n\t\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif(miembrosEconomicamenteActivos>0) {\n\t\t\tpActLaboral = puntajeMiembros/miembrosEconomicamenteActivos;\n\t\t\t}\n\t\t\t\n\t\t\t//Puntaje Vivienda - Extrae de cmbVivienda: 0 sin deudas - 1 con deudas - 2 sin propiedad\n\t\t\tint condicionVivienda = this.cmbVivienda.getSelectedIndex();\n\t\t\tswitch (condicionVivienda) {\n\t\t\tcase 0:\n\t\t\t\tpVivienda = 0;\n\t\t\t\tbreak;\n\t\t\tcase 1:\n\t\t\t\tpVivienda = 3;\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\tpVivienda = 5;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\t//Puntaje Salud - Extrae de cmbSalud: 0 tiene obra - 1 cobertura parcial - 2 no tiene\n\t\t\tint condicionSalud = this.cmbSalud.getSelectedIndex();\n\t\t\tswitch (condicionSalud) {\n\t\t\tcase 0:\n\t\t\t\tpSalud = 0;\n\t\t\t\tbreak;\n\t\t\tcase 1:\n\t\t\t\tpSalud = 3;\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\tpSalud = 5;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\t//Puntaje Dependencia\n\t\t\tif (familiares.size() - miembrosEconomicamenteActivos == 0) {\n\t\t\t\tpDependencia = 0;\n\t\t\t}\n\t\t\telse if(familiares.size() - miembrosEconomicamenteActivos > 2) {\n\t\t\t\tpDependencia = 5;\n\t\t\t}\n\t\t\telse{\n\t\t\t\tpDependencia = 3;\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t//Puntaje Rendimiento académico\n\t\t\tint materiasAprobadas = (int) (Math.random() * (11));\n\t\t\tif(materiasAprobadas == 0) {\n\t\t\t\tpRendimiento = 4;\n\t\t\t\tpPromedio = 14;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tint materiasRegularizadas = (int) (Math.random() * (41 - materiasAprobadas));\n\t\t\t\tpRendimiento = materiasAprobadas/materiasRegularizadas * 10;\n\t\t\t//Puntaje Promedio: Se recuperaria del sysacad\n\t\t\t\tpPromedio = (int) (promedio/10 * 3.5);\n\t\t\t}\n\t\t\t\n\t\t\t//Puntaje Plan Desarrollo: Evaluado por comisión local\n\t\t\tpDesarrollo = (int) (Math.random() * 5 + 1);\n\n\n\t\t\tpuntaje = pIngresos + pActLaboral + pVivienda + pSalud + pDependencia + pPromedio + pRendimiento + pDesarrollo;\n\t\t\tpostulante.setMatAprobadas(materiasAprobadas);\n\t\t\t\n\t\t\ttry{ \n\t\t\t\tcontroller.postular(postulante,puntaje); \n\t\t\t\tJOptionPane.showMessageDialog(null, \"Se postuló al alumno \"+postulante.getNombre()+\" \"+postulante.getApellido()+\".\", \"Postulación exitosa.\", JOptionPane.OK_OPTION);\n\t\t\t\tlimpiarCampos();\n\t\t\t} \n\t\t\tcatch(Exception ex) {\n\t\t\t\tex.printStackTrace();\n\t\t\t\tJOptionPane.showMessageDialog(null, \"No se pudo postular el alumno\", \"Error\", JOptionPane.OK_OPTION);\n\t\t\t}\n\n\t\t\t\n\t\t}\n\t\tcatch(Exception ex) {\n\t\t\tex.printStackTrace();\n\t\t\tJOptionPane.showMessageDialog(null, \"Datos incorrectos\", \"Error\", JOptionPane.OK_OPTION);\n\t\t}\n\t\t\n\t}",
"@Override\n\tpublic Post updatePost(Post post) {\n\t\treturn null;\n\t}",
"@PostMapping(\"/posts\")\n ResponseEntity<?> createPost(@RequestBody Post post) {\n post.setOwner(SecurityContextHolder.getContext().getAuthentication().getName());\n post.setDateCreated(LocalDateTime.now());\n\n EntityModel<Post> newPost = modelAssembler.toModel(postRepository.save(post));\n return ResponseEntity.created(newPost.getRequiredLink(IanaLinkRelations.SELF).toUri()).body(newPost);\n }",
"public Post() {\n\t\t\n\t}",
"private Posts() {\n }",
"void editMyPost(Post post);",
"public Post()\n {\n nachrichten = new ArrayList<Nachricht>();\n }",
"protected void doPost(HttpServletRequest request, HttpServletResponse response)\n\t\t\tthrows ServletException, IOException {\n\n\t\tPostDao postDao = DatabaseManager.getInstance().getDaoFactory().getPostDao();\n\n\t\t// prendo i dati dalla js\n\t\tString title = request.getParameter(\"title\");\n\t\tString message = request.getParameter(\"content\");\n\t\tString userid = (String) request.getSession(false).getAttribute(\"email\");\n\t\tString pathimg = request.getParameter(\"img\");\n\n\t\tSystem.out.println(\"this is the author of the post \" + userid);\n\n\t\t// creo la data del giorno corrente\n\t\tlong time = System.currentTimeMillis();\n\t\tjava.sql.Date date = new java.sql.Date(time);\n\t\t\n\t\tPost postToSave = new Post(1, title, message, userid, pathimg, date);\n\t\tpostDao.save(postToSave);\n\n\t\tJsonObject post = new JsonObject();\n\t\tpost.addProperty(\"msg\",postToSave.getMessaggio());\n\t\tpost.addProperty(\"title\", postToSave.getTitle());\n\t\tpost.addProperty(\"utente\", postToSave.getUtente());\n\t\tpost.addProperty(\"img\", postToSave.getImgname());\n\t\tpost.addProperty(\"id_post\", postToSave.getIdPost());\n\n\t\tDateFormat df = new SimpleDateFormat(\"yyyy-MM-dd\");\n\t\tString reportDate = df.format(postToSave.getData());\n\n\t\tpost.addProperty(\"data\", reportDate);\n\t\tresponse.getWriter().write(post.toString());\n\n\t}",
"public void savePost(VBeatPostModel post) {\n AppLocalDB.getInstance().db.postDao().insertAll(post);\n }",
"public void setPost(WPPost post) {this.post = post;}",
"private void createPost() {\n PostModel model = new PostModel(23, \"New Title\", \"New Text\");\n Call<PostModel> call = jsonPlaceHolderAPI.createPost(model);\n call.enqueue(new Callback<PostModel>() {\n @Override\n @EverythingIsNonNull\n public void onResponse(Call<PostModel> call, Response<PostModel> response) {\n if (!response.isSuccessful()) {\n textResult.setText(response.code());\n return;\n }\n PostModel postResponse = response.body();\n String content = \"\";\n assert postResponse != null;\n content += \"Code: \" + response.code() + \"\\n\";\n content += \"ID: \" + postResponse.getId() + \"\\n\";\n content += \"User ID: \" + postResponse.getUserId() + \"\\n\";\n content += \"Title: \" + postResponse.getUserId() + \"\\n\";\n content += \"Body: \" + postResponse.getText();\n textResult.append(content);\n }\n\n @Override\n @EverythingIsNonNull\n public void onFailure(Call<PostModel> call, Throwable t) {\n textResult.setText(t.getMessage());\n }\n });\n }",
"public void postBlog(Blog b) {\r\n this.blogPost = b;\r\n Stack serializedPhoto;\r\n BlogMultimedia blogPM;\r\n BlogMessage blogM;\r\n byte[] photoData = null;\r\n Indicator payload = null;\r\n\r\n if (b instanceof BlogMultimedia) {\r\n blogPM = (BlogMultimedia) this.blogPost;\r\n RMSBlogSelector selector = new RMSBlogSelector(RMSBlogSelector.EQUAL_TO, new Long(blogPM.getTimestamp()), null);\r\n serializedPhoto = this.recordManager.getBlog(this.STORED_BLOGS, this.BLOG_PM, this.QUALITY_POST, selector);\r\n BlogUnserializer bu = new BlogUnserializer();\r\n try {\r\n photoData = bu.getPhotoData(serializedPhoto);\r\n } catch (IOException ioe) {\r\n //#debug error\r\n System.out.println(\"getPhotoData: \" + ioe);\r\n }\r\n // set payload for data transfer\r\n if (blogPM != null && photoData != null) {\r\n // timestamp\r\n payload = new Indicator(blogPM.getTimestamp());\r\n // photo\r\n payload.setPhoto(photoData);\r\n // message\r\n if (blogPM.containsMessage()) {\r\n payload.setMessage(blogPM.getMessage().getText());\r\n }\r\n // location\r\n if (blogPM.containsLocation()) {\r\n GPSLocation loc = blogPM.getLocation();\r\n payload.setLocation(new double[]{loc.getLongitude(), loc.getLatitude()});\r\n }\r\n // elevation\r\n Waypoint wp = this.traceManager.getWaypoint(blogPM.getTimestamp());\r\n if (wp != null && wp.containsElevation()) {\r\n payload.setElevation(wp.getElevation());\r\n }\r\n // journey name\r\n if (blogPM.isJourneyBlog()) {\r\n String journeyName = this.controller.getStatistics().getJourneyName();\r\n this.blogPost.setJourneyName(journeyName);\r\n payload.setJourneyName(journeyName);\r\n }\r\n }\r\n } else if (b instanceof BlogMessage) {\r\n blogM = (BlogMessage) this.blogPost;\r\n // set payload for data transfer\r\n if (blogM != null) {\r\n // timestamp\r\n payload = new Indicator(blogM.getTimestamp());\r\n // message\r\n payload.setMessage(blogM.getMessage().getText());\r\n // location\r\n if (blogM.containsLocation()) {\r\n GPSLocation loc = blogM.getLocation();\r\n payload.setLocation(new double[]{loc.getLongitude(), loc.getLatitude()});\r\n }\r\n // elevation\r\n Waypoint wp = this.traceManager.getWaypoint(blogM.getTimestamp());\r\n if (wp != null && wp.containsElevation()) {\r\n payload.setElevation(wp.getElevation());\r\n }\r\n // journey name\r\n if (blogM.isJourneyBlog()) {\r\n String journeyName = this.controller.getStatistics().getJourneyName();\r\n this.blogPost.setJourneyName(journeyName);\r\n payload.setJourneyName(journeyName);\r\n }\r\n }\r\n }\r\n payload.setComment(this.blogPostNumber+\"/\"+this.blogPostBatchSize);\r\n // perform post\r\n this.controller.postBlog(payload);\r\n }",
"public void bind(Post post) {\n // Profile Picture\n // Username\n tvUsername.setText(post.getUser().getUsername());\n // Post Image\n ParseFile postImage = post.getImage();\n if (postImage != null) {\n Glide.with(context).load(postImage.getUrl()).fitCenter().into(ivPostImage);\n }\n // Description\n tvDescription.setText(post.getDescription());\n // Profile Picture Comment\n // Time Ago\n Date createdAt = post.getCreatedAt();\n String timeAgo = Post.calculateTimeAgo(createdAt);\n tvTimeAgo.setText(timeAgo);\n }",
"public String getPost() {\r\n return post;\r\n }",
"@Test(enabled=true)\n\tpublic void createCompletePost() {\n\t\tPosts posts = new Posts(\"5\", \"Lakers\", \"Horry\");\n\t\t\n\t\tString id =\n\n\t\tgiven()\n\t\t.contentType(ContentType.JSON)\n\t\t.body(posts)\n\t\t.when()\n\t\t.post(\"http://localhost:3000/posts/\")\n\t\t.then()\n\t\t.statusCode(201)\n\t\t.extract()\n\t\t.path(\"id\");\n\t\t\n\t\tgiven()\n\t\t.pathParams(\"id\", id)\n\t\t.when().get(\"http://localhost:3000/posts/{id}\")\n\t\t.then()\n\t\t.statusCode(200)\n\t\t.body(\"id\", is(posts.getId()))\n\t\t.body(\"title\",is(posts.getTitle()))\n\t\t.body(\"author\",is(posts.getAuthor()));\n\t}",
"public Postoj() {}",
"@Override\n public void modifyPost(List<Post> posts, int type) {\n\n\t}",
"public void setPostId(Integer postId) {\n this.postId = postId;\n }",
"public void bind(Post post) {\n tvDesc.setText(post.getDescription());\n tvUser.setText(post.getUser().getUsername());\n ParseFile image = post.getImage();\n if(image != null) {\n Glide.with(context).load(post.getImage().getUrl()).into(ivPost);\n }\n createdAt = post.getCreatedAt();\n timeAgo = post.calculateTimeAgo(createdAt);\n tvTime.setText(timeAgo);\n }",
"public void createPost( BlogPost post );",
"@Test(enabled=false)\n\tpublic void createPostCheckBodyContents() {\n\t\tPosts posts = new Posts(\"4\", \"Packers\", \"Favre\");\n\t\t\n\t\tgiven().\n\t\twhen().contentType(ContentType.JSON).\n\t\tbody(posts).\n\t\tpost(\"http://localhost:3000/posts/\").\n\t\tthen().\n\t\tstatusCode(201).\n\t\tbody(\"id\", is(posts.getId())).\n\t\tbody(\"title\",is(posts.getTitle())).\n\t\tbody(\"author\",is(posts.getAuthor()));\n\t}",
"public boolean addPost (Message post) {\n Logger.write(\"VERBOSE\", \"DB\", \"addPost(...)\");\n \n try {\n execute(DBStrings.addPost.replace(\"__SIG__\", post.getSig())\n .replace(\"__msgText__\", post.POSTgetText())\n .replace(\"__time__\", Long.toString(post.getTimestamp()))\n .replace(\"__recieverKey__\", post.POSTgetWall())\n .replace(\"__sendersKey__\", Crypto.encodeKey(getSignatory(post))));\n String[] visibleTo = post.POSTgetVisibleTo();\n for (int i = 0; i < visibleTo.length; i++)\n execute(DBStrings.addPostVisibility.replace(\"__postSig__\", post.getSig()).replace(\"__key__\", visibleTo[i]));\n return true;\n } catch (java.sql.SQLException e) {\n Logger.write(\"ERROR\", \"DB\", \"SQLException: \" + e);\n return false;\n }\n }",
"public String getPost() {\n return post;\n }",
"public String getPost() {\n return post;\n }",
"public void submit(View view){\n EditText ti = (EditText) findViewById(R.id.editText3);\n EditText pos = (EditText) findViewById(R.id.editText4);\n EditText tim = (EditText) findViewById(R.id.editText7);\n\n String titolo = ti.getText().toString();\n String post = pos.getText().toString();\n String time = tim.getText().toString();\n\n\n if (titolo.matches(\"\")) {\n Toast.makeText(this, \"Inserisci titolo\", Toast.LENGTH_SHORT).show();\n return;\n }\n\n if (post.matches(\"\")) {\n Toast.makeText(this, \"Inserisci messaggio\", Toast.LENGTH_SHORT).show();\n return;\n }\n\n if (time.matches(\"\")) {\n Toast.makeText(this, \"Inserisci minuti\", Toast.LENGTH_SHORT).show();\n return;\n }\n\n if (Integer.valueOf(time)>60 ) {\n Toast.makeText(this, \"Durata massima 60 minuti!\", Toast.LENGTH_SHORT).show();\n return;\n }\n\n if (Integer.valueOf(time)<1 ) {\n Toast.makeText(this, \"Durata minima 1 minuto!\", Toast.LENGTH_SHORT).show();\n return;\n }\n\n //Inserimento post online\n DatabaseReference ref = FirebaseDatabase.getInstance().getReference(\"path/to/geofire\");\n GeoFire geoFire = new GeoFire(ref);\n\n\n DatabaseReference mDatabase = FirebaseDatabase.getInstance().getReference().child(\"posts\").push();\n String utente = FirebaseAuth.getInstance().getCurrentUser().getDisplayName();\n String utenteId = FirebaseAuth.getInstance().getCurrentUser().getUid();\n NewPost newPost = new NewPost(titolo,post,utente,utenteId ,mDatabase.getKey());\n LatLng latLng = ((MyApplication) this.getApplication()).getLatLng();\n\n if (latLng == null) {\n Toast.makeText(this, \"POSIZIONE NON TROVATA\", Toast.LENGTH_SHORT).show();\n return;\n }\n newPost.lat = latLng.latitude;\n newPost.longi = latLng.longitude;\n key = newPost.key;\n newPost.durata=Long.parseLong(time, 10);\n newPost.data = new Date().getTime();\n newPost.attivo = true;\n\n\n if(fotoPresente) {\n ByteArrayOutputStream bYtE = new ByteArrayOutputStream();\n ImageView imageView = (ImageView) findViewById(R.id.photo);\n if (imageView != null) {\n Bitmap imageBitmap = ((BitmapDrawable)imageView.getDrawable()).getBitmap();\n imageBitmap.compress(Bitmap.CompressFormat.JPEG,100,bYtE);\n byte[] byteArray = bYtE.toByteArray();\n String encodedImage = Base64.encodeToString(byteArray, Base64.DEFAULT);\n newPost.image = encodedImage;\n }\n }\n\n\n /*ByteArrayOutputStream bYtE = new ByteArrayOutputStream();\n ImageView profile = new ImageView(getBaseContext());\n Glide.with(this.getParent()).load(FirebaseAuth.getInstance().getCurrentUser().getPhotoUrl()).into(profile);\n Bitmap imageBitmap = ((BitmapDrawable)profile.getDrawable()).getBitmap();\n imageBitmap.compress(Bitmap.CompressFormat.JPEG,100,bYtE);\n byte[] byteArray = bYtE.toByteArray();\n String encodedImage = Base64.encodeToString(byteArray, Base64.DEFAULT);*/\n newPost.imageUser = FirebaseAuth.getInstance().getCurrentUser().getPhotoUrl().toString();\n\n\n\n mDatabase.setValue(newPost);\n\n String id = FirebaseAuth.getInstance().getCurrentUser().getUid();\n if(id!=null) {\n mDatabase = FirebaseDatabase.getInstance().getReference().child(\"postattivi\").child(id).push();\n mDatabase.setValue(newPost);\n }\n\n geoFire.setLocation(newPost.key , new GeoLocation(newPost.lat,newPost.longi) );\n\n mDatabase = FirebaseDatabase.getInstance().getReference().child(\"posts\").child(key).child(\"token\").push();\n String token = FirebaseAuth.getInstance().getCurrentUser().getUid();\n mDatabase.setValue(token.toString());\n\n\n this.finish();\n }",
"private void updatePostPut() {\n PostModel model = new PostModel(12, null, \"This is the newest one.\");\n Call<PostModel> call = jsonPlaceHolderAPI.putPosts(5, model);\n call.enqueue(new Callback<PostModel>() {\n @Override\n @EverythingIsNonNull\n public void onResponse(Call<PostModel> call, Response<PostModel> response) {\n if (!response.isSuccessful()) {\n textResult.setText(response.code());\n return;\n }\n PostModel postResponse = response.body();\n String content = \"\";\n assert postResponse != null;\n content += \"Code: \" + response.code() + \"\\n\";\n content += \"ID: \" + postResponse.getId() + \"\\n\";\n content += \"User ID: \" + postResponse.getUserId() + \"\\n\";\n content += \"Title: \" + postResponse.getTitle() + \"\\n\";\n content += \"Body: \" + postResponse.getText();\n textResult.append(content);\n }\n\n @Override\n @EverythingIsNonNull\n public void onFailure(Call<PostModel> call, Throwable t) {\n textResult.setText(t.getMessage());\n }\n });\n }",
"private void updatePostPatch() {\n PostModel model = new PostModel(12, null, \"This is the newest one.\");\n Call<PostModel> call = jsonPlaceHolderAPI.patchPosts(5, model);\n call.enqueue(new Callback<PostModel>() {\n @Override\n @EverythingIsNonNull\n public void onResponse(Call<PostModel> call, Response<PostModel> response) {\n if (!response.isSuccessful()) {\n textResult.setText(response.code());\n return;\n }\n PostModel postResponse = response.body();\n String content = \"\";\n assert postResponse != null;\n content += \"Code: \" + response.code() + \"\\n\";\n content += \"ID: \" + postResponse.getId() + \"\\n\";\n content += \"User ID: \" + postResponse.getUserId() + \"\\n\";\n content += \"Title: \" + postResponse.getTitle() + \"\\n\";\n content += \"Body: \" + postResponse.getText();\n textResult.append(content);\n }\n\n @Override\n @EverythingIsNonNull\n public void onFailure(Call<PostModel> call, Throwable t) {\n textResult.setText(t.getMessage());\n }\n });\n }",
"@Override\r\n\tpublic void submit(Integer uid,Integer tid,String text, String title, String author) {\n\t\t@SuppressWarnings(\"unused\")\r\n\t\tint count = 0;\r\n\t\tString maincontent = \"\";\r\n\t\t String regEx = \"[\\\\u4e00-\\\\u9fa5]\";\r\n\t\t Pattern p = Pattern.compile(regEx);\r\n\t\t Matcher m = p.matcher(text);\r\n\t\t while (m.find()&&count<150) {\r\n\t\t\t count++;\r\n\t\t\t maincontent += m.group(0);\r\n\t\t }\r\n\t\t\r\n\t\tDate date = new Date();\r\n\t\tBlog blog = new Blog(uid,title,text,maincontent,0,0,date,author,tid);\r\n\t\tthis.getBlogDao().save(blog);\r\n\t}",
"@Override\r\n\tpublic String getPosto() {\n\t\treturn null;\r\n\t}",
"public boolean aufnehmen (T posten)\n {\n // Pruefen, ob der Posten mit Bezeichnung und Ausfuehrung schon vorhanden ist\n int index = istVerfuegbar ( posten.getBezeichnung()\n , posten.getAusfuehrung()\n , posten.getAnzahl()); \n\n // Ist der Posten schon vorhanden, so soll die Methode false zurueckliefern\n if (index >= 0)\n {\n return false;\n }\n \n // Aufnehmen des Postens in das Magazin\n return magazin.add (posten);\n }",
"@Override\r\n\tpublic List<Post> relatedPosts(int bankuaihao) {\n\t\tpostDao=new PostDaoImpl(TransactionManager.connection);\r\n\t\tList<Post> list=new ArrayList<Post>();\r\n\t\treturn postDao.relatedPosts(bankuaihao);\r\n\t\r\n\t}",
"private void createPostMap() {\n Map<String, String> map = new HashMap<>();\n map.put(\"userId\", \"12\");\n map.put(\"title\", \"New Title\");\n Call<PostModel> call = jsonPlaceHolderAPI.createPostMap(map);\n call.enqueue(new Callback<PostModel>() {\n @Override\n @EverythingIsNonNull\n public void onResponse(Call<PostModel> call, Response<PostModel> response) {\n if (!response.isSuccessful()) {\n textResult.setText(response.code());\n return;\n }\n PostModel postResponse = response.body();\n String content = \"\";\n assert postResponse != null;\n content += \"Code: \" + response.code() + \"\\n\";\n content += \"ID: \" + postResponse.getId() + \"\\n\";\n content += \"User ID: \" + postResponse.getUserId() + \"\\n\";\n content += \"Title: \" + postResponse.getTitle() + \"\\n\";\n content += \"Body: \" + postResponse.getText();\n textResult.append(content);\n }\n\n @Override\n @EverythingIsNonNull\n public void onFailure(Call<PostModel> call, Throwable t) {\n textResult.setText(t.getMessage());\n }\n });\n }",
"@Test(enabled=false)\n\tpublic void objectPost() {\t\n\t\tPosts posts = new Posts(\"3\", \"Seahawks\", \"Wilson\");\n\t\t\n\t\tResponse res = given().\n\t\twhen().\n\t\tcontentType(ContentType.JSON).\n\t\tbody(posts).\n\t\tpost(\"http://localhost:3000/posts/\");\n\t\n\t\tSystem.out.println(\"Response as object: \"+res.asString());\n\t}",
"@Test(enabled=false)\n\tpublic void basicPost() {\t\n\t\tResponse res = \n\t\tgiven().\n\t\tbody(\" { \\\"id\\\": \\\"2\\\",\"\n\t\t\t\t+ \"\\\"title\\\": \\\"Cleveland\\\", \"\n\t\t\t\t+ \"\\\"author\\\": \\\"Kyrie\\\" }\").\n\t\twhen().\n\t\tcontentType(ContentType.JSON).\n\t\tpost(\"http://localhost:3000/posts/\");\n\t\n\t\tSystem.out.println(res.asString());\n\t}",
"private void postNewPost() {\n if (mIsReplyOnBulletin) {\n OperationManager operationManager = OperationManager.getInstance(NewPostActivity.this);\n operationManager.postNewReply(etNewPostMsg.getText().toString(),\n getIntent().getExtras().getLong(EXTRA_POST_ID), NewPostActivity.this);\n } else {\n OperationManager operationManager = OperationManager.getInstance(NewPostActivity.this);\n operationManager.postNewBulletin(etNewPostSubject.getText().toString()\n , etNewPostMsg.getText().toString(), mFilesAdapter.getData(), NewPostActivity.this);\n\n }\n finish();\n }",
"public long ashirPostCreating(AshirBlogPostingHelper post) {\n long result;\n\n SQLiteDatabase db = this.getWritableDatabase();\n ContentValues values = new ContentValues();\n values.put(Col_2, post.getPost());\n values.put(Col_3, post.getImage());\n //inserting valuse into table columns\n result = db.insert(NAME_OF_TABLE, null, values);\n db.close();\n return result;\n\n }",
"List<Post> getAllPost() throws Exception;",
"private Bundle bundleData(Post post) {\n\n Bundle bundle = new Bundle();\n\n// bundle.putString(\"postId\", postId);\n// bundle.putString(\"postUsername\", postUsername);\n// bundle.putParcelable(\"postUserPicture\", userProfilePic);\n// bundle.putString(\"postDescription\", postDescription);\n// bundle.putString(\"postTitle\", postTitle);\n// bundle.putString(\"postDate\", postDate);\n// bundle.putFloat(\"postRating\", postRating);\n// bundle.putString(\"resultId\", resultId);\n// bundle.putString(\"resultImageUrl\", resultImageUrl);\n// bundle.putString(\"resultName\", resultName);\n// bundle.putString(\"resultType\", resultType);\n// bundle.putString(\"resultArtist\", resultArtist);\n bundle.putParcelable(\"post\", post);\n\n return bundle;\n }",
"@Override\n\tpublic void editPost(Scanner sc) {\n\t\tPost p = new Post();\n\t\tgetPostByMemberId();\n\t\tSystem.out.print(\"수정할 번호를 입력해 주세요 >>\");\n\t\tp.setPostId(sc.nextInt());\n\t\tsc.nextLine();\n\t\tp.setMemberId(cur.getId());\n\t\tSystem.out.print(\"제목을 수정해 주세요 :\");\n\t\tp.setPostName(sc.nextLine());\n\t\tSystem.out.print(\"내용을 수정해 주세요 :\");\n\t\tp.setContent(sc.nextLine());\n\t\tdao.updatePost(p);\n\t}",
"public WPPost getPost() {return post;}",
"protected String getSecondoPost() {\n// String testoPost;\n// String testo = this.getTestoNew();\n// String summary = this.getSummary();\n//// String edittoken = this.getToken();\n//\n// if (testo != null && !testo.equals(\"\")) {\n// try { // prova ad eseguire il codice\n// testo = URLEncoder.encode(testo, \"UTF-8\");\n//\n// } catch (Exception unErrore) { // intercetta l'errore\n// }// fine del blocco try-catch\n// }// fine del blocco if\n// if (summary != null && !summary.equals(\"\")) {\n// try { // prova ad eseguire il codice\n// summary = URLEncoder.encode(summary, \"UTF-8\");\n// } catch (Exception unErrore) { // intercetta l'errore\n// }// fine del blocco try-catch\n// }// fine del blocco if\n//\n// testoPost = \"text=\" + testo;\n// testoPost += \"&bot=true\";\n// testoPost += \"&minor=true\";\n// testoPost += \"&summary=\" + summary;\n//// testoPost += \"&token=\" + edittoken;\n//\n return \"\";\n }",
"@Override\n\tpublic void addPost(Scanner sc) {\n\t\tPost p = new Post();\n\t\tp.setMemberId(cur.getId());\n\t\tsc.nextLine();\n\t\tSystem.out.print(\"제목: \");\n\t\tp.setPostName(sc.nextLine());\n\t\tSystem.out.print(\"내용: \");\n\t\tp.setContent(sc.nextLine());\n\t\tdao.insertPost(p);\n\t}",
"public void setPost(String post) {\r\n this.post = post == null ? null : post.trim();\r\n }",
"public static Result posts() {\n\t\tPost post = new Post();\n\t\tUser user = UserController.loggedInUser();\n\t\tif (user != null) {\n\t\t\tpost.city= user.city;\n\t\t\tpost.state = user.state;\n\t\t\tpost.country = user.country;\n\t\t\tpost.zipcode = user.zipcode;\n\t\t\tpost.createdBy = user.userName;\t\t\t\n\t\t}\n\t\t//TODO:Use bind() instead of the above to avoid 0.0 in price field\n\t\treturn ok(index.render(Post.listPosts(), form(Post.class).fill(post), user));\n\t}",
"public static void main(String[] args) throws ParseException {\n\n\t\tSimpleDateFormat sdf = new SimpleDateFormat(\"dd/MM/yyyy HH:mm:ss\");\n\n\t\tPost p = new Post(sdf.parse(\"21/06/2018 13:05:44\"), \"Viajando para Nova Zelandia\",\n\t\t\t\t\"Estou indo conhecer esse país maravilhoso\", 12);\n\n\t\tPost p2 = new Post(sdf.parse(\"28/07/2018 23:14:19\"), \"Boa Noite\", \"Ate amanha\", 5);\n\n\t\tComentario c1 = new Comentario(\"Boa viagem!\");\n\t\tComentario c2 = new Comentario(\"Voce Merece!\");\n\t\tComentario c3 = new Comentario(\"Boa noite pra vc tbm\");\n\t\tComentario c4 = new Comentario(\"Bom descanso\");\n\n\t\tp.Comentar(c1);\n\t\tp.Comentar(c2);\n\t\tp2.Comentar(c3);\n\t\tp2.Comentar(c4);\n\n\t\tp.ExibirPost();\n\t\tp2.ExibirPost();\n\n\t}",
"public void setPost(String post) {\n this.post = post == null ? null : post.trim();\n }",
"public void setPost(String post) {\n this.post = post == null ? null : post.trim();\n }",
"@Override\n public void done(List<Post> posts, ParseException e) {\n if (e != null) {\n Log.e(TAG, \"issue with getting posts\", e);\n return;\n }\n //iterate through each post and log each of them\n for (Post post : posts) {\n Log.i(TAG, \"Post: \" + post.getDescription() + \" \" + post.getUser().getUsername());\n }\n //clear here before adding posts\n mAllPosts.clear();\n mAllPosts.addAll(posts);\n mAdapter.notifyDataSetChanged();\n mSwipeContainer.setRefreshing(false);\n }",
"@Override\n public void done(List<Post> posts, ParseException e) {\n if (e != null) {\n Log.e(TAG, \"issue with getting posts\", e);\n return;\n }\n //iterate through each post and log each of them\n for (Post post : posts) {\n Log.i(TAG, \"Post: \" + post.getDescription() + \" \" + post.getUser().getUsername());\n }\n //clear here before adding posts\n mAllPosts.clear();\n mAllPosts.addAll(posts);\n mAdapter.notifyDataSetChanged();\n mSwipeContainer.setRefreshing(false);\n }",
"private void makeDummies()\n {\n \n MessagePost messagePost1;\n MessagePost messagePost2;\n PhotoPost photoPost1;\n PhotoPost photoPost2;\n EventPost eventPost1;\n \n //Making 2 message posts and 2 photo posts.\n messagePost1 = new MessagePost(\"kniven\",\"Jeg er skarp idag\");\n messagePost2 = new MessagePost(\"Oscar\", \"I dag er livet verdt å leve\");\n photoPost1 = new PhotoPost(\"Eirik\", \"sol.jpg\", \"Sola skinner fint idag\");\n photoPost2 = new PhotoPost(\"Ole Martin\", \"noSkjeg.jpg\", \"Tatt skjegget\");\n eventPost1 = new EventPost(\"Ole Martin\", \"Ole Martin has joined Solider of Are og Odin\");\n \n //Adding posts to the newsfeed\n newsFeed.addPost(messagePost1);\n newsFeed.addPost(messagePost2);\n newsFeed.addPost(photoPost1);\n newsFeed.addPost(photoPost2);\n newsFeed.addPost(eventPost1);\n newsFeed.addComment(messagePost1, \"Skarping as\");\n newsFeed.addComment(messagePost2, \"Så flott!\");\n newsFeed.addComment(messagePost2, \"Like, Betyr likar\");\n newsFeed.addComment(photoPost1, \"Deilig med sol\");\n newsFeed.addComment(photoPost2, \"Neeeeeeeeeeeeeeeeei! :'(\");\n \n }",
"@Override\n\tpublic Post createPost(Post post) {\n\t\treturn postDao.createPost(post);\n\t}",
"public Post(String textContent,double longitude,double latitude,String userNames){\n\tthis.textContent=textContent;\n\tthis.postID=UUID.randomUUID();\n\tpostoriginatedDate=new Date();\n\tsetLocationInfo(new Location(longitude,latitude));\n\taddtofriendcollection(userNames);\n}",
"@Override\n protected void validateSave(Fornecedor post) {\n\n }",
"@Override\n protected void validateEdit(Fornecedor post) {\n\n }",
"public Post(String user, String squad, String post, String id, long dateTime)\n {\n this.user = user;\n this.squad = squad;\n this.post = post;\n this.id = id;\n this.dateTime = dateTime;\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 }",
"@Override\r\n\tpublic List<Post> latastPosts(int bankuaihao) {\n\t\tpostDao=new PostDaoImpl(TransactionManager.connection);\r\n\t\tList<Post> list=new ArrayList<Post>();\r\n\t\treturn postDao.latastPosts(bankuaihao);\r\n\t\t\r\n\t}",
"public VBeatPostModel getPost(String postId){\n List<VBeatPostModel> postList = AppLocalDB.getInstance().db.postDao().getPost(postId);\n\n if(postList.size() == 0) {\n return null;\n } else {\n return postList.get(0);\n }\n\n }",
"public interface Post {\n // The maximum length of the content of a post.\n public static final int MAX_POST_LENGTH = 140;\n\n /**\n * @effects: returns the type of this\n */\n public PostType getPostType();\n\n /**\n * @effects: returns the id of this\n */\n public int getId();\n\n /**\n * @effects: returns the author of this\n */\n public String getAuthor();\n\n /**\n * @effects: returns the text contents of this\n */\n public String getContents();\n\n /**\n * @effects: returns the timestamp of this\n */\n public LocalDateTime getTimestamp();\n}",
"@Override\n\tpublic void getPost(Scanner sc) {\n\t\tPost p;\n\t\tgetAll();\n\t\tSystem.out.print(\"보고 싶은 리뷰의 번호를 입력해 주세요 >>\");\n\t\tp = dao.selectPost(sc.nextInt());\n\t\tSystem.out.println(p.getPostName());\n\t\tSystem.out.println(p.getContent());\n\t}",
"@Test\n public void postTest(){\n Post post = new Post(\"Title 1\",\"Body 1\");\n\n given().accept(ContentType.JSON)\n .and().contentType(ContentType.JSON)\n .body(post)\n .when().post(\"/posts\")\n .then().statusCode(201)\n .body(\"title\",is(\"Title 1\"),\n \"body\",is(\"Body 1\"),\n \"id\",is(101));\n }",
"@Override\r\n\tpublic void addPost(Post post) {\n\t\tgetHibernateTemplate().save(post);\r\n\t}",
"public void setPostId(int postId) {\r\n\t\tthis.postId = postId;\r\n\t}",
"public void getPostInfo(String objectId){\n final Post.Query query = new Post.Query();\n query.getTop().withUser();\n query.getInBackground(objectId, new GetCallback<Post>() {\n @Override\n public void done(Post object, ParseException e) {\n if (e == null){\n // populate fields with information\n\n if (!object.getDescription().equals(\"\")){\n SpannableString ss1= new SpannableString(object.getHandle() + \" \");\n ss1.setSpan(new StyleSpan(Typeface.BOLD), 0, ss1.length(), 0);\n tvCaption2.append(ss1);\n tvCaption2.append(object.getDescription());\n } else{\n tvCaption2.setText(\"\");\n tvCaption2.setVisibility(View.GONE);\n }\n\n tvHandle2.setText(object.getHandle());\n if (object.getImage() != null){\n GlideApp.with(PostDetails.this)\n .load(object.getImage().getUrl())\n .placeholder(R.drawable.placeholder)\n .into(ivImage2);\n }\n if (object.getProfileImage() != null) {\n GlideApp.with(PostDetails.this)\n .load(object.getProfileImage().getUrl())\n .transform(new CircleCrop())\n .placeholder(R.drawable.instagram_user)\n .into(ivProfileImage2);\n }\n\n tvTimeStamp2.setText(TimeFormatter.getTimeDifference(object.getCreatedAt().toString()));\n } else{ e.printStackTrace(); }\n }\n });\n }",
"public void setPostId(long postId);",
"@Override\n\tpublic Post add(Post entity) {\n\t\treturn null;\n\t}",
"@PostMapping(\"/\")\n private ResponseEntity<Post> createPost(@RequestBody Post post) {\n User user = getCurrentUser();\n post.setCreated(new Date());\n post.setUserId(user.getId());\n post = postService.add(post);\n\n return new ResponseEntity<>(post, HttpStatus.OK);\n }",
"@Override\n public void done(List<Post> posts, ParseException e) {\n if (e != null) {\n Log.e(TAG, \"Issue with getting posts\", e);\n return;\n }\n\n for (Post post : posts) {\n Log.i(TAG, \"Post: \" + post.getDescription() + \", username: \" + post.getUser().getUsername());\n }\n adapter.clear();\n allPosts.addAll(posts);\n adapter.notifyDataSetChanged();\n }",
"@FormUrlEncoded\n @POST(\"posts/\")\n Call<Post> createPostUrlFormatted(\n @Field(\"userId\") Integer id,\n @Field(\"title\") String title,\n @Field(\"body\") String body\n );",
"public Post(long timeStamp, String userName, Long postId) {\n this.arrivalTime = timeStamp;\n this.userName = userName;\n this.totalScore = 10;\n this.postId = postId;\n }",
"@Test\n\tpublic void testCreatePostLive() throws Exception\n\t{\n\t}",
"private void loadPosts(final List<AnipalAbstractPost> posts){\n Query q1 = FirebaseDatabase.getInstance().getReference(\"UserPosts\")\n .child(MainActivity.currentUser.getUserUUID()).orderByChild(\"timestamp\")\n .limitToLast(5);\n q1.addListenerForSingleValueEvent(new ValueEventListener() {\n @Override\n public void onDataChange(@NonNull DataSnapshot dataSnapshot) {\n AnipalAbstractPost post ;\n for(DataSnapshot snap : dataSnapshot.getChildren()){\n if(snap.hasChild(\"photoURL\")){\n // Photo post\n post = snap.getValue(AnipalPhotoPost.class);\n post.findUser(post.getUserUUID());\n }else{\n // Donation post\n post = snap.getValue(AnipalDonationPost.class);\n post.findUser(post.getUserUUID());\n }\n posts.add(post);\n }\n\n Collections.reverse(posts);\n postAdapter.notifyDataSetChanged();\n }\n\n @Override\n public void onCancelled(@NonNull DatabaseError databaseError) {\n\n }\n });\n\n }",
"@Override\n\tvoid postarComentario() {\n\n\t}",
"@Override\n public void done(List<Post> queryPosts, ParseException e) {\n // There is an error\n if(e != null) {\n Log.e(TAG, \"Error in getting posts\");\n return;\n }\n for(Post post : queryPosts) {\n // post.getUser() gets the Id... post.getUser().getUsername() gets the Username associated to the id of getUser in User's table\n Log.i(TAG, \"Post \" + post.getDescription() + \" username: \" + post.getUser().getUsername());\n }\n posts.addAll(queryPosts);\n adapter.notifyDataSetChanged();\n }",
"void setPostId(int postId);",
"public void postPosts(HttpServletRequest req) {\n\t\tArrayList<Post> posts = null;\n\t\tArrayList<Post> bPosts = null;\n\t\tString errorMessage2 = null;\n\n\t\tPostController controller2 = new PostController();\n\n\t\t// get list of authors returned from query\n\t\tposts = controller2.getAllPosts(4);\n\t\tbPosts = controller2.getAllPosts(2);\n\n\t\t// any authors found?\n\t\tif (posts == null) {\n\t\t\terrorMessage2 = \"No Posts were found in the Library\";\n\t\t}\n\n\t\t// Add result objects as request attributes\n\t\treq.setAttribute(\"errorMessage\", errorMessage2);\n\t\treq.setAttribute(\"posts\", posts);\n\t\treq.setAttribute(\"bPosts\", bPosts);\n\t}",
"@Override\n public void done(List<Post> posts, ParseException e) {\n if (e != null) {\n Log.e(TAG, \"Issue with getting posts\", e);\n return;\n }\n\n if (posts.size() == 0) {\n Toast.makeText(getContext(), \"You've reached the end of all posts!\", Toast.LENGTH_SHORT).show();\n return;\n }\n\n for (Post post : posts) {\n Log.i(TAG, \"Post: \" + post.getDescription() + \", username: \" + post.getUser().getUsername());\n }\n allPosts.addAll(posts);\n adapter.notifyDataSetChanged();\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n \n PrintWriter out = response.getWriter();\n \n Utils util = new Utils();\n Post utilPost = new Post();\n Group utilGroup = new Group();\n Long owner = Long.parseLong( request.getParameter(\"owner\") );\n Long goid = Long.parseLong( request.getParameter(\"goid\") );\n \n ArrayList<PostObject> posts = utilPost.getWallPosts( goid, \"group\" );\n \n if( posts == null ) {\n out.println(\"No posts yet. Be the first to post!\");\n }\n else {\n ListIterator itr1 = posts.listIterator(posts.size());\n int i = 0;\n while( itr1.hasPrevious() && i < 7 ) {\n \n PostObject post = ( PostObject ) itr1.previous();\n \n boolean isPostOwner = ( owner == post.getPerson_id() ) ? true : false;\n boolean isGroupOwner = ( post.getPerson_id() == utilGroup.getGroup(goid).getPerson_id() ) ? true : false;\n \n String person_id = util.getPersonName(post.getPerson_id());\n String person_image = \"<div class=\\\"postimg\\\"><img src=\\\"\"+util.getPersonProfilePicture(person_id)+\"\\\"/></div>\";\n String person_link;\n if ( isGroupOwner ) {\n person_link = \"<a href=\\\"http://localhost:8084/Web/pages/profile.jsp?owner=\"+person_id+\"\\\" >\"+util.getPersonDisplayName(person_id) +\" (<span style=\\\"color:maroon;\\\">admin</span>)</a>\"; \n }\n else {\n person_link = \"<a href=\\\"http://localhost:8084/Web/pages/profile.jsp?owner=\"+person_id+\"\\\" >\"+util.getPersonDisplayName(person_id) + \" </a>\"; \n }\n \n String message = \"<div class=\\\"posttext\\\">\" + person_link + \"<br />\" + post.getMessage(); \n \n Long oid = post.getOid();\n Long posted_to = post.getPosted_to();\n String posted_target = post.getPosted_target();\n \n Timestamp posted_time = post.getPosted_time();\n Timestamp now = new Timestamp(new java.util.Date().getTime());\n ArrayList<String> diff = util.getTimePassed(now.getTime(), posted_time.getTime());\n \n String x = \"<a href=\\\"#\\\" ><img src=\\\"../photos/img_close.png\\\" width=\\\"10px\\\" height=\\\"10px\\\" class=\\\"post_x\\\" onclick=\\\"deletePost(\"+post.getOid()+\");\\\" /></a>\";\n String time = \"<div class=\\\"posttime\\\">\" + diff.get(0) + \" \" + diff.get(1) + \" ago</div></div>\";\n String time_plus_x = \"<div class=\\\"posttime\\\">\" + diff.get(0) + \" \" + diff.get(1) + \" ago \" + x + \"</div></div>\";\n \n String printIt = \"<div class=\\\"post\\\" >\" + person_image + message;\n boolean postPrinted = false;\n \n out.println(printIt);\n postPrinted = true;\n \n if ( isPostOwner && postPrinted == true ) { \n out.println(time_plus_x + \"</div>\");\n } \n else if( postPrinted == true ){ \n out.println(time + \"</div>\"); \n }\n \n i++;\n } /* while */\n }\n }",
"int insert(WpPostsWithBLOBs record);",
"@FormUrlEncoded\n @POST(\"posts\")\n Call<Post> createPost(@Field(\"userId\") int userId, @Field(\"title\") String title, @Field(\"body\") String text);",
"@Override\n\tpublic void deletePost(Post post) {\n\n\t}",
"public boolean isPost();",
"public boolean isPost();",
"private void sendPost() {\n Map<String,Object> values = new HashMap<>();\n values.put(Constants.MANAGEMENT,management);\n values.put(Constants.GENERAL_INFORMATION,generalnformation);\n values.put(Constants.SYMPTOMS,symptoms);\n\n FireBaseUtils.mDatabaseDiseases.child(caseStudyUrl).child(url).updateChildren(values);\n Toast.makeText(DiseaseEditActivity.this, \"Item Posted\",LENGTH_LONG).show();\n finish();\n }",
"public long getPostId() {\n return postId;\n }",
"public int getIdPosto() {\n return idPosto;\n }",
"public void bind(Post post) {\n tvDescription.setText(post.getDescription());\n tvUsername.setText(post.getUser().getUsername());\n tvTime.setText(Post.calculateTimeAgo(post.getCreatedAt()));\n\n ParseFile image = post.getImage();\n if (image != null) {\n Glide.with(context).load(image.getUrl()).into(ivImage);\n }\n\n itemView.findViewById(R.id.ivImage).setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n Intent intent = new Intent(context, PostDetailActivity.class);\n intent.putExtra(\"post\", Parcels.wrap(post));\n context.startActivity(intent);\n }\n });\n\n //Change heart to be liked\n ivLike.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n Resources res = context.getResources();\n if(ivLike.getBackground().equals(res.getDrawable(R.drawable.ufi_heart_active))) {\n Drawable drawable = res.getDrawable(R.drawable.ufi_heart);\n ivLike.setBackground(drawable);\n }\n else {\n Drawable drawable = res.getDrawable(R.drawable.ufi_heart_active);\n ivLike.setBackground(drawable);\n }\n }\n });\n\n //change save Image\n ivSave.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n Resources res = context.getResources();\n if(ivSave.getBackground().equals(res.getDrawable(R.drawable.ufi_save_active))) {\n Drawable drawable = res.getDrawable(R.drawable.ufi_save_icon);\n ivSave.setBackground(drawable);\n }\n else {\n Drawable drawable = res.getDrawable(R.drawable.ufi_save_active);\n ivSave.setBackground(drawable);\n }\n }\n });\n\n }",
"public Post() {\n }",
"Post getPostByID(long postId);",
"@Override\n public void onCancelled(DatabaseError databaseError) {\n Toast.makeText(VotingPage.this, \"Failed to load post.\",\n Toast.LENGTH_SHORT).show();\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 setTimePost(Date timePost) {\n this.timePost = timePost;\n }",
"public Integer getPostId() {\n return postId;\n }",
"CompletableFuture<PostResponse> createNewPost(Post post);",
"public Post()\n {\n }"
] |
[
"0.62329626",
"0.6198642",
"0.615937",
"0.6029979",
"0.60000294",
"0.5980642",
"0.593548",
"0.58893573",
"0.58622015",
"0.5860673",
"0.5843358",
"0.5839577",
"0.58395684",
"0.5834957",
"0.58128744",
"0.5805627",
"0.57977337",
"0.5772264",
"0.57645434",
"0.5759086",
"0.5725933",
"0.5723057",
"0.5715312",
"0.57018703",
"0.56976044",
"0.56915754",
"0.5690476",
"0.56761324",
"0.5642774",
"0.5642774",
"0.5637137",
"0.5617201",
"0.5592838",
"0.5592243",
"0.55781096",
"0.5574817",
"0.5571263",
"0.55645037",
"0.55596745",
"0.55393624",
"0.5536392",
"0.551859",
"0.55100167",
"0.5503769",
"0.5503222",
"0.5499769",
"0.5495052",
"0.54945546",
"0.5490819",
"0.54891986",
"0.54830605",
"0.5478083",
"0.5478083",
"0.5471015",
"0.5471015",
"0.5468729",
"0.54670894",
"0.5466311",
"0.546498",
"0.5448614",
"0.54424065",
"0.5438565",
"0.5419378",
"0.54168224",
"0.5414587",
"0.5406828",
"0.54041374",
"0.5399446",
"0.5397615",
"0.5396045",
"0.5394519",
"0.53924596",
"0.5392031",
"0.53793925",
"0.537351",
"0.5371506",
"0.53709036",
"0.5370281",
"0.53702474",
"0.53527236",
"0.5326611",
"0.5325261",
"0.53247416",
"0.5321471",
"0.5320699",
"0.53174686",
"0.53118384",
"0.5308427",
"0.5308427",
"0.5308301",
"0.5307813",
"0.5300909",
"0.5299851",
"0.52997893",
"0.5294325",
"0.52937514",
"0.5293288",
"0.52923495",
"0.5287998",
"0.52852815",
"0.5285132"
] |
0.0
|
-1
|
creating a new table is succesfull
|
@Test
public void createHighScoreTableTest() {
assertTrue(database.createHighScoreTable(testTable));
database.clearTable(testTable);
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public void doCreateTable();",
"public void createTable() throws LRException\n\t{\n\t\tgetBackground();\n\t\tDataHRecordData myData=(DataHRecordData)getData();\n\t\t// Create a new (empty) record\n\t\tcreate(new Hashtable(),myData);\n\t\tif (myData.record==null) throw new LRException(DataRMessages.nullRecord(getName()));\n\t\ttry\n\t\t{\n\t\t\tbackground.newTransaction();\n\t\t\tmyData.record.createNewTable(background.getClient(),true);\n\t\t}\n\t\tcatch (LDBException e) { setStatus(e); }\n\t}",
"public void createTable() {\r\n\t\tclient.createTable();\r\n\t}",
"boolean createTable();",
"public void createNewTable() throws WoodsException{\n\t\t\tuserTable = new Table(tableName);\n\t\t\tDatabase.get().storeTable(tableName, userTable);\n\t\t}",
"private void createTable() {\n\t\t// Tao dataModel & table \n\t\tdataModel = new DefaultTableModel(headers, 0);\n\t\ttable.setModel(dataModel);\n\t\t\n\t\tnapDuLieuChoBang();\n\t}",
"@Override\n public void createTable() throws Exception {\n }",
"public boolean create() throws Exception {\n\t\treturn tableDao.create();\r\n\t}",
"protected boolean createTable() {\n\t\t// --- 1. Dichiarazione della variabile per il risultato ---\n\t\tboolean result = false;\n\t\t// --- 2. Controlli preliminari sui dati in ingresso ---\n\t\t// n.d.\n\t\t// --- 3. Apertura della connessione ---\n\t\tConnection conn = getCurrentJDBCFactory().getConnection();\n\t\t// --- 4. Tentativo di accesso al db e impostazione del risultato ---\n\t\ttry {\n\t\t\t// --- a. Crea (se senza parametri) o prepara (se con parametri) lo statement\n\t\t\tStatement stmt = conn.createStatement();\n\t\t\t// --- b. Pulisci e imposta i parametri (se ve ne sono)\n\t\t\t// n.d.\n\t\t\t// --- c. Esegui l'azione sul database ed estrai il risultato (se atteso)\n\t\t\tstmt.execute(getCreate());\n\t\t\t// --- d. Cicla sul risultato (se presente) pe accedere ai valori di ogni sua tupla\n\t\t\t// n.d. Qui devo solo dire al chiamante che è andato tutto liscio\n\t\t\tresult = true;\n\t\t\t// --- e. Rilascia la struttura dati del risultato\n\t\t\t// n.d.\n\t\t\t// --- f. Rilascia la struttura dati dello statement\n\t\t\tstmt.close();\n\t\t}\n\t\t// --- 5. Gestione di eventuali eccezioni ---\n\t\tcatch (Exception e) {\n\t\t\tgetCurrentJDBCFactory().getLogger().debug(\"failed to create publisher table\",e);\n\t\t}\n\t\t// --- 6. Rilascio, SEMPRE E COMUNQUE, la connessione prima di restituire il controllo al chiamante\n\t\tfinally {\n\t\t\tgetCurrentJDBCFactory().releaseConnection(conn);\n\t\t}\n\t\t// --- 7. Restituzione del risultato (eventualmente di fallimento)\n\t\treturn result;\n\t}",
"@Override\n\tpublic void handle(ActionEvent arg0) {\n\t\tCreateTables creator = new CreateTables(tlp);\n\t\tcreator.createLogTable();\n//\t\tcreator.createRacesTable();\n//\t\tcreator.createTravelHistoryTable();\n\t\tSystem.out.println(\"log exist: \"+creator.checkExistingTable(\"log\"));\n\t\tSystem.out.println(\"races exist: \"+creator.checkExistingTable(\"races\"));\n\t\tSystem.out.println(\"travelhistory exist: \"+creator.checkExistingTable(\"travelhistory\"));\n\t}",
"public synchronized void criarTabela(){\n \n String sql = \"CREATE TABLE IF NOT EXISTS CPF(\\n\"\n + \"id integer PRIMARY KEY AUTOINCREMENT,\\n\"//Autoincrement\n// + \"codDocumento integer,\\n\"\n + \"numCPF integer\\n\"\n + \");\";\n \n try (Connection c = ConexaoJDBC.getInstance();\n Statement stmt = c.createStatement()) {\n // create a new table\n stmt.execute(sql);\n stmt.close();\n c.close();\n } catch (SQLException e) {\n System.err.println(e.getClass().getName() + \": \" + e.getMessage()); \n// System.out.println(e.getMessage());\n }\n System.out.println(\"Table created successfully\");\n }",
"public void createNewTable(){\n Connection conn = null;\n Statement stmt = null;\n try{\n //STEP 2: Register JDBC driver\n System.out.println(\"Registered JDBC driver...\");\n Class.forName(\"com.mysql.jdbc.Driver\");\n\n //STEP 3: Open a connection\n System.out.println(\"Connecting to database...\");\n conn = DriverManager.getConnection(DB_URL);//acceses the database specified by the url through entering in the username and password\n System.out.println(\"Creating statement...\");\n stmt = conn.createStatement(); //access the database server and manipulate data in database\n String sql = \"CREATE TABLE EXPERIENCE_\"+gameNumber+\n \" (Id INT PRIMARY KEY AUTO_INCREMENT,\"+\n \"player VARCHAR(255), \" +\n \" bigsquare INTEGER, \" + \n \" smallsquare INTEGER)\";\n System.out.println(\"SUCCCESSS!\"+gameNumber+ \" yayyyY!\");\n stmt.executeUpdate(sql);\n System.out.println(\"sweeeeeeeeeet....\");\n stmt.close();\n conn.close(); \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 }finally{\n //finally block used to close resources\n try{\n if(stmt!=null)\n stmt.close();\n }catch(SQLException se2){\n }// nothing we can do\n try{\n if(conn!=null)\n conn.close();\n }catch(SQLException se){\n se.printStackTrace();\n }//end finally try\n }//end try\n \n \n }",
"public void testCreateTable() {\n LOG.info(\"Entering testCreateTable.\");\n\n // Specify the table descriptor.\n HTableDescriptor htd = new HTableDescriptor(tableName);\n\n // Set the column family name to info.\n HColumnDescriptor hcd = new HColumnDescriptor(\"info\");\n\n // Set data encoding methods,HBase provides DIFF,FAST_DIFF,PREFIX\n // and PREFIX_TREE\n hcd.setDataBlockEncoding(DataBlockEncoding.FAST_DIFF);\n\n // Set compression methods, HBase provides two default compression\n // methods:GZ and SNAPPY\n // GZ has the highest compression rate,but low compression and\n // decompression effeciency,fit for cold data\n // SNAPPY has low compression rate, but high compression and\n // decompression effeciency,fit for hot data.\n // it is advised to use SANPPY\n hcd.setCompressionType(Compression.Algorithm.SNAPPY);\n\n htd.addFamily(hcd);\n\n Admin admin = null;\n try {\n // Instantiate an Admin object.\n admin = conn.getAdmin();\n if (!admin.tableExists(tableName)) {\n LOG.info(\"Creating table...\");\n admin.createTable(htd);\n LOG.info(admin.getClusterStatus());\n LOG.info(admin.listNamespaceDescriptors());\n LOG.info(\"Table created successfully.\");\n } else {\n LOG.warn(\"table already exists\");\n }\n } catch (IOException e) {\n LOG.error(\"Create table failed.\");\n } finally {\n if (admin != null) {\n try {\n // Close the Admin object.\n admin.close();\n } catch (IOException e) {\n LOG.error(\"Failed to close admin \", e);\n }\n }\n }\n LOG.info(\"Exiting testCreateTable.\");\n }",
"private void CreatTable() {\n String sql = \"CREATE TABLE IF NOT EXISTS \" + TABLE_NAME\n + \" (name varchar(30) primary key,password varchar(30));\";\n try{\n db.execSQL(sql);\n }catch(SQLException ex){}\n }",
"TABLE createTABLE();",
"public void createTable() throws SQLException {\r\n\t\t\r\n\t\t//SQL query for inserting a new table \"user\" in the \"users\" database\r\n\t\tString sql = \"create table if not exists user(id INT primary key auto_increment, \"\r\n\t\t\t\t+ \"name VARCHAR(30), country VARCHAR(30), age INT)\";\r\n\t\t\r\n\t\t//Execute this query\r\n\t\t\r\n\t\tStatement statement = connection.createStatement();\r\n\t\t\r\n\t\tboolean result = statement.execute(sql); //Can return false even if the operation is successful. Mostly used for creating a table\r\n\t\t\r\n\t\tlogger.info(\"result of create operation is {}\",result);\r\n//\t\tstatement.executeQuery(sql); //Execute and return resultSet. Mostly used with select queries when we want to retrive the data\r\n//\t\tstatement.executeUpdate(sql);//Return no of rows being affected.Works with any type of queries but only returns no of rows being affected\r\n\t\t\r\n\t}",
"private void createTable() throws Exception{\n Statement stm = this.con.createStatement();\n\n String query = \"CREATE TABLE IF NOT EXISTS \" + tableName +\n \"(name VARCHAR( 15 ) CHARACTER SET utf8 COLLATE utf8_persian_ci NOT NULL ,\" +\n \" city VARCHAR( 15 ) CHARACTER SET utf8 COLLATE utf8_persian_ci NOT NULL ,\" +\n \" phone VARCHAR( 15 ) NOT NULL, \" +\n \"PRIMARY KEY (phone) )\";\n stm.execute(query);\n }",
"Table createTable();",
"public TableCreation(Table table) {\n this.table = table;\n }",
"public void createNewTable() {\n String dropOld = \"DROP TABLE IF EXISTS card;\";\n\n // SQL statement for creating a new table\n String sql = \"CREATE TABLE IF NOT EXISTS card (\\n\"\n + \"id INTEGER PRIMARY KEY AUTOINCREMENT, \\n\"\n + \"number TEXT, \\n\"\n + \"pin TEXT,\\n\"\n + \"balance INTEGER DEFAULT 0\"\n + \");\";\n\n try (Connection connection = connect();\n Statement stmt = connection.createStatement()) {\n\n //drop old table\n stmt.execute(dropOld);\n\n //create a new table\n stmt.execute(sql);\n } catch (SQLException e) {\n System.out.println(\"Exception3: \" + e.getMessage());\n }\n }",
"@Test\n public void testTableFactoryCreate() {\n TableController tableController = tableFactory.getTableController();\n tableController.addTable(2);\n assertEquals(1, tableController.getTableMap().get(2).size());\n }",
"public void createTableComplaintsData()\n\t\t{\n\t\t\ttry {\n\t\t\t\tDatabaseMetaData d=con.getMetaData();\n\t\t\t\tResultSet rs=d.getTables(null,null,\"ComplaintsData\",null);\n\t\t\t\tif(rs.next())\n\t\t\t\t{\n\t//\t\t\t\tJOptionPane.showMessageDialog(null,\"ComplaintsData table exist\");\n\t\t\t\t}\n\t\t\t\telse \n\t\t\t\t{\n\t\t\t\t\tString Create_Table=\"create table ComplaintsData(Customer_Name varchar(100),Address varchar(100),Contact varchar(30),Product varchar(100),Serial_No varchar(50),Module_No varchar(50),Complaint_No varchar(50),Category varchar(30))\";\n\t\t\t\t\tPreparedStatement ps=con.prepareStatement(Create_Table);\n\t\t\t\t\tps.executeUpdate();\n\t//\t\t\t\tJOptionPane.showMessageDialog(null,\"ComplaintsData created successfully!\");\n\t\t\t\t}\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\t\n\t\t}",
"protected void createTable() throws Exception {\n startService();\n assertEquals(true, sqlDbManager.isReady());\n\n Connection conn = sqlDbManager.getConnection();\n assertNotNull(conn);\n assertFalse(sqlDbManager.tableExists(conn, \"testtable\"));\n assertTrue(sqlDbManager.createTableIfMissing(conn, \"testtable\",\n\t\t\t\t\t TABLE_CREATE_SQL));\n assertTrue(sqlDbManager.tableExists(conn, \"testtable\"));\n sqlDbManager.logTableSchema(conn, \"testtable\");\n assertFalse(sqlDbManager.createTableIfMissing(conn, \"testtable\",\n\t\t\t\t\t TABLE_CREATE_SQL));\n }",
"tbls createtbls();",
"@Override\n public void createUsersTable() {\n\n\n Session session = sessionFactory.openSession();\n Transaction transaction = session.beginTransaction();\n session.createSQLQuery(\"CREATE TABLE IF NOT EXISTS Users \" +\n \"(Id BIGINT PRIMARY KEY AUTO_INCREMENT, FirstName TINYTEXT , \" +\n \"LastName TINYTEXT , Age TINYINT)\").executeUpdate();\n transaction.commit();\n session.close();\n\n\n }",
"public void createNewTable() {\n // SQL statement for creating a new table\n String sql = \"CREATE TABLE IF NOT EXISTS card (\\n\"\n + \" id INTEGER PRIMARY KEY AUTOINCREMENT,\\n\"\n + \" number TEXT,\\n\"\n + \" pin TEXT,\\n\"\n + \" balance INTEGER DEFAULT 0\\n\"\n + \");\";\n\n try (Connection conn = DriverManager.getConnection(url);\n Statement stmt = conn.createStatement()) {\n // create a new table\n stmt.execute(sql);\n } catch (SQLException e) {\n System.out.println(e.getMessage());\n }\n }",
"public boolean createTable() {\n boolean success = false;\n if (conn != null) {\n Statement stmt = null;\n\n try {\n stmt = conn.createStatement();\n stmt.execute(\"CREATE TABLE sample_table (id INT IDENTITY, first_name VARCHAR(30), last_name VARCHAR(30), age INT)\");\n log.info(\"Creating sample_table\");\n success = true;\n } catch (SQLException e) {\n log.error(\"Unable to create the database table\", e);\n } finally {\n if (stmt != null) {\n try {\n stmt.close();\n } catch (SQLException e) {\n }\n }\n }\n }\n return success;\n }",
"private void createTables() throws SQLException\r\n {\r\n createTableMenuItems();\r\n createTableOrdersWaiting();\r\n }",
"private void createTableOrdersWaiting() throws SQLException\r\n {\r\n String sqlQuery = \r\n \"CREATE TABLE orders \" +\r\n \"(id auto_increment INT NOT NULL PRIMARY KEY, \" +\r\n \"custname VARCHAR(25) NOT NULL, \" +\r\n \"tablenumber INT NOT NULL, \" +\r\n \"foodname VARCHAR(100) NOT NULL, \" + \r\n \"beveragename VARCHAR(100) NOT NULL, \" + \r\n \"served BOOLEAN NOT NULL, \" + \r\n \"billed BOOLEAN NOT NULL, \" + \r\n \"time DATETIME DEFAULT CURRENT_TIMESTAMP)\";\r\n myStmt.executeUpdate(sqlQuery);\r\n }",
"public abstract void createTables() throws DataServiceException;",
"public void createTable() {\n\t\tString QUERY = \"CREATE TABLE person (id INT PRIMARY KEY, name VARCHAR(32) NOT NULL, phoneNumber VARCHAR(18) NOT NULL)\";\n\t\ttry (Connection con = DriverManager.getConnection(URL, USER, PASSWORD);\n\t\t\t\tStatement stmt = con.createStatement();) {\n\t\t\tstmt.executeUpdate(QUERY);\n\t\t} catch (SQLException e) {\n\t\t\tSystem.err.println(\"SQL Exception\");\n\t\t}\n\n\t}",
"public boolean maketable() {\n String query = \"\";\n if (connect != null) {\n try {\n java.sql.DatabaseMetaData dbmd = connect.getMetaData();\n ResultSet rs = dbmd.getTables(null, null, \"PLAYERNAME\", null);\n if (rs.next()) {//If it is existed\n System.out.println(\"table exists\");\n } else {//otherwise, create the table\n query = \"create table score(\\n\"\n + \"nickname varchar(40) not null,\\n\"\n + \"levels integer not null,\\n\"\n + \"highscore integer,\\n\"\n + \"numberkill integer,\\n\"\n + \"constraint pk_nickname_score PRIMARY KEY (nickname)\\n\"\n + \")\";\n ps = connect.prepareStatement(query);\n ps.execute();//Execute the SQL statement\n System.out.println(\"new table created\");\n }\n } catch (SQLException ex) {\n System.out.println(\"table create failed\");\n ex.printStackTrace();\n }\n } else {\n System.out.println(\"Connect failed.\");\n }\n return true;\n }",
"private void createTable(HTableDescriptor tableDesc, boolean ignoreTableExists) {\n\n\t\tHBaseAdmin admin = HBaseConfigurationManager.getHbaseAdmin();\n\n\t\ttry {\n\n\t\t\tadmin.createTable(tableDesc);\n\t\t\tJOptionPane.showMessageDialog(this, \"Table Created and Enabled Successfully\");\n\t\t}\n\t\tcatch (TableExistsException e) {\n\t\t\tif (!ignoreTableExists) {\n\t\t\t\tint sel = JOptionPane.showConfirmDialog(this, \"Table Already Exist, Add Data ???\", \"Warning!\", JOptionPane.YES_NO_OPTION, JOptionPane.WARNING_MESSAGE);\n\n\t\t\t\tif (sel == JOptionPane.NO_OPTION) {\n\t\t\t\t\tthis.dispose();\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\t\tcatch (IOException ex) {\n\t\t\tJOptionPane.showMessageDialog(this, \"Table Creation Failed\", \"Error\", JOptionPane.ERROR_MESSAGE);\n\t\t\tLogger.getLogger(HBaseManagerTableDesign.class.getName()).log(Level.SEVERE, null, ex);\n\t\t}\n\n\t}",
"public void createTable(String tableName) {\n //SQL Statement\n String query = \"call aTable\";\n\n try {\n //connection\n stmt = con.createStatement();\n //execute query\n stmt.executeUpdate(query);\n System.out.println(\"\\n--Table \" + tableName + \" created--\");\n } catch (SQLException ex) {\n System.out.println(\"\\n--Query did not execute--\");\n ex.printStackTrace();\n }\n }",
"public void updateSelectedTable() {\n if (this.getSelectedTable().getTbl_name() != null) {\n //TableList temp = new TableList();\n \n fetchLoginDetails();\n this.setMsg(\"Created !! \");\n //this.getColumnList().clear();\n System.out.println(\"net.colstore.web.mbeans.TableManagerBean.createNewTable().selectedTbUpdated :: \" + this.getColumnList().size());\n TblListDAO tbdao = new TblListDAO();\n this.setSelectedTable(tbdao.getTblDetails(selectedTable.getTbl_name()));\n //temp.setDb_id(this.getSelectedDb().getId());\n //temp.setTbl_name(this.getNewTable().getTbl_name().replaceAll(\" \", \"\"));\n //temp.setNo_of_col(0);\n //DBHandler dbHandler = new DBHandler();\n /*if (dbHandler.createTable(this.getUserId(), this.getSelectedDb().getDb_name(), temp.getTbl_name())) {\n TblListDAO tbldao = new TblListDAO();\n boolean flag = tbldao.createNewTable(temp);\n TableList temp2=tbldao.getTblDetails(temp.getTbl_name());\n for (ColList c : this.getColumnList()) {\n ColListDAO coldao=new ColListDAO();\n c.setTbl_id(temp2.getId());\n coldao.createNewColumn(c);\n dbHandler.createColumn(this.getUserId(), this.getSelectedDb().getDb_name(), temp.getTbl_name(), c.getCol_name());\n System.out.println(\"net.colstore.web.mbeans.TableManagerBean.createNewTable() :: \" + c.toString());\n }\n boolean s_flag=dbHandler.buildSchema(this.getUserId(), this.getSelectedDb().getDb_name(), temp.getTbl_name(),this.getColumnList());\n System.out.println(\"net.colstore.web.mbeans.TableManagerBean.createNewTable() :: Schema Creation Status :: \"+s_flag);\n this.getNewTable().setTbl_name(\"\");\n this.setMsg(\"Created !! \" + flag);\n } else {\n this.getNewTable().setTbl_name(\"\");\n this.setMsg(\"Table Creation failed.\");\n }*/\n\n //this.getNewTable().setTbl_name(\"\");\n //this.getColumnList().clear();\n\n } else {\n //this.setMsg(\"Select Database\");\n //this.getNewTable().setTbl_name(\"\");\n //this.getColumnList().clear();\n }\n\n }",
"private void statsTable() {\n try (Connection connection = hikari.getConnection()) {\n try (PreparedStatement statement = connection.prepareStatement(\"CREATE TABLE IF NOT EXISTS `\" + TABLE_STATS + \"` \" +\n \"(id INT NOT NULL AUTO_INCREMENT UNIQUE, \" +\n \"uuid varchar(255) PRIMARY KEY, \" +\n \"name varchar(255), \" +\n \"kitSelected varchar(255), \" +\n \"points INT, \" +\n \"kills INT, \" +\n \"deaths INT, \" +\n \"killstreaks INT, \" +\n \"currentKillStreak INT, \" +\n \"inGame BOOLEAN)\")) {\n statement.execute();\n statement.close();\n connection.close();\n }\n } catch (SQLException e) {\n LogHandler.getHandler().logException(\"TableCreator:statsTable\", e);\n }\n }",
"public void formDatabaseTable() {\n }",
"public static void createTable() {\n\n // Create statement\n Statement statement = null;\n try {\n statement = Database.getDatabase().getConnection().createStatement();\n } catch (SQLException e) {\n e.printStackTrace();\n }\n\n // Attempt to create table\n try {\n statement.execute(\n \"CREATE TABLE \" + Constants.SANITATION_TABLE + \"(\" +\n \"requestID INT PRIMARY KEY GENERATED ALWAYS AS IDENTITY (START WITH 1, INCREMENT BY 1),\" +\n \"nodeID VARCHAR(100) References \" + Constants.LOCATION_TABLE + \" (nodeID), \" +\n \"priority VARCHAR(10), \" +\n \"status VARCHAR(100), \" +\n \"description VARCHAR(100), \" +\n \"requesterID INT REFERENCES \" + Constants.USERS_TABLE + \"(userID), \" +\n \"requestTime TIMESTAMP, \" +\n \"servicerID INT REFERENCES \" + Constants.USERS_TABLE + \"(userID), \" +\n \"claimedTime TIMESTAMP, \" +\n \"completedTime TIMESTAMP, \" +\n \"CONSTRAINT priority_enum CHECK (priority in ('LOW', 'MEDIUM', 'HIGH')), \" +\n \"CONSTRAINT status_enum CHECK (status in ('INCOMPLETE', 'COMPLETE')))\"\n );\n } catch (SQLException | NullPointerException e) {\n e.printStackTrace();\n }\n }",
"private void creates() {\n \tDBPeer.fetchTableColumns();\n \tDBPeer.fetchTableRows();\n \tDBPeer.fetchTableIndexes();\n \t\n for (int i = 0; i < creates.size(); i++) {\n creates.get(i).init();\n }\n \n DBPeer.updateTableColumns();\n DBPeer.updateTableRows();\n DBPeer.updateTableIndexes();\n }",
"private void createTable() {\n try (Statement st = this.conn.createStatement()) {\n st.execute(\"CREATE TABLE IF NOT EXISTS users (user_id SERIAL PRIMARY KEY, name VARCHAR(100) NOT NULL, \"\n + \"login VARCHAR(100) UNIQUE NOT NULL, email VARCHAR(100) NOT NULL, createDate TIMESTAMP NOT NULL);\");\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }",
"public boolean createAllTables (){\n try {\n this.execute(CREATE_PEOPLE);\n this.execute(CREATE_AUTHOR);\n this.execute(CREATE_EMPLOYEE);\n this.execute(CREATE_MEETING);\n this.execute(CREATE_COVERPRICE);\n this.execute(CREATE_PRICEPARAMETERS);\n this.execute(CREATE_ORDER);\n this.execute(CREATE_CORRECTIONS);\n this.execute(CREATE_BOOK);\n this.execute(CREATE_COVERLINK);\n return true;\n } catch (SQLException | IOException | ClassNotFoundException e) {\n log.error(e);\n return false;\n }\n }",
"@Before\n public void createAndFillTable() {\n try {\n DBhandler dBhandler = new DBhandler(h2DbConnection);\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n }",
"TableInstance createTableInstance();",
"@Test\n public void testPrueba() {\n try {\n conn.createStatement().executeQuery(\"SELECT * FROM prueba\");\n System.out.println(Colors.toGreen(\"[OK]\") + \" Table prueba exists.\");\n } catch (SQLException e) {\n System.out.println(Colors.toYellow(\"[WARNING]\") + \" Table 'prueba' does not exist, needed by ServerTest!!\");\n System.out.println(Colors.toBlue(\"[INFO]\") + \" Table prueba will be created.\");\n try {\n conn.createStatement().executeUpdate(\"CREATE TABLE prueba (id INT AUTO_INCREMENT PRIMARY KEY, nombre VARCHAR(255))\");\n System.out.println(Colors.toGreen(\"[OK]\") + \" Table prueba created.\");\n } catch (SQLException e1) {\n System.out.println(Colors.toRed(\"[FAIL]\") + \" Table prueba could not be created.\");\n System.out.println(Colors.toBlue(\"[INFO]\") + \" Create it manually by running: CREATE TABLE prueba (id INT AUTO_INCREMENT PRIMARY KEY, nombre VARCHAR(255))\");\n Assert.fail(e1.getMessage());\n }\n }\n }",
"@Test\n public void testTableFactoryCreateNoOtherTables() {\n TableController tableController = tableFactory.getTableController();\n tableController.addTable(2);\n assertNull(tableController.getTableMap().get(1));\n assertNotNull(tableController.getTableMap().get(2));\n assertNull(tableController.getTableMap().get(3));\n }",
"private void processCreateTable(int type) throws HsqlException {\n\n String token = tokenizer.getName();\n HsqlName schemaname =\n session.getSchemaHsqlNameForWrite(tokenizer.getLongNameFirst());\n\n database.schemaManager.checkUserTableNotExists(session, token,\n schemaname.name);\n\n boolean isnamequoted = tokenizer.wasQuotedIdentifier();\n int[] pkCols = null;\n int colIndex = 0;\n boolean constraint = false;\n Table t = newTable(type, token, isnamequoted, schemaname);\n\n tokenizer.getThis(Token.T_OPENBRACKET);\n\n while (true) {\n token = tokenizer.getString();\n\n switch (Token.get(token)) {\n\n case Token.CONSTRAINT :\n case Token.PRIMARY :\n case Token.FOREIGN :\n case Token.UNIQUE :\n case Token.CHECK :\n\n // fredt@users : check for quoted reserved words used as column names\n constraint = !tokenizer.wasQuotedIdentifier()\n && !tokenizer.wasLongName();\n }\n\n tokenizer.back();\n\n if (constraint) {\n break;\n }\n\n Column newcolumn = processCreateColumn();\n\n t.addColumn(newcolumn);\n\n if (newcolumn.isPrimaryKey()) {\n Trace.check(pkCols == null, Trace.SECOND_PRIMARY_KEY,\n newcolumn.columnName.name);\n\n pkCols = new int[]{ colIndex };\n }\n\n token = tokenizer.getSimpleToken();\n\n if (token.equals(Token.T_COMMA)) {\n colIndex++;\n\n continue;\n }\n\n if (token.equals(Token.T_CLOSEBRACKET)) {\n break;\n }\n\n throw Trace.error(Trace.UNEXPECTED_TOKEN, token);\n }\n\n HsqlArrayList tempConstraints = processCreateConstraints(t,\n constraint, pkCols);\n\n if (tokenizer.isGetThis(Token.T_ON)) {\n if (!t.isTemp) {\n throw Trace.error(Trace.UNEXPECTED_TOKEN, Token.T_ON);\n }\n\n tokenizer.getThis(Token.T_COMMIT);\n\n token = tokenizer.getSimpleToken();\n\n if (token.equals(Token.T_DELETE)) {}\n else if (token.equals(Token.T_PRESERVE)) {\n t.onCommitPreserve = true;\n } else {\n throw Trace.error(Trace.UNEXPECTED_TOKEN, token);\n }\n\n tokenizer.getThis(Token.T_ROWS);\n }\n\n try {\n session.commit();\n\n Constraint primaryConst = (Constraint) tempConstraints.get(0);\n\n t.createPrimaryKey(null, primaryConst.core.mainColArray, true);\n\n if (primaryConst.core.mainColArray != null) {\n if (primaryConst.constName == null) {\n primaryConst.constName = t.makeSysPKName();\n }\n\n Constraint newconstraint =\n new Constraint(primaryConst.constName, t,\n t.getPrimaryIndex(),\n Constraint.PRIMARY_KEY);\n\n t.addConstraint(newconstraint);\n database.schemaManager.registerConstraintName(\n primaryConst.constName.name, t.getName());\n }\n\n for (int i = 1; i < tempConstraints.size(); i++) {\n Constraint tempConst = (Constraint) tempConstraints.get(i);\n\n if (tempConst.constType == Constraint.UNIQUE) {\n TableWorks tableWorks = new TableWorks(session, t);\n\n tableWorks.createUniqueConstraint(\n tempConst.core.mainColArray, tempConst.constName);\n\n t = tableWorks.getTable();\n }\n\n if (tempConst.constType == Constraint.FOREIGN_KEY) {\n TableWorks tableWorks = new TableWorks(session, t);\n\n tableWorks.createForeignKey(tempConst.core.mainColArray,\n tempConst.core.refColArray,\n tempConst.constName,\n tempConst.core.refTable,\n tempConst.core.deleteAction,\n tempConst.core.updateAction);\n\n t = tableWorks.getTable();\n }\n\n if (tempConst.constType == Constraint.CHECK) {\n TableWorks tableWorks = new TableWorks(session, t);\n\n tableWorks.createCheckConstraint(tempConst,\n tempConst.constName);\n\n t = tableWorks.getTable();\n }\n }\n\n database.schemaManager.linkTable(t);\n } catch (HsqlException e) {\n\n// fredt@users 20020225 - comment\n// if a HsqlException is thrown while creating table, any foreign key that has\n// been created leaves it modification to the expTable in place\n// need to undo those modifications. This should not happen in practice.\n database.schemaManager.removeExportedKeys(t);\n database.schemaManager.removeIndexNames(t.tableName);\n database.schemaManager.removeConstraintNames(t.tableName);\n\n throw e;\n }\n }",
"public boolean createTable(String input) throws IOException{\n\t\tString orgQuery = input;\n\t\torgQuery = orgQuery.trim();\n\t\tString query = input.toLowerCase().trim();\n\t\tboolean queryFailed = false;\n\t\t//Schema Instance \n\t\tSchema currentSchema = Schema.getSchemaInstance();\n\t\tString currentSchemaName = currentSchema.getCurrentSchema();\n\n\t\t//TableSchemaManager Instance\n\t\tTableSchemaManager currentTableSchemaManager = TableSchemaManager.getTableSchemaManagerInstance();\n\n\t\t//Extracting Table name\n\t\ttableName = orgQuery.substring(query.indexOf(\"table \")+6,query.indexOf(\"(\")).trim();\n\n\t\t//Updating SCHEMA.TABLE.TBL\n\t\tif(updateInformationSchemaTable()){\n\t\t\tqueryFailed = true;\n\t\t\treturn queryFailed;\n\t\t}\n\n\t\t//Extracting Table contents\n\t\tString tableContentsWithQuotes = orgQuery.substring(orgQuery.indexOf(\"(\")+1,orgQuery.length());\n\t\tString tableContents = tableContentsWithQuotes.replace(\"))\", \")\");\n\t\ttableContents = tableContents.trim();\n\n\t\tTableSchemaManager.ordinalMap = new TreeMap<Integer,List<String>>();\n\t\tTableSchemaManager.tableMap = new TreeMap<String,TreeMap<Integer,List<String>>>();\n\t\t\n\t\t//Creating n instances of Table helper\n\t\tString[] createTableContents = tableContents.split(\"\\\\,\"); \n\t\tnoOfColumns = createTableContents.length;\n\t\tCreateTableHelper[] th = new CreateTableHelper[noOfColumns];\n\n\t\t\n\t\t//Handles single row of Create Table \n\t\tfor(int item = 0; item < noOfColumns ; item++){\n\t\t\tth[item] = new CreateTableHelper(); \n\t\t\t//To remove any leading or trailing spaces\n\t\t\tcreateTableContents[item] = createTableContents[item].trim();\n\t\t\tString columnName = createTableContents[item].substring(0, createTableContents[item].indexOf(\" \"));\n\t\t\tth[item].setColumnName(columnName);\n\n\t\t\t//Setting Primary Key\n\t\t\tString primaryKeyExp = \"(.*)[pP][rR][iI][mM][aA][rR][yY](.*)\";\n\t\t\tif (createTableContents[item].matches(primaryKeyExp))\n\t\t\t\tth[item].setPrimaryKey(true);\n\t\t\telse\n\t\t\t\tth[item].setPrimaryKey(false);\n\n\t\t\t//Setting Null Value\t\n\t\t\tString notNullExp = \"(.*)[nN][uU][lL][lL](.*)\";\n\t\t\tif (createTableContents[item].matches(notNullExp))\n\t\t\t\tth[item].setNull(true);\n\t\t\telse\n\t\t\t\tth[item].setNull(false);\n\n\t\t\t//Extracting data types \n\t\t\t//BYTE\n\t\t\tString byteExp = \"(.*)[bB][yY][tT][eE](.*)\";\n\t\t\tif (createTableContents[item].matches(byteExp)){\n\t\t\t\tth[item].setDataType(\"BYTE\");\n\t\t\t}\n\t\t\t//SHORT\n\t\t\tString shortExp = \"(.*)[sS][hH][oO][rR][tT](.*)\";\n\t\t\tif (createTableContents[item].matches(shortExp)){\n\t\t\t\tth[item].setDataType(\"SHORT\");\n\t\t\t}\n\t\t\t//INT\n\t\t\tString intExp = \"(.*)[iI][nN][tT](.*)\";\n\t\t\tif (createTableContents[item].matches(intExp)){\n\t\t\t\tth[item].setDataType(\"INT\");\n\t\t\t}\n\t\t\t//LONG\n\t\t\tString longExp = \"(.*)[lL][oO][nN][gG](.*)\";\n\t\t\tif (createTableContents[item].matches(longExp)){\n\t\t\t\tth[item].setDataType(\"LONG\");\n\t\t\t}\n\t\t\t//CHAR\n\t\t\tString charExp = \"(.*)[cC][hH][aA][rR](.*)\";\n\t\t\tif (createTableContents[item].matches(charExp)){\n\t\t\t\tString size = createTableContents[item].substring(createTableContents[item].indexOf(\"(\")+1, createTableContents[item].indexOf(\")\"));\n\t\t\t\tth[item].setDataType(\"CHAR(\" + size + \")\");\n\t\t\t}\n\t\t\t//VARCHAR\n\t\t\tString varcharExp = \"(.*)[vV][aA][rR][cC][hH][aA][rR](.*)\";\n\t\t\tif (createTableContents[item].matches(varcharExp)){\n\t\t\t\tString size = createTableContents[item].substring(createTableContents[item].indexOf(\"(\")+1, createTableContents[item].indexOf(\")\"));\n\t\t\t\tth[item].setDataType(\"VARCHAR(\" + size + \")\");\n\t\t\t}\n\t\t\t//FLOAT\n\t\t\tString floatExp = \"(.*)[fF][lL][oO][aA][tT](.*)\";\n\t\t\tif (createTableContents[item].matches(floatExp)){\n\t\t\t\tth[item].setDataType(\"FLOAT\");\t\t\t\t\n\t\t\t}\n\t\t\t//DOUBLE\n\t\t\tString doubleExp = \"(.*)[dD][oO][uU][bB][lL][eE](.*)\";\n\t\t\tif (createTableContents[item].matches(doubleExp)){\n\t\t\t\tth[item].setDataType(\"DOUBLE\");\n\t\t\t}\n\t\t\t//DATETIME\n\t\t\tString dateTimeExp = \"(.*)[dD][aA][tT][eE][tT][iI][mM][eE](.*)\";\n\t\t\tif (createTableContents[item].matches(dateTimeExp)){\n\t\t\t\tth[item].setDataType(\"DATETIME\");\n\t\t\t}\n\t\t\t//DATE\n\t\t\tString dateExp = \"(.*)[dD][aA][tT][eE](.*)\";\n\t\t\tif (createTableContents[item].matches(dateExp)){\n\t\t\t\tth[item].setDataType(\"DATE\");\n\t\t\t}\n\n\t\t\tcurrentTableSchemaManager.newTableSchema(\n\t\t\t\t\ttableName,\n\t\t\t\t\titem,\n\t\t\t\t\tth[item].getColumnName(),\n\t\t\t\t\tth[item].getDataType(),\n\t\t\t\t\tth[item].isNull(),\n\t\t\t\t\tth[item].isPrimaryKey()\n\t\t\t\t\t);\n\n\t\t\t//Updating SCHEMA.COLUMNS.TBL\n\t\t\tupdateInformationSchemaColumn(\n\t\t\t\t\tth[item].getColumnName(),\n\t\t\t\t\titem,\n\t\t\t\t\tth[item].getDataType(),\n\t\t\t\t\tth[item].isNull(),\n\t\t\t\t\tth[item].isPrimaryKey()\n\t\t\t\t\t);\n\t\t\t//Create tables to insert index\n\t\t\tString newTableIndexName = currentSchemaName + \".\" + tableName + \".\" +th[item].getColumnName()+ \".tbl.ndx\";\n\t\t\tRandomAccessFile newTableIndexFile = new RandomAccessFile(newTableIndexName, \"rw\");\n\t\t\tnewTableIndexFile.close();\n\n\t\t}\n\n\t\tTableSchemaManager.tableMap.put(tableName, TableSchemaManager.ordinalMap);\n\t\tcurrentTableSchemaManager.updateTableSchema(currentSchemaName,tableName);\n\t\t\n\t\t//Create tables to insert data \n\t\tString newTableDataName = currentSchemaName + \".\" + tableName + \".tbl\";\n\t\tRandomAccessFile newTableDataFile = new RandomAccessFile(newTableDataName, \"rw\");\n\t\tnewTableDataFile.close();\n\t\treturn queryFailed;\n\t}",
"public void createTable() {\n try {\n tableLayout = findViewById(R.id.tabla);\n tb = new TableDinamic(tableLayout, getApplicationContext(), \"cargarDetalle\", clc, cap_1, cap_2, cap_ct, txtidReg, txtId, txtBloque, txtVariedad);\n tableLayout.removeAllViews();\n tb.addHeader(header);\n tb.addData(cargarTabla());\n tb.backgroundHeader(\n Color.parseColor(\"#20C0FF\")\n );\n tb.backgroundData(\n Color.parseColor(\"#FFFFFF\"),\n Color.parseColor(\"#81F0EDED\")\n );\n } catch (Exception e) {\n Toast.makeText(this, \"Error de la table: \" + e.toString(), Toast.LENGTH_LONG).show();\n }\n }",
"private void createTables() {\n\n\t\tAutoDao.createTable(db, true);\n\t\tAutoKepDao.createTable(db, true);\n\t\tMunkaDao.createTable(db, true);\n\t\tMunkaEszkozDao.createTable(db, true);\n\t\tMunkaKepDao.createTable(db, true);\n\t\tMunkaTipusDao.createTable(db, true);\n\t\tPartnerDao.createTable(db, true);\n\t\tPartnerKepDao.createTable(db, true);\n\t\tProfilKepDao.createTable(db, true);\n\t\tSoforDao.createTable(db, true);\n\t\tTelephelyDao.createTable(db, true);\n\t\tPushMessageDao.createTable(db, true);\n\n\t}",
"@Override\n public void createTable() {\n String[] TABLE_COLUMNS_ATLAS = {\n TableColumn.ChecklistTable.CID + \" INTEGER PRIMARY KEY AUTOINCREMENT\",\n TableColumn.ChecklistTable.PID + \" INTEGER NOT NULL\",\n TableColumn.ChecklistTable.REAL + \" INTEGER DEFAULT 0\",\n TableColumn.ChecklistTable.UNIT_ID + \" INTEGER\",\n TableColumn.ChecklistTable.WAREHOUSE_ID + \" INTEGER\",\n TableColumn.ChecklistTable.QUEUE_ID + \" INTEGER\",\n TableColumn.ChecklistTable.CATEGORIES_ID + \" INTEGER\",\n TableColumn.ChecklistTable.DATE + \" DATE\",\n TableColumn.ChecklistTable.RECORDTIME + \" DATE\",\n TableColumn.ChecklistTable.CONFIRM + \" INTEGER DEFAULT 0\"\n };\n\n //TODO: create table\n database.execSQL(makeSQLCreateTable(TABLE_NAME, TABLE_COLUMNS_ATLAS));\n\n addColumn(TableColumn.ChecklistTable.CONFIRM, \" INTEGER DEFAULT 0\");\n\n //TODO: show table\n XCursor cursor = selectTable();\n printData(TABLE_NAME, cursor);\n cursor.close();\n }",
"private void createStressTestStatusTable() {\n Column runId = new Column(\"RUN_ID\");\n runId.setMappedType(\"INTEGER\");\n runId.setPrimaryKey(true);\n runId.setRequired(true);\n Column nodeId = new Column(\"NODE_ID\");\n nodeId.setMappedType(\"VARCHAR\");\n nodeId.setPrimaryKey(true);\n nodeId.setRequired(true);\n nodeId.setSize(\"50\");\n Column status = new Column(\"STATUS\");\n status.setMappedType(\"VARCHAR\");\n status.setSize(\"10\");\n status.setRequired(true);\n status.setDefaultValue(\"NEW\");\n Column startTime = new Column(\"START_TIME\");\n startTime.setMappedType(\"TIMESTAMP\");\n Column endTime = new Column(\"END_TIME\");\n endTime.setMappedType(\"TIMESTAMP\");\n\n Table table = new Table(STRESS_TEST_STATUS, runId, nodeId, status, startTime, endTime);\n\n engine.getDatabasePlatform().createTables(true, true, table);\n }",
"public static void createEmployees() {\n Connection con = getConnection();\n\n String createString;\n createString = \"create table Employees (\" +\n \"Employee_ID INTEGER, \" +\n \"Name VARCHAR(30))\";\n try {\n stmt = con.createStatement();\n stmt.executeUpdate(createString);\n stmt.close();\n con.close();\n\n } catch (SQLException ex) {\n System.err.println(\"SQLException: \" + ex.getMessage());\n }\n JOptionPane.showMessageDialog(null, \"Employees Table Created\");\n }",
"@Override\n\tpublic void createTable() {\n\t\tSystem.out.println(\"++++++++++++++++++++++++++++++++++++++++++++++\");\n\t\ttry {\n\t\t\tTableUtils.createTable(connectionSource, UserEntity.class);\n\t\t\tTableUtils.createTable(connectionSource, Downloads.class);\n\t\t} catch (SQLException e) {\n\t\t\tSystem.out.println(\"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\");\n\t\t}\n\t}",
"public void createNewTable(String dbName, String tableName) {\r\n\t\t// SQL statement for creating a new table\r\n\t\tString sql = \"CREATE TABLE IF NOT EXISTS \" + tableName + \" (\\n\"\r\n\t\t\t\t+ \"id integer PRIMARY KEY,\\n\"\r\n\t\t\t\t+ \"first_name VARCHAR(20) NOT NULL,\\n\"\r\n\t\t\t\t+ \"last_name VARCHAR(20) NOT NULL,\\n\"\r\n\t\t\t\t+ \"manager_id integer NOT NULL,\\n\"\r\n\t\t\t\t+ \"join_date DATE NOT NULL,\\n\"\r\n\t\t\t\t+ \"billable_hours double NOT NULL);\";\r\n\t\t\r\n\t\ttry {\r\n\t\t\tConnection conn = this.connect(dbName);\t\t\t// open connection\r\n\t\t\t\r\n\t\t\tStatement stmt = conn.createStatement();\r\n\t\t\t\r\n\t\t\t// create a new table using prepared sql statement\r\n\t\t\tstmt.execute(sql);\r\n\t\t\tSystem.out.println(\"Executed create table statement\");\r\n\t\t\t\r\n\t\t\tconn.close();\t\t\t\t\t\t\t\t\t// close connection\r\n\t\t} catch (SQLException e) {\r\n\t\t\tSystem.out.println(e.getMessage());\r\n\t\t}\r\n\t}",
"public static Connection createTables() {\n\t \n\t Statement stmt = null;\n\t int result = 0;\n\t \n\t try {\n\t \t Connection connection = getConnection();\n\t \t \n\t \t try {\n\t \t stmt = connection.createStatement();\n\t \t \n\t \t result = stmt.executeUpdate(\"\"\n\t \t \t\t\n\t \t \t\t// Creating form table\n\t \t \t\t+ \"CREATE TABLE IF NOT EXISTS form (\"\n\t \t \t\t+ \"form_version VARCHAR(50),\"\n\t \t \t\t+ \"form_name VARCHAR(50) NOT NULL,\"\n\t \t \t\t+ \"field_id INT NOT NULL,\"\n\t \t \t\t+ \"field_value VARCHAR(50) NOT NULL,\"\n\t \t \t\t+ \"CONSTRAINT PK_form PRIMARY KEY (form_version, field_id)); \"\n\t \t \t\t\n\t \t \t\t// Creating template_fields table\n\t \t \t\t+ \"CREATE TABLE IF NOT EXISTS template_fields (\"\n\t \t \t\t+ \"field_id INT NOT NULL,\"\n\t \t \t\t+ \"form_name VARCHAR(50) NOT NULL,\"\n\t \t \t\t+ \"field_name VARCHAR(50) NOT NULL,\"\n\t \t \t\t+ \"field_value VARCHAR(50) NOT NULL,\"\n\t \t \t\t+ \"field_type VARCHAR(50) NOT NULL,\"\n\t \t \t\t+ \"field_mandatory VARCHAR(50) NOT NULL,\"\n\t \t \t\t+ \"CONSTRAINT PK_field PRIMARY KEY (field_id,form_name)); \"\n\t \t \t\t\n\t \t \t\t// Creating radio_fields table\n\t \t \t\t+ \"CREATE TABLE IF NOT EXISTS radio_fields (\"\n\t \t \t\t+ \"radio_id INTEGER IDENTITY PRIMARY KEY,\"\n\t \t \t\t+ \"field_id INTEGER NOT NULL,\"\n\t \t \t\t+ \"form_name VARCHAR(50) NOT NULL,\"\n\t \t \t\t+ \"radio_value VARCHAR(50) NOT NULL,\"\n\t \t \t\t+ \"UNIQUE(field_id, radio_value, form_name)); \"\n\t \t \t\t\n\t \t \t\t//Creating template_fields_options table\n\t \t \t\t+ \"CREATE TABLE IF NOT EXISTS template_fields_options (\"\n\t \t \t\t+ \"option_id INTEGER IDENTITY PRIMARY KEY,\"\n\t \t \t\t+ \"option_value VARCHAR(50) NOT NULL); \"\n\t \t \t\t+ \"\");\n\t \t \n\t \t connection.close();\n\t \t stmt.close();\n\t \t } catch (SQLException e) {\n\t e.printStackTrace();\n\t \t }\n\t \t System.out.println(\"Tables created successfully\");\n\t \t return connection;\n\t \t \n\t }\n\t catch (Exception e) {\n\t e.printStackTrace();\n\t return null;\n\t \n\t }\n\t}",
"@Override\r\n\tpublic int createTable() {\r\n\r\n\t\tSystem.out\r\n\t\t\t\t.println(\"--This method returns an integer containing the number of rows\");\r\n\t\tSystem.out.println(\"--that were created.\");\r\n\r\n\t\tif (!doesGroupsTableExist()) {\r\n\t\t\tJOptionPane\r\n\t\t\t\t\t.showMessageDialog(null,\r\n\t\t\t\t\t\t\t\"Error: Table 'groups' does not exist! A new table will be created now.\");\r\n\r\n\t\t\t// Variable Declarations\r\n\t\t\tConnection conn = null;\r\n\t\t\tPreparedStatement stmt = null;\r\n\r\n\t\t\tint rows = 0;\r\n\r\n\t\t\ttry {\r\n\r\n\t\t\t\t// Connect to Database\r\n\t\t\t\tClass.forName(JDBC_DRIVER);\r\n\t\t\t\tconn = DriverManager.getConnection(DATABASE, USER, PASS);\r\n\r\n\t\t\t\t// Create SQL Statement\r\n\t\t\t\tString sql = \"CREATE TABLE IF NOT EXISTS groups\"\r\n\t\t\t\t\t\t+ \"('id' INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,\"\r\n\t\t\t\t\t\t+ \"'name' VARCHAR NOT NULL,\"\r\n\t\t\t\t\t\t+ \"'created' DATETIME NOT NULL,\"\r\n\t\t\t\t\t\t+ \"'modified' DATETIME)\";\r\n\r\n\t\t\t\tstmt = conn.prepareStatement(sql);\r\n\t\t\t\trows = stmt.executeUpdate();\r\n\r\n\t\t\t\t// Close Query and Database Connection\r\n\t\t\t\tstmt.close();\r\n\t\t\t\tconn.close();\r\n\r\n\t\t\t} catch (SQLException se) {\r\n\t\t\t\t// Handle Errors for JDBC\r\n\t\t\t\tse.printStackTrace();\r\n\t\t\t} catch (Exception ex) {\r\n\t\t\t\t// Handle Errors for Class\r\n\t\t\t\tex.printStackTrace();\r\n\t\t\t} finally {\r\n\r\n\t\t\t\t// Close Resources\r\n\t\t\t\ttry {\r\n\t\t\t\t\tif (stmt != null)\r\n\t\t\t\t\t\tstmt.close();\r\n\t\t\t\t} catch (SQLException se2) {\r\n\t\t\t\t\tse2.printStackTrace();\r\n\t\t\t\t}\r\n\r\n\t\t\t\ttry {\r\n\t\t\t\t\tif (conn != null)\r\n\t\t\t\t\t\tconn.close();\r\n\t\t\t\t} catch (SQLException se) {\r\n\t\t\t\t\tse.printStackTrace();\r\n\t\t\t\t} // End Finally Try/Catch\r\n\t\t\t} // End Try/Catch\r\n\r\n\t\t\treturn rows;\r\n\t\t} else {\r\n\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t}",
"public void createTableUser(){\r\n Statement stmt;\r\n try {\r\n stmt = this.getConn().createStatement();\r\n ///////////////*********remember to retrieve*************/////////////\r\n //stmt.executeUpdate(\"create table user(username VARCHAR(40),email VARCHAR(40), password int);\");\r\n //stmt.executeUpdate(\"INSERT INTO user VALUES('A','[email protected]',12344);\");\r\n //stmt.executeUpdate(\"INSERT INTO user VALUES('CC','[email protected]',3231);\");\r\n } catch (SQLException e) { e.printStackTrace();}\r\n }",
"public String createTable(){\r\n return \"CREATE TABLE Doctor \" +\r\n \"(idDoctor decimal primary key, \" +\r\n \"firstNameDoctor char(14), \" +\r\n \"lastNameDoctor char(14), \" +\r\n \"costPerVisit integer,\" +\r\n \"qualification varchar(32))\";\r\n }",
"@Override\n\tpublic String createTable() {\n\t\t\t\treturn \"CREATE TABLE history_table_view(id number(8) primary key not null ,sqltext text, pointid varchar2(1024), type varchar2(100))\";\n\t}",
"public void createTables(){\n Map<String, String> name_type_map = new HashMap<>();\n List<String> primaryKey = new ArrayList<>();\n try {\n name_type_map.put(KEY_SINK_NAME, MyDatabase.TYPE_VARCHAR);\n name_type_map.put(KEY_SINK_ADDRESS, MyDatabase.TYPE_VARCHAR);\n name_type_map.put(KEY_SINK_DETAIL, MyDatabase.TYPE_VARCHAR);\n primaryKey.add(KEY_SINK_ADDRESS);\n myDatabase.createTable(TABLE_SINK, name_type_map, primaryKey, null);\n }catch (MySQLException e){ //数据表已存在\n e.print();\n }\n try {\n name_type_map.clear();\n name_type_map.put(KEY_NODE_NAME, MyDatabase.TYPE_VARCHAR);\n name_type_map.put(KEY_NODE_PARENT, MyDatabase.TYPE_VARCHAR);\n name_type_map.put(KEY_NODE_DETAIL, MyDatabase.TYPE_VARCHAR);\n name_type_map.put(KEY_NODE_ADDRESS,MyDatabase.TYPE_VARCHAR);\n primaryKey.clear();\n primaryKey.add(KEY_NODE_PARENT);\n primaryKey.add(KEY_NODE_ADDRESS);\n myDatabase.createTable(TABLE_NODE, name_type_map, primaryKey, null);\n }catch (MySQLException e){\n e.print();\n }\n\n try {\n name_type_map.clear();\n name_type_map.put(KEY_NODE_ADDRESS, MyDatabase.TYPE_VARCHAR);\n name_type_map.put(KEY_NODE_PARENT, MyDatabase.TYPE_VARCHAR);\n name_type_map.put(KEY_DATA_TIME, MyDatabase.TYPE_TIMESTAMP);\n name_type_map.put(KEY_DATA_VAL, MyDatabase.TYPE_FLOAT);\n primaryKey.clear();\n primaryKey.add(KEY_DATA_TIME);\n primaryKey.add(KEY_NODE_ADDRESS);\n primaryKey.add(KEY_NODE_PARENT);\n myDatabase.createTable(TABLE_DATA, name_type_map, primaryKey, null);\n }catch (MySQLException e) {\n e.print();\n }\n }",
"public void createDepartamentoTable() throws SQLException {\n\t\tString sql = \"create table departamento (piso int, depto varchar(100), expensas double,\ttitular varchar(100))\";\n\t\tConnection c = DBManager.getInstance().connect();\n\t\tStatement s = c.createStatement();\n\t\ts.executeUpdate(sql);\n\t\tc.commit();\n\t\t\t\n\t}",
"public void createTables()\n {\n String[] sqlStrings = createTablesStatementStrings();\n String sqlString;\n Statement statement;\n\n System.out.println(\"Creating table(s):\" +\n Arrays.toString(tableNames));\n for (int i=0; i<sqlStrings.length; i++)\n try\n {\n statement = connect.createStatement();\n\n sqlString = sqlStrings[i];\n\n System.out.println(\"SQL: \" + sqlString);\n\n statement.executeUpdate(sqlString);\n }\n catch (SQLException ex)\n {\n System.out.println(\"Error creating table: \" + ex);\n Logger.getLogger(DatabaseManagementDAO.class.getName()).log(Level.SEVERE, null, ex);\n }\n }",
"@Override\n\tpublic void onCreate(SQLiteDatabase sdb) {\n\t\tsdb.execSQL(CREATE_QUERY);\n\t\tLog.d(\"DB ops: \", \"Table Created \");\n\t}",
"public void createAccountTable() throws SQLException {\r\n\t\tConnection connection = dbAdministration.getConnection();\r\n\t\t// Prüfung, ob Tabelle bereits besteht\r\n\t\tResultSet resultSet = connection.getMetaData().getTables(\"%\", \"%\", \"%\", new String[] { \"TABLE\" });\r\n\t\tboolean shouldCreateTable = true;\r\n\t\twhile (resultSet.next() && shouldCreateTable) {\r\n\t\t\tif (resultSet.getString(\"TABLE_NAME\").equalsIgnoreCase(\"ACCOUNT\")) {\r\n\t\t\t\tshouldCreateTable = false;\r\n\t\t\t}\r\n\t\t}\r\n\t\tresultSet.close();\r\n\r\n\t\tif (shouldCreateTable) {\r\n\t\t\tStatement statement = connection.createStatement();\r\n\t\t\tString sql = \"CREATE table account (id int not null primary key, owner varchar(\"\r\n\t\t\t\t\t+ DatabaseAdministration.ownerLength + \") not null, number varchar(4) not null)\";\r\n\t\t\t// Tabelle wird erstellt\r\n\t\t\tstatement.execute(sql);\r\n\t\t\tstatement.close();\r\n\t\t\tlogger.info(\"SQL-Statement ausgeführt: \" + sql);\r\n\t\t\tlogger.info(\"Tabelle \\\"Account\\\" wurde erstellt.\");\r\n\t\t\tbankAccountExists = false;\r\n\t\t\t// Das Bank-Konto wird angelegt\r\n\t\t\taddAccount(\"0000\", \"BANK\", BigDecimal.ZERO);\r\n\t\t\tbankAccountExists = true;\r\n\t\t}\r\n\t\tconnection.close();\r\n\t}",
"public void onCreate() {\r\n\t\tcreatorClass.onCreate(table);\r\n\t}",
"protected void createTable(String query) {\n\t\t// no check in method for exists\n\t\ttry {\n\t\t\tStatement stat = conn.createStatement();\n\t\t\tstat.executeUpdate(query);\n\t\t\tstat.close(); // check again closing stats/conns\n\t\t} catch (SQLException e) {\n\t\t\tSystem.out.println(\"Something went horribly wrong creating tables\\n\");\n\t\t\tSystem.out.println(\"Following statement was NOT executed:\\n\" + query);\n\t\t}\n\t}",
"protected void createLiveLessonTableForSignUp(String username) {\n Optional<LiveLessonTable> tableWithSameName=liveLessonDao.getAllLiveLessonTable().stream().filter(table -> table.getUsername().equals(username)).findAny();\n if(tableWithSameName.isPresent())\n return;\n liveLessonDao.saveLiveLessonTable(new LiveLessonTable(username, new ArrayList<LiveLesson>()));\n }",
"private void createDataTable() {\n jdbcTemplate.update(\"CREATE TABLE \" + IDaoEditors.TABLE + \" (ID INT IDENTITY PRIMARY KEY, NAME VARCHAR(150) NOT NULL UNIQUE)\");\n jdbcTemplate.update(\"CREATE TABLE \" + IDaoBooks.TABLE + \" (ID INT IDENTITY PRIMARY KEY, TITLE VARCHAR(150) NOT NULL UNIQUE, YEAR INT, ISBN10 VARCHAR(20), ISBN13 VARCHAR(13), NOTE INT, PAGES_NUMBER INT, RESUME VARCHAR(2000), THE_EDITOR_FK INT, THE_KIND_FK INT, THE_LANGUAGE_FK INT, THE_LENDING_FK INT, THE_SAGA_FK INT, THE_TYPE_FK INT)\");\n jdbcTemplate.update(\"CREATE TABLE \" + IDaoBooks.BOOKS_AUTHOR_TABLE + \" (THE_BOOK_FK INT NOT NULL, THE_AUTHOR_FK INT NOT NULL)\");\n\n jdbcTemplate.update(\"CREATE INDEX BOOK_EDITOR_IDX ON \" + IDaoEditors.TABLE + \"(ID)\");\n jdbcTemplate.update(\"CREATE INDEX BOOKS_IDX ON \" + IDaoBooks.TABLE + \"(ID)\");\n }",
"@Test\n public void create1Test1() throws SQLException {\n manager = new TableServizioManager(mockDb);\n manager.create1(false,false,false,false,false,false,false);\n Servizio servizio = manager.retriveById(5);\n assertNotNull(servizio,\"Should return true if create Servizio\");\n }",
"private void repopulateTableForAdd()\n {\n clearTable();\n populateTable(null);\n }",
"public static void createTable(SQLiteDatabase db, boolean ifNotExists) {\n String constraint = ifNotExists? \"IF NOT EXISTS \": \"\";\n db.execSQL(\"CREATE TABLE \" + constraint + \"\\\"HEALTH_RECORD__STATUS\\\" (\" + //\n \"\\\"_id\\\" INTEGER PRIMARY KEY ,\" + // 0: id\n \"\\\"UPDATE_TYPE\\\" TEXT,\" + // 1: updateType\n \"\\\"PERSON_ID\\\" TEXT UNIQUE ,\" + // 2: personId\n \"\\\"MACHINE_NO\\\" TEXT,\" + // 3: machineNo\n \"\\\"NAME\\\" TEXT,\" + // 4: name\n \"\\\"RECORD_RESULT_CODE\\\" TEXT,\" + // 5: recordResultCode\n \"\\\"RECORD_RESULT_DESC\\\" TEXT);\"); // 6: recordResultDesc\n }",
"int createTable(HbaseObj t);",
"@Override\n public void onCreate (SQLiteDatabase sqLiteDatabase){\n sqLiteDatabase.execSQL(\"create table if not exists \"+nama_table+\" (judul varchar(50) primary key, deskripsi varchar(50), priority varchar(50)) \");\n }",
"protected abstract void initialiseTable();",
"private EstabelecimentoTable() {\n\t\t\t}",
"@Override\n public Pipe execute(DBMS engine) throws DBxicException {\n engine.storManager.createTable(table);\n engine.catalog.saveCatalog();\n return new MessageThroughPipe(\"Table \" + table.getName() + \" successfully created\");\n }",
"private void createLoginTable() {\r\n jdbcExecutor.executeQuery(new Work() {\r\n @Override\r\n public void execute(Connection connection) throws SQLException {\r\n connection.createStatement().executeUpdate(\"CREATE TABLE login ( id numeric(19,0), user_id numeric(19,0), timestamp TIMESTAMP )\");\r\n }\r\n });\r\n }",
"private int createTable(ComboPooledDataSource cpds, String sql) throws SQLException {\n\t\tConnection con = cpds.getConnection();\n\t\tPreparedStatement pst = null;\n\n\t\t// Create table if not exist\n\t\tint tableCreated = -1;\n\t\ttry {\n\t\t\tpst = con.prepareStatement(sql);\n\t\t\tpst.executeUpdate();\n\t\t\ttableCreated = 1;\n\t\t} catch (SQLException exception) {\n\t\t\tif (exception.getSQLState().equals(\"X0Y32\")) {\n\t\t\t\ttableCreated = 0;\n\t\t\t}\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tif (pst != null) {\n\t\t\t\t\tpst.close();\n\t\t\t\t}\n\t\t\t} catch (Exception ignorable) {\n\t\t\t}\n\t\t}\n\t\treturn tableCreated;\n\t}",
"protected synchronized boolean createTable(Database db){\n\t\ttry {\n\t\t\treturn db.executeUpdate (\n\t\t\t\t\"CREATE TABLE \"+db.getDbSchema()+\".\" + DataTablePostalCode.Id + \" ( \" +\n\t\t\t\t\tfieldChar(\"postalId\", \"12\", \"0\", \"Key postalId\") +\n\t\t\t\t\tfieldChar(\"countryId\", \"12\", \"1\", \"CountryId\") +\n\t\t\t\t\tfieldChar(\"stateId\", \"12\", \"2\", \"StateId\") + \n\t\t\t\t\tfieldChar(\"cityId\", \"12\", \"3\", \"CityId\") +\n\t\t\t\t\tfieldChar(\"postalCode\", \"128\", \"4\", \"CountryId\") +\n\t\t\t\t\ttableAdditions(\"5\") + \n\t\t\t\t\t\"PRIMARY KEY (postalId)\" +\n\t\t\t\t\t\")\" + tableDriver(\"TABLE of Internal Postal Codes \"));\n\t\t\n\t\t} catch (Exception e) {\n\t\t\tLogger.log(DataTablePostalCode.class, e);\n\n\t\t} /* catch */\n\t\t\n\t\treturn false;\n\t}",
"public void createTable(){\r\n String tableStudent = \"CREATE TABLE tableStudent (\"+\r\n \"studentId INT primary key,\"+\"studentName TEXT,\"+\r\n \"className TEXT)\";\r\n db.execSQL(tableStudent);\r\n }",
"private void createTable() {\n table = new Table();\n table.bottom();\n table.setFillParent(true);\n }",
"protected void constructTable(Logger l, Statement s, int run)\n throws SQLException{\n createTable(s, run);\n insertResults(l,s,run);\n }",
"public static boolean checkOrCreateTable(jsqlite.Database db, String tableName){\n\t\t\n\t\tif (db != null){\n\t\t\t\n\t String query = \"SELECT name FROM sqlite_master WHERE type='table' AND name='\"+tableName+\"'\";\n\n\t boolean found = false;\n\t try {\n\t Stmt stmt = db.prepare(query);\n\t if( stmt.step() ) {\n\t String nomeStr = stmt.column_string(0);\n\t found = true;\n\t Log.v(\"SPATIALITE_UTILS\", \"Found table: \"+nomeStr);\n\t }\n\t stmt.close();\n\t } catch (Exception e) {\n\t Log.e(\"SPATIALITE_UTILS\", Log.getStackTraceString(e));\n\t return false;\n\t }\n\n\t\t\tif(found){\n\t\t\t\treturn true;\n\t\t\t}else{\n\t\t\t\t// Table not found creating\n Log.v(\"SPATIALITE_UTILS\", \"Table \"+tableName+\" not found, creating..\");\n\t\t\t\t\n if(tableName.equalsIgnoreCase(\"punti_accumulo_data\")){\n\n \tString create_stmt = \"CREATE TABLE 'punti_accumulo_data' (\" +\n \t\t\t\"'PK_UID' INTEGER PRIMARY KEY AUTOINCREMENT, \" +\n \t\t\t\"'ORIGIN_ID' TEXT, \" +\n \t\t\t\"'DATA_SCHEDA' TEXT, \" +\n \t\t\t\"'DATA_AGG' TEXT, \" +\n \t\t\t\"'NOME_RILEVATORE' TEXT, \" +\n \t\t\t\"'COGNOME_RILEVATORE' TEXT, \" +\n \t\t\t\"'ENTE_RILEVATORE' TEXT, \" +\n \t\t\t\"'TIPOLOGIA_SEGNALAZIONE' TEXT, \" +\n \t\t\t\"'PROVENIENZA_SEGNALAZIONE' TEXT, \" +\n \t\t\t\"'CODICE_DISCARICA' TEXT, \" +\n \t\t\t\"'TIPOLOGIA_RIFIUTO' TEXT, \" +\n \t\t\t\"'COMUNE' TEXT, \" +\n \t\t\t\"'LOCALITA' TEXT, \" +\n \t\t\t\"'INDIRIZZO' TEXT, \" +\n \t\t\t\"'CIVICO' TEXT, \" +\n \t\t\t\"'PRESA_IN_CARICO' TEXT, \" +\n \t\t\t\"'EMAIL' TEXT, \" +\n \t\t\t\"'RIMOZIONE' TEXT, \" +\n \t\t\t\"'SEQUESTRO' TEXT, \" +\n \t\t\t\"'RESPONSABILE_ABBANDONO' TEXT, \" +\n \t\t\t\"'QUANTITA_PRESUNTA' NUMERIC);\";\n\n \tString add_geom_stmt = \"SELECT AddGeometryColumn('punti_accumulo_data', 'GEOMETRY', 4326, 'POINT', 'XY');\";\n \tString create_idx_stmt = \"SELECT CreateSpatialIndex('punti_accumulo_data', 'GEOMETRY');\";\n \n \t// TODO: check if all statements are complete\n \t\n \ttry { \t\n \t\tStmt stmt01 = db.prepare(create_stmt);\n\n\t\t\t\t\t\tif (stmt01.step()) {\n\t\t\t\t\t\t\t//TODO This will never happen, CREATE statements return empty results\n\t\t\t\t\t\t Log.v(\"UTILS\", \"Table Created\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t// TODO: Check if created, fail otherwise\n\t\t\t\t\t\t\n\t\t\t\t\t\tstmt01 = db.prepare(add_geom_stmt);\n\t\t\t\t\t\tif (stmt01.step()) {\n\t\t\t\t\t\t Log.v(\"UTILS\", \"Geometry Column Added \"+stmt01.column_string(0));\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tstmt01 = db.prepare(create_idx_stmt);\n\t\t\t\t\t\tif (stmt01.step()) {\n\t\t\t\t\t\t Log.v(\"UTILS\", \"Index Created\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tstmt01.close();\n\t\t\t\t\t\t\n\t\t\t\t\t} catch (jsqlite.Exception e) {\n\t\t\t\t\t\tLog.e(\"UTILS\", Log.getStackTraceString(e));\n\t\t\t\t\t}\n \treturn true;\n }\n\t\t\t}\n\t\t}else{\n\t\t\tLog.w(\"UTILS\", \"No valid database received, aborting..\");\n\t\t}\n\t\t\n\t\treturn false;\n\t}",
"protected void constructTable(Logger l, Statement s, int run)\n throws SQLException{\n createTable(s, run);\n insertResults(l,s,run);\n }",
"public void createTables() {\n\t\t// A try catch is needed in case the sql statement is invalid\n\t\ttry {\n\t\t\t// Create connection and statement\n\t\t\tconnection = connector.getConnection();\n\t\t\tstatement = connection.createStatement();\n\n\t\t\t// Create tables if they do not exist already\n\t\t\tString user_sql = \"CREATE TABLE IF NOT EXISTS \" + user_table + \" (id INTEGER NOT NULL AUTO_INCREMENT,\"\n\t\t\t\t\t+ \" username VARCHAR(10) UNIQUE NOT NULL,\" + \" password VARCHAR(15) NOT NULL,\"\n\t\t\t\t\t+ \" name VARCHAR(20) NOT NULL,\" + \" lastname VARCHAR(20) NOT NULL,\"\n\t\t\t\t\t+ \" email VARCHAR(40) UNIQUE NOT NULL,\" + \" isAdmin BOOLEAN NOT NULL,\" + \" PRIMARY KEY (id))\";\n\n\t\t\tString player_sql = \"CREATE TABLE IF NOT EXISTS \" + player_table + \" (id INTEGER NOT NULL AUTO_INCREMENT,\"\n\t\t\t\t\t+ \" idTeam INTEGER NOT NULL,\" + \" name VARCHAR(20) NOT NULL,\" + \" lastname VARCHAR(20) NOT NULL,\"\n\t\t\t\t\t+ \" dateOfBirth DATE NOT NULL,\" + \" height INTEGER NOT NULL,\" + \" PRIMARY KEY (id))\";\n\n\t\t\tString team_sql = \"CREATE TABLE IF NOT EXISTS \" + team_table + \" (id INTEGER NOT NULL AUTO_INCREMENT,\"\n\t\t\t\t\t+ \" name VARCHAR(20) UNIQUE NOT NULL,\" + \" coach VARCHAR(20) UNIQUE NOT NULL,\"\n\t\t\t\t\t+ \" city VARCHAR(20) NOT NULL,\" + \" dateFoundation DATE NOT NULL,\" + \" PRIMARY KEY (id))\";\n\n\t\t\tString match_sql = \"CREATE TABLE IF NOT EXISTS \" + match_table + \" (id INTEGER NOT NULL AUTO_INCREMENT,\"\n\t\t\t\t\t+ \" idHome INTEGER NOT NULL,\" + \" idAway INTEGER NOT NULL,\" + \" matchDate DATE NOT NULL,\"\n\t\t\t\t\t+ \" referee VARCHAR(20) NOT NULL,\" + \" PRIMARY KEY (id))\";\n\n\t\t\tString stats_sql = \"CREATE TABLE IF NOT EXISTS \" + stats_table + \" (id INTEGER NOT NULL AUTO_INCREMENT,\"\n\t\t\t\t\t+ \" idMatch INTEGER NOT NULL,\" + \" goalsHome INTEGER NOT NULL,\" + \" goalsAway INTEGER NOT NULL,\"\n\t\t\t\t\t+ \" numberOfCorners INTEGER NOT NULL,\" + \" numberOfFouls INTEGER NOT NULL,\" + \" PRIMARY KEY (id))\";\n\n\t\t\t// Inform the user that the table has been created just the first\n\t\t\t// time\n\t\t\tif (statement.executeUpdate(user_sql) > 0) {\n\t\t\t\tSystem.out.println(\"User table succesfully created\");\n\t\t\t}\n\t\t\tif (statement.executeUpdate(player_sql) > 0) {\n\t\t\t\tSystem.out.println(\"Player table succesfully created\");\n\t\t\t}\n\t\t\tif (statement.executeUpdate(team_sql) > 0) {\n\t\t\t\tSystem.out.println(\"Team table succesfully created\");\n\t\t\t}\n\t\t\tif (statement.executeUpdate(match_sql) > 0) {\n\t\t\t\tSystem.out.println(\"Match table succesfully created\");\n\t\t\t}\n\t\t\tif (statement.executeUpdate(stats_sql) > 0) {\n\t\t\t\tSystem.out.println(\"Stats table succesfully created\");\n\t\t\t}\n\t\t\t// Closing the connection\n\t\t\tstatement.close();\n\t\t\tconnection.close();\n\t\t} catch (SQLException e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\t}",
"public void createTable(String tableName) {\n db.execSQL(\"create table if not exists '\" + tableName.replaceAll(\"\\\\s\", \"_\") + \"' (\"\n + KEY_ROWID + \" integer primary key autoincrement, \"\n + KEY_QUESTION + \" string not null, \"\n + KEY_ANSWER + \" string not null);\");\n }",
"public void initialProductTable() {\r\n\t\tString sqlCommand = \"CREATE TABLE IF NOT EXISTS ProductTable (\\n\" + \"Barcode integer PRIMARY KEY,\\n\"\r\n\t\t\t\t+ \"Product_Name VARCHAR(30) NOT Null,\\n\" + \"Delivery_Time integer NOT NULL,\\n\"\r\n\t\t\t\t+ \"Quantity_In_Store integer NOT NULL,\\n\" + \"Quantity_In_storeroom integer NOT NULL,\\n\"\r\n\t\t\t\t+ \"Supplier_Name VARCHAR(30) NOT NUll,\\n\" + \"Average_Sales_Per_Day integer DEFAULT 0,\\n\"\r\n\t\t\t\t+ \"Location_In_Store VARCHAR(30) NOT NULL,\\n\" + \"Location_In_Storeroom VARCHAR(30) NOT NULL,\\n\"\r\n\t\t\t\t+ \"Faulty_Product_In_Store integer DEFAULT 0,\\n\" + \"Faulty_Product_In_Storeroom integer DEFAULT 0,\\n\"\r\n\t\t\t\t+ \"Category integer DEFAULT 0,\\n\"\r\n\t\t\t\t+ \" FOREIGN KEY (Category) REFERENCES CategoryTable(CategoryID) ON UPDATE CASCADE ON DELETE CASCADE\"\r\n\t\t\t\t+ \");\";// create the fields of the table\r\n\t\ttry (Connection conn = DriverManager.getConnection(dataBase); Statement stmt = conn.createStatement()) {\r\n\t\t\tstmt.execute(sqlCommand);\r\n\t\t} catch (SQLException e) {\r\n\t\t\tSystem.out.println(\"initialProductTable: \"+ e.getMessage());\r\n\t\t}\r\n\t}",
"TableFull createTableFull();",
"@Override\r\n\tpublic void createTable(Connection con) throws SQLException {\r\n\t\tString sql = \"CREATE TABLE \" + tableName\r\n\t\t\t\t+ \"(pc_id integer, class_id varchar(20), level integer,\"\r\n\t\t\t\t+ \" PRIMARY KEY (pc_id,class_id,level) )\";\r\n\r\n\t\tif (DbUtils.doesTableExist(con, tableName)) {\r\n\r\n\t\t} else {\r\n\t\t\ttry (PreparedStatement ps = con.prepareStatement(sql);) {\r\n\t\t\t\tps.execute();\r\n\t\t\t}\r\n \r\n\t\t}\r\n\r\n\r\n\r\n\t\tString[] newInts = new String[] { \r\n\t\t\t\t\"hp_Increment\",};\r\n\t\tDAOUtils.createInts(con, tableName, newInts);\r\n\r\n\t}",
"@Override\r\n public Db_db createTable (Db_table table)\r\n {\r\n Db_db db = null;\r\n String query = \"CREATE TABLE IF NOT EXISTS \"+ table.getName() + \" (\"; \r\n String primaryKeyName = null;\r\n Set<Map.Entry<String, Db_tableColumn>> tableEntries;\r\n List<String> listOfUniqueKey = Lists.newArrayList();\r\n \r\n if(curConnection_ != null)\r\n {\r\n try\r\n {\r\n tableEntries = table.getEntrySet();\r\n for(Map.Entry<String, Db_tableColumn> entry: tableEntries)\r\n {\r\n Db_tableColumn entryContent = entry.getValue();\r\n \r\n if(entryContent.isPrimary() && primaryKeyName == null)\r\n {\r\n primaryKeyName = entryContent.getName();\r\n }\r\n else if(entryContent.isPrimary() && primaryKeyName != null)\r\n {\r\n throw new NumberFormatException();\r\n }\r\n \r\n if(itsAttributeMapper_ == null)\r\n {\r\n throw new NumberFormatException();\r\n }\r\n \r\n if(entryContent.isUnique())\r\n {\r\n listOfUniqueKey.add(entryContent.getName());\r\n }\r\n \r\n String mappedAttribute = this.itsAttributeMapper_.MapAttribute(entryContent.getAttributeName());\r\n if(entryContent.getAttribute().isEnum())\r\n {\r\n mappedAttribute += entryContent.getAttribute().buildEnumValueListString();\r\n }\r\n query += entryContent.getName() + \" \" + mappedAttribute \r\n + (entryContent.isAutoIncreasmnet()?\" AUTO_INCREMENT \":\" \")\r\n + (entryContent.isUnique()?\" UNIQUE, \": \", \");\r\n }\r\n \r\n query += \"PRIMARY KEY (\" + primaryKeyName + \"));\";\r\n try (Statement sm = curConnection_.createStatement()) {\r\n sm.executeUpdate(query);\r\n db = this.curDb_;\r\n }\r\n \r\n }catch(NumberFormatException e){System.out.print(e);}\r\n catch(SQLException e){System.out.print(query);this.CurConnectionFailed();}\r\n }\r\n return db;\r\n }",
"private void createTransactionsTable() {\n\t\ttry {\n\t\t\tStatement stmt = this.conn.createStatement();\n\t\t\tstmt.executeUpdate(\"CREATE TABLE transactions \"\n\t\t\t\t\t+ \"(id BIGINT GENERATED ALWAYS AS IDENTITY, \"\n\t\t\t\t\t+ \"owner INT, amount DOUBLE, source BIGINT, sourceType VARCHAR(20), target BIGINT, targetType VARCHAR(20), comment VARCHAR(255), time BIGINT)\");\n\t\t\tconn.commit();\n\t\t\tSystem.out.println(\"Created table transactions\");\n\t\t} catch (SQLException sqle) {\n\t\t\tSystem.err.println(\"Creation of transactions table FAILED\");\n\t\t\tSystem.err.println(sqle);\n\t\t}\n\t}",
"@Override\n public void onClick(View v) {\n if (!Validate()) return;\n\n //create new table movie class\n MovieTable i = new MovieTable(getApplicationContext());\n\n //create new movie with given data and get the states\n boolean is_created = i.create(getData());\n\n String message = \"\";\n if (is_created) { //successfully created\n clearData(); //clear the filled inputs\n message = \"Saved\";\n } else {\n message = \"Unknown Error Occurred!\";\n }\n //show status message\n Snackbar snackBar = Snackbar.make(findViewById(R.id.activity_register_base_layout), message, BaseTransientBottomBar.LENGTH_SHORT);\n snackBar.show();\n }",
"@Test\n public void create1Test2() throws SQLException {\n manager = new TableServizioManager(mockDb);\n manager.create1(true,true,true,true,true,true,true);\n Servizio servizio = manager.retriveById(5);\n assertNotNull(servizio,\"Should return true if create Servizio\");\n }",
"public static void createTable() throws SQLException, UserExceptionClass {\n\t\tfinal String query = Constants.CREATE_QUERY;\n\t\tDBOperation.updateQueries(query);\n\t}",
"public static void createTable(SQLiteDatabase db, boolean ifNotExists) {\n String constraint = ifNotExists? \"IF NOT EXISTS \": \"\";\n db.execSQL(\"CREATE TABLE \" + constraint + \"'ORDER_BATCH' (\" + //\n \"'ID' TEXT PRIMARY KEY NOT NULL ,\" + // 0: id\n \"'COOPERATE_ID' TEXT NOT NULL ,\" + // 1: cooperateId\n \"'S_PDTG_CUSTFULLNAME' TEXT,\" + // 2: sPdtgCustfullname\n \"'L_PDTG_BATCH' INTEGER NOT NULL ,\" + // 3: lPdtgBatch\n \"'DRIVERS_ID' TEXT NOT NULL ,\" + // 4: driversID\n \"'EVALUATION' TEXT,\" + // 5: evaluation\n \"'CAN_EVALUTAION' TEXT,\" + // 6: canEvalutaion\n \"'STATUS' TEXT NOT NULL ,\" + // 7: status\n \"'ADD_TIME' INTEGER NOT NULL ,\" + // 8: addTime\n \"'EDIT_TIME' INTEGER,\" + // 9: editTime\n \"'USER_NAME' TEXT NOT NULL );\"); // 10: userName\n }",
"int insert(TblMotherSon record);",
"private void createCheckingAccountsTable() {\n\t\ttry {\n\t\t\tStatement stmt = this.conn.createStatement();\n\t\t\tstmt.executeUpdate(\"CREATE TABLE checkingAccounts \"\n\t\t\t\t\t+ \"(id BIGINT GENERATED ALWAYS AS IDENTITY ( START WITH 1000000001, INCREMENT BY 1 ), \" + \"owner INT, \"\n\t\t\t\t\t+ \"balance DOUBLE, \" + \"intRate DOUBLE, \"\n\t\t\t\t\t+ \"timeCreated BIGINT, \" + \"lastPaidInterest DOUBLE, \"\n\t\t\t\t\t+ \"dateOfLastPaidInterest BIGINT)\");\n\t\t\tconn.commit();\n\t\t\tSystem.out.println(\"Created table checkingAccounts\");\n\t\t} catch (SQLException sqle) {\n\t\t\tSystem.err.println(\"Creation of checkingAccounts table FAILED\");\n\t\t\tSystem.err.println(sqle);\n\t\t}\n\t}",
"public static void createOrders() {\n Connection con = getConnection();\n\n String createString;\n createString = \"create table Orders (\" +\n \"Prod_ID INTEGER, \" +\n \"ProductName VARCHAR(20), \" +\n \"Employee_ID INTEGER )\";\n\n try {\n stmt = con.createStatement();\n stmt.executeUpdate(createString);\n\n stmt.close();\n con.close();\n\n } catch (SQLException ex) {\n System.err.println(\"SQLException: \" + ex.getMessage());\n }\n JOptionPane.showMessageDialog(null, \"Orders Table Created\");\n }",
"protected abstract void addTables();",
"@Override\n public void execute()\n {\n mDbHandle.execSQL(CREATE_TABLE_BLOOD_SUGAR);\n }"
] |
[
"0.7243775",
"0.7212518",
"0.72069085",
"0.7190101",
"0.7020233",
"0.6980642",
"0.6965329",
"0.6957643",
"0.69421786",
"0.69291776",
"0.69079477",
"0.6884791",
"0.68707246",
"0.68263257",
"0.6818833",
"0.68048304",
"0.67668694",
"0.6690184",
"0.6681176",
"0.66605633",
"0.664809",
"0.6627322",
"0.6613765",
"0.66034263",
"0.6591121",
"0.6590958",
"0.6565997",
"0.6551208",
"0.65219134",
"0.65070105",
"0.6493523",
"0.64891547",
"0.647633",
"0.64738643",
"0.64681566",
"0.6452994",
"0.6452177",
"0.64519924",
"0.6441198",
"0.6423353",
"0.6419965",
"0.64060944",
"0.6398182",
"0.6397141",
"0.6388974",
"0.6388958",
"0.63820297",
"0.6349152",
"0.6333408",
"0.63317233",
"0.6331446",
"0.6325602",
"0.6313493",
"0.63075644",
"0.63072145",
"0.6305819",
"0.62979245",
"0.6296741",
"0.62901646",
"0.6287322",
"0.6286764",
"0.6276466",
"0.6275142",
"0.62751406",
"0.6273035",
"0.6268914",
"0.625838",
"0.62513417",
"0.62481445",
"0.62274545",
"0.6225464",
"0.62247235",
"0.6223273",
"0.6211697",
"0.621122",
"0.6197974",
"0.61943585",
"0.6192116",
"0.61917853",
"0.6190364",
"0.6186192",
"0.6184582",
"0.6184319",
"0.6179492",
"0.6168027",
"0.6165654",
"0.61569685",
"0.6149047",
"0.6143047",
"0.61360294",
"0.61292726",
"0.6126647",
"0.61227906",
"0.61225724",
"0.61122453",
"0.6107542",
"0.6106267",
"0.60923076",
"0.60916936",
"0.608395"
] |
0.6428222
|
39
|
add operation to database is successfull
|
@Test
public void addHighScoreTest() {
database.createHighScoreTable(testTable);
assertTrue(database.addHighScore(100, testTable));
database.clearTable(testTable);
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"@Test\r\n\tpublic void addToDb() {\r\n\t\tservice.save(opinion);\r\n\t\tassertNotEquals(opinion.getId(), 0);\r\n\t\tassertTrue(service.exists(opinion.getId()));\r\n\t}",
"private void addInsertOp() {\n\n if (!mIsNewAlert) {\n mValues.put(AlertContentProvider.KEY_ALERT_ID, mRawAlertId);\n }\n ContentProviderOperation.Builder builder =\n newInsertCpo(Data.CONTENT_URI, mIsSyncOperation, mIsYieldAllowed);\n builder.withValues(mValues);\n if (mIsNewAlert) {\n builder.withValueBackReference(AlertContentProvider.KEY_ALERT_ID, mBackReference);\n }\n mIsYieldAllowed = false;\n mBatchOperation.add(builder.build());\n }",
"int insert(FileRecordAdmin record);",
"@Override\n\tpublic void add(DatabaseHandler db) throws Exception {\n\t\tdb.addWork(this);\n\t\t\n\t}",
"public boolean Add() {\n String query = \"INSERT INTO Proveedores(nombre, idContacto, activo) \"\r\n + \"VALUES('\" + nombre + \"',\" + idContacto + \",\" + activo + \");\";\r\n return dataAccess.Execute(query) >= 1;\r\n }",
"public boolean ADDCHEDTransact(CHEDTransact trans) {\n query = \"INSERT INTO transact(NumberO)\";\n try {\n ps = con.prepareStatement(query);\n\n java.util.Date dateP = trans.getiTDate();\n\n Date dateSigned = new Date(dateP.getYear(), dateP.getMonth(), dateP.getDay());\n\n ps.setInt(1, trans.getNumberOFTrees());\n ps.setString(2, trans.getLotNumber());\n ps.setString(3, trans.getiTvoucher());\n ps.setString(4, trans.gettRvoucher());\n ps.setDate(5, dateSigned);\n ps.setFloat(6, trans.getAmountPayable());\n\n if (ps.executeUpdate() != 0) {\n status = true;\n }\n\n } catch (SQLException ex) {\n Logger.getLogger(FarmerManager.class.getName()).log(Level.SEVERE, null, ex);\n }\n\n return status;\n }",
"int insert(Admin record);",
"int insert(Admin record);",
"int insert(UserOperateProject record);",
"int insert(Online record);",
"@Override\n\tpublic void add() {\n\t\tSystem.out.println(\"Injection to database : Oracle\");\n\t}",
"int insert(DataSync record);",
"@org.junit.Test\r\n\tpublic void insert() {\n\t\tParameters parameters = new Parameters();\r\n\t\tparameters.setUrl(\"/org/save\");\r\n\t\tparameters.setList(new ArrayList<NameValuePair>());\r\n\t\tparameters.getList().add(new BasicNameValuePair(\"name\", \"112\"));\r\n\t\t@SuppressWarnings(\"unused\")\r\n\t\tString string = (String) MainUtilityTools.execute(parameters);\r\n\t\tSystem.out.println(string);\r\n\t}",
"public Boolean add(String addThis) {\n try {\n Statement statement = con.createStatement();\n return statement.executeUpdate(addThis) == 0 ? false : true;\n } catch (SQLException e) {\n e.printStackTrace();\n }\n return false;\n }",
"int insert(FctWorkguide record);",
"int insert(Forumpost record);",
"int insert(Storage record);",
"int insert(Storage record);",
"int insert(Transaction record);",
"int insert(FundManagerDo record);",
"@Override\r\n\tpublic String insert() {\n\t\tboolean mesg=false;\r\n\t\tif(adminDao.doSave(admin)==1)\r\n\t\t\tmesg=true;\r\n\t\tthis.setResultMesg(mesg, \"²åÈë\");\r\n\t\treturn SUCCESS;\r\n\t}",
"int insert(FinancialManagement record);",
"int insert(Engine record);",
"@Test\n public void addIngredient_DatabaseUpdates(){\n int returned = testDatabase.addIngredient(ingredient);\n Ingredient retrieved = testDatabase.getIngredient(returned);\n assertEquals(\"addIngredient - Correct Ingredient Name\", \"Flour\", retrieved.getName());\n assertEquals(\"addIngredient - Set Ingredients ID\", returned, retrieved.getKeyID());\n }",
"int insert(Task record);",
"int insert(PmKeyDbObj record);",
"@Override\n\tpublic int commit() {\n\t\treturn 0;\n\t}",
"int insert(NjOrderWork2 record);",
"public void addResult(Result result) {\n try {\n DataBaseBroker dbb = new DataBaseBroker();\n dbb.loadDriver();\n dbb.establishConnection();\n dbb.addResult(result);\n dbb.commit();\n dbb.closeConnection();\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n }",
"public boolean addToDB() {\n boolean success = false;\n // try to add the leaf to the database\n type = API.getTypes().get(\"geneleaf\");\n try {\n db.connect();\n\n db.insert(\"LSDB for \" + gene.getHGNC() + \":\" + value + \" of type \" + node.getName(), \"INSERT INTO wave#build#_leaf (name, value, refnodeid, timestamp)\"\n + \"VALUES ('\" + name + \"','\" + value + \"','\" + node.getId() + \"', NOW())\");\n\n db.insert(\"Gene Leaf for LSDB \" + value, \"INSERT INTO wave#build#_association (a, b, reftypeid) VALUES(\" + gene.getId() + \",(SELECT @@identity), \" + type.getId() + \")\");\n\n success = true;\n } catch (Exception e) {\n System.out.println(\"[LSDB][DB] LSDB adding failed\\n\\t\" + e.toString());\n success = false;\n } finally {\n // System.out.println(\"[LSDB][DB] Added LSDB with value \" + value);\n db.close();\n return success;\n }\n }",
"int insert(StatusByUser record);",
"Long insert(Access record);",
"@Override\n\tpublic int insert(Permis record) {\n\t\treturn 0;\n\t}",
"public void addRecord();",
"public void operationSave() {\n\r\n\t\tstatusFeldSave();\r\n\t}",
"@Test\n public void testAdd() {\n System.out.println(\"add\");\n int cod = 0;\n int semestre = 0;\n String nombre = \"\";\n int cod_es = 0;\n cursoDAO instance = new cursoDAO();\n boolean expResult = false;\n boolean result = instance.add(cod, semestre, nombre, cod_es);\n assertEquals(expResult, result);\n \n }",
"Integer insert(JzAct record);",
"@Override\n\tpublic int addRequest(Request req) throws SQLException {\n\t\tif(null==db){\n\t\t\tdb = new DbConnection();\n\t\t\tdb.openConnection();\n\t\t}\n\t\tint val = db.addRequest(req);\n\t\treturn val;\n\t}",
"int insert(Product record);",
"int insert(AdminTab record);",
"int insert(DBPublicResources record);",
"public void insert() throws LRException\n\t{\n\t\tDataHRecordData myData=(DataHRecordData)getData();\n\t\tgetBackground();\n\t\ttry { myData.record.save(background.getClient()); }\n\t\tcatch (LDBException e) { setStatus(e); }\n\t}",
"int insert(Commet record);",
"int insert(ResultDto record);",
"void commit();",
"void commit();",
"public void addData() {\n boolean isInserted = my_db.insertData(\"LIC\");\n if (isInserted) {\n Toast.makeText(MainActivity.this, \"LIC inserted\", Toast.LENGTH_SHORT).show();\n\n }\n isInserted = my_db.insertData(\"Mutual Fund\");\n if (isInserted) {\n Toast.makeText(MainActivity.this, \"Mutual Fund inserted\", Toast.LENGTH_SHORT).show();\n\n }\n isInserted = my_db.insertData(\"Mediclaim\");\n if (isInserted) {\n Toast.makeText(MainActivity.this, \"Mediclaim inserted\", Toast.LENGTH_SHORT).show();\n\n }\n }",
"int insert(AccessModelEntity record);",
"int insert(HomeWork record);",
"@Override\n public void DataIsInserted() {\n }",
"int insert(Promo record);",
"int insert(Orderall record);",
"public void insert() {\n\t\tSession session = DBManager.getSession();\n\t\tsession.beginTransaction();\n\t\tsession.save(this);\n\t\tsession.getTransaction().commit();\n\t}",
"int insert(GroupRightDAO record);",
"public void commit(){\n \n }",
"int insert(SysCode record);",
"int insertSelective(UserOperateProject record);",
"int insert(ExamineApproveResult record);",
"public void commit();",
"boolean agregarIngreso(Ingreso i) {\n boolean hecho = false;\n try {\n operacion = ayudar.beginTransaction();\n ayudar.save(i);\n operacion.commit();\n } catch (Exception e) {\n operacion.rollback();\n System.out.println(e);\n }\n return hecho;\n }",
"public void storeAndCommit() {\n \tsynchronized(mDB.lock()) {\n \t\ttry {\n \t \t\tstoreWithoutCommit();\n \t \t\tcheckedCommit(this);\n \t\t}\n \t\tcatch(RuntimeException e) {\n \t\t\tcheckedRollbackAndThrow(e);\n \t\t}\n \t}\n }",
"int insert(Cargo record);",
"@Override\n\t\t\tpublic void run() {\n\t\t\t\tUri insertedUri = context.getContentResolver().insert(uri,\n\t\t\t\t\t\tvalues);\n\t\t\t\tMessage msg = Message.obtain();\n\t\t\t\t// msg.what=INSERT_OPERATION;\n\t\t\t\tif (ContentUris.parseId(insertedUri) > 0) {\n\t\t\t\t\tmsg.what = SUCCESS;\n\t\t\t\t} else {\n\t\t\t\t\tmsg.what = FAIL;\n\t\t\t\t}\n\t\t\t\thandler.sendMessage(msg);\n\t\t\t}",
"int insert(Alert record);",
"@Override\r\n\tpublic Integer insert(Wt_collection record) {\n\t\treturn 0;\r\n\t}",
"int insert(_task record);",
"int insert(NjProductTaticsRelation record);",
"int insert(RetailModule record);",
"int add(Bill bill) throws SQLException;",
"public boolean add(Department dept) {\n Connection connection = null; \n try {\n connection = DBConnection.getConnection();\n stmt = connection.createStatement();\n// stmt = DBConnector.openConnection();\n String query = \"INSERT INTO \" + TABLE + \"(abbreviation,title,url_moodle,token) VALUES(\" + dept.toStringQueryInsert() + \")\";\n if (stmt.executeUpdate(query) == 1) {\n connection.commit();\n return true;\n }\n \n } catch (SQLException ex) {\n ex.printStackTrace();\n throw new RuntimeException(\"Insertion Query failed!\");\n } finally {\n DBConnection.releaseConnection(connection);\n// DBConnector.closeConnection();\n }\n return false;\n }",
"void addData();",
"@Test\n\tpublic void addTransaction() {\n\t\tTransaction transaction = createTransaction();\n\t\tint size = transactionService.getTransactions().size();\n\t\ttransactionService.addTransaction(transaction);\n\t\tassertTrue(\"No transaction was added.\", size < transactionService.getTransactions().size());\n\t}",
"int insertSelective(FileRecordAdmin record);",
"int insert(ApplicationDO record);",
"int insert(Prueba record);",
"int insert(Abum record);",
"int insertSelective(Admin record);",
"int insertSelective(Admin record);",
"int insert(Tourst record);",
"int insert(ParkCurrent record);",
"int insertSelective(DataSync record);",
"int insertSelective(Online record);",
"private void addSomeItemsToDB () throws Exception {\n/*\n Position pos;\n Course course;\n Ingredient ing;\n\n PositionDAO posdao = new PositionDAO();\n CourseDAO coursedao = new CourseDAO();\n IngredientDAO ingdao = new IngredientDAO();\n\n ing = new Ingredient(\"Mozzarella\", 10,30);\n ingdao.insert(ing);\n\n // Salads, Desserts, Main course, Drinks\n pos = new Position(\"Pizza\");\n posdao.insert(pos);\n\n course = new Course(\"Salads\", \"Greek\", \"Cucumber\", \"Tomato\", \"Feta\");\n coursedao.insert(course);\n\n ing = new Ingredient(\"-\", 0,0);\n ingdao.insert(ing);\n */\n }",
"int insertSelective(FundManagerDo record);",
"boolean agregarProducto(Producto p) {\n boolean hecho = false;\n try {\n operacion = ayudar.beginTransaction();\n ayudar.save(p);\n operacion.commit();\n } catch (Exception e) {\n operacion.rollback();\n System.out.println(e);\n }\n return hecho;\n }",
"int insert(SelectUserRecruit record);",
"public boolean addLead(Lead lead) {\n\n DBConnection dbConnection = new DBConnection();\n int result = dbConnection.addLead(lead);\n\n if(result>0){\n return true;\n }\n\n return false;\n }",
"int insertSelective(NjOrderWork2 record);",
"int insertSelective(FctWorkguide record);",
"int insert(UserGift record);",
"int insert(FactRoomLog record);",
"@Override\n public int insert(StorePickStatus arg0) {\n return 0;\n }",
"int insert(Miss_control_log record);",
"private synchronized String processAdd(String query) {\r\n\t\tString[] valuesCommand = query.split(\" \");\r\n\t\tif ( valuesCommand.length != 3 )\r\n\t\t\treturn \"ERROR Bad syntaxe command ADD - USAGE : ADD id number\";\r\n\t\tString id = valuesCommand[1];\r\n\t\tif ( !this.bank.existAccount(id) ) {\r\n\t\t\treturn \"ERROR Account doesn't exist\";\r\n\t\t}\r\n\t\tdouble number = Double.valueOf(valuesCommand[2]);\r\n\t\tthis.bank.add(id, number);\r\n\t\treturn \"OK \" + this.bank.getLastOperation(id);\r\n\t}",
"@Override\n\tpublic Response execute() {\n\n\t\tDatabaseAccessor db = null;\n\t\tint filetype;\n\t\tif(type.equalsIgnoreCase(\"raw\")) {\n\t\t\tfiletype = FileTuple.RAW;\n\t\t} else if(type.equalsIgnoreCase(\"profile\")) {\n\t\t\tfiletype = FileTuple.PROFILE;\n\t\t} else if(type.equalsIgnoreCase(\"region\")) {\n\t\t\tfiletype = FileTuple.REGION;\n\t\t} else {\n\t\t\tfiletype = FileTuple.OTHER;\n\t\t}\n\t\ttry {\n\t\t\tdb = initDB();\n\t\t\tFileTuple ft = db.addNewFile(experimentID, filetype, fileName, null, metaData, author, uploader, isPrivate, grVersion);\n\t\t\treturn new AddFileToExperimentResponse(StatusCode.OK, ft.getUploadURL());\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t\treturn new ErrorResponse(StatusCode.BAD_REQUEST, e.getMessage());\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t\treturn new ErrorResponse(StatusCode.SERVICE_UNAVAILABLE, e.getMessage());\n\t\t} finally{\n\t\t\tdb.close();\n\t\t}\n\t}",
"public static boolean addFile(TranslationFile bf) {\n System.out.println(\"File added to database.\");\n DatabaseOperations.addOrUpdateFileName(bf.getFileID(), bf.getFileName());\n String sql = \"INSERT OR REPLACE INTO corpus1(id, fileID, fileName, thai, english, committed, removed, rank) VALUES(?,?,?,?,?,?,?,?)\";\n\n try (Connection conn = DatabaseOperations.connect();\n PreparedStatement pstmt = conn.prepareStatement(sql)) {\n\n conn.setAutoCommit(false);\n\n // this makes sure that the segments in the file, when retrieved from the db, can be ordered in the proper order.\n // simply increments by 1 on each segment. \n int rank = 0;\n // keeps count of the number of segs added so that the SQL can run a batch transaction (which is much more efficient than individual transactions).\n // when i=1000, or at the last segment, the SQL is then run as one batch transaction.\n int i = 0;\n\n for (Segment seg : bf.getActiveSegs()) {\n\n pstmt.setDouble(1, seg.getID());\n pstmt.setDouble(2, seg.getFileID());\n pstmt.setString(3, seg.getFileName());\n pstmt.setString(4, seg.getThai());\n pstmt.setString(5, seg.getEnglish());\n // committed/removed booleans are stored as binary (0 = false, 1 = true)\n pstmt.setInt(6, seg.isCommitted() ? 1 : 0);\n // removed is set to \"false\"\n pstmt.setInt(7, 0);\n pstmt.setInt(8, rank);\n pstmt.addBatch();\n rank++;\n i++;\n\n if (i % 1000 == 0 || i == bf.getActiveSegs().size()) {\n pstmt.executeBatch(); //Execute every 1000 segments.\n }\n }\n\n // resetting counters\n i = 0;\n rank = 0;\n for (Segment seg : bf.getHiddenSegs()) {\n\n pstmt.setDouble(1, seg.getID());\n pstmt.setDouble(2, seg.getFileID());\n pstmt.setString(3, seg.getFileName());\n pstmt.setString(4, seg.getThai());\n pstmt.setString(5, seg.getEnglish());\n // committed/removed booleans are stored as binary (0 = false, 1 = true)\n pstmt.setInt(6, seg.isCommitted() ? 1 : 0);\n // removed is set to \"true\"\n pstmt.setInt(7, 1);\n pstmt.setInt(8, rank);\n pstmt.addBatch();\n rank++;\n i++;\n\n if (i % 1000 == 0 || i == bf.getHiddenSegs().size()) {\n pstmt.executeBatch(); //Execute every 1000 segments.\n }\n }\n conn.commit();\n return true;\n\n } catch (SQLException e) {\n System.out.println(\"AddFileAsBatch: \" + e.getMessage());\n return false;\n }\n }",
"private long insert(SQLiteDatabase db, Object o) {\n\t\tContentValues values = createContentValues(o);\n\t\tif (values != null) {\n\t\t\treturn db.insert(getTableName(o.getClass()), null, values);\n\t\t}\n\t\treturn -1L;\n\t}",
"int insert(AccuseInfo record);",
"int insert(BehaveLog record);",
"int insert(IceApp record);",
"int insert(UploadStateRegDTO record);"
] |
[
"0.6598795",
"0.6344492",
"0.62685716",
"0.6253047",
"0.62175745",
"0.61813533",
"0.6179057",
"0.6179057",
"0.61710864",
"0.6162583",
"0.6122956",
"0.6121409",
"0.61101234",
"0.61088395",
"0.6105025",
"0.6090418",
"0.6087294",
"0.6087294",
"0.6084198",
"0.6082972",
"0.6074627",
"0.60721505",
"0.60594827",
"0.60430205",
"0.6035142",
"0.6029312",
"0.6028466",
"0.6026679",
"0.60223734",
"0.60201335",
"0.60081977",
"0.6001245",
"0.5991883",
"0.598941",
"0.59799683",
"0.5971847",
"0.59713674",
"0.5966491",
"0.5964541",
"0.59643734",
"0.59642047",
"0.59597033",
"0.5959518",
"0.5958525",
"0.59575534",
"0.59575534",
"0.59540004",
"0.5953972",
"0.5953814",
"0.5943235",
"0.5936887",
"0.5935981",
"0.5928937",
"0.59289217",
"0.5928394",
"0.5922709",
"0.5916521",
"0.5915937",
"0.59148353",
"0.5909582",
"0.5907951",
"0.5907084",
"0.59041274",
"0.59037393",
"0.58974206",
"0.58923244",
"0.58813864",
"0.5878548",
"0.58753955",
"0.58700407",
"0.5867181",
"0.58625245",
"0.58618253",
"0.5858559",
"0.5858556",
"0.58558625",
"0.585246",
"0.585246",
"0.5850158",
"0.58448017",
"0.58445936",
"0.5839033",
"0.5837302",
"0.58349806",
"0.58285624",
"0.5827842",
"0.5827139",
"0.5826756",
"0.5825571",
"0.5825148",
"0.58223236",
"0.5822087",
"0.58212984",
"0.58197486",
"0.58195835",
"0.5818067",
"0.58158123",
"0.5813262",
"0.58124644",
"0.58106506",
"0.58102024"
] |
0.0
|
-1
|
missing scores are 0
|
@Test
public void missingHighScoresTest() {
database.createHighScoreTable(testTable);
database.addHighScore(110, testTable);
database.addHighScore(140, testTable);
int[] scores = database.loadHighScores(testTable);
assertEquals(0, scores[4]);
assertEquals(0, scores[3]);
assertEquals(0, scores[2]);
assertEquals(110, scores[1]);
assertEquals(140, scores[0]);
database.clearTable(testTable);
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public int totalScore() {\n return 0;\n }",
"private static double getEmtpyScore(Game2048Board board) {\n double empty = 0;\n if (board.getEmptyTiles().size() < 4) {\n empty = (4 - board.getEmptyTiles().size());\n }\n return empty;\n }",
"@Test(timeout = 4000)\n public void test069() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = new double[4];\n evaluation0.updateNumericScores(doubleArray0, doubleArray0, (-1.0));\n assertEquals(Double.NEGATIVE_INFINITY, evaluation0.meanPriorAbsoluteError(), 0.01);\n }",
"private void checkMyScore() {\n\n int[] scores = ar.checkMyScore();\n System.out.println(\" My score: \");\n int level = 1;\n for (int i : scores) {\n System.out.println(\" level \" + level + \" \" + i);\n if (i > 0)\n solved[level - 1] = 1;\n level++;\n }\n }",
"public void setScoreZero() {\n this.points = 10000;\n }",
"@Override\n\tpublic void checkScore() {\n\t\t\n\t}",
"public void resetScore(){\n Set<String> keys = CalcScore.keySet();\n for(String key: keys){\n CalcScore.replace(key,0.0);\n }\n\n\n\n }",
"protected int getNegativeOnes() {\n Rating[] ratingArray = this.ratings;\n int negOneCount = 0;\n for(int i = 0; i < ratingArray.length; i++) {\n if(ratingArray[i] != null) {\n if(ratingArray[i].getScore() == -1) negOneCount++;\n }\n }\n return negOneCount;\n }",
"float getScore();",
"float getScore();",
"@Test\r\n public void testCalcScore() {\r\n \r\n //initialize variables\r\n int year = 0;\r\n int wheat = 0;\r\n int population = 0;\r\n int acres = 0;\r\n double expResult = 0;\r\n double result = 0;\r\n \r\n //test one - valid test\r\n System.out.println(\"Test 01\");\r\n year = 1;\r\n wheat = 100;\r\n population = 50;\r\n acres = 50;\r\n expResult = 1200.0;\r\n result = ScoreControl.calcScore(year, wheat, population, acres);\r\n assertEquals(expResult, result, 0.0);\r\n System.out.println(result + \" \" + expResult);\r\n \r\n //test two - invalid year\r\n System.out.println(\"Test 02\");\r\n year = 0;\r\n wheat = 100;\r\n population = 50;\r\n acres = 50;\r\n expResult = -1;\r\n result = ScoreControl.calcScore(year, wheat, population, acres);\r\n assertEquals(expResult, result, 0.0);\r\n System.out.println(result + \" \" + expResult);\r\n \r\n //test three - invalid wheat\r\n System.out.println(\"Test 03\");\r\n year = 3;\r\n wheat = -350;\r\n population = 100;\r\n acres = 5;\r\n expResult = -1;\r\n result = ScoreControl.calcScore(year, wheat, population, acres);\r\n assertEquals(expResult, result, 0.0);\r\n System.out.println(result + \" \" + expResult);\r\n \r\n //test four - invalid acres\r\n System.out.println(\"Test 04\");\r\n year = 1;\r\n wheat = 25;\r\n population = 5;\r\n acres = -5;\r\n expResult = -1;\r\n result = ScoreControl.calcScore(year, wheat, population, acres);\r\n assertEquals(expResult, result, 0.0);\r\n System.out.println(result + \" \" + expResult);\r\n \r\n //test five - invalid population\r\n System.out.println(\"Test 05\");\r\n year = 2;\r\n wheat = 35;\r\n population = -50;\r\n acres = 3;\r\n expResult = -1;\r\n result = ScoreControl.calcScore(year, wheat, population, acres);\r\n assertEquals(expResult, result, 0.0);\r\n System.out.println(result + \" \" + expResult);\r\n \r\n //test six - multiple invalids\r\n System.out.println(\"Test 06\");\r\n year = -1;\r\n wheat = -100;\r\n population = -5;\r\n acres = -1;\r\n expResult = -1;\r\n result = ScoreControl.calcScore(year, wheat, population, acres);\r\n assertEquals(expResult, result, 0.0);\r\n System.out.println(result + \" \" + expResult);\r\n \r\n //test seven - single invalid, positive result\r\n System.out.println(\"Test 07\");\r\n year = 2;\r\n wheat = 100;\r\n population = -50;\r\n acres = 5;\r\n expResult = -1;\r\n result = ScoreControl.calcScore(year, wheat, population, acres);\r\n assertEquals(expResult, result, 0.0);\r\n System.out.println(result + \" \" + expResult);\r\n }",
"public boolean isEmpty()\n {\n return scores.isEmpty();\n }",
"public TennisScoreSystem() {\n scoreA = 0;\n scoreB = 0;\n }",
"public boolean checkScore() {\r\n return !(this.scoreTable.getRank(this.score.getValue()) > this.scoreTable.size());\r\n }",
"@Override\n\tpublic double getTotalScore() {\n\t\treturn score;\n\t}",
"Float getScore();",
"@Test\r\n\tpublic void calculMetricSuperiorTeacherBetterScoreButNoLostPointsTest() {\r\n\t\tAssert.assertEquals(UtilCalculGrade.calculMetricSuperior(new ModelValue(25f, 1f), 12f, 11f), new Float(0));\r\n\t}",
"public void resetScore() {\n\t\tthis.score = 0;\n\t}",
"@Test \n\tpublic void baysNeverZeroResult() {\n\t\tboolean nil = false;\n\t\t//word ids are only positive so -1 is testing a \"word not found\" case\n\t\tfor(int i = -1; i< 100; i++) {\n\t\t\tfor(NewsGroup g: groups) {\n\t\t\t\tif(g.bayesianEstimator(i) == 0)\n\t\t\t\t\tnil = true;\n\t\t\t}\n\t\t}\n\t\tassertFalse(nil);\n\t}",
"@Test\n\tpublic void finalScoreTest() {\n\t\tassertEquals(80, g1.finalScore(), .001);\n\t\tassertEquals(162, g2.finalScore(), .001);\n\t\tassertEquals(246, g3.finalScore(), .001);\n\t}",
"@Override\n\tprotected double scoreFDSD(int arg0, int arg1) {\n\t\treturn 0;\n\t}",
"@Test\r\n\tpublic void calculLostPointsByQualityAxisIfOneMetricIsAbsentTest()\r\n\t\t\tthrows ClassNotFoundException, SonarqubeDataBaseException, SQLException, IOException {\r\n\t\tlistScoreMetricStudent.remove(\"test\");\r\n\t\tlistLostPoints.put(\"TestOfTeacher\", 0.0f);\r\n\t\tAssert.assertEquals(UtilCalculGrade.calculLostPointsByQualityAxis(mapQuality, listScoreMetricStudent,\r\n\t\t\t\tlistScoreMetricTeacher, projectName, idModule), listLostPoints);\r\n\t}",
"protected void checkScore () {\n if (mCurrentIndex == questions.length-1) {\n NumberFormat pct = NumberFormat.getPercentInstance();\n double result = (double) correct/questions.length;\n Toast res = new Toast(getApplicationContext());\n res.makeText(QuizActivity.this, \"Your score: \" + pct.format(result), Toast.LENGTH_LONG).show();\n correct = 0; // resets the score when you go back to first question.\n }\n }",
"int getScoreValue();",
"public Score()\n {\n // initialize instance variables\n score = 0;\n }",
"@Test\n public void zero() {\n \n BowlingGame bowlinggame = new BowlingGame();\n \n bowlinggame.getScore();\n assertEquals(0, bowlinggame.getScore());\n \n }",
"public double getBestScore();",
"@Test\r\n\tpublic void calculLostPointsByOneRuleNoLostPointsTest() {\r\n\t\tAssert.assertEquals(UtilCalculGrade.calculLostPointsByOneRule(new ModelValue(1f, 1f, 3f), 0), new Float(0));\r\n\t}",
"protected abstract List<Double> calcScores();",
"int score();",
"int score();",
"@Test\r\n\tpublic final void testGetScore() {\r\n\t\tassertTrue(gameStatistics.getScore() == 18000);\r\n\t\tassertTrue(gameStatisticsLoss.getScore() == 9100);\r\n\t}",
"@Test\r\n\tpublic void calculQualityAxisWithNoLostPointsTest() {\r\n\t\tAssert.assertEquals(UtilCalculGrade.calculTestOfStudentQualityAxis(new ModelValue(4f, 2f), 4f), new Float(0));\r\n\t}",
"public abstract float getScore();",
"protected abstract void calcScores();",
"public void resetScore();",
"@Override\n\t\t\tpublic double computeScore(Shop arg0, Shop arg1) {\n\t\t\t\treturn 0;\n\t\t\t}",
"@Override\n\t\t\tpublic double computeScore(Shop arg0, Shop arg1) {\n\t\t\t\treturn 0;\n\t\t\t}",
"static int calculateScore(Card[] winnings) {\n int score = 0;\n for (Card card : winnings)\n if (card != null)\n score++;\n else\n break;\n return score;\n }",
"public void ruleOutPos(){\n for(int i=0;i<scores.length;i++) {\n for(int j=0;j<scores[i].length;j++) {\n scores[i][j][13] = 0;//0=pass, >0 is fail, set to pass initially\n\n //check Ns - bit crude - what to discount regions with high N\n double ns = (double) scores[i][j][14] / (double) pLens[j];\n if (ns >= minPb | ns >= minPm)//\n scores[i][j][13] += 4;\n\n //probe\n if (hasProbe){\n if (j == 1 | j == 4) {\n double perc = (double) scores[i][j][0] / (double) primers[j].length();\n if (perc >= minPb) {\n scores[i][j][12] = 1;//flag for failed % test\n scores[i][j][13] += 2;\n }\n }\n }\n //primer\n else {\n //if more than 2 mismatches in 1-4nt at 3'\n if(scores[i][j][11]>max14nt) {\n scores[i][j][13]+=1;\n }\n //use mLen (combined F and R length) initially to find initial candidates - filter later\n double perc=(double)scores[i][j][0]/(double)mLen;\n double percI=(double)scores[i][j][0]/(double)pLens[j];\n\n if(perc>=minPm | percI>=minPmI) {\n scores[i][j][12]=1;//flag for failed % test\n scores[i][j][13]+=2;\n }\n }\n }\n }//end of finding positions that prime loop\n }",
"@Test\r\n\tpublic void calculMetricInferiorTeacherBetterScoreButNoLostPointsTest() {\r\n\t\tAssert.assertEquals(UtilCalculGrade.calculMetricInferior(new ModelValue(25f, 1f), 12f, 13f), new Float(0));\r\n\t}",
"int getScore();",
"public Score(){\n\t\tscore = 0;\n\t\tincrement = 0; //how many points for eating a kibble. Changed to zero here because adjustScoreIncrement's extra points begin at 1 anyway\n\t}",
"public Score() {\n this.date = new Date();\n this.name = null;\n this.score = 0;\n }",
"@Override\n\tprotected int calculateScore() {\n\t\treturn Math.abs(playerScore[0] - playerScore[1]);\n\t}",
"@Test\n public void test02() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = new double[6];\n evaluation0.updateNumericScores(doubleArray0, doubleArray0, '\\u0086');\n assertEquals(Double.POSITIVE_INFINITY, evaluation0.meanPriorAbsoluteError(), 0.01D);\n }",
"double getGapScore();",
"long getScore();",
"long getScore();",
"long getScore();",
"long getScore();",
"public int getWorstScore()\n {\n return -1;\n }",
"int score(OfcHandMatrix matrix);",
"@Test\n public void pickUpSomeGoldTest() {\n\tassertNotEquals(0,score);\n }",
"@Override\n public int getScore() {\n return totalScore;\n }",
"public int getTotalScore(){\r\n return totalScore;\r\n }",
"@Override\r\n\tpublic double getScore() \r\n\t{\r\n\t\treturn this._totalScore;\r\n\t}",
"private static float computeScore(GameModel model) {\n\n float score = 0;\n int numEmptyCells = 0;\n for (byte b : model.getGrid()) {\n if (b < 0) {\n numEmptyCells++;\n } else {\n score += 1 << b;\n }\n }\n return score * (1 + numEmptyCells * EMPTY_CELL_SCORE_BONUS);\n }",
"@Test\n public void OriginalScoreTest() {\n score = new OriginalScore();\n\n try {\n //Basados en las fronteras\n score.calculateScore(0, 0);\n score.calculateScore(1, 1);\n score.calculateScore(235, 9);\n score.calculateScore(100, 10);\n } catch (HangmanException e) {\n Assert.fail();\n }\n\n try {\n score.calculateScore(-1, -1);\n Assert.fail();\n } catch (HangmanException e) {\n Assert.assertEquals(e.getMessage(), HangmanException.PARAMETROS_NEGATIVOS);\n }\n\n try {\n score.calculateScore(-2, -2);\n Assert.fail();\n } catch (HangmanException e) {\n Assert.assertEquals(e.getMessage(), HangmanException.PARAMETROS_NEGATIVOS);\n }\n\n\n try {\n score.calculateScore(0, 11);\n Assert.fail();\n } catch (HangmanException e) {\n Assert.assertEquals(e.getMessage(), HangmanException.PARAMETRO_LIMITE_PUNTUACION);\n }\n\n try {\n score.calculateScore(0, 12);\n Assert.fail();\n } catch (HangmanException e) {\n Assert.assertEquals(e.getMessage(), HangmanException.PARAMETRO_LIMITE_PUNTUACION);\n }\n try {\n score.calculateScore(20, 11);\n Assert.fail();\n } catch (HangmanException e) {\n Assert.assertEquals(e.getMessage(), HangmanException.PARAMETRO_LIMITE_PUNTUACION);\n }\n }",
"public void testNoYes () throws Exception{\n\n // RunID TeamID Prob Time Result\n \n String [] runsData = {\n \"5,2,A,12,No\",\n \"6,2,A,12,Yes\",\n };\n \n // Rank TeamId Solved Penalty\n \n String [] rankData = {\n \"1,team2,1,32\",\n \"2,team1,0,0\",\n };\n \n scoreboardTest (2, runsData, rankData);\n }",
"@Override\r\n\tpublic double getScore() {\n\t\treturn score;\r\n\t}",
"@Override\n public Double getValue()\n {\n final ApdexSnapshot snapshot = getSnapshot();\n if (snapshot == null || snapshot.getSize() == 0)\n return 0.0D;\n\n final int satisfied = snapshot.getSatisfiedSize();\n final int tolerating = snapshot.getToleratingSize();\n final int total = snapshot.getSize();\n double score = (satisfied + (tolerating / 2.0)) / total;\n\n return score;\n }",
"public int getTotalScore(){\n return totalScore;\n }",
"protected int getPostiveOnes() {\n Rating[] ratingArray = this.ratings;\n int posOneCount = 0;\n for(int i = 0; i < ratingArray.length; i++) {\n if (ratingArray[i] != null) {\n if(ratingArray[i].getScore() == 1) posOneCount++; \n }\n }\n return posOneCount;\n }",
"public float getScore(){return score;}",
"private double getScore() {\n double score = 0;\n score += getRBAnswers(R.id.radiogroup1, R.id.radiobutton_answer12);\n score += getRBAnswers(R.id.radiogroup2, R.id.radiobutton_answer21);\n score += getRBAnswers(R.id.radiogroup3, R.id.radiobutton_answer33);\n score += getRBAnswers(R.id.radiogroup4, R.id.radiobutton_answer41);\n score += getCBAnswers();\n score += getTextAns();\n score = Math.round(score / .0006);\n score = score / 100;\n return score;\n }",
"public void initScore(@Nonnull Team team){\n\t\t\tif(this.scores.containsKey(team)){\r\n\t\t\t\tscores.put(team, Integer.valueOf(0));\r\n\t\t\t}\r\n\t\t}",
"public void loadScore() {\n for (int i = 0; i < 4; i++) {\n int[] enemyTankNum = CollisionUtility.getEnemyTankNum();\n tankNumList[i] = enemyTankNum[i];\n }\n for (int i = 0; i < 4; i++) {\n tankScoreList[i] = tankNumList[i] * 100 * (i + 1);\n }\n for (Integer score : tankScoreList) {\n totalScore += score;\n }\n for (Integer num : tankNumList) {\n totalTankNum += num;\n }\n }",
"private int[] sauvegarde_scores() {\r\n\t\tint n = moteur_joueur.getJoueurs().length;\r\n\t\tint[] scores_precedents = new int[n];\r\n\t\t\t\t\r\n\t\tfor(int i = 0 ; i < n ; i++) {\r\n\t\t\tscores_precedents[i] = (int)moteur_joueur.getJoueurs()[i].getScore();\r\n\t\t}\r\n\t\t\r\n\t\treturn scores_precedents;\r\n\t}",
"public void findAvg()\n {\n for(int i = 0; i <= scores.length-1; i++)\n {\n for (int j = 0; j <= scores[0].length-1; j++)\n {\n total += scores[i][j];\n }\n }\n System.out.println(\"The class average test score is \" + \n total/24 + \".\");\n }",
"public final Score[] getUnsortedScore() {\n return this.scoreArray;\n }",
"public int calculScore(Deck deck)\n {\n return 0;\n }",
"int getScoresCount();",
"protected abstract boolean canGenerateScore();",
"public double getScore() {\r\n return score;\r\n }",
"@Override\n\tpublic void readScore() {\n\t\t\n\t}",
"@Override\n\tpublic void readScore() {\n\t\t\n\t}",
"public void deleteScore() {\n\t\tthis.score = 0;\n\t}",
"@Test\r\n\tpublic void calculMetricInferiorStudentBetterScoreTest() {\r\n\t\tAssert.assertEquals(UtilCalculGrade.calculMetricInferior(new ModelValue(25f, 2f), 12f, 8f), new Float(0));\r\n\t}",
"public final double[] score0( double[] data, double[] preds ) {\n java.util.Arrays.fill(preds,0);\n h2o_rf_02_Forest_0.score0(data,preds);\n h2o_rf_02_Forest_1.score0(data,preds);\n h2o_rf_02_Forest_2.score0(data,preds);\n h2o_rf_02_Forest_3.score0(data,preds);\n h2o_rf_02_Forest_4.score0(data,preds);\n h2o_rf_02_Forest_5.score0(data,preds);\n h2o_rf_02_Forest_6.score0(data,preds);\n h2o_rf_02_Forest_7.score0(data,preds);\n h2o_rf_02_Forest_8.score0(data,preds);\n h2o_rf_02_Forest_9.score0(data,preds);\n h2o_rf_02_Forest_10.score0(data,preds);\n h2o_rf_02_Forest_11.score0(data,preds);\n h2o_rf_02_Forest_12.score0(data,preds);\n h2o_rf_02_Forest_13.score0(data,preds);\n h2o_rf_02_Forest_14.score0(data,preds);\n h2o_rf_02_Forest_15.score0(data,preds);\n h2o_rf_02_Forest_16.score0(data,preds);\n h2o_rf_02_Forest_17.score0(data,preds);\n h2o_rf_02_Forest_18.score0(data,preds);\n h2o_rf_02_Forest_19.score0(data,preds);\n h2o_rf_02_Forest_20.score0(data,preds);\n h2o_rf_02_Forest_21.score0(data,preds);\n h2o_rf_02_Forest_22.score0(data,preds);\n h2o_rf_02_Forest_23.score0(data,preds);\n h2o_rf_02_Forest_24.score0(data,preds);\n h2o_rf_02_Forest_25.score0(data,preds);\n h2o_rf_02_Forest_26.score0(data,preds);\n h2o_rf_02_Forest_27.score0(data,preds);\n h2o_rf_02_Forest_28.score0(data,preds);\n h2o_rf_02_Forest_29.score0(data,preds);\n h2o_rf_02_Forest_30.score0(data,preds);\n h2o_rf_02_Forest_31.score0(data,preds);\n h2o_rf_02_Forest_32.score0(data,preds);\n h2o_rf_02_Forest_33.score0(data,preds);\n h2o_rf_02_Forest_34.score0(data,preds);\n h2o_rf_02_Forest_35.score0(data,preds);\n h2o_rf_02_Forest_36.score0(data,preds);\n h2o_rf_02_Forest_37.score0(data,preds);\n h2o_rf_02_Forest_38.score0(data,preds);\n h2o_rf_02_Forest_39.score0(data,preds);\n h2o_rf_02_Forest_40.score0(data,preds);\n h2o_rf_02_Forest_41.score0(data,preds);\n h2o_rf_02_Forest_42.score0(data,preds);\n h2o_rf_02_Forest_43.score0(data,preds);\n h2o_rf_02_Forest_44.score0(data,preds);\n h2o_rf_02_Forest_45.score0(data,preds);\n h2o_rf_02_Forest_46.score0(data,preds);\n h2o_rf_02_Forest_47.score0(data,preds);\n h2o_rf_02_Forest_48.score0(data,preds);\n h2o_rf_02_Forest_49.score0(data,preds);\n h2o_rf_02_Forest_50.score0(data,preds);\n h2o_rf_02_Forest_51.score0(data,preds);\n h2o_rf_02_Forest_52.score0(data,preds);\n h2o_rf_02_Forest_53.score0(data,preds);\n h2o_rf_02_Forest_54.score0(data,preds);\n h2o_rf_02_Forest_55.score0(data,preds);\n h2o_rf_02_Forest_56.score0(data,preds);\n h2o_rf_02_Forest_57.score0(data,preds);\n h2o_rf_02_Forest_58.score0(data,preds);\n h2o_rf_02_Forest_59.score0(data,preds);\n h2o_rf_02_Forest_60.score0(data,preds);\n h2o_rf_02_Forest_61.score0(data,preds);\n h2o_rf_02_Forest_62.score0(data,preds);\n h2o_rf_02_Forest_63.score0(data,preds);\n h2o_rf_02_Forest_64.score0(data,preds);\n h2o_rf_02_Forest_65.score0(data,preds);\n h2o_rf_02_Forest_66.score0(data,preds);\n h2o_rf_02_Forest_67.score0(data,preds);\n h2o_rf_02_Forest_68.score0(data,preds);\n h2o_rf_02_Forest_69.score0(data,preds);\n h2o_rf_02_Forest_70.score0(data,preds);\n h2o_rf_02_Forest_71.score0(data,preds);\n h2o_rf_02_Forest_72.score0(data,preds);\n h2o_rf_02_Forest_73.score0(data,preds);\n h2o_rf_02_Forest_74.score0(data,preds);\n h2o_rf_02_Forest_75.score0(data,preds);\n h2o_rf_02_Forest_76.score0(data,preds);\n h2o_rf_02_Forest_77.score0(data,preds);\n h2o_rf_02_Forest_78.score0(data,preds);\n h2o_rf_02_Forest_79.score0(data,preds);\n h2o_rf_02_Forest_80.score0(data,preds);\n h2o_rf_02_Forest_81.score0(data,preds);\n h2o_rf_02_Forest_82.score0(data,preds);\n h2o_rf_02_Forest_83.score0(data,preds);\n h2o_rf_02_Forest_84.score0(data,preds);\n h2o_rf_02_Forest_85.score0(data,preds);\n h2o_rf_02_Forest_86.score0(data,preds);\n h2o_rf_02_Forest_87.score0(data,preds);\n h2o_rf_02_Forest_88.score0(data,preds);\n h2o_rf_02_Forest_89.score0(data,preds);\n h2o_rf_02_Forest_90.score0(data,preds);\n h2o_rf_02_Forest_91.score0(data,preds);\n h2o_rf_02_Forest_92.score0(data,preds);\n h2o_rf_02_Forest_93.score0(data,preds);\n h2o_rf_02_Forest_94.score0(data,preds);\n h2o_rf_02_Forest_95.score0(data,preds);\n h2o_rf_02_Forest_96.score0(data,preds);\n h2o_rf_02_Forest_97.score0(data,preds);\n h2o_rf_02_Forest_98.score0(data,preds);\n h2o_rf_02_Forest_99.score0(data,preds);\n h2o_rf_02_Forest_100.score0(data,preds);\n h2o_rf_02_Forest_101.score0(data,preds);\n h2o_rf_02_Forest_102.score0(data,preds);\n h2o_rf_02_Forest_103.score0(data,preds);\n h2o_rf_02_Forest_104.score0(data,preds);\n h2o_rf_02_Forest_105.score0(data,preds);\n h2o_rf_02_Forest_106.score0(data,preds);\n h2o_rf_02_Forest_107.score0(data,preds);\n h2o_rf_02_Forest_108.score0(data,preds);\n h2o_rf_02_Forest_109.score0(data,preds);\n h2o_rf_02_Forest_110.score0(data,preds);\n h2o_rf_02_Forest_111.score0(data,preds);\n h2o_rf_02_Forest_112.score0(data,preds);\n h2o_rf_02_Forest_113.score0(data,preds);\n h2o_rf_02_Forest_114.score0(data,preds);\n h2o_rf_02_Forest_115.score0(data,preds);\n h2o_rf_02_Forest_116.score0(data,preds);\n h2o_rf_02_Forest_117.score0(data,preds);\n h2o_rf_02_Forest_118.score0(data,preds);\n h2o_rf_02_Forest_119.score0(data,preds);\n h2o_rf_02_Forest_120.score0(data,preds);\n h2o_rf_02_Forest_121.score0(data,preds);\n h2o_rf_02_Forest_122.score0(data,preds);\n h2o_rf_02_Forest_123.score0(data,preds);\n h2o_rf_02_Forest_124.score0(data,preds);\n h2o_rf_02_Forest_125.score0(data,preds);\n h2o_rf_02_Forest_126.score0(data,preds);\n h2o_rf_02_Forest_127.score0(data,preds);\n h2o_rf_02_Forest_128.score0(data,preds);\n h2o_rf_02_Forest_129.score0(data,preds);\n h2o_rf_02_Forest_130.score0(data,preds);\n h2o_rf_02_Forest_131.score0(data,preds);\n h2o_rf_02_Forest_132.score0(data,preds);\n h2o_rf_02_Forest_133.score0(data,preds);\n h2o_rf_02_Forest_134.score0(data,preds);\n h2o_rf_02_Forest_135.score0(data,preds);\n h2o_rf_02_Forest_136.score0(data,preds);\n h2o_rf_02_Forest_137.score0(data,preds);\n h2o_rf_02_Forest_138.score0(data,preds);\n h2o_rf_02_Forest_139.score0(data,preds);\n h2o_rf_02_Forest_140.score0(data,preds);\n h2o_rf_02_Forest_141.score0(data,preds);\n h2o_rf_02_Forest_142.score0(data,preds);\n h2o_rf_02_Forest_143.score0(data,preds);\n h2o_rf_02_Forest_144.score0(data,preds);\n h2o_rf_02_Forest_145.score0(data,preds);\n h2o_rf_02_Forest_146.score0(data,preds);\n h2o_rf_02_Forest_147.score0(data,preds);\n h2o_rf_02_Forest_148.score0(data,preds);\n h2o_rf_02_Forest_149.score0(data,preds);\n h2o_rf_02_Forest_150.score0(data,preds);\n h2o_rf_02_Forest_151.score0(data,preds);\n h2o_rf_02_Forest_152.score0(data,preds);\n h2o_rf_02_Forest_153.score0(data,preds);\n h2o_rf_02_Forest_154.score0(data,preds);\n h2o_rf_02_Forest_155.score0(data,preds);\n h2o_rf_02_Forest_156.score0(data,preds);\n h2o_rf_02_Forest_157.score0(data,preds);\n h2o_rf_02_Forest_158.score0(data,preds);\n h2o_rf_02_Forest_159.score0(data,preds);\n h2o_rf_02_Forest_160.score0(data,preds);\n h2o_rf_02_Forest_161.score0(data,preds);\n h2o_rf_02_Forest_162.score0(data,preds);\n h2o_rf_02_Forest_163.score0(data,preds);\n h2o_rf_02_Forest_164.score0(data,preds);\n h2o_rf_02_Forest_165.score0(data,preds);\n h2o_rf_02_Forest_166.score0(data,preds);\n h2o_rf_02_Forest_167.score0(data,preds);\n h2o_rf_02_Forest_168.score0(data,preds);\n h2o_rf_02_Forest_169.score0(data,preds);\n h2o_rf_02_Forest_170.score0(data,preds);\n h2o_rf_02_Forest_171.score0(data,preds);\n h2o_rf_02_Forest_172.score0(data,preds);\n h2o_rf_02_Forest_173.score0(data,preds);\n h2o_rf_02_Forest_174.score0(data,preds);\n h2o_rf_02_Forest_175.score0(data,preds);\n h2o_rf_02_Forest_176.score0(data,preds);\n h2o_rf_02_Forest_177.score0(data,preds);\n h2o_rf_02_Forest_178.score0(data,preds);\n h2o_rf_02_Forest_179.score0(data,preds);\n h2o_rf_02_Forest_180.score0(data,preds);\n h2o_rf_02_Forest_181.score0(data,preds);\n h2o_rf_02_Forest_182.score0(data,preds);\n h2o_rf_02_Forest_183.score0(data,preds);\n h2o_rf_02_Forest_184.score0(data,preds);\n h2o_rf_02_Forest_185.score0(data,preds);\n h2o_rf_02_Forest_186.score0(data,preds);\n h2o_rf_02_Forest_187.score0(data,preds);\n h2o_rf_02_Forest_188.score0(data,preds);\n h2o_rf_02_Forest_189.score0(data,preds);\n h2o_rf_02_Forest_190.score0(data,preds);\n h2o_rf_02_Forest_191.score0(data,preds);\n h2o_rf_02_Forest_192.score0(data,preds);\n h2o_rf_02_Forest_193.score0(data,preds);\n h2o_rf_02_Forest_194.score0(data,preds);\n h2o_rf_02_Forest_195.score0(data,preds);\n h2o_rf_02_Forest_196.score0(data,preds);\n h2o_rf_02_Forest_197.score0(data,preds);\n h2o_rf_02_Forest_198.score0(data,preds);\n h2o_rf_02_Forest_199.score0(data,preds);\n double sum = 0;\n for(int i=1; i<preds.length; i++) { sum += preds[i]; }\n if (sum>0) for(int i=1; i<preds.length; i++) { preds[i] /= sum; }\n preds[0] = hex.genmodel.GenModel.getPrediction(preds, PRIOR_CLASS_DISTRIB, data, 0.5);\n return preds;\n }",
"@Test\r\n\tpublic void calculLostPointsByQualityAxisIfOneQualityAxisIsAbsentTest()\r\n\t\t\tthrows ClassNotFoundException, SonarqubeDataBaseException, SQLException, IOException {\r\n\t\tmapQuality.remove(\"Comments\");\r\n\t\tlistLostPoints.remove(\"Comments\");\r\n\t\tlistLostPoints.put(\"TestOfTeacher\", 0.0f);\r\n\t\tAssert.assertEquals(UtilCalculGrade.calculLostPointsByQualityAxis(mapQuality, listScoreMetricStudent,\r\n\t\t\t\tlistScoreMetricTeacher, projectName, idModule), listLostPoints);\r\n\t}",
"@Override\r\n\tpublic int totalScore(GradeBean param) {\n\t\treturn 0;\r\n\t}",
"public Double getScore() {\n return this.score;\n }",
"public Double getScore() {\n return this.score;\n }",
"@Test\n\tpublic void priorsAreReasonable() {\n\t\tdouble tot = 0;\n\t\tboolean zeroPrior = false;\n\t\tfor(NewsGroup g: groups) {\n\t\t\tdouble p = g.getPrior();\n\t\t\ttot+=p;\n\t\t\tif(p == 0.0) {\n\t\t\t\tzeroPrior = true;\n\t\t\t}\n\t\t}\n\t\tassertTrue((tot == 1) && !zeroPrior);\n\t}",
"public BigDecimal getScores() {\n return scores;\n }",
"public MatcherScores()\n {\n // do nothing\n }",
"public void calculateScores()\r\n {\r\n for(int i = 0; i < gameBoard.getBoardRows(); i++)\r\n for(int j = 0; j < gameBoard.getBoardCols(); j++)\r\n {\r\n if(gameBoard.tilePlayer(i,j) == 0)\r\n currentRedScore = currentRedScore + gameBoard.tileScore(i,j);\r\n if(gameBoard.tilePlayer(i,j) == 1)\r\n currentBlueScore = currentBlueScore + gameBoard.tileScore(i,j);\r\n }\r\n }",
"public int getScore ()\r\n {\r\n\treturn score;\r\n }",
"int getMissingCount();",
"Float getAutoScore();",
"public int finalScore() {\n\t\tint total = 0;\n\t\tfor (Frame frame : frames) {\n\t\t\ttotal += frame.getScore(); // running total of each frames score added \n\t\t}\n\t\treturn total;\n\t}",
"public int getScore() {return score;}",
"@Test(timeout = 4000)\n public void test070() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = new double[7];\n evaluation0.updateNumericScores(doubleArray0, doubleArray0, 0.0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }",
"public int getScore() { return score; }",
"@Override\n\tpublic void loadScore() {\n\n\t}",
"boolean isMismatch(double score);",
"public void newScore()\n {\n score.clear();\n }",
"public int getScore()\n {\n return points + extras;\n }",
"public Float getScore() {\n return score;\n }"
] |
[
"0.66731334",
"0.6670957",
"0.66270846",
"0.6616965",
"0.6611152",
"0.6575503",
"0.65392286",
"0.64749557",
"0.64398664",
"0.64398664",
"0.639565",
"0.63714916",
"0.63599014",
"0.633727",
"0.63334066",
"0.6307189",
"0.6293517",
"0.6285696",
"0.6283849",
"0.6277888",
"0.62233657",
"0.6213222",
"0.62080806",
"0.6196983",
"0.6191101",
"0.61641437",
"0.6147085",
"0.61468154",
"0.61279774",
"0.6126753",
"0.6126753",
"0.61202365",
"0.6117037",
"0.6111324",
"0.6110204",
"0.6108686",
"0.60924685",
"0.60924685",
"0.6077943",
"0.60674775",
"0.60628206",
"0.6057775",
"0.6032614",
"0.60258925",
"0.59912205",
"0.59887093",
"0.59777504",
"0.5953014",
"0.5953014",
"0.5953014",
"0.5953014",
"0.5943863",
"0.5938384",
"0.5929433",
"0.5928393",
"0.5926286",
"0.59234625",
"0.5917073",
"0.5901389",
"0.5900832",
"0.5887448",
"0.58747655",
"0.5870365",
"0.5865354",
"0.5860285",
"0.58589137",
"0.5850687",
"0.5848866",
"0.5847278",
"0.5845499",
"0.5841814",
"0.5838839",
"0.5834852",
"0.58343977",
"0.58208716",
"0.58188176",
"0.58188176",
"0.58160526",
"0.58125556",
"0.5803838",
"0.5803425",
"0.5797271",
"0.5795535",
"0.5795535",
"0.5795044",
"0.5788416",
"0.5784331",
"0.5780616",
"0.57713836",
"0.576577",
"0.5763948",
"0.5762373",
"0.5758399",
"0.5757645",
"0.57557476",
"0.5755287",
"0.5749709",
"0.57470036",
"0.5743393",
"0.5737654"
] |
0.6532794
|
7
|
Makes sure Android Studio has focus, useful when running with a window manager
|
@NotNull
public static ThemeEditorFixture openThemeEditor(@NotNull IdeFrameFixture projectFrame) {
projectFrame.focus();
EditorFixture editor = projectFrame.getEditor();
editor.open("app/src/main/res/values/styles.xml", EditorFixture.Tab.EDITOR);
EditorNotificationPanelFixture notificationPanel =
projectFrame.requireEditorNotification("Edit all themes in the project in the theme editor.");
notificationPanel.performAction("Open editor");
ThemeEditorFixture themeEditor = editor.getThemeEditor();
themeEditor.getThemePreviewPanel().getPreviewPanel().waitForRender();
return themeEditor;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public void tryLockFocus() {\n }",
"public void requestFocus() {\n // Not supported for MenuComponents\n }",
"public void setFocus();",
"@Override\n public void onWindowFocusChanged(boolean hasFocus) {\n }",
"public void focus() {}",
"void setFocus();",
"public void setFocus() {\n\t}",
"boolean isTestAlwaysFocus();",
"public void setFocus() {\n }",
"public void requestInputFocus(){\n\t\tuserInput.requestFocus();\n\t}",
"@Override\r\n\tpublic void windowOpened(WindowEvent e) {\n\t\tsetFocusableWindowState(true);\r\n\t}",
"public void initializeFocusModeSettings() {\n }",
"public void setFocus() {\n \t\tex.setFocus();\n \t}",
"void focus();",
"void focus();",
"private void requestFocus(View view) {\n if (view.requestFocus()) {\n getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_VISIBLE);\n }\n }",
"boolean getStartupFocusPref();",
"@Override\r\n\tpublic void windowActivated(WindowEvent e) {\n\t\tsetFocusableWindowState(true);\r\n\t}",
"@Override\r\n\tpublic boolean isFocused() {\n\t\treturn false;\r\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 public void setFocus()\n {\n this.textInput.setFocus();\n }",
"public void focus() {\n getRoot().requestFocus();\n }",
"private void m16568d() {\n if (this.f14721d && !this.f14719b && !this.f14720c) {\n try {\n this.f14722e.autoFocus(this.f14726j);\n this.f14720c = true;\n } catch (Throwable e) {\n Log.w(f14717a, \"Unexpected exception while focusing\", e);\n m16565c();\n }\n }\n }",
"@Override\r\n public void onActivityCreated(Bundle savedInstanceState) {\r\n super.onActivityCreated(savedInstanceState);\r\n getDialog().getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_VISIBLE);\r\n }",
"@Override\r\n public void onActivityCreated(Bundle savedInstanceState) {\r\n super.onActivityCreated(savedInstanceState);\r\n getDialog().getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_VISIBLE);\r\n }",
"@Override\r\n\tpublic void setFocus() {\r\n\t}",
"@Override\n public void setFocus() {\n }",
"public boolean isFocused() {\n/* 807 */ throw new RuntimeException(\"Stub!\");\n/* */ }",
"public ControlArbAppFocus () {\n inputManager = InputManager3D.getInputManager();\n }",
"public void setFocus() {\n startButton.setFocus();\n }",
"@Ignore(\"b/72154153\")\n @Test\n public void testFocusedViewInNormalCase() {\n controller.menuHelper.showMenu();\n controller.menuHelper.assertNavigateToPlayControlsRow();\n assertButtonHasFocus(BUTTON_ID_PLAY_PAUSE);\n controller.pressBack();\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}",
"@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}",
"protected void onFocusGained()\n {\n ; // do nothing. \n }",
"@Override\n\tpublic void setFocus() {\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 setFocus() {\n\t\tui.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 setFocused(boolean focused) {\n/* 822 */ throw new RuntimeException(\"Stub!\");\n/* */ }",
"@Override\r\n\tpublic void setFocus() {\n\t\t\r\n\t}",
"protected void doSetFocus() {\n\t\t// Ignore\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\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 Focus() {\n }",
"public void setGlobalPermanentFocusOwner(Component focusOwner)\n {\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 }",
"protected void resetFocus() {\n passwordPF.requestFocusInWindow();\n }",
"void addFocus();",
"public void requestFocus() {\n\t\tif (camera != null && previewing) {\n\t\t\tautoFocusManager.stop();\n\t\t\tLog.d(TAG, \"Requesting one focus\");\n\t\t\tcamera.autoFocus(null);\n\t\t}\n\t}",
"void resetFocus();",
"void resetFocus();",
"@Override\n public void onWindowFocusChanged( final boolean hasWindowFocus )\n {\n if( !hasWindowFocus )\n {\n // thread.pause();\n }\n }",
"public void switchToDefaultWindow() {\n\n\t}",
"@Override\n public void onWindowFocusChanged(boolean hasFocus) {\n super.onWindowFocusChanged(hasFocus);\n if (hasFocus) {\n decorView.setSystemUiVisibility(hideSystemBars());\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}",
"public void setFocus() {\n\t\tviewer.getControl().setFocus();\n\t}",
"public void focus() {\n if (toSetFocus != null) {\n toSetFocus.requestFocus();\n } else {\n root.requestFocus();\n toSetFocus = null;\n }\n }",
"public boolean setFocusedApp(AppWindowToken newFocus) {\n AppWindowToken appWindowToken;\n DisplayContent appDisplay;\n if (newFocus != null && (appDisplay = newFocus.getDisplayContent()) != this) {\n StringBuilder sb = new StringBuilder();\n sb.append(newFocus);\n sb.append(\" is not on \");\n sb.append(getName());\n sb.append(\" but \");\n sb.append(appDisplay != null ? appDisplay.getName() : \"none\");\n throw new IllegalStateException(sb.toString());\n } else if (this.mFocusedApp == newFocus) {\n return false;\n } else {\n this.mWmService.mHwWMSEx.checkSingleHandMode(this.mFocusedApp, newFocus);\n this.mFocusedApp = newFocus;\n this.mWmService.mAtmService.mHwATMSEx.onWindowFocusChangedForMultiDisplay(newFocus);\n if (HwPCUtils.isPcCastModeInServer() && (appWindowToken = this.mFocusedApp) != null && !appWindowToken.getDisplayContent().isDefaultDisplay) {\n this.mWmService.setPCLauncherFocused(false);\n }\n getInputMonitor().setFocusedAppLw(newFocus);\n updateTouchExcludeRegion();\n return true;\n }\n }",
"void onAutoFocus(boolean success, Camera camera);",
"@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 void setFocus() {\n\t\tthis.viewer.getControl().setFocus();\n\t}",
"protected void onResume(){\n super.onResume();\n hideSystemUI();\n if (!coreView.isGamePaused()) //only resume game if there wasn't a manual pause prior to losing focus\n coreView.resume();\n }",
"public void setFocused(boolean focused);",
"@Override\r\n public void activate() {\r\n super.getShell().setActive();\r\n }",
"private void setFocus(EditText edit)\n {\n edit.requestFocus();\n\n showKeyboard(getActivity());\n }",
"@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 }",
"public void activateButton() {\n\t\tif (isBrowser) this.bringToBack();\r\n\t\tMainActivity.resetXY();\r\n\t}",
"public void setAccessibilityFocused(boolean focused) {\n/* 868 */ throw new RuntimeException(\"Stub!\");\n/* */ }",
"public void setFocus() {\r\n System.out.println(\"TN5250JPart: calling SetSessionFocus.run(): \" + tn5250jPart.getClass().getSimpleName());\r\n SetSessionFocus.run(tabFolderSessions.getSelectionIndex(), -1, tn5250jPart);\r\n }",
"public void setPollFocusedProgram(boolean value) {\n settings.put(\"pollFocused\", value + \"\");\n }",
"public void pauseApp() {\n try {\n if (myCanvas != null) {\n setGoCommand();\n systemPauseThreads();\n }\n } catch (Exception e) {\n errorMsg(e);\n }\n }",
"@Override\n public void onWindowFocusChanged(boolean hasWindowFocus) {\n super.onWindowFocusChanged(hasWindowFocus);\n }",
"private void setWindowType() {\r\n\t\tgetActivity().getWindow().setSoftInputMode(\r\n\t\t\t\tWindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE\r\n\t\t\t\t\t\t| WindowManager.LayoutParams.SOFT_INPUT_ADJUST_PAN\r\n\t\t\t\t\t\t| WindowManager.LayoutParams.SOFT_INPUT_STATE_HIDDEN);\r\n\t}",
"public abstract void requestFocusToSecondaryPhone();",
"public void setInputMethodShowOn() {\n\n }",
"public void setInputMethodShowOff() {\n\n }",
"@Override\n public void onWindowFocusChanged(boolean hasFocus) {\n super.onWindowFocusChanged(hasFocus);\n if(!hasFocus) {\n // Close every kind of system dialog\n Intent closeDialog = new Intent(Intent.ACTION_CLOSE_SYSTEM_DIALOGS);\n sendBroadcast(closeDialog);\n }\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 setAutoFocus() {\n \tCamera.Parameters params = mCamera.getParameters();\n \tList<String> focusModes = params.getSupportedFocusModes();\n \tif (focusModes.contains(Camera.Parameters.FOCUS_MODE_CONTINUOUS_VIDEO)) {\n \t\tparams.setFocusMode(Camera.Parameters.FOCUS_MODE_CONTINUOUS_VIDEO);\n \t\tmCamera.setParameters(params);\n \t}\n }",
"@Override\n\tprotected void onResume()\n\t{\n\t\tsuper.onResume();\n\t\t// hideSoftKeyboard();\n\t}",
"public boolean isScreenReaderFocusable() {\n/* 1331 */ throw new RuntimeException(\"Stub!\");\n/* */ }",
"public void showKeyboard(){\n\t\tInputMethodManager inputMethodManager = (InputMethodManager) getApplicationContext().getSystemService(Context.INPUT_METHOD_SERVICE);\n\t\tinputMethodManager.toggleSoftInput(InputMethodManager.SHOW_FORCED, 0);\n\t}",
"public void requestFocus() {\n\n if (MyTextArea != null)\n MyTextArea.requestFocus();\n\n }",
"private boolean requestFocus() {\n int result = mAm.requestAudioFocus(afChangeListener,\n // Use the music stream.\n AudioManager.STREAM_MUSIC,\n // Request permanent focus.\n AudioManager.AUDIOFOCUS_GAIN);\n return result == AudioManager.AUDIOFOCUS_REQUEST_GRANTED;\n }",
"void setAlwaysOnTop(boolean always);",
"public boolean updateFocusedWindowLocked(int mode, boolean updateInputWindows, int topFocusedDisplayId) {\n WindowState newFocus = findFocusedWindowIfNeeded(topFocusedDisplayId);\n boolean hasOtherFocusedDisplay = false;\n if (this.mCurrentFocus == newFocus) {\n return false;\n }\n boolean imWindowChanged = false;\n if (this.mInputMethodWindow != null) {\n imWindowChanged = this.mInputMethodTarget != computeImeTarget(true);\n if (!(mode == 1 || mode == 3)) {\n assignWindowLayers(false);\n }\n }\n if (imWindowChanged) {\n this.mWmService.mWindowsChanged = true;\n setLayoutNeeded();\n newFocus = findFocusedWindowIfNeeded(topFocusedDisplayId);\n }\n if (this.mCurrentFocus != newFocus) {\n this.mWmService.mH.obtainMessage(2, this).sendToTarget();\n }\n if (!WindowManagerDebugConfig.DEBUG_FOCUS_LIGHT) {\n WindowManagerService windowManagerService = this.mWmService;\n }\n Slog.i(TAG, \"Changing focus from \" + this.mCurrentFocus + \" to \" + newFocus + \" displayId=\" + getDisplayId() + \" Callers=\" + Debug.getCallers(4));\n WindowState oldFocus = this.mCurrentFocus;\n this.mCurrentFocus = newFocus;\n if (this.mWmService.mRtgSchedSwitch) {\n this.mWmService.mHwWMSEx.sendFocusProcessToRMS(this.mCurrentFocus, oldFocus);\n }\n if (HwPCUtils.isPcCastModeInServer() && newFocus != null) {\n this.mCurrentFocusInHwPc = newFocus;\n }\n this.mLosingFocus.remove(newFocus);\n if (newFocus != null) {\n this.mWinAddedSinceNullFocus.clear();\n this.mWinRemovedSinceNullFocus.clear();\n if (newFocus.canReceiveKeys()) {\n newFocus.mToken.paused = false;\n }\n }\n int focusChanged = getDisplayPolicy().focusChangedLw(oldFocus, newFocus);\n if (imWindowChanged && oldFocus != this.mInputMethodWindow) {\n if (mode == 2) {\n performLayout(true, updateInputWindows);\n focusChanged &= -2;\n } else if (mode == 3) {\n assignWindowLayers(false);\n }\n }\n if ((focusChanged & 1) != 0) {\n setLayoutNeeded();\n if (mode == 2) {\n performLayout(true, updateInputWindows);\n } else if (mode == 4) {\n this.mWmService.mRoot.performSurfacePlacement(false);\n }\n }\n if (mode != 1) {\n getInputMonitor().setInputFocusLw(newFocus, updateInputWindows);\n }\n if (!this.mWmService.mPerDisplayFocusEnabled) {\n DisplayContent focusedContent = this.mWmService.mRoot.getDisplayContent(topFocusedDisplayId);\n if (this.mCurrentFocus == null && focusedContent != null) {\n hasOtherFocusedDisplay = true;\n }\n AppWindowTokenEx appWindowTokenEx = new AppWindowTokenEx();\n if (hasOtherFocusedDisplay) {\n WindowStateCommonEx windowStateEx = new WindowStateCommonEx(focusedContent.mCurrentFocus);\n appWindowTokenEx.setAppWindowToken(focusedContent.mFocusedApp);\n this.mHwDisplayCotentEx.focusWinZrHung(windowStateEx, appWindowTokenEx, focusedContent.getDisplayId());\n } else {\n WindowStateCommonEx windowStateEx2 = new WindowStateCommonEx(this.mCurrentFocus);\n appWindowTokenEx.setAppWindowToken(this.mFocusedApp);\n this.mHwDisplayCotentEx.focusWinZrHung(windowStateEx2, appWindowTokenEx, getDisplayId());\n }\n }\n adjustForImeIfNeeded();\n scheduleToastWindowsTimeoutIfNeededLocked(oldFocus, newFocus);\n if (mode != 2) {\n return true;\n }\n this.pendingLayoutChanges |= 8;\n return true;\n }"
] |
[
"0.6522322",
"0.62414724",
"0.62296784",
"0.621226",
"0.6184285",
"0.6162104",
"0.6140059",
"0.61249155",
"0.61040366",
"0.6048719",
"0.6042208",
"0.60165614",
"0.60123974",
"0.59962076",
"0.59962076",
"0.5990056",
"0.5985494",
"0.5970097",
"0.59595484",
"0.59496975",
"0.5945374",
"0.5925712",
"0.5919673",
"0.5906866",
"0.5906866",
"0.5903878",
"0.58923256",
"0.5888651",
"0.58857304",
"0.5878938",
"0.5878036",
"0.58765733",
"0.58518857",
"0.58518857",
"0.58518857",
"0.58518857",
"0.58518857",
"0.58333045",
"0.5830279",
"0.5824511",
"0.5821743",
"0.5799546",
"0.5799546",
"0.5799546",
"0.5799546",
"0.5799546",
"0.5799546",
"0.5799546",
"0.57900953",
"0.57880694",
"0.57724375",
"0.576882",
"0.57445306",
"0.57445306",
"0.57445306",
"0.57445306",
"0.57402897",
"0.57314146",
"0.57039154",
"0.57015854",
"0.56675726",
"0.56583244",
"0.5657366",
"0.5657366",
"0.56528586",
"0.5633295",
"0.56312066",
"0.5624988",
"0.5602302",
"0.5602302",
"0.5602302",
"0.5589675",
"0.55799544",
"0.55621076",
"0.55557346",
"0.55556387",
"0.5531895",
"0.5520244",
"0.5518048",
"0.5515503",
"0.5510516",
"0.5507515",
"0.5496172",
"0.5487564",
"0.5476984",
"0.5475917",
"0.5475304",
"0.5472278",
"0.54666257",
"0.5461845",
"0.5459035",
"0.545881",
"0.5452576",
"0.5450374",
"0.54448354",
"0.5443814",
"0.5435461",
"0.5428925",
"0.542258",
"0.54166895",
"0.5414244"
] |
0.0
|
-1
|
Returns the attributes that were defined in the theme itself and not its parents.
|
public static Collection<EditedStyleItem> getStyleLocalValues(@NotNull final ThemeEditorStyle style) {
final Set<String> localAttributes = Sets.newHashSet();
for (ConfiguredElement<ItemResourceValue> value : style.getConfiguredValues()) {
localAttributes.add(ResolutionUtils.getQualifiedItemName(value.getElement()));
}
final ThemeResolver resolver = new ThemeResolver(style.getConfiguration());
return Collections2.filter(ThemeEditorUtils.resolveAllAttributes(style, resolver), new Predicate<EditedStyleItem>() {
@Override
public boolean apply(@javax.annotation.Nullable EditedStyleItem input) {
assert input != null;
return localAttributes.contains(input.getQualifiedName());
}
});
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public String getAttributes() {\n\t\treturn getProperty(\"attributes\");\n\t}",
"public AttributeSet getAttributes() {\n return null;\n }",
"public Attributes getAttributes() {\n\t\treturn null;\r\n\t}",
"@Override\n\tpublic AttributeSet getAttributes() {\n\t\treturn null;\n\t}",
"@Override\r\n\tpublic Map<String, Object> getAttributes() {\n\t\treturn null;\r\n\t}",
"@Override\n\tpublic AttributeMap getAttributes() {\n\t\treturn defaultEdgle.getAttributes();\n\t}",
"Attributes getAttributes();",
"public Map<String, String> getAttributes() {\n\t\treturn atts;\n\t}",
"public List<Attribute<?>> getAttributes() {\r\n\t\treturn Collections.unmodifiableList(attributes);\r\n\t}",
"public String[] getAllAttributes() {\n\t\treturn allAttributes;\n\t}",
"public Object[] getAttributes() {\n\t\treturn new Object[] {true}; //true for re-init... \n\t}",
"@Override\r\n\tpublic Map<String, String> getAttributes() {\r\n\t\treturn this.attributes;\r\n\t}",
"public String[] getRelevantAttributes();",
"public Map<String, String> getAttributes() {\n\t\treturn attributes;\n\t}",
"public Attribute[] getAvailableAttributes(){\n Attribute attributes[] = {\n TextAttribute.FAMILY,\n TextAttribute.WEIGHT,\n TextAttribute.POSTURE,\n TextAttribute.SIZE,\n\t TextAttribute.TRANSFORM,\n TextAttribute.SUPERSCRIPT,\n TextAttribute.WIDTH,\n };\n\n return attributes;\n }",
"public Map<String, String> getAttributes() {\n return Collections.unmodifiableMap(attributes);\n }",
"public final String[] getAttributes() {\n return this.attributes;\n }",
"public Map<TextAttribute,?> getAttributes(){\n return (Map<TextAttribute,?>)getRequestedAttributes().clone();\n }",
"Map<String, String> getAttributes();",
"public java.util.Collection getAttributes();",
"public String getAttributes() {\n return attributes;\n }",
"public String getAttributes() {\n return attributes;\n }",
"public List<Pair<String, String>> getAttributes() {\n\t\treturn attributes;\n\t}",
"public Attribute[] getAttributes()\n {\n return _attrs;\n }",
"@Override\n\tpublic Attributes getAttributes() {\n\t\treturn (Attributes)map.get(ATTRIBUTES);\n\t}",
"public Map<String, Set<String>> getAttributes() {\n return attributes;\n }",
"public List<Attribute> getAttributes() {\n return Collections.unmodifiableList(attributes);\n }",
"public Attributes getAttributes() { return this.attributes; }",
"public Map<String, Object> getAttributesMap() {\n\t\treturn this.staticAttributes;\n\t}",
"public Set<String> getAllAttributes() {\r\n if (parent.isPresent()) {\r\n return Sets.union(attributeMap.keySet(), parent.get().getAllAttributes());\r\n } else {\r\n return getAttributes();\r\n }\r\n }",
"BidiMap<String, DictionarySimpleAttribute> getUnmodifiableAttributes() {\n\t\treturn UnmodifiableBidiMap.unmodifiableBidiMap(this.attributes);\n\t}",
"public Map<String, String> getAttributes();",
"public List<TLAttribute> getAttributes();",
"IAttributes getAttributes();",
"public Attributes[] getAllAttributes() \r\n {\r\n\tfinal Attributes[] array = new Attributes[ntMap.size()];\r\n\tint i=0;\r\n\tfor (final NodeTypeHolder nt : ntMap.values())\r\n\t array[i++] = nt.getAttributes();\r\n\treturn array;\r\n }",
"Map<String, Object> getAttributes();",
"Map<String, Object> getAttributes();",
"Map<String, Object> getAttributes();",
"public WSLAttributeList getAttributes() {return attributes;}",
"public List<Attribute> getAttributes() {\r\n return attributes;\r\n }",
"public Set<String> getAttributes() {\r\n return attributeMap.keySet();\r\n }",
"private Attributes getAttributes()\r\n\t{\r\n\t return attributes;\r\n\t}",
"public final Map<String, DomAttr> getAttributesMap() {\n return attributes_;\n }",
"public Map<String, Object> getAttributes();",
"public Map<String, Object> getAttributes();",
"@Override\n public ArrayList<SCANAttributesXML> getAttributes() {\n return mesoCfgXML.getAttributesData();\n }",
"public FactAttributes getAttributes() {\r\n return localAttributes;\r\n }",
"public List<GenericAttribute> getAttributes() {\n return attributes;\n }",
"public String getAttributes() {\n StringBuilder sb = new StringBuilder();\n\n // class\n if (!getClassAttribute().isEmpty()) {\n sb.append(\"class='\").append(getClassAttribute()).append(\"' \");\n }\n\n // data-*\n if (!getDataAttributes().isEmpty()) {\n sb.append(getDataAttributes()).append(\" \");\n }\n\n // hidden\n if (isHiddenAttribute()) {\n //sb.append(\"hidden \");\n addSpecialAttribute(\"hidden\");\n }\n\n // id\n if (!getIdAttribute().isEmpty()) {\n sb.append(\"id='\").append(getIdAttribute()).append(\"' \");\n }\n\n // style\n if (!getStyleAttribute().isEmpty()) {\n sb.append(\"style='\").append(getStyleAttribute()).append(\"' \");\n }\n\n // title\n if (!getTitleAttribute().isEmpty()) {\n sb.append(\"title='\").append(getTitleAttribute()).append(\"' \");\n }\n\n // custom\n if (!getCustomAttributes().isEmpty()) {\n sb.append(getCustomAttributes()).append(\" \");\n }\n \n // special\n if (!getSpecialAttribute().isEmpty()) {\n sb.append(getSpecialAttribute());\n }\n\n return sb.toString().trim();\n }",
"public final native JsArray<Attribute> getAttributes() /*-{\n\t\t\treturn this.attributes;\n\t\t}-*/;",
"public List<String> attributes() {\n return this.attributes;\n }",
"public java.lang.Integer getBgElementAttributes() {\r\n return bgElementAttributes;\r\n }",
"public Attributes getContextAttributes() {\r\n return this.atts;\r\n }",
"@Override\n\tpublic Collection<ConfigAttribute> getAllConfigAttributes() {\n\t\treturn null;\n\t}",
"public Collection<ConfigAttribute> getAllConfigAttributes() {\n\t\treturn null;\n\t}",
"public abstract Map<String, Object> getAttributes();",
"@Override\n public List<MappedField<?>> getAttributes() {\n return attributes;\n }",
"@Override\r\n\t\tpublic NamedNodeMap getAttributes()\r\n\t\t\t{\n\t\t\t\treturn null;\r\n\t\t\t}",
"public java.lang.Integer getAttributes() {\r\n return attributes;\r\n }",
"public String getListAttributesPref()\n {\n Serializer<Collection<RecognizedElement>> serializer = new Serializer<Collection<RecognizedElement>>();\n return serializer.serialize(tree.getChildren());\n }",
"public abstract Map getAttributes();",
"public final int getAttributes() {\n\t\treturn m_info.getFileAttributes();\n\t}",
"@Override\n public synchronized Set<AttributeType> getAttributes() {\n return attributes = nonNullSet(attributes, AttributeType.class);\n }",
"public HashSet<String> getUsefulAttributes() {\n\t\t \n\t\tHashSet<String> attr = new HashSet<>();\n\t\tQuery firstQ = this.rset.get(1); // get first query on rewriting set 'rset'.\n\t\t\n\t\tGrouping gPart = firstQ.getQueryTriple()._1();\n\t attr.addAll(gPart.getUsefulAttributes());\n\t \n\t Measuring mPart = firstQ.getQueryTriple()._2();\n\t attr.addAll(mPart.getMeasuringAttributes());\n\t \n\t\treturn attr;\n\t}",
"public Map getAttributes() {\n Map common = channel.getAttributes();\n \n if(map == null) {\n map = new HashMap(common);\n }\n return map;\n }",
"@java.lang.Override\n public trinsic.services.common.v1.CommonOuterClass.JsonPayload getAttributes() {\n return attributes_ == null ? trinsic.services.common.v1.CommonOuterClass.JsonPayload.getDefaultInstance() : attributes_;\n }",
"public String[] getResourceAttributeNames()\n {\n return null;\n }",
"@Override\r\n\t\tpublic boolean hasAttributes()\r\n\t\t\t{\n\t\t\t\treturn false;\r\n\t\t\t}",
"protected Map<String, String> getElementAttributes() {\n // Preserve order of attributes\n Map<String, String> attrs = new HashMap<>();\n\n if (this.getName() != null) {\n attrs.put(\"name\", this.getName());\n }\n if (this.getValue() != null) {\n attrs.put(\"value\", this.getValue());\n }\n\n return attrs;\n }",
"@Nullable\n public Map<String, Object> getCustomAttributes() {\n return mCustomAttributes;\n }",
"private String getCustomAttributes() {\n StringBuilder sb = new StringBuilder();\n\n customAttribute.forEach((key, value) -> {\n sb.append(key).append(\"='\").append(value).append(\"' \");\n });\n\n return sb.toString().trim();\n }",
"public Map<QName, String> getOtherAttributes() {\n\t\t\treturn otherAttributes;\n\t\t}",
"public Map<QName, String> getOtherAttributes() {\n\t\t\treturn otherAttributes;\n\t\t}",
"public Set<String> Atributos()\n {\n return this.repositorio.keySet();\n }",
"public Map<QName, String> getOtherAttributes() {\n\t\t\t\treturn otherAttributes;\n\t\t\t}",
"public TableAttributes getAttributes() {\n\treturn attrs;\n }",
"@Override\n\tpublic String[] getAttrNames() {\n\t\treturn null;\n\t}",
"public VAttribute[] getAttributes() throws VlException \n {\n return getAttributes(getAttributeNames());\n }",
"public Map<QName, String> getOtherAttributes() {\n\t\treturn otherAttributes;\n\t}",
"public Map<QName, String> getOtherAttributes() {\n\t\treturn otherAttributes;\n\t}",
"public Map<QName, String> getOtherAttributes() {\n\t\treturn otherAttributes;\n\t}",
"private Hashtable getRequestedAttributes() {\n\tif (fRequestedAttributes == null) {\n\t fRequestedAttributes = new Hashtable(7, (float)0.9);\n fRequestedAttributes.put(TextAttribute.TRANSFORM,\n\t\t\t\t IDENT_TX_ATTRIBUTE);\n fRequestedAttributes.put(TextAttribute.FAMILY, name);\n fRequestedAttributes.put(TextAttribute.SIZE, new Float(size));\n\t fRequestedAttributes.put(TextAttribute.WEIGHT,\n\t\t\t\t (style & BOLD) != 0 ? \n\t\t\t\t TextAttribute.WEIGHT_BOLD :\n\t\t\t\t TextAttribute.WEIGHT_REGULAR);\n\t fRequestedAttributes.put(TextAttribute.POSTURE,\n\t\t\t\t (style & ITALIC) != 0 ? \n\t\t\t\t TextAttribute.POSTURE_OBLIQUE :\n\t\t\t\t TextAttribute.POSTURE_REGULAR);\n fRequestedAttributes.put(TextAttribute.SUPERSCRIPT,\n new Integer(superscript));\n fRequestedAttributes.put(TextAttribute.WIDTH,\n new Float(width));\n\t}\n\treturn fRequestedAttributes;\n }",
"public Map<String, Map<String, String>> getUserAttributes() {\n return m_userAttributes;\n }",
"public Map<QName, String> getOtherAttributes() {\n return otherAttributes;\n }",
"public Map<QName, String> getOtherAttributes() {\n return otherAttributes;\n }",
"public Map<QName, String> getOtherAttributes() {\n return otherAttributes;\n }",
"public Map<QName, String> getOtherAttributes() {\n return otherAttributes;\n }",
"public Map<QName, String> getOtherAttributes() {\n return otherAttributes;\n }",
"public Map<QName, String> getOtherAttributes() {\n return otherAttributes;\n }",
"public Map<QName, String> getOtherAttributes() {\n return otherAttributes;\n }",
"public Map<QName, String> getOtherAttributes() {\n return otherAttributes;\n }",
"public Map<QName, String> getOtherAttributes() {\n return otherAttributes;\n }",
"public Map<QName, String> getOtherAttributes() {\n return otherAttributes;\n }",
"public Map<QName, String> getOtherAttributes() {\n return otherAttributes;\n }",
"public Map<QName, String> getOtherAttributes() {\n return otherAttributes;\n }",
"public Map<String, Object> getAttrs();",
"public Enumeration getAttributes()\n {\n ensureLoaded();\n return m_tblAttribute.elements();\n }",
"public Entry[] getLookupAttributes() throws RemoteException {\n\t\treturn mgr.getAttributes();\n\t}",
"public Map<QName, String> getOtherAttributes() {\n return otherAttributes;\n }",
"String getDefaultAttrs() {\n return mDefaultAttrs;\n }",
"private ArrayList<Attribute> getAttributes() {\n\t\tif (attributes != null && attributes instanceof ArrayList)\n\t\t\treturn ((ArrayList<Attribute>) attributes);\n\t\telse {\n\t\t\tArrayList<Attribute> tmp = new ArrayList<Attribute>();\n\t\t\tif (attributes != null)\n\t\t\t\ttmp.addAll(attributes);\n\t\t\tattributes = tmp;\n\t\t\treturn tmp;\n\t\t}\n\t}"
] |
[
"0.73643756",
"0.73128235",
"0.7168854",
"0.711308",
"0.70116526",
"0.6998417",
"0.6974214",
"0.69489104",
"0.694293",
"0.6913628",
"0.6907515",
"0.68615",
"0.6850575",
"0.68477786",
"0.68477064",
"0.67881405",
"0.67856634",
"0.67841834",
"0.6780823",
"0.67738855",
"0.67677903",
"0.67677903",
"0.6699518",
"0.669634",
"0.66789806",
"0.6676044",
"0.66730535",
"0.66730475",
"0.66583884",
"0.66435623",
"0.66420865",
"0.66413677",
"0.66377497",
"0.66135347",
"0.6612614",
"0.6599819",
"0.6599819",
"0.6599819",
"0.6588269",
"0.65832967",
"0.6569581",
"0.6529416",
"0.65175265",
"0.65087634",
"0.65087634",
"0.6440726",
"0.6437525",
"0.6433198",
"0.6406367",
"0.6390344",
"0.63477343",
"0.63273096",
"0.63216513",
"0.6321486",
"0.6319321",
"0.6316489",
"0.631639",
"0.63163215",
"0.6307544",
"0.63072747",
"0.6275605",
"0.6273849",
"0.6269498",
"0.62571603",
"0.62534136",
"0.62509507",
"0.6235006",
"0.62041664",
"0.61880183",
"0.61548674",
"0.6150615",
"0.6140835",
"0.6140835",
"0.6138848",
"0.612984",
"0.61256504",
"0.6125383",
"0.61231107",
"0.61205643",
"0.61205643",
"0.61205643",
"0.6115123",
"0.61138195",
"0.6109569",
"0.6109569",
"0.6109569",
"0.6109569",
"0.6109569",
"0.6109569",
"0.6109569",
"0.6109569",
"0.6109569",
"0.6109569",
"0.6109569",
"0.6109569",
"0.6100367",
"0.60979426",
"0.609766",
"0.6096359",
"0.6091579",
"0.6085946"
] |
0.0
|
-1
|
TODO Autogenerated method stub
|
@Override
public void addGoal(Goal g) {
}
|
{
"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 removeGoal(Goal g) {
}
|
{
"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
|
konstruktor sa parametrom tipa Circle
|
public Circle(Circle c){
this(c.radius,c.p);
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public Circle(double radius){ // 2 constructor\n this.radius = radius;\n this.color = DEFAULT_COLOR;\n }",
"public Circle(double r)\n {\n setRad(r);\n\n }",
"public Circle() {\n radius = 1.0;\n color = \"red\";\n }",
"public Circle() {\n radius = 1.0;\n color = \"red\";\n }",
"public Circle(double radio) {\n\n super(\"circle\");\n this.radio=radio;\n }",
"public Circle(double jejari){\r\n\t\t// this();//panggil default constructor\r\n\t\t this.jejari = jejari;\r\n\t\t x = 5;\r\n\t\t// this(jejari, 59); //panggil constructor 2 parameter\r\n\t\tbilObjekWujud++;\r\n\t}",
"public Circle() {\r\n this.radius = 0.0;\r\n this.center = new Point();\r\n }",
"public Circle(){\r\n\t \t// System.out.println(\"Default constructor dipanggil.\");\r\n\t \tjejari = 1;\r\n\t \tx = 5;\r\n\t \tbilObjekWujud++;\r\n\t }",
"public Circle(){ // 1 constructor\n this.radius = DEFAULT_RADIUS;\n this.color = DEFAULT_COLOR;\n }",
"public Circle(){\n\t\t\n\t\tradius = 1.0;\n\t\tcolor =\"Red\";\n\t}",
"public Circle(double radius){\n// Set the this.X to the args\n//Force any var radius < 0 to 0\n this.radius = Math.max(0, radius);\n }",
"public double getCircleRadius();",
"public Circle(double radius, String color){ // 3 constructor\n this.radius = radius;\n this.color = color;\n }",
"public Circle(double radius){\n this.radius = radius;\n }",
"public Circle(int x, int y, int r, Color c) {\n super(x-r,y-r);\n color = c;\n name = \"Circle\";\n width = 2*r;\n height = 2*r;\n radius = r;\n }",
"public Coordinate getCircle();",
"public Porteur_img_eau(int x, int y, int rayon){\n Circle fond_eau = new Circle(x,y, rayon);\n fond_eau.setFill(Color.BLUE);\n this.getChildren().add(fond_eau);\n this.setLayoutX(x);\n this.setLayoutY(y);\n\n }",
"public Circle(double radius){\n\t\tradius =this.radius;\n\t\tcolor =\"Red\";\n\t}",
"SimpleCircle() {\n\t\tradius=1;\n\t}",
"private void addCircle() {\n\t\tdouble r = getRadius();\n\t\tadd(new GOval(getWidth() / 2.0 - r, getHeight() / 2.0 - r, 2 * r, 2 * r));\n\t}",
"public Circle(int x, int y, int r) {\n super(x-r,y-r);\n name = \"Circle\";\n width = 2*r;\n height = 2*r;\n radius = r;\n }",
"public Circle(int x, int y) {\n super(x-5,y-5);\n name = \"Circle\";\n width = 2*5;\n height = 2*5;\n radius = 5;\n }",
"public Circle(){}",
"public Circle() {\n this( 1.0 ); \n }",
"double getRadius();",
"public abstract float getRadius();",
"public abstract float getRadius();",
"public Circle(double r) {\n radius = r;\n color = \"red\";\n }",
"public Circle (double jejari, double x) {\r\n\t \tthis.jejari = jejari;\r\n\t \tthis.x = x;\r\n\t \tbilObjekWujud++;\r\n\t }",
"SimpleCircle() {\n\t\tradius = 1;\n\t}",
"@Override\n\tpublic String getName() {\n\t\treturn \"Circle\";\n\t}",
"@Override\n public String getName() {\n return \"Circle\";\n }",
"public Circle()\r\n\t{\r\n\t\tradius = 0.0;\r\n\t}",
"public Circle(double radius,String c){\n\t\tradius = this.radius;\n\t\tcolor =c;\n\t}",
"long getRadius();",
"public Circle(double r) {\n radius = r;\n color = \"red\";\n }",
"int getRadius();",
"public Circle(Point p, Point q, double r) {\n // TODO: Question 2.1\n\n }",
"public Circle() {\n this(0, 0, 1);\n }",
"public Circle(Point o, double r) {\n origin = new Point(o);\n radius = r;\n }",
"public Circle(double radius) {\n super(\"white\", true);\n this.radius = radius;\n }",
"public Circle(double r)\r\n\t{\r\n\t\tradius=r;\r\n\t}",
"private void createCircle(double x, double y) {\r\n GOval circle = new GOval(x, y, DIAMETR, DIAMETR);\r\n circle.setFilled(true);\r\n circle.setFillColor(Color.BLACK);\r\n add(circle);\r\n }",
"public Circle(double radius, Point center) {\r\n this.radius = radius;\r\n this.center = center;\r\n }",
"public Circle() {\n\t\tr=0.0; //by defalut set radius to something so we have a circle \n\t}",
"public void setDiameter(int diameter) {\n circleDiameter = diameter;\n\n }",
"public void setRadius(int radius);",
"public Circle(SelectedColor color) {\n super(Name.Circle, color);\n\n Log.i(\"Circle\",\"Created a \" + color + \" Circle\");\n //Need getcolor() to pick random\n //Maybe keep all colors random at create time, then when we add them to data struc\n //we change one of the colors depending on \"correct shape\"\n }",
"public double getRadius(){return radius;}",
"public Circle(){\n }",
"public Circle(double r) {\n this.r = r;\n }",
"public Circle(double givenRadius)\n\t{\n\t\tradius = givenRadius;\n\t}",
"public Circle(int x, int y) {\n\t \n\tSystem.out.println(\"Circel constructor called.\"); \n \n\tthis.X=x;\n\tthis.Y=y;\n}",
"public Circle(String color, double radius)\r\n {\r\n super(color);\r\n mRadius = radius;\r\n \r\n }",
"public GraphNode(int index, double centerX , double centerY){\n super();\n this.index = index;\n this.setText(String.valueOf(index));\n DirX = centerX;\n DirY = centerY;\n this.setLayoutX(centerX);\n this.setLayoutY(centerY);\n this.setStyle(\"-fx-background-color: #d0d0d0; -fx-font-size: 16; -fx-background-radius: 50 ; -fx-pref-height: 50 ; -fx-pref-width: 50\");\n }",
"public void setRadius(double n)\r\n\t{\r\n\t\tradius = n;\r\n\t}",
"public Circle(double radius, String color, boolean filled){\n super(color, filled);\n this.radius = radius;\n }",
"public Circle() {\n super(new GeoCircle(), FeatureTypeEnum.GEO_CIRCLE);\n this.setFillStyle(null);\n }",
"private void setPenRadius() {\n\t}",
"SimpleCircle(double newRadius){\n\t\tradius=newRadius;\n\t}",
"public Cone(String labelIn, double heightIn, double radiusIn)\r\n {\r\n setHeight(heightIn);\r\n setLabel(labelIn);\r\n setRadius(radiusIn);\r\n }",
"public String toString(){\n\n return \"circle [radio =\"+ radius + \", color =\" + color +\" ]\";\n }",
"public boolean getShowCircle() {\n return displayCircle;\n }",
"public Circle(int r) {\n\t\tthis.radius = r;\n\t}",
"public Circle(double r, Point center) {\n this.r = r;\n this.center = center;\n }",
"private void newCircle()\n {\n setMinimumSize(null);\n\n //Generate a new circle\n panel.generateNewCircle();\n\n //Calculate the circle properties and setup the text area with their values\n generateTextArea();\n\n //Repack the frame to fit everything perfectly\n pack();\n\n setMinimumSize(getSize());\n }",
"public int getRadius() { return radius; }",
"public Ex1Circle(double radiusIn)\n {\n radius = radiusIn;\n }",
"public ShapeComponent drawCircle()\n\t{\n\t\tShapeComponent circleComponent = new ShapeComponent(radius*2, radius*2, \n\t\t\t\t\"circle\");\n\t\treturn circleComponent;\n\t}",
"public Circle(Circle circle) {\n this.center = circle.center;\n this.radius = circle.radius;\n }",
"public Circle(double r) {\n this.r = r;\n this.center = new Point(0,0);\n }",
"public boolean isCircle();",
"Circle(int radius) {\n\t\tsuper(radius);\n\t\tSystem.out.println(\"The area of circle is \"+3.14*(radius*radius));\n\t}",
"public void plotinit() {\r\n\r\n\t\tfloat dx;\r\n\t\tfloat dy;\r\n\t\tfloat d;\r\n\r\n\t\tdy = ymax - ymin;\r\n\t\tdx = xmax - xmin;\r\n\t\td = (dx > dy ? dx : dy) * 1.1f;\r\n\r\n\t\tpxmin = xmin - (d - dx) / 2.0f;\r\n\t\tpxmax = xmax + (d - dx) / 2.0f;\r\n\t\tpymin = ymin - (d - dy) / 2.0f;\r\n\t\tpymax = ymax + (d - dy) / 2.0f;\r\n\r\n\t\tcradius = (pxmax - pxmin) / 350.0f;\r\n\r\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}",
"SimpleCircle(double newRadius) {\n\t\tradius = newRadius;\n\t}",
"public String _setcirclecolor(int _nonvaluecolor,int _innercolor) throws Exception{\n_mcirclenonvaluecolor = _nonvaluecolor;\n //BA.debugLineNum = 61;BA.debugLine=\"mCircleFillColor = InnerColor\";\n_mcirclefillcolor = _innercolor;\n //BA.debugLineNum = 62;BA.debugLine=\"Draw\";\n_draw();\n //BA.debugLineNum = 63;BA.debugLine=\"End Sub\";\nreturn \"\";\n}",
"@Override\n public void draw() {\n drawAPI.drawCircle(radius, x, y); \n }",
"public Circle( double r, int a, int b )\r\n {\r\n super( a, b ); // call to superclass constructor\r\n setRadius( r ); \r\n }",
"public double getRadius() { return radius; }",
"public double getRadius(){\n return radius;\n }",
"public abstract double getBoundingCircleRadius();",
"public abstract double getRadiusX();",
"public CircleTest(String testName)\n {\n super( testName );\n circle = (Circle) shapeMap.get(\"circle\");\n }",
"public void paintCircle(Point2D pt1, Point2D pt2, Graphics graphics) {\n // do all this only if want to display the rubberband circle\n if (displayCircle) {\n Graphics2D g = (Graphics2D) graphics;\n g.setXORMode(java.awt.Color.lightGray);\n g.setColor(java.awt.Color.darkGray);\n if (pt1 != null && pt2 != null) {\n // first convert degrees to radians\n float radphi1 = (float) ProjMath.degToRad(pt1.getY());\n float radlambda0 = (float) ProjMath.degToRad(pt1.getX());\n float radphi = (float) ProjMath.degToRad(pt2.getY());\n float radlambda = (float) ProjMath.degToRad(pt2.getX());\n // calculate the circle radius\n double dRad = GreatCircle.sphericalDistance(radphi1,\n radlambda0,\n radphi,\n radlambda);\n // convert into decimal degrees\n float rad = (float) ProjMath.radToDeg(dRad);\n // make the circle\n OMCircle circle = new OMCircle((float) pt1.getY(), (float) pt1.getX(), rad);\n // get the map projection\n Projection proj = theMap.getProjection();\n // prepare the circle for rendering\n circle.generate(proj);\n // render the circle graphic\n circle.render(g);\n }\n } // end if(displayCircle)\n }",
"public double getCircunference(){\n return 2.0 * radius * Math.PI; \n }",
"public Circle(float centerX, float centerY, float radius) {\n this.center = new Vector2(centerX, centerY);\n this.radius = radius;\n }",
"public double getRadius() {\n return radius; \n }",
"public Circle(int centerX, int centerY, int radius, Color color) {\n\t\tsuper();\n\t\tthis.centerX = centerX;\n\t\tthis.centerY = centerY;\n\t\tthis.radius = radius;\n\t\tthis.color = color;\n\t}",
"public void drawCircle() {\n mMap.clear();\n // Generate the points\n mMap.addPolygon(new PolygonOptions().addAll(points).strokeWidth(5).strokeColor(Color.RED).fillColor(Color.TRANSPARENT));\n // Create and return the polygon\n for (int i=0;i<points.size();i++){\n Log.v(\"DrawCircle\",\"drwaakmdaskfmlsmn\"+points.get(i));\n }\n\n\n\n }",
"public void setRadius(double value) {\n this.radius = value;\n }",
"public ColorEllipse(javax.swing.JPanel container){//I'm making this shape's subclass ask for a container of type javax.swing.JPanel when isntantiated. \n\t\tsuper(container, new java.awt.geom.Ellipse2D.Double());//I'm passing the superclass constructor the container that will be \n\t\t\t\t\t\t\t\t //received when the shape is created and I'm also passing a new ellipse of type java.awt.geom.Ellipse2D.Double.\n\t}",
"public PseudoCircle( List<Point2D> ps){\n for( Point2D x: ps){\n this.addPoint(x);\n }\n }",
"public double getRadius(){\r\n return radius;\r\n }",
"public String toString() {\n return \"[Circle] radius = \" + radius;\n }",
"private static Circle createCircle(String[] input) {\r\n int px = Integer.parseInt(input[1]);\r\n int py = Integer.parseInt(input[2]);\r\n int vx = Integer.parseInt(input[3]);\r\n int vy = Integer.parseInt(input[4]);\r\n boolean isFilled = Boolean.parseBoolean(input[5]);\r\n int diameter = Integer.parseInt(input[6]);\r\n float r = (float) Integer.parseInt(input[7]) / 255.0f;\r\n float g = (float) Integer.parseInt(input[8]) / 255.0f;\r\n float b = (float) Integer.parseInt(input[9]) / 255.0f;\r\n int insertionTime = Integer.parseInt(input[10]);\r\n boolean isFlashing = Boolean.parseBoolean(input[11]);\r\n float r1 = (float) Integer.parseInt(input[12]) / 255.0f;\r\n float g1 = (float) Integer.parseInt(input[13]) / 255.0f;\r\n float b1 = (float) Integer.parseInt(input[14]) / 255.0f;\r\n return new Circle(insertionTime, px, py, vx, vy, diameter, new Color(r, g, b, 1), isFilled,\r\n isFlashing, new Color(r1, g1, b1, 1));\r\n }",
"public KreisGrafik(int radius) {\n\t\tthis.setRadius(radius);\n\t}",
"public CetakPenjualan() {\n initComponents();\ntampilDataPen();\nthis.setResizable(false);\n }",
"public void drawCircle(Graphics g, int x, int y, int rad) {\n if (n == 5) {\n g.fillOval(x+25, y+25, rad, rad);\n }else if (n==6) {\n g.fillOval(x+18, y+18, rad, rad);\n }else {\n g.fillOval(x+14, y+14, rad, rad);\n }\n }",
"int getBallRadius();",
"private Drawable createCircleDrawable(int n, float f) {\n void var4_6;\n int n2 = Color.alpha((int)n);\n n = this.opaque(n);\n ShapeDrawable shapeDrawable = new ShapeDrawable((Shape)new OvalShape());\n Drawable[] arrdrawable = shapeDrawable.getPaint();\n arrdrawable.setAntiAlias(true);\n arrdrawable.setColor(n);\n arrdrawable = new Drawable[]{shapeDrawable, this.createInnerStrokesDrawable(n, f)};\n if (n2 == 255 || !this.mStrokeVisible) {\n LayerDrawable layerDrawable = new LayerDrawable(arrdrawable);\n } else {\n TranslucentLayerDrawable translucentLayerDrawable = new TranslucentLayerDrawable(n2, arrdrawable);\n }\n n = (int)(f / 2.0f);\n var4_6.setLayerInset(1, n, n, n, n);\n return var4_6;\n }"
] |
[
"0.7040504",
"0.7020324",
"0.7004306",
"0.6943818",
"0.6931311",
"0.690308",
"0.68994147",
"0.6871874",
"0.684333",
"0.6829841",
"0.6768523",
"0.67182744",
"0.671134",
"0.6681213",
"0.6674229",
"0.6672717",
"0.6642316",
"0.6636729",
"0.66310215",
"0.65935725",
"0.65919393",
"0.6525662",
"0.6511407",
"0.64937365",
"0.6459751",
"0.6420496",
"0.6420496",
"0.64117634",
"0.6410377",
"0.64098895",
"0.63910854",
"0.6387007",
"0.63846576",
"0.63684756",
"0.6364974",
"0.63637936",
"0.6334161",
"0.6326007",
"0.6302478",
"0.62728685",
"0.62718856",
"0.62650424",
"0.62599045",
"0.6259511",
"0.62473446",
"0.6240543",
"0.623794",
"0.622499",
"0.6214006",
"0.61831367",
"0.6168297",
"0.61563706",
"0.61547637",
"0.615265",
"0.6151395",
"0.6146455",
"0.61315936",
"0.6127489",
"0.6120247",
"0.6109878",
"0.61065435",
"0.6083188",
"0.6068956",
"0.60665834",
"0.6059829",
"0.60559195",
"0.60537827",
"0.6052925",
"0.60369235",
"0.60321933",
"0.6032069",
"0.60294986",
"0.6015401",
"0.597318",
"0.5942563",
"0.59321666",
"0.593108",
"0.59124535",
"0.5905041",
"0.5892485",
"0.58906686",
"0.5883171",
"0.58645105",
"0.58614177",
"0.5861205",
"0.58600795",
"0.5855028",
"0.585447",
"0.58481556",
"0.58464354",
"0.5846434",
"0.58428496",
"0.58276343",
"0.5825568",
"0.5821041",
"0.5802476",
"0.5796597",
"0.5789726",
"0.5779837",
"0.57758737",
"0.5770825"
] |
0.0
|
-1
|
Interface for recording a taskthread simulation event.
|
public interface TaskEventCallable {
/**
* Interface to allow task threads to be manipulated during task-thread
* processing.
* This allows some operations used by the implementation to occur
* while synchronizing on particular objects used internally by
* TaskThread methods. The event returned may not be the event
* passed as an argument (e.g., the return value may be an event
* that is stored on a TaskQueue, not the simulation's event queue).
* @param event the event used to schedule a task
* @return the simulation event scheduled or stored; null if the
* the scheduling or storing is not possible
* @see org.bzdev.devqsim.TaskThread
*/
SimulationEvent call(TaskThreadSimEvent event);
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"SimulationEvent call(TaskThreadSimEvent event);",
"void notifyTrace(RecorderTraceEvent event);",
"void eventOccurred(AbstractTaskEvent event);",
"public interface EventListener {\n\n\t/**\n\t * Called when a task event has occurred.\n\t * \n\t * @param event\n\t * the task event which has occurred\n\t */\n\tvoid eventOccurred(AbstractTaskEvent event);\n}",
"public void SimAdded(AddSimEvento event);",
"public interface ThreadReporter\n{\n\t/**\n\t Set the time for data points to be reported\n\t @param time\n\t */\n\tvoid setReportTime(long time);\n\n\t/**\n\t This lets you put a tag to all data points submitted to sub interfaces of\n\t ThreadReporter\n\t @param name\n\t @param value\n\t */\n\tvoid addTag(String name, String value);\n\tvoid removeTag(String name);\n\tvoid clearTags();\n\tvoid clearAll();\n}",
"public interface ITaskThreadStateChangedListener {\r\n void TaskThreadStateChanged(TaskThreadState previousState, TaskThreadState newState);\r\n}",
"public void runEvent();",
"void threadAdded(String threadId);",
"public void timestepCompleted(Simulation simulation) {\n }",
"@Override\n public void append( LogEvent event ) {\n long eventTimestamp;\n if (event instanceof AbstractLoggingEvent) {\n eventTimestamp = ((AbstractLoggingEvent) event).getTimestamp();\n } else {\n eventTimestamp = System.currentTimeMillis();\n }\n LogEventRequest packedEvent = new LogEventRequest(Thread.currentThread().getName(), // Remember which thread this event belongs to\n event, eventTimestamp); // Remember the event time\n\n if (event instanceof AbstractLoggingEvent) {\n AbstractLoggingEvent dbLoggingEvent = (AbstractLoggingEvent) event;\n switch (dbLoggingEvent.getEventType()) {\n\n case START_TEST_CASE: {\n\n // on Test Executor side we block until the test case start is committed in the DB\n waitForEventToBeExecuted(packedEvent, dbLoggingEvent, true);\n\n // remember the test case id, which we will later pass to ATS agent\n testCaseState.setTestcaseId(eventProcessor.getTestCaseId());\n\n // clear last testcase id\n testCaseState.clearLastExecutedTestcaseId();\n\n //this event has already been through the queue\n return;\n }\n case END_TEST_CASE: {\n\n // on Test Executor side we block until the test case start is committed in the DB\n waitForEventToBeExecuted(packedEvent, dbLoggingEvent, true);\n\n // remember the last executed test case id\n testCaseState.setLastExecutedTestcaseId(testCaseState.getTestcaseId());\n\n // clear test case id\n testCaseState.clearTestcaseId();\n // this event has already been through the queue\n return;\n }\n case GET_CURRENT_TEST_CASE_STATE: {\n // get current test case id which will be passed to ATS agent\n ((GetCurrentTestCaseEvent) event).setTestCaseState(testCaseState);\n\n //this event should not go through the queue\n return;\n }\n case START_RUN:\n\n /* We synchronize the run start:\n * Here we make sure we are able to connect to the log DB.\n * We also check the integrity of the DB schema.\n * If we fail here, it does not make sense to run tests at all\n */\n atsConsoleLogger.info(\"Waiting for \"\n + event.getClass().getSimpleName()\n + \" event completion\");\n\n /** disable root logger's logging in order to prevent deadlock **/\n Level level = LogManager.getRootLogger().getLevel();\n Configurator.setRootLevel(Level.OFF);\n\n AtsConsoleLogger.setLevel(level);\n\n // create the queue logging thread and the DbEventRequestProcessor\n if (queueLogger == null) {\n initializeDbLogging(null);\n }\n\n waitForEventToBeExecuted(packedEvent, dbLoggingEvent, false);\n //this event has already been through the queue\n\n /*Revert Logger's level*/\n Configurator.setRootLevel(level);\n AtsConsoleLogger.setLevel(level);\n\n return;\n case END_RUN: {\n /* We synchronize the run end.\n * This way if there are remaining log events in the Test Executor's queue,\n * the JVM will not be shutdown prior to committing all events in the DB, as\n * the END_RUN event is the last one in the queue\n */\n atsConsoleLogger.info(\"Waiting for \"\n + event.getClass().getSimpleName()\n + \" event completion\");\n\n /** disable root logger's logging in order to prevent deadlock **/\n level = LogManager.getRootLogger().getLevel();\n Configurator.setRootLevel(Level.OFF);\n\n AtsConsoleLogger.setLevel(level);\n\n waitForEventToBeExecuted(packedEvent, dbLoggingEvent, true);\n\n /*Revert Logger's level*/\n Configurator.setRootLevel(level);\n AtsConsoleLogger.setLevel(level);\n\n //this event has already been through the queue\n return;\n }\n case DELETE_TEST_CASE: {\n // tell the thread on the other side of the queue, that this test case is to be deleted\n // on first chance\n eventProcessor.requestTestcaseDeletion( ((DeleteTestCaseEvent) dbLoggingEvent).getTestCaseId());\n // this event is not going through the queue\n return;\n }\n default:\n // do nothing about this event\n break;\n }\n }\n\n passEventToLoggerQueue(packedEvent);\n }",
"public interface StepListener {\n public void step(long timeNs);\n}",
"public void record(Event evt) {\n record0(evt);\n }",
"interface StepListener {\n\n void step(long timeNs);\n\n}",
"interface Step {\n void onStepResult(boolean isSuccess);\n\n\n @Subscribe(threadMode = ThreadMode.MAIN)\n void onStepTryEvent(TryToCompleteStep step);\n\n}",
"public interface NetRecordingRequestHandler {\r\n\r\n /**\r\n * Notifies this NetRecordingRequestHandler that a device on the home\r\n * network has requested that a recording be scheduled. Handler applications\r\n * MAY inspect any metadata associated with the NetRecordingEntry passed\r\n * with the method invocation, and translate such metadata in one or\r\n * more local DVR recordings. Applications SHOULD associate such\r\n * recordings with the NetRecordingEntry by adding the recordings\r\n * to the entry using the <i>NetRecordingEntry.addRecordingContentItem() </i>\r\n * method.\r\n * \r\n * @param address\r\n * IP address of the device on the home network which has issues this request\r\n * @param spec\r\n * the NetRecordingEntry which describes the requested recording\r\n * \r\n * @return true if the schedule request can be successfully processed, or\r\n * false if the request will not be processed.\r\n * \r\n * @see NetRecordingEntry#addRecordingContentItem(RecordingContentItem) \r\n */\r\n boolean notifySchedule(InetAddress address, NetRecordingEntry spec);\r\n\r\n /**\r\n * Notifies this NetRecordingRequestHandler that a device on the home\r\n * network has requested that a recording be rescheduled. Handler\r\n * applications MAY inspec any metadata contained within the \r\n * NetRecordingEntry passed into this method, and utilize such metadata\r\n * to reschedule the local DVR recording represented by the given \r\n * ContentEntry. This ContentEntry may represent an individual recording\r\n * as a RecordingContentItem, or may represent a collection of recordings\r\n * contained within a NetRecordingEntry object.\r\n * \r\n * @param address\r\n * the IP address of the device on the home network which has issues this request\r\n * @param recording\r\n * the RecordingContentItem or NetRecordingEntry to be\r\n * rescheduled\r\n * @param spec\r\n * the NetRecordingEntry object containing the metadata to be used\r\n * to reschedule the recording\r\n * \r\n * @return true if the reschedule request can be successfully processed,or\r\n * false if the request will not be processed.\r\n */\r\n boolean notifyReschedule(InetAddress address, ContentEntry recording,\r\n NetRecordingEntry spec);\r\n\r\n /**\r\n * Notifies this NetRecordingRequestHandler that a device on the home\r\n * network has requested that a recording be disabled. If the recording is\r\n * in progress, this is a request to stop the recording. If the recording is\r\n * pending, this is a request to cancel the recording. Applications MAY\r\n * cancel or stop the given recording in response to this request.\r\n * \r\n * @param address\r\n * the IP address of the device on the home network which has issues this request\r\n * @param recording\r\n * the RecordingContentItem or RecordingNetEntry to be disabled\r\n * \r\n * @return true if the disable request can be successfully processed,or\r\n * false if the request will not be processed.\r\n */\r\n boolean notifyDisable(InetAddress address, ContentEntry recording);\r\n\r\n /**\r\n * Notifies this NetRecordingRequestHandler that a device on the home\r\n * network has requested that metadata associated with a recording be\r\n * deleted. Applications MAY delete the given recording in response\r\n * to this request.\r\n * \r\n * @param address\r\n * the IP address of the device on the home network which has issues this request\r\n * @param recording\r\n * the RecordingContentItem or NetRecordingEntry to be\r\n * deleted\r\n * \r\n * @return true if the delete request can be successfully processed,or\r\n * false if the request will not be processed.\r\n */\r\n boolean notifyDelete(InetAddress address, ContentEntry recording);\r\n\r\n /**\r\n * Notifies this NetRecordingRequestHandler that a device on the home\r\n * network has requested that content associated with a recorded service be\r\n * deleted. Applications MAY delete the content associated with the given\r\n * recording in response to this request.\r\n * \r\n * @param address\r\n * the IP address of the device on the home network which has issues this request\r\n * @param recording\r\n * requested the RecordingContentItem or NetRecordingEntry\r\n * \r\n * @return true if the delete request can be successfully processed,or\r\n * false if the request will not be processed.\r\n */\r\n boolean notifyDeleteService(InetAddress address, ContentEntry recording);\r\n\r\n /**\r\n * Notifies this NetRecordingRequestHandler that a device on the home\r\n * network has requested that a group of recordings be re-prioritized.\r\n * The requested prioritization is represented by the ordering of \r\n * the NetRecordingEntry objects in the given array, with the highest\r\n * priority at index 0 of the array. Applications MAY prioritize some \r\n * or all of the local DVR recordings contained within the NetRecordingEntry\r\n * array.\r\n * \r\n * @param address\r\n * the IP address of the device on the home network which has issues this request\r\n * @param recordings\r\n * the NetRecordingEntrys to be prioritized\r\n * \r\n * @return true if the prioritization request can be successfully processed,or\r\n * false if the request will not be processed.\r\n */\r\n boolean notifyPrioritization(InetAddress address, NetRecordingEntry recordings[]);\r\n \r\n /**\r\n * Notifies this NetRecordingRequestHandler that a device on the home\r\n * network has requested that a group of individual recordings be \r\n * re-prioritized. The requested prioritization is represented by the \r\n * ordering of the RecordingContentItem objects in the given array, with\r\n * the highest priority at index 0 of the array. Applications MAY prioritize \r\n * the local DVR recordings contained within the RecordingContentItem\r\n * array.\r\n * \r\n * @param address IP address of the device on the home network which has\r\n * issued this request.\r\n * @param recordings The recording content items associated with the recordings to\r\n * be prioritized.\r\n * \r\n * @return True if the prioritization request can be successfully processed,or\r\n * false if the request will not be processed.\r\n */\r\n boolean notifyPrioritization(InetAddress address,\r\n RecordingContentItem recordings[]);\r\n}",
"public interface WFEventListener extends ActivityInsEventListener, ProcessInsEventListener {\r\n\r\n /**\r\n * called when a timer event is fired;\r\n */\r\n public void onTimerEvent();\r\n\r\n public void addECAList(ECAList list);\r\n\r\n}",
"public abstract AbstractSctlThreadEntry addThread();",
"public interface PostExecutionThread {\n Scheduler getScheduler();\n}",
"public interface PostExecutionThread {\n Scheduler getScheduler();\n}",
"public interface PostExecutionThread {\n Scheduler getScheduler();\n}",
"public void taskStarted(BuildEvent event) {\n }",
"public interface ITimerTaskListener {\n /**\n * 具体要执行的定时任务\n * 此方法在子线程中\n * 变化UI的话,请切换到主线程\n */\n void onTimer();\n}",
"public void onEventMainThread(Object event) {\n\n }",
"public void doing(MonitorEvent event)\n {\n }",
"public interface ITaskHandler {\n\n\t/**\n\t * It is called in a separate thread to handle the task.\n\t * Parameters are thoes given in the addTask()\n\t * This method should not been called directly.\n\t * \n\t * @param pTaskType\n\t * @param pParam\n\t * @throws IllegalArgumentException\n\t */\n\tvoid handleTask(ITaskType pTaskType, Object pParam) throws IllegalArgumentException;\n}",
"@Override\n\tpublic void fireEvent(DebugEvent event) {\n\t\ttry {\n\t\t\tDebugEvent threadEvent = new DebugEvent(getThreads()[0], event.getKind(), event.getDetail());\n\t\t\tif (DebugPlugin.getDefault() != null)\n\t\t\t\tDebugPlugin.getDefault().fireDebugEventSet(new DebugEvent[] {event,threadEvent});\n\t\t} catch (DebugException e) {\n\t\t}\n\t}",
"public interface TextileEventListener {\n\n /**\n * Called when the Textile node is started successfully\n */\n void nodeStarted();\n\n /**\n * Called when the Textile node fails to start\n * @param e The error describing the failure\n */\n void nodeFailedToStart(Exception e);\n\n /**\n * Called when the Textile node is successfully stopped\n */\n void nodeStopped();\n\n /**\n * Called when the Textile node fails to stop\n * @param e The error describing the failure\n */\n void nodeFailedToStop(Exception e);\n\n /**\n * Called when the Textile node comes online\n */\n void nodeOnline();\n\n /**\n * Called when the node is scheduled to be stopped in the future\n * @param seconds The amount of time the node will run for before being stopped\n */\n void willStopNodeInBackgroundAfterDelay(int seconds);\n\n /**\n * Called when the scheduled node stop is cancelled, the node will continue running\n */\n void canceledPendingNodeStop();\n\n /**\n * Called when the Textile node receives a notification\n * @param notification The received notification\n */\n void notificationReceived(Notification notification);\n\n /**\n * Called when any thread receives an update\n * @param feedItem The thread update\n */\n void threadUpdateReceived(FeedItem feedItem);\n\n /**\n * Called when a new thread is successfully added\n * @param threadId The id of the newly added thread\n */\n void threadAdded(String threadId);\n\n /**\n * Called when a thread is successfully removed\n * @param threadId The id of the removed thread\n */\n void threadRemoved(String threadId);\n\n /**\n * Called when a peer node is added to the user account\n * @param peerId The id of the new account peer\n */\n void accountPeerAdded(String peerId);\n\n /**\n * Called when an account peer is removed from the user account\n * @param peerId The id of the removed account peer\n */\n void accountPeerRemoved(String peerId);\n\n /**\n * Called when any query is complete\n * @param queryId The id of the completed query\n */\n void queryDone(String queryId);\n\n /**\n * Called when any query fails\n * @param queryId The id of the failed query\n * @param e The error describing the failure\n */\n void queryError(String queryId, Exception e);\n\n /**\n * Called when there is a thread query result available\n * @param queryId The id of the corresponding query\n * @param thread A thread query result\n */\n void clientThreadQueryResult(String queryId, Thread thread);\n\n /**\n * Called when there is a contact query result available\n * @param queryId The id of the corresponding query\n * @param contact A contact query result\n */\n void contactQueryResult(String queryId, Contact contact);\n}",
"public void onTimerEvent();",
"@Override\r\n\tpublic void eventReceived(TaskEvent event) \r\n\t{\r\n\t\t//Add new Item\r\n\t\tif (event.getOperationType() == TaskEvent.ADD_NEW_TASK_EVENT)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Add a new item to the List\");\r\n\t\t\tModelLocator.getInstance().getTaskList().add((makeTaskFromArray((String[]) event.parametersToCommand())));\r\n\t\t\tSystem.out.println(ModelLocator.getInstance().getTaskList());\r\n\t\t}\r\n\t\telse if (event.getOperationType() == TaskEvent.REMOVE_TASK_EVENT)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Remove Item from the List\");\r\n\t\t\tModelLocator.getInstance().getTaskList().removeElementAt(Integer.parseInt((String)(event.parametersToCommand())));\r\n\t\t\tSystem.out.println(ModelLocator.getInstance().getTaskList());\r\n\t\t}\r\n\t\telse if(event.getOperationType() == TaskEvent.SET_TASK_DONE_EVENT)\r\n\t\t{\r\n\t\t\t//To be implemented\r\n\t\t\t\r\n\t\t}\r\n\t\telse\r\n\t\t\tSystem.out.println(\"Error!!!!!\");\r\n\t\t\r\n\t}",
"public RecorderThread (Context context) {\n\tthis.con = context;\n\trecording = true;\n\tsetDaemon(true);\n}",
"public interface OnTaskClickedListener {\n\n void taskOpened(int taskId);\n}",
"default void record(Runnable f) {\n long id = start();\n try {\n f.run();\n } finally {\n stop(id);\n }\n }",
"public void runEvent(Trainer t){\n\t\tt.addToken(token);\r\n\t}",
"void setTaskmonitorrecord(noNamespace.TaskmonitorrecordDocument.Taskmonitorrecord taskmonitorrecord);",
"@Override\n public void threadStarted() {\n }",
"public static void logEvent(SimulationEvent event) {\n\t\tevents.add(event);\n\t\tSystem.out.println(event);\n\t}",
"public void dispatched(MonitorEvent event)\n {\n }",
"noNamespace.TaskmonitorrecordDocument.Taskmonitorrecord addNewTaskmonitorrecord();",
"noNamespace.TaskmonitorrecordDocument.Taskmonitorrecord addNewTaskmonitorrecord();",
"public void asyncFire(EventI event);",
"@Override\n\tpublic void addTask(Task task) {\n\t\t\n\t}",
"@Test(timeout = 10000)\n public void testTaskAttemptFinishedEvent() throws Exception {\n JobID jid = new JobID(\"001\", 1);\n TaskID tid = new TaskID(jid, TaskType.REDUCE, 2);\n TaskAttemptID taskAttemptId = new TaskAttemptID(tid, 3);\n Counters counters = new Counters();\n TaskAttemptFinishedEvent test = new TaskAttemptFinishedEvent(taskAttemptId, TaskType.REDUCE, \"TEST\", 123L, \"RAKNAME\", \"HOSTNAME\", \"STATUS\", counters, 234);\n Assert.assertEquals(test.getAttemptId().toString(), taskAttemptId.toString());\n Assert.assertEquals(test.getCounters(), counters);\n Assert.assertEquals(test.getFinishTime(), 123L);\n Assert.assertEquals(test.getHostname(), \"HOSTNAME\");\n Assert.assertEquals(test.getRackName(), \"RAKNAME\");\n Assert.assertEquals(test.getState(), \"STATUS\");\n Assert.assertEquals(test.getTaskId(), tid);\n Assert.assertEquals(test.getTaskStatus(), \"TEST\");\n Assert.assertEquals(test.getTaskType(), REDUCE);\n Assert.assertEquals(234, test.getStartTime());\n }",
"abstract protected void _log(TrackingEvent event) throws Exception;",
"@Test\n public void testDispatchEvent(){\n\n final SampleClass sample = new SampleClass();\n\n assertEquals(\"\", sample.getName());\n\n eventDispatcher.addSimulatorEventListener(new SimulatorEventListener(){\n\n public void onNewMessage(Exchange exchange, Conversation conversation) {\n sample.setName(\"Modified\");\n }\n\n public void onMatchingScenario(Exchange exchange, Conversation conversation) {\n\n }\n\n public void onResponseBuilt(Exchange exchange, Conversation conversation) {\n\n }\n\n public void onResponseSent(Exchange exchange, Conversation conversation) {\n \n }\n });\n\n eventDispatcher.dispatchEvent(SimulatorEventType.NEW_MESSAGE, null, null);\n\n assertEquals(\"Modified\",sample.getName());\n }",
"private void setEventThread() {\n setEventThread(Thread.currentThread());\n }",
"public void recordStep(final TestStep step) {\n Preconditions.checkNotNull(step.getDescription(),\n \"The test step description was not defined.\");\n Preconditions.checkNotNull(step.getResult(), \"The test step result was not defined\");\n\n testSteps.add(step);\n }",
"public void post(Object event);",
"public WorkTimeEvent() {\r\n super();\r\n }",
"public interface ISemanticEventListener {\n\n\t/**\n\t * Notifies this listener that a semantic event has happened.\n\t * @param event - the semantic event\n\t */\n\tvoid notify(IUISemanticEvent event);\n \n\t////////////////////////////////////////////////////////////////////////////\n\t//\n\t// Meta events\n\t//\n\t////////////////////////////////////////////////////////////////////////////\n\n\t//TODO: maybe these meta-notifications should not have there own methods?\n\t\n /**\n * Notifies this listener that event recording has started.\n */\n void notifyStart();\n \n /**\n * Notifies this listener that event recording has stopped.\n */\n void notifyStop();\n\n /**\n * Notifies this listener that the event stream is to be written.\n */\n void notifyWrite();\n \n /**\n * Notifies this listener that root display has been disposed (effectively, recording is terminated).\n */ \n void notifyDispose();\n\n\t/**\n\t * Notifies this listener that the event stream is to be flushed and restarted.\n\t */\n\tvoid notifyRestart();\n\n\t/**\n\t * Notifies this listener that the event stream is to be paused.\n\t */\n\tvoid notifyPause();\n\t\n\t/**\n\t * Notifies this listener that an error occured during recording.\n\t * @param event - the error event\n\t */\n\tvoid notifyError(RecorderErrorEvent event);\n\n\t/**\n\t * Notifies this listener that a trace event was sent during recording.\n\t * @param event - the trace event\n\t */\n\tvoid notifyTrace(RecorderTraceEvent event);\n\n\t/**\n\t * Notifies this listener that a hook added vent was sent during recording.\n\t * @param hookName \n\t */\n\tvoid notifyAssertionHookAdded(String hookName);\n\t\n\t/**\n\t * Notifies that Recorder Controller was started and listens on specific port \n\t * @param port the port number that this controller started listen on\n\t */\n\tpublic void notifyControllerStart(int port);\n\t\n\t/**\n\t * Notifies this listener that Display instance was not found in the application process\n\t */\n\tpublic void notifyDisplayNotFound();\n\n\t/**\n\t * Notifies the listener that spy mode has been toggled.\n\t */\n\tvoid notifySpyModeToggle();\n}",
"public interface ClearcutLoggerApi\n{\n\n public abstract PendingResult logEventAsync(Context context, LogEventParcelable logeventparcelable);\n}",
"public void dataSent(LLRPDataSentEvent event);",
"@Override\n protected void runInListenerThread(Runnable runnable) {\n runnable.run();\n }",
"@Override\n\tpublic Class<StudentTaskRecord> getRecordType() {\n\t\treturn StudentTaskRecord.class;\n\t}",
"void dispatchEvent(DistributedEvent event);",
"public void onEventMainThread(BaseEvent unused) {\n }",
"public interface EndSequenceEventListener {\n void sequenceEnd();\n}",
"public interface ITask extends PropertyChangeListener{\n\tvoid execute();\n\tvoid interrupt();\n\tboolean toBeRemoved();\n\n\t//Using update tick\n\tboolean updateTick();\n\n\t//Using time\n\t//long getWaittime();\n\t//long getEndtime();\n\n\n}",
"void startReportingTask();",
"public interface TeamTaskListener {\n\n /**查询不到对应的任务*/\n int NO_SUCH_NAME_TEAM_TASK = 1 ;\n /**电量过低*/\n int BATTERY_TO_LOW = 2 ;\n\n /**开始队伍的辅助线*/\n void onStartTeamLine(String teamName);\n /**开始收队*/\n void onTeamTaskStart(String teamName) ;\n /**收队进度条*/\n void onTeamTaskSchedule(String teamName,float percent) ;\n /**完成一个收队*/\n void onTeamTaskComplete(String teamName) ;\n\n /**任务失败*/\n void onFail(String teamName,int failCode, String failMessage) ;\n\n /**完成全部收队*/\n void onAllTeamTaskComplete() ;\n}",
"public abstract void onEvent(T event);",
"public void executeTimeStep(Simulation simulation) {\n }",
"protected abstract ACATimer send(Port p_, Object evt_, double duration_);",
"public interface GetUnfinishedSummaryListener {\n void onTaskEnded(PartyDetails data);\n}",
"@Test\n\tpublic void addTaskOutput(){\n\t}",
"public abstract void recordSensorData(RealmObject sensorData);",
"@Override\n // Thread creation\n // Run method from the Runnable class.\n public void run() {\n p.println(\"Current thread = \" + Thread.currentThread().getName());\n // Shows when a task is being executed concurrently with another thread,\n // then puts the thread to bed (I like saying that)\n try {\n p.println(\"Doing a task during : \" + name);\n Thread.currentThread().sleep(time);\n }\n // Exception for when a thread is interrupted.\n catch (InterruptedException e) {\n e.printStackTrace();\n }\n }",
"public interface Notification {\n /**\n * Method to generate and draw notification message\n * @param task it's task for notification message\n */\n void notifyMessage(Task task);\n}",
"@ThreadSafe\npublic interface PeriodicTask extends Runnable {\n\n // PeriodicTask objects may take a {@link Properties} object. Define all the keys property keys here.\n String PROPERTY_KEY_REQUEST_ID = \"requestId\";\n String PROPERTY_KEY_TABLE_NAME = \"tableNameWithType\";\n\n /**\n * Returns the periodic task name.\n * @return task name.\n */\n String getTaskName();\n\n /**\n * Returns the interval time of running the same task.\n * @return the interval time in seconds.\n */\n long getIntervalInSeconds();\n\n /**\n * Returns the initial delay of the fist run.\n * @return initial delay in seconds.\n */\n long getInitialDelayInSeconds();\n\n /**\n * Performs necessary setups and starts the periodic task. Should be called before scheduling the periodic task. Can\n * be called after calling {@link #stop()} to restart the periodic task.\n */\n void start();\n\n /**\n * Executes the task. This method should be called only after {@link #start()} getting called but before\n * {@link #stop()} getting called.\n */\n @Override\n void run();\n\n /**\n * Execute the task with specified {@link Properties}.\n * @param periodicTaskProperties Properties used by {@link PeriodicTask} during execution.\n */\n void run(Properties periodicTaskProperties);\n\n /**\n * Stops the periodic task and performs necessary cleanups. Should be called after removing the periodic task from the\n * scheduler. Should be called after {@link #start()} getting called.\n */\n void stop();\n}",
"public abstract void putThread(Waiter waiter, Thread thread);",
"public interface ITimerAction extends Serializable {\n void run();\n}",
"public void sendEvent(Event event);",
"public void record(){\n\t}",
"public interface TransactionThread\n{\n\t/**\n\t * Enqueues a packet to be sent.\n\t * \n\t * @param packet Packet to send\n\t */\n\tpublic void send(Packet packet);\n\t\n\t/**\n\t * Enqueues a new packet to be sent.\n\t * \n\t * @param opcode Opcode to assign to the new packet\n\t */\n\tpublic void send(Opcode opcode);\n\n\t/**\n\t * Enqueues a new packet to be sent.\n\t * \n\t * @param opcode Opcode to assign to the new packet\n\t * @param datum A serializable object to attach to the packet\n\t */\n\tpublic void send(Opcode opcode, Serializable datum);\n}",
"public void sendRecordingNotification(){\n\n NotificationCompat.Builder mBuilder = (android.support.v7.app.NotificationCompat.Builder) new NotificationCompat.Builder(this)\n .setSmallIcon(R.drawable.road)\n .setContentTitle(\"Sprint LT is recording your session\")\n .setContentText(mySession.getTrackName());\n // .setContentIntent(pendingIntent);\n\n NotificationManager mNotificationManager =\n (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);\n\n mNotificationManager.notify(mRecordingNotificationID, mBuilder.build());\n\n }",
"interface DebugCallable<T> {\n\n /**\n * The invocation that will be tracked.\n *\n * @return the result\n */\n T call() throws EvalException, InterruptedException;\n }",
"public interface ASyncTaskListener {\n public void onThreadFinished(Object result);\n}",
"@Override\n\tpublic void add(ScheduleTask st) {\n\t\tsave(st);\n\n\t}",
"@Override\n public TimerEvent createActivity(TBoundaryEvent src, Hashtable keyedContext){\n\n return new TimerEvent();\n\n }",
"public boolean postThread(IThread thread) throws IllegalWriteException, BBException;",
"public interface PxVideoRecorderDebugListener {\n void debugLog(String title, String message);\n}",
"void notifyError(RecorderErrorEvent event);",
"@Override\n\tpublic void addScheduleTask(ScheduleTask st) {\n\t\tscheduleTaskDAO.add(st);\n\t}",
"public void sendTestFutureNotification() {\n\n }",
"public BuildEvent(Task task) {\n super(task);\n this.workspace = task.getProject().getWorkspace();\n this.project = task.getProject();\n this.target = task.getTarget();\n this.task = task;\n }",
"public CmsEventQueueRecord() {\n super(CmsEventQueue.CMS_EVENT_QUEUE);\n }",
"void addSimultaneousEvent(GameEvent event);",
"public void record(RecordingSession pSession) {\r\n\t\tif(pSession==null) {\r\n\t\t\t_supervisor.echo(\"Empty Recording Session at \"\r\n\t\t\t\t\t+ getDefiningClassSignature()) ;\r\n\t\t\treturn ;\r\n\t\t}\r\n\t\ttry {\r\n\t\t\tpSession.recording() ;\r\n\t\t} catch (ExecutionException ignore) {\r\n\t\t\t_supervisor.echo(\"Error Recording at \"\r\n\t\t\t\t\t+ getDefiningClassSignature()) ;\r\n\t\t}\r\n\t}",
"@Override\n\t\t\tpublic void run() {\n\t\t\t\tSystem.out.println(\"timertest4\");\n\n\t\t\t}",
"void addTask(Task task);",
"public interface TaskDelegate {\n public void taskComplete(Object object);\n}",
"public void printDataTransferCompleted(PrintJobEvent pje) ;",
"public interface EventActorListener {\n\n public void onFinished(ActorDet actor);\n}",
"int insert(JmfTaskMqRef record);",
"String addTask(Task task);",
"public abstract void task() throws InterruptedException;",
"public abstract void broadcastTraceTime(Server s);",
"public interface Recordable \n{\n\t/**\n\t * Returns the date that the work was created.\n\t * @return The task creation date\n\t */\n\tLocalDateTime getCreationDate();\n\t\n\t/**\n\t * Returns the date the work was completed.\n\t * @return The task completion date\n\t */\n\tLocalDateTime getCompletionDate();\n}",
"@Override\n public CompletableFuture<Void> addTask(String queueName, GarbageCollector.TaskInfo task) {\n Preconditions.checkNotNull(queueName, \"queueName\");\n Preconditions.checkNotNull(task, \"task\");\n try {\n val processor = eventProcessorMap.get(queueName);\n Preconditions.checkArgument(null != processor, \"Attempt to add to non existent queue (%s).\", queueName);\n return Futures.toVoid(processor.add(SERIALIZER.serialize(task), Duration.ofMillis(1000)));\n } catch (Throwable e) {\n return CompletableFuture.failedFuture(e);\n }\n }",
"public interface LongTaskTimer extends Meter {\n static Builder builder(String name) {\n return new Builder(name);\n }\n\n /**\n * Create a timer builder from a {@link Timed} annotation.\n *\n * @param timed The annotation instance to base a new timer on.\n * @return This builder.\n */\n static Builder builder(Timed timed) {\n if (!timed.longTask()) {\n throw new IllegalArgumentException(\"Cannot build a long task timer from a @Timed annotation that is not marked as a long task\");\n }\n\n if (timed.value().isEmpty()) {\n throw new IllegalArgumentException(\"Long tasks instrumented with @Timed require the value attribute to be non-empty\");\n }\n\n return new Builder(timed.value())\n .tags(timed.extraTags())\n .description(timed.description().isEmpty() ? null : timed.description());\n }\n\n /**\n * Executes the callable {@code f} and records the time taken.\n *\n * @param f Function to execute and measure the execution time.\n * @param <T> The return type of the {@link Callable}.\n * @return The return value of {@code f}.\n * @throws Exception Any exception bubbling up from the callable.\n */\n default <T> T recordCallable(Callable<T> f) throws Exception {\n Sample sample = start();\n try {\n return f.call();\n } finally {\n sample.stop();\n }\n }\n\n /**\n * Executes the callable {@code f} and records the time taken.\n *\n * @param f Function to execute and measure the execution time.\n * @param <T> The return type of the {@link Supplier}.\n * @return The return value of {@code f}.\n */\n default <T> T record(Supplier<T> f) {\n Sample sample = start();\n try {\n return f.get();\n } finally {\n sample.stop();\n }\n }\n\n /**\n * Executes the runnable {@code f} and records the time taken.\n *\n * @param f Function to execute and measure the execution time with a reference to the\n * timer id useful for looking up current duration.\n */\n default void record(Consumer<Sample> f) {\n Sample sample = start();\n try {\n f.accept(sample);\n } finally {\n sample.stop();\n }\n }\n\n /**\n * Executes the runnable {@code f} and records the time taken.\n *\n * @param f Function to execute and measure the execution time.\n */\n default void record(Runnable f) {\n Sample sample = start();\n try {\n f.run();\n } finally {\n sample.stop();\n }\n }\n\n /**\n * Start keeping time for a task.\n *\n * @return A task id that can be used to look up how long the task has been running.\n */\n Sample start();\n\n /**\n * Mark a given task as completed.\n *\n * @param task Id for the task to stop. This should be the value returned from {@link #start()}.\n * @return Duration for the task in nanoseconds. A -1 value will be returned for an unknown task.\n */\n long stop(long task);\n\n /**\n * The current duration for an active task.\n *\n * @param task Id for the task to stop. This should be the value returned from {@link #start()}.\n * @param unit The time unit to scale the duration to.\n * @return Duration for the task in nanoseconds. A -1 value will be returned for an unknown task.\n */\n double duration(long task, TimeUnit unit);\n\n /**\n * @param unit The time unit to scale the duration to.\n * @return The cumulative duration of all current tasks in nanoseconds.\n */\n double duration(TimeUnit unit);\n\n /**\n * @return The current number of tasks being executed.\n */\n int activeTasks();\n\n @Override\n default Iterable<Measurement> measure() {\n return Arrays.asList(\n new Measurement(() -> (double) activeTasks(), Statistic.ACTIVE_TASKS),\n new Measurement(() -> duration(TimeUnit.NANOSECONDS), Statistic.DURATION)\n );\n }\n\n class Sample {\n private final LongTaskTimer timer;\n private final long task;\n\n public Sample(LongTaskTimer timer, long task) {\n this.timer = timer;\n this.task = task;\n }\n\n /**\n * Records the duration of the operation\n *\n * @return The duration that was stop in nanoseconds\n */\n public long stop() {\n return timer.stop(task);\n }\n\n public double duration(TimeUnit unit) {\n return timer.duration(task, unit);\n }\n }\n\n /**\n * Fluent builder for long task timers.\n */\n class Builder {\n private final String name;\n private final List<Tag> tags = new ArrayList<>();\n\n @Nullable\n private String description;\n\n private Builder(String name) {\n this.name = name;\n }\n\n /**\n * @param tags Must be an even number of arguments representing key/value pairs of tags.\n * @return The long task timer builder with added tags.\n */\n public Builder tags(String... tags) {\n return tags(Tags.of(tags));\n }\n\n /**\n * @param tags Tags to add to the eventual long task timer.\n * @return The long task timer builder with added tags.\n */\n public Builder tags(Iterable<Tag> tags) {\n tags.forEach(this.tags::add);\n return this;\n }\n\n /**\n * @param key The tag key.\n * @param value The tag value.\n * @return The long task timer builder with a single added tag.\n */\n public Builder tag(String key, String value) {\n tags.add(Tag.of(key, value));\n return this;\n }\n\n /**\n * @param description Description text of the eventual long task timer.\n * @return The long task timer builder with added description.\n */\n public Builder description(@Nullable String description) {\n this.description = description;\n return this;\n }\n\n /**\n * Add the long task timer to a single registry, or return an existing long task timer in that registry. The returned\n * long task timer will be unique for each registry, but each registry is guaranteed to only create one long task timer\n * for the same combination of name and tags.\n *\n * @param registry A registry to add the long task timer to, if it doesn't already exist.\n * @return A new or existing long task timer.\n */\n public LongTaskTimer register(MeterRegistry registry) {\n return registry.more().longTaskTimer(new Meter.Id(name, tags, null, description, Type.LONG_TASK_TIMER));\n }\n }\n}"
] |
[
"0.69528776",
"0.6028204",
"0.59205836",
"0.5897507",
"0.58092564",
"0.56080675",
"0.5519129",
"0.54280853",
"0.5410363",
"0.5360904",
"0.5358038",
"0.5326738",
"0.5282469",
"0.52708536",
"0.5209534",
"0.5203896",
"0.51722425",
"0.51558745",
"0.51328325",
"0.51328325",
"0.51328325",
"0.51026577",
"0.5099062",
"0.5088822",
"0.50617194",
"0.5057174",
"0.50464517",
"0.5026407",
"0.5020381",
"0.50186867",
"0.5009857",
"0.5001501",
"0.4992133",
"0.49854255",
"0.49650636",
"0.49524173",
"0.49355477",
"0.49258026",
"0.49226573",
"0.49226573",
"0.49169743",
"0.4906514",
"0.4905305",
"0.4903533",
"0.49031842",
"0.48842257",
"0.48835224",
"0.48794994",
"0.4869091",
"0.48674095",
"0.4850984",
"0.4838535",
"0.48283562",
"0.48248214",
"0.4821796",
"0.48199013",
"0.4809838",
"0.4805871",
"0.4805824",
"0.480445",
"0.47979715",
"0.4790085",
"0.4781976",
"0.47789297",
"0.4763663",
"0.47620654",
"0.47619507",
"0.4757704",
"0.4757549",
"0.47555587",
"0.47537276",
"0.47489762",
"0.4745956",
"0.47437775",
"0.4734891",
"0.47275543",
"0.47269085",
"0.47250193",
"0.47222796",
"0.47218564",
"0.4715345",
"0.47137082",
"0.47115794",
"0.47094303",
"0.47053766",
"0.47038934",
"0.4703181",
"0.46994543",
"0.46948734",
"0.4692322",
"0.4689535",
"0.46882334",
"0.46797064",
"0.46762612",
"0.46708205",
"0.46612114",
"0.46582013",
"0.46556056",
"0.46521845",
"0.46490774"
] |
0.6476898
|
1
|
Interface to allow task threads to be manipulated during taskthread processing. This allows some operations used by the implementation to occur while synchronizing on particular objects used internally by TaskThread methods. The event returned may not be the event passed as an argument (e.g., the return value may be an event that is stored on a TaskQueue, not the simulation's event queue).
|
SimulationEvent call(TaskThreadSimEvent event);
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public interface TaskEventCallable {\n /**\n * Interface to allow task threads to be manipulated during task-thread\n * processing.\n * This allows some operations used by the implementation to occur\n * while synchronizing on particular objects used internally by\n * TaskThread methods. The event returned may not be the event\n * passed as an argument (e.g., the return value may be an event\n * that is stored on a TaskQueue, not the simulation's event queue).\n * @param event the event used to schedule a task\n * @return the simulation event scheduled or stored; null if the\n * the scheduling or storing is not possible\n * @see org.bzdev.devqsim.TaskThread\n */\n SimulationEvent call(TaskThreadSimEvent event);\n}",
"public interface EventListener {\n\n\t/**\n\t * Called when a task event has occurred.\n\t * \n\t * @param event\n\t * the task event which has occurred\n\t */\n\tvoid eventOccurred(AbstractTaskEvent event);\n}",
"void eventOccurred(AbstractTaskEvent event);",
"public interface ITaskThreadStateChangedListener {\r\n void TaskThreadStateChanged(TaskThreadState previousState, TaskThreadState newState);\r\n}",
"public void onEventMainThread(Object event) {\n\n }",
"void invoke(T event);",
"public abstract void processEvent(Object event);",
"public interface ITaskHandler {\n\n\t/**\n\t * It is called in a separate thread to handle the task.\n\t * Parameters are thoes given in the addTask()\n\t * This method should not been called directly.\n\t * \n\t * @param pTaskType\n\t * @param pParam\n\t * @throws IllegalArgumentException\n\t */\n\tvoid handleTask(ITaskType pTaskType, Object pParam) throws IllegalArgumentException;\n}",
"public abstract void onEvent(T event);",
"public interface ITask extends PropertyChangeListener{\n\tvoid execute();\n\tvoid interrupt();\n\tboolean toBeRemoved();\n\n\t//Using update tick\n\tboolean updateTick();\n\n\t//Using time\n\t//long getWaittime();\n\t//long getEndtime();\n\n\n}",
"void dispatchEvent(DistributedEvent event);",
"public void runEvent();",
"public void asyncFire(EventI event);",
"public interface ASyncTaskListener {\n public void onThreadFinished(Object result);\n}",
"public void onEventMainThread(BaseEvent unused) {\n }",
"protected EventExecutor executor()\r\n/* 49: */ {\r\n/* 50: 87 */ return this.executor;\r\n/* 51: */ }",
"public void doing(MonitorEvent event)\n {\n }",
"@Override\n public abstract <E extends Event> E getThis();",
"abstract void put(T event);",
"protected EventExecutor executor()\r\n/* 27: */ {\r\n/* 28: 58 */ EventExecutor e = super.executor();\r\n/* 29: 59 */ if (e == null) {\r\n/* 30: 60 */ return channel().eventLoop();\r\n/* 31: */ }\r\n/* 32: 62 */ return e;\r\n/* 33: */ }",
"public interface TaskDelegate {\n public void taskComplete(Object object);\n}",
"@Override\n public Object getEvent() {\n return eventObj;\n }",
"public interface EventListener<E extends EventObject> extends java.util.EventListener {\n\n void postEvent(E event);\n}",
"public interface TaskAction {\n\n /**\n * This method will define an asynchronous action to take.\n * The parameter is a simpler interface of Task that only allows progress reporting, to encapsulate actions and\n * prevent them from seeing or modifying the task hierarchy that triggers and manages them.\n */\n public void action (ProgressListener progressListener) throws Exception;\n\n}",
"Event getE();",
"public interface IEventListener<TEventArg extends EventArgs>\n{\n void onExecute(TEventArg args);\n}",
"public interface Task extends Runnable {\n\n /**\n * Get the task name\n *\n * @return\n */\n public String getTaskName();\n\n /**\n *\n * @return true if the task is in active, else false\n */\n public boolean isActive();\n\n /**\n * @return priority of the task\n */\n public int getPriority();\n\n /**\n *\n * @return the sequence number of the task. If two tasks has same priority,\n * then the task with less sequence number executes first.\n */\n public int getSequenceNumber();\n}",
"public void dispatched(MonitorEvent event)\n {\n }",
"public interface EventReceiver {\n\n void onNotify(Event event);\n\n }",
"public interface EventCallback {\n void invoke(String receiver,Object result);\n}",
"public interface Task {\n\n public void performWork() throws InterruptedException;\n\n}",
"public interface Task {\n public void run(Object o);\n}",
"Event getEvent();",
"public void onEvent(TaskEvent taskEvent){\n\t\tlong taskId = taskEvent.getTaskId();\n\t\tlong workflowId = taskEvent.getWorkflowId();\n\t\tString eventName = taskEvent.getName();\n\t\t\n\t\tif(eventName.equals(TaskEventName.START)){\n\t\t\t//If event is start, set task status as Running\n\t\t\ttaskService.updateTaskStatusRunning(workflowId, taskId);\n\t\t}else if(eventName.equals(TaskEventName.DONE)){\n\t\t\t//If event is done, set task status as Done, save Task Done event data as Task's Result,\n\t\t\t//trigger workflow execution\n\t\t\t//1. update task status to done\n taskService.updateTaskStatusDone(workflowId, taskId);\n if(this.workflowService.isWorkflowCompleted(workflowId)){\n \tthis.workflowService.stopWorkflow(workflowId);\n }else{\n\t\t\t\t//2. trigger workflow execution\n\t\t\t\tthis.workflowService.executeWorkFlow(workflowId);\n }\n\t\t}else if (eventName.equals(TaskEventName.FAILED)){\n\t\t\t//If event is failed, set task status as Failed, save Task Failed event data as Task's Result\n\t\t\ttaskService.updateTaskStatusFailed(workflowId, taskId);\n\t\t\tif(this.workflowService.isWorkflowCompleted(workflowId)){\n \tthis.workflowService.stopWorkflow(workflowId);\n }else{\n\t\t\t this.workflowService.executeWorkFlow(workflowId);\n }\n\t\t}else if (eventName.equals(TaskEventName.TIMEOUT)){\n\t\t\ttaskService.updateTaskStatusTimeout(workflowId, taskId);\n\t\t\tif(this.workflowService.isWorkflowCompleted(workflowId)){\n \tthis.workflowService.stopWorkflow(workflowId);\n }else{\n\t\t\t this.workflowService.executeWorkFlow(workflowId);\n }\n\t\t}\n\t}",
"void event(Event e) throws Exception;",
"Callable<E> getTask();",
"public Object getEvent() {\r\n return event;\r\n }",
"public interface TaskBase {\n\t/**\n\t * @return Returns the name of the task\n\t */\n\tpublic String GetName();\n\n\t/**\n\t * Called upon entering autonomous mode\n\t */\n\tpublic void Initialize();\n\n\t/**\n\t * Called every autonomous update\n\t * \n\t * @return Return task result enum\n\t */\n\tpublic TaskReturnType Run();\n\n}",
"@EncoderThread\n protected void onEvent(@NonNull String event, @Nullable Object data) {}",
"public interface TaskCallback extends RunningTaskCallback {\r\n\r\n\r\n /**\r\n * Calling when the task is preparing to start .\r\n */\r\n void onTaskStart();\r\n\r\n @Override\r\n void onTaskRunning(PreTaskResult preTaskResult, int numerator, int denominator);\r\n\r\n /**\r\n * Calling while the task is completed.\r\n *\r\n * @param taskResult TaskResult bean\r\n */\r\n void onTaskCompleted(TaskResult taskResult);\r\n}",
"public interface TaskQueue {\n\n /**\n * Adds a task to this dependency queue.\n *\n * @param task the {@code KernelRunnable} to add\n * @param owner the {@code Identity} that owns the task\n */\n void addTask(KernelRunnable task, Identity owner);\n\n}",
"public interface Task<T> {\r\n /**\r\n * run the task.\r\n *\r\n * @return T a generic type.\r\n */\r\n T run();\r\n}",
"public interface Task<T> {\n public void doHandle(CallBack<T> callback);\n}",
"public interface Task<T> extends Callable<T> {\n\n String getTaskName();\n void onComplete(T result);\n\n}",
"public interface Event {\n\n}",
"public interface Event {\n\n}",
"public interface ActiveEvent {\n\n /**\n * Dispatch the event to its target, listeners of the events source,\n * or do whatever it is this event is supposed to do.\n */\n public void dispatch();\n}",
"public abstract void task() throws InterruptedException;",
"public interface RunnableTask {\n ProcessResult run();\n}",
"public IEvent getCauseEvent();",
"private void setEventThread() {\n setEventThread(Thread.currentThread());\n }",
"@Override\r\n\tpublic void eventReceived(TaskEvent event) \r\n\t{\r\n\t\t//Add new Item\r\n\t\tif (event.getOperationType() == TaskEvent.ADD_NEW_TASK_EVENT)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Add a new item to the List\");\r\n\t\t\tModelLocator.getInstance().getTaskList().add((makeTaskFromArray((String[]) event.parametersToCommand())));\r\n\t\t\tSystem.out.println(ModelLocator.getInstance().getTaskList());\r\n\t\t}\r\n\t\telse if (event.getOperationType() == TaskEvent.REMOVE_TASK_EVENT)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Remove Item from the List\");\r\n\t\t\tModelLocator.getInstance().getTaskList().removeElementAt(Integer.parseInt((String)(event.parametersToCommand())));\r\n\t\t\tSystem.out.println(ModelLocator.getInstance().getTaskList());\r\n\t\t}\r\n\t\telse if(event.getOperationType() == TaskEvent.SET_TASK_DONE_EVENT)\r\n\t\t{\r\n\t\t\t//To be implemented\r\n\t\t\t\r\n\t\t}\r\n\t\telse\r\n\t\t\tSystem.out.println(\"Error!!!!!\");\r\n\t\t\r\n\t}",
"public interface RxCallback<T, E> {\n T onSubThreadExecute(E justParam);\n\n void onMainThreadExecute(T t);\n}",
"final EventDispatchThread getDispatchThread() {\n\treturn dispatchThread;\n }",
"DispatchTask getTask()\n {\n synchronized (m_lock)\n {\n return m_runnable;\n }\n }",
"public interface Executor {\n void setTask(Task task);\n Task getTask();\n void startTask();\n}",
"interface ITask {\r\n\tabstract void Init();\r\n\r\n\tabstract void Run();\r\n\r\n\tabstract void Execute();\r\n\r\n\tabstract void Change(boolean value) throws Exception;\r\n\r\n\tabstract void Change(double value) throws Exception;\r\n\r\n\tabstract boolean IsButton();\r\n}",
"Event createEvent();",
"Event createEvent();",
"public void processEvent(Event event) {\n\t\t\n\t}",
"public interface Observer<E extends Event> {\n void update(E e);\n\n}",
"public Event getTheObject(){\n return this;\n }",
"public abstract void handle(Object event);",
"public void mouseEntered (MouseEvent e) { if(task!=null) task.mouseEntered(e); }",
"public interface EventDispatcher extends EventBroker {\n\n /**\n * Take an event of type {@code T} and dispatch it to all subscribed\n * listeners.\n * Note: It is not defined whether the event is delivered synchronously or\n * asynchronously.\n *\n * @param <T> A subtype of RootApplicationEvent\n * @param event The event to deliver\n */\n <T extends RootApplicationEvent> void dispatch(T event);\n}",
"public interface EventReader extends MessageReader<Runnable> {\n Runnable get(int index);\n}",
"public interface EventHandler\n{\n\t/**\n\t * Process the given event. Called by the EventMonitor when an event occurs.\n\t * \n\t * @param event\n\t * @throws Exception if something goes wrong\n\t */\n\tpublic void handle(TogglesEvent event)\n\tthrows Exception;\n\t\n\t/**\n\t * Answers whether this EventHandler can handle events of the given type.\n\t * If true is returned, the EventMonitor will call handle(), otherwise,\n\t * the EventMonitor will not ask this event handler to process the event.\n\t * \n\t * @param eventClass\n\t * @return\n\t */\n\tpublic boolean handles(Class<? extends TogglesEvent> eventClass);\n}",
"@Override @SuppressWarnings(\"unchecked\")\n\tpublic <T> Future<T> sendEvent(Event<T> e) {\n\t\tMicroService ms=null;\n\t\tConcurrentLinkedQueue<MicroService> queue=null;\n\t\tFuture future=null;\t\t\t\t\t\t\t\t\t// init to null in case no suitable Microservice handler was found.\n\t\tif(eventToMicroHandlers.get(e.getClass())!=null)\n\t\tsynchronized (eventToMicroHandlers.get(e.getClass())) { // lock on individual event queue only.\n\t\t\tqueue = eventToMicroHandlers.get(e.getClass());\n\t\t\tif (queue != null) { //else //this Event does not exist, Meaning no microservice handler ever subscribed to handle this event , reaching here means fatal error.\n\t\t\t\tms=queue.poll();\n\t\t\t\tif (ms!=null){ //else //No Microservices to handle this event were found, meaning microservices did subscribe to handle this event, but they were removed using the unsubscribe function.\n\t\t\t\t\tqueue.add(ms);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif(ms!=null){\n\t\t\tfuture=new Future();\n\t\t\tEventToFuture.put(e,future);\n\t\t\tif(microToQueue.get(ms)!=null) {\n\t\t\t\tsynchronized (microToQueue.get(ms)) {\n\t\t\t\t\tif(microToQueue.get(ms)!=null) {\n\t\t\t\t\t\tmicroToQueue.get(ms).add(e);\n\t\t\t\t\t\tmicroToQueue.get(ms).notify(); // used to notify awaitMessage that there is a message in queue for him. , notifies on Personal queue object belonging to specific microservice.\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t\treturn null;\n\n\t\t}\n\t\treturn future;\n\n\t}",
"public T caseEvent(Event object)\n {\n return null;\n }",
"public ExecutorService getEventExecutor() {\n return executor;\n }",
"Answer perform(final String event);",
"@Override\n\tpublic <T> Future<T> sendEvent(Event<T> e) {\n\t\tif(!registrationHashMap.containsKey(e)) {\n\t\t\treturn null;\n\t\t} else {\n\t\t\t// retrieving list of microservices subscribed to this type of event\n\t\t\tArrayList<MicroService> a = registrationHashMap.get(e);\n\t\t\t// first microservice in \"queue will receive the message\n\t\t\tMicroService m = a.get(0);\n\t\t\tint index = registeredMicroservice.indexOf(m);\n\t\t\tmicroserviceMessageQueue.get(index).add(e);\n\t\t\t//round robin implementation - after microservice receives a message it is removed and added\n\t\t\t// in order to keep a linear order in which subscribed microservices receive event\n\t\t\tregistrationHashMap.get(e).remove(m);\n\t\t\tregistrationHashMap.get(e).add(m);\n\t\t\t//Future<Event> result = new Future();\n\t\t\treturn null; //WHAT TO RETURNNNN\n\t\t}\n\t}",
"public interface Task<T> {\n T execute();\n}",
"public EventEntry getEventEntry();",
"public interface TaskCallback\n{\n void done();\n}",
"public interface ListenerableFuture<T> extends Future<T> {\n\tpublic void addListener(Runnable runnable);\n}",
"public interface IEvent {\n String execute(String params);\n}",
"public void taskStarted(BuildEvent event) {\n }",
"@Override\n\tpublic void transferEvent(AbstractEvent event) throws IOException, InterruptedException {\n\t}",
"public interface ThreadExecutor extends Executor {\n}",
"public interface EventPipeLine {\n /**\n * Adds new event to the pipeline (queue)\n * @param e GameEvent instance\n */\n public void add(GameEvent e);\n\n /**\n * Calls all event processors and removes them from the queue\n */\n public void exec();\n\n /**\n * Removes all events. (ignore the events)\n */\n public void clear();\n\n /**\n * First event from the queue\n * @return GameEvent instance or null if empty\n */\n public GameEvent getFirst();\n\n /**\n * This method can be usefull if you want to know which events are there in the queue.\n * @return all events as GameEvent[] array\n */\n public GameEvent[] getEvents();\n\n /**\n * Number of events in the queue\n */\n public int size();\n \n}",
"void asyncEventPing();",
"public void mouseDragged (MouseEvent e) { if(task!=null) task.mouseDragged(e); }",
"public interface IJobChangeEvent {\n \t/**\n \t * The amount of time in milliseconds to wait after scheduling the job before it \n \t * should be run, or <code>-1</code> if not applicable for this type of event. \n \t * This value is only applicable for the <code>scheduled</code> event.\n \t * \n \t * @return the delay time for this event\n \t */\n \tpublic long getDelay();\n \n \t/**\n \t * The job on which this event occurred.\n \t * \n \t * @return the job for this event\n \t */\n \tpublic Job getJob();\n \n \t/**\n \t * The result returned by the job's run method, or <code>null</code> if\n \t * not applicable. This value is only applicable for the <code>done</code> event.\n \t * \n \t * @return the status for this event\n \t */\n \tpublic IStatus getResult();\n }",
"public abstract void task();",
"@Override\n public void onEvent(Event event) {\n lock.lock();\n\n try {\n runtime.onEvent(event);\n } finally {\n lock.unlock();\n }\n }",
"BasicEvent createBasicEvent();",
"public void onEvent(TCPReceiverThread receiverThread, Event event) throws IOException;",
"@FunctionalInterface\npublic interface EventHook<T> {\n\n /**\n * Invokes this Listener with the event\n *\n * @param event The Event being Invoked\n */\n void invoke(T event);\n}",
"public interface ProgressEvent\r\n {\r\n \tpublic void progressEvent(double value, double total);\r\n }",
"@Override\n\t@SuppressWarnings(\"unchecked\")\n\tpublic <E> void onEvent(E event) {\n\t\tif (clazz.isInstance(event)) {\n\t\t\tonEvent((T) event);\n\t\t}\n\t}",
"@Override\n public void notify(Object event){\n }",
"public interface IEvent {\n}",
"private static void execute(EventExecutor executor, Runnable task)\r\n/* 592: */ {\r\n/* 593: */ try\r\n/* 594: */ {\r\n/* 595:670 */ executor.execute(task);\r\n/* 596: */ }\r\n/* 597: */ catch (Throwable t)\r\n/* 598: */ {\r\n/* 599:672 */ rejectedExecutionLogger.error(\"Failed to submit a listener notification task. Event loop shut down?\", t);\r\n/* 600: */ }\r\n/* 601: */ }",
"Event getCondition();",
"public T caseEvent(Event object) {\r\n\t\treturn null;\r\n\t}",
"@Override\r\n public void processEvent(IAEvent e) {\n\r\n }",
"public T caseEvent(Event object) {\n\t\treturn null;\n\t}",
"EventType getEvent();",
"public interface DefaultUseCase<T> extends Runnable {\n\n public void addListener(T listener);\n\n public void removeListener(T listener);\n\n}"
] |
[
"0.80695754",
"0.68367505",
"0.6808263",
"0.6764364",
"0.6375329",
"0.6069569",
"0.6064956",
"0.596026",
"0.59134424",
"0.5828498",
"0.5801284",
"0.5769365",
"0.5740701",
"0.5689113",
"0.56597424",
"0.5654406",
"0.56493413",
"0.56155765",
"0.5578815",
"0.55769163",
"0.5546149",
"0.5545969",
"0.5543675",
"0.5524547",
"0.55219233",
"0.5511745",
"0.54970455",
"0.54877174",
"0.54720104",
"0.54525626",
"0.5449043",
"0.5445857",
"0.54251605",
"0.54191965",
"0.5406667",
"0.5382256",
"0.5354383",
"0.5344722",
"0.5283532",
"0.52495074",
"0.5246365",
"0.52342427",
"0.52224237",
"0.5221921",
"0.5214839",
"0.5214839",
"0.521378",
"0.5178105",
"0.51775634",
"0.5172846",
"0.516059",
"0.51559424",
"0.5151474",
"0.51365584",
"0.51357144",
"0.51346076",
"0.513085",
"0.5130493",
"0.5130493",
"0.51289415",
"0.51252955",
"0.51221883",
"0.51093173",
"0.51084614",
"0.51048714",
"0.5100697",
"0.50994146",
"0.50989205",
"0.5098667",
"0.50883925",
"0.50841224",
"0.50799453",
"0.5079458",
"0.50721264",
"0.5071647",
"0.50624293",
"0.50581294",
"0.5057792",
"0.50450665",
"0.5044361",
"0.50321996",
"0.50133955",
"0.50119036",
"0.50017005",
"0.49987155",
"0.4994153",
"0.49925664",
"0.49869737",
"0.49866322",
"0.49824762",
"0.49802467",
"0.49779886",
"0.4968366",
"0.4967017",
"0.49661666",
"0.49638677",
"0.49568674",
"0.49443552",
"0.49430904",
"0.49420577"
] |
0.6708032
|
4
|
determines which runway will be used based upon the direction of the wind
|
public void RunwaySystem()
{
// if the wind direction is between 136 and 225
if(wind_direction >= 136 && wind_direction <= 225)
{
System.out.println("Wind direction is " + wind_direction + "° blowing North to South");
runway_number = 18;
runway_direction = " facing South to North.";
}
// if the wind direction is between 1 and 45 and between 316 and 360
else if((wind_direction >= 1 && wind_direction <= 45) ||
(wind_direction >= 316 && wind_direction <= 360))
{
System.out.println("Wind direction is " + wind_direction + "° blowing South to North");
runway_number = 36;
runway_direction = " facing North to South.";
}
else if(wind_direction >= 46 && wind_direction <= 135)
{
System.out.println("Wind direction is " + wind_direction + "° blowing West to East");
runway_number = 9;
runway_direction = " facing East to West.";
}
// if the wind direction is between 226 and 315
else if(wind_direction >= 226 && wind_direction <= 315)
{
System.out.println("Wind direction is " + wind_direction + "° blowing East to West");
runway_number = 27;
runway_direction = " facing West to East.";
}
else
{
System.out.println("Not a valid wind direction");
}
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public String getWindDir() {\n float windDire = 0;\n String windDir = \" \";\n if (readings.size() > 0) {\n windDire = readings.get(readings.size() - 1).windDirection;\n\n if (windDire >= 348.75 || windDire <= 11.25) {\n windDir += windDir + \" N \";\n } else if (windDire >= 11.25 && windDire <= 33.75) {\n windDir += windDir + \" NNE \";\n } else if (windDire >= 33.75 && windDire <= 56.25) {\n windDir += windDir + \" NE \";\n } else if (windDire >= 56.25 && windDire <= 78.75) {\n windDir += windDir + \" ENE \";\n } else if (windDire >= 78.75 && windDire <= 101.25) {\n windDir += windDir + \" E \";\n } else if (windDire >= 101.25 && windDire <= 123.75) {\n windDir += windDir + \" ESE \";\n } else if (windDire >= 123.75 && windDire <= 146.25) {\n windDir += windDir + \" SE \";\n } else if (windDire >= 146.25 && windDire <= 168.75) {\n windDir += windDir + \" SSE \";\n } else if (windDire >= 168.75 && windDire <= 191.25) {\n windDir += windDir + \" S \";\n } else if (windDire >= 191.25 && windDire <= 213.75) {\n windDir += windDir + \" SSW \";\n } else if (windDire >= 213.75 && windDire <= 236.25) {\n windDir += windDir + \" SW \";\n } else if (windDire >= 236.25 && windDire <= 258.75) {\n windDir += windDir + \" WSW \";\n } else if (windDire >= 258.75 && windDire <= 281.25) {\n windDir += windDir + \" W \";\n } else if (windDire >= 281.25 && windDire <= 303.75) {\n windDir += windDir + \" WNW \";\n } else if (windDire >= 303.75 && windDire <= 326.25) {\n windDir += windDir + \" NW \";\n } else if (windDire >= 326.25 && windDire <= 348.75) {\n windDir += windDir + \" NNW \";\n } else {\n }\n }\n return windDir;\n }",
"private void calculateTurn () {\n // Do we need a turn? If not, we're done.\n if (dirOne.opposite() == dirTwo) return;\n /*\n * We need a turn. The coordinates of the turn point will be the x\n * coordinate of the north/south leg and the y coordinate of the\n * east/west leg.\n */\n if (dirOne == Direction.north || dirOne == Direction.south) {\n xTurn = xOne;\n yTurn = yTwo;\n } else {\n xTurn = xTwo;\n yTurn = yOne;\n }\n }",
"private void findWay(MazeCell[] surrounds) {\r\n for (int i = 0; i < surrounds.length; i++) {\r\n if (surrounds[i].isMovable && surrounds[i].getFootprint()) {\r\n int d = faceDir.ordinal();\r\n faceDir = Direction.values()[(d + i) % 4];\r\n }\r\n }\r\n }",
"private void drawRunway(Graphics2D g2){\n\t\t// Get the start and end X.\n\t\tint startX = Math.min(toScaledX(0), toScaledX(getDefaultTORA()));\n\t\tint endX = Math.max(toScaledX(0), toScaledX(getDefaultTORA()));\n\t\t// Create the rectangle shape.\n\t\tRectangle run = new Rectangle\n\t\t\t\t(\t\n\t\t\t\t\t\tstartX,\t\t// x coordinate \n\t\t\t\t\t\ttoScaledY(0) , // y coordinate\n\t\t\t\t\t\tendX-startX, //width of runway\n\t\t\t\t\t\tverticalRunwayHeight\n\t\t\t\t);\n\t\t// Draw the runway area.\n\t\tif( isUsingTextures() ){\n\t\t\tg2.setPaint( tarmacTexture );\n\t\t}else{\n\t\t\tg2.setPaint( ColourSchema.tarmac );\n\t\t}\n\t\tg2.fill(run);\n\t\t\n\t\t// Draw the stopway in the current direction.\n\t\tfloat facing_stopway_length = getFacingStopway();\n\t\tRectangle facing_stopway = new Rectangle(\n\t\t\t\t\tendX,\n\t\t\t\t\ttoScaledY(0) , // y coordinate\n\t\t\t\t\tscaleAbsX(facing_stopway_length), //width of runway\n\t\t\t\t\tverticalRunwayHeight-5 //height of runway\t\n\t\t);\n\t\tif( isUsingTextures() ){\n\t\t\tg2.setPaint( stopwayTexture );\n\t\t}else{\n\t\t\tg2.setPaint(ColourSchema.stopway);\n\t\t}\n\t\tg2.fill(facing_stopway);\n\t\t\n\t\t// Draw the stopway in the opposite direction.\n\t\tfloat opposite_stopway_length = getOppositeDirectionStopway();\n\t\tRectangle opposite_stopway = new Rectangle(\n\t\t\t\t\tstartX-scaleAbsX(opposite_stopway_length),\n\t\t\t\t\ttoScaledY(0), // y coordinate\n\t\t\t\t\tscaleAbsX(opposite_stopway_length), //width of runway\n\t\t\t\t\tverticalRunwayHeight-5 //height of runway\t\n\t\t);\n\t\tif( isUsingTextures() ){\n\t\t\tg2.setPaint( stopwayTexture );\n\t\t}else{\n\t\t\tg2.setPaint(ColourSchema.stopway);\n\t\t}\n\t\tg2.fill(opposite_stopway);\n\t}",
"private void setDirection() {\r\n\t\tif (destinationFloor > initialFloor){\r\n\t\t\tdirection = 1;\r\n\t\t} else {\r\n\t\t\tdirection = -1;\r\n\t\t}\r\n\t}",
"private void calculateDirection(){\n\t\tif(waypoints.size() > 0){\n\t\t\tif(getDistanceToWaypoint() <= getSpeed()){\n\t\t\t\tsetPosition(new Vector2(waypoints.remove(0)));\n\t\t\t\tsetCurrentWaypoint(getCurrentWaypoint() + 1);\n\t\t\t}else{\t\t\n\t\t\t\tVector2 target = new Vector2(waypoints.get(0));\n\t\t\t\tVector2 newDirection = new Vector2(target.sub(getPosition())); \n\t\t\t\tsetDirection(newDirection);\n\t\t\t}\n\t\t}else{\n\t\t\tsetDirection(new Vector2(0, 0));\n\t\t}\n\t}",
"private double getWindDirection(int idx) {\n\t\treturn config.getDouble(getConfigKeyPrefix(idx) + \"_direction\", globalWindDirection);\n\t}",
"public String windCondition(String type, WeatherUnit weath) {\n\tint w = weath.speedindex;\n\n\t// low wind\n\tif (type.equals(\"inland\") && w <= 3 ||\n\t type.equals(\"coastal\") && w <= 2 ||\n\t type.equals(\"open\") && w <= 1 ||\n\t weath.event.equals(\"fog\"))\n\t return weath.winddir + \":\" + weath.windspeed.substring(0,1);\n\t// high wind\n\tif (type.equals(\"inland\") && w >= 3 ||\n\t type.equals(\"coastal\") && w >= 2 ||\n\t type.equals(\"open\") && w >= 1)\n\t return weath.winddir + \":\" + weath.windspeed.substring(2,3);\n\n\t// average wind\n\tint le = Integer.parseInt(weath.windspeed.substring(0,1));\n\tint he = Integer.parseInt(weath.windspeed.substring(2,3));\n\treturn weath.winddir + \":\" + ((le + he)/2);\n }",
"public Directions getDirectionsOfHits() {\n\t\tList<Coordinate> woundPositions = getWoundPositions();\n\t\tif (woundPositions.get(0).getxPosition() == woundPositions.get(1).getxPosition())\n\t\t\treturn Directions.NORTH;\n\t\telse\n\t\t\treturn Directions.WEST;\n\t}",
"public Direction getCorrectRobotDirection();",
"public Runway findRunway(String runwayName) {\r\n\r\n for(int pos = 0; pos < runways.size(); pos++) {\r\n\r\n if(runways.get(pos)!= null)\r\n {\r\n if(runways.get(pos).getName().equals(runwayName)) {\r\n\r\n return runways.get(pos);\r\n }\r\n }\r\n }\r\n\r\n return null;\r\n\r\n }",
"private void drive2Neighbor(int nx, int ny) throws Exception {\n\t\t//note that since the map is upside down, so all left-right turn is switched here\n\t\tswitch(robot.getCurrentDirection()) {\n\t\tcase East:\n\t\t\tif (nx > robot.getCurrentPosition()[0]){\n\t\t\t\trobot.move(1, false);\n\t\t\t}\n\t\t\telse if (nx == robot.getCurrentPosition()[0]) {\n\t\t\t\tif (ny > robot.getCurrentPosition()[1]) {\n\t\t\t\t\trobot.rotate(Turn.LEFT);\n\t\t\t\t\trobot.move(1, false);\n\t\t\t\t}else{\n\t\t\t\t\trobot.rotate(Turn.RIGHT);\n\t\t\t\t\trobot.move(1, false);\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\trobot.rotate(Turn.AROUND);\n\t\t\t\trobot.move(1, false);\n\t\t\t}\n\t\t\tbreak;\n\t\tcase West:\n\t\t\tif (nx < robot.getCurrentPosition()[0]){\n\t\t\t\trobot.move(1, false);\n\t\t\t}\n\t\t\telse if (nx == robot.getCurrentPosition()[0]) {\n\t\t\t\tif (ny > robot.getCurrentPosition()[1]) {\n\t\t\t\t\trobot.rotate(Turn.RIGHT);\n\t\t\t\t\trobot.move(1, false);\n\t\t\t\t}else{\n\t\t\t\t\trobot.rotate(Turn.LEFT);\n\t\t\t\t\trobot.move(1, false);\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\trobot.rotate(Turn.AROUND);\n\t\t\t\trobot.move(1, false);\n\t\t\t}\n\t\t\tbreak;\n\t\tcase North:\n\t\t\tif (nx > robot.getCurrentPosition()[0]){\n\t\t\t\trobot.rotate(Turn.LEFT);\n\t\t\t\trobot.move(1, false);\n\t\t\t}\n\t\t\telse if (nx == robot.getCurrentPosition()[0]) {\n\t\t\t\tif (ny > robot.getCurrentPosition()[1]) {\n\t\t\t\t\trobot.rotate(Turn.AROUND);\n\t\t\t\t\trobot.move(1, false);\n\t\t\t\t}else{\n\t\t\t\t\trobot.move(1, false);\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\trobot.rotate(Turn.RIGHT);\n\t\t\t\trobot.move(1, false);\n\t\t\t}\n\t\t\tbreak;\n\t\tcase South:\n\t\t\tif (nx < robot.getCurrentPosition()[0]){\n\t\t\t\trobot.rotate(Turn.LEFT);\n\t\t\t\trobot.move(1, false);\n\t\t\t}\n\t\t\telse if (nx == robot.getCurrentPosition()[0]) {\n\t\t\t\tif (ny > robot.getCurrentPosition()[1]) {\n\t\t\t\t\trobot.move(1, false);\n\t\t\t\t}else{\n\t\t\t\t\trobot.rotate(Turn.AROUND);\n\t\t\t\t\trobot.move(1, false);\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\trobot.rotate(Turn.RIGHT);\n\t\t\t\trobot.move(1, false);\n\t\t\t}\n\t\t\tbreak;\n\t\t}\n\t}",
"public boolean isWalkway(){\n\t\treturn (cellType == CellType.WALKWAY);\n\t}",
"public abstract int drive(int journeyDistance);",
"public WindDirection (String config_file)\n {\n // Ensure variables are null if no resources allocated\n directions_ = null;\n\n try (FileInputStream config_stream = new FileInputStream (config_file)) {\n JSONTokener tokener = new JSONTokener (config_stream);\n JSONObject config = new JSONObject (tokener);\n \n final double vin = config.getDouble (\"vin\");\n final int vdivider = config.getInt (\"vdivider\");\n final JSONArray directions = config.getJSONArray(\"directions\");\n \n directions_ = new Direction[directions.length ()];\n \n for (int i = 0; i < directions.length (); ++i) {\n final JSONObject direction = directions.getJSONObject(i);\n final String name = direction.getString (\"dir\");\n final double angle = direction.getDouble(\"angle\");\n final int ohms = direction.getInt (\"ohms\");\n final double vout = vin * ohms / (vdivider + ohms);\n final int adc = (int) (vout * MCP3427.MAX / MCP3427.VREF);\n \n directions_[i] = new Direction (name, angle, adc);\n }\n \n // Sort the directions into ascending ADC values\n Arrays.sort (directions_);\n \n // Fill in the lower and upper bounds for each entry EXCLUDING\n // the lower of the lowest and upper of the highest.\n for (int i = 1; i < directions.length (); ++i) {\n Direction lower = directions_[i-1];\n Direction upper = directions_[i];\n \n final int half_way = (lower.getAdc () + upper.getAdc ()) / 2;\n \n lower.setAdc_max (half_way);\n upper.setAdc_min (half_way + 1);\n }\n \n // Fill in the end values\n directions_[0].setAdc_min (0);\n directions_[directions.length () - 1].setAdc_max (MCP3427.MAX);\n \n LOG.log (Level.CONFIG, \"Wind direction data loaded OK\");\n }\n \n catch (FileNotFoundException e) {\n LOG.log (Level.SEVERE, \"Can't open wind direction file: {0}\", config_file);\n }\n \n catch (IOException e) {\n LOG.log (Level.SEVERE, \"I/O error on wind direction file: {0}, {1}\", new Object[]{config_file, e.getMessage ()});\n } \n \n catch (JSONException e) {\n LOG.log (Level.SEVERE, \"JSON parsing error on wind direction file: {0}, {1}\", new Object[]{config_file, e.getMessage ()});\n }\n }",
"@Override\n\tpublic Direction getMove() {\n if (ticks < MAX_TICKS_PER_ROUND - 100) {\n Direction[] dirs = Direction.values();\n return dirs[random.nextInt(dirs.length)];\n } else {\n // Move towards boat\n int deltaX = 0;\n int deltaY = 0;\n if (currentLocation.getX() < 0)\n deltaX = 1;\n else if (currentLocation.getX() > 0)\n deltaX = -1;\n\n if (currentLocation.getY() < 0)\n deltaY = 1;\n else if (currentLocation.getY() > 0)\n deltaY = -1;\n\n if (deltaX > 0 && deltaY == 0) {\n return Direction.E;\n } else if (deltaX > 0 && deltaY > 0) {\n return Direction.NE;\n } else if (deltaX > 0 && deltaY < 0) {\n return Direction.SE;\n } else if (deltaX == 0 && deltaY == 0) {\n return Direction.STAYPUT;\n } else if (deltaX == 0 && deltaY < 0) {\n return Direction.N;\n } else if (deltaX == 0 && deltaY > 0) {\n return Direction.S;\n } else if (deltaX < 0 && deltaY == 0) {\n return Direction.W;\n } else if (deltaX < 0 && deltaY > 0) {\n return Direction.NW;\n } else if (deltaX < 0 && deltaY < 0) {\n return Direction.NE;\n } else {\n throw new RuntimeException(\"I HAVE NO IDEA\");\n }\n }\n\t}",
"void whichWay(Pair adder){\n\t\tSystem.out.print(\"arah kanan : \");\n\t\tswitch (adder.RIGHT_STATUS) {\n\t\tcase ATAS_BOTTOM:\n\t\t\tSystem.out.println(\"bawah\");\n\t\t\tbreak;\n\n\t\tcase ATAS_UP:\n\t\t\tSystem.out.println(\"atas\");\n\t\t\tbreak;\n\n\t\tcase ATAS_RIGHT:\n\t\t\tSystem.out.println(\"kanan\");\n\t\t\tbreak;\n\n\t\tcase ATAS_LEFT:\n\t\t\tSystem.out.println(\"kiri\");\n\t\t\tbreak;\n\n\t\tdefault:\n\t\t\tbreak;\n\t\t}\n\t}",
"private static Directions getDirection() {\n\t\t\treturn values()[rand.nextInt(4)];\n\t\t}",
"public Direction getMove(){\n\t\tif (diam < 3){\n\t\t\tdiam++;\n\t\t\tjustnow = \"east\";\n\t\t\treturn Direction.EAST;\n\t\t}\n\t\telse if (diam < 6){\n\t\t\tdiam++;\n\t\t\tjustnow = \"south\";\n\t\t\treturn Direction.SOUTH;\n\t\t}\n\t\telse if (diam < 9){\n\t\t\tdiam++;\n\t\t\tjustnow = \"west\";\n\t\t\treturn Direction.WEST;\n\t\t}\n\t\telse if (diam < 12){\n\t\t\tdiam++;\n\t\t\tjustnow = \"north\";\n\t\t\treturn Direction.NORTH;\n\t\t}\n\t\telse {\n\t\t\tdiam = 0;\n\t\t\tdiam++;\n\t\t\tjustnow = \"east\";\n\t\t\treturn Direction.EAST;\n\t\t}\t\n\t}",
"@Override\n\tpublic Direction getMove() {\n\t\t//Equal probability for each of the 8 compass direction, as well as staying stationary\n\t\treturn choices[this.random.nextInt(9)];\n\t}",
"public int drive(int speedL, int speedR, int distanceL, int distanceR);",
"private float getRunwayWidth() {\n\t\treturn runwayWidth;\n\t}",
"private Direction calcDirection(int rowD, int colD) {\n // Kuninkaan alapuolella\n if (rowD < 0) {\n if (colD < 0) return Direction.SOUTHWEST;\n if (colD > 0) return Direction.SOUTHEAST;\n return Direction.SOUTH;\n }\n // Kuninkaan yläpuolella\n if (rowD > 0) {\n if (colD < 0) return Direction.NORTHWEST;\n if (colD > 0) return Direction.NORTHEAST;\n return Direction.NORTH;\n }\n // Kuninkaan tasossa\n if (colD < 0) return Direction.WEST;\n return Direction.EAST;\n }",
"private void findWindSpeeds(ForecastIO FIO, WeatherlyDayForecast day){\n FIOHourly hourlyForecast = new FIOHourly(FIO);\n\n //Determine the number of hours left in the day\n Calendar rightNow = Calendar.getInstance();\n int dayHoursLeft = 24 - rightNow.get(Calendar.HOUR_OF_DAY);\n\n //Find the lowest and highest chances for precipitation for the rest of the day\n double minSpeed = hourlyForecast.getHour(0).windSpeed();\n double maxSpeed = minSpeed;\n int maxHour = rightNow.get(Calendar.HOUR_OF_DAY);\n for (int i = 1; i < dayHoursLeft; i++){\n double speed = hourlyForecast.getHour(i).windSpeed();\n if (minSpeed > speed)\n minSpeed = speed;\n if (maxSpeed < speed) {\n maxSpeed = speed;\n maxHour = i + rightNow.get(Calendar.HOUR_OF_DAY);\n }\n\n }\n\n day.setWindMin((int) (minSpeed + 0.5));\n day.setWindMax((int) (maxSpeed + 0.5));\n day.setWindMaxTime(maxHour);\n }",
"public int getChnlWalkway(){\n return this.mFarm.getChnlWalkway();\n }",
"int getDirection();",
"public String getBound() {\n\t\tif (direction.equals(\"S\"))\n\t\t\treturn \"sur\";\n\t\telse if (direction.equals(\"N\"))\n\t\t\treturn \"norte\";\n\t\telse if (direction.equals(\"W\"))\n\t\t\treturn \"oeste\";\n\t\telse\n\t\t\treturn \"este\";\n\t}",
"protected Direction selectMove() {\n Map<Integer, Direction> positive, negative;\n // Add the directions that contains negative stations in a negative set\n // And every other direction in a positive set\n positive = new HashMap<Integer,Direction>(16);\n negative = new HashMap<Integer,Direction>(16);\n for (Direction d : Direction.directions) {\n int result = checkMove(d);\n if (result == 1) {\n positive.put(positive.size(), d);\n } else if (result == 0) {\n negative.put(negative.size(), d);\n } else {\n continue;\n }\n }\n // If there is no positive move, choose a RANDOM negative move\n if (positive.isEmpty()) {\n return negative.get(rand.nextInt(negative.size()));\n } else { // Otherwise choose a RANDOM positive move\n return positive.get(rand.nextInt(positive.size()));\n }\n }",
"@Override\n\tpublic String runTurn() {\n\t\tif (possibleCords.isEmpty() && !isEndHuntMode) {\n\t\t\treset();\n\t\t\tisHuntMode = false;\n\t\t\tisEndHuntMode = true;\n\t\t}\n\t\t\n\t\tif (isHuntMode || isEndHuntMode) {\n\t\t\tlastCord = getCord();\n\t\t}\n\t\telse if (isSearchMode){\n\t\t\tString coordinate = null;\n\t\t\t// Get a non out of bounds coordinate \n\t\t\twhile (coordinate == null) {\n\t\t\t\tcoordinate = aroundCords[searchModeIter];\n\t\t\t\tif (coordinate == null)\n\t\t\t\t\tsearchModeIter++;\n\t\t\t}\n\t\t\tlastCord = coordinate;\n\t\t}\n\t\telse {// its in destroy mode\n\t\t\tString coordinate = cordFromIter(lastCord, searchModeIter);\n\t\t\tif (coordinate == null && isReverse) { // we've completely destroyed the ship and hit a wall\n\t\t\t\treset();\n\t\t\t\tlastCord = getCord();\n\t\t\t}\n\t\t\telse if (coordinate == null) { // hit wall in forward direction\n\t\t\t\tisReverse = true;\n\t\t\t\tchangeIterDirection();\n\t\t\t\tlastCord = cordFromIter(originalHit, searchModeIter);\n\t\t\t\tif (lastCord == null) { // ship is destroyed and hit a wall in the reverse direction\n\t\t\t\t\treset();\n\t\t\t\t\tlastCord = getCord();\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tlastCord = coordinate;\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\tpossibleCords.remove(lastCord);\n\t\totherCords.remove(lastCord);\n\t\treturn lastCord;\n\t}",
"private float getRunwayLength() {\n\t\treturn runwayLength;\n\t}",
"public String switchDirection(MapTile[][] scanMapTiles, String direction) {\n\tswitch (direction) {\n\tcase \"E\":\n\t\treturn south;\n\tcase \"S\":\n\t\treturn west;\n\tcase \"N\":\n\t\treturn east;\n\tcase \"W\":\n\t\treturn north;\n\tdefault:\n\t\treturn null;\n\n\t}\n\n}",
"public static int isVehicleInSight(Player curr) {\n ArrayList<Integer> dirs = new ArrayList();\n int bodyDir = curr.getBodyDirection();\n if (bodyDir == UP) {\n dirs.add(UP);\n dirs.add(RIGHT);\n dirs.add(LEFT);\n if (curr.head360())\n dirs.add(DOWN);\n } else if (bodyDir == RIGHT) {\n dirs.add(RIGHT);\n dirs.add(UP);\n dirs.add(DOWN);\n if (curr.head360())\n dirs.add(LEFT);\n } else if (bodyDir == DOWN) {\n dirs.add(DOWN);\n dirs.add(RIGHT);\n dirs.add(LEFT);\n if (curr.head360())\n dirs.add(UP);\n } else //if(curr.getBodyDirection()==LEFT)\n {\n dirs.add(LEFT);\n dirs.add(UP);\n dirs.add(DOWN);\n if (curr.head360())\n dirs.add(RIGHT);\n }\n\n if (dirs == null || dirs.size() == 0)\n return -1;\n for (int vi = 0; vi < players.length; vi++) {\n if (players[vi] == null || players[vi].getName().equals(\"NONE\") || (players[vi] instanceof Monster)) //we don't want the AI monster to consider itself or other monsters a target\n continue;\n Player veh = players[vi];\n boolean isAir = veh.isFlying();\n int vR = veh.getRow();\n int vC = veh.getCol();\n if (veh.getName().endsWith(\"civilian\"))\n continue;\n for (int i = 0; i < dirs.size(); i++) {\n int dir = dirs.get(i);\n boolean skip = false;\n if (dir == UP) {\n for (int r = curr.getRow(); r >= 1; r--) {\n if (isAir && r == vR && curr.getCol() == vC)\n return dir + 10;\n if (r == vR && curr.getCol() == vC)\n return dir;\n }\n } else if (dir == DOWN) {\n for (int r = curr.getRow(); r < board.length - 1; r++) {\n if (isAir && r == vR && curr.getCol() == vC)\n return dir + 10;\n if (r == vR && curr.getCol() == vC)\n return dir;\n }\n } else if (dir == RIGHT) {\n for (int c = curr.getCol(); c < board[0].length - 1; c++) {\n if (isAir && c == vC && curr.getRow() == vR)\n return dir + 10;\n if (curr.getRow() == vR && c == vC)\n return dir;\n }\n } else if (dir == LEFT) {\n for (int c = curr.getCol(); c >= 1; c--) {\n if (isAir && c == vC && curr.getRow() == vR)\n return dir + 10;\n if (curr.getRow() == vR && c == vC)\n return dir;\n }\n }\n if (skip)\n continue;\n }\n }\n return -1;\n }",
"public String getWindDirection() {\n\t\treturn windDirection;\n\t}",
"public String getWindDirection() {\n\t\treturn windDirection;\n\t}",
"void setDirections(Directions dir){\n this.dir = dir;\n }",
"public final synchronized int getWindingRule() {\n\t\treturn windingRule;\n\t}",
"private Point getMoveDestination(Building b)\n\t{\n\t\tObjectType buildType = b.getObjectType();\n\t\tPoint workPoint = b.getPosition();\n\t\tfor (int i = workPoint.getX(); i < workPoint.getX()\n\t\t\t\t+ getMyPlayer().getPlayerInfo().getBuildingSize()\n\t\t\t\t\t\t.get(buildType) - 1; i++)\n\t\t{\n\t\t\tPoint p1 = new Point(i, workPoint.getY() - 1);\n\t\t\tif (p1.getY() < getMyPlayer().getMyMap().getMapBlocks()[0].length\n\t\t\t\t\t&& (getMyPlayer().getMyMap().getMapBlocks()[i][p1.getY()]\n\t\t\t\t\t\t\t.isWalkableByWorker() || (!getMyPlayer()\n\t\t\t\t\t\t\t.getMapVisiblity()[i][p1.getY()])))\n\t\t\t\treturn p1;\n\t\t\tPoint p2 = new Point(i, workPoint.getY()\n\t\t\t\t\t+ getMyPlayer().getPlayerInfo().getBuildingSize()\n\t\t\t\t\t\t\t.get(buildType));\n\t\t\tif ((p2.getY() < getMyPlayer().getMyMap().getMapBlocks()[0].length)\n\t\t\t\t\t&& (getMyPlayer().getMyMap().getMapBlocks()[i][p2.getY()]\n\t\t\t\t\t\t\t.isWalkableByWorker() || (!getMyPlayer()\n\t\t\t\t\t\t\t.getMapVisiblity()[i][p2.getY()])))\n\t\t\t\treturn p2;\n\n\t\t}\n\t\tfor (int j = workPoint.getY(); j < workPoint.getY()\n\t\t\t\t+ getMyPlayer().getPlayerInfo().getBuildingSize()\n\t\t\t\t\t\t.get(buildType); j++)\n\t\t{\n\t\t\tPoint p1 = new Point(workPoint.getX() - 1, j);\n\t\t\tif (p1.getX() < getMyPlayer().getMyMap().getMapBlocks().length\n\t\t\t\t\t&& (getMyPlayer().getMyMap().getMapBlocks()[p1.getX()][j]\n\t\t\t\t\t\t\t.isWalkableByWorker() || (!getMyPlayer()\n\t\t\t\t\t\t\t.getMapVisiblity()[p1.getX()][j])))\n\t\t\t\treturn p1;\n\t\t\tPoint p2 = new Point(workPoint.getX()\n\t\t\t\t\t+ getMyPlayer().getPlayerInfo().getBuildingSize()\n\t\t\t\t\t\t\t.get(buildType), j);\n\t\t\tif (p2.getX() < getMyPlayer().getMyMap().getMapBlocks().length\n\t\t\t\t\t&& (getMyPlayer().getMyMap().getMapBlocks()[p2.getX()][j]\n\t\t\t\t\t\t\t.isWalkableByWorker() || (!getMyPlayer()\n\t\t\t\t\t\t\t.getMapVisiblity()[p2.getX()][j])))\n\t\t\t\treturn p2;\n\n\t\t}\n\t\treturn null;\n\t}",
"private void turnClockwise(){\n\t\tswitch(this.facingDirection){\n\t\tcase NORTH:\n\t\t\tfacingDirection = Direction.EAST;\n\t\t\tbreak;\n\t\tcase SOUTH:\n\t\t\tfacingDirection = Direction.WEST;\n\t\t\tbreak;\n\t\tcase WEST:\n\t\t\tfacingDirection = Direction.NORTH;\n\t\t\tbreak;\n\t\tcase EAST:\n\t\t\tfacingDirection = Direction.SOUTH;\n\t\t}\n\t}",
"String getDirection();",
"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 int[] FindNextDirection(Tile start)\n {\n int[] direction = new int[2];\n Tile up = grid.GetTile(start.getXPlace(), start.getYPlace() - 1);\n Tile right = grid.GetTile(start.getXPlace() + 1, start.getYPlace());\n Tile down = grid.GetTile(start.getXPlace(), start.getYPlace() + 1);\n Tile left = grid.GetTile(start.getXPlace() - 1, start.getYPlace() - 1);\n \n if(start.getType() == up.getType())\n {\n direction[0] = 0;\n direction[1] = -1;\n }\n else if(start.getType() == right.getType())\n {\n direction[0] = 1;\n direction[1] = 0;\n }\n else if(start.getType() == down.getType())\n {\n direction[0] = 0;\n direction[1] = 1;\n }\n else if(start.getType() == left.getType())\n {\n direction[0] = -1;\n direction[1] = 0;\n }\n else\n {\n direction[0] = 2;\n direction[1] = 2;\n System.out.println(\"NO DIRECTION FOUND.\");\n }\n return direction;\n }",
"public abstract int getDirection();",
"@Override\n\tpublic Direction nextMove(State state)\n\t{\n\t\t\n\t\tthis.direction = Direction.STAY;\n\t\tthis.hero = state.hero();\n\t\tthis.position = new Point( this.hero.position.right, this.hero.position.left ); //x and y are reversed, really\n\t\t\n\t\tthis.pathMap = new PathMap( state, this.position.x, this.position.y );\n\n\t\t//find the richest hero\n\t\tHero richestHero = state.game.heroes.get(0);\n\t\tif( richestHero == this.hero ) { richestHero = state.game.heroes.get(1); } //just grab another hero if we are #0\n\t\t\n\t\tfor( Hero hero : state.game.heroes )\n\t\t{\n\t\t\tif( hero != this.hero && hero.gold > richestHero.gold )\n\t\t\t{\n\t\t\t\trichestHero = hero;\n\t\t\t}\n\t\t}\n\t\t\n\t\t//get all interesting sites\n\t\tList<TileInfo> minesInRange = this.pathMap.getSitesInRange( TileType.FREE_MINE, 20 );\t//mines in vicinity\n\t\tList<TileInfo> takenMinesInRange = this.pathMap.getSitesInRange( TileType.TAKEN_MINE, (100-richestHero.life)/2 );\t//mines in vicinity\n\t\tList<TileInfo> pubsInRange = this.pathMap.getSitesInRange( TileType.TAVERN, (int)(Math.pow(100-this.hero.life,2)*state.game.board.size/5000) );\t\t//pubs in vicinity\n\t\t\n\t\t//first visit pubs (apparently we need it)\n\t\tif( pubsInRange.size() != 0 )\n\t\t{\n\t\t\tthis.direction = this.pathMap.getDirectionTo( pubsInRange.get(0) );\n\t\t}\n\t\t\n\t\t//then visit the mines\n\t\telse if( minesInRange.size() != 0 )\n\t\t{\n\t\t\tthis.direction = this.pathMap.getDirectionTo( minesInRange.get(0) );\n\t\t}\n\t\t\n\t\t//then visit taken mines\n\t\telse if( takenMinesInRange.size() != 0 )\n\t\t{\n\t\t\tthis.direction = this.pathMap.getDirectionTo( takenMinesInRange.get(0) );\n\t\t}\n\t\t\n\t\t//then hunt for players\n\t\telse\n\t\t{\n\t\t\t//kill the richest hero! (but first full health)\n\t\t\tif( this.hero.life > 85 )\n\t\t\t{\n\t\t\t\tthis.direction = this.pathMap.getDirectionTo( richestHero.position.right, richestHero.position.left );\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t//run away!!!\n\t\t\t\tthis.direction = intToDir( (int)(Math.random()*4) );\n\t\t\t}\n\t\t}\n\t\t\n\t\t//VisualPathMap.getInstance( pathMap );\n\t\t\n\t\treturn this.direction;\n\t}",
"protected final void run(int direction) {\n\t\tint temp_x = x_coord;\n\t\tint temp_y = y_coord;\n\t//Update location (*2 because we move twice in same direction)\t\n\t\tif (!hasMoved) {\n\t\t\ttemp_x += (x_directions[direction] * 2);\n\t\t\ttemp_x += Params.world_width;\n\t\t\ttemp_x %= Params.world_width;\n\t\t\ttemp_y += (y_directions[direction] * 2);\n\t\t\ttemp_y += Params.world_height;\n\t\t\ttemp_y %= Params.world_height;\n\t\t}\n\t//Specific to running during fight\n\t\tif (fightMode) {\n\t\t\tboolean critterInLocation = false;\n\t\t\tfor (Critter c: population) {\n\t\t\t\tif ((c.x_coord == temp_x) && (c.y_coord == temp_y)) {\n\t\t\t\t\tcritterInLocation = true;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (!critterInLocation) {\n\t\t\t\tx_coord = temp_x;\n\t\t\t\ty_coord = temp_y;\n\t\t\t}\n\t\t}\n\t\telse {\t\t\t\t\t//Specific to walking in time step\n\t\t\tx_coord = temp_x;\n\t\t\ty_coord = temp_y;\n\t\t}\n\t//Update energy\n\t\tenergy -= Params.run_energy_cost;\n\t//Update hasMoved\n\t\thasMoved = true;\n\t}",
"public int Simulate()\r\n {\r\n return town.planRoute();\r\n }",
"public static int[] isMonsterInSight(Player curr) {\n int[] ans = {-1, -1};\n ArrayList<Integer> dirs = new ArrayList();\n int bodyDir = curr.getBodyDirection();\n String name = curr.getName();\n if (bodyDir == UP) {\n dirs.add(UP);\n if (!name.endsWith(\"fighter\")) //figher planes can only see what is in front of them\n {\n if (!name.equals(\"AIR bomber\"))//bombers only see what is in front and behind them for their bombing run\n {\n dirs.add(RIGHT);\n dirs.add(LEFT);\n }\n if (name.startsWith(\"TANK\") || name.endsWith(\"jeep\") || name.endsWith(\"destroyer\") || name.endsWith(\"coastguard\") || name.equals(\"AIR bomber\"))\n dirs.add(DOWN);\n }\n } else if (bodyDir == RIGHT) {\n dirs.add(RIGHT);\n if (!name.endsWith(\"fighter\")) //figher planes can only see what is in front of them\n {\n if (!name.equals(\"AIR bomber\"))//bombers only see what is in front and behind them for their bombing run\n {\n dirs.add(UP);\n dirs.add(DOWN);\n }\n if (name.startsWith(\"TANK\") || name.endsWith(\"jeep\") || name.endsWith(\"destroyer\") || name.endsWith(\"coastguard\") || name.equals(\"AIR bomber\"))\n dirs.add(LEFT);\n }\n } else if (bodyDir == DOWN) {\n dirs.add(DOWN);\n if (!name.endsWith(\"fighter\")) //figher planes can only see what is in front of them\n {\n if (!name.equals(\"AIR bomber\"))//bombers only see what is in front and behind them for their bombing run\n {\n dirs.add(RIGHT);\n dirs.add(LEFT);\n }\n if (name.startsWith(\"TANK\") || name.endsWith(\"jeep\") || name.endsWith(\"destroyer\") || name.endsWith(\"coastguard\") || name.equals(\"AIR bomber\"))\n dirs.add(UP);\n }\n } else //if(curr.getBodyDirection()==LEFT)\n {\n dirs.add(LEFT);\n if (!name.endsWith(\"fighter\")) //figher planes can only see what is in front of them\n {\n if (!name.equals(\"AIR bomber\"))//bombers only see what is in front and behind them for their bombing run\n {\n dirs.add(UP);\n dirs.add(DOWN);\n }\n if (name.startsWith(\"TANK\") || name.endsWith(\"jeep\") || name.endsWith(\"destroyer\") || name.endsWith(\"coastguard\") || name.equals(\"AIR bomber\"))\n dirs.add(RIGHT);\n }\n }\n\n if (dirs == null || dirs.size() == 0)\n return ans; //{-1,-1}\n for (int m = 0; m < players.length; m++) { //skip player if Vehicle is not mind controlled and the player is not a monster\n //skip player if Vehicle is mind controlled and the player is a monster\n if (players[m] == null || players[m].getName().equals(\"NONE\") || curr == players[m] ||\n ((curr instanceof Vehicle && !((Vehicle) (curr)).isMindControlled()) && !(players[m] instanceof Monster)) ||\n ((curr instanceof Vehicle && ((Vehicle) (curr)).isMindControlled()) && (players[m] instanceof Monster)))\n continue;\n int mR = players[m].getRow();\n int mC = players[m].getCol();\n\n for (int i = 0; i < dirs.size(); i++) {\n int dir = dirs.get(i);\n boolean skip = false;\n if (dir == UP) {\n for (int r = curr.getRow(); r >= 0; r--) { //coastguard, destroyer, fighter planes and artillery have the monsters position known - the monster is not hidden by structures\n if (!MapBuilder.noStructure(r, curr.getCol(), panel) && !name.endsWith(\"coastguard\") && !name.endsWith(\"destroyer\") && !name.endsWith(\"fighter\") && !name.endsWith(\"artillery\") && !name.endsWith(\"missile\") && !name.equals(\"AIR bomber\") && !players[m].isFlying()) {\n skip = true;\n break;\n }\n if (r == mR && curr.getCol() == mC) {\n ans[0] = dir;\n ans[1] = m;\n return ans;\n }\n }\n } else if (dir == DOWN) {\n for (int r = curr.getRow(); r < board.length - 1; r++) {\n if (!MapBuilder.noStructure(r, curr.getCol(), panel) && !name.endsWith(\"coastguard\") && !name.endsWith(\"destroyer\") && !name.endsWith(\"fighter\") && !name.endsWith(\"artillery\") && !name.endsWith(\"missile\") && !name.equals(\"AIR bomber\") && !players[m].isFlying()) {\n skip = true;\n break;\n }\n if (r == mR && curr.getCol() == mC) {\n ans[0] = dir;\n ans[1] = m;\n return ans;\n }\n\n }\n } else if (dir == RIGHT) {\n for (int c = curr.getCol(); c < board[0].length; c++) {\n if (!MapBuilder.noStructure(curr.getRow(), c, panel) && !name.endsWith(\"coastguard\") && !name.endsWith(\"destroyer\") && !name.endsWith(\"fighter\") && !name.endsWith(\"artillery\") && !name.endsWith(\"missile\") && !name.equals(\"AIR bomber\") && !players[m].isFlying()) {\n skip = true;\n break;\n }\n if (curr.getRow() == mR && c == mC) {\n ans[0] = dir;\n ans[1] = m;\n return ans;\n }\n }\n } else if (dir == LEFT) {\n for (int c = curr.getCol(); c >= 0; c--) {\n if (!MapBuilder.noStructure(curr.getRow(), c, panel) && !name.endsWith(\"coastguard\") && !name.endsWith(\"destroyer\") && !name.endsWith(\"fighter\") && !name.endsWith(\"artillery\") && !name.endsWith(\"missile\") && !name.equals(\"AIR bomber\") && !players[m].isFlying()) {\n skip = true;\n break;\n }\n if (curr.getRow() == mR && c == mC) {\n ans[0] = dir;\n ans[1] = m;\n return ans;\n }\n }\n }\n if (skip)\n continue;\n }\n }\n return ans;\n }",
"public void determineLocType() {\r\n\t\tif(usSensor.rawDistance()<WALL_THRESHOLD) { //Deciding what localizer should be used\r\n\t\t\tthis.loc = LocalizerType.RISING_EDGE;\r\n\t\t}else {\r\n\t\t\tthis.loc=LocalizerType.FALLING_EDGE;\r\n\t\t}\r\n\t}",
"double getStation();",
"public void windChillIndex()\n {\n\n System.out.print( \"Enter the damn wind speed: \" );\n double v = scan.nextDouble();\n System.out.print( \"Enter the darn temperature: \" );\n double t = scan.nextDouble();\n double wci;\n if ( 0 <= v && v <= 4 )\n {\n wci = t;\n System.out.println( \"The wind chill index is: \" + wci );\n }\n if ( v >= 45 )\n {\n wci = 1.6 * t - 55;\n System.out.println( \"The wind chill index is: \" + wci );\n }\n wci = 91.4 + ( 91.4 - t )\n * ( 0.0203 * v - 0.304 * Math.sqrt( (double)v ) - 0.474 );\n System.out.println( \"The wind chill index is: \" + wci );\n\n }",
"private void turnToDesiredDirection() {\n\n\t\tdouble dir = sens.getDirection();\n\n\t\tif (dir < desiredDirection) {\n\t\t\tif (Math.abs(dir - desiredDirection) < 180) {\n\t\t\t\tdir += TURNSPEED;\n\t\t\t} else {\n\t\t\t\tdir -= TURNSPEED;\n\t\t\t}\n\t\t} else {\n\t\t\tif (Math.abs(dir - desiredDirection) < 180) {\n\t\t\t\tdir -= TURNSPEED;\n\t\t\t} else {\n\t\t\t\tdir += TURNSPEED;\n\t\t\t}\n\t\t}\n\t\t\n\t\tsens.setDirection(dir);\n\t\t\n\t}",
"@Test\n public void testRelativeDirectionOfTileByAirFacingSouth() {\n Assert.assertEquals(Direction.FRONT, nav.finder().relativeDirectionOfTileByAir(getTile(9, 1)));\n Assert.assertEquals(Direction.FRONT, nav.finder().relativeDirectionOfTileByAir(getTile(9, 5)));\n Assert.assertEquals(Direction.FRONT, nav.finder().relativeDirectionOfTileByAir(getTile(9, 8)));\n Assert.assertEquals(Direction.FRONT, nav.finder().relativeDirectionOfTileByAir(getTile(10, 2)));\n Assert.assertEquals(Direction.FRONT, nav.finder().relativeDirectionOfTileByAir(getTile(10, 8)));\n Assert.assertEquals(Direction.FRONT, nav.finder().relativeDirectionOfTileByAir(getTile(11, 1)));\n Assert.assertEquals(Direction.FRONT, nav.finder().relativeDirectionOfTileByAir(getTile(11, 5)));\n Assert.assertEquals(Direction.FRONT, nav.finder().relativeDirectionOfTileByAir(getTile(11, 8)));\n\n /*\n Tile in front => FRONT\n */\n Assert.assertEquals(Direction.FRONT, nav.finder().relativeDirectionOfTileByAir(getTile(0, 1)));\n Assert.assertEquals(Direction.FRONT, nav.finder().relativeDirectionOfTileByAir(getTile(0, 5)));\n Assert.assertEquals(Direction.FRONT, nav.finder().relativeDirectionOfTileByAir(getTile(8, 1)));\n Assert.assertEquals(Direction.FRONT, nav.finder().relativeDirectionOfTileByAir(getTile(8, 5)));\n Assert.assertEquals(Direction.FRONT, nav.finder().relativeDirectionOfTileByAir(getTile(12, 1)));\n Assert.assertEquals(Direction.FRONT, nav.finder().relativeDirectionOfTileByAir(getTile(12, 5)));\n Assert.assertEquals(Direction.FRONT, nav.finder().relativeDirectionOfTileByAir(getTile(17, 1)));\n Assert.assertEquals(Direction.FRONT, nav.finder().relativeDirectionOfTileByAir(getTile(17, 5)));\n\n /*\n Tile to the left, but within the turning buffer => FRONT\n */\n Assert.assertEquals(Direction.FRONT, nav.finder().relativeDirectionOfTileByAir(getTile(12, 9)));\n Assert.assertEquals(Direction.FRONT, nav.finder().relativeDirectionOfTileByAir(getTile(12, 10)));\n Assert.assertEquals(Direction.FRONT, nav.finder().relativeDirectionOfTileByAir(getTile(12, 11)));\n Assert.assertEquals(Direction.FRONT, nav.finder().relativeDirectionOfTileByAir(getTile(13, 9)));\n Assert.assertEquals(Direction.FRONT, nav.finder().relativeDirectionOfTileByAir(getTile(13, 10)));\n Assert.assertEquals(Direction.FRONT, nav.finder().relativeDirectionOfTileByAir(getTile(13, 11)));\n Assert.assertEquals(Direction.FRONT, nav.finder().relativeDirectionOfTileByAir(getTile(14, 9)));\n Assert.assertEquals(Direction.FRONT, nav.finder().relativeDirectionOfTileByAir(getTile(14, 10)));\n Assert.assertEquals(Direction.FRONT, nav.finder().relativeDirectionOfTileByAir(getTile(14, 11)));\n\n /*\n Tile to the right, but within the turning buffer => FRONT\n */\n Assert.assertEquals(Direction.FRONT, nav.finder().relativeDirectionOfTileByAir(getTile(6, 9)));\n Assert.assertEquals(Direction.FRONT, nav.finder().relativeDirectionOfTileByAir(getTile(6, 10)));\n Assert.assertEquals(Direction.FRONT, nav.finder().relativeDirectionOfTileByAir(getTile(6, 11)));\n Assert.assertEquals(Direction.FRONT, nav.finder().relativeDirectionOfTileByAir(getTile(7, 9)));\n Assert.assertEquals(Direction.FRONT, nav.finder().relativeDirectionOfTileByAir(getTile(7, 10)));\n Assert.assertEquals(Direction.FRONT, nav.finder().relativeDirectionOfTileByAir(getTile(7, 11)));\n Assert.assertEquals(Direction.FRONT, nav.finder().relativeDirectionOfTileByAir(getTile(8, 9)));\n Assert.assertEquals(Direction.FRONT, nav.finder().relativeDirectionOfTileByAir(getTile(8, 10)));\n Assert.assertEquals(Direction.FRONT, nav.finder().relativeDirectionOfTileByAir(getTile(8, 11)));\n\n /*\n Tile to to the right, horizontally aligned => RIGHT\n */\n Assert.assertEquals(Direction.RIGHT, nav.finder().relativeDirectionOfTileByAir(getTile(0, 9)));\n Assert.assertEquals(Direction.RIGHT, nav.finder().relativeDirectionOfTileByAir(getTile(0, 10)));\n Assert.assertEquals(Direction.RIGHT, nav.finder().relativeDirectionOfTileByAir(getTile(0, 11)));\n Assert.assertEquals(Direction.RIGHT, nav.finder().relativeDirectionOfTileByAir(getTile(5, 9)));\n Assert.assertEquals(Direction.RIGHT, nav.finder().relativeDirectionOfTileByAir(getTile(5, 10)));\n Assert.assertEquals(Direction.RIGHT, nav.finder().relativeDirectionOfTileByAir(getTile(5, 11)));\n\n /*\n Tile in front, but within the turning buffer and to the right => RIGHT\n */\n Assert.assertEquals(Direction.RIGHT, nav.finder().relativeDirectionOfTileByAir(getTile(0, 6)));\n Assert.assertEquals(Direction.RIGHT, nav.finder().relativeDirectionOfTileByAir(getTile(0, 7)));\n Assert.assertEquals(Direction.RIGHT, nav.finder().relativeDirectionOfTileByAir(getTile(0, 8)));\n Assert.assertEquals(Direction.RIGHT, nav.finder().relativeDirectionOfTileByAir(getTile(6, 6)));\n Assert.assertEquals(Direction.RIGHT, nav.finder().relativeDirectionOfTileByAir(getTile(6, 7)));\n Assert.assertEquals(Direction.RIGHT, nav.finder().relativeDirectionOfTileByAir(getTile(6, 8)));\n Assert.assertEquals(Direction.RIGHT, nav.finder().relativeDirectionOfTileByAir(getTile(8, 6)));\n Assert.assertEquals(Direction.RIGHT, nav.finder().relativeDirectionOfTileByAir(getTile(8, 7)));\n Assert.assertEquals(Direction.RIGHT, nav.finder().relativeDirectionOfTileByAir(getTile(8, 8)));\n\n /*\n Tile is at the back, but to the right => RIGHT\n */\n Assert.assertEquals(Direction.RIGHT, nav.finder().relativeDirectionOfTileByAir(getTile(0, 12)));\n Assert.assertEquals(Direction.RIGHT, nav.finder().relativeDirectionOfTileByAir(getTile(0, 17)));\n Assert.assertEquals(Direction.RIGHT, nav.finder().relativeDirectionOfTileByAir(getTile(4, 14)));\n Assert.assertEquals(Direction.RIGHT, nav.finder().relativeDirectionOfTileByAir(getTile(4, 17)));\n Assert.assertEquals(Direction.RIGHT, nav.finder().relativeDirectionOfTileByAir(getTile(5, 12)));\n Assert.assertEquals(Direction.RIGHT, nav.finder().relativeDirectionOfTileByAir(getTile(6, 12)));\n Assert.assertEquals(Direction.RIGHT, nav.finder().relativeDirectionOfTileByAir(getTile(7, 12)));\n Assert.assertEquals(Direction.RIGHT, nav.finder().relativeDirectionOfTileByAir(getTile(8, 12)));\n Assert.assertEquals(Direction.RIGHT, nav.finder().relativeDirectionOfTileByAir(getTile(9, 12)));\n Assert.assertEquals(Direction.RIGHT, nav.finder().relativeDirectionOfTileByAir(getTile(9, 14)));\n Assert.assertEquals(Direction.RIGHT, nav.finder().relativeDirectionOfTileByAir(getTile(9, 17)));\n\n /*\n To to the left, horizontally aligned => LEFT\n */\n Assert.assertEquals(Direction.LEFT, nav.finder().relativeDirectionOfTileByAir(getTile(15, 9)));\n Assert.assertEquals(Direction.LEFT, nav.finder().relativeDirectionOfTileByAir(getTile(15, 10)));\n Assert.assertEquals(Direction.LEFT, nav.finder().relativeDirectionOfTileByAir(getTile(15, 11)));\n Assert.assertEquals(Direction.LEFT, nav.finder().relativeDirectionOfTileByAir(getTile(17, 9)));\n Assert.assertEquals(Direction.LEFT, nav.finder().relativeDirectionOfTileByAir(getTile(17, 10)));\n Assert.assertEquals(Direction.LEFT, nav.finder().relativeDirectionOfTileByAir(getTile(17, 11)));\n\n /*\n Tile in front, but within the turning buffer and to the left => LEFT\n */\n Assert.assertEquals(Direction.LEFT, nav.finder().relativeDirectionOfTileByAir(getTile(12, 6)));\n Assert.assertEquals(Direction.LEFT, nav.finder().relativeDirectionOfTileByAir(getTile(12, 7)));\n Assert.assertEquals(Direction.LEFT, nav.finder().relativeDirectionOfTileByAir(getTile(12, 8)));\n Assert.assertEquals(Direction.LEFT, nav.finder().relativeDirectionOfTileByAir(getTile(14, 6)));\n Assert.assertEquals(Direction.LEFT, nav.finder().relativeDirectionOfTileByAir(getTile(14, 7)));\n Assert.assertEquals(Direction.LEFT, nav.finder().relativeDirectionOfTileByAir(getTile(14, 8)));\n Assert.assertEquals(Direction.LEFT, nav.finder().relativeDirectionOfTileByAir(getTile(17, 6)));\n Assert.assertEquals(Direction.LEFT, nav.finder().relativeDirectionOfTileByAir(getTile(17, 7)));\n Assert.assertEquals(Direction.LEFT, nav.finder().relativeDirectionOfTileByAir(getTile(17, 8)));\n\n /*\n Tile is at the back, but to the left => LEFT\n */\n Assert.assertEquals(Direction.LEFT, nav.finder().relativeDirectionOfTileByAir(getTile(10, 12)));\n Assert.assertEquals(Direction.LEFT, nav.finder().relativeDirectionOfTileByAir(getTile(10, 14)));\n Assert.assertEquals(Direction.LEFT, nav.finder().relativeDirectionOfTileByAir(getTile(10, 17)));\n Assert.assertEquals(Direction.LEFT, nav.finder().relativeDirectionOfTileByAir(getTile(11, 12)));\n Assert.assertEquals(Direction.LEFT, nav.finder().relativeDirectionOfTileByAir(getTile(12, 12)));\n Assert.assertEquals(Direction.LEFT, nav.finder().relativeDirectionOfTileByAir(getTile(13, 12)));\n Assert.assertEquals(Direction.LEFT, nav.finder().relativeDirectionOfTileByAir(getTile(14, 12)));\n Assert.assertEquals(Direction.LEFT, nav.finder().relativeDirectionOfTileByAir(getTile(15, 12)));\n Assert.assertEquals(Direction.LEFT, nav.finder().relativeDirectionOfTileByAir(getTile(16, 14)));\n Assert.assertEquals(Direction.LEFT, nav.finder().relativeDirectionOfTileByAir(getTile(16, 17)));\n Assert.assertEquals(Direction.LEFT, nav.finder().relativeDirectionOfTileByAir(getTile(17, 12)));\n Assert.assertEquals(Direction.LEFT, nav.finder().relativeDirectionOfTileByAir(getTile(17, 17)));\n }",
"Directions getDirections(){\n return this.dir;\n }",
"protected final String look(int direction, boolean steps) {\r\n \t\r\n \t//pay the LOOK_ENERGY_COST\r\n \tenergy = energy - Params.LOOK_ENERGY_COST;\r\n \tint look;\r\n \t//get the x and y coordinates of the critter\r\n \tint xCoord = this.x_coord;\r\n \tint yCoord = this.y_coord;\r\n \t\r\n \tif(steps == true)\r\n \t\tlook = 2; //look 2 steps\r\n \telse \r\n \t\tlook = 1; //look 1 step\r\n \t\r\n \t//get the coordinate position of the location to look\r\n \tswitch(direction) {\r\n \tcase 0:\r\n \t\txCoord += look; //straight right \r\n \t\tbreak;\r\n \t\t\r\n \tcase 1:\r\n \t\txCoord += look; //diagonally up and to the right\r\n \t\tyCoord -= look;\r\n \t\tbreak;\r\n \t\t\r\n \tcase 2:\r\n \t\tyCoord -= look; //straight up\r\n \t\tbreak;\r\n \t\t\r\n \tcase 3: \r\n \t\txCoord -= look; //diagonally up and to left\r\n \t\tyCoord -= look;\r\n \t\tbreak;\r\n \t\t\r\n \tcase 4:\r\n \t\txCoord -= look; //straight left\r\n \t\tbreak;\r\n \t\r\n \tcase 5:\r\n \t\txCoord -= look; //diagonally down and to left\r\n \t\tyCoord += look; \r\n \t\tbreak;\r\n \t\t\r\n \tcase 6:\r\n \t\tyCoord += look; //diagonally down\r\n \t\tbreak;\r\n \t\t\r\n \tcase 7:\r\n \t\txCoord += look; //diagonally down and to right\r\n \t\tyCoord += look;\r\n \t\tbreak;\r\n \t}\r\n \t\r\n \t//wrap-around world, need to correct coordinates\r\n \tif(xCoord > (Params.WORLD_WIDTH - 1))\r\n \t\txCoord %= Params.WORLD_WIDTH;\r\n \telse if(xCoord < 0)\r\n \t\txCoord += Params.WORLD_WIDTH;\r\n \tif(yCoord > (Params.WORLD_HEIGHT - 1))\r\n \t\tyCoord %= Params.WORLD_HEIGHT;\r\n \telse if(yCoord < 0)\r\n \t\tyCoord += Params.WORLD_HEIGHT;\r\n \r\n \t//Iterate through population hashMap\r\n \tIterator<String> positionIter = population.keySet().iterator();\r\n \t//Iterate through all of the position keys\r\n \twhile(positionIter.hasNext()) {\r\n \t\t//get the position key\r\n \t\tString position = positionIter.next();\r\n \t\t//get the critter list in that position\r\n \t\tArrayList<Critter> critterList = population.get(position);\r\n \t\t//iterate through the critters \r\n \t\tListIterator<Critter> currCritter = critterList.listIterator();\r\n \t\twhile(currCritter.hasNext()) {\r\n \t\t\t//get a critter\r\n \t\t\tCritter c = currCritter.next();\r\n \t\t\t//check whether each critter is in the position\r\n \t\t\tif(c.x_coord == xCoord && c.y_coord == yCoord) {\r\n \t\t\t\tif(c.getEnergy() >= 0) {\r\n \t\t\t\t\treturn c.toString();\r\n \t\t\t\t}\r\n \t\t\t}\r\n \t\t}\r\n \t}\r\n \t\r\n \t//return null if the position is unoccupied\r\n \treturn null;\r\n }",
"public int getWallDirection(int d, int s) {\n\t\t// d = player direction\n\t\t// s = screen gfx position\n\n\t\t//I should be able to use the below in an array to work out all directions\n\t\t//current plus direction = wall face i.e.\n\t\t//If a wall is currently North which is a 0 + player direction. Say Player is facing East = 1\n\t\t// 0 + 1 = 1 (North Wall becomes East)\n\t\tint[] Wall = new int [32];\n\t\tWall[0] = 0;\n\t\tWall[1] = 1;\n\t\tWall[2] = 2;\n\t\tWall[3] = 3;\n\t\tWall[4] = 2;\n\t\tWall[5] = 1;\n\t\tWall[6] = 2;\n\t\tWall[7] = 3;\n\t\tWall[8] = 2;\n\t\tWall[9] = 2;\n\t\tWall[10] = 1;\n\t\tWall[11] = 2;\n\t\tWall[12] = 3;\n\t\tWall[13] = 2;\n\t\tWall[14] = 2;\n\t\tWall[15] = 1;\n\t\tWall[16] = 2;\n\t\tWall[17] = 3;\n\t\tWall[18] = 2;\n\t\tWall[19] = 1;\n\t\tWall[20] = 2;\n\t\tWall[21] = 1;\n\t\tWall[22] = 3;\n\t\tWall[23] = 2;\n\t\tWall[24] = 3;\n\t\tWall[25] = 2;\n\t\tWall[26] = 1;\n\t\tWall[27] = 3;\n\t\tWall[28] = 2;\n\t\tWall[29] = 3; //2\n\t\tWall[30] = 0; //3\n\t\tWall[31] = 1; //0\n\n\t\tWall[s] = Wall[s] + d;\n\n\t\tif (Wall[s] > 3) {\n\t\t\tWall[s] = (Wall[s] - 3) -1;\n\t\t}\n\n\n\t\treturn Wall[s];\n\n\n\t}",
"public int getDirection();",
"public static RoadSegment getRoadSegment(String freeway, String direction, String onOffKey)\n\t{\n\t\tif(direction.equalsIgnoreCase(\"north\"))\n\t\t{\n\t\t\tif(freeway.equalsIgnoreCase(\"101\"))\n\t\t\t{\n\t\t\t\tint i = -1;\n\t\t\t\tdo\n\t\t\t\t{\n\t\t\t\t\ti += 1;\n\t\t\t\t} while(!(N101.getRoadSegAt(i).getKey()).equalsIgnoreCase(onOffKey));\n\t\t\t\t\n\t\t\t\treturn N101.getRoadSegAt(i);\n\t\t\t\t\n\t\t\t}\n\t\t\telse //if(freeway.equalsIgnoreCase(\"405\"))\n\t\t\t{\n\t\t\t\tint i = -1;\n\t\t\t\tdo\n\t\t\t\t{\n\t\t\t\t\ti += 1;\n\t\t\t\t} while(!(N405.getRoadSegAt(i).getKey()).equalsIgnoreCase(onOffKey));\n\t\t\t\t\n\t\t\t\treturn N405.getRoadSegAt(i);\n\t\t\t}\n\t\t}\n\t\telse if(direction.equalsIgnoreCase(\"south\"))\n\t\t{\n\t\t\tif(freeway.equalsIgnoreCase(\"101\"))\n\t\t\t{\n\t\t\t\tint i = -1;\n\t\t\t\tdo\n\t\t\t\t{\n\t\t\t\t\ti += 1;\n\t\t\t\t} while(!(S101.getRoadSegAt(i).getKey()).equalsIgnoreCase(onOffKey));\n\t\t\t\t\n\t\t\t\treturn S101.getRoadSegAt(i);\n\t\t\t\t\n\t\t\t}\n\t\t\telse //if(freeway.equalsIgnoreCase(\"405\"))\n\t\t\t{\n\t\t\t\tint i = -1;\n\t\t\t\tdo\n\t\t\t\t{\n\t\t\t\t\ti += 1;\n\t\t\t\t} while(!(S405.getRoadSegAt(i).getKey()).equalsIgnoreCase(onOffKey));\n\t\t\t\t\n\t\t\t\treturn S405.getRoadSegAt(i);\n\t\t\t}\n\t\t}\n\t\telse if(direction.equalsIgnoreCase(\"east\"))\n\t\t{\n\t\t\tif(freeway.equalsIgnoreCase(\"10\"))\n\t\t\t{\n\t\t\t\tint i = -1;\n\t\t\t\tdo\n\t\t\t\t{\n\t\t\t\t\ti += 1;\n\t\t\t\t} while(!(E10.getRoadSegAt(i).getKey()).equalsIgnoreCase(onOffKey));\n\t\t\t\t\n\t\t\t\treturn E10.getRoadSegAt(i);\n\t\t\t\t\n\t\t\t}\n\t\t\telse //if(freeway.equalsIgnoreCase(\"105\"))\n\t\t\t{\n\t\t\t\tint i = -1;\n\t\t\t\tdo\n\t\t\t\t{\n\t\t\t\t\ti += 1;\n\t\t\t\t} while(!(E105.getRoadSegAt(i).getKey()).equalsIgnoreCase(onOffKey));\n\t\t\t\t\n\t\t\t\treturn E105.getRoadSegAt(i);\n\t\t\t}\n\t\t}\n\t\telse //if(direction.equalsIgnoreCase(\"west\"))\n\t\t{\n\t\t\tif(freeway.equalsIgnoreCase(\"10\"))\n\t\t\t{\n\n\t\t\t\tint i = -1;\n\t\t\t\tdo\n\t\t\t\t{\n\t\t\t\t\ti += 1;\n\t\t\t\t} while(!(W10.getRoadSegAt(i).getKey()).equalsIgnoreCase(onOffKey));\n\t\t\t\t\n\t\t\t\treturn W10.getRoadSegAt(i);\n\t\t\t\t\n\t\t\t}\n\t\t\telse //if(freeway.equalsIgnoreCase(\"105\"))\n\t\t\t{\n\n\t\t\t\tint i = -1;\n\t\t\t\tdo\n\t\t\t\t{\n\t\t\t\t\ti += 1;\n\t\t\t\t} while(!(W105.getRoadSegAt(i).getKey()).equalsIgnoreCase(onOffKey));\n\t\t\t\t\n\t\t\t\treturn W105.getRoadSegAt(i);\n\t\t\t}\n\n\t\t}\n\t\n\t}",
"public static Direction shouldBackOff () {\n RobotInfo[] nearby = rc.senseNearbyRobots();\n boolean nearbyEc = false;\n for (RobotInfo ri: nearby) {\n if (ri.team != mTeam && ri.type == RobotType.ENLIGHTENMENT_CENTER) {\n nearbyEc = true;\n break;\n }\n }\n if (!nearbyEc) {\n return null;\n }\n MapLocation sum = rc.getLocation(), curr = sum;\n for (RobotInfo ri: nearby) {\n if (ri.type == RobotType.POLITICIAN && ri.getConviction() > rc.getConviction()) {\n sum = sum.translate(ri.getLocation().x - curr.x, ri.getLocation().y - curr.y);\n }\n }\n if (sum.equals(curr)) {\n return null;\n }\n return sum.directionTo(curr);\n }",
"private void drive(int e) {\r\n if (endx[e] + 120 >= width - radius[e] && directionend[e] == 0) {\r\n endx[e] += 20;\r\n endy[e] -= 20;\r\n directionend[e]++;\r\n radius[e] -= 60;\r\n directionchanged[e] = true;\r\n } else if (endy[e] + 120 >= height - radius[e] && directionend[e] == 1) {\r\n\r\n endx[e] += 20;\r\n endy[e] += 20;\r\n directionend[e]++;\r\n radius[e] -= 60;\r\n directionchanged[e] = true;\r\n } else if (endx[e] - 120 <= radius[e] && directionend[e] == 2) {\r\n endx[e] -= 20;\r\n endy[e] += 20;\r\n radius[e] -= 60;\r\n directionend[e]++;\r\n directionchanged[e] = true;\r\n } else if (endy[e] - 80 <= radius[e] && directionend[e] == 3) {\r\n endx[e] -= 20;\r\n endy[e] -= 20;\r\n radius[e] -= 60;\r\n directionend[e] = 0;\r\n directionchanged[e] = true;\r\n } else {\r\n directionchanged[e] = false;\r\n }\r\n }",
"public Way getWay(String key) {\n\treturn ways.get(key);\n }",
"public synchronized int setDestinationFloor(){\n\t\tint randomFloor = random.nextInt((10-1)+1)+0;\n\t\twhile(this.arrivalFloor == randomFloor){\n\t\t\trandomFloor = random.nextInt((10-1)+1)+0;\n\t\t}\n\t\t\n\t\treturn randomFloor; \n\t}",
"public Direction getMostValuableDirection(Location location) {\r\n\t\tint northSum = 0, southSum = 0, westSum = 0, eastSum = 0;\r\n\t\t// the neighbors are saved in an array and we know the order for each\r\n\t\t// neighbor\r\n\t\tArrayList<Location> neighbors = location.getNeighbors(location, map, 1);\r\n\t\t// so we know the north neighbors are on the 0, 1, 2 positions\r\n\t\tif(neighbors.get(0).getSite().owner != myID) {\r\n\t\t\tnorthSum += neighbors.get(0).getSite().strength;\r\n\t\t}\r\n\t\tif(neighbors.get(1).getSite().owner != myID) {\r\n\t\t\tnorthSum += neighbors.get(1).getSite().strength;\r\n\t\t}\r\n\t\tif(neighbors.get(2).getSite().owner != myID) {\r\n\t\t\tnorthSum += neighbors.get(2).getSite().strength;\r\n\t\t}\r\n\r\n\t\t// the east neighbors are on the 3, 4, 5 positions\r\n\t\tif(neighbors.get(3).getSite().owner != myID) {\r\n\t\t\teastSum += neighbors.get(3).getSite().strength;\r\n\t\t}\r\n\t\tif(neighbors.get(4).getSite().owner != myID) {\r\n\t\t\teastSum += neighbors.get(4).getSite().strength;\r\n\t\t}\r\n\t\tif(neighbors.get(5).getSite().owner != myID) {\r\n\t\t\teastSum += neighbors.get(5).getSite().strength;\r\n\t\t}\r\n\r\n\t\t// the south neighbors are on the 6, 7, 8 positions\r\n\t\tif(neighbors.get(6).getSite().owner != myID) {\r\n\t\t\tsouthSum += neighbors.get(6).getSite().strength;\r\n\t\t}\r\n\t\tif(neighbors.get(7).getSite().owner != myID) {\r\n\t\t\tsouthSum += neighbors.get(7).getSite().strength;\r\n\t\t}\r\n\t\tif(neighbors.get(8).getSite().owner != myID) {\r\n\t\t\tsouthSum += neighbors.get(8).getSite().strength;\r\n\t\t}\r\n\r\n\t\t// the west neighbors are on the 9, 10, 11 positions\r\n\t\tif(neighbors.get(9).getSite().owner != myID) {\r\n\t\t\twestSum += neighbors.get(9).getSite().strength;\r\n\t\t}\r\n\t\tif(neighbors.get(10).getSite().owner != myID) {\r\n\t\t\twestSum += neighbors.get(10).getSite().strength;\r\n\t\t}\r\n\t\tif(neighbors.get(11).getSite().owner != myID) {\r\n\t\t\twestSum += neighbors.get(11).getSite().strength;\r\n\t\t}\r\n\t\t// get maximum sum\r\n\t\tfloat max = Math.max(Math.max(northSum, southSum), Math.max(eastSum, westSum));\r\n\t\t// return the best direction\r\n\t\tif (max == northSum)\r\n\t\t\treturn Direction.NORTH;\r\n\t\telse if (max == southSum)\r\n\t\t\treturn Direction.SOUTH;\r\n\t\telse if (max == eastSum)\r\n\t\t\treturn Direction.EAST;\r\n\t\telse\r\n\t\t\treturn Direction.WEST;\r\n\t}",
"public Direction getJoinDirection() {\n return (carrier.isInEurope() || plan.cwait == plan.twait) ? null\n : carrier.getGame().getMap().getDirection(plan.twait.getTile(),\n plan.cwait.getTile());\n }",
"public void move() {\n\n if (_currentFloor == Floor.FIRST) {\n _directionOfTravel = DirectionOfTravel.UP;\n }\n if (_currentFloor == Floor.SEVENTH) {\n _directionOfTravel = DirectionOfTravel.DOWN;\n }\n\n\n if (_directionOfTravel == DirectionOfTravel.UP) {\n _currentFloor = _currentFloor.nextFloorUp();\n } else if (_directionOfTravel == DirectionOfTravel.DOWN) {\n _currentFloor = _currentFloor.nextFloorDown();\n }\n\n if(_currentFloor.hasDestinationRequests()){\n stop();\n } \n\n }",
"public boolean isWalk() {\n return journeyLegType().equals(ItineraryLegType.WALK);\n }",
"public double getDirectionMove();",
"public void directionRestriction(){\n \t\n }",
"private AntDirection getAntDirection(int directionVal) {\r\n\t\tAntDirection direction = AntDirection.EAST;\r\n\t\tswitch (directionVal) {\r\n\t\t\tcase 0: direction = AntDirection.EAST; \r\n\t\t\tbreak;\r\n\t\t\tcase 1: direction = AntDirection.SOUTH_EAST;\r\n\t\t\tbreak;\r\n\t\t\tcase 2: direction = AntDirection.SOUTH_WEST; \r\n\t\t\tbreak;\r\n\t\t\tcase 3: direction = AntDirection.WEST;\r\n\t\t\tbreak;\r\n\t\t\tcase 4: direction = AntDirection.NORTH_WEST; \r\n\t\t\tbreak;\r\n\t\t\tcase 5: direction = AntDirection.NORTH_EAST;\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\treturn direction;\r\n\t}",
"int gas_station() {\n int sol = 0; // numar minim de opriri\n int fuel = m; // fuel este cantitatea curenta de combustibil din rezervor (a.k.a cat a ramas)\n\n for (int i = 1; i <= n; ++i) {\n fuel -= (dist[i] - dist[i - 1]); // ma deplasez de la locatia anterioara la cea curenta\n // intotdeauna cand ajung intr-o benzinarie ma asigur am suficient\n // combustibil sa ajung la urmatoarea - initial pot sa ajung de la A la dist[1]\n\n // daca nu am ajuns in ultima benziarie\n // verifica daca trebuie sa reincarc (rezervor gol sau cantitate insuficienta pentru a ajunge la benzinaria urmatoare)\n if (i < n && (fuel == 0 || dist[i+1] - dist[i] > fuel)) {\n ++sol;\n fuel = m;\n }\n }\n\n return sol;\n }",
"private void drunkenWalk(int x, int y) {\n\t\tRoom r = rooms[y][x];\n\t\tr.visited = true;\n\t\tUtil.shuffleArray(r.doors);\n\t\tfor(int i = 0; i < r.doors.length; i++) {\n\t\t\tDoor d = r.doors[i];\n\t\t\tboolean outOfBounds = false;\n\t\t\tRoom neighbor;\n\t\t\tDirection oppositeDir;\n\t\t\tint neighborX = x;\n\t\t\tint neighborY = y;\n\t\t\tswitch(d.dir) {\n\t\t\tcase LEFT:\n\t\t\t\toppositeDir = Direction.RIGHT;\n\t\t\t\tneighborX--;\n\t\t\t\tif (neighborX < 0) {\n\t\t\t\t\toutOfBounds = true;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase RIGHT:\n\t\t\t\toppositeDir = Direction.LEFT;\n\t\t\t\tneighborX++;\n\t\t\t\tif (neighborX >= cols) {\n\t\t\t\t\toutOfBounds = true;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase UP:\n\t\t\t\toppositeDir = Direction.DOWN;\n\t\t\t\tneighborY--;\n\t\t\t\tif (neighborY < 0) {\n\t\t\t\t\toutOfBounds = true;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase DOWN:\n\t\t\t\toppositeDir = Direction.UP;\n\t\t\t\tneighborY++;\n\t\t\t\tif (neighborY >= rows) {\n\t\t\t\t\toutOfBounds = true;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\toppositeDir = Direction.UP;\n\t\t\t\toutOfBounds = true;\n\t\t\t\tbreak;\n\t\t\t\n\t\t\t}\n\t\t\t\n\n\t\t\t\n\t\t\tif (outOfBounds) {\n\t\t\t\td.isWall = true;\n\t\t\t} else {\n\t\t\t\tneighbor = rooms[neighborY][neighborX];\n\t\t\t\tif (!neighbor.visited) {\n\t\t\t\t\td.isWall = false;\n\t\t\t\t\tdrunkenWalk(neighborX, neighborY);\n\t\t\t\t} else {\n\t\t\t\t\td.isWall = connectionType(oppositeDir, neighbor);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t}",
"public DIRECTION getDirection(int index) {\n if (gameData.charAt(index) == 'L') {\n return DIRECTION.LEFT;\n } else if (gameData.charAt(index) == 'R') {\n return DIRECTION.RIGHT;\n } else {\n System.out.println(\"GameData.getDirection: ERROR GETTING DIRECTION!!!!\");\n }\n return null;\n }",
"private String getDirectionByYValue(int mappedY, double rawY) {\n\n if(Math.abs(mappedY) <= ABS_LIMIT_BEFORE_MOVING_ROVER) return DIRECTION_NEUTRAL;\n if(rawY > 0) return DIRECTION_CLOCKWISE;\n if(rawY < 0) return DIRECTION_COUNT_CLOCKWISE;\n\n throw new IllegalStateException(\"invalid direction, mappedY=\" + mappedY);\n }",
"public Direction getMove() {\n\n // If 'count' is >= 3, then reset 'value' for next random direction.\n if (this.count >= 3) {\n this.value = this.generator.nextInt(4); // new value\n this.count = 0; // reset count to 0\n }\n \n ++this.count; // increment count for each call\n if (this.value == 0) {\n return Direction.NORTH;\n }\n else if (this.value == 1) {\n return Direction.SOUTH;\n }\n else if (this.value == 2) {\n return Direction.WEST;\n }\n else { // if value == 3\n return Direction.EAST;\n }\n }",
"public ItineraryLegType journeyLegType() {\n if (walk != null) {\n return ItineraryLegType.WALK;\n } else {\n return ItineraryLegType.BUS;\n }\n }",
"private void setDirection() {\n directionX = corePos.getX() - projectile.getX();\n directionY = corePos.getY() - projectile.getY();\n\n double length = Math.sqrt(directionX*directionX + directionY*directionY);\n\n if (length != 0) {\n directionX = directionX/length;\n directionY = directionY/length;\n }\n }",
"private static Direction case2Dir(CasePourDijkstra c1,CasePourDijkstra c2){\n\t\tif (c1.l-c2.l==1){\n\t\t\treturn Direction.NORD;\n\t\t}\n\t\tif (c1.l-c2.l==-1){\n\t\t\treturn Direction.SUD;\n\t\t}\n\t\tif (c1.c-c2.c==1){\n\t\t\treturn Direction.OUEST;\n\t\t}\n\t\tif (c1.c-c2.c==-1){\n\t\t\treturn Direction.EST;\n\t\t}\n\t\t\n\t\treturn null;//only accessible in error case\n\n\t}",
"public float getDirection();",
"LaneController getStraightLaneController();",
"float getWindingConnectionAngle();",
"static private void npcPath() {\n\n if (Time.secondsPassed % 45 == 44) {\n Random picker = new Random();\n while (true) {\n if (josephSchnitzel.getCurrentRoom().equals(mountain)) {\n String[] newRoomString = {\"south\"};\n int index = picker.nextInt(newRoomString.length);\n Room next = josephSchnitzel.getCurrentRoom().getExit(newRoomString[index]);\n josephSchnitzel.setCurrentRoom(next);\n break;\n }\n\n if (josephSchnitzel.getCurrentRoom().equals(beach)) {\n String[] newRoomString = {\"north\"};\n int indexOfNewRoomString = picker.nextInt(newRoomString.length);\n Room nextRoom = josephSchnitzel.getCurrentRoom().getExit(newRoomString[indexOfNewRoomString]);\n josephSchnitzel.setCurrentRoom(nextRoom);\n break;\n }\n\n if (josephSchnitzel.getCurrentRoom().equals(jungle)) {\n String[] newRoomString = {\"north\", \"south\"};\n int indexOfNewRoomString = picker.nextInt(newRoomString.length);\n Room nextRoom = josephSchnitzel.getCurrentRoom().getExit(newRoomString[indexOfNewRoomString]);\n josephSchnitzel.setCurrentRoom(nextRoom);\n break;\n }\n }\n }\n }",
"public static String findDirection(XYLocation initial, XYLocation goingTo) {\n\t\tfloat goingToX = goingTo.getX();\n\t\tfloat goingToY = goingTo.getY();\n\t\tfloat initialX = initial.getX();\n\t\tfloat inititalY = initial.getY();\n\t\tfloat theta = (float) Math.atan2(goingToY - inititalY, goingToX - initialX);\n\t\t\n\t\tif (Math.abs(theta) <= oneEighthPI && Math.abs(theta) >= negOneEighthPI) {\n\t\t\t\treturn \"East\";\n\t\t\t} else if (theta > oneEighthPI && theta < threeEighthsPI) {\n\t\t\t\treturn \"SouthEast\";\n\t\t\t} else if (theta > negThreeEighthsPI && theta < negOneEighthPI) {\n\t\t\t\treturn \"NorthEast\";\n\t\t\t} else if (theta > threeEighthsPI && theta < fiveEighthsPI) {\n\t\t\t\treturn \"South\";\n\t\t\t} else if (theta > negFiveEighthsPI && theta < negThreeEighthsPI){\n\t\t\t\treturn \"North\";\n\t\t\t} else if (theta > fiveEighthsPI && theta < sevenEighthsPI) {\n\t\t\t\treturn \"SouthWest\";\n\t\t\t} else if (theta > negSevenEighthsPI && theta < negFiveEighthsPI) {\n\t\t\t\treturn \"NorthWest\";\n\t\t\t} else {\n\t\t\t\treturn \"West\";\n\t\t\t}\n\t}",
"public static String stringFromDirection(int dir) {\n return dir == 0 ? \"NORTH\" : dir == 1 ? \"EAST\" : dir == 2 ? \"SOUTH\" : dir == 3 ? \"WEST\" : \"NONSENSE\";\n }",
"org.landxml.schema.landXML11.RoadwayDocument.Roadway getRoadway();",
"public int solutionDirection() {\n if (bcLocation == BCLocation.DOWNSTREAM)\n return -1;\n else\n return 1;\n }",
"protected final void walk(int direction) {\n\t\tint temp_x = x_coord;\n\t\tint temp_y = y_coord;\n\t//Update location\t\n\t\tif (!hasMoved) {\n\t\t\ttemp_x += x_directions[direction];\n\t\t\ttemp_x += Params.world_width;\n\t\t\ttemp_x %= Params.world_width;\n\t\t\ttemp_y += y_directions[direction];\n\t\t\ttemp_y += Params.world_height;\n\t\t\ttemp_y %= Params.world_height;\n\t\t}\t\n\t//Specific to walking during fight\n\t\tif (fightMode) {\n\t\t\tboolean critterInLocation = false;\n\t\t\tfor (Critter c: population) {\n\t\t\t\tif ((c.x_coord == temp_x) && (c.y_coord == temp_y)) {\n\t\t\t\t\tcritterInLocation = true;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (!critterInLocation) {\n\t\t\t\tx_coord = temp_x;\n\t\t\t\ty_coord = temp_y;\n\t\t\t}\n\t\t}\n\t\telse {\t\t\t\t\t//Specific to walking in time step\n\t\t\tx_coord = temp_x;\n\t\t\ty_coord = temp_y;\n\t\t}\n\t//Update energy\n\t\tenergy -= Params.walk_energy_cost;\n\t//Update hasMoved\n\t\thasMoved = true;\n\t}",
"public static Direction selectDirection() {\n return Direction.values()[randomDirection()];\n }",
"public static void main(String[] args) {\n Tron.init();\n\n //We'll want to keep track of the turn number to make debugging easier.\n int turnNumber = 0;\n\n // Execute loop forever (or until game ends)\n while (true) {\n //Update turn number:\n turnNumber++;\n\n /* Get an integer map of the field. Each int\n * can either be Tron.Tile.EMPTY, Tron.Tile.ME,\n * Tron.Tile.OPPONENT, Tron.Tile.TAKEN_BY_ME,\n * Tron.Tile.TAKEN_BY_OPPONENT, or Tron.Tile.WALL */\n ArrayList<ArrayList<Tron.Tile>> mList = Tron.getMap();\n int[][] m = new int[mList.size()][mList.get(0).size()];\n for (int i = 0; i < mList.size(); i++) {\n for (int j = 0; j < mList.get(i).size(); j++) {\n m[i][j] = mList.get(i).get(j).ordinal();\n }\n }\n\n //Let's figure out where we are:\n int myLocX = 0, myLocY = 0;\n for(int y = 0; y < 16; y++) {\n for(int x = 0; x < 16; x++) {\n //I want to note that this is a little bit of a disgusting way of doing this comparison, and that you should change it later, but Java makes this uglier than C++\n if(Tron.Tile.values()[m[y][x]] == Tron.Tile.ME) {\n myLocX = x;\n myLocY = y;\n }\n }\n }\n\n //Let's find out which directions are safe to go in:\n boolean [] safe = emptyAdjacentSquares(m, myLocX, myLocY);\n\n //Let's look at the counts of empty squares around the possible squares to go to:\n int [] dirEmptyCount = new int[4];\n for(int a = 0; a < 4; a++) {\n if(safe[a]) {\n //Get the location we would be in if we went in a certain direction (specified by a).\n int[] possibleSquare = getLocation(myLocX, myLocY, a);\n //Make sure that square exists:\n if(possibleSquare[0] != -1 && possibleSquare[1] != -1) {\n //Find the squares around that square:\n boolean [] around = emptyAdjacentSquares(m, possibleSquare[0], possibleSquare[1]);\n //Count the number of empty squares around that square and set it in our array:\n dirEmptyCount[a] = 0;\n for(int b = 0; b < 4; b++) if(around[b]) dirEmptyCount[a]++;\n }\n }\n else dirEmptyCount[a] = 5; //Irrelevant, but we must ensure it's as large as possible because we don't want to go there.\n }\n\n //Log some basic information.\n Tron.log(\"-----------------------------------------------------\\nDebug for turn #\" + turnNumber + \":\\n\");\n for(int a = 0; a < 4; a++) Tron.log(\"Direction \" + stringFromDirection(a) + \" is \" + (safe[a] ? \"safe.\\n\" : \"not safe.\\n\"));\n\n /* Send your move. This can be Tron.Direction.NORTH,\n * Tron.Direction.SOUTH, Tron.Direction.EAST, or\n * Tron.Direction.WEST. */\n int minVal = 1000, minValLoc = 0;\n for(int a = 0; a < 4; a++) {\n if(dirEmptyCount[a] < minVal) {\n minVal = dirEmptyCount[a];\n minValLoc = a;\n }\n }\n Tron.sendMove(Tron.Direction.values()[minValLoc]);\n }\n }",
"public static void localize() {\n //To do\n boolean noiseMargin = false;\n\n // initialization, turn away from the walls if needed\n waltz();\n turnAwayFromWall();\n\n // after resetting theta, start rotating again\n waltz(360, true);\n //populate inital window array\n for (int i = 0; i < window.length; i++) {\n window[i] = readUsDistance();\n }\n // now we expect leftwall detection followed by backwall detection\n while (true) {\n // move window by one step (one new sample)\n moveWindow();\n // approaching left wall\n if (a0 == -1d && !noiseMargin && prevDist > d + y && dist <= d + y) {\n // entering left wall noise margin\n noiseMargin = true;\n a0 = odometer.getXyt()[2];\n System.out.println(\"located a0: \" + a0);\n } else if (a1 == -1d && a0 != -1d && noiseMargin && prevDist > d - y && dist <= d - y) {\n // leaving left wall noise Margin\n a1 = odometer.getXyt()[2];\n noiseMargin = false;\n alpha = (a0 + a1) / 2d;\n System.out.println(\"located a1 and calculated alpha: \" + a1);\n } else if (b0 == -1d && a1 != -1d && !noiseMargin && prevDist < d - y && dist >= d - y) {\n // entering back wall noise margin\n noiseMargin = true;\n b0 = odometer.getXyt()[2];\n System.out.println(\"located b0: \" + b0);\n } else if (b1 == -1d && b0 != -1d && noiseMargin && prevDist < d + y && dist >= d + y) {\n //leaving back wall noise margin\n b1 = odometer.getXyt()[2];\n noiseMargin = false;\n beta = (b0 + b1) / 2d;\n System.out.println(\"located b1 and calculated beta: \" + b1);\n break;\n }\n sleepFor(TIMEOUT_PERIOD);\n }\n\n leftMotor.stop();\n rightMotor.stop();\n // robot should now facing beta\n\n System.out.println(\"correcting...\");\n // calculate offset and rotate to the offset angle\n if (alpha < beta) {\n waltz(45d - (alpha - beta) / 2d, false);\n } else {\n waltz(225d - (alpha - beta) / 2d, false);\n }\n \n // calibrate odometer\n odometer.setXyt(0.3048, 0.3048, 0);\n }",
"private void travelTo(Location destination) \n\t{\n\t\tSystem.out.println(destination.name());\n\t\tif (destination == Location.Home) {\n\t\t\t\n\t\t\tif (role == Role.Attacker) {\n\t\t\t\t\n\t\t\t\tswitch(startingCorner) { \n\t\t\t\t\t/*case 1: travelTo(Location.X4); travelTo(Location.AttackBase); break;\n\t\t\t\t\tcase 2: travelTo(Location.X3); travelTo(Location.AttackBase); break;\n\t\t\t\t\tcase 3: case 4: travelTo(Location.AttackBase);*/\n\t\t\t\tcase 1: travelTo(Location.AttackBase); break;\n\t\t\t\tcase 2: travelTo(Location.AttackBase); break;\n\t\t\t\tcase 3: //travelTo(Location.X2);\n\t\t\t\t\t\ttravelTo(Location.AttackBase); break;\n\t\t\t\tcase 4: //travelTo(Location.X1);\n\t\t\t\t\t\ttravelTo(Location.AttackBase); break;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t} else if (role == Role.Defender) {\n\t\t\t\t\n\t\t\t\tswitch(startingCorner) {\n\t\t\t\t\tcase 1: //travelTo(Location.X4);\n\t\t\t\t\t\t\ttravelTo(Location.DefenseBase); break;\n\t\t\t\t\tcase 2: //travelTo(Location.X3);\n\t\t\t\t\t\t\ttravelTo(Location.DefenseBase); break;\n\t\t\t\t\tcase 3: travelTo(Location.DefWay3);\n\t\t\t\t\t\t\ttravelTo(Location.DefenseBase); break;\n\t\t\t\t\tcase 4: travelTo(Location.DefWay4);\n\t\t\t\t\t\t\ttravelTo(Location.DefenseBase); break;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\t\n\t\telse if (destination == Location.BallPlatform)\n\t\t\tnavigator.travelTo(ballPlatform[0], ballPlatform[1]);\n\t\t\t\n\t\telse if (destination == Location.ShootingRegion)\n\t\t\tnavigator.travelTo(CENTER, 7 * 30.0); // we have to account for the case when there is an obstacle in the destination\n\t\t\t// also need to find a way of determining the y coordinate\n\n\t\telse if (destination == Location.AttackBase)\n\t\t\tnavigator.travelTo(ATTACK_BASE[0], ATTACK_BASE[1]); \n\t\t\n\t\telse if (destination == Location.DefenseBase)\n\t\t\tnavigator.travelTo(DEFENSE_BASE[0], DEFENSE_BASE[1]);\n\t\t\n\t\telse if (destination == Location.X1) \n\t\t\tnavigator.travelTo(X[0][0] * 30.0, X[0][1] * 30.0);\n\n\t\telse if (destination == Location.X2)\n\t\t\tnavigator.travelTo(X[1][0] * 30.0, X[1][1] * 30.0);\n\t\t\n\t\telse if (destination == Location.X3) \n\t\t\tnavigator.travelTo(X[2][0] * 30.0, X[2][1] * 30.0);\n\n\t\telse if (destination == Location.X4)\n\t\t\tnavigator.travelTo(X[3][0] * 30.0, X[3][1] * 30.0);\n\t\t\n\t\telse if (destination == Location.DefWay3)\n\t\t\tnavigator.travelTo(240, 240);\n\t\t\n\t\telse if (destination == Location.DefWay4)\n\t\t\tnavigator.travelTo(60, 240);\n\n\t\t\n\t\t// return from method only after navigation is complete\n\t\twhile (navigator.isNavigating())\n\t\t{\n\t\t\tSystem.out.println(\"destX: \" + navigator.destDistance[0] + \"destY: \" + navigator.destDistance[1]);\n\t\t\ttry {\n\t\t\t\tThread.sleep(100);\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\t\n\t}",
"private int getType(int tile, int windoftheround, int playerwind)\n\t{\n\t\t// the conditional path tells us whether this is a generic or specific type\n\t\tswitch(conditional[1]) {\n\t\t\t// generic cases\n\t\t\tcase(SIMPLE): { if(TilePattern.isSimple(tile)) return SIMPLE; break; }\n\t\t\tcase(TERMINAL): { if(TilePattern.isTerminal(tile)) return TERMINAL; break; }\n\t\t\tcase(NUMERAL): { if(TilePattern.isNumeral(tile)) return NUMERAL; break; }\n\t\t\tcase(WIND): { if(TilePattern.isWind(tile)) return WIND; break; }\n\t\t\tcase(ROUNDWIND): { if(tile==windoftheround) return ROUNDWIND; break; }\n\t\t\tcase(OWNWIND): { if(tile==playerwind) return OWNWIND; break; }\n\t\t\tcase(DRAGON): { if(TilePattern.isDragon(tile)) return DRAGON; break; }\n\t\t\tcase(HONOUR): { if(TilePattern.isHonour(tile)) return HONOUR; break; }\n\t\t\tcase(BONUS): { if(TilePattern.isBonus(tile)) return BONUS; break; }\n\t\t\tdefault: {\n\t\t\t\t// specific cases - flowers first\n\t\t\t\tif (TilePattern.isFlower(tile)) return FLOWER;\n\t\t\t\telse if (TilePattern.isSeason(tile)) return SEASON;\n\t\t\t\t// then honours\n\t\t\t\telse if (tile==TilePattern.EAST) return EAST;\n\t\t\t\telse if (tile==TilePattern.SOUTH) return SOUTH;\n\t\t\t\telse if (tile==TilePattern.WEST) return WEST;\n\t\t\t\telse if (tile==TilePattern.NORTH) return NORTH;\n\t\t\t\telse if (tile==TilePattern.RED) return RED;\n\t\t\t\telse if (tile==TilePattern.GREEN) return GREEN;\n\t\t\t\telse if (tile==TilePattern.WHITE) return WHITE;\n\t\t\t\t// and only then, numerals\n\t\t\t\telse if (tile<TilePattern.HONOURS && tile%TilePattern.NUMMOD == TilePattern.BAMBOO_ONE) return ONE;\n\t\t\t\telse if (tile<TilePattern.HONOURS && tile%TilePattern.NUMMOD == TilePattern.BAMBOO_TWO) return TWO;\n\t\t\t\telse if (tile<TilePattern.HONOURS && tile%TilePattern.NUMMOD == TilePattern.BAMBOO_THREE) return THREE;\n\t\t\t\telse if (tile<TilePattern.HONOURS && tile%TilePattern.NUMMOD == TilePattern.BAMBOO_FOUR) return FOUR;\n\t\t\t\telse if (tile<TilePattern.HONOURS && tile%TilePattern.NUMMOD == TilePattern.BAMBOO_FIVE) return FIVE;\n\t\t\t\telse if (tile<TilePattern.HONOURS && tile%TilePattern.NUMMOD == TilePattern.BAMBOO_SIX) return SIX;\n\t\t\t\telse if (tile<TilePattern.HONOURS && tile%TilePattern.NUMMOD == TilePattern.BAMBOO_SEVEN) return SEVEN;\n\t\t\t\telse if (tile<TilePattern.HONOURS && tile%TilePattern.NUMMOD == TilePattern.BAMBOO_EIGHT) return EIGHT;\n\t\t\t\telse if (tile<TilePattern.HONOURS && tile%TilePattern.NUMMOD == TilePattern.BAMBOO_NINE) return NINE;}}\n\n\t\t// fail\n\t\treturn -1;\n\t}",
"private void findMode(ArrayList<PlanElement> elements) {\r\n\t\tfor(PlanElement p : elements){\r\n\t\t\tif(p instanceof Leg){\r\n\t\t\t\tif(((Leg) p).getMode().equals(TransportMode.transit_walk)){\r\n\t\t\t\t\tsuper.setMode(TransportMode.transit_walk);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tsuper.setMode(((Leg) p).getMode());\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public void TakeStep2(int res) {\n\t\tif (res==1) {NextFloor(); System.out.printf(\"You%n%nTravel%n%nDown%n%n\");}\n\t\tif (res==2) {\n\t\t\tFLOOR_DIST=-1;\n\t\t\t//res 2 will povide a good training ground for the player by having an escape route, and a constant 4th option to go down a floor.\n\t\t}\n\t}",
"public boolean isDoorway(){\n\t\treturn (cellType == CellType.DOORWAY);\n\t}",
"public String getRoadType() {\n switch(orientation){\n case \"0\": return this.tileType.northernRoadType + this.tileType.easternRoadType + this.tileType.southernRoadType + this.tileType.westernRoadType;\n case \"1\": return this.tileType.westernRoadType + this.tileType.northernRoadType + this.tileType.easternRoadType + this.tileType.southernRoadType;\n case \"2\": return this.tileType.southernRoadType + this.tileType.westernRoadType + this.tileType.northernRoadType + this.tileType.easternRoadType;\n case \"3\": return this.tileType.easternRoadType + this.tileType.southernRoadType + this.tileType.westernRoadType + this.tileType.northernRoadType;\n case \"4\": return this.tileType.northernRoadType + this.tileType.westernRoadType + this.tileType.southernRoadType + this.tileType.easternRoadType;\n case \"5\": return this.tileType.easternRoadType + this.tileType.northernRoadType + this.tileType.westernRoadType + this.tileType.southernRoadType;\n case \"6\": return this.tileType.southernRoadType + this.tileType.easternRoadType + this.tileType.northernRoadType + this.tileType.westernRoadType;\n case \"7\": return this.tileType.westernRoadType + this.tileType.southernRoadType + this.tileType.easternRoadType + this.tileType.northernRoadType;\n default: return null;\n }\n }",
"public void findValidMoveDirections(){\n\t\t\n\t\tif(currentTile == 2 && (tileRotation == 0 || tileRotation == 180)){ // in vertical I configuration\n\t\t\tcanMoveNorth = true; canMoveSouth = true;\n\t\t\tcanMoveEast = false; canMoveWest = false;\n//\t\t\tSystem.out.println(\"Current Tile: \" + currentTile + \" Rotatation: \" + tileRotation +\n//\t\t\t\t\t\" N,S: T E,W: F\");\n\t\t}\n\t\telse if(currentTile == 2 && (tileRotation == 90 || tileRotation == 270)){ // in horizontal I configuration\n\t\t\tcanMoveNorth = false; canMoveSouth = false;\n\t\t\tcanMoveEast = true; canMoveWest = true;\n//\t\t\tSystem.out.println(\"Current Tile: \" + currentTile + \" Rotatation: \" + tileRotation +\n//\t\t\t\t\t\" N,S: F E,W: T\");\n\t\t}\n\t\t\n\t\t\n\t\telse if(currentTile == 3 && tileRotation == 0){ // L rotated 0 degrees\n\t\t\tcanMoveNorth = true; canMoveSouth = false;\n\t\t\tcanMoveEast = true; canMoveWest = false;\n//\t\t\tSystem.out.println(\"Current Tile: \" + currentTile + \" Rotatation: \" + tileRotation +\n//\t\t\t\t\t\" N,E: T S,W: F\");\n\t\t}\n\t\telse if(currentTile == 3 && tileRotation == 90){ // L rotated 90 degrees\n\t\t\tcanMoveNorth = true; canMoveSouth = false;\n\t\t\tcanMoveEast = false; canMoveWest = true;\n//\t\t\tSystem.out.println(\"Current Tile: \" + currentTile + \" Rotatation: \" + tileRotation +\n//\t\t\t\t\t\" N,W: T S,E: F\");\n\t\t}\n\t\telse if(currentTile == 3 && tileRotation == 180){ // L rotated 180 degrees\n\t\t\tcanMoveNorth = false; canMoveSouth = true;\n\t\t\tcanMoveEast = false; canMoveWest = true;\n//\t\t\tSystem.out.println(\"Current Tile: \" + currentTile + \" Rotatation: \" + tileRotation +\n//\t\t\t\t\t\" S,W: T N,E: F\");\n\t\t}\n\t\telse if(currentTile == 3 && tileRotation == 270){ // L rotated 270 degrees\n\t\t\tcanMoveNorth = false; canMoveSouth = true;\n\t\t\tcanMoveEast = true; canMoveWest = false;\n//\t\t\tSystem.out.println(\"Current Tile: \" + currentTile + \" Rotatation: \" + tileRotation +\n//\t\t\t\t\t\" S,E: T N,W: F\");\n\t\t}\n\t\t\n\t\t\n\t\telse if(currentTile == 4 && tileRotation == 0){ // T rotated 0 degrees\n\t\t\tcanMoveNorth = false; canMoveSouth = true;\n\t\t\tcanMoveEast = true; canMoveWest = true;\n//\t\t\tSystem.out.println(\"Current Tile: \" + currentTile + \" Rotatation: \" + tileRotation +\n//\t\t\t\t\t\" S,W,E: T N: F\");\n\t\t}\n\t\telse if(currentTile == 4 && tileRotation == 90){ // T rotated 90 degrees\n\t\t\tcanMoveNorth = true; canMoveSouth = true;\n\t\t\tcanMoveEast = true; canMoveWest = false;\n//\t\t\tSystem.out.println(\"Current Tile: \" + currentTile + \" Rotatation: \" + tileRotation +\n//\t\t\t\t\t\" N,S,E: T W: F\");\n\t\t}\n\t\telse if(currentTile == 4 && tileRotation == 180){ // T rotated 180 degrees\n\t\t\tcanMoveNorth = true; canMoveSouth = false;\n\t\t\tcanMoveEast = true; canMoveWest = true;\n//\t\t\tSystem.out.println(\"Current Tile: \" + currentTile + \" Rotatation: \" + tileRotation +\n//\t\t\t\t\t\" N,W,E: T S: F\");\n\t\t}\n\t\telse if(currentTile == 4 && tileRotation == 270){ // T rotated 270 degrees\n\t\t\tcanMoveNorth = true; canMoveSouth = true;\n\t\t\tcanMoveEast = false; canMoveWest = true;\n//\t\t\tSystem.out.println(\"Current Tile: \" + currentTile + \" Rotatation: \" + tileRotation +\n//\t\t\t\t\t\" N,S,W: T E: F\");\n\t\t}\n\t\telse if(currentTile == 5){ //in plus tile\n\t\t\tcanMoveNorth = true; canMoveSouth = true;\n\t\t\tcanMoveEast = true; canMoveWest = true;\n//\t\t\tSystem.out.println(\"Current Tile: \" + currentTile + \" Rotatation: \" + tileRotation +\n//\t\t\t\t\t\" N,S,W,E: T\");\n\t\t}\n\t\t\n\t}",
"private void generateRunways(Group root){\n //Use an array list to keep track of which runways have been generated\n ArrayList<Integer> generatedRunways = new ArrayList<>();\n for(String runwayId : controller.getRunways()){\n Integer currentRunwayBearing = controller.getBearing(runwayId);\n //If runwayId the the id of a runway that hasn't been generated then...\n if(!(generatedRunways.contains(currentRunwayBearing+180) || generatedRunways.contains(currentRunwayBearing-180))){\n\n generateRunway(root, runwayId, runwayElevation);\n genCenterline(root, runwayId, runwayElevation);\n generateRunwayStrip(root, runwayId, runwayStripElevation);\n generateClearAndGraded(root, runwayId, clearAndGradedAreaElevation);\n\n if(!controller.getRunwayObstacle(runwayId).equals(\"\")){\n genObstacle(root, runwayId, verticalOffset);\n }\n\n //Add the runway to the list of generated runways.\n generatedRunways.add(currentRunwayBearing);\n }\n }\n }",
"private void convertSetWindDir() {\n if (windDegTmp != null) {\n double windDbl = new Double(windDegTmp);\n setWindDir(headingToString(windDbl)); // convert wind degree to cardinal direction\n }\n }",
"public Direction getDirection(int x, int y)\n {\n GUIDebugger.clearDebugDraw();\n GUIDebugger.DrawObjDebug(GObj.GREEN, x, y);\n if(width == 0 || height == 0)\n {\n height = raw.height;\n width = raw.width;\n boardCells = new int[width][height];\n }\n\n bFind = false;\n idWave++;\n currIter = 0;\n endNods = new ArrayList<WaveNode>();\n firstNods = new ArrayList<WaveNode>();\n boardCells[x][y] = idWave;\n lastNods = new ArrayList<WaveNode>();\n lastNods.add(new WaveNode(x, y));\n if(raw.getCell(0,x,y) == GObj.FREE)\n {\n evaluateBlast = 0;\n }\n else\n {\n evaluateBlast = 0.01;\n }\n int i = 0;\n while (lastNods.size() > 0 && i < Forecast.FORECAST_ITER - 5 && !bFind)\n {\n nextStep();\n i++;\n }\n if(firstNods.size()>0)\n {\n WaveNode max = firstNods.get(0);\n for(WaveNode node:firstNods)\n {\n if(node.totalScore > max.totalScore)\n {\n max = node;\n }\n }\n score = max.totalScore;\n switch (max.direction)\n {\n case 0:\n return Direction.RIGHT;\n case 1:\n return Direction.DOWN;\n case 2:\n return Direction.LEFT;\n case 3:\n return Direction.UP;\n }\n }\n return Direction.ACT;\n }",
"public int compare2(Way in) {\n if (in.isEnterd() && isEnterd() && in.distance > distance) {\n return -1;\n } else if (in.isEnterd() && isEnterd() && in.distance < distance) {\n return 1;\n }\n return 0;\n }",
"void changeDirection();",
"int getWayLength();"
] |
[
"0.62478566",
"0.6235476",
"0.61531407",
"0.6059963",
"0.60450804",
"0.59114236",
"0.5881909",
"0.58556443",
"0.58459884",
"0.5777113",
"0.5716171",
"0.5698487",
"0.5693425",
"0.56732494",
"0.5662952",
"0.5661156",
"0.5647018",
"0.5634294",
"0.5618417",
"0.55890167",
"0.55731046",
"0.5542721",
"0.55410826",
"0.5534591",
"0.55330086",
"0.55177176",
"0.5515365",
"0.55135566",
"0.5497634",
"0.54896796",
"0.54880434",
"0.5459097",
"0.54585046",
"0.54585046",
"0.5429851",
"0.54214627",
"0.5414223",
"0.54109186",
"0.5406529",
"0.54054713",
"0.5386967",
"0.5368184",
"0.53634983",
"0.5362348",
"0.5355223",
"0.5347449",
"0.53377557",
"0.5319084",
"0.53167504",
"0.5315338",
"0.53101265",
"0.5308588",
"0.53038865",
"0.53029966",
"0.53019315",
"0.530128",
"0.5300684",
"0.52991146",
"0.5293725",
"0.5287937",
"0.5274941",
"0.52747273",
"0.5271701",
"0.52705586",
"0.52655435",
"0.52475184",
"0.52411443",
"0.52310884",
"0.5220406",
"0.5215644",
"0.5209498",
"0.52094364",
"0.5206397",
"0.5202366",
"0.52013016",
"0.5201034",
"0.5192678",
"0.5187265",
"0.5182597",
"0.51822835",
"0.5180159",
"0.5178028",
"0.5172401",
"0.51654327",
"0.51603717",
"0.51583076",
"0.5156586",
"0.5156101",
"0.5155318",
"0.5154308",
"0.51514316",
"0.51342964",
"0.5129951",
"0.51257336",
"0.51112574",
"0.51065654",
"0.51034486",
"0.50963736",
"0.5095631",
"0.50921804"
] |
0.76116157
|
0
|
TODO switch to commons multipart
|
@Bean
public StandardServletMultipartResolver multipartResolver() {
return new StandardServletMultipartResolver();
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public MultiPart(){}",
"boolean isMultiPart();",
"private File processMultipartForm() {\n\n File storeDirectory = Configuration\n .getParameterValueAsFile(PENDING_DIR);\n\n int fileSizeLimit = Configuration\n .getParameterValueAsInt(METADATA_MAX_BYTES);\n\n DiskFileItemFactory factory = new DiskFileItemFactory();\n factory.setSizeThreshold(fileSizeLimit);\n\n RestletFileUpload upload = new RestletFileUpload(factory);\n\n List<FileItem> items;\n\n try {\n Request request = getRequest();\n items = upload.parseRequest(request);\n } catch (FileUploadException e) {\n throw new ResourceException(Status.CLIENT_ERROR_BAD_REQUEST, e\n .getMessage(), e);\n }\n\n for (FileItem fi : items) {\n if (fi.getName() != null) {\n String uuid = UUID.randomUUID().toString();\n File file = new File(storeDirectory, uuid);\n try {\n fi.write(file);\n return file;\n } catch (Exception consumed) {\n }\n }\n }\n\n throw new ResourceException(Status.CLIENT_ERROR_BAD_REQUEST,\n \"no valid file uploaded\");\n }",
"public MimeMultipart(String subtype) {\n/* 179 */ String boundary = UniqueValue.getUniqueBoundaryValue();\n/* 180 */ ContentType cType = new ContentType(\"multipart\", subtype, null);\n/* 181 */ cType.setParameter(\"boundary\", boundary);\n/* 182 */ this.contentType = cType.toString();\n/* */ }",
"public MimeMultipart() {\n/* 163 */ this(\"mixed\");\n/* */ }",
"private void decodeMultipartFormData(String boundary, String encoding, ByteBuffer fbuf,\n\t\t\t\tMap<String, String> parms, Map<String, String> files) throws ResponseException {\n\t\t\ttry {\n\t\t\t\tint[] boundary_idxs = getBoundaryPositions(fbuf, boundary.getBytes());\n\t\t\t\tif (boundary_idxs.length < 2) {\n\t\t\t\t\tthrow new ResponseException(Response.Status.BAD_REQUEST,\n\t\t\t\t\t\t\t\"BAD REQUEST: Content type is multipart/form-data but contains less than two boundary strings.\");\n\t\t\t\t}\n\n\t\t\t\tbyte[] part_header_buff = new byte[MAX_HEADER_SIZE];\n\t\t\t\tfor (int bi = 0; bi < boundary_idxs.length - 1; bi++) {\n\t\t\t\t\tfbuf.position(boundary_idxs[bi]);\n\t\t\t\t\tint len = (fbuf.remaining() < MAX_HEADER_SIZE) ? fbuf.remaining()\n\t\t\t\t\t\t\t: MAX_HEADER_SIZE;\n\t\t\t\t\tfbuf.get(part_header_buff, 0, len);\n\t\t\t\t\tBufferedReader in = new BufferedReader(new InputStreamReader(\n\t\t\t\t\t\t\tnew ByteArrayInputStream(part_header_buff, 0, len),\n\t\t\t\t\t\t\tCharset.forName(encoding)), len);\n\n\t\t\t\t\tint headerLines = 0;\n\t\t\t\t\t// First line is boundary string\n\t\t\t\t\tString mpline = in.readLine();\n\t\t\t\t\theaderLines++;\n\t\t\t\t\tif (mpline == null || !mpline.contains(boundary)) {\n\t\t\t\t\t\tthrow new ResponseException(Response.Status.BAD_REQUEST,\n\t\t\t\t\t\t\t\t\"BAD REQUEST: Content type is multipart/form-data but chunk does not start with boundary.\");\n\t\t\t\t\t}\n\n\t\t\t\t\tString part_name = null, file_name = null, content_type = null;\n\t\t\t\t\t// Parse the reset of the header lines\n\t\t\t\t\tmpline = in.readLine();\n\t\t\t\t\theaderLines++;\n\t\t\t\t\twhile (mpline != null && mpline.trim().length() > 0) {\n\t\t\t\t\t\tMatcher matcher = CONTENT_DISPOSITION_PATTERN.matcher(mpline);\n\t\t\t\t\t\tif (matcher.matches()) {\n\t\t\t\t\t\t\tString attributeString = matcher.group(2);\n\t\t\t\t\t\t\tmatcher = CONTENT_DISPOSITION_ATTRIBUTE_PATTERN\n\t\t\t\t\t\t\t\t\t.matcher(attributeString);\n\t\t\t\t\t\t\twhile (matcher.find()) {\n\t\t\t\t\t\t\t\tString key = matcher.group(1);\n\t\t\t\t\t\t\t\tif (\"name\".equalsIgnoreCase(key)) {\n\t\t\t\t\t\t\t\t\tpart_name = matcher.group(2);\n\t\t\t\t\t\t\t\t} else if (\"filename\".equalsIgnoreCase(key)) {\n\t\t\t\t\t\t\t\t\tfile_name = matcher.group(2);\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\tmatcher = CONTENT_TYPE_PATTERN.matcher(mpline);\n\t\t\t\t\t\tif (matcher.matches()) {\n\t\t\t\t\t\t\tcontent_type = matcher.group(2).trim();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tmpline = in.readLine();\n\t\t\t\t\t\theaderLines++;\n\t\t\t\t\t}\n\t\t\t\t\tint part_header_len = 0;\n\t\t\t\t\twhile (headerLines-- > 0) {\n\t\t\t\t\t\tpart_header_len = scipOverNewLine(part_header_buff, part_header_len);\n\t\t\t\t\t}\n\t\t\t\t\t// Read the part data\n\t\t\t\t\tif (part_header_len >= len - 4) {\n\t\t\t\t\t\tthrow new ResponseException(Response.Status.INTERNAL_ERROR,\n\t\t\t\t\t\t\t\t\"Multipart header size exceeds MAX_HEADER_SIZE.\");\n\t\t\t\t\t}\n\t\t\t\t\tint part_data_start = boundary_idxs[bi] + part_header_len;\n\t\t\t\t\tint part_data_end = boundary_idxs[bi + 1] - 4;\n\n\t\t\t\t\tfbuf.position(part_data_start);\n\t\t\t\t\tif (content_type == null) {\n\t\t\t\t\t\t// Read the part into a string\n\t\t\t\t\t\tbyte[] data_bytes = new byte[part_data_end - part_data_start];\n\t\t\t\t\t\tfbuf.get(data_bytes);\n\t\t\t\t\t\tparms.put(part_name, new String(data_bytes, encoding));\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// Read it into a file\n\t\t\t\t\t\tString path = saveTmpFile(fbuf, part_data_start, part_data_end\n\t\t\t\t\t\t\t\t- part_data_start, file_name);\n\t\t\t\t\t\tif (!files.containsKey(part_name)) {\n\t\t\t\t\t\t\tfiles.put(part_name, path);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tint count = 2;\n\t\t\t\t\t\t\twhile (files.containsKey(part_name + count)) {\n\t\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tfiles.put(part_name + count, path);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tparms.put(part_name, file_name);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} catch (ResponseException re) {\n\t\t\t\tthrow re;\n\t\t\t} catch (Exception e) {\n\t\t\t\tthrow new ResponseException(Response.Status.INTERNAL_ERROR, e.toString());\n\t\t\t}\n\t\t}",
"private void doMultipartFormDataPostRequest(String token, String url, byte[] fileData, String filename) throws Exception {\n\n\n CloseableHttpClient client = HttpClients.createDefault();\n\n try {\n HttpPost httpPost = new HttpPost(getBaseUrl() + url );\n httpPost.setHeader(\"X-Authentication\", token);\n\n\n MultipartEntityBuilder multipartBuilder = MultipartEntityBuilder.create();\n\n if (fileData == null || fileData.length <= 0) {\n throw new MfilesOperationException(\"The byte array must not be null\");\n }\n\n if (StringUtils.isBlank(filename)) {\n throw new MfilesOperationException( \"Filename must not be blank or null...\" );\n }\n\n File tempDir = FileUtils.getTempDirectory();\n String reversedFilename = StringUtils.reverse(filename);\n //get the first '.'\n int dotIndex = reversedFilename.indexOf('.');\n String extension = reversedFilename.substring(0, (dotIndex + 1));\n extension = StringUtils.reverse(extension);\n\n //Generate a random string to append to the name of the file\n //We do this to prevent a situation whereby multiple users\n //upload files that have the same name and extension.\n String tempFileName = filename.substring(0, filename.length() - extension.length()) + \"_\" + System.currentTimeMillis();\n\n tempFileName += extension;\n\n final File fileToUpload = new File(tempDir + File.separator + tempFileName);\n\n try {\n FileUtils.writeByteArrayToFile(fileToUpload, fileData);\n }catch(Exception ex) {\n LOG.error(\"An exception occurred while writing byte array data to the file for upload\", ex);\n throw new MfilesOperationException(ex.getMessage());\n } finally {\n\n }\n\n final FileBody fileBody = new FileBody(fileToUpload);\n\n multipartBuilder.addPart(\"file\", fileBody);\n\n //OR\n //multipartBuilder.addBinaryBody(\"file\", file, ContentType.APPLICATION_OCTET_STREAM, \"file.ext\");\n\n org.apache.http.HttpEntity multipart = multipartBuilder.build();\n httpPost.setEntity(multipart);\n\n System.out.println(\"executing file upload request \" + httpPost.getRequestLine());\n\n CloseableHttpResponse response = client.execute(httpPost);\n try {\n System.out.println(\"----------------------------------------\");\n System.out.println(\"---------Response from server-----------\");\n System.out.println(response.getStatusLine());\n System.out.println(\"----------------------------------------\");\n\n org.apache.http.HttpEntity resEntity = response.getEntity();\n if (resEntity != null) {\n BufferedReader br = new BufferedReader(new InputStreamReader(resEntity.getContent()));\n String output = null;\n\n while ((output = br.readLine()) != null) {\n System.out.println(output);\n }\n }\n\n EntityUtils.consume(resEntity);\n\n } finally {\n response.close();\n }\n } finally {\n client.close();\n }\n }",
"public void uploadMultipart() {\n //getting the actual path of the image\n String path = getPath(filePath);\n\n //Uploading code\n try {\n String uploadId = UUID.randomUUID().toString();\n\n //Creating a multi part request\n new MultipartUploadRequest(this, uploadId, \"todo\")\n .addFileToUpload(path, \"image\") //Adding file\n .setNotificationConfig(new UploadNotificationConfig())\n .setMaxRetries(2)\n .startUpload(); //Starting the upload\n\n } catch (Exception exc) {\n Toast.makeText(this, exc.getMessage(), Toast.LENGTH_SHORT).show();\n }\n }",
"public interface RequeteService {\n @Multipart\n @POST(\"upImportDoc.do\")\n Call<ResponseBody> uploadSingleFile(\n @Header(\"Cookie\") String sessionid,\n @Header(\"User-Agent\") String userAgent,\n @Part MultipartBody.Part file,\n @Part(\"jsessionid\") RequestBody jsessionid,\n @Part(\"ptoken\") RequestBody ptoken,\n @Part(\"ajaupmo\") RequestBody ajaupmo,\n @Part(\"ContributionComment\") RequestBody ContributionComment,\n @Part(\"Document_numbasedoc\") RequestBody Document_numbasedoc,\n @Part(\"contribution\") RequestBody contribution);\n}",
"public void parse() throws ParseException, HttpHeaderParseException, HttpParseException {\n\t\tboolean multi = isMultipart();\n\t\tmessage.boundary = contentTypeHeader.getParam(\"boundary\");\n\t\tlogger.fine(\"MultipartParser(\" + this.toString() + \") - boundary = \" + message.boundary);\n\t\tif (er != null) {\n\t\t\ter.detail(contentTypeHeader.asString());\n\t\t\ter.detail(\"boundary = \" + message.boundary);\n\t\t}\n\t\tif (message.boundary == null || message.boundary.equals(\"\")) {\n\t\t\tmessage = null;\n\t\t\treturn;\n\t\t}\n\t\t\t//throw new ParseException(\"No boundary\");\n\n\t\tString pboundary = \"--\" + message.boundary;\n\t\tbyte[] body = hp.message.getBodyBytes();\n\t\tint from=0;\n\t\tint to=0;\n\t\twhile(true) {\n\t\t\tfrom = indexOf(body, pboundary, to);\n\t\t\tif (from == -1) {\n\t\t\t\tif (message.parts.size() == 0 && er != null)\n\t\t\t\t\ter.err(XdsErrorCode.Code.NoCode, \"Multipart boundary [\" + pboundary + \"] not found in message body\", this, \"http://www.w3.org/Protocols/rfc1341/7_2_Multipart.html\");\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t//System.out.println(\"***************\\nfrom is:\\n\" + body.substring(from));\n\t\t\tfrom = afterBoundary(body, from);\n\t\t\tif (from == -1)\n\t\t\t\tbreak;\n\t\t\t//System.out.println(\"***************\\nfrom2 is:\\n\" + body.substring(from));\n\t\t\tto = indexOf(body, pboundary, from);\n\t\t\tif (to == -1)\n\t\t\t\tbreak;\n\t\t\t//System.out.println(\"***************\\nto is:\\n\" + body.substring(to));\n\n\t\t\tPartParser pp = new PartParser(substring(body, from, to), er, appendixV);\n\t\t\tmessage.parts.add(pp.part);\n\t\t}\n\n\t\tif (message.parts.size() == 0) {\n\t\t\tif (er != null)\n\t\t\t\ter.err(XdsErrorCode.Code.NoCode, \"No Parts found in Multipart\", this, \"\");\n\t\t\treturn;\n\t\t}\n\n\t\tString contentTypeString = hp.message.getHeader(\"content-type\");\n\t\tHttpHeader contentTypeHeader = new HttpHeader(contentTypeString);\n\t\tmessage.startPartId = contentTypeHeader.getParam(\"start\");\n\t\tif (message.startPartId == null || message.startPartId.equals(\"\")) {\n\t\t\tif (er != null)\n\t\t\t\ter.detail(\"No start parameter found on Content-Type header - using first Part\");\n\t\t\tPart startPart = message.parts.get(0);\n\t\t\tmessage.startPartId = startPart.getContentId();\n\t\t} else {\n\t\t\tif (!PartParser.isWrappedIn(message.startPartId, \"<\", \">\")) {\n\t\t\t\tif (er != null)\n\t\t\t\t\ter.err(XdsErrorCode.Code.NoCode, \"Content-Type header has start parameter but it is not wrapped in < >\", this, \"http://www.w3.org/TR/2005/REC-xop10-20050125/ Example 2\");\n\t\t\t} else {\n\t\t\t\tmessage.startPartId = PartParser.unWrap(message.startPartId);\n\t\t\t}\n\t\t}\n\t\tif (er != null)\n\t\t\ter.detail(\"Start Part identified as [\" + message.startPartId + \"]\");\n\n\t\tif (appendixV) {\n\t\t\tString contentTypeValue = contentTypeHeader.getValue();\n\t\t\tif (contentTypeValue == null) contentTypeValue = \"\";\n\t\t\tif (!\"multipart/related\".equals(contentTypeValue.toLowerCase()))\n\t\t\t\tif (er != null) {\n\t\t\t\t\ter.err(XdsErrorCode.Code.NoCode, \"Content-Type header must have value \" + \"multipart/related\" + \" - found instead \" + contentTypeValue, this, \"http://www.w3.org/TR/soap12-mtom - Section 3.2\");\n\t\t\t\t} else {\n\t\t\t\t\tthrow new HttpParseException(\"Content-Type header must have value \" + \"multipart/related\" + \" - found instead \" + contentTypeValue);\n\t\t\t\t}\n\t\t\tString type = contentTypeHeader.getParam(\"type\");\n\t\t\tif (type == null) type = \"\";\n\t\t\tif (!\"application/xop+xml\".equals(type.toLowerCase()))\n\t\t\t\tif (er != null) {\n\t\t\t\t\ter.err(XdsErrorCode.Code.NoCode, \"Content-Type header must have type parameter equal to application/xop+xml - found instead \" + type + \". Full content-type header was \" + contentTypeString, this, \"http://www.w3.org/TR/soap12-mtom - Section 3.2\");\n\t\t\t\t} else {\n\t\t\t\t\tthrow new HttpParseException(\"Content-Type header must have type parameter equal to application/xop+xml - found instead \" + type + \". Full content-type header was \" + contentTypeString);\n\t\t\t\t}\n\t\t}\n\n\t}",
"public static String uploadUseFormFile(String toUrl, File[] files, String[] names) {\r\n\t\tString end = \"\\r\\n\";\r\n\t\tString twoHyphens = \"--\";\r\n\t\tString boundary = \"*****jerry2\";\r\n\t\t\r\n\t\tHttpURLConnection conn = null;\r\n\t\tInputStream is = null;\r\n\t\tDataOutputStream ds = null;\t\t\r\n\t\ttry {\r\n\t\t\tURL url = new URL(toUrl);\r\n\t\t\tconn = (HttpURLConnection) url.openConnection();\r\n\t\t\tconn.setDoOutput(true);\r\n\t\t\tconn.setDoInput(true);\r\n\t\t\tconn.setChunkedStreamingMode(0);\r\n\t\t\tconn.setRequestMethod(\"POST\");\r\n\t\t\tconn.setRequestProperty(\"Connection\", \"Keep-Alive\");\r\n\t\t\tconn.setRequestProperty(\"Charset\", \"UTF-8\");\r\n\t\t\tconn.setRequestProperty(\"Content-length\", String.valueOf(getLength(files)));\r\n\t\t\tconn.setRequestProperty(\"Content-type\", \"multipart/form-data; boundary=\"+boundary);\r\n\t\t\t/*\t\t\t\r\n\t\t\tContent-type: multipart/form-data; boundary=AaB03x\r\n\t\t\t--AaB03x\r\n\t content-disposition: form-data; name=\"pics\"; filename=\"file1.txt\"\r\n\t Content-Type: text/plain\r\n\r\n\t ... contents of file1.txt ...\r\n\t --AaB03x--\r\n\t */\r\n\t\t\tds = new DataOutputStream(conn.getOutputStream());\r\n\t\t\tfor (int i = 0; i < files.length; i++) {\r\n\t\t\t\tis = new FileInputStream(files[i]);\r\n\t\t\t\tds.writeBytes(twoHyphens + boundary + end);\r\n\t\t\t\tds.writeBytes(\"content-disposition: form-data; name=\\\"\"+names[i]+\"\\\"; filename=\\\"\"+files[i].getName()+\"\\\"\"+end);\r\n\t\t\t\tds.writeBytes(end);\r\n\t\t\t\tbyte[] buf = new byte[128];\r\n\t\t\t\tint len = -1;\r\n\t\t\t\twhile ((len=is.read(buf)) != -1)\r\n\t\t\t\t\tds.write(buf, 0, len);\r\n\t\t\t\tds.writeBytes(end);\r\n\t\t\t}\r\n\t\t\tds.writeBytes(twoHyphens + boundary + twoHyphens + end);\r\n\t\t\tds.flush();\r\n\t\t\t\r\n\t\t\t//response\r\n\t\t\tSystem.out.println(\"code=\"+conn.getResponseCode()+\",msg=\"+conn.getResponseMessage());\r\n\t\t\treturn getContent(conn.getInputStream());\r\n\t\t} catch (IOException e1) {\r\n\t\t\te1.printStackTrace();\r\n\t\t} finally{\r\n\t\t\ttry {\r\n\t\t\t\tif (is != null)\r\n\t\t\t\t\tis.close();\r\n\t\t\t\tif (ds != null)\r\n\t\t\t\t\tds.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\tconn.disconnect();\r\n\t\t}\r\n\t\treturn null;\r\n\t}",
"public final boolean isMultipart() {\n return this.getTopLevelType().equals(\"multipart\");\n }",
"static public String postFile(String url, String userid, String fieldName, File textFile) throws Exception {\r\n // String param = \"value\";\r\n // File textFile = new File(\"/path/to/file.txt\");\r\n // File binaryFile = new File(\"/path/to/file.bin\");\r\n String boundary = Long.toHexString(System.currentTimeMillis()); // Just\r\n // generate\r\n // some\r\n // unique\r\n // random\r\n // value.\r\n String CRLF = \"\\r\\n\"; // Line separator required by multipart/form-data.\r\n\r\n URLConnection connection = new URL(url).openConnection();\r\n connection.setDoOutput(true);\r\n connection.setRequestProperty(\"Content-Type\", \"multipart/form-data; boundary=\" + boundary);\r\n PrintWriter writer = null;\r\n try {\r\n String charset = \"ISO-8859-1\"; // was ISO-8859-1\r\n OutputStream output = connection.getOutputStream();\r\n writer = new PrintWriter(new OutputStreamWriter(output, charset), true); // true\r\n // =\r\n // autoFlush,\r\n // important!\r\n\r\n // Send text file.\r\n writer.append(\"--\" + boundary).append(CRLF);\r\n writer.append(\"Content-Disposition: form-data; name=\\\"\" + fieldName + \"\\\"; filename=\\\"\" + textFile.getName() + \"\\\"\").append(CRLF);\r\n writer.append(\"Content-Type: text/plain; charset=\" + charset).append(CRLF);\r\n writer.append(CRLF).flush();\r\n BufferedReader reader = null;\r\n try {\r\n reader = new BufferedReader(new InputStreamReader(new FileInputStream(textFile), charset));\r\n for (String line; (line = reader.readLine()) != null;) {\r\n writer.append(line).append(CRLF);\r\n }\r\n } finally {\r\n if (reader != null)\r\n try {\r\n reader.close();\r\n } catch (IOException logOrIgnore) {\r\n }\r\n }\r\n\r\n // Send normal param.\r\n\r\n writer.append(\"--\" + boundary).append(CRLF);\r\n writer.append(\"Content-Disposition: form-data; name=\\\"user\\\"\").append(CRLF);\r\n writer.append(\"Content-Type: text/plain; charset=\" + charset).append(CRLF);\r\n writer.append(CRLF);\r\n writer.append(userid).append(CRLF).flush();\r\n\r\n writer.flush();\r\n\r\n /*\r\n * // Send binary file. writer.append(\"--\" + boundary).append(CRLF);\r\n * writer.append(\r\n * \"Content-Disposition: form-data; name=\\\"binaryFile\\\"; filename=\\\"\" +\r\n * binaryFile.getName() + \"\\\"\").append(CRLF); writer.append(\r\n * \"Content-Type: \" + URLConnection.guessContentTypeFromName\r\n * (binaryFile.getName())).append(CRLF); writer.append(\r\n * \"Content-Transfer-Encoding: binary\").append(CRLF);\r\n * writer.append(CRLF).flush(); InputStream input = null; try { input =\r\n * new FileInputStream(binaryFile); byte[] buffer = new byte[1024]; for\r\n * (int length = 0; (length = input.read(buffer)) > 0;) {\r\n * output.write(buffer, 0, length); } output.flush(); // Important! Output\r\n * cannot be closed. Close of writer will close output as well. } finally\r\n * { if (input != null) try { input.close(); } catch (IOException\r\n * logOrIgnore) {} } writer.append(CRLF).flush(); // CRLF is important! It\r\n * indicates end of binary boundary.\r\n */\r\n\r\n // End of multipart/form-data.\r\n writer.append(\"--\" + boundary + \"--\").append(CRLF);\r\n writer.append(CRLF).flush(); // CRLF is important! It indicates end\r\n // of binary boundary.\r\n\r\n byte[] data;\r\n InputStream in = null;\r\n in = new BufferedInputStream(connection.getInputStream());\r\n ByteArrayOutputStream bos = new ByteArrayOutputStream(16384);\r\n try {\r\n\r\n int BUFFER_SIZE = 16384;\r\n byte[] tmp = new byte[BUFFER_SIZE];\r\n int ret;\r\n while ((ret = in.read(tmp)) > 0) {\r\n bos.write(tmp, 0, ret);\r\n }\r\n } catch (IOException e) {\r\n Logging.logError(e);\r\n }\r\n\r\n data = bos.toByteArray();\r\n log.info(\"read {} bytes\", data.length);\r\n\r\n String s = new String(data);\r\n log.info(s);\r\n try {\r\n in.close();\r\n } catch (IOException e) {\r\n // don't care\r\n }\r\n\r\n return s;\r\n\r\n } finally {\r\n if (writer != null)\r\n writer.close();\r\n }\r\n }",
"public HttpRequest m() throws IOException {\n if (this.g) {\n this.f.a(\"\\r\\n--00content0boundary00\\r\\n\");\n } else {\n this.g = true;\n d(\"multipart/form-data; boundary=00content0boundary00\").l();\n this.f.a(\"--00content0boundary00\\r\\n\");\n }\n return this;\n }",
"public boolean getUseMultipartForPost(){\n // We use multipart if we have been told so, or files are present\n // and the files should not be send as the post body\n HTTPFileArg[] files = getHTTPFiles();\n if(HTTPConstants.POST.equals(getMethod()) && (getDoMultipartPost() || (files.length > 0 && !getSendFileAsPostBody()))) {\n return true;\n }\n return false;\n }",
"@GET\n\t@Produces(MediaType.TEXT_PLAIN)\n\tpublic Object get() throws MalformedURLException, IOException {\n\t\tURI uri = URI.create(request.getRequestURL().toString());\n\t\tURI serviceUri = uri.resolve(\"mail/multipart\");\n\t\ttry(InputStream is = serviceUri.toURL().openStream()) {\n\t\t\treturn StreamUtil.readString(is);\n\t\t}\n\t}",
"private void addFilesInRequestEntity(MultipartEntity reqEntity) {\n if (filePath_image != null && filePath_image.length > 0) {\n\n for (int i = 0; i < filePath_image.length; i++) {\n if (filePath_image[i] != null) {\n File file = new File(filePath_image[i]);\n\n FileBody fileBodyVideo = new FileBody(file);\n reqEntity.addPart(keyForUploadFileImage + i, fileBodyVideo);\n System.out.println(keyForUploadFileImage + i + \" RestClient: File \" + file);\n }\n }\n }\n if (filePath_video != null && filePath_video.length() > 0) {\n File file = new File(filePath_video);\n\n FileBody fileBodyVideo = new FileBody(file);\n reqEntity.addPart(keyForUploadFileVideo, fileBodyVideo);\n System.out.println(keyForUploadFileVideo + \" RestClient: File \" + file);\n }\n }",
"@Multipart\n @POST()\n Call<Result> uploadImage(@Part MultipartBody.Part file, @Url String medialUploadUrl, @PartMap() Map<String, RequestBody> partMap);",
"public String copy(MultipartFile file) throws IOException;",
"abstract Function<Multipart.FileInfo, play.libs.streams.Accumulator<ByteString, Http.MultipartFormData.FilePart<A>>> createFilePartHandler();",
"@POST\n @Path(\"{id}/coverupload\")\n @Consumes(MediaType.MULTIPART_FORM_DATA)\n public Response uploadAttach(@PathParam(\"id\") Integer id, MultipartFormDataInput newcover) {\n Map<String, List<InputPart>> uploadForm = newcover.getFormDataMap();\n // Get file data to save\n List<InputPart> inputParts = uploadForm.get(\"file\");\n String filename = null;\n for (InputPart inputPart : inputParts) {\n // convert the uploaded file to inputstream and write it to disk\n InputStream inputStream = null;\n OutputStream out = null;\n try {\n inputStream = inputPart.getBody(InputStream.class, null);\n List<String> contDisp = inputPart.getHeaders().get(\"Content-Disposition\");\n for (String cd : contDisp) {\n if (cd.contains(\"filename\")) {\n filename = \"cover.jpg\";\n LOGGER.info(\"FILENAME : \" + filename);\n }\n }\n String path = conf.getMovieFS() + id + \"/\";\n File pathtest = new File(path);\n if (!pathtest.exists()) {\n if (!pathtest.mkdirs()) {\n LOGGER.error(\"While saving cover : \"\n + \"unable to create repository tmp dir => \" + path);\n }\n }\n File up = new File(path + filename);\n if (!up.createNewFile()) {\n \tif (up.exists()) {\n \t\tup.delete();\n \t\tif (!up.createNewFile()) {\n LOGGER.error(\"While saving cover : \" + \"unable to overwrite existing file => \"\n + up.getAbsolutePath());\n \t\t}\n \t} else {\n LOGGER.error(\"While saving cover : \" + \"unable to create new file => \"\n + up.getAbsolutePath());\n \t}\n }\n out = new FileOutputStream(up);\n\n int read = 0;\n byte[] bytes = new byte[2048];\n while ((read = inputStream.read(bytes)) != -1) {\n out.write(bytes, 0, read);\n }\n inputStream.close();\n out.flush();\n out.close();\n } catch (IOException e) {\n LOGGER.error(\"While saving cover : \", e);\n return Response.ok(new JsonSimpleResponse(false), MediaType.APPLICATION_JSON).build();\n } finally {\n if (inputStream != null) {\n try {\n inputStream.close();\n } catch (IOException e) {\n LOGGER.error(\"While saving cover - closing inputstream : \", e);\n }\n }\n if (out != null) {\n try {\n out.close();\n } catch (IOException e) {\n LOGGER.error(\"While saving cover - closing outputstream : \", e);\n }\n }\n }\n }\n return Response.ok(new JsonSimpleResponse(true), MediaType.APPLICATION_JSON).build();\n }",
"void whenUploadFile(MultipartFile file, HttpServletRequest request);",
"public interface UploadsImService {\n @Multipart\n @POST(\"/api\")\n Single<ResponseBody> postImage(@Part MultipartBody.Part image);\n}",
"private play.api.mvc.BodyParser<play.api.mvc.MultipartFormData<A>> multipartParser() {\n ScalaFilePartHandler filePartHandler = new ScalaFilePartHandler();\n //noinspection unchecked\n return Multipart.multipartParser((int) maxLength, filePartHandler, materializer);\n }",
"@Override\n public Map<String, String> getHeaders() throws AuthFailureError {\n Map<String,String> params = new HashMap<String, String>();\n\n params.put(\"Content-Type\", \"multipart/form-data; boundary=\" + BOUNDARY+\"; charset=utf-8\");\n return params;\n }",
"public Long createFileUpload(FileUpload fileUpload, InputStream fileInputStream) throws AppException;",
"public CompleteMultipartUploadRequest() {}",
"public MultipartUtility(MyApplication app, String requestURL, String charset)\n throws IOException {\n this.charset = charset;\n\n // creates a unique boundary based on time stamp\n boundary = \"===\" + System.currentTimeMillis() + \"===\";\n\n URL url = new URL(requestURL);\n Log.e(\"URL\", \"URL : \" + requestURL.toString());\n httpConn = (HttpURLConnection) url.openConnection();\n httpConn.setUseCaches(false);\n httpConn.setDoOutput(true); // indicates POST method\n httpConn.setDoInput(true);\n httpConn.setRequestProperty(\"Content-Type\",\n \"multipart/form-data; boundary=\" + boundary);\n httpConn.setRequestProperty(\"Authorization\", \"Bearer \" + app.id_token);\n\n httpConn.setRequestProperty(\"User-Agent\", \"CodeJava Agent\");\n outputStream = httpConn.getOutputStream();\n writer = new PrintWriter(new OutputStreamWriter(outputStream, charset),\n true);\n }",
"public boolean getUseMultipartForPost() {\n // We use multipart if we have been told so, or files are present\n // and the files should not be send as the post body\n HTTPFileArg[] files = getHTTPFiles();\n return HTTPConstants.POST.equals(getMethod())\n && (getDoMultipartPost() || (files.length > 0 && !getSendFileAsPostBody()));\n }",
"@Override\r\n public void doPost(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n Context context =\r\n ReadOnlyContext.getContext(Constants.HTTP_REQUEST.REST.uri,\r\n request);\r\n try {\r\n MultipartParser parser =\r\n new MultipartParser(request, Long.MAX_VALUE, true, null);\r\n Part part = parser.readNextPart();\r\n if (part != null && part.isFile()) {\r\n if (part.getName().equals(\"file\")) {\r\n String temp = saveAndGetId(context, (FilePart) part);\r\n sendResponse(HttpServletResponse.SC_CREATED, temp, response);\r\n } else {\r\n sendResponse(HttpServletResponse.SC_BAD_REQUEST,\r\n \"Content must be named \\\"file\\\"\",\r\n response);\r\n }\r\n } else {\r\n if (part == null) {\r\n sendResponse(HttpServletResponse.SC_BAD_REQUEST,\r\n \"No data sent.\",\r\n response);\r\n } else {\r\n sendResponse(HttpServletResponse.SC_BAD_REQUEST,\r\n \"No extra parameters allowed\",\r\n response);\r\n }\r\n }\r\n } catch (AuthzException ae) {\r\n throw RootException.getServletException(ae,\r\n request,\r\n ACTION_LABEL,\r\n new String[0]);\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n sendResponse(HttpServletResponse.SC_INTERNAL_SERVER_ERROR, e\r\n .getClass().getName()\r\n + \": \" + e.getMessage(), response);\r\n }\r\n }",
"public int uploadFile(String sourceFileUri) {\n String fileName = sourceFileUri;\n\n HttpURLConnection conn = null;\n DataOutputStream dos = null;\n\n String lineEnd = \"\\r\\n\";\n String twoHyphens = \"--\";\n String boundary = \"*****\";\n\n int bytesRead, bytesAvailable, bufferSize;\n byte[] buffer;\n int maxBufferSize = 1 * 1024 * 1024;\n File sourceFile = new File(sourceFileUri);\n\n if (!sourceFile.isFile()) {\n Log.e(\"uploadFile\", \"Source File not exist :\"\n +uploadFilePath);\n return 0;\n }\n else\n {\n try {\n // open a URL connection to the Servlet\n FileInputStream fileInputStream = new FileInputStream(sourceFile);\n URL url = new URL(upLoadServerUri);\n\n ///\n fileName = fileName.substring(fileName.lastIndexOf(\"/\") +1);\n ///\n\n // Open a HTTP connection to the URL\n conn = (HttpURLConnection) url.openConnection();\n conn.setDoInput(true); // Allow Inputs\n conn.setDoOutput(true); // Allow Outputs\n conn.setUseCaches(false); // Don't use a Cached Copy\n conn.setRequestMethod(\"POST\");\n conn.setRequestProperty(\"Connection\", \"Keep-Alive\");\n conn.setRequestProperty(\"ENCTYPE\", \"multipart/form-data\");\n conn.setRequestProperty(\"Content-Type\", \"multipart/form-data;boundary=\" + boundary);\n conn.setRequestProperty(\"uploaded_file\", fileName);\n\n dos = new DataOutputStream(conn.getOutputStream());\n dos.writeBytes(twoHyphens + boundary + lineEnd);\n dos.writeBytes(\"Content-Disposition: form-data; name=\\\"uploaded_file\\\";filename=\\\"\"\n + fileName + \"\\\"\" + lineEnd);\n dos.writeBytes(lineEnd);\n\n // create a buffer of maximum size\n bytesAvailable = fileInputStream.available();\n bufferSize = Math.min(bytesAvailable, maxBufferSize);\n buffer = new byte[bufferSize];\n\n // read file and write it into form...\n bytesRead = fileInputStream.read(buffer, 0, bufferSize);\n while (bytesRead > 0) {\n dos.write(buffer, 0, bufferSize);\n bytesAvailable = fileInputStream.available();\n bufferSize = Math.min(bytesAvailable, maxBufferSize);\n bytesRead = fileInputStream.read(buffer, 0, bufferSize);\n }\n\n // send multipart form data necesssary after file data...\n dos.writeBytes(lineEnd);\n dos.writeBytes(twoHyphens + boundary + twoHyphens + lineEnd);\n\n // Responses from the server (code and message)\n serverResponseCode = conn.getResponseCode();\n String serverResponseMessage = conn.getResponseMessage();\n\n Log.i(\"uploadFile\", \"HTTP Response is : \"\n + serverResponseMessage + \": \" + serverResponseCode);\n\n if(serverResponseCode == 200){\n runOnUiThread(new Runnable() {\n public void run() {\n Toast.makeText(Ui_Main_Activity.Context_UiMainActivity, \"File Upload Complete.\", Toast.LENGTH_SHORT).show();\n finish();\n }\n });\n }\n\n //close the streams //\n fileInputStream.close();\n dos.flush();\n dos.close();\n\n } catch (MalformedURLException ex) {\n ex.printStackTrace();\n runOnUiThread(new Runnable() {\n public void run() {\n Toast.makeText(Ui_Main_Activity.Context_UiMainActivity, \"MalformedURLException\",\n Toast.LENGTH_SHORT).show();\n }\n });\n\n Log.e(\"Upload file to server\", \"error: \" + ex.getMessage(), ex);\n } catch (Exception e) {\n e.printStackTrace();\n runOnUiThread(new Runnable() {\n public void run() {\n Toast.makeText(Ui_Main_Activity.Context_UiMainActivity, \"Got Exception : see logcat \", Toast.LENGTH_SHORT).show();\n }\n });\n Log.e(\"Upload file Exception\", \"Exception : \" + e.getMessage(), e);\n }\n return serverResponseCode;\n } // End else block\n }",
"@Test\n void buildWithFilePart() {\n MultipartFileBuilder builder = new MultipartFileBuilderImpl(\n System.getProperty(\"java.io.tmpdir\"));\n final byte[] value = UUID.randomUUID().toString().getBytes(StandardCharsets.UTF_8);\n StepVerifier\n .create(builder.build(createFilePart(value, \"file\", MediaType.TEXT_PLAIN, \"test.txt\")))\n .assertNext(multipartFile -> {\n try {\n assertFalse(multipartFile.isEmpty());\n assertEquals(\"file\", multipartFile.getName());\n assertEquals(MediaType.TEXT_PLAIN_VALUE, multipartFile.getContentType());\n assertEquals(\"test.txt\", multipartFile.getOriginalFilename());\n assertEquals(value.length, (int) multipartFile.getSize());\n assertArrayEquals(value, multipartFile.getBytes());\n\n } catch (IOException e) {\n throw ServiceException.internalServerError(\"Fatal error\", e);\n } finally {\n FileAwareMultipartFile.delete(multipartFile);\n }\n })\n .verifyComplete();\n }",
"@Multipart\n @POST(\"/SaveServiceRequest\")\n void saveServicesDetailsWithoutbpFile(@Part(\"tabella\") TypedString tabella,\n @Part(\"action\") TypedString action,\n @Part(\"idDIP\") TypedString idDIP,\n @Part(\"campiSezD\") TypedString campiSezD,//static and mandatory\n @Part(\"testiSezD\") TypedString testiSezD,//static and mandatory\n @Part(\"allegati\") TypedString allegati,//static and mandatory\n @Part(\"IBAN\") TypedString IBAN,\n @Part(\"IDServizio\") TypedString IDServizio,\n @Part(\"privacy1\") TypedString privacy1,\n @Part(\"privacy2\") TypedString privacy2,\n @Part(\"idBenef2\") TypedString company_id,\n @Part(\"is_mobile_request\") TypedString is_mobile_request,\n @Part(\"bpFile\") TypedFile bpFile,\n @Part(\"stato_di_famiglia_o_certificato_di_paternitmaternit\") TypedFile stato_di_famiglia_o_certificato_di_paternitmaternit,\n @Part(\"rimborso_1\") TypedFile rimborso_1,\n @Part(\"rimborso_2\") TypedFile rimborso_2,\n @Part(\"rimborso_3\") TypedFile rimborso_3,\n @Part(\"rimborso_4\") TypedFile rimborso_4,\n @Part(\"rimborso_5\") TypedFile rimborso_5,\n @Part(\"rimborso_6\") TypedFile rimborso_6,\n @Part(\"rimborso_7\") TypedFile rimborso_7,\n @Part(\"rimborso_8\") TypedFile rimborso_8,\n @Part(\"rimborso_9\") TypedFile rimborso_9,\n @Part(\"rimborso_10\") TypedFile rimborso10,\n @Part(\"countAz\") TypedString countAz,\n @Part(\"parente\") TypedString parente,\n @Part(\"tipoParente\") TypedString tipoParente,\n @Part(\"cognomeParente\") TypedString cognomeParente,\n @Part(\"nomeParente\") TypedString nomeParente,\n @Part(\"luogoNascitaParente\") TypedString luogoNascitaParente,\n @Part(\"dtNascitaParente\") TypedString dtNascitaParente,\n @Part(\"certificato_medico_pediatra_o_ospedale\") TypedFile certificato_medico_pediatra_o_ospedale,\n @Part(\"attestazione_assenza_da_lavoro\") TypedFile attestazione_assenza_da_lavoro,\n @Part(\"cfParente\") TypedString cfParente,\n @Part(\"ProvNascita\") TypedString ProvNascita,\n @Part(\"lista_dipendenti\") TypedFile lista_dipendenti,\n @Part(\"stato_di_famiglia\") TypedFile stato_di_famiglia,\n @Part(\"ciFile\") TypedFile ciFile,\n @Part(\"ciScadenza\") TypedString ciScadenza,\n @Part(\"VisuraFile\") TypedFile VisuraFile,\n @Part(\"visuraData\") TypedString visuraData,\n @Part(\"stato_di_famiglia_o_attestazione_di_paternitmaternit\") TypedFile stato_di_famiglia_o_attestazione_di_paternitmaternit,\n @Part(\"elenco_libri_di_testo_certificato_dalla_scuola\") TypedFile elenco_libri_di_testo_certificato_dalla_scuola,\n @Part(\"certificato_di_nascita\")TypedFile certificato_di_nascita,\n @Part(\"certificato_di_invalidit_grave\")TypedFile certificato_di_invalidit_grave,\n @Part(\"certificato_di_nascita_o_di_adozione_del_figlio\")TypedFile certificato_di_nascita_o_di_adozione_del_figlio,\n @Part(\"stato_di_famiglia_o_attestazione_paternitmaternit\")TypedFile stato_di_famiglia_o_attestazione_paternitmaternit,\n @Part(\"attestato_di_iscrizione_a_scuola\")TypedFile attestato_di_iscrizione_a_scuola,\n @Part(\"stato_di_faiimglia_o_attestazione_paternitmaternit\")TypedFile stato_di_faiimglia_o_attestazione_paternitmaternit,\n @Part(\"elenco_di_dipendenti_per_i_quali_si_richiede_rimborso\")TypedFile elenco_di_dipendenti_per_i_quali_si_richiede_rimborso,\n @Part(\"elenco_allievi_in_formazione\")TypedFile elenco_allievi_in_formazione,\n @Part(\"verbale_accordo_sindacale\")TypedFile verbale_accordo_sindacale,\n @Part(\"attestazione_pagamento_dellultima_quota\")TypedFile attestazione_pagamento_dellultima_quota,\n @Part(\"elenco_dei_dipendenti_che_hanno_sostenuto_la_visita_medica\")TypedFile elenco_dei_dipendenti_che_hanno_sostenuto_la_visita_medica,\n @Part(\"elenco_dipendenti_che_hanno_sostenuto_la_visita_medica\")TypedFile elenco_dipendenti_che_hanno_sostenuto_la_visita_medica,\n @Part(\"frontespizio_dvr_con_evidenza_data_certa\")TypedFile frontespizio_dvr_con_evidenza_data_certa,\n @Part(\"file_immagine_del_banner_promozionale_o_del_logo\")TypedFile file_immagine_del_banner_promozionale_o_del_logo,\n @Part(\"progetto_formativo_finanziato\")TypedFile progetto_formativo_finanziato,\n @Part(\"delibera_di_approvazione_del_progetto\")TypedFile delibera_di_approvazione_del_progetto,\n @Part(\"elenco_partecipanti_al_corso_cognome_nome_e_c_f_\")TypedFile elenco_partecipanti_al_corso_cognome_nome_e_c,\n\n @Part(\"certificazione_accreditamento_dellorganismo_di_formazione\")TypedFile certificazione_accreditamento_dellorganismo_di_formazione,\n @Part(\"cv_formatori\")TypedFile cv_formatori,\n @Part(\"calendario_attivit_formativa_con_date_ora_sede_formatori_e_contenuti\")TypedFile calendario_attivit_formativa_con_date_ora_sede_formatori_e_contenuti,\n @Part(\"allegatiDesc\")TypedString allegatiDesc,\n\n\n @Part(\"GIORNIASSENZA\")TypedString GIORNIASSENZA,\n @Part(\"corsoTitolo\")TypedString corsoTitolo,\n @Part(\"corsoOre\") TypedString corsoOre,\n @Part(\"RIMBORSO\")TypedString RIMBORSO,\n @Part(\"corsoImportoAllievo\") TypedString corsoImportoAllievo, // added by Mayur for the request which needs this parametr\n @Part(\"NALLIEVI\")TypedString NALLIEVI,\n @Part(\"ANNOISCRIZIONESCUOLA\") TypedString ANNOISCRIZIONESCUOLA, // added by Mayur for the request which needs this parametr\n @Part(\"NOMESCUOLA\")TypedString NOMESCUOLA, // added by Mayur for the request which needs this parametr\n // @Part(\"codice_fiscale\")TypedFile codice_fiscale,\n Callback<JsonObject> response);",
"@Override\n public String getServletInfo() {\n return \"Handles file upload data from application/octet-stream, and multipart/form-data.\";\n }",
"UploadInfo simpleUpload(SimpleFile file);",
"private HttpEntity buildMultiPart(MetaExpression expression, ConstructContext context) {\n if (expression.getType() != OBJECT && expression.getType() != LIST) {\n throw new RobotRuntimeException(\"A multipart body must always be an OBJECT or a LIST. Please check the documentation.\");\n }\n MultipartEntityBuilder builder = MultipartEntityBuilder.create();\n\n if (expression.getType() == OBJECT) {\n expression.<Map<String, MetaExpression>>getValue()\n .forEach((name, bodyPart) -> buildPart(name, bodyPart, context, builder));\n } else if (expression.getType() == LIST) {\n expression.<List<MetaExpression>>getValue()\n .forEach(bodyPart -> buildPart(null, bodyPart, context, builder));\n }\n\n return builder.build();\n }",
"public interface IFileService {\n ResponseJson uploadFile(MultipartHttpServletRequest request) throws IOException;\n\n ResponseJson uploadFiles(MultipartHttpServletRequest request) throws IOException;\n\n ResponseJson fileDownload(HttpServletRequest request, HttpServletResponse response,int fid) throws UnsupportedEncodingException;\n\n ResponseJson fileDelete(FileModel fileModel, HttpServletRequest request);\n\n ResponseJson findFileList(int uid);\n\n ResponseJson excelUpload(MultipartHttpServletRequest request,String type);\n\n ResponseJson findFileListByPage(int uid, PageJson pageJson);\n\n EUditorJson ueditorUploadImage(MultipartHttpServletRequest request) throws IOException;\n}",
"private HttpRequest applyMultipartDataTo(HttpRequest httpRequest, Report report) {\n httpRequest.part(\"report[identifier]\", report.getIdentifier());\n if (report.getFiles().length == 1) {\n Fabric.getLogger().d(\"CrashlyticsCore\", \"Adding single file \" + report.getFileName() + \" to report \" + report.getIdentifier());\n return httpRequest.part(\"report[file]\", report.getFileName(), \"application/octet-stream\", report.getFile());\n }\n int n = 0;\n File[] arrfile = report.getFiles();\n int n2 = arrfile.length;\n int n3 = 0;\n do {\n Object object = httpRequest;\n if (n3 >= n2) return object;\n object = arrfile[n3];\n Fabric.getLogger().d(\"CrashlyticsCore\", \"Adding file \" + ((File)object).getName() + \" to report \" + report.getIdentifier());\n httpRequest.part(\"report[file\" + n + \"]\", ((File)object).getName(), \"application/octet-stream\", (File)object);\n ++n;\n ++n3;\n } while (true);\n }",
"OutputStream receiveUpload(String filename, String mimeType);",
"@Multipart\n @POST(\"/SaveServiceRequest\")\n void saveServicesDetailsForCompanyWithoutBpFile(@Part(\"tabella\") TypedString tabella,\n @Part(\"action\") TypedString action,\n @Part(\"idAZ\") TypedString idDIP,\n @Part(\"campiSezD\") TypedString campiSezD,//static and mandatory\n @Part(\"testiSezD\") TypedString testiSezD,//static and mandatory\n @Part(\"allegati\") TypedString allegati,//static and mandatory\n @Part(\"IBAN\") TypedString IBAN,\n @Part(\"IDServizio\") TypedString IDServizio,\n @Part(\"privacy1\") TypedString privacy1,\n @Part(\"privacy2\") TypedString privacy2,\n @Part(\"idBenef2\") TypedString company_id,\n @Part(\"is_mobile_request\") TypedString is_mobile_request,\n @Part(\"bpFile\") TypedFile bpFile,\n @Part(\"stato_di_famiglia_o_certificato_di_paternitmaternit\") TypedFile stato_di_famiglia_o_certificato_di_paternitmaternit,\n @Part(\"rimborso_1\") TypedFile rimborso_1,\n @Part(\"rimborso_2\") TypedFile rimborso_2,\n @Part(\"rimborso_3\") TypedFile rimborso_3,\n @Part(\"rimborso_4\") TypedFile rimborso_4,\n @Part(\"rimborso_5\") TypedFile rimborso_5,\n @Part(\"rimborso_6\") TypedFile rimborso_6,\n @Part(\"rimborso_7\") TypedFile rimborso_7,\n @Part(\"rimborso_8\") TypedFile rimborso_8,\n @Part(\"rimborso_9\") TypedFile rimborso_9,\n @Part(\"rimborso_10\") TypedFile rimborso10,\n @Part(\"countAz\") TypedString countAz,\n @Part(\"parente\") TypedString parente,\n @Part(\"tipoParente\") TypedString tipoParente,\n @Part(\"cognomeParente\") TypedString cognomeParente,\n @Part(\"nomeParente\") TypedString nomeParente,\n @Part(\"luogoNascitaParente\") TypedString luogoNascitaParente,\n @Part(\"dtNascitaParente\") TypedString dtNascitaParente,\n @Part(\"certificato_medico_pediatra_o_ospedale\") TypedFile certificato_medico_pediatra_o_ospedale,\n @Part(\"attestazione_assenza_da_lavoro\") TypedFile attestazione_assenza_da_lavoro,\n @Part(\"cfParente\") TypedString cfParente,\n @Part(\"ProvNascita\") TypedString ProvNascita,\n @Part(\"lista_dipendenti\") TypedFile lista_dipendenti,\n @Part(\"stato_di_famiglia\") TypedFile stato_di_famiglia,\n @Part(\"ciFile\") TypedFile ciFile,\n @Part(\"ciScadenza\") TypedString ciScadenza,\n @Part(\"VisuraFile\") TypedFile VisuraFile,\n @Part(\"visuraData\") TypedString visuraData,\n @Part(\"stato_di_famiglia_o_attestazione_di_paternitmaternit\") TypedFile stato_di_famiglia_o_attestazione_di_paternitmaternit,\n @Part(\"elenco_libri_di_testo_certificato_dalla_scuola\") TypedFile elenco_libri_di_testo_certificato_dalla_scuola,\n @Part(\"certificato_di_nascita\")TypedFile certificato_di_nascita,\n @Part(\"certificato_di_invalidit_grave\")TypedFile certificato_di_invalidit_grave,\n @Part(\"certificato_di_nascita_o_di_adozione_del_figlio\")TypedFile certificato_di_nascita_o_di_adozione_del_figlio,\n @Part(\"stato_di_famiglia_o_attestazione_paternitmaternit\")TypedFile stato_di_famiglia_o_attestazione_paternitmaternit,\n @Part(\"attestato_di_iscrizione_a_scuola\")TypedFile attestato_di_iscrizione_a_scuola,\n @Part(\"stato_di_faiimglia_o_attestazione_paternitmaternit\")TypedFile stato_di_faiimglia_o_attestazione_paternitmaternit,\n @Part(\"elenco_di_dipendenti_per_i_quali_si_richiede_rimborso\")TypedFile elenco_di_dipendenti_per_i_quali_si_richiede_rimborso,\n @Part(\"elenco_allievi_in_formazione\")TypedFile elenco_allievi_in_formazione,\n @Part(\"verbale_accordo_sindacale\")TypedFile verbale_accordo_sindacale,\n @Part(\"attestazione_pagamento_dellultima_quota\")TypedFile attestazione_pagamento_dellultima_quota,\n @Part(\"elenco_dei_dipendenti_che_hanno_sostenuto_la_visita_medica\")TypedFile elenco_dei_dipendenti_che_hanno_sostenuto_la_visita_medica,\n @Part(\"elenco_dipendenti_che_hanno_sostenuto_la_visita_medica\")TypedFile elenco_dipendenti_che_hanno_sostenuto_la_visita_medica,\n @Part(\"frontespizio_dvr_con_evidenza_data_certa\")TypedFile frontespizio_dvr_con_evidenza_data_certa,\n @Part(\"file_immagine_del_banner_promozionale_o_del_logo\")TypedFile file_immagine_del_banner_promozionale_o_del_logo,\n @Part(\"progetto_formativo_finanziato\")TypedFile progetto_formativo_finanziato,\n @Part(\"delibera_di_approvazione_del_progetto\")TypedFile delibera_di_approvazione_del_progetto,\n @Part(\"elenco_partecipanti_al_corso_cognome_nome_e_c_f_\")TypedFile elenco_partecipanti_al_corso_cognome_nome_e_c,\n\n @Part(\"certificazione_accreditamento_dellorganismo_di_formazione\")TypedFile certificazione_accreditamento_dellorganismo_di_formazione,\n @Part(\"cv_formatori\")TypedFile cv_formatori,\n @Part(\"calendario_attivit_formativa_con_date_ora_sede_formatori_e_contenuti\")TypedFile calendario_attivit_formativa_con_date_ora_sede_formatori_e_contenuti,\n @Part(\"allegatiDesc\")TypedString allegatiDesc,\n\n @Part(\"GIORNIASSENZA\")TypedString GIORNIASSENZA,\n @Part(\"corsoTitolo\")TypedString corsoTitolo,\n @Part(\"corsoOre\") TypedString corsoOre,\n @Part(\"RIMBORSO\")TypedString RIMBORSO,\n @Part(\"corsoImportoAllievo\") TypedString corsoImportoAllievo, // added by Mayur for the request which needs this parametr\n @Part(\"NALLIEVI\")TypedString NALLIEVI, // added by Mayur for the request which needs this parametr\n @Part(\"ANNOISCRIZIONESCUOLA\") TypedString ANNOISCRIZIONESCUOLA, // added by Mayur for the request which needs this parametr\n @Part(\"NOMESCUOLA\")TypedString NOMESCUOLA, // added by Mayur for the request which needs this parametr\n @Part(\"codice_fiscale\")TypedFile codice_fiscale,\n Callback<JsonObject> response);",
"@Post(uri = \"/receive-multipart-body-as-mono\", consumes = MediaType.MULTIPART_FORM_DATA, produces = MediaType.TEXT_PLAIN)\n @SingleResult\n public Publisher<String> multipartAsSingle(@Body io.micronaut.http.server.multipart.MultipartBody body) {\n return Mono.from(body).map(single -> {\n try {\n return single.getBytes() == null ? \"FAIL\" : \"OK\";\n } catch (IOException e) {\n e.printStackTrace();\n }\n return \"FAIL\";\n });\n }",
"public interface UploadFileApi {\n @POST\n Flowable<ResponseBody> uploadFile(@Url String url, @Body MultipartBody body);\n}",
"@Multipart\n @POST(\"/SaveServiceRequest\")\n void saveServicesDetailsForCompanyWithBpFile(@Part(\"tabella\") TypedString tabella,\n @Part(\"action\") TypedString action,\n @Part(\"idAZ\") TypedString idDIP,\n @Part(\"campiSezD\") TypedString campiSezD,//static and mandatory\n @Part(\"bpAnnoMese\") TypedString bpAnnoMese,\n @Part(\"testiSezD\") TypedString testiSezD,//static and mandatory\n @Part(\"allegati\") TypedString allegati,//static and mandatory\n @Part(\"IBAN\") TypedString IBAN,\n @Part(\"IDServizio\") TypedString IDServizio,\n @Part(\"privacy1\") TypedString privacy1,\n @Part(\"privacy2\") TypedString privacy2,\n @Part(\"idBenef2\") TypedString company_id,\n @Part(\"is_mobile_request\") TypedString is_mobile_request,\n @Part(\"bpFile\") TypedFile bpFile,\n @Part(\"stato_di_famiglia_o_certificato_di_paternitmaternit\") TypedFile stato_di_famiglia_o_certificato_di_paternitmaternit,\n @Part(\"rimborso_1\") TypedFile rimborso_1,\n @Part(\"rimborso_2\") TypedFile rimborso_2,\n @Part(\"rimborso_3\") TypedFile rimborso_3,\n @Part(\"rimborso_4\") TypedFile rimborso_4,\n @Part(\"rimborso_5\") TypedFile rimborso_5,\n @Part(\"rimborso_6\") TypedFile rimborso_6,\n @Part(\"rimborso_7\") TypedFile rimborso_7,\n @Part(\"rimborso_8\") TypedFile rimborso_8,\n @Part(\"rimborso_9\") TypedFile rimborso_9,\n @Part(\"rimborso_10\") TypedFile rimborso10,\n @Part(\"countAz\") TypedString countAz,\n @Part(\"parente\") TypedString parente,\n @Part(\"tipoParente\") TypedString tipoParente,\n @Part(\"cognomeParente\") TypedString cognomeParente,\n @Part(\"nomeParente\") TypedString nomeParente,\n @Part(\"luogoNascitaParente\") TypedString luogoNascitaParente,\n @Part(\"dtNascitaParente\") TypedString dtNascitaParente,\n @Part(\"certificato_medico_pediatra_o_ospedale\") TypedFile certificato_medico_pediatra_o_ospedale,\n @Part(\"attestazione_assenza_da_lavoro\") TypedFile attestazione_assenza_da_lavoro,\n @Part(\"cfParente\") TypedString cfParente,\n @Part(\"ProvNascita\") TypedString ProvNascita,\n @Part(\"lista_dipendenti\") TypedFile lista_dipendenti,\n @Part(\"stato_di_famiglia\") TypedFile stato_di_famiglia,\n @Part(\"ciFile\") TypedFile ciFile,\n @Part(\"ciScadenza\") TypedString ciScadenza,\n @Part(\"VisuraFile\") TypedFile VisuraFile,\n @Part(\"visuraData\") TypedString visuraData,\n @Part(\"stato_di_famiglia_o_attestazione_di_paternitmaternit\") TypedFile stato_di_famiglia_o_attestazione_di_paternitmaternit,\n @Part(\"elenco_libri_di_testo_certificato_dalla_scuola\") TypedFile elenco_libri_di_testo_certificato_dalla_scuola,\n @Part(\"certificato_di_nascita\")TypedFile certificato_di_nascita,\n @Part(\"certificato_di_invalidit_grave\")TypedFile certificato_di_invalidit_grave,\n @Part(\"certificato_di_nascita_o_di_adozione_del_figlio\")TypedFile certificato_di_nascita_o_di_adozione_del_figlio,\n @Part(\"stato_di_famiglia_o_attestazione_paternitmaternit\")TypedFile stato_di_famiglia_o_attestazione_paternitmaternit,\n @Part(\"attestato_di_iscrizione_a_scuola\")TypedFile attestato_di_iscrizione_a_scuola,\n @Part(\"stato_di_faiimglia_o_attestazione_paternitmaternit\")TypedFile stato_di_faiimglia_o_attestazione_paternitmaternit,\n @Part(\"elenco_di_dipendenti_per_i_quali_si_richiede_rimborso\")TypedFile elenco_di_dipendenti_per_i_quali_si_richiede_rimborso,\n @Part(\"elenco_allievi_in_formazione\")TypedFile elenco_allievi_in_formazione,\n @Part(\"verbale_accordo_sindacale\")TypedFile verbale_accordo_sindacale,\n @Part(\"attestazione_pagamento_dellultima_quota\")TypedFile attestazione_pagamento_dellultima_quota,\n @Part(\"elenco_dei_dipendenti_che_hanno_sostenuto_la_visita_medica\")TypedFile elenco_dei_dipendenti_che_hanno_sostenuto_la_visita_medica,\n @Part(\"elenco_dipendenti_che_hanno_sostenuto_la_visita_medica\")TypedFile elenco_dipendenti_che_hanno_sostenuto_la_visita_medica,\n @Part(\"frontespizio_dvr_con_evidenza_data_certa\")TypedFile frontespizio_dvr_con_evidenza_data_certa,\n @Part(\"file_immagine_del_banner_promozionale_o_del_logo\")TypedFile file_immagine_del_banner_promozionale_o_del_logo,\n @Part(\"progetto_formativo_finanziato\")TypedFile progetto_formativo_finanziato,\n @Part(\"delibera_di_approvazione_del_progetto\")TypedFile delibera_di_approvazione_del_progetto,\n @Part(\"elenco_partecipanti_al_corso_cognome_nome_e_c_f_\")TypedFile elenco_partecipanti_al_corso_cognome_nome_e_c,\n\n @Part(\"certificazione_accreditamento_dellorganismo_di_formazione\")TypedFile certificazione_accreditamento_dellorganismo_di_formazione,\n @Part(\"cv_formatori\")TypedFile cv_formatori,\n @Part(\"calendario_attivit_formativa_con_date_ora_sede_formatori_e_contenuti\")TypedFile calendario_attivit_formativa_con_date_ora_sede_formatori_e_contenuti,\n @Part(\"allegatiDesc\")TypedString allegatiDesc,\n\n @Part(\"GIORNIASSENZA\")TypedString GIORNIASSENZA,\n @Part(\"corsoTitolo\")TypedString corsoTitolo,\n @Part(\"corsoOre\") TypedString corsoOre,\n @Part(\"RIMBORSO\")TypedString RIMBORSO,\n @Part(\"corsoImportoAllievo\") TypedString corsoImportoAllievo, // added by Mayur for the request which needs this parametr\n @Part(\"NALLIEVI\")TypedString NALLIEVI,\n @Part(\"ANNOISCRIZIONESCUOLA\") TypedString ANNOISCRIZIONESCUOLA, // added by Mayur for the request which needs this parametr\n @Part(\"NOMESCUOLA\")TypedString NOMESCUOLA, // added by Mayur for the request which needs this parametr\n @Part(\"codice_fiscale\")TypedFile codice_fiscale, // added by Sanket for the request which needs this parametr\n Callback<JsonObject> response);",
"@Override\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n PrintWriter writer = null;\n InputStream is = null;\n FileOutputStream fos = null;\n\n try {\n writer = response.getWriter();\n } catch (IOException ex) {\n log(MultiContentServlet.class.getName() + \"has thrown an exception: \" + ex.getMessage());\n }\n\n boolean isMultiPart = ServletFileUpload.isMultipartContent(request);\n\n if (isMultiPart) {\n log(\"Content-Type: \" + request.getContentType());\n // Create a factory for disk-based file items\n DiskFileItemFactory diskFileItemFactory = new DiskFileItemFactory();\n\n /*\n * Set the file size limit in bytes. This should be set as an\n * initialization parameter\n */\n diskFileItemFactory.setSizeThreshold(1024 * 1024 * 10); //10MB.\n\n\n // Create a new file upload handler\n ServletFileUpload upload = new ServletFileUpload(diskFileItemFactory);\n\n List items = null;\n\n try {\n items = upload.parseRequest(request);\n } catch (FileUploadException ex) {\n log(\"Could not parse request\", ex);\n }\n\n ListIterator li = items.listIterator();\n\n while (li.hasNext()) {\n FileItem fileItem = (FileItem) li.next();\n if (fileItem.isFormField()) {\n if (debug) {\n processFormField(fileItem);\n }\n } else {\n writer.print(processUploadedFile(fileItem));\n }\n }\n }\n\n if (\"application/octet-stream\".equals(request.getContentType())) {\n log(\"Content-Type: \" + request.getContentType());\n String filename = request.getHeader(\"X-File-Name\");\n\n try {\n is = request.getInputStream();\n fos = new FileOutputStream(new File(realPath + filename));\n IOUtils.copy(is, fos);\n response.setStatus(HttpServletResponse.SC_OK);\n writer.print(\"{success: true}\");\n } catch (FileNotFoundException ex) {\n response.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);\n writer.print(\"{success: false}\");\n log(MultiContentServlet.class.getName() + \"has thrown an exception: \" + ex.getMessage());\n } catch (IOException ex) {\n response.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);\n writer.print(\"{success: false}\");\n log(MultiContentServlet.class.getName() + \"has thrown an exception: \" + ex.getMessage());\n } finally {\n try {\n fos.close();\n is.close();\n } catch (IOException ignored) {\n }\n }\n\n writer.flush();\n writer.close();\n }\n }",
"@Test\n void buildMultiValueMap() throws IOException {\n MultiValueMap<String, Part> multiPartData = new LinkedMultiValueMap<>();\n final byte[] content0 = \"image-content\".getBytes(StandardCharsets.UTF_8);\n multiPartData.add(\n \"part\",\n createFilePart(content0, \"part\", MediaType.IMAGE_JPEG, \"img.jpg\"));\n final byte[] content1 = \"text\".getBytes(StandardCharsets.UTF_8);\n DataUrl dataUrl = new DataUrlBuilder()\n .setData(content1)\n .setCharset(StandardCharsets.UTF_8.name())\n .setEncoding(DataUrlEncoding.BASE64)\n .setMimeType(\"text/plain\")\n .build();\n multiPartData.add(\n \"part\",\n createFormFieldPart(new DataUrlSerializer().serialize(dataUrl), \"part\"));\n\n MultipartFileBuilder builder = new MultipartFileBuilderImpl();\n StepVerifier\n .create(builder.buildMultiValueMap(multiPartData, \"part\"))\n .assertNext(map -> {\n List<MultipartFile> multipartFiles = MultipartFileBuilder.getMultipartFiles(map, \"part\");\n assertFalse(multipartFiles.isEmpty());\n try {\n assertEquals(2, multipartFiles.size());\n\n MultipartFile obj0 = MultipartFileBuilder.getMultipartFile(multipartFiles, 0);\n assertNotNull(obj0);\n assertEquals(\"part\", obj0.getName());\n assertEquals(MediaType.IMAGE_JPEG_VALUE, obj0.getContentType());\n assertEquals(content0.length, (int) obj0.getSize());\n assertArrayEquals(content0, obj0.getBytes());\n\n MultipartFile obj1 = MultipartFileBuilder.getMultipartFile(multipartFiles, 1);\n assertNotNull(obj1);\n assertEquals(\"part\", obj1.getName());\n assertEquals(MediaType.TEXT_PLAIN_VALUE, obj1.getContentType());\n assertEquals(content1.length, (int) obj1.getSize());\n assertArrayEquals(content1, obj1.getBytes());\n\n } catch (IOException e) {\n throw ServiceException.internalServerError(\"Internal error\", e);\n } finally {\n multipartFiles.forEach(FileAwareMultipartFile::delete);\n }\n })\n .verifyComplete();\n }",
"public interface FileService {\n Map<String,Object> uploadPicure(MultipartFile upfile) throws IOException;\n}",
"private boolean upload(MimeMessage m, boolean bPostMsg, String changedSubj)\r\n\t{\r\n\t\ttry\r\n\t\t{\r\n\t Object msgContent = m.getContent();\r\n\t if (!(msgContent instanceof MimeMultipart))\r\n\t {\r\n\t \treject(m, \"Post/Upload command failed. Unsupported message type - you must use MimeMultipart.\");\r\n\t \treturn false;\r\n\t }\r\n\r\n\t // get the target object ID\r\n\t //subj = subj.replace(\"fw:\", \"\").replace(\"re:\", \"\").trim();\r\n\t String commandS = \"\";\r\n\r\n\t\t\t// upload/post 12345 user's optional subject\r\n\t String subj = null;\r\n\t if (changedSubj == null) {\r\n\t \tsubj = m.getSubject();\r\n\t }\r\n\t else {\r\n\t \tsubj = changedSubj;\t\t// for [EGIFN-1.1], changedSubj is now \"post EGIFN-1.1 xxx\"\r\n\t }\r\n\t String [] sa = subj.split(\" \");\r\n\t if (sa.length < 2)\r\n\t {\r\n\t \treject(m, \"Post/Upload command failed. You must specify the target task ID or project tag for the files to be uploaded to.\");\r\n\t \treturn false;\r\n\t }\r\n\r\n\t String pjAbbrev = null;\r\n\t String taskIdS = sa[1].trim();\r\n\r\n\t commandS = sa[0] + \" \" + sa[1];\t\t\t// e.g. upload 12345 or post ABC-2.1\r\n\r\n\t int taskId = 0;\t\t\t\t\t\t\t// taskId\r\n\t String taskMatchName = null;\r\n\t try {taskId = Integer.parseInt(taskIdS);}\r\n\t catch (Exception e)\r\n\t {\r\n\t\t\t\t// now support doing: post/upload UCAHP-2.1\r\n\t \t// UCAHP-2.1 or UCAHP\r\n\t \t// also support UCAHP-competition (match the first occurrence of the word \"competition\" for task name\r\n\t \tint idx = taskIdS.indexOf(\"-\");\r\n\t \tif (idx == -1) {\r\n\t \t\t// case of UCAHP only\r\n\t\t\t\t\tpjAbbrev = taskIdS;\t\t// UCAHP\r\n\t\t\t\t\ttaskIdS = \"\";\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\t// case of UCAHP-2.1 or UCAHP-competition\r\n\t\t\t\t\tpjAbbrev = taskIdS.substring(0, idx).trim();\t// UCAHP\r\n\t\t\t\t\ttaskIdS = taskIdS.substring(idx+1).trim();\t\t// assume 2.1\r\n\t\t\t\t\ttry {Float.parseFloat(taskIdS);}\r\n\t\t\t\t\tcatch (Exception ee) {\r\n\t\t\t\t\t\t// it is not 2.1, assume it is UCAHP-competition\r\n\t\t\t\t\t\ttaskMatchName = taskIdS;\r\n\t\t\t\t\t\ttaskIdS = \"\";\t\t// turn it into the case like UCAHP only and be handle below\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t }\r\n\r\n\t String optSubj = null;\r\n\t if (sa.length > 2) {\r\n\t \toptSubj = subj.substring(subj.indexOf(sa[2]));\t// remove post... or [EGIFN-1.1] etc.\r\n\t }\r\n\r\n\t // get ready to check for link file collision later\r\n\t \tboolean bReject = false;\r\n\t \tPstAbstractObject [] linkDocArr = new PstAbstractObject[0];\r\n\t\t\tint [] ids = attMgr.findId(jwu, \"Link='\" + taskIdS + \"'\");\r\n\t\t\tlinkDocArr = attMgr.get(jwu, ids);\r\n\r\n\t // authorization check\r\n\t // only project team member can upload to the project task\r\n\t int idx1;\r\n\t PstAbstractObject taskObj, pjObj=null;\r\n\t user uObj;\r\n\t String fromEmail = getPlainFrom(m);\r\n\t System.out.println(\"Processing RoboMail request from [\" + fromEmail + \"]\");\r\n\t try {uObj = (user)uMgr.get(jwu, fromEmail);}\r\n\t catch (Exception e)\r\n\t {\r\n\t\t\t\t// try to see if fromEmail is found in Email attribute\r\n\t\t\t\tint [] tempIds = uMgr.findId(jwu, \"Email='\" + fromEmail + \"'\");\r\n\t\t\t\tif (tempIds.length <= 0) return false;\r\n\t\t\t\tuObj = (user)uMgr.get(jwu, tempIds[0]);\r\n\t\t\t}\r\n\t int uid = uObj.getObjectId();\r\n\t String myName = uObj.getFullName();\r\n\r\n\t // check to see if I need to get taskId from project abbreviation\r\n\t if (taskId == 0) {\r\n\t \t// try decode post UCAHP-2.1. Using UCAHP-2.1 to find taskId\r\n\t \tpjObj = pjMgr.getProjectByAbbreviation(uObj, pjAbbrev);\r\n\t \tif (pjObj == null) {\r\n\t \t\treject(m, \"Post/Upload command failed. (\" + subj + \") is not a valid command. E.g. upload 12345\");\r\n\t \t\treturn false;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// now get task from header number. e.g. 2.1\r\n\t\t\t\tif (taskIdS != \"\") {\r\n\t\t\t\t\ttry {Float.parseFloat(taskIdS);}\r\n\t\t\t\t\tcatch (Exception e) {\r\n\t\t\t\t\t\t// now support doing: post/upload UCAHP-2.1\r\n\t\t\t\t\t\treject(m, \"Post/Upload command failed. (\" + subj + \") is not a valid command. E.g. upload UCAHP-2.1\");\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t// the case of UCAHP-2.1\r\n\t\t\t\t\t// taskIdS is 2.1 or something like that\r\n\t\t\t\t\ttaskIdS = ((project)pjObj).getTaskByHeader(uObj, taskIdS);\r\n\t\t\t\t\ttaskId = Integer.parseInt(taskIdS);\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\t// either the case of UCAHP without the task header number (same as UCAHP-other)\r\n\t\t\t\t\t// or the case of UCAHP-competition\r\n\t\t\t\t\ttask tk;\r\n\t\t\t\t\tString tkName;\r\n\t\t\t\t\tint [] tids = ((project)pjObj).getCurrentTasks(uObj);\r\n\t\t\t\t\tfor (int i=0; i<tids.length; i++) {\r\n\t\t\t\t\t\ttk = (task)tMgr.get(uObj, tids[i]);\r\n\t\t\t\t\t\ttkName = ((String)tk.getPlanTask(uObj).getAttribute(\"Name\")[0]).trim().toLowerCase();\r\n\t\t\t\t\t\tif ( (taskMatchName!=null && tkName.contains(taskMatchName)) ||\r\n\t\t\t\t\t\t\t tkName.equals(\"other\") ||\r\n\t\t\t\t\t\t\t tkName.equals(\"others\")) {\r\n\t\t\t\t\t\t\t// found task\r\n\t\t\t\t\t\t\ttaskId = tids[i];\r\n\t\t\t\t\t\t\ttaskIdS = String.valueOf(taskId);\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (taskId == 0) {\r\n\t\t\t\t\t\treject(m, \"Post/Upload command failed. (\" + subj + \") cannot find the task to complete the command.\");\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tl.info(\"Robomail translated [\" + commandS + \"] to task [\" + taskIdS + \"]\");\r\n\t\t\t}\r\n\r\n\t taskObj = tMgr.get(jwu, taskId);\r\n\t String projIdS = (String)taskObj.getAttribute(\"ProjectID\")[0];\r\n\t if (pjObj == null)\r\n\t \tpjObj = pjMgr.get(jwu, Integer.parseInt(projIdS));\r\n\t if (pjObj.getAttribute(\"Type\")[0].equals(\"Private\") && !Util2.foundAttribute(pjObj, \"TeamMembers\", uid))\r\n\t {\r\n\t \treject(m, \"Post/Upload command failed. You don't have authority to post to this task (\" + taskId + \")\");\r\n\t \treturn false;\r\n\t }\r\n\r\n\t //\r\n\t // now ready to upload the file attachments\r\n\t //\r\n\t String s;\r\n InputStream io;\r\n\t\t\tbyte [] contentBuf = new byte[8192];\r\n\t\t\tFileOutputStream fos;\r\n\t\t\tFile newF=null, dirObj;\r\n\t\t\tFileTransfer ft = new FileTransfer(uObj);\r\n\t\t\tPstAbstractObject attObj;\r\n\t\t\tString sessErrMsg = \"\";\r\n\t\t\tString fileLinkS = \"\";\r\n\t\t\tString optMsg = null;\r\n\t\t\tboolean bUploadedFile = false;\r\n\t\t\tString mailContentType = null;\t// to support multi-byte charset\r\n\t\t\tString charsetName = null;\r\n\t\t\tint ct = 0;\r\n\t\t\tint mpCount = 0;\r\n\r\n\t\t\tMimeMultipart mp = (MimeMultipart) msgContent;\r\n\t\t\ttry {mpCount = mp.getCount();}\r\n\t\t\tcatch (MessagingException e) {\r\n\t\t\t\tl.error(\"Error in upload(): failed to get multipart in mail. mp.getCount() Exception.\");\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\t\r\n if (mp!=null && mpCount>0)\r\n {\r\n \t// ensure the upload directory is there\r\n \tString dirStr = UPLOAD_PATH + \"/\" + taskIdS;\r\n \tdirObj = new File(dirStr);\r\n \tif (!dirObj.exists())\r\n \t\tdirObj.mkdirs();\t\t\t// create the C:/Repository/CR/12345 directory\r\n\r\n for (int j=0; j<mpCount; j++)\r\n {\r\n MimeBodyPart bp = (MimeBodyPart) mp.getBodyPart(j);\r\n\r\n // get the attachment content\r\n String fname = bp.getFileName();\r\n\r\n if (!bPostMsg && fname==null)\r\n \tcontinue;\r\n\r\n\t\t\t\t\tif (fname==null)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t// this is the content of the message\r\n\t\t\t\t\t\tif (bp.getContent() instanceof MimeMultipart)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tMimeMultipart tempMp = (MimeMultipart) bp.getContent();\r\n\t\t\t\t\t\t\tbp = (MimeBodyPart)tempMp.getBodyPart(0);\t\t\t\t// this is just the content\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\toptMsg = bp.getContent().toString();\r\n\t\t\t\t\t\ts = bp.getContentType();\r\n\t\t\t\t\t\tif (s != null) s = s.toLowerCase();\r\n\t\t\t\t\t\tSystem.out.println(\"Robomail handling email content type: \" + s);\r\n\t\t\t\t\t\tif (s==null || !s.contains(\"html\")) {\r\n\t\t\t\t\t\t\t// mainly have to deal with RTF email\r\n\t\t\t\t\t\t\toptMsg = optMsg.replaceAll(\"<\\\\S[^>]*>\", \"\");\r\n\t\t\t\t\t\t\toptMsg = optMsg.replaceAll(\"\\n\", \"<br>\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif (s!=null && s.contains(\"charset\")) {\r\n\t\t\t\t\t\t\tmailContentType = bp.getContentType();\t// support multibype charset\r\n\t\t\t\t\t\t\tSystem.out.println(\"encoding=\" + bp.getEncoding());\r\n\t\t\t\t\t\t\tint idx = s.indexOf(\"charset=\");\r\n\t\t\t\t\t\t\tcharsetName = mailContentType.substring(idx+8);\r\n\t\t\t\t\t\t\tSystem.out.println(\"charset=\"+charsetName);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t // reject if upload file collide with link files in this task\r\n\t\t\t\t\t// error checking: if the filename match any linked file, reject the upload\r\n\t\t\t\t\tbReject = false;\r\n\t\t\t\t\tfor (int i=0; i<linkDocArr.length; i++)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif (Util3.getOnlyFileName(linkDocArr[i]).equalsIgnoreCase(fname))\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tbReject = true;\r\n\t\t\t\t\t\t\tif (sessErrMsg.length() <= 0)\r\n\t\t\t\t\t\t\t\tsessErrMsg = \"The following file(s) are not uploaded:<br>\";\r\n\t\t\t\t\t\t\tsessErrMsg += \"- \" + fname + \": filename collides with a linked file.<br>\";\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (bReject) continue;\r\n\r\n io = bp.getInputStream();\r\n newF = new File(fname);\r\n newF.createNewFile();\r\n fos = new FileOutputStream(newF);\r\n\r\n\t\t\t\t\tint count = 0;\r\n\t\t\t\t\tint len = 0; // Check total length read\r\n\t\t\t\t\twhile((count = io.read(contentBuf)) != -1)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tfos.write(contentBuf, 0, count);\r\n\t\t\t\t\t\tfos.flush();\r\n\t\t\t\t\t\tlen += count;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tfos.close();\r\n\t\t\t\t\tio.close();\r\n\t\t\t\t\tbUploadedFile = true;\r\n\r\n\t\t\t\t\t// save the file and update task object\r\n\t\t\t\t\tattObj = ft.saveFile(taskId, projIdS, newF, null, attachment.TYPE_TASK, null, null, true);\t// versioning on\r\n\t\t\t\t\ttaskObj.appendAttribute(\"AttachmentID\", String.valueOf(attObj.getObjectId()));\r\n\t\t\t\t\ttMgr.commit(taskObj);\r\n\t\t\t\t\tct++;\r\n\r\n\t\t\t\t\t// build fileLinkS for display in the blog and email notification\r\n\t\t\t\t\tif (fileLinkS.length() > 0) fileLinkS += \"<br>\";\r\n\t\t\t\t\ts = (String)attObj.getAttribute(\"Location\")[0];\r\n\t\t\t\t\tif ((idx1 = s.lastIndexOf('/')) != -1)\r\n\t\t\t\t\t\ts = s.substring(idx1+1);\r\n\t\t\t\t\tfileLinkS += \"<li><a class='plaintext' href='\" + HOST + \"/servlet/ShowFile?attId=\" + attObj.getObjectId() + \"'><u>\"\r\n\t\t\t\t\t\t\t\t+ s + \"</u></a>\";\r\n\r\n l.info(\"RoboMail uploaded attachment: \" + (String)attObj.getAttribute(\"Location\")[0] + \" (\" + len + \" B)\");\r\n }\t// end for each attachment file\r\n if (bReject)\r\n \treject(m, \"Post/Upload command completed with warning.<br>\" + sessErrMsg);\r\n\r\n // most of the following notification/blog code is from post_updtask.jsp\r\n if (ct>0 || optMsg!=null)\r\n {\r\n \tString projName = ((project)pjObj).getDisplayName();\r\n \tids = ptMgr.findId(jwu, \"TaskID='\" + taskIdS + \"'\");\r\n \tArrays.sort(ids);\r\n \tint pTaskId = ids[ids.length-1];\r\n \t\tString taskName = (String)ptMgr.get(jwu, pTaskId).getAttribute(\"Name\")[0];\r\n \t\tif (optSubj == null)\r\n \t\t{\r\n\t \t\tif (ct > 0)\r\n\t \t\t{\r\n\t\t \t\t\tsubj = ct + \" file\";\r\n\t\t \t\t\tif (ct > 1) subj += \"s are \";\r\n\t\t \t\t\telse subj += \" is \";\r\n\t \t\t}\r\n\t \t\telse\r\n\t \t\t\tsubj = \"A blog is \";\r\n\t\t \t\tsubj += \"posted on (\" + projName + \")\";\r\n \t\t}\r\n \t\telse {\r\n \t\t\tsubj = optSubj.trim();\t// this should only be the email subject w/o post...\r\n \t\t}\r\n \t\tsubj = \"[\" + app + \" Blog] \" + subj;\r\n \t\tString nowS = df0.format(new Date());\r\n\r\n \t\tStringBuffer msgBuf = new StringBuffer(4096);\r\n \t\tif (optMsg != null)\r\n \t\t{\r\n \t\t\t\t//optMsg = \"Message from \" + myName + \":<br><div STYLE='font-size: 14px; font-family: Courier New'><br>\"\r\n \t\t\t\toptMsg = \"Message from \" + myName + \":<br><div><br>\"\r\n\t\t\t\t\t\t+ optMsg + \"</div><br />\";\r\n \t\t\tmsgBuf = msgBuf.append(optMsg);\r\n \t\t\tif (ct > 0) msgBuf.append(\"<hr>\");\r\n \t\t}\r\n \t\tif (ct > 0)\r\n \t\t{\r\n\t \t\tmsgBuf.append(myName + \" has posted \" + ct + \" new file\");\r\n\t \t\tif (ct > 1) msgBuf.append(\"s\");\r\n\t \t\tmsgBuf.append(\" on \" + nowS + \"<blockquote><table>\");\r\n\t \t\tmsgBuf.append(\"<tr><td class='plaintext' width='80'>PROJECT:</td><td class='plaintext'><a href='\" + HOST + \"/project/cr.jsp?projId=\");\r\n\t \t\tmsgBuf.append(projIdS + \"'><u>\" + projName + \"</u></a></td></tr>\");\r\n\t \t\tmsgBuf.append(\"<tr><td class='plaintext' width='80'>TASK:</td><td class='plaintext'><a href='\" + HOST + \"/project/task_update.jsp?projId=\");\r\n\t \t\tmsgBuf.append( projIdS + \"&taskId=\" + taskIdS + \"'><u>\" + taskName + \"</u></a></td></tr>\");\r\n\t \t\tmsgBuf.append(\"</table></blockquote>You may click on the following filename to open the file:<blockquote><ul>\");\r\n\t \t\tmsgBuf.append(fileLinkS);\r\n\t \t\tmsgBuf.append(\"</ul></blockquote>\");\r\n \t\t}\r\n\r\n \t\t// we must blog, but check to see if we need to send notification email\r\n \t\tObject [] userIdArr = null;\r\n \t\tString optStr = (String)pjObj.getAttribute(\"Option\")[0];\r\n \t\tif (optStr!=null && optStr.indexOf(project.OP_NOTIFY_BLOG)!=-1)\r\n \t\t{\r\n \t\t\t// need to send team notification email\r\n \t\t\tuserIdArr = pjObj.getAttribute(\"TeamMembers\");\t\t// userIdArr was null\r\n \t\t\tUtil.sendMailAsyn(uObj, fromEmail, userIdArr, null, null, subj, msgBuf.toString(),\r\n \t\t\t\t\tMAILFILE, null, null, false, mailContentType);\r\n \t\t}\r\n\r\n \t\t// @ECC071408 post blog whether sending email or not\r\n \t\tString blogIdS = Util2.postBlog(uObj, result.TYPE_TASK_BLOG, taskIdS, projIdS, subj,\r\n \t\t\t\tmsgBuf.toString(), charsetName);\r\n \t\t\r\n \t\t/////////////\r\n \t\t// send notification event\r\n \t\t// the below code is basically from post_addblog.jsp\r\n\t\t\t\t\tString lnkStr = \"<blockquote class='bq_com'>uploaded email ... <a class='listlink' \"\r\n\t\t\t\t\t\t+ \"href='../blog/blog_task.jsp?blogId=\" + blogIdS\r\n\t\t\t\t\t\t+ \"&projId=\" + projIdS + \"&taskId=\" + taskIdS\r\n\t\t\t\t\t\t+ \"'>read more & reply</a></blockquote>\";\t\t// this link is used by both original blog or comment on task\r\n\r\n\t\t\t\t\ts = (String)pjObj.getAttribute(\"TownID\")[0];\r\n\t\t\t\t\tevent evt = PrmEvent.create(uObj, PrmEvent.EVT_BLG_PROJ, null, s, null);\r\n\t\t\t\t\tString temp = \"<a href='\" + Prm.getPrmHost() + \"/project/proj_plan.jsp?projId=\"\r\n\t\t\t\t\t\t+ projIdS + \"'>\" + ((project)pjObj).getDisplayName() + \"</a>\";\r\n\t\t\t\t\tPrmEvent.setValueToVar(evt, \"var1\", temp);\r\n\t\t\t\t\tPrmEvent.setValueToVar(evt, \"var2\", lnkStr);\r\n\t\t\t\t\tif (Prm.isPRM()) {\r\n\t\t\t\t\t\t// send to project memebers\r\n\t\t\t\t\t\tids = Util2.toIntArray(pjObj.getAttribute(\"TeamMembers\"));\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\tids = uMgr.findId(uObj, \"Towns=\" + s);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tct = PrmEvent.stackEvent(uObj, ids, evt);\r\n\t\t\t \tl.info(uid + \" RoboMail triggered Event [\" + PrmEvent.EVT_BLG_PROJ + \"] to \"\r\n\t\t\t \t\t\t+ ct + \" users for project (\" + projIdS + \") blog.\");\r\n\r\n \t\t// @ECC091108 recalculate project space\r\n \t\tif (bUploadedFile) {\r\n\t \tUtilThread th = new UtilThread(UtilThread.CAL_PROJ_SPACE, uObj);\r\n\t \tth.setParam(0, projIdS);\r\n\t \tth.start();\r\n \t\t}\r\n }\r\n }\t// end if there is any attachment\r\n else\r\n {\r\n \tl.info(\"There is no attachment for this command.\");\r\n }\r\n\t\t}\r\n\t\tcatch (Exception e)\r\n\t\t{\r\n\t\t\te.printStackTrace();\r\n\t\t\treject(m, \"Post/Upload command failed in upload() operation. \" + e.toString());\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\treturn true;\r\n\t}",
"public synchronized void writeTo(OutputStream os) throws IOException, MessagingException {\n/* 428 */ parse();\n/* */ \n/* 430 */ String boundary = \"--\" + (new ContentType(this.contentType)).getParameter(\"boundary\");\n/* */ \n/* 432 */ LineOutputStream los = new LineOutputStream(os);\n/* */ \n/* */ \n/* 435 */ if (this.preamble != null) {\n/* 436 */ byte[] pb = ASCIIUtility.getBytes(this.preamble);\n/* 437 */ los.write(pb);\n/* */ \n/* 439 */ if (pb.length > 0 && pb[pb.length - 1] != 13 && pb[pb.length - 1] != 10)\n/* */ {\n/* 441 */ los.writeln();\n/* */ }\n/* */ } \n/* */ \n/* */ \n/* 446 */ if (this.parts.size() == 0) {\n/* */ \n/* */ \n/* */ \n/* 450 */ this.allowEmpty = PropUtil.getBooleanSystemProperty(\"mail.mime.multipart.allowempty\", false);\n/* */ \n/* 452 */ if (this.allowEmpty) {\n/* */ \n/* 454 */ los.writeln(boundary);\n/* 455 */ los.writeln();\n/* */ } else {\n/* 457 */ throw new MessagingException(\"Empty multipart: \" + this.contentType);\n/* */ } \n/* */ } else {\n/* 460 */ for (int i = 0; i < this.parts.size(); i++) {\n/* 461 */ los.writeln(boundary);\n/* 462 */ ((MimeBodyPart)this.parts.elementAt(i)).writeTo(os);\n/* 463 */ los.writeln();\n/* */ } \n/* */ } \n/* */ \n/* */ \n/* 468 */ los.writeln(boundary + \"--\");\n/* */ }",
"public void writePart(Part p) throws Exception {\n\n\t\tSystem.out.println(\"CONTENT-TYPE: \" + p.getContentType());\n\n\t\t// check if the content is plain text\n\t\tif (p.isMimeType(\"text/plain\")) {\n\t\t\tSystem.out.println(\"This is plain text\");\n\t\t\tSystem.out.println(\"---------------------------\");\n\t\t\tSystem.out.println((String) p.getContent());\n\t\t}\n\t\t// check if the content has attachment\n\t\telse if (p.isMimeType(\"multipart/*\")) {\n\t\t\tSystem.out.println(\"This is a Multipart\");\n\t\t\tSystem.out.println(\"---------------------------\");\n\t\t\tMultipart mp = (Multipart) p.getContent();\n\t\t\tint count = mp.getCount();\n\t\t\tfor (int i = 0; i < count; i++)\n\t\t\t\twritePart(mp.getBodyPart(i));\n\t\t}\n\t\t// check if the content is a nested message\n\t\telse if (p.isMimeType(\"message/rfc822\")) {\n\t\t\tSystem.out.println(\"This is a Nested Message\");\n\t\t\tSystem.out.println(\"---------------------------\");\n\t\t\twritePart((Part) p.getContent());\n\t\t}\n\t\t// check if the content is an inline image\n\t\telse if (p.isMimeType(\"image/jpeg\")) {\n\t\t\tSystem.out.println(\"--------> image/jpeg\");\n\t\t\tObject o = p.getContent();\n\n\t\t\tInputStream x = (InputStream) o;\n\t\t\t// Construct the required byte array\n\t\t\tSystem.out.println(\"x.length = \" + x.available());\n\t\t\tint i = 0;\n\t\t\tbyte[] bArray = new byte[x.available()];\n\n\t\t\twhile ((i = x.available()) > 0) {\n\t\t\t\tint result = (x.read(bArray));\n\t\t\t\tif (result == -1)\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\tFileOutputStream f2 = new FileOutputStream(\"/tmp/image.jpg\");\n\t\t\tf2.write(bArray);\n\t\t} else if (p.getContentType().contains(\"image/\")) {\n\t\t\tSystem.out.println(\"content type\" + p.getContentType());\n\t\t\tFile f = new File(\"image\" + new Date().getTime() + \".jpg\");\n\t\t\tDataOutputStream output = new DataOutputStream(\n\t\t\t\t\tnew BufferedOutputStream(new FileOutputStream(f)));\n\t\t\tcom.sun.mail.util.BASE64DecoderStream test = (com.sun.mail.util.BASE64DecoderStream) p\n\t\t\t\t\t.getContent();\n\t\t\tbyte[] buffer = new byte[1024];\n\t\t\tint bytesRead;\n\t\t\twhile ((bytesRead = test.read(buffer)) != -1) {\n\t\t\t\toutput.write(buffer, 0, bytesRead);\n\t\t\t}\n\t\t} else {\n\t\t\tObject o = p.getContent();\n\t\t\tif (o instanceof String) {\n\t\t\t\tSystem.out.println(\"This is a string\");\n\t\t\t\tSystem.out.println(\"---------------------------\");\n\t\t\t\tSystem.out.println((String) o);\n\t\t\t} else if (o instanceof InputStream) {\n\t\t\t\tSystem.out.println(\"This is just an input stream\");\n\t\t\t\tSystem.out.println(\"---------------------------\");\n\t\t\t\tInputStream is = (InputStream) o;\n\t\t\t\tis = (InputStream) o;\n\t\t\t\tint c;\n\t\t\t\twhile ((c = is.read()) != -1)\n\t\t\t\t\tSystem.out.write(c);\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\"This is an unknown type\");\n\t\t\t\tSystem.out.println(\"---------------------------\");\n\t\t\t\tSystem.out.println(o.toString());\n\t\t\t}\n\t\t}\n\n\t}",
"default T multiParts(Collection<? extends Part> multiParts) {\n return body(new MultiPartHttpBody(multiParts));\n }",
"@Test\n\tpublic void test_exception_if_request_not_multipart() throws Exception {\n\n\t\tmockMvc.perform(post(\"/api/v1/client/upload-csv\").header(\"userId\", 12)).andExpect(status().isBadRequest())\n\t\t\t\t.andExpect(jsonPath(\"$.message\", is(\"Current request is not a multipart request\")));\n\n\t}",
"public Representation getRepresentation() {\n\t\tFormDataSet form = new FormDataSet();\n\t\tform.setMultipart(true);\n\t\tint i = 0;\n\t\tfor (File file : getFilesToSend()) {\n\t\t\tRepresentation fileRepresentation = new FileRepresentation(file, getFileMediaType());\n\t\t\tform.getEntries().add(new FormData(MULTIPART_FILE_PART + \"_\" + i++, fileRepresentation));\n\t\t}\n\n\t\ttry {\n\t\t\tString json = new Gson().toJson(getPayload());\n\t\t\tFile tmpFile = File.createTempFile(\"params\", \".tmp\");\n\t\t\tPrintWriter fos = new PrintWriter(tmpFile);\n\t\t\tfos.print(json);\n\t\t\tfos.close();\n\t\t\tform.getEntries().add(new FormData(MULTIPART_PARAMS_PART, new FileRepresentation(tmpFile, MediaType.TEXT_ALL)));\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\treturn form;\n\t}",
"private void doUpload(Part img1, String image) throws IOException{\n OutputStream out = null;\n InputStream filecontent = null;\n try {\n out = new FileOutputStream(new File(path \n + image));\n System.out.println(path \n + image);\n filecontent = img1.getInputStream();\n\n int read = 0;\n final byte[] bytes = new byte[1024];\n\n while ((read = filecontent.read(bytes)) != -1) {\n out.write(bytes, 0, read);\n }\n \n } catch (Exception fne) {\n System.out.println(\"You either did not specify a file to upload or are \"\n + \"trying to upload a file to a protected or nonexistent \"\n + \"location.\");\n fne.printStackTrace();\n\n } finally {\n if (out != null) {\n out.close();\n }\n if (filecontent != null) {\n filecontent.close();\n }\n }\n }",
"public static String upload(String url, Map<String, String> formParameters, Vector<File> files) {\n\t\tString result = null;\n\t\tint bufferSize = 1024;\n\t\tHttpURLConnection httpURLConnection = null;\n\t\tFileInputStream fileInputStream = null;\n\t\tDataOutputStream dataOutputStream = null;\n\t\tBufferedInputStream inputStream = null;\n\t\tByteArrayOutputStream outputStream = null;\n\t\tString contentEncoding;\n\t\tbyte[] buffer = new byte[bufferSize];\n\t\tint index = 0;\n\t\tint readBytes = 0;\n\t\ttry {\n\t\t\thttpURLConnection = (HttpURLConnection) (new URL(url).openConnection());\n\t\t\thttpURLConnection.setConnectTimeout(Constant.CONNECT_TIMEOUT);\n\t\t\thttpURLConnection.setDoInput(true);\n\t\t\thttpURLConnection.setDoOutput(true);\n\t\t\thttpURLConnection.setUseCaches(false);\n\t\t\thttpURLConnection.setRequestMethod(\"POST\");\n\t\t\thttpURLConnection.setRequestProperty(\"Connection\", \"Keep-Alive\");\n\t\t\thttpURLConnection.setRequestProperty(\"Charset\", Constant.ENCODING);\n\t\t\thttpURLConnection.setRequestProperty(\"Content-Type\", new StringBuilder(\"multipart/form-data;boundary=\")\n\t\t\t\t\t.append(Constant.BOUNDARY).toString());\n\t\t\tif (cookie != null) {\n\t\t\t\thttpURLConnection.setRequestProperty(\"Cookie\", cookie);\n\t\t\t}\n\t\t\tdataOutputStream = new DataOutputStream(httpURLConnection.getOutputStream());\n\t\t\t// add form parameter\n\t\t\tif (formParameters != null) {\n\t\t\t\tfor (Map.Entry<String, String> entry : formParameters.entrySet()) {\n\t\t\t\t\tdataOutputStream.writeBytes(new StringBuilder(Constant.TWO_HYPHEN).append(Constant.BOUNDARY)\n\t\t\t\t\t\t\t.append(Constant.CR_LF).toString());\n\t\t\t\t\tdataOutputStream.writeBytes(new StringBuilder(\"Content-Disposition: form-data; name=\\\"\")\n\t\t\t\t\t\t\t.append(String.valueOf(entry.getKey())).append(\"\\\"\").append(Constant.CR_LF).toString());\n\t\t\t\t\tdataOutputStream.writeBytes(Constant.CR_LF);\n\t\t\t\t\tbuffer = String.valueOf(entry.getValue()).getBytes(Constant.ENCODING);\n\t\t\t\t\tdataOutputStream.write(buffer, 0, buffer.length);\n\t\t\t\t\tdataOutputStream.writeBytes(Constant.CR_LF);\n\t\t\t\t}\n\t\t\t}\n\t\t\t// add file\n\t\t\tfor (File file : files) {\n\t\t\t\tif (!file.exists()) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t++index;\n\t\t\t\tdataOutputStream.writeBytes(new StringBuilder(Constant.TWO_HYPHEN).append(Constant.BOUNDARY)\n\t\t\t\t\t\t.append(Constant.CR_LF).toString());\n\t\t\t\tdataOutputStream.writeBytes(new StringBuilder(\"Content-Disposition: form-data; name=\\\"file\")\n\t\t\t\t\t\t.append(index).append(\"\\\";filename=\\\"\").append(file.getName()).append(\"\\\"\")\n\t\t\t\t\t\t.append(Constant.CR_LF).toString());\n\t\t\t\tdataOutputStream.writeBytes(new StringBuilder(\"Content-Type: application/octet-stream\").append(\n\t\t\t\t\t\tConstant.CR_LF).toString());\n\t\t\t\tdataOutputStream.writeBytes(Constant.CR_LF);\n\t\t\t\tfileInputStream = new FileInputStream(file);\n\t\t\t\tbuffer = new byte[bufferSize];\n\t\t\t\twhile ((readBytes = fileInputStream.read(buffer)) > 0) {\n\t\t\t\t\tdataOutputStream.write(buffer, 0, readBytes);\n\t\t\t\t}\n\t\t\t\tdataOutputStream.writeBytes(Constant.CR_LF);\n\t\t\t\tfileInputStream.close();\n\t\t\t}\n\t\t\tdataOutputStream.writeBytes(new StringBuilder(Constant.TWO_HYPHEN).append(Constant.BOUNDARY)\n\t\t\t\t\t.append(Constant.TWO_HYPHEN).append(Constant.CR_LF).toString());\n\t\t\tdataOutputStream.flush();\n\t\t\t// get response\n\t\t\tgetCookie(httpURLConnection);\n\t\t\toutputStream = new ByteArrayOutputStream();\n\t\t\tif (httpURLConnection.getResponseCode() == HttpURLConnection.HTTP_OK) {\n\t\t\t\tinputStream = new BufferedInputStream(httpURLConnection.getInputStream());\n\t\t\t\twhile ((readBytes = inputStream.read(buffer)) > 0) {\n\t\t\t\t\toutputStream.write(buffer, 0, readBytes);\n\t\t\t\t}\n\t\t\t}\n\t\t\tcontentEncoding = httpURLConnection.getContentEncoding();\n\t\t\tif (contentEncoding == null || contentEncoding.trim().endsWith(\"\")) {\n\t\t\t\tcontentEncoding = Constant.ENCODING;\n\t\t\t}\n\t\t\tresult = new String(outputStream.toByteArray(), contentEncoding);\n\t\t}\n\t\tcatch (Exception ex) {\n\t\t\tLog.e(TAG, ex.getMessage(), ex);\n\t\t}\n\t\tfinally {\n\t\t\tif (inputStream != null) {\n\t\t\t\ttry {\n\t\t\t\t\tinputStream.close();\n\t\t\t\t}\n\t\t\t\tcatch (Exception ex) {}\n\t\t\t}\n\t\t\tif (outputStream != null) {\n\t\t\t\ttry {\n\t\t\t\t\toutputStream.close();\n\t\t\t\t}\n\t\t\t\tcatch (Exception ex) {}\n\t\t\t}\n\t\t\tif (fileInputStream != null) {\n\t\t\t\ttry {\n\t\t\t\t\tfileInputStream.close();\n\t\t\t\t}\n\t\t\t\tcatch (Exception ex) {}\n\t\t\t}\n\t\t\tif (dataOutputStream != null) {\n\t\t\t\ttry {\n\t\t\t\t\tdataOutputStream.close();\n\t\t\t\t}\n\t\t\t\tcatch (Exception ex) {}\n\t\t\t}\n\t\t\tif (httpURLConnection != null) {\n\t\t\t\ttry {\n\t\t\t\t\thttpURLConnection.disconnect();\n\t\t\t\t}\n\t\t\t\tcatch (Exception ex) {}\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}",
"protected boolean isMultipartFormData(final HttpServletRequest request)\n {\n final String MULTIPART_FORM_DATA = \"multipart/form-data\";\n return (request.getContentType() != null\n && request.getContentType().toLowerCase()\n .indexOf(MULTIPART_FORM_DATA) > -1);\n }",
"@Override\n public void setMultipartConfig(MultipartConfigElement elem) {\n }",
"@Override\n protected void prepareHttpConnection(HttpURLConnection conn) throws CommandException {\n super.prepareHttpConnection(conn);\n if (!command.dirDeploy) {\n conn.setRequestProperty(\"Content-Type\",\n \"multipart/form-data; boundary=\" + multipartBoundary);\n }\n }",
"private void addFilesInRequestEntity(MultipartEntity reqEntity, String keyForUploadFile, String filePath) {\n System.out.println(\"RestClient: FilePath \" + filePath);\n if (filePath != null && !\"\".equals(filePath)) {\n File file = new File(filePath);\n System.out.println(\"RestClient: File \" + file);\n FileBody fileBodyVideo = new FileBody(file);\n reqEntity.addPart(keyForUploadFile, fileBodyVideo);\n }\n }",
"public interface ApiService {\n String BASE_URL = \"http://robika.ir/ultitled/practice/sujeyab/test_multi_upload/\";\n\n @Multipart\n @POST(\"upload.php\")\n Call<ResponseBody> uploadMultiple(\n @Part(\"id_ferestande\") RequestBody id_ferestande,\n @Part(\"onvan\") RequestBody onvan,\n @Part(\"mozo\") RequestBody mozo,\n @Part(\"tozihat\") RequestBody tozihat,\n @Part(\"type\") RequestBody type,\n @Part(\"shenase_rahgiri\") RequestBody shenase_rahgiri,\n @Part(\"id_farakhan\") RequestBody id_farakhan,\n @Part(\"size\") RequestBody size,\n @Part List<MultipartBody.Part> files);\n}",
"public interface IUploadApi {\n\n @Multipart\n @POST(\"user/verify/v1/modifyHeadPic\")\n Observable<UploadBean> upLoad(@Header(\"userId\") java.lang.String userId, @Header(\"sessionId\") java.lang.String sessionId, @Part MultipartBody.Part part);\n}",
"protected MimeMultipart addAttachment(Multipart multipart, String filename, MimeBodyPart messageBodyPart )\r\n\t{\r\n\t\r\n\t\tDataSource source = new FileDataSource(filename);\r\n\t\tMimeMultipart multipart1 = (MimeMultipart) multipart;\r\n\t\ttry {\r\n\t\t\tmessageBodyPart.setDataHandler(new DataHandler(source));\r\n\t\t\tmessageBodyPart.setFileName(filename);\r\n\t\t\tmultipart1.addBodyPart(messageBodyPart);\r\n\t\t} catch (MessagingException e) {\r\n\t\t\tlog.error(\"Problemas con archivo adjunto \"+filename +\" \"+ e);\r\n\t\t\t\r\n\t\t}\r\n\t\treturn multipart1;\r\n\t}",
"UploadInfo advancedUpload(AdvanceFile file);",
"public interface UploadFileService {\n boolean saveFile(MultipartFile file);\n boolean readFile(String type);\n}",
"public MimeMultipart(DataSource ds) throws MessagingException {\n/* 206 */ if (ds instanceof MessageAware) {\n/* 207 */ MessageContext mc = ((MessageAware)ds).getMessageContext();\n/* 208 */ setParent(mc.getPart());\n/* */ } \n/* */ \n/* 211 */ if (ds instanceof MultipartDataSource) {\n/* */ \n/* 213 */ setMultipartDataSource((MultipartDataSource)ds);\n/* */ \n/* */ \n/* */ return;\n/* */ } \n/* */ \n/* 219 */ this.parsed = false;\n/* 220 */ this.ds = ds;\n/* 221 */ this.contentType = ds.getContentType();\n/* */ }",
"@Test\n void buildListFromFlux() throws IOException {\n final byte[] content0 = \"image-content\".getBytes(StandardCharsets.UTF_8);\n Part part1 = createFilePart(content0, \"part1\", MediaType.IMAGE_JPEG, \"img.jpg\");\n final byte[] content1 = \"text\".getBytes(StandardCharsets.UTF_8);\n DataUrl dataUrl = new DataUrlBuilder()\n .setData(content1)\n .setCharset(StandardCharsets.UTF_8.name())\n .setEncoding(DataUrlEncoding.BASE64)\n .setMimeType(\"text/plain\")\n .build();\n Part part2 = createFormFieldPart(new DataUrlSerializer().serialize(dataUrl), \"part2\");\n\n MultipartFileBuilder builder = new MultipartFileBuilderImpl();\n StepVerifier.create(builder\n .buildList(Flux.just(part1, part2)))\n .assertNext(multipartFiles -> {\n try {\n assertEquals(2, multipartFiles.size());\n\n MultipartFile obj0 = MultipartFileBuilder.getMultipartFile(multipartFiles, 0);\n assertNotNull(obj0);\n assertEquals(\"part1\", obj0.getName());\n assertEquals(MediaType.IMAGE_JPEG_VALUE, obj0.getContentType());\n assertEquals(content0.length, (int) obj0.getSize());\n assertArrayEquals(content0, obj0.getBytes());\n\n MultipartFile obj1 = MultipartFileBuilder.getMultipartFile(multipartFiles, 1);\n assertNotNull(obj1);\n assertEquals(\"part2\", obj1.getName());\n assertEquals(MediaType.TEXT_PLAIN_VALUE, obj1.getContentType());\n assertEquals(content1.length, (int) obj1.getSize());\n assertArrayEquals(content1, obj1.getBytes());\n\n } catch (IOException e) {\n throw ServiceException.internalServerError(\"Internal error\", e);\n } finally {\n multipartFiles.forEach(FileAwareMultipartFile::delete);\n }\n })\n .verifyComplete();\n }",
"protected String getMultipartField(String name) {\n\n try {\n return getMultipartField(name, null);\n } catch (UnsupportedEncodingException e) {\n return StringPool.BLANK;\n }\n }",
"public HttpRequest a(String str, String str2, String str3) throws IOException {\n StringBuilder stringBuilder = new StringBuilder();\n stringBuilder.append(\"form-data; name=\\\"\");\n stringBuilder.append(str);\n if (str2 != null) {\n stringBuilder.append(\"\\\"; filename=\\\"\");\n stringBuilder.append(str2);\n }\n stringBuilder.append('\\\"');\n f(\"Content-Disposition\", stringBuilder.toString());\n if (str3 != null) {\n f(\"Content-Type\", str3);\n }\n return f((CharSequence) \"\\r\\n\");\n }",
"private void buildPart(DataOutputStream dataOutputStream, byte[] fileData, String fileName) throws IOException {\n dataOutputStream.writeBytes(twoHyphens + boundary + lineEnd);\n dataOutputStream.writeBytes(\"Content-Disposition: form-data; name=\\\"image\\\"; filename=\\\"\" + fileName + \"\\\"\" + lineEnd);\n // dataOutputStream.writeBytes(\"Content-Type: image/jpeg\" + lineEnd);\n dataOutputStream.writeBytes(lineEnd);\n\n ByteArrayInputStream fileInputStream = new ByteArrayInputStream(fileData);\n int bytesAvailable = fileInputStream.available();\n\n int maxBufferSize = 1024 * 1024;\n int bufferSize = Math.min(bytesAvailable, maxBufferSize);\n byte[] buffer = new byte[bufferSize];\n\n // read file and write it into form...\n int bytesRead = fileInputStream.read(buffer, 0, bufferSize);\n\n while (bytesRead > 0) {\n dataOutputStream.write(buffer, 0, bufferSize);\n bytesAvailable = fileInputStream.available();\n bufferSize = Math.min(bytesAvailable, maxBufferSize);\n bytesRead = fileInputStream.read(buffer, 0, bufferSize);\n }\n dataOutputStream.writeBytes(lineEnd);\n }",
"@RequestMapping(value = \"/singleUpload\", method = RequestMethod.POST)\r\n\tpublic @ResponseBody boolean test(HttpServletRequest request,\r\n\t\t\t@RequestParam(\"file\") CommonsMultipartFile singleUploadFile) {\r\n\t\tboolean status = false;\r\n\t\tSystem.out.println(\"////// Inside there\");\r\n\r\n\t\tSystem.out.println(\"////// Inside there reh\" + singleUploadFile.getOriginalFilename());\r\n\r\n\t\tString fileName[] = singleUploadFile.getOriginalFilename().split(\"_\");\r\n\t\tString folderName = fileName[0];\r\n\t\t\r\n\t\t/*\r\n\t\t * try { ServletContext context = request.getServletContext(); String\r\n\t\t * uploadPath = context.getRealPath(\"/\" + folderName); File uploadDir =\r\n\t\t * new File(uploadPath); if (!uploadDir.exists()) { boolean success =\r\n\t\t * uploadDir.mkdir();\r\n\t\t * \r\n\t\t * if (success) { success = (new File(uploadDir + \"/\" +\r\n\t\t * subFolderName)).mkdir(); }\r\n\t\t * \r\n\t\t * } String path = uploadDir + \"/\" + subFolderName + \"/\" +fileName[2];\r\n\t\t * System.out.println(\"Path is\" + path); File serverFile = new\r\n\t\t * File(path); BufferedOutputStream stream = new\r\n\t\t * BufferedOutputStream(new FileOutputStream(serverFile));\r\n\t\t * stream.write(singleUploadFile.getBytes()); stream.close(); url =\r\n\t\t * folderName+\"_\"+subFolderName+\"_\"+fileName[2];\r\n\t\t * \r\n\t\t * }\r\n\t\t */ \r\n\t\ttry {\r\n\t\t\tServletContext context = request.getServletContext();\r\n\t\t\tString uploadPath = context.getRealPath(\"/\" + folderName);\r\n\t\t\tFile uploadDir = new File(uploadPath);\r\n\t\t\tif (!uploadDir.exists()) {\r\n\t\t\t\tboolean success = uploadDir.mkdir();\r\n\t\t\t\tif (success) {\r\n\t\t\t\t\tsuccess = (new File(uploadDir + \"/temp\")).mkdir();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tString path = uploadDir + \"/temp/\" + fileName[1];\r\n\t\t\tSystem.out.println(\"Path is\" + path);\r\n\t\t\tFile serverFile = new File(path);\r\n\t\t\tBufferedOutputStream stream = new BufferedOutputStream(new FileOutputStream(serverFile));\r\n\t\t\tstream.write(singleUploadFile.getBytes());\r\n\t\t\tstatus = true;\r\n\t\t\tstream.close();\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\r\n\t\tAdminResponseClass adminResponseClass = new AdminResponseClass();\r\n\t\tadminResponseClass.setStatus(status);\r\n\t\treturn adminResponseClass.isStatus();\r\n\t}",
"public interface UploadFileService {\r\n Map upLoadPic(MultipartFile multipartFile);\r\n}",
"protected MimeBodyPart createMimeBodyPart(InputStream is) throws MessagingException {\n/* 1217 */ return new MimeBodyPart(is);\n/* */ }",
"@Override\r\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\t\r\n\t\tSystem.out.println(\"doPost\");\r\n\t\t\r\n\t\tint yourMaxRequestSize = 100 * 1024 * 1024; // 1M\r\n\t\tint yourMaxMemorySize = 100 * 1024;\r\n\t\t\r\n\t\t// form field 의 데이터(String)\r\n\t\tString id = \"\";\r\n\t\tString title = \"\";\r\n\t\tString content = \"\";\r\n\r\n\t\t// file data\r\n\t\tString filename = \"\";\r\n\r\n\t\t\r\n\t\tString path = req.getServletContext().getRealPath(\"/upload\");\r\n\t\t\r\n\t\t\r\n\t\t// String path = \"d:\\\\tmp\";\r\n\t\t/*\r\n\t\tSystem.out.println(path);\r\n\t\tMultipartRequest mreq = new MultipartRequest(req, path);\r\n\t\tEnumeration t = mreq.getParameterNames();\r\n\t\t*/\r\n\t\t/*\r\n\t\twhile(t.hasMoreElements()) {\r\n\t\t\tString name = (String)t.nextElement();\r\n\t\t\tString conver =new String(mreq.getParameter(name).getBytes(\"8859_1\"), \"UTF-8\");\r\n\t\t\tSystem.out.println(name + \" : \" + mreq.getParameter(name) + \" : \" + conver);\r\n\t\t}\r\n\t\t*/\r\n\t\tboolean isMultipart = ServletFileUpload.isMultipartContent(req);\r\n\t\tSystem.out.println(isMultipart);\r\n\t\tif(isMultipart){\r\n\t\t\r\n\t\t// FileItem 을 생성하는 함수\r\n\t\t DiskFileItemFactory factory = new DiskFileItemFactory();\r\n\t\t \r\n\t\t factory.setSizeThreshold(yourMaxMemorySize);\r\n\t\t factory.setRepository(new File(path));\r\n\t\t \r\n\t\t ServletFileUpload upload = new ServletFileUpload(factory);\r\n\t\t upload.setSizeMax(yourMaxRequestSize);\r\n\t\t \r\n\t\t // list저장\r\n\t\t List<FileItem> items = null;\r\n\t\ttry {\r\n\t\t\titems = upload.parseRequest(req);\r\n\t\t} catch (FileUploadException 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 Iterator<FileItem> it = items.iterator();\r\n\t\t \r\n\t\t while(it.hasNext()){\r\n\t\t \r\n\t\t FileItem item = it.next();\r\n\t\t // id, title, content\r\n\t\t if(item.isFormField()){\r\n\t\t if(item.getFieldName().equals(\"id\")){\r\n\t\t \tid = item.getString(\"utf-8\");\r\n\t\t }\r\n\t\t else if(item.getFieldName().equals(\"title\")){\r\n\t\t title = item.getString(\"utf-8\");\r\n\t\t }\r\n\t\t else if(item.getFieldName().equals(\"content\")){\r\n\t\t content = item.getString(\"utf-8\");\r\n\t\t }\r\n\t\t }\r\n\t\t // file\r\n\t\t else{\r\n\t\t if(item.getFieldName().equals(\"fileload\")){\r\n\t\t filename = processUploadFile(item, path);\r\n\t\t System.out.println(\"path:\" + path);\r\n\t\t } \r\n\t\t } \r\n\t\t }\r\n\t\t \r\n\t}\r\n\t\tiReferRoomDao dao = ReferRoomDao.getInstance();\r\n\r\n\t\tboolean isS = dao.add_ReferR(new ReferRoomDto(id, title, content, filename));\r\n\t\t\r\n\t\tresp.sendRedirect(\"ReferListCtlr\");\r\n\t}",
"public MultipartEncrypted(ContentType ct) {\r\n super(\"mixed\");\r\n cType = ct;\r\n }",
"public boolean isMultipart() {\n if (!isMultipartParsed) {\n isMultipartParsed = true;\n\n isMultipart = contentType != null &&\n contentType.toLowerCase().startsWith(\n MultipartScanner.MULTIPART_CONTENT_TYPE);\n }\n\n return isMultipart;\n }",
"public MultipartPostUtility(String requestURL) {\n super(requestURL, \"POST\");\n super.addHeader(\"Connection\", \"Keep-Alive\");\n super.addHeader(\"Content-Type\", \"multipart/form-data;boundary=\" + boundary);\n }",
"private void handleMultipartMixedFirstPart(MimeMultipart masterMultipart, String firstPartValue) throws MessagingException {\n MimeBodyPart bodyPart = new MimeBodyPart();\n // the first part\n // text/plain, text/html, or multipart/alternative (text/plain + text/html)\n if (EmailBCConstants.SMTP_SEND_OPTION_HTML_ONLY.equalsIgnoreCase(this.mSendOption)) {\n this.handleTextHtml(bodyPart, firstPartValue);\n } else if (EmailBCConstants.SMTP_SEND_OPTION_XML_ONLY.equalsIgnoreCase(this.mSendOption)) {\n this.handleTextXml(bodyPart, firstPartValue);\n } else if (EmailBCConstants.SMTP_SEND_OPTION_BOTH_TEXT_AND_HTML.equalsIgnoreCase(this.mSendOption) || EmailBCConstants.SMTP_SEND_OPTION_BOTH_TEXT_AND_XML.equalsIgnoreCase(this.mSendOption)) {\n this.handleMultipartAlternative(bodyPart, firstPartValue, firstPartValue, firstPartValue);\n } else {\n // treat all others as text/plain\n this.handleTextPlain(bodyPart, firstPartValue);\n }\n masterMultipart.addBodyPart(bodyPart);\n\n return;\n }",
"private void fileUpload(HttpServletRequest request, HttpServletResponse response) {\n\t \ttry {\r\n\t\t\t\t\t/*\r\n\t\t\t\t\t * String appPath = request.getServletContext().getRealPath(\"\");\r\n\t\t\t\t\t * System.out.println(appPath); String savePath = appPath + File.separator +\r\n\t\t\t\t\t * SAVE_DIR; System.out.println(savePath);\r\n\t\t\t\t\t */\r\n\t \t\t\r\n\t \t\t//String appPath = getServletContext().getRealPath(SAVE_DIR);\r\n\t \t\tSystem.out.println(appPath);\r\n\t \t\t String savePath = appPath + \"//\" +SAVE_DIR; \r\n\t \t\t System.out.println(savePath);\r\n\t\t\t\t\t\tCollection<Part>cp= request.getParts();\r\n\t \t String fileName = up.fileUpload(cp,appPath);\r\n\t \t System.out.println(fileName);\r\n\t \t \r\n\t \t request.setAttribute(\"message\", \"The file \"+fileName+\" has been uploaded successfully!\");\r\n\t \t RequestDispatcher dispatcher = request.getRequestDispatcher(\"success.jsp\");\r\n\t \t dispatcher.forward(request, response);\r\n\t}catch(Exception ex) {\r\n System.out.println(ex);\r\n }\r\n\t }",
"public MultipartMimeContentImpl(ContentTypeHeader contentTypeHeader) {\n this.multipartMimeContentTypeHeader = contentTypeHeader;\n this.boundary = contentTypeHeader.getParameter(BOUNDARY);\n\n }",
"@Test\n void buildWithFormFieldPart() throws MalformedURLException {\n MultipartFileBuilder builder = new MultipartFileBuilderImpl(\n new File(System.getProperty(\"java.io.tmpdir\")));\n final byte[] value = UUID.randomUUID().toString().getBytes(StandardCharsets.UTF_8);\n DataUrl dataUrl = new DataUrlBuilder()\n .setData(value)\n .setCharset(StandardCharsets.UTF_8.name())\n .setEncoding(DataUrlEncoding.BASE64)\n .setMimeType(MediaType.IMAGE_PNG_VALUE)\n .build();\n StepVerifier\n .create(\n builder.build(createFormFieldPart(new DataUrlSerializer().serialize(dataUrl), \"file\")))\n .assertNext(multipartFile -> {\n try {\n assertFalse(multipartFile.isEmpty());\n assertEquals(\"file\", multipartFile.getName());\n assertEquals(MediaType.IMAGE_PNG_VALUE, multipartFile.getContentType());\n assertEquals(value.length, (int) multipartFile.getSize());\n assertArrayEquals(value, multipartFile.getBytes());\n } catch (IOException e) {\n throw ServiceException.internalServerError(\"Fatal error\", e);\n } finally {\n FileAwareMultipartFile.delete(multipartFile);\n }\n })\n .verifyComplete();\n }",
"public abstract AttachmentPart createAttachmentPart();",
"public interface FileService {\n\n Map<String,Object> uploadImage(MultipartFile upfile);\n}",
"public interface FileService {\n\n Map<String,Object> uploadImage(MultipartFile upfile);\n}",
"abstract boolean ignoreContentLength();",
"public void uploadMultipart() {\n String path = getPath(filePath);\n // Toast.makeText(getContext(),path,Toast.LENGTH_LONG).show();\n\n //Uploading code\n try {\n String uploadId = UUID.randomUUID().toString();\n\n\n //Creating a multi part request\n new MultipartUploadRequest(getContext(), uploadId, Const.CompanyProfile)\n .addFileToUpload(path, \"logo\") //Adding file\n .addParameter(\"companyname\", \"BGn\") //Adding text parameter to the request\n .addParameter(\"companyemail\", \"[email protected]\")\n .addParameter(\"description\", desc.getText().toString())\n .addParameter(\"address\", address.getText().toString())\n .setNotificationConfig(new UploadNotificationConfig())\n .setMaxRetries(2)\n .startUpload(); //Starting the upload\n // startActivity(new Intent(getContext(), HOME.class));\n Toast.makeText(getContext(), \"Thanks for Submit your Property..\", Toast.LENGTH_LONG).show();\n Fragment fragment = new EmployerHomeFragment();\n FragmentManager fragmentManager = getActivity().getSupportFragmentManager();\n FragmentTransaction fragmentTransaction = fragmentManager.beginTransaction();\n fragmentTransaction.replace(R.id.newview, fragment);\n fragmentTransaction.addToBackStack(null);\n fragmentTransaction.commit();\n\n } catch (Exception exc) {\n Toast.makeText(getContext(), exc.getMessage(), Toast.LENGTH_SHORT).show();\n }\n //finish();\n }",
"Path fileToUpload();",
"private File convertMultiPartToFile(MultipartFile file) throws IOException {\n try {\n File convFile = new File(file.getOriginalFilename());\n FileOutputStream fos = new FileOutputStream(convFile);\n fos.write(file.getBytes());\n fos.close();\n return convFile;\n } catch (FileNotFoundException e) {\n throw new FileNotFoundException(e.getMessage());\n } catch (IOException e) {\n throw new IOException(e.getMessage());\n }\n }",
"public static String uploadVideo(String fileName, String serverUri,\n String serverFolderUploads) {\n\n HttpURLConnection connection = null;\n DataOutputStream outputStream = null;\n\n String pathToOurFile = fileName;\n String urlServer = serverUri;\n String lineEnd = \"\\r\\n\";\n String twoHyphens = \"--\";\n String boundary = \"*****\";\n String charset = \"UTF-8\";\n\n int bytesRead, bytesAvailable, bufferSize;\n byte[] buffer;\n int maxBufferSize = 1 * 1024 * 1024;\n\n try {\n File f = new File(pathToOurFile);\n FileInputStream fileInputStream = new FileInputStream(f);\n\n URL url = new URL(urlServer);\n connection = (HttpURLConnection) url.openConnection();\n\n // Allow Inputs & Outputs\n connection.setDoInput(true);\n connection.setDoOutput(true);\n connection.setUseCaches(false);\n\n pathToOurFile = UUID.randomUUID().toString() + \".mp4\";\n\n // Enable POST method\n connection.setRequestMethod(\"POST\");\n connection.setRequestProperty(\"Connection\", \"Keep-Alive\");\n connection.setRequestProperty(\"Accept-Charset\", charset);\n connection.setRequestProperty(\"ENCTYPE\", \"multipart/form-data\");\n connection.setRequestProperty(\"Content-Type\",\n \"multipart/form-data;boundary=\" + boundary);\n\n outputStream = new DataOutputStream(connection.getOutputStream());\n outputStream.writeBytes(twoHyphens + boundary + lineEnd);\n outputStream.writeBytes((\"Content-Disposition: form-data; name=\\\"\"\n + serverFolderUploads + \"\\\"\" + \"; filename=\\\"\"\n + pathToOurFile + \"\\\"\" + lineEnd));\n outputStream.writeBytes(lineEnd);\n\n bytesAvailable = fileInputStream.available();\n bufferSize = Math.min(bytesAvailable, maxBufferSize);\n // buffer = new byte[bufferSize];\n buffer = null;//FileUtils.readFileToByteArray(f); @#$^@%^@$%^@$%&@$%&@$&&&&&&^%%%%%%%@##############@@@@@@@@@@@@@@\n // ******************************************************************************************************\n /*\n * byte byt[]=new byte[bufferSize]; fileInputStream.read(byt);\n *\n * bytesRead = fileInputStream.read(buffer, 0, bufferSize);\n *\n * outputStream.write(buffer, 0, bufferSize);\n */\n // Read file\n bytesRead = fileInputStream.read(buffer, 0, bufferSize);\n try {\n while (bytesRead > 0) {\n outputStream.write(buffer, 0, bytesRead);\n bytesAvailable = fileInputStream.available();\n bufferSize = Math.min(bytesAvailable, maxBufferSize);\n bytesRead = fileInputStream.read(buffer, 0, bufferSize);\n }\n } catch (Exception e) {\n Log.e(\"Uploading Video:::\", e.getMessage());\n e.printStackTrace();\n }\n\n outputStream.writeBytes(lineEnd);\n outputStream.writeBytes(twoHyphens + boundary + twoHyphens\n + lineEnd);\n\n // Responses from the server (code and message)\n int serverResponseCode = connection.getResponseCode();\n Log.e(\"serverResponseCode:::\", String.valueOf(serverResponseCode));\n String serverResponseMessage = connection.getResponseMessage();\n Log.e(\"serverResponseMessage:\", serverResponseMessage);\n fileInputStream.close();\n outputStream.flush();\n outputStream.close();\n if (serverResponseCode == 200 && serverResponseMessage.equals(\"OK\"))\n return pathToOurFile;\n else\n return \"\";\n } catch (Exception e) {\n Log.e(\"Uploading Video:::\", e.getMessage());\n e.printStackTrace();\n return \"\";\n }\n }",
"protected void doPost(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n // detecta si es una carga multimedia\n if (!ServletFileUpload.isMultipartContent(request)) {\n // detente si no\n PrintWriter writer = response.getWriter();\n writer.println (\"Error: el formulario debe contener enctype = multipart / form-data\");\n writer.flush();\n return;\n }\n\n // Configurar parámetros de carga\n DiskFileItemFactory factory = new DiskFileItemFactory();\n // Establecer los archivos temporales de umbral de memoria se generarán y almacenarán en el directorio temporal\n factory.setSizeThreshold(MEMORY_THRESHOLD);\n // Establecer el directorio de almacenamiento temporal\n factory.setRepository(new File(System.getProperty(\"java.io.tmpdir\")));\n\n ServletFileUpload upload = new ServletFileUpload(factory);\n\n // Establecer el valor máximo de carga de archivos\n upload.setFileSizeMax(MAX_FILE_SIZE);\n\n // Establecer el valor máximo de solicitud (incluidos los datos de archivo y formulario)\n upload.setSizeMax(MAX_REQUEST_SIZE);\n\n // procesamiento chino\n upload.setHeaderEncoding(\"UTF-8\");\n\n // Construye una ruta temporal para almacenar archivos cargados\n // Esta ruta es relativa al directorio actual de la aplicación\n String uploadPath = request.getServletContext().getRealPath(\"./\") + File.separator + UPLOAD_DIRECTORY;\n\n // Crear si el directorio no existe\n File uploadDir = new File(uploadPath);\n if (!uploadDir.exists()) {\n uploadDir.mkdir();\n }\n\n try {\n // Analiza el contenido solicitado para extraer los datos del archivo\n @SuppressWarnings(\"unchecked\")\n List<FileItem> formItems = upload.parseRequest(request);\n\n if (formItems != null && formItems.size() > 0) {\n // iterar sobre los datos del formulario\n for (FileItem item : formItems) {\n // manejar campos que no están en el formulario\n if (!item.isFormField()) {\n String fileName = new File(item.getName()).getName();\n String filePath = uploadPath + File.separator + fileName;\n File storeFile = new File(filePath);\n // Salida de la ruta de carga del archivo en la consola\n System.out.println(filePath);\n // guardar archivo en el disco duro\n item.write(storeFile);\n request.setAttribute (\"mensaje\", \"¡Archivo cargado correctamente!\");\n hilo = new HiloCargadeDatos(storeFile);\n hilo.start();\n }\n }\n }\n } catch (Exception ex) {\n request.setAttribute (\"mensaje\", \"Mensaje de error:\" + ex.getMessage ());\n }\n\n // Nos redirigimos a la página para que nos muestre los errores\n request.getServletContext().getRequestDispatcher(\"/subir.jsp\").forward(request, response);\n }",
"public interface UploadFileService {\n\tpublic String saveFile(MultipartFile file);\n\tResource findFileByName(String nameFile);\n\tpublic String saveFileVer(MultipartFile file, String pathToSave);\n}",
"private String uploadFile() {\n\n int serverResponseCode = 0;\n String serverResponseMessage = null;\n HttpURLConnection connection;\n DataOutputStream dataOutputStream;\n String lineEnd = \"\\r\\n\";\n String twoHyphens = \"--\";\n String boundary = \"*****\";\n\n int bytesRead, bytesAvailable, bufferSize;\n byte[] buffer;\n int maxBufferSize = 1 * 1024 * 1024;\n File selectedFile = new File(selectedFilePath);\n double len = selectedFile.length();\n\n String[] parts = selectedFilePath.split(\"/\");\n final String fileName = parts[parts.length - 1];\n\n if (!selectedFile.isFile()) {\n dialog.dismiss();\n\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n// tvFileName.setText(\"Source File Doesn't Exist: \" + selectedFilePath);\n }\n });\n return \"\";\n } else {\n try {\n String id = PreferenceStorage.getUserMasterId(getApplicationContext());\n String serviceId = ongoingService.getServiceOrderId();\n\n\n FileInputStream fileInputStream = new FileInputStream(selectedFile);\n String SERVER_URL = SkilExConstants.BUILD_URL + SkilExConstants.UPLOAD_BILL_DOCUMENT + \"\" + id + \"/\" + serviceId + \"/\";\n URI uri = new URI(SERVER_URL.replace(\" \", \"%20\"));\n String baseURL = uri.toString();\n URL url = new URL(baseURL);\n connection = (HttpURLConnection) url.openConnection();\n connection.setDoInput(true);//Allow Inputs\n connection.setDoOutput(true);//Allow Outputs\n connection.setUseCaches(false);//Don't use a cached Copy\n connection.setRequestMethod(\"POST\");\n connection.setRequestProperty(\"Connection\", \"Keep-Alive\");\n connection.setRequestProperty(\"ENCTYPE\", \"multipart/form-data\");\n connection.setRequestProperty(\"Content-Type\", \"multipart/form-data;boundary=\" + boundary);\n connection.setRequestProperty(\"bill_copy\", selectedFilePath);\n// connection.setRequestProperty(\"user_id\", id);\n// connection.setRequestProperty(\"doc_name\", title);\n// connection.setRequestProperty(\"doc_month_year\", start);\n\n //creating new dataoutputstream\n dataOutputStream = new DataOutputStream(connection.getOutputStream());\n\n //writing bytes to data outputstream\n dataOutputStream.writeBytes(twoHyphens + boundary + lineEnd);\n dataOutputStream.writeBytes(\"Content-Disposition: form-data; name=\\\"document_file\\\";filename=\\\"\"\n + selectedFilePath + \"\\\"\" + lineEnd);\n\n dataOutputStream.writeBytes(lineEnd);\n\n //returns no. of bytes present in fileInputStream\n bytesAvailable = fileInputStream.available();\n //selecting the buffer size as minimum of available bytes or 1 MB\n bufferSize = Math.min(bytesAvailable, maxBufferSize);\n //setting the buffer as byte array of size of bufferSize\n buffer = new byte[bufferSize];\n\n //reads bytes from FileInputStream(from 0th index of buffer to buffersize)\n bytesRead = fileInputStream.read(buffer, 0, bufferSize);\n\n //loop repeats till bytesRead = -1, i.e., no bytes are left to read\n while (bytesRead > 0) {\n //write the bytes read from inputstream\n dataOutputStream.write(buffer, 0, bufferSize);\n bytesAvailable = fileInputStream.available();\n bufferSize = Math.min(bytesAvailable, maxBufferSize);\n bytesRead = fileInputStream.read(buffer, 0, bufferSize);\n }\n\n dataOutputStream.writeBytes(lineEnd);\n dataOutputStream.writeBytes(twoHyphens + boundary + twoHyphens + lineEnd);\n\n serverResponseCode = connection.getResponseCode();\n serverResponseMessage = connection.getResponseMessage();\n\n Log.i(TAG, \"Server Response is: \" + serverResponseMessage + \": \" + serverResponseCode);\n\n //response code of 200 indicates the server status OK\n if (serverResponseCode == 200) {\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n// tvFileName.setText(\"File Upload completed.\\n\\n You can see the uploaded file here: \\n\\n\" + \"http://coderefer.com/extras/uploads/\"+ fileName);\n// tvFileName.setText(\"File Upload completed.\\n\\n\"+ fileName);\n }\n });\n }\n\n //closing the input and output streams\n fileInputStream.close();\n dataOutputStream.flush();\n dataOutputStream.close();\n\n\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n Toast.makeText(getApplicationContext(), \"File Not Found\", Toast.LENGTH_SHORT).show();\n }\n });\n } catch (MalformedURLException e) {\n e.printStackTrace();\n Toast.makeText(getApplicationContext(), \"URL error!\", Toast.LENGTH_SHORT).show();\n\n } catch (IOException e) {\n e.printStackTrace();\n Toast.makeText(getApplicationContext(), \"Cannot Read/Write File!\", Toast.LENGTH_SHORT).show();\n } catch (URISyntaxException e) {\n e.printStackTrace();\n }\n dialog.dismiss();\n return serverResponseMessage;\n }\n\n }",
"public MultiPartUtility(String requestURL, String charset)\n throws IOException {\n this.charset = charset;\n\n // creates a unique boundary based on time stamp\n boundary = \"===\" + System.currentTimeMillis() + \"===\";\n\n URL url = new URL(requestURL);\n httpConn = (HttpURLConnection) url.openConnection();\n httpConn.setUseCaches(false);\n httpConn.setDoOutput(true); // indicates POST method\n httpConn.setDoInput(true);\n httpConn.setRequestProperty(\"Content-Type\",\n \"multipart/form-data; boundary=\" + boundary);\n httpConn.setRequestProperty(\"User-Agent\", \"CodeJava Agent\");\n httpConn.setRequestProperty(\"Test\", \"Bonjour\");\n outputStream = httpConn.getOutputStream();\n writer = new PrintWriter(new OutputStreamWriter(outputStream, charset), true);\n }",
"@View(\"upload\")\n @Post(consumes = MediaType.MULTIPART_FORM_DATA)\n public HttpResponse upload(@Body CompletedFileUpload file) {\n Drive drive = null;\n try {\n drive = googleDriveAccessor.accessGoogleDrive();\n } catch (IOException e) {\n // Catch down below\n }\n\n if(drive == null) {\n return HttpResponse.serverError(CollectionUtils.mapOf(RSP_SERVER_ERROR_KEY,\n \"Unable to access Google Drive\"));\n }\n\n if ((file.getFilename() == null || file.getFilename().equals(\"\"))) {\n return HttpResponse.badRequest(CollectionUtils.mapOf(RSP_ERROR_KEY, \"Required file\"));\n }\n\n if(directoryKey == null) {\n return HttpResponse.serverError(CollectionUtils.mapOf(RSP_SERVER_ERROR_KEY,\n \"Directory key error, please contact admin\"));\n }\n\n JsonNode dirNode = null;\n try {\n dirNode = new ObjectMapper().readTree(this.getClass().getResourceAsStream(DIRECTORY_FILE_PATH));\n } catch (IOException e) {\n return HttpResponse.serverError(CollectionUtils.mapOf(RSP_SERVER_ERROR_KEY,\n \"Configuration error, please contact admin\"));\n }\n\n String parentId = dirNode.get(directoryKey) != null ? dirNode.get(directoryKey).asText() : null;\n if(parentId == null) {\n return HttpResponse.serverError(CollectionUtils.mapOf(RSP_SERVER_ERROR_KEY,\n \"Configuration error, please contact admin\"));\n }\n\n File fileMetadata = new File();\n fileMetadata.setName(file.getFilename());\n fileMetadata.setMimeType(file.getContentType().orElse(MediaType.APPLICATION_OCTET_STREAM_TYPE).toString());\n fileMetadata.setParents(List.of(parentId));\n\n InputStreamContent content;\n try {\n content = new InputStreamContent(fileMetadata.getMimeType(), file.getInputStream());\n } catch (IOException e) {\n return HttpResponse.badRequest(CollectionUtils.mapOf(RSP_ERROR_KEY,\n String.format(\"Unexpected error processing %s\", file.getFilename())));\n }\n\n try {\n drive.files().create(fileMetadata, content).setFields(\"parents\").execute();\n } catch (IOException e) {\n return HttpResponse.serverError(CollectionUtils.mapOf(RSP_SERVER_ERROR_KEY,\n \"Unable to upload file to Google Drive\"));\n }\n\n return HttpResponse.ok(CollectionUtils.mapOf(RSP_COMPLETE_MESSAGE_KEY,\n String.format(\"The file %s was uploaded\", file.getFilename())));\n }",
"public interface IPublishArticle {\n @POST(ServerInterface.PUBLISH_ARTICLE)\n @Multipart\n Call<String> publishArticle(@Part MultipartBody.Part pic, @Part(\"type\") String type, @Part(\"friendCircle.user.id\") String userId, @Part(\"friendCircle.topic.id\") String topicId, @Part(\"friendCircle.msg\") String content);\n}",
"public interface FastDfsService {\n String fileUpload(MultipartFile file) throws Exception;\n}",
"@Override\r\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\n String schemeName = request.getParameter(\"txtName\");\r\n String desc = request.getParameter(\"txtDesc\");\r\n String segment = request.getParameter(\"txtSegment\");\r\n String purpose = request.getParameter(\"txtPurpose\");\r\n \r\n InputStream inputStream = null; // input stream of the upload file\r\n \r\n // obtains the upload file part in this multipart request\r\n Part filePart = request.getPart(\"file\");\r\n if (filePart != null) {\r\n // prints out some information for debugging\r\n System.out.println(filePart.getName());\r\n System.out.println(filePart.getSize());\r\n System.out.println(filePart.getContentType());\r\n \r\n // obtains input stream of the upload file\r\n inputStream = filePart.getInputStream();\r\n }\r\n \r\n Connection conn = null; // connection to the database\r\n String message = null; // message will be sent back to client\r\n \r\n try {\r\n // connects to the database\r\n DriverManager.registerDriver(new com.mysql.jdbc.Driver());\r\n conn = DriverManager.getConnection(dbURL, dbUser, dbPass);\r\n \r\n // constructs SQL statement\r\n String sql = \"INSERT INTO `scheme` (`id`, `schemeName`, `desc`, `segment`, `purpose`, `file`) values (?,?,?,?,?,?)\";\r\n PreparedStatement statement = conn.prepareStatement(sql);\r\n statement.setInt(1, 0);\r\n statement.setString(2, schemeName);\r\n statement.setString(3, desc);\r\n statement.setString(4, segment);\r\n statement.setString(5, purpose);\r\n \r\n if (inputStream != null) {\r\n // fetches input stream of the upload file for the blob column\r\n statement.setBlob(6, inputStream);\r\n }\r\n \r\n // sends the statement to the database server\r\n int row = statement.executeUpdate();\r\n if (row > 0) {\r\n message = \"File uploaded and saved into database\";\r\n }\r\n } catch (SQLException ex) {\r\n message = \"ERROR: \" + ex.getMessage();\r\n ex.printStackTrace();\r\n } finally {\r\n if (conn != null) {\r\n // closes the database connection\r\n try {\r\n conn.close();\r\n } catch (SQLException ex) {\r\n ex.printStackTrace();\r\n }\r\n }\r\n // sets the message in request scope\r\n request.setAttribute(\"Message\", message);\r\n \r\n // forwards to the message page\r\n getServletContext().getRequestDispatcher(\"/Message.jsp\").forward(request, response);\r\n }\r\n \r\n }",
"public void uploadFile( String selectedFilePath) {\n\n\n int serverResponseCode = 0;\n HttpURLConnection connection;\n DataOutputStream dataOutputStream;\n String lineEnd = \"\\r\\n\";\n String twoHyphens = \"--\";\n String boundary = \"*****\";\n\n\n int bytesRead, bytesAvailable, bufferSize;\n byte[] buffer;\n int maxBufferSize = 1 * 1024 * 1024;\n File selectedFile = new File(selectedFilePath);\n\n\n String[] parts = selectedFilePath.split(\"/\");\n final String fileName = parts[parts.length - 1];\n\n if (!selectedFile.isFile()) {\n //dialog.dismiss();\n //Log.v(TAG,\"gloabal\"+selectedFilePath);\n //showToast(selectedFilePath);\n //showToast(\"file issue\");\n return;\n } else {\n try {\n\n //Log.v(TAG, \"im in try\");\n\n\n FileInputStream fileInputStream = new FileInputStream(selectedFile);\n URL url = new URL(SERVER_URL);\n connection = (HttpURLConnection) url.openConnection();\n connection.setDoInput(true);//Allow Inputs\n connection.setDoOutput(true);//Allow Outputs\n connection.setUseCaches(false);//Don't use a cached Copy\n connection.setRequestMethod(\"POST\");\n connection.setRequestProperty(\"Connection\", \"Keep-Alive\");\n connection.setRequestProperty(\"ENCTYPE\", \"multipart/form-data\");\n connection.setRequestProperty(\"Content-Type\", \"multipart/form-data;boundary=\" + boundary);\n connection.setRequestProperty(\"uploaded_file\", selectedFilePath);\n //showToast(selectedFilePath);\n //creating new dataoutputstream\n\n dataOutputStream = new DataOutputStream(connection.getOutputStream());\n //showToast(\"im after path\");\n //writing bytes to data outputstream\n dataOutputStream.writeBytes(twoHyphens + boundary + lineEnd);\n\n dataOutputStream.writeBytes(\"Content-Disposition: form-data; name=\\\"uploaded_file\\\";filename=\\\"\"\n + selectedFilePath + \"\\\"\" + lineEnd);\n\n dataOutputStream.writeBytes(lineEnd);\n\n\n //returns no. of bytes present in fileInputStream\n bytesAvailable = fileInputStream.available();\n //selecting the buffer size as minimum of available bytes or 1 MB\n bufferSize = Math.min(bytesAvailable, maxBufferSize);\n //setting the buffer as byte array of size of bufferSize\n buffer = new byte[bufferSize];\n\n //reads bytes from FileInputStream(from 0th index of buffer to buffersize)\n bytesRead = fileInputStream.read(buffer, 0, bufferSize);\n\n //Log.v(TAG, \"before while\");\n\n\n //loop repeats till bytesRead = -1, i.e., no bytes are left to read\n while (bytesRead > 0) {\n //write the bytes read from inputstream\n dataOutputStream.write(buffer, 0, bufferSize);\n bytesAvailable = fileInputStream.available();\n bufferSize = Math.min(bytesAvailable, maxBufferSize);\n bytesRead = fileInputStream.read(buffer, 0, bufferSize);\n }\n //Log.v(TAG, \"after while\");\n\n dataOutputStream.writeBytes(lineEnd);\n dataOutputStream.writeBytes(twoHyphens + boundary + twoHyphens + lineEnd);\n\n serverResponseCode = connection.getResponseCode();\n String serverResponseMessage = connection.getResponseMessage();\n\n Log.i(TAG, \"Server Response is: \" + serverResponseMessage + \": \" + serverResponseCode);\n\n //response code of 200 indicates the server status OK\n if (serverResponseCode == 200) {\n Log.v(TAG, \"file upload complete\");\n }\n\n Log.v(TAG, \"now close\");\n\n //closing the input and output streams\n fileInputStream.close();\n dataOutputStream.flush();\n dataOutputStream.close();\n\n Log.v(TAG, \"CLosed \");\n\n\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n //showToast(\"FIle not found\");\n }\n });\n } catch (MalformedURLException e) {\n e.printStackTrace();\n //showToast(\"URL error\");\n\n } catch (IOException e) {\n e.printStackTrace();\n //showToast(\"Cannot read/Write file\");\n }\n dialog.dismiss();\n //postData(\"langitudes----\",\"longitues----\");\n\n //return serverResponseCode;\n }\n\n }",
"protected void doPost(HttpServletRequest request,\r\n HttpServletResponse response) throws ServletException, IOException {\n \trequest.setCharacterEncoding(\"UTF-8\");\r\n String name = request.getParameter(\"name\");\r\n float price=Float.parseFloat(request.getParameter(\"price\"));\r\n String description=request.getParameter(\"description\");\r\n System.out.println(\"name\"+name);\r\n System.out.println(\"price\"+price);\r\n System.out.println(\"description:\"+description);\r\n InputStream inputStream = null; // input stream of the upload file\r\n \r\n // obtains the upload file part in this multipart request\r\n Part filePart = request.getPart(\"photo\");\r\n if (filePart != null) {\r\n \tItem item=new Item();\r\n // prints out some information for debugging\r\n System.out.println(filePart.getSize());//得到文件大小\r\n System.out.println(filePart.getContentType());//得到文件类型(这里上传的是图片)\r\n System.out.println(filePart.getSubmittedFileName());//得到文件名字\r\n String filename=filePart.getSubmittedFileName();\r\n // obtains input stream of the upload file\r\n inputStream = filePart.getInputStream();\r\n OutputStream outputStream = null;\r\n try{\r\n \trequest.setAttribute(\"Message\", \"成功\");\r\n \t//上传图片的保存路径\r\n String filepath=\"E:\\\\workspace\\\\SchoolTrade\\\\WebContent\\\\uploaddata\\\\\"+filename;\r\n File file=new File(filepath);\r\n \toutputStream=new FileOutputStream(file);\r\n byte[] bytes = new byte[1024];\r\n int num = 0;\r\n while ((num = inputStream.read(bytes)) != -1) {\r\n outputStream.write(bytes, 0, num);\r\n outputStream.flush();\r\n }\r\n HttpSession session=request.getSession();\r\n User user=(User)session.getAttribute(\"user\");\r\n item.setOwnerName(user.getName());\r\n item.setPic(filePart.getSubmittedFileName());\r\n item.setName(name);\r\n item.setDescription(description);\r\n item.setPrice(price);\r\n \r\n }catch (Exception e) {\r\n\t\t\t\t// TODO: handle exception\r\n \te.printStackTrace();\r\n \trequest.setAttribute(\"Message\", \"失败\");\r\n \tSystem.out.println(\"复制文件出现错误\");\r\n \tinputStream=null;\r\n \toutputStream=null;\r\n getServletContext().getRequestDispatcher(\"/failMessage.jsp\").forward(request, response);\r\n\t\t\t}finally {\r\n\t\t\t\tif(inputStream!=null){\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tinputStream.close();\r\n\t\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\t\t// TODO: handle exception\r\n\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tif(outputStream!=null){\r\n\t\t\t\t\ttry{\r\n\t\t\t\t\t\toutputStream.close();\r\n\t\t\t\t\t}catch (Exception e) {\r\n\t\t\t\t\t\t// TODO: handle exception\r\n\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tItemService itemService=new ItemServiceImplement();\r\n\t\t\t\titemService.uploadItem(item);\r\n\t\t\t\t\r\n\t\t\t}\r\n\r\n }\r\n getServletContext().getRequestDispatcher(\"/successMessage.jsp\").forward(request, response);\r\n }",
"public void addFilePart(String fieldName, File uploadFile)\n throws IOException {\n String fileName = uploadFile.getName();\n writer.append(\"--\" + boundary).append(LINE_FEED);\n writer.append(\n \"Content-Disposition: form-data; name=\\\"\" + fieldName\n + \"\\\"; filename=\\\"\" + fileName + \"\\\"\")\n .append(LINE_FEED);\n writer.append(\n \"Content-Type: \"\n + URLConnection.guessContentTypeFromName(fileName))\n .append(LINE_FEED);\n writer.append(\"Content-Transfer-Encoding: binary\").append(LINE_FEED);\n writer.append(LINE_FEED);\n writer.flush();\n\n FileInputStream inputStream = new FileInputStream(uploadFile);\n byte[] buffer = new byte[4096];\n int bytesRead = -1;\n while ((bytesRead = inputStream.read(buffer)) != -1) {\n outputStream.write(buffer, 0, bytesRead);\n }\n outputStream.flush();\n inputStream.close();\n\n writer.append(LINE_FEED);\n writer.flush();\n }",
"@Test(priority = 4)\n\tpublic void inValideFileType() throws JsonProcessingException {\n\n\t\ttest.log(LogStatus.INFO, \"My test is starting.....\");\n\t\tResponse resp=given()\n\t .contentType(\"multipart/form-data\")\n\t .multiPart(\"product_line\",\"testing\")\n\t .multiPart(\"file\", new File(\"./src/test/resources/statuscode.txt\"))\n\t .post(APIPath.apiPath.POST_VALID_PATH);\n\n\t\tresp.then().body(\"message\",equalTo(\"Invalide File Type.\"));\n\t\ttest.log(LogStatus.PASS, \"Invalide File Type\");\n\t\tAssert.assertEquals(resp.getStatusCode(),400);\n\t\ttest.log(LogStatus.PASS, \"Successfully validated status code expected 400 and Actual status code is :: \" + resp.getStatusCode());\n\n\t\ttest.log(LogStatus.INFO, \"My Test Has been ended \");\n\n\t}",
"protected static HashMap<String, String> multipartRequestToHashMap(Request req)\r\n {\n HashMap<String, String> params = new HashMap<>();\r\n try {\r\n for (Part part : req.raw().getParts()) {\r\n InputStream input = part.getInputStream();\r\n Scanner s = new Scanner(input, \"ISO-8859-1\").useDelimiter(\"\\\\A\");\r\n if (s.hasNext()) {\r\n params.put(part.getName(), s.next());\r\n }\r\n input.close();\r\n }\r\n }\r\n catch (Exception e) {return params;}\r\n return params;\r\n }"
] |
[
"0.74838966",
"0.7357458",
"0.6928009",
"0.68318826",
"0.6754781",
"0.6579704",
"0.648612",
"0.6464326",
"0.6426494",
"0.642022",
"0.6388248",
"0.63131857",
"0.62985677",
"0.6297212",
"0.6205985",
"0.6115935",
"0.611421",
"0.6101262",
"0.6087497",
"0.6087427",
"0.6059258",
"0.6058178",
"0.6034366",
"0.6003183",
"0.59978205",
"0.5995719",
"0.5946904",
"0.59423643",
"0.5937619",
"0.5937102",
"0.5924489",
"0.59100765",
"0.59003013",
"0.5875258",
"0.5864213",
"0.58639014",
"0.5862644",
"0.5856698",
"0.58545226",
"0.58438694",
"0.5833379",
"0.58250153",
"0.582184",
"0.5808308",
"0.5796006",
"0.5792995",
"0.5791445",
"0.57869005",
"0.5779123",
"0.5766645",
"0.57585055",
"0.57484293",
"0.57445776",
"0.5742169",
"0.57377446",
"0.5732652",
"0.572312",
"0.5722713",
"0.5718154",
"0.57136893",
"0.5709202",
"0.57075983",
"0.5704274",
"0.56921077",
"0.5691461",
"0.5673642",
"0.5673179",
"0.5668798",
"0.56609434",
"0.56573164",
"0.5647328",
"0.564326",
"0.56384045",
"0.563626",
"0.5625296",
"0.5624569",
"0.5624117",
"0.5623524",
"0.5614106",
"0.56020874",
"0.55991",
"0.55991",
"0.559842",
"0.55877227",
"0.55870557",
"0.5575935",
"0.55749935",
"0.55643326",
"0.5559646",
"0.555831",
"0.55554277",
"0.5554756",
"0.5538826",
"0.55318785",
"0.5526793",
"0.55254453",
"0.5524005",
"0.5518893",
"0.5518261",
"0.55164105"
] |
0.6123232
|
15
|
reads file generates alerts if something goes wrong
|
public void readFile(File file){
try{
scan = new Scanner(file);
while(scan.hasNextLine()){
String line = scan.nextLine();
if(line.startsWith("//")){
continue;
}
process(line);
}
}catch(IOException e){
Alert alert = new Alert(AlertType.INFORMATION);
alert.setTitle("");
alert.setHeaderText(null);
alert.setContentText("Oops the input was not read properly");
alert.showAndWait();
e.printStackTrace();
}catch(NullPointerException e){
Alert alert = new Alert(AlertType.INFORMATION);
alert.setTitle("");
alert.setHeaderText(null);
alert.setContentText("Oops the input was not read properly");
alert.showAndWait();
e.printStackTrace();
}
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"private void checkFile() {\n \ttry {\n \t\tdata = new BufferedReader(\n \t\t\t\t new FileReader(textFile));\n \t\t\n \t}\n \tcatch(FileNotFoundException e)\n \t{\n \t\tSystem.out.println(\"The mentioned File is not found.\");\n System.out.println(\"\");\n\t\t\tSystem.exit(1);\n\t\t} catch (Exception ex) {\n\t\t\tSystem.out.println(\"The following error occured while reading the file.\");\n\t\t\tex.printStackTrace();\n\t\t\tSystem.exit(2);\n\t\t}\n }",
"public void readTheFile() {\n \t\terrorMap.clear();\n \n \t\tBufferedReader br;\n \t\tString nextLine;\n \t\tString[] header = null;\n \t\tArrayList<String> lines = new ArrayList<String>();\n \t\ttry {\n \t\t\tlogger.debug(\"{} loading file: {} \", getName(), RobotNX100Controller.class.getResource(\"motoman_error_code.txt\").getPath());\n \n \t\t\tbr = new BufferedReader(new FileReader(RobotNX100Controller.class.getResource(\"motoman_error_code.txt\").getPath()));\n \t\t\twhile (((nextLine = br.readLine()) != null) && (nextLine.length() > 0)) {\n \t\t\t\tif (nextLine.startsWith(\"Code\")) {\n \t\t\t\t\theader = nextLine.split(\"[, \\t][, \\t]*\");\n \t\t\t\t} else if (!nextLine.startsWith(\"#\"))\n \t\t\t\t\tlines.add(nextLine);\n \t\t\t}\n \t\t\tbr.close();\n \t\t} catch (FileNotFoundException fnfe) {\n \t\t\t// we do not want to interrupt processing because error map file not set.\n \t\t\tlogger.warn(\"Can not find the Error Message file {} for {}. Only Error code will be reported.\",\n \t\t\t\t\tgetErrorCodeFilename(), getName());\n \t\t\tlogger.warn(\"caused by \" + fnfe.getMessage(), fnfe);\n \t\t\tbr = null;\n \t\t\treturn;\n \t\t} catch (IOException ioe) {\n \t\t\t// we do not want to interrupt processing because error map file not set.\n \t\t\tlogger.warn(\"Can not find the Error Message file {} for {}. Only Error code will be reported.\",\n \t\t\t\t\tgetErrorCodeFilename(), getName());\n \t\t\tlogger.error(\"caused by \" + ioe.getMessage(), ioe);\n \t\t\tbr = null;\n \t\t\treturn;\n \t\t}\n \n \t\tnumberOfRows = lines.size();\n \t\tlogger.debug(\"the file contained \" + numberOfRows + \" lines\");\n \t\tint nColumns = new StringTokenizer(lines.get(0), \"\\t\").countTokens();\n \t\tlogger.debug(\"each line should contain \" + nColumns + \" numbers\");\n \t\tkeys = new ArrayList<String>();\n \t\tif (header != null) {\n \t\t\tfor (int i = 1; i < nColumns; i++) {\n \t\t\t\terrorMap.put(header[0], header[i]);\n \t\t\t}\n \t\t\tkeys.add(header[0]);\n \t\t}\n \n \t\tfor (int i = 0; i < numberOfRows; i++) {\n \t\t\tnextLine = lines.get(i);\n \t\t\tString[] thisLine = nextLine.split(\"[\\t][\\t]*\");\n \t\t\tfor (int j = 0; j < thisLine.length; j++)\n \t\t\t\terrorMap.put(thisLine[0], thisLine[j]);\n \t\t\tkeys.add(thisLine[0]);\n \t\t}\n \t}",
"@Test\n public void readFile() throws Exception {\n ReadConfig conf = new ReadConfig();\n try {\n conf.readFile();\n } catch (Exception e) {\n assertTrue(e.getMessage().equals(\"FileName is missing.\") || e.getMessage().equals(\"FileLocation is missing.\") || e.getMessage().equals(\"Config file not found.\") || e.getMessage().equals(\"JSON file not well formatted.\"));\n }\n\n }",
"public void readFromFile() {\n\n\t}",
"@Override\n public FileVisitResult visitFileFailed(Path file, IOException exc) throws IOException {\n LOG.warn(\"An IOException occurred while reading a file on path {} with message: {}\", file, exc.getMessage());\n LOG.debug(\"An IOException occurred while reading a file on path {} with message: {}\", file,\n LOG.isDebugEnabled() ? exc : null);\n return FileVisitResult.CONTINUE;\n }",
"private void testReadFile() {\n System.out.println(\"------ TESTING : readFile(String filename) ------\");\n try{\n if(iTestFileList.readFile(sFile)){\n //throw exception if the values are not copied correctly\n if(iTestFileList.get(0) != 42175){\n throw new RuntimeException(\"FAILED -> readFile(String filename) not working correctly\");\n }\n if(iTestFileList.get(5) != 45545){\n throw new RuntimeException(\"FAILED -> readFile(String filename) not working correctly\");\n }\n if(iTestFileList.get(10) != 86908) {\n throw new RuntimeException(\"FAILED -> readFile(String filename) not working correctly\");\n }\n }\n else{\n throw new RuntimeException(\"FAILED -> readFile(String filename) not working correctly\");\n }\n }catch(RuntimeException e){\n System.out.print(e.getMessage());\n }\n System.out.print(\"\\n\");\n }",
"public abstract void readFromFile( ) throws Exception;",
"public static void readMyFile() throws IOException {\n\n List<String> allLines = Files.readAllLines(Paths.get(\"src/ErfansInputFile\"));\n System.out.println(\"allLines = \" + allLines);\n System.out.println(\"Reading the file in my computer. \");\n\n throw new FileNotFoundException(\"Kaboom, file is not found!!!\");\n }",
"public static void printReadFileIdentificationError() {\n System.out.println(Message.READ_FILE_IDENTIFICATION_ERROR);\n }",
"public void readFile(File f) {\r\n if(f.getName().endsWith(\".txt\")) {\r\n if(f.getName().equals(\"USQRecorders.txt\")) {\r\n readAndTxt(f); \r\n lab_android.setText(\"Android read in\");\r\n }else if(f.getName().equals(\"mdl_log.txt\")) {\r\n readModLog(f);\r\n lab_moodle.setText(\"Moodle read in\");\r\n }else if(f.getName().equals(\"mdl_chat_messages.txt\") || f.getName().equals(\"mdl_forum_posts.txt\") || f.getName().equals(\"mdl_quiz_attempts.txt\")) {\r\n \treadtabs(f);\r\n }else{\r\n //illegal file name\r\n //JOptionPane.showMessageDialog(null, \"only accept .txt file named 'USQRecorders.txt','mdl_log.txt','mdl_chat_messages.txt','mdl_forum_posts.txt' and 'mdl_quiz_attempts.txt'\", \"System Message\", JOptionPane.ERROR_MESSAGE);\r\n }\r\n if(fromzip == false) {\r\n copyOldtxt(f);\r\n }\r\n } else if(f.getName().endsWith(\".zip\")) {\r\n if(f.getName().endsWith(\".zip\"))fromzip=true;\r\n readZip(f);\r\n copyOldtxt(f);\r\n //delete original\r\n File del = new File(workplace + \"/temp/USQ_IMAGE\");\r\n File dels[] = del.listFiles();\r\n for(int i=0 ; i<dels.length ; i++){\r\n dels[i].delete();\r\n }\r\n File tmp = new File(workplace + \"/temp/USQ_IMAGE/\");\r\n tmp.delete();\r\n tmp = new File(workplace + \"/temp\");\r\n tmp.delete();\r\n lab_android.setText(\"Android read in\");\r\n } else if(f.getName().endsWith(\".png\")) {\r\n readImage(f);\r\n }\r\n }",
"public void readFile() throws Exception, FileNotFoundException, NumberFormatException, MalformedParameterizedTypeException {\n // my user or my file might be kind of crazy! -> will check for these exceptions!\n }",
"public void checkFile() {\n\t\tFile file = new File(\"src/Project11Problem1Alternative/names.txt\");\n\t\tSystem.out.println(file.exists() ? \"Exists!\" : \"Doesn't exist!\");\n\t\tSystem.out.println(file.canRead() ? \"Can read!\" : \"Can't read!\");\n\t\tSystem.out.println(file.canWrite() ? \"Can write!\" : \"Can't write!\");\n\t\tSystem.out.println(\"Name: \" + file.getName());\n\t\tSystem.out.println(\"Path: \" + file.getPath());\n\t\tSystem.out.println(\"Size: \" + file.length() + \" bytes\");\n\t}",
"String loadFromFile () throws Exception {\n\n Reader reader = new Reader(new FileReader(file));\n String line;\n\n// reads all lines of the file\n while ((line = reader.readLine()) != null) {\n\n// depending on the object tag [element], it reads relevant parameters and creates the Element\n if (line.contains(\"[timeline]\"))\n timelines.add(new Timeline(reader.getStringArgument()));\n\n else if (line.contains(\"[event]\")) {\n String timelineName = reader.getStringArgument();\n for (Timeline timeline : timelines) {\n if (timelineName.equals(timeline.name)) {\n timeline.addEvent(\n reader.getStringArgument(),\n reader.getDateArgument(),\n reader.getDateArgument(),\n reader.getIntArgument() != 0,\n reader.getNotesArgument());\n break;\n }\n }\n }\n }\n reader.close();\n return (\"Data loaded successfully\");\n }",
"public void fileRead(String filename) throws IOException;",
"public void readFile()\r\n\t{\r\n\t\t\r\n\t\ttry\r\n\t\t{\r\n\t\t\tx = new Scanner(new File(\"clean vipr measles results.txt\"));\r\n\t\t\t\r\n\t\t\twhile (x.hasNext())\r\n\t\t\t{\r\n\t\t\t\tString a = x.next();\r\n\t\t\t\tString b = x.next();\r\n\t\t\t\tString c = x.next();\r\n\t\t\t\t\r\n\t\t\t\tSystem.out.printf(\"%s %s %s \\n\\n\", a,b,c);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tx.close();\r\n\t\t}\r\n\t\tcatch (Exception e)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"file not found\");\r\n\t\t}\r\n\t\r\n\t}",
"private void loadAlarms() {\n\n try {\n if (!Files.exists(Paths.get(alarmsFile))) {\n\n System.out.println(\"Alarms file not found attemping to create default\");\n Files.createFile(Paths.get(alarmsFile));\n\n } else {\n List<String> fileLines = Files.readAllLines(Paths.get(alarmsFile));\n\n for (int i = 0; i < fileLines.size() - 1; i += 4) {\n int hour = Integer.parseInt(fileLines.get(i));\n int minute = Integer.parseInt(fileLines.get(i + 1));\n int period = Integer.parseInt(fileLines.get(i + 2));\n String name = fileLines.get(i + 3);\n\n System.out.println(\"Adding new alarm from file. \" + name);\n addEntry(hour, minute, period, name);\n }\n }\n } catch (UnsupportedEncodingException ex) {\n Logger.getLogger(AlarmsEditPanel.class.getName()).log(Level.SEVERE, null, ex);\n } catch (FileNotFoundException ex) {\n Logger.getLogger(AlarmsEditPanel.class.getName()).log(Level.SEVERE, null, ex);\n } catch (IOException ex) {\n Logger.getLogger(AlarmsEditPanel.class.getName()).log(Level.SEVERE, null, ex);\n }\n }",
"public void read_file(String filename)\n {\n out.println(\"READ\");\n out.println(filename);\n try\n {\n String content = null;\n content = in.readLine();\n System.out.println(\"READ content : \"+content);\n }\n catch (IOException e) \n {\n \tSystem.out.println(\"Read failed\");\n \tSystem.exit(-1);\n }\n }",
"@Override\n public void readDataFromTxtFile()\n throws NumberFormatException, DepartmentCreationException, EmployeeCreationException {\n\n }",
"@Override\n\tpublic FileVisitResult visitFileFailed(Path file, IOException exc) throws IOException {\n\t\tSystem.out.println(\"Error Accessing File\"+file.toAbsolutePath());\n\t\tSystem.out.println(exc.getLocalizedMessage());\n\t\t\n\t\t\n\t\t\n\t\treturn super.visitFileFailed(file, exc);\n\t}",
"public void corruptedFileErrorMessage() {\n System.out.println(\"The file (\" + INVENTORY_FILE_PATH + \") is corrupted!\\n\"\n + \"Please exit the program and delete the corrupted file before trying to access Inventory Menu!\");\n }",
"public static void reading(String fileName)\n {\n\n }",
"private void readFile() {\n try (BufferedReader br = new BufferedReader(new FileReader(\"../CS2820/src/production/StartingInventory.txt\"))) {\n String line = br.readLine();\n while (line != null) {\n line = br.readLine();\n this.items.add(line);\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"boolean getFileErr();",
"public static boolean[] readAlerts(String path) {\n boolean[] stockArray = new boolean[5];\n\n try {\n File file = new File(sourcePath + path);\n BufferedReader br = new BufferedReader(new FileReader(file));\n\n String line;\n\n while ((line = br.readLine()) != null) {\n int tempLine = Integer.parseInt(line.trim());\n\n switch (tempLine) {\n case 5:\n stockArray[0] = true;\n break;\n case 10:\n stockArray[1] = true;\n break;\n case 20:\n stockArray[2] = true;\n break;\n case 50:\n stockArray[3] = true;\n break;\n case 100:\n stockArray[4] = true;\n break;\n default:\n break;\n }\n }\n\n if (file.delete())\n if (file.createNewFile())\n System.out.println(\"Successful file creation!\");\n else\n System.out.println(\"File already exists!\");\n else\n System.out.println(\"File not deleted!\");\n\n br.close();\n } catch (IOException e) {\n System.out.print(\"File not found!\");\n e.printStackTrace();\n }\n\n return stockArray;\n }",
"public void readFile();",
"public void parseInputFile(String filename) throws BadInputFormatException {\r\n\t\tString line;\r\n\r\n\t\ttry {\r\n\t\t\tInputStream fis = new FileInputStream(filename);\r\n\t\t\tInputStreamReader isr = new InputStreamReader(fis);\r\n\t\t\tBufferedReader br = new BufferedReader(isr);\r\n\r\n\t\t\twhile ((line = br.readLine()) != null) {\r\n\t\t\t\tparseMessage(line);\r\n\t\t\t}\r\n\t\t\tbr.close();\r\n\t\t} catch (FileNotFoundException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}",
"protected abstract void readFile();",
"private static void readFile() throws IOException\r\n\t{\r\n\t\tString s1;\r\n\t\tFileReader fr = new FileReader(filename);\r\n\t\tBufferedReader br = new BufferedReader(fr);\r\n\t\t\r\n\t\tSystem.out.println(\"\\ndbs3.txt File\");\r\n\t\twhile ((s1 = br.readLine())!=null)\r\n\t\t{\r\n\t\t\tSystem.out.println(s1);\r\n\t\t}//end while loop to read files\r\n\t\t\r\n\t\tbr.close();//close the buffered reader\r\n\t}",
"public void myMethod() throws FileNotFoundException {\n\t\ttry {\n\t\tsoccer = new FileInputStream(\"soccer.txt\");\n\t\t} catch (FileNotFoundException f) {//checked exception handled here\n//\t\t\tf.printStackTrace();\n\t\tSystem.out.println(\"file not found\");//throw fnfe; //this needs to be handled or declared\n\t\t}\n\t\t}",
"@Test\n public void readEmptyFile() throws Exception {\n populateInputFile(0, 0, 0);\n mReadHandlerNoException.onNext(buildReadRequest(0, 0));\n checkErrorCode(mResponseObserver, INVALID_ARGUMENT);\n }",
"@Test\n\tpublic void testReadTxtFile() throws FileNotFoundException {\n\t\tFileParser fp = new FileParser();\n\t\tArrayList<String> parsedLines = fp.readTxtFile(\"test.txt\");\n\t\tassertEquals(\"This is a test file\", parsedLines.get(0));\n\t\tassertEquals(\"University of Virginia\", parsedLines.get(1));\n\n\t\tArrayList<String> parsedWords = fp.readTxtFile(\"test1.txt\");\n\t\tassertEquals(\"test\", parsedWords.get(0));\n\t\tassertEquals(\"file\", parsedWords.get(1));\n\t}",
"void readFaultyRecipientsTest() {\n Assertions.assertThrows(RuntimeException.class,\n () -> Reader.readRecipients(Paths.get(\"src/test/resources/faulty_recipients.txt\")));\n }",
"protected abstract E readFile() throws Exception;",
"private void ReadTextFile(String FilePath) {\n\t\t\n\t\t\n\t}",
"public static void testCases(File file){\n\t\tif (file.toString().toUpperCase().contains(\"FAIL\")){\n\t\t\tboolean failed = false;\n\t\t\ttry {\n\t\t\t\tparse(new ANTLRReaderStream(new FileReader(file)));\n\t\t\t} catch (IllegalArgumentException e) {\n\t\t\t\t//System.out.println(\"PASS\");\n\t\t\t\tfailed = true;\n\t\t\t} catch (ContextualRestraintException e){\n\t\t\t\tfailed = true;\n\t\t\t} catch (FileNotFoundException e) {\n\t\t\t} catch (RecognitionException e) {\n\t\t\t} catch (IOException e) {\n\t\t\t}\n\t\t\tif (failed){\n\t\t\t\tSystem.out.println(\"FILE \" + file + \" OK\");\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\"FILE \" + file + \" ERROR\");\n\t\t\t}\n\t\t}\n\t\n\t\tif (file.toString().toUpperCase().contains(\"PASS\")){\n\t\t\tboolean failed = false;\n\t\t\ttry {\n\t\t\t\tparse(new ANTLRReaderStream(new FileReader(file)));\n\t\t\t} catch (Exception e) {\n\t\t\t\tfailed = true;\n\t\t\t}\n\t\t\tif (failed){\n\t\t\t\tSystem.out.println(\"FILE \" + file + \" ERROR\");\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\"FILE \" + file + \" OK\");\n\t\t\t}\n\t\t}\n\t}",
"private void fileRead(String path)\n\t{\n\t\ttry\n\t\t{\n\t\t\t// create file\n\t\t\tFile file = new File(path);\n\t\t\tFileInputStream fileStream = new FileInputStream(file);\n\t\t\t\n\t\t\t// data read\n\t\t\tthis.dataContent = new byte[(int)file.length()];\n\t\t\tint ret = fileStream.read(this.dataContent, 0, (int)file.length());\n\t\t}\n\t\tcatch(FileNotFoundException e)\n\t\t{\n\t\t\tSystem.out.println(\"File Not Found : \" + e.getMessage());\n\t\t}\n\t\tcatch(IOException e)\n\t\t{\n\t\t\tSystem.out.println(\"Failed File Read : \" + e.getMessage());\n\t\t}\n\t\t\n\t}",
"public static void read7() {\n //read file into stream, try-with-resources\n try (Stream<String> stream = Files.lines(Paths.get(filePath))) {\n\n stream.forEach(System.out::println);\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"public static void readForFall()throws IOException{\n String filename = \"/home/pi/host.txt\";\r\n //String filename = \"C://testfile.txt\";\r\n File f = new File(filename);\r\n BufferedReader br = new BufferedReader(new FileReader(f));\r\n String line = br.readLine();\r\n br.close();\r\n \r\n //if the file currently contains a 1 (fall), overwrite the filecontents so that falls only get logged once\r\n if (line.equals(\"1\")){\r\n start.userFell = true;\r\n BufferedWriter bw = new BufferedWriter(new FileWriter(f));\r\n bw.write(\"0\");\r\n bw.close();\r\n }\r\n else start.userFell = false;\r\n \r\n /* This tells the GUI what to do when a fall is detected:\r\n * 1. Log the fall date/time in the local fall data page\r\n * 2. Begin the mailHandler function, which alerts emergency contacts\r\n * 3. Interrupt the GUI with a fall alert popup\r\n */\r\n if (start.userFell){ \r\n start.okay = false;\r\n String currDate = new java.text.SimpleDateFormat(\"MM-dd-yyyy\").format(new java.util.Date()); //get and format current date\r\n String currTime = java.time.LocalTime.now().toString(); //get current time\r\n currTime = currTime.substring(0,8); //trim bc we don't need milliseconds? I don't think?\r\n java.util.Vector<Object> row = new java.util.Vector<>(); \r\n row.add(currDate);\r\n row.add(currTime);\r\n start.model.addRow(row); \r\n mailHandler(start.contacts, start.count, start.userFullName, currTime, currDate, start.okay);\r\n Component frame = null;\r\n UIManager.put(\"OptionPane.minimumSize\",new java.awt.Dimension(800, 440));\r\n UIManager.put(\"OptionPane.messageFont\", new FontUIResource(new Font(\"Tahoma\", Font.BOLD, 30))); \r\n UIManager.put(\"OptionPane.okButtonText\", \"I am OK\");\r\n UIManager.put(\"OptionPane.buttonFont\", new FontUIResource(new Font(\"tahoma\",Font.PLAIN,30))); \r\n int result=JOptionPane.showConfirmDialog(frame, \"<html><font color=#871912>A FALL HAS BEEN DETECTED <br> WIFU will now begin notifying contacts</font></html>\", \"Fall Alert\", JOptionPane.WARNING_MESSAGE, JOptionPane.OK_OPTION); \r\n if(result==JOptionPane.OK_OPTION){\r\n start.okay = true;\r\n mailHandler(start.contacts, start.count, start.userFullName, currTime, currDate, start.okay);\r\n }\r\n }\r\n }",
"public void validateAvroFile(File file) throws IOException {\n DatumReader<GenericRecord> reader = new GenericDatumReader<GenericRecord>();\n DataFileReader<GenericRecord> fileReader =\n new DataFileReader<GenericRecord>(file, reader);\n GenericRecord record = new GenericData.Record(fileReader.getSchema());\n int numEvents = 0;\n while (fileReader.hasNext()) {\n fileReader.next(record);\n String bodyStr = record.get(\"message\").toString();\n System.out.println(bodyStr);\n numEvents++;\n }\n fileReader.close();\n Assert.assertEquals(\"Should have found a total of 3 events\", 3, numEvents);\n }",
"private void readFromFile(){\n\t\t\n\t\ttry {\n\t\t\tFile file=new File(\"controller.txt\");\n\t\t\tFileInputStream fin;\n\t\t\tfin = new FileInputStream(file);\n\t\t\tDataInputStream din=new DataInputStream(fin);\n\t\t\tBufferedReader br=new BufferedReader(new InputStreamReader(din));\n\t\t\t\n\t\t\tfor(int i=0; i<2; i++){\n\t\t\t\tif(i==0)\n\t\t\t\t\tcodedUserName=br.readLine();\n\t\t\t\telse \n\t\t\t\t\tcodedPassword=br.readLine();\n\t\t\t}\n\t\t\t\n\t\t} catch (FileNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\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\t\n\t}",
"public void readFiles() {\n\t\t\n\t\ttry {\n\t\t\t\n\t\t\t// Open BufferedReader to open connection to tipslocation URL and read file\n\t\t\tBufferedReader reader1 = new BufferedReader(new InputStreamReader(tipsLocation.openStream()));\n\t\t\t\n\t\t\t// Create local variable to parse through the file\n\t String tip;\n\t \n\t // While there are lines in the file to read, add lines to tips ArrayList\n\t while ((tip = reader1.readLine()) != null) {\n\t tips.add(tip);\n\t }\n\t \n\t // Close the BufferedReader\n\t reader1.close();\n\t \n\t \n\t // Open BufferedReader to open connection to factsLocation URL and read file\n\t BufferedReader reader2 = new BufferedReader(new InputStreamReader(factsLocation.openStream()));\n\t \n\t // Create local variable to parse through the file\n\t String fact;\n\t \n\t // While there are lines in the file to read: parses the int that represents\n\t // the t-cell count that is associated with the line, and add line and int to \n\t // tCellFacts hashmap\n\t while ((fact = reader2.readLine()) != null) {\n\t \t\n\t \tint tCellCount = Integer.parseInt(fact);\n\t \tfact = reader2.readLine();\n\t \t\n\t tCellFacts.put(tCellCount, fact);\n\t }\n\t \n\t // Close the second BufferedReader\n\t reader2.close();\n\t \n\t\t} catch (FileNotFoundException e) {\n\t\t\t\n\t\t\tSystem.out.println(\"Error loading files\"); e.printStackTrace();\n\t\t\t\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"private void readFile() {\r\n\t\tScanner sc = null; \r\n\t\ttry {\r\n\t\t\tsc = new Scanner(inputFile);\t\r\n\t\t\twhile(sc.hasNextLine()){\r\n\t\t\t\tgrade.add(sc.nextLine());\r\n\t } \r\n\t\t}\r\n\t\tcatch (FileNotFoundException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\tfinally {\r\n\t\t\tsc.close();\r\n\t\t}\t\t\r\n\t}",
"public void readFromTxtFile(String filename){\n try{\n File graphFile = new File(filename); \n Scanner myReader = new Scanner(graphFile); \n parseFile(myReader);\n myReader.close();\n } \n catch(FileNotFoundException e){\n System.out.println(\"ERROR: DGraphEdges, readFromTxtFile: file not found.\");\n e.printStackTrace();\n } \n }",
"private static void readFridgeData() throws FileNotFoundException, InvalidDateException,\n InvalidQuantityException, EmptyDescriptionException,\n RepetitiveFoodIdentifierException, InvalidFoodCategoryException, InvalidFoodLocationException {\n File file = new File(DATA_FILE_PATH);\n Scanner scanner = new Scanner(file); // create a Scanner using the File as the source\n while (scanner.hasNext()) {\n String line = scanner.nextLine();\n populateFridge(line);\n }\n scanner.close();\n }",
"private void parse() throws IOException {\n\n\t\tStats statsObject = new Stats();\n\n\t\tstatsObject.setProcessName(process);\n\n\t\tList<String> lines = Files.readAllLines(Paths.get(filename), Charset.defaultCharset());\n\n\t\tPattern timePattern = Pattern.compile(\"((\\\\d+)-)*(\\\\d+)\\\\W((\\\\d+):)*(\\\\d+)\\\\.(\\\\d+)\");\n\n\t\tSystem.out.println(filename+\" \"+lines.get(0));\n\t\tMatcher matcher = timePattern.matcher(lines.get(0));\n\t\twhile (matcher.find()) {\n\t\t\tstatsObject.setStartTime(matcher.group(0));\n\t\t\tbreak;\n\t\t}\n\n\t\tmatcher = timePattern.matcher(lines.get(lines.size() - 1));\n\t\twhile (matcher.find()) {\n\t\t\tstatsObject.setEndTime(matcher.group(0));\n\t\t\tbreak;\n\t\t}\n\t\tString error = new String();\n\t\tfor (String line : lines) {\n\n\t\t\tif (line.startsWith(\"[\")) {\n\t\t\t\tif (!error.isEmpty()) {\n\t\t\t\t\tstatsObject.addError(error);\n\t\t\t\t\terror = \"\";\n\t\t\t\t}\n\n\t\t\t\tif (line.contains(\"Number of records processed: \")) {\n\n\t\t\t\t\tPattern numberPattern = Pattern.compile(\"\\\\d+\");\n\t\t\t\t\tmatcher = numberPattern.matcher(line);\n\t\t\t\t\t\n\t\t\t\t\tString numberOfRecordsProcessed = \"N/A\";\n\t\t\t\t\t\n\t\t\t\t\twhile (matcher.find()) {\n\t\t\t\t\t\tnumberOfRecordsProcessed = matcher.group();\n\t\t\t\t\t}\n\t\t\t\t\tstatsObject.setRecordsProcessed(numberOfRecordsProcessed);\n\n\t\t\t\t}\n\n\t\t\t\telse if (line.contains(\"WARNING\")) {\n\t\t\t\t\tif (line.contains(\"MISSING Property\")) {\n\t\t\t\t\t\tstatsObject.incrementErrorCounter();\n\t\t\t\t\t\tstatsObject.addError(line);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tstatsObject.incrementWarningCounter();\n\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t} else if (line.contains(\"Exception\") || (line.contains(\"Error\"))) {\n\t\t\t\tif (!error.isEmpty()) {\n\t\t\t\t\tstatsObject.addError(error);\n\t\t\t\t\terror = \"\";\n\t\t\t\t}\n\t\t\t\tstatsObject.incrementErrorCounter();\n\t\t\t\terror = error + line;\n\t\t\t} else {\n\t\t\t\terror = error + line ;\n\t\t\t}\n\n\t\t}\n\t\t// reader.close();\n\t\tif (statsObject.getErrorCounter() > 0) {\n\t\t\tstatsObject.setStatus(\"Failure\");\n\t\t}\n\n\t\tPattern pattern = Pattern.compile(\"\\\\d\\\\d\\\\d\\\\d\\\\d\\\\d\\\\d\\\\d\");\n\t\tmatcher = pattern.matcher(filename);\n\t\tString date = null;\n\t\twhile (matcher.find()) {\n\t\t\tdate = matcher.group(0);\n\t\t\tbreak;\n\t\t}\n\t\tboolean saveSuccessful = OutputManipulator.addToStatFile(username, process, date, statsObject);\n\n\t\tif (saveSuccessful) {\n\t\t\tFileParseScheduler.addSuccessfulParsedFileName(username, process, filename);\n\t\t}\n\n\t\tFileParseScheduler.removeLatestKilledThreads(process + filename);\n\t}",
"private static ArrayList<String> readFile() throws ApplicationException {\r\n\r\n ArrayList<String> bookList = new ArrayList<>();\r\n\r\n File sourceFile = new File(FILE_TO_READ);\r\n try (BufferedReader input = new BufferedReader(new FileReader(sourceFile))) {\r\n\r\n if (sourceFile.exists()) {\r\n LOG.debug(\"Reading book data\");\r\n String oneLine = input.readLine();\r\n\r\n while ((oneLine = input.readLine()) != null) {\r\n\r\n bookList.add(oneLine);\r\n\r\n }\r\n input.close();\r\n } else {\r\n throw new ApplicationException(\"File \" + FILE_TO_READ + \" does not exsit\");\r\n }\r\n } catch (IOException e) {\r\n LOG.error(e.getStackTrace());\r\n }\r\n\r\n return bookList;\r\n\r\n }",
"@Test\n\tpublic void testBadRead(){\n\t\ttry{\n\t\t\tXMLReader reader = new XMLReader(\"nonExistent\");\n\t\t\treader.close();\n\t\t\tfail(\"XMLReader should not have been able to read nonexistent file\");\n\t\t} catch (FileNotFoundException e){\n\t\t}\n\t}",
"public static void couldNotReadFromFile(QWidget parent){\n \t\tQMessageBox.information(parent, \"Info\", \"En error oppsto.\"+\n \t\t\t\t\"\\nKunne ikke skrive fra fil.\");\n \t}",
"public static void main(String[] args) throws IOException {\n\n fileReader(\"endpoints1.txt\", \"endpoints2.txt\");\n\n /* First Test Case Completed with Correct Files */\n\n /*===============================================/*\n\n /* Second Test Case With Valid and Invalid Files */\n\n// fileReader(\"endpoints1.txt\", \"invalidpoints.txt\");\n\n /* Second Test Case Completed with one Invalid File */\n\n /*===============================================/*\n\n /* Third Test Case With Invalid Files */\n\n// fileReader(\"invalidpoints.txt\", \"endpoints2.txt\");\n\n /* Third Test Case Completed with Invalid File */\n\n }",
"private static void load(String filename, Stats stats) throws IOException {\n System.out.println(\"Analysing file: \" + filename);\n getConsole().println(\"Analysing file: \" + filename.substring(0, Integer.min(filename.length(), 60)) + (filename.length() > 60 ? \"...\" : \"\"));\n\n String line;\n long numOfKeys = 0,\n actualKey = 0,\n actualLineNumber = 0,\n startFileTime = System.nanoTime();\n try (BufferedReader reader = new BufferedReader(new FileReader(filename))) {\n while ((line = reader.readLine()) != null) {\n String[] tuple = line.split(\":\", 2);\n if (tuple.length == 2 && tuple[0].equals(\"PRIV\")) {\n numOfKeys++;\n }\n }\n } catch (FileNotFoundException ex) {\n System.err.println(\"File '\" + filename + \"' not found\");\n return;\n }\n\n try (BufferedReader reader = new BufferedReader(new FileReader(filename))) {\n lastStatusMessageTime = System.nanoTime();\n Params params = null;\n while ((line = reader.readLine()) != null) {\n actualLineNumber++;\n String[] tuple = line.split(\";\", 2);\n if (tuple[0].equals(\"CPLC.ICSerialNumber\")) {\n stats.changeCard(tuple[1]);\n }\n\n tuple = line.split(\":\", 2);\n if (tuple.length != 2) {\n continue;\n }\n String value = tuple[1].replaceAll(\"\\\\s\", \"\");\n switch (tuple[0]) {\n case \"PUBL\":\n if (params != null) {\n throw new WrongKeyException(\"Loading public key on line \" + actualLineNumber + \" while another public key is loaded\");\n }\n params = Params.readPublicKeyFromTlv(value);\n break;\n case \"PRIV\":\n if (params == null) {\n throw new WrongKeyException(\"Loading private key on line \" + actualLineNumber + \" while public key not loaded\");\n }\n params.readPrivateKeyFromTlv(value);\n break;\n default:\n if (tuple[0].charAt(0) == '#') {\n if (params == null) {\n throw new WrongKeyException(\"Loading time on line \" + actualLineNumber + \" while public key not loaded\");\n }\n\n int time = (int) (Double.parseDouble(tuple[1]) * 1000.0);\n params.setTime(time);\n stats.process(params);\n\n params = null;\n actualKey++;\n showProgress(actualKey, numOfKeys, startFileTime);\n }\n }\n }\n } catch (FileNotFoundException ex) {\n System.err.println(\"File '\" + filename + \"' not found\");\n } catch (WrongKeyException ex) {\n System.err.println(\"File '\" + filename + \"' is in wrong format.\\n\" + ex.getMessage());\n } finally {\n consoleDoneLine();\n }\n }",
"public boolean check_file_status(String StTextFileName) throws Exception\r\n\t{\r\n\t\t//try\r\n\t//\t{\r\n\t\t\tFile file = new File(StTextFileName);\r\n\r\n\t\t\tif (file.exists() == false)\r\n\t\t\t{\r\n\t\t\t JOptionPane.showMessageDialog(frame ,\"~~ WARNING ~~ \\n \\n The selected file is not a valid file... \\n Please Select Another File . \\n \",\"WARNING\",JOptionPane.ERROR_MESSAGE); //JOptionPane.WARNING_MESSAGE);\r\n \t\t\t l = new log(\"warning\",\"File\",\"<\"+StSourceFileName+\">\"+ \" Not Exist, Please Select Another File .\"); //info\r\n \t\t\t return false;\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t l = new log(\"info\",\"File\",\"<\"+StSourceFileName+\">\" + \" Exist\");\t\t\t \r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tif (file.isDirectory() == true)\r\n\t\t\t{\r\n\t\t\t\tJOptionPane.showMessageDialog(frame ,\"~~ WARNING ~~ \\n \\n The selected file is not a valid file... \\n Please Select Another File . \\n \",\"WARNING\",JOptionPane.ERROR_MESSAGE); //JOptionPane.WARNING_MESSAGE);\t\t\t\r\n\t\t\t\tl = new log(\"warning\",\"File\",\"<\"+StTextFileName+\">\"+ \" is not a File, Please Select Another File .\" );\t\t\t\t\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t//File Exist + is a file.\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\r\n/*\t\t\tstr = null;\r\n\t\t\tBufferedReader in = new BufferedReader(new FileReader(StTextFileName));\r\n\t\t\t\r\n\r\n\t\t\twhile ((str = in.readLine()) != null)\r\n\t\t\t{\r\n\t\t\t\tintTotalLineNumber++;\r\n\t\t\t\tintTotalCharInFile = intTotalCharInFile + str.length();\r\n\t\t\t}\r\n\t\t\tin.close();\r\n\t\t}\r\n\t\tcatch (IOException e)\r\n\t\t{\r\n\t\t\t//l = new log(\"warning\",\"File\",\"<\"+StTextFileName+\">\"+ \" is not a File, Please Select Another File \" + e + \".\" );\r\n\t\t\tJOptionPane.showMessageDialog(frame ,\"~~ WARNING ~~ \\n \\n The selected file is not a valid file... \\n Please Select Another File . \\n \",\"WARNING\",JOptionPane.ERROR_MESSAGE); //JOptionPane.WARNING_MESSAGE);\t\t\t\r\n\t\t\tl = new log(\"warning\",\"File\",\"<\"+StTextFileName+\">\"+ \" is not a File, Please Select Another File .\" );\r\n\t\t\t\r\n\t\t\treturn false;\r\n\t\t}\r\n*/\r\n\t\t\t\t\r\n//\t\treturn true;\r\n\t}",
"public void loadFile(File file) throws FileNotFoundException\n {\n FileReader reader = new FileReader(file);\n\n // Clear table to make sure it only shows tasks from file\n Item.getToDoList().clear();\n if(this.listView != null)\n {\n listView.getItems().clear();\n }\n\n index = 0;\n\n try(BufferedReader temp = new BufferedReader(reader))\n {\n String info;\n boolean check;\n\n while((info = temp.readLine()) != null)\n {\n // Make an array of values\n String[] values = info.split(\",\");\n\n //Array length is 3, since 3 columns. If not that then incorrect file\n if(values.length != 3)\n {\n if(this.status != null)\n {\n status.setText(\"Incompatible File. \");\n }\n break;\n }\n\n // If correct, add information from file to list\n else\n {\n check = !values[2].equals(\"false\");\n Item.getToDoList().add(new Item(values[0], values[1], check));\n }\n }\n\n } catch (IOException exception)\n {\n // If error, let user know\n if(this.status != null)\n {\n status.setText(\"File not found. \");\n }\n\n exception.printStackTrace();\n }\n }",
"private void ReadFile(String fileName){\n\t\tFileInputStream FIS \t= null;\n\t\tBufferedInputStream BIS = null;\n\t\tDataInputStream DIS \t= null;\n\t\tFile file \t\t\t\t= null;\n\t\t//content stores the files content, each line being separated by a '@'\n\t\tfile \t\t = new File(fileName);\n\t\t\n\t\tString content = \"\";\n\t\tString [] splitContent = new String [2];\n\t\t\n\t\ttry{\n\t\t\t//Setup Input Streams\n\t\t\tFIS = new FileInputStream(file);\n\t\t BIS = new BufferedInputStream(FIS);\n\t\t DIS = new DataInputStream(BIS);\n\t\t\t\n\t\t //do the following while the file contains more lines of text\n\t\t while (DIS.available() != 0){\n\t\t \t//read a line of text\n\t\t\t content = DIS.readLine();\n\t\t\t //confirm that the line is of the correct format\n\t\t\t if (content.contains(\"> \")){\n\t\t\t \t//split the line into the user and a list of who they follow\n\t\t\t \tsplitContent = content.split(\"> \");\n\t\t\t \t//create the tweet\n\t\t\t \tif (splitContent[1].length() > 140) throw new IllegalArgumentException(\"Tweet length is too large ( > 140 characters\");\n\t\t\t \tTweet tweet = new Tweet(new User(splitContent[0]), splitContent[1]);\n\t\t\t \ttweets.add(tweet);\n\t\t\t }else{\n\t\t\t \tSystem.out.println(\"ERROR - USER FILE IS NOT OF CORRECT FORMAT\");\n\t\t\t }\n\t\t }\n\t\t // dispose stream resources;\n\t\t FIS.close();\n\t\t BIS.close();\n\t\t DIS.close();\t\t \n\t } catch (FileNotFoundException e) {\n\t \te.printStackTrace();\n\t } catch (IOException e) {\n\t \te.printStackTrace();\n\t }\n\t\n\t}",
"@Override\n\tpublic boolean readData(File file) {\n return file.exists();\n\t}",
"private static void read(Client client,String user,String filename) throws SystemException, TException {\n\t\t\n\t\tString keyString = user + \":\" + filename;\n\t\tString key = sha_256(keyString);\n\t\t\n\t\t\n\t\tNodeID succNode = client.findSucc(key);\n\t\tString predIP = succNode.ip;\n\t\t// predIP = \"127.0.0.1\";\n\t\tint predPort = succNode.port;\n\t\ttry {\n\t\t\tTSocket transport = new TSocket(predIP, predPort);\n\t\t\ttransport.open();\n\t\t\tTBinaryProtocol protocol = new TBinaryProtocol(transport);\n\t\t\tchord_auto_generated.FileStore.Client client1 = new chord_auto_generated.FileStore.Client(protocol);\n\t\t\tSystem.out.println(\"Reading file location : \" + predPort + \" File :\"+filename+\"Owner : \"+user);\n\t\t\tRFile rFile = new RFile();\n\t\t\trFile = client1.readFile(filename, user);\n\t\t\tSystem.out.println(rFile.getContent());\n\t\t\tSystem.out.println(rFile.getMeta().getVersion());\n\t\t\tSystem.out.println(rFile.getMeta().getContentHash());\n\t\t\tSystem.out.println(\"Reading file Done----------\");\n\t\t\ttransport.close();\n\t\t} catch (TTransportException e) {\n\t\t\te.printStackTrace();\n\t\t\tSystem.exit(0);\n\t\t}\n\t}",
"public static void printFileError() {\n printLine();\n System.out.println(\" Oops! Something went wrong with duke.txt\");\n printLine();\n }",
"public String readFile(String filename)\n {\n StringBuilder texts = new StringBuilder();\n \n try \n {\n FileReader inputFile = new FileReader(filename);\n Scanner parser = new Scanner(inputFile);\n \n while (parser.hasNextLine())\n {\n String line = parser.nextLine();\n texts.append(line + \";\");\n }\n \n inputFile.close();\n parser.close();\n return texts.toString();\n \n }\n \n catch(FileNotFoundException exception) \n {\n String error = filename + \" not found\";\n System.out.println(error);\n return error;\n }\n \n catch(IOException exception) \n {\n String error = \"Unexpected I/O error occured\";\n System.out.println(error); \n return error;\n } \n }",
"public void readFile(String file)\n\t{\t\n\t\tfindPieces(file);\n\t}",
"public String readFile(){\n\t\tString res = \"\";\n\t\t\n\t\tFile log = new File(filePath);\n\t\tBufferedReader bf = null;\n\t\t\n\t\ttry{\n\t\t\tbf = new BufferedReader(new FileReader(log));\n\t\t\tString line = bf.readLine();\n\t\t\n\t\t\n\t\t\twhile (line != null){\n\t\t\t\tres += line+\"\\n\";\n\t\t\t\tline = bf.readLine();\n\t\t\t}\n\t\t\n\t\t\treturn res;\n\t\t}\n\t\tcatch(Exception oops){\n\t\t\tSystem.err.println(\"There was an error reading the file \"+oops.getStackTrace());\n\t\t\treturn \"\";\n\t\t}\n\t\tfinally{\n\t\t\ttry {\n\t\t\t\tbf.close();\n\t\t\t} catch (IOException e) {\n\t\t\t\tSystem.err.println(\"There was an error closing the read Buffer \"+e.getStackTrace());\n\t\t\t}\n\t\t}\n\t}",
"public synchronized void readLog() {\n MemoryCache instance = MemoryCache.getInstance();\n try (Stream<String> stream = Files.lines(Paths.get(path)).skip(instance.getSkipLine())) {\n stream.forEach(s -> {\n Result result = readEachLine(s);\n instance.putResult(result);\n instance.setSkipLine(instance.getSkipLine() + 1);\n });\n } catch (IOException e) {\n logger.error(\"error during reading file \" + e.getMessage());\n }\n }",
"public void fileRead() {\n\t\tString a, b;\n\t\t\n\t\twhile (input.hasNext()) {\n\t\t\ta = input.next();\n\t\t\tb = input.next();\n\t\t\tSystem.out.printf(\"%s %s\\n\", a, b);\n\t\t}\n\t}",
"public static void readFile(String fileName)throws FileNotFoundException{ \r\n\t\t\r\n\t\tScanner sc = new Scanner(fileName);\r\n\t\t \r\n\t\twhile (sc.hasNextLine()) {\r\n\t\t\tString q1 = sc.next();\r\n\t\t\tString q1info = sc.next();\r\n\t\t}\r\n\t}",
"@Override\r\n public void handleIOException(\r\n File file,\r\n java.io.IOException cause\r\n )\r\n {\n }",
"public void loadData() {\n Path path= Paths.get(filename);\n Stream<String> lines;\n try {\n lines= Files.lines(path);\n lines.forEach(ln->{\n String[] s=ln.split(\";\");\n if(s.length==3){\n try {\n super.save(new Teme(Integer.parseInt(s[0]),Integer.parseInt(s[1]),s[2]));\n } catch (ValidationException e) {\n e.printStackTrace();\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }else\n System.out.println(\"linie corupta in fisierul teme.txt\");});\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"protected abstract Object readFile(BufferedReader buf) throws IOException, FileParseException;",
"private void readFile() {\r\nif(isExternalStorageWritable()){\r\n Toast.makeText(this, \"Reading file.\", Toast.LENGTH_SHORT).show();\r\n StringBuilder sb = new StringBuilder();\r\n try{\r\n File textFile = new File(Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DCIM + \"/Alluciam/\"), fileNameToUse);\r\n FileInputStream fis = new FileInputStream(textFile);\r\n if(fis != null){\r\n InputStreamReader isr = new InputStreamReader(fis);\r\n BufferedReader buff = new BufferedReader(isr);\r\n String line = null;\r\n while((line = buff.readLine()) != null){\r\n sb.append(line + \"\\n\\n\");\r\n }// this ends while line=buff.readLine\r\n fis.close();\r\n } // this ends if fis != null\r\n Toast.makeText(this, \"File has been read and closed.\", Toast.LENGTH_LONG).show();\r\n txt.setText(sb);\r\n } // this ends try\r\n catch (IOException e){\r\n Toast.makeText(this, \"IOException. File not found\", Toast.LENGTH_SHORT).show();\r\n e.printStackTrace();\r\n }// this ends catch\r\n} // this ends if isExternalStorageWritable\r\n else{\r\n Toast.makeText(this, \"Cannot read from External Storage.\", Toast.LENGTH_SHORT).show();\r\n }\r\n }",
"private void validateInput () throws IOException, Exception {\n\t\t\n\t\t// Check that the properties file exists\n\t\tFile propFile = new File(propertiesFile);\n\t\tif (!propFile.exists()) { \n\t\t\tthrow new IOException(\"Unable to open properties file \" + propertiesFile);\t\n\t\t}\n\t\t\n\t\t// Check that the list of register files is not empty\n\t\tif (inputFiles == null || inputFiles.isEmpty()) {\n\t\t\tthrow new Exception(\"No files to process\");\n\t\t}\n\t}",
"private void readFile (String file, Visitor visitor) throws Exception {\n\t\tFileReader fr = new FileReader (file);\n\t\tBufferedReader reader = new BufferedReader (fr);\n\n\t\tSystem.out.println (\"Reading file \" + file);\n\n\t\tint count = 0;\n\t\tfor (String line; (line = reader.readLine()) != null;) {\n\t\t\tif (count++ % 10000 == 0) System.out.println (line);\n\t\t\tvisitor.visit (line);\n\n\t\t\tif (count >= LIMIT) break;\n\t\t}\n\n\t\tSystem.out.println (\"Done\");\n\n\t\treader.close();\n\t\tfr.close();\n\t}",
"private boolean readFile(String fileName) {\n Message msg = new Message();\n FileInputStream fis;\n InputStreamReader isr;\n BufferedReader br;\n int depCount = 0;\n int depIndex = 0;\n float xIndex = 0;\n float yIndex = 0;\n int dist = 0;\n int capacity = 0;\n File file = new File(fileName);\n\n try {\n //open the requested file\n fis = new FileInputStream(file);\n isr = new InputStreamReader(fis);\n br = new BufferedReader(isr);\n } catch (Exception e) {\n System.err.println(\"File is not present \" + file);\n\n return false;\n }\n\n String line;\n StringTokenizer st = null;\n\n try {\n br.readLine(); // skip text labels\n line = br.readLine(); // depot constraints\n st = new StringTokenizer(line);\n\n // skip text labels\n br.readLine();\n } catch (IOException ex) {\n System.err.println(\"Error reading depot file: \" + fileName + \": \" +\n ex);\n }\n\n try {\n depCount = Integer.parseInt(st.nextToken().trim());\n dist = Integer.parseInt(st.nextToken().trim());\n capacity = Integer.parseInt(st.nextToken().trim());\n } catch (NumberFormatException ex) {\n System.err.println(\"Error processing depot constraint info: \" + ex);\n }\n\n //process depots\n for (int i = 0; i < depCount; i++) {\n try {\n line = br.readLine();\n st = new StringTokenizer(line);\n } catch (IOException ex) {\n System.err.println(\"Error reading depot file: \" + fileName +\n \": \" + ex);\n }\n\n //read the depot information\n try {\n depIndex = Integer.parseInt(st.nextToken().trim());\n xIndex = Float.parseFloat(st.nextToken().trim());\n yIndex = Float.parseFloat(st.nextToken().trim());\n } catch (NumberFormatException ex) {\n System.err.println(\"Error processing depot coordinate info: \" +\n ex);\n }\n\n // build the message\n msg.addArgument(IndexTag, \"\" + depIndex);\n msg.addArgument(XCoordTag, \"\" + xIndex);\n msg.addArgument(YCoordTag, \"\" + yIndex);\n }\n\n //save max distance and capacity\n if (dist == 0) { //if no max distance, set to a large number...\n dist = 999999999;\n }\n\n if (capacity == 0) { //if there is no maximum capacity, set it to a very large number\n capacity = 999999999;\n }\n\n // build the message\n msg.addArgument(NumberOfDepotsTag, \"\" + depCount);\n msg.addArgument(MaxCapacityTag, \"\" + capacity);\n msg.addArgument(MaxDistanceTag, \"\" + dist);\n msg.addArgument(FileNameTag, fileName);\n\n zAdapt.setProblemConstraints(msg);\n\n return true;\n }",
"public void readFile(View view) {\n ReadFileTask task = new ReadFileTask();\n task.execute();\n\n Toast toast = Toast.makeText(getApplicationContext(), \"Begin reading file...\", Toast.LENGTH_SHORT);\n toast.show();\n }",
"public static void handleFileNotFoundException() {\n System.out.println(\"\\tUnfortunately, I could not detect any files in the database!\");\n System.out.println(\"\\tBut don't worry sir.\");\n System.out.println(\"\\tI will create the files you might be needing later.\");\n Duke.jarvis.printDivider();\n }",
"@Override\n protected void dataParser() {\n for (String dataLine : dataFile) {\n if (totalErrors > 200) {\n totalErrors = 0;\n throw new RuntimeException(\n \"File rejected: more than 200 lines contain errors.\\n\" + getErrorMessage(false));\n }\n parseLine(dataLine);\n }\n }",
"private void read() {\n\n\t\t\t\tString road=getActivity().getFilesDir().getAbsolutePath()+\"product\"+\".txt\";\n\n\t\t\t\ttry {\n\t\t\t\t\tFile file = new File(road); \n\t\t\t\t\tFileInputStream fis = new FileInputStream(file); \n\t\t\t\t\tint length = fis.available(); \n\t\t\t\t\tbyte [] buffer = new byte[length]; \n\t\t\t\t\tfis.read(buffer); \n\t\t\t\t\tString res1 = EncodingUtils.getString(buffer, \"UTF-8\"); \n\t\t\t\t\tfis.close(); \n\t\t\t\t\tjson(res1.toString());\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}",
"private String readFile(String fileName) {\n//Initialize\nString line = null;\nString allContent = \"\";\nBufferedReader fileReader = null;\n \nwhile (true) {\ntry {\nfileReader = new BufferedReader (new FileReader (fileName));\n \n//Replace tags with indicated content\nwhile((line = fileReader.readLine()) != null) {\nline = replaceTags(line);\nallContent += line;\n}\n} catch (Exception e) {\nSystem.err.println(\"Read error: \"+e);\nbreak;\n//Close BufferedReader if initialized\n}//end catch\nbreak;\n}//end while loop\n \nfileReadSuccessful = true;\nreturn allContent;\n}",
"@SuppressWarnings(\"deprecation\")\n private int readMeals(String eateryname, String filePath) {\n Dish curdish;\n Meal curmeal = null;\n Calendar curdate = Calendar.getInstance();\n curdate.set(0, 0, 0); // Initialize date to 0.\n boolean newdate = false;\n boolean nutrerror = false;\n try {\n _stream = new FileInputStream(filePath);\n\n _instream = new DataInputStream(_stream);\n _bufread = new BufferedReader(new InputStreamReader(_instream));\n\n TextParser parser = new TextParser();\n String line;\n boolean ingrediants;\n\n while (true) { //loop until we break\n nutrerror = false; //this is if the PDF leaves out necessary information in the nutrition facts section\n //initially set this to false at the start of reading each dish (each loop)\n\n //Read in the line that starts a new dish, and create a dish with the string in this line\n if ((line = _bufread.readLine()) != null) {\n //read in the dish name and create a new dish\n if (line.charAt(0) == '\f') { //check for and delete this weird character the PDF to text sometimes gives.\n line = line.substring(1);\n }\n\n //create a new dish of this name\n curdish = new Dish(line);\n curdish.setLocation(new Location(eateryname));\n } else {\n break;\n }\n\n //Read in the line under the name. It should be the ingrediants\n if ((line = _bufread.readLine()) != null) {\n ingrediants = parser.SetIngrediants(curdish, line);\n\n } else {\n break;\n }\n if (ingrediants) { //if ingrediants did not have an issue then read the empty line\n //and then read in the ingrediants header\n // otherwise you don't want to do this as there were no ingrediants\n //and the line you thought was ingrediants is really the nutrition facts header\n\n //Read in the empty line seperator\n if ((line = _bufread.readLine()) != null) { //read in an empty line\n\n } else {\n break;\n }\n //Read in the next line and make sure it is the nutrition facts header\n if ((line = _bufread.readLine()) != null) {\n if (line.compareTo(\"Nutrition Facts\") != 0) {\n //this means things are not formatted as expected\n }\n } else {\n break;\n }\n }\n //Under the nutrition facts header is the list of nutrition facts\n if ((line = _bufread.readLine()) != null) {\n nutrerror = parser.setNutritionFacts(curdish, line);\n } else {\n break;\n }\n\n //read in empty line separator\n if ((line = _bufread.readLine()) != null) {\n\n } else {\n break;\n }\n\n //read in the location line\n if ((line = _bufread.readLine()) != null) {\n } else {\n break;\n }\n\n //read in the empty line separator\n if ((line = _bufread.readLine()) != null) {\n\n } else {\n break;\n }\n\n //read in the line that should have the date\n //use result to check for error and set newdate\n if ((line = _bufread.readLine()) != null) { //this line should have the date\n Calendar d = parser.setDate(curdish, line, curdate);\n if (d.equals(curdate)) //if the date returned is the same date, then there was no changed\n {\n newdate = false;\n } else { //if the date returned is different, then there is a newdate and curdate should be updated\n newdate = true;\n curdate = d;\n }\n } else {\n break;\n }\n\n //read in the empty line separator\n if ((line = _bufread.readLine()) != null) {\n\n } else {\n break;\n }\n\n //this line says Breakfast, Lunch, Dinner.... etc\n //check this line and the newdate variable to see if the dish should be added to the current meal\n //or if we need a whole new meal\n if ((line = _bufread.readLine()) != null) {\n //if this is the first dish, so there is no meal create a meal and add the dish && set the date\n if (curmeal == null) {\n curmeal = new Meal(line.toLowerCase());\n curdish.setDate(curdate);\n curdish.setMeal(curmeal);\n _dishes.add(curdish);\n } else if (curmeal.getMeal().equals(line) == false || newdate == true) {\n //this is the beginning of a new meal, add the cur meal to eatery and create a new one with the most recent date\n curmeal = new Meal(line.toLowerCase());\n curdish.setMeal(curmeal);\n curdish.setDate(curdate);\n } else { //this is just part of the current meal, add it and move on to the next one\n curdish.setMeal(curmeal);\n curdish.setDate(curdate);\n }\n } else {\n break;\n }\n\n //read in the empty line separator\n if ((line = _bufread.readLine()) != null) {\n\n } else {\n break;\n }\n _dishes.add(curdish);\n //move on to the next dish in the text file\n }\n \n } catch (FileNotFoundException e) {\n return -1;\n } catch (IOException e) {\n e.printStackTrace();\n return 0;\n } finally {\n if (_instream != null) {\n try {\n _instream.close();\n } catch (IOException e) {\n\n }\n }\n\n if (_bufread != null) {\n try {\n _bufread.close();\n } catch (IOException e) {\n\n }\n }\n\n if (_stream != null) {\n try {\n _stream.close();\n } catch (IOException e) {\n\n }\n }\n }\n return 1;\n }",
"public static void reportErrors(File f) throws Exception {\n\t\ttry (BufferedReader br = new BufferedReader(new FileReader(f))) {\n\t\t\tString line;\n\t\t\twhile((line = br.readLine()) != null) {\n\t\t\t\tif (line.startsWith(\"[\"))\n\t\t\t\t\tcontinue;\n\t\t\t\tif (!line.contains(\": \"))\n\t\t\t\t\tcontinue;\n\n\t\t\t\tString exception = line;\n\t\t\t\tString exceptionAbstract = exception;\n\n\t\t\t\tline = br.readLine();\n\t\t\t\twhile(line != null) {\n\t\t\t\t\tif (!line.startsWith(\"\\t\") && !line.startsWith(\"Caused by: \"))\n\t\t\t\t\t\tbreak;\n\t\t\t\t\texception += \"\\n\" + line;\n\n\t\t\t\t\t// Trim off the source info for the abstract\n\t\t\t\t\tint i = line.indexOf('(');\n\t\t\t\t\tif(i != -1)\n\t\t\t\t\t\tline = line.substring(0, i);\n\t\t\t\t\texceptionAbstract += \"\\n\" + line;\n\t\t\t\t\tline = br.readLine();\n\t\t\t\t}\n\n\t\t\t\treportException(exception, exceptionAbstract);\n\t\t\t}\n\t\t}\n\t}",
"@Test\n public void testFileReading() throws Exception {\n String[] args = new String[1];\n args[0] = testFile;\n ConferenceManager.main(args);\n\n }",
"private String[] readFile(String path) throws StorageException {\r\n try {\r\n return readFile(new BufferedReader(new FileReader(new File(path))));\r\n } catch (Exception exception) {\r\n throw new StorageException(\"Cannot read file \" + path + \":\" + exception.getMessage());\r\n }\r\n }",
"@Test\n public void getFileLocation() throws Exception {\n ReadConfig conf = new ReadConfig();\n try {\n conf.getFileLocation();\n } catch (Exception e) {\n assertTrue(e.getMessage().equals(\"Try to access config file before reading it.\") );\n }\n try {\n conf.readFile();\n } catch (IOException e) {\n e.printStackTrace();\n }\n assertNotNull(conf.getFileLocation());\n }",
"public void readMessagesFromFile(File msgFile) throws Exception{ \n /** Using BufferedReader and FileReader to read the message from the File*/\n BufferedReader message = new BufferedReader(new FileReader(msgFile));\n String text;\n String[] textMessage = new String[messages.length];\n /** Using while loop to copy the messages from the file to the textMessage array*/\n while((text = message.readLine()) != null){\n textMessage[msgCount] = text;\n msgCount +=1;\n if(msgCount==9){\n break;\n }\n }\n /** For loop to split the String into two parts */\n for (int i = 0; i< msgCount; ++i){\n String[] parts = textMessage[i].split(\" \",2);\n messages[i] = new TextMessage(parts[0],parts[1]);\n }\n if (msgCount<messages.length){\n for (int m = msgCount; m<messages.length; ++m){\n messages[m] = new TextMessage(null,null);\n }\n }\n message.close();\n }",
"@Test\r\n public void testReadFile() {\r\n System.out.println(\"readFile and updateFile\");\r\n InparseManager instance = ((InparseManager) new ParserGenerator().getNewApplicationInparser());\r\n \r\n try {\r\n File file = File.createTempFile(\"TempInpFile\", null);\r\n instance.setlocalPath(file.getAbsolutePath());\r\n } catch (IOException ex) {\r\n Logger.getLogger(ApplicationInparserTest.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n instance.updateFile();\r\n instance.readFile();\r\n instance.parse();\r\n boolean assemblersFound = !((Applications)(((InparseManager)instance).getParseResults())).getAssemblers().isEmpty();\r\n assertEquals(true,assemblersFound);\r\n }",
"public static List<Server> readFile() {\n String fileName = \"servers.txt\";\n\n List<Server> result = new LinkedList<>();\n try (Scanner sc = new Scanner(createFile(fileName))) {\n\n while (sc.hasNextLine()) {\n String line = sc.nextLine();\n result.add(lineProcessing(line));\n\n }\n\n } catch (FileNotFoundException e) {\n System.out.println(\"File is not found\");\n } catch (MyException e) {\n System.out.println(\"File is corrupted\");\n }\n return result;\n }",
"private void takeInFile() {\n System.out.println(\"Taking in file...\");\n //Reads the file\n String fileName = \"messages.txt\";\n String line = null;\n try {\n FileReader fileReader = new FileReader(fileName);\n \n BufferedReader bufferedReader = new BufferedReader(fileReader);\n\n //Adds each line to the ArrayList\n int i = 0;\n while ((line = bufferedReader.readLine()) != null) {\n lines.add(line);\n //System.out.println(line);\n i++;\n }\n \n bufferedReader.close();\n } catch (FileNotFoundException ex) {\n System.out.println(\"Unable to open file '\" + fileName + \"'\");\n } catch (IOException ex) {\n System.out.println(\"Error reading file '\" + fileName + \"'\");\n }\n System.out.println(\"Done taking in file...\");\n }",
"public static void printReadFileAddTaskError() {\n System.out.println(Message.READ_FILE_ADD_TASK_ERROR);\n }",
"public void openFile()\r\n {\r\n try // open file\r\n {\r\n input = new RandomAccessFile( \"clients.dat\", \"r\" );\r\n } // end try\r\n catch ( IOException ioException )\r\n {\r\n System.err.println( \"File does not exist.\" );\r\n } // end catch\r\n }",
"private void openAndReadFile() throws IOException {\n\t\tFileReader fr = new FileReader(path);\n\t\tBufferedReader textreader = new BufferedReader(fr);\n\t\tString line;\n\t\tString[] parsedLine;\n\t\twhile ((line = textreader.readLine()) != null) {\n\t\t\tparsedLine = pattern.split(line);\n\t\t\tif (parsedLine.length == 2) {\n\t\t\t\tfileData.put(parsedLine[0], parsedLine[1]);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tSystem.out.println(\"Couldn't read line \" + line + \" in \" + path);\n\t\t\t}\n\t\t}\n\t\ttextreader.close();\n\t\tfr.close();\n\t}",
"private void readFile(String fileName)\n {\n System.out.println(\"reading File\");\n try\n {\n String line;\n BufferedReader input = new BufferedReader(\n new FileReader(fileName));\n while((line = input.readLine()) != null)\n logImage += line + \"\\n\";\n }\n catch(Exception e)\n {\n System.out.println(\"There was an error while reading the file\");\n }\n }",
"private String[] readFile(InputStream stream) throws StorageException {\r\n try {\r\n return readFile(new BufferedReader(new InputStreamReader(stream)));\r\n } catch (Exception exception) {\r\n throw new StorageException(\"Cannot read file \");\r\n }\r\n }",
"List<String> shouldReadFile(BufferedReader file) throws IOException {\n List<String> payments = new ArrayList<>();\n while (true){\n String paymentLine = file.readLine();\n if(paymentLine == null){\n break;\n }\n payments.add(paymentLine);\n }\n file.close();\n return payments;\n }",
"@Override\r\n protected void runComponent() {\r\n\r\n File theFile = this.getAttachment(0, 0);\r\n\r\n try {\r\n \tif (theFile != null && theFile.exists()) {\r\n \t\tverifyInputFile(this.getAttachment(0, 0));\r\n \t} else {\r\n \t\taddErrorMessage(\"Could not read required input file.\");\r\n \t}\r\n\r\n } catch (Exception e) {\r\n logger.info(\"Verify of first \" + NUM_INPUT_LINES_TO_CHECK + \" failed: \" + e);\r\n this.addErrorMessage(e.toString());\r\n }\r\n\r\n System.out.println(this.getOutput());\r\n }",
"public void read() {\n String line = \"\";\n int counter = 0;\n try {\n input = new BufferedReader(new FileReader(file));\n while (line != null) {\n if (!(line.equals(\"arglebargle\"))) {//not a default\n names.add(line);\n }\n }\n input.close();\n }\n catch (IOException e) {\n }\n }",
"private void readItems() {\n // open file\n File file = getFilesDir();\n File todoFile = new File(file, \"scores.txt\");\n // try to find items to add\n try {\n items = new ArrayList<>(FileUtils.readLines(todoFile));\n } catch (IOException e) {\n items = new ArrayList<>();\n }\n }",
"@FXML\n void readFromFile(ActionEvent event)throws FileNotFoundException {\n BoxSetting bx = new BoxSetting(devTempBox,devHumBox,presDevBox,maxTempDevBox,minTempDevBox,measTxt,presChart,humidChart,tempChart,tempBox,humidBox,presBox,maxTempBox,minTempBox,meanTempBox,meanHumidBox,meanPresBox,meanMaxTempBox,meanMinTempBox,meanTempBox,meanHumidBox,meanPresBox);\n cityBox.setText(readNameBox.getText());\n bx.fromFileDisp(tc.fromFile(readNameBox.getText()));\n }",
"public String readFile(String filePath)\n {\n String result = \"\";\n try {\n\n FileReader reader = new FileReader(filePath);\n Scanner scanner = new Scanner(reader);\n\n while(scanner.hasNextLine())\n {\n result += scanner.nextLine();\n }\n reader.close();\n }\n catch(FileNotFoundException ex)\n {\n System.out.println(\"File not found. Please contact the administrator.\");\n }\n catch (Exception ex)\n {\n System.out.println(\"Some error occurred. Please contact the administrator.\");\n }\n return result;\n }",
"public static void processFilesForValidation() {\r\n\t\t// Process each file one at a time.\r\n\t\tfor (int i = 0; i < inScanners.length; i++) {\r\n\t\t\tScanner sc = inScanners[i];\r\n\t\t\tint articleCount = 1;\r\n\t\t\t// Read the input file.\r\n\t\t\ttry {\r\n\t\t\t\twhile(sc.hasNextLine()) {\r\n\t\t\t\t\tString s = sc.nextLine();\r\n\t\t\t\t\t// If we come across an article, read its contents and add it to the file.\r\n\t\t\t\t\tif(s.startsWith(\"@ARTICLE{\")) {\r\n\t\t\t\t\t\tauthor = journal = title = year = volume = number = pages = doi = ISSN = month = \"\";\r\n\t\t\t\t\t\twhile (!s.equals(\"}\")) {\r\n\t\t\t\t\t\t\ts = sc.nextLine();\r\n\t\t\t\t\t\t\tparseValue(s);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t// Throw an exception if a field is missing.\r\n\t\t\t\t\t\tif (author.isEmpty() || journal.isEmpty() || title.isEmpty() || year.isEmpty() || volume.isEmpty() \r\n\t\t\t\t\t\t\t\t|| number.isEmpty() || pages.isEmpty() || doi.isEmpty() || ISSN.isEmpty() || month.isEmpty()) {\r\n\t\t\t\t\t\t\tthrow new FileInvalidException(\"One or more fields are missing.\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t// Add the article to the file if valid.\r\n\t\t\t\t\t\tString author1 = author.replaceAll(\" and\", \",\");\r\n\t\t\t\t\t\tint andIndex = author.indexOf(\"and\");\r\n\t\t\t\t\t\tString author2 = andIndex != -1 ? author.replaceAll(author.substring(andIndex,author.length()), \"et al\") : author;\r\n\t\t\t\t\t\tString author3 = author.replaceAll(\"and\", \"&\");\r\n\t\t\t\t\r\n\t\t\t\t\t\t// IEEE\r\n\t\t\t\t\t\toutWriters[i][0].println(author1+\". \\\"\"+title+\"\\\", \"+journal+\", vol. \"+volume+\", no. \"+number+\", p. \"+pages+\", \"+month+\" \"+year+\".\\r\\n\");\r\n\t\t\t\t\t\t// ACM\r\n\t\t\t\t\t\toutWriters[i][1].println(\"[\"+articleCount+\"]\\t\"+author2+\". \"+year+\". \"+title+\". \"+journal+\". \"+volume+\", \"+number+\" (\"+year+\"), \"+pages+\". DOI:https://doi.org/\"+doi+\".\\r\\n\");\r\n\t\t\t\t\t\t// NJ\r\n\t\t\t\t\t\toutWriters[i][2].println(author3+\". \"+title+\". \"+journal+\". \"+volume+\", \"+pages+\"(\"+year+\").\\r\\n\");\r\n\t\t\t\t\t\tarticleCount++;\r\n\t\t\t\t\t}\t\r\n\t\t\t\t}\r\n\t\t\t\t// Close output writers once file has been read.\r\n\t\t\t\tfor (int j = 0; j < 3; j++) {\r\n\t\t\t\t\toutWriters[i][j].close();\r\n\t\t\t\t}\r\n\t\t\t\tnumValidFiles++;\r\n\t\t\t}\r\n\t\t\t// If file is invalid, close and delete the output files.\r\n\t\t\tcatch (FileInvalidException e) {\r\n\t\t\t\tSystem.out.println(\"Error: Detected Empty Field!\" \r\n\t\t\t\t\t\t + \"\\n============================\"\r\n\t\t\t + \"\\nProblem detected with input file: Latex\" + (i + 1) + \".bib\"\r\n\t\t\t\t\t\t + \"\\nFile is invalid: \" + e.getMessage() + \" Processing stopped at this point. \"\r\n\t\t\t\t\t\t + \"Other empty/missing fields may be present as well.\\n\");\r\n\t\t\t\tfor (int j = 0; j < 3; j++) {\r\n\t\t\t\t\toutWriters[i][j].close();\r\n\t\t\t\t\toutFiles[i][j].delete();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t// Close input file after reading.\r\n\t\t\tsc.close();\r\n\t\t}\r\n\t}",
"public String readFileContents(String filename) {\n return null;\n\n }",
"@Test\n public void readFullFile() throws Exception {\n long checksumExpected = populateInputFile(((ReadHandlerTest.CHUNK_SIZE) * 10), 0, (((ReadHandlerTest.CHUNK_SIZE) * 10) - 1));\n mReadHandler.onNext(buildReadRequest(0, ((ReadHandlerTest.CHUNK_SIZE) * 10)));\n checkAllReadResponses(mResponses, checksumExpected);\n }",
"public void errorFileEscenario() {\n\t\tvisorEscenario.errorFileEscenario();\t\n\t}",
"public String readTextFromFile()\n\t{\n\t\tString fileText = \"\";\n\t\tString filePath = \"/Users/zcon5199/Documents/\";\n\t\tString fileName = filePath + \"saved text.txt\";\n\t\tFile inputFile = new File(fileName);\n\t\t\n\t\ttry\n\t\t{\n\t\t\tScanner fileScanner = new Scanner(inputFile);\n\t\t\twhile(fileScanner.hasNext())\n\t\t\t{\n\t\t\t\tfileText += fileScanner.nextLine() + \"\\n\";\n\t\t\t}\n\t\t\t\n\t\t\tfileScanner.close();\n\t\t\t\n\t\t}\n\t\tcatch(FileNotFoundException fileException)\n\t\t{\n\t\t\tJOptionPane.showMessageDialog(baseFrame, \"the file is not here :/\");\n\t\t}\n\t\t\n\t\treturn fileText;\n\t}",
"void readExcel(File existedFile) throws Exception;"
] |
[
"0.7254047",
"0.6574342",
"0.61771804",
"0.6152975",
"0.611319",
"0.6086633",
"0.60675424",
"0.5970891",
"0.59445083",
"0.59218025",
"0.5850923",
"0.5816189",
"0.57945347",
"0.5792632",
"0.5774386",
"0.57550275",
"0.574023",
"0.5736046",
"0.572663",
"0.5726569",
"0.57261103",
"0.56793827",
"0.5629111",
"0.56196177",
"0.56113714",
"0.5585507",
"0.55735105",
"0.55657923",
"0.5554129",
"0.5530217",
"0.5526559",
"0.55258054",
"0.55206054",
"0.549546",
"0.5469615",
"0.54558533",
"0.5452797",
"0.5451011",
"0.54502743",
"0.5447394",
"0.5446519",
"0.5439894",
"0.5432603",
"0.54288906",
"0.5418375",
"0.54137427",
"0.54132307",
"0.53788054",
"0.53765297",
"0.5369595",
"0.5366675",
"0.5355491",
"0.53552806",
"0.53425306",
"0.5320227",
"0.5319586",
"0.5316281",
"0.5313144",
"0.53113306",
"0.53093123",
"0.52975523",
"0.5292041",
"0.52879417",
"0.5287372",
"0.528428",
"0.5278269",
"0.527719",
"0.52746373",
"0.52742755",
"0.5273172",
"0.52721465",
"0.5271968",
"0.52675474",
"0.52671516",
"0.52605444",
"0.52546805",
"0.5251932",
"0.52504885",
"0.52449834",
"0.524126",
"0.5240399",
"0.5231589",
"0.52307767",
"0.5227164",
"0.52270675",
"0.5224435",
"0.5220889",
"0.52205384",
"0.5217677",
"0.52154845",
"0.5209992",
"0.5207683",
"0.5200524",
"0.5199914",
"0.51980585",
"0.5197264",
"0.51968163",
"0.51964533",
"0.51905894",
"0.51896125"
] |
0.6617738
|
1
|
end of readFile() initializes objects using switch
|
public void process (String st) {
Scanner sc = new Scanner (st);
if (!sc.hasNext()){
return;
}else{
switch (sc.next()){
case "port": addPort(sc);
break;
case "dock": addDock(sc, portMap);
break;
case "pship": addPassengerShip(sc);
break;
case "cship": addCargoShip(sc);
break;
case "person": addPerson(sc);
break;
case "job": addJob(shipMap,dockMap,portMap,sc, this.jobsBox);
}
}
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public void init()\r\n {\n readFile(inputFile);\r\n writeInfoFile();\r\n }",
"public void initCases(){\n\t\ttry {\n // This creates an object from which you can read input lines.\n BufferedReader reader = new BufferedReader(new FileReader(filename));\n \n for(int i = 0; i < cases.length; i++){\n \tcases[i] = reader.readLine();\n }\n \n reader.close();\n }\n\t\t//deals with any IO exceptions that may occur\n catch (IOException e) {\n System.out.println(\"Caught IO exception\");\n }\n\t}",
"private void readObject() {\n\t\t/* default - does nothing empty block */}",
"private void readObject() {/* default - does nothing empty block */\n\t}",
"private void readObject() {/*default - does nothing empty block */}",
"private void readObject() {/*default - does nothing empty block */}",
"private void readObject() {/*default - does nothing empty block */}",
"private void readObject() {/*default - does nothing empty block */}",
"private void readObject() {/*default - does nothing empty block */}",
"private void readObject() {/*default - does nothing empty block */}",
"private void readObject() {/*default - does nothing empty block */}",
"private void readObject() {/*default - does nothing empty block */}",
"private void readObject() {/*default - does nothing empty block */}",
"private void readObject() {/*default - does nothing empty block */}",
"@Override\n public void load() {\n File file = new File(path + \"/\" + \"rooms.txt\"); //Hold file of the riddles. riddles.txt should be placed in the root folder.\n Scanner scanner = null; //if the scanner can't load the file.\n\n try {\n scanner = new Scanner(file); // scanner for the file\n } catch (FileNotFoundException ex) {\n try {\n //if not such file exists create it.\n file.createNewFile();\n } catch (IOException ex1) {\n Logger.getLogger(LoadRooms.class.getName()).log(Level.SEVERE, null, ex1);\n return;\n }\n }\n while (scanner.hasNextLine()) { //if scanner har fundt next line of text in the file\n switch (scanner.nextLine()) {\n case \"[Room]:\": //if scanner fundt \"[Room]:\" case, get rooms attributes\n state = LOAD_ATTRIBUTES;\n break;\n case \"[Connections]:\"://if scanner fundt \"[Connections]:\" case, get connections from file\n state = LOAD_CONNECTIONS;\n break;\n\n default:\n break;\n }\n switch (state) {\n case LOAD_ATTRIBUTES: //case, that get rooms attributes and add them to room_list\n String name = scanner.nextLine();\n int timeToTravel = Integer.parseInt(scanner.nextLine());\n boolean isLocked = Boolean.parseBoolean(scanner.nextLine());\n boolean isTransportRoom = Boolean.parseBoolean(scanner.nextLine());\n Room newRoom = new Room(name, timeToTravel, isLocked, isTransportRoom);\n if (newRoom.isTransportRoom()) {\n newRoom.setExit(\"exit\", newRoom);\n newRoom.setExitDir(\"west\", newRoom);\n }\n rooms_list.add(newRoom);\n break;\n case LOAD_CONNECTIONS: //case that get connections betweem rooms in game\n while (scanner.hasNextLine()) {\n String[] string = scanner.nextLine().split(\",\");\n Room room = this.getRoomByName(string[0]);\n room.setExit(string[1], this.getRoomByName(string[1]));\n if (!this.getRoomByName(string[1]).isTransportRoom() && !room.isTransportRoom()) {\n room.setExitDir(string[2], getRoomByName(string[1]));\n }\n }\n break;\n default:\n break;\n }\n }\n }",
"private void handleInit() {\n\t\ttry {\n String filePath = \"/app/FOOD_DATA.txt\";\n String line = null;\n FileReader fileReader = new FileReader(filePath);\n BufferedReader bufferedReader = new BufferedReader(fileReader);\n while ((line = bufferedReader.readLine()) != null) {\n System.out.println(line);\n\n String[] foodData = line.split(\"\\\\^\");\n \t\tfor (int i = 2; i < foodData.length; i++) {\n \t\t\tif (foodData[i].equals(\"\")) {\n \t\t\t\tfoodData[i] = \"-1\";\n \t\t\t}\n \t\t}\n String foodName = foodData[0];\n String category = foodData[1];\n double calories = Double.parseDouble(foodData[2]);\n double sodium = Double.parseDouble(foodData[3]);\n double fat = Double.parseDouble(foodData[4]);\n double protein = Double.parseDouble(foodData[5]);\n double carbohydrate = Double.parseDouble(foodData[6]);\n Food food = new Food();\n food.setName(foodName);\n food.setCategory(category);\n food.setCalories(calories);\n food.setSodium(sodium);\n food.setSaturatedFat(fat);\n food.setProtein(protein);\n food.setCarbohydrate(carbohydrate);\n foodRepository.save(food);\n }\n bufferedReader.close();\n } catch (Exception e) {\n e.printStackTrace();\n } finally {\n \tcategories = Categories.MAIN_MENU;\n }\n\t}",
"private void readObject() {/* default - does nothing empty block */\n }",
"private void readObject() {\n /*default - does nothing empty block */\n }",
"@Override\r\n\tpublic void initialLoad() throws IOException {\n\t\t\r\n\t}",
"protected void initialize() {\n \tif(todo.equals(\"saveFile\")){\n \t\ttry {\n\t\t\t\tRecordMotorMovement.getInstance().saveFile(fileLoc);\n\t\t\t} catch (IOException e) {\n\t\t\t}\n \t\tisFinished = true;\n \t}else if(todo.equals(\"readFile\")){\n \t\ttry {\n\t\t\t\tRecordMotorMovement.getInstance().readFile(fileLoc);\n\t\t\t} catch (IOException e) {\n\t\t\t}\n \t\tisFinished = true;\n \t}else if(todo.equals(\"record\")){\n \t\t\n \t}\n }",
"@Override\n\tpublic void init(String file_name) { deserialize(file_name); }",
"abstract void initialize(boolean fromFile,int r,int c);",
"void init() throws IOException;",
"void init() throws IOException;",
"public void init() throws IOException;",
"private static void init()\n {\n try\n {\n ObjectInputStream ois = \n new ObjectInputStream(new FileInputStream(lexFile));\n lexDB = (HashMap)ois.readObject();\n ois.close();\n } catch (FileNotFoundException e) {\n System.err.println(\"File not found: \" + e.toString());\n e.printStackTrace();\n System.exit(-1);\n } catch (IOException e) {\n System.err.println(\"IO Exception: \" + e.toString());\n e.printStackTrace();\n System.exit(-1);\n } catch (ClassNotFoundException e) {\n System.err.println(\"Class Not Found Exception: \" + e.toString());\n e.printStackTrace();\n System.exit(-1);\n } // catch\n }",
"private void loadData(){\n try (BufferedReader br = new BufferedReader(new FileReader(this.fileName))) {\n String line;\n while((line=br.readLine())!=null){\n E e = createEntity(line);\n super.save(e);\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"private void readObject() {\n }",
"private void readObject() {}",
"private void readObject() {}",
"private void readObject() {}",
"private void initializeFile()\n\t{\n\t\tHighScore[] h={new HighScore(0,0,\" \"),new HighScore(0,0,\" \"),new HighScore(0,0,\" \"),\n\t\t\t\tnew HighScore(0,0,\" \"),new HighScore(0,0,\" \"),new HighScore(0,0,\" \"),\n\t\t\t\tnew HighScore(0,0,\" \"),new HighScore(0,0,\" \"),new HighScore(0,0,\" \"),\n\t\t\t\tnew HighScore(0,0,\" \")};\n\t\ttry \n\t\t{\n\t\t\tSystem.out.println(\"Hi1\");\n\t\t\tObjectOutputStream o=new ObjectOutputStream(new FileOutputStream(\"HighScores.dat\"));\n\t\t\to.writeObject(h);\n\t\t\to.close();\n\t\t} catch (FileNotFoundException e) {e.printStackTrace();}\n\t\tcatch (IOException e) {e.printStackTrace();}\n\t}",
"public static void init() {\n\t\tList<Object> objects = FileManager.readObjectFromFile(\"student.dat\");\n\t\tfor (Object o : objects)\n\t\t\tStudentList.add((Student) o);\n\t}",
"void init() throws IOException {\n\t\tif (this.type==FILE){\n\t\t\tstream.init(new FileInputStream(name));\n\t\t}\n\t\telse{\n\t\t\tURL url = new URL(name);\n\t\t\tstream.init((url.openStream()));\n\t\t}\n\t}",
"public void readFromFile() {\n\n\t}",
"private void createArctic(BufferedReader in) {\n try {\n String tempRegionName = in.readLine();\n int maxStaff = Integer.parseInt(in.readLine());\n int numStaff = Integer.parseInt(in.readLine());\n \n Staff[] readStaffList = new Staff[maxStaff]; //creating a local array of Staff; later to be fed as a field to the constructor \n for (int i = 0; i < numStaff; i++) {\n int id = Integer.parseInt(in.readLine());\n //readStaffList[i] = this.searchStaffTemp(id);\n readStaffList[i] = findStaff(id, 0, this.numStaff); //id is the same thing as staffNum in the staff class \n //creates an array of initialized staff objects by searching \n //using the staffNum read from the file\n }\n \n int maxAnimals = Integer.parseInt(in.readLine());\n int numAnimals = Integer.parseInt(in.readLine());\n \n Animal[] animals = new Animal[numAnimals]; //creating a local array of Animals;\n for (int i = 0; i < numAnimals; i++) {\n animals[i] = new Animal(in.readLine(), Integer.parseInt(in.readLine()));\n }\n \n regionList[this.numRegions] = new Arctic(readStaffList, animals, tempRegionName, new RegionSpec(numStaff, maxStaff, numAnimals, maxAnimals, Integer.parseInt(in.readLine()), Double.parseDouble(in.readLine())), \n Integer.parseInt(in.readLine()), Double.parseDouble(in.readLine()), Double.parseDouble(in.readLine()), Boolean.parseBoolean(in.readLine()));\n //constructor call \n } catch (IOException iox) {\n System.out.println(\"Error reading file\");\n }\n this.numRegions++; //updates the global field numRegions\n }",
"protected abstract void readFile();",
"@Override\n public void construct() throws IOException {\n \n }",
"@Override\n public void initialize() throws IOException {\n\n }",
"@Override\n\tpublic void reloadNewObjects() throws IOException\n\t{\n\n\t}",
"private void initiliaze() {\r\n\t\tthis.inputFile = cd.getInputFile();\r\n\t\tthis.flowcell = cd.getFlowcell();\r\n\t\tthis.totalNumberOfTicks = cd.getOptions().getTotalNumberOfTicks();\r\n\t\tthis.outputFile = cd.getOutputFile();\r\n\t\tthis.statistics = cd.getStatistic();\r\n\t}",
"public void init() throws IOException {\n setPersistance();\n Commit newCommit = new Commit(\"initial commit\", null);\n String newCommitCode = newCommit.getShaCode();\n File lol = new File(Main.ALL_COMMITS, newCommitCode);\n lol.createNewFile();\n if (lol.exists()) {\n Utils.writeObject(lol, newCommit);\n }\n Utils.writeObject(MASTERBRANCH, newCommitCode);\n Utils.writeObject(HEADFILE, newCommitCode);\n Utils.writeObject(HEADNAME, MASTERBRANCH.getName());\n }",
"@Override\n\tpublic void init() throws RemoteException {\n\t\ttry {\n\t\t\tFile f5 = new File(\"TxtData/warein.txt\");\n\t\t\tFileWriter fw5 = new FileWriter(f5);\n\t\t\tBufferedWriter bw1 = new BufferedWriter(fw5);\n\t\t\tbw1.write(\"\");\n\t\t} catch (Exception e) {\n\n\t\t}\n\t}",
"public void init(BinaryDataReader dataReader) throws IOException\n\t{\n\t}",
"public void load(){\n Player temp;\n try{\n FileInputStream inputFile = new FileInputStream(\"./data.sec\");\n ObjectInputStream objectIn = new ObjectInputStream(inputFile);\n temp = (Player)objectIn.readObject();\n Arena.CUR_PLAYER = temp;\n objectIn.close();\n inputFile.close(); \n }\n catch(FileNotFoundException e ){\n System.err.print(\"data.sec not found\");\n }\n catch(IOException e){\n System.out.println(\"Error 201\");\n }\n catch(ClassNotFoundException e){\n System.out.println(\"Error 202\");\n }\n }",
"@Override\n protected void initializeReader() {\n this.fileList = new ArrayList<>();\n this.fileListPosition = new AtomicInteger(0);\n this.currentTextAnnotation = new AtomicReference<>();\n }",
"public void handleLoad() throws IOException {\n File file = new File(this.path);\n\n // creates data directory if it does not exist\n file.getParentFile().mkdirs();\n\n // creates tasks.txt if it does not exist\n if (!file.exists()) {\n file.createNewFile();\n }\n\n Scanner sc = new Scanner(file);\n\n while (sc.hasNext()) {\n String longCommand = sc.nextLine();\n String[] keywords = longCommand.split(\" \\\\|\\\\| \");\n Task cur = null;\n switch (keywords[1]) {\n case \"todo\":\n cur = new Todo(keywords[2]);\n break;\n case \"deadline\":\n cur = new Deadline(keywords[2], keywords[3]);\n break;\n case \"event\":\n cur = new Event(keywords[2], keywords[3]);\n break;\n default:\n System.out.println(\"error\");\n break;\n }\n if (keywords[0].equals(\"1\")) {\n cur.markAsDone();\n }\n TaskList.getTaskLists().add(cur);\n }\n sc.close();\n }",
"@Override\n\t\tvoid loadData() throws IOException {\n\t\t\tsuper.loadData();\n\t\t}",
"public void init() throws IOException {\n restart(scan.getStartRow());\n }",
"private void initializeTestFile(File testFile) throws IOException {\n testReader = new ASCIIreader(testFile);\n }",
"public abstract void load() throws IOException;",
"private FileManager()\n {\n bookFile.open(\"bookdata.txt\");\n hisFile.open(\"history.txt\");\n idFile.open(\"idpassword.txt\");\n createIDMap();\n createHisMap(Customer.getInstance());\n }",
"public ObjReader(String filename){\n file = filename;\n }",
"public void readFile() throws NumberFormatException,FileNotFoundException {\n Scanner scanStar, scanMessier, scanPlanet;\n String raw_data;\n String[] values;\n Set<String> identifyName = new HashSet<>();\n // Create scanner to scan file\n scanStar = new Scanner(new File(filename[0]));\n scanMessier = new Scanner(new File(filename[1]));\n scanPlanet = new Scanner(new File(filename[2]));\n\n // Read data about Star and store\n Star star;\n while (scanStar.hasNext()){\n raw_data = scanStar.nextLine();\n values = processData(raw_data, 1);\n // Check whether there is the same object or the data is wrong\n if (values.length != 7 || identifyName.contains(values[0])){\n System.out.println(\"There are some mistakes in Star file\");\n System.exit(1);\n }\n star = new Star();\n star.setNumber(values[0]);\n star.setRa(Double.parseDouble(values[1]));\n star.setDecl(Double.parseDouble(values[2]));\n star.setMagn(Double.parseDouble(values[3]));\n star.setDistance(Double.parseDouble(values[4]));\n star.setType(values[5]);\n star.setConstellation(values[6]);\n // Add object to collection\n aos.add(star);\n identifyName.add(star.getNumber());\n }\n scanStar.close();\n\n // Read data about Messier and store\n Messier messier;\n while (scanMessier.hasNext()){\n raw_data = scanMessier.nextLine();\n values = processData(raw_data, 1);\n if (values.length < 6 || identifyName.contains('M' + values[0])){\n System.out.println(\"There are some mistakes in Messier file\");\n System.exit(1);\n }\n messier = new Messier();\n messier.setNumber(\"M\" + values[0]);\n messier.setRa(Double.parseDouble(values[1]));\n messier.setDecl(Double.parseDouble(values[2]));\n messier.setMagn(Double.parseDouble(values[3]));\n messier.setDistance(Double.parseDouble(values[4]));\n messier.setConstellation(values[5]);\n if (values.length == 7){\n messier.setDescription(values[6]);\n }else {\n messier.setDescription(\"-\");\n }\n // Add object to collection\n aos.add(messier);\n identifyName.add(messier.getNumber());\n }\n scanMessier.close();\n\n // Read data about Planet and store\n Planet planet;\n while (scanPlanet.hasNext()){\n raw_data = scanPlanet.nextLine();\n values = processData(raw_data, 0);\n if (values.length != 6 || identifyName.contains(values[0])){\n System.out.println(\"There are some mistakes in Planet file\");\n System.exit(1);\n }\n planet = new Planet();\n planet.setName(values[0]);\n planet.setRa(Double.parseDouble(values[1]));\n planet.setDecl(Double.parseDouble(values[2]));\n planet.setMagn(Double.parseDouble(values[3]));\n planet.setDistance(Double.parseDouble(values[4]));\n planet.setAlbedo(Double.parseDouble(values[5]));\n // Add object to collection\n aos.add(planet);\n identifyName.add(planet.getName());\n }\n scanPlanet.close();\n }",
"private void loadData() {\n\t\tlogger.trace(\"loadData() is called\");\n\t\t\n\t\ttry {\n\t\t\tFileInputStream fileIn = new FileInputStream(\"server-info.dat\");\n\t\t\tObjectInputStream in = new ObjectInputStream(fileIn);\n\t\t\tjokeFile = (String ) in.readObject();\n\t\t\tkkServerPort = (int) in.readObject();\n\t\t\tin.close();\n\t\t} catch (Exception e) {\n\t\t\tjokeFile = \"kk-jokes.txt\";\n\t\t\tkkServerPort = 5555;\n\t\t\t//e.printStackTrace();\n\t\t\tSystem.err.println(\"server-info.dat file is likely missing but it should be created automatically when this app is closed.\");\n\t\t\tlogger.info(\"server-info.dat file is likely missing but it should be created automatically when this app is closed.\");\n\t\t}\t\n\t}",
"@Override\n\tpublic boolean readFile(String filename) {\n\t\ttry {\n\t\t\tScanner input = new Scanner(new File(filename));\n\t\t\tString row = input.nextLine();\n\t\t\tString[] sarr = row.split(\",\");\n\t\t\tString ingredientsWatch = \"\";\n\t\t\t// Gets the String type of ingredients to watch\n\t\t\t// Identify the gender and create the Female or Male object\n\t\t\tif (sarr[0].equals(\"Female\")) {\n\t\t\t\tStringBuilder sBuilder =new StringBuilder();\n\t\t\t\tfor(int j =5;j<sarr.length-1;j++) {\n\t\t\t\t\tsBuilder=sBuilder.append(sarr[j].trim()+\",\");\t\n\t\t\t\t}\n\t\t\t\tsBuilder=sBuilder.append(sarr[sarr.length-1]);\n\t\t\t\tingredientsWatch = sBuilder.toString();\n\t\t\t\tFemale female=new Female(Float.parseFloat(sarr[1]), Float.parseFloat(sarr[2]), \n\t\t\t\t\t\tFloat.parseFloat(sarr[3]), Float.parseFloat(sarr[4]), ingredientsWatch);\n\t\t\t\tNutriByte.person=female;\n\t\t\t}else {\n\t\t\t\tStringBuilder sBuilder =new StringBuilder();\n\t\t\t\tfor(int j =5;j<sarr.length-1;j++) {\t\n\t\t\t\t\tsBuilder=sBuilder.append(sarr[j].trim()+\",\");\n\t\t\t\t}\n\t\t\t\tsBuilder=sBuilder.append(sarr[sarr.length-1]);\n\t\t\t\tingredientsWatch = sBuilder.toString();\n\t\t\t\t// Creates the object using its constructor\n\t\t\t\tMale male=new Male(Float.parseFloat(sarr[1]), Float.parseFloat(sarr[2]), \n\t\t\t\t\t\tFloat.parseFloat(sarr[3]), Float.parseFloat(sarr[4]), ingredientsWatch);\n\t\t\t\tNutriByte.person=male;\n\t\t\t\tinput.close();\n\t\t\t}\n\t\t} catch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t\treturn false;\n\t\t}\t\n\t\treturn true;\n\t}",
"private void init(){\r\n\t\t// already checked that this is a valid file and reader\r\n\t\ttokenizer = new StreamTokenizer(reader);\r\n\t\ttokenizer.slashSlashComments(true);\r\n\t\ttokenizer.slashStarComments(true);\r\n\t\ttokenizer.wordChars('_', '_');\r\n\t\ttokenizer.wordChars('.', '.');\r\n\t\ttokenizer.ordinaryChar('/');\r\n\t\ttokenizer.ordinaryChar('-');\r\n\t\tfillKeywords();\r\n\t\t//tokenChoose = new TokenChooser();\r\n\t}",
"public static void init() {\r\n\t\twines = read();\r\n\t\tread_tasteNotes(wines);\r\n\t\tidSorted = duplicate(wines);\r\n\t}",
"public Account load() throws IOException {\n Account account = new Account();\n try {\n FileReader fileReader = new FileReader(fileName);\n BufferedReader bufferedReader = new BufferedReader(fileReader);\n String line;\n while ((line = bufferedReader.readLine()) != null) {\n //if (line.contains(\"#\")) { continue; }\n String[] info = line.split(\" @ \");\n\n switch (info[0]) {\n case \"INIT\":\n account.setToInitialize(Boolean.parseBoolean(info[1]));\n break;\n case \"BS\":\n account.setBaseSavings(Float.parseFloat((info[1])));\n break;\n case \"INC\":\n parseIncome(info, account);\n break;\n case \"EXP\":\n parseExpenditure(info, account);\n break;\n case \"G\":\n parseGoal(info, account);\n break;\n case \"INS\":\n parseInstalment(info, account);\n break;\n case \"LOA\":\n parseLoan(info, account);\n break;\n case \"BAN\":\n parseBankAccount(info, account);\n break;\n default:\n throw new DukeException(\"OOPS!! Your file has been corrupted/ input file is invalid!\");\n }\n }\n bufferedReader.close();\n } catch (FileNotFoundException err) {\n final File parentDir = new File(\"dataFG\");\n parentDir.mkdir();\n final String hash = \"moneyAccount\";\n final String fileName = hash + \".txt\";\n final File file = new File(parentDir, fileName);\n file.createNewFile();\n } catch (IOException | DateTimeParseException | DukeException e) {\n e.printStackTrace();\n }\n return account;\n }",
"public static void initialize() {\r\n\t\tjson = new JSONFile(filePath);\t\r\n\t}",
"public void read() {\n String line = \"\";\n int counter = 0;\n try {\n input = new BufferedReader(new FileReader(file));\n while (line != null) {\n if (!(line.equals(\"arglebargle\"))) {//not a default\n names.add(line);\n }\n }\n input.close();\n }\n catch (IOException e) {\n }\n }",
"public void loadVehicles() throws IOException {\n File veFile = new File(VE_FILE);\n\n //Checks is file created\n if (!veFile.exists()) {\n veFile.createNewFile(); //If not, creates new file\n System.out.print(\"The data file vehicles.txt is not exits. \" +\n \"Creating new data file vehicles.txt... \" +\n \"Done!\");\n this.numberOfVehicle = 0; //New data file with the number of Vehicle is 0\n } else {\n //If file is existed, so loading this data file\n System.out.print(\"The data file vehicles.txt is found. \" +\n \"Data of vehicles is loading...\");\n\n //Loads text file into buffer\n try (BufferedReader br = new BufferedReader(new FileReader(VE_FILE))) {\n String line, contractId, type, licensePlate, chassisId, enginesId;\n\n //Reads number of vehicles\n line = br.readLine();\n if (line == null) return;\n this.numberOfVehicle = Integer.parseInt(line);\n\n for (int i = 0; i < this.numberOfVehicle; i++) {\n //Reads Vehicle's information\n contractId = br.readLine();\n type = br.readLine();\n licensePlate = br.readLine();\n chassisId = br.readLine();\n enginesId = br.readLine();\n\n\n //Create new instance of Vehicle and adds to Vehicle bank\n this.vehicles.add(new Vehicle(Integer.parseInt(contractId), type, licensePlate, chassisId, enginesId));\n }\n }\n System.out.print(\"Done!\");\n }\n }",
"public void start(){\n\t\tterritoryCardsReader.readCards(1,cards);\n\t\tterritoryCardsReader.readCards(2,cards);\n\t\tterritoryCardsReader.readCards(3,cards);\n\t\t\n\t\tbuildingCardsReader.readCards(1, cards);\n\t\tbuildingCardsReader.readCards(2, cards);\n\t\tbuildingCardsReader.readCards(3, cards);\n\t\t\n\t\tcharacterCardsReader.readCards(1, cards);\n\t\tcharacterCardsReader.readCards(2, cards);\n\t\tcharacterCardsReader.readCards(3, cards);\n\t\t\n\t\tventureCardsReader.readCards(1, cards);\n\t\tventureCardsReader.readCards(2, cards);\n\t\tventureCardsReader.readCards(3, cards);\n\t\t\n\t\tleaderCardsReader.readCards(cards);\n\t\t\n\t\tboardResourcesAndStartingPlayerResourcesReader.readResources(bonus);\n\t\tboardResourcesAndStartingPlayerResourcesReader.readStartingPlayerResources(bonus);\n\t\tboardResourcesAndStartingPlayerResourcesReader.readFaithTrack(bonus);\n\t\tboardResourcesAndStartingPlayerResourcesReader.readPersonalBoardTiles(bonus, \"advanced\");\n\t\tboardResourcesAndStartingPlayerResourcesReader.readTimers(timer);\n\t\t\n\t\texcommunicationTilesReader.readCards(1, cards);\n\t\texcommunicationTilesReader.readCards(2, cards);\n\t\texcommunicationTilesReader.readCards(3, cards);\n\t\t\n\t\t\n\t}",
"private static void init() throws IOException, BusinessException {\n\t\tMap<String, String> books = new HashMap<String, String>();\n\t\tbooks.put(\"tranc1-in\", Entry.class.getClassLoader().getResource(\"TRANC1-IN.book\").getPath());\n\t\tbooks.put(\"tranc1-out\", Entry.class.getClassLoader().getResource(\"TRANC1-OUT.book\").getPath());\n\t\tBookStore.loadBooks(books);\n\t}",
"static void inicializarentrada(){\n try {\n archivo_entrada= new FileInputStream(\"src/serializacion/salida.txt\");\n } catch (FileNotFoundException ex) {\n System.out.println(\"Error al abrir el archivo\");\n }\n \n try {\n lector= new ObjectInputStream(archivo_entrada);\n } catch (IOException ex) {\n System.out.println(\"Error al acceder al archivo\");\n }\n }",
"private void init() throws IOException {\n //Initializing a new Display\n this.display = new Display(title, width, height);\n this.background = new SpriteSheet(gfx.loader(\"/images/RoadTile3.png\"));\n this.inputHandler = new InputHandler(this.display);\n Assets.init();\n\n gameState = new GameState();\n StateManager.setState(gameState);\n\n player = new Player();\n enemies = new ArrayList<>();\n }",
"@Override\n public void readDataFromTxtFile()\n throws NumberFormatException, DepartmentCreationException, EmployeeCreationException {\n\n }",
"public void initTiles() throws IOException \n\t{\n\t\n\t}",
"private Agent loadFromFile(String _login)\n {\n Agent agent = new Agent();\n File file = new File(_login + \".csv\");\n FileReader fr;\n BufferedReader br;\n String line;\n try {\n fr = new FileReader(file);\n br = new BufferedReader(fr);\n\n line = br.readLine();\n\n int numCients;\n { // to restrain the scope of csvData\n String[] csvData = line.split(\",\");\n agent.setID(Integer.parseInt(csvData[0]));\n agent.setName(csvData[1]);\n agent.setSalary(Double.parseDouble(csvData[2]));\n agent.setSalesBalance(Double.parseDouble(csvData[3]));\n\n numCients = Integer.parseInt(csvData[4]);\n }\n\n for(int i = 0; i<numCients; i++) {\n line = br.readLine();\n\n Client client = new Client();\n int numProp;\n\n {\n String[] csvData = line.split(\",\");\n client.setID(Integer.parseInt(csvData[0]));\n client.setName(csvData[1]);\n client.setIncome(Double.parseDouble(csvData[2]));\n\n numProp = Integer.parseInt(csvData[3]);\n }\n\n for(int j=0; j<numProp; j++)\n {\n line = br.readLine();\n\n String[] csvData = line.split(\",\");\n\n if(csvData[0].equals(\"house\")) {\n House property = new House();\n\n property.setAddress(csvData[1]);\n property.setNumRoom(Integer.parseInt(csvData[2]));\n property.setPrice(Double.parseDouble(csvData[3]));\n property.setSize(Double.parseDouble(csvData[4]));\n property.setHasGarage(Boolean.parseBoolean(csvData[5]));\n\n property.setHasGarden(Boolean.parseBoolean(csvData[6]));\n property.setHasPool(Boolean.parseBoolean(csvData[7]));\n\n client.addProperty(property);\n }\n else if(csvData[0].equals(\"apt\"))\n {\n Apartment property = new Apartment();\n\n property.setAddress(csvData[1]);\n property.setNumRoom(Integer.parseInt(csvData[2]));\n property.setPrice(Double.parseDouble(csvData[3]));\n property.setSize(Double.parseDouble(csvData[4]));\n property.setHasGarage(Boolean.parseBoolean(csvData[5]));\n\n property.setHasTerrace(Boolean.parseBoolean(csvData[6]));\n property.setHasElevator(Boolean.parseBoolean(csvData[7]));\n property.setFloor(Integer.parseInt(csvData[8]));\n property.setNumber(Integer.parseInt(csvData[9]));\n\n client.addProperty(property);\n }\n }\n\n agent.addClient(client);\n }\n fr.close();\n br.close();\n return agent;\n }\n catch (NumberFormatException nfEx) {\n JOptionPane.showMessageDialog(null, \"There was a problem when retrieving \" +\n \"the agent's data.\\n Please try again\");\n return null;\n }\n catch (IOException ioEx) {\n JOptionPane.showMessageDialog(null, \"This user doesn't exist....\");\n return null;\n }\n }",
"public void loadData() {\n Path path= Paths.get(filename);\n Stream<String> lines;\n try {\n lines= Files.lines(path);\n lines.forEach(ln->{\n String[] s=ln.split(\";\");\n if(s.length==3){\n try {\n super.save(new Teme(Integer.parseInt(s[0]),Integer.parseInt(s[1]),s[2]));\n } catch (ValidationException e) {\n e.printStackTrace();\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }else\n System.out.println(\"linie corupta in fisierul teme.txt\");});\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"private void init() {\n\n MyFileReader finalResultReader = null;\n\n finalResultReader = new MyFileReader(FilePath.billboardCombineResultPath);\n\n String line = \"\";\n\n while (true) {\n\n line = finalResultReader.getNextLine();\n if (line == null)\n break;\n\n String[] elements = line.split(\" \");\n if (elements.length == 1)\n continue; // skip those billboard which can not influence any route\n\n String panelID = elements[0].split(\"~\")[0]; // panelID~weeklyImpression\n int weeklyImpression = Integer.parseInt(elements[0].split(\"~\")[1]);\n\n\n List<Integer> routeIDs = new ArrayList<>();\n\n for (int i = 1; i < elements.length; i++) {\n\n int routeID = Integer.parseInt(elements[i]);\n //if (routeID < length) {\n routeIDs.add(routeID);\n //}\n }\n\n panelIDs.add(panelID);\n weeklyImpressions.add(weeklyImpression);\n routeIDsOfBillboards.add(routeIDs);\n\n }\n setUpRouteIDsAndIndexes();\n finalResultReader.close();\n }",
"void loadNextSplit() throws IOException {\n\t\tcurrentRAF = null;\n\t\t\n\t\tif (! fsIterator.hasNext()) return;\n\n\t\t// Go through the loop for one iteration loop cycle only\n\t\tint cycle = fsIterator.cycle();\n\n\t\twhile (cycle > 0) {\n\t\t\tfsIterator.next();\n\t\t\tloadNextSplitCurrentDir();\n\t\t\tif (hasNext()) \n\t\t\t\tbreak;\n\t\t\tcycle --;\n\t\t}\n\t\t\n\t}",
"public void readFromFile() {\n FileInputStream fis = null;\n try {\n //reaad object\n fis = new FileInputStream(file);\n ObjectInputStream ois = new ObjectInputStream(fis);\n TravelAgent travelAgent = (TravelAgent)ois.readObject();\n travelGUI.setTravelAgent(travelAgent);\n ois.close();\n }\n catch (Exception e) {\n System.out.println(e.getMessage());\n if (fis != null) {\n try {\n fis.close();\n }\n catch (IOException e2) {\n System.out.println(e2.getMessage());\n }\n }\n return;\n }\n finally {\n if (fis != null) {\n try {\n fis.close();\n }\n catch (IOException e2) {\n System.out.println(e2.getMessage());\n }\n }\n }\n if (fis != null) {\n try {\n fis.close();\n }\n catch (IOException e2) {\n System.out.println(e2.getMessage());\n }\n }\n }",
"public T caseFile(File object) {\n\t\treturn null;\n\t}",
"@Test\n\tpublic void ReadFile()\n\t{\n\t\tboolean thrown = false;\n \n\t\t\t ConnectMain connectstart=new ConnectMain();\n \n\t\t\t \ttry\n\t\t\t \t{\n\t\t\t \t Integer.parseInt(\"/\");\n\t\t\t \t}\n\t\t\t \tcatch(NumberFormatException e)\n\t\t\t \t{\n\t\t\t \t\tthrown = true;\n\t\t\t \t}\n\t\t\t \tassertTrue(thrown);\t\n\t\t\t \tconnectstart.setCols_default(7);\n\t\t\t \tconnectstart.setRows_default(6);\n\t\t\t \tconnectstart.setConnects_default(4);\n\t\t\t \tconnectstart.setPlayers_default(2);\n\t\t }",
"@SuppressWarnings(\"AccessingNonPublicFieldOfAnotherObject\")\n\t// Accessing final fields of a private inner class that is not exported\n\tprivate void processFile(boolean initial)\n\t{\n\t\tlog(Level.INFO, \"Processing MOTD file \" + f.getPath());\n\t\tBufferedReader in = null;\n\t\tMessage curr = null;\n\t\tfinal LinkedList<Message> stack = new LinkedList<Message>();\n\n\t\ttry\n\t\t{\n\t\t\tin = new BufferedReader(new FileReader(f));\n\n\t\t\twhile (in.ready())\n\t\t\t{\n\t\t\t\tString line = in.readLine().trim();\n\n\t\t\t\tif (line.charAt(0) == '#') continue;\n\t\t\t\tif (line.equals(\"[Message]\"))\n\t\t\t\t{\n\t\t\t\t\tif (curr != null) stack.push(curr);\n\t\t\t\t\tcurr = new Message();\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tif (curr == null) continue;\n\t\t\t\tint div = line.indexOf('=');\n\t\t\t\tif (div == -1) continue;\n\n\t\t\t\tString field = line.substring(0,div).toLowerCase();\n\t\t\t\tString value = line.substring(div+1);\n\n\t\t\t\tif (field.equals(\"id\"))\n\t\t\t\t{\n\t\t\t\t\tcurr.id = Integer.parseInt(value);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif (initial) continue; // We only care for ids in initial pass\n\t\t\t\tif (field.equals(\"active\"))\n\t\t\t\t{\n\t\t\t\t\tcurr.active = Boolean.valueOf(value);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif (field.equals(\"title\"))\n\t\t\t\t{\n\t\t\t\t\tcurr.title = value;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif (field.equals(\"short\"))\n\t\t\t\t{\n\t\t\t\t\tcurr.mshort = value;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif (field.equals(\"long\"))\n\t\t\t\t{\n\t\t\t\t\tcurr.mlong = value;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif (field.equals(\"from\"))\n\t\t\t\t{\n//\t\t\t\t\tcurr.from = new Date(value).getTime();\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif (field.equals(\"to\"))\n\t\t\t\t{\n//\t\t\t\t\tcurr.to = new Date(value).getTime();\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif (field.equals(\"posterid\"))\n\t\t\t\t{\n\t\t\t\t\tcurr.poster_uid = value;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif (field.equals(\"postername\"))\n\t\t\t\t{\n\t\t\t\t\tcurr.poster_name = value;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif (field.equals(\"showunix\")) continue;\n\n\t\t\t\tlog(Level.WARNING, \"Unknown Field '\" + field + \"'\");\n\t\t\t}\n\t\t}\n\t\tcatch (IOException ex)\n\t\t{\n\t\t\tlog(Level.WARNING, ex);\n\t\t}\n\t\tcatch (Throwable ex)\n\t\t{\n\t\t\tlog(Level.SEVERE, ex.getMessage());\n\t\t}\n\t\tfinally\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\tin.close();\n\t\t\t}\n\t\t\tcatch (IOException ex)\n\t\t\t{\n\t\t\t}\n\t\t}\n\n\t\tif (curr != null) stack.push(curr);\n\t\tlastModified = f.lastModified();\n\n\t\tif (initial)\n\t\t{\n\t\t\tif (stack.size() > 0) lastId = stack.getLast().id;\n\t\t\treturn;\n\t\t}\n\t\tfor (Message m : stack)\n\t\t{\n\t\t\tif (m.id > lastId)\n\t\t\t{\n\t\t\t\tlog(Level.INFO, \"Sending MOTD Notice #\" + m.id);\n\t\t\t\tgetInstance().message(channel, m.toString());\n\t\t\t\tlastId = m.id;\n\t\t\t}\n\t\t}\n\t}",
"private void initData() {\n\t\tnamesInfo = new NameSurferDataBase(fileName);\n\n\t}",
"public SplitFile() {\n\t}",
"@PostConstruct\n\tpublic void init() throws IOException {\n\t\tfsService.parseFileAndBootstrapDb();\n\t}",
"public void readObjectDescription(String fileName) {\n Scanner in;\n try {\n in = new Scanner(new File(fileName));\n // Read the number of vertices\n numCtrlPoints = in.nextInt();\n controlPoints = new Point[numCtrlPoints];\n \n // Read the vertices\n for (int i = 0; i < numCtrlPoints; i++) {\n // Read a vertex\n int x = in.nextInt();\n int y = in.nextInt();\n //vertexArray[i] = new Point(x, y);\n controlPoints[i] = new Point(x, y);\n }\n } catch (FileNotFoundException e) {\n System.out.println(e);\n }\n\n }",
"private List<String> init(Path path) throws Exception {\n List<String> lines = Files.readAllLines(path);\n if (lines.size() != 0) {\n int numberOfFields = Integer.parseInt(lines.get(0));\n fillFieldsList(lines, numberOfFields);\n fillPlayersList(lines, numberOfFields);\n } else {\n throw new FileEmptyException();\n }\n return lines;\n }",
"protected abstract Object readFile(BufferedReader buf) throws IOException, FileParseException;",
"public void initialise_new_game() {\n\n data.read_from_file(\"maxus2.txt\");\n\n mySound.initialise();\n\n pacman.init();\n ghost.init();\n\n score.initialise();\n }",
"void readFiles(Boolean smart) \n\t//throws IOException// more here for safety\n\t{\n\t\tint i;\n\t\tfor (i = 0; i<165; ++i)\n\t\tfor (int j = 0; j<11; ++j)\n\t\t{\t//if(smart)memoryFile.readInt(board(i,j));\n\t\t\t//else \n\t\t\t\tboard[i][j] = 0;\n\t\t}\n\t\t//try memoryFileStream.close(); catch (IOException e);\n\t}",
"@SuppressWarnings(\"unused\")\n private void _read() {\n }",
"private void lesFil()\n\t{\n\t\tDATAFIL = datafil(false);\n\n\t\ttry ( ObjectInputStream innfil = new ObjectInputStream( new FileInputStream( DATAFIL ) ) )\n\t\t{\n\t\t\tbr = (Boligregister) innfil.readObject();\n\t\t\tvisMelding( \"Data er hentet fra fil.\" );\n\t\t}\n\t\tcatch(ClassNotFoundException cnfe)\n\t\t{\n\t\t\tvisMelding( \"<html>Feil:<br><br>\" + cnfe.getMessage() + \"<br><br>Oppretter tom datafil. Tar vare på gammel datafil.</html>\" );\n\t\t\ttomtRegister();\n\t\t\tDATAFIL = datafil(true);\n\t\t\tskrivTilFil(false);\n\t\t}\n\t\tcatch(FileNotFoundException fne)\n\t\t{\n\t\t\tvisMelding( \"Ingen datafil funnet. Oppretter tom datafil.\" );\n\t\t\ttomtRegister();\n\t\t\tskrivTilFil(false);\n\t\t}\n\t\tcatch(IOException ioe)\n\t\t{\n\t\t\tvisMelding( \"<html>Innlesingsfeil. Oppretter tom datafil. Tar vare på gammel datafil.</html>\" );\n\t\t\ttomtRegister();\n\t\t\tDATAFIL = datafil(true);\n\t\t\tskrivTilFil(false);\n\t\t}\n\t}",
"private void loadData()\n {\n try\n {\n //Reads in the data from default file\n System.out.println(\"ATTEMPTING TO LOAD\");\n allGroups = (ArrayList<CharacterGroup>)serial.Deserialize(\"All-Groups.dat\");\n System.out.println(\"LOADED\");\n loadSuccessful = true;\n \n //If read is successful, save backup file in case of corruption\n try\n {\n System.out.println(\"SAVING BACKUP\");\n serial.Serialize(allGroups, \"All-Groups-backup.dat\");\n System.out.println(\"BACKUP SAVED\");\n } catch (IOException e)\n {\n System.out.println(\"FAILED TO WRITE BACKUP DATA\");\n }\n } catch (IOException e)\n {\n //If loading from default file fails, first try loading from backup file\n System.out.println(\"READING FROM DEFAULT FAILED\");\n try\n {\n System.out.println(\"ATTEMPTING TO READ FROM BACKUP\");\n allGroups = (ArrayList<CharacterGroup>)serial.Deserialize(\"All-Groups-backup\");\n System.out.println(\"READING FROM BACKUP SUCCESSFUL\");\n loadSuccessful = true;\n } catch (IOException ex)\n {\n //If reading from backup fails aswell generate default data\n System.out.println(\"READING FROM BACKUP FAILED\");\n allGroups = new ArrayList();\n } catch (ClassNotFoundException ex){}\n } catch (ClassNotFoundException e){}\n }",
"public Object readObject(File file, int format) throws IOException, FileNotFoundException;",
"public void inici() {\n\t\n if (filename == null) {\n \t//System.err.println(Resources.getResource(\"./modelo/cube.obj\"));\n \t filename = Resources.getResource(\"./modelo/cube.obj\");\n if (filename == null) {\n System.err.println(\"modelo/cube.obj nots found\");\n System.exit(1);\n }\n\t}\n\t}",
"public static void load(FileIO fileIO) \r\n\t{\n\t\t\r\n\t}",
"public abstract void readFromFile( ) throws Exception;",
"public void fillFromFile()\n\t{\n\t\tJFileChooser fc = new JFileChooser();\t//creates a new fileChooser object\n\t\tint status = fc.showOpenDialog(null);\t//creates a var to catch the dialog output\n\t\tif(status == JFileChooser.APPROVE_OPTION)\t\n\t\t{\n\t\t\tFile selectedFile = fc.getSelectedFile ( );\n\t\t\tthis.fileName = selectedFile;\n\t\t\tScanner file = null; //scans the file looking for information to load\n\n\t\t\tif(selectedFile.exists())\n\t\t\t{\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tfile = new Scanner(fileName); //scans the input file\n\t\t\t\t}\n\t\t\t\tcatch(Exception IOException)\n\t\t\t\t{\n\t\t\t\t\tJOptionPane.showConfirmDialog (null, \"Unable to import data from the list\");\n\t\t\t\t\tSystem.exit (-1);\n\t\t\t\t}//if there was an error it will pop up this message\n\t\t\t\t\n\t\t\t\tString str = file.nextLine ( ); //names the line\n\t\t\t\tString [] header = str.split (\"\\\\|\"); //splits the line at the |\n\t\t\t\tsetCourseNumber(header[1]);\n\t\t\t\tsetCourseName(header[0]);\n\t\t\t\tsetInstructor(header[2]);\n\t\t\t\t\n\t\t\t\twhile(file.hasNextLine ( ))\n\t\t\t\t{\n\t\t\t\t\tstr = file.nextLine ( ); //names the line\n\t\t\t\t\tString [] tokens = str.split (\"\\\\|\"); //splits the line at the |\n\t\t\t\t\tStudent p = new Student();\n\n\t\t\t\t\ttry\n\t\t\t\t\t{\n\t\t\t\t\t\tp.setStrNameLast (String.valueOf (tokens[0]));\n\t\t\t\t\t\tp.setStrNameFirst (String.valueOf (tokens[1]));\n\t\t\t\t\t\tp.setStrMajor (String.valueOf (tokens[2]));\n\t\t\t\t\t\tp.setClassification (tokens[3]);\n\t\t\t\t\t\tp.setiHoursCompleted (new Integer (tokens[4]).intValue ( ));\n\t\t\t\t\t\tp.setfGPA (new Float (tokens[5]).floatValue ( ));\n\t\t\t\t\t\tp.setStrStudentPhoto (String.valueOf (tokens[6]));\n\t\t\t\t\t//creates a person object and then populates it with an array of scanned input values\n\t\t\t\t\t\tclassRoll.add (p);\n\t\t\t\t\t\t}//creates a person object and then populates it with an array of scanned input values\n\t\t\t\t\t\tcatch(Exception IOException)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tIOException.printStackTrace ( );\n\t\t\t\t\t\t\tJOptionPane.showMessageDialog (null, \"Bad input record: '\" + str + \"'\" + IOException.getMessage());\n\t\t\t\t\t\t}//pops up a message if there were any errors reading from the file\n\t\t\t\t}//continues through the file until there are no more lines to scan\n\t\t\tfile.close ( ); //closes the file\n\n\t\t\t\tif(selectedFile.exists ( )==false)\n\t\t\t\t{\n\t\t\t\t\ttry\n\t\t\t\t\t{\n\t\t\t\t\t\tthrow new Exception();\n\t\t\t\t\t}\n\t\t\t\t\tcatch (Exception IOException)\n\t\t\t\t\t{\n\t\t\t\t\t\tJOptionPane.showMessageDialog (null, \"Bad input record: '\" + selectedFile + \"' \" + IOException.getMessage());\n\t\t\t\t\t}\n\t\t\t\t}//if the user picks a file that does not exist this error message will be caught.\n\t\t\t}\n\t\t}//if the input is good it will load the information from the selected file to and Array List\n\t\t\telse\n\t\t\t{\n\t\t\t\tSystem.exit (0);\n\t\t\t}\n\t\tthis.saveNeed = true;\n\n\t\t}",
"private void load(FileInputStream input) {\n\t\t\r\n\t}",
"private void loadEnvironment(String filename){\n try (BufferedReader reader = new BufferedReader(new FileReader(filename))) {\n String line;\n while ((line = reader.readLine()) != null) {\n String[] info = line.split(\",\");\n String type = info[TYPE_INDEX];\n type = type.replaceAll(\"[^a-zA-Z0-9]\", \"\"); // remove special characters\n Point coordinate = new\n Point(Double.parseDouble(info[POS_X_INDEX]), Double.parseDouble(info[POS_Y_INDEX]));\n\n switch (type) {\n case \"Player\" -> this.player = new Player(coordinate, Integer.parseInt(info[ENERGY_INDEX]));\n case \"Zombie\" -> {\n entityList.add(new Zombie(coordinate, type));\n zombieCounter++;\n }\n case \"Sandwich\" -> {\n entityList.add(new Sandwich(coordinate, type));\n sandwichCounter++;\n }\n case \"Treasure\" -> this.treasure = new Treasure(coordinate, type);\n default -> throw new BagelError(\"Unknown type: \" + type);\n }\n }\n } catch (IOException e) {\n e.printStackTrace();\n System.exit(-1);\n }\n }",
"protected abstract E readFile() throws Exception;",
"abstract void read();",
"private ControlloFile() {\n\t}",
"private void initData() {\n\t}",
"public void init(String tmpInputFile)\r\n {\n readFile(tmpInputFile);\r\n writeInfoFile();\r\n }",
"public static void load(){\n StringBuilder maleNamesString = new StringBuilder();\n try (Scanner maleNamesFile = new Scanner(mnames)){\n while (maleNamesFile.hasNext()) {\n maleNamesString.append(maleNamesFile.next());\n }\n }\n catch(FileNotFoundException e){\n e.printStackTrace();\n return;\n }\n\n //Create a string from the fnames.json file\n StringBuilder femaleNamesString = new StringBuilder();\n try (Scanner femaleNamesFile = new Scanner(fnames)){\n while (femaleNamesFile.hasNext()) {\n femaleNamesString.append(femaleNamesFile.next());\n }\n }\n catch(FileNotFoundException e){\n e.printStackTrace();\n return;\n }\n\n //Create a string from the snames.json file\n StringBuilder surNamesString = new StringBuilder();\n try (Scanner surNamesFile = new Scanner(snames)){\n while (surNamesFile.hasNext()) {\n surNamesString.append(surNamesFile.next());\n }\n\n }\n catch(FileNotFoundException e){\n e.printStackTrace();\n return;\n }\n\n //Create a string from the locations.json file\n StringBuilder locationsString = new StringBuilder();\n try (Scanner locationsFile = new Scanner(locationsJson)){\n while (locationsFile.hasNext()) {\n locationsString.append(locationsFile.next());\n }\n\n }\n catch(FileNotFoundException e){\n e.printStackTrace();\n return;\n }\n\n maleNames = (Names)convertJsonToObject(maleNamesString.toString(), new Names());\n\n femaleNames = (Names)convertJsonToObject(femaleNamesString.toString(), new Names());\n\n surNames = (Names)convertJsonToObject(surNamesString.toString(), new Names());\n\n locations = (Locations)convertJsonToObject(locationsString.toString(), new Locations());\n }",
"private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException {\n in.defaultReadObject();\n\n _firstTime = true;\n _isReset = false;\n }"
] |
[
"0.67005867",
"0.64866555",
"0.6441349",
"0.64351374",
"0.6334809",
"0.6334809",
"0.6334809",
"0.6334809",
"0.6334809",
"0.6334809",
"0.6334809",
"0.6334809",
"0.6334809",
"0.6334809",
"0.63115525",
"0.6278503",
"0.6276174",
"0.6249878",
"0.62273407",
"0.6212856",
"0.61983114",
"0.6168374",
"0.6083407",
"0.6083407",
"0.6047175",
"0.5987926",
"0.5937094",
"0.59304816",
"0.5914119",
"0.5914119",
"0.5914119",
"0.5910836",
"0.59057903",
"0.5882246",
"0.5872853",
"0.58246565",
"0.5810963",
"0.5807047",
"0.57923156",
"0.57365125",
"0.5736104",
"0.57210886",
"0.57097805",
"0.57065034",
"0.5693042",
"0.5667216",
"0.5654763",
"0.56533855",
"0.5652662",
"0.5645367",
"0.5642657",
"0.5633017",
"0.5625605",
"0.5624473",
"0.5587737",
"0.5574007",
"0.55513704",
"0.5548271",
"0.5548072",
"0.55453193",
"0.55357844",
"0.55330515",
"0.5531419",
"0.55306333",
"0.5530235",
"0.55135316",
"0.5511049",
"0.55078936",
"0.55076766",
"0.54969496",
"0.5495038",
"0.5474098",
"0.546174",
"0.5443352",
"0.54421484",
"0.54334366",
"0.5430623",
"0.5424487",
"0.5419948",
"0.54179233",
"0.54177207",
"0.5413146",
"0.5404131",
"0.5399044",
"0.53923976",
"0.5387831",
"0.5381531",
"0.53714144",
"0.5369284",
"0.53685",
"0.5366701",
"0.5365341",
"0.5360185",
"0.5359196",
"0.53590953",
"0.5353338",
"0.5342429",
"0.53389287",
"0.533432",
"0.53254503",
"0.53227425"
] |
0.0
|
-1
|
Helper method to start jobs for ports add port to port list and everything list
|
public void addPort(Scanner sc){
currentPort = new SeaPort(sc);
ports.add(currentPort);
hashMap.put(currentPort.getIndex(), currentPort);
portMap.put(currentPort.getIndex(), currentPort);
everything.add(currentPort);
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public void start(int port);",
"public void addPorts(){\n\t\t\n\t}",
"private void initPortSettings() {\n\n\t\tList<PortSpecification> portSpecification = XMLConfigUtil.INSTANCE.getComponent(componentName)\n\t\t\t\t.getPort().getPortSpecification();\n\n\t\tportDetails = new ArrayList<PortDetails>();\n\t\tports = new HashMap<String, Port>();\n\t\tPortTypeEnum pEnum = null;\n\t\tPortAlignmentEnum pAlignEnum = null;\n\n\t\tfor (PortSpecification p : portSpecification) {\n\t\t\tpAlignEnum = PortAlignmentEnum.fromValue(p.getPortAlignment().value());\n\t\t\tsetPortCount(pAlignEnum, p.getNumberOfPorts(), p.isChangePortCountDynamically());\n\t\t\tfor(PortInfo portInfo :p.getPort()){\n\t\t\t\tString portTerminal = portInfo.getPortTerminal();\n\t\t\t\tpEnum = PortTypeEnum.fromValue(portInfo.getTypeOfPort().value());\n\t\t\t\t\n\t\t\t\tPort port = new Port(portInfo.getLabelOfPort(),\n\t\t\t\t\t\tportTerminal, this, getNumberOfPortsForAlignment(pAlignEnum), pEnum\n\t\t\t\t\t\t\t\t, portInfo.getSequenceOfPort(), p.isAllowMultipleLinks(), p.isLinkMandatory(), pAlignEnum);\n\t\t\t\tlogger.trace(\"Adding portTerminal {}\", portTerminal);\n\t\t\t\t\n\t\t\t\tports.put(portTerminal, port);\n\t\t\t}\n\t\t\tPortDetails pd = new PortDetails(ports, pAlignEnum, p.getNumberOfPorts(), p.isChangePortCountDynamically(), p.isAllowMultipleLinks(), p.isLinkMandatory());\n\t\t\tportDetails.add(pd);\n\t\t}\n\t\t\n\t}",
"public void startNetwork(int port);",
"public chatd(String ports, int port)\r\n {\r\n this.portNumb = port;\r\n\r\n\r\n clientList = new ArrayList<ClientProcess>();\r\n }",
"@Override\n\tpublic void process() {\n\t\tport = Integer.parseInt(args);\n\t\tsuper.process();\n\t}",
"public void Start(){\n Registry registry = null;\n try{\n for(int i=0;i<nsize;i++){\n registry= LocateRegistry.getRegistry(this.ports[i]);\n PRMI stub = (PRMI) registry.lookup(\"DCMP\");\n System.out.println(\"env calls Init to man \"+i);\n stub.InitHandler(new Request(this.id, -1, 'e'));\n D++;\n }\n\n } catch(Exception e){\n return;\n }\n return;\n }",
"public void startServers()\n {\n ExecutorService threads = Executors.newCachedThreadPool();\n threads.submit(new StartServer(host, port));\n threads.submit(new StartServer(host, port + 1));\n threads.shutdown();\n }",
"private void startPortManager() throws GrpcException {\n\t\t/* start PortManager */\t\t\n\t\ttry {\n\t\t\tinformationManager.lockInformationManager();\n\t\t\t\n\t\t\tProperties localHostInfo =\n\t\t\t\t(Properties) informationManager.getLocalMachineInfo();\n\t\t\t\n\t\t\t/* PortManager without SSL */\n\t\t\tint port = Integer.parseInt((String) localHostInfo.get(\n\t\t\t\tNgInformationManager.KEY_CLIENT_LISTEN_PORT_RAW));\n\t\t\tportManagerNoSecure = new PortManager(this, false, port);\n\n\t\t\t/* PortManager with authonly is not implemented. */\n\n\t\t\t/* PortManager with GSI */\n\t\t\tport = Integer.parseInt((String) localHostInfo.get(\n\t\t\t\t\tNgInformationManager.KEY_CLIENT_LISTEN_PORT_GSI));\t\n\t\t\tportManagerGSI = new PortManager(this, PortManager.CRYPT_GSI, port);\n\n\t\t\t/* PortManager with SSL */\n\t\t\tport = Integer.parseInt((String) localHostInfo.get(\n\t\t\t\t\tNgInformationManager.KEY_CLIENT_LISTEN_PORT_SSL));\t\n\t\t\tportManagerSSL = new PortManager(this, PortManager.CRYPT_SSL, port);\n\n\t\t} catch (NumberFormatException e) {\n\t\t\tthrow new NgInitializeGrpcClientException(e);\n\t\t} catch (IOException e) {\n\t\t\tthrow new NgIOException(e);\n\t\t} finally {\n\t\t\tinformationManager.unlockInformationManager();\n\t\t}\n\t}",
"Builder port(int port);",
"public void start(int port)\n\t{\n\t\t// Initialize and start the server sockets. 08/10/2014, Bing Li\n\t\tthis.port = port;\n\t\ttry\n\t\t{\n\t\t\tthis.socket = new ServerSocket(this.port);\n\t\t}\n\t\tcatch (IOException e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\t// Initialize a disposer which collects the server listener. 08/10/2014, Bing Li\n\t\tMyServerListenerDisposer disposer = new MyServerListenerDisposer();\n\t\t// Initialize the runner list. 11/25/2014, Bing Li\n\t\tthis.listenerRunnerList = new ArrayList<Runner<MyServerListener, MyServerListenerDisposer>>();\n\t\t\n\t\t// Start up the threads to listen to connecting from clients which send requests as well as receive notifications. 08/10/2014, Bing Li\n\t\tRunner<MyServerListener, MyServerListenerDisposer> runner;\n\t\tfor (int i = 0; i < ServerConfig.LISTENING_THREAD_COUNT; i++)\n\t\t{\n\t\t\trunner = new Runner<MyServerListener, MyServerListenerDisposer>(new MyServerListener(this.socket, ServerConfig.LISTENER_THREAD_POOL_SIZE, ServerConfig.LISTENER_THREAD_ALIVE_TIME), disposer, true);\n\t\t\tthis.listenerRunnerList.add(runner);\n\t\t\trunner.start();\n\t\t}\n\n\t\t// Initialize the server IO registry. 11/07/2014, Bing Li\n\t\tMyServerIORegistry.REGISTRY().init();\n\t\t// Initialize a client pool, which is used by the server to connect to the remote end. 09/17/2014, Bing Li\n\t\tClientPool.SERVER().init();\n\t}",
"public void setPort(int port);",
"public void setPort(int port);",
"public void run(){\n\n\t\tServerSocket socketEcoute;\n\t\ttry {\n\t\t\tsocketEcoute = new ServerSocket();\n\t\t\tsocketEcoute.bind(new InetSocketAddress(this.defaultPort));\n\t\t\tSystem.out.println(\"Port manager started on : \"+this.defaultPort);\n\t\t\twhile(true){\n\t\t\t\tSocket socketConnexion = socketEcoute.accept();\n\t\t\t\tSystem.out.println(\"Someone is connected on PortManager\");\n\t\t\t\t\n\t\t\t\tnew PortManagerThread(socketConnexion,this.ctrl).start();\n\t\t\t\t\n\t\t\t\t\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}",
"StartPort createStartPort();",
"Builder setPort(String port);",
"public void start(int port) {\r\n Thread thread = new Thread(this);\r\n this.port = port;\r\n thread.start();\r\n }",
"private void startJobs() {\n List<JobProfile> profileList = getJobConfDb().getAcceptedJobs();\n for (JobProfile profile : profileList) {\n LOGGER.info(\"init starting job from db {}\", profile.toJsonStr());\n addJob(new Job(profile));\n }\n }",
"public List<Port> getPorts(ISchemaInfo info);",
"public void searchPorts() {\r\n try {\r\n Enumeration pList = CommPortIdentifier.getPortIdentifiers();\r\n System.out.println(\"Porta =: \" + pList.hasMoreElements());\r\n while (pList.hasMoreElements()) {\r\n portas = (CommPortIdentifier) pList.nextElement();\r\n if (portas.getPortType() == CommPortIdentifier.PORT_SERIAL) {\r\n System.out.println(\"Serial USB Port: \" + portas.getName());\r\n } else if (portas.getPortType() == CommPortIdentifier.PORT_PARALLEL) {\r\n System.out.println(\"Parallel Port: \" + portas.getName());\r\n } else {\r\n System.out.println(\"Unknown Port: \" + portas.getName());\r\n }\r\n portaCOM = portas.getName();\r\n }\r\n System.out.println(\"Porta escolhida =\" + portaCOM);\r\n } catch (Exception e) {\r\n System.out.println(\"*****Erro ao escolher a porta******\");\r\n }\r\n }",
"public void StartAllServices()\n\t{\n\t\tm_oCommServ.StartCmdService(m_oConfig.CmdPort()); //Giving introducer port here\n\t\t// bring up the heartbeat receiver\n\t\tm_oCommServ.StartHeartBeatRecvr();\n\t\t//breing up the file report recvr\n\t\tm_oCommServ.StartFileReportRecvr();\n\t}",
"public static void switchPort(){\n\t\ttry{\n\t\t\t//send kill signal via kill file\n\t\t\t// if current port is set\n\t\t\tif(currentPort!=0){\n\t\t\t\tLog.stdout(\"Sending kill signal for current tor thread...\");\n\t\t\t\t(new File(\".tor_tmp/kill\"+currentPort)).createNewFile();\n\t\t\t}\n\t\t\t\n\t\t\t//waiting for lock to read new available port\n\t\t\tboolean locked = true;int t=0;\n\t\t\twhile(locked){\n\t\t\t\tLog.stdout(\"Waiting for lock on .tor_tmp/lock\");\n\t\t\t\tThread.sleep(200);\n\t\t\t\tlocked = (new File(\".tor_tmp/lock\")).exists();t++;\n\t\t\t}\n\t\t\t\n\t\t\t// make the next step concurrent\n\t\t\t// -> also lock ports file\n\t\t\t// create the lock\n\t\t\tFile lock = new File(\".tor_tmp/lock\");lock.createNewFile();\n\t\t\t\n\t\t\t// read new port - delete taken port from communication file\n\t\t\tBufferedReader r = new BufferedReader(new FileReader(new File(\".tor_tmp/ports\")));\n\t\t\t\n\t\t\tchangePortFromFile(r);\n\t\t\t\n\t\t\tLinkedList<String> queue = new LinkedList<String>();\n\t\t\tString currentLine = r.readLine();\n\t\t\twhile(currentLine!=null){\n\t\t\t\tqueue.add(currentLine);currentLine = r.readLine();\n\t\t\t}\n\t\t\t//now rewrite the port file\n\t\t\t(new File(\".tor_tmp/ports\")).delete();\n\t\t\tBufferedWriter w = new BufferedWriter(new FileWriter(new File(\".tor_tmp/ports\")));\n\t\t\tfor(String p:queue){w.write(p);w.newLine();}\n\t\t\tw.close();\n\t\t\t\n\t\t\t// release the lock\n\t\t\tlock.delete();\n\t\t\t\n\t\t\t// show ip to check\n\t\t\tshowIP();\n\t\t\t\n\t\t}catch(Exception e){e.printStackTrace();}\n\t}",
"protected void configurePorts() {\n\t\tremoveInputs();\n\t\tremoveOutputs();\n\n\t\t// FIXME: Replace with your input and output port definitions\n\n\t\t// Hard coded input port, expecting a single String\n\t\t//File name for the Input tables\n\t\taddInput(FIRST_INPUT, 0, true, null, String.class);\n\n\t\t\t\t\n\t\t// Single value output port (depth 0)\n\t\taddOutput(OUT_STD_OUTPUT, 0);\n\t\t// Single value output port (depth 0)\n\t\taddOutput(OUT_ERROR, 0);\n\t\taddOutput(VO_TABLE, 0);\n\n\t}",
"public void port (int port) {\n this.port = port;\n }",
"@Override\r\n public void generateTasks() {\r\n int tasks = Integer.parseInt(this.getProperty(\"numTask\", \"1000\"));\r\n setNumOfTasks(tasks);\r\n //TODO:fixed port here !!!! need to change!!!\r\n serverPort = Integer.parseInt(this.getProperty(\"reqServerPort\", \"5560\")); \r\n PROC_MAX = Integer.parseInt(this.getProperty(\"reqServerMaxConcurrentClients\",\"10\"));\r\n location = this.getProperty(\"location\", \"rutgers\");\r\n energyplusPropertyFile = this.getProperty(\"energyplusTemplate\", \"energyplus.property\");\r\n \r\n winnerTakeAll = Boolean.parseBoolean(this.getProperty(\"winnerTakeAll\",\"true\"));\r\n jobDistributionMap = new HashMap<Integer,Integer>();\r\n copyJobDistributionMap = new HashMap<Integer,Integer>();\r\n //System.out.println(\"energyplusPropertyFile:\"+energyplusPropertyFile);\r\n \r\n initInfoSystem();\r\n initDistributionSystem();\r\n startFedServer();\r\n }",
"public PeerBuilder ports(int port) {\n\t\tthis.udpPort = port;\n\t\tthis.tcpPort = port;\n\t\treturn this;\n\t}",
"@Override\n public void run() {\n\n // Iterate over the given port range to scan\n for (int port = this.portMin; port <= this.portMax; port++) {\n\n // We will use the IOException thrown by Socket on connection failure to\n // determine if a service is running on a given port or not.\n // As such, we use a try-catch block\n try {\n\n // Create socket for port testing\n Socket socket = new Socket();\n\n // We now use the created socket to attempt a connection with the current port,\n // testing if a service is listening on the current port. We can get the\n // loopback address as seen below, or manually enter one of the common loopback\n // addresses: \"127.0.0.1\", \"0.0.0.0\" or \"localhost\".\n InetAddress loopbackAddress = InetAddress.getLoopbackAddress();\n SocketAddress scanAddress = new InetSocketAddress(loopbackAddress, port);\n\n // Since we are scanning our local computer we can set a quite short timeout\n // In this example we use 50 milliseconds\n int timeout = 50;\n\n // Attempt the connection\n socket.connect(scanAddress, timeout);\n socket.close();\n\n // Alternatively, the shorthand:\n // Socket otherSocket = new Socket(InetAddress.getLoopbackAddress(), port);\n // otherSocket.close();\n\n // If the socket successfully connected, we know that a service is listening on\n // the currently tested port, and we print it.\n System.out.println(\"Service listening on port: \" + port);\n\n } catch (IOException e) {\n // If an exception is thrown by the client sockets, we can assume that the port\n // is unused, and we choose to do nothing. Alternatively, we can print port\n // closed:\n // System.out.println(\"No service listening on port: \" + port);\n }\n\n }\n\n }",
"protected void configurePorts() {\n \t\tremoveInputs();\n \t\tremoveOutputs();\n \n \t\t// FIXME: Replace with your input and output port definitions\n \n \t\t// Hard coded input port, expecting a single String\n \t\t//File name for the Input tables\n \t\taddInput(IN_FIRST_INPUT_TABLE, 0, true, null, String.class);\n \t\taddInput(IN_FORMAT_INPUT_TABLE, 0, true, null, String.class);\n \t\taddInput(IN_FORMAT_OUTPUT_TABLE, 0, true, null, String.class);\n \t\taddInput(IN_FILTER, 0, true, null, String.class);\n \t\t\n \t\t\n \t\tif(configBean.getTypeOfInput().compareTo(\"File\")==0){\n \t\t\taddInput(IN_OUTPUT_TABLE_NAME, 0, true, null, String.class);\n \t\t}\n \t\t\n \n \t\t// Optional ports depending on configuration\n \t\t//if (configBean.getExampleString().equals(\"specialCase\")) {\n \t\t//\t// depth 1, ie. list of binary byte[] arrays\n \t\t//\taddInput(IN_EXTRA_DATA, 1, true, null, byte[].class);\n \t\t//\taddOutput(OUT_REPORT, 0);\n \t\t//}\n \t\t\n \t\t// Single value output port (depth 0)\n \t\taddOutput(OUT_SIMPLE_OUTPUT, 0);\n \t\t// Single value output port (depth 0)\n \t\taddOutput(OUT_REPORT, 0);\n \n \t}",
"void startServer(int port) throws Exception;",
"public void testSetPort() {\n }",
"void port(int port);",
"void port(int port);",
"private void run()throws IOException{\r\n Port = portNumb(); \r\n}",
"public ConnectionScheduler(int listenType, int port) throws IOException{\n\t\ttype = listenType;\n\t\tlisteningSocket = new ServerSocket(port);\n\t\tconnections = new LinkedList<Thread>();\n\t\trunning = true;\n\t}",
"public PeerBuilder portsExternal(int port) {\n\t\tthis.udpPortForwarding = port;\n\t\tthis.tcpPortForwarding = port;\n\t\treturn this;\n\t}",
"public void setPort(int port) {\r\n this.port = port;\r\n }",
"@Override\n\tpublic void assignPids() {\n\t\tThread t = new Thread(new Runnable() {\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\ttry {\n\t\t\t\t\twhile (nPidsAssigned < nProc -1) {\n\t\t\t\t\t\tinitConn.connectRetry(coordinatorHostname, 20000);\n\n\t\t\t\t\t\tnPidsAssigned++;\n\t\t\t\t\t\t// Pid 1 is reserved for the coordinator.\n\t\t\t\t\t\tint newPid = nPidsAssigned + 1;\n\t\t\t\t\t\tString hostname = initConn.getHostName();\n\t\t\t\t\t\tinitConn.send(((Integer)newPid).toString());\n\t\t\t\t\t\tinitConn.send(pidToHolderMap.get(newPid).toString());\n\t\t\t\t\t\tsynchronized (pidToHostnameMap) {\n\t\t\t\t\t\t\tpidToHostnameMap.put(newPid, hostname);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tSystem.out.println(\"PID: \" + newPid + \" sent\\n\");\n\n\t\t\t\t\t\tinitConn.close();\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}\n\t\t\t\tSystem.out.println(pidToHostnameMap.toString());\n\t\t\t}\n\t\t});\n\t\tt.start();\n\t}",
"public void setPort (int port) {\n this.port = port;\n }",
"public void setPort(int port) {\n this.port = port;\n }",
"public void setPort(int port) {\n this.port = port;\n }",
"public void setPort(int port) {\n this.port = port;\n }",
"public void setPort(int port) {\n this.port = port;\n }",
"public void setPort(int port) {\n this.port = port;\n }",
"public void setPort(int port) {\n this.port = port;\n }",
"private boolean configureAndStart(int port) {\n\t\ttry {\n\t\t\t//get local host to bind\n\t\t\tString host = InetAddress.getLocalHost().getHostName();\n//\t\t\thost = \"localhost\";\n\t\t\tSystem.out.printf(\"Listening on: Host: %s, Port: %d%n\", host, port);\n\n\t\t\tselector = Selector.open();\n\n\t\t\tserverChannel = ServerSocketChannel.open();\n\t\t\tserverChannel.socket().bind( new InetSocketAddress( host, port ) );\n\t\t\tserverChannel.configureBlocking( false );\n\n\t\t\t//setup selector to listen for connections on this serverSocketChannel\n\t\t\tserverChannel.register( selector, SelectionKey.OP_ACCEPT );\n\t\t\t\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"Configuration for Server failed. Exiting.\");\n\t\t\te.printStackTrace();\n\t\t\treturn false;\n\t\t}\n\t\tSystem.out.println(\"Server Successfully configured\");\n\n\t\t//start up the ThreadPool\n\t\tmanager.start();\n\n\t\t//create timer to handle output, and timeout\n\t\ttimer = new Timer(\"Output_and_timeout\");\n\t\t//schedule output\n\t\ttimer.scheduleAtFixedRate(new ServerOutput(batchTime), Constants.OUTPUT_TIME * 1000,\n\t\t\t\tConstants.OUTPUT_TIME * 1000);\n\t\ttimeout = new ScheduleTimeout(this);\n\t\ttimer.scheduleAtFixedRate(timeout, batchTime * 1000, batchTime * 1000);\n\n\t\treturn true;\n\t}",
"public void start(String portArgument) {\n if (!Strings.isNullOrEmpty(portArgument)) {\n port(parsePort(portArgument));\n }\n mapExceptions();\n initAccountEndpoints();\n initUserEndpoints();\n initManagementEndpoints();\n }",
"public static void setPort(int port){\n catalogue.port = port;\n }",
"public Builder port(int port) {\n\t\t\tthis.port = port;\n\t\t\treturn this;\n\t\t}",
"public void setPort(Integer port) {\n this.port = port;\n }",
"private void handlePort(String args) {\n // Extract IP address and port number from arguments\n String[] stringSplit = args.split(\",\");\n String hostName = stringSplit[0] + \".\" + stringSplit[1] + \".\" + stringSplit[2] + \".\" + stringSplit[3];\n\n int p = Integer.parseInt(stringSplit[4]) * 256 + Integer.parseInt(stringSplit[5]);\n\n // Initiate data connection to client\n openDataConnectionActive(hostName, p);\n sendMsgToClient(\"200 Command OK\");\n }",
"public void setPort(int port) {\r\n\t\tthis.port = port;\r\n\t}",
"public void setPort(int port) {\r\n\t\tthis.port = port;\r\n\t}",
"public void scheduleJobs();",
"public void setPort(Integer port) {\n this.port = port;\n }",
"public void setPort(Integer port) {\n this.port = port;\n }",
"public void setPort(Integer port) {\n this.port = port;\n }",
"public void setPort(Integer port) {\n this.port = port;\n }",
"public void setPort(Integer port) {\n this.port = port;\n }",
"public static void main(String[] args) throws RemoteException {\n\n String registryIp = args[0];\n int registryPort = Integer.parseInt(args[1]);\n\n int numberOfComponents = Integer.parseInt(args[2]);\n\n int startingPort = Integer.parseInt(args[3]);\n\n List<Thread> componentThreads = new ArrayList<>();\n\n /* Gradually create new threads */\n for (int i = 0; i < numberOfComponents; ++i) {\n Registry registryReference = LocateRegistry.getRegistry(registryIp, registryPort);\n\n String registryReferenceName = String.valueOf(i);\n\n /* Create the component and its stub */\n Component component = new Component(registryReferenceName, i, registryReference, numberOfComponents);\n CommunicationChannel stub = (CommunicationChannel) UnicastRemoteObject.exportObject(component, startingPort + i);\n\n /* Add the stub to the registry */\n registryReference.rebind(registryReferenceName, stub);\n\n /* Create the thread and run it */\n Thread componentThread = new Thread(component);\n\n componentThread.start();\n\n /* Add it to the list of threads */\n componentThreads.add(componentThread);\n }\n\n\n\n /* Once all of the references have been created join them */\n for (Thread componentThread : componentThreads)\n try {\n componentThread.join();\n\n System.out.println(\"A thread ended \" + componentThread.getName());\n } catch (InterruptedException e) {\n System.err.println(\"Was interrupted whilst awaiting for a thread to terminate\");\n\n e.printStackTrace();\n }\n\n\n }",
"public void setPort(int port) {\n\t\tthis.port = port;\n\t}",
"public void setPort(int port) {\n\t\tthis.port = port;\n\t}",
"public void setPort(String port) {\r\n this.port = port;\r\n }",
"private void startAllDownloads() {\n\t\tif (!downloading && jobs != null && jobs.size() > 0) {\n\t\t\tfor (DownloadJob nextJob : jobs) {\n\t\t\t\tAppLogger.log(TAG, \"job \" + nextJob.getJobId() + \" working=\" + nextJob.isWorking());\n\t\t\t\tif (!nextJob.isWorking()) {\n\t\t\t\t\tstartDownloadJob(nextJob);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// for (DownloadJob job : jobs) {\n\t\t\t// AppLogger.log(TAG, \"job \" + job.generateJobId() + \" working=\" +\n\t\t\t// job.isWorking());\n\t\t\t// if (!job.isWorking()) {\n\t\t\t// startDownloadJob(job);\n\t\t\t// }\n\t\t\t// }\n\t\t}\n\t}",
"private static void startConnection_RunApplication(int port) {\n ServerSocket s1;\n Socket s2;\n int id = 1;\n ServerApplication s2_thread;\n boolean error = false;\n\n s1 = startServer(port);\n if (s1 != null) {\n // iterate almost infinitely\n while (!error) {\n try {\n // accepts connection and creates client socket\n s2 = s1.accept();\n System.out.println(\"Client [ \" + id + \" ] \" + \"connection established: \" + s2.getInetAddress());\n // starts a new thread with the new client socket\n // this way the main thread here can iterate and wait for new connections\n s2_thread = new ServerApplication(s2, id);\n s2_thread.start();\n id++;\n } catch (IOException ex) {\n System.err.println(\"Closing connection... An error has occurred during execution.\");\n error = true;\n }\n }\n try {\n s1.close();\n } catch (IOException ex) {\n System.err.println(\"Error closing server socket\");\n }\n } else {\n print_help();\n }\n }",
"public void setPort(final String port){\n this.port=port;\n }",
"public void launch(int port) {\n try {\n Registry registry = LocateRegistry.createRegistry( port );\n\n EchoService service = new ReversedEchoServiceImpl();\n EchoService stub = (EchoService) UnicastRemoteObject.exportObject(service, 0);\n\n registry.bind(\"com.anotheria.strel.rmi.EchoService\", stub);\n\n log.info(String.format(\"Service is now accessible on port %d with name com.anotheria.strel.rmi.EchoService\", port));\n }\n catch (RemoteException ex) {\n log.fatal(\"Remote Exception: \" + ex.getMessage());\n }\n catch (AlreadyBoundException ex) {\n log.fatal(\"Echo service is already bound with given name: \" + ex.getMessage());\n }\n }",
"private void routeToPort(int portId) {\n mLocalActivePath = portId;\n }",
"private AvailablePortFinder() {\n // Do nothing\n }",
"public void callMaster(String addrutil, String portutil);",
"Port createPort();",
"Port createPort();",
"@Override\n\tpublic void setPort(Integer port) {\n\t\tthis.port=port;\n\t}",
"public void createTasks(Integer _optID, String _tupleTag, String _taskType, String _info1, String _info2, String _destIP, String _port, String _location, long timestamp, Object _appSpecific){ \r\n //System.out.print(\"Create tasks\");\r\n boolean flag = false;\r\n String defaultIP = \"-1\";\r\n String defaultPort = \"-1\";\r\n \r\n //use wildcard to let one worker randomly choose the job to run\r\n //System.out.println(\"---What is optID: \" +_optID);\r\n if(_destIP.equals(\"RANDOM\")){\r\n int tempTaskID = getUpdatedTaskID();\r\n \r\n insertIntoParaList(tempTaskID, _optID, _tupleTag, _taskType,defaultIP,_info1,_info2,defaultPort,_location, timestamp,_appSpecific);\r\n flag = true;\r\n addEntryToResultList(_optID,flag);\r\n //------THE TASK IS INSERTED HERE\r\n insertTask(tempTaskID);\r\n }\r\n //send tuples to all\r\n else if(_destIP.equals(\"ALL\")){\r\n //Iterate through all sites that subscribe to certain types of task \r\n //System.out.println(\"infoSys.getSiteList(): \"+infoSys.getSiteList());\r\n Iterator it = infoSys.getSiteList().entrySet().iterator();\r\n while (it.hasNext()) {\r\n Map.Entry entry = (Map.Entry) it.next();\r\n _destIP = ((String) entry.getKey());\r\n ConcurrentHashMap<String, String> subscribeType = (ConcurrentHashMap<String, String>) entry.getValue();\r\n \r\n //option 2, if there is multiple subscribers of a certain taskType in one site\r\n Iterator subIt = subscribeType.entrySet().iterator();\r\n while (subIt.hasNext()) {\r\n Map.Entry subEntry = (Map.Entry) subIt.next();\r\n String[] typeAndAssociate = subEntry.getValue().toString().split(\",\");\r\n if (typeAndAssociate[0].equals(_tupleTag) && typeAndAssociate[1].equals(_taskType)) {\r\n _port = subEntry.getKey().toString();\r\n\r\n int tempTaskID = getUpdatedTaskID();\r\n insertIntoParaList(tempTaskID, _optID, _tupleTag, _taskType,_destIP, _info1,_info2,_port,_location, timestamp,_appSpecific);\r\n //System.out.println(\"Master out: \"+\"--\"+_tupleTag+\"--\"+_taskType+\"--\"+_optID+\"--\"+_destIP+\"--\"+_budget+\"--\"+_deadline+\"--\"+_port);\r\n flag = true;\r\n addEntryToResultList(_optID,flag);\r\n //------THE TASK IS INSERTED HERE\r\n insertTask(tempTaskID);\r\n \r\n }\r\n }\r\n }\r\n }\r\n //if user choose one specific worker, only send the message to it\r\n else{ \r\n //System.out.println(infoSys.getSiteList());\r\n //Check if this subscriber exists\r\n if (infoSys.hasAssociateSubscriber(_destIP, _port)) {\r\n int tempTaskID = getUpdatedTaskID();\r\n //System.out.println(\"Master out: \"+\"--\"+_tupleTag+\"--\"+_taskType+\"--\"+_optID+\"--\"+_destIP+\"--\"+_budget+\"--\"+_deadline+\"--\"+_port);\r\n insertIntoParaList(tempTaskID, _optID, _tupleTag, _taskType,_destIP,_info1,_info2,_port,_location, timestamp,_appSpecific);\r\n flag = true;\r\n addEntryToResultList(_optID,flag);\r\n insertTask(tempTaskID);\r\n } else {\r\n System.out.println(\"Incorrect destIP or destPort for creating task!\");\r\n }\r\n } \r\n //create entry in resultList\r\n addEntryToResultList(_optID,flag);\r\n }",
"final public void setPort(int port) {\n this.port = port;\n }",
"void setServicePort( int p );",
"ResponseDTO startAllServers();",
"public void startReceiver(int port) {\r\n\t\tif(receiver == null) {\r\n\t\t\ttry {\r\n\t\t\t\treceiver = new Receiver(port);\r\n\t\t\t} catch (IOException 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}\r\n\t\t// TODO what if thread still running?\r\n\t}",
"public void addServers(int portmin,int portmax){\n BufferedReader inloc;\n PrintWriter outloc;\n Socket SSocket;\n for (int portcourant = portmin; portcourant < portmax; portcourant++) {\n try {\n System.out.print(\"Attempt to connect to server at port \");\n System.out.println(portcourant);\n SSocket = new Socket(\"127.0.0.1\", portcourant);\n System.out.print(\"Done...\");\n //flux pour envoyer\n outloc = new PrintWriter(SSocket.getOutputStream());\n tabServerssout.add(outloc);\n //flux pour recevoir\n inloc = new BufferedReader(new InputStreamReader(SSocket.getInputStream()));\n tabServerssin.add(inloc);\n }catch(IOException e){\n e.printStackTrace();\n }\n }\n }",
"public void completeInputPortSettings(int newPortCount) {\n changeInPortCount(newPortCount);\n\t\tfor (int i = 0; i < (newPortCount); i++) {\n\t\t\tPort inPort = new Port(Constants.INPUT_SOCKET_TYPE + (i), Constants.INPUT_SOCKET_TYPE\n\t\t\t\t\t+ (i), this, newPortCount, PortTypeEnum.IN, (i), isAllowMultipleLinksForPort(\"in0\"), \n\t\t\t\t\tisLinkMandatoryForPort(\"in0\"), PortAlignmentEnum.LEFT);\n\t\t\tports.put(Constants.INPUT_SOCKET_TYPE + (i), inPort);\n\t\t\tfirePropertyChange(\"Component:add\", null, inPort);\n\t\t}\n\t}",
"@Override\n public void start(int totalTasks) {\n }",
"abstract protected int PortToRunOn();",
"public BeaterServer(int port, ScheduledExecutorService scheduler) {\n\t\tthis(port, 100, scheduler);\n\t}",
"@Override\n\t\tpublic int buildBasicPort() {\n\t\t\treturn buildPort();\n\t\t}",
"@Option(name = \"-rport\", handler = StringArrayOptionHandler.class)\n\tpublic void setPort(String[] ports)\n\t{\n\t\tfor (int i = 0; i < peers.size(); ++i)\n\t\t{\n\t\t\tif (i == ports.length)\n\t\t\t\tbreak;\n\n\t\t\tPeer p = peers.get(i);\n\t\t\tp.setPort(Integer.valueOf(ports[i]));\n\t\t}\n\t}",
"public Map<String, Integer> execAdbOnlineDevicesPortForward() {\n List<String> device_id_list = this.execAdbDevices();\n Map<String, Integer> device_hostport_map = new HashMap<String, Integer>();\n\n int index = 0;\n for (String device : device_id_list) {\n int host_port = ADBExecutor.HOST_BASE_PORT + index * 10;\n this.execAdbSingleDevicePortForward(device, host_port, ADBExecutor.ANDROID_PORT);\n device_hostport_map.put(device, host_port);\n index++;\n }\n return device_hostport_map;\n }",
"public void startServerSocket(Integer port) throws IOException {\n this.port = port;\n startMEthod();\n }",
"public static void main(String[] args) throws Exception {\r\n Scanner reader = new Scanner(System.in);\r\n\r\n System.out.println(\"Service address to be scanned?\");\r\n String address = reader.nextLine();\r\n \r\n System.out.println(\"Select ports starting point:\");\r\n int start = Integer.parseInt(reader.nextLine());\r\n \r\n System.out.println(\"End to which port?\");\r\n int end = Integer.parseInt(reader.nextLine());\r\n\r\n Set<Integer> ports = getAccessiblePorts(address, start, end);\r\n System.out.println(\"\");\r\n\r\n if (ports.isEmpty()) {\r\n System.out.println(\"Couldn't find any ports, sorry.\"); \r\n } else {\r\n // Prints out the found scanned ports, one by one slowly\r\n System.out.println(\"Ports found:\");\r\n ports.stream().forEach(p -> \r\n System.out.println(\"\\t\" + p));\r\n }\r\n \r\n }",
"public Map<String, Integer> execAdbOnlineDevicesPortForward()\r\n\t{\r\n\t\tList<String> device_id_list = this.execAdbDevices();\r\n\t\tMap<String, Integer> device_hostport_map = new HashMap<String, Integer>();\r\n\t\t\r\n\t\tint index = 0;\r\n\t\tfor (String device : device_id_list)\r\n\t\t{\r\n\t\t\tint host_port = ADBExecutor.HOST_BASE_PORT + index * 10;\r\n\t\t\tthis.execAdbSingleDevicePortForward(device, host_port, ADBExecutor.ANDROID_PORT);\r\n\t\t\tdevice_hostport_map.put(device, host_port);\r\n\t\t\tindex++;\r\n\t\t}\r\n\t\treturn device_hostport_map;\r\n\t}",
"public void startPopulateWorkers(){\r\n\t\tArrayList<Thread> threads = new ArrayList<Thread>();\r\n\t\t\r\n\t\t//Create threads\r\n\t\tfor(int i = 0; i < pts.length; i++){\r\n\t\t\tthreads.add(new Thread(pts[i]));\r\n\t\t\tthreads.get(i).start();\r\n\t\t}\r\n\t\t\r\n\t\t//Wait for threads to finish\r\n\t\tfor(int i = 0; i < pts.length; i++){\r\n\t\t\ttry {\r\n\t\t\t\tthreads.get(i).join();\r\n\t\t\t} catch (InterruptedException e) {\r\n\t\t\t\tthrow new RuntimeException(e.getMessage());\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public void setPort(int port) {\n m_Port = port;\n }",
"public void setDefaultPort() {\r\n\t\tsetPort(DEFAULT_PORT);\r\n\t}",
"public ChronicleChannelCfg<C> addHostnamePort(String hostname, int port) {\n hostports.add(new HostPortCfg(hostname, port));\n return this;\n }",
"@Override\n protected void schedule() throws Exception {\n try {\n List<Slave> slaves = getSlaves();\n for (Slave slave : slaves) {\n int tc = tasksNode.getNumAssignedTasks(slave.getId());\n if (tc < 10) {\n for (int i = tc; i < 10; i++) {\n int k = counter.incrementAndGet();\n final String j = \"task-\" + k;\n Task t = new Task() {\n @Override\n public String getId() {\n return j;\n }\n\n @Override\n public byte[] getData() throws Exception {\n return new byte[0];\n }\n };\n\n tasksNode.addTask(t, slave.getId());\n if (k >= TOTAL_RECORDS){\n System.out.println(\"Stopping server [\" + getServerId() + \"]\");\n break;\n }\n }\n }\n }\n } catch (Exception e) {\n\n }\n tasksNode.watch(monitor);\n synchronized (monitor) {\n monitor.wait(PAUSE_BETWEEN_TASK_SCHEDULE);\n }\n }",
"public abstract void notifyAboutEmbeddedWebServerIpPort(InetAddress ip, int port);",
"public void run() {\n Runtime.getRuntime().addShutdownHook(new MNOSManagerShutdownHook(this));\n\n OFNiciraVendorExtensions.initialize();\n\n this.startDatabase();\n\n try {\n final ServerBootstrap switchServerBootStrap = this\n .createServerBootStrap();\n\n this.setServerBootStrapParams(switchServerBootStrap);\n\n switchServerBootStrap.setPipelineFactory(this.pfact);\n final InetSocketAddress sa = this.ofHost == null ? new InetSocketAddress(\n this.ofPort) : new InetSocketAddress(this.ofHost,\n this.ofPort);\n this.sg.add(switchServerBootStrap.bind(sa));\n }catch (final Exception e){\n throw new RuntimeException(e);\n }\n\n }",
"public boolean setPort(int port){\r\n\t\tif(port < 1024) return false;\r\n\t\ttry {\r\n\t\t\tthis.workerobj.put(WorkerController.PORT, port);\r\n\t\t\treturn true;\r\n\t\t} catch (JSONException e) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}",
"public Node(int port) {\n this();\n portnum = port;\n }",
"public static void start(int port) {\r\n\r\n SpringApplication app = new SpringApplication(DaprApplication.class);\r\n\r\n app.run(String.format(\"--server.port=%d\", port));\r\n }",
"public boolean addPort(PortData port) {\n log.debug(\"Adding port {}\", port);\n\n KVPort rcPort = new KVPort(port.getDpid(), port.getPortNumber());\n rcPort.setStatus(KVPort.STATUS.ACTIVE);\n rcPort.forceCreate();\n // TODO add description into KVPort\n //rcPort.setDescription(port.getDescription());\n\n return true;\n }",
"Future<OFPortMod> createPortModAsync(DatapathId dpid, OFPort port, OFPortConfig config, boolean enable);"
] |
[
"0.63843524",
"0.63810086",
"0.63696575",
"0.6145438",
"0.5899023",
"0.58474624",
"0.58210224",
"0.5816329",
"0.57776827",
"0.5745183",
"0.57059544",
"0.56399184",
"0.56399184",
"0.5638688",
"0.56329376",
"0.5563544",
"0.55567014",
"0.5552541",
"0.5544901",
"0.55278695",
"0.5513679",
"0.54732233",
"0.54711187",
"0.5469245",
"0.54585725",
"0.5455093",
"0.5447549",
"0.54370326",
"0.5434967",
"0.5434216",
"0.54262245",
"0.54262245",
"0.5411498",
"0.5396715",
"0.53963536",
"0.53701633",
"0.5364938",
"0.53557616",
"0.534206",
"0.534206",
"0.534206",
"0.534206",
"0.534206",
"0.534206",
"0.5323448",
"0.53216946",
"0.5317957",
"0.52956057",
"0.5292598",
"0.5289055",
"0.52822053",
"0.52822053",
"0.5278044",
"0.5269321",
"0.52653545",
"0.52653545",
"0.52653545",
"0.52653545",
"0.5246143",
"0.52438354",
"0.52438354",
"0.52381843",
"0.52338105",
"0.52276856",
"0.519713",
"0.51967496",
"0.51900274",
"0.5179112",
"0.5164085",
"0.51449764",
"0.51449764",
"0.51362216",
"0.51270705",
"0.512547",
"0.5100902",
"0.5091828",
"0.508676",
"0.50791067",
"0.50698906",
"0.50693786",
"0.5057277",
"0.5051687",
"0.50426185",
"0.5029764",
"0.5016589",
"0.4992298",
"0.49847418",
"0.49806914",
"0.49755752",
"0.4974762",
"0.49742806",
"0.49705553",
"0.49677777",
"0.49578786",
"0.49543092",
"0.49534425",
"0.49289",
"0.4922801",
"0.491851",
"0.49163887"
] |
0.50305873
|
83
|
adds dock to everything and port
|
public void addDock(Scanner sc, HashMap portMap){
Dock dock = new Dock(sc, portMap);
currentPort = (SeaPort) hashMap.get(dock.getParent());
currentPort.setDock(dock);
hashMap.put(dock.getIndex(), dock);
dockMap.put(dock.getIndex(), dock);
everything.add(dock);
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public void addPorts(){\n\t\t\n\t}",
"public void dock() {\n if (getSpeed() == 0) {\n inDock = true;\n }\n }",
"private static void assembleDockLayoutPanel() {\n dockLayoutPanel.addNorth(headerPanel, 3);\n dockLayoutPanel.addSouth(footerPanel, 3);\n dockLayoutPanel.addEast(eastPanel, 0);\n dockLayoutPanel.addWest(controlPanel, 24);\n dockLayoutPanel.add(middleMainPanel);\n }",
"public static Kernel start(int port)\n {\n Kernel app = Kernel.newInstance();\n Container container = app.getContainer();\n\n // Forms\n container.add(new ServiceDefinition<>(AnnualReviewType.class));\n container.add(new ServiceDefinition<>(UserType.class));\n\n // Managers\n container.add(new ServiceDefinition<>(AccessDecisionManager.class, YuconzAccessDecisionManager.class));\n container.add(new ServiceDefinition<>(YuconzAuthenticationManager.class));\n container.add(new ServiceDefinition<>(Hibernate.class));\n container.add(new ServiceDefinition<>(LogManager.class))\n .addMethodCallDefinitions(new MethodCallDefinition(\n \"setAuthenticationManager\",\n new ServiceReference<>(YuconzAuthenticationManager.class)\n ));\n container.add(new ServiceDefinition<>(RecordManager.class));\n container.add(new ServiceDefinition<>(AnnualReviewManager.class));\n container.add(new ServiceDefinition<>(FormManager.class));\n\n container.add(new ServiceDefinition<>(AuthorisationManager.class))\n .addMethodCallDefinitions(new MethodCallDefinition(\n \"setAuthenticationManager\",\n new ServiceReference<>(YuconzAuthenticationManager.class)\n ));\n\n // Resolvers\n container.add(new ServiceDefinition<>(UserResolver.class));\n container.add(new ServiceDefinition<>(RecordResolver.class));\n\n // JTwig Functions\n container.add(new ServiceDefinition<>(CurrentUserFunction.class)).addTag(\"jtwig.function\");\n container.add(new ServiceDefinition<>(CurrentRoleFunction.class)).addTag(\"jtwig.function\");\n container.add(new ServiceDefinition<>(FormRenderFunction.class)).addTag(\"jtwig.function\");\n container.add(new ServiceDefinition<>(FormStartRenderFunction.class)).addTag(\"jtwig.function\");\n container.add(new ServiceDefinition<>(FormEndRenderFunction.class)).addTag(\"jtwig.function\");\n container.add(new ServiceDefinition<>(ActivePageFunction.class)).addTag(\"jtwig.function\");\n container.add(new ServiceDefinition<>(IsGrantedFunction.class)).addTag(\"jtwig.function\");\n container.add(new ServiceDefinition<>(RangeFunction.class)).addTag(\"jtwig.function\");\n container.add(new ServiceDefinition<>(ServiceFunction.class)).addTag(\"jtwig.function\");\n container.add(new ServiceDefinition<>(LocalDateFunction.class)).addTag(\"jtwig.function\");\n\n // Voters\n container.add(new ServiceDefinition<>(PersonalDetailsVoter.class)).addTag(\"authentication.voter\");\n container.add(new ServiceDefinition<>(RecordVoter.class)).addTag(\"authentication.voter\");\n container.add(new ServiceDefinition<>(AnnualReviewVoter.class)).addTag(\"authentication.voter\");\n container.add(new ServiceDefinition<>(AuthorisationVoter.class)).addTag(\"authentication.voter\");\n\n container.getServiceDefinition(FrameworkServer.class).setConfigurationReference(new PlainReference<>(new Configuration()\n {\n @Override\n public int getPort()\n {\n return port;\n }\n }));\n\n app.boot();\n\n Router router = container.get(Router.class);\n\n // Records\n router.registerController(AppController.class);\n router.registerController(StaticController.class);\n router.registerController(AuthenticationController.class);\n router.registerController(DashboardController.class);\n router.registerController(EmployeesController.class);\n router.registerController(RecordController.class);\n router.registerController(AnnualReviewController.class);\n\n FormManager formManager = container.get(FormManager.class);\n\n formManager.getRenderers().removeIf(r -> r.getClass().equals(ChoiceRenderer.class));\n formManager.addRenderer(CustomChoiceRenderer.class);\n formManager.addRenderer(DateRenderer.class);\n\n app.start();\n\n return app;\n }",
"public void startNetwork(int port);",
"public void addDockable(JComponent c) {\n SingleCDockable dockable = new DefaultSingleCDockable(this.getTitle(), this.getTitle(), c); \r\n control.addDockable( dockable );\r\n \r\n // now we can set the location\r\n dockable.setLocation( CLocation.base(dockingcontent).normal() );\r\n dockable.setVisible( true );\r\n\r\n }",
"protected void addOscServerAddressPanel() {\n\n\t\t// variable addressPanel holds an instance of JPanel.\n\t\t// instance of JPanel received from makeNewJPanel method\n\t\tfinal JPanel addressPanel = makeNewJPanel1();\n\t\taddressPanel.setBackground(new Color(123, 150, 123));\n\t\t// variable addressWidget holds an instance of JTextField\n\t\taddressWidget = new JTextField(\"localhost\");\n\t\t// variable setAddressButton holds an insatnce of JButton with\n\t\t// a \"Set Address\" argument for its screen name\n\t\tfinal JButton setAddressButton = new JButton(\"Set Address\");\n\t\tsetAddressButton.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(final ActionEvent evt) {\n\t\t\t\t// perform the addressChanged method when action is received\n\t\t\t\taddressChanged();\n\t\t\t}\n\t\t});\n\n\t\t// variable portWidget holds an instance of JLabel with the OSCPortOut\n\t\t// as the text it looks like OSCPortOut has a method to get the default\n\t\t// SuperCollider port\n\t\tportWidget = new JLabel(Integer.toString(OSCPort.defaultSCOSCPort()));\n\n\t\tportWidget.setForeground(new Color(255, 255, 255));\n\t\tfinal JLabel portLabel = new JLabel(\"Port\");\n\t\tportLabel.setForeground(new Color(255, 255, 255));\n\n\t\t// add the setAddressButton to the addressPanel\n\t\taddressPanel.add(setAddressButton);\n\t\t// portWidget = new JTextField(\"57110\");\n\t\t// add the addressWidget to the addressPanel\n\t\taddressPanel.add(addressWidget);\n\t\t// add the JLabel \"Port\" to the addressPanel\n\t\taddressPanel.add(portLabel);\n\t\t// add te portWidget tot eh addressPanel\n\t\taddressPanel.add(portWidget);\n\n\t\t//??? add address panel to the JPanel OscUI\n\t\tadd(addressPanel);\n\t}",
"public void registerPanel(DockPanelW dockPanel) {\n\t\tdockManager.registerPanel(dockPanel);\n\t}",
"public void addAdjacent( AdjacentDockFactory<?> factory ){\n adjacent.put( getAdjacentID( factory ), factory );\n }",
"private DockItems() {}",
"public static void main(String[] args) {\n\t\t/* setting up a frame, station and controller */\n JTutorialFrame frame = new JTutorialFrame(ColorExample.class);\n DockController controller = new DockController();\n controller.setRootWindow(frame);\n frame.destroyOnClose(controller);\n\n SplitDockStation station = new SplitDockStation();\n controller.add(station);\n frame.add(station);\n\t\t\n\t\t/* get the ColorManager... */\n ColorManager colors = controller.getColors();\n\t\t/* ... and tell the framework to use red for painting drag and drop gestures. */\n colors.put(Priority.CLIENT, \"paint.divider\", Color.RED);\n colors.put(Priority.CLIENT, \"paint.line\", Color.RED);\n colors.put(Priority.CLIENT, \"paint.insertion\", Color.RED);\n\t\t\n\t\t/* And this is how a more complex rule is installed */\n colors.publish(Priority.CLIENT, TitleColor.KIND_TITLE_COLOR, new CustomColorBridge());\n\t\t\n\t\t/* setting up some dockables to demonstrate the effects */\n SplitDockGrid grid = new SplitDockGrid();\n grid.addDockable(0, 0, 1, 1, new ColorDockable(\"Red\", Color.RED.brighter()));\n grid.addDockable(0, 1, 1, 1, new ColorDockable(\"Green\", Color.GREEN.brighter()));\n grid.addDockable(1, 0, 1, 1, new ColorDockable(\"Blue\", Color.BLUE.brighter()));\n grid.addDockable(1, 1, 1, 1, new ColorDockable(\"Yellow\", Color.YELLOW.brighter()));\n\n station.dropTree(grid.toTree());\n\n frame.setVisible(true);\n }",
"public void StartAllServices()\n\t{\n\t\tm_oCommServ.StartCmdService(m_oConfig.CmdPort()); //Giving introducer port here\n\t\t// bring up the heartbeat receiver\n\t\tm_oCommServ.StartHeartBeatRecvr();\n\t\t//breing up the file report recvr\n\t\tm_oCommServ.StartFileReportRecvr();\n\t}",
"private void addContainer(String containerName, String baseImage){\n // Call python new_lab_script: new_lab_setup.py -b basename\n //String cmd = \"./addContainer.sh \"+labsPath+\" \"+labName+\" \"+containerName+\" \"+baseImage;\n String cmd = \"new_lab_setup.py -a \"+containerName+\" -b \"+baseImage;\n doLabCommand(cmd);\n }",
"public void start(int port);",
"public void dock(Point stationPosition)\r\n\t{\r\n\t\tdocked = true;\r\n\t\tsetPosition(stationPosition);\r\n\t\tstop();\r\n\t}",
"private void $$$setupUI$$$() {\n container = new JPanel();\n container.setLayout(new FormLayout(\"fill:335px:noGrow,left:4dlu:noGrow,fill:334px:noGrow\", \"center:d:grow\"));\n container.setBorder(BorderFactory.createTitledBorder(null, \"港机数据采集服务配置\", TitledBorder.CENTER, TitledBorder.DEFAULT_POSITION, new Font(container.getFont().getName(), container.getFont().getStyle(), container.getFont().getSize()), new Color(-16777216)));\n serverContainer = new JPanel();\n serverContainer.setLayout(new FlowLayout(FlowLayout.LEFT, 5, 5));\n CellConstraints cc = new CellConstraints();\n container.add(serverContainer, cc.xy(1, 1, CellConstraints.FILL, CellConstraints.FILL));\n serverContainer.setBorder(BorderFactory.createTitledBorder(\"服务器配置\"));\n serverConfigPanel = new JPanel();\n serverConfigPanel.setLayout(new FormLayout(\"fill:80px:noGrow,left:4dlu:noGrow,fill:225px:grow\", \"center:40px:noGrow,top:4dlu:noGrow,center:40px:noGrow,top:4dlu:noGrow,center:40px:noGrow,top:4dlu:noGrow,center:40px:noGrow\"));\n serverContainer.add(serverConfigPanel);\n serverIpLabel = new JLabel();\n serverIpLabel.setText(\"IP地址\");\n serverConfigPanel.add(serverIpLabel, cc.xy(1, 1, CellConstraints.CENTER, CellConstraints.DEFAULT));\n serverIpTxt = new JTextField();\n serverConfigPanel.add(serverIpTxt, cc.xy(3, 1, CellConstraints.FILL, CellConstraints.DEFAULT));\n serverPortLabel = new JLabel();\n serverPortLabel.setText(\"端口\");\n serverConfigPanel.add(serverPortLabel, cc.xy(1, 3, CellConstraints.CENTER, CellConstraints.DEFAULT));\n serverPortTxt = new JTextField();\n serverConfigPanel.add(serverPortTxt, cc.xy(3, 3, CellConstraints.FILL, CellConstraints.DEFAULT));\n serverIntervalLabel = new JLabel();\n serverIntervalLabel.setText(\"监听间隔\");\n serverConfigPanel.add(serverIntervalLabel, cc.xy(1, 5, CellConstraints.CENTER, CellConstraints.DEFAULT));\n serverIntervalTxt = new JTextField();\n serverConfigPanel.add(serverIntervalTxt, cc.xy(3, 5, CellConstraints.FILL, CellConstraints.DEFAULT));\n serverFileLabel = new JLabel();\n serverFileLabel.setText(\"配置文件路径\");\n serverConfigPanel.add(serverFileLabel, cc.xy(1, 7, CellConstraints.CENTER, CellConstraints.DEFAULT));\n serverFileTxt = new JTextField();\n serverConfigPanel.add(serverFileTxt, cc.xy(3, 7, CellConstraints.FILL, CellConstraints.DEFAULT));\n serverControlPanel = new JPanel();\n serverControlPanel.setLayout(new FormLayout(\"fill:d:grow,left:4dlu:noGrow,fill:150px:noGrow,left:4dlu:noGrow,fill:150px:grow\", \"center:d:grow,top:4dlu:noGrow,center:42px:grow,top:4dlu:noGrow,center:max(d;4px):noGrow\"));\n serverContainer.add(serverControlPanel);\n serverSaveBtn = new JButton();\n serverSaveBtn.setText(\"保存\");\n serverControlPanel.add(serverSaveBtn, cc.xy(5, 3));\n serverFileOpener = new JButton();\n serverFileOpener.setText(\"打开\");\n serverControlPanel.add(serverFileOpener, cc.xy(3, 3));\n serverStartBtn = new JButton();\n serverStartBtn.setText(\"启动服务器\");\n serverControlPanel.add(serverStartBtn, cc.xy(3, 5));\n serverStopBtn = new JButton();\n serverStopBtn.setText(\"停止服务器\");\n serverControlPanel.add(serverStopBtn, cc.xy(5, 5));\n redisContainer = new JPanel();\n redisContainer.setLayout(new FlowLayout(FlowLayout.CENTER, 5, 5));\n container.add(redisContainer, cc.xy(3, 1, CellConstraints.DEFAULT, CellConstraints.FILL));\n redisContainer.setBorder(BorderFactory.createTitledBorder(\"Redis配置\"));\n redisConfigPanel = new JPanel();\n redisConfigPanel.setLayout(new FormLayout(\"fill:83px:noGrow,left:4dlu:noGrow,fill:221px:grow\", \"center:40px:noGrow,top:4dlu:noGrow,center:40px:noGrow,top:4dlu:noGrow,center:40px:noGrow,top:4dlu:noGrow,center:40px:noGrow\"));\n redisContainer.add(redisConfigPanel);\n redisIpLabel = new JLabel();\n redisIpLabel.setText(\"IP地址\");\n redisConfigPanel.add(redisIpLabel, cc.xy(1, 1, CellConstraints.CENTER, CellConstraints.DEFAULT));\n redisIpTxt = new JTextField();\n redisConfigPanel.add(redisIpTxt, cc.xy(3, 1, CellConstraints.FILL, CellConstraints.DEFAULT));\n redisPortLabel = new JLabel();\n redisPortLabel.setText(\"端口\");\n redisConfigPanel.add(redisPortLabel, cc.xy(1, 3, CellConstraints.CENTER, CellConstraints.DEFAULT));\n redisPortTxt = new JTextField();\n redisConfigPanel.add(redisPortTxt, cc.xy(3, 3, CellConstraints.FILL, CellConstraints.DEFAULT));\n redisExpireLabel = new JLabel();\n redisExpireLabel.setText(\"过期时间\");\n redisConfigPanel.add(redisExpireLabel, cc.xy(1, 5, CellConstraints.CENTER, CellConstraints.DEFAULT));\n redisExpireTxt = new JTextField();\n redisConfigPanel.add(redisExpireTxt, cc.xy(3, 5, CellConstraints.FILL, CellConstraints.DEFAULT));\n redisFileLabel = new JLabel();\n redisFileLabel.setText(\"配置文件路径\");\n redisConfigPanel.add(redisFileLabel, cc.xy(1, 7, CellConstraints.CENTER, CellConstraints.DEFAULT));\n redisFileTxt = new JTextField();\n redisConfigPanel.add(redisFileTxt, cc.xy(3, 7, CellConstraints.FILL, CellConstraints.DEFAULT));\n redisControlPanel = new JPanel();\n redisControlPanel.setLayout(new FormLayout(\"fill:d:grow,left:4dlu:noGrow,fill:150px:noGrow,left:4dlu:noGrow,fill:150px:grow\", \"center:d:grow,top:4dlu:noGrow,center:42px:grow,top:4dlu:noGrow,center:max(d;4px):noGrow\"));\n redisContainer.add(redisControlPanel);\n redisSaveBtn = new JButton();\n redisSaveBtn.setText(\"保存\");\n redisControlPanel.add(redisSaveBtn, cc.xy(5, 3));\n redisFileOpener = new JButton();\n redisFileOpener.setText(\"打开\");\n redisControlPanel.add(redisFileOpener, cc.xy(3, 3));\n redisStartBtn = new JButton();\n redisStartBtn.setText(\"启动服务器\");\n redisControlPanel.add(redisStartBtn, cc.xy(3, 5));\n redisStopBtn = new JButton();\n redisStopBtn.setText(\"停止服务器\");\n redisControlPanel.add(redisStopBtn, cc.xy(5, 5));\n }",
"public void dockNodeDocked(DockNodeEvent e) {}",
"public void launch(int port) {\n try {\n Registry registry = LocateRegistry.createRegistry( port );\n\n EchoService service = new ReversedEchoServiceImpl();\n EchoService stub = (EchoService) UnicastRemoteObject.exportObject(service, 0);\n\n registry.bind(\"com.anotheria.strel.rmi.EchoService\", stub);\n\n log.info(String.format(\"Service is now accessible on port %d with name com.anotheria.strel.rmi.EchoService\", port));\n }\n catch (RemoteException ex) {\n log.fatal(\"Remote Exception: \" + ex.getMessage());\n }\n catch (AlreadyBoundException ex) {\n log.fatal(\"Echo service is already bound with given name: \" + ex.getMessage());\n }\n }",
"private void connectToTheGameServer(String addPort) {\n\t\tString[] add = addPort.split(\":\");\n\t\tString address = add[0];\n\t\tString port = add[1];\n\t\tInetAddress intaddr;\n\t\tSystem.out.println(\"connectToTheGameServer: @:\" + address + \", port:\" + port);\n\n\t\ttry {\n\t\t\tif(address.equals(\"127.0.0.1\")){\n\t\t\t\tintaddr = socket.getInetAddress();\n\t\t\t}else{\n\t\t\t\tintaddr = InetAddress.getByName(address);\n\t\t\t}\n\t\t\tthis.gameServerSocket = new Socket(intaddr, Integer.valueOf(port));\n\t\t\tSystem.out.println(\"connectToTheGameServer: connected\");\n\t\t\tClient.myState = Client.Current_state.client_client;\n\t\t\tClient.myRole = current_role.client;\n\t\t\tClient.myPlatforme = new Platforme();\n\t\t\tClient.sendMessagesToServer(Client.ok, osServ);\n\t\t\tClient.myPlatforme.show();\n\t\t\tif (Client.myPlatforme == null) {\n\t\t\t\tSystem.out.println(\"ici null\");\n\t\t\t}\n\t\t\tstartClientClientListener(gameServerSocket, false);\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"client message: \" + e.getMessage().toString());\n\t\t}\n\t}",
"private void init() throws IOException {\r\n\t\tschermata = new JTabbedPane();\r\n\t\tInetAddress addr = InetAddress.getByName(ip); // ip\r\n\t\tSocket socket = new Socket(addr, port); // Port\r\n\t\tout = new ObjectOutputStream(socket.getOutputStream());\r\n\t\tin = new ObjectInputStream(socket.getInputStream());\r\n\t\t// stream con richieste del client\r\n\t\tiniziale.addWindowListener(new WindowAdapter() {\r\n\t\t\tpublic void windowClosing(WindowEvent ev) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tsocket.close();\r\n\t\t\t\t} catch (IOException e) {\r\n\t\t\t\t}\r\n\t\t\t\tSystem.exit(0);\r\n\t\t\t}\r\n\t\t});\r\n\t\tiniziale.add(schermata);\r\n\r\n\t}",
"protected void configurePorts() {\n\t\tremoveInputs();\n\t\tremoveOutputs();\n\n\t\t// FIXME: Replace with your input and output port definitions\n\n\t\t// Hard coded input port, expecting a single String\n\t\t//File name for the Input tables\n\t\taddInput(FIRST_INPUT, 0, true, null, String.class);\n\n\t\t\t\t\n\t\t// Single value output port (depth 0)\n\t\taddOutput(OUT_STD_OUTPUT, 0);\n\t\t// Single value output port (depth 0)\n\t\taddOutput(OUT_ERROR, 0);\n\t\taddOutput(VO_TABLE, 0);\n\n\t}",
"public void startRunning() {\n\t\t\t\n\t\t\ttry {\n\t\t\t\t\n\t\t\t\tserver = new ServerSocket(6789, 100); //6789 is the port number for docking(Where to connect). 100 is backlog no, i.e how many people can wait to access it.\n\t\t\t\twhile (true) {\n\t\t\t\t\t//This will run forever.\n\t\t\t\t\t\n\t\t\t\t\ttry{\n\t\t\t\t\t\t\n\t\t\t\t\t\twaitForConnection();\n\t\t\t\t\t\tsetupStreams();\n\t\t\t\t\t\twhileChatting();\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tcatch(EOFException eofException) {\n\t\t\t\t\t\t\n\t\t\t\t\t\tshowMessage(\"\\n The server has ended the connection!\");\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tfinally {\n\t\t\t\t\t\t\n\t\t\t\t\t\tcloseAll();\n\t\t\t\t\t\t//Housekeeping.\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tcatch(IOException ioException ) {\n\t\t\t\t\n\t\t\t\tioException.printStackTrace();\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t}",
"private void addComponents() {\n //this.getContentPane().add(new ViewDeckComputer(), BorderLayout.NORTH);\n createTopPanel();\n createCentralPanel();\n createBottomPanel();\n }",
"Builder port(int port);",
"public void dockNodeWindowed(DockNodeEvent e) {}",
"private void createAndListen() {\n\n\t\t\n\t}",
"public RobotContainer() {\n drivetrain.setDefaultCommand(new DrivetrainDriveCommand(drivetrain, driver));\n\n // Configure the button bindings\n configureButtonBindings();\n }",
"@Override\n\tpublic void customize(ConfigurableEmbeddedServletContainer container) {\n\t\tcontainer.setPort(8888); \n\t}",
"private MenuServicios(){\n super(\"Gym Manager Servicios a Socios\");\n setBackground(Color.WHITE);\n\tgetContentPane().setLayout(null);\n setResizable(false);\n\tsetDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);\n pack();\n\tsetSize(942,592);\n\tsetLocationRelativeTo(null);\n image_path = \"jar:\" + getClass().getProtectionDomain().getCodeSource().\n getLocation().toString() + \"!/imagenes/\";\n \n jdpFondo = new JDesktopPane();\n jdpFondo.setBackground(Color.WHITE);\n jtpcContenedor = new JXTaskPaneContainer();\n jtpPanel = new JXTaskPane();\n jtpPanel2 = new JXTaskPane();\n jpnlPanelPrincilal = new JPanel();\n jpnlPanelPrincilal.setBackground(Color.WHITE);\n jtpcContenedor.setBackground(Color.LIGHT_GRAY);\n \n paginaInicio();\n crearComponentes();\n addToPanel();\n accionComponentes();\n \n }",
"@Override\n\tprotected void addAction(HashSet<String> addSet){\n\t\t((AdaptDependencyManager)MiddleWareConfig.getInstance().getDepManager()).addNewDeploymentNodeBySet(addSet);\n\t}",
"public boolean isDockable() {\n return true;\r\n }",
"protected void configurePorts() {\n \t\tremoveInputs();\n \t\tremoveOutputs();\n \n \t\t// FIXME: Replace with your input and output port definitions\n \n \t\t// Hard coded input port, expecting a single String\n \t\t//File name for the Input tables\n \t\taddInput(IN_FIRST_INPUT_TABLE, 0, true, null, String.class);\n \t\taddInput(IN_FORMAT_INPUT_TABLE, 0, true, null, String.class);\n \t\taddInput(IN_FORMAT_OUTPUT_TABLE, 0, true, null, String.class);\n \t\taddInput(IN_FILTER, 0, true, null, String.class);\n \t\t\n \t\t\n \t\tif(configBean.getTypeOfInput().compareTo(\"File\")==0){\n \t\t\taddInput(IN_OUTPUT_TABLE_NAME, 0, true, null, String.class);\n \t\t}\n \t\t\n \n \t\t// Optional ports depending on configuration\n \t\t//if (configBean.getExampleString().equals(\"specialCase\")) {\n \t\t//\t// depth 1, ie. list of binary byte[] arrays\n \t\t//\taddInput(IN_EXTRA_DATA, 1, true, null, byte[].class);\n \t\t//\taddOutput(OUT_REPORT, 0);\n \t\t//}\n \t\t\n \t\t// Single value output port (depth 0)\n \t\taddOutput(OUT_SIMPLE_OUTPUT, 0);\n \t\t// Single value output port (depth 0)\n \t\taddOutput(OUT_REPORT, 0);\n \n \t}",
"public void allPanelRise(){\n \n if(!frame.install)\n frame.getInstallButton().setEnabled(true);\n \n frame.getInstallButton().setText(\"Install\");\n panelIDE1.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED));\n panelIDE2.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED));\n panelIDE3.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED));\n panelIDE4.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED));\n panelIDE5.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED));\n panelIDE6.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED));\n panelIDE7.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED));\n panelIDE8.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED));\n panelIDE9.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED));\n panelIDE10.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED));\n }",
"void installMarathonApps();",
"private void addWidgets() {\n\t\tgrid.setHgap(10);\n\t\tgrid.setVgap(5);\n\t\tgrid.setPadding(new Insets(150, 80, 80, 80));\n\t\tgrid.add(lblPort, 0, 1);\n\t\tgrid.add(txtPort, 1, 1);\n\t\tgrid.add(lblAdress, 0, 2);\n\t\tgrid.add(txtAdress, 1, 2);\n\t\tgrid.add(lblNick, 0, 4);\n\t\tgrid.add(txtNickname, 1, 4);\n\t\tgrid.add(lblNickTaken, 1, 5);\n\t\tgrid.add(lblCardDesign, 0, 3);\n\t\tgrid.add(comboBoxCardDesign, 1, 3);\n\t\tgrid.add(btnLogin, 0, 7);\n\t\timvStart.setImage(imageStart);\n\t}",
"public void apply(DockingContext dockingContext) throws WorkspaceException {\n\t\tByteArrayOutputStream outb = new ByteArrayOutputStream();\n\t\tPrintWriter out = new PrintWriter(outb);\n\t\tout.println(\"<?xml version=\\\"1.0\\\"?>\");\n\t\tout.println(\"<VLDocking version=\\\"2.1\\\">\");\n\t\tfor(int i = 0; i < desktops.size(); i++) {\n\t\t\tWSDesktop desktop = (WSDesktop) desktops.get(i);\n\t\t\tdesktop.writeDesktopNode(out);\n\t\t}\n\t\tout.println(\"</VLDocking>\");\n\t\tout.close();\n\t\tbyte[] bytes = outb.toByteArray();\n\t\t//System.out.println(new String(bytes));\n\t\tByteArrayInputStream is = new ByteArrayInputStream(bytes);\n\t\ttry {\n\t\t\tdockingContext.readXML(is);\n\t\t} catch(Exception ex) {\n\t\t\tthrow new WorkspaceException(ex);\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tis.close();\n\t\t\t} catch(Exception ignore) {\n\t\t\t}\n\t\t}\n\t}",
"public PortInfoListener(App app){\r\n super(app);\r\n }",
"public CloudSyncMain(){\n\n \t// initial SystemTray function\n \tsystemTray = SystemTray.getSystemTray();//获得系统托盘的实例\n \tjava.net.URL imgURL = this.getClass().getResource(\"images/sync-icon3.png\");\t//can not use \"image\\\\sync-icon3.png\"\n try {\n trayIcon = new TrayIcon(ImageIO.read(imgURL));\n systemTray.add(trayIcon);//设置托盘的图标,0.gif与该类文件同一目录\n }\n catch (IOException e1) {e1.printStackTrace();}\n catch (AWTException e2) {e2.printStackTrace();}\n frame.addWindowListener(new WindowAdapter(){ \n public void windowIconified(WindowEvent e){ \n frame.dispose();//窗口最小化时dispose该窗口 \n \t//frame.setVisible(false);\n } \n });\n trayIcon.addMouseListener(\n new MouseAdapter(){\n public void mouseClicked(MouseEvent e){\n if(e.getClickCount() == 1){\n frame.setExtendedState(Frame.NORMAL);\n frame.setVisible(true);\n }\n if(e.getClickCount() == 2){\n \tframe.setExtendedState(Frame.NORMAL);\n \tframe.setVisible(true);\n }\n }\n });\n try{\n \t\t//this.frame.setLayout(new GridLayout(1,3));\t\t// Have no idea what will happen after set this layout\n \tUIManager.setLookAndFeel(\"com.sun.java.swing.plaf.windows.WindowsLookAndFeel\");\n \tSwingUtilities.updateComponentTreeUI(frame.getContentPane());\n }catch(Exception e){\n \te.printStackTrace();\n }\n \n try {\n\t\t\tframe.setIconImage(ImageIO.read(imgURL));\n\t\t} catch (IOException e1) {\n\t\t\te1.printStackTrace();\n\t\t}\n \tjfc.setCurrentDirectory(new File(\"\\\\\"));// 文件选择器的初始目录定为d盘 \n frame.add(con);\n double lx = Toolkit.getDefaultToolkit().getScreenSize().getWidth(); \n double ly = Toolkit.getDefaultToolkit().getScreenSize().getHeight(); \n frame.setLocation(new Point((int) (lx / 2) - 250, (int) (ly / 2) - 250));// 设定窗口出现位置 \n frame.setSize(400, 440);// 设定窗口大小 \n \n label_sync_status_title.setBounds(110, 360, 70, 20);\n label_sync_status_content.setBounds(190, 360, 150, 20);\n \n list_title.setBounds(10, 10, 110, 20);\n text_sync_directory_path.setBounds(110, 330, 250, 20);\n button_add_directory.setBounds(120, 10, 90, 20); \n button_delete_directory.setBounds(220, 10, 140, 20);\n button_delete_directory.addActionListener(this);\n button_sync_to.setBounds(10, 330, 90, 20); \n button_sync_directory.setBounds(10, 360, 90, 20); \n button_add_directory.addActionListener(this); // 添加事件处理 \n button_sync_to.addActionListener(this); // 添加事件处理 \n button_sync_directory.addActionListener(this); // 添加事件处理 \n cbox_hour.setBounds(110, 295, 40, 20);\n cbox_minute.setBounds(180, 295, 40, 20);\n label_auto_sync.setBounds(10, 295, 100, 20);\n label_sync_hour.setBounds(155, 295, 40, 20);\n label_sync_minute.setBounds(225, 295, 40, 20);\n \n //initial ComboBox: cbox_hour & cbox_minute\n for(int i = 0; i < 24; i++){\n \tcbox_hour.insertItemAt(i, i);\n }\n cbox_hour.setSelectedIndex(0);\n \n for(int i = 0, k = 0; i < 60; i = i + 5, k++){\n \tcbox_minute.insertItemAt(i, k);\n }\n cbox_minute.setSelectedIndex(0);\n \n //con.add(label1); \n //con.add(text1); \n con.add(button_add_directory); \n //con.add(label2); \n con.add(text_sync_directory_path); \n con.add(button_sync_to); \n con.add(button_sync_directory); \n con.add(button_delete_directory);\n con.add(label_sync_status_title);\n con.add(label_sync_status_content);\n con.add(list_title);\n con.add(cbox_hour);\n con.add(cbox_minute);\n con.add(label_sync_hour);\n con.add(label_sync_minute);\n con.add(label_auto_sync);\n \n list_original = new JList(list_vector);\n scroll_pane = new JScrollPane(list_original);\n scroll_pane.setBounds(10, 35, 350, 250);\n con.add(scroll_pane);\n \n frame.setVisible(true);// 窗口可见\n frame.addWindowListener(this);\n //frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);// 使能关闭窗口,结束程序\n \n initial_list_original();\t\t// initial the JList (also the JScrollPane scroll_pane);\n initial_list_sync();\t\t\t//initial the JText\n initial_auto_sync_cbox();\t\t//initial the auto_sync_cbox hour & minute\n \n _sync_lock.open_lock();\n frame.setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);\t\t//dont kill the application when click \"X\" \n sync_in_background = new SyncInBackground(label_sync_status_content, text_sync_directory_path\n \t\t, default_list_model1, _sync_lock);\n \n int hour = (int) cbox_hour.getItemAt(cbox_hour.getSelectedIndex());\n int minute = (int) cbox_minute.getItemAt(cbox_minute.getSelectedIndex());\n cbox_hour.addActionListener(this);\n cbox_minute.addActionListener(this);\n sync_in_background.setSyncTime(hour, minute);\n sync_in_background.start();\n }",
"private void setContent() {\n\t\t// sets window content visible\n\t\tthis.getContentPane().setVisible(true);\n\n\t\t// sets up desktop area inside JFrame for JInternalFrame\n\t\tdesktop = new JDesktopPane();\n\t\tdesktop.setOpaque(false);\n\t\ti_console = getNewInternalFrame();\n\t\ti_palette = getNewInternalFrame();\n\n\t\tJPanel s_workspace = new JPanel(new BorderLayout());\n\t\tJPanel s_palette = new JPanel(new BorderLayout());\n\t\tdock_palette.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\ti_palette_docked = !i_palette_docked;\n\t\t\t\ti_palette.setSize(new Dimension(250, 200));\n\t\t\t}\n\t\t});\n\t\ts_palette.addMouseListener(new MouseAdapter() {\n\t\t\t@Override\n\t\t\tpublic void mousePressed(MouseEvent e) {\n\t\t\t\tif (SwingUtilities.isRightMouseButton(e)) {\n\t\t\t\t\trightMenuClick = true;\n\t\t\t\t\trmenu.removeAll();\n\t\t\t\t\trmenu.add(dock_palette);\n\t\t\t\t\trmenu.show(e.getComponent(), e.getX(), e.getY());\n\t\t\t\t}\n\t\t\t\tif (SwingUtilities.isLeftMouseButton(e)) {\n\t\t\t\t\trightMenuClick = false;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\t// palette internalframe content\n\n\t\ts_palette.setLayout(new BoxLayout(s_palette, BoxLayout.Y_AXIS));\n\n\t\tJButton button_DRect = new JButton(\"DraggableRect\");\n\t\tbutton_DRect.setAlignmentX(JButton.CENTER_ALIGNMENT);\n\t\tbutton_DRect.setMaximumSize(new Dimension(125, 25));\n\t\tbutton_DRect.addActionListener(this);\n\t\tbutton_DRect.setActionCommand(\"draggableRect\");\n\t\ts_palette.add(button_DRect);\n\n\t\ts_palette.add(Box.createRigidArea(new Dimension(0, 10)));\n\n\t\tJButton button_Assignment = new JButton(\"Assignment\");\n\t\tbutton_Assignment.setAlignmentX(JButton.CENTER_ALIGNMENT);\n\t\tbutton_Assignment.setMaximumSize(new Dimension(125, 25));\n\t\tbutton_Assignment.addActionListener(this);\n\t\tbutton_Assignment.setActionCommand(\"assignment\");\n\t\ts_palette.add(button_Assignment);\n\n\t\ts_palette.add(Box.createRigidArea(new Dimension(0, 10)));\n\n\t\tJButton button_Conditional = new JButton(\"Conditional\");\n\t\tbutton_Conditional.setAlignmentX(JButton.CENTER_ALIGNMENT);\n\t\tbutton_Conditional.addActionListener(this);\n\t\tbutton_Conditional.setActionCommand(\"conditional\");\n\t\tbutton_Conditional.setMaximumSize(new Dimension(125, 25));\n\t\ts_palette.add(button_Conditional);\n\n\t\ts_palette.add(Box.createRigidArea(new Dimension(0, 10)));\n\n\t\tJButton button_Loop = new JButton(\"Loop\");\n\t\tbutton_Loop.setAlignmentX(JButton.CENTER_ALIGNMENT);\n\t\tbutton_Loop.setMaximumSize(new Dimension(125, 25));\n\t\tbutton_Loop.addActionListener(this);\n\t\tbutton_Loop.setActionCommand(\"loop\");\n\t\ts_palette.add(button_Loop);\n\n\t\ts_palette.add(Box.createRigidArea(new Dimension(0, 10)));\n\t\t// ---------------------------------------------------------------------------------\n\n\t\tJButton button_Function = new JButton(\"Function\");\n\t\tbutton_Function.setAlignmentX(JButton.CENTER_ALIGNMENT);\n\t\tbutton_Function.setMaximumSize(new Dimension(125, 25));\n\t\tbutton_Function.addActionListener(this);\n\t\tbutton_Function.setActionCommand(\"function\");\n\t\ts_palette.add(button_Function);\n\n\t\ts_palette.add(Box.createRigidArea(new Dimension(0, 10)));\n\t\t// -------------------------------------------------------------------------------\n\t\tJButton button_Start = new JButton(\"Start\");\n\t\tbutton_Start.setAlignmentX(JButton.CENTER_ALIGNMENT);\n\t\tbutton_Start.setMaximumSize(new Dimension(125, 25));\n\t\tbutton_Start.addActionListener(this);\n\t\tbutton_Start.setActionCommand(\"start\");\n\t\ts_palette.add(button_Start);\n\n\t\ts_palette.add(Box.createRigidArea(new Dimension(0, 10)));\n\n\t\tJButton button_Text = new JButton(\"Script\");\n\t\tbutton_Text.setAlignmentX(JButton.CENTER_ALIGNMENT);\n\t\tbutton_Text.setMaximumSize(new Dimension(125, 25));\n\t\tbutton_Text.addActionListener(this);\n\t\tbutton_Text.setActionCommand(\"script\");\n\t\ts_palette.add(button_Text);\n\n\t\tJPanel s_output = new JPanel(new BorderLayout());\n\n\t\tdock_console.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\ti_console_docked = !i_console_docked;\n\t\t\t\tif (!i_console_docked) {\n\t\t\t\t\ti_console.setSize(new Dimension(250, 200));\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tcodeLabel.addMouseListener(new MouseAdapter() {\n\t\t\t@Override\n\t\t\tpublic void mousePressed(MouseEvent e) {\n\t\t\t\tif (SwingUtilities.isRightMouseButton(e)) {\n\t\t\t\t\trightMenuClick = true;\n\t\t\t\t\trmenu.removeAll();\n\t\t\t\t\trmenu.add(dock_console);\n\t\t\t\t\trmenu.show(e.getComponent(), e.getX(), e.getY());\n\t\t\t\t}\n\t\t\t\tif (SwingUtilities.isLeftMouseButton(e)) {\n\t\t\t\t\trightMenuClick = false;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\tJScrollPane codeScrollPane = new JScrollPane(codeLabel); // made\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// scrollPane\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// connecting\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// to\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// codeLabel\n\t\tJScrollPane s_workspace_ScrollPane = new JScrollPane(s_workspace);\n\t\tJScrollPane s_palette_ScrollPane = new JScrollPane(s_palette);\n\t\tJScrollPane s_output_ScrollPane = new JScrollPane(s_output);\n\t\t// JScrollPane s_main_ScrollPane = new JScrollPane(desktop);\n\n\t\ti_console.getContentPane().add(codeScrollPane);\n\t\ti_palette.getContentPane().add(s_palette_ScrollPane);\n\n\t\tcodeScrollPane.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS); \n\t\ts_workspace_ScrollPane.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);\n\t\ts_palette_ScrollPane.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);\n\t\ts_output_ScrollPane.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);\n\t\t// s_main_ScrollPane\n\t\t// .setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);\n\n\t\tdesktop.add(i_console);\n\t\tdesktop.add(i_palette);\n\t\tthis.setContentPane(desktop);\n\t\t// this.setContentPane(s_main_ScrollPane);\n\n\t\t// buffer panel between JFrame and p_main content\n\t\tbufferPanel.setVisible(true);\n\t\tbufferPanel.setLayout(new GridBagLayout());\n\t\tbufferPanel.setOpaque(false);\n\t\tthis.getContentPane().add(bufferPanel);\n\n\t\t// GridBagConstraints for setting p_main into bufferPanel\n\t\tGridBagConstraints gbc_p_main = new GridBagConstraints();\n\t\tgbc_p_main.anchor = GridBagConstraints.CENTER;\n\t\tgbc_p_main.insets = new Insets(0, 0, 5, 5);\n\t\tgbc_p_main.weightx = 1;\n\t\tgbc_p_main.weighty = 1;\n\t\tgbc_p_main.gridx = 0;\n\t\tgbc_p_main.gridy = 0;\n\t\tgbc_p_main.fill = GridBagConstraints.BOTH;\n\n\t\t// initializes JPanel encapsulating the content (p_main)\n\t\tp_main.setVisible(true);\n\t\tp_main.setBorder(BorderFactory.createLineBorder(Color.black));\n\t\tp_main.setRequestFocusEnabled(false);\n\t\tp_main.setOpaque(false);\n\t\tp_main.setFocusable(false);\n\t\t// p_main.setBackground(Color.WHITE);\n\t\tbufferPanel.add(p_main, gbc_p_main);\n\t\tGridBagLayout gbl_p_main = new GridBagLayout();\n\t\tgbl_p_main.columnWidths = new int[] { 0, 0, 0, 0 };\n\t\tgbl_p_main.rowHeights = new int[] { 0, 0, 0, 0, 0, 0, 0, 0 };\n\t\tgbl_p_main.columnWeights = new double[] { 1.0, 2.0, 1.0, Double.MIN_VALUE };\n\t\tgbl_p_main.rowWeights = new double[] { 1.0, 2.0, 2.0, 2.0, 2.0, 4.0, 1.0, Double.MIN_VALUE };\n\t\tp_main.setLayout(gbl_p_main);\n\n\t\t// this is the left panel\n\t\t// initializes p_palette\n\t\tp_palette.setVisible(true);\n\t\tp_palette.setOpaque(false);\n\t\tGridBagConstraints gbc_p_palette = new GridBagConstraints();\n\t\tgbc_p_palette.anchor = GridBagConstraints.WEST;\n\t\tgbc_p_palette.gridheight = 6;\n\t\tgbc_p_palette.insets = new Insets(0, 0, 5, 5);\n\t\tgbc_p_palette.fill = GridBagConstraints.BOTH;\n\t\tgbc_p_palette.gridx = 0;\n\t\tgbc_p_palette.gridy = 0;\n\n\t\tp_main.add(p_palette, gbc_p_palette);\n\t\tGridBagLayout gbl_p_palette = new GridBagLayout();\n\t\tgbl_p_palette.columnWidths = new int[] { 0 };\n\t\tgbl_p_palette.rowHeights = new int[] { 0 };\n\t\tgbl_p_palette.columnWeights = new double[] { Double.MIN_VALUE };\n\t\tgbl_p_palette.rowWeights = new double[] { Double.MIN_VALUE };\n\t\tp_palette.setLayout(gbl_p_palette);\n\n\t\t// this is the bottom panel\n\t\t// initializes p_console\n\t\tp_console.setVisible(true);\n\t\tp_console.setOpaque(false);\n\t\tGridBagConstraints gbc_p_console = new GridBagConstraints();\n\t\tgbc_p_console.anchor = GridBagConstraints.WEST;\n\t\tgbc_p_console.gridwidth = 2;\n\t\tgbc_p_console.insets = new Insets(0, 0, 5, 0);\n\t\tgbc_p_console.fill = GridBagConstraints.BOTH;\n\t\tgbc_p_console.gridx = 1;\n\t\tgbc_p_console.gridy = 5;\n\t\tp_main.add(p_console, gbc_p_console);\n\t\t/*\n\t\t * GridBagLayout gbl_p_console = new GridBagLayout();\n\t\t * gbl_p_console.columnWidths = new int[]{0}; gbl_p_console.rowHeights =\n\t\t * new int[]{0}; gbl_p_console.columnWeights = new\n\t\t * double[]{Double.MIN_VALUE}; gbl_p_console.rowWeights = new\n\t\t * double[]{Double.MIN_VALUE}; p_console.setLayout(gbl_p_console);\n\t\t */\n\t\tp_console.setLayout(new BorderLayout());\n\n\t}",
"Builder setPort(String port);",
"public void callMaster(String addrutil, String portutil);",
"private void addListeners() {\n\t\t\n\t\tloadJokesOptionMenu.addActionListener((event) -> {\n\t\t\tJFileChooser openDialog = new JFileChooser();\n\t\t\t\n\t\t FileNameExtensionFilter filter = new FileNameExtensionFilter(\"text files\", \"txt\");\n\t\t openDialog.setFileFilter(filter);\n\t\t int returnVal = openDialog.showOpenDialog(null);\n\t\t if(returnVal == JFileChooser.APPROVE_OPTION) {\t \n\t\t jokeFile = openDialog.getSelectedFile().getAbsolutePath();\n\t\t }\n\t\t});\n\t\t\n\t\tstartServerFileMenu.addActionListener(event -> startServer());\n\t\tstopServerFileMenu.addActionListener(event -> stopServer());\n\t\t\n\t\texitFileMenu.addActionListener(event -> quitApp());\n\n\t\tsetupServerInfoOptionMenu.addActionListener(event -> setupServerInfo());\n\t\t\n\t\taboutHelpMenu.addActionListener(event -> {\n\t\t\tJOptionPane.showMessageDialog(null, \"Knock Knock Server v1.0 Copyright 2017 RLTech Inc\");\n\t\t});\n\t\t\n\t\tstartServerToolBarButton.addActionListener(event -> {\n\t\t\tstartServer();\n\t\t\tstartServerToolBarButton.setEnabled(false);\n\t\t\tstopServerToolBarButton.setEnabled(true);\n\t\t});\n\t\t\n\t\tstopServerToolBarButton.addActionListener(event -> {\n\t\t\tstopServer();\n\t\t\tstartServerToolBarButton.setEnabled(true);\n\t\t\tstopServerToolBarButton.setEnabled(false);\n\t\t});\n\n\t\tkkClientToolBarButton.addActionListener(event -> {\n\n\t\t\ttry {\n\t\t\t\tRuntime.getRuntime().exec(\"java -jar KKClient.jar\");\n\t\t\t} catch (IOException e1) {\n\t\t\t\t//e1.printStackTrace();\n\t\t\t\tUtility.displayErrorMessage(\"Fail to find or launch KKClient.jar client app. Make sure Java run time (JRE) is installed and KKClient.jar is stored in the same path as this server app.\");\n\t\t\t}\n\t\t});\n\t\t\n\t\taddWindowListener(new WindowAdapter() {\n\t\t public void windowClosing(WindowEvent e) {\n\t\t \tquitApp();\t\n\t\t }\n\t\t});\n\t}",
"public void startup(){}",
"private void setup() {\n\t\tJTextArea jta = new JTextArea();\n\t\tsetLayout(new BorderLayout());\n\t\tadd(new JScrollPane(jta), BorderLayout.CENTER);\n\t\tsetTitle(SERVER_NAME);\n\t\tjta.setEditable(false);\n\t\tsetSize(500, 300);\n\t\tsetDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tsetVisible(true);\n\t\tjta.append(new Date().toString());\n\t}",
"private void addPanelstoBookPanel() {\r\n this.add(centerPanel, BorderLayout.CENTER);\r\n\r\n /**\r\n * Add the bookPanel to the baseScreen en revalidate and repaint\r\n */\r\n Main.getController().getBaseScreen().mainContainer.add(this, BorderLayout.CENTER);\r\n Main.getController().getBaseScreen().mainContainer.revalidate();\r\n Main.getController().getBaseScreen().mainContainer.repaint();\r\n }",
"protected void setupUI() {\n\t\t\n\t\tcontentPane = new JPanel();\n\t\tlayerLayout = new CardLayout();\n\t\tcontentPane.setLayout(layerLayout);\n\t\tControlAgendaViewPanel agendaViewPanel = new ControlAgendaViewPanel(layerLayout,contentPane);\n\t\tagendaPanelFactory = new AgendaPanelFactory();\n\t\tdayView = agendaPanelFactory.getAgendaView(ActiveView.DAY_VIEW);\n\t\tweekView = agendaPanelFactory.getAgendaView(ActiveView.WEEK_VIEW);\n\t\tmonthView = agendaPanelFactory.getAgendaView(ActiveView.MONTH_VIEW);\n\t\t\n\t\tcontentPane.add(dayView,ActiveView.DAY_VIEW.name());\n\t\tcontentPane.add(weekView,ActiveView.WEEK_VIEW.name());\n\t\tcontentPane.add(monthView,ActiveView.MONTH_VIEW.name());\n\t\n\t\tJSplitPane splitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT,agendaViewPanel, contentPane);\n\t\tthis.setContentPane(splitPane);\n\t\t\n\t\tJMenuBar menuBar = new JMenuBar();\n\t\t\n\t\t//MENU\n\t\tJMenu file, edit, help, view;\n\t\t\n\t\t//ITEM DE MENU\n\t\tJMenuItem load, quit, save;\n\t\tJMenuItem display, about;\n\t\tJMenuItem month, week, day;\n\t\t\n\t\t/* File Menu */\n\t\t/** EX4 : MENU : UTILISER L'AIDE FOURNIE DANS LE TP**/\n\t\t//Classe pour les listener des parties non implémentés\n\t\tclass MsgError implements ActionListener {\n\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tJOptionPane.showMessageDialog(null, ApplicationSession.instance().getString(\"info\"), \"info\", JOptionPane.INFORMATION_MESSAGE, null);\t\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t//Menu File\t\n\t\tfile = new JMenu(ApplicationSession.instance().getString(\"file\"));\n\t\t\n\t\tmenuBar.add(file);\n\t\tfile.setMnemonic(KeyEvent.VK_A);\n\t\tfile.getAccessibleContext().setAccessibleDescription(\n\t\t \"The only menu in this program that has menu items\");\n\t\tmenuBar.add(file);\n\t\t\n\n\t\t//a group of JMenuItems\n\t\tload = new JMenuItem(ApplicationSession.instance().getString(\"load\"),KeyEvent.VK_T);\n\t\tload.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_1, ActionEvent.ALT_MASK));\n\t\tload.getAccessibleContext().setAccessibleDescription(\"This doesn't really do anything\");\n\t\tfile.add(load);\n\t\tload.addActionListener(new MsgError());\n\t\t\n\t\tquit = new JMenuItem(ApplicationSession.instance().getString(\"quit\"),KeyEvent.VK_T);\n\t\tquit.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_1, ActionEvent.ALT_MASK));\n\t\tquit.getAccessibleContext().setAccessibleDescription(\"This doesn't really do anything\");\n\t\tfile.add(quit);\n\t\t\n\t\t//LISTENER QUIT\n\t\tquit.addActionListener(new ActionListener() {\n\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\n\t\t\t\t//message box yes/no pour le bouton quitter\n\t\t\t\tint dialogButton = JOptionPane.YES_NO_OPTION;\n\t\t\t\tint dialogResult = JOptionPane.showConfirmDialog (null, new String(ApplicationSession.instance().getString(\"quit?\")),\"Warning\",dialogButton);\n\t\t\t\tif(dialogResult == JOptionPane.YES_OPTION){\n\t\t\t\tSystem.exit(0);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t});\n\t\t\n\t\tsave = new JMenuItem(new String(ApplicationSession.instance().getString(\"save\")),KeyEvent.VK_T);\n\t\tsave.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_1, ActionEvent.ALT_MASK));\n\t\tsave.getAccessibleContext().setAccessibleDescription(\"This doesn't really do anything\");\n\t\tfile.add(save);\n\t\tsave.addActionListener(new MsgError());\n\t\t\n\t\t\n\t//Menu Edit \n\t\tedit = new JMenu(new String(ApplicationSession.instance().getString(\"edit\")));\n\t\t\n\t\tmenuBar.add(edit);\n\t\tedit.setMnemonic(KeyEvent.VK_A);\n\t\tedit.getAccessibleContext().setAccessibleDescription(\n\t\t \"The only menu in this program that has menu items\");\n\t\t\n\t\t//Sous menu View\n\t\t\n\t\tview = new JMenu(new String(ApplicationSession.instance().getString(\"view\")));\n\t\tview.setMnemonic(KeyEvent.VK_A);\n\t\tview.getAccessibleContext().setAccessibleDescription(\n\t\t \"The only menu in this program that has menu items\");\n\t\tedit.add(view);\n\t\t\n\t\tmonth = new JMenuItem(new String(ApplicationSession.instance().getString(\"month\")),KeyEvent.VK_T);\n\t\tmonth.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_1, ActionEvent.ALT_MASK));\n\t\tmonth.getAccessibleContext().setAccessibleDescription(\"This doesn't really do anything\");\n\t\tview.add(month);\n\t\t\t\t\n\t\tweek = new JMenuItem(new String(ApplicationSession.instance().getString(\"week\")),KeyEvent.VK_T);\n\t\tweek.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_1, ActionEvent.ALT_MASK));\n\t\tweek.getAccessibleContext().setAccessibleDescription(\"This doesn't really do anything\");\n\t\tview.add(week);\n\t\t\n\t\tday = new JMenuItem(new String(ApplicationSession.instance().getString(\"day\")),KeyEvent.VK_T);\n\t\tday.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_1, ActionEvent.ALT_MASK));\n\t\tday.getAccessibleContext().setAccessibleDescription(\"This doesn't really do anything\");\n\t\tview.add(day);\n\t\t\n\t\t//LISTENER VIEW\n\t\t\n\t\t\n\t\tmonth.addActionListener(new ActionListener() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\n\t\t\t\tlayerLayout.last(contentPane);\t\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t});\n\t\t\n\t\tweek.addActionListener(new ActionListener() {\n\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tlayerLayout.first(contentPane);\t\n\t\t\t\tlayerLayout.next(contentPane);\t\n\t\t\t\t}\n\t\t\t\n\t\t\t\n\t\t});\n\t\tday.addActionListener(new ActionListener() {\n\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\n\t\t\t\tlayerLayout.first(contentPane);\t\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t});\n\t\t\n\t\t\n\t//Menu Help\n\t\thelp = new JMenu(new String(ApplicationSession.instance().getString(\"help\")));\n\t\t\n\t\tmenuBar.add(help);\n\t\thelp.setMnemonic(KeyEvent.VK_A);\n\t\thelp.getAccessibleContext().setAccessibleDescription(\n\t\t \"The only menu in this program that has menu items\");\n\t\tmenuBar.add(help);\n\t\t\n\t\tdisplay = new JMenuItem(new String(ApplicationSession.instance().getString(\"display\")),KeyEvent.VK_T);\n\t\tdisplay.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_1, ActionEvent.ALT_MASK));\n\t\tdisplay.getAccessibleContext().setAccessibleDescription(\"This doesn't really do anything\");\n\t\thelp.add(display);\n\t\tdisplay.addActionListener(new MsgError());\n\t\t\n\t\tabout = new JMenuItem(new String(ApplicationSession.instance().getString(\"about\")),KeyEvent.VK_T);\n\t\tabout.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_1, ActionEvent.ALT_MASK));\n\t\tabout.getAccessibleContext().setAccessibleDescription(\"This doesn't really do anything\");\n\t\thelp.add(about);\n\t\tabout.addActionListener(new MsgError());\n\t\t\n\t\t\n\n\t\tthis.setJMenuBar(menuBar);\n\t\tthis.pack();\n\t\tlayerLayout.next(contentPane);\n\t}",
"public RobotContainer() { \n // Configure the button bindings\n configureButtonBindings();\n\n rDrive.setDefaultCommand(manualDrive);\n lift.setDefaultCommand(moveArm);\n }",
"Port createPort();",
"Port createPort();",
"public Dock getDock() {\n return dock;\n }",
"private void putPanels() {\n\t\tfrmUserDesign.getContentPane().add(userDesignPanel, \"userDesign\");\n\t\tfrmUserDesign.getContentPane().add(vendasClass.getVendas(), \"Vendas\");\n\t\tfrmUserDesign.getContentPane().add(maquinaClass.getMaquinas(), \"Maquinas\");\n\t\tfrmUserDesign.getContentPane().add(funcionarioClasse.getFuncionarios(), \"Funcionarios\");\n\t\tfrmUserDesign.getContentPane().add(produtoClass.getProdutos(), \"Produtos\");\n\t\tfrmUserDesign.getContentPane().add(chart.getGrafico(), \"Grafico\");\n\t\tcl.show(frmUserDesign.getContentPane(), \"userDesign\");// mostrar o main menu\n\t}",
"public void dockNodeFloated(DockNodeEvent e) {}",
"protected void addWorkspace( String workspaceName ) {\n }",
"private void createConent() {\n\t\tdockPanel = new DockLayoutPanel(Unit.PX);\n\t\tribbonBarPanel = new RibbonBarContainer();\n\t\tbattleMatCanvasPanel = new SimpleLayoutPanel();\n\t\tmainPanel = new LayoutPanel();\n\t\tmainPanel.setSize(\"100%\", \"100%\");\n\t\tbattleMatCanvas = new BattleMatCanvas();\n\t\tbattleMatCanvasPanel.clear();\n\t\tbattleMatCanvasPanel.add(battleMatCanvas);\n\t\teast.setSize(\"100%\", \"100%\");\n\t\teast.add(assetManagementPanel);\n\t\tsplitPanel = new SplitLayoutPanel() {\n\t\t\t@Override\n\t\t\tpublic void onResize() {\n\t\t\t\tsuper.onResize();\n\t\t\t\tbattleMatCanvas.onResize();\n\t\t\t};\n\t\t};\n\t\tmainPanel.add(splitPanel);\n\t\tdockPanel.clear();\n\t\tdockPanel.addNorth(ribbonBarPanel, Constants.RIBBON_BAR_SIZE);\n\t\tdockPanel.add(mainPanel);\n\t\t// MUST CALL THIS METHOD to set the constraints; if you don't not much\n\t\t// will be displayed!\n\t\tdockPanel.forceLayout();\n\n\t\tWindow.addResizeHandler(new ResizeHandler() {\n\t\t\tpublic void onResize(final ResizeEvent event) {\n\t\t\t\tdoWindowResize(event);\n\t\t\t}\n\t\t});\n\t}",
"public void setPort(int port);",
"public void setPort(int port);",
"void startup();",
"void startup();",
"private static JFrame createFrame(){\n\t\t// Create the frame of the demonstration.\n\t\tJFrame demoFrame = new JFrame(\"Dock effect demonstration frame.\");\n\t\tdemoFrame.setSize(new Dimension(800, 600));\n\t\tdemoFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\t\n\t\t// Create the content pane of the frame.\n\t\tJPanel contentPane = new JPanel();\n\t\tdemoFrame.setContentPane(contentPane);\n\t\t\n\t\t// Create and add the docking area of the demonstration.\n\t\tDockEffectPanel<JPanel> dockEffectPanel = createDockEffectPanel();\n\t\tdockEffectPanel.setBorder(BorderFactory.createEtchedBorder()); // Put a border on the dock effect panel\n\t\t\n\t\t// Create the layout of the docking area.\n\t\tGroupLayout layout = new GroupLayout(contentPane);\n\t\tcontentPane.setLayout(layout);\n\t\tlayout.setHorizontalGroup(layout.createSequentialGroup()\n\t\t\t.addGap(0, 0, Short.MAX_VALUE)\n\t\t\t.addComponent(dockEffectPanel, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t.addGap(0, 0, Short.MAX_VALUE)\n\t\t);\n\t\tlayout.setVerticalGroup(layout.createSequentialGroup()\n\t\t\t.addGap(0, 0, Short.MAX_VALUE)\n\t\t\t.addComponent(dockEffectPanel, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t.addGap(0, 0, Short.MAX_VALUE)\n\t\t);\n\t\t\n\t\treturn demoFrame;\n\t}",
"public void run(){\n\n\t\tServerSocket socketEcoute;\n\t\ttry {\n\t\t\tsocketEcoute = new ServerSocket();\n\t\t\tsocketEcoute.bind(new InetSocketAddress(this.defaultPort));\n\t\t\tSystem.out.println(\"Port manager started on : \"+this.defaultPort);\n\t\t\twhile(true){\n\t\t\t\tSocket socketConnexion = socketEcoute.accept();\n\t\t\t\tSystem.out.println(\"Someone is connected on PortManager\");\n\t\t\t\t\n\t\t\t\tnew PortManagerThread(socketConnexion,this.ctrl).start();\n\t\t\t\t\n\t\t\t\t\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}",
"private void setupGUI() {\r\n\t\tnetPaintClient = new NetPaintClient(out, clientName);\t\r\n\t\tnetPaintClient.addWindowListener(new WindowAdapter(){\r\n\t\tpublic void windowClosing(WindowEvent arg0) {\r\n\t\t\ttry {\r\n\t\t\t\tout.writeObject(new DisconnectCommand(clientName));\r\n\t\t\t\tout.close();\r\n\t\t\t\tin.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}\r\n\t});\r\n\t}",
"public void testSetPort() {\n }",
"private void buildGui() {\n nifty = screen.getNifty();\n nifty.setIgnoreKeyboardEvents(true);\n nifty.loadStyleFile(\"nifty-default-styles.xml\");\n nifty.loadControlFile(\"nifty-default-controls.xml\");\n nifty.addScreen(\"Option_Screen\", new ScreenBuilder(\"Options_Screen\") {\n {\n controller((ScreenController) app);\n layer(new LayerBuilder(\"background\") {\n {\n childLayoutCenter();;\n font(\"Interface/Fonts/zombie.fnt\");\n backgroundImage(\"Backgrounds/ZOMBIE1.jpg\");\n visibleToMouse(true);\n }\n });\n layer(new LayerBuilder(\"foreground\") {\n {\n childLayoutOverlay();\n font(\"Interface/Fonts/zombie.fnt\");\n\n panel(new PanelBuilder(\"Switch_Options\") {\n {\n childLayoutVertical();\n control(new ButtonBuilder(\"\", \"Display Settings\") {\n {\n marginTop(\"42%\");\n marginLeft(\"5%\");\n height(\"50px\");\n width(\"150px\");\n align(Align.Left);\n interactOnClick(\"goTo(Display_Settings)\");\n font(\"Interface/Fonts/zombie.fnt\");\n }\n });\n /*control(new ButtonBuilder(\"\", \"Graphics Settings\") {\n {\n marginTop(\"2%\");\n marginLeft(\"5%\");\n height(\"50px\");\n width(\"150px\");\n align(Align.Left);\n font(\"Interface/Fonts/zombie.fnt\");\n interactOnClick(\"goTo(Graphics_Extension)\");\n }\n });*/\n control(new ButtonBuilder(\"\", \"Sound Settings\") {\n {\n marginTop(\"2%\");\n marginLeft(\"5%\");\n height(\"50px\");\n width(\"150px\");\n align(Align.Left);\n font(\"Interface/Fonts/zombie.fnt\");\n interactOnClick(\"goTo(#Sound_Settings)\");\n }\n });\n control(new ButtonBuilder(\"\", \"Leaderboard\") {\n {\n marginTop(\"2%\");\n marginLeft(\"5%\");\n height(\"50px\");\n width(\"150px\");\n align(Align.Left);\n font(\"Interface/Fonts/zombie.fnt\");\n interactOnClick(\"goTo(Leader_Board)\");\n }\n });\n control(new ButtonBuilder(\"\", \"Logout\") {\n {\n marginTop(\"2%\");\n marginLeft(\"5%\");\n height(\"50px\");\n width(\"150px\");\n align(Align.Left);\n font(\"Interface/Fonts/zombie.fnt\");\n interactOnClick(\"goTo(#Login_Screen)\");\n }\n });\n control(new ButtonBuilder(\"\", \"Quit Game\") {\n {\n marginTop(\"2%\");\n marginLeft(\"5%\");\n height(\"50px\");\n width(\"150px\");\n align(Align.Left);\n font(\"Interface/Fonts/zombie.fnt\");\n interactOnClick(\"quitGame()\");\n }\n });\n }\n });\n }\n });\n }\n }.build(nifty));\n nifty.addScreen(\"Graphics_Settings\", new ScreenBuilder(\"Graphics_Extension\") {\n {\n controller(settingsControl);\n layer(new LayerBuilder(\"background\") {\n {\n font(\"Interface/Fonts/zombie.fnt\");\n childLayoutCenter();\n backgroundImage(\"Backgrounds/ZOMBIE1.jpg\");\n visibleToMouse(true);\n }\n });\n layer(new LayerBuilder(\"foreground\") {\n {\n font(\"Interface/Fonts/zombie.fnt\");\n childLayoutOverlay();\n panel(new PanelBuilder(\"Settings\") {\n {\n childLayoutVertical();\n control(new ButtonBuilder(\"\", \"Display Settings\") {\n {\n marginTop(\"42%\");\n marginLeft(\"5%\");\n height(\"50px\");\n width(\"150px\");\n align(Align.Left);\n font(\"Interface/Fonts/zombie.fnt\");\n interactOnClick(\"goTo(Display_Settings)\");\n }\n });\n /*control(new ButtonBuilder(\"\", \"Graphics Settings\") {\n {\n marginTop(\"2%\");\n marginLeft(\"5%\");\n height(\"50px\");\n width(\"150px\");\n align(Align.Left);\n font(\"Interface/Fonts/zombie.fnt\");\n }\n });*/\n control(new ButtonBuilder(\"\", \"Sound Settings\") {\n {\n marginTop(\"2%\");\n marginLeft(\"5%\");\n height(\"50px\");\n width(\"150px\");\n align(Align.Left);\n font(\"Interface/Fonts/zombie.fnt\");\n interactOnClick(\"goTo(#Sound_Settings)\");\n }\n });\n control(new ButtonBuilder(\"\", \"Leaderboard\") {\n {\n marginTop(\"2%\");\n marginLeft(\"5%\");\n height(\"50px\");\n width(\"150px\");\n align(Align.Left);\n font(\"Interface/Fonts/zombie.fnt\");\n interactOnClick(\"goTo(Leader_Board)\");\n }\n });\n control(new ButtonBuilder(\"\", \"Logout\") {\n {\n marginTop(\"2%\");\n marginLeft(\"5%\");\n height(\"50px\");\n width(\"150px\");\n align(Align.Left);\n font(\"Interface/Fonts/zombie.fnt\");\n interactOnClick(\"goTo(#Login_Screen)\");\n }\n });\n control(new ButtonBuilder(\"\", \"Quit Game\") {\n {\n marginTop(\"2%\");\n marginLeft(\"5%\");\n height(\"50px\");\n width(\"150px\");\n align(Align.Left);\n font(\"Interface/Fonts/zombie.fnt\");\n interactOnClick(\"quitGame()\");\n }\n });\n }\n });\n }\n });\n layer(new LayerBuilder(\"Settings\") {\n {\n font(\"Interface/Fonts/zombie.fnt\");\n childLayoutVertical();\n panel(new PanelBuilder(\"Post_Water_Panel\") {\n {\n childLayoutHorizontal();\n marginLeft(\"40%\");\n marginTop(\"15%\");\n control(new LabelBuilder(\"\", \"Post Water\") {\n {\n font(\"Interface/Fonts/zombie.fnt\");\n color(\"#ff0000\");\n }\n });\n control(new CheckboxBuilder(\"Post_Water_Button\") {\n {\n marginLeft(\"110%\");\n }\n });\n }\n });\n panel(new PanelBuilder(\"Water_Reflections_Panel\") {\n {\n childLayoutHorizontal();\n marginLeft(\"40%\");\n marginTop(\"5%\");\n control(new LabelBuilder(\"\", \"Water Reflections\") {\n {\n font(\"Interface/Fonts/zombie.fnt\");\n color(\"#ff0000\");\n }\n });\n control(new CheckboxBuilder(\"Water_Reflections_Button\") {\n {\n marginLeft(\"45%\");\n }\n });\n }\n });\n panel(new PanelBuilder(\"Water_Ripples_Panel\") {\n {\n childLayoutHorizontal();\n marginLeft(\"40%\");\n marginTop(\"5%\");\n control(new LabelBuilder(\"\", \"Water Ripples\") {\n {\n font(\"Interface/Fonts/zombie.fnt\");\n color(\"#ff0000\");\n }\n });\n control(new CheckboxBuilder(\"Water_Ripples_Button\") {\n {\n marginLeft(\"75%\");\n }\n });\n }\n });\n panel(new PanelBuilder(\"Water_Specular_Panel\") {\n {\n childLayoutHorizontal();\n marginLeft(\"40%\");\n marginTop(\"5%\");\n control(new LabelBuilder(\"\", \"Water Specular\") {\n {\n font(\"Interface/Fonts/zombie.fnt\");\n color(\"#ff0000\");\n }\n });\n control(new CheckboxBuilder(\"Water_Specular_Button\") {\n {\n marginLeft(\"59%\");\n }\n });\n }\n });\n panel(new PanelBuilder(\"Water_Foam_Panel\") {\n {\n childLayoutHorizontal();\n marginLeft(\"40%\");\n marginTop(\"5%\");\n control(new LabelBuilder(\"\", \"Water Foam\") {\n {\n font(\"Interface/Fonts/zombie.fnt\");\n color(\"#ff0000\");\n }\n });\n control(new CheckboxBuilder(\"Water_Foam_Button\") {\n {\n marginLeft(\"93%\");\n }\n });\n }\n });\n panel(new PanelBuilder(\"Sky_Dome_Panel\") {\n {\n childLayoutHorizontal();\n marginLeft(\"40%\");\n marginTop(\"5%\");\n control(new LabelBuilder(\"\", \"Sky Dome\") {\n {\n font(\"Interface/Fonts/zombie.fnt\");\n color(\"#ff0000\");\n }\n });\n control(new CheckboxBuilder(\"Sky_Dome_Button\") {\n {\n marginLeft(\"128%\");\n }\n });\n }\n });\n panel(new PanelBuilder(\"Star_Motion_Panel\") {\n {\n childLayoutHorizontal();\n marginLeft(\"40%\");\n marginTop(\"5%\");\n control(new LabelBuilder(\"\", \"Star Motion\") {\n {\n font(\"Interface/Fonts/zombie.fnt\");\n color(\"#ff0000\");\n }\n });\n control(new CheckboxBuilder(\"Star_Motion_Button\") {\n {\n marginLeft(\"106%\");\n }\n });\n }\n });\n panel(new PanelBuilder(\"Cloud_Motion_Panel\") {\n {\n childLayoutHorizontal();\n marginLeft(\"40%\");\n marginTop(\"5%\");\n control(new LabelBuilder(\"\", \"Cloud Motion\") {\n {\n font(\"Interface/Fonts/zombie.fnt\");\n color(\"#ff0000\");\n }\n });\n control(new CheckboxBuilder(\"Cloud_Motion_Button\") {\n {\n marginLeft(\"87%\");\n }\n });\n }\n });\n panel(new PanelBuilder(\"Bloom_Light_Panel\") {\n {\n childLayoutHorizontal();\n marginLeft(\"40%\");\n marginTop(\"5%\");\n control(new LabelBuilder(\"\", \"Bloom Lighting\") {\n {\n color(\"#ff0000\");\n font(\"Interface/Fonts/zombie.fnt\");\n }\n });\n control(new CheckboxBuilder(\"Bloom_Light_Button\") {\n {\n marginLeft(\"70%\");\n }\n });\n }\n });\n panel(new PanelBuilder(\"Light_Scatter_Panel\") {\n {\n childLayoutHorizontal();\n marginLeft(\"40%\");\n marginTop(\"5%\");\n control(new LabelBuilder(\"\", \"Light Scatter\") {\n {\n color(\"#ff0000\");\n font(\"Interface/Fonts/zombie.fnt\");\n }\n });\n control(new CheckboxBuilder(\"Light_Scatter_Button\") {\n {\n marginLeft(\"90%\");\n }\n });\n }\n });\n panel(new PanelBuilder(\"Apply_Panel\") {\n {\n font(\"Interface/Fonts/zombie.fnt\");\n childLayoutHorizontal();\n marginLeft(\"43%\");\n marginTop(\"5%\");\n control(new ButtonBuilder(\"Apply_Button\", \"Apply Settings\") {\n {\n interactOnClick(\"applySettings()\");\n font(\"Interface/Fonts/zombie.fnt\");\n }\n });\n }\n });\n }\n });\n }\n }.build(nifty));\n nifty.addScreen(\"Display_Screen\", new ScreenBuilder(\"Display_Settings\") {\n {\n controller(settingsControl);\n layer(new LayerBuilder(\"background\") {\n {\n font(\"Interface/Fonts/zombie.fnt\");\n childLayoutCenter();;\n backgroundImage(\"Backgrounds/ZOMBIE1.jpg\");\n visibleToMouse(true);\n }\n });\n layer(new LayerBuilder(\"foreground\") {\n {\n font(\"Interface/Fonts/zombie.fnt\");\n childLayoutOverlay();\n panel(new PanelBuilder(\"Settings\") {\n {\n font(\"Interface/Fonts/zombie.fnt\");\n childLayoutVertical();\n control(new ButtonBuilder(\"\", \"Display Settings\") {\n {\n marginTop(\"42%\");\n marginLeft(\"5%\");\n height(\"50px\");\n width(\"150px\");\n align(Align.Left);\n font(\"Interface/Fonts/zombie.fnt\");\n }\n });\n /*control(new ButtonBuilder(\"\", \"Graphics Settings\") {\n {\n marginTop(\"2%\");\n marginLeft(\"5%\");\n height(\"50px\");\n width(\"150px\");\n align(Align.Left);\n font(\"Interface/Fonts/zombie.fnt\");\n interactOnClick(\"goTo(Graphics_Extension)\");\n }\n });*/\n control(new ButtonBuilder(\"\", \"Sound Settings\") {\n {\n marginTop(\"2%\");\n marginLeft(\"5%\");\n height(\"50px\");\n width(\"150px\");\n align(Align.Left);\n font(\"Interface/Fonts/zombie.fnt\");\n interactOnClick(\"goTo(#Sound_Settings)\");\n }\n });\n control(new ButtonBuilder(\"\", \"Leaderboard\") {\n {\n marginTop(\"2%\");\n marginLeft(\"5%\");\n height(\"50px\");\n width(\"150px\");\n align(Align.Left);\n font(\"Interface/Fonts/zombie.fnt\");\n interactOnClick(\"goTo(Leader_Board)\");\n }\n });\n control(new ButtonBuilder(\"\", \"Logout\") {\n {\n marginTop(\"2%\");\n marginLeft(\"5%\");\n height(\"50px\");\n width(\"150px\");\n align(Align.Left);\n font(\"Interface/Fonts/zombie.fnt\");\n interactOnClick(\"goTo(#Login_Screen)\");\n }\n });\n control(new ButtonBuilder(\"\", \"Quit Game\") {\n {\n marginTop(\"2%\");\n marginLeft(\"5%\");\n height(\"50px\");\n width(\"150px\");\n align(Align.Left);\n font(\"Interface/Fonts/zombie.fnt\");\n interactOnClick(\"quitGame()\");\n }\n });\n }\n });\n }\n });\n layer(new LayerBuilder(\"Settings\") {\n {\n childLayoutVertical();\n panel(new PanelBuilder(\"Resolution_Panel\") {\n {\n childLayoutHorizontal();\n marginLeft(\"40%\");\n marginTop(\"15%\");\n control(new LabelBuilder(\"\", \"Set Resolution\") {\n {\n color(\"#ff0000\");\n font(\"Interface/Fonts/zombie.fnt\");\n }\n });\n control(new ListBoxBuilder(\"Resolution_Opts\") {\n {\n marginLeft(\"4%\");\n marginBottom(\"10%\");\n displayItems(1);\n showVerticalScrollbar();\n hideHorizontalScrollbar();\n selectionModeSingle();\n width(\"10%\");\n font(\"Interface/Fonts/zombie.fnt\");\n }\n });\n }\n });\n panel(new PanelBuilder(\"Apply_Panel\") {\n {\n childLayoutHorizontal();\n marginLeft(\"45%\");\n marginTop(\"5%\");\n control(new ButtonBuilder(\"Apply_Button\", \"Apply Settings\") {\n {\n interactOnClick(\"displayApply()\");\n font(\"Interface/Fonts/zombie.fnt\");\n }\n });\n }\n });\n }\n });\n }\n }.build(nifty));\n nifty.addScreen(\"Sound Settings\", new ScreenBuilder(\"#Sound_Settings\") {\n {\n controller(settingsControl);\n layer(new LayerBuilder(\"background\") {\n {\n font(\"Interface/Fonts/zombie.fnt\");\n childLayoutCenter();;\n backgroundImage(\"Backgrounds/ZOMBIE1.jpg\");\n visibleToMouse(true);\n }\n });\n layer(new LayerBuilder(\"foreground\") {\n {\n font(\"Interface/Fonts/zombie.fnt\");\n childLayoutOverlay();\n panel(new PanelBuilder(\"Settings\") {\n {\n font(\"Interface/Fonts/zombie.fnt\");\n childLayoutVertical();\n control(new ButtonBuilder(\"\", \"Display Settings\") {\n {\n marginTop(\"42%\");\n marginLeft(\"5%\");\n height(\"50px\");\n width(\"150px\");\n align(ElementBuilder.Align.Left);\n font(\"Interface/Fonts/zombie.fnt\");\n interactOnClick(\"goTo(Display_Settings)\");\n }\n });\n /*control(new ButtonBuilder(\"\", \"Graphics Settings\") {\n {\n marginTop(\"2%\");\n marginLeft(\"5%\");\n height(\"50px\");\n width(\"150px\");\n align(ElementBuilder.Align.Left);\n font(\"Interface/Fonts/zombie.fnt\");\n interactOnClick(\"goTo(Graphics_Extension)\");\n }\n });*/\n control(new ButtonBuilder(\"\", \"Sound Settings\") {\n {\n marginTop(\"2%\");\n marginLeft(\"5%\");\n height(\"50px\");\n width(\"150px\");\n align(ElementBuilder.Align.Left);\n font(\"Interface/Fonts/zombie.fnt\");\n }\n });\n control(new ButtonBuilder(\"\", \"Leaderboard\") {\n {\n marginTop(\"2%\");\n marginLeft(\"5%\");\n height(\"50px\");\n width(\"150px\");\n align(ElementBuilder.Align.Left);\n font(\"Interface/Fonts/zombie.fnt\");\n interactOnClick(\"goTo(Leader_Board)\");\n }\n });\n control(new ButtonBuilder(\"\", \"Logout\") {\n {\n marginTop(\"2%\");\n marginLeft(\"5%\");\n height(\"50px\");\n width(\"150px\");\n align(Align.Left);\n font(\"Interface/Fonts/zombie.fnt\");\n interactOnClick(\"goTo(#Login_Screen)\");\n }\n });\n control(new ButtonBuilder(\"\", \"Quit Game\") {\n {\n marginTop(\"2%\");\n marginLeft(\"5%\");\n height(\"50px\");\n width(\"150px\");\n align(ElementBuilder.Align.Left);\n font(\"Interface/Fonts/zombie.fnt\");\n interactOnClick(\"quitGame()\");\n }\n });\n }\n });\n }\n });\n layer(new LayerBuilder(\"Settings\") {\n {\n childLayoutVertical();\n panel(new PanelBuilder(\"#Master_Volume_Panel\") {\n {\n childLayoutHorizontal();\n marginLeft(\"30%\");\n marginTop(\"35%\");\n control(new LabelBuilder(\"\", \"Master Volume : \") {\n {\n color(\"#ff0000\");\n font(\"Interface/Fonts/zombie.fnt\");\n }\n });\n control(new SliderBuilder(\"#Master_Volume\", false) {\n {\n marginLeft(\"20px\");\n min(0);\n max(100);\n width(\"25%\");\n }\n });\n }\n });\n panel(new PanelBuilder(\"#Ambient_Volume_Panel\") {\n {\n childLayoutHorizontal();\n marginLeft(\"30%\");\n marginTop(\"8%\");\n control(new LabelBuilder(\"\", \"Ambient Volume : \") {\n {\n color(\"#ff0000\");\n font(\"Interface/Fonts/zombie.fnt\");\n }\n });\n control(new SliderBuilder(\"#Ambient_Volume\", false) {\n {\n marginLeft(\"20px\");\n min(0);\n max(100);\n width(\"25%\");\n }\n });\n }\n });\n panel(new PanelBuilder(\"#Combat_Volume_Panel\") {\n {\n childLayoutHorizontal();\n marginLeft(\"30%\");\n marginTop(\"8%\");\n control(new LabelBuilder(\"\", \"Combat Volume : \") {\n {\n color(\"#ff0000\");\n font(\"Interface/Fonts/zombie.fnt\");\n }\n });\n control(new SliderBuilder(\"#Combat_Volume\", false) {\n {\n marginLeft(\"20px\");\n min(0);\n max(100);\n width(\"25%\");\n }\n });\n }\n });\n panel(new PanelBuilder(\"#Dialog_Volume_Panel\") {\n {\n childLayoutHorizontal();\n marginLeft(\"30%\");\n marginTop(\"8%\");\n control(new LabelBuilder(\"\", \"Dialog Volume : \") {\n {\n color(\"#ff0000\");\n font(\"Interface/Fonts/zombie.fnt\");\n }\n });\n control(new SliderBuilder(\"#Dialog_Volume\", false) {\n {\n marginLeft(\"20px\");\n min(0);\n max(100);\n width(\"25%\");\n }\n });\n }\n });\n panel(new PanelBuilder(\"#Footsteps_Volume_Panel\") {\n {\n childLayoutHorizontal();\n marginLeft(\"30%\");\n marginTop(\"8%\");\n control(new LabelBuilder(\"\", \"Footsteps Volume : \") {\n {\n color(\"#ff0000\");\n font(\"Interface/Fonts/zombie.fnt\");\n }\n });\n control(new SliderBuilder(\"#Footsteps_Volume\", false) {\n {\n marginLeft(\"20px\");\n min(0);\n max(100);\n width(\"25%\");\n }\n });\n }\n });\n panel(new PanelBuilder(\"Apply_Panel\") {\n {\n childLayoutHorizontal();\n marginLeft(\"45%\");\n marginTop(\"5%\");\n control(new ButtonBuilder(\"#Apply_Button\", \"Apply Settings\") {\n {\n interactOnClick(\"soundApply()\");\n font(\"Interface/Fonts/zombie.fnt\");\n }\n });\n }\n });\n }\n });\n\n }\n }.build(nifty));\n }",
"@Override\n\tprotected void configure() {\n\n\t\tbind(AddNetworkView.class).to(AddNetworkDesktopView.class).in(Singleton.class);\n\t\tbind(AddNetworkActivity.class);\n\n\t}",
"public MainUI() throws UnknownHostException {\n initComponents();\n //server();\n Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();\nwidth = screenSize.getWidth();\n height = screenSize.getHeight();\n setIcon();\n \n }",
"void port(int port);",
"void port(int port);",
"public void addPort(Scanner sc){\n currentPort = new SeaPort(sc);\n ports.add(currentPort);\n hashMap.put(currentPort.getIndex(), currentPort);\n portMap.put(currentPort.getIndex(), currentPort);\n everything.add(currentPort);\n \n }",
"public abstract void startup();",
"private void configurarFrame() {\n\t\t\n\t\tthis.setSize(600, 250);\n\t\tthis.setDefaultCloseOperation(EXIT_ON_CLOSE);\n\t\tthis.setResizable(true);\n\t\tthis.setLocationRelativeTo(null);\n\t\tthis.setTitle(\"Tabuada\");\n\t\tthis.setLayout(new BorderLayout(5,5));\n\t\tthis.getContentPane().add(painelTopo, BorderLayout.PAGE_START);\n\t\tthis.getContentPane().add(painelCentro, BorderLayout.CENTER);\n\t}",
"@Override\n\tpublic void run() {\n\t\t\t\n\t\t\ttry {\n\t\t\tLocateRegistry.createRegistry(port);\n\t\t\t}catch(RemoteException e){\n\t\t\t\tSystem.out.println(\"Another peer is running in this machine\");\n\t\t\t}\n\t\t\t\n\t\t\tInterfaceUI rmi;\n\t\t\ttry {\n\t\t\t\trmi = (InterfaceUI)UnicastRemoteObject.exportObject(this, 0);\n\t\t\t\tRegistry registry = LocateRegistry.getRegistry();\n\t\t\t\tregistry.rebind(this.id, rmi);\n\t\t\t\n\t\t\t\n\t\t\t} catch (RemoteException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\t\n\t\t\n\t\t\n\t}",
"public void start() {\n\t\tobj = new SlotMachine();\n\t\tsetContentPane(new JLabel(new ImageIcon(\"src/images/background.jpg\")));\n\t\t//design the main interface\n\t\tdesign();\n\n\t\t//Initialise the 3 reels\n\t\tnew SlotMachineController().initializeReels();\n\t\t//add 3 reels of panel to slotmachines panels\n\t\treel1.add(new SlotMachineController(reel1, 1));\n\t\treel2.add(new SlotMachineController(reel2, 2));\n\t\treel3.add(new SlotMachineController(reel3, 3));\n\t\t//add mouselistners to 3 reels\n\t\tnew SlotMachineController().stopSpinning();\n\t\t//design the frame\n\t\tsetTitle(\"Slot Machine\");\n\t\tImageIcon img = new ImageIcon(\"src/images/icon.png\");\n\t\tsetIconImage(img.getImage());\n\t\tsetSize(580, 720);\n\t\tsetMinimumSize(new Dimension(580, 720));\n\t\tsetVisible(true);\n\t}",
"public RobotContainer() {\n // Configure the button bindings\n configureButtonBindings();\n configureDefaultCommands();\n }",
"public void addToMainContainer() {\n MainFrame.mainContainer.add(designPanel);\n MainFrame.mainContainer.add(rightPanel, BorderLayout.EAST);\n }",
"public void start() {\r\n\t\tsetupWWD();\r\n\t\tsetupStatusBar();\r\n\t\tsetupViewControllers();\r\n\t\tsetupSky();\r\n\t\t//setupAnnotationToggling();\r\n\r\n\t\t// Center the application on the screen.\r\n\t\tWWUtil.alignComponent(null, this, AVKey.CENTER);\r\n\t\t\r\n\t\tgetLayerEnableCmd().run(); // Enable/disable the desired layers.\r\n\t}",
"@Override\n\tpublic void addGui(Gui gui) {\n\t\t\n\t}",
"public void addComponentsToContainer()\n {\n\t container.add(welcome);\n container.add(amountLabel);\n container.add(amountText);\n container.add(depositButton);\n }",
"private void saveLab(boolean usetmp) throws FileNotFoundException{\n //Get path to start.config\n String startConfigPath;\n if(!usetmp){\n startConfigPath = currentLab.getPath()+File.separator+\"config\"+File.separator+\"start.config\";\n }else{\n startConfigPath = currentLab.getPath()+File.separator+\"config\"+File.separator+\"start.config\";\n }\n PrintWriter writer = new PrintWriter(startConfigPath);\n String startConfigText = \"\"; \n \n // Write Global Params\n for(String line : labDataCurrent.getGlobals()){\n startConfigText += line+\"\\n\";\n }\n\n // Cycle through network objects and write\n Component[] networks = NetworkPanePanel.getComponents();\n for(Component network : networks){\n NetworkData data = ((NetworkObjPanel)network).getConfigData();\n startConfigText += \"NETWORK \"+data.name+\"\\n\";\n startConfigText += \" MASK \"+data.mask+\"\\n\";\n startConfigText += \" GATEWAY \"+data.gateway+\"\\n\";\n \n if(data.macvlan > 0){\n startConfigText += \" MACVLAN \"+data.macvlan+\"\\n\";\n }\n if(data.macvlan_ext > 0){\n startConfigText += \" MACVLAN_EXT\" +data.macvlan_ext+\"\\n\";\n }\n \n if(!data.ip_range.isEmpty()){\n startConfigText += \" IP_RANGE \"+data.ip_range+\"\\n\";\n } \n\n if(data.tap){\n startConfigText += \" TAP YES\"+\"\\n\";\n }\n for(String unknownParam : data.unknownNetworkParams){\n startConfigText += \" \"+unknownParam+\"\\n\";\n }\n }\n \n // Cycle through container objects and write \n Component[] containers = ContainerPanePanel.getComponents();\n for(Component container : containers){\n ContainerData data = ((ContainerObjPanel)container).getConfigData(); \n startConfigText += \"CONTAINER \"+data.name+\"\\n\";\n startConfigText += \" USER \"+data.user+\"\\n\";\n if(data.script.isEmpty()){\n startConfigText += \" SCRIPT NONE\\n\";\n }\n else{\n startConfigText += \" SCRIPT \"+data.script+\"\\n\"; \n }\n \n if(data.x11){\n startConfigText += \" X11 YES\\n\"; \n }\n else{\n startConfigText += \" X11 NO\\n\";\n }\n // Not default\n if(data.terminal_count != 1)\n startConfigText += \" TERMINALS \"+data.terminal_count+\"\\n\";\n if(!data.terminal_group.isEmpty())\n startConfigText += \" TERMINAL_GROUP \"+data.terminal_group+\"\\n\";\n if(!data.xterm_title.isEmpty())\n startConfigText += \" XTERM \"+data.xterm_title+\" \"+data.xterm_script+\"\\n\";\n if(!data.password.isEmpty())\n startConfigText += \" PASSWORD \"+data.password+\"\\n\";\n for(LabData.ContainerAddHostSubData addHost : data.listOfContainerAddHost){\n if(addHost.type.equals(\"network\"))\n startConfigText += \" ADD-HOST \"+addHost.add_host_network+\"\\n\";\n else if(addHost.type.equals(\"ip\"))\n startConfigText += \" ADD-HOST \"+addHost.add_host_host+\":\"+addHost.add_host_ip+\"\\n\"; \n }\n for(LabData.ContainerNetworkSubData network : data.listOfContainerNetworks){\n startConfigText += \" \"+network.network_name+\" \"+network.network_ipaddress+\"\\n\"; \n }\n if(data.clone > 0){\n startConfigText += \" CLONE \"+data.clone+\"\\n\";\n }\n if(!data.lab_gateway.isEmpty()){\n startConfigText += \" LAB_GATEWAY \"+data.lab_gateway+\"\\n\";\n }\n if(data.no_gw){\n startConfigText += \" NO_GW YES\\n\";\n }\n if(!data.base_registry.isEmpty()){\n startConfigText += \" BASE_REGISTRY \"+data.base_registry+\"\\n\";\n }\n if(!data.thumb_volume.isEmpty()){\n startConfigText += \" THUMB_VOLUME \"+data.thumb_volume+\"\\n\";\n }\n if(!data.thumb_command.isEmpty()){\n startConfigText += \" THUMB_COMMAND \"+data.thumb_command+\"\\n\";\n }\n if(!data.thumb_stop.isEmpty()){\n startConfigText += \" THUMB_STOP \"+data.thumb_stop+\"\\n\";\n }\n if(!data.publish.isEmpty()){\n startConfigText += \" PUBLISH \"+data.publish+\"\\n\";\n }\n if(data.hide){\n startConfigText += \" HIDE YES\\n\";\n }\n if(data.no_privilege){\n startConfigText += \" NO_PRIVILEGE YES\\n\";\n }\n if(data.no_pull){\n startConfigText += \" NO_PULL YES\\n\";\n }\n if(data.mystuff){\n startConfigText += \" MYSTUFF YES\\n\";\n }\n if(data.tap){\n startConfigText += \" TAP YES\\n\";\n }\n if(!data.mount1.isEmpty() && !data.mount2.isEmpty()){\n startConfigText += \" MOUNT \"+data.mount1+\":\"+data.mount2+\"\\n\";\n }\n \n }\n \n //Write to File\n writer.print(startConfigText);\n writer.close();\n \n //Save results.config and goals.config file\n labDataCurrent.getResultsData().writeResultsConfig(usetmp);\n labDataCurrent.getGoalsData().writeGoalsConfig(usetmp);\n labDataCurrent.getParamsData().writeParamsConfig(usetmp);\n \n System.out.println(\"Lab Saved\");\n }",
"public void showControl(Composite parent) {\r\n\t\t// create the parent's content\r\n\t\tsuper.showControl(parent);\r\n\t\t// add myself as listener to the application\r\n\t\tapplication.addApplicationListener(Event.EVENT_EVERYTHING, this);\r\n\t\tsynchronized (registry) {\r\n\t\t\tregistry.addDeviceListener(Event.EVENT_EVERYTHING, this);\r\n\t\t\tSystemID[] ids = registry.getDevices();\r\n\t\t\tfor (int i = 0; i < ids.length; i++) {\r\n\t\t\t\taddDevice(registry.getDeviceDescription(ids[i]));\r\n\t\t\t}\r\n\t\t}\r\n\t\tassemblerGraph.updateGraph();\r\n\t\tapplicationGraph.updateGraph();\r\n\t\tupdate();\r\n\t}",
"private void initUI(int width, int height) {\n\t\tsetSize(width, height);\n\t\tsetTitle(ClientParameters.WINDOW_TITLE);\n\t\tsetLocationRelativeTo(null);\n\t\tsetResizable(ClientParameters.IS_RESIZABLE);\n\t\tsetDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\t\n\t\t// adding components\n\t\tpane.setLayout(new BorderLayout());\n\t\tpane.add(host, BorderLayout.NORTH);\n\t\tpane.add(portNumber, BorderLayout.CENTER);\n\t\tpane.add(connectButton, BorderLayout.SOUTH);\n\t}",
"private void init(String ip, int port, String name) {\n this.settings = new Settings(ip, port, name);\n this.network = new Network(this);\n this.clientGUI = new ClientGUI(this);\n //\n new Thread(network::start).start();\n }",
"@Override\n\tpublic void addRentPort(RentPort rentPort) {\n\n\t}",
"void addHost(Service newHost);",
"private void addComponentsToLayers() {\n JLayeredPane layer = getLayeredPane();\n layer.add(canvas, new Integer(1));\n layer.add(searchArea, new Integer(2));\n layer.add(searchButton, new Integer(2));\n layer.add(zoomInButton, new Integer(2));\n layer.add(zoomOutButton, new Integer(2));\n layer.add(fullscreenButton, new Integer(2));\n layer.add(showRoutePanelButton, new Integer(2));\n layer.add(routePanel, new Integer(2));\n layer.add(optionsButton, new Integer(2));\n layer.add(mapTypeButton, new Integer(2));\n layer.add(mapTypePanel, new Integer(2));\n layer.add(resultPane, new Integer(3));\n layer.add(resultStartPane, new Integer(3));\n layer.add(resultEndPane, new Integer(3));\n layer.add(iconPanel, new Integer(3));\n layer.add(optionsPanel, new Integer(2));\n layer.add(directionPane, new Integer(2));\n layer.add(closeDirectionList, new Integer(2));\n layer.add(travelTimePanel, new Integer(3));\n\n }",
"public void start() {\n\n // server 환경설정\n EventLoopGroup bossGroup = new NioEventLoopGroup(bossCount);\n EventLoopGroup workerGroup = new NioEventLoopGroup();\n\n try {\n\n ServerBootstrap b = new ServerBootstrap();\n b.group(bossGroup, workerGroup)\n .channel(NioServerSocketChannel.class)\n .childHandler(new ChannelInitializer<SocketChannel>() {\n @Override\n public void initChannel(SocketChannel ch) throws Exception {\n ChannelPipeline pipeline = ch.pipeline();\n pipeline.addLast(new StringDecoder(CharsetUtil.UTF_8));\n pipeline.addLast(new StringEncoder(CharsetUtil.UTF_8));\n pipeline.addLast(new LoggingHandler(LogLevel.INFO));\n pipeline.addLast(SERVICE_HANDLER);\n }\n })\n .option(ChannelOption.SO_BACKLOG, backLog)\n .childOption(ChannelOption.SO_KEEPALIVE, true);\n\n ChannelFuture channelFuture = b.bind(tcpPort).sync();\n channelFuture.channel().closeFuture().sync();\n } catch (InterruptedException e) {\n e.printStackTrace();\n } finally {\n bossGroup.shutdownGracefully();\n workerGroup.shutdownGracefully();\n }\n\n }",
"public void testDockDock() {\n try {\n container.dock(null);\n fail(\"the dock is null, IllegalArgumentException is expected.\");\n } catch (IllegalArgumentException e) {\n // expected\n }\n }",
"private void installLocalOrRemote() {\n CommandPacket startCommandPacket = null;\n //直到成功为止,控制台可能重启、网络问题等原因\n //TODO\n int time = 0;\n while ((startCommandPacket = getStartCommandPacket()) == null){\n try {\n time ++;\n if(time == 20){\n String defaultRegister = \"zookeeper\";\n String register = agentConfig.getProperty(\"register.name\", defaultRegister);\n if(defaultRegister.equals(register)){\n logger.error(\"经过10s尝试启动simulator失败, 请确认控制台是否正常\");\n }\n break;\n }\n logger.error(\"启动simulator获取远程失败,休眠500ms重试,请确认控制台是否正常\");\n Thread.sleep(500 );\n } catch (InterruptedException ignore) {\n }\n }\n\n if(startCommandPacket == null){\n startCommandPacket = new CommandPacket();\n // 启动\n startCommandPacket.setId(HeartCommandConstants.startCommandId);\n Map<String, Object> extras = new HashMap<String, Object>();\n extras.put(HeartCommandConstants.PATH_TYPE_KEY, HeartCommandConstants.PATH_TYPE_LOCAL_VALUE);\n // 使用本地探针包\n startCommandPacket.setExtras(extras);\n }\n install(startCommandPacket);\n }",
"private void initialize() {\n this.setLayout(new CardLayout());\n this.setName(Constant.messages.getString(\"ports.options.title\"));\n this.add(getPanelPortScan(), getPanelPortScan().getName());\n }",
"public void dockNodeFocused(DockNodeEvent e) {}",
"@Override\n public void startup() {\n }",
"public void addUnit(String host, int port){\n\t\t\n\t\tint selectedPanel = 0;\n\t\tString panelName = \"\";\n\t\t\n\t\ttry{\n\t\t\t//port = 0, because it is localunit \n\t\t\tif(port == LOCAL_UNIT){\n\t\t\t\t\n\t\t\t\tpanelName = LOCAL_NAME;\n\t\t\t}else{\n\t\t\t\t\n\t\t\t\tpanelName = REMOTE_NAME+ testUnitCounter;\n\t\t\t}\n\t\t\t\n\t\t\tTestUnitPanel panel = new TestUnitPanel();\n\t\t\tNewResponseListener listner = new TestPanelListener(panel);\n\t\t\tcontroller.addTestUnit(testUnitCounter,host,port,panelName);\n\t\t\tcontroller.setResponseListener(listner,testUnitCounter);\n\t\t\t\n\t\t\ttabbedPane.addTab(panelName,panel);\n\t\t\tselectedPanel = tabbedPane.indexOfTab(panelName);\n\t\t\t\n\t\t}catch(RemoteException ex){\n\t\t\tConsoleLog.Message(ex.getClass().getName() + \": \" + ex.getMessage());\n\t\t\treturn;\n\t\t}catch(NotBoundException ex){\n\t\t\tConsoleLog.Message(ex.getClass().getName() + \": \" +ex.getMessage());\n\t\t\treturn;\n\t\t}catch(Exception ex){\n\t\t\tConsoleLog.Message(ex.getClass().getName() + \": \" +ex.getMessage());\n\t\t\tex.printStackTrace();\n\t\t\treturn;\n\t\t}\n\t\t\n\t\ttabbedPane.setSelectedIndex(selectedPanel);\n\t\tConsoleLog.Print(\"[TestMonitor] panel index:\" + selectedPanel);\n\t\ttestUnitCounter++;\n\t}",
"private void setupFrame()\n\t\t{\n\t\t\tthis.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\t\tthis.setResizable(false);\n\t\t\tthis.setSize(800, 600);\n\t\t\tthis.setTitle(\"SEKA Client\");\n\t\t\tthis.setContentPane(panel);\n\t\t\tthis.setVisible(true);\n\t\t}",
"@Override protected void configureWindow(java.awt.Window root) {\n }",
"@Override protected void configureWindow(java.awt.Window root) {\n }",
"@Override protected void configureWindow(java.awt.Window root) {\n }",
"@Override protected void configureWindow(java.awt.Window root) {\n }",
"@Override protected void configureWindow(java.awt.Window root) {\n }",
"@Override protected void configureWindow(java.awt.Window root) {\n }",
"abstract protected int PortToRunOn();",
"public RobotContainer() {\n // Configure the button bindings\n configureButtonBindings();\n\n }"
] |
[
"0.640483",
"0.57402474",
"0.54301894",
"0.5402018",
"0.5360037",
"0.5315916",
"0.5281006",
"0.52435213",
"0.5213991",
"0.52051085",
"0.5205048",
"0.5190669",
"0.5177519",
"0.5166925",
"0.5157946",
"0.51083595",
"0.5107284",
"0.5098897",
"0.5064859",
"0.50298333",
"0.5025944",
"0.49702707",
"0.49673545",
"0.49515235",
"0.49481615",
"0.49474585",
"0.49132723",
"0.49066257",
"0.49034148",
"0.49027288",
"0.4876534",
"0.48680025",
"0.48642024",
"0.48254153",
"0.48211724",
"0.48126957",
"0.48073104",
"0.48063958",
"0.4802311",
"0.48012114",
"0.47992623",
"0.47832376",
"0.478259",
"0.4780787",
"0.47804916",
"0.47749963",
"0.4771607",
"0.47707993",
"0.47707993",
"0.4764927",
"0.47541103",
"0.4749739",
"0.4743829",
"0.4743211",
"0.47409156",
"0.47409156",
"0.4738646",
"0.4738646",
"0.47122645",
"0.4710183",
"0.47096652",
"0.47045255",
"0.4704491",
"0.47028992",
"0.46954235",
"0.46951485",
"0.46951485",
"0.4691705",
"0.4691465",
"0.46873564",
"0.46847588",
"0.46844614",
"0.46813425",
"0.46795487",
"0.46716192",
"0.4664852",
"0.46639958",
"0.46626598",
"0.46605858",
"0.46603107",
"0.46514028",
"0.46494356",
"0.46484643",
"0.46425867",
"0.4640313",
"0.46397415",
"0.46312365",
"0.46308443",
"0.4628616",
"0.46181777",
"0.46133128",
"0.4611693",
"0.46110648",
"0.46110648",
"0.46110648",
"0.46110648",
"0.46110648",
"0.46110648",
"0.461055",
"0.46090338"
] |
0.65487725
|
0
|
adds passenger ship to port and everything list
|
public void addPassengerShip(Scanner sc){
PassengerShip pShip = new PassengerShip(sc, portMap, shipMap, dockMap);
if(hashMap.containsKey(pShip.getParent())){
if(hashMap.get(pShip.getParent()).getIndex()>=10000 && hashMap.get(pShip.getParent()).getIndex() < 20000){
currentPort = (SeaPort) hashMap.get(pShip.getParent());
currentPort.setShips(pShip);
currentPort.setAllShips(pShip);
}
else{
currentDock = (Dock) hashMap.get(pShip.getParent());
currentDock.addShip(pShip);
currentPort = (SeaPort) hashMap.get(currentDock.getParent());
currentPort.setAllShips(pShip);
}
}
hashMap.put(pShip.getIndex(), pShip);
shipMap.put(pShip.getIndex(), pShip);
everything.add(pShip);
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public void onboard(String passenger) {\n \t\r\n \tthis.passengers.add(passenger);\r\n }",
"public void addPorts(){\n\t\t\n\t}",
"public void arrive(Port port) {\n ShipArrived event = new ShipArrived(\"id\", port, new Date());\n // apply change du to the event\n // it should require only current state and\n apply(event);\n list.add(event);\n // events will be published to the rest of the system\n // from there.. This is where further side effect will\n // occure\n }",
"public void addPassenger(Passenger passenger) {\r\n\t\t\tpassengers.add(passenger);\r\n\t}",
"public void connectShipToBoard(Ship ship){\n ships.add(ship);\n }",
"public void addPassenger(PassengerDetails details) {\n passengerList.addPassenger(details);\n }",
"@Override\n\tpublic void addRentPort(RentPort rentPort) {\n\n\t}",
"public void add(TeleportDestination warp) {\n\t\tremove(warp.getName());\n\t\tdestinations.add(warp);\n\t}",
"public void book(Passenger ps) {\r\n\t\tps.addFlight(this);\r\n\t\tps.setTotalPrice(ps.getTotalPrice() + ps.pricePerFlight(this));\r\n\t\tps.setNumFlights();\r\n\t}",
"@FXML\n public void addTeleporter() {\n if (!World.getInstance().worldContainsTeleporterIn()) {\n \tnew eMenuHandler().hideMenu();\n \tDisplayBuildingInstructions.showBuildingInstr();\n \tAddEntityOnMouseClick.setBuildMode(Boolean.TRUE);\n \tAddEntityOnMouseClick.entityList(new BuildingTeleporterIn(0, 0));\n }\n if (!World.getInstance().worldContainsTeleporterOut()) {\n \tnew eMenuHandler().hideMenu();\n \tDisplayBuildingInstructions.showBuildingInstr();\n \tAddEntityOnMouseClick.setBuildMode(Boolean.TRUE);\n \tAddEntityOnMouseClick.entityList(new BuildingTeleporterOut(0, 0));\n \t\n }\n\n }",
"public void addShip(Ship ship){\n\n ship.setGamePlayers(this);\n myships.add(ship);\n }",
"public boolean addShip(Ships ship) {\n\t\tfor (int i = 0; i < this.aliveShips.length; i++) {\r\n\t\t\tif (this.aliveShips[i] == null) {\r\n\t\t\t\tthis.aliveShips[i] = ship;\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false;\r\n\t}",
"public void addPlayerShip()\n\t{\n\t\t//if a PlayerShip is already spawned, a new one will not be added\n\t\tif (gameObj[1].size() == 0)\n\t\t{\n\t\t\tgameObj[1].add(new PlayerShip());\n\t\t\tSystem.out.println(\"PlayerShip added\");\n\t\t}else{\n\t\t\tSystem.out.println(\"A player ship is already spawned\");\n\t\t}\n\t\t\n\t}",
"public void addQueuedPassenger(){\n this._queuedPassengers +=1;\n }",
"private void placeShip() {\r\n\t\t// Expire the ship ship\r\n\t\tParticipant.expire(ship);\r\n\r\n\t\tclipShip.stop();\r\n\r\n\t\t// Create a new ship\r\n\t\tship = new Ship(SIZE / 2, SIZE / 2, -Math.PI / 2, this);\r\n\t\taddParticipant(ship);\r\n\t\tdisplay.setLegend(\"\");\r\n\t}",
"public void addNewPassenger() throws SQLException {\n\t\tScanner input = new Scanner(System.in);\n\t\tConnection conn = null;\n\t\ttry {\n\t\t\tconn = connUtil.getConnection();\n\t\t\t// call needed DAOs here\n\t\t\tPassengerDAO pdao = new PassengerDAO(conn);\n\t\t\tFlightDAO fdao = new FlightDAO(conn);\n\t\t\tRouteDAO rdao = new RouteDAO(conn);\n\t\t\tAirportDAO apodao = new AirportDAO(conn);\n\t\t\tAirplaneDAO apldao = new AirplaneDAO(conn);\n\n\t\t\tPassenger passenger = new Passenger();\n\t\t\tpassenger.setId(pdao.nextAvailableId());\n\t\t\tpassenger.setBookingId(1);\n\n\t\t\t// Sets passenger name\n\t\t\tSystem.out.println(\"Enter the passenger given name\");\n\t\t\tpassenger.setGivenName(input.nextLine());\n\t\t\tSystem.out.println(\"Enter the passenger family name\");\n\t\t\tpassenger.setFamilyName(input.nextLine());\n\n\t\t\t// Sets birthday\n\t\t\tSystem.out.println(\"Enter DOB (yyyy-mm-dd)\");\n\t\t\tDate date = Date.valueOf(input.nextLine());\n\t\t\tpassenger.setDob(date);\n\n\t\t\t// Sets gender\n\t\t\tSystem.out.println(\"Enter gender (male/female/other)\");\n\t\t\tpassenger.setGender(input.nextLine());\n\n\t\t\t// Sets address\n\t\t\tSystem.out.println(\"Enter the address of the passenger\");\n\t\t\tpassenger.setAddress(input.nextLine());\n\n\t\t\t// Adds passenger to passenger table\n\t\t\tpdao.addPassenger(passenger);\n\n\t\t\tconn.commit();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tconn.rollback();\n\t\t} finally {\n\t\t\tconn.close();\n\t\t}\n\t}",
"private void installRoute(List<NodePortTuple> path, OFMatch match) {\r\n\r\n\t\tOFMatch m = new OFMatch();\r\n\r\n\t\tm.setDataLayerType(Ethernet.TYPE_IPv4)\r\n\t\t\t\t.setNetworkSource(match.getNetworkSource())\r\n\t\t\t\t.setNetworkDestination(match.getNetworkDestination());\r\n\r\n\t\tfor (int i = 0; i <= path.size() - 1; i += 2) {\r\n\t\t\tshort inport = path.get(i).getPortId();\r\n\t\t\tm.setInputPort(inport);\r\n\t\t\tList<OFAction> actions = new ArrayList<OFAction>();\r\n\t\t\tOFActionOutput outport = new OFActionOutput(path.get(i + 1)\r\n\t\t\t\t\t.getPortId());\r\n\t\t\tactions.add(outport);\r\n\r\n\t\t\tOFFlowMod mod = (OFFlowMod) floodlightProvider\r\n\t\t\t\t\t.getOFMessageFactory().getMessage(OFType.FLOW_MOD);\r\n\t\t\tmod.setCommand(OFFlowMod.OFPFC_ADD)\r\n\t\t\t\t\t.setIdleTimeout((short) 0)\r\n\t\t\t\t\t.setHardTimeout((short) 0)\r\n\t\t\t\t\t.setMatch(m)\r\n\t\t\t\t\t.setPriority((short) 105)\r\n\t\t\t\t\t.setActions(actions)\r\n\t\t\t\t\t.setLength(\r\n\t\t\t\t\t\t\t(short) (OFFlowMod.MINIMUM_LENGTH + OFActionOutput.MINIMUM_LENGTH));\r\n\t\t\tflowPusher.addFlow(\"routeFlow\" + uniqueFlow, mod,\r\n\t\t\t\t\tHexString.toHexString(path.get(i).getNodeId()));\r\n\t\t\tuniqueFlow++;\r\n\t\t}\r\n\t}",
"public chatd(String ports, int port)\r\n {\r\n this.portNumb = port;\r\n\r\n\r\n clientList = new ArrayList<ClientProcess>();\r\n }",
"public addPassenger() {\n initComponents();\n }",
"public void sendAdverts() {\n\t\tfor (int pfx = 0; pfx < pfxList.size(); pfx++){\n\t\t\tfor(int lnk = 0; lnk < nborList.size(); ++lnk){\n\t\t\t\tif(lnkVec.get(lnk).helloState == 0){\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tPacket p = new Packet();\n\t\t\t\tp.protocol = 2; p.ttl = 100;\n\t\t\t\tp.srcAdr = myIp;\n\t\t\t\tp.destAdr = lnkVec.get(lnk).peerIp;\n\t\t\t\tp.payload = String.format(\"RPv0\\ntype: advert\\n\" \n\t\t\t\t\t\t+ \"pathvec: %s %.3f %d %s\\n\",\n\t\t\t\t\t\tpfxList.get(pfx).toString(), now, 0, myIpString); //potential problems\n\t\t\t\tfwdr.sendPkt(p,lnk);\n\t\t\t}\n\t\t}\n\t}",
"public void addCargoShip(Scanner sc){\n CargoShip cShip = new CargoShip(sc, portMap, shipMap, dockMap);\n if(hashMap.containsKey(cShip.getParent())){\n if(hashMap.get(cShip.getParent()).getIndex()>=10000 && hashMap.get(cShip.getParent()).getIndex() < 20000){\n currentPort = (SeaPort) hashMap.get(cShip.getParent());\n currentPort.setShips(cShip);\n currentPort.setAllShips(cShip);\n }\n else{\n currentDock = (Dock) hashMap.get(cShip.getParent());\n currentDock.addShip(cShip);\n currentPort = (SeaPort) hashMap.get(currentDock.getParent());\n currentPort.setAllShips(cShip);\n }\n \n \n }\n hashMap.put(cShip.getIndex(), cShip);\n shipMap.put(cShip.getIndex(), cShip);\n everything.add(cShip);\n }",
"public void addPlayerShip()\n\t{\n\t\t//if a PlayerShip is already spawned, a new one will not be added\n\t\tif(shipSpawned)\n\t\t{\n\t\t\t\tSystem.out.println(\"A player ship is already spawned\");\n\t\t\t\treturn;\n\t\t}\n\t\tgameObj.add(new PlayerShip(getHeight(), getWidth()));\n\t\tSystem.out.println(\"Player ship added\");\n\t\tshipSpawned = true;\n\t\tnotifyObservers();\n\t}",
"private void addPasDirectlyToSeat(Passenger pas, int seatRow, int seatCol) {\n airplane.getSeatRow(seatRow).addToSeat(pas, seatCol);\n airplane.changeTotalVacantSeats(-1,pas.isEconomy());\n }",
"public Passenger(String name, int passengerId, DepartureAirportStub da, PlaneStub pl)\n {\n super (name);\n this.passengerId = passengerId;\n passengerState = PassengerStates.GOING_TO_AIRPORT;\n this.da = da;\n this.pl = pl;\n }",
"@Override\n public void startUp(FloodlightModuleContext context)\n throws FloodlightModuleException {\n floodlightProvider = context\n .getServiceImpl(IFloodlightProviderService.class);\n\n floodlightProvider.addOFMessageListener(OFType.PACKET_IN, this);\n\n BufferedReader reader;\n try\n {\n //read in internal ip addresses\n reader = new BufferedReader(new FileReader(new File(this.insideIPsFile)));\n String temp = null;\n while ((temp = reader.readLine()) != null)\n {\n if( !temp.startsWith(\"//\") ){\n inside_ip.add(IPv4Address.of(temp));\n // System.out.println (IPv4Address.of(temp));\n }\n }\n reader.close();\n\n //read in externally visible ip addresses\n reader = new BufferedReader(new FileReader(new File(this.externalIPFile)));\n temp = null;\n while ((temp = reader.readLine()) != null)\n {\n if( !temp.startsWith(\"//\") ){\n external_ip = IPv4Address.of(temp);\n break;\n }\n }\n reader.close();\n\n //read in NAT switch id, inside ports, outside ports\n reader = new BufferedReader(new FileReader(new File(this.natInfoFile)));\n temp = null;\n while ((temp = reader.readLine()) != null)\n {\n if( !temp.startsWith(\"//\") ){\n String[] nat_info = temp.split( \",\" );\n\n nat_swId = DatapathId.of(Long.valueOf( nat_info[0] ));\n\n for( String internal_port: nat_info[1].trim().split(\" \") ){\n nat_internal_ports.add( TransportPort.of( Integer.parseInt(internal_port)) );\n }\n\n for( String external_port: nat_info[2].trim().split(\" \") ){\n nat_external_ports.add( TransportPort.of( Integer.parseInt(external_port)) );\n }\n break;\n }\n }\n reader.close();\n\n } catch (IOException e)\n {\n e.printStackTrace();\n }\n\n\n }",
"public void addPort(Scanner sc){\n currentPort = new SeaPort(sc);\n ports.add(currentPort);\n hashMap.put(currentPort.getIndex(), currentPort);\n portMap.put(currentPort.getIndex(), currentPort);\n everything.add(currentPort);\n \n }",
"public void addPassenger() {\n\t\t\n\t\tsynchronized(this) {\n\t\t\tcurrentOccup++;\n\t\t}\n\t\t\n\t\tSystem.out.println(\"Elevator \" + elevatorNum + \" total passenger count: \" + currentOccup);\n\t}",
"public void addServerManually() {\n JTextField address = new JTextField();\n address.setText(client.getIpv4());\n JTextField port = new JTextField();\n port.setText(\"2019\");\n\n JPanel serverPanel = new JPanel();\n serverPanel.add(new JLabel(\"Address:\"));\n serverPanel.add(address);\n serverPanel.add(Box.createHorizontalStrut(15));\n serverPanel.add(new JLabel(\"Port:\"));\n serverPanel.add(port);\n int result = JOptionPane.showConfirmDialog(frame, serverPanel, \"Please enter the address and the port\", JOptionPane.OK_CANCEL_OPTION);\n if (result == JOptionPane.OK_OPTION) {\n client.searchForServer(address.getText(), Integer.parseInt(port.getText()));\n }\n }",
"@Override\n\tpublic void arrival_proc(Player p, Game g) {\n\t\t// TODO Auto-generated method stub\n\t\tp.go2Jail(g);\n\n\t}",
"public void insertSpaceship(Spaceship spaceship, String spaceport, String runway) throws SQLException, ExceptionsDatabase {\r\n connection();\r\n String insert = \"insert into spaceship values (?, ?, ?, ?);\";\r\n String updateRunway = \"update runway set spaceship='\" + spaceship.getName() + \"', status='BUSY', numlandings=numlandings+1 where spaceport='\" + spaceport\r\n + \"' and number = \" + runway;\r\n PreparedStatement ps = conexion.prepareStatement(insert);\r\n Statement st = conexion.createStatement();\r\n try {\r\n conexion.setAutoCommit(false);\r\n ps.setString(1, spaceship.getName());\r\n ps.setInt(2, spaceship.getCapacity());\r\n ps.setString(3, spaceship.getStatus().toString());\r\n ps.setInt(4, spaceship.getFlightNumbers());\r\n ps.executeUpdate();\r\n st.executeUpdate(updateRunway);\r\n conexion.commit();\r\n } catch (SQLException ex) {\r\n conexion.rollback();\r\n throw new ExceptionsDatabase(ExceptionsDatabase.MULTIPLE_ACCTION_FAILED);\r\n } finally {\r\n ps.close();\r\n st.close();\r\n conexion.setAutoCommit(true);\r\n }\r\n disconnect();\r\n }",
"@Override\r\n\tpublic void arrivalMessage(Ship ship){\r\n\t\tSystem.out.println(ship + \" arrives at arrival zone\");\r\n\t}",
"public void addHost(String host, int port) {\r\n\t\tlistHostPort.add(new DNSHostPort(host, port));\r\n\t}",
"public Server(){\n\t\t//-- Crear datos default\n\t\tSport s = new Sport(\"Soccer\",\"soccer.png\");\n\t\tSport b = new Sport(\"Basketball\",\"basketball.png\");\n\t\tTeam t1 = s.addTeam(\"Tigres\");\n\t\tTeam t2 = s.addTeam(\"Rayados\");\n\t\ts.addGame(t1,t2);\n\t\t\n\t\tdeportes.add(s);\n\t\tdeportes.add(b);\n\t}",
"private void arrivedAdd(Passenger in) {\n\t\tif(counter >= capacity) {\n\t\t\tcapacity *= 2;\n\t\t\tPassenger[] temp = new Passenger[capacity];\n\t\t\tfor(int i = 0; i < arrivedOrder.length; i++) {\n\t\t\t\ttemp[i] = arrivedOrder[i];\n\t\t\t}\n\t\t\tarrivedOrder = temp;\n\t\t}\n\t\tarrivedOrder[counter] = in;\n\t}",
"public void addShip(Ship ship) {\n\t\tint row = ship.getRow();\n\t\tint column = ship.getColumn();\n\t\tint direction = ship.getDirection();\n\t\tint shipLength = ship.getLength();\n\t\t//0 == Horizontal; 1 == Vertical\n\t\tif (direction == 0) {\n\t\t\tfor (int i = column; i < shipLength + column; i++) {\n\t\t\t\tthis.grid[row][i].setShip(true);\n\t\t\t\tthis.grid[row][i].setLengthOfShip(shipLength);\n\t\t\t\tthis.grid[row][i].setDirectionOfShip(direction);\n\t\t\t}\n\t\t}\n\t\telse if (direction == 1) {\n\t\t\tfor (int i = row; i < shipLength + row; i++) {\n\t\t\t\tthis.grid[i][column].setShip(true);\n\t\t\t\tthis.grid[i][column].setLengthOfShip(shipLength);\n\t\t\t\tthis.grid[i][column].setDirectionOfShip(direction);\n\t\t\t}\n\t\t}\n\t}",
"public void addPassenger(Passenger user)\n\t{\n\t\tif (this.isFloorValid(user.getStartFloor()) &&\n\t\t\tthis.isFloorValid(user.getTargetFloor()) &&\n\t\t\tuser.getStartFloor() != user.getTargetFloor())\n\t\t{\n\t\t\tif (user.getStartFloor() < user.getTargetFloor())\n\t\t\t{\n\t\t\t\tthis.upQueues[user.getStartFloor()].offer(user);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tthis.downQueues[user.getStartFloor()].offer(user);\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tSystem.err.println(\"ElevatorBank.addPassenger is rejecting a naughty passenger: \" + user);\n\t\t}\n\t}",
"@Override\n public void boardThePlane(int passengerId) {\n this.lock.lock();\n try {\n // update passenger state\n this.repository.updatePassengerState(PassengerState.IN_FLIGHT, passengerId);\n\n // add passenger to queue\n this.passengers.add(passengerId);\n this.passengersStillMissing--;\n this.lastPassengerToBoard = passengerId;\n\n // wake up hostess\n this.hostessWaitForLastPassengerBoard.signal();\n } finally {\n this.lock.unlock();\n }\n }",
"public void addShippings( EAIMMCtxtIfc theCtxt, com.dosmil_e.mall.core.ifc.MallShippingIfc theShippings) throws EAIException;",
"public Portlets() \r\n {\r\n super();\r\n _portletList = new Vector();\r\n }",
"public void fillPassengersOnPlane(){//private, ändrar till public för grafiska\r\n //int i = 0;\r\n //for (Passenger p : passengers) {//fel med foreach tror jag\r\n for(int i = 0; i < 10; i++){\r\n if (passengers.size() >= 10) {\r\n passengers.get(i).setFirstName(\"Passenger\");//p\r\n passengers.get(i).setLastName(\"Unnamed\" + i);\r\n passengers.get(i).setAge(35 + i);\r\n passengers.get(i).setDestination(getDestination());\r\n passengers.get(i).setSeatNr(i + 1);\r\n if (i < 5) {\r\n passengers.get(i).setTicketPrice(21500);\r\n } else {\r\n passengers.get(i).setTicketPrice(5300);\r\n }\r\n if (seats.size() >= 10) {\r\n seats.get(i).setBooked(true);\r\n seats.get(i).setSeatNumber(i + 1);\r\n seats.get(i).setPassenger(passengers.get(i)); \r\n } else {\r\n seats.add(i, new Seat(i + 1, passengers.get(i)));\r\n }\r\n }\r\n else {\r\n Passenger nyP = new Passenger();\r\n nyP.setFirstName(\"Passenger\");//p\r\n nyP.setLastName(\"Unnamed\" + i);\r\n nyP.setAge(35 + i);\r\n nyP.setDestination(getDestination());\r\n nyP.setSeatNr(i + 1);\r\n if (i < 5) {\r\n nyP.setTicketPrice(21500);\r\n } else {\r\n nyP.setTicketPrice(5300);\r\n }\r\n passengers.add(nyP);\r\n \r\n if (seats.size() >= 10) {\r\n seats.get(i).setBooked(true);\r\n seats.get(i).setSeatNumber(i + 1);\r\n seats.get(i).setPassenger(nyP); \r\n } else {\r\n seats.add(i, new Seat(i + 1, nyP));\r\n }\r\n } \r\n }\r\n }",
"public void boardPassenger(int floor){\n _passengersOnboard +=1;\n switch(floor){\n case 1: Floor.FIRST.makeDestinationRequest();\n Floor.FIRST.addQueuedPassenger();\n break;\n case 2: Floor.SECOND.makeDestinationRequest();\n Floor.SECOND.addQueuedPassenger();\n break;\n case 3: Floor.THIRD.makeDestinationRequest();\n Floor.THIRD.addQueuedPassenger();\n break;\n case 4: Floor.FOURTH.makeDestinationRequest();\n Floor.FOURTH.addQueuedPassenger();\n break;\n case 5: Floor.FIFTH.makeDestinationRequest();\n Floor.FIFTH.addQueuedPassenger();\n break;\n case 6: Floor.SIXTH.makeDestinationRequest();\n Floor.SIXTH.addQueuedPassenger();\n break;\n case 7: Floor.SEVENTH.makeDestinationRequest();\n Floor.SEVENTH.addQueuedPassenger();\n break;\n }\n }",
"public void enterShipment(){\n Shipment shipment = new Shipment();\n shipment.setShipmentID(data.numberOfShipment());\n shipment.setReceiver(new Customer(data.numberOfCustomer(), GetChoiceFromUser.getStringFromUser(\"Enter Receiver FirstName: \"),\n GetChoiceFromUser.getStringFromUser(\"Enter Receiver Last Name: \"),data.getBranchEmployee(ID).getBranchID()));\n shipment.setSender(new Customer(data.numberOfCustomer(), GetChoiceFromUser.getStringFromUser(\"Enter Sender First Name: \"),\n GetChoiceFromUser.getStringFromUser(\"Enter Sender Last Name: \"),data.getBranchEmployee(ID).getBranchID()));\n shipment.setCurrentStatus(getStatus());\n shipment.setTrackingNumber(getUniqueTrackingNumber());\n shipment.setBranchID(data.getBranchEmployee(ID).getBranchID());\n data.getBranch(shipment.getBranchID()).addShipment(shipment);\n data.addShipment(shipment,shipment.getReceiver());\n System.out.printf(\"Your Shipment has added with tracking Number %d !\\n\",shipment.getTrackingNumber());\n }",
"public void addflight(Flight f)\n {\n \t this.mLegs.add(f);\n \t caltotaltraveltime();\n \t caltotalprice();\n }",
"public static void main(String[] args) throws CantAdd, CoronaWarn {\n\t\tTravelAgency TravelAgency = new TravelAgency();\r\n\r\n\t\tPlane p=new Plane(200,2,\"first plane max travelers\");\r\n\t\tPlane p1=new Plane(100,1,\"second plan min traelers\");\r\n\r\n\t\tTrip i=new Trip(p,Country.Australia,Country.Canada);\r\n\t\tTrip io=new Trip(p1,Country.Australia,Country.Canada);\r\n\t\t \r\n\t\tDate date=new Date(1,2,5);\r\n\t\tPassport passprt1=new Passport(\"anton\",44,date);\r\n\t\tPassport passprt2=new Passport(\"abdo\",44,date);\r\n\t\tPassport passprt3=new Passport(\"julie\",44,date);\r\n\t\tPassport passprt4=new Passport(\"juliana\",44,date);\r\n\t\tPassport passprt5=new Passport(\"bella\",44,date);\r\n\t\tPassport passprt6=new Passport(\"geris\",44,date);\r\n\t\tTraveler t1=new Traveler(passprt1,true,true);\r\n\t\tTraveler t2=new Traveler(passprt2,true,true);\r\n\t\tTraveler t3=new Traveler(passprt3,true,true);\r\n\t\tTraveler t4=new Traveler(passprt4,true,true);\r\n\t\tTraveler t5=new Traveler(passprt5,true,true);\r\n\t\tTraveler t6=new Traveler(passprt6,true,true);\r\n\t\t\r\n\t\t\r\n\t\tio.addTraveler(t1);\r\n\t\tio.addTraveler(t2);\r\n\t\tio.addTraveler(t3);\r\n\t\tio.addTraveler(t6);\r\n\t\tio.addTraveler(t5);\r\n\t\tio.addTraveler(t4);\r\n\t\tio.addTraveler(t6);\r\n \r\n\t\ti.addTraveler(t1);\r\n\t\ti.addTraveler(t2);\r\n\t\ti.addTraveler(t3);\r\n\t\ti.addTraveler(t4);\r\n\t\r\n\t\ti.addTraveler(t6);\r\n\t\t\r\n\t\tTravelAgency.addTrip(i);\t\r\n\t\tTravelAgency.addTrip(io);\r\n\t\tSystem.out.print(TravelAgency.findUnsafeTrips());\r\n\r\n\t\t\r\n\t\tTravelAgency.AddTraveler(t1);\r\n\t\tTravelAgency.AddTraveler(t2);\r\n\t\tTravelAgency.AddTraveler(t3);\r\n\t\tTravelAgency.AddTraveler(t4);\r\n\t\tTravelAgency.AddTraveler(t5);\r\n\t\tTravelAgency.AddTraveler(t6);\r\n\t\t\r\n\t}",
"private void connectToTheGameServer(String addPort) {\n\t\tString[] add = addPort.split(\":\");\n\t\tString address = add[0];\n\t\tString port = add[1];\n\t\tInetAddress intaddr;\n\t\tSystem.out.println(\"connectToTheGameServer: @:\" + address + \", port:\" + port);\n\n\t\ttry {\n\t\t\tif(address.equals(\"127.0.0.1\")){\n\t\t\t\tintaddr = socket.getInetAddress();\n\t\t\t}else{\n\t\t\t\tintaddr = InetAddress.getByName(address);\n\t\t\t}\n\t\t\tthis.gameServerSocket = new Socket(intaddr, Integer.valueOf(port));\n\t\t\tSystem.out.println(\"connectToTheGameServer: connected\");\n\t\t\tClient.myState = Client.Current_state.client_client;\n\t\t\tClient.myRole = current_role.client;\n\t\t\tClient.myPlatforme = new Platforme();\n\t\t\tClient.sendMessagesToServer(Client.ok, osServ);\n\t\t\tClient.myPlatforme.show();\n\t\t\tif (Client.myPlatforme == null) {\n\t\t\t\tSystem.out.println(\"ici null\");\n\t\t\t}\n\t\t\tstartClientClientListener(gameServerSocket, false);\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"client message: \" + e.getMessage().toString());\n\t\t}\n\t}",
"public void addPeerToList(WifiP2pDevice peer) {\n stopRefreshActionBar();\n int peer_index = -1;\n if ((peer_index = peers_.indexOf(peer)) != -1) {\n peers_.get(peer_index).deviceName = peer.deviceName;\n peers_.get(peer_index).deviceAddress = peer.deviceAddress;\n peers_.get(peer_index).status = peer.status;\n } else {\n peers_.add(peer);\n }\n displayEmptyView();\n System.out.println(\"Peers found\");\n ((PeersAdapter)adapter_).update();\n listener_.onDiscoveringPeersRequestDone();\n }",
"protected void addOscServerAddressPanel() {\n\n\t\t// variable addressPanel holds an instance of JPanel.\n\t\t// instance of JPanel received from makeNewJPanel method\n\t\tfinal JPanel addressPanel = makeNewJPanel1();\n\t\taddressPanel.setBackground(new Color(123, 150, 123));\n\t\t// variable addressWidget holds an instance of JTextField\n\t\taddressWidget = new JTextField(\"localhost\");\n\t\t// variable setAddressButton holds an insatnce of JButton with\n\t\t// a \"Set Address\" argument for its screen name\n\t\tfinal JButton setAddressButton = new JButton(\"Set Address\");\n\t\tsetAddressButton.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(final ActionEvent evt) {\n\t\t\t\t// perform the addressChanged method when action is received\n\t\t\t\taddressChanged();\n\t\t\t}\n\t\t});\n\n\t\t// variable portWidget holds an instance of JLabel with the OSCPortOut\n\t\t// as the text it looks like OSCPortOut has a method to get the default\n\t\t// SuperCollider port\n\t\tportWidget = new JLabel(Integer.toString(OSCPort.defaultSCOSCPort()));\n\n\t\tportWidget.setForeground(new Color(255, 255, 255));\n\t\tfinal JLabel portLabel = new JLabel(\"Port\");\n\t\tportLabel.setForeground(new Color(255, 255, 255));\n\n\t\t// add the setAddressButton to the addressPanel\n\t\taddressPanel.add(setAddressButton);\n\t\t// portWidget = new JTextField(\"57110\");\n\t\t// add the addressWidget to the addressPanel\n\t\taddressPanel.add(addressWidget);\n\t\t// add the JLabel \"Port\" to the addressPanel\n\t\taddressPanel.add(portLabel);\n\t\t// add te portWidget tot eh addressPanel\n\t\taddressPanel.add(portWidget);\n\n\t\t//??? add address panel to the JPanel OscUI\n\t\tadd(addressPanel);\n\t}",
"void addpeer(Node p) {\n\t\tpeers.add(p);\n\t}",
"public void withdrawPath(AS peer, int dest) {\n this.incUpdateQueue.add(new BGPUpdate(dest, peer));\n }",
"@Override\n public void announceArrival() {\n this.lock.lock();\n try {\n // update pilot state\n this.repository.updatePilotState(PilotState.DEBOARDING);\n\n // call passengers\n this.endOfFlight = true;\n while (!this.passengers.isEmpty()) {\n // wake up passengers\n this.passengerLeavePlane = this.passengers.poll();\n this.passengersWaitForEndOfFlight.signal();\n this.passengersWaitForEndOfFlight.signalAll();\n\n // wait for all passengers\n this.pilotWaitForDeboarding.await();\n }\n this.endOfFlight = false;\n\n // update pilot state\n this.repository.updatePilotState(PilotState.FLYING_BACK);\n } catch (InterruptedException e) {\n e.printStackTrace();\n } finally {\n this.lock.unlock();\n }\n }",
"public void addNameServerPort(String nsp) {\n\t\tif (nsp != null)\n\t\t// check to see if item is already in list\n\t\tif (_nameserverPorts.indexOf(nsp) < 0)\n\t\t\t_nameserverPorts.add(nsp);\n\t}",
"public void addNPS()\n\t{\n\t\tgameObj[2].add(new NonPlayerShip());\n\t\tSystem.out.println(\"Non-Player ship added\");\n\t}",
"public void shipPlacer(Board board, ShipTeam fleet){\r\n\r\n\t\tArrayList<Ship> theShips = fleet.getShips();\r\n\r\n\t\tint randomX, randomY;\r\n\t\tfor (Ship s : theShips){\r\n\t\t\tboolean goodPlace = false;\r\n\t\t\twhile (goodPlace == false){\r\n\t\t\t\tRandom randCoords = new Random();\r\n\t\t\t\trandomX = randCoords.nextInt(10);\r\n\t\t\t\trandomY = randCoords.nextInt(10);\r\n\t\t\t\tif (randomX % 2 == 0)\r\n\t\t\t\t\tgoodPlace = board.placeShip(randomX, randomY, s, 1);\r\n\t\t\t\telse\r\n\t\t\t\t\tgoodPlace = board.placeShip(randomX, randomY, s, 2);\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public static void addNewRoom() {\n Services room = new Room();\n room = addNewService(room);\n\n ((Room) room).setFreeService(FuncValidation.getValidFreeServices(ENTER_FREE_SERVICES,INVALID_FREE_SERVICE));\n\n //Get room list from CSV\n ArrayList<Room> roomList = FuncGeneric.getListFromCSV(FuncGeneric.EntityType.ROOM);\n\n //Add room to list\n roomList.add((Room) room);\n\n //Write room list to CSV\n FuncReadWriteCSV.writeRoomToFileCSV(roomList);\n System.out.println(\"----Room \"+room.getNameOfService()+\" added to list---- \");\n addNewServices();\n\n }",
"public void updateDestination(){\r\n\t\tdestination.update_pc_arrivalFlows(flows);\r\n\t}",
"public void addOrRemoveScreenedShip(Spaceship aShip){\n int found = -1;\r\n for (int i = 0; i < screenedShips.size(); i++){\r\n if (aShip.getId() == screenedShips.get(i)){\r\n found = i;\r\n }\r\n }\r\n if (found > -1){ // ta bort den\r\n screenedShips.remove(found);\r\n }else{ // annars l�gg till den\r\n screenedShips.add(aShip.getId());\r\n }\r\n }",
"public boolean addPassenger ( Entity passenger ) {\n\t\ttry {\n\t\t\treturn invoke ( \"addPassenger\" , new Class < ? >[] { Entity.class } , passenger );\n\t\t} catch ( NoSuchMethodException ex ) {// legacy versions\n\t\t\tsetPassenger ( passenger );\n\t\t\treturn true;\n\t\t}\n\t}",
"@POST(\"/AddShip\")\n\tint addShip(@Body Ship ship,@Body int id) throws GameNotFoundException;",
"org.landxml.schema.landXML11.LanesDocument.Lanes addNewLanes();",
"void addHost(Service newHost);",
"public void fillPassengersWithRealPeople(){\r\n Passenger p1 = new Passenger(\"Jimmy\", \"Quaresmini\", 5100, 7, \"London\", 40);\r\n Passenger p2 = new Passenger(\"Masod\", \"Jalalian\", 5200, 9, \"London\", 60);\r\n Passenger p8 = new Passenger(\"Bardia\", \"Fathi\", 5300, 6, \"London\", 38);\r\n Passenger p9 = new Passenger(\"Sami\", \"Norola\", 5300, 8, \"London\", 37);\r\n Passenger p10 = new Passenger(\"Bardias\", \"Girlfriend\", 5200, 10, \"London\", 35);\r\n /*seats.add(6, new Seat(7,p1));//Jimmy\r\n seats.add(8, new Seat(9,p2));//Masod\r\n seats.add(5, new Seat(6,p8));//Bardia\r\n seats.add(7, new Seat(8,p9));//Sami\r\n seats.add(9, new Seat(10,p10));//Bardias Girlfriend*/\r\n\r\n Passenger p3 = new Passenger(\"Mattias\", \"Svensson-Nordell\", 22000, 1, \"London\", 29);\r\n //seats.add(0, new Seat(1,p3));\r\n Passenger p4 = new Passenger(\"Bita\", \"Jabbari\", 21000, 3, \"London\", 43);\r\n //seats.add(2, new Seat(3,p4));\r\n Passenger p5 = new Passenger(\"Marcus\", \"Lippert\", 24000, 2, \"London\", 45);\r\n //seats.add(1, new Seat(2,p5));\r\n Passenger p6 = new Passenger(\"Christer\", \"Barousen\", 21000, 4, \"London\", 44);\r\n //seats.add(3, new Seat(4,p6));\r\n Passenger p7 = new Passenger(\"Linda\", \"Hilding\", 21500, 5, \"London\", 42);\r\n //seats.add(4, new Seat(5,p7));\r\n\r\n passengers.add(p1);\r\n passengers.add(p2);\r\n passengers.add(p3);\r\n passengers.add(p4);\r\n passengers.add(p5);\r\n\r\n passengers.add(p6);\r\n passengers.add(p7);\r\n passengers.add(p8);\r\n passengers.add(p9);\r\n passengers.add(p10);\r\n\r\n seats.add(0, new Seat(1,p3));//Mattias\r\n seats.add(1, new Seat(2,p5));//Marcus\r\n seats.add(2, new Seat(3,p4));//Bita\r\n seats.add(3, new Seat(4,p6));//Christer\r\n seats.add(4, new Seat(5,p7));//Linda\r\n\r\n seats.add(5, new Seat(6,p8));//Bardia\r\n seats.add(6, new Seat(7,p1));//Jimmy\r\n seats.add(7, new Seat(8,p9));//Sami\r\n seats.add(8, new Seat(9,p2));//Masod\r\n seats.add(9, new Seat(10,p10));//Bardias Girlfriend\r\n }",
"@Override\r\n protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\r\n response.setContentType(\"text/plain\");\r\n\r\n String name = getParameter(\"name\", request);\r\n if (name == null) {\r\n missingRequiredParameter(response, \"name\");\r\n return;\r\n }\r\n\r\n String flightNumber = getParameter(\"flightNumber\", request);\r\n if (flightNumber == null) {\r\n missingRequiredParameter(response, \"flight number\");\r\n return;\r\n }\r\n\r\n String src = getParameter(\"src\", request);\r\n if (src == null) {\r\n missingRequiredParameter(response, \"source airport\");\r\n return;\r\n }\r\n\r\n String departTime = getParameter(\"departTime\", request);\r\n\r\n String[] departArray = departTime.split(\" \");\r\n if (departTime == null) {\r\n missingRequiredParameter(response, \"departure time\");\r\n return;\r\n }\r\n\r\n String dest = getParameter(\"dest\", request);\r\n if (dest == null) {\r\n missingRequiredParameter(response, \"destination airport\");\r\n return;\r\n }\r\n\r\n String arrivalTime = getParameter(\"arrivalTime\", request);\r\n String[] arrivalArray = arrivalTime.split(\" \");\r\n if (arrivalTime == null) {\r\n missingRequiredParameter(response, \"arrival time\");\r\n return;\r\n }\r\n\r\n String[] args = {name, flightNumber, src, departArray[0], departArray[1], departArray[2], dest,\r\n arrivalArray[0], arrivalArray[1], arrivalArray[2]};\r\n Flight flight = Flight.getFlightFromArgs(args);\r\n\r\n\r\n if (this.data.containsKey(name)) {\r\n Airline airline1 = this.data.get(name);\r\n\r\n for (Object flight1 : this.data.get(name).getFlights()) {\r\n Flight flights2 = (Flight) flight1;\r\n if (flights2.getFlightNumber().equals(flight.getFlightNumber())) {\r\n System.out.println(\"This Flight number exists\");\r\n return;\r\n }\r\n }\r\n airline1.addFlight(flight);\r\n this.data.replace(name, airline1);\r\n System.out.println(\"added flight to existing airline\");\r\n }\r\n\r\n if (!this.data.containsKey(name)) {\r\n Airline airline = new Airline(name);\r\n airline.addFlight(flight);\r\n this.data.put(name, airline);\r\n System.out.println(\"Created a new flight\");\r\n }\r\n\r\n\r\n PrintWriter pw = response.getWriter();\r\n pw.println(\"added\");\r\n pw.flush();\r\n\r\n response.setStatus(HttpServletResponse.SC_OK);\r\n }",
"public Flight(String flightNumber, String airline, int passengerCapacity, String destination){\n this.flightNumber = flightNumber;\n this.airline = airline;\n this.passengerCapacity = passengerCapacity;\n this.destination = destination;\n passengerManifest = new ArrayList<Passenger>();\n\n }",
"public void addPortlet(org.light.portal.portlet.config.Portlet vPortlet)\r\n throws java.lang.IndexOutOfBoundsException\r\n {\r\n _portletList.addElement(vPortlet);\r\n }",
"private void sendUpdate(int dest) {\n Set<AS> prevAdvedTo = this.adjOutRib.get(dest);\n Set<AS> newAdvTo = new HashSet<AS>();\n BGPPath pathOfMerit = this.locRib.get(dest);\n\n /*\n * If we have a current best path to the destination, build a copy of\n * it, apply export policy and advertise the route\n */\n if (pathOfMerit != null) {\n BGPPath pathToAdv = pathOfMerit.deepCopy();\n\n pathToAdv.prependASToPath(this.asn);\n\n /*\n * Advertise to all of our customers\n */\n for (AS tCust : this.customers) {\n tCust.advPath(pathToAdv);\n newAdvTo.add(tCust);\n }\n\n /*\n * Check if it's our locale route (NOTE THIS DOES NOT APPLY TO\n * HOLE PUNCHED ROUTES, so the getDest as opposed to the\n * getDestinationAS _IS_ correct) or if we learned of it from a\n * customer\n */\n if (pathOfMerit.getDest() == this.asn\n || (this.getRel(pathOfMerit.getNextHop()) == 1)) {\n for (AS tPeer : this.peers) {\n tPeer.advPath(pathToAdv);\n newAdvTo.add(tPeer);\n }\n for (AS tProv : this.providers) {\n tProv.advPath(pathToAdv);\n newAdvTo.add(tProv);\n }\n }\n }\n\n /*\n * Handle the case where we had a route at one point, but have since\n * lost any route, so obviously we should send a withdrawl\n */\n if (prevAdvedTo != null) {\n prevAdvedTo.removeAll(newAdvTo);\n for (AS tAS : prevAdvedTo) {\n tAS.withdrawPath(this, dest);\n }\n }\n\n /*\n * Update the adj-out-rib with the correct set of ASes we have\n * adverstised the current best path to\n */\n this.adjOutRib.put(dest, newAdvTo);\n }",
"public ServeurGestion(int portClient){\r\n try {\r\n ecoute=new ServerSocket(portClient);\r\n appels=new Vector<>();\r\n } catch (IOException ex) {\r\n Logger.getLogger(ServeurGestion.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }",
"void scheduleNextDestination(Passenger passenger, Floor currentFloor);",
"public void setPassengerId(int value) {\n this.passengerId = value;\n }",
"public void sendPeerListToAll() {\r\n\t\tPacket packet = new Packet();\r\n\t\tpacket.eventCode = 1;\r\n\t\tfor(int i = 0; i < peerClientNodeConnectionList.size(); i++) {\r\n\t\t\tPeer peer = new Peer();\r\n\t\t\tpeer.peerID = peerClientNodeConnectionList.get(i).peerClientID;\r\n\t\t\tpeer.peerIP = peerClientNodeConnectionList.get(i).peerClientIP;\r\n\t\t\tpeer.peerPort = peerClientNodeConnectionList.get(i).peerClientListeningPort;\r\n\t\t\tpacket.peerList.add(peer);\r\n\t\t}\r\n\t\t\r\n\t\tfor(int i = 0; i < peerClientNodeConnectionList.size(); i++) {\r\n\t\t\ttry {\r\n\t\t\t\tpeerClientNodeConnectionList.get(i).outStream.writeObject(packet);\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\t\t\t\r\n\t\t}\r\n\t}",
"private void createPassenger() {\n account = new Account(\"driver\", \"password\", \"[email protected]\",\n \"Dan\", \"20 Howard Street\", 1234567, 64278182123L);\n }",
"public void addPort(WSDLPort port) {\r\n\t\tif (port == null) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tif (ports == null) {\r\n\t\t\tports = new LinkedMap();\r\n\t\t}\r\n\t\tports.put(port.getName(), port);\r\n\t\tport.setService(this);\r\n\t}",
"static public void startSending(String add,int port,byte[] data,int mode){\n }",
"public boolean placeShipUser(Ship ship) {\r\n return fieldUser.addShip(ship);\r\n }",
"public boolean addFlight(Flight addFlight){\r\n return flights.add(addFlight);\r\n }",
"public static boolean activatePortedNumberOnSmileNetwork(PortInEvent context) throws Exception {\n log.debug(\"MNP In activatePortedNumberOnSmileNetwork\");\n try {\n // 1. Add the ported numbers on SmileDB's ported_number Table;\n // AddressManager am = new AddressManager();\n log.debug(\"Number of number ranges to port in = {}\", context.getRoutingInfoList().getRoutingInfo().size());\n for(RoutingInfo routingInfo : context.getRoutingInfoList().getRoutingInfo()) {\n log.debug(\"Adding ported number range [{}, {}] from donor network {} to the database.\", new Object[]{\n routingInfo.getPhoneNumberRange().getPhoneNumberStart(), \n routingInfo.getPhoneNumberRange().getPhoneNumberEnd(), \n context.getDonorId()});\n \n PortingData portingData = new PortingData();\n portingData.setPlatformContext(new PlatformContext());\n portingData.getPlatformContext().setTxId(context.getPlatformContext().getTxId());\n portingData.setStartE164(Long.parseLong(Utils.getFriendlyPhoneNumberKeepingCountryCode(routingInfo.getPhoneNumberRange().getPhoneNumberStart())));\n portingData.setEndE164(Long.parseLong(Utils.getFriendlyPhoneNumberKeepingCountryCode(routingInfo.getPhoneNumberRange().getPhoneNumberEnd())));\n \n portingData.setInterconnectPartnerCode(context.getRecipientId()); // Number is now hosted by Smile ...\n SCAWrapper.getAdminInstance().updatePortingData_Direct(portingData);\n \n String impu = Utils.getPublicIdentityForPhoneNumber(routingInfo.getPhoneNumberRange().getPhoneNumberStart());\n \n // 2. Add the ported numbers to available_numbers table.\n if(MnpHelper.isEmergencyRestore(context)) {\n //Free-up the original number so it can be reused to the new product below.\n PlatformString numToIssue = new PlatformString();\n numToIssue.setString(impu);\n SCAWrapper.getAdminInstance().freeNumber_Direct(numToIssue);\n\n } else {\n AvailableNumberRange availableNumberRange = new AvailableNumberRange();\n availableNumberRange.setOwnedByCustomerProfileId(context.getCustomerProfileId());\n // availableNumberRange.setOwnedByOrganisationId(context.getOrganisationId());\n com.smilecoms.commons.sca.direct.am.PhoneNumberRange phoneNumberRange = \n new com.smilecoms.commons.sca.direct.am.PhoneNumberRange();\n phoneNumberRange.setPhoneNumberEnd(routingInfo.getPhoneNumberRange().getPhoneNumberEnd());\n phoneNumberRange.setPhoneNumberStart(routingInfo.getPhoneNumberRange().getPhoneNumberStart());\n \n availableNumberRange.setPhoneNumberRange(phoneNumberRange);\n availableNumberRange.setPriceCents(0);\n if(context.getCustomerType().equalsIgnoreCase(MnpHelper.MNP_CUSTOMER_TYPE_INDIVIDUAL)) {\n availableNumberRange.setOwnedByCustomerProfileId(context.getCustomerProfileId());\n }\n \n if(context.getCustomerType().equalsIgnoreCase(MnpHelper.MNP_CUSTOMER_TYPE_CORPORATE)) {\n availableNumberRange.setOwnedByOrganisationId(context.getOrganisationId());\n }\n \n // am.addAvailableNumberRange(availableNumberRange);\n SCAWrapper.getAdminInstance().addAvailableNumberRange_Direct(availableNumberRange);\n }\n \n // 3. If not a range, then modify Service Instance Here ...\n if(routingInfo.getServiceInstanceId() == -1) {\n log.warn(\"Porting of a number range ({} - {}) into Smile - added into the available_number table, no need to activate services.\", routingInfo.getPhoneNumberRange().getPhoneNumberStart(), routingInfo.getPhoneNumberRange().getPhoneNumberEnd());\n } else {\n \n if(MnpHelper.isEmergencyRestore(context)) {\n // The previous service would have been deleted, so we need to add a new service instance to the product which the old service used to belong.\n ProductInstanceQuery piQuery = new ProductInstanceQuery();\n piQuery.setVerbosity(StProductInstanceLookupVerbosity.MAIN_SVC_SVCAVP);\n piQuery.setServiceInstanceId(routingInfo.getServiceInstanceId());\n ProductInstanceList piList = SCAWrapper.getAdminInstance().getProductInstances(piQuery);\n \n if(piList == null || piList.getNumberOfProductInstances() <= 0) {\n log.error(\"MNP Emergency Restore - no product instance found with old/delete service instance {}.\", routingInfo.getServiceInstanceId());\n } else {\n if(piList.getNumberOfProductInstances() > 1) { // TOo manny product instances\n log.error(\"MNP Emergency Restore - too many product instances found ({}) for old/deleted service instance ({}), do not know which one to use for emergency restore.\", piList.getNumberOfProductInstances(), routingInfo.getServiceInstanceId());\n } else { // We have exactly 1 product, use it.\n \n ProductInstance pi = piList.getProductInstances().get(0);\n log.debug(\"MNP Emergency Restore - adding new voice service to product instance ({})\", pi.getProductInstanceId());\n ProductOrder po = new ProductOrder();\n po.setProductInstanceId(pi.getProductInstanceId());\n po.setAction(StAction.NONE);\n po.setCustomerId(pi.getCustomerId());\n ServiceInstanceOrder siO = new ServiceInstanceOrder();\n siO.setAction(StAction.CREATE);\n ServiceInstance si = new ServiceInstance();\n si.setServiceSpecificationId(100);\n //Set AccountID\n if (pi.getProductServiceInstanceMappings().isEmpty()) {\n // there is no account so create a new one\n si.setAccountId(-1);\n } else {\n si.setAccountId(pi.getProductServiceInstanceMappings().get(0).getServiceInstance().getAccountId());\n }\n // AVPs\n /*ProductSpecification ps = NonUserSpecificCachedDataHelper.getProductSpecification(pi.getProductSpecificationId());\n ProductServiceSpecificationMapping pssm = null;\n for (ProductServiceSpecificationMapping mapping : ps.getProductServiceSpecificationMappings()) {\n if (mapping.getServiceSpecification().getServiceSpecificationId() == 100) {\n pssm = mapping;\n break;\n }\n }*/\n \n si.getAVPs().addAll(NonUserSpecificCachedDataHelper.getServiceSpecification(100).getAVPs());\n for (AVP avp : si.getAVPs()) {\n if (avp != null && avp.getAttribute() != null) {\n if (avp.getAttribute().equalsIgnoreCase(\"PublicIdentity\")) {\n avp.setValue(impu);\n }\n }\n }\n \n po.setOrganisationId(pi.getOrganisationId());\n si.setCustomerId(pi.getCustomerId());\n si.setStatus(\"AC\");\n siO.setServiceInstance(si);\n siO.setAction(StAction.CREATE);\n po.getServiceInstanceOrders().add(siO);\n SCAWrapper.getAdminInstance().processOrder(po);\n }\n } \n } else { //Normal portin - not an emergency restore.\n // -- Assign the ported number to the service instance of the customer ...\n // -- Retrieve the service instance that was used for this porting order.\n ServiceInstanceQuery siQuery = new ServiceInstanceQuery();\n siQuery.setVerbosity(StServiceInstanceLookupVerbosity.MAIN_SVCAVP);\n siQuery.setServiceInstanceId(routingInfo.getServiceInstanceId());\n ServiceInstanceList siList = SCAWrapper.getAdminInstance().getServiceInstances(siQuery);\n\n if (siList.getNumberOfServiceInstances() < 1) { \n // TODO - handle missing SI when provisioning a ported number. \n log.error(\"No service instance found with sid {}\", routingInfo.getServiceInstanceId());\n throw new Exception(\"Service instance with sid \" + routingInfo.getServiceInstanceId() + \" does not exist.\");\n } \n\n ProductOrder pOrder = new ProductOrder();\n pOrder.setAction(StAction.NONE);\n \n if(context.getCustomerType().equalsIgnoreCase(MnpHelper.MNP_CUSTOMER_TYPE_CORPORATE)) {\n pOrder.setOrganisationId(context.getOrganisationId());\n } else {\n pOrder.setOrganisationId(0);\n }\n \n pOrder.setCustomerId(siList.getServiceInstances().get(0).getCustomerId());\n\n ServiceInstanceOrder siOrder = new ServiceInstanceOrder();\n ServiceInstance siToChange = siList.getServiceInstances().get(0);\n // Change Public Identity here\n if (siToChange.getAVPs() != null) {\n for (AVP avp : siToChange.getAVPs()) {\n if (avp != null && avp.getAttribute() != null) {\n if (avp.getAttribute().equalsIgnoreCase(\"PublicIdentity\")) {\n avp.setValue(impu);\n }\n }\n }\n }\n\n siOrder.setAction(StAction.UPDATE);\n pOrder.setProductInstanceId(siList.getServiceInstances().get(0).getProductInstanceId());\n siToChange.setStatus(\"AC\"); //Activate the service instance - in case this is an emergency restore\n siOrder.setServiceInstance(siToChange);\n\n pOrder.getServiceInstanceOrders().add(siOrder);\n MnpHelper.formatAVPsForSendingToSCA(pOrder.getServiceInstanceOrders().get(0).getServiceInstance().getAVPs(), pOrder.getServiceInstanceOrders().get(0).getServiceInstance().getServiceSpecificationId(), true);\n SCAWrapper.getAdminInstance().processOrder(pOrder);\n }\n }\n }\n //All good ...\n return true;\n } catch(Exception ex) {\n log.error(\"Error while attempting to activate ported number onto Smile network - \", ex);\n throw ex;\n } finally {\n log.debug(\"Done activatePortedNumberOnSmileNetwork\");\n }\n }",
"public ArrayList<ArrayList> makeInfinite(String send_ip, int send_port) {\n\t\t\r\n\t\tString nextHop = send_ip+\":\"+send_port;\r\n\t\tIterator<ArrayList> iter_own = this.routingTable.iterator(); // just an iterator\r\n\t\twhile(iter_own.hasNext()){\r\n\t\t\tArrayList tempList = iter_own.next();\r\n\t\t\tif(nextHop.equals(tempList.get(1))){\r\n\t\t\t\ttempList.remove(2);\r\n\t\t\t\ttempList.add(16);\r\n\t\t\t}\r\n\t\t}\r\n\t\tprintTable();\r\n\t\treturn this.routingTable;\r\n\t}",
"public void advertiseToAll(Shop shop) {\n ShopAdsMessage.console.announceDebug(\"advertiseToAll shop message\");\n\n for (Player p : Bukkit.getServer().getOnlinePlayers()) {\n SendMessage(shop, p);\n }\n }",
"@Override\n public void addServer(String address, String port, String name) {\n model.addElement(\"Server name: #\" + name + \"# Server address: #\" + address + \"# Server port: #\" + port + \"#\");\n }",
"public void addNPS()\n\t{\t\n\t\t\tgameObj.add(new NonPlayerShip(getHeight(), getWidth()));\n\t\t\ttotalNPS ++;\n\t\t\tSystem.out.println(\"Non-Player ship added\");\n\t\t\tnotifyObservers();\n\t}",
"public void addAircrafts(Aircraft A) {\n\t\t\r\n\t\tfor (int y = 0; y < getServiceLineSize(); y++) {\r\n\t\t\tfor (int x = 0; x < getServiceStations(); x++) {\r\n\t\t\t\tif (!(SD[y][x].flag)) {\r\n\t\t\t\t\tSD[y][x] = A;\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tSystem.out.println(\"\");\r\n\t\t}\r\n\t}",
"void addFlight(Node toNode);",
"public void setPassenger(Passenger passenger) {\r\n this.passenger = passenger;\r\n }",
"public void add(PeerInt p){\n\t\tMLog.log(\"adding peer\");\n\t\tpeers.add(p);\n\t}",
"public PlayerShip(Ship baseShip, List<Good> cargo) {\n setBase(baseShip);\n setCargoSpace(base.getCargoBay());\n this.cargo = cargo;\n setNumOfGoods(cargo.size());\n }",
"private void setupInvitedDripFlow() {\n // all the entries created in invite in the last interval.\n List<DProjectInvites> invites = AppConfig.getInstance().getdProjectInvitesDAO().findAllInternal();\n if (invites == null || invites.isEmpty()) return;\n List<DProjectInvites> newInvites = new ArrayList<>();\n for (DProjectInvites invite : invites) {\n if (invite.getCreated_timestamp().after(lastRunDate)) {\n newInvites.add(invite);\n }\n }\n LOG.info(\"setupInvitedDripFlow newInvites = \" + newInvites.size());\n if (newInvites.isEmpty()) return;\n\n DripFlows.addToProjectInviteFlow(newInvites);\n }",
"public void actionPerformed(ActionEvent event)\n {\n if (add)\n {\n if (validInput())\n {\n Ship newShip = map.addUserShip(\"Lobsterboat\",shipName,\n xcoord,ycoord,speed,direction);\n main.setUserShip(newShip);\n map.repaint();\n main.closeStartWindow();\n }\n }\n else\n {\n main.closeStartWindow();\n }\n }",
"public void addServers(int portmin,int portmax){\n BufferedReader inloc;\n PrintWriter outloc;\n Socket SSocket;\n for (int portcourant = portmin; portcourant < portmax; portcourant++) {\n try {\n System.out.print(\"Attempt to connect to server at port \");\n System.out.println(portcourant);\n SSocket = new Socket(\"127.0.0.1\", portcourant);\n System.out.print(\"Done...\");\n //flux pour envoyer\n outloc = new PrintWriter(SSocket.getOutputStream());\n tabServerssout.add(outloc);\n //flux pour recevoir\n inloc = new BufferedReader(new InputStreamReader(SSocket.getInputStream()));\n tabServerssin.add(inloc);\n }catch(IOException e){\n e.printStackTrace();\n }\n }\n }",
"public void add(){\n list.add(smart);\n list.add(mega);\n list.add(smartMini);\n list.add(absolute);\n\n clientsList.add(client1);\n clientsList.add(client2);\n clientsList.add(client3);\n clientsList.add(client4);\n clientsList.add(client5);\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}",
"public static void addPassengers(ActorRef checkPoint, int num){\n\t\tfor(int i=0; i<num; i++){\n\t\t\tcount++;\n\t\t\tcheckPoint.tell(new PassengerEnters(count));\n\t\t}\t\t\t\n\t}",
"void setPassengerName(String passengerName);",
"@Transactional\n\t@Override\n\tpublic Passenger addPassenger(Passenger p) {\tint bId = p.getBooking().getBookingId();\n//\t\tString query = \"Select b from Booking b where b.bookingId =:bId \";\n//\t\tTypedQuery<Booking> tq = em.createQuery(query, Booking.class);\n//\t\ttq.setParameter(\"bId\", bId);\n//\t\tBooking b = tq.getSingleResult();\n//\t\tSystem.out.println(\"feffefefeff\" + p);\n//\t\tp.setBooking(b);\n//\t\n\tList<Integer> seatNos = new ArrayList();\n\t\t\n\t\tfor(int i =1; i<61; i++)\n\t\t{\t\n\t\t\tseatNos.add(i);\n\t}\n\t\t\t\n\tp.setSeatNo(seatNos.get(count));\n\tcount+=1;\n\t\t\n\t\t\n\n\t\t\n\t\t\n\t\tSystem.out.println(p);\n\t\tem.persist(p);\n\t\tSystem.out.println(\"persisted\" + p);\n\t\treturn p;\n\t}",
"public void addToPassing(PlayingCard[] cards){\n\t\tpassing.addAll(Arrays.asList(cards));\n\t}",
"@Override\r\n public void update() {\n for (int i = 0; i < super.npcShips.size(); i++){\r\n super.npcShips.get(i).owner.update();\r\n for (int ii = 0; ii < Server.serverClientsList.size(); ii++) {\r\n AbstractShip ship = Server.serverClientsList.get(ii).pilot.ship;\r\n if ((Math.abs(ship.x - super.npcShips.get(i).x) < sightLength) && (Math.abs(ship.y - super.npcShips.get(i).y) < sightLength)){\r\n if (super.npcShips.get(i) instanceof Asteroid) {\r\n int asteroidNr = (super.npcShips.get(i).moving) ? 1 : 0;\r\n Server.send((\"/a/,\" + super.npcShips.get(i).name + \",\" + String.format(Locale.US, \"%1$.3f\", super.npcShips.get(i).x) + \",\" + String.format(Locale.US, \"%1$.3f\", super.npcShips.get(i).y) + \",\" + String.format(Locale.US, \"%1$.3f\", super.npcShips.get(i).rotationRadians) + \",\" + asteroidNr + \",\").getBytes(), Server.serverClientsList.get(ii).address, Server.serverClientsList.get(ii).port);\r\n } else {\r\n int moving = (super.npcShips.get(i).moving) ? 1 : 0;\r\n int turbo = (super.npcShips.get(i).turbo) ? 1 : 0;\r\n Server.send((\"/s/,\" + super.npcShips.get(i).name + \",\" + String.format(Locale.US, \"%1$.3f\", super.npcShips.get(i).x)\r\n + \",\" + String.format(Locale.US, \"%1$.3f\", super.npcShips.get(i).y)\r\n + \",\" + String.format(Locale.US, \"%1$.3f\", super.npcShips.get(i).rotationRadians)\r\n + \",\" + moving + \",\" + super.npcShips.get(i).engineLevel + \",\" + super.npcShips.get(i).gunLevel\r\n + \",\" + super.npcShips.get(i).gunCount + \",\" + super.npcShips.get(i).constitution + \",\" + turbo\r\n + \",\" + String.format(Locale.US, \"%1$.3f\", super.npcShips.get(i).curHP) + \",\" + (int)super.npcShips.get(i).owner.getPointerForGunsX() + \",\" + (int)super.npcShips.get(i).owner.getPointerForGunsY() + \",\").getBytes(), Server.serverClientsList.get(ii).address, Server.serverClientsList.get(ii).port);\r\n }\r\n }\r\n }\r\n if (super.npcShips.get(i).curHP <= 0) {\r\n if (npcShips.get(i).owner instanceof ClientPlayer) {\r\n tiles[super.npcShips.get(i).currentTile].ships.remove(super.npcShips.get(i));\r\n ClientPlayer owner = (ClientPlayer)super.npcShips.get(i).owner;\r\n BasicShip ship = new BasicShip(this, super.npcShips.get(i).owner);\r\n owner.ship = ship;\r\n ship.name = super.npcShips.get(i).name;\r\n if (Server.serverClients.get(ship.name) == null) {\r\n super.npcShips.remove(super.npcShips.get(i));\r\n super.npcShipsByName.remove(ship.name);\r\n i--;\r\n continue;\r\n }\r\n Server.serverClients.get(ship.name).pilot = owner;\r\n super.npcShips.remove(super.npcShips.get(i));\r\n super.npcShips.add(ship);\r\n super.npcShipsByName.remove(ship.name);\r\n super.npcShipsByName.put(ship.name, ship);\r\n i--;\r\n continue;\r\n }\r\n tiles[super.npcShips.get(i).currentTile].ships.remove(super.npcShips.get(i));\r\n npcShips.remove(super.npcShips.get(i));\r\n i--;\r\n }\r\n }\r\n\r\n //update every projectile, if removed then remove\r\n for (int i = 0; i < super.projectiles.size(); i++){\r\n super.projectiles.get(i).update();\r\n //Server.sendToAll(\"/p/,\" + super.projectiles.get(i).x + \",\" + super.projectiles.get(i).y + \",\" + super.projectiles.get(i));\r\n if (super.projectiles.get(i).removed) {\r\n super.projectiles.remove(i);\r\n i--;\r\n }\r\n }\r\n\r\n }",
"void addPeerEndpoint(PeerEndpoint peer);",
"private void addVerticesToGraph()\n\t{\n\t\tString vertexName;\n\n\t\tMap<Long, IOFSwitch> switches = this.floodlightProvider.getSwitches();\n\t\tfor(IOFSwitch s :switches.values())\n\t\t{\n\t\t\tvertexName =Long.toString(s.getId());\n\t\t\tm_graph.addVertex(vertexName);\t\t\t \t\t\t \n\t\t}\n\t\tSystem.out.println(m_graph);\n\t}",
"public void add(AddrBean ad) {\n\t\taddrlist.add(ad);\n\t}",
"boolean addPortMapping(PortMappingInfo portMappingInfo) throws NotDiscoverUpnpGatewayException, UpnpException;",
"private boolean isSpaceOnBoardAvailable(Integer newPassengers){\n\t\t\n\t\treturn newPassengers + this.numberOnBoard <= this.numberOfSeats;\n\t}",
"private void teletransportar(Personaje p, Celda destino) {\n // TODO implement here\n }"
] |
[
"0.6479862",
"0.6364688",
"0.6066931",
"0.6051686",
"0.599072",
"0.5966306",
"0.5870015",
"0.56873846",
"0.5483131",
"0.5466287",
"0.54479176",
"0.5402649",
"0.5389245",
"0.5322392",
"0.53141356",
"0.52896607",
"0.5283065",
"0.5267363",
"0.5266804",
"0.52641594",
"0.5225381",
"0.521467",
"0.5202944",
"0.5198871",
"0.5196835",
"0.51905584",
"0.51803386",
"0.51770604",
"0.5165844",
"0.51446664",
"0.5130065",
"0.5128602",
"0.5118716",
"0.5115269",
"0.51135874",
"0.51108134",
"0.510573",
"0.51056975",
"0.5103879",
"0.50953925",
"0.5094869",
"0.5089135",
"0.50804394",
"0.5079828",
"0.50641805",
"0.5055007",
"0.50532126",
"0.5028178",
"0.50265443",
"0.502088",
"0.50152236",
"0.5003984",
"0.4998917",
"0.49811387",
"0.49606416",
"0.49572822",
"0.49568582",
"0.49534413",
"0.49487188",
"0.49353927",
"0.49268138",
"0.49233338",
"0.4920926",
"0.4920899",
"0.49188718",
"0.49172434",
"0.49160564",
"0.49139675",
"0.4906499",
"0.4905864",
"0.48958963",
"0.4895773",
"0.48896804",
"0.48872536",
"0.48781246",
"0.48632774",
"0.48581868",
"0.48581398",
"0.48577997",
"0.48511502",
"0.48498318",
"0.48466495",
"0.4845485",
"0.4843476",
"0.48310816",
"0.48305535",
"0.48279235",
"0.48276803",
"0.48269367",
"0.48191276",
"0.4816501",
"0.48162666",
"0.4816207",
"0.48035318",
"0.48008582",
"0.47998464",
"0.4792591",
"0.47925335",
"0.47893712",
"0.47813436"
] |
0.67817396
|
0
|
adds cargoship to port and everything list
|
public void addCargoShip(Scanner sc){
CargoShip cShip = new CargoShip(sc, portMap, shipMap, dockMap);
if(hashMap.containsKey(cShip.getParent())){
if(hashMap.get(cShip.getParent()).getIndex()>=10000 && hashMap.get(cShip.getParent()).getIndex() < 20000){
currentPort = (SeaPort) hashMap.get(cShip.getParent());
currentPort.setShips(cShip);
currentPort.setAllShips(cShip);
}
else{
currentDock = (Dock) hashMap.get(cShip.getParent());
currentDock.addShip(cShip);
currentPort = (SeaPort) hashMap.get(currentDock.getParent());
currentPort.setAllShips(cShip);
}
}
hashMap.put(cShip.getIndex(), cShip);
shipMap.put(cShip.getIndex(), cShip);
everything.add(cShip);
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public void addPorts(){\n\t\t\n\t}",
"public void addPort(Scanner sc){\n currentPort = new SeaPort(sc);\n ports.add(currentPort);\n hashMap.put(currentPort.getIndex(), currentPort);\n portMap.put(currentPort.getIndex(), currentPort);\n everything.add(currentPort);\n \n }",
"public chatd(String ports, int port)\r\n {\r\n this.portNumb = port;\r\n\r\n\r\n clientList = new ArrayList<ClientProcess>();\r\n }",
"public void connectClusters()\n\t{\n//\t\tfor(int i = 0; i<edges.size();i++)\n//\t\t{\n//\t\t\tEdgeElement edge = edges.get(i);\n//\t\t\tString fromNodeID = edge.fromNodeID;\n//\t\t\tNodeElement fromNode = findSubNode(fromNodeID);\n//\t\t\tString toNodeID = edge.toNodeID;\n//\t\t\tNodeElement toNode = findSubNode(toNodeID); \n//\t\t\t\n//\t\t\tif(fromNode != null && toNode != null)\n//\t\t\t{\n//\t\t\t\tPortInfo oport = new PortInfo(edge, fromNode);\n//\t\t\t\tfromNode.addOutgoingPort(oport);\n//\t\t\t\tedge.addIncomingPort(oport);\n//\t\t\t\tPortInfo iport = new PortInfo(edge, toNode);\n//\t\t\t\ttoNode.addIncomingPort(iport);\n//\t\t\t\tedge.addOutgoingPort(iport);\n//\t\t\t}\n//\t\t}\n\t}",
"public void addHost(String host, int port) {\r\n\t\tlistHostPort.add(new DNSHostPort(host, port));\r\n\t}",
"void addHost(Service newHost);",
"void port(int port);",
"void port(int port);",
"private void connectToTheGameServer(String addPort) {\n\t\tString[] add = addPort.split(\":\");\n\t\tString address = add[0];\n\t\tString port = add[1];\n\t\tInetAddress intaddr;\n\t\tSystem.out.println(\"connectToTheGameServer: @:\" + address + \", port:\" + port);\n\n\t\ttry {\n\t\t\tif(address.equals(\"127.0.0.1\")){\n\t\t\t\tintaddr = socket.getInetAddress();\n\t\t\t}else{\n\t\t\t\tintaddr = InetAddress.getByName(address);\n\t\t\t}\n\t\t\tthis.gameServerSocket = new Socket(intaddr, Integer.valueOf(port));\n\t\t\tSystem.out.println(\"connectToTheGameServer: connected\");\n\t\t\tClient.myState = Client.Current_state.client_client;\n\t\t\tClient.myRole = current_role.client;\n\t\t\tClient.myPlatforme = new Platforme();\n\t\t\tClient.sendMessagesToServer(Client.ok, osServ);\n\t\t\tClient.myPlatforme.show();\n\t\t\tif (Client.myPlatforme == null) {\n\t\t\t\tSystem.out.println(\"ici null\");\n\t\t\t}\n\t\t\tstartClientClientListener(gameServerSocket, false);\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"client message: \" + e.getMessage().toString());\n\t\t}\n\t}",
"private void initPortSettings() {\n\n\t\tList<PortSpecification> portSpecification = XMLConfigUtil.INSTANCE.getComponent(componentName)\n\t\t\t\t.getPort().getPortSpecification();\n\n\t\tportDetails = new ArrayList<PortDetails>();\n\t\tports = new HashMap<String, Port>();\n\t\tPortTypeEnum pEnum = null;\n\t\tPortAlignmentEnum pAlignEnum = null;\n\n\t\tfor (PortSpecification p : portSpecification) {\n\t\t\tpAlignEnum = PortAlignmentEnum.fromValue(p.getPortAlignment().value());\n\t\t\tsetPortCount(pAlignEnum, p.getNumberOfPorts(), p.isChangePortCountDynamically());\n\t\t\tfor(PortInfo portInfo :p.getPort()){\n\t\t\t\tString portTerminal = portInfo.getPortTerminal();\n\t\t\t\tpEnum = PortTypeEnum.fromValue(portInfo.getTypeOfPort().value());\n\t\t\t\t\n\t\t\t\tPort port = new Port(portInfo.getLabelOfPort(),\n\t\t\t\t\t\tportTerminal, this, getNumberOfPortsForAlignment(pAlignEnum), pEnum\n\t\t\t\t\t\t\t\t, portInfo.getSequenceOfPort(), p.isAllowMultipleLinks(), p.isLinkMandatory(), pAlignEnum);\n\t\t\t\tlogger.trace(\"Adding portTerminal {}\", portTerminal);\n\t\t\t\t\n\t\t\t\tports.put(portTerminal, port);\n\t\t\t}\n\t\t\tPortDetails pd = new PortDetails(ports, pAlignEnum, p.getNumberOfPorts(), p.isChangePortCountDynamically(), p.isAllowMultipleLinks(), p.isLinkMandatory());\n\t\t\tportDetails.add(pd);\n\t\t}\n\t\t\n\t}",
"private void setupconfigIpCPoints() {\n for (int i = 1; i <= 3; i++) {\n ConnectPoint connectPoint = new ConnectPoint(\n getDeviceId(i),\n PortNumber.portNumber(1));\n configIpCPoints.add(connectPoint);\n }\n }",
"public void completeInputPortSettings(int newPortCount) {\n changeInPortCount(newPortCount);\n\t\tfor (int i = 0; i < (newPortCount); i++) {\n\t\t\tPort inPort = new Port(Constants.INPUT_SOCKET_TYPE + (i), Constants.INPUT_SOCKET_TYPE\n\t\t\t\t\t+ (i), this, newPortCount, PortTypeEnum.IN, (i), isAllowMultipleLinksForPort(\"in0\"), \n\t\t\t\t\tisLinkMandatoryForPort(\"in0\"), PortAlignmentEnum.LEFT);\n\t\t\tports.put(Constants.INPUT_SOCKET_TYPE + (i), inPort);\n\t\t\tfirePropertyChange(\"Component:add\", null, inPort);\n\t\t}\n\t}",
"private void connectToCS(int port, String host)throws Exception{\n socket = new Socket(host, port);\n inStream = new PDUInputStream(socket.getInputStream());\n outStream = new PDUOutputStream(socket.getOutputStream());\n\n PduJoin join = new PduJoin(nickName);\n outStream.writeToServer(join.getByteArray());\n\n chatCS();\n }",
"public static void setPort(int port){\n catalogue.port = port;\n }",
"protected void configurePorts() {\n\t\tremoveInputs();\n\t\tremoveOutputs();\n\n\t\t// FIXME: Replace with your input and output port definitions\n\n\t\t// Hard coded input port, expecting a single String\n\t\t//File name for the Input tables\n\t\taddInput(FIRST_INPUT, 0, true, null, String.class);\n\n\t\t\t\t\n\t\t// Single value output port (depth 0)\n\t\taddOutput(OUT_STD_OUTPUT, 0);\n\t\t// Single value output port (depth 0)\n\t\taddOutput(OUT_ERROR, 0);\n\t\taddOutput(VO_TABLE, 0);\n\n\t}",
"@Override\n\tpublic void onSocketAdded(ISocketInstance childSocket) {\n\t\t\n\t}",
"@Override\n\tpublic void addRentPort(RentPort rentPort) {\n\n\t}",
"public List<Port> getPorts(ISchemaInfo info);",
"public void addServers(int portmin,int portmax){\n BufferedReader inloc;\n PrintWriter outloc;\n Socket SSocket;\n for (int portcourant = portmin; portcourant < portmax; portcourant++) {\n try {\n System.out.print(\"Attempt to connect to server at port \");\n System.out.println(portcourant);\n SSocket = new Socket(\"127.0.0.1\", portcourant);\n System.out.print(\"Done...\");\n //flux pour envoyer\n outloc = new PrintWriter(SSocket.getOutputStream());\n tabServerssout.add(outloc);\n //flux pour recevoir\n inloc = new BufferedReader(new InputStreamReader(SSocket.getInputStream()));\n tabServerssin.add(inloc);\n }catch(IOException e){\n e.printStackTrace();\n }\n }\n }",
"private void storeHostAddresses() {\n savedHostAddresses.clear();\n /* port */\n savedPort = portComboBox.getStringValue();\n /* addresses */\n for (final Host host : getBrowser().getClusterHosts()) {\n final GuiComboBox cb = addressComboBoxHash.get(host);\n final String address = cb.getStringValue();\n if (address == null || \"\".equals(address)) {\n savedHostAddresses.remove(host);\n } else {\n savedHostAddresses.put(host, address);\n }\n host.getBrowser().getDrbdVIPortList().add(savedPort);\n }\n }",
"private void establishConnection() {\n\n try {\n\n for(Clone clone:this.clones){\n ClearConnection connection = new ClearConnection();\n connection.connect(clone.getIp(), clone.getOffloadingPort(), 5 * 1000);\n this.connections.add(connection);\n }\n\n this.protocol = new ERAMProtocol();\n this.ode = new ERAMode();\n\n } catch (Exception e) {\n Log.e(TAG,\"Connection setup with the Remote Server failed - \" + e);\n }\n }",
"Port createPort();",
"Port createPort();",
"public void port (int port) {\n this.port = port;\n }",
"List<ChannelDefine> getChannelDefine(String ip);",
"Builder port(int port);",
"public PortInfoListener(App app){\r\n super(app);\r\n }",
"public void addNameServerPort(String nsp) {\n\t\tif (nsp != null)\n\t\t// check to see if item is already in list\n\t\tif (_nameserverPorts.indexOf(nsp) < 0)\n\t\t\t_nameserverPorts.add(nsp);\n\t}",
"protected void configurePorts() {\n \t\tremoveInputs();\n \t\tremoveOutputs();\n \n \t\t// FIXME: Replace with your input and output port definitions\n \n \t\t// Hard coded input port, expecting a single String\n \t\t//File name for the Input tables\n \t\taddInput(IN_FIRST_INPUT_TABLE, 0, true, null, String.class);\n \t\taddInput(IN_FORMAT_INPUT_TABLE, 0, true, null, String.class);\n \t\taddInput(IN_FORMAT_OUTPUT_TABLE, 0, true, null, String.class);\n \t\taddInput(IN_FILTER, 0, true, null, String.class);\n \t\t\n \t\t\n \t\tif(configBean.getTypeOfInput().compareTo(\"File\")==0){\n \t\t\taddInput(IN_OUTPUT_TABLE_NAME, 0, true, null, String.class);\n \t\t}\n \t\t\n \n \t\t// Optional ports depending on configuration\n \t\t//if (configBean.getExampleString().equals(\"specialCase\")) {\n \t\t//\t// depth 1, ie. list of binary byte[] arrays\n \t\t//\taddInput(IN_EXTRA_DATA, 1, true, null, byte[].class);\n \t\t//\taddOutput(OUT_REPORT, 0);\n \t\t//}\n \t\t\n \t\t// Single value output port (depth 0)\n \t\taddOutput(OUT_SIMPLE_OUTPUT, 0);\n \t\t// Single value output port (depth 0)\n \t\taddOutput(OUT_REPORT, 0);\n \n \t}",
"public void setPort(int port);",
"public void setPort(int port);",
"public void addPortNumber() throws JNCException {\n setLeafValue(Epc.NAMESPACE,\n \"port-number\",\n null,\n childrenNames());\n }",
"public static void main(String[] args) {\n\t\tint[][] ports = {{2001, 0, 2002, 2003, 0},\r\n\t\t\t\t\t\t {2002, 2001, 2004, 2005, 2010},\r\n\t\t\t\t\t\t {2003, 2001, 2006, 2017, 2018},\r\n\t\t\t\t\t\t {2004, 2002, 2011, 2012, 0},\r\n\t\t\t\t\t\t {2005, 2002, 2013, 2014, 0},\r\n\t\t\t\t\t\t {2006, 2003, 2015, 2016, 0},\r\n\t\t\t\t\t\t {2010, 2002, 0, 0, 0},\r\n\t\t\t\t\t\t {2011, 2004, 0, 0, 0},\r\n\t\t\t\t\t\t {2012, 2004, 0, 0, 0},\r\n\t\t\t\t\t\t {2013, 2005, 0, 0, 0},\r\n\t\t\t\t\t\t {2014, 2005, 0, 0, 0},\r\n\t\t\t\t\t\t {2015, 2006, 0, 0, 0},\r\n\t\t\t\t\t\t {2016, 2006, 0, 0, 0},\r\n\t\t\t\t\t\t {2017, 2003, 0, 0, 0},\r\n\t\t\t\t\t\t {2018, 2003, 0, 0, 0}};\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tint portForBrokers = 2001;\t//Keep track of current next available port number for Broker\r\n\t\tint portForClients = 2010;\t//Keep track of current next available port number for Client\r\n\t\tfinal int portOfSuperBroker = 2000; //The port number for the Super Broker\r\n\t\tint currentPortForBroker=portForBrokers;\r\n\t\tint currentPortForClient=portForClients;\r\n\t\tString inputLine;\r\n\t\t\r\n\t\ttry (ServerSocket serverSocket = new ServerSocket(portOfSuperBroker)){ //initialize the ServerSocket\r\n\t\t\twhile (true){\r\n\t\t\t\t//Create a new connection with either a Broker or a Client\r\n\t\t\t\tSocket clientSocket = serverSocket.accept();\r\n\t\t\t\t\r\n\t\t\t\tPrintWriter out = new PrintWriter(clientSocket.getOutputStream(), true);\r\n\t BufferedReader in = new BufferedReader(new InputStreamReader(clientSocket.getInputStream()));\r\n\t\t\t\t\r\n\t inputLine = in.readLine();\r\n\t \r\n\t int childIndex = 2;\t// The childIndex starts from 2 according to the structure table\r\n\t while (!inputLine.equals(\"I'm done.\")){\r\n\t \tif (inputLine.equals(\"I'm a Broker. What is my port?\")){\r\n\t \t\t//Check if the port number for Broker beyond its range\r\n\t \t\tif (portForBrokers > 2006){\r\n\t\t\t\t\t\t\tSystem.err.println(\"SuperBroker: There's no more port availble for Broker!\");\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}\r\n\t \t\tout.println(portForBrokers);\r\n\t\t\t\t\t\tcurrentPortForBroker=portForBrokers;\r\n\t \t\tportForBrokers++;\r\n\t\t\t\t\t\tchildIndex=2;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if (inputLine.equals(\"I'm a Broker. What is my parent's port?\")){\r\n\t\t\t\t\t\t//To find the corresponding entry in the structure table\r\n\t\t\t\t\t\tfor (int i=0; i<15; i++){\r\n\t\t\t\t\t\t\tif (ports[i][0] == (currentPortForBroker)){\r\n\t\t\t\t\t\t\t\tout.println(ports[i][1]);\r\n\t\t\t\t\t\t\t\tbreak;\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\telse if (inputLine.equals(\"I'm a Broker. What is my child's port?\")){\r\n\t\t\t\t\t\t//To find the corresponding entry in the structure table\r\n\t\t\t\t\t\tfor (int i=0; i<15; i++){\r\n\t\t\t\t\t\t\tif (ports[i][0] == (currentPortForBroker)){\r\n\t\t\t\t\t\t\t\tif (ports[i][childIndex] != 0){\r\n\t\t\t\t\t\t\t\t\tif (childIndex > 4){\r\n\t\t\t\t\t\t\t\t\t\tSystem.err.println(\"SuperBroker: There's no more children for this broker!\");\r\n\t\t\t\t\t\t\t\t\t\tSystem.exit(1);\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\tout.println(ports[i][childIndex]);\r\n\t\t\t\t\t\t\t\t\tchildIndex++;\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\telse{\r\n\t\t\t\t\t\t\t\t\tout.println(\"0\");\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}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if (inputLine.equals(\"I'm a Client. What is my port?\")){\r\n\t\t\t\t\t\t//Check if the port number of Client beyond its range\r\n\t\t\t\t\t\tif (portForClients > 2018){\r\n\t\t\t\t\t\t\tSystem.err.println(\"SuperBroker: There's no more port availble for Client!\");\r\n\t\t\t\t\t\t\tSystem.exit(1);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tout.println(portForClients);\r\n\t\t\t\t\t\tcurrentPortForClient=portForClients;\r\n\t\t\t\t\t\tportForClients++;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if (inputLine.equals(\"I'm a Client. What is my broker's port?\")){\r\n\t\t\t\t\t\t//To find the corresponding entry in the structure table\r\n\t\t\t\t\t\tfor (int i=0; i<15; i++){\r\n\t\t\t\t\t\t\tif (ports[i][0] == (currentPortForClient)){\r\n\t\t\t\t\t\t\t\tout.println(ports[i][1]);\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else break;\r\n\t \tinputLine = in.readLine();\r\n\t }\r\n\t \r\n\t out.close();\r\n\t in.close();\r\n\t\t\t\tclientSocket.close();\r\n\t\t\t}\r\n\t\t} catch (IOException e) {\r\n\t\t\tSystem.out.println(\"I/O Exception caught at SuperBroker. System will shut down now.\");\r\n\t\t\tSystem.exit(0);\r\n\t\t}\r\n\t\t\r\n\t}",
"private void connectToNS(int port, String host)throws Exception{\n boolean gotSList = false;\n socket = new Socket(host, port);\n outStream = new PDUOutputStream(socket.getOutputStream());\n inStream = new PDUInputStream(socket.getInputStream());\n\n PduGetList getList = new PduGetList();\n outStream.writeToServer(getList.getByteArray());\n\n while(!gotSList) {\n if (!inStream.streamIsEmpty()) {\n Pdu inPDU = inStream.readPdu();\n socket.close();\n inPDU.print();\n gotSList = true;\n }\n }\n\n Scanner s = new Scanner(System.in);\n System.out.println(\"ip-address: \");\n host = s.nextLine();\n checkInput(host);\n System.out.println(\"Port: \");\n port = s.nextInt();\n checkInput(String.valueOf(port));\n\n connectToCS(port, host);\n }",
"public PeerBuilder ports(int port) {\n\t\tthis.udpPort = port;\n\t\tthis.tcpPort = port;\n\t\treturn this;\n\t}",
"public void addNode(String ip, int port) throws UnknownHostException {\t\r\n\t\tNodeRef ref = new NodeRef(ip, port); // create data node reference\r\n\t\tnodeMap.put(ref.getIp().getHostAddress(), ref);\r\n\t}",
"public PeerBuilder portsExternal(int port) {\n\t\tthis.udpPortForwarding = port;\n\t\tthis.tcpPortForwarding = port;\n\t\treturn this;\n\t}",
"void onConnectToNetByIPSucces();",
"public boolean addPort(Pt port) {\n if(ports.add(port)){\n //Se port existe, atribui este como seu parente\n if(port != null)\n port.setParent(this);\n\n notifyInserted(NCLElementSets.PORTS, port);\n return true;\n }\n return false;\n }",
"@Override\n public void completed(AsynchronousSocketChannel sockChannel, AsynchronousServerSocketChannel serverSock ) {\n serverSock.accept( serverSock, this );\n\n try{\n //Print IP Address\n System.out.println( sockChannel.getLocalAddress().toString());\n\n //Add To Client List\n list.add(list.size(), sockChannel);\n\n }catch(IOException e) {\n e.printStackTrace();\n }\n\n //start to read message from the client\n startRead( sockChannel );\n \n }",
"public boolean addPort(PortData port) {\n log.debug(\"Adding port {}\", port);\n\n KVPort rcPort = new KVPort(port.getDpid(), port.getPortNumber());\n rcPort.setStatus(KVPort.STATUS.ACTIVE);\n rcPort.forceCreate();\n // TODO add description into KVPort\n //rcPort.setDescription(port.getDescription());\n\n return true;\n }",
"public void searchPorts() {\r\n try {\r\n Enumeration pList = CommPortIdentifier.getPortIdentifiers();\r\n System.out.println(\"Porta =: \" + pList.hasMoreElements());\r\n while (pList.hasMoreElements()) {\r\n portas = (CommPortIdentifier) pList.nextElement();\r\n if (portas.getPortType() == CommPortIdentifier.PORT_SERIAL) {\r\n System.out.println(\"Serial USB Port: \" + portas.getName());\r\n } else if (portas.getPortType() == CommPortIdentifier.PORT_PARALLEL) {\r\n System.out.println(\"Parallel Port: \" + portas.getName());\r\n } else {\r\n System.out.println(\"Unknown Port: \" + portas.getName());\r\n }\r\n portaCOM = portas.getName();\r\n }\r\n System.out.println(\"Porta escolhida =\" + portaCOM);\r\n } catch (Exception e) {\r\n System.out.println(\"*****Erro ao escolher a porta******\");\r\n }\r\n }",
"private void updateConnectionsList() {\n ConnectionsWrapper connections = new ConnectionsWrapper();\n connections.setConnectionList(new ArrayList<>(connectionMap.values()));\n XMLFileManager.saveXML(\"connections.xml\", connections, ConnectionsWrapper.class);\n }",
"public void createChannel(String ipAddress, int port) throws IOException {\n while (true) {\n SocketChannel socketChannel = null;\n try {\n socketChannel = SocketChannel.open();\n// socketChannel.configureBlocking(false);\n SocketAddress socketAddress = new InetSocketAddress(ipAddress, port);\n System.out.println(port);\n socketChannel.connect(socketAddress);\n if (socketChannel.isConnected()){\n port++;\n }\n System.out.println(\"Connected.\");\n sendFile(socketChannel);\n socketChannel.close();\n socketChannel.finishConnect();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }",
"@Override\n public void startUp(FloodlightModuleContext context)\n throws FloodlightModuleException {\n floodlightProvider = context\n .getServiceImpl(IFloodlightProviderService.class);\n\n floodlightProvider.addOFMessageListener(OFType.PACKET_IN, this);\n\n BufferedReader reader;\n try\n {\n //read in internal ip addresses\n reader = new BufferedReader(new FileReader(new File(this.insideIPsFile)));\n String temp = null;\n while ((temp = reader.readLine()) != null)\n {\n if( !temp.startsWith(\"//\") ){\n inside_ip.add(IPv4Address.of(temp));\n // System.out.println (IPv4Address.of(temp));\n }\n }\n reader.close();\n\n //read in externally visible ip addresses\n reader = new BufferedReader(new FileReader(new File(this.externalIPFile)));\n temp = null;\n while ((temp = reader.readLine()) != null)\n {\n if( !temp.startsWith(\"//\") ){\n external_ip = IPv4Address.of(temp);\n break;\n }\n }\n reader.close();\n\n //read in NAT switch id, inside ports, outside ports\n reader = new BufferedReader(new FileReader(new File(this.natInfoFile)));\n temp = null;\n while ((temp = reader.readLine()) != null)\n {\n if( !temp.startsWith(\"//\") ){\n String[] nat_info = temp.split( \",\" );\n\n nat_swId = DatapathId.of(Long.valueOf( nat_info[0] ));\n\n for( String internal_port: nat_info[1].trim().split(\" \") ){\n nat_internal_ports.add( TransportPort.of( Integer.parseInt(internal_port)) );\n }\n\n for( String external_port: nat_info[2].trim().split(\" \") ){\n nat_external_ports.add( TransportPort.of( Integer.parseInt(external_port)) );\n }\n break;\n }\n }\n reader.close();\n\n } catch (IOException e)\n {\n e.printStackTrace();\n }\n\n\n }",
"@Override\n\tpublic void connect() {\n\t\t\n\t}",
"@Override\n\tpublic void connect() {\n\t\t\n\t}",
"public void connect() { \t\n \tbindService(IChatService.class, apiConnection);\n }",
"@Override\n\t\tpublic int buildBasicPort() {\n\t\t\treturn buildPort();\n\t\t}",
"public ChronicleChannelCfg<C> addHostnamePort(String hostname, int port) {\n hostports.add(new HostPortCfg(hostname, port));\n return this;\n }",
"@Override\n List<PortDescription> discoverPortDetails();",
"public static void CreateClient(int port, String ip, String inname, String incolor){\n Client charlie = new Client(port, ip);\n charlie.clientName = inname;\n charlie.outhexColor = incolor; \n //charlie.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n charlie.startRunning(port);\n }",
"public interface Port extends HexagonalElement {}",
"Set<Interface> getInterfacesByPort(ConnectPoint port);",
"private static void selectCordinator() throws NumberFormatException, UnknownHostException, IOException {\n\t\t// TODO Auto-generated method stub\n\t\tRandom randomGen = new Random();\n\t\tSystem.out.println(\"Size: \"+allReplicaAddrs.size());\n\t\tint index = randomGen.nextInt(allReplicaAddrs.size());\n\t\tString arrayItem = allReplicaAddrs.get(index);\n\t\tString[] ipPort = arrayItem.split(\" \");\n\t\tcoordIp = ipPort[0];\n\t\tcoordPort = Integer.parseInt(ipPort[1]);\n\t\t//socket = new Socket(coordIp,coordPort);\n\t}",
"public BorrowMyStuffServer(int port) throws IOException {\n\t\t// model = new MessageModel();\n\t\tserverSocket = new ServerSocket(port);\n\t\tserverSocket.setSoTimeout(500000);\n\t\t// users = new ArrayList<>();\n\t}",
"public void addSrvPort() throws JNCException {\n setLeafValue(Epc.NAMESPACE,\n \"srv-port\",\n null,\n childrenNames());\n }",
"void EnableRemote (int boardID, short[] addrlist);",
"protected void addIcpPortPropertyDescriptor(Object object) {\n\t\titemPropertyDescriptors\n\t\t\t\t.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(),\n\t\t\t\t\t\tgetResourceLocator(), getString(\"_UI_WebsphereServerTask_icpPort_feature\"),\n\t\t\t\t\t\tgetString(\"_UI_PropertyDescriptor_description\", \"_UI_WebsphereServerTask_icpPort_feature\",\n\t\t\t\t\t\t\t\t\"_UI_WebsphereServerTask_type\"),\n\t\t\t\t\t\tServerPackage.Literals.WEBSPHERE_SERVER_TASK__ICP_PORT, true, false, false,\n\t\t\t\t\t\tItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null));\n\t}",
"public void launch(int port) {\n try {\n Registry registry = LocateRegistry.createRegistry( port );\n\n EchoService service = new ReversedEchoServiceImpl();\n EchoService stub = (EchoService) UnicastRemoteObject.exportObject(service, 0);\n\n registry.bind(\"com.anotheria.strel.rmi.EchoService\", stub);\n\n log.info(String.format(\"Service is now accessible on port %d with name com.anotheria.strel.rmi.EchoService\", port));\n }\n catch (RemoteException ex) {\n log.fatal(\"Remote Exception: \" + ex.getMessage());\n }\n catch (AlreadyBoundException ex) {\n log.fatal(\"Echo service is already bound with given name: \" + ex.getMessage());\n }\n }",
"void addChannel(IChannel channel);",
"@Override\n public void addCondiments() {\n System.out.println(\"添加柠檬\");\n }",
"Builder setPort(String port);",
"void addPC(PCDevice pc);",
"private native static int shout_set_port(long shoutInstancePtr, int port);",
"void agregarConexion(String id, String direccion, String ip) {\n this.s.agregarConexion(id, direccion, ip);\n }",
"public Network() {\n\t\tnodes.put(\"192.168.0.0\", new NetNode(\"192.168.0.0\"));\n\t\tnodes.put(\"192.168.0.1\", new NetNode(\"192.168.0.1\"));\n\t\tnodes.put(\"192.168.0.2\", new NetNode(\"192.168.0.2\"));\n\t\tnodes.put(\"192.168.0.3\", new NetNode(\"192.168.0.3\"));\n\t\tnodes.put(\"192.168.0.4\", new NetNode(\"192.168.0.4\"));\n\t\t//manually entering ports\n\t\t//0 to 1 and 2\n\t\tnodes.get(\"192.168.0.0\").addPort(nodes.get(\"192.168.0.1\"));\n\t\tnodes.get(\"192.168.0.0\").addPort(nodes.get(\"192.168.0.2\"));\n\t\t//1 to 0 and 3\n\t\tnodes.get(\"192.168.0.1\").addPort(nodes.get(\"192.168.0.0\"));\n\t\tnodes.get(\"192.168.0.1\").addPort(nodes.get(\"192.168.0.3\"));\n\t\t//2 to 0 and 3 and 4\n\t\tnodes.get(\"192.168.0.2\").addPort(nodes.get(\"192.168.0.0\"));\n\t\tnodes.get(\"192.168.0.2\").addPort(nodes.get(\"192.168.0.3\"));\n\t\tnodes.get(\"192.168.0.2\").addPort(nodes.get(\"192.168.0.4\"));\n\t\t//3 to 1 and 2 and 4\n\t\tnodes.get(\"192.168.0.3\").addPort(nodes.get(\"192.168.0.1\"));\n\t\tnodes.get(\"192.168.0.3\").addPort(nodes.get(\"192.168.0.2\"));\n\t\tnodes.get(\"192.168.0.3\").addPort(nodes.get(\"192.168.0.4\"));\n\t\t//4 to 2 and 3\n\t\tnodes.get(\"192.168.0.4\").addPort(nodes.get(\"192.168.0.2\"));\n\t\tnodes.get(\"192.168.0.4\").addPort(nodes.get(\"192.168.0.3\"));\n\t}",
"public void testSetPort() {\n }",
"public void connectWarehouses(){\n//\t\tWarehouseInterface wh1 = new WareHouseImpl(\"wh1\");\n//\n//\t\tWarehouseInterface wh2 = new WareHouseImpl(\"wh2\");\n//\t\twarehouseList.add(wh1);\n//\t\twarehouseList.add(wh2);\n\t\t\n\t\tScanner in = new Scanner(System.in);\n\t\twhile(true){\n\t\t\tSystem.out.print(\"Please input the port number of the warehouse service to establish connection (q to finish):\");\n\t\t\t\n\t\t\tString port = in.nextLine();\n\t\t\tif(port.equals(\"q\")){\n\t\t\t\tbreak;\n\t\t\t}else{\n\t\t\t\tString urlStr = \"http://localhost:\" + port + \"/ws/warehouse?wsdl\";\n\t\t\t\ttry {\n\t\t\t\t\tURL url = new URL(urlStr);\n\t\t\t\t\tQName qname = new QName(\"http://warehouse/\", \"WarehouseImplService\");\n\t\t\t\t\tWarehouseInterface warehouse;\n\t\t\t\t\tService service = Service.create(url, qname);\n\t\t\t\t\twarehouse = service.getPort(WarehouseInterface.class);\n\t\t\t\t\tSystem.out.println(\"Obtained a handle on server object: \" + warehouse.getName());\n\t\t\t\t\twarehouseList.add(warehouse);\n\t\t\t\t}catch (MalformedURLException e1) {\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}catch (Exception e) {\n\t\t\t\t\t//System.out.println(\"Failed to access the WSDL at:\" + urlStr);\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t}\t\n\t\tin.close();\n\t}",
"public void addPassengerShip(Scanner sc){\n PassengerShip pShip = new PassengerShip(sc, portMap, shipMap, dockMap);\n if(hashMap.containsKey(pShip.getParent())){\n if(hashMap.get(pShip.getParent()).getIndex()>=10000 && hashMap.get(pShip.getParent()).getIndex() < 20000){\n currentPort = (SeaPort) hashMap.get(pShip.getParent());\n currentPort.setShips(pShip);\n currentPort.setAllShips(pShip);\n \n }\n else{\n currentDock = (Dock) hashMap.get(pShip.getParent());\n currentDock.addShip(pShip);\n currentPort = (SeaPort) hashMap.get(currentDock.getParent());\n currentPort.setAllShips(pShip);\n }\n \n \n }\n hashMap.put(pShip.getIndex(), pShip);\n shipMap.put(pShip.getIndex(), pShip);\n everything.add(pShip);\n }",
"public void connect() {}",
"ChordNode(String address, int port, String existingAddress, int existingPort) {\n this.address = address;\n this.port = port;\n this.existingAddress = existingAddress;\n this.existingPort = existingPort;\n\n SHA1Hasher sha1Hash = new SHA1Hasher(this.address + \":\" + this.port);\n this.id = sha1Hash.getLong();\n this.hex = sha1Hash.getHex();\n\n // Print statements\n System.out.println(\"Welcome to the Chord Network!\");\n System.out.println(\"You are running on IP: \" + this.address + \" and port: \" + this.port);\n System.out.println(\"Your ID: \" + this.getId());\n\n // initialize finger table and successor\n this.initializeFingerTable();\n this.initializeSuccessors();\n\n // Launch server thread that will listen to clients\n new Thread(new ChordServer(this)).start();\n\n this.printFingerTable();\n }",
"public ServeurGestion(int portClient){\r\n try {\r\n ecoute=new ServerSocket(portClient);\r\n appels=new Vector<>();\r\n } catch (IOException ex) {\r\n Logger.getLogger(ServeurGestion.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }",
"public void markSrvPortMerge() throws JNCException {\n markLeafMerge(\"srvPort\");\n }",
"private void addThread(SSLSocket socket)\n {\n if(pop < clist.length)\n {\n for(ServerThread srv : clist)\n {\n if(srv == null)\n {\n //make a new thread to run data through to new client\n srv = new ServerThread(this, socket);\n \n try\n {\n //start up the thread\n srv.open();\n start();\n \n //set everything up here (increment pop count, keep track of thread)\n clist[pop] = srv;\n pop++;\n break;\n }\n catch(IOException e)\n {\n System.out.println(\"Cannot open new thread\");\n }\n \n \n }\n \n }\n System.out.println(\"New Connection: \" + socket);\n\n }\n else\n {\n System.out.println(\"Sorry, server full at \" + pop);\n }\n }",
"public void addHostAddressListeners(final boolean wizard,\n final MyButton thisApplyButton) {\n final String[] params = getParametersFromXML();\n for (final Host host : getBrowser().getClusterHosts()) {\n GuiComboBox cb;\n GuiComboBox rcb;\n if (wizard) {\n cb = addressComboBoxHashWizard.get(host);\n rcb = addressComboBoxHash.get(host);\n } else {\n cb = addressComboBoxHash.get(host);\n rcb = null;\n }\n final GuiComboBox comboBox = cb;\n final GuiComboBox realComboBox = rcb;\n comboBox.addListeners(\n new ItemListener() {\n @Override public void itemStateChanged(final ItemEvent e) {\n if (e.getStateChange() == ItemEvent.SELECTED) {\n final Thread thread = new Thread(new Runnable() {\n @Override public void run() {\n if (e.getStateChange()\n == ItemEvent.SELECTED) {\n checkParameterFields(comboBox,\n realComboBox,\n null,\n null,\n thisApplyButton);\n }\n }\n });\n thread.start();\n }\n }\n },\n \n new DocumentListener() {\n private void check() {\n final Thread thread = new Thread(new Runnable() {\n @Override public void run() {\n checkParameterFields(comboBox,\n realComboBox,\n null,\n null,\n thisApplyButton);\n }\n });\n thread.start();\n }\n \n @Override public void insertUpdate(final DocumentEvent e) {\n check();\n }\n \n @Override public void removeUpdate(final DocumentEvent e) {\n check();\n }\n \n @Override public void changedUpdate(final DocumentEvent e) {\n check();\n }\n }\n );\n }\n GuiComboBox pcb;\n GuiComboBox prcb;\n if (wizard) {\n pcb = portComboBoxWizard;\n prcb = portComboBox;\n } else {\n pcb = portComboBox;\n prcb = null;\n }\n final GuiComboBox comboBox = pcb;\n final GuiComboBox realComboBox = prcb;\n pcb.addListeners(\n new ItemListener() {\n @Override public void itemStateChanged(final ItemEvent e) {\n if (e.getStateChange() == ItemEvent.SELECTED) {\n final Thread thread = new Thread(new Runnable() {\n @Override public void run() {\n if (e.getStateChange() == ItemEvent.SELECTED) {\n checkParameterFields(comboBox,\n realComboBox,\n null,\n null,\n thisApplyButton);\n }\n }\n });\n thread.start();\n }\n }\n },\n \n new DocumentListener() {\n private void check() {\n final Thread thread = new Thread(new Runnable() {\n @Override public void run() {\n checkParameterFields(comboBox,\n realComboBox,\n null,\n null,\n thisApplyButton);\n }\n });\n thread.start();\n }\n \n @Override public void insertUpdate(final DocumentEvent e) {\n check();\n }\n \n @Override public void removeUpdate(final DocumentEvent e) {\n check();\n }\n \n @Override public void changedUpdate(final DocumentEvent e) {\n check();\n }\n });\n }",
"public void addPort(WSDLPort port) {\r\n\t\tif (port == null) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tif (ports == null) {\r\n\t\t\tports = new LinkedMap();\r\n\t\t}\r\n\t\tports.put(port.getName(), port);\r\n\t\tport.setService(this);\r\n\t}",
"void open(String nameNport) {\n\tString[] token=nameNport.split(\":\");\n\tString host=token[0];\n\tint port=Integer.parseInt(token[1]);\n\tint proceedFlag=1;\n\tIterator<Socket> iterator=Connection.connections.iterator();\n\tif(host.equalsIgnoreCase(\"localhost\") || host.equals(\"127.0.0.1\"))\n\t\thost=simpella.infoSocket.getLocalAddress().getHostAddress();\n\tif((host.equalsIgnoreCase(simpella.infoSocket.getLocalAddress().getHostAddress())||host.equalsIgnoreCase(simpella.infoSocket.getLocalAddress().getCanonicalHostName()))&&(simpella.serverPortNo==port || simpella.downloadPortNo==port)){\n\t\tproceedFlag=0;\n\t\tSystem.out.println(\"Client: Self Connect not allowed\");\n\t\t}\n\twhile(iterator.hasNext() && proceedFlag==1)\n\t{\n\t\tSocket sock=(Socket)iterator.next();\n\t\t\n\t\tif((host.equalsIgnoreCase(sock.getInetAddress().getHostAddress()) || host.equalsIgnoreCase(sock.getInetAddress().getCanonicalHostName())) && port==sock.getPort()){\n\t\t\tproceedFlag=0; \n\t\t\tSystem.out.println(\"Client: Duplicate connection to same IP/port not allowed\");\n\t\t\tbreak;\n\t\t}\n\t\t\n\t}\n\tif(proceedFlag==1)\n\t\t{\n\t\n\t\n\tbyte type=04;\n\tMessage msg=new Message(type);\n\ttry {\n\t\tConnection.outgoingConnPackRecv[noOfConn]=0;\n\t\tConnection.outgoingConnPackSent[noOfConn]=0;\n\t\tConnection.outgoingConnPackSentSize[noOfConn]=0;\n\t\tConnection.outgoingConnPackRecvSize[noOfConn]=0;\n\t\t\n\t\tclientSideSocket[noOfConn]=new Socket(host,port);\n\t\tSystem.out.println(\"Client:TCP Connection established...Begin handshake\");\n\t\toutToServer[noOfConn]=new ObjectOutputStream(clientSideSocket[noOfConn].getOutputStream());\n\t\tinFromServer[noOfConn]=new ObjectInputStream(clientSideSocket[noOfConn].getInputStream());\n\t\tString strToServer=\"SIMPELLA CONNECT/0.6\\r\\n\";\n\t\tbyte[] byteArray= strToServer.getBytes(\"UTF-16LE\");\n\t\tmsg.setPayload(byteArray);\n \t\n\t\tSystem.out.println(\"Client:\"+new String(byteArray));\n\t\t//outToServer.writeUTF(\"SIMPELLA CONNECT/0.6\\r\\n\");\n\t\tConnection.outgoingConnPackSent[noOfConn]++;\n\t\tConnection.outgoingConnPackSentSize[noOfConn]+=byteArray.length+23;\n\t\toutToServer[noOfConn].writeObject((Object)msg);\n\t\tConnection.outgoingConnPackRecv[noOfConn]++;\n\t\t\n\t\tMessage msg1=(Message) inFromServer[noOfConn].readObject();\n\t\tbyte[] fromServer=msg1.getPayload();\n\t\tConnection.outgoingConnPackRecvSize[noOfConn]+=fromServer.length+23;\n\t\tString strFromServer=new String(fromServer);\n\t\tSystem.out.println(\"Server:\"+strFromServer);\n\t\tif(msg1.getMessage_type()==05)\n\t\t\t{\n\t\t\tstrToServer=\"SIMPELLA/0.6 200 thank you for accepting me\\r\\n\";\n\t\t\tbyte[] byteArray1= strToServer.getBytes(\"UTF-16LE\");\n\t\t\tMessage m=new Message((byte)05);\n\t\t\tm.setPayload(byteArray1);\n\t\t\tConnection.outgoingConnPackSent[noOfConn]++;\n\t\t\tConnection.outgoingConnPackSentSize[noOfConn]+=byteArray1.length+23;\n\t\t\toutToServer[noOfConn].writeObject((Object)m);\n\t\t\t\n\t\t\tConnection.connections.add(clientSideSocket[client.noOfConn]);\n\t\t\tConnection.outgoingConnection[client.noOfConn]=clientSideSocket[client.noOfConn];\n\t\t\tConnection.clientOutStream[client.noOfConn]=outToServer[client.noOfConn];\n\t\t\tnew clientSocketListen(clientSideSocket[noOfConn],outToServer[noOfConn],inFromServer[noOfConn]);\n\t\t\tupdate();\n\t\t\tnoOfConn++;\n\t\t\t//System.out.println(\"Client:num of conn=\"+noOfConn);\n\t\t\t}\n\t\telse\n\t\t\t{\n\t\t\t\tSystem.out.println(\"<open>:Cannot open connection to \"+host+\" at this time\");\n\t\t\t\tclientSideSocket[noOfConn].close();\n\t\t\t\tinFromServer[noOfConn].close();\n\t\t\t\toutToServer[noOfConn].close();\n//\t\t\t\tSystem.out.println(\"Client:num of conn=\"+noOfConn);\n\t\t\t}\n\t\t\n\t\t\n\t} catch (UnknownHostException e) {\n\t\tSystem.out.println(\"Unknown Host: Destination host unreachable\");\n\t\t//e.printStackTrace();\n\t} catch (Exception e) {\n\t\tSystem.out.println(\"Connection Refused/Destination host unreachable\");\n\t}\n\t\t}\n\t}",
"@Override\n\tprotected void configure() {\n\n\t\tbind(AddNetworkView.class).to(AddNetworkDesktopView.class).in(Singleton.class);\n\t\tbind(AddNetworkActivity.class);\n\n\t}",
"public void createChannel() {\r\n\t\tworkChannels.add(new ArrayList<Point>());\r\n\t}",
"public void setPort (int port) {\n this.port = port;\n }",
"public void sendPeerListToAll() {\r\n\t\tPacket packet = new Packet();\r\n\t\tpacket.eventCode = 1;\r\n\t\tfor(int i = 0; i < peerClientNodeConnectionList.size(); i++) {\r\n\t\t\tPeer peer = new Peer();\r\n\t\t\tpeer.peerID = peerClientNodeConnectionList.get(i).peerClientID;\r\n\t\t\tpeer.peerIP = peerClientNodeConnectionList.get(i).peerClientIP;\r\n\t\t\tpeer.peerPort = peerClientNodeConnectionList.get(i).peerClientListeningPort;\r\n\t\t\tpacket.peerList.add(peer);\r\n\t\t}\r\n\t\t\r\n\t\tfor(int i = 0; i < peerClientNodeConnectionList.size(); i++) {\r\n\t\t\ttry {\r\n\t\t\t\tpeerClientNodeConnectionList.get(i).outStream.writeObject(packet);\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\t\t\t\r\n\t\t}\r\n\t}",
"void setServicePort( int p );",
"public void alter(){\n\t\t//Alter the network to show change\n\t\t//Removes the connection between Nodes 2-3 and 4-3\n\t\tnodes.get(\"192.168.0.2\").delPort(0);\n\t\tnodes.get(\"192.168.0.4\").delPort(1);\n\t}",
"public LoadBalancer(int port) throws IOException {\n super(port);\n tabServerssout = new Vector();\n tabServerssin = new Vector();\n //On se connecte aux serveurs\n addServers(8010,8013);\n }",
"public void add(Conseiller c) {\n\t\t\r\n\t}",
"public void connectShipToBoard(Ship ship){\n ships.add(ship);\n }",
"interface Fixable extends TcpSocket, Connector.Fixable {}",
"private boolean checkInList(String ip, int port) {\r\n\t\tif(this.ip.equals(ip) & this.port == port)\r\n\t\t\treturn true;\r\n\t\t\r\n\t\tif(nodes.size()>0) {\r\n\t\t\tSystem.out.println(\"checking if node already exists...\");\r\n\t\t\t\r\n\t\t\tfor (Node node : this.nodes) {\r\n\t\t\t\treturn node.ip.equals(ip) && node.port == port;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false;\r\n\t}",
"SockHandle(Socket client,String my_ip,String my_port,int my_c_id,HashMap<Integer, SockHandle> c_list,HashMap<Integer, SockHandle> s_list, boolean rx_hdl,boolean svr_hdl,ClientNode cnode) \n {\n \tthis.client = client;\n \tthis.my_ip = my_ip;\n \tthis.my_port = my_port;\n this.my_c_id = my_c_id;\n this.remote_c_id = remote_c_id;\n this.c_list = c_list;\n this.s_list = s_list;\n this.rx_hdl = rx_hdl;\n this.svr_hdl = svr_hdl;\n this.cnode = cnode;\n // get input and output streams from socket\n \ttry \n \t{\n \t in = new BufferedReader(new InputStreamReader(client.getInputStream()));\n \t out = new PrintWriter(client.getOutputStream(), true);\n \t} \n \tcatch (IOException e) \n \t{\n \t System.out.println(\"in or out failed\");\n \t System.exit(-1);\n \t}\n try\n {\n // only when this is started from a listening node\n // send a initial_setup message to the initiator node (like an acknowledgement message)\n // and get some information from the remote initiator node\n if(rx_hdl == true)\n {\n \t System.out.println(\"send cmd 1: setup sockets to other clients\");\n out.println(\"initial_setup\");\n ip = in.readLine();\n \t System.out.println(\"ip:\"+ip);\n port=in.readLine();\n \t System.out.println(\"port:\"+port);\n remote_c_id=Integer.valueOf(in.readLine());\n \t out.println(my_ip);\n \t out.println(my_port);\n \t out.println(my_c_id);\n \t System.out.println(\"neighbor connection, PID:\"+ Integer.toString(remote_c_id)+ \" ip:\" + ip + \" port = \" + port);\n // when this handshake is done\n // add this object to the socket handle list as part of the main Client object\n synchronized (c_list)\n {\n c_list.put(remote_c_id,this);\n }\n }\n }\n \tcatch (IOException e)\n \t{\n \t System.out.println(\"Read failed\");\n \t System.exit(1);\n \t}\n \t// handle unexpected connection loss during a session\n \tcatch (NullPointerException e)\n \t{\n \t System.out.println(\"peer connection lost\");\n \t System.exit(1);\n \t}\n // thread that continuously runs and waits for incoming messages\n // to process it and perform actions accordingly\n \tThread read = new Thread()\n {\n \t public void run()\n {\n \t while(rx_cmd(in,out) != 0) { }\n }\n \t};\n \tread.setDaemon(true); \t// terminate when main ends\n read.setName(\"rx_cmd_\"+my_c_id+\"_SockHandle_to_Server\"+svr_hdl);\n read.start();\t\t// start the thread\t\n }",
"@Override\r\n\tpublic void connect() {\n\t\tport=\"tastecard\";\r\n\t\tSystem.out.println(\"This is the implementation of db for the taste card\"+port);\r\n\t}",
"private void setupconfigVlanCPoints() {\n for (int i = LAST_CONF_DEVICE_INTF_VLAN_IP + 1; i <= LAST_CONF_DEVICE_INTF_VLAN; i++) {\n ConnectPoint connectPoint = new ConnectPoint(\n getDeviceId(i),\n PortNumber.portNumber(1));\n configVlanCPoints.add(connectPoint);\n }\n }",
"private void initialyzeServer(int port) {\n\n try {\n server = new ServerSocket(port);\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n while (true) {\n try {\n\n Client c = new Client(server.accept(), \"client \" + clientIterator, this);\n\n sockets.add(c);\n ex.submit(c);\n\n System.out.println(race);\n\n race.getBroker().registerClient(c);\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n clientIterator++;\n\n System.out.println(\"Client\" + clientIterator + \" has connected the server\");\n }\n }",
"public void startNetwork(int port);",
"public void arrive(Port port) {\n ShipArrived event = new ShipArrived(\"id\", port, new Date());\n // apply change du to the event\n // it should require only current state and\n apply(event);\n list.add(event);\n // events will be published to the rest of the system\n // from there.. This is where further side effect will\n // occure\n }",
"public void c2pAddModule(IPModule module);",
"@Override\n\tpublic void process() {\n\t\tport = Integer.parseInt(args);\n\t\tsuper.process();\n\t}",
"public Server(int port) {\r\n \r\n this.m_Port = port;\r\n this.m_Clients = new TeilnehmerListe();\r\n }",
"public void start(int port);",
"PortMixer(PortMixerProvider.PortMixerInfo paramPortMixerInfo) {\n/* 70 */ super(paramPortMixerInfo, null, null, null);\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 77 */ int i = 0;\n/* 78 */ int j = 0;\n/* 79 */ int k = 0;\n/* */ \n/* */ try {\n/* */ try {\n/* 83 */ this.id = nOpen(getMixerIndex());\n/* 84 */ if (this.id != 0L) {\n/* 85 */ i = nGetPortCount(this.id);\n/* 86 */ if (i < 0)\n/* */ {\n/* 88 */ i = 0;\n/* */ }\n/* */ } \n/* 91 */ } catch (Exception exception) {}\n/* */ \n/* 93 */ this.portInfos = new Port.Info[i];\n/* */ \n/* 95 */ for (byte b1 = 0; b1 < i; b1++) {\n/* 96 */ int m = nGetPortType(this.id, b1);\n/* 97 */ j += ((m & 0xFF) != 0) ? 1 : 0;\n/* 98 */ k += ((m & 0xFF00) != 0) ? 1 : 0;\n/* 99 */ this.portInfos[b1] = getPortInfo(b1, m);\n/* */ } \n/* */ } finally {\n/* 102 */ if (this.id != 0L) {\n/* 103 */ nClose(this.id);\n/* */ }\n/* 105 */ this.id = 0L;\n/* */ } \n/* */ \n/* */ \n/* 109 */ this.sourceLineInfo = (Line.Info[])new Port.Info[j];\n/* 110 */ this.targetLineInfo = (Line.Info[])new Port.Info[k];\n/* */ \n/* 112 */ j = 0; k = 0;\n/* 113 */ for (byte b = 0; b < i; b++) {\n/* 114 */ if (this.portInfos[b].isSource()) {\n/* 115 */ this.sourceLineInfo[j++] = this.portInfos[b];\n/* */ } else {\n/* 117 */ this.targetLineInfo[k++] = this.portInfos[b];\n/* */ } \n/* */ } \n/* */ }"
] |
[
"0.7038958",
"0.5919409",
"0.5809509",
"0.57174087",
"0.5497338",
"0.54647803",
"0.5454128",
"0.5454128",
"0.5453832",
"0.54434323",
"0.5406851",
"0.5365936",
"0.5353842",
"0.5347094",
"0.53185016",
"0.5304139",
"0.52499276",
"0.5219771",
"0.5212445",
"0.52022547",
"0.5196665",
"0.51833856",
"0.51833856",
"0.51603824",
"0.515764",
"0.5154291",
"0.5148686",
"0.51296693",
"0.5125035",
"0.5115383",
"0.5115383",
"0.5112221",
"0.5107631",
"0.50968367",
"0.50938207",
"0.5081048",
"0.50594",
"0.5056243",
"0.50507027",
"0.501744",
"0.5016309",
"0.4995382",
"0.49942243",
"0.49902177",
"0.4981514",
"0.49809504",
"0.49809504",
"0.49808246",
"0.4975882",
"0.49723598",
"0.49496612",
"0.49300137",
"0.49266213",
"0.49253294",
"0.49227116",
"0.49120766",
"0.49115372",
"0.4910105",
"0.49065366",
"0.48995492",
"0.48935995",
"0.48875323",
"0.48864028",
"0.4886362",
"0.4883084",
"0.48804498",
"0.48769885",
"0.48748732",
"0.48747343",
"0.48665294",
"0.4862104",
"0.48576745",
"0.48562628",
"0.4847015",
"0.48447245",
"0.48373502",
"0.4837061",
"0.48368314",
"0.48325822",
"0.48302013",
"0.48209834",
"0.48140445",
"0.48091134",
"0.48014668",
"0.48008272",
"0.47991663",
"0.47969577",
"0.47926477",
"0.4790956",
"0.47849292",
"0.4781055",
"0.47778982",
"0.47741383",
"0.47741255",
"0.47722146",
"0.47695348",
"0.4766685",
"0.47655",
"0.47654322",
"0.4765067"
] |
0.50196654
|
39
|
adds person to port & everything arraylist
|
public void addPerson(Scanner sc){
Person person = new Person(sc);
currentPort = (SeaPort) hashMap.get(person.getParent());
currentPort.setPerson(person);
hashMap.put(person.getIndex(), person);
everything.add(person);
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public void addPorts(){\n\t\t\n\t}",
"public void addPerson(String name){\n Person newPerson = new Person(name,this.x1,this.x2);\n for(Person p : personList){\n if(p.equals(newPerson)){\n System.out.println(\"Error! The person already exists.\");\n }\n }\n personList.add(newPerson);\n }",
"public void addPerson(Person thePerson) {\r\n staff.add(thePerson);\r\n }",
"public void addPerson(Person2 p){\n\t\tint index = 0;\r\n\t\tpersons = new Person2[50];\r\n\t\t\r\n\t\tfor(int i = 0; i < persons.length; i++){\r\n\t\t\tif(persons[i] == null){ // location available\r\n\t\t\t\tindex = i;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif(index < persons.length){\r\n\t\t\tpersons[index] = p;\r\n\t\t}\r\n\t}",
"public void add(Person person) {\n\t\tteilnehmerListe.add(person);\n\t}",
"private void addPerson(){\r\n\t\tpeople.add(new Person(this));\r\n\t\t// fire the listeners so the screen updates\r\n\t\t// when addPerson is called (by the button click)\r\n\t\tpersonTableModel.fireTableRowsInserted(0,0);\r\n\t}",
"public void add(Person person) {\n\t\tlistOfPeople.add(person);\n\t\t\n\t}",
"protected void addPerson(Person person) {\n this.getPersonsInPool().add(person);\n this.setAvailablePersons(this.getPersonsInPool().size());\n this.setTotalPersons(this.getPersonsInPool().size());\n }",
"public void addPerson(String name, String id) {\n if (personIds.contains(id)) {\n return;\n }\n personNames.add(name);\n personIds.add(id);\n personPhotos.add(getBitmapFromId(context, id));\n personSelections.add(new HashSet<Integer>());\n }",
"public chatd(String ports, int port)\r\n {\r\n this.portNumb = port;\r\n\r\n\r\n clientList = new ArrayList<ClientProcess>();\r\n }",
"public final void add(final InterfacePersonne per) {\n\t\tSystem.out.println(this.personnel.contains(per));\n\t\tpersonnel.add(per);\n\t}",
"private static void addPerson(int startFloorIn, int endFloorIn) throws InvalidParameterException {\r\n\r\n\t\t// get person name\r\n\t\tpersonCounter++;\r\n\t\tString name = \"P\" + personCounter;\r\n\r\n\t\t// create a person\r\n\t\tPerson p = new Person(name, startFloorIn, endFloorIn);\r\n\t\tSystem.out.printf(\"%s Person %s created on Floor %d, wants to go %s to Floor %d\\n\",\r\n\t\t\t\tgetTimeStamp(), name, startFloorIn, ElevatorController.getDirection(startFloorIn, endFloorIn), endFloorIn);\r\n\r\n\t\t// add to list for statistics\r\n\t\tpeople.add(p);\r\n\r\n\t\t// send to the building\r\n\t\ttry {\r\n\t\t\tmyBuilding.addPerson(p);\r\n\t\t} catch (EmptyReferenceException e) {\r\n\t\t\tSystem.out.println(e.getMessage());\r\n\t\t}\r\n\t}",
"@Override\n\tpublic void addRentPort(RentPort rentPort) {\n\n\t}",
"public void addContacts() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void addPerson(Person p);",
"void addPerson(Person person) throws UniquePersonList.DuplicatePersonException;",
"public void addPerson() {\n\t\tSystem.out.println(\"*****ADD RECORDS*****\");\n\t\tSystem.out.println(\"How many records you want to add?\");\n\t\tint numOfRecods = sc.nextInt();\n\t\tcount = 0;\n\t\tfor (int i = 1; i <= numOfRecods; i++) {\n\t\t\tSystem.out.println(\"Enter the First name\");\n\t\t\tString firstName = sc.next();\n\t\t\tperson.setFirstName(firstName);\n\n\t\t\tSystem.out.println(\"Enter the Last name\");\n\t\t\tString lastName = sc.next();\n\t\t\tperson.setLastName(lastName);\n\n\t\t\tSystem.out.println(\"Enter your Address\");\n\t\t\tString address = sc.next();\n\t\t\tperson.setAddress(address);\n\n\t\t\tSystem.out.println(\"Enter your City\");\n\t\t\tString city = sc.next();\n\t\t\tperson.setCity(city);\n\n\t\t\tSystem.out.println(\"Enter your State\");\n\t\t\tString state = sc.next();\n\t\t\tperson.setState(state);\n\n\t\t\tSystem.out.println(\"Enter your Zip Code\");\n\t\t\tint zipcode = sc.nextInt();\n\t\t\tperson.setZip(zipcode);\n\n\t\t\tSystem.out.println(\"Enter your Phone Number\");\n\t\t\tlong phone = sc.nextLong();\n\t\t\tperson.setPhoneNo(phone);\n\n\t\t\tdetails[count++] = new Person(firstName, lastName, address, city, state, zipcode, phone);\n\t\t\tSystem.out.println(i + \" records added successfully\");\n\t\t}\n\t\tSystem.out.println(\"All records are added successfully\\n\");\n\t}",
"public void addPerson(Person per) {\r\n\t\tthis.persons.put(per.getPersonID(), per);\r\n\t}",
"public void addMember(Person person) {\n\t\tmembers.add(person);\n\t}",
"public void addHost(String host, int port) {\r\n\t\tlistHostPort.add(new DNSHostPort(host, port));\r\n\t}",
"void addPersonListener(PersonListener personListener, Person... persons) {\n for (Person c : persons) {\n HashSet<PersonListener> listeners;\n if (!personListeners.containsKey(c)) {\n listeners = new HashSet<PersonListener>();\n listeners.add(personListener);\n personListeners.put(c, listeners);\n } else {\n listeners = personListeners.get(c);\n listeners.add(personListener);\n }\n }\n }",
"public void addPort(WSDLPort port) {\r\n\t\tif (port == null) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tif (ports == null) {\r\n\t\t\tports = new LinkedMap();\r\n\t\t}\r\n\t\tports.put(port.getName(), port);\r\n\t\tport.setService(this);\r\n\t}",
"private void transferContactList() throws IOException {\n dbh.open();\n try {\n String[][] contacts = dbh.getContactsArray(user.toString());\n System.out.println(Arrays.toString(contacts));\n int nbrOfContacts = contacts.length;\n oos.writeObject(\"ContactList\");\n oos.writeObject(contacts);\n oos.flush();\n logListener.logInfo(\"Transfered \" + nbrOfContacts + \" contacts to: \" + user.toString());\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }",
"@Override\n public void onPersonSelected(Person person) {\n gameFriendsAdapter.addItem(person);\n }",
"static public void addPersona(Persona c) { //metodo para añadir a lista y actualizar la lista en tiempo real\r\n listaPersona.add(c);\r\n listaG.setListaGrafica();\r\n \r\n \r\n \r\n }",
"private void initPortSettings() {\n\n\t\tList<PortSpecification> portSpecification = XMLConfigUtil.INSTANCE.getComponent(componentName)\n\t\t\t\t.getPort().getPortSpecification();\n\n\t\tportDetails = new ArrayList<PortDetails>();\n\t\tports = new HashMap<String, Port>();\n\t\tPortTypeEnum pEnum = null;\n\t\tPortAlignmentEnum pAlignEnum = null;\n\n\t\tfor (PortSpecification p : portSpecification) {\n\t\t\tpAlignEnum = PortAlignmentEnum.fromValue(p.getPortAlignment().value());\n\t\t\tsetPortCount(pAlignEnum, p.getNumberOfPorts(), p.isChangePortCountDynamically());\n\t\t\tfor(PortInfo portInfo :p.getPort()){\n\t\t\t\tString portTerminal = portInfo.getPortTerminal();\n\t\t\t\tpEnum = PortTypeEnum.fromValue(portInfo.getTypeOfPort().value());\n\t\t\t\t\n\t\t\t\tPort port = new Port(portInfo.getLabelOfPort(),\n\t\t\t\t\t\tportTerminal, this, getNumberOfPortsForAlignment(pAlignEnum), pEnum\n\t\t\t\t\t\t\t\t, portInfo.getSequenceOfPort(), p.isAllowMultipleLinks(), p.isLinkMandatory(), pAlignEnum);\n\t\t\t\tlogger.trace(\"Adding portTerminal {}\", portTerminal);\n\t\t\t\t\n\t\t\t\tports.put(portTerminal, port);\n\t\t\t}\n\t\t\tPortDetails pd = new PortDetails(ports, pAlignEnum, p.getNumberOfPorts(), p.isChangePortCountDynamically(), p.isAllowMultipleLinks(), p.isLinkMandatory());\n\t\t\tportDetails.add(pd);\n\t\t}\n\t\t\n\t}",
"public Person(String ID, String number){\n \n phoneNums = new LinkedList<String>();\n this.addNum(number);\n this.ID = ID;\n }",
"@Override\n\tpublic void addPerson(User pUser) {\n\t\t\n\t}",
"public void addPort(Scanner sc){\n currentPort = new SeaPort(sc);\n ports.add(currentPort);\n hashMap.put(currentPort.getIndex(), currentPort);\n portMap.put(currentPort.getIndex(), currentPort);\n everything.add(currentPort);\n \n }",
"void addPhoneToPerson(Phone phone,int personId);",
"@Override\n public void addServer(String address, String port, String name) {\n model.addElement(\"Server name: #\" + name + \"# Server address: #\" + address + \"# Server port: #\" + port + \"#\");\n }",
"public void add() {\n\t\ttry (RandomAccessFile raf = new RandomAccessFile(\"Address.dat\", \"rw\")) // Create RandomAccessFile object\n\t\t{\n\t\t\traf.seek(raf.length()); // find index in raf file\n\t\t\t // # 0 -> start from 0\n\t\t\t // # 1 -> start from 93 (32 + 32 + 20 + 2 + 5 + '\\n')\n\t\t\t // # 2 -> start from 186 (32 + 32 + 20 + 2 + 5 + '\\n') * 2\n\t\t\t // # 3 -> start from 279 (32 + 32 + 20 + 2 + 5 + '\\n') * 3\n\t\t \twrite(raf); // store the contact information at the above position\n\t\t}\n\t\tcatch (FileNotFoundException ex) {\n\t\t\tex.printStackTrace();\n\t\t}\n\t\tcatch (IOException ex) {\n\t\t\tex.printStackTrace();\n\t\t}\n\t\tcatch (IndexOutOfBoundsException ex) {\n\t\t\tex.printStackTrace();\n\t\t}\n\t}",
"public void addPerson(Person object)\n\t{\n\t\tthis.peopleList.add(object);\n\t}",
"public void addperson(Person p, int floorNum) {\n\r\n\r\n }",
"public List <Person> addUser(List <Person> listOfPerson) {\n\t\tdo {\n\t\t\tPerson person = new Person();\n\n\t\t\tSystem.out.println(\"Enter the First Name: \");\n\t\t\tperson.setFname(Utility.inputString());\n\t\t\tSystem.out.println(\"Enter the Last Name: \");\n\t\t\tperson.setLname(Utility.inputString());\n\t\t\tSystem.out.println(\"Enter the Address: \");\n\t\t\tperson.setAddress(Utility.inputString());\n\t\t\tSystem.out.println(\"Enter the City: \");\n\t\t\tperson.setCity(Utility.inputString());\n\t\t\tSystem.out.println(\"Enter the State: \");\n\t\t\tperson.setState(Utility.inputString());\n\t\t\tSystem.out.println(\"Enter the Zip Code: \");\n\t\t\tperson.setZip(Utility.inputInteger());\n\t\t\tSystem.out.println(\"Enter the Phone Number: \");\n\t\t\tperson.setPhn(Utility.inputLong());\n //Adding the details given in person to the listOfPerson\n\t\t\tlistOfPerson.add(person);\n\t\t\tSystem.out.println(\"Person added successfully\");\n\t\t\tSystem.out.println(\"To add more person type true\");\n\t\t\treturn listOfPerson;\n\t\t} while (Utility.inputBoolean());\n\t}",
"public void addPerson(T people) {\r\n\t Node tempNode = new Node(people); // the node added by the user \r\n\t \r\n\t if (isEmpty()) { \r\n\t firstNode = tempNode; // if empty set first node to 1, aka the first node \r\n\t currentNode = firstNode; // the current node will also be the first nod e\r\n\t } else {\r\n\t currentNode.next = tempNode; // if its not empty , current node is equal to the node ( of the people ) ; \r\n\t }\r\n\t \r\n\t tempNode.next = firstNode; // this way tempNode.next will always be equal to 1, aka the first Node \r\n\t lastNode = tempNode; // this will make the last node in the list equal to the most current/ last node added \r\n\t skip(); // resetting current node to 1, aka the first node \r\n\t nodeCount++; // adding to the node count \r\n\t }",
"public static void addContact()\n {\n System.out.println(\"Enter your firstName : \");\n String firstName = sc.nextLine();\n for (int i = 0; i < list.size(); i++)\n {\n if (list.get(i).getFirstName().equalsIgnoreCase(firstName))\n {\n System.out.println(\"Name already exists. Try another name\");\n addPersons();\n break;\n }\n }\n\n System.out.println(\"Enter your lastName : \");\n String lastName = sc.nextLine();\n System.out.println(\"Enter your address : \");\n String address = sc.nextLine();\n System.out.println(\"Enter your city : \");\n String city = sc.nextLine();\n System.out.println(\"Enter your state : \");\n String state = sc.nextLine();\n System.out.println(\"Enter your zipCode : \");\n String zip = sc.nextLine();\n System.out.println(\"Enter your phoneNo : \");\n long phoneNo = sc.nextLong();\n System.out.println(\"Enter your emailId : \");\n String email = sc.nextLine();\n Contact contact = new Contact(firstName, lastName, address, city, state, zip, phoneNo, email);\n list.add(contact);\n }",
"private void addPersonnageToGame() throws PersonnageOnMultipleJoueurException {\n\t\t\n\t\t// liste de personnage venant d'un joueur\n\t\tList<Personnage> listePersonnageFromJoueur;\n\t\t\n\t\t// liste venant de TurnManager, qui représente la totalité des personnages\n\t\tList<Personnage> listePersonnageFromTurnManager = this.getListePersonnage();\n\t\t\n\t\tIterator<Joueur> iteratorOverListeJoueur = this.getListeJoueur().iterator();\n\t\tIterator<Personnage> iteratorOverListePersonnage;\n\t\n\t\tPersonnage personnage;\n\t\n\t\t// on boucle sur la liste de joueurs\n\t\twhile(iteratorOverListeJoueur.hasNext()){\n\t\t\t\n\t\t\t// on récupère la liste des personnages du joueur suivant\n\t\t\tlistePersonnageFromJoueur = iteratorOverListeJoueur.next().getListePersonnage();\n\t\t\titeratorOverListePersonnage = listePersonnageFromJoueur.iterator();\n\t\t\t\n\t\t\t// on boucle sur la liste de personnages du joueur\n\t\t\twhile(iteratorOverListePersonnage.hasNext()){\n\t\t\t\t\n\t\t\t\t// on récupère le personnage suivant\n\t\t\t\tpersonnage = iteratorOverListePersonnage.next();\n\t\t\t\t\n\t\t\t\t// si le personnage n'existe pas on l'ajoute dans la liste\n\t\t\t\tif(!listePersonnageFromTurnManager.contains(personnage)){\n\t\t\t\t\tlistePersonnageFromTurnManager.add(personnage);\n\t\t\t\t}\n\t\t\t\t// si il existe déjà, il y a une erreur\n\t\t\t\telse {\n\t\t\t\t\tthrow new PersonnageOnMultipleJoueurException();\t\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public void CreatePerson(Person p){\n\t\tWeddingConnectionPoolManager con = new WeddingConnectionPoolManager(); \n\t\t Person p1 = new Person(p.getId(), p.getFirstName(), p.getLastName(), p.getRelationship(),\n\t\t\t\t p.getAddress(), p.getPhone(), p.getEmail(), p.getComment(), user.getId());\n\t\t System.out.println(\"p1 : \" + p1);\n\t\t System.out.println(\"p : \" + p);\n\t\t// TODO - should to iterate on the results that returns when calling to \"getpersons\" method.\n\t\tPersonDBManager.getInstance().CreateNewPerson(con.getConnectionFromPool(), p1);\t\n\t}",
"private String addPerson()\n {\n String phone = getPhone();\n System.out.println(\"Person tilføjet.\");\n System.out.println(\"\");\n return phone;\n }",
"public void addPeerToList(WifiP2pDevice peer) {\n stopRefreshActionBar();\n int peer_index = -1;\n if ((peer_index = peers_.indexOf(peer)) != -1) {\n peers_.get(peer_index).deviceName = peer.deviceName;\n peers_.get(peer_index).deviceAddress = peer.deviceAddress;\n peers_.get(peer_index).status = peer.status;\n } else {\n peers_.add(peer);\n }\n displayEmptyView();\n System.out.println(\"Peers found\");\n ((PeersAdapter)adapter_).update();\n listener_.onDiscoveringPeersRequestDone();\n }",
"public void addNameServerPort(String nsp) {\n\t\tif (nsp != null)\n\t\t// check to see if item is already in list\n\t\tif (_nameserverPorts.indexOf(nsp) < 0)\n\t\t\t_nameserverPorts.add(nsp);\n\t}",
"public void addContact() throws IOException {\n\t\t\n\t\tContact contact = Contact.getContact();\n\t\twhile (checkPhone(contact.getPhone()) != -1) {\n\t\t\tSystem.out.println(\"Phone already exits. Please input again!\");\n\t\t\tcontact.setPhone(getString(\"phone\"));\n\t\t}\n\t\tlist.add(contact);\n\t\tSystem.out.println(\"---Added\");\n\t}",
"void addPerson(Player player);",
"public void add (String name, String number) {\n this.persons.add(new Person(name, number));\n }",
"public void addContact() {\n System.out.println(\"enter a number to how many contacts you have to add\");\n Scanner scanner = new Scanner(System.in);\n int number = scanner.nextInt();\n\n for (int i = 1; i <= number; i++) {\n Contact person = new Contact();\n System.out.println(\"you can countinue\");\n System.out.println(\"enter your first name\");\n String firstName = scanner.next();\n if (firstName.equals(person.getFirstName())) {\n try {\n throw new InvalidNameException(\"duplicate name\");\n } catch (InvalidNameException e) {\n e.printStackTrace();\n }\n } else {\n person.setFirstName(firstName);\n }\n System.out.println(\"enter your last name\");\n String lastName = scanner.next();\n person.setLastName(lastName);\n System.out.println(\"enter your address :\");\n String address = scanner.next();\n person.setAddress(address);\n System.out.println(\"enter your state name\");\n String state = scanner.next();\n person.setState(state);\n System.out.println(\"enter your city :\");\n String city = scanner.next();\n person.setCity(city);\n System.out.println(\"enter your email\");\n String email = scanner.next();\n person.setEmail(email);\n System.out.println(\"enter your zip :\");\n int zip = scanner.nextInt();\n person.setZip(zip);\n System.out.println(\"enter your contact no\");\n int mobile = scanner.nextInt();\n person.setPhoneNo(mobile);\n list.add(person);\n }\n System.out.println(list);\n }",
"public void addEntry() {\n\t\tSystem.out.print(\"Name: \");\n\t\tString entryName = getInputForName();\n\t\tSystem.out.print(\"Number: \");\n\t\tint entryNumber = getInputForNumber();\n\t\t\n\t\tp = new PhoneEntry(entryName, entryNumber);\n\t\t\n\t\ttry {\n\t\t\tphoneList.add(p);\n\t\t\twriteFile();\n\t\t\t\n\t\t\tSystem.out.println(\"Entry \" + p.getName() + \" has been added.\");\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\tSystem.err.println(\"Could not write item into array.\");\n\t\t}\n\t}",
"public void addRecipient(){\n //mRATable.insert();\n }",
"public void addPerson(Person person) {\n\t\tsynchronized (this) {\n\t\t\tpeople.add(person);\n\t\t}\n\t}",
"public synchronized void AddPlayerToGame(String playerName, String IPAddress, Integer portAddress) {\n inGamePlayers.add(playerName);\n inGamePlayersIP.add(IPAddress);\n inGamePlayersPort.add(portAddress);\n }",
"void addContact(String name,String number);",
"public PersonList() {\r\n this.personList = new ArrayList<Person>();\r\n }",
"public boolean addPort(Pt port) {\n if(ports.add(port)){\n //Se port existe, atribui este como seu parente\n if(port != null)\n port.setParent(this);\n\n notifyInserted(NCLElementSets.PORTS, port);\n return true;\n }\n return false;\n }",
"public String addAddressList(BufferedReader address);",
"protected void addMember() {\n\t\tString mPhoneNumber = phoneEditView.getText().toString();\n\t\t\n\t\tApiProxy apiProxy = new ApiProxy(this);\n\t\tapiProxy.addMember(mPhoneNumber);\n\t\t\n\t\tgoToFriendListPage();\n\t}",
"public PersonInfo addPerson(PersonInfo p) {\n\t\tlog.info(\"Enter First Name\");\n\t\tString fname = obj.next();\n\t\tlog.info(\"Enter Last Name\");\n\t\tString lname = obj.next();\n\t\tlog.info(\"Enter Address\");\n\t\tString address = obj.next();\n\t\tlog.info(\"Enter City\");\n\t\tString city = obj.next();\n\t\tlog.info(\"Enter State\");\n\t\tString state = obj.next();\n\t\tlog.info(\"Enter the six digit Zip Code\");\n\t\tString zipCode = obj.next();\n\t\tString pattern3 = \"^[1-9]{1}[0-9]{5}$\";\n\t\tPattern zip_pattern = Pattern.compile(pattern3);\n\t\tMatcher m3 = zip_pattern.matcher(zipCode);\n\t\tif (m3.matches() == false) {\n\t\t\tlog.info(\"zip code not in format enter again\");\n\t\t\tzipCode = obj.next();\n\t\t}\n\t\tlog.info(\"Enter the ten digit Phone Number\");\n\t\tString phoneNo = obj.next();\n\t\tString pattern1 = \"^[1-9]{1}[0-9]{9}$\";\n\t\tPattern mobile_pattern = Pattern.compile(pattern1);\n\t\tMatcher m1 = mobile_pattern.matcher(phoneNo);\n\t\tif (m1.matches() == false) {\n\t\t\tlog.info(\"phone number not in format enter again\");\n\t\t\tphoneNo = obj.next();\n\t\t}\n\t\tlog.info(\"Enter Email\");\n\t\tString email = obj.next();\n\t\tString pattern2 = \"^[a-zA-Z0-9]+((\\\\.[0-9]+)|(\\\\+[0-9]+)|(\\\\-[0-9]+)|([0-9]))*@*+[a-zA-Z0-9-]+(\\\\.[A-Za-z0-9]+)*(\\\\.[A-Za-z]{2,})$\";\n\t\tPattern email_sample = Pattern.compile(pattern2);\n\t\tMatcher m2 = email_sample.matcher(email);\n\t\tif (m2.matches() == false) {\n\t\t\tlog.info(\"email not in format enter again\");\n\t\t\temail = obj.next();\n\t\t}\n\t\tp = new PersonInfo(fname, lname, address, city, state, zipCode, phoneNo, email);\n\t\treturn p;\n\t}",
"public void arrive(Port port) {\n ShipArrived event = new ShipArrived(\"id\", port, new Date());\n // apply change du to the event\n // it should require only current state and\n apply(event);\n list.add(event);\n // events will be published to the rest of the system\n // from there.. This is where further side effect will\n // occure\n }",
"void addContact(String name, String number);",
"public Thread addPerson(int sourceFloor, int destinationFloor) {\r\n\r\n /**\r\n * Important to add code here to make a\r\n * new thread that runs your person-runnable\r\n * \r\n * Also return the Thread object for your person\r\n * so that it can be reaped in the testSuite\r\n * (you don't have to join() yourself)\r\n */\r\n\r\n Thread thread = new Thread(new Person(sourceFloor, destinationFloor));\r\n thread.start();\r\n\r\n incrementNumberOfPeopleWaitingAtFloor(sourceFloor);\r\n \r\n\r\n return thread;\r\n }",
"public void addServers(int portmin,int portmax){\n BufferedReader inloc;\n PrintWriter outloc;\n Socket SSocket;\n for (int portcourant = portmin; portcourant < portmax; portcourant++) {\n try {\n System.out.print(\"Attempt to connect to server at port \");\n System.out.println(portcourant);\n SSocket = new Socket(\"127.0.0.1\", portcourant);\n System.out.print(\"Done...\");\n //flux pour envoyer\n outloc = new PrintWriter(SSocket.getOutputStream());\n tabServerssout.add(outloc);\n //flux pour recevoir\n inloc = new BufferedReader(new InputStreamReader(SSocket.getInputStream()));\n tabServerssin.add(inloc);\n }catch(IOException e){\n e.printStackTrace();\n }\n }\n }",
"public void merge(Person p){\n \n phoneNums.addAll(p.getList());\n }",
"private void reposicionarPersonajes() {\n // TODO implement here\n }",
"public List<Person> createPerson() throws ParseException {\n\t\tList<Person> lespersons = new ArrayList<Person>();\n\t\tint numOfPersons = manager.createQuery(\"Select p From Person p\", Person.class).getResultList().size();\n\n if (numOfPersons == 0) {\n \tSimpleDateFormat simpleDateFormat = new SimpleDateFormat(\"dd/MM/yyyy\");\n \tPerson p1 = new Person(\"dupont\", \"paul\", \"[email protected]\", \"M\", \"http://\", simpleDateFormat.parse(\"06/12/1965\"));\n \tPerson p2 = new Person(\"durand\", \"gerard\", \"[email protected]\", \"F\", \"http://\", simpleDateFormat.parse(\"06/04/1965\"));\n \tPerson p3 = new Person(\"Pierre\", \"martin\", \"[email protected]\", \"M\", \"http://\", simpleDateFormat.parse(\"06/08/1965\"));\n \tp1.getListAmis().add(p2);\n \tp2.getListAmis().add(p1);\n \tp2.getListAmis().add(p3);\n manager.persist(p1);\n manager.persist(p2);\n manager.persist(p3);\n lespersons.add(p1);\n lespersons.add(p2);\n lespersons.add(p3);\n }\n return lespersons;\n\t}",
"ch.crif_online.www.webservices.crifsoapservice.v1_00.AddressDescription addNewControlPersons();",
"private void addDefaultPerson() {\n personNames.add(\"you\");\n personIds.add(STConstants.PERSON_NULL_ID);\n personPhotos.add(null);\n personSelections.add(new HashSet<Integer>()); \n }",
"private void storeHostAddresses() {\n savedHostAddresses.clear();\n /* port */\n savedPort = portComboBox.getStringValue();\n /* addresses */\n for (final Host host : getBrowser().getClusterHosts()) {\n final GuiComboBox cb = addressComboBoxHash.get(host);\n final String address = cb.getStringValue();\n if (address == null || \"\".equals(address)) {\n savedHostAddresses.remove(host);\n } else {\n savedHostAddresses.put(host, address);\n }\n host.getBrowser().getDrbdVIPortList().add(savedPort);\n }\n }",
"@Override\n\tpublic void add(CelPhone phone) {\n\t\t\n\t}",
"@Override\n\tpublic void add(Iphone phone) {\n\t\t\n\t}",
"public void addCastCrew() {\n ResultSet result = null;\n try {\n result = server.executeStatement(\"SELECT * FROM castandcrew INNER JOIN Person ON castandcrew.personID = person.personID WHERE castandcrew.prodID = \" + \"'\" + getId() + \"'\" + \";\");\n while(result.next()) {\n String name = result.getString(\"primaryName\");\n String id = result.getString(\"personID\");\n String jobID = result.getString(\"jobID\");\n String characterPlayed = result.getString(\"characterPlayed\");\n String jobTitle = result.getString(\"jobTitle\");\n int birthYear = result.getInt(\"birthYear\");\n int deathYear = result.getInt(\"deathYear\");\n PersonResult newResult = new PersonResult(id, \"Person\", name, jobTitle, characterPlayed, jobID, birthYear, deathYear, server);\n castCrew.add(newResult);\n }\n } catch (SQLException e) {\n\n }\n }",
"public static void addDept() {\n\t\tScanner sc = ReadFromConsole.sc;\n\n\t\tSystem.out.println(\"Enter Department name: \");\n\t\tString deptName = sc.nextLine();\n\n\t\tsc.nextLine(); // had to add this in to prevent input lines with different data types from\n\t\t\t\t\t\t// printing simultaneously, if you know a better solution, let me know\n\n\t\tSystem.out.println(\"Enter Department phone number: \");\n\t\tString deptPhoneNum = sc.nextLine();\n\n\t\tDepartment dept1 = new Department(deptName, deptPhoneNum);\n\t\t// pass in the info for each department\n\t\t// dept1 is the reference to the newly created obj\n\t\t// new Department = creates a new department obj and the Department constructor has a\n\t\t// counter variable which increments the id# and assigns it as new department id\n\n\t\tdeptInfo.add(dept1);\n\t\t// adding the newly created obj ref into arrlist\n\n\t}",
"private static void addCardsToList(ArrayList<Card> destination , String[] listOfNames , String type)\n {\n for (String name : listOfNames) {\n Card card = new Card(type, name);\n destination.add(card);\n }\n\n }",
"public static void CCommand(String name) {\n Person tempPerson = new Person(name);\n if (Interface.persons.contains(Interface.persons, tempPerson)) {\n System.out.println(\"Error: A name only can exists for a person. Either delete the existing person or create a person with different name.\");\n return;\n }\n Interface.persons = Interface.persons.add(Interface.persons, tempPerson);\n System.out.println(name + \" has been added.\");\n }",
"public void createNewHouseAndAddToList(){\n\t\t\tHouse newHouse = new House();\r\n\t\t\tString id = createAutomaticallyID().trim();\r\n\t\t\tnewHouse.setId(id);\r\n\t\t\tnewHouse.setPrice(Double.parseDouble(priceTextField.getText().trim()));\r\n\t\t\tnewHouse.setNumberOfBathrooms(Integer.parseInt(bathroomsTextField.getText().trim()));\r\n\t\t\tnewHouse.setAirConditionerFeature(airConditionerComboBox.getSelectedItem().toString());\r\n\t\t\tnewHouse.setNumberOfRooms(Integer.parseInt(roomsTextField.getText().trim()));\r\n\t\t\tnewHouse.setSize(Double.parseDouble(sizeTextField.getText().trim()));\r\n\t\t\t\r\n\t\t\toriginalHouseList.add(newHouse);//first adding newHouse to arrayList\r\n\t\t\tcopyEstateAgent.setHouseList(originalHouseList);//then set new arrayList in copyEstateAgent\r\n\r\n\t\t}",
"void addParticipant(Participant participant);",
"public void addNode(String ip, int port) throws UnknownHostException {\t\r\n\t\tNodeRef ref = new NodeRef(ip, port); // create data node reference\r\n\t\tnodeMap.put(ref.getIp().getHostAddress(), ref);\r\n\t}",
"public void addContact() {\n Contacts contacts = new Contacts();\n System.out.println(\"Enter first name\");\n contacts.setFirstName(scannerForAddressBook.scannerProvider().nextLine());\n System.out.println(\"Enter last name\");\n contacts.setLastName(scannerForAddressBook.scannerProvider().nextLine());\n System.out.println(\"Enter address\");\n contacts.setAddress(scannerForAddressBook.scannerProvider().nextLine());\n System.out.println(\"Enter city\");\n contacts.setCity(scannerForAddressBook.scannerProvider().nextLine());\n System.out.println(\"Enter state\");\n contacts.setState(scannerForAddressBook.scannerProvider().nextLine());\n System.out.println(\"Enter email\");\n contacts.setEmail(scannerForAddressBook.scannerProvider().nextLine());\n System.out.println(\"Enter zip\");\n contacts.setZip(scannerForAddressBook.scannerProvider().nextInt());\n System.out.println(\"Enter phone number\");\n contacts.setPhoneNumber(scannerForAddressBook.scannerProvider().nextLine());\n contactList.add(contacts);\n }",
"public void setPerson(Person[] person) {\n\t\tthis.person = person;\n\t}",
"public void writeToParcel(Parcel dest, int flags) {\n dest.writeString(name);\r\n dest.writeString(address);\r\n dest.writeInt(port);\r\n }",
"public void updatePersonList(String deadPerson) {\n for (int i = 0; i < config.personList.size(); i++) {\n if (config.personList.get(i).getName().equals(deadPerson)) {\n config.personList.remove(i--);\n if (i < 0) {\n i = 0;\n }\n alivePerson--;\n }\n }\n\n }",
"@Override\n public void addContact(User contact) {\n contacts.add(contact);\n\n // overwrite the whole list of contacts in the file\n writeToFile();\n }",
"private void seePerso() {\n\t\tfor (int i = 0; i < persoList.size(); i++) {\n\t\t\tPersonnage perso = persoList.get(i);\n\t\t\tSystem.out.println(\"id : \" + i);\n\t\t\tSystem.out.println(perso);\n\t\t}\n\n\t\tSystem.out.println(\"souhaitez vous modifier un personnage ? o/n\");\n\t\tif (sc.nextLine().toLowerCase().contentEquals(\"o\")) {\n\t\t\tSystem.out.println(\"Lequel ? id\");\n\t\t\tint id = sc.nextInt();\n\t\t\tsc.nextLine();\n\t\t\tchangePerso(id);\n\t\t}\n\t}",
"public static void main(String[] args) {\n char resp = 's';\n int cont = 0;\n\n ArrayList listaPersonajes = new ArrayList();\n ArrayList<Personaje> lista_buena = new ArrayList();\n lista_buena.add(new Personaje(\"mago\", \"humano\", \"norfair\", 1.68, 88, \"vende chiles\", 150, \"juan\"));\n lista_buena.add(new Personaje(\"picaro\", \"enano\", \"zebes\", 2.58, 350, \"YES\", 185, \"Ricardo\"));\n lista_buena.add(new Personaje(\"barbaro\", \"humano\", \"maridia\", 1.50, 500, \"es inutil\", 158, \"egroj\"));\n lista_buena.add(new Personaje(\"clerigo\", \"elfo\", \"crateria\", 1.70, 55, \"es muy creido\", 85, \"pipe\"));\n while (resp == 's' || resp == 's') {\n System.out.println(\"0 Salir\");\n System.out.println(\"1 Crear Personaje\");\n System.out.println(\"2 Modificar personaje\");\n System.out.println(\"3 Ver atributos de personaje\");\n System.out.println(\"4 Eliminar personaje\");\n System.out.println(\"5 Combate\");\n System.out.print(\"ingrese opcion\");\n int opcion = leer.nextInt();\n\n switch (opcion) {\n case 0:\n System.exit(0);\n break;\n case 1:\n if (cont > 4) {\n System.out.println(\"no se pueden mas personajes\");\n break;\n }\n System.out.println(\"clerigo, barbaro, mago o picaro\");\n System.out.print(\"Eliga su Clase: \");\n String clase = leer.next();\n if (clase.contains(\"clerigo\") || clase.contains(\"barbaro\") || clase.contains(\"mago\") || clase.contains(\"picaro\")) {\n\n } else {\n System.out.println(\"usted no puede elejir esa clase\");\n System.out.print(\"Eliga su Clase: \");\n clase = leer.next();\n }\n\n //\n listaPersonajes.add(cont, clase);\n System.out.println(\"Ingrese su nombre\");\n String nombre = leer.next();\n listaPersonajes.add(cont, nombre);\n //\n System.out.println(\"mediano, enano, elfo o humano\");\n System.out.print(\"ingrese raza: \");\n String raza = leer.next();\n if (raza.contains(\"mediano\") || raza.contains(\"enano\") || raza.contains(\"elfo\") || raza.contains(\"humano\")) {\n\n } else {\n System.out.println(\"no puede ser de esa raza\");\n System.out.print(\"ingrese raza:\");\n raza = leer.next();\n }\n listaPersonajes.add(cont, raza);\n System.out.println(\"ingrese estatura: \");\n double estatura = leer.nextDouble();\n listaPersonajes.add(cont, estatura);\n //\n System.out.println(\"ingrese peso: \");\n double peso = leer.nextDouble();\n listaPersonajes.add(cont, peso);\n //\n System.out.println(\"ingrese edad: \");\n int edad = leer.nextInt();\n listaPersonajes.add(cont, edad);\n //\n System.out.println(\"ingrese descripcion: \");\n leer.nextLine();\n String descrip = leer.nextLine();\n listaPersonajes.add(cont, descrip);\n //\n System.out.println(\"norfair ,brinstar , maridia, zebes o crateria\");\n System.out.print(\"ingrese nacionalidad: \");\n String nacion = leer.next();\n //\n if (nacion.contains(\"norfair\") || nacion.contains(\"brinstatr\") || nacion.contains(\"maridia\") || nacion.contains(\"zebes\") || nacion.contains(\"crateria\")) {\n\n } else {\n System.out.println(\"no puede ser de esa region: \");\n System.out.print(\"ingrese nacionalidad: \");\n nacion = leer.next();\n }\n\n //\n lista_buena.add(new Personaje(clase, raza, nacion, estatura, edad, descrip, peso, nombre));\n cont++;\n break;\n case 2:\n System.out.println(\"que posicion de pesonaje desea modificar\");\n int perso_mod = leer.nextInt();\n modificacion(perso_mod, lista_buena);\n break;\n case 3:\n\n for (Object o : lista_buena) {\n System.out.println(o);\n System.out.println();\n }\n\n break;\n case 4:\n System.out.println(\"Que personaje desea eliminar\");\n int elim = leer.nextInt();\n lista_buena.remove(elim);\n break;\n case 5:\n System.out.println(\"no funcio\");\n break;\n default:\n resp = 'n';\n }\n }\n\n }",
"@Override\n public void run() {\n activity.sms_adapter.clearItems();\n if(persons_list.size()!=0) {\n Log.d(TAG, \"DisplayPersonsRunnable: run(): inserting persons_list into the sms adapter\");\n //persons_list is global static which has addresses of ALL persons and is filled by class GetPersonsHandlerThread\n for (int i = 0; i < persons_list.size(); i++) {\n// Log.d(TAG, \"DisplayPersonsRunnable: run(): inserting \" + getContactName(activity, persons_list.get(i)) + \" in sms_adapter\");\n activity.sms_adapter.insertPerson(i, persons_list.get(i));\n }\n }\n// activity.sms_adapter.addAllItems(persons_list);\n }",
"private void addContact(Contact contact) {\n contactList.add(contact);\n System.out.println(\"contact added whose name is : \" + contact.getFirstName() + \" \" + contact.getLastName());\n\n }",
"public void initPeople() {\n this.people = new ArrayList<>();\n this.people.addAll(services.getPeopleList());\n }",
"private void setPersonsInPool(ArrayList<Person> personsInPool) {\n this.personsInPool = personsInPool;\n }",
"public int addPerson(String name, int birthDay, int birthMonth, int birthYear) {\r\n if (this.getPersonIndex(name) == -1) {\r\n this.personList.add(new Person(name, birthDay, birthMonth, birthYear));\r\n return this.personList.size() - 1; //return index of new person\r\n } else {\r\n return -1;\r\n }\r\n }",
"public interface PersonService {\n public List geAllPerson();\n public void addPerson(Person p1, Person p2);\n}",
"private void addProfile(String profileName, String username, String server, int port)\r\n\t{\r\n\t\tps.setValue(count + PROFILE, profileName + \",\" + username + \",\" + server + \",\" + port);\r\n\t}",
"public void onPersonListChanged();",
"void addTask(Task person) throws UniqueTaskList.DuplicateTaskException;",
"public void addPersonality(Personality pObjectName)\n {\n pList.add(pObjectName);\n }",
"void setData(List<Person> data);",
"protected ProcessAddPerson() {\n }",
"public void updatePerson() {\n\t\tSystem.out.println(\"update person\");\n\t}",
"void lookupAndSaveNewPerson();",
"private void loadExamplePeople(){\r\n\t\tpeople.add(new Person(\"Quiche\",\"Lorraine\",\"617-253-1000\",\"[email protected]\",Color.RED,this));\r\n\t\tpeople.add(new Person(\"Alice\",\"Whacker\",\"617-253-7788\",\"[email protected]\",Color.RED.darker().darker(),this));\r\n\t\tpeople.add(new Person(\"Zygorthian\",\"Space-Raiders\",\"617-253-1541\",\"[email protected]\",new Color(50,70,90),this));\r\n\t\tpeople.add(new Person(\"Opus\",\"\",\"617-253-1000\",\"[email protected]\",Color.RED.darker(),this));\r\n\t\tpeople.add(new Person(\"Rick\",\"Chang\",\"617-232-3257\",\"[email protected]\",Color.RED.darker().darker().darker(),this));\r\n\t\tpeople.add(new Person(\"Ben\",\"Bitdiddle\",\"303-494-4774\",\"[email protected]\",new Color(56,50,50),this));\r\n\t\t\r\n\t}",
"@Override\n public void create_building(ArrayList bulding){\n House house = new House(Adress.RUE_DE_LA_PAIX);\n System.out.println(\"Vous venez de créer une maison\");\n bulding.add(house);\n }",
"public void addPerson(Person person){\n if (person.getCurrentFloor() != this.currentFloor){\n throw new IllegalArgumentException(\"Person with ID \" + person.getPersonID() +\n \" enters elevator with ID \" + this.ElevatorID + \" on wrong floor\");\n }\n if (!doorOpened) {\n throw new IllegalArgumentException(\"Person with ID \" + person.getPersonID() +\n \" wants to go to closed elevator with ID \" + this.ElevatorID);\n } else if (peopleInside.contains(person)) {\n throw new IllegalArgumentException(\"Person with ID \" + person.getPersonID() +\n \" is already in elevator with ID \" + this.ElevatorID);\n }\n peopleInside.add(person);\n\n }",
"public static void addNewRoom() {\n Services room = new Room();\n room = addNewService(room);\n\n ((Room) room).setFreeService(FuncValidation.getValidFreeServices(ENTER_FREE_SERVICES,INVALID_FREE_SERVICE));\n\n //Get room list from CSV\n ArrayList<Room> roomList = FuncGeneric.getListFromCSV(FuncGeneric.EntityType.ROOM);\n\n //Add room to list\n roomList.add((Room) room);\n\n //Write room list to CSV\n FuncReadWriteCSV.writeRoomToFileCSV(roomList);\n System.out.println(\"----Room \"+room.getNameOfService()+\" added to list---- \");\n addNewServices();\n\n }"
] |
[
"0.6532808",
"0.6422302",
"0.6194661",
"0.61361784",
"0.6052884",
"0.59877867",
"0.58501446",
"0.58365834",
"0.5815942",
"0.5777246",
"0.5775156",
"0.5766658",
"0.5751029",
"0.5734211",
"0.57143235",
"0.56754214",
"0.5649251",
"0.5608337",
"0.5591703",
"0.55185777",
"0.55106384",
"0.5503521",
"0.5500152",
"0.5482473",
"0.5453134",
"0.54530936",
"0.5436954",
"0.54297256",
"0.5424962",
"0.54174197",
"0.5407963",
"0.54076874",
"0.54048187",
"0.539918",
"0.53963286",
"0.5390442",
"0.53873956",
"0.5380981",
"0.5374479",
"0.5365608",
"0.5360725",
"0.5343811",
"0.53390193",
"0.53367364",
"0.5332643",
"0.5317238",
"0.52960145",
"0.52856493",
"0.52827096",
"0.52769375",
"0.526337",
"0.5261804",
"0.525532",
"0.52522933",
"0.5249734",
"0.52493495",
"0.5247177",
"0.5243475",
"0.52366656",
"0.52312726",
"0.5229133",
"0.5221625",
"0.5218965",
"0.5213521",
"0.5201923",
"0.5201421",
"0.5196211",
"0.5189303",
"0.51765186",
"0.51723456",
"0.5170675",
"0.515224",
"0.5151359",
"0.514665",
"0.51432675",
"0.5134499",
"0.5134189",
"0.5130836",
"0.5128004",
"0.511151",
"0.51080275",
"0.51064986",
"0.51041305",
"0.5088299",
"0.5086755",
"0.5082613",
"0.5080201",
"0.5069029",
"0.50631547",
"0.50630516",
"0.50596213",
"0.5050022",
"0.5047927",
"0.50458944",
"0.5042956",
"0.5042007",
"0.5037424",
"0.5034273",
"0.5033292",
"0.5030049"
] |
0.6573178
|
0
|
performs search by index
|
public String searchByIndex(int index){
if(hashMap.containsKey(index))
return hashMap.get(index).toString();
else
return "Cannot Find index given";
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public void searchIndex(Directory index) throws Exception{\n\t\tString searchString = getSearchString();\n\t\t\n\t\tSystem.out.println(\"Searching for '\" + searchString + \"'\");\n\n\t\tIndexReader indexReader = DirectoryReader.open(index);\n\t\tIndexSearcher indexSearcher = new IndexSearcher(indexReader);\n\n\t\tAnalyzer analyzer = new StandardAnalyzer();\n\t\t\n\t\tString query_string = \"title:\" + searchString + \" OR content:\" + searchString + \"OR important:\" + searchString + \"OR h1:\" + searchString +\n\t\t\t\t\"OR h2:\" + searchString + \"OR h3:\" + searchString + \"OR h4:\" + searchString + \"OR h5:\" + searchString + \"OR h6:\" + searchString;\n\t\tQueryParser queryParser = new QueryParser(\"title\", analyzer);\n\t\t\n\t\tTopDocs docs = indexSearcher.search(queryParser.parse(query_string), 10);\n\t\t\n\t\t\n//\t\tString[] fields = {\"content\", \"title\", \"important\", \"h1\", \"h2\", \"h3\", \"h4\", \"h5\", \"h6\"};\n//\t\tBooleanClause.Occur[] flags = \n//\t\t{\n//\t\t\tBooleanClause.Occur.SHOULD,\n//\t\t\tBooleanClause.Occur.SHOULD,\n//\t\t\tBooleanClause.Occur.SHOULD,\n//\t\t\tBooleanClause.Occur.SHOULD,\n//\t\t\tBooleanClause.Occur.SHOULD,\n//\t\t\tBooleanClause.Occur.SHOULD,\n//\t\t\tBooleanClause.Occur.SHOULD,\n//\t\t\tBooleanClause.Occur.SHOULD,\n//\t\t\tBooleanClause.Occur.SHOULD,\n// };\n//\t\t\n//\t\tTopDocs docs = indexSearcher.search(MultiFieldQueryParser.parse(searchString, fields, flags, analyzer), 10);\n\n\t\tScoreDoc[] hits = docs.scoreDocs;\n\n\t System.out.println(\"Found \" + hits.length + \" hits.\");\n\t for(int i=0;i<hits.length;++i) {\n\t \tint docId = hits[i].doc;\n\t Document d = indexSearcher.doc(docId);\n\t System.out.println((i + 1) + \". \" + d.get(\"title\") + \"\\t\" + d.get(\"url\") + \"\\t\" + hits[i].score);\n\t }\n\t}",
"public interface IndexSearch {\n /**\n * Returns the index type.\n * @return type\n */\n IndexType type();\n\n /**\n * Returns the current token.\n * @return token\n */\n byte[] token();\n}",
"public void search(IndexShort < O > index, short range, short k)\n throws Exception {\n // assertEquals(index.aDB.count(), index.bDB.count());\n // assertEquals(index.aDB.count(), index.bDB.count());\n // index.stats();\n index.resetStats();\n // it is time to Search\n int querySize = 1000; // amount of elements to read from the query\n String re = null;\n logger.info(\"Matching begins...\");\n File query = new File(testProperties.getProperty(\"test.query.input\"));\n File dbFolder = new File(testProperties.getProperty(\"test.db.path\"));\n BufferedReader r = new BufferedReader(new FileReader(query));\n List < OBPriorityQueueShort < O >> result = new LinkedList < OBPriorityQueueShort < O >>();\n re = r.readLine();\n int i = 0;\n long realIndex = index.databaseSize();\n\n while (re != null) {\n String line = parseLine(re);\n if (line != null) {\n OBPriorityQueueShort < O > x = new OBPriorityQueueShort < O >(\n k);\n if (i % 100 == 0) {\n logger.info(\"Matching \" + i);\n }\n\n O s = factory.create(line);\n if (factory.shouldProcess(s)) {\n if(i == 279){\n System.out.println(\"hey\");\n }\n index.searchOB(s, range, x);\n result.add(x);\n i++;\n }\n }\n if (i == querySize) {\n logger.warn(\"Finishing test at i : \" + i);\n break;\n }\n re = r.readLine();\n }\n \n logger.info(index.getStats().toString());\n \n int maxQuery = i;\n // logger.info(\"Matching ends... Stats follow:\");\n // index.stats();\n\n // now we compare the results we got with the sequential search\n Iterator < OBPriorityQueueShort < O >> it = result.iterator();\n r.close();\n r = new BufferedReader(new FileReader(query));\n re = r.readLine();\n i = 0;\n while (re != null) {\n String line = parseLine(re);\n if (line != null) {\n if (i % 300 == 0) {\n logger.info(\"Matching \" + i + \" of \" + maxQuery);\n }\n O s = factory.create(line);\n if (factory.shouldProcess(s)) {\n OBPriorityQueueShort < O > x2 = new OBPriorityQueueShort < O >(\n k);\n searchSequential(realIndex, s, x2, index, range);\n OBPriorityQueueShort < O > x1 = it.next();\n //assertEquals(\"Error in query line: \" + i + \" slice: \"\n // + line, x2, x1); \n \n assertEquals(\"Error in query line: \" + i + \" \" + index.debug(s) + \"\\n slice: \"\n + line + \" \" + debug(x2,index ) + \"\\n\" + debug(x1,index), x2, x1);\n\n i++;\n }\n \n }\n if (i == querySize) {\n logger.warn(\"Finishing test at i : \" + i);\n break;\n }\n re = r.readLine();\n }\n r.close();\n logger.info(\"Finished matching validation.\");\n assertFalse(it.hasNext());\n }",
"abstract public void search();",
"private void queryIndex() {\n if (predicate == TruePredicate.INSTANCE) {\n return;\n }\n\n // get indexes\n MapService mapService = nodeEngine.getService(SERVICE_NAME);\n MapServiceContext mapServiceContext = mapService.getMapServiceContext();\n Indexes indexes = mapServiceContext.getMapContainer(name).getIndexes();\n // optimize predicate\n QueryOptimizer queryOptimizer = mapServiceContext.getQueryOptimizer();\n predicate = queryOptimizer.optimize(predicate, indexes);\n\n Set<QueryableEntry> querySet = indexes.query(predicate);\n if (querySet == null) {\n return;\n }\n\n List<Data> keys = null;\n for (QueryableEntry e : querySet) {\n if (keys == null) {\n keys = new ArrayList<Data>(querySet.size());\n }\n keys.add(e.getKeyData());\n }\n\n hasIndex = true;\n keySet = keys == null ? Collections.<Data>emptySet() : InflatableSet.newBuilder(keys).build();\n }",
"public void search() {\r\n \t\r\n }",
"void search();",
"void search();",
"@VTID(10)\n int getIndex();",
"int getIndex();",
"int getIndex();",
"int getIndex();",
"int getIndex();",
"int getIndex();",
"int getIndex();",
"int getIndex();",
"int getIndex();",
"int getIndex();",
"int getIndex();",
"int getIndex();",
"int getIndex();",
"int getIndex();",
"public List<T> search(int index,String key) throws NotFound {\n\t\tList<T> value = null;\n\t\tif (internalStorage != null && index<internalStorage.size())\n\t\t value = internalStorage.get(index).get(key);\n\t\tif (value == null) throw new NotFound();\n\t\treturn value;\n\t}",
"public void testScanDataByIndex() {\n LOG.info(\"Entering testScanDataByIndex.\");\n\n Table table = null;\n ResultScanner scanner = null;\n try {\n table = conn.getTable(tableName);\n\n // Create a filter for indexed column.\n Filter filter = new SingleColumnValueFilter(Bytes.toBytes(\"info\"), Bytes.toBytes(\"name\"),\n CompareOp.EQUAL, \"Li Gang\".getBytes());\n Scan scan = new Scan();\n scan.setFilter(filter);\n scanner = table.getScanner(scan);\n LOG.info(\"Scan indexed data.\");\n\n for (Result result : scanner) {\n for (Cell cell : result.rawCells()) {\n LOG.info(Bytes.toString(CellUtil.cloneRow(cell)) + \":\"\n + Bytes.toString(CellUtil.cloneFamily(cell)) + \",\"\n + Bytes.toString(CellUtil.cloneQualifier(cell)) + \",\"\n + Bytes.toString(CellUtil.cloneValue(cell)));\n }\n }\n LOG.info(\"Scan data by index successfully.\");\n } catch (IOException e) {\n LOG.error(\"Scan data by index failed \", e);\n } finally {\n if (scanner != null) {\n // Close the scanner object.\n scanner.close();\n }\n try {\n if (table != null) {\n table.close();\n }\n } catch (IOException e) {\n LOG.error(\"Close table failed \", e);\n }\n }\n\n LOG.info(\"Exiting testScanDataByIndex.\");\n }",
"public abstract int indexFor(Object obj);",
"public abstract long getIndex();",
"abstract public boolean performSearch();",
"public abstract int getIndex();",
"Index getIndices(int index);",
"public void search() {\n }",
"public int getIndex();",
"public int getIndex();",
"public int getIndex();",
"JsonObject getIndex(final String index);",
"entities.Torrent.NodeSearchResult getResults(int index);",
"int index();",
"@Override\n\tpublic void search() {\n\t}",
"public void tIndex(IndexShort < O > index) throws Exception {\n File query = new File(testProperties.getProperty(\"test.query.input\"));\n File dbFolder = new File(testProperties.getProperty(\"test.db.path\"));\n\n int cx = 0;\n\n initIndex(index);\n //search(index, (short) 3, (byte) 3);\n //search(index, (short) 7, (byte) 1);\n //search(index, (short) 12, (byte) 3);\n \n search(index, (short) 1000, (byte) 1);\n\n search(index, (short) 1000, (byte) 3);\n\n search(index, (short) 1000, (byte) 10);\n \n search(index, (short) 1000, (byte) 50);\n \n long i = 0;\n // int realIndex = 0;\n // test special methods that only apply to\n // SynchronizableIndex\n \n\n // now we delete elements from the DB\n logger.info(\"Testing deletes\");\n i = 0;\n long max = index.databaseSize();\n while (i < max) {\n O x = index.getObject(i);\n OperationStatus ex = index.exists(x);\n assertTrue(ex.getStatus() == Status.EXISTS);\n assertTrue(ex.getId() == i);\n ex = index.delete(x);\n assertTrue(\"Status is: \" + ex.getStatus() + \" i: \" + i , ex.getStatus() == Status.OK);\n assertEquals(i, ex.getId());\n ex = index.exists(x); \n assertTrue( \"Exists after delete\" + ex.getStatus() + \" i \" + i, ex.getStatus() == Status.NOT_EXISTS);\n i++;\n }\n index.close();\n Directory.deleteDirectory(dbFolder);\n }",
"public V search(K key);",
"public int searchCard(int index){\n for(int i = 0; i < cards.size(); ++i){//loop to go through the cards\n if(cards.get(i).toString().equalsIgnoreCase(playable.get(index).toString())){//checks the index\n return i;//returns the index\n }\n }\n return index;\n }",
"SearchResponse search(SearchRequest searchRequest) throws IOException;",
"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 }",
"private Integer serialSearch() {\n int currentIndex = startIndex;\n for (int i = start; i < end; i++) {\n if (this.searchIndex == currentIndex) {\n return currentIndex;\n }\n currentIndex++;\n }\n return 0;\n }",
"List<SearchResult> search(SearchQuery searchQuery);",
"@Override\r\n\tpublic void search() {\n\r\n\t}",
"void searchProbed (Search search);",
"public static void main(String args[]) throws Exception{\n\t\tString path_to_index;\r\n\t\ttry{\r\n\t\t\tpath_to_index = args[0];\r\n\t\t\tSearching_query search = new Searching_query(path_to_index);\r\n\t\t\tString query;\r\n\t\t\tboolean flag = true;\r\n\t\t\twhile(flag==true){\r\n\t\t\t input_query = new Scanner(System.in);\r\n\t\t\t System.out.println(\"ENTER QUERY : \");\r\n\t\t\t query = input_query.nextLine();\r\n\t\t\t System.out.println(\"YOUR QUERY IS: \" + query);\r\n\t\t\t /*calculating the start time*/\r\n\t\t\tdouble start_time_of_query = System.currentTimeMillis();\r\n\t\t\t\tsearch.searching_query(query);\r\n\t\t\t\t/*calculating the end time*/\r\n\t\t\tdouble end_time_of_query = System.currentTimeMillis();\r\n\t\t\tdouble timetaken = end_time_of_query - start_time_of_query;\r\n\t\t\tSystem.out.println(\"SEARCH TIME : \"+ timetaken/1000 + \" sec\");\r\n\t\t\t\r\n\t\t\t System.out.print(\"Want next Query (1 for YES,0 for NO)? : \");\r\n\t\t\t if(!(input_query.nextLine()).equalsIgnoreCase(\"1\")){\r\n\t\t\t\t flag = false;\r\n\t\t\t\t System.out.println();\r\n\t\t\t }\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\t}\r\n\t\tcatch(ArrayIndexOutOfBoundsException e){\r\n\t\t\te.printStackTrace();\r\n\t\t\tSystem.out.println(\"EXCEPTION : Enter path of the index folder.\");\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t}",
"public void doSearch(String searchText){\n }",
"public abstract Search defaultSearch(StringBuilder sb);",
"public abstract S getSearch();",
"private void performSearch() {\n String text = txtSearch.getText();\n String haystack = field.getText();\n \n // Is this case sensitive?\n if (!chkMatchCase.isSelected()) {\n text = text.toLowerCase();\n haystack = haystack.toLowerCase();\n }\n \n // Check if it is a new string that the user is searching for.\n if (!text.equals(needle)) {\n needle = text;\n curr_index = 0;\n }\n \n // Grab the list of places where we found it.\n populateFoundList(haystack);\n \n // Nothing was found.\n if (found.isEmpty()) {\n Debug.println(\"FINDING\", \"No occurrences of \" + needle + \" found.\");\n JOptionPane.showMessageDialog(null, \"No occurrences of \" + needle + \" found.\",\n \"Nothing found\", JOptionPane.INFORMATION_MESSAGE);\n \n return;\n }\n \n // Loop back the indexes if we have reached the end.\n if (curr_index == found.size()) {\n curr_index = 0;\n }\n \n // Go through the findings one at a time.\n int indexes[] = found.get(curr_index);\n field.select(indexes[0], indexes[1]);\n curr_index++;\n }",
"Expression getIndexExpr();",
"public SimilarResult get(int index) {\n lock();\n return results.get(index);\n }",
"public int index();",
"public abstract void selectAllIndexes();",
"private void searchFunction() {\n\t\t\r\n\t}",
"public void executeDisplaySearch(String indexfile, String queryString) {\n\t\tif (queryString.trim().length() < 1) {\n\t\t\tJOptionPane.showMessageDialog(this, \"No text given to seach!\", \"Search issues\", JOptionPane.ERROR_MESSAGE);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t//System.out.println(\"going to open: \" + indexfile);\n\n\t\t\n\t\t\n\t\t//lets see if it exists at all:\n\t\tFile test = new File(indexfile);\n\t\tif (!test.exists()) {\n\t\t\tJOptionPane.showMessageDialog(this,\n\t\t\t\t\t\"No such index file present\\nAre you sure you have created an index file?\", \"Missing Index\",\n\t\t\t\t\tJOptionPane.ERROR_MESSAGE);\n\t\t\treturn;\n\t\t}\n\n\t\tString minDate = new String(\"2020-11-11\");\n\t\tString MaxDate = new String(\"0000-00-00\");\n\t\tBusyWindow bw = new BusyWindow(\"Setup\", \"Adding results\",true);\n\t\ttry {\n\t\t\tSearcher searcher = new IndexSearcher(indexfile);\n\t\t\t//standardanalyser\n\t\t\tQueryParser qp = new QueryParser(\"contents\", analyzer);\n\t\t\tQuery query = qp.parse(queryString);\n\t\t\tSystem.out.println(\"Searching for: \" + query.toString(\"contents\"));\n\t\t\tdatecal.clear();\n\t\t\tresultHits = searcher.search(query);\n\t\t\tSystem.out.println(resultHits.length() + \" total matching documents\");\n\n\t\t\tbw.setMax(resultHits.length());\n\t\t\tbw.setVisible(true);\n\t\t\t// reset the table length\n\n\t\t\tresultTableModel.setRowCount(0);\n\n\t\t\tfor (int i = 0; i < resultHits.length(); i++) {\n\t\t\t\tbw.progress(i);\n\t\t\t\tVector rowvalue = new Vector();\n\t\t\t\tDocument doc = resultHits.doc(i);\n\t\t\t\tfloat score = resultHits.score(i);\n\t\t\t\tString path = doc.get(\"path\");\n\t\t\t\tString curDate = doc.get(\"Date\");\n\t\t\t\tdatecal.addDate(curDate);\n\t\t\t\tif (path != null) {\n\t\t\t\t\trowvalue.add(\"\" + score);\n\n\t\t\t\t\t// we need to get the date and subject from the db\n\t\t\t\t\t// based on the mailref encode in the path with a space\n\t\t\t\t\t// afterwards\n\t\t\t\t\tString mailref = doc.get(\"Mailref\");\n\t\t\t\t\trowvalue.add(curDate);\n\t\t\t\t\tif (compareDatesString(MaxDate, curDate) < 0) {\n\t\t\t\t\t\tMaxDate = curDate;\n\t\t\t\t\t} else if (compareDatesString(minDate, curDate) > 0) {\n\t\t\t\t\t\tminDate = curDate;\n\t\t\t\t\t}\n\n\t\t\t\t\ttry {\n\n\t\t\t\t\t\tString data[][] = DBConnect.getSQLData(\"select subject from email where mailref = '\" + mailref\n\t\t\t\t\t\t\t\t+ \"'\");\n\n\t\t\t\t\t\tif (data.length > 0) {\n\t\t\t\t\t\t\trowvalue.add(data[0][0]);\n\n\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\trowvalue.add(\"subject\");\n\t\t\t\t\t\t}\n\n\t\t\t\t\t} catch (SQLException see) {\n\t\t\t\t\t\tsee.printStackTrace();\n\n\t\t\t\t\t\trowvalue.add(\"subject\");\n\t\t\t\t\t}\n\n\t\t\t\t\trowvalue.add(mailref);\n\t\t\t\t\t// System.out.println(i + \". =\"+score+\"= \" +\n\t\t\t\t\t// doc.get(\"contents\").substring(0,20));//path );\n\t\t\t\t} else {\n\t\t\t\t\tString url = doc.get(\"url\");\n\t\t\t\t\tif (url != null) {\n\t\t\t\t\t\tSystem.out.println(i + \". \" + url);\n\t\t\t\t\t\tSystem.out.println(\" - \" + doc.get(\"title\"));\n\t\t\t\t\t} else {\n\t\t\t\t\t\tSystem.out.println(i + \". \" + \"No path nor URL for this document\");\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\trowvalue.add(-1);\n\t\t\t\trowvalue.add(i);\n\t\t\t\tresultTableModel.addRow(rowvalue);\n\t\t\t}\n\n\t\t} catch (ParseException pe) {\n\t\t\tJOptionPane.showMessageDialog(SearchEMT.this, \"Problem with query \" + queryString);\n\t\t\tpe.printStackTrace();\n\t\t} catch (IOException ioe) {\n\t\t\tJOptionPane.showMessageDialog(SearchEMT.this, \"Problem opening \" + indexfile);\n\t\t\tioe.printStackTrace();\n\n\t\t}\n\t\tbw.setVisible(false);\n\t\t// System.out.println(\"Max:\" + MaxDate + \" Min:\"+ minDate);\n\n\t\tm_status.setText(\"Number of results: \" + resultHits.length() + \" From \" + minDate + \" to \" + MaxDate);\n\n\t\tdatecal.setDateRange(minDate, MaxDate);\n\t\tdatecal.paintComponent(datecal.getGraphics());\n\n\t}",
"public int getIndex(\n )\n {return index;}",
"private int searchIndex(int listIndex) {\n int currentTreeIndex = this.indexCorrespondingToTheFirstElement;\n Node<T> currentNode = getHelper(currentTreeIndex);\n for (int i = 0; i < listIndex; i++) {\n currentTreeIndex = currentNode.nextIndex;\n currentNode = getHelper(currentTreeIndex);\n }\n return currentTreeIndex;\n }",
"protected interface ISearchIndex<T> extends Iterable<T> {\n List<T> radius(T center, double radius);\n }",
"public static void main(String[] args) throws Exception {\n\t\tqueryIndexPattern();\n\t\t\n\t}",
"@In String search();",
"private void setSearchItems(Number index) {\n String searchSelected;\n if (index == null) {\n searchSelected = searchSelection.getSelectionModel().getSelectedItem();\n } else {\n searchSelected = menuItems[index.intValue()];\n }\n\n final String searchText = searchField.getText().trim().toUpperCase();\n if (searchText == null || \"\".equals(searchText)) {\n // Search field is blank, remove filters if active\n if (searchFilter != null) {\n filterList.remove(searchFilter);\n searchFilter = null;\n }\n applyFilters();\n return;\n }\n\n boolean matchAny = MATCHANY.equals(searchSelected);\n\n if (searchFilter == null) {\n searchFilter = new CustomerListFilter();\n searchFilter.setOr(true);\n filterList.add(searchFilter);\n } else {\n searchFilter.getFilterList().clear();\n }\n if ((matchAny || SURNAME.equals(searchSelected))) {\n searchFilter.addFilter(a -> {\n String aSurname = a.getSurname().toUpperCase();\n return (aSurname.contains(searchText));\n });\n }\n if ((matchAny || FORENAME.equals(searchSelected))) {\n searchFilter.addFilter(a -> {\n String aForename = a.getForename().toUpperCase();\n return (aForename.contains(searchText));\n });\n }\n if (matchAny || CHILD.equals(searchSelected)) {\n searchFilter.addFilter(a -> {\n String aChildname = a.getChildrenProperty().getValue().toUpperCase();\n return (aChildname.contains(searchText));\n });\n }\n if ((matchAny || CARREG.equals(searchSelected))) {\n searchFilter.addFilter(a -> {\n String aCars = a.getCarRegProperty().getValue().toUpperCase();\n return (aCars.contains(searchText));\n });\n }\n // No filter to apply?\n if (searchFilter.getFilterList().size() == 0) {\n filterList.remove(searchFilter);\n searchFilter = null;\n }\n applyFilters();\n }",
"@Override\n\tpublic void build(Index index) {\n\t\tthis.indexdir = index.getPath();\n\t\tLuceneIndex luceneIndex = (LuceneIndex) index;\n\t\tthis.indexSearcher = new IndexSearcher(luceneIndex.getReader());\n\n\t}",
"String search(int key);",
"public static WikiSearch search(String term, JedisIndex index) \n\t{\n\t\tMap<String, Integer> intMap = index.getCounts(term);\n\t\tMap<String, Double> doubMap = new HashMap<String, Double>();\n\t\t\n\t\tSet<String> iter = intMap.keySet();\n\t\tfor(String url: iter)\n\t\t{\n\t\t\tdoubMap.put(url, (double)intMap.get(url));\n\t\t}\n\t\t\n\t\t\n\t\treturn new WikiSearch(doubMap);\n\t}",
"public static void main(String[] args) throws Exception {\n\t\tString index = args[0];\n\t\tString field = \"contents\";\n\t\tString queries = \"resources/query.txt\";\n\t\tString queryString = null;\n\t\tint hitsPerPage = 10;\n\n\t\tIndexReader reader = DirectoryReader.open(FSDirectory.open(new File(\n\t\t\t\tindex)));\n\t\tIndexSearcher searcher = new IndexSearcher(reader);\n\t\tFile stopWordsFile = new File(\"resources/stop.txt\");\n\t\tCharArraySet stopWordsCharArraySet = WordlistLoader.getWordSet(\n\t\t\t\tnew FileReader(stopWordsFile), Version.LUCENE_47);\n\t\tAnalyzer analyzer = new RomanianAnalyzerUsingAnotherConstructorForStopwordAnalyzer(\n\t\t\t\tVersion.LUCENE_47, stopWordsCharArraySet);\n\n\t\tBufferedReader in = null;\n\t\tin = new BufferedReader(new InputStreamReader(new FileInputStream(\n\t\t\t\tqueries), codification));\n\t\tQueryParser parser = new QueryParser(Version.LUCENE_47, field, analyzer);\n\t\twhile (true) {\n\t\t\tString line = in.readLine();\n\t\t\tif (line == null || line.length() == -1) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tline = line.trim();\n\t\t\tif (line.length() == 0) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tQuery query = parser.parse(line);\n\t\t\tSystem.out.println(\"Looking for: \" + query.toString(field));\n\t\t\tdoPagingSearch(in, searcher, query);\n\n\t\t\tif (queryString != null) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treader.close();\n\t}",
"@Test\n public void testQueryUsingIndex() throws Exception\n {\n TestBean testBean1 = new TestBean(\"test1\", \"another1\");\n TestBean testBean2 = new TestBean(\"test2\", \"another2\");\n TestBean testBean3 = new TestBean(\"test3\", \"another3\");\n\n IndexedArrayList<TestBean> testBeans = new IndexedArrayList<TestBean>(Arrays.asList(testBean1, testBean2, testBean3));\n testBeans.addIndex(\"getValue\");\n\n Queryable<TestBean, Predicate> queryable = new CollectionContext<TestBean, Predicate>(testBeans);\n assertEquals(Arrays.asList(testBean2, testBean3), queryable.select(or(eq(\"getValue\", \"test2\"), eq(\"getValue\", \"test3\"))));\n }",
"@Override\n\tprotected void executeSearch(String term) {\n\t\t\n\t}",
"@Override\n public List<SearchResult> search(String queryString, int k) {\n // TODO: YOUR CODE HERE\n\n // Tokenize the query and put it into a Set\n HashSet<String> tokenSet = new HashSet<>(Searcher.tokenize(queryString));\n\n /*\n * Section 1: FETCHING termId, termFreq and relevant docId from the Query\n */\n\n // Init a set to store Relevant Document Id\n HashSet<Integer> relevantDocIdSet = new HashSet<>();\n for (String token : tokenSet) { // Iterates thru all query tokens\n int termId;\n try {\n termId = indexer.getTermDict().get(token);\n } catch (NullPointerException e) { // In case current token is not in the termDict\n continue; // Skip this one\n }\n // Get the Posting associate to the termId\n HashSet<Integer> posting = indexer.getPostingLists().get(termId);\n relevantDocIdSet.addAll(posting); // Add them all to the Relevant Document Id set\n }\n\n /*\n * Section 2: Calculate Jaccard Coefficient between the Query and all POTENTIAL DOCUMENTS\n */\n\n // ArrayList for the Final Result\n ArrayList<SearchResult> searchResults = new ArrayList<>();\n for (Document doc : documents) { // Iterates thru all documents\n if (!relevantDocIdSet.contains(doc.getId())) { // If the document is relevant\n searchResults.add(new SearchResult(doc, 0)); // Add the document as a SearchResult with zero score\n } else {\n HashSet<String> termIdSet = new HashSet<>(doc.getTokens()); // Get the token set from the document\n\n // Calculate Jaccard Coefficient of the document\n double jaccardScore = JaccardMathHelper.calculateJaccardSimilarity(tokenSet, termIdSet);\n\n // Add the SearchResult with the computed Jaccard Score\n searchResults.add(new SearchResult(doc, jaccardScore));\n }\n }\n\n return TFIDFSearcher.finalizeSearchResult(searchResults, k);\n }",
"List<DataTerm> search(String searchTerm);",
"public createIndex_result(createIndex_result other) {\n }",
"private void search(String[] searchItem)\n {\n }",
"public abstract void updateIndex();",
"@Override\n public void updateItemSearchIndex() {\n try {\n // all item IDs that don't have a search index yet\n int[] allMissingIds = mDatabaseAccess.itemsDAO().selectMissingSearchIndexIds();\n // Selects the item to the id, extract all parts of the item name to create the\n // search index (all ItemSearchEntity's) and insert them into the database\n for (int missingId : allMissingIds) {\n try {\n ItemEntity item = mDatabaseAccess.itemsDAO().selectItem(missingId);\n List<ItemSearchEntity> searchEntities = createItemSearchIndex(item);\n mDatabaseAccess.itemsDAO().insertItemSearchParts(searchEntities);\n } catch (Exception ex) {\n Log.e(TAG, \"An error occurred trying to create the search index to the id\" +\n missingId, ex);\n }\n }\n } catch (Exception ex) {\n Log.e(TAG, \"A general failure has occurred while trying to load and process all \" +\n \"item IDs to generate a search index\", ex);\n }\n }",
"@Execute\n public HtmlResponse index(final SearchForm form) {\n return search(form);\n }",
"public void search() throws SQLException;",
"public abstract Solution<T> search(Searchable<T> s);",
"public int getIndex(int position);",
"@Override\r\n\tpublic <T> SearchResult<T> search(String index, String type, String query, Class<T> clz) throws ElasticSearchException{\r\n\t\tQuery esQuery = getQuery(this.indexName, type, query);\r\n\t\tQueryResponse response = query(esQuery);\r\n\t\t\r\n\t\tSearchResult<T> result = new SearchResult<T>();\t\t\r\n\t\tresult.setHits(response.getHits(clz));\r\n\t\t\r\n\t\tif(response.hasAggregations())\r\n\t\t\tresult.setAggregations(response.getAggregations());\r\n\t\t\r\n\t\treturn result;\r\n\t}",
"private void search(Object value)\r\n\t\t{\n\r\n\t\t}",
"OIterator<V> index(final int index) throws IndexOutOfBoundsException;",
"void compareSearch();",
"public static void main(String[] args) throws IOException {\n\t\tGenomindex index = new Genomindex(Files.readAllLines(FileSystems.getDefault().getPath(args[0]), StandardCharsets.UTF_8));\n\t\tSystem.out.println(index.search(Integer.parseInt(args[1]), Integer.parseInt(args[2]), Arrays.asList(args).subList(3, args.length)));\n\t}",
"public abstract int search(String[] words, String wordToFind) throws ItemNotFoundException;",
"public void searchTest() {\n\t\ttry {\n\t\t\tString keyword = \"操作道具\";\n\t\t\t// 使用IKQueryParser查询分析器构造Query对象\n\t\t\tQuery query = IKQueryParser.parse(LogsEntry.INDEX_FILED_CONTENT, keyword);\n\n\t\t\t// 搜索相似度最高的5条记录\n\t\t\tint querySize = 5;\n\t\t\tTopDocs topDocs = isearcher.search(query, null, querySize, sort);\n\t\t\tlogger.info(\"命中:{}\", topDocs.totalHits);\n\t\t\t// 输出结果\n\t\t\tScoreDoc[] scoreDocs = topDocs.scoreDocs;\n\t\t\tfor (int i = 0; i < scoreDocs.length; i++) {\n\t\t\t\tDocument targetDoc = isearcher.doc(scoreDocs[i].doc);\n\t\t\t\tlogger.info(\"内容:{}\", targetDoc.toString());\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\tlogger.error(e.getMessage(), e);\n\t\t}\n\t}",
"private int binarySearchByIndex(List<Span> spans, int index){\n int left = 0,right = spans.size() - 1,mid,row;\n int max = right;\n while(left <= right){\n mid = (left + right) / 2;\n if(mid < 0) return 0;\n if(mid > max) return max;\n row = spans.get(mid).startIndex;\n if(row == index) {\n return mid;\n }else if(row < index){\n left = mid + 1;\n }else{\n right = mid - 1;\n }\n }\n int result = Math.max(0,Math.min(left,max));\n while(result > 0) {\n if(spans.get(result).startIndex > index) {\n result--;\n }else{\n break;\n }\n }\n while(result < right) {\n if(getSpanEnd(result,spans) < index) {\n result++;\n }else{\n break;\n }\n }\n return result;\n }",
"StorableIndexInfo getIndexInfo();",
"public Iterable<Vertex> multiIndexSearch(Object searchObject){\n\t\treturn null;\n\t}",
"@Nullable\n public abstract Index getIndex();",
"private void getIndex(Message<JsonObject> msg, int timeout, JsonObject headers, String dbName) {\n // OPTIONAL (if not specified, then a specific index id should be provided)\n // The name of the collection for which to retrieve all indexes\n String collection = helper.getOptionalString(msg.body(), MSG_PROPERTY_COLLECTION);\n\n // OPTIONAL (if not specified, then a collection should be provided)\n // The id of the index that should be retrieved\n String id = helper.getOptionalString(msg.body(), MSG_PROPERTY_ID);\n\n // Either collection or id should be specified\n if (!ensureParameter(Arrays.asList(id, collection), Arrays.asList(MSG_PROPERTY_ID, MSG_PROPERTY_COLLECTION), msg)) return;\n \n // prepare PATH\n StringBuilder apiPath = new StringBuilder();\n if (dbName != null) apiPath.append(\"/_db/\").append(dbName); \n apiPath.append(API_PATH);\n if (id != null) {\n // retrieve specified index\n apiPath.append(\"/\").append(id);\n }\n else {\n // retrieve all indexes for specified collection\n apiPath.append(\"/?\").append(MSG_PROPERTY_COLLECTION).append(\"=\").append(collection);\n }\n \n httpGet(persistor, apiPath.toString(), headers, timeout, msg); \n }",
"Search getSearch();",
"@ZenCodeType.Operator(ZenCodeType.OperatorType.INDEXGET)\n default IData getAt(int index) {\n \n return notSupportedOperator(OperatorType.INDEXGET);\n }",
"public interface Indexed {\n\n /**\n * index keyword and resource\n * @param resourceId keyword KAD id\n * @param entry published entry with keyword information\n * @param lastActivityTime current time from external system\n * @return percent of taken place in storage\n */\n int addKeyword(final KadId resourceId, final KadSearchEntry entry, long lastActivityTime);\n\n /**\n *\n * @param resourceId file KAD id\n * @param entry published entry with source information\n * @return true if source was indexed\n */\n int addSource(final KadId resourceId, final KadSearchEntry entry, long lastActivityTime);\n}",
"void initiateIndexing(HarvestResultDTO harvestResult) throws DigitalAssetStoreException;",
"private void BinarySearch(Node node, int index) {\n Node left, right;\n left = node.left;\n right = node.right;\n\n int leftIndex = (2 * index) + 1;\n int rightIndex = (2 * index) + 2;\n if (left != null) {\n ArrayTree[leftIndex] = left.key;\n BinarySearch(left, leftIndex);\n lastIndex = Math.max(leftIndex, lastIndex);\n } else {\n if (leftIndex < ArrayTree.length - 1) {\n ArrayTree[leftIndex] = 0;\n }\n }\n\n if (right != null) {\n ArrayTree[rightIndex] = right.key;\n BinarySearch(right, rightIndex);\n lastIndex = Math.max(rightIndex, lastIndex);\n } else {\n if (rightIndex < ArrayTree.length - 1) {\n ArrayTree[rightIndex] = 0;\n }\n }\n }",
"public Collection search (String[] likeColumns, Object[] likeParams,\r\n\t\t\tString[] eqColumns, Object[] eqParams, int index, int offset) throws Exception{\r\n\r\n\t\tCriteria c = edcTerminalDao.getCriteria();\r\n\t\tDaoSupportUtil.setLikeParam(likeColumns,likeParams,c);\r\n\t\tDaoSupportUtil.setEqParam(eqColumns,eqParams,c);\r\n\t\tDaoSupportUtil.setLimit(index, offset, c);\r\n\t\tList list = c.list();\r\n\t\treturn list;\r\n\r\n\t}",
"public MagicSearch createMagicSearch();",
"@Test\n public void testCase4 () throws IOException {\n //\t\tlog.trace(\"Testcase4\");\n\n ki = new KrillIndex();\n ki.addDoc(createFieldDoc0());\n ki.commit();\n ki.addDoc(createFieldDoc1());\n ki.addDoc(createFieldDoc2());\n ki.commit();\n\n sq = new SpanSegmentQuery(new SpanElementQuery(\"base\", \"e\"),\n new SpanNextQuery(new SpanTermQuery(new Term(\"base\", \"s:a\")),\n new SpanTermQuery(new Term(\"base\", \"s:b\"))));\n\n kr = ki.search(sq, (short) 10);\n ki.close();\n\n assertEquals(\"totalResults\", kr.getTotalResults(), 2);\n // Match #0\n assertEquals(\"doc-number\", 0, kr.getMatch(0).getLocalDocID());\n assertEquals(\"StartPos\", 3, kr.getMatch(0).startPos);\n assertEquals(\"EndPos\", 5, kr.getMatch(0).endPos);\n // Match #1\n assertEquals(\"doc-number\", 0, kr.getMatch(1).getLocalDocID());\n assertEquals(\"StartPos\", 1, kr.getMatch(1).startPos);\n assertEquals(\"EndPos\", 3, kr.getMatch(1).endPos);\n }",
"public static void main(String[] args) throws IOException {\n\n //Reload indexes from file-system into memory as map data structure.\n System.out.println(\"Loading indexes in memory\");\n File file = new File(directoryPath + \"index.txt\");\n SearchQueries searchQueries = new SearchQueries();\n searchQueries.reLoadIndexesFromFileToIndexMap(file);\n\n System.out.println(\"Enter search query string\");\n Scanner scanner = new Scanner(System.in);\n String searchString = scanner.nextLine();\n\n System.out.println(\"Searching for matching documents...\");\n searchQueries.parseQueryStringAndSearch(searchString);\n\n searchQueries.printingSearchResults();\n\n\n }"
] |
[
"0.6816465",
"0.6741389",
"0.6634489",
"0.652847",
"0.6265293",
"0.62350297",
"0.62144226",
"0.62144226",
"0.61266434",
"0.61211956",
"0.61211956",
"0.61211956",
"0.61211956",
"0.61211956",
"0.61211956",
"0.61211956",
"0.61211956",
"0.61211956",
"0.61211956",
"0.61211956",
"0.61211956",
"0.61211956",
"0.60937566",
"0.6089444",
"0.60818964",
"0.60700494",
"0.60681707",
"0.60295194",
"0.60281485",
"0.6006938",
"0.59892094",
"0.59892094",
"0.59892094",
"0.59653324",
"0.5963069",
"0.594752",
"0.5942015",
"0.59288627",
"0.5908259",
"0.5893138",
"0.5891926",
"0.58897936",
"0.58701897",
"0.58646417",
"0.58645093",
"0.58598125",
"0.58554363",
"0.58434546",
"0.58357304",
"0.5833043",
"0.5821592",
"0.5815811",
"0.5813012",
"0.57829654",
"0.5781773",
"0.577409",
"0.57736504",
"0.5749401",
"0.57477814",
"0.5746214",
"0.57432306",
"0.57348347",
"0.5734753",
"0.5718687",
"0.57145417",
"0.57129276",
"0.5708666",
"0.56942093",
"0.56886685",
"0.5683111",
"0.5682797",
"0.56795913",
"0.5675726",
"0.56517345",
"0.5646868",
"0.5646346",
"0.5645861",
"0.5645357",
"0.56386596",
"0.5636485",
"0.56356364",
"0.56323653",
"0.5618118",
"0.56173825",
"0.56146085",
"0.5611027",
"0.56093156",
"0.56035215",
"0.5597177",
"0.55692965",
"0.5568044",
"0.55648834",
"0.5561646",
"0.55459446",
"0.5544619",
"0.5543759",
"0.55378807",
"0.5536797",
"0.5535873",
"0.5527089"
] |
0.6105234
|
22
|
performs search by name
|
public String searchByName(String name){
for(Thing things: everything){
if(things.getName().equalsIgnoreCase(name)){
return things.toString();
}
}
return "Cannot Find given Name";
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"@Override\n\tpublic void searchByName() {\n\t\tcount = 0;\n\t\tif (UtilityClinic.patFile == null) {\n\t\t\ttry {\n\t\t\t\tutil.accessExistingPatJson();\n\t\t\t} catch (FileNotFoundException e) {\n\t\t\t\tSystem.out.println(\"File not found\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tutil.readFromPatJson(UtilityClinic.patFile);\n\t\tSystem.out.println(\"Enter search.....\");\n\t\tString search = UtilityClinic.readString();\n\t\tSystem.out.println(\"Showing search result(s).......\");\n\t\tfor (int i = 0; i < UtilityClinic.patJson.size(); i++) {\n\t\t\tJSONObject jsnobj = (JSONObject) UtilityClinic.patJson.get(i);\n\t\t\tif (jsnobj.get(\"Patient's name\").toString().equals(search))\n\t\t\t\tSystem.out.print(\n\t\t\t\t\t\t++count + \" Name:\" + jsnobj.get(\"Patient's name\") + \" ID:\" + jsnobj.get(\"Patient's ID\")\n\t\t\t\t\t\t\t\t+ \" Mobile:\" + jsnobj.get(\"Mobile\") + \" Age:\" + jsnobj.get(\"Age\"));\n\t\t}\n\t\tif (count == 0) {\n\t\t\tSystem.out.println(\"No results found.....\");\n\t\t}\n\t}",
"abstract public void search();",
"public void search() {\r\n \t\r\n }",
"void search();",
"void search();",
"public void searchField(String name) {\r\n\t\tsafeType(addVehiclesHeader.replace(\"Add Vehicle\", \"Search\"), name);\r\n\t\t;\r\n\t}",
"public void doSearch(String searchText){\n }",
"public void search() {\n }",
"void searchView(String name);",
"@In String search();",
"public abstract T findByName(String name) ;",
"public void search() {\n String q = this.query.getText();\n String cat = this.category.getValue();\n if(cat.equals(\"Book\")) {\n searchBook(q);\n } else {\n searchCharacter(q);\n }\n }",
"public void searchByName(String name) {\n\t\ttry {\n\t\t\tBufferedReader reader = new BufferedReader(new FileReader(\"./src/data/contactInfo.text\"));\n\t\t\tString line;\n\t\t\twhile((line = reader.readLine()) != null){\n\t\t\t\tif(line.toLowerCase().contains(name.toLowerCase())) {\n\t\t\t\t\tSystem.out.println(line);\n\t\t\t\t}\n\t\t\t}\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}",
"abstract public boolean performSearch();",
"@Override\r\n\tpublic Customer search(String name) {\n\t\treturn null;\r\n\t}",
"void searchProbed (Search search);",
"@Override\n\t\t\tpublic void run() {\n\t\t\t\tdoSearch(name, count);\n\t\t\t}",
"private static void search_by_name() {\r\n\t\ttry (// Creates a connection and statement object\r\n\t\t\t\tConnection conn = DriverManager.getConnection(\"jdbc:mysql://localhost:3306/PoisedPMS\",\"poisedpms\",\"poisedpms\");\r\n\t\t\t\t\r\n\t\t\t\tStatement stmt = conn.createStatement();\r\n\t\t\t\t\r\n\t\t\t){\r\n\t\t\tScanner input = new Scanner(System.in);\r\n\t\t\r\n\t\t\tSystem.out.println(\"Project Name: \");\r\n\t\t\tString project_name = input.nextLine();\r\n\t\t\r\n\t\t\tString strSelectProject = String.format(\"SELECT * FROM projects INNER JOIN project_statuses ON \"\r\n\t\t\t\t\t+ \"projects.project_id = project_statuses.project_id;\");\r\n\t\t\tResultSet project_rset = stmt.executeQuery(strSelectProject);\r\n\t\t\t\r\n\t\t\tfetch_all_project_info(stmt, project_name, project_rset);\r\n\t\t/**\r\n\t\t * @exception If entered project name cannot be found in the projects table then an SQLException is thrown\r\n\t\t */\t\t\r\n\t\t} catch ( SQLException ex ) {\r\n\t\t\tex . printStackTrace ();\r\n\t\t}\r\n\t}",
"@Override\n\tpublic void search() {\n\t}",
"private static void searchStaffByName(){\n\t\tshowMessage(\"type the name you are looking for: \\n\");\n\t\tString name = getUserTextTyped();\n\t\tToScreen.listEmployee(EmployeeSearch.employee(employee.getAllEmployee(),name), true);\n\t\t\n\t\t//condition to do another search by name or go back to the main menu\n //if the user decide for doing another search the method is called again, otherwise it will go back to the main menu\n\t\tint tryAgain = askForGoMainMenu(\"Would you like to search for another name or go back to main menu?\\n Type 1 to search someone else \\n Type 0 to go to menu. \\n Choice: \");\n\t\tif(tryAgain == 1){\n\t\t\tsearchStaffByName();\n\t\t} else {\n\t\t\tmain();\n\t\t}\n\t}",
"private void search(String product) {\n // ..\n }",
"@Override\n\tprotected void executeSearch(String term) {\n\t\t\n\t}",
"public int search (String name) {\n int result = -1;\n int offset = 0;\n\n for (int i=9; i>-1; i--)\n {\n qLock[i].lock ();\n result = q[i].indexOf (name);\n if (result == -1)\n offset += q[i].size ();\n qLock[i].unlock ();\n if (result != -1)\n break;\n }\n\n if (result == -1)\n return result;\n\n return result + offset;\n }",
"@Override\n public List<Doctor> searchByName(String name) throws IOException, ClassNotFoundException {\n doctorList = FileSystem.readFile(file, Doctor.class);\n List<Doctor> searchList = search(doctorList, Doctor::getName, name);\n return searchList;\n }",
"List<DataTerm> search(String searchTerm);",
"private void searchFunction() {\n\t\t\r\n\t}",
"SearchResponse search(SearchRequest searchRequest) throws IOException;",
"public List<Product> search(String searchString);",
"@Override\r\n\tpublic void search() {\n\r\n\t}",
"void searchByName(String name) {\n\t\tint i=0;\n\t\t\tfor (Entity entity : Processing.nodeSet) {\n\t\t\t\t\n\t\t\t\t/* if Entity is person */\n\t\t\t\tif(entity instanceof Person) {\n\t\t\t\t\tPerson person=(Person)entity;\n\t\t\t\t\tif(person.getName().equalsIgnoreCase(name)){\n\t\t\t\t\tSystem.out.println(\"the person details are :\");\n\t\t\t\t\tSystem.out.println(\" name : \" + person.getName());\n\t\t\t\t\tSystem.out.println(\" phone : \" + person.getPhone());\n\t\t\t\t\tSystem.out.println(\" email : \" + person.getEmail());\n\t\t\t\t\tSystem.out.println(\" school : \" + person.getSchool());\n\t\t\t\t\tSystem.out.println(\" college : \" + person.getCollege() + \"\\n\");\n\t\t\t\t\t\tfor(String interest:person.getInterests()){\n\t\t\t\t\t\t\tSystem.out.println(\" interest in : \" +interest + \"\\n\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t/* If entity is organization */\n\t\t\t\telse {\n\t\t\t\t\tOrganization organization=(Organization)entity;\n\t\t\t\t\tif(organization.getName().equalsIgnoreCase(name)){\n\t\t\t\t\t\tSystem.out.println(\"the person details are :\");\n\t\t\t\t\t\tSystem.out.println(\" name : \" + organization.getName());\n\t\t\t\t\t\tSystem.out.println(\" phone : \" + organization.getPhone());\n\t\t\t\t\t\tSystem.out.println(\" email : \" + organization.getEmail());\n\t\t\t\t\t\tfor(String interest:organization.getCourses()){\n\t\t\t\t\t\t\tSystem.out.println(\" courses are : \" +interest + \"\\n\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfor(String interest:organization.getFaculty()){\n\t\t\t\t\t\t\tSystem.out.println(\" Faculties are : \" +interest + \"\\n\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfor(String interest:organization.getPlacements()){\n\t\t\t\t\t\t\tSystem.out.println(\" Placements are : \" +interest + \"\\n\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\ti++;\n\t\t\t}\n\t\t\tif(i>=Processing.nodeSet.size()) {//if no such name exist\n\t\t\t\tSystem.out.println(name+\" does not exist\");\n\t\t\t}\n\t}",
"@Override\r\n\tpublic List<User> search(String name) {\n\t\treturn null;\r\n\t}",
"private static void searchAnimalByName() {\n\t\tshowMessage(\"type in the animal's name: \\n\");\n\t\t\n\t\tString name = getUserTextTyped();\n\t\tToScreen.listAnimal(AnimalSearch.byName(name), true);\n\t\t\n\t\t//condition to do another search by name or go back to the main menu\n\t\t//if the user decide for doing another search the method is called again, otherwise it will go back to the main menu\n\t\tint tryAgain = askForGoMainMenu(\"Would you like to search for another name or go back to main menu?\\n Type 1 to search someone else \\n Type 0 to go to menu. \\n Choice: \");\n\t\tif(tryAgain == 1){\n\t\t\tsearchAnimalByName();\n\t\t} else {\n\t\t\tmain();\n\t\t}\n\t\t\n\t}",
"private void performSearch() {\n String text = txtSearch.getText();\n String haystack = field.getText();\n \n // Is this case sensitive?\n if (!chkMatchCase.isSelected()) {\n text = text.toLowerCase();\n haystack = haystack.toLowerCase();\n }\n \n // Check if it is a new string that the user is searching for.\n if (!text.equals(needle)) {\n needle = text;\n curr_index = 0;\n }\n \n // Grab the list of places where we found it.\n populateFoundList(haystack);\n \n // Nothing was found.\n if (found.isEmpty()) {\n Debug.println(\"FINDING\", \"No occurrences of \" + needle + \" found.\");\n JOptionPane.showMessageDialog(null, \"No occurrences of \" + needle + \" found.\",\n \"Nothing found\", JOptionPane.INFORMATION_MESSAGE);\n \n return;\n }\n \n // Loop back the indexes if we have reached the end.\n if (curr_index == found.size()) {\n curr_index = 0;\n }\n \n // Go through the findings one at a time.\n int indexes[] = found.get(curr_index);\n field.select(indexes[0], indexes[1]);\n curr_index++;\n }",
"private void searchRoutine() {\n String s = (String) JOptionPane.showInputDialog(\n this,\n \"Enter the name of the routine:\",\n \"Search\",\n JOptionPane.PLAIN_MESSAGE,\n null, null, null);\n\n if (s != null) {\n try {\n Routine r = collection.search(s);\n list.setSelectedValue(r, true);\n } catch (DoesNotExistException ee) {\n JOptionPane.showMessageDialog(this, \"Routine with given name does not exist.\");\n }\n }\n }",
"private Node search(String name)\r\n\t{\r\n\t\t// Check to see if the list is empty\r\n\t\tif(isEmpty())\r\n\t\t{\r\n\t\t\t// Return null which will be checked for by the method that called it\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\t// Tree is not empty so use the recursive search method starting at the root reference \r\n\t\t// to find the correct Node containing the String name\r\n\t\treturn search(getRoot(), name);\r\n\t}",
"Search getSearch();",
"public Service consultName(String name){\r\n \tCriteria criteria = session.createCriteria(Service.class);\r\n \tcriteria.add(Restrictions.like(\"name\",name));\r\n \treturn (Service)criteria.list().get(0);\r\n }",
"ResultSet searchName(String name) {\n \ttry {\n \t\tStatement search = this.conn.createStatement();\n \tString query = \"SELECT * FROM Pokemon WHERE Name = \" + \"'\" + name + \"'\";\n \t\n \treturn search.executeQuery(query);\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t\treturn null;\n\t\t}\n }",
"@RequestMapping(value=\"/search\",method=RequestMethod.GET)\r\n\tpublic List<ProductBean> searchByProductName(String name)throws SearchException {\r\n\t\treturn service.searchProductByName(name); \r\n\t}",
"public void findByName() {\n String name = view.input(message_get_name);\n if (name != null){\n try{\n List<Customer> list = model.findByName(name);\n if(list!=null)\n if(list.isEmpty())\n view.showMessage(not_found_name);\n else\n view.showTable(list);\n else\n view.showMessage(not_found_error);\n }catch(Exception e){\n view.showMessage(incorrect_data_error);\n }\n } \n }",
"public List<Component> searchComponent(String name) {\n\t\treturn sessionFactory.getCurrentSession().createQuery(\"from Component c where c.name like '%\"+name+\"%'\")\n\t\t.setMaxResults(10)\n\t\t.list();\n\t}",
"public static void search(String searchInput)\n {\n if (!searchInput.isEmpty())\n {\n searchInput = searchInput.trim();\n if (mNameSymbol.containsKey(searchInput))\n {\n //Returns list of stock symbols associated with company name\n List<String> lstTickerSymbols = mNameSymbol.get(searchInput);\n displayResults(lstTickerSymbols, searchInput);\n }\n else\n {\n Set<String> setNames = mNameSymbol.keySet();\n Iterator iterator = setNames.iterator();\n boolean matchMade = false;\n while (iterator.hasNext())\n {\n String storedName = (String)iterator.next();\n Float normalizedMatch = fuzzyScore(storedName, searchInput);\n if (normalizedMatch >= MIN_MATCH) \n {\n //Returns list of stock symbols associated with company name\n List<String> lstTickerSymbols = mNameSymbol.get(storedName);\n displayResults(lstTickerSymbols, storedName);\n matchMade = true;\n }\n }\n if (matchMade == false)\n {\n displayNoResults();\n }\n }\n }\n else\n {\n displayNoResults();\n }\n }",
"public void searchSong(String name)\n {\n for(int i=0; i<songs.size(); i++)\n if(songs.get(i).getFile().contains(name) || songs.get(i).getSinger().contains(name))\n {\n System.out.print((i+1) + \"- \");\n listSong(i);\n\n }\n }",
"public static void searchName(Contact[] myContacts, String find)\n {\n int high = myContacts.length;\n int low = -1;\n int probe;\n while(high - low > 1)\n {\n probe = (high+low)/2;\n if(myContacts[probe].getName().compareTo(find) > 0)\n {\n high = probe;\n }\n else\n {\n low = probe;\n if(myContacts[probe].getName().compareTo(find) == 0)\n {\n break;\n }\n }\n }\n System.out.println(\"Find results: \");\n if((low>=0)&&(myContacts[low].getName().compareTo(find) == 0))\n {\n findMoreNames(myContacts, low, find);\n }\n else\n {\n System.out.println(\"There are no listings for \"+find);\n }\n }",
"public List<T> findByName(String text) {\n\t Query q = getEntityManager().createQuery(\"select u from \" + getEntityClass().getSimpleName() + \" u where u.name like :name\");\n\t q.setParameter(\"name\", \"%\" + text + \"%\");\n\t return q.getResultList();\n\t }",
"public abstract S getSearch();",
"private void searchPerson(String searchName){\r\n\r\n textAreaFromSearch.setText(\"\");\r\n try{\r\n Scanner scanner = new Scanner(file);\r\n String info;\r\n\r\n while (scanner.hasNext()){\r\n String line = scanner.nextLine();\r\n String[] components = line.split(separator);\r\n if (searchName.length() == 0){\r\n return;\r\n }\r\n if (components[0].contains(searchName)){\r\n info = \" Name: \" + components[0] + \"\\n\";\r\n info += \" Phone No.: \"+components[1]+\"\\n\";\r\n info += \" Email: \"+components[2]+\"\\n\";\r\n info += \" Address: \"+components[3]+\"\\n\";\r\n textAreaFromSearch.append(info+\"\\n\");\r\n }\r\n }\r\n }catch (IOException e){\r\n fileError();\r\n }\r\n }",
"Object find(String name);",
"private void search(String[] searchItem)\n {\n }",
"List<SearchResult> search(SearchQuery searchQuery);",
"public void searchByName() {\n System.out.println(\"enter a name to search\");\n Scanner sc = new Scanner(System.in);\n String fName = sc.nextLine();\n Iterator itr = list.iterator();\n while (itr.hasNext()) {\n Contact person = (Contact) itr.next();\n if (fName.equals(person.getFirstName())) {\n List streamlist = list.stream().\n filter(n -> n.getFirstName().\n contains(fName)).\n collect(Collectors.toList());\n System.out.println(streamlist);\n }\n }\n }",
"private static void searchForItem() {\r\n\t\tSystem.out.println(\"******************************************************************************************\");\r\n\t\tSystem.out.println(\" Please type your search queries\");\r\n\t\tSystem.out.println();\r\n\t\tString choice = \"\";\r\n\t\tif (scanner.hasNextLine()) {\r\n\t\t\tchoice = scanner.nextLine();\r\n\t\t}\r\n\t\t//Currently only supports filtering by name\r\n\t\tSystem.out.println();\r\n\t\tSystem.out.println(\" All products that matches your search are as listed\");\r\n\t\tSystem.out.println();\r\n\t\tSystem.out.println(\" Id|Name |Brand |Price |Total Sales\");\r\n\t\tint productId = 0;\r\n\t\tfor (Shop shop : shops) {\r\n\t\t\tint l = shop.getAllSales().length;\r\n\t\t\tfor (int j = 0; j < l; j++) {\r\n\t\t\t\tif (shop.getAllSales()[j].getName().contains(choice)) {\r\n\t\t\t\t\tprintProduct(productId, shop.getAllSales()[j]);\r\n\t\t\t\t}\r\n\t\t\t\tproductId++;\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"List<Card> search(String searchString) throws PersistenceCoreException;",
"List<PilotContainer> Search(String cas, String word);",
"public PageBean<Match> find(String name) {\n\t\tif(name==null||\"\".equals(name.trim())){\r\n\t\t\treturn matchDao.find(\"from Match\");\r\n\t\t}else{\r\n\t\t\treturn matchDao.find(\"from Match where nickname like ? or userName like ?\",\r\n\t\t\t\t\tnew Object[]{\"%\"+name+\"%\",\"%\"+name+\"%\"});\r\n\t\t\t\r\n\t\t}\r\n\t}",
"public String searchPerson(String name){\n String string = \"\";\n ArrayList<Person> list = new ArrayList<Person>();\n \n for(Person person: getPersons().values()){\n String _name = person.getName();\n if(_name.contains(name)){\n list.add(person);\n }\n }\n list.sort(Comparator.comparing(Person::getName));\n for (int i = 0; i < list.size(); i++){\n string += list.get(i).toString();\n }\n\n return string;\n }",
"public SearchResponse search(SearchRequest request) throws SearchServiceException;",
"List<Item> findByNameContainingIgnoreCase(String name);",
"public List<Contact> getAllContactsByName(String searchByName);",
"private void search(Object value)\r\n\t\t{\n\r\n\t\t}",
"@RequestMapping(\"/search\")\n public Collection<Employee> findByName(@RequestParam(\"name\") String name){\n return employeeService.findByName(name);\n }",
"public void search(Map<String, String> searchParam);",
"public DynamicMethod searchMethod(String name) {\n return searchWithCache(name).method;\n }",
"private Node search(Node traverse, String name)\r\n\t{\t\r\n\t\t// Haven't reached a dead-end yet\r\n\t\tif(traverse != null)\r\n\t\t{\r\n\t\t\t// Check to see if the current Node matches the String\r\n\t\t\tif(name.equalsIgnoreCase(traverse.getName()))\r\n\t\t\t{\r\n\t\t\t\t// return the location of the node\r\n\t\t\t\treturn traverse;\r\n\t\t\t}\r\n\t\t\t// The name is lexicographically less than the current Node's name\r\n\t\t\telse if(name.compareToIgnoreCase(traverse.getName()) < 0)\r\n\t\t\t{\r\n\t\t\t\t// Keep searching through the left subtree\r\n\t\t\t\treturn search(traverse.getLeftChild(), name); \r\n\t\t\t}\r\n\t\t\t// The name is lexicographically greater than the current Node's name\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t// Keep searching through the right subtree\r\n\t\t\t\treturn search(traverse.getRightChild(), name);\r\n\t\t\t}\r\n\t\t}\t\r\n\t\t// Node not found in the Binary Tree\r\n\t\treturn null;\r\n\t}",
"public Handle search(String name) {\n int homePos = hash(table, name);\n int pos;\n\n // QUADRATIC PROBE\n for (int i = 0; i < table.length; i++) {\n // possibly iterate over entire table, but will\n // likely stop before then\n pos = (homePos + i * i) % table.length;\n if (table[pos] == null) {\n break;\n }\n else if (table[pos] != GRAVESTONE\n && table[pos].getStringAt().equals(name)) {\n return table[pos];\n }\n } // end for\n\n return null;\n }",
"@Override\r\n\tpublic Userinfo findbyname(String name) {\n\t\treturn userDAO.searchUserByName(name);\r\n\t}",
"private void search(ActionEvent x) {\n\t\tString text = this.searchText.getText();\n\t\tif (text.equals(\"\")) {\n\t\t\tupdate();\n\t\t\treturn;\n\t\t}\n\t\tboolean flag = false;\n\t\tfor (Project p : INSTANCE.getProjects()) {\n\t\t\tif (p.getName().indexOf(text) != -1) {\n\t\t\t\tif (!flag) {\n\t\t\t\t\tthis.projects.clear();\n\t\t\t\t\tflag = true;\n\t\t\t\t}\n\t\t\t\tthis.projects.addElement(p);\n\t\t\t}\n\t\t}\n\n\t\tif (!flag) {\n\t\t\tINSTANCE.getCurrentUser().sendNotification(new Notification((Object) INSTANCE, \"No results\"));\n\t\t\tthis.searchText.setText(\"\");\n\t\t}\n\t}",
"Customer search(String login);",
"@Action\r\n public String search() {\n ServiceFunctions.clearCache();\r\n\r\n if (isAdmin()) {\r\n return adminSearch();\r\n }\r\n\r\n return publicSearch();\r\n }",
"List<Employee> findByNameContaining(String keyword, Sort sort);",
"@Query(\"select i from Item i where lower(i.name) like lower(:namePart)\")\n List<Item> searchInNames(@Param(\"namePart\") String namePart);",
"public List<MmathFighter> searchByName(String name) {\n String searchQuery = \"%\" + name + \"%\";\n\n String[] nameSplit = name.split(\" \");\n ExecutorService exec = Executors.newFixedThreadPool(nameSplit.length + 2);\n\n List<Future<List<MmathFighter>>> futures = new ArrayList<>();\n\n futures.add(exec.submit(() -> getDsl().select().from(FIGHTERS)\n .where(FIGHTERS.NAME.like(searchQuery))\n .orderBy(FIGHTERS.SEARCH_RANK)\n .limit(10)\n .fetch(recordMapper)));\n\n futures.add(exec.submit(() -> getDsl().select().from(FIGHTERS)\n .where(FIGHTERS.NICKNAME.like(searchQuery))\n .orderBy(FIGHTERS.SEARCH_RANK)\n .limit(10)\n .fetch(recordMapper)));\n\n if (nameSplit.length > 1) {\n futures.addAll(\n Stream.of(nameSplit)\n .map(s -> exec.submit(() -> getDsl().select().from(FIGHTERS)\n .where(FIGHTERS.NAME.like(s))\n .or(FIGHTERS.NICKNAME.like(s))\n .orderBy(FIGHTERS.SEARCH_RANK)\n .limit(10)\n .fetch(recordMapper)\n )).collect(Collectors.toList())\n );\n }\n return futures.stream()\n .flatMap(f -> {\n try {\n return f.get().stream();\n } catch (InterruptedException | ExecutionException e) {\n return null;\n }\n })\n .filter(s -> s != null)\n .filter(distinctByKey(MmathFighter::getSherdogUrl)).limit(10).collect(Collectors.toList());\n }",
"SearchResultCompany search(String keywords);",
"protected final void searchForText() {\n Logger.debug(\" - search for text\");\n final String searchText = theSearchEdit.getText().toString();\n\n MultiDaoSearchTask task = new MultiDaoSearchTask() {\n @Override\n protected void onSearchCompleted(List<Object> results) {\n adapter.setData(results);\n }\n\n @Override\n protected int getMinSearchTextLength() {\n return 0;\n }\n };\n task.readDaos.add(crDao);\n task.readDaos.add(monsterDao);\n task.readDaos.add(customMonsterDao);\n task.execute(searchText.toUpperCase());\n }",
"@FXML\n private void searchName() {\n raise(new SearchNameEvent(name.getText()));\n }",
"public static void search() {\n int userSelected = selectFromList(crudParamOptions);\n switch (userSelected){\n case 1:\n searchFirstName();\n break;\n case 2:\n searchLastName();\n break;\n case 3:\n searchPhone();\n break;\n case 4:\n searchEmail();\n break;\n default:\n break;\n }\n }",
"@GET\n @Path(\"/searchArtist/{searchName}\")\n public List<ArtistDTO> searchArtist(@PathParam(\"searchName\") String name) {\n return artistLogic.findByName(name);\n }",
"private void handleFindByName(String[] args) {\n if (args.length < 3) {\n String requiredArgs = \"<name>\";\n Messages.badNumberOfArgsMessage(args.length, FIND_BY_NAME_OPERATION, requiredArgs);\n System.exit(1);\n }\n String name = args[2];\n\n Client client = ClientBuilder.newBuilder().build();\n WebTarget webTarget = client.target(\"http://localhost:8080/pa165/rest/bricks\").queryParam(\"name\", name);\n webTarget.register(auth);\n Invocation.Builder invocationBuilder = webTarget.request();\n invocationBuilder.header(\"accept\", MediaType.APPLICATION_JSON);\n\n Response response = invocationBuilder.get();\n\n if (response.getStatus() == Response.Status.OK.getStatusCode()) {\n // return list\n List<BrickDto> brickDtoList = response.readEntity(new GenericType<List<BrickDto>>() {\n });\n System.out.println(\"Number of bricks returned: \" + brickDtoList.size());\n\n for (BrickDto b : brickDtoList) {\n System.out.println(b);\n }\n } else {\n // server error\n System.out.println(\"Error on server, server returned \" + response.getStatus());\n }\n }",
"@RequestMapping(value = \"/search/{name}\", method = RequestMethod.GET)\n\tpublic @ResponseBody List<Person> findByName(@PathVariable final String name) {\n\t\tlogger.info(\"Find person phones by name\");\n\t\treturn this.phoneBookService.findByName(name);\n\t}",
"@Override\n\tpublic void searchByMobile() {\n\t\tcount = 0;\n\t\tif (UtilityClinic.patFile == null) {\n\t\t\ttry {\n\t\t\t\tutil.accessExistingPatJson();\n\t\t\t} catch (FileNotFoundException e) {\n\t\t\t\tSystem.out.println(\"File not found\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tutil.readFromPatJson(UtilityClinic.patFile);\n\t\tSystem.out.println(\"Enter search.....\");\n\t\tString search = UtilityClinic.readString();\n\t\tSystem.out.println(\"Showing search result(s).......\");\n\t\tfor (int i = 0; i < UtilityClinic.patJson.size(); i++) {\n\t\t\tJSONObject jsnobj = (JSONObject) UtilityClinic.patJson.get(i);\n\t\t\tif (jsnobj.get(\"Mobile\").toString().equals(search)) {\n\t\t\t\tpMob = jsnobj.get(\"Mobile\").toString();\n\t\t\t\tpName = jsnobj.get(\"Patient's name\").toString();\n\t\t\t\tpId = jsnobj.get(\"Patient's ID\").toString();\n\t\t\t\tSystem.out.print(++count + \" Name:\" + pName + \" ID:\" + pId + \" Mobile:\" + pMob + \" Age:\"\n\t\t\t\t\t\t+ jsnobj.get(\"Age\") + \"\\n\\n\");\n\t\t\t}\n\t\t}\n\t\tif (count == 0) {\n\t\t\tSystem.out.println(\"No results found.....\");\n\t\t}\n\t\tSystem.out.println();\n\t}",
"private List<States> simulateSearchResult(String searchName) {\n\t\t\n\t\tList<States> result = new ArrayList<States>();\n\t\t\n\t\ttry {\n\t\t\tList<States> statelist = stateService.getAllStates();\n\t\t\t// iterate a list and filter by tagName\n\t\t\tfor (States obj : statelist) {\n\t\t\t\tif (obj.getStateName().contains(searchName) || obj.getStateCode().contains(searchName)) {\n\t\t\t\t\tresult.add(obj);\n\t\t\t\t}\n\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\n\t\treturn result;\n\t}",
"@Override\n\tpublic void searchByID() {\n\t\tcount = 0;\n\t\tif (UtilityClinic.patFile == null) {\n\t\t\ttry {\n\t\t\t\tutil.accessExistingPatJson();\n\t\t\t} catch (FileNotFoundException e) {\n\t\t\t\tSystem.out.println(\"File not found\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tutil.readFromPatJson(UtilityClinic.patFile);\n\t\tSystem.out.println(\"Enter search.....\");\n\t\tString search = UtilityClinic.readString();\n\t\tSystem.out.println(\"Showing search result(s).......\");\n\t\tfor (int i = 0; i < UtilityClinic.patJson.size(); i++) {\n\t\t\tJSONObject jsnobj = (JSONObject) UtilityClinic.patJson.get(i);\n\t\t\tif (jsnobj.get(\"Patient's ID\").toString().equals(search))\n\t\t\t\tSystem.out.print(\n\t\t\t\t\t\t++count + \" Name:\" + jsnobj.get(\"Patient's name\") + \" ID:\" + jsnobj.get(\"Patient's ID\")\n\t\t\t\t\t\t\t\t+ \" Mobile:\" + jsnobj.get(\"Mobile\") + \" Age:\" + jsnobj.get(\"Age\"));\n\t\t}\n\t\tif (count == 0) {\n\t\t\tSystem.out.println(\"No results found.....\");\n\t\t}\n\t\tSystem.out.println();\n\t}",
"List<Corretor> search(String query);",
"public void setSearchName(String name) {\n\n searchName = \"&q=\" + name;\n System.out.println(\"searchName changing = \" + searchName);\n }",
"public SearchResult search(String text, String subText);",
"public void doSearch(String query)\n \t{\n \t\tlistener.onQueryTextSubmit(query);\n \t}",
"@Override\n\t@Transactional\n\tpublic List<IoMember> searchMember(String name) {\n\t\treturn memberDao.searchMember(name);\n\t}",
"@Override\n\tpublic List<Product> findByName(String term) {\n\t\treturn productDAO.findByNameLikeIgnoreCase(\"%\" + term + \"%\");\n\t}",
"public List<Product> getProductBySearchName(String search) {\r\n List<Product> list = new ArrayList<>();\r\n String query = \"select * from Trungnxhe141261_Product\\n \"\r\n + \"where [name] like ? \";\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, \"%\" + search + \"%\");\r\n rs = ps.executeQuery();\r\n while (rs.next()) {\r\n list.add(new Product(rs.getInt(1),\r\n rs.getString(2),\r\n rs.getString(3),\r\n rs.getDouble(4),\r\n rs.getString(5),\r\n rs.getString(6)));\r\n }\r\n } catch (Exception e) {\r\n }\r\n return list;\r\n }",
"Page<Contact> searchContactsByName(String name, int index, int size);",
"public void namedQuery(String name) throws HibException;",
"@Override\n public List<Client> filterByName(String searchString){\n log.trace(\"filterByName -- method entered\");\n Iterable<Client> clients = clientRepository.findAll();\n List<Client> result = StreamSupport.stream(clients.spliterator(),false).filter((c)->c.getName().contains(searchString)).collect(Collectors.toList());\n log.trace(\"filterByName: result = {}\", result);\n return result;\n\n }",
"public abstract int search(String[] words, String wordToFind) throws ItemNotFoundException;",
"@Override\n \tpublic ArrayList<Object> searchPostByName(String search) {\n\t\t\n\t\tSystem.out.println(\"i am in service search looking for cool posts\" + search);\n\t\t\n\t\tif(search == null){\n\t\t\treturn null;\n\t\t}\n\t\t\n\t\tArrayList<Object> list = null; //postRepository.findPostByName(search); ****Nick set this to null; otherwise it failed. Needs corrected in future\n\t\t\n\t\t//System.out.println(Arrays.toString(list));\n\t\treturn list;\n\t}",
"@Override\n public String search(String word) {\n return search(word, root);\n }",
"public void search( final String haystack ) {\n search( mNeedle, haystack );\n }",
"private void filterPerName(EntityManager em) {\n System.out.println(\"Please enter the name: \");\n Scanner sc = new Scanner(System.in);\n //Debug : String name = \"Sel\";\n\n String name = sc.nextLine();\n\n TypedQuery<Permesso> query = em.createQuery(\"select p from com.hamid.entity.Permesso p where p.nome like '%\"+ name\n + \"%'\" , Permesso.class);\n\n List<Permesso> perList = query.getResultList();\n\n for (Permesso p : perList) {\n System.out.println(p.getNome());\n }\n }",
"List<Cloth> findByNameContaining(String name);",
"public static void searchFriends(String name) {\n\t\tScanner reader = new Scanner(System.in);\t\n\t\tSystem.out.println(\"Please Enter the Profile Name of the Person you need to Search\");\n\t\tString profilename = reader.nextLine();\n\t\t\n\t\t\n\t\tif(profiles.get(index.indexOf(name)).searchFriends(profilename)) {\n\t\t\tSystem.out.println(\"Yes \" + name + \" is a friend of \"+ profilename);\t\n\t\t}else {\n\t\t\tSystem.out.println(\"No \" + name + \" is not a friend of \"+ profilename);\n\t\t}\n\t\t\n\t\tSystem.out.println(\"Click Enter to go back to Menu\");\n\t\t\n\t\tString input = reader.nextLine();\n\n\t\t\t\n\t\n\t}",
"public void performSearch() {\n History.newItem(MyWebApp.SEARCH_RESULTS);\n getMessagePanel().clear();\n if (keywordsTextBox.getValue().isEmpty()) {\n getMessagePanel().displayMessage(\"Search term is required.\");\n return;\n }\n mywebapp.getResultsPanel().resetSearchParameters();\n //keyword search does not restrict to spots\n mywebapp.addCurrentLocation();\n if (markFilterCheckbox != null) {\n mywebapp.getResultsPanel().getSearchParameters().setLicensePlate(markFilterCheckbox.getValue());\n }\n if (contestFilterCheckbox != null) {\n mywebapp.getResultsPanel().getSearchParameters().setContests(contestFilterCheckbox.getValue());\n }\n if (geoFilterCheckbox != null) {\n mywebapp.getResultsPanel().getSearchParameters().setGeospatialOff(!geoFilterCheckbox.getValue());\n }\n if (plateFilterCheckbox != null) {\n mywebapp.getResultsPanel().getSearchParameters().setLicensePlate(plateFilterCheckbox.getValue());\n }\n if (spotFilterCheckbox != null) {\n mywebapp.getResultsPanel().getSearchParameters().setSpots(spotFilterCheckbox.getValue());\n }\n String color = getValue(colorsListBox);\n mywebapp.getResultsPanel().getSearchParameters().setColor(color);\n String manufacturer = getValue(manufacturersListBox);\n if (manufacturer != null) {\n Long id = new Long(manufacturer);\n mywebapp.getResultsPanel().getSearchParameters().setManufacturerId(id);\n }\n String vehicleType = getValue(vehicleTypeListBox);\n mywebapp.getResultsPanel().getSearchParameters().setVehicleType(vehicleType);\n// for (TagHolder tagHolder : tagHolders) {\n// mywebapp.getResultsPanel().getSearchParameters().getTags().add(tagHolder);\n// }\n mywebapp.getResultsPanel().getSearchParameters().setKeywords(keywordsTextBox.getValue());\n mywebapp.getMessagePanel().clear();\n mywebapp.getResultsPanel().performSearch();\n mywebapp.getTopMenuPanel().setTitleBar(\"Search\");\n //mywebapp.getResultsPanel().setImageResources(resources.search(), resources.searchMobile());\n }"
] |
[
"0.75640273",
"0.72418076",
"0.72114253",
"0.72078055",
"0.72078055",
"0.7206149",
"0.70669556",
"0.7045107",
"0.7013235",
"0.69441694",
"0.68992275",
"0.6888627",
"0.68873686",
"0.68384075",
"0.6824488",
"0.6806368",
"0.67288435",
"0.67167294",
"0.6703564",
"0.6701509",
"0.6696105",
"0.66814643",
"0.66809875",
"0.6678897",
"0.6666372",
"0.66364765",
"0.6624818",
"0.6616722",
"0.66032356",
"0.6594544",
"0.65920085",
"0.6584073",
"0.6570091",
"0.65428805",
"0.6530641",
"0.6491896",
"0.64775455",
"0.6471992",
"0.64696294",
"0.64572877",
"0.64504355",
"0.64431953",
"0.64265656",
"0.64217305",
"0.6407805",
"0.63968414",
"0.6391967",
"0.6381892",
"0.637812",
"0.63576937",
"0.6346187",
"0.6339144",
"0.63366365",
"0.633577",
"0.6334164",
"0.6333184",
"0.63225895",
"0.63121146",
"0.6310996",
"0.63087064",
"0.6296567",
"0.62956965",
"0.62918377",
"0.6291381",
"0.62687576",
"0.6233257",
"0.6227714",
"0.62244636",
"0.62120974",
"0.62118554",
"0.62061954",
"0.62029",
"0.6199466",
"0.61961526",
"0.619176",
"0.6174097",
"0.61728853",
"0.61715406",
"0.6167341",
"0.6158796",
"0.6154503",
"0.6151373",
"0.6145237",
"0.6135959",
"0.61289775",
"0.61282605",
"0.61137074",
"0.61097705",
"0.61076593",
"0.6100236",
"0.60986227",
"0.6095928",
"0.6084837",
"0.60842955",
"0.6081945",
"0.60810924",
"0.60795116",
"0.60661715",
"0.6057555",
"0.6056849"
] |
0.72095424
|
3
|
TODO Autogenerated method stub
|
@Override
public void init() throws RemoteException {
try {
File f5 = new File("TxtData/warein.txt");
FileWriter fw5 = new FileWriter(f5);
BufferedWriter bw1 = new BufferedWriter(fw5);
bw1.write("");
} catch (Exception e) {
}
}
|
{
"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 insert(WareInListPO po) throws RemoteException {
File Arrivalfile = new File("TxtData/warein.txt");
if (po == null) {
System.out.println("WAREINLIST IS NOTHING");
}
if (po != null) {
try {
OutputStreamWriter itemWriter = new OutputStreamWriter(new FileOutputStream(Arrivalfile, true),
"UTF-8");
itemWriter.write(po.getId() + "");
itemWriter.write(":");
itemWriter.write(po.getTime() + "");
itemWriter.write(":");
itemWriter.write(po.getDestination().toString());
itemWriter.write(":");
itemWriter.write(po.getPlace().getQu() + "");
itemWriter.write("-");
itemWriter.write(po.getPlace().getPai() + "");
itemWriter.write("-");
itemWriter.write(po.getPlace().getJia() + "");
itemWriter.write("-");
itemWriter.write(po.getPlace().getWei() + "");
itemWriter.write(":");
itemWriter.write(po.getState().toString());
itemWriter.write(":");
itemWriter.write(po.getTranscenterid() + "");
itemWriter.write(":");
itemWriter.write(po.getVehicle().toString());
itemWriter.write("\r\n");
itemWriter.close();
} catch (FileNotFoundException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}
|
{
"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 ArrayList<GarageBodyPO> findWareIn(TimePO start, TimePO end, long centerid)
throws RemoteException, IOException {
ArrayList<GarageBodyPO> list = new ArrayList<GarageBodyPO>();
FileReader fr = null;
try {
fr = new FileReader("TxtData/warein.txt");
} catch (FileNotFoundException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
BufferedReader br = null;
br = new BufferedReader(fr);
String Line = null;
try {
Line = br.readLine();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
while (Line != null) {
String output[] = Line.split(":");
String t[] = output[3].split("-");
TimePO a = TimePO.toTime(output[1]);
if (output[5].equals(String.valueOf(centerid)) && a.biggerthan(start) && end.biggerthan(a)) {
garageitem item = new garageitem(TimePO.toTime(output[1]), Long.parseLong(output[0]));
GaragePlacePO place = new GaragePlacePO(Integer.parseInt(t[0]), Integer.parseInt(t[1]),
Integer.parseInt(t[2]), Integer.parseInt(t[3]));
GarageBodyPO body = new GarageBodyPO(place, item);
list.add(body);
}
Line = br.readLine();
if (Line == null) {
System.out.println("WAREIN NOT EXIST!");
}
}
return list;
}
|
{
"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
|
We want to allow support for the creator of a domain to supply a id. However, once it's been created and the id has been set, we cannot change it.
|
public void setId(String id) {
if (this.id == null) {
this.id = id;
}
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public Object prepareDomainObjectDynamicallyUsingIdAndClassNameWithPkg(String domain, Long id)\n\t\t\tthrows ClassNotFoundException, InstantiationException, IllegalAccessException, NoSuchMethodException,\n\t\t\tSecurityException, IllegalArgumentException, InvocationTargetException {\n\n\t\tString className = domain.trim();\n\t\tClass clz = Class.forName(className);\n\t\tObject object = clz.newInstance();\n\t\t// with single parameter, return void\n\t\tString methodName = \"setId\";\n\t\tMethod setNameMethod = object.getClass().getMethod(methodName, Long.class);\n\t\tsetNameMethod.invoke(object, id); // pass arg\n\t\treturn object;\n\t}",
"public Target setDomainId(String domain) {\n if (Strings.isValid(domain)) {\n this.domain = domain;\n }\n logger.trace(\"target '{}' is under domain '{}'\", id, this.domain);\n return this;\n }",
"Company getOrCreateCompanyId(String companyID) throws Exception;",
"public String getDomainId() {\n return domain;\n }",
"String getExistingId();",
"Id createId();",
"WithCreate withIdProvider(String idProvider);",
"public void setDomainId(String domainId) {\n this.domainId = domainId;\n }",
"String getCreatorId();",
"public Long getDomainId() {\n return domainId;\n }",
"public Long getDomainId() {\n return domainId;\n }",
"II addId();",
"public String getDomainId() {\n return this.domainId;\n }",
"public void setDomainId(String domainId) {\n this.domainId = domainId;\n }",
"public Long getDomainObjectId()\r\n\t{\r\n\t\treturn this.domainObjectId;\r\n\t}",
"DomainNumber createDomainNumber();",
"void addId(II identifier);",
"public interface DomainObject {\n\n /**\n * @return The unique identifier for a persisted object.\n */\n Long getId();\n\n /**\n * Sets the unique identifier for an object.\n * @param id The unique ID to be associated with this object.\n */\n void setId(Long id);\n}",
"public void setDomainId(Long domainId) {\n this.domainId = domainId;\n }",
"public void setDomainId(Long domainId) {\n this.domainId = domainId;\n }",
"public void assignId(int id);",
"public void setIdAuthority(String theString) {\n\t \r\n }",
"protected abstract String getId();",
"public void testPropagateIds() throws Exception {\n\n DAS das = DAS.FACTORY.createDAS(getConfig(\"CompanyConfig.xml\"), getConnection());\n Command select = das.getCommand(\"all companies\");\n DataObject root = select.executeQuery();\n\n // Create a new Company\n DataObject company = root.createDataObject(\"COMPANY\");\n company.setString(\"NAME\", \"Do-rite Pest Control\");\n\n // verify pre-condition (id is not there until after flush)\n assertNull(company.get(\"ID\"));\n\n // Flush changes \n das.applyChanges(root);\n\n // Save the id\n Integer id = (Integer) company.get(\"ID\");\n\n // Verify the change\n select = das.createCommand(\"Select * from COMPANY where ID = ?\");\n select.setParameter(1, id);\n root = select.executeQuery();\n assertEquals(\"Do-rite Pest Control\", root.getDataObject(\"COMPANY[1]\").getString(\"NAME\"));\n\n }",
"public static synchronized void setOwnerId(int id) {\r\n /* If this is the first time, that's fine, but if a change were made again */\r\n /* then we have an not-in-sync issue with journal files! */\r\n if (owner_id == master_pid) {\r\n owner_id = id;\r\n SlaveJvm.sendMessageToMaster(SocketMessage.ONE_TIME_STATUS, \"Data Validation Owner ID found in journal: \" + id);\r\n return;\r\n }\r\n\r\n /* The next time however, the ID is not allowed to change: */\r\n if (id != owner_id) {\r\n common.ptod(\"Current master process id: \" + master_pid);\r\n common.ptod(\"Current owner id: \" + owner_id);\r\n common.ptod(\"Second request to set owner id: \" + id);\r\n common.failure(\"Owner ID not in sync, are we mixing up journal files?\");\r\n }\r\n }",
"public String domainId() {\n return this.domainId;\n }",
"private void setId(Integer id) { this.id = id; }",
"@Test\r\n\tpublic void testSetGetIdInvalid() {\r\n\t\tDoctor doctor = new Doctor();\r\n\t\tdoctor.setId(idInvalid);\r\n\t\tassertEquals(idInvalid, doctor.getId());\r\n\r\n\t}",
"private DomainParticipant createRemoteAdministrationDomainParticipant(\n final int domainId\n ) {\n return createDomainParticipant(domainId, \"RTI Routing Service: remote administration\");\n }",
"private void setID(gw.pl.persistence.core.Key value) {\n __getInternalInterface().setFieldValue(ID_PROP.get(), value);\n }",
"private void setID(gw.pl.persistence.core.Key value) {\n __getInternalInterface().setFieldValue(ID_PROP.get(), value);\n }",
"private void setID(gw.pl.persistence.core.Key value) {\n __getInternalInterface().setFieldValue(ID_PROP.get(), value);\n }",
"public interface IGeneratorIdService {\n /**\n * @return \"unique\" long id\n */\n Long generateId();\n}",
"@Test\r\n public void testSetId() {\r\n System.out.println(\"setId\");\r\n Long id = null;\r\n Integrante instance = new Integrante();\r\n instance.setId(id);\r\n // TODO review the generated test code and remove the default call to fail.\r\n fail(\"The test case is a prototype.\");\r\n }",
"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();",
"Object getId();",
"public void setDomain(Domain domain) {\n this.domain = domain;\n }",
"public void setDomain(Domain domain) {\n this.domain = domain;\n }",
"T createOrUpdate(final T domain) throws RequiredValueException, NoEntityFoundException;",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"protected AssigneeEntity(I id) {\n super(id);\n this.idAsAny = Identifier.pack(id);\n }"
] |
[
"0.6509967",
"0.6266134",
"0.62198395",
"0.61809725",
"0.6122927",
"0.6108735",
"0.60587084",
"0.6022959",
"0.6005224",
"0.6004882",
"0.6004882",
"0.5988899",
"0.59153146",
"0.581962",
"0.58006734",
"0.57987714",
"0.5783943",
"0.5774503",
"0.5743632",
"0.5743632",
"0.5738245",
"0.57215685",
"0.5717979",
"0.57146424",
"0.5697781",
"0.56933606",
"0.5683637",
"0.5673686",
"0.56678003",
"0.5640561",
"0.5640561",
"0.5640561",
"0.56234527",
"0.5620311",
"0.5603172",
"0.5603172",
"0.5603172",
"0.5603172",
"0.5603172",
"0.5603172",
"0.5603172",
"0.5603172",
"0.5603172",
"0.5603172",
"0.5603172",
"0.5603172",
"0.5603172",
"0.5603172",
"0.5603172",
"0.5603172",
"0.5603172",
"0.5603172",
"0.5603172",
"0.5602885",
"0.56011814",
"0.56011814",
"0.5588005",
"0.55864215",
"0.55864215",
"0.55864215",
"0.55864215",
"0.55864215",
"0.55864215",
"0.55864215",
"0.55864215",
"0.55864215",
"0.55864215",
"0.55864215",
"0.55864215",
"0.55864215",
"0.55864215",
"0.55864215",
"0.55864215",
"0.55864215",
"0.55864215",
"0.55864215",
"0.55864215",
"0.55864215",
"0.55864215",
"0.55864215",
"0.55864215",
"0.55864215",
"0.55864215",
"0.55864215",
"0.55864215",
"0.55864215",
"0.55864215",
"0.55864215",
"0.55864215",
"0.55864215",
"0.55864215",
"0.55864215",
"0.55864215",
"0.55864215",
"0.55864215",
"0.55864215",
"0.55864215",
"0.55864215",
"0.55864215",
"0.55864215",
"0.5586095"
] |
0.0
|
-1
|
Make sure id exists before insert
|
@PrePersist
public void generateId() {
if (this.id == null) {
this.id = UUID.randomUUID().toString();
}
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"boolean hasInsertOrUpdate();",
"@Override\n\tpublic boolean existId(String id) {\n\t\treturn false;\n\t}",
"int insertSelective(SysId record);",
"@Test\n @Transactional\n void createLessonTimetableWithExistingId() throws Exception {\n lessonTimetable.setId(1L);\n\n int databaseSizeBeforeCreate = lessonTimetableRepository.findAll().size();\n\n // An entity with an existing ID cannot be created, so this API call must fail\n restLessonTimetableMockMvc\n .perform(\n post(ENTITY_API_URL).contentType(MediaType.APPLICATION_JSON).content(TestUtil.convertObjectToJsonBytes(lessonTimetable))\n )\n .andExpect(status().isBadRequest());\n\n // Validate the LessonTimetable in the database\n List<LessonTimetable> lessonTimetableList = lessonTimetableRepository.findAll();\n assertThat(lessonTimetableList).hasSize(databaseSizeBeforeCreate);\n }",
"public int checkNewRowInsert(String id){\r\n\t\treturn motorCycleDao.checkNewRowInsert(id);\r\n\t}",
"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();",
"@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 existeId(Long id);",
"@Override\r\n\tpublic int checkIdDup(String id) {\n\t\treturn mDAO.checkIdDup(sqlSession, id);\r\n\t}",
"@Test\n @Transactional\n void createSectieWithExistingId() throws Exception {\n sectie.setId(1L);\n\n int databaseSizeBeforeCreate = sectieRepository.findAll().size();\n\n // An entity with an existing ID cannot be created, so this API call must fail\n restSectieMockMvc\n .perform(\n post(ENTITY_API_URL).with(csrf()).contentType(MediaType.APPLICATION_JSON).content(TestUtil.convertObjectToJsonBytes(sectie))\n )\n .andExpect(status().isBadRequest());\n\n // Validate the Sectie in the database\n List<Sectie> sectieList = sectieRepository.findAll();\n assertThat(sectieList).hasSize(databaseSizeBeforeCreate);\n\n // Validate the Sectie in Elasticsearch\n verify(mockSectieSearchRepository, times(0)).save(sectie);\n }",
"@Override\n public boolean exists(Long id) {\n return false;\n }",
"@Override\n public boolean exists(Long id) {\n return false;\n }",
"@Test\n @Transactional\n void createIndActivationWithExistingId() throws Exception {\n indActivation.setId(1L);\n IndActivationDTO indActivationDTO = indActivationMapper.toDto(indActivation);\n\n int databaseSizeBeforeCreate = indActivationRepository.findAll().size();\n\n // An entity with an existing ID cannot be created, so this API call must fail\n restIndActivationMockMvc\n .perform(\n post(ENTITY_API_URL).contentType(MediaType.APPLICATION_JSON).content(TestUtil.convertObjectToJsonBytes(indActivationDTO))\n )\n .andExpect(status().isBadRequest());\n\n // Validate the IndActivation in the database\n List<IndActivation> indActivationList = indActivationRepository.findAll();\n assertThat(indActivationList).hasSize(databaseSizeBeforeCreate);\n }",
"@Test\n void insertSuccess() {\n Date today = new Date();\n User newUser = new User(\"Artemis\", \"Jimmers\", \"[email protected]\", \"ajimmers\", \"supersecret2\", today);\n int id = dao.insert(newUser);\n assertNotEquals(0, id);\n User insertedUser = (User) dao.getById(id);\n assertNotNull(insertedUser);\n assertEquals(\"Jimmers\", insertedUser.getLastName());\n //Could continue comparing all values, but\n //it may make sense to use .equals()\n }",
"@Test\n @Transactional\n void createQuestionsWithExistingId() throws Exception {\n questions.setId(1L);\n QuestionsDTO questionsDTO = questionsMapper.toDto(questions);\n\n int databaseSizeBeforeCreate = questionsRepository.findAll().size();\n\n // An entity with an existing ID cannot be created, so this API call must fail\n restQuestionsMockMvc\n .perform(post(ENTITY_API_URL).contentType(MediaType.APPLICATION_JSON).content(TestUtil.convertObjectToJsonBytes(questionsDTO)))\n .andExpect(status().isBadRequest());\n\n // Validate the Questions in the database\n List<Questions> questionsList = questionsRepository.findAll();\n assertThat(questionsList).hasSize(databaseSizeBeforeCreate);\n }",
"@Test\n @Transactional\n void createStudentWithExistingId() throws Exception {\n student.setId(1L);\n StudentDTO studentDTO = studentMapper.toDto(student);\n\n int databaseSizeBeforeCreate = studentRepository.findAll().size();\n\n // An entity with an existing ID cannot be created, so this API call must fail\n restStudentMockMvc\n .perform(post(ENTITY_API_URL).contentType(MediaType.APPLICATION_JSON).content(TestUtil.convertObjectToJsonBytes(studentDTO)))\n .andExpect(status().isBadRequest());\n\n // Validate the Student in the database\n List<Student> studentList = studentRepository.findAll();\n assertThat(studentList).hasSize(databaseSizeBeforeCreate);\n }",
"@Test\n @Transactional\n void createPrestamoWithExistingId() throws Exception {\n prestamo.setId(1L);\n PrestamoDTO prestamoDTO = prestamoMapper.toDto(prestamo);\n\n int databaseSizeBeforeCreate = prestamoRepository.findAll().size();\n\n // An entity with an existing ID cannot be created, so this API call must fail\n restPrestamoMockMvc\n .perform(post(ENTITY_API_URL).contentType(MediaType.APPLICATION_JSON).content(TestUtil.convertObjectToJsonBytes(prestamoDTO)))\n .andExpect(status().isBadRequest());\n\n // Validate the Prestamo in the database\n List<Prestamo> prestamoList = prestamoRepository.findAll();\n assertThat(prestamoList).hasSize(databaseSizeBeforeCreate);\n }",
"boolean hasInsert();",
"@Test\n @Transactional\n void createUserextraWithExistingId() throws Exception {\n userextra.setId(1L);\n\n int databaseSizeBeforeCreate = userextraRepository.findAll().size();\n\n // An entity with an existing ID cannot be created, so this API call must fail\n restUserextraMockMvc\n .perform(post(ENTITY_API_URL).contentType(MediaType.APPLICATION_JSON).content(TestUtil.convertObjectToJsonBytes(userextra)))\n .andExpect(status().isBadRequest());\n\n // Validate the Userextra in the database\n List<Userextra> userextraList = userextraRepository.findAll();\n assertThat(userextraList).hasSize(databaseSizeBeforeCreate);\n }",
"@Test\n @Transactional\n void createInternacoesWithExistingId() throws Exception {\n internacoes.setId(1L);\n\n int databaseSizeBeforeCreate = internacoesRepository.findAll().size();\n\n // An entity with an existing ID cannot be created, so this API call must fail\n restInternacoesMockMvc\n .perform(post(ENTITY_API_URL).contentType(MediaType.APPLICATION_JSON).content(TestUtil.convertObjectToJsonBytes(internacoes)))\n .andExpect(status().isBadRequest());\n\n // Validate the Internacoes in the database\n List<Internacoes> internacoesList = internacoesRepository.findAll();\n assertThat(internacoesList).hasSize(databaseSizeBeforeCreate);\n }",
"@Test\n @Transactional\n void createSkillWithExistingId() throws Exception {\n skill.setId(1L);\n SkillDTO skillDTO = skillMapper.toDto(skill);\n\n int databaseSizeBeforeCreate = skillRepository.findAll().size();\n\n // An entity with an existing ID cannot be created, so this API call must fail\n restSkillMockMvc\n .perform(post(ENTITY_API_URL).contentType(MediaType.APPLICATION_JSON).content(TestUtil.convertObjectToJsonBytes(skillDTO)))\n .andExpect(status().isBadRequest());\n\n // Validate the Skill in the database\n List<Skill> skillList = skillRepository.findAll();\n assertThat(skillList).hasSize(databaseSizeBeforeCreate);\n }",
"@Test\n @Transactional\n void createUserExtraWithExistingId() throws Exception {\n userExtra.setId(1L);\n\n int databaseSizeBeforeCreate = userExtraRepository.findAll().size();\n\n // An entity with an existing ID cannot be created, so this API call must fail\n restUserExtraMockMvc\n .perform(post(ENTITY_API_URL).contentType(MediaType.APPLICATION_JSON).content(TestUtil.convertObjectToJsonBytes(userExtra)))\n .andExpect(status().isBadRequest());\n\n // Validate the UserExtra in the database\n List<UserExtra> userExtraList = userExtraRepository.findAll();\n assertThat(userExtraList).hasSize(databaseSizeBeforeCreate);\n\n // Validate the UserExtra in Elasticsearch\n verify(mockUserExtraSearchRepository, times(0)).save(userExtra);\n }",
"@Test\n public void testInsert() {\n int resultInt = disciplineDao.insert(disciplineTest);\n // Je pense à le suppr si l'insert à fonctionné\n if(resultInt > 0){\n disciplineTest.setId(resultInt);\n disciplineDao.delete(disciplineTest);\n }\n assertTrue(resultInt > 0);\n }",
"public boolean isExist(String id) {\n return mysqlDao.isExist(id);\n }",
"@Test\n @Transactional\n void createKpiWithExistingId() throws Exception {\n kpi.setId(1L);\n\n int databaseSizeBeforeCreate = kpiRepository.findAll().size();\n\n // An entity with an existing ID cannot be created, so this API call must fail\n restKpiMockMvc\n .perform(post(ENTITY_API_URL).contentType(MediaType.APPLICATION_JSON).content(TestUtil.convertObjectToJsonBytes(kpi)))\n .andExpect(status().isBadRequest());\n\n // Validate the Kpi in the database\n List<Kpi> kpiList = kpiRepository.findAll();\n assertThat(kpiList).hasSize(databaseSizeBeforeCreate);\n }",
"@Test\n @Transactional\n void createEnseignerWithExistingId() throws Exception {\n enseigner.setId(1L);\n\n int databaseSizeBeforeCreate = enseignerRepository.findAll().size();\n\n // An entity with an existing ID cannot be created, so this API call must fail\n restEnseignerMockMvc\n .perform(post(ENTITY_API_URL).contentType(MediaType.APPLICATION_JSON).content(TestUtil.convertObjectToJsonBytes(enseigner)))\n .andExpect(status().isBadRequest());\n\n // Validate the Enseigner in the database\n List<Enseigner> enseignerList = enseignerRepository.findAll();\n assertThat(enseignerList).hasSize(databaseSizeBeforeCreate);\n }",
"boolean hasFromId();",
"@Test\n @Transactional\n void createRestaurantWithExistingId() throws Exception {\n restaurant.setId(1L);\n RestaurantDTO restaurantDTO = restaurantMapper.toDto(restaurant);\n\n int databaseSizeBeforeCreate = restaurantRepository.findAll().size();\n\n // An entity with an existing ID cannot be created, so this API call must fail\n restRestaurantMockMvc\n .perform(post(ENTITY_API_URL).contentType(MediaType.APPLICATION_JSON).content(TestUtil.convertObjectToJsonBytes(restaurantDTO)))\n .andExpect(status().isBadRequest());\n\n // Validate the Restaurant in the database\n List<Restaurant> restaurantList = restaurantRepository.findAll();\n assertThat(restaurantList).hasSize(databaseSizeBeforeCreate);\n }",
"boolean hasID();",
"boolean hasID();",
"boolean hasID();",
"boolean hasID();",
"boolean hasID();",
"boolean hasID();",
"boolean hasID();",
"boolean hasID();",
"boolean hasID();",
"@Test\n @Transactional\n void createAcheteurWithExistingId() throws Exception {\n acheteur.setId(1L);\n AcheteurDTO acheteurDTO = acheteurMapper.toDto(acheteur);\n\n int databaseSizeBeforeCreate = acheteurRepository.findAll().size();\n\n // An entity with an existing ID cannot be created, so this API call must fail\n restAcheteurMockMvc\n .perform(post(ENTITY_API_URL).contentType(MediaType.APPLICATION_JSON).content(TestUtil.convertObjectToJsonBytes(acheteurDTO)))\n .andExpect(status().isBadRequest());\n\n // Validate the Acheteur in the database\n List<Acheteur> acheteurList = acheteurRepository.findAll();\n assertThat(acheteurList).hasSize(databaseSizeBeforeCreate);\n }",
"@Test\n @Transactional\n void createAutorWithExistingId() throws Exception {\n autor.setId(1L);\n AutorDTO autorDTO = autorMapper.toDto(autor);\n\n int databaseSizeBeforeCreate = autorRepository.findAll().size();\n\n // An entity with an existing ID cannot be created, so this API call must fail\n restAutorMockMvc\n .perform(post(ENTITY_API_URL).contentType(MediaType.APPLICATION_JSON).content(TestUtil.convertObjectToJsonBytes(autorDTO)))\n .andExpect(status().isBadRequest());\n\n // Validate the Autor in the database\n List<Autor> autorList = autorRepository.findAll();\n assertThat(autorList).hasSize(databaseSizeBeforeCreate);\n }",
"@Override\n\tpublic boolean insert(String sql) {\n\t\treturn false;\n\t}",
"int insert(SysId record);",
"public boolean insertData(String id) {\n SQLiteDatabase db = this.getWritableDatabase();\n ContentValues contentValues = new ContentValues();\n contentValues.put(col0, id);\n long result = db.insert(TABLE_NAME, null, contentValues);\n db.close();\n if (result == -1) {\n return false;\n } else {\n return true;\n }\n }",
"@Test\n @Transactional\n void createSiegeLesionsWithExistingId() throws Exception {\n siegeLesions.setId(1L);\n SiegeLesionsDTO siegeLesionsDTO = siegeLesionsMapper.toDto(siegeLesions);\n\n int databaseSizeBeforeCreate = siegeLesionsRepository.findAll().size();\n\n // An entity with an existing ID cannot be created, so this API call must fail\n restSiegeLesionsMockMvc\n .perform(\n post(ENTITY_API_URL).contentType(MediaType.APPLICATION_JSON).content(TestUtil.convertObjectToJsonBytes(siegeLesionsDTO))\n )\n .andExpect(status().isBadRequest());\n\n // Validate the SiegeLesions in the database\n List<SiegeLesions> siegeLesionsList = siegeLesionsRepository.findAll();\n assertThat(siegeLesionsList).hasSize(databaseSizeBeforeCreate);\n }",
"@Test\n @Transactional\n void createTipoObraWithExistingId() throws Exception {\n tipoObra.setId(1L);\n\n int databaseSizeBeforeCreate = tipoObraRepository.findAll().size();\n\n // An entity with an existing ID cannot be created, so this API call must fail\n restTipoObraMockMvc\n .perform(post(ENTITY_API_URL).contentType(MediaType.APPLICATION_JSON).content(TestUtil.convertObjectToJsonBytes(tipoObra)))\n .andExpect(status().isBadRequest());\n\n // Validate the TipoObra in the database\n List<TipoObra> tipoObraList = tipoObraRepository.findAll();\n assertThat(tipoObraList).hasSize(databaseSizeBeforeCreate);\n }",
"@PreInsert\n public void onBeforeInsert() {\n if (this.key == null) {\n this.key = UUID.randomUUID();\n }\n onBeforeUpdate();\n }",
"@Test\n @Transactional\n void createIndContactCharWithExistingId() throws Exception {\n indContactChar.setId(1L);\n IndContactCharDTO indContactCharDTO = indContactCharMapper.toDto(indContactChar);\n\n int databaseSizeBeforeCreate = indContactCharRepository.findAll().size();\n\n // An entity with an existing ID cannot be created, so this API call must fail\n restIndContactCharMockMvc\n .perform(\n post(ENTITY_API_URL).contentType(MediaType.APPLICATION_JSON).content(TestUtil.convertObjectToJsonBytes(indContactCharDTO))\n )\n .andExpect(status().isBadRequest());\n\n // Validate the IndContactChar in the database\n List<IndContactChar> indContactCharList = indContactCharRepository.findAll();\n assertThat(indContactCharList).hasSize(databaseSizeBeforeCreate);\n }",
"@Test\n void createAWithExistingId() throws Exception {\n a.setId(1L);\n\n int databaseSizeBeforeCreate = aRepository.findAll().collectList().block().size();\n\n // An entity with an existing ID cannot be created, so this API call must fail\n webTestClient\n .post()\n .uri(ENTITY_API_URL)\n .contentType(MediaType.APPLICATION_JSON)\n .bodyValue(TestUtil.convertObjectToJsonBytes(a))\n .exchange()\n .expectStatus()\n .isBadRequest();\n\n // Validate the A in the database\n List<A> aList = aRepository.findAll().collectList().block();\n assertThat(aList).hasSize(databaseSizeBeforeCreate);\n }",
"public Hoppy insert(Hoppy hoppy, IdGenerateService<Long> idGenerateService) throws DataAccessException;",
"@Test\n\tpublic void testInsertRecipeFailure() {\n\t\tint recipeId = recipeDao.insertRecipe(recipe);\n\n\t\tassertEquals(0, recipeId);\n\n\t}",
"@Test\n\tpublic void testAInsert() {\n\t\tDynamicSqlDemoEntity demoEntity = new DynamicSqlDemoEntity();\n\t\tdemoEntity.setCol1(\"dummyValue\" + UUID.randomUUID().toString());\n\t\tem.persist(demoEntity);\n\t\tassertNotNull(demoEntity.getId());\n\t\tassertTrue(em.contains(demoEntity));\n\t\tid = demoEntity.getId();\n\t}",
"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 }",
"@Override\n\tpublic boolean existsById(Integer id) {\n\t\treturn false;\n\t}",
"@Override\n\tpublic Boolean exists(Integer id) {\n\t\treturn null;\n\t}",
"int insertSelective(QuestionOne record);",
"@Override\r\n\t\t\t\t\tpublic void insertUpdate(DocumentEvent e) {\n\t\t\t\t\t\tcheckID();\r\n\t\t\t\t\t}",
"@Test\n @Transactional\n void createInvoiceWithExistingId() throws Exception {\n invoice.setId(1L);\n\n int databaseSizeBeforeCreate = invoiceRepository.findAll().size();\n\n // An entity with an existing ID cannot be created, so this API call must fail\n restInvoiceMockMvc\n .perform(\n post(ENTITY_API_URL)\n .with(csrf())\n .contentType(MediaType.APPLICATION_JSON)\n .content(TestUtil.convertObjectToJsonBytes(invoice))\n )\n .andExpect(status().isBadRequest());\n\n // Validate the Invoice in the database\n List<Invoice> invoiceList = invoiceRepository.findAll();\n assertThat(invoiceList).hasSize(databaseSizeBeforeCreate);\n }",
"@Test\n @Transactional\n void createSourceWithExistingId() throws Exception {\n source.setId(1L);\n\n int databaseSizeBeforeCreate = sourceRepository.findAll().size();\n\n // An entity with an existing ID cannot be created, so this API call must fail\n restSourceMockMvc\n .perform(post(ENTITY_API_URL).contentType(MediaType.APPLICATION_JSON).content(TestUtil.convertObjectToJsonBytes(source)))\n .andExpect(status().isBadRequest());\n\n // Validate the Source in the database\n List<Source> sourceList = sourceRepository.findAll();\n assertThat(sourceList).hasSize(databaseSizeBeforeCreate);\n }",
"@Override\n\tpublic boolean insertOne(finalDataBean t) throws Exception {\n\t\treturn false;\n\t}",
"int insertSelective(GirlInfo record);",
"@Override\npublic boolean existsById(String id) {\n\treturn false;\n}",
"int insertPerson(UUID id, Person person);",
"int insertSelective(DataSync record);",
"@Override\n\tpublic int insert(TfLoss record) {\n\t\tif(record.getLossId()==null || record.getLossId().equals(\"\")){\n\t\t\trecord.setLossId(UUID.randomUUID().toString());\n\t\t}\n\t\treturn tfLossMapper.insert(record);\n\t}",
"@Test\n @Transactional\n void createCustStatisticsWithExistingId() throws Exception {\n custStatistics.setId(1L);\n CustStatisticsDTO custStatisticsDTO = custStatisticsMapper.toDto(custStatistics);\n\n int databaseSizeBeforeCreate = custStatisticsRepository.findAll().size();\n\n // An entity with an existing ID cannot be created, so this API call must fail\n restCustStatisticsMockMvc\n .perform(\n post(ENTITY_API_URL).contentType(MediaType.APPLICATION_JSON).content(TestUtil.convertObjectToJsonBytes(custStatisticsDTO))\n )\n .andExpect(status().isBadRequest());\n\n // Validate the CustStatistics in the database\n List<CustStatistics> custStatisticsList = custStatisticsRepository.findAll();\n assertThat(custStatisticsList).hasSize(databaseSizeBeforeCreate);\n }",
"int insertSelective(Register record);",
"int insertSelective(AccessModelEntity record);",
"@Test\n void createOrderItemWithExistingId() throws Exception {\n orderItem.setId(1L);\n\n int databaseSizeBeforeCreate = orderItemRepository.findAll().collectList().block().size();\n\n // An entity with an existing ID cannot be created, so this API call must fail\n webTestClient\n .post()\n .uri(ENTITY_API_URL)\n .contentType(MediaType.APPLICATION_JSON)\n .bodyValue(TestUtil.convertObjectToJsonBytes(orderItem))\n .exchange()\n .expectStatus()\n .isBadRequest();\n\n // Validate the OrderItem in the database\n List<OrderItem> orderItemList = orderItemRepository.findAll().collectList().block();\n assertThat(orderItemList).hasSize(databaseSizeBeforeCreate);\n }",
"@Override\n public boolean checkExistId(int id) throws Exception {\n Connection con = null;\n ResultSet rs = null;\n PreparedStatement ps = null;\n try {\n String query = \"select id from digital where id like ?\";\n con = getConnection();\n ps = con.prepareCall(query);\n ps.setString(1, \"%\" + id + \"%\");\n rs = ps.executeQuery();\n int count = 0;\n while (rs.next()) {\n count = rs.getInt(1);\n }\n return count != 0;\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 }",
"@Test\n @Transactional\n void createCommonTableFieldWithExistingId() throws Exception {\n commonTableField.setId(1L);\n CommonTableFieldDTO commonTableFieldDTO = commonTableFieldMapper.toDto(commonTableField);\n\n int databaseSizeBeforeCreate = commonTableFieldRepository.findAll().size();\n\n // An entity with an existing ID cannot be created, so this API call must fail\n restCommonTableFieldMockMvc\n .perform(\n post(ENTITY_API_URL).contentType(MediaType.APPLICATION_JSON).content(TestUtil.convertObjectToJsonBytes(commonTableFieldDTO))\n )\n .andExpect(status().isBadRequest());\n\n // Validate the CommonTableField in the database\n List<CommonTableField> commonTableFieldList = commonTableFieldRepository.findAll();\n assertThat(commonTableFieldList).hasSize(databaseSizeBeforeCreate);\n }",
"public boolean isExist(Serializable id);",
"@Test\r\n\tpublic void addToDb() {\r\n\t\tservice.save(opinion);\r\n\t\tassertNotEquals(opinion.getId(), 0);\r\n\t\tassertTrue(service.exists(opinion.getId()));\r\n\t}",
"int insertSelective(Owner record);"
] |
[
"0.6543713",
"0.64457756",
"0.64101434",
"0.63665205",
"0.6357992",
"0.6341983",
"0.6341983",
"0.6341983",
"0.6341983",
"0.6341983",
"0.6341983",
"0.6341983",
"0.6341983",
"0.6341983",
"0.6341983",
"0.6341983",
"0.6341983",
"0.6341983",
"0.6341983",
"0.6341983",
"0.6341983",
"0.6341983",
"0.6341983",
"0.6341983",
"0.6341983",
"0.6341983",
"0.6341983",
"0.6341983",
"0.6341983",
"0.6341983",
"0.6341983",
"0.6341983",
"0.6341983",
"0.6341983",
"0.633613",
"0.633613",
"0.63329613",
"0.6314039",
"0.6302116",
"0.6297317",
"0.6297317",
"0.6295517",
"0.6285092",
"0.6272639",
"0.6256319",
"0.6249447",
"0.6244664",
"0.6232198",
"0.62056315",
"0.6185443",
"0.61714387",
"0.6164146",
"0.6128139",
"0.61261094",
"0.61115193",
"0.6109845",
"0.6107285",
"0.61008394",
"0.61008394",
"0.61008394",
"0.61008394",
"0.61008394",
"0.61008394",
"0.61008394",
"0.61008394",
"0.61008394",
"0.60990864",
"0.60937107",
"0.6090022",
"0.6085777",
"0.6084383",
"0.60841686",
"0.60708123",
"0.6059743",
"0.6051867",
"0.6046833",
"0.6044394",
"0.60274756",
"0.60272825",
"0.60259277",
"0.60222423",
"0.6013286",
"0.6011871",
"0.6005507",
"0.60001105",
"0.599875",
"0.5998104",
"0.5970783",
"0.59479594",
"0.5946971",
"0.5943512",
"0.5943508",
"0.5933995",
"0.59318924",
"0.5921318",
"0.59160507",
"0.5909263",
"0.58987874",
"0.589054",
"0.58867955",
"0.5882371"
] |
0.0
|
-1
|
Created by Liuchangling on 2017/6/20.
|
public interface TransferHospitalService extends ReadOnlyBaseService<HospitalReadOnly> {
/**
* 获取用户医院数据
* @param hosId
* @return
* @throws InvocationTargetException
* @throws IntrospectionException
* @throws InstantiationException
* @throws IllegalAccessException
*/
HospitalReadOnly getHospital(Long hosId)throws InvocationTargetException, IntrospectionException, InstantiationException, IllegalAccessException ;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"@Override\n public void perish() {\n \n }",
"private stendhal() {\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void comer() {\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\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n public void init() {\n\n }",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public final void mo51373a() {\n }",
"private static void cajas() {\n\t\t\n\t}",
"private void poetries() {\n\n\t}",
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@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 }",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n void init() {\n }",
"@Override\n public void init() {\n }",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\n\tpublic void jugar() {\n\t\t\n\t}",
"@Override\n protected void initialize() \n {\n \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}",
"public void mo38117a() {\n }",
"@Override\n public int describeContents() { return 0; }",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"private void init() {\n\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@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 anularFact() {\n\t\t\r\n\t}",
"@Override\n public void init() {}",
"@Override\n\tpublic void nghe() {\n\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\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"private Rekenhulp()\n\t{\n\t}",
"public void gored() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\n public void init() {\n\n }",
"@Override\n public void init() {\n\n }",
"@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\tprotected void initialize() {\n\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\n public void initialize() { \n }",
"@Override\n protected void init() {\n }",
"private void kk12() {\n\n\t}",
"@Override\r\n\tpublic void init() {}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"private void strin() {\n\n\t}",
"private void m50366E() {\n }",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void memoria() {\n \n }",
"@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\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}",
"Petunia() {\r\n\t\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\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"@Override\n public void initialize() {}",
"@Override\n public void initialize() {}",
"@Override\n public void initialize() {}",
"@Override\n\tpublic void init() {\n\t}",
"public void mo6081a() {\n }",
"private MetallicityUtils() {\n\t\t\n\t}",
"@Override\n public void initialize() {\n \n }",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tpublic void init()\n\t{\n\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n\tprotected void initialize() {\n\t}",
"@Override\n\tprotected void initialize() {\n\t}",
"protected boolean func_70814_o() { return true; }"
] |
[
"0.60440266",
"0.5909011",
"0.5719379",
"0.5661475",
"0.5623027",
"0.5623027",
"0.5605628",
"0.553874",
"0.5510621",
"0.54964304",
"0.5495387",
"0.5492798",
"0.54888153",
"0.5487672",
"0.5469895",
"0.54676473",
"0.54516876",
"0.5448687",
"0.54343224",
"0.54319143",
"0.54281634",
"0.54281634",
"0.54281634",
"0.54281634",
"0.54281634",
"0.54281634",
"0.5427696",
"0.54220575",
"0.541528",
"0.54094356",
"0.53953767",
"0.53953075",
"0.53773737",
"0.53773737",
"0.53773737",
"0.53773737",
"0.53773737",
"0.5367404",
"0.5366521",
"0.53511035",
"0.5344076",
"0.5342613",
"0.5332535",
"0.53306305",
"0.53306305",
"0.5320241",
"0.53194875",
"0.5318332",
"0.53171736",
"0.53171736",
"0.53155893",
"0.53122413",
"0.53050053",
"0.5301581",
"0.53014785",
"0.53014785",
"0.52879083",
"0.52879083",
"0.52879083",
"0.52793217",
"0.52706426",
"0.5267871",
"0.5265893",
"0.52650046",
"0.52608484",
"0.52526075",
"0.5246693",
"0.5243607",
"0.52405876",
"0.5236734",
"0.5229687",
"0.5229687",
"0.5229687",
"0.52294827",
"0.52294827",
"0.52294827",
"0.52164423",
"0.52123433",
"0.52123433",
"0.52123433",
"0.52123433",
"0.52123433",
"0.52123433",
"0.52123433",
"0.52118295",
"0.52040255",
"0.52040255",
"0.52040255",
"0.5188211",
"0.5187093",
"0.5184628",
"0.5175004",
"0.5173499",
"0.5173449",
"0.51721376",
"0.51702136",
"0.51505476",
"0.51470244",
"0.5146573",
"0.5146573",
"0.514371"
] |
0.0
|
-1
|
This method returns the Direct Message (DM) that will be sent to the owner of the server the bot connects to
|
private static EmbedBuilder JoinDM (){
Color color = new Color(238,119,0);
return new EmbedBuilder()
.setColor(color)
.setTitle("FyreBot")
.setDescription("Hey, I'm FyreBot! Thanks for inviting me to your server!\n\n" +
"My prefix is `!` for example `!command`\n\n" +
"To get started use `!help` to list all my commands!\n\n" +
"I'm developed by `Drix#8197` so if you have any questions about me you should ask him.");
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public java.lang.String getDM() {\r\n return localDM;\r\n }",
"public String getDm() {\n return dm;\n }",
"private static PluginMessageRecipient getThroughWhomSendMessage() {\n\t\treturn Remain.getOnlinePlayers().isEmpty() ? Bukkit.getServer() : Remain.getOnlinePlayers().iterator().next();\n\t}",
"protected ParseObject createMessage() {\n //format single variables appropriatly. most cases the field is an array\n ArrayList<ParseUser> nextDrinker = new ArrayList<ParseUser>();\n nextDrinker.add(mNextDrinker);\n ArrayList<String> groupName = new ArrayList<String>();\n groupName.add(mGroupName);\n\n ParseObject message = new ParseObject(ParseConstants.CLASS_MESSAGES);\n message.put(ParseConstants.KEY_SENDER_ID, ParseUser.getCurrentUser().getObjectId());\n message.put(ParseConstants.KEY_SENDER, ParseUser.getCurrentUser());\n message.put(ParseConstants.KEY_GROUP_ID, mGroupId);\n message.put(ParseConstants.KEY_GROUP_NAME, groupName);\n message.put(ParseConstants.KEY_SENDER_NAME, ParseUser.getCurrentUser().getUsername());\n message.put(ParseConstants.KEY_RECIPIENT_IDS, nextDrinker);\n message.put(ParseConstants.KEY_MESSAGE_TYPE, ParseConstants.TYPE_DRINK_REQUEST);\n\n return message;\n }",
"public java.lang.String getDm() {\r\n return localDm;\r\n }",
"public String getMdp() {\n return mdp;\n }",
"java.lang.String getSender();",
"java.lang.String getSender();",
"java.lang.String getSender();",
"java.lang.String getSender();",
"java.lang.String getSender();",
"java.lang.String getSender();",
"public teledon.network.protobuffprotocol.TeledonProtobufs.Donator getDonator() {\n if (donatorBuilder_ == null) {\n return donator_ == null ? teledon.network.protobuffprotocol.TeledonProtobufs.Donator.getDefaultInstance() : donator_;\n } else {\n return donatorBuilder_.getMessage();\n }\n }",
"public String getIdDiscord() {\n\t\treturn idDiscord;\n\t}",
"public static DBSupport.HTTPResponse sendDirectMessage(String senderName, String receiver, String message){\n DBSupport.HTTPResponse res = DBSupport.sendDirectMessage(senderName, receiver, message);\n return res;\n }",
"public String getSender() {\n return Sender;\n }",
"String getSender();",
"public String getSender() {\n return msgSender;\n }",
"private static Player getThroughWhomSendMessage() {\n\t\treturn Remain.getOnlinePlayers().isEmpty() ? null : Remain.getOnlinePlayers().iterator().next();\n\t}",
"public teledon.network.protobuffprotocol.TeledonProtobufs.Donatie getDonatie() {\n if (donatieBuilder_ == null) {\n return donatie_ == null ? teledon.network.protobuffprotocol.TeledonProtobufs.Donatie.getDefaultInstance() : donatie_;\n } else {\n return donatieBuilder_.getMessage();\n }\n }",
"public static Sender getSender() {\n return sender;\n }",
"public final Player getSender() {\n return sender;\n }",
"public String getSender() {\n return sender;\n }",
"public String getSender ()\r\n\t{\r\n\t\treturn sender;\r\n\t}",
"public ChatWithServer.Relay getChatWithServerRelay() {\n return instance.getChatWithServerRelay();\n }",
"public String getTalkingToChan() {\n return talkingToChan;\n }",
"public Node getSender() {\n return sender;\n }",
"@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.591 -0500\", hash_original_method = \"73417FF22870072B41D9E8892C6ACEAF\", hash_generated_method = \"98D30C9AEE1B66AD2FCFA7D7A2E2B430\")\n \nprivate static Message sendMessageSynchronously(Messenger dstMessenger, Message msg) {\n SyncMessenger sm = SyncMessenger.obtain();\n try {\n if (dstMessenger != null && msg != null) {\n msg.replyTo = sm.mMessenger;\n synchronized (sm.mHandler.mLockObject) {\n dstMessenger.send(msg);\n sm.mHandler.mLockObject.wait();\n }\n } else {\n sm.mHandler.mResultMsg = null;\n }\n } catch (InterruptedException e) {\n sm.mHandler.mResultMsg = null;\n } catch (RemoteException e) {\n sm.mHandler.mResultMsg = null;\n }\n Message resultMsg = sm.mHandler.mResultMsg;\n sm.recycle();\n return resultMsg;\n }",
"public BICorIBAN getSender() {\n\n // Get the sender of the missive document\n return this.missiveHeader.getSnd();\n }",
"ChatWithServer.Relay getChatWithServerRelay();",
"protected String getTo()\n {\n Object[] msgOptions =\n {\n \"Standard\", \"Broadcast\"\n };\n\n int n = JOptionPane.showOptionDialog(null,\n \"What message type are you sending?\",\n \"Send Message\",\n JOptionPane.DEFAULT_OPTION,\n JOptionPane.INFORMATION_MESSAGE, null,\n msgOptions, msgOptions[0]);\n\n String handle = \"\";\n\n if (n == 0)\n {\n List<String> contacts = new ArrayList();\n agent.getContacts().forEach((c) ->\n {\n contacts.add(c);\n });\n\n while (handle.isEmpty())\n {\n handle = JOptionPane.showInputDialog(null, \"Current Contacts\\n\" + contacts + \"\\n\\nWho would you like to message?\", \"Send Message\");\n if (handle == null)\n {\n setVisible(false);\n //Doesn't error now, but immediately exiting program isn't useful\n System.exit(0);\n }\n if (!handle.matches(\"^[^\\\\d\\\\s]+$\"))\n {\n handle = \"\";\n }\n }\n }\n else\n {\n handle = \"all\";\n }\n\n return handle;\n }",
"public String getSender() {\n return this.sender;\n }",
"network.message.PlayerResponses.Command getCommand();",
"@DSSink({DSSinkKind.SENSITIVE_UNCATEGORIZED})\n @DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2013-12-30 12:59:45.513 -0500\", hash_original_method = \"9DAC7AFA4C14A1022E9DEC304018391F\", hash_generated_method = \"B2E7772166FCACAF852F55F44CB46D51\")\n \npublic void sendMessage(Message msg) {\n msg.replyTo = mSrcMessenger;\n try {\n mDstMessenger.send(msg);\n } catch (RemoteException e) {\n replyDisconnected(STATUS_SEND_UNSUCCESSFUL);\n }\n }",
"private Message sendMSG(Message message){\n Message reply = null;\n try {\n reply = coms.sendMessage(message);\n } catch (IOException e) {\n e.printStackTrace();\n }\n return reply;\n }",
"public IChannel getChannel() {\n\t\treturn message.getChannel();\n\t}",
"public teledon.network.protobuffprotocol.TeledonProtobufs.DonatorOrBuilder getDonatorOrBuilder() {\n if (donatorBuilder_ != null) {\n return donatorBuilder_.getMessageOrBuilder();\n } else {\n return donator_ == null ?\n teledon.network.protobuffprotocol.TeledonProtobufs.Donator.getDefaultInstance() : donator_;\n }\n }",
"public static void sendMOTDEdit(Player target) {\n if (motd.has(\"title\")){\n target.sendMessage(ChatColor.GREEN + \" > MOTD Title: \" + ChatColor.translateAlternateColorCodes('&', motd.getString(\"title\")));\n }\n \n if (motd.has(\"priority\")) {\n target.sendMessage(ChatColor.GREEN + \" > \" + ChatColor.GOLD + \" Priority messages. These will always show to the player.\");\n for (int i = 0; i < motd.getJSONArray(\"priority\").length(); i++) {\n target.sendMessage(ChatColor.GREEN + \" > \" + ChatColor.AQUA + String.valueOf(i) + \" \" + ChatColor.translateAlternateColorCodes('&', motd.getJSONArray(\"priority\").getString(i)));\n }\n if (motd.has(\"normal\")) {\n target.sendMessage(ChatColor.GREEN + \"--------------------------------------------------\");\n }\n } else {\n target.sendMessage(ChatColor.GREEN + \" > There are no priority messages\");\n }\n\n if (motd.has(\"normal\")) {\n target.sendMessage(ChatColor.GREEN + \" > \" + ChatColor.GOLD + \" Normal messages. A random \" + motdNormalCount + \" will be show to players each time.\");\n for (int i = 0; i < motd.getJSONArray(\"normal\").length(); i++) {\n target.sendMessage(ChatColor.GREEN + \" > \" + ChatColor.AQUA + String.valueOf(i) + \" \" + ChatColor.translateAlternateColorCodes('&', motd.getJSONArray(\"normal\").getString(i)));\n }\n } else {\n target.sendMessage(ChatColor.GREEN + \" > There are no normal messages\");\n }\n }",
"@Override\n public void onMessageReceived(MessageReceivedEvent event)\n {\n JDA jda = event.getJDA(); //JDA, the core of the api.\n long responseNumber = event.getResponseNumber();//The amount of discord events that JDA has received since the last reconnect.\n\n //Event specific information\n User author = event.getAuthor(); //The user that sent the message\n Message message = event.getMessage(); //The message that was received.\n MessageChannel channel = event.getChannel(); //This is the MessageChannel that the message was sent to.\n // This could be a TextChannel, PrivateChannel, or Group!\n\n String msg = message.getContentDisplay(); //This returns a human readable version of the Message. Similar to\n // what you would see in the client.\n\n boolean bot = author.isBot(); //This boolean is useful to determine if the User that\n // sent the Message is a BOT or not!\n\n if (event.isFromType(ChannelType.TEXT)) //If this message was sent to a Guild TextChannel\n {\n //Because we now know that this message was sent in a Guild, we can do guild specific things\n // Note, if you don't check the ChannelType before using these methods, they might return null due\n // the message possibly not being from a Guild!\n\n Guild guild = event.getGuild(); //The Guild that this message was sent in. (note, in the API, Guilds are Servers)\n TextChannel textChannel = event.getTextChannel(); //The TextChannel that this message was sent to.\n Member member = event.getMember(); //This Member that sent the message. Contains Guild specific information about the User!\n\n String name;\n if (message.isWebhookMessage())\n {\n name = author.getName(); //If this is a Webhook message, then there is no Member associated\n } // with the User, thus we default to the author for name.\n else\n {\n name = member.getEffectiveName(); //This will either use the Member's nickname if they have one,\n } // otherwise it will default to their username. (User#getName())\n\n System.out.printf(\"(%s)[%s]<%s>: %s\\n\", guild.getName(), textChannel.getName(), name, msg);\n }\n else if (event.isFromType(ChannelType.PRIVATE)) //If this message was sent to a PrivateChannel\n {\n //The message was sent in a PrivateChannel.\n //In this example we don't directly use the privateChannel, however, be sure, there are uses for it!\n PrivateChannel privateChannel = event.getPrivateChannel();\n\n System.out.printf(\"[PRIV]<%s>: %s\\n\", author.getName(), msg);\n }\n else if (event.isFromType(ChannelType.GROUP)) //If this message was sent to a Group. This is CLIENT only!\n {\n //The message was sent in a Group. It should be noted that Groups are CLIENT only.\n Group group = event.getGroup();\n String groupName = group.getName() != null ? group.getName() : \"\"; //A group name can be null due to it being unnamed.\n\n System.out.printf(\"[GRP: %s]<%s>: %s\\n\", groupName, author.getName(), msg);\n }\n //calls specific (working) commands to call from command files\n commands.caseratis.Commands.pwing(msg, channel);\n\n commands.katekat.Commands.psing(msg, channel);\n\n commands.lwbuchanan.Commands.pzing(msg, channel);\n\n commands.notahackr.Commands.poing(msg, channel);\n\n commands.redmario.Commands.pxing(msg, channel);\n\n commands.thebriankong.Commands.paing(msg, channel);\n\n commands.thebuttermatrix.Commands.ping(msg, channel);\n commands.thebuttermatrix.Commands.countdown(msg, channel);\n commands.thebuttermatrix.Commands.pid(msg, channel);\n\n commands.raybipse.Master.messageReceived(msg, channel, event);\n }",
"public teledon.network.protobuffprotocol.TeledonProtobufs.Donator getDonator() {\n if (donatorBuilder_ == null) {\n if (payloadCase_ == 3) {\n return (teledon.network.protobuffprotocol.TeledonProtobufs.Donator) payload_;\n }\n return teledon.network.protobuffprotocol.TeledonProtobufs.Donator.getDefaultInstance();\n } else {\n if (payloadCase_ == 3) {\n return donatorBuilder_.getMessage();\n }\n return teledon.network.protobuffprotocol.TeledonProtobufs.Donator.getDefaultInstance();\n }\n }",
"public String getSender() {\n\t\treturn sender;\n\t}",
"public teledon.network.protobuffprotocol.TeledonProtobufs.Donatie getDonatie() {\n if (donatieBuilder_ == null) {\n if (payloadCase_ == 5) {\n return (teledon.network.protobuffprotocol.TeledonProtobufs.Donatie) payload_;\n }\n return teledon.network.protobuffprotocol.TeledonProtobufs.Donatie.getDefaultInstance();\n } else {\n if (payloadCase_ == 5) {\n return donatieBuilder_.getMessage();\n }\n return teledon.network.protobuffprotocol.TeledonProtobufs.Donatie.getDefaultInstance();\n }\n }",
"public Player getToPlayer()\n {\n // RETURN the CardMessage's toPlayer\n return this.toPlayer;\n }",
"public java.lang.String getMoodMessage() {\n java.lang.Object ref = moodMessage_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n moodMessage_ = s;\n return s;\n }\n }",
"public CommandSender getSender() {\n return sender;\n }",
"public String getSendBy() {\n return (String) getAttributeInternal(SENDBY);\n }",
"public java.lang.String getMoodMessage() {\n java.lang.Object ref = moodMessage_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n moodMessage_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public double getDm() {\n return dm;\n }",
"@DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2013-12-30 12:59:45.528 -0500\", hash_original_method = \"9F609FC4DF465EEA0A9F2C3A79A2C6B4\", hash_generated_method = \"B9D65B71D31F113C9D169E78F4EAE96E\")\n \npublic void replyToMessage(Message srcMsg, Message dstMsg) {\n try {\n dstMsg.replyTo = mSrcMessenger;\n srcMsg.replyTo.send(dstMsg);\n } catch (RemoteException e) {\n log(\"TODO: handle replyToMessage RemoteException\" + e);\n e.printStackTrace();\n }\n }",
"public SyncMessage recoit ( Door d ) {\n\nSyncMessage sm = (SyncMessage)receive( d );\nreturn sm;\n}",
"public String getTalkingTo() {\n return talkingTo;\n }",
"public ManagedChannelBuilder<?> delegate() {\n return this.delegateBuilder;\n }",
"public ObjectOutputStream returnMessage()\n {\n return outToClient;\n }",
"teledon.network.protobuffprotocol.TeledonProtobufs.Donator getDonator();",
"teledon.network.protobuffprotocol.TeledonProtobufs.Donator getDonator();",
"public ChatWithServer.Req getChatWithServerReq() {\n return instance.getChatWithServerReq();\n }",
"public String getPersonalMessage()\n \t{\n \t\treturn personalMessage;\n \t}",
"public Calendar getSendDateTime() {\n\n // Get the date and time at which the missive document was sent\n return this.missiveHeader.getSndDtTm();\n }",
"public Messaging getMessaging(){\n return new DefaultMessaging();\n }",
"public teledon.network.protobuffprotocol.TeledonProtobufs.DonatorOrBuilder getDonatorOrBuilder() {\n if ((payloadCase_ == 3) && (donatorBuilder_ != null)) {\n return donatorBuilder_.getMessageOrBuilder();\n } else {\n if (payloadCase_ == 3) {\n return (teledon.network.protobuffprotocol.TeledonProtobufs.Donator) payload_;\n }\n return teledon.network.protobuffprotocol.TeledonProtobufs.Donator.getDefaultInstance();\n }\n }",
"public String getNotificationMessage() {\n if (this.mInvitation != null) return this.mInvitation.getSenderUsername() + \" wants to be your buddy\";\n else if (this.mChatMessageFragment != null) return this.mChatMessageFragment.getMessage();\n else return null;\n }",
"public String getmChatbotDomain() {\n return mChatbotDomain;\n }",
"public org.graylog.plugins.dnstap.protos.DnstapOuterClass.Message getMessage() {\n if (messageBuilder_ == null) {\n return message_ == null ? org.graylog.plugins.dnstap.protos.DnstapOuterClass.Message.getDefaultInstance() : message_;\n } else {\n return messageBuilder_.getMessage();\n }\n }",
"public UDPConnectionHandler getUDPConnection() {\r\n\t\treturn udp;\r\n\t}",
"public network.message.PlayerResponses.Command getCommand() {\n if (commandBuilder_ == null) {\n if (responseCase_ == 2) {\n return (network.message.PlayerResponses.Command) response_;\n }\n return network.message.PlayerResponses.Command.getDefaultInstance();\n } else {\n if (responseCase_ == 2) {\n return commandBuilder_.getMessage();\n }\n return network.message.PlayerResponses.Command.getDefaultInstance();\n }\n }",
"public ChatWithServer.Relay getChatWithServerRelay() {\n if (rspCase_ == 3) {\n return (ChatWithServer.Relay) rsp_;\n }\n return ChatWithServer.Relay.getDefaultInstance();\n }",
"public String getClientMessage() {\n return message;\n }",
"public static void sendNormalMOTD(Player target) {\n boolean somethingSent = false;\n\n //Send motd title\n if (motd.has(\"title\")) {\n target.sendMessage(ChatColor.translateAlternateColorCodes('&', motd.getString(\"title\")));\n somethingSent = true;\n }\n\n //Send priority messages\n if (motd.has(\"priority\")) {\n String[] priority = new String[motd.getJSONArray(\"priority\").length()];\n for (int i = 0; i < priority.length; i++) {\n priority[i] = ChatColor.GOLD + \" > \" + ChatColor.translateAlternateColorCodes('&', motd.getJSONArray(\"priority\").getString(i));\n }\n target.sendMessage(priority);\n somethingSent = true;\n }\n\n //send a few random daily's\n if (motd.has(\"normal\") && !motd.getJSONArray(\"normal\").isEmpty()) {\n Random r = new Random();\n int totalNormalMessages;\n\n if (motdNormalCount > motd.getJSONArray(\"normal\").length()) {\n totalNormalMessages = motd.getJSONArray(\"normal\").length();\n } else {\n totalNormalMessages = motdNormalCount;\n }\n\n String[] normalMessages = new String[totalNormalMessages];\n JSONArray used = new JSONArray();\n int itemNum = r.nextInt(motd.getJSONArray(\"normal\").length());\n normalMessages[0] = ChatColor.GREEN + \" > \" + ChatColor.WHITE + ChatColor.translateAlternateColorCodes('&', motd.getJSONArray(\"normal\").getString(itemNum));\n used.put(itemNum);\n\n for (int i = 1; i < totalNormalMessages; i++) {\n while (used.toList().contains(itemNum)) {\n itemNum = r.nextInt(motd.getJSONArray(\"normal\").length());\n }\n normalMessages[i] = ChatColor.GREEN + \" > \" + ChatColor.WHITE + ChatColor.translateAlternateColorCodes('&', motd.getJSONArray(\"normal\").getString(itemNum));\n }\n\n target.sendMessage(normalMessages);\n somethingSent = true;\n }\n\n }",
"public synchronized void sendPrivateMessageToPlayer(Player player, String message) {\n SlackUser user;\n if (isTestingMode) {\n user = session.findUserByUserName(testingModeUserName);\n } else {\n user = session.findUserByUserName(player.getUserName());\n }\n SlackMessageHandle<SlackChannelReply> openDirectHandle = session.openDirectMessageChannel(user);\n SlackChannel directChannel = openDirectHandle.getReply().getSlackChannel();\n session.sendMessage(directChannel, message, null);\n }",
"public teledon.network.protobuffprotocol.TeledonProtobufs.DonatorOrBuilder getDonatorOrBuilder() {\n return getDonator();\n }",
"public Term getSender() {\n return sender;\n }",
"public String getChatMessageInString() {\r\n\t\treturn chatMessage.get();\r\n\t}",
"public String getReplier(int messageID){\n Message message = allmessage.get(messageID);\n return message.getReplyer();\n }",
"protected String getCenterMessage() {\n\t\treturn getLeader().getName() + \" leads\";\n\t}",
"public Reply sender(String senderText, DSN dsn) throws ThingsException, InterruptedException;",
"java.lang.String getSenderId();",
"@Override\n public String getBotToken() {\n return \"412386556:AAHawYQpPaNLFdnpckQsYr7c3YdBQZEXy0I\";\n }",
"public int getSender(int messageID){\n Message msg = getmessage(messageID);\n return msg.getSenderid();\n }",
"@DynamoDBAttribute(attributeName = \"discordId\")\n public final String getDiscordId() {\n return discordId;\n }",
"public synchronized DatagramSocket getDatagramSocket() {\r\n\t\treturn datagramSocket;\r\n\t}",
"public final Player getRecipient() {\n return recipient;\n }",
"public java.lang.String getDID() {\r\n return DID;\r\n }",
"public String getSender() {\n\t\tif (getSwiftMessage() != null && getSwiftMessage().getBlock1() != null) {\n\t\t\treturn getSwiftMessage().getBlock1().getLogicalTerminal();\n\t\t}\n\t\treturn null;\n\t}",
"public Object getCommunicationChannel()\r\n\t\t\tthrows PersistenceMechanismException {\n\t\treturn null;\r\n\t}",
"public Management getDeclareWinnerMessage(){\n\t\t \t\tLeaderElection.Builder elb = LeaderElection.newBuilder();\n\t\t \t\telb.setCandidateId(conf.getServer().getNodeId());\n\t\t \t\telb.setElectId(String.valueOf(Integer.parseInt(conf.getServer().getProperty(\"port.mgmt\"))%100));\n\t\t \t\telb.setDesc(\"Leader's declaration\");\n\t\t \t\telb.setAction(ElectAction.DECLAREWINNER);\n\n\t\t \t\tMgmtHeader.Builder mhb = MgmtHeader.newBuilder();\n\t\t\t\tmhb.setOriginator(conf.getServer().getNodeId());\n\t\t\t\tmhb.setTime(System.currentTimeMillis());\n\n\t\t\t\tRoutingPath.Builder rpb = RoutingPath.newBuilder();\n\t\t\t\trpb.setNodeId(conf.getServer().getNodeId());\n\t\t\t\trpb.setTime(mhb.getTime());\n\t\t\t\tmhb.addPath(rpb);\n\n\t\t\t\tManagement.Builder mb = Management.newBuilder();\n\t\t\t\tmb.setHeader(mhb.build());\n\t\t\t\tmb.setElection(elb.build());\n\t\t \t\treturn mb.build();\n\t\t \t}",
"ChatWithServer.Req getChatWithServerReq();",
"public teledon.network.protobuffprotocol.TeledonProtobufs.DonatieOrBuilder getDonatieOrBuilder() {\n if (donatieBuilder_ != null) {\n return donatieBuilder_.getMessageOrBuilder();\n } else {\n return donatie_ == null ?\n teledon.network.protobuffprotocol.TeledonProtobufs.Donatie.getDefaultInstance() : donatie_;\n }\n }",
"public DatagramSocket getSenderSocket() {\r\n\t\treturn this.socket;\r\n\t}",
"public String senderId() {\n return senderId;\n }",
"public teledon.network.protobuffprotocol.TeledonProtobufs.DonatieOrBuilder getDonatieOrBuilder() {\n if ((payloadCase_ == 5) && (donatieBuilder_ != null)) {\n return donatieBuilder_.getMessageOrBuilder();\n } else {\n if (payloadCase_ == 5) {\n return (teledon.network.protobuffprotocol.TeledonProtobufs.Donatie) payload_;\n }\n return teledon.network.protobuffprotocol.TeledonProtobufs.Donatie.getDefaultInstance();\n }\n }",
"public String getSender() {\n\t\treturn senderId;\n\t}",
"@Override\n public boolean isDM(Optional<BaseCharacter> inUser)\n {\n if(!inUser.isPresent())\n return false;\n\n return inUser.get().hasAccess(Group.DM);\n }",
"@Override\n\tpublic MessageDao getMessage() {\n\t\treturn new BuyMessageImpl();\n\t}",
"public String getReplyTo() {\n return replyTo;\n }",
"public teledon.network.protobuffprotocol.TeledonProtobufs.Donator getDonator() {\n return donator_ == null ? teledon.network.protobuffprotocol.TeledonProtobufs.Donator.getDefaultInstance() : donator_;\n }",
"public String sendMessage(){\n\t\tMessageHandler handler = new MessageHandler();\n\t\tSystem.out.println(this.senderName +\" \"+this.recieverName+ \" \" + this.subject +\" \"+this.message);\n\t\t\n\t\tif((handler.addNewMessage(this.senderName, this.recieverName, this.subject,this.message))){\n\t\t\tFacesContext context = FacesContext.getCurrentInstance();\n\t\t\tcontext.addMessage(null,new FacesMessage(FacesMessage.SEVERITY_INFO, \"Message:Sent\",\"Sent\"));\n\t\t\tcontext.getExternalContext().getFlash().setKeepMessages(true);\n\t\t\treturn mainXhtml;\n\t\t}else{\n\t\t\t FacesContext.getCurrentInstance().addMessage(null,new FacesMessage(FacesMessage.SEVERITY_ERROR, \"Message:Failed to send\",\"Failed to Send\"));\n\t\t\tSystem.out.println(\"Message not sent\");\n\t\t\treturn null;\n\t\t}\n\t\n\t}",
"public java.lang.String getMent() {\n java.lang.Object ref = ment_;\n if (!(ref instanceof java.lang.String)) {\n java.lang.String s = ((com.google.protobuf.ByteString) ref)\n .toStringUtf8();\n ment_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"final String getDDUser() {\r\n\t\treturn ddUser;\r\n\t}",
"public Message getMessage(){\n return message;\n }",
"public void sendUdpMessageToDrone() {\n\n DatagramPacket packet = null;\n try {\n packet = new DatagramPacket(message.getBytes(), message.length(), InetAddress.getByName(\"127.0.0.1\"), 6000);\n sender.send(packet);\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n }"
] |
[
"0.65641624",
"0.59785026",
"0.5682652",
"0.54103595",
"0.5384686",
"0.536002",
"0.5345899",
"0.5345899",
"0.5345899",
"0.5345899",
"0.5345899",
"0.5345899",
"0.5326209",
"0.52837527",
"0.52237785",
"0.52122843",
"0.52008516",
"0.5191222",
"0.51768523",
"0.517666",
"0.51688224",
"0.5135934",
"0.51300347",
"0.51220405",
"0.5120564",
"0.5048627",
"0.5042192",
"0.50268245",
"0.5026291",
"0.501636",
"0.5013888",
"0.5013042",
"0.5005289",
"0.49956846",
"0.49883875",
"0.49821183",
"0.498075",
"0.49800837",
"0.49742988",
"0.4967776",
"0.49614948",
"0.49320406",
"0.49291518",
"0.48996812",
"0.4895658",
"0.48903215",
"0.48857757",
"0.48842254",
"0.4881209",
"0.48679096",
"0.48559275",
"0.48515785",
"0.48419857",
"0.48380667",
"0.48380667",
"0.48200074",
"0.48191416",
"0.48188978",
"0.48177838",
"0.4815726",
"0.48101342",
"0.48016745",
"0.4794198",
"0.47940794",
"0.47940636",
"0.4791614",
"0.47898713",
"0.47893164",
"0.4786112",
"0.47854567",
"0.47722965",
"0.4768629",
"0.47626543",
"0.47602892",
"0.47526255",
"0.47432682",
"0.47382045",
"0.4731223",
"0.47291934",
"0.4715314",
"0.47145173",
"0.47111952",
"0.47029948",
"0.4698021",
"0.46970966",
"0.4692862",
"0.46903312",
"0.46875677",
"0.4677613",
"0.46754137",
"0.46734446",
"0.46700826",
"0.46668458",
"0.46653202",
"0.4661007",
"0.46546087",
"0.46530005",
"0.4652794",
"0.4650127",
"0.4649158"
] |
0.55233186
|
3
|
GeoData objects are used in a large number of places throught GeoTools. The role of a GeoData object is to associate id values with data values. Examples of use include matching feature ids to data values for thematic mapping, Storing tool tip texts for displaying with features and for providing data to be graphed or otherwise ploted. GeoData objects can store both text and numeric data, this was done to provide a single interface to columns of data. getText on a numeric GeoData will correctly return a string of that value, getValue on a text geoData however will fail. In theory, as GeoData is quite a simple interface it should be posible to implement classes that link back to databases through JDBC for example. The ids stored in the GeoData must match those found in the features to which the data relates, therefor any class that provides for loading spatial data with associated data should provide a method to retreve prebuilt GeoData objects. For example, the ShapeFileReader class provides the following: public GeoData readData(int col) Provides a GeoData for specified column number public GeoData readData(String colName) As above, but looks for the column by name. GeoData[] readData() Provides an array of GeoDatas for the entrire shapefile
|
public interface GeoData{
/**
* Most geodata sets contain features for which there is no data, or the data is missing.<br>
* In these cases a specific value is often used to represent these special cases.<p>
* The static final value MISSING is the default value used by GeoDatas to represent
* these cases.
* @see #setMissingValueCode
* @see #getMissingValueCode
*/
public static final double MISSING = Double.NaN;
/**
* All geodata have a type - this is particularly important when
* interfacing with other data sources/formats.
* @see #setDataType
* @see #getDataType
*/
public static final int CHARACTER = 0;
public static final int INTEGER = 1;
public static final int FLOATING = 2;
/**
* All GeoData objects can have a name associated with them.<br>
* Typicaly the name will match the Column heading from which the data came from.<br>
* Names can be important when the GeoData is used in thematic maps as this is the
* name that will be placed in the key by default.<br>
* @author James Macgill JM
* @return String The name associated with this GeoData.
*/
String getName();
/**
* All GeoData objects can have a name associated with them.<br>
* Typicaly the name will match the Column heading from which the data came from.<br>
* Names can be important when the GeoData is used in thematic maps as this is the
* name that will be placed in the key by default.<br>
*
* @author James Macgill JM
* @param name_ The name to be associated with this GeoData.
*/
void setName(String name_);
/**
* looks up and matches a value to the specifed feature id.<br>
* Used for example by shaders to obtain vaules for thematic mapping.<br>
*
* @author James Macgill JM
* @param id An int specifying the feature id to retreve a value for.
* @return double The value for the specified id, if no id matches the one given then the value specifed by setMissingValue should be returned.
* @see #setMissingValue
*/
double getValue(int id);
/**
* Looks up and retreves a string for the specifed feature id.<br>
* Used for example by the ToolTip feature in Themes to provide tool tip text for each feature.
*
* @author James Macgill JM
* @param id An int specifying the feature to retreve the text for.
* @return String A piece of text for the chosen feature id. If no id matches then an empty string should be returned " "
*/
String getText(int id);
/**
* In order to allow systems to iterate through all of the data contained within the GeoData object this
* method provides a list of all of the IDs which have associated values stored.
*
* @author James Macgill JM
* @return Enumeration An enumeration of all of the IDs which can then be iterated through.
*/
Enumeration getIds();
/**
* Not all posible ids will have a value stored in the GeoData object, so when a call is made to getValue with an id that is
* not stored a special value is returned to signify that a value for this id is missing.<br>
* By default that value is set to MISSING, however this behavoir can be changed by calling this method with a new value.<br>
*
* @see #getMissingValueCode
* @author James Macgill JM
* @param mv A double containing the new value to represent missing data.
*/
public void setMissingValueCode(double mv);
/**
* Not all posible ids will have a value stored in the GeoData object, so when a call is made to getValue with an id that is
* not stored a special value is returned to signify that a value for this id is missing.<br>
* A call to this method will return the current code in use to represent that situation.<br>
*
* @see #setMissingValueCode
* @author James Macgill JM
* @return double The current value representing missing data.
*/
public double getMissingValueCode();
/**
* A quick statistic relating to the values stored in the GeoData object.<br>
*
* @author James Macgill JM
* @return double The largest value currently stored in this GeoData. The missingValueCode is not included in this test.
*/
double getMax();
/**
* A quick statistic relating to the values stored in the GeoData object.<br>
*
* @author James Macgill JM
* @return double The smallest value currently stored in this GeoData. The missingValueCode is not included in this test.
*/
double getMin();
/**
* The total number of stored id/value pairs stored in this GeoData.
* @author James Macgill JM
* @return int The number of values stored in this GeoData.
*/
int getSize();
/**
* The total number of stored values stored in this GeoData which equal the missing value code.
* @author James Macgill JM
* @return int The number of missing values stored in this GeoData.
*/
int getMissingCount();
/**
* Gets the type of data stored in the geodata<br>
* <ul><li>String - GeoData.CHARACTER</li>
* <li>Integer - GeoData.INTEGER</li>
* <li>Double - GeoData.FLOATING</li></ul>
*/
int getDataType();
/**
* Sets the type of data stored in the geodata<br>
* <ul><li>String - GeoData.character</li>
* <li>Integer - GeoData.integer</li>
* <li>Double - GeoData.float</li></ul>
*/
void setDataType(int type );
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"@Override\n public ArrayList<GeoDataRecordObj> getAllGeoData() {\n if(allGeoData == null) {\n this.reloadData();\n }\n return allGeoData;\n }",
"Collection getData();",
"protected abstract Object[] getData();",
"Object getData();",
"Object getData();",
"public Geominas getGeominas(String geoCod) throws Exception;",
"public Object getData();",
"@Override\n public FlotillaData getData() {\n FlotillaData data = new FlotillaData();\n data.setName(name);\n data.setLocation(reference);\n data.setBoats(getBoatNames(boats));\n\n return data;\n }",
"Object getData() { /* package access */\n\t\treturn data;\n\t}",
"DataFactory getDataFactory();",
"public abstract Object getData();",
"public interface GeoInterface {\n\t// infinity value\n\tstatic final double INF = Double.MAX_VALUE;\n\t// small number (less than this is consider as zero)\n\tstatic final double SMALL_NUM = 0.0001;\n\t\t\n\t// perimeter of the maximum area this application covers (map area)\n\t// grid/space dimensions\t\t //# Dataset\t\t\t\t\t//# Query \t\n\tfinal static double MIN_X = 52.0; // MinX: 52.99205499607079 // Min X: 375.7452259303738\n\tfinal static double MIN_Y = -21.0; // MinY: -20.08557496216634 // Min Y: 16.319751123918174\n\tfinal static double MAX_X = 717.0; // MaxX: 716.4193496072005 // Max X: 576.9230902330686\n\tfinal static double MAX_Y = 396.0; // MaxY: 395.5344310979076 // Max Y: 234.80924053063617\n\t\n\t// Earth radius (average) in meters\n\tstatic final int EARTH_RADIUS = 6371000;\n\t\n\t// pi\n\tstatic final double PI = Math.PI;\n}",
"public Object getData() {\n return dataArray;\n }",
"public DataImpl getData() {\n RealTupleType domain = overlay.getDomainType();\n TupleType range = overlay.getRangeType();\n \n float[][] setSamples = nodes;\n float r = color.getRed() / 255f;\n float g = color.getGreen() / 255f;\n float b = color.getBlue() / 255f;\n float[][] rangeSamples = new float[3][setSamples[0].length];\n Arrays.fill(rangeSamples[0], r);\n Arrays.fill(rangeSamples[1], g);\n Arrays.fill(rangeSamples[2], b);\n \n FlatField field = null;\n try {\n GriddedSet fieldSet = new Gridded2DSet(domain,\n setSamples, setSamples[0].length, null, null, null, false);\n FunctionType fieldType = new FunctionType(domain, range);\n field = new FlatField(fieldType, fieldSet);\n field.setSamples(rangeSamples);\n }\n catch (VisADException exc) { exc.printStackTrace(); }\n catch (RemoteException exc) { exc.printStackTrace(); }\n return field;\n }",
"private List<GeneralResultRow> getData(FeatureSource<?, ?> featureSource)\n\t\t\tthrows Exception {\n\t\tif (featureSource == null) {\n\t\t\tException mple = new Exception(\"featureSource is null\");\n\t\t\tmple.printStackTrace();\n\t\t\tthrow mple;\n\t\t}\n\t\tthis.crs=featureSource.getSchema()\n\t\t\t\t.getCoordinateReferenceSystem();\n\t\tString crs = org.geotools.gml2.bindings.GML2EncodingUtils\n\t\t\t\t.epsgCode(this.crs);\n\t\tif (crs == null) {\n\t\t\tcrs = \"\" + Config.EPSG_CODE + \"\";\n\t\t}else{\n\t\t\ttry {\n\t\t\t\tint code=CRS.lookupEpsgCode(featureSource.getSchema().getCoordinateReferenceSystem(), true);\n\t\t\t\t//System.out.println(\"the code is: \"+code);\n\t\t\t\tcrs = String.valueOf(code);\n\t\t\t} catch (FactoryException e1) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t//e1.printStackTrace();\n\t\t\t}\n\t\t}\n\t\tthis.crsstring=crs;\n\t\t\n\t\tFeatureCollection<?, ?> collection = featureSource.getFeatures();\n\t\tFeatureIterator<?> iterator = collection.features();\n\t\tList<GeneralResultRow> resultlist = new ArrayList<GeneralResultRow>();\n\t\ttry {\n\t\t\tdouble total_thematic_duration=0.0;\n\t\t\tdouble total_duration_geom=0.0;\n\t\t\twhile (iterator.hasNext()) {\n\t\t\t\t\n\t\t\t\tlong startTime = System.nanoTime();\n\t\t\t\tFeature feature = iterator.next();\n\t\t\t\tGeneralResultRow newrow = new GeneralResultRow(); // new row\n\t\t\t\tfor (Property p : feature.getProperties()) {\n\t\t\t\t\tnewrow.addPair(p.getName().getLocalPart(), p.getValue());\n\t\t\t\t}\n\t\t\t\tlong endTime = System.nanoTime();\n\t\t\t\tdouble duration = (endTime - startTime) / 1000000; // divide by\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// 1000000 to\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// get\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// milliseconds.\n\t\t\t\ttotal_thematic_duration += duration;\n\t\t\t\tPrintTimeStats.printTime(\"Read Thematic from file\", duration);\n\t\t\t\t\n\t\t\t\tnewrow.addPair(primarykey, KeyGenerator.Generate()); // Add\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// primary\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// key\n\t\t\t\tstartTime = System.nanoTime();\n\t\t\t\tGeometryAttribute sourceGeometryAttribute = feature\n\t\t\t\t\t\t.getDefaultGeometryProperty();\n\t\t\t\tendTime = System.nanoTime();\n\t\t\t\tduration = (endTime - startTime) ; // divide by\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// 1000000 to\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// get\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// milliseconds.\n\t\t\t\ttotal_duration_geom+= duration;\n\t\t\t\tPrintTimeStats.printTime(\"Read Geometry from file\", duration);\n\t\t\t\t\n\n\t\t\t\t//RowHandler.handleGeometry(newrow, (Geometry)sourceGeometryAttribute.getValue(), crs);\n\t\t\t\tresultlist.add(newrow);\n\t\t\t}\n\t\t\tPrintTimeStats.printTime(\"Read Thematic data (total) from file\", total_thematic_duration);\n\t\t\tPrintTimeStats.printTime(\"Read Geometries (total) from file\", total_duration_geom);\n\t\t} finally {\n\t\t\titerator.close();\n\t\t}\n\n\t\treturn resultlist;\n\t}",
"public MapTile[] getData() {\n\t\treturn this.data;\n\t}",
"public static Object[][] getData() {\n\t\tEntity[] data = db.getData();\n\t\tObject[][] toReturn = new Object[data.length][];\n\t\tfor(int i = 0; i < toReturn.length; i++) {\n\t\t\ttoReturn[i] = data[i].getObject();\n\t\t}\n\t\treturn toReturn;\n\t}",
"@DataProvider()\n\tpublic Object[][] getData() {\n\t\t\n\t\treturn ConstantsArray.getArrayData();\n\t}",
"Object getDataValue(final int row, final int column);",
"public void getData(String dataName){\r\n this.mData.get(dataName);\r\n }",
"public Object getData()\r\n\t\t{\r\n\t\t\treturn data;\r\n\t\t}",
"public int getPlaceGeoData() {\n return mPlaceGeoData;\n }",
"public Object getDataObject() {\n return dataObject;\n }",
"public SingleValueGeoPointFieldData(String fieldName, int[] ordinals, double[] lat, double[] lon) {\n\t\tsuper(fieldName, lat, lon);\n\t\tthis.ordinals = ordinals;\n\t}",
"public Object getData() \n {\n return data;\n }",
"public G getData (){\n return this._data;\n }",
"Object getRawData();",
"public void loadData(Object[] columnData);",
"java.lang.String getData();",
"public String[] getGeoSystem();",
"@Override\n\tpublic String getData()\n\t{\n\t\treturn areaCell.toString();\n\t}",
"public Object getData() {\r\n\t\t\treturn data;\r\n\t\t}",
"public final Layers getData()\r\n {\r\n return _theData;\r\n }",
"DataTypeInstance getDataInstance();",
"public interface DataAPI {\n\t// Query\n\tDataTree getDataHierarchy(); // Tree List of Data and Datatypes\n\t\n\tDataTree getDatatypeHierarchy(); // Tree List of Datatypes\n\n\tDataTree getMetricsHierarchy(); // Tree List of Metrics and Metric\n\t\t\t\t\t\t\t\t\t\t\t// types\n\n\tArrayList<String> getAllDatatypeIds();\n\n\tMetadataProperty getMetadataProperty(String propid);\n\n\tArrayList<MetadataProperty> getMetadataProperties(String dtypeid, boolean direct);\n\n\tArrayList<MetadataProperty> getAllMetadataProperties();\n\n\tDataItem getDatatypeForData(String dataid);\n\n\tArrayList<DataItem> getDataForDatatype(String dtypeid, boolean direct);\n\n\tString getTypeNameFormat(String dtypeid);\n\n\tString getDataLocation(String dataid);\n\n\tArrayList<MetadataValue> getMetadataValues(String dataid, ArrayList<String> propids);\n\n\t// Write\n\tboolean addDatatype(String dtypeid, String parentid);\n\n\tboolean removeDatatype(String dtypeid);\n\n\tboolean renameDatatype(String newtypeid, String oldtypeid);\n\n\tboolean moveDatatypeParent(String dtypeid, String fromtypeid, String totypeid);\n\n\tboolean addData(String dataid, String dtypeid);\n\n\tboolean renameData(String newdataid, String olddataid);\n\n\tboolean removeData(String dataid);\n\n\tboolean setDataLocation(String dataid, String locuri);\n\n\tboolean setTypeNameFormat(String dtypeid, String format);\n\n\tboolean addObjectPropertyValue(String dataid, String propid, String valid);\n\n\tboolean addDatatypePropertyValue(String dataid, String propid, Object val);\n\n\tboolean addDatatypePropertyValue(String dataid, String propid, String val, String xsdtype);\n\n\tboolean removePropertyValue(String dataid, String propid, Object val);\n\n\tboolean removeAllPropertyValues(String dataid, ArrayList<String> propids);\n\n\tboolean addMetadataProperty(String propid, String domain, String range);\n\t\n\tboolean addMetadataPropertyDomain(String propid, String domain);\n\n\tboolean removeMetadataProperty(String propid);\n\t\n\tboolean removeMetadataPropertyDomain(String propid, String domain);\n\n\tboolean renameMetadataProperty(String oldid, String newid);\n\n\t// Sync/Save\n\tboolean save();\n\t\n\tvoid end();\n\t\n\tvoid delete();\n}",
"static public interface IPointGeo extends IPoint3D {\n\t\t/**\n\t\t * Corresponds to getY().\n\t\t * @return Returns latitude.\n\t\t */\n\t\tdouble getLatitude();\n\t\t/**\n\t\t * Corresponds to getX().\n\t\t * @return Returns longitude.\n\t\t */\n\t\tdouble getLongitude();\n\t\t/**\n\t\t * Corresponds to getZ().\n\t\t * @return Returns altitude in kilometers.\n\t\t */\n\t\tdouble getAltitude();\n\t}",
"protected abstract Map<String, Map<String, Object>> getData(String columnFamilyName);",
"void populateData();",
"public Object getData() { return funcData; }",
"public Object getData(){\n\t\treturn this.data;\n\t}",
"public E getData() { return data; }",
"public Object getData() {\n\t\treturn data;\n\t}",
"@ApiStatus.Internal\n @NotNull\n public Map<String, Object> getData() {\n return data;\n }",
"public Data getData(HelperDataType type);",
"Object getDataValue(String column, int row);",
"@java.lang.Override\n public com.clarifai.grpc.api.Data getData() {\n return data_ == null ? com.clarifai.grpc.api.Data.getDefaultInstance() : data_;\n }",
"public String getPointsData() {\n\t\t\tStringBuilder pointsString = new StringBuilder(\"[\");\n\n\t\t\ttry {\n\t\t\t\tCursor pointsCursor = dbHandler\n\t\t\t\t\t\t.getEveryLatLong(Main.logged_user);\n\n\t\t\t\tif (pointsCursor != null) {\n\n\t\t\t\t\tif (pointsCursor.moveToFirst()) {\n\t\t\t\t\t\twhile (!pointsCursor.isAfterLast()) {\n\t\t\t\t\t\t\tpointsString.append(String.format(GOOGLE_MAP_POINT,\n\t\t\t\t\t\t\t\t\tpointsCursor.getDouble(LATITUDE),\n\t\t\t\t\t\t\t\t\tpointsCursor.getDouble(LONGITUDE)));\n\n\t\t\t\t\t\t\tpointsCursor.moveToNext();\n\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tpointsCursor.close();\n\t\t\t\t}\n\t\t\t} catch (Exception ex) {\n\t\t\t\tLog.e(LOG_TAB, ex.getMessage());\n\t\t\t\tpointsString.append(\"ERROR_\");\n\t\t\t}\n\n\t\t\tif(pointsString.length() > GOOGLE_MAP_POINT.length())\n\t\t\t\treturn pointsString.substring(0, pointsString.length() - 1) + \"]\";\n\t\t\telse\n\t\t\t\treturn \"NODATA\";\n\t\t}",
"public Collection< VDataT > vertexData();",
"public Data getData() {\n return data;\n }",
"public Data getData() {\n return data;\n }",
"public double[] getHitGeoCoord();",
"private IMapData<Integer, String> getHashMapData1() {\n List<IKeyValueNode<Integer, String>> creationData = new ArrayList<>();\n List<IKeyValueNode<Integer, String>> data = new ArrayList<>();\n List<Integer> keys = this.createKeys(data);\n List<String> values = this.createValues(data);\n\n return new MapData<>(\n creationData,\n data,\n keys,\n values);\n }",
"public java.util.List getData() {\r\n return data;\r\n }",
"@Parameters\n\tpublic static Collection<Object[]> data() {\n\t\treturn Arrays.asList(new Object[][]{\n\t\t\t{\"Cuenta de Juan\", 200,1,75, 125},\t\t\t\t// Zone 1\n\t\t\t{\"Cuenta de Maria\", 500, 2, 250, 250},\t\t\t// Zone 2\n\t\t\t{\"Cuenta de Ignacio\", 1850, 3, 50, 1800},\t\t// Zone 3\n\t\t\t}); \n\t}",
"Map getIDPEXDataMap();",
"public GeotiffDataSource() {}",
"T getData();",
"private static Object[][] getData(Database d) {\n\t\tdb = d;\n\t\tEntity[] data = db.getData();\n\t\tObject[][] toReturn = new Object[data.length][];\n\t\tfor(int i = 0; i < toReturn.length; i++) {\n\t\t\ttoReturn[i] = data[i].getObject();\n\t\t}\n\t\treturn toReturn;\n\t}",
"public Object[] getData() {\n return rowData;\n }",
"@Override\n\tpublic List<Map<String, String>> getData() throws Exception{\n\t\tqueryForList(\"\", null);\n\t\treturn null;\n\t}",
"@Override\n public List<IMapData<Integer, String>> getHashMapData() {\n List<IMapData<Integer, String>> data = new ArrayList<>();\n\n data.add(this.getHashMapData1());\n data.add(this.getHashMapData2());\n\n return data;\n }",
"@Override\n\tpublic HashMap<String, String> getData() {\n\t\treturn dataSourceApi.getData();\n\t}",
"public Map<String, Object> getData() {\n\t\treturn this.data;\n\t}",
"MapType map(List<ReferenceOrderedDatum> rodData, char ref, LocusContext context);",
"DataObject(int datasetid, YailList fields, YailList data) {\n this.name = \"\";\n this.fields = fields;\n this.data = data;\n this.path = \"\";\n this.datasetid = datasetid;\n }",
"DataCollectionInfo getInfo();",
"public static ArrayList<Coords> getCoords() {\n System.out.println(\"aha1 \" + thing);\n ArrayList<Coords> result = new ArrayList<Coords>();\n if(thing.equals(\"Bay Ridge\")){\n result = BayRidgeData.getData();\n System.out.println(\"true\");\n }else if(thing.equals(\"BRCA Commons Area\")){\n result = CommonsData.getData();\n }else{\n result = null;\n }\n return result;\n// return BayRidgeData.getData();\n }",
"@DataProvider(name = \"data\")\n\tpublic Object[][] testDataSupplier() throws Exception {\n\t\tString filePath = \"C:\\\\Users\\\\rekha\\\\OneDrive\\\\Desktop\\\\CP- SAT\\\\Screenshot\\\\Rediffdata.xlsx\";\n\n\t\t// read excel file using file input stream, using Apache POI\n\t\tFileInputStream fis = new FileInputStream(new File(filePath));\n\t\tXSSFWorkbook wb = new XSSFWorkbook(fis);\n\t\tXSSFSheet sheet = wb.getSheet(\"Sheet1\");\n\n\t\t// calculate total number of rows and columns so that we can iterate over it.\n\t\tint totalNumberOfRows = sheet.getLastRowNum()+1 ;\n\t\tint totalNumberOfCols = sheet.getRow(0).getLastCellNum();\n\n\t\t// create an object array. which will store the test data from excel file\n\t\tObject[][] testdata1 = new Object[totalNumberOfRows][totalNumberOfCols];\n\n\t\tfor (int i = 1; i < totalNumberOfRows; i++) {\n\t\t\tfor (int j = 0; j < totalNumberOfCols; j++) {\n\n\t\t\t\ttestdata1[i][j] = sheet.getRow(i).getCell(j).toString();\n\t\t\t}\n\t\t}\n\t\treturn testdata1;\n\t}",
"@DataProvider(name=\"dataset\")\r\n\tpublic static Object[][] getdata() throws IOException{\r\n\t\tObject [][] ob= new IO().getdataset(\"./dataset.csv\");\t\r\n\treturn ob;\r\n\t}",
"public Array getDataArray() {\n return dataArray;\n }",
"public HashMap<Long, String> getData() {\n\t\treturn data;\n\t}",
"public IData getStoreddata();",
"java.util.List<com.sanqing.sca.message.ProtocolDecode.DataObject> \n getDataObjectList();",
"public D getData(){\n\t\treturn data;\n\t}",
"public E getData(){\n\t\t\treturn data;\n\t\t}",
"@Parameters\n\tpublic static Collection<Object[]> data() {\n\t\tObject[][] data = new Object[][] { \n\t\t\t{null, null, null, null, null},\n\t\t\t{null, \"\", null, null, null},\n\t\t\t{null, troppoLunga, null, null, null},\n\t\t};\n\t\treturn Arrays.asList(data);\n\t}",
"String getData();",
"public FeatureData read(Reader r) throws IOException, DataFormatException;",
"public IData getData() {\n return data;\n }",
"protected abstract String getFeatureName(Map<String, Object> data);",
"protected void readAllData() {\n \n String query = buildDataQuery();\n \n try {\n ResultSet rs = executeQuery(query);\n ResultSetMetaData md = rs.getMetaData();\n \n //Construct the internal data containers\n _dataMap = new LinkedHashMap<String,double[]>();\n _textDataMap = new LinkedHashMap<String,String[]>();\n \n //Make containers to collect data as we get it from the ResultSet\n int ncol = md.getColumnCount();\n ResizableDoubleArray[] dataArrays = new ResizableDoubleArray[ncol]; //tmp holder for numeric data\n List<String>[] textDataLists = new List[ncol]; //tmp holder for text data\n for (int i=0; i<ncol; i++) {\n dataArrays[i] = new ResizableDoubleArray();\n textDataLists[i] = new ArrayList<String>();\n }\n\n //Define a Calendar so we get our times in the GMT time zone.\n Calendar cal = Calendar.getInstance(TimeZone.getTimeZone(\"GMT\"));\n \n //Read data from the result set into the ResizableDoubleArray-s which are already in the _dataArrayMap.\n while (rs.next()) { \n for (int i=0; i<ncol; i++) {\n double d = Double.NaN;\n //Check type and read as appropriate\n //TODO: check for other variation of time and text types\n int typeID = md.getColumnType(i+1); \n \n if (typeID == java.sql.Types.TIMESTAMP) { //TODO: test for DATE and TIME types?\n //We need to convert timestamps to numerical values.\n Timestamp ts = rs.getTimestamp(i+1, cal);\n d = ts.getTime();\n } else if (typeID == java.sql.Types.VARCHAR || typeID == java.sql.Types.CHAR) {\n //Text column. Save strings apart from other data.\n //They will appear as NaNs in the numeric data values.\n String s = rs.getString(i+1);\n textDataLists[i].add(s);\n } else d = rs.getDouble(i+1);\n \n dataArrays[i].addElement(d);\n }\n }\n \n //Extract the primitive arrays from the ResizableDoubleArray-s and put in data map.\n //Segregate the text data. Don't bother to save \"data\" (NaNs) for String types.\n for (int i=0; i<ncol; i++) {\n String name = md.getColumnName(i+1);\n int typeID = md.getColumnType(i+1);\n if (typeID == java.sql.Types.VARCHAR || typeID == java.sql.Types.CHAR) { \n String[] text = new String[1];\n text = (String[]) textDataLists[i].toArray(text);\n _textDataMap.put(name, text);\n } else {\n double[] data = dataArrays[i].getElements();\n _dataMap.put(name, data);\n }\n }\n \n } catch (SQLException e) {\n String msg = \"Unable to process database query: \" + query;\n _logger.error(msg, e);\n throw new TSSException(msg, e);\n } \n \n }",
"final public Object getDataObject() {\n return this.dataObject;\n }",
"@SuppressWarnings({\"unchecked\"})\n private void loadDataFromOSM() {\n try {\n System.out.println(\">> Attempting to load data from OSM database...\");\n // Load JDBC driver and establish connection\n Class.forName(\"org.postgresql.Driver\");\n String url = \"jdbc:postgresql://localhost:5432/osm_austria\";\n mConn = DriverManager.getConnection(url, \"geo\", \"geo\");\n // Add geometry types to the connection\n PGConnection c = (PGConnection) mConn;\n c.addDataType(\"geometry\", (Class<? extends PGobject>) Class.forName(\"org.postgis.PGgeometry\"));\n c.addDataType(\"box2d\", (Class<? extends PGobject>) Class.forName(\"org.postgis.PGbox2d\"));\n\n // Create statement and execute query\n Statement s = mConn.createStatement();\n\n // Get boundary types\n String query = \"SELECT * FROM boundary_area AS a WHERE a.type IN (8001,8002,8003,8004);\";\n executeSQL(query, s);\n\n query = \"SELECT * FROM landuse_area AS a WHERE a.type IN (5001, 5002);\";\n executeSQL(query, s);\n\n /* // Get landuse types\n\n r = s.executeQuery(query);\n\n while (r.next()) {\n String id = r.getString(\"id\");\n int type = r.getInt(\"type\");\n PGgeometry geom = (PGgeometry) r.getObject(\"geom\");\n\n switch (geom.getGeoType()) {\n case Geometry.POLYGON:\n String wkt = geom.toString();\n org.postgis.Polygon p = new org.postgis.Polygon(wkt);\n if (p.numRings() >= 1) {\n Polygon poly = new Polygon();\n LinearRing ring = p.getRing(0);\n for (int i = 0; i < ring.numPoints(); i++) {\n org.postgis.Point pPG = ring.getPoint(i);\n poly.addPoint((int) pPG.x, (int) pPG.y);\n }\n mObjects.add(new GeoObject(id, type, poly));\n }\n break;\n default:\n break;\n }\n }\n\n // Get natural types\n query = \"SELECT * FROM natural_area AS a WHERE a.type IN (6001, 6002, 6005);\";\n\n r = s.executeQuery(query);\n\n while (r.next()) {\n String id = r.getString(\"id\");\n int type = r.getInt(\"type\");\n PGgeometry geom = (PGgeometry) r.getObject(\"geom\");\n\n switch (geom.getGeoType()) {\n case Geometry.POLYGON:\n String wkt = geom.toString();\n org.postgis.Polygon p = new org.postgis.Polygon(wkt);\n if (p.numRings() >= 1) {\n Polygon poly = new Polygon();\n LinearRing ring = p.getRing(0);\n for (int i = 0; i < ring.numPoints(); i++) {\n org.postgis.Point pPG = ring.getPoint(i);\n poly.addPoint((int) pPG.x, (int) pPG.y);\n }\n mObjects.add(new GeoObject(id, type, poly));\n }\n break;\n default:\n break;\n }\n }\n */\n\n s.close();\n mConn.close();\n } catch (Exception _e) {\n System.out.println(\">> Loading data failed!\\n\" + _e.toString());\n }\n\n }",
"@Override\r\n\tpublic E getData() {\n\t\treturn data;\r\n\t}",
"public T getData()\n\t{ \treturn this.data; }",
"private String getGeoCriteria(String geoData){\n String[] aux = geoData.split(\"~\");\n String layer = aux[0];\n String polygon = aux[1];\n String result = \"(layer_table = '\"+layer+\"' and polygom_id = \"+polygon+\")\";\n return result;\n }",
"public Object getUserData();",
"public static Kv getGF1Data(String latlons, String gf1Path) throws ParseException {\n List<Double> lons = new ArrayList<>();\n List<Double> lats = new ArrayList<>();\n String[] split = latlons.split(\",\");\n for (int i = 0; i < split.length; i++) {\n String s = split[i];\n lons.add(Double.parseDouble(s.split(\" \")[0]));\n lats.add(Double.parseDouble(s.split(\" \")[1]));\n }\n Double min_lon = Collections.min(lons);\n Double max_lon = Collections.max(lons);\n Double min_lat = Collections.min(lats);\n Double max_lat = Collections.max(lats);\n\n gdal.AllRegister();\n\n Dataset dataset = gdal.Open(gf1Path, gdalconstConstants.GA_ReadOnly);\n Vector<Object> objects = new Vector<>();\n WarpOptions warpOptions = new WarpOptions(objects);\n Dataset[] src_array = {dataset};\n\n File tiff = new File(gf1Path);\n String new_tiff = tiff.getParent() + \"/warp.tif\";\n Dataset hDataset = gdal.Warp(new_tiff, src_array, warpOptions);\n if (StringUtils.isBlank(hDataset.GetProjectionRef())) {\n return Kv.by(\"errorMsg\", \"获取不到数据坐标系\").set(\"code\", 400);\n }\n\n if (hDataset == null) {\n System.err.println(gdal.GetLastErrorMsg());\n return Kv.by(\"errorMsg\", \"GDALOpen failed - \" + gdal.GetLastErrorNo()).set(\"code\", 400);\n }\n double[] dGeoTrans = hDataset.GetGeoTransform();\n\n Driver hDriver = hDataset.GetDriver();\n System.out.println(\"Driver: \" + hDriver.getShortName() + \"/\" + hDriver.getLongName());\n int iXSize = hDataset.getRasterXSize();\n int iYSize = hDataset.getRasterYSize();\n System.out.println(\"Size is \" + iXSize + \", \" + iYSize);\n //波段数\n int rasterCount = hDataset.getRasterCount();\n if (rasterCount != 4) {\n return Kv.by(\"errorMsg\", \"必须为四波段高分1的tiff数据\").set(\"code\", 400);\n }\n\n// Layer enlovpe = getEnlovpe(latlons);\n// Layer testlayer = dataset.CreateLayer(\"test\");\n// Layer layer = dataset.GetLayer(0);\n// layer.Clip(enlovpe,testlayer);\n//\n Band band3 = hDataset.GetRasterBand(3);//红\n Band band4 = hDataset.GetRasterBand(4);//近红\n //包围盒空间坐标转tif行列号\n int[] maxRowCol = Projection2ImageRowCol(dGeoTrans, max_lon, max_lat);\n int[] minRowCol = Projection2ImageRowCol(dGeoTrans, min_lon, min_lat);\n int max_x = (int) maxRowCol[0];\n int max_y = (int) maxRowCol[1];\n int min_x = (int) minRowCol[0];\n int min_y = (int) minRowCol[1];\n if (max_y < 0) {\n max_y = 0;\n }\n if (min_x < 0) {\n min_x = 0;\n }\n if (min_y > iYSize) {\n min_y = iYSize;\n }\n if (max_x > iXSize) {\n max_x = iXSize;\n }\n //获取二维数组\n System.out.println(\"x:\" + min_x + \"到\" + max_x);\n System.out.println(\"y:\" + max_y + \"到\" + min_y);\n System.out.println(\"x:\" + (max_x - min_x));\n System.out.println(\"y:\" + (min_y - max_y));\n float[][] data = new float[min_y - max_y][max_x - min_x];\n Double[] nodatas = new Double[]{null};\n band3.GetNoDataValue(nodatas);\n Double noData = nodatas[0];\n if (max_x == min_x && max_y == min_y) {\n //田块在一个像素里\n int buf4[] = new int[1];\n int buf5[] = new int[1];\n data = new float[1][1];\n band3.ReadRaster(min_x, min_y, 1, 1, buf4);\n band4.ReadRaster(min_x, min_y, 1, 1, buf5);\n double add = Arith.add(buf4[0], buf5[0]);\n if (add == 0) {\n data[0][0] = 0;\n } else {\n Double div = Arith.div(Arith.sub(buf4[0], buf5[0]), add);\n if (div == -1 || div == 1) {\n data[0][0] = 0;\n } else {\n data[0][0] = div.floatValue();\n }\n }\n } else {\n int buf4[] = new int[iYSize];\n int buf5[] = new int[iYSize];\n for (int i = min_x; i < max_x; i++) {\n band3.ReadRaster(0, i, iYSize, 1, buf4);\n band4.ReadRaster(0, i, iYSize, 1, buf5);\n for (int j = max_y; j < min_y; j++) {\n //行列号转地理坐标\n double[] doubles = ImageRowCol2Projection(dGeoTrans, i, j);\n double lon = doubles[0];\n double lat = doubles[1];\n boolean iscontains = GeometryRelated.withinGeo(lon, lat, \"POLYGON((\" + latlons + \"))\");\n if (iscontains) {\n //面内,赋值像素值\n int b4 = buf4[(iYSize-j)-1];\n int b5 = buf5[(iYSize-j)-1];\n// System.out.println(b4+\"-\"+b5);\n if (noData == null || Math.abs(b4 - noData) > 1e-6) {\n //ndvi = B5-B4/B5+B4 B4是红,B5是近红 正常结果范围在-1到1之间\n double add = Arith.add(b5, b4);\n if (add == 0) {\n data[j - max_y][i - min_x] = 2;\n } else {\n Double div = Arith.div(Arith.sub(b5, b4), add);\n// if (div == 0) {\n// System.out.println(lon + \" \" + lat);\n// }\n if (div > 1) {\n data[j - max_y][i - min_x] = 1;\n } else if (div < -1) {\n data[j - max_y][i - min_x] = -1;\n } else {\n data[j - max_y][i - min_x] = div.floatValue();\n }\n }\n } else {\n data[j - max_y][i - min_x] = 2;\n }\n// System.out.print(data[j - max_y][i - min_x] + \", \");\n } else {\n data[j - max_y][i - min_x] = 2;\n }\n }\n// System.out.println(\"\\n\");\n }\n }\n dataset.delete();\n hDataset.delete();\n File file = new File(new_tiff);\n file.delete();\n return Kv.by(\"data\", data).set(\"intersec\", true).set(\"code\", 200);\n// return testlayer;\n }",
"abstract public Object getUserData();",
"@DataProvider\n public Object[][] getData()\n {\n\t Object[][] data=new Object[1][6];\n\t //0th row\n\t data[0][0]=\"Arun Raja\";\n\t data[0][1]=\"A\";\n\t data[0][2]=\"[email protected]\";\n\t data[0][3]=\"Test Lead\";\n\t data[0][4]=\"8971970444\";\n\t data[0][5]=\"Attra\";\n\t return data;\n }",
"public GeoObject getGeoObject(String _uid)\n {\n return null;\n }",
"@DataProvider\n\tpublic String[][] getData() {\n\t\treturn readExcel.getExcelData(\"Sheet1\");\n\t}",
"@Override\r\n\tpublic Vector<Vector<String>> getData() {\n\t\treturn this.data;\r\n\t}",
"public List<Double> getData( ) {\r\n return data;\r\n }",
"public boolean parseGeoJSON(File file, String target_epsg) {\n OGRDataStoreFactory factory = new BridjOGRDataStoreFactory();\n Map<String, String> connectionParams = new HashMap<String, String>();\n connectionParams.put(\"DriverName\", \"GPX\");\n connectionParams.put(\"DatasourceName\", file.getAbsolutePath());\n DataStore store = null;\n SimpleFeatureSource source;\n SimpleFeatureCollection collection;\n SimpleFeatureIterator it;\n SimpleFeature feature;\n SimpleFeatureType featureType = null;\n CoordinateReferenceSystem sourceCrs;\n CoordinateReferenceSystem targetCrs;\n MathTransform transform = null;\n JSONArray features = new JSONArray();\n\n try {\n // Transform\n // Gpx epsg:4326 and longitude 1st\n sourceCrs = CRS.decode(\"EPSG:4326\",true);\n // Oskari crs\n //(oskari OL map crs)\n targetCrs = CRS.decode(target_epsg, true);\n if (!targetCrs.getName().equals(sourceCrs.getName())) {\n transform = CRS.findMathTransform(sourceCrs, targetCrs, true);\n }\n store = factory.createDataStore(connectionParams);\n String[] typeNames = store.getTypeNames();\n for (String typeName : typeNames) {\n // Skip track points\n if (typeName.equals(\"track_points\")) {\n continue;\n }\n source = store.getFeatureSource(typeName);\n collection = source.getFeatures();\n it = collection.features();\n while (it.hasNext()) {\n feature = it.next();\n featureType = feature.getFeatureType();\n if (transform != null) {\n Geometry geometry = (Geometry) feature.getDefaultGeometry();\n feature.setDefaultGeometry(JTS.transform(geometry, transform));\n }\n JSONObject geojs = JSONHelper.createJSONObject(io.toString(feature));\n if (geojs != null) {\n features.put(geojs);\n }\n }\n it.close();\n }\n if (features.length() > 0) {\n setGeoJson(JSONHelper.createJSONObject(\"features\", features));\n setFeatureType((FeatureType)featureType);\n setTypeName(\"GPX_\");\n }\n } catch (Exception e) {\n log.error(\"Couldn't create geoJSON from the GPX file \", file.getName(), e);\n return false;\n }\n finally {\n store.dispose();\n }\n return true;\n }",
"public BaseData[] getData()\n {\n return Cdata;\n }",
"String[] getData();",
"public E getData()\n {\n return data;\n }",
"public E getData()\n {\n return data;\n }",
"public CellRecord[] getData() {\r\n\r\n return convertToCellRecordArray(getAttributeAsJavaScriptObject(\"data\"));\r\n }"
] |
[
"0.6221778",
"0.5981774",
"0.5791854",
"0.57725346",
"0.57725346",
"0.57670254",
"0.56897575",
"0.5665618",
"0.5623609",
"0.5604349",
"0.5591982",
"0.55417603",
"0.5466635",
"0.54616004",
"0.5453532",
"0.5432769",
"0.54129934",
"0.54124117",
"0.5412059",
"0.5406762",
"0.53669906",
"0.53427404",
"0.5335767",
"0.53256017",
"0.53236866",
"0.53156894",
"0.530477",
"0.5300742",
"0.5290939",
"0.5283429",
"0.5282503",
"0.5278007",
"0.5276501",
"0.52714413",
"0.52690524",
"0.5265446",
"0.5255711",
"0.5251",
"0.52334183",
"0.5232761",
"0.52186763",
"0.5206369",
"0.52005833",
"0.5197886",
"0.5174998",
"0.51740664",
"0.51729685",
"0.51636153",
"0.51593614",
"0.51593614",
"0.51536286",
"0.5133088",
"0.5132579",
"0.5128027",
"0.51245",
"0.51162076",
"0.51127726",
"0.5110488",
"0.509902",
"0.5086464",
"0.50816756",
"0.5081067",
"0.5070234",
"0.50662154",
"0.5065686",
"0.5064739",
"0.50618565",
"0.50296986",
"0.5023716",
"0.5021331",
"0.50180924",
"0.50170124",
"0.50154585",
"0.50146794",
"0.50117517",
"0.5004462",
"0.50037766",
"0.49967876",
"0.49963647",
"0.49954957",
"0.49937394",
"0.49929604",
"0.49898532",
"0.4983606",
"0.4981548",
"0.49805993",
"0.49692258",
"0.49665934",
"0.49650982",
"0.4961221",
"0.49576998",
"0.49538955",
"0.49462208",
"0.49419123",
"0.49390668",
"0.49377647",
"0.49360967",
"0.4933743",
"0.4933743",
"0.4928126"
] |
0.7883338
|
0
|
All GeoData objects can have a name associated with them. Typicaly the name will match the Column heading from which the data came from. Names can be important when the GeoData is used in thematic maps as this is the name that will be placed in the key by default.
|
String getName();
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"@Override\n public String getName() {\n return columnInfo.getName();\n }",
"protected abstract String getFeatureName(Map<String, Object> data);",
"@Override\n public String getName() {\n return _data.getName();\n }",
"@Override\n\tpublic java.lang.String getName() {\n\t\treturn _expandoColumn.getName();\n\t}",
"public interface GeoData{\r\n /**\r\n * Most geodata sets contain features for which there is no data, or the data is missing.<br>\r\n * In these cases a specific value is often used to represent these special cases.<p>\r\n * The static final value MISSING is the default value used by GeoDatas to represent\r\n * these cases.\r\n * @see #setMissingValueCode\r\n * @see #getMissingValueCode\r\n */\r\n public static final double MISSING = Double.NaN;\r\n\r\n\t\t/** \r\n\t\t * All geodata have a type - this is particularly important when\r\n\t\t * interfacing with other data sources/formats.\r\n\t\t * @see #setDataType\r\n\t\t * @see #getDataType\r\n\t\t */\r\n\t\tpublic static final int CHARACTER = 0;\r\n\t\tpublic static final int INTEGER = 1;\r\n\t\tpublic static final int FLOATING = 2;\r\n \r\n /**\r\n * All GeoData objects can have a name associated with them.<br>\r\n * Typicaly the name will match the Column heading from which the data came from.<br>\r\n * Names can be important when the GeoData is used in thematic maps as this is the\r\n * name that will be placed in the key by default.<br>\r\n * @author James Macgill JM\r\n * @return String The name associated with this GeoData.\r\n */\r\n String getName();\r\n /**\r\n * All GeoData objects can have a name associated with them.<br>\r\n * Typicaly the name will match the Column heading from which the data came from.<br>\r\n * Names can be important when the GeoData is used in thematic maps as this is the\r\n * name that will be placed in the key by default.<br>\r\n *\r\n * @author James Macgill JM\r\n * @param name_ The name to be associated with this GeoData.\r\n */\r\n void setName(String name_);\r\n \r\n \r\n /**\r\n * looks up and matches a value to the specifed feature id.<br>\r\n * Used for example by shaders to obtain vaules for thematic mapping.<br>\r\n *\r\n * @author James Macgill JM\r\n * @param id An int specifying the feature id to retreve a value for.\r\n * @return double The value for the specified id, if no id matches the one given then the value specifed by setMissingValue should be returned.\r\n * @see #setMissingValue\r\n */\r\n double getValue(int id);\r\n \r\n /**\r\n * Looks up and retreves a string for the specifed feature id.<br>\r\n * Used for example by the ToolTip feature in Themes to provide tool tip text for each feature.\r\n *\r\n * @author James Macgill JM\r\n * @param id An int specifying the feature to retreve the text for.\r\n * @return String A piece of text for the chosen feature id. If no id matches then an empty string should be returned \" \"\r\n */\r\n String getText(int id);\r\n \r\n /**\r\n * In order to allow systems to iterate through all of the data contained within the GeoData object this\r\n * method provides a list of all of the IDs which have associated values stored.\r\n *\r\n * @author James Macgill JM\r\n * @return Enumeration An enumeration of all of the IDs which can then be iterated through.\r\n */\r\n Enumeration getIds();\r\n \r\n /**\r\n * Not all posible ids will have a value stored in the GeoData object, so when a call is made to getValue with an id that is\r\n * not stored a special value is returned to signify that a value for this id is missing.<br>\r\n * By default that value is set to MISSING, however this behavoir can be changed by calling this method with a new value.<br>\r\n * \r\n * @see #getMissingValueCode\r\n * @author James Macgill JM\r\n * @param mv A double containing the new value to represent missing data.\r\n */\r\n public void setMissingValueCode(double mv);\r\n \r\n /**\r\n * Not all posible ids will have a value stored in the GeoData object, so when a call is made to getValue with an id that is\r\n * not stored a special value is returned to signify that a value for this id is missing.<br>\r\n * A call to this method will return the current code in use to represent that situation.<br>\r\n *\r\n * @see #setMissingValueCode\r\n * @author James Macgill JM\r\n * @return double The current value representing missing data.\r\n */ \r\n public double getMissingValueCode();\r\n \r\n /**\r\n * A quick statistic relating to the values stored in the GeoData object.<br>\r\n * \r\n * @author James Macgill JM\r\n * @return double The largest value currently stored in this GeoData. The missingValueCode is not included in this test.\r\n */\r\n double getMax();\r\n \r\n /**\r\n * A quick statistic relating to the values stored in the GeoData object.<br>\r\n * \r\n * @author James Macgill JM\r\n * @return double The smallest value currently stored in this GeoData. The missingValueCode is not included in this test.\r\n */\r\n double getMin();\r\n \r\n /**\r\n * The total number of stored id/value pairs stored in this GeoData.\r\n * @author James Macgill JM\r\n * @return int The number of values stored in this GeoData.\r\n */\r\n int getSize();\r\n \r\n /**\r\n * The total number of stored values stored in this GeoData which equal the missing value code.\r\n * @author James Macgill JM\r\n * @return int The number of missing values stored in this GeoData.\r\n */\r\n int getMissingCount();\r\n\r\n\t\t/** \r\n\t\t * Gets the type of data stored in the geodata<br>\r\n\t\t * <ul><li>String - GeoData.CHARACTER</li> \r\n\t\t * <li>Integer - GeoData.INTEGER</li>\r\n\t\t * <li>Double - GeoData.FLOATING</li></ul>\r\n\t\t */\r\n\t\t int getDataType();\r\n\t\t/** \r\n\t\t * Sets the type of data stored in the geodata<br>\r\n\t\t * <ul><li>String - GeoData.character</li> \r\n\t\t * <li>Integer - GeoData.integer</li>\r\n\t\t * <li>Double - GeoData.float</li></ul>\r\n\t\t */\r\n\t\t void setDataType(int type );\r\n}",
"@Override\n\tpublic void setName(java.lang.String name) {\n\t\t_expandoColumn.setName(name);\n\t}",
"public Object getKey() { return name; }",
"public StrColumn getName() {\n return (StrColumn) (isText ? textFields.computeIfAbsent(\"name\", StrColumn::new) :\n getBinaryColumn(\"name\"));\n }",
"@Override\n\tpublic void changementMap(String dataName) {\n\t\talgo.setDataName(dataName);\n\t}",
"protected void addNamePropertyDescriptor(Object object) {\n\t\titemPropertyDescriptors.add\n\t\t\t(createItemPropertyDescriptor\n\t\t\t\t(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),\n\t\t\t\t getResourceLocator(),\n\t\t\t\t getString(\"_UI_Cell_name_feature\"),\n\t\t\t\t getString(\"_UI_PropertyDescriptor_description\", \"_UI_Cell_name_feature\", \"_UI_Cell_type\"),\n\t\t\t\t LDEExperimentsPackage.Literals.CELL__NAME,\n\t\t\t\t true,\n\t\t\t\t false,\n\t\t\t\t false,\n\t\t\t\t ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,\n\t\t\t\t null,\n\t\t\t\t null));\n\t}",
"String getMapName() {\n try {\n fd world = getWorld();\n Class<?> worldclass = world.getClass();\n Field worlddatafield = null;\n while (true) { //\n\n try {\n worlddatafield = worldclass.getDeclaredField(\"x\");\n break;\n } catch (NoSuchFieldException e) {\n worldclass = worldclass.getSuperclass();\n continue;\n }\n }\n if (worlddatafield == null)\n return null;\n worlddatafield.setAccessible(true);\n\n ei worldata;\n\n worldata = (ei) worlddatafield.get(world);\n return worldata.j();\n } catch (Exception e) {\n throw new RuntimeException(e);\n }\n }",
"public String getName() {\n\t\treturn this.data.getName();\n\t}",
"PropertyName getName();",
"@ApiModelProperty(value = \"Gets and sets the name of the column.\")\n public String getName() {\n return name;\n }",
"public StrColumn getName() {\n return delegate.getColumn(\"name\", DelegatingStrColumn::new);\n }",
"public StrColumn getName() {\n return delegate.getColumn(\"name\", DelegatingStrColumn::new);\n }",
"public String getName() {\n return columnName;\n }",
"public final void setDataName(String dataName) {\n this.dataName = dataName;\n }",
"public final String getDataName() {\n if (dataName == null) {\n return this.getClass().getName();\n }\n return dataName;\n }",
"public void getData(String dataName){\r\n this.mData.get(dataName);\r\n }",
"public EDataMapNames(Object source, int eventType, List<String> mapNames) {\r\n\t\tsuper(source, eventType);\r\n\t\tthis.mapNames = mapNames;\r\n\t}",
"private static TextColumnBuilder getColumnByNameField(String nameField){ \n return drColumns.get(nameField);\n }",
"public void setName(final String name) throws DataException {\n COLLECTION.remap(this, fullName, name);\n fullName = name;\n for (AbstractHistogram hist : histograms.getList()) {\n hist.updateNames(this);\n }\n }",
"public String getName(){\n\t\t\treturn columnName;\n\t\t}",
"String getColumnName();",
"public String getNameKey() {\n return getName();\n }",
"public static Object[] getColumnNames()\n\t{\n\t\treturn new Object[]{\"id\", \"name\", \"price\", \"onSale\"};\n\t}",
"public static String getDataName(Map<String,Object> mapJson) {\n\t\tif (getData(mapJson) != null) {\n\t\t\treturn (String) getData(mapJson).get(\"name\");\n\t\t}\n\t\treturn null;\n\t}",
"protected abstract Map<String, Map<String, Object>> getData(String columnFamilyName);",
"public String getPropertyName(){\n return SimpleTableField.mapPropName(this.columnName);\n }",
"public String getName() { return (String)get(\"Name\"); }",
"public StringKey getName() {\n return ModelBundle.SHIP_NAME.get(name);\n }",
"@Override\n\t\t\tpublic String getName() {\n\t\t\t\treturn cf.getName();\n\t\t\t}",
"@Override\n\t\t\tpublic String getName() {\n\t\t\t\treturn cf.getName();\n\t\t\t}",
"@Override\n\tpublic java.lang.String getCollectionName() {\n\t\treturn _dictData.getCollectionName();\n\t}",
"public void setColumnName (String ColumnName);",
"public Place(String name, LinkedHashMap<Integer, Data> data) {\r\n\t\tthis.name = name;\r\n\t\tthis.data = data;\r\n\t}",
"boolean hasDataName();",
"public interface RegionColumns extends ExtendedColumns {\n\n String NAME = \"name\";\n String COUNTRY_ID = \"country_id\";\n}",
"private static HashMap<String,String> buildColumnMapCar() {\r\n HashMap<String,String> map = new HashMap<String,String>();\r\n map.put(KEY_POINTS, KEY_POINTS);\r\n\r\n map.put(BaseColumns._ID, \"rowid AS \" +\r\n BaseColumns._ID);\r\n\r\n return map;\r\n }",
"public String getColumnName();",
"public String getPropertyNameMapped(String aName) { return aName; }",
"public DatabaseQueryColumn(String name) {\n this.formula = null;\n this.name = name;\n }",
"public void addData(String dataName, Object dataItem){\r\n this.mData.put(dataName, dataItem);\r\n }",
"public K getName() {\n return key;\n }",
"@KeepForSdk\n public abstract String getPrimaryDataMarkerColumn();",
"@Override\n\tpublic void setName(String name) {\n\t\tcomparedChart.setName(name);\n\t}",
"@Override\n\t\t\tpublic String getName() {\n\t\t\t\treturn name;\n\t\t\t}",
"@Override\n public String name() {\n return this._name;\n }",
"String getPropertyName();",
"interface PlacesColumns {\n\t\tString PLACE_ID = \"place_id\";\n\t\tString PLACE_NAME = \"name\";\n\t\tString PLACE_LATITUDE = \"latitude\";\n\t\tString PLACE_LONGITUDE = \"longitude\";\n\t\tString PLACE_DISTANCE = \"distance\";\n\t\tString PLACE_ICON = \"icon\";\n\t\tString PLACE_REFERENCE = \"reference\";\n\t\tString PLACE_TYPES = \"types\";\n\t\tString PLACE_VICINITY = \"vicinity\";\n\t\tString PLACE_LAST_UPDATED = \"last_update_time\";\n\t}",
"protected abstract String getAddressPropertyName();",
"public String name_data(String name)\r\n/* 14: */ {\r\n/* 15:27 */ if (name == \"gr_id\") {\r\n/* 16:27 */ return this.config.id.name;\r\n/* 17: */ }\r\n/* 18:28 */ String[] parts = name.split(\"c\");\r\n/* 19: */ try\r\n/* 20: */ {\r\n/* 21:32 */ if (parts[0].equals(\"\"))\r\n/* 22: */ {\r\n/* 23:33 */ int index = Integer.parseInt(parts[1]);\r\n/* 24:34 */ return ((ConnectorField)this.config.text.get(index)).name;\r\n/* 25: */ }\r\n/* 26: */ }\r\n/* 27: */ catch (NumberFormatException localNumberFormatException) {}\r\n/* 28:38 */ return name;\r\n/* 29: */ }",
"@Override\n \t\t\t\tpublic String getGraphName() {\n \t\t\t\t\treturn \"http://opendata.cz/data/namedGraph/3\";\n \t\t\t\t}",
"public String getDatasetName(){\n return this.dataset.getName();\n }",
"public StrColumn getDataFileName() {\n return (StrColumn) (isText ? textFields.computeIfAbsent(\"data_file_name\", StrColumn::new) :\n getBinaryColumn(\"data_file_name\"));\n }",
"public Object[] getColumnNames(){\r\n if (ufeRunner == null || renders == null || htmlObjLang == null) {\r\n return null;\r\n }\r\n String[] columnNames = {\"Name\", \"Value\"};\r\n return columnNames;\r\n }",
"public String getPropertyName();",
"@Override\n\tpublic String getMapKey()\n\t{\n\t\tsbTemp.delete(0, sbTemp.length());\n\t\tsbTemp.append(areaCell.iCityID);\n\t\tsbTemp.append(\"_\");\n\t\tsbTemp.append(areaCell.iAreatype);\n\t\tsbTemp.append(\"_\");\n\t\tsbTemp.append(areaCell.iAreaID);\n\t\tsbTemp.append(\"_\");\n\t\tsbTemp.append(areaCell.iECI);\n\t\tsbTemp.append(\"_\");\n\t\tsbTemp.append(areaCell.iTime);\n\t\tsbTemp.append(\"_\");\n\t\tsbTemp.append(areaCell.iInterface);\n\t\tsbTemp.append(\"_\");\n\t\tsbTemp.append(areaCell.kpiSet);\n\t\treturn sbTemp.toString();\n\t}",
"public String getName() {\n return ctTableColumn.getName();\n }",
"public String getColumnName() {\r\n return dataBinder.getColumnName();\r\n }",
"@Override\r\n String getName();",
"public Place(String name) {\r\n\t\tthis.name = name;\r\n\t\tthis.data = new LinkedHashMap<Integer, Data>();\r\n\t\tthis.populateData();\r\n\t}",
"@Override\n public String getName() {\n return name();\n }",
"public java.lang.String getReferenceDataColumnName() {\r\n\treturn referenceDataColumnName;\r\n}",
"@Override\r\n\tpublic String Name() {\n\t\treturn Name;\r\n\t}",
"@Override\n public String getName() {\n return name;\n }",
"public String getCellname() {\r\n return cellname;\r\n }",
"private static String getColumnName(String windowName2) {\n\t\tString col = \"{\";\r\n\t\tVector<WindowTableModelMapping> maps = getMapColumns(windowName2);\r\n\t\tfor (int i = 0; i < maps.size(); i++) {\r\n\t\t\tWindowTableModelMapping mp = maps.get(i);\r\n\t\t\tcol = col + \"\\\"\" + mp.getColumnName() + \"\\\"\" + \",\";\r\n\t\t}\r\n\r\n\t\tcol = col.substring(0, col.length() - 1) + \"}\";\r\n\t\treturn col;\r\n\t}",
"@Override\r\n public String getName() {\r\n return NAME;\r\n }",
"DataNameReference createDataNameReference();",
"@Override\n public String getColumnName(int column) { return columnnames[column]; }",
"@Override\n public String name() {\n return name;\n }",
"@Override\n public String toString()\n {\n return mi_name;\n }",
"@Override\n public String toString()\n {\n return mi_name;\n }",
"public String getMapName() {\n return mapName;\n }",
"@Override\n public String getLabel() {\n return columnInfo.getLabel();\n }",
"@Override\n public String name() {\n return this.name;\n }",
"interface PlaceDetailsColumns {\n\t\tString PLACE_ID = \"place_id\";\n\t\tString PLACE_NAME = \"name\";\n\t\tString PLACE_ADDRESS = \"address\";\n\t\tString PLACE_PHONE = \"phone\";\n\t\tString PLACE_LATITUDE = \"latitude\";\n\t\tString PLACE_LONGITUDE = \"longitude\";\n\t\tString PLACE_ICON = \"icon\";\n\t\tString PLACE_REFERENCE = \"reference\";\n\t\tString PLACE_TYPES = \"types\";\n\t\tString PLACE_VICINITY = \"vicinity\";\n\t\tString PLACE_RATING = \"rating\";\n\t\tString PLACE_URL = \"url\";\n\t\tString PLACE_WEBSITE = \"website\";\n\t\tString PLACE_LAST_UPDATED = \"last_update_time\";\n\t}",
"@Override \n public String getName() {\n return NAME;\n }",
"public String getCellTypeName()\n {\n return this.cellTypeName;\n }",
"@Override\n\tpublic String getDimensionName() {\n\t\treturn null;\n\t}",
"public String getName() { return _sqlName; }",
"@Override\r\n public String getColumnName(int col) {\r\n return title[col];\r\n }",
"@Override\n public String toString()\n {\n return (name);\n }",
"@Override\r\n public String toString() {\r\n return Name;\r\n }",
"org.openxmlformats.schemas.drawingml.x2006.main.STGeomGuideName xgetName();",
"@Override\n\tpublic String name() {\n\n\t\treturn NAME;\n\t}",
"@Override\r\n\tprotected String getName() {\n\t\treturn NAME;\r\n\t}",
"@Override\r\n\tpublic String getName() {\r\n\t\treturn name;\r\n\t}",
"@Override\n String getName();",
"@Override\r\n public String toString() {\r\n return name;\r\n }",
"protected abstract String getFavoriteColumnName();",
"@Override\r\n\tpublic String getName() {\n\t\treturn name;\r\n\t}",
"@Override\n public String toString() {\n return name;\n }",
"public PgTable(final String name) {\n this.name = name;\n }",
"@Override\n\tpublic String[] getFieldName() {\n\t\treturn new String[]{\"编码\",\"名称\",\"属性\"};\n\t}",
"@Override\n\tString name();",
"@Override\n\tpublic String getFeatureName() {\n\t\treturn this.name();\n\t}",
"@Override public String getName() {\n return name;\n }",
"@Override\n public int hashCode() {\n return name.hashCode();\n }"
] |
[
"0.65625423",
"0.61026454",
"0.6085372",
"0.6069313",
"0.60091364",
"0.5779927",
"0.5702116",
"0.5680943",
"0.5575533",
"0.5525552",
"0.54979515",
"0.54969025",
"0.54521805",
"0.5445865",
"0.5422591",
"0.5422591",
"0.5415594",
"0.5411835",
"0.5409289",
"0.5407246",
"0.53913337",
"0.53831506",
"0.53736275",
"0.5368163",
"0.5360832",
"0.5352693",
"0.53159946",
"0.5306146",
"0.5294382",
"0.5289647",
"0.52791643",
"0.5260454",
"0.5257953",
"0.5257953",
"0.5254702",
"0.5221205",
"0.52161723",
"0.5212334",
"0.5210596",
"0.52073586",
"0.520268",
"0.5200767",
"0.5197915",
"0.51969784",
"0.5185606",
"0.51785606",
"0.51696044",
"0.5161703",
"0.5153641",
"0.5151969",
"0.51493716",
"0.51457983",
"0.5133567",
"0.5126098",
"0.5124504",
"0.5120252",
"0.5118646",
"0.5088791",
"0.5084731",
"0.50810987",
"0.5080802",
"0.50755274",
"0.50626856",
"0.506209",
"0.50609815",
"0.50601166",
"0.50588983",
"0.5051177",
"0.50313056",
"0.50283575",
"0.5026652",
"0.5018436",
"0.5016171",
"0.5012109",
"0.5012109",
"0.500562",
"0.500509",
"0.50010276",
"0.49995747",
"0.49995154",
"0.49947727",
"0.49927455",
"0.49923393",
"0.4991872",
"0.49900645",
"0.4989273",
"0.49797374",
"0.49772215",
"0.49760395",
"0.49746612",
"0.49736452",
"0.49700862",
"0.49627277",
"0.4955156",
"0.4951882",
"0.4947921",
"0.49437556",
"0.4943218",
"0.4940167",
"0.49368402",
"0.49349692"
] |
0.0
|
-1
|
All GeoData objects can have a name associated with them. Typicaly the name will match the Column heading from which the data came from. Names can be important when the GeoData is used in thematic maps as this is the name that will be placed in the key by default.
|
void setName(String name_);
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"@Override\n public String getName() {\n return columnInfo.getName();\n }",
"protected abstract String getFeatureName(Map<String, Object> data);",
"@Override\n public String getName() {\n return _data.getName();\n }",
"@Override\n\tpublic java.lang.String getName() {\n\t\treturn _expandoColumn.getName();\n\t}",
"public interface GeoData{\r\n /**\r\n * Most geodata sets contain features for which there is no data, or the data is missing.<br>\r\n * In these cases a specific value is often used to represent these special cases.<p>\r\n * The static final value MISSING is the default value used by GeoDatas to represent\r\n * these cases.\r\n * @see #setMissingValueCode\r\n * @see #getMissingValueCode\r\n */\r\n public static final double MISSING = Double.NaN;\r\n\r\n\t\t/** \r\n\t\t * All geodata have a type - this is particularly important when\r\n\t\t * interfacing with other data sources/formats.\r\n\t\t * @see #setDataType\r\n\t\t * @see #getDataType\r\n\t\t */\r\n\t\tpublic static final int CHARACTER = 0;\r\n\t\tpublic static final int INTEGER = 1;\r\n\t\tpublic static final int FLOATING = 2;\r\n \r\n /**\r\n * All GeoData objects can have a name associated with them.<br>\r\n * Typicaly the name will match the Column heading from which the data came from.<br>\r\n * Names can be important when the GeoData is used in thematic maps as this is the\r\n * name that will be placed in the key by default.<br>\r\n * @author James Macgill JM\r\n * @return String The name associated with this GeoData.\r\n */\r\n String getName();\r\n /**\r\n * All GeoData objects can have a name associated with them.<br>\r\n * Typicaly the name will match the Column heading from which the data came from.<br>\r\n * Names can be important when the GeoData is used in thematic maps as this is the\r\n * name that will be placed in the key by default.<br>\r\n *\r\n * @author James Macgill JM\r\n * @param name_ The name to be associated with this GeoData.\r\n */\r\n void setName(String name_);\r\n \r\n \r\n /**\r\n * looks up and matches a value to the specifed feature id.<br>\r\n * Used for example by shaders to obtain vaules for thematic mapping.<br>\r\n *\r\n * @author James Macgill JM\r\n * @param id An int specifying the feature id to retreve a value for.\r\n * @return double The value for the specified id, if no id matches the one given then the value specifed by setMissingValue should be returned.\r\n * @see #setMissingValue\r\n */\r\n double getValue(int id);\r\n \r\n /**\r\n * Looks up and retreves a string for the specifed feature id.<br>\r\n * Used for example by the ToolTip feature in Themes to provide tool tip text for each feature.\r\n *\r\n * @author James Macgill JM\r\n * @param id An int specifying the feature to retreve the text for.\r\n * @return String A piece of text for the chosen feature id. If no id matches then an empty string should be returned \" \"\r\n */\r\n String getText(int id);\r\n \r\n /**\r\n * In order to allow systems to iterate through all of the data contained within the GeoData object this\r\n * method provides a list of all of the IDs which have associated values stored.\r\n *\r\n * @author James Macgill JM\r\n * @return Enumeration An enumeration of all of the IDs which can then be iterated through.\r\n */\r\n Enumeration getIds();\r\n \r\n /**\r\n * Not all posible ids will have a value stored in the GeoData object, so when a call is made to getValue with an id that is\r\n * not stored a special value is returned to signify that a value for this id is missing.<br>\r\n * By default that value is set to MISSING, however this behavoir can be changed by calling this method with a new value.<br>\r\n * \r\n * @see #getMissingValueCode\r\n * @author James Macgill JM\r\n * @param mv A double containing the new value to represent missing data.\r\n */\r\n public void setMissingValueCode(double mv);\r\n \r\n /**\r\n * Not all posible ids will have a value stored in the GeoData object, so when a call is made to getValue with an id that is\r\n * not stored a special value is returned to signify that a value for this id is missing.<br>\r\n * A call to this method will return the current code in use to represent that situation.<br>\r\n *\r\n * @see #setMissingValueCode\r\n * @author James Macgill JM\r\n * @return double The current value representing missing data.\r\n */ \r\n public double getMissingValueCode();\r\n \r\n /**\r\n * A quick statistic relating to the values stored in the GeoData object.<br>\r\n * \r\n * @author James Macgill JM\r\n * @return double The largest value currently stored in this GeoData. The missingValueCode is not included in this test.\r\n */\r\n double getMax();\r\n \r\n /**\r\n * A quick statistic relating to the values stored in the GeoData object.<br>\r\n * \r\n * @author James Macgill JM\r\n * @return double The smallest value currently stored in this GeoData. The missingValueCode is not included in this test.\r\n */\r\n double getMin();\r\n \r\n /**\r\n * The total number of stored id/value pairs stored in this GeoData.\r\n * @author James Macgill JM\r\n * @return int The number of values stored in this GeoData.\r\n */\r\n int getSize();\r\n \r\n /**\r\n * The total number of stored values stored in this GeoData which equal the missing value code.\r\n * @author James Macgill JM\r\n * @return int The number of missing values stored in this GeoData.\r\n */\r\n int getMissingCount();\r\n\r\n\t\t/** \r\n\t\t * Gets the type of data stored in the geodata<br>\r\n\t\t * <ul><li>String - GeoData.CHARACTER</li> \r\n\t\t * <li>Integer - GeoData.INTEGER</li>\r\n\t\t * <li>Double - GeoData.FLOATING</li></ul>\r\n\t\t */\r\n\t\t int getDataType();\r\n\t\t/** \r\n\t\t * Sets the type of data stored in the geodata<br>\r\n\t\t * <ul><li>String - GeoData.character</li> \r\n\t\t * <li>Integer - GeoData.integer</li>\r\n\t\t * <li>Double - GeoData.float</li></ul>\r\n\t\t */\r\n\t\t void setDataType(int type );\r\n}",
"@Override\n\tpublic void setName(java.lang.String name) {\n\t\t_expandoColumn.setName(name);\n\t}",
"public Object getKey() { return name; }",
"public StrColumn getName() {\n return (StrColumn) (isText ? textFields.computeIfAbsent(\"name\", StrColumn::new) :\n getBinaryColumn(\"name\"));\n }",
"@Override\n\tpublic void changementMap(String dataName) {\n\t\talgo.setDataName(dataName);\n\t}",
"protected void addNamePropertyDescriptor(Object object) {\n\t\titemPropertyDescriptors.add\n\t\t\t(createItemPropertyDescriptor\n\t\t\t\t(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),\n\t\t\t\t getResourceLocator(),\n\t\t\t\t getString(\"_UI_Cell_name_feature\"),\n\t\t\t\t getString(\"_UI_PropertyDescriptor_description\", \"_UI_Cell_name_feature\", \"_UI_Cell_type\"),\n\t\t\t\t LDEExperimentsPackage.Literals.CELL__NAME,\n\t\t\t\t true,\n\t\t\t\t false,\n\t\t\t\t false,\n\t\t\t\t ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,\n\t\t\t\t null,\n\t\t\t\t null));\n\t}",
"String getMapName() {\n try {\n fd world = getWorld();\n Class<?> worldclass = world.getClass();\n Field worlddatafield = null;\n while (true) { //\n\n try {\n worlddatafield = worldclass.getDeclaredField(\"x\");\n break;\n } catch (NoSuchFieldException e) {\n worldclass = worldclass.getSuperclass();\n continue;\n }\n }\n if (worlddatafield == null)\n return null;\n worlddatafield.setAccessible(true);\n\n ei worldata;\n\n worldata = (ei) worlddatafield.get(world);\n return worldata.j();\n } catch (Exception e) {\n throw new RuntimeException(e);\n }\n }",
"public String getName() {\n\t\treturn this.data.getName();\n\t}",
"PropertyName getName();",
"@ApiModelProperty(value = \"Gets and sets the name of the column.\")\n public String getName() {\n return name;\n }",
"public StrColumn getName() {\n return delegate.getColumn(\"name\", DelegatingStrColumn::new);\n }",
"public StrColumn getName() {\n return delegate.getColumn(\"name\", DelegatingStrColumn::new);\n }",
"public String getName() {\n return columnName;\n }",
"public final void setDataName(String dataName) {\n this.dataName = dataName;\n }",
"public void getData(String dataName){\r\n this.mData.get(dataName);\r\n }",
"public final String getDataName() {\n if (dataName == null) {\n return this.getClass().getName();\n }\n return dataName;\n }",
"public EDataMapNames(Object source, int eventType, List<String> mapNames) {\r\n\t\tsuper(source, eventType);\r\n\t\tthis.mapNames = mapNames;\r\n\t}",
"private static TextColumnBuilder getColumnByNameField(String nameField){ \n return drColumns.get(nameField);\n }",
"public void setName(final String name) throws DataException {\n COLLECTION.remap(this, fullName, name);\n fullName = name;\n for (AbstractHistogram hist : histograms.getList()) {\n hist.updateNames(this);\n }\n }",
"public String getName(){\n\t\t\treturn columnName;\n\t\t}",
"String getColumnName();",
"public String getNameKey() {\n return getName();\n }",
"public static Object[] getColumnNames()\n\t{\n\t\treturn new Object[]{\"id\", \"name\", \"price\", \"onSale\"};\n\t}",
"public static String getDataName(Map<String,Object> mapJson) {\n\t\tif (getData(mapJson) != null) {\n\t\t\treturn (String) getData(mapJson).get(\"name\");\n\t\t}\n\t\treturn null;\n\t}",
"protected abstract Map<String, Map<String, Object>> getData(String columnFamilyName);",
"public String getPropertyName(){\n return SimpleTableField.mapPropName(this.columnName);\n }",
"public String getName() { return (String)get(\"Name\"); }",
"public StringKey getName() {\n return ModelBundle.SHIP_NAME.get(name);\n }",
"@Override\n\t\t\tpublic String getName() {\n\t\t\t\treturn cf.getName();\n\t\t\t}",
"@Override\n\t\t\tpublic String getName() {\n\t\t\t\treturn cf.getName();\n\t\t\t}",
"@Override\n\tpublic java.lang.String getCollectionName() {\n\t\treturn _dictData.getCollectionName();\n\t}",
"public void setColumnName (String ColumnName);",
"public Place(String name, LinkedHashMap<Integer, Data> data) {\r\n\t\tthis.name = name;\r\n\t\tthis.data = data;\r\n\t}",
"public interface RegionColumns extends ExtendedColumns {\n\n String NAME = \"name\";\n String COUNTRY_ID = \"country_id\";\n}",
"boolean hasDataName();",
"private static HashMap<String,String> buildColumnMapCar() {\r\n HashMap<String,String> map = new HashMap<String,String>();\r\n map.put(KEY_POINTS, KEY_POINTS);\r\n\r\n map.put(BaseColumns._ID, \"rowid AS \" +\r\n BaseColumns._ID);\r\n\r\n return map;\r\n }",
"public String getColumnName();",
"public String getPropertyNameMapped(String aName) { return aName; }",
"public DatabaseQueryColumn(String name) {\n this.formula = null;\n this.name = name;\n }",
"public void addData(String dataName, Object dataItem){\r\n this.mData.put(dataName, dataItem);\r\n }",
"public K getName() {\n return key;\n }",
"@KeepForSdk\n public abstract String getPrimaryDataMarkerColumn();",
"@Override\n\tpublic void setName(String name) {\n\t\tcomparedChart.setName(name);\n\t}",
"@Override\n\t\t\tpublic String getName() {\n\t\t\t\treturn name;\n\t\t\t}",
"@Override\n public String name() {\n return this._name;\n }",
"String getPropertyName();",
"interface PlacesColumns {\n\t\tString PLACE_ID = \"place_id\";\n\t\tString PLACE_NAME = \"name\";\n\t\tString PLACE_LATITUDE = \"latitude\";\n\t\tString PLACE_LONGITUDE = \"longitude\";\n\t\tString PLACE_DISTANCE = \"distance\";\n\t\tString PLACE_ICON = \"icon\";\n\t\tString PLACE_REFERENCE = \"reference\";\n\t\tString PLACE_TYPES = \"types\";\n\t\tString PLACE_VICINITY = \"vicinity\";\n\t\tString PLACE_LAST_UPDATED = \"last_update_time\";\n\t}",
"protected abstract String getAddressPropertyName();",
"public String name_data(String name)\r\n/* 14: */ {\r\n/* 15:27 */ if (name == \"gr_id\") {\r\n/* 16:27 */ return this.config.id.name;\r\n/* 17: */ }\r\n/* 18:28 */ String[] parts = name.split(\"c\");\r\n/* 19: */ try\r\n/* 20: */ {\r\n/* 21:32 */ if (parts[0].equals(\"\"))\r\n/* 22: */ {\r\n/* 23:33 */ int index = Integer.parseInt(parts[1]);\r\n/* 24:34 */ return ((ConnectorField)this.config.text.get(index)).name;\r\n/* 25: */ }\r\n/* 26: */ }\r\n/* 27: */ catch (NumberFormatException localNumberFormatException) {}\r\n/* 28:38 */ return name;\r\n/* 29: */ }",
"@Override\n \t\t\t\tpublic String getGraphName() {\n \t\t\t\t\treturn \"http://opendata.cz/data/namedGraph/3\";\n \t\t\t\t}",
"public String getDatasetName(){\n return this.dataset.getName();\n }",
"public StrColumn getDataFileName() {\n return (StrColumn) (isText ? textFields.computeIfAbsent(\"data_file_name\", StrColumn::new) :\n getBinaryColumn(\"data_file_name\"));\n }",
"public Object[] getColumnNames(){\r\n if (ufeRunner == null || renders == null || htmlObjLang == null) {\r\n return null;\r\n }\r\n String[] columnNames = {\"Name\", \"Value\"};\r\n return columnNames;\r\n }",
"public String getPropertyName();",
"@Override\n\tpublic String getMapKey()\n\t{\n\t\tsbTemp.delete(0, sbTemp.length());\n\t\tsbTemp.append(areaCell.iCityID);\n\t\tsbTemp.append(\"_\");\n\t\tsbTemp.append(areaCell.iAreatype);\n\t\tsbTemp.append(\"_\");\n\t\tsbTemp.append(areaCell.iAreaID);\n\t\tsbTemp.append(\"_\");\n\t\tsbTemp.append(areaCell.iECI);\n\t\tsbTemp.append(\"_\");\n\t\tsbTemp.append(areaCell.iTime);\n\t\tsbTemp.append(\"_\");\n\t\tsbTemp.append(areaCell.iInterface);\n\t\tsbTemp.append(\"_\");\n\t\tsbTemp.append(areaCell.kpiSet);\n\t\treturn sbTemp.toString();\n\t}",
"public String getColumnName() {\r\n return dataBinder.getColumnName();\r\n }",
"public String getName() {\n return ctTableColumn.getName();\n }",
"@Override\r\n String getName();",
"public Place(String name) {\r\n\t\tthis.name = name;\r\n\t\tthis.data = new LinkedHashMap<Integer, Data>();\r\n\t\tthis.populateData();\r\n\t}",
"public java.lang.String getReferenceDataColumnName() {\r\n\treturn referenceDataColumnName;\r\n}",
"@Override\n public String getName() {\n return name();\n }",
"@Override\r\n\tpublic String Name() {\n\t\treturn Name;\r\n\t}",
"@Override\n public String getName() {\n return name;\n }",
"public String getCellname() {\r\n return cellname;\r\n }",
"private static String getColumnName(String windowName2) {\n\t\tString col = \"{\";\r\n\t\tVector<WindowTableModelMapping> maps = getMapColumns(windowName2);\r\n\t\tfor (int i = 0; i < maps.size(); i++) {\r\n\t\t\tWindowTableModelMapping mp = maps.get(i);\r\n\t\t\tcol = col + \"\\\"\" + mp.getColumnName() + \"\\\"\" + \",\";\r\n\t\t}\r\n\r\n\t\tcol = col.substring(0, col.length() - 1) + \"}\";\r\n\t\treturn col;\r\n\t}",
"DataNameReference createDataNameReference();",
"@Override\r\n public String getName() {\r\n return NAME;\r\n }",
"@Override\n public String getColumnName(int column) { return columnnames[column]; }",
"@Override\n public String name() {\n return name;\n }",
"@Override\n public String toString()\n {\n return mi_name;\n }",
"@Override\n public String toString()\n {\n return mi_name;\n }",
"public String getMapName() {\n return mapName;\n }",
"@Override\n public String getLabel() {\n return columnInfo.getLabel();\n }",
"interface PlaceDetailsColumns {\n\t\tString PLACE_ID = \"place_id\";\n\t\tString PLACE_NAME = \"name\";\n\t\tString PLACE_ADDRESS = \"address\";\n\t\tString PLACE_PHONE = \"phone\";\n\t\tString PLACE_LATITUDE = \"latitude\";\n\t\tString PLACE_LONGITUDE = \"longitude\";\n\t\tString PLACE_ICON = \"icon\";\n\t\tString PLACE_REFERENCE = \"reference\";\n\t\tString PLACE_TYPES = \"types\";\n\t\tString PLACE_VICINITY = \"vicinity\";\n\t\tString PLACE_RATING = \"rating\";\n\t\tString PLACE_URL = \"url\";\n\t\tString PLACE_WEBSITE = \"website\";\n\t\tString PLACE_LAST_UPDATED = \"last_update_time\";\n\t}",
"@Override\n public String name() {\n return this.name;\n }",
"@Override \n public String getName() {\n return NAME;\n }",
"public String getCellTypeName()\n {\n return this.cellTypeName;\n }",
"@Override\n\tpublic String getDimensionName() {\n\t\treturn null;\n\t}",
"public String getName() { return _sqlName; }",
"@Override\r\n public String getColumnName(int col) {\r\n return title[col];\r\n }",
"@Override\n public String toString()\n {\n return (name);\n }",
"@Override\r\n public String toString() {\r\n return Name;\r\n }",
"org.openxmlformats.schemas.drawingml.x2006.main.STGeomGuideName xgetName();",
"@Override\n\tpublic String name() {\n\n\t\treturn NAME;\n\t}",
"@Override\r\n\tprotected String getName() {\n\t\treturn NAME;\r\n\t}",
"@Override\r\n\tpublic String getName() {\r\n\t\treturn name;\r\n\t}",
"@Override\n String getName();",
"@Override\r\n public String toString() {\r\n return name;\r\n }",
"protected abstract String getFavoriteColumnName();",
"@Override\r\n\tpublic String getName() {\n\t\treturn name;\r\n\t}",
"@Override\n public String toString() {\n return name;\n }",
"public PgTable(final String name) {\n this.name = name;\n }",
"@Override\n\tpublic String[] getFieldName() {\n\t\treturn new String[]{\"编码\",\"名称\",\"属性\"};\n\t}",
"@Override\n\tString name();",
"@Override\n\tpublic String getFeatureName() {\n\t\treturn this.name();\n\t}",
"@Override public String getName() {\n return name;\n }",
"@Override\n public int hashCode() {\n return name.hashCode();\n }"
] |
[
"0.65622216",
"0.61022663",
"0.6084556",
"0.60694784",
"0.600996",
"0.57810557",
"0.5703204",
"0.5680221",
"0.5576961",
"0.5525666",
"0.5497971",
"0.54953647",
"0.5450838",
"0.54452896",
"0.54213995",
"0.54213995",
"0.5414811",
"0.541148",
"0.5408062",
"0.540788",
"0.53920436",
"0.5384691",
"0.53728765",
"0.5367462",
"0.5361637",
"0.53523576",
"0.5315943",
"0.53062135",
"0.5297603",
"0.5289009",
"0.52785796",
"0.5260023",
"0.52568907",
"0.52568907",
"0.5254293",
"0.52224934",
"0.52167434",
"0.52129626",
"0.5212855",
"0.5209205",
"0.52035105",
"0.52008104",
"0.51992035",
"0.51974595",
"0.5185504",
"0.5180243",
"0.5168855",
"0.51601624",
"0.51524436",
"0.5150986",
"0.515087",
"0.5146",
"0.5134068",
"0.5125551",
"0.51234066",
"0.5120235",
"0.5117972",
"0.5088087",
"0.50865656",
"0.50811017",
"0.50805676",
"0.50742304",
"0.50631404",
"0.50623703",
"0.50605947",
"0.5058356",
"0.50575966",
"0.5050781",
"0.5030919",
"0.5027207",
"0.50269806",
"0.5018468",
"0.5014959",
"0.5011617",
"0.5011617",
"0.50052255",
"0.5004954",
"0.5000952",
"0.49996632",
"0.4998575",
"0.4994459",
"0.49926415",
"0.4992282",
"0.49918255",
"0.49886742",
"0.49873412",
"0.49785972",
"0.49757904",
"0.49744597",
"0.4973116",
"0.49724513",
"0.49684435",
"0.49641243",
"0.4953544",
"0.49505264",
"0.4948833",
"0.494372",
"0.4942431",
"0.4938458",
"0.49351385",
"0.49351156"
] |
0.0
|
-1
|
looks up and matches a value to the specifed feature id. Used for example by shaders to obtain vaules for thematic mapping.
|
double getValue(int id);
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public void updateFeatue(Long id, FeatureLookup feature) {\n\r\n\t}",
"int getFeatureValue();",
"FeatureId getFeatureId();",
"int indexOfFeature(Feature feature);",
"Feature loadFeature(Integer id);",
"public void SelectValueByName(String Id, String Value) {\n\t\t\r\n\t}",
"public void setFeature(String featureId, boolean value)\n throws SAXNotRecognizedException, SAXNotSupportedException\n {\n boolean state;\n \n // Features with a defined value, we just change it if we can.\n state = getFeature (featureId);\n \n if (state == value)\n {\n return;\n }\n if (parser != null)\n {\n throw new SAXNotSupportedException(\"not while parsing\");\n }\n \n if ((FEATURE + \"namespace-prefixes\").equals(featureId))\n {\n // in this implementation, this only affects xmlns reporting\n xmlNames = value;\n // forcibly prevent illegal parser state\n if (!xmlNames)\n {\n namespaces = true;\n }\n return;\n }\n \n if ((FEATURE + \"namespaces\").equals(featureId))\n {\n namespaces = value;\n // forcibly prevent illegal parser state\n if (!namespaces)\n {\n xmlNames = true;\n }\n return;\n }\n \n if ((FEATURE + \"external-general-entities\").equals(featureId))\n {\n extGE = value;\n return;\n }\n if ((FEATURE + \"external-parameter-entities\").equals(featureId))\n {\n extPE = value;\n return;\n }\n if ((FEATURE + \"resolve-dtd-uris\").equals(featureId))\n {\n resolveAll = value;\n return;\n }\n \n if ((FEATURE + \"use-entity-resolver2\").equals(featureId))\n {\n useResolver2 = value;\n return;\n }\n \n throw new SAXNotRecognizedException(featureId);\n }",
"String getValueId();",
"public static Profile lookup(int value) {\n for (Profile p: values()) {\n if (value == p.value)\n return p;\n }\n return null;\n }",
"private int findValue(String v, String[] names, int[] values, int dflt) {\n if (v == null) {\n return dflt;\n }\n v = v.toLowerCase();\n for (int fidx = 0; fidx < names.length; fidx++) {\n if (v.equals(names[fidx])) {\n return values[fidx];\n }\n }\n\n return dflt;\n\n }",
"Feature findById(Long featureId);",
"public static <T extends IWebGLConstEnum> T getByIntValue(T[] values, int valueToFind) {\r\n\t\tfor(T val:values) {\r\n\t\t\tif(val.getIntValue()==valueToFind) {\r\n\t\t\t\treturn val;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn null;\r\n\t}",
"public String getBuyerFeatureSetValue(Integer buyerId, String feature)\tthrows Exception {\r\n\t\tString value = null;\r\n\t\tString hql=\"SELECT CAST(feature AS CHAR(100)) FROM buyer_feature_set WHERE buyer_id = :buyerId AND feature = :feature AND active_ind=1\";\r\n\r\n\t\tQuery query = getEntityManager().createNativeQuery(hql);\r\n\t\tquery.setParameter(\"buyerId\", buyerId);\t\r\n\t\tquery.setParameter(\"feature\", feature);\r\n\r\n\t\ttry {\r\n\t\t\tvalue = (String) query.getSingleResult();\t\t\t\t\r\n\t\t\treturn value;\r\n\t\t} catch (Exception e) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\t}",
"public <K, V> V getSpecific(K key, MappingValueKey<V> valueKey);",
"private SimpleFeature findFeature( FeatureStore<SimpleFeatureType, SimpleFeature> store, String fid) throws SOProcessException {\n \n try {\n FidFilter filter = FILTER_FACTORY.createFidFilter(fid);\n \n FeatureCollection<SimpleFeatureType, SimpleFeature> featuresCollection = store.getFeatures(filter);\n FeatureIterator<SimpleFeature> iter = featuresCollection.features();\n \n assert iter.hasNext();\n \n SimpleFeature feature = iter.next();\n \n return feature;\n \n } catch (IOException e) {\n final String msg = e.getMessage();\n LOGGER.severe(msg);\n throw new SOProcessException(msg);\n }\n }",
"private TypeDictionaryDicoEffetTactiqueRecherche(int value, String name, String literal) {\n\t\tthis.value = value;\n\t\tthis.name = name;\n\t\tthis.literal = literal;\n\t}",
"private int indexValue(String value) {\n int loc = openHashCode(value);\n //if the searchVal exist\n if (this.openHashSetArray[loc] == null||!this.openHashSetArray[loc].myList.contains(value))\n return -1;\n else\n return loc;\n\n }",
"public static Feature get(int id) throws SQLException {\r\n\t\tString featureIdColumnName = \"FEATURE_ID\";\r\n\t\tResultSet rs = operation.getRow(\"FEATURE\", featureIdColumnName, id);\r\n\t\tFeature feature = new Feature();\r\n\t\t\r\n\t\twhile (rs.next()) {\r\n\t\t\tfeature.setFeatureId(rs.getString(\"FEATURE_ID\"))\r\n\t\t\t\t.setVideoId(rs.getString(\"VIDEO_ID\"))\r\n\t\t\t\t.setFeatureName(rs.getString(\"FEATURE_NAME\"))\r\n\t\t\t\t.setFeatureVector(rs.getString(\"FEATURE_VECTOR\"))\r\n\t\t\t\t.setCreationDate(rs.getString(\"CREATION_DATE\"));\r\n\t\t}\r\n\t\t\r\n\t\t//System.out.println(\"Name: \" + feature.getFeatureName());\r\n\t\treturn feature;\r\n\t}",
"private int[] matches(int[] partition, int feature, boolean value) {\r\n\t\t// to allocate the array we first check how many samples we're talking\r\n\t\t// about\r\n\t\tint nMatches = 0;\r\n\t\tfor (int i = 0; i < partition.length; i++) {\r\n\t\t\tif (input[partition[i]][feature] == value)\r\n\t\t\t\tnMatches++;\r\n\t\t}\r\n\t\tint[] subset = new int[nMatches]; // allocate the array holding the\r\n\t\t\t\t\t\t\t\t\t\t\t// matching sample indices\r\n\t\tint cnt = 0;\r\n\t\t// collect the matching samples\r\n\t\tfor (int i = 0; i < partition.length; i++) {\r\n\t\t\tif (input[partition[i]][feature] == value)\r\n\t\t\t\tsubset[cnt++] = partition[i];\r\n\t\t}\r\n\t\treturn subset;\r\n\t}",
"private Tile getTileByValue(int value) {\n\t\tfor (int i = 0; i < gameSize; i++)\n\t\t\tfor (int j = 0; j < gameSize; j++)\n\t\t\t\tif (gameTiles.getTile(i, j).getValue() == value)\n\t\t\t\t\treturn gameTiles.getTile(i, j);\n\n\t\treturn null;\n\t}",
"public SimpleFeature get(String featureID) {\n\t\treturn idIndex.get(featureID);\n\t}",
"public static Category findValue(String id) {\n\n if (id == null || id.isEmpty())\n return null;\n\n for (Category cat : values()) {\n if (cat.id == id.charAt(0))\n return cat;\n }\n\n return null;\n }",
"static public Element lookup(int rgbValue)\n {\n for (Element e: Element.values())\n if (e.getValue() == rgbValue)\n return e;\n return null;\n }",
"public void setFeature(Integer feature) {\n this.feature = feature;\n }",
"private String labelFeature(int feature) {\r\n\t\treturn label[feature];\r\n\t}",
"private boolean smem_variable_get(smem_variable_key variable_id, ByRef<Long> variable_value) throws SQLException\n {\n final PreparedStatement var_get = db.var_get;\n \n var_get.setInt(1, variable_id.ordinal());\n try(ResultSet rs = var_get.executeQuery())\n {\n if(rs.next())\n {\n variable_value.value = rs.getLong(0 + 1);\n return true;\n }\n else\n {\n return false;\n }\n }\n }",
"UrlMap findByValue(String value);",
"public static boolean EXAMPLE_MATCHES_FEATURE(Example e, Feature f, int f_index, String f_type) {\n if (e.typed_features\n .elementAt(f_index)\n .getClass()\n .getSimpleName()\n .equals(\"Unknown_Feature_Value\")) return true;\n double ed;\n int ei;\n String es;\n\n if (f_type.equals(Feature.CONTINUOUS)) {\n if (!Feature.IS_CONTINUOUS(f.type))\n Dataset.perror(\"Feature.class :: feature type mismatch -- CONTINUOUS\");\n\n ed = ((Double) e.typed_features.elementAt(f_index)).doubleValue();\n if ((ed >= f.dmin) && (ed <= f.dmax)) return true;\n else return false;\n } else if (f_type.equals(Feature.INTEGER)) {\n if (!Feature.IS_INTEGER(f.type))\n Dataset.perror(\"Feature.class :: feature type mismatch -- INTEGER\");\n\n ei = ((Integer) e.typed_features.elementAt(f_index)).intValue();\n if ((ei >= f.imin) && (ei <= f.imax)) return true;\n else return false;\n } else if (f_type.equals(Feature.NOMINAL)) {\n if (!Feature.IS_NOMINAL(f.type))\n Dataset.perror(\"Feature.class :: feature type mismatch -- NOMINAL\");\n\n es = (String) e.typed_features.elementAt(f_index);\n if (f.modalities.contains(es)) return true;\n else return false;\n } else Dataset.perror(\"Feature.class :: feature type unknown\");\n\n return true;\n }",
"public ElemFeature selectByPrimaryKey(Integer id) throws SQLException {\r\n\t\tElemFeature key = new ElemFeature();\r\n\t\tkey.setId(id);\r\n\t\tElemFeature record = (ElemFeature) getSqlMapClientTemplate()\r\n\t\t\t\t.queryForObject(\r\n\t\t\t\t\t\t\"cementerio_elem_feature.ibatorgenerated_selectByPrimaryKey\",\r\n\t\t\t\t\t\tkey);\r\n\t\treturn record;\r\n\t}",
"@RequestMapping(value=\"/updateValue/{value}/{name}\", method = RequestMethod.POST)\n public void updateFeature(@PathVariable(value = \"value\") Integer value,\n \t\t @PathVariable(value = \"name\") String name) throws JsonProcessingException {\n \tfinal String uri = \"http://localhost:12300/featureflags\";\n RestTemplate restTemplate = new RestTemplate();\n HttpHeaders headers = new HttpHeaders();\n headers.setAccept(Arrays.asList(MediaType.APPLICATION_JSON));\n Feature feature = new Feature(value, name);\n restTemplate.postForEntity( uri, feature, Feature[].class);\n System.out.println(\"End of updateFeature() \");\n }",
"iet.distributed.telemetry.Feature getFeature(int index);",
"public static double featureValue(Attribute attrib, Object feature) {\n switch (attrib.type()) {\n case Attribute.NOMINAL:\n classCheck(attrib, feature, String.class);\n int idx = attrib.indexOfValue((String)feature);\n if (idx == -1) {\n onIllegalArg(attrib, feature);\n }\n return (double)idx;\n case Attribute.NUMERIC:\n if (feature instanceof Number) {\n return (Double)feature;\n } else if (feature instanceof String) {\n try {\n return Double.valueOf((String) feature).doubleValue();\n } catch (NumberFormatException e) {\n // fall through to throw\n }\n }\n onIllegalArg(attrib, feature);\n case Attribute.STRING:\n classCheck(attrib, feature, String.class);\n return attrib.addStringValue((String)feature);\n case Attribute.DATE:\n classCheck(attrib, feature, String.class);\n try {\n return attrib.parseDate((String)feature);\n } catch (ParseException e) {\n onIllegalArg(attrib, feature);\n }\n case Attribute.RELATIONAL:\n classCheck(attrib, feature, String.class);\n try {\n ArffReader arff = new ArffReader(new StringReader((String) feature), attrib.relation(), 0);\n return attrib.addRelation(arff.getData());\n } catch (Exception e) {\n onIllegalArg(attrib, feature);\n }\n default:\n onIllegalArg(attrib, feature);\n }\n return -1; // can't get here, infact.\n }",
"public V lookup(K key);",
"public Fruit(int id,GpsPoint GpsLocation,int value , Map map)\n\t{\n\t\tthis._id=id;\n\t\tthis._GPS=GpsLocation;\n\t\tthis._value=value;\n\t\t_GPSConvert = new Point3D(GpsLocation.getLon(),GpsLocation.getLat(),GpsLocation.getAlt());\n\t\tthis._PixelLocation = new Pixel(_GPSConvert, map);\n\t\tEatenTime = 0 ;\n\t}",
"public static Attributes convert(int value) {\n for (Attributes v : Attributes.values()) {\n if (v.getValue() == value) {\n return v;\n }\n }\n return null;\n }",
"boolean hasValueCharacteristicId();",
"public boolean containsFeature(Feature f);",
"@Override\n\tpublic int processLine(String line, Vector featureVector) {\n\t\tList<String> values = parseCsvLine(line);\n\n\t\tint targetValue = targetDictionary.intern(values.get(target));\n\t\tif (targetValue >= maxTargetValue) {\n\t\t\ttargetValue = maxTargetValue - 1;\n\t\t}\n\n\t\tfor (Integer predictor : predictors) {\n\t\t\tString value;\n\t\t\tif (predictor >= 0) {\n\t\t\t\tvalue = values.get(predictor);\n\t\t\t} else {\n\t\t\t\tvalue = null;\n\t\t\t}\n\t\t\tpredictorEncoders.get(predictor).addToVector(value, featureVector);\n\t\t}\n\t\treturn targetValue;\n\t}",
"private static int getMappingValue(ArrayList<Integer[]> mapTable, int listOrder, int value) {\n // Define Mapping Order\n int mapIndex;\n if (listOrder == 1){\n mapIndex = 1;\n }else{\n mapIndex = 0;\n }\n // Go through the Whole List\n for(Integer[] item: mapTable) {\n if (item[listOrder - 1] == value){\n return item[mapIndex];\n }\n }\n return value;\n }",
"public void calcualteFeatureValue(Collection<Instance> instanceCollection);",
"public VarType getVarById(MappingType mapping, String varId) {\n\t\tEList<RepresentsType> repList = mapping.getRepresents();\n\t\tfor(RepresentsType rep : repList) {\n\t\t\ttry {\n\t\t\t\tVarType var = rep.getVariable();\n\t\t\t\tif(var.getId().equals(varId)) {\n\t\t\t\t\treturn var;\n\t\t\t\t}\n\t\t\t} catch(Exception e) {\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}",
"public void setBasedOnValue(entity.LocationNamedInsured value);",
"public static Prediction getPredicitonByValue(int value) {\r\n\t\tfor (final Prediction pred : Prediction.values()) {\r\n\t\t\tif (pred.getValue() == value) {\r\n\t\t\t\treturn pred;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn null;\r\n\t}",
"public Integer getIdByValue(String value) throws AuthNException {\n Attribute attr = super.queryByParam(\"value\", value);\n if (attr != null ) {\n return attr.getId();\n } else {\n throw new AuthNException (\"No attribute with value \"+ value);\n }\n }",
"private TypeDictionaryDicoActionQualificatifActivite(int value, String name, String literal) {\n\t\tthis.value = value;\n\t\tthis.name = name;\n\t\tthis.literal = literal;\n\t}",
"public void setParameter(entity.RateTableMatchOp value);",
"@Override\n\tpublic MADlibFeature lookUpFeature(MADlibFeatureKey key) {\n\t\t// TODO Auto-generated method stub\n\t\treturn null;\n\t}",
"public MatchingCandidate(final T oldElement, final T newElement, final Float value) {\n super(oldElement, newElement, value);\n\n id = counter.incrementAndGet();\n }",
"private Integer getKey(WeatherData value)\n\t{\n\t for(Integer key : trainDataXMap.keySet())\n\t {\n\t if(trainDataXMap.get(key).equals(value))\n\t {\n\t return key; //return the first found\n\t }\n\t }\n\t return null;\n\t}",
"public static WeaponId getWeaponIdByValue(int id) {\r\n\t\tfor(WeaponId wid : WeaponId.values()) {\r\n\t\t\tif(id == wid.getValue()) {\r\n\t\t\t\treturn wid;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn null;\r\n\t}",
"public Object getAdditionalTagValue(String tagId, Concept concept) {\n\n Collection additionalTags = this.assignedTag.getAdditionalTags();\n\n for (Iterator i = additionalTags.iterator(); i.hasNext();) {\n\n AssignedTag additionalTag = (AssignedTag) i.next();\n Tag tag = additionalTag.getTag();\n Concept[] concepts = (additionalTag.getTarget()).getConcepts();\n\n if (tag.getId() == tagId && Arrays.binarySearch(concepts, concept) >= 0) {\n\n return additionalTag.getValue();\n }\n }\n\n return null;\n }",
"public Value lookup (String name){\n Closure exist = find_var(name);\n return exist.getValues().get(name);\n }",
"private static int find_value(String b)\n {\n int store = 0;\n List<String> name = new ArrayList<String>(library.return_name());\n //System.out.println(name);\n for(int x = 0; x < name.size(); x++)\n {\n if(name.get(x).charAt(0) == b.charAt(0))\n store = x;\n }\n List<Integer> value = new ArrayList<Integer>(library.return_value());\n return value.get(store);\n }",
"void setFeature(int index, Feature feature);",
"public void setIdentifierValue(java.lang.String param) {\r\n localIdentifierValueTracker = true;\r\n\r\n this.localIdentifierValue = param;\r\n\r\n\r\n }",
"public Fruit(int id,Pixel PixelLocation,int value, Map map)\n\t{\n\t\tthis._id=id;\n\t\tthis._PixelLocation=PixelLocation;\n\t\tthis._value=value;\n\t\tthis._GPSConvert = new Point3D(map.Pixel2GPSPoint(PixelLocation.get_PixelX(),PixelLocation.get_PixelY()));\n\t\tthis._GPS = new GpsPoint(_GPSConvert);\n\t\tEatenTime = 0 ; \n\t}",
"public SpectrumMatch getSpectrumMatch(long id) {\r\n Integer index = id2index.get(id);\r\n return (index != null) ? spectrumMatches.get(id2index.get(id)) : null;\r\n }",
"Integer getIndexOfGivenValue(String value) {\n Integer index = null;\n for (IndexValuePair indexValuePair : indexValuePairs) {\n if (indexValuePair.getValue().equals(value)) {\n index = indexValuePair.getIndex();\n break;\n }\n }\n return index;\n }",
"private String modifyValue(String id) {\n\n String[] split = id.split(\"\\\"\");\n return split[1];\n }",
"private String matchVariable(String key) {\n\t\treturn variables.get(key);\n\t}",
"@Override\n\tpublic boolean containsValue(Object value) {\n\t\treturn map.containsValue(value);\n\t}",
"public boolean matches(String value) {\n\t\treturn value != null && splitValue(value).length == columns.size() + 1 \n\t\t\t\t&& id.equals(splitValue(value)[0]);\n\t}",
"public double get(String feature) {\n if (weightMap.containsKey(feature)) {\n return weightMap.get(feature);\n } else {\n return 0;\n }\n }",
"public boolean find(int value) {\n \t\n \tfor(int num : map.keySet()) {\n \t\tint target = value - num;\n \t\tif(map.containsKey(target)) {\n \t\t\tif(num != target || map.get(target) == 2)\n \t\t\t\treturn true;\n \t\t}\n \t}\n return false;\n }",
"@Override\n public boolean equals(Object object) {\n if (!(object instanceof Feature)) {\n return false;\n }\n Feature other = (Feature) object;\n return !((this.id == null && other.id != null)\n || (this.id != null && !this.id.equals(other.id)));\n }",
"final Integer getIdFromStringPerson(String selectedValue) {\n String [] tokens = selectedValue.split(\":\"); //Split our String\n int idPosition = 1; // ID's position in the our String(See getAsString())\n return Integer.parseInt(tokens[idPosition]); //Extract Id from the string\n }",
"private void handleFeature(final Type type, TOP fs, String featName, String featValIn,\n boolean lenient) throws SAXParseException {\n final String featVal = (featName.equals(\"sofa\") && ((TypeImpl) type).isAnnotationBaseType())\n ? Integer.toString(this.sofaRefMap\n .get(((Sofa) fsTree.get(Integer.parseInt(featValIn)).fs).getSofaNum()))\n : featValIn;\n\n // handle v1.x sofanum values, remapping so that _InitialView always == 1\n // Bypassed in v3 of UIMA because sofa was already created with the right sofanum\n // if (featName.equals(CAS.FEATURE_BASE_NAME_SOFAID) && (fs instanceof Sofa)) {\n // Sofa sofa = (Sofa) fs;\n // int sofaNum = sofa.getSofaNum();\n // sofa._setIntValueNcNj(Sofa._FI_sofaNum, this.indexMap.get(sofaNum));\n //\n //// Type sofaType = ts.sofaType;\n //// final FeatureImpl sofaNumFeat = (FeatureImpl) sofaType\n //// .getFeatureByBaseName(CAS.FEATURE_BASE_NAME_SOFANUM);\n //// int sofaNum = cas.getFeatureValue(addr, sofaNumFeat.getCode());\n //// cas.setFeatureValue(addr, sofaNumFeat.getCode(), this.indexMap.get(sofaNum));\n // }\n\n String realFeatName = getRealFeatName(featName);\n\n final FeatureImpl feat = (FeatureImpl) type.getFeatureByBaseName(realFeatName);\n if (feat == null) { // feature does not exist in typesystem\n if (outOfTypeSystemData != null) {\n // Add to Out-Of-Typesystem data (APL)\n List<Pair<String, Object>> ootsAttrs = outOfTypeSystemData.extraFeatureValues\n .computeIfAbsent(fs, k -> new ArrayList<>());\n ootsAttrs.add(new Pair(featName, featVal));\n } else if (!lenient) {\n throw createException(XCASParsingException.UNKNOWN_FEATURE, featName);\n }\n } else {\n // feature is not null\n if (feat.getRangeImpl().isRefType) {\n // queue up a fixup action to be done\n // after the external ids get properly associated with\n // internal ones.\n\n fixupToDos.add(() -> finalizeRefValue(Integer.parseInt(featVal), fs, feat));\n } else { // is not a ref type.\n CASImpl.setFeatureValueFromStringNoDocAnnotUpdate(fs, feat, featVal);\n }\n\n }\n }",
"protected void loadFloat(int location, float value){\r\n\t\tGL20.glUniform1f(location, value);\r\n\t}",
"V get(K id);",
"int value(String name);",
"boolean contains(SimpleFeature feature);",
"public static EstimatingTechnique get(String literal) {\r\n\t\tfor (int i = 0; i < VALUES_ARRAY.length; ++i) {\r\n\t\t\tEstimatingTechnique result = VALUES_ARRAY[i];\r\n\t\t\tif (result.toString().equals(literal)) {\r\n\t\t\t\treturn result;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn null;\r\n\t}",
"@Override\r\n\t\tpublic void setFeature(String featureId, OnlineInfo info) {\n\t\t\tinfo.getFeatures().setClassLoader(TKV.class.getClassLoader());\r\n\r\n\t\t\ttry {\r\n\t\t\t\tif (featureId.equals(ApiConstants.FEATURE_STATUS) || featureId.equals(ApiConstants.FEATURE_XSTATUS)) {\r\n\t\t\t\t\tbyte status = info.getFeatures().getByte(ApiConstants.FEATURE_STATUS, (byte) -1);\r\n\t\t\t\t\tbyte xstatus = info.getFeatures().getByte(ApiConstants.FEATURE_XSTATUS, (byte) -1);\r\n\t\t\t\t\t\r\n\t\t\t\t\tboolean isChat = MrimApiConstants.STATUS_FREE4CHAT == status;\r\n\t\t\t\t\tint mstatus = (isChat || (xstatus > -1)) ? MrimConstants.STATUS_OTHER : MrimEntityAdapter.userStatus2MrimUserStatus(status);\r\n\t\t\t\t\tString mxstatus = isChat ? \"STATUS_CHAT\" : MrimEntityAdapter.userXStatus2MrimXStatus(xstatus);\r\n\t\t\t\t\tinternal.request(MrimServiceInternal.REQ_SETSTATUS, mstatus, mxstatus, info.getXstatusName(), info.getXstatusDescription());\r\n\t\t\t\t} /*else if (featureId.equals(IcqApiConstants.FEATURE_BUDDY_VISIBILITY)) {\r\n\t\t\t\t\tbyte value = info.getFeatures().getByte(featureId, (byte) 0);\r\n\t\t\t\t\tinternal.request(ICQServiceInternal.REQ_BUDDYVISIBILITY, info.getProtocolUid(), value < 0 ? ICQConstants.VIS_REGULAR : ICQEntityAdapter.BUDDY_VISIBILITY_MAPPING[value]);\r\n\t\t\t\t} */\r\n\t\t\t} catch (MrimException e) {\r\n\t\t\t\tLogger.log(e);\r\n\t\t\t\tgetCoreService().notification(e.getLocalizedMessage());\r\n\t\t\t}\r\n\t\t}",
"public void lookup(String id){\t\n\t\t\n\t\tif (id == null) return;\n\t\tif (id.length() == 0) return;\n\t\tid = id.trim();\n\t\t\n\t\tUtil.debug(\"is a product ID? [\" + id + \"] length: \" + id.length(), this);\n\n\t\tif (id.length() == 1 ){\n\t\t\tif(id.equals(LIGHTS)){\t\t\n\t\t\t\tstate.set(State.values.lightport, getPortName());\n\t\t\t\tUtil.debug(\"found lights on comm port: \" + getPortName(), this);\t\t\n\t\t\t}\n\t\t\t\n\t\t\treturn;\n\t\t} \n\t\t\t\n\t\tif(id.startsWith(\"id\")){\t\n\t\t\t\n\t\t\tid = id.substring(2, id.length());\n\t\t\t\t\n\t\t\tUtil.debug(\"found product id[\" + id + \"] on comm port: \" + getPortName(), this);\n\n\t\t\tif (id.equalsIgnoreCase(OCULUS_DC)) {\n\n\t\t\t\tstate.set(State.values.serialport, getPortName());\n\t\t\t\tstate.set(State.values.firmware, OCULUS_DC);\n\t\t\t\t\n\t\t\t} else if (id.equalsIgnoreCase(OCULUS_SONAR)) {\n\n\t\t\t\tstate.set(State.values.serialport, getPortName());\n\t\t\t\tstate.set(State.values.firmware, OCULUS_SONAR);\t\n\t\t\t\n\t\t\t} else if (id.equalsIgnoreCase(OCULUS_TILT)) {\n\n\t\t\t\tstate.set(State.values.serialport, getPortName());\n\t\t\t\tstate.set(State.values.firmware, OCULUS_TILT);\n\t\t\t\t\n\t\t\t} else if (id.equalsIgnoreCase(ARDUINO_MOTOR_SHIELD)) {\n\n\t\t\t\tstate.set(State.values.serialport, getPortName());\n\t\t\t\tstate.set(State.values.firmware, ARDUINO_MOTOR_SHIELD);\n\t\t\t\t\n\t\t\t}\n\n\t\t\t//TODO: other devices here if grows\n\t\t\t\n\t\t}\n\t}",
"float getMatch();",
"public void setValue_id(java.lang.String value_id) {\n this.value_id = value_id;\n }",
"private EstimatingTechnique(int value, String name, String literal) {\r\n\t\tthis.value = value;\r\n\t\tthis.name = name;\r\n\t\tthis.literal = literal;\r\n\t}",
"boolean containsFeature(Feature feature);",
"public abstract boolean containsValue(V value);",
"public Object lookup(String id) {\n return null;\n }",
"private void search(Object value)\r\n\t\t{\n\r\n\t\t}",
"public <K> Object getSpecific(K key, String valueKey);",
"public native void selectFacetValue(String facetId, String facetValueId) /*-{\r\n var self = [email protected]::getOrCreateJsObj()();\r\n self.selectFacetValue(facetId, facetValueId);\r\n }-*/;",
"public com.hexarchbootdemo.adapter.output.persistence.h2.generated_sources.jooq.tables.pojos.Voter fetchOneById(UUID value) {\n return fetchOne(Voter.VOTER.ID, value);\n }",
"public java.lang.Object get(int field$) {\n switch (field$) {\n case 0: return SPARQL1Features;\n case 1: return SPARQL11Features;\n default: throw new org.apache.avro.AvroRuntimeException(\"Bad index\");\n }\n }",
"public boolean getFeature(@Nonnull Feature f) {\r\n return features.contains(f);\r\n }",
"@Override\n public boolean containsValue(Object value) {\n for (LinkedList<Entry<K,V>> list : table) {\n for (Entry<K,V> entry : list) {\n if (entry.getValue().equals(value)) {\n return true;\n }\n }\n }\n return false;\n }",
"private void finalizeRefValue(int extId, TOP fs, FeatureImpl fi) {\n FSInfo fsInfo = fsTree.get(extId);\n if (fsInfo == null) {\n\n // this feature may be a ref to an out-of-typesystem FS.\n // add it to the Out-of-typesystem features list (APL)\n if (extId != 0 && outOfTypeSystemData != null) {\n List<Pair<String, Object>> ootsAttrs = outOfTypeSystemData.extraFeatureValues\n .computeIfAbsent(fs, k -> new ArrayList<>());\n String featFullName = fi.getName();\n int separatorOffset = featFullName.indexOf(TypeSystem.FEATURE_SEPARATOR);\n String featName = \"_ref_\" + featFullName.substring(separatorOffset + 1);\n ootsAttrs.add(new Pair(featName, Integer.toString(extId)));\n }\n CASImpl.setFeatureValueMaybeSofa(fs, fi, null);\n } else {\n // the sofa ref in annotationBase is set when the fs is created, not here\n if (fi.getCode() != TypeSystemConstants.annotBaseSofaFeatCode) {\n if (fs instanceof Sofa) {\n // special setters for sofa values\n Sofa sofa = (Sofa) fs;\n switch (fi.getRangeImpl().getCode()) {\n case TypeSystemConstants.sofaArrayFeatCode:\n sofa.setLocalSofaData(fsInfo.fs);\n break;\n default:\n throw new CASRuntimeException(UIMARuntimeException.INTERNAL_ERROR);\n }\n return;\n }\n\n // handle case where feature is xyz[] (an array ref, not primitive) but the value of fs is\n // FSArray\n ts.fixupFSArrayTypes(fi.getRangeImpl(), fsInfo.fs);\n CASImpl.setFeatureValueMaybeSofa(fs, fi, fsInfo.fs);\n }\n }\n }",
"public void update(String feature, double value) {\n // update the weight of the feature\n if (!weightMap.containsKey(feature)) {\n weightMap.put(feature, value);\n } else {\n weightMap.put(feature, weightMap.get(feature) + value);\n }\n\n // also add to averaging map if averaging is on\n if (doAveraging) {\n if (!weightCacheMap.containsKey(feature)) {\n weightCacheMap.put(feature, value * averagingCoefficient);\n } else {\n weightCacheMap.put(feature, weightCacheMap.get(feature) + value * averagingCoefficient);\n }\n\n averagingCoefficient++;\n }\n }",
"public boolean pickFromId(int value)\r\n {\r\n int number = value & 0xFFFF;\r\n if (number > rhPtr.rhMaxObjects)\r\n {\r\n return false;\r\n }\r\n CObject pHo = rhPtr.rhObjectList[number];\r\n if (pHo == null)\r\n {\r\n return false;\r\n }\r\n\r\n int code = value >>> 16;\r\n if (code != pHo.hoCreationId)\r\n {\r\n return false;\r\n }\r\n\r\n // Dans une liste selectionnee ou pas?\r\n CObjInfo poil = pHo.hoOiList;\r\n if (poil.oilEventCount == rh2EventCount)\r\n {\r\n short next = poil.oilListSelected;\r\n CObject pHoFound = null;\r\n while (next >= 0)\r\n {\r\n pHoFound = rhPtr.rhObjectList[next];\r\n if (pHo == pHoFound)\r\n {\r\n break;\r\n }\r\n next = pHoFound.hoNextSelected;\r\n }\r\n ;\r\n if (pHo != pHoFound)\r\n {\r\n return false;\r\n }\r\n }\r\n poil.oilEventCount = rh2EventCount;\t\t\t// Seul sur la liste!\r\n poil.oilListSelected = -1;\r\n poil.oilNumOfSelected = 0;\r\n pHo.hoNextSelected = -1;\r\n evt_AddCurrentObject(pHo);\r\n return true;\r\n }",
"public double getValue(String id) {\n for (SimilarResult result : results) {\n if (result.getStringId().equals(id)) {\n return result.getValue();\n }\n }\n return 0;\n }",
"public IntColumn getFeatureId() {\n return (IntColumn) (isText ? textFields.computeIfAbsent(\"feature_id\", IntColumn::new) :\n getBinaryColumn(\"feature_id\"));\n }",
"public void setMatchID(int id){\r\n\t\tmatchID = id;\r\n\t}",
"public DataValue lookup(String key) {\n if (validateKey(key)) {\n return getValueForKey(key);\n } else {\n return DataValue.NO_VALUE;\n }\n }",
"private static Object referenceValue(IDatatype type, Object value) {\n if (Reference.TYPE.isAssignableFrom(type)) {\n DisplayNameProvider nameProvider = DisplayNameProvider.getInstance();\n List<AbstractVariable> possibleDecls = ReferenceValuesFinder.findPossibleValues(\n de.uni_hildesheim.sse.qmApp.model.VariabilityModel.Configuration.INFRASTRUCTURE.getConfiguration()\n .getProject(), (Reference) type);\n for (int i = 0; i < possibleDecls.size(); i++) {\n AbstractVariable declaration = possibleDecls.get(i);\n String name = nameProvider.getDisplayName(declaration);\n if (name.equals(value)) {\n value = declaration;\n break;\n }\n }\n } \n return value;\n }",
"public void setMatchingAttributeValue(String value)\n\t{\n\t\tthis.matchingAttributeValue = value;\n\t}",
"public native FacetValue getFacetValue(String facetId, String facetValueId) /*-{\r\n var self = [email protected]::getOrCreateJsObj()();\r\n var ret = self.getFacetValue(facetId, facetValueId);\r\n if(ret == null || ret === undefined) return null;\r\n var retVal = @com.smartgwt.client.core.RefDataClass::getRef(Lcom/google/gwt/core/client/JavaScriptObject;)(ret);\r\n if(retVal == null) {\r\n retVal = @com.smartgwt.client.widgets.cube.FacetValue::new(Lcom/google/gwt/core/client/JavaScriptObject;)(ret);\r\n }\r\n return retVal;\r\n }-*/;",
"public boolean containsValue(Object value) {\n return map.containsValue(value);\n }",
"private void handleFeature(TOP fs, String featName, String featVal, boolean lenient)\n throws SAXParseException {\n Type type = fs._getTypeImpl();\n handleFeature(type, fs, featName, featVal, lenient);\n }",
"K findKeyForValue(V val);"
] |
[
"0.55370456",
"0.5530313",
"0.55161464",
"0.5377745",
"0.53570974",
"0.5337714",
"0.5322709",
"0.52719235",
"0.51746917",
"0.5120483",
"0.50607544",
"0.50473416",
"0.50468826",
"0.5032567",
"0.49662215",
"0.4964888",
"0.49325523",
"0.49311644",
"0.49262014",
"0.4920673",
"0.48849463",
"0.4877875",
"0.4842228",
"0.48229054",
"0.4815435",
"0.48064566",
"0.47942784",
"0.4779912",
"0.477515",
"0.47539794",
"0.47501138",
"0.47407144",
"0.47297716",
"0.46581662",
"0.4656827",
"0.46452373",
"0.46436688",
"0.46414325",
"0.46400777",
"0.46381694",
"0.46333125",
"0.462476",
"0.46198723",
"0.46190068",
"0.4613018",
"0.46127343",
"0.46087566",
"0.4608624",
"0.45990646",
"0.4592538",
"0.45915997",
"0.4590906",
"0.45881754",
"0.45865628",
"0.45851448",
"0.45706162",
"0.45688772",
"0.4552179",
"0.45400125",
"0.45397043",
"0.4525093",
"0.44858035",
"0.4477703",
"0.44744226",
"0.44693023",
"0.4468373",
"0.44661918",
"0.44660252",
"0.44625917",
"0.44549555",
"0.44494286",
"0.44393066",
"0.44340965",
"0.44239074",
"0.44216132",
"0.44141927",
"0.4410289",
"0.44072",
"0.4400084",
"0.43901795",
"0.43802977",
"0.43794551",
"0.43763953",
"0.43730935",
"0.4372808",
"0.43709219",
"0.43707427",
"0.4369418",
"0.43685198",
"0.43679634",
"0.43645576",
"0.4360116",
"0.43580633",
"0.43537408",
"0.43417874",
"0.43381858",
"0.43376592",
"0.433457",
"0.43297943",
"0.4320391"
] |
0.4649729
|
35
|
Looks up and retreves a string for the specifed feature id. Used for example by the ToolTip feature in Themes to provide tool tip text for each feature.
|
String getText(int id);
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"FeatureId getFeatureId();",
"private String labelFeature(int feature) {\r\n\t\treturn label[feature];\r\n\t}",
"java.lang.String getFortId();",
"String getFeature();",
"String getFeature();",
"public String getIdentifierString();",
"java.lang.String getIdentifier();",
"private String getFeatureFieldName(FeatureImpl feature) {\n return feature.getShortName();\n }",
"String getIdentifier();",
"String getIdentifier();",
"String getIdentifier();",
"String getIdentifier();",
"String getIdentifier();",
"String getIdentifier();",
"String getIdentifier();",
"@Override\n\tpublic String getFeatureName() {\n\t\treturn this.name();\n\t}",
"public String feature() {\n return feature;\n }",
"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 String getFeatureID() {\r\n if (line == null) {\r\n return null;\r\n }\r\n\r\n return fid;\r\n }",
"java.lang.String getStringId();",
"java.lang.String getStringId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"protected abstract String getFeatureName(Map<String, Object> data);",
"public String getId() {\n String id = name.replaceAll(\" \", \"-\");\n id = id.replaceAll(\"_\", \"-\");\n return id.toLowerCase();\n }",
"protected String getFactoryID( String id ){\n return id;\n }",
"Feature loadFeature(Integer id);",
"public SimpleFeature get(String featureID) {\n\t\treturn idIndex.get(featureID);\n\t}",
"public String getId()\r\n\t{\n\t\treturn id.substring(2, 5);\r\n\t}",
"java.lang.String getID();",
"public String getFunctionalityId();",
"@Override\n\tpublic String getFeatureCode() {\n\t\treturn featureCode;\n\t}",
"String gini_GetEntityID(int ent_id) {\n String name;\n switch (ent_id) {\n case 2:\n name = \"Miscellaneous\";\n break;\n case 3:\n name = \"JERS\";\n break;\n case 4:\n name = \"ERS/QuikSCAT/Scatterometer\";\n break;\n case 5:\n name = \"POES/NPOESS\";\n break;\n case 6:\n name = \"Composite\";\n break;\n case 7:\n name = \"DMSP satellite Image\";\n break;\n case 8:\n name = \"GMS satellite Image\";\n break;\n case 9:\n name = \"METEOSAT satellite Image\";\n break;\n case 10:\n name = \"GOES-7 satellite Image\";\n break;\n case 11:\n name = \"GOES-8 satellite Image\";\n break;\n case 12:\n name = \"GOES-9 satellite Image\";\n break;\n case 13:\n name = \"GOES-10 satellite Image\";\n break;\n case 14:\n name = \"GOES-11 satellite Image\";\n break;\n case 15:\n name = \"GOES-12 satellite Image\";\n break;\n case 16:\n name = \"GOES-13 satellite Image\";\n break;\n case 17:\n name = \"GOES-14 satellite Image\";\n break;\n case 18:\n name = \"GOES-15 satellite Image\";\n break;\n case 19: // GOES-R\n name = \"GOES-16 satellite Image\";\n break;\n case 99: // special snowflake GEMPAK Composite Images generated by Unidata\n name = \"RADAR-MOSIAC Composite Image\";\n break;\n default:\n name = \"Unknown\";\n }\n\n return name;\n }",
"public String getFeatureFlagString() {\n return featureFlagString;\n }",
"protected String getID( PerspectiveElement<?> element ){\n \treturn element.getFactoryID();\n }",
"public String getFeature() {\r\n return feature;\r\n }",
"java.lang.String getHotelId();",
"private String prefTag(String id) {\n\t\treturn preferenceTag + \"_\" + id;\n\t}",
"String experimentId();",
"String getSupplierID();",
"String idProvider();",
"public String getIdentifier();"
] |
[
"0.7083136",
"0.67455935",
"0.6257814",
"0.6225954",
"0.6225954",
"0.612577",
"0.6125751",
"0.6034759",
"0.59948087",
"0.59948087",
"0.59948087",
"0.59948087",
"0.59948087",
"0.59948087",
"0.59948087",
"0.59724927",
"0.59367555",
"0.59096354",
"0.59096354",
"0.59096354",
"0.59096354",
"0.59096354",
"0.59096354",
"0.59096354",
"0.59096354",
"0.59096354",
"0.59096354",
"0.59096354",
"0.59096354",
"0.59096354",
"0.59096354",
"0.59096354",
"0.59096354",
"0.59096354",
"0.59096354",
"0.59096354",
"0.59052324",
"0.5892538",
"0.5892538",
"0.5888965",
"0.5888965",
"0.5888965",
"0.5888965",
"0.5888965",
"0.5888965",
"0.5888965",
"0.5888965",
"0.5888965",
"0.5888965",
"0.5888965",
"0.5888965",
"0.5888965",
"0.5888965",
"0.5888965",
"0.5888965",
"0.5888965",
"0.5888965",
"0.5888965",
"0.5888965",
"0.5888965",
"0.5888965",
"0.5888965",
"0.5888965",
"0.5888965",
"0.5888965",
"0.5888965",
"0.5888965",
"0.5888965",
"0.5888965",
"0.5888965",
"0.5888965",
"0.5888965",
"0.5888965",
"0.5888965",
"0.5888965",
"0.5888965",
"0.5888965",
"0.5888965",
"0.5888965",
"0.5888965",
"0.5888965",
"0.5888965",
"0.5883443",
"0.5851683",
"0.5826175",
"0.58030903",
"0.57859236",
"0.5777141",
"0.5747126",
"0.5743706",
"0.5716502",
"0.56868565",
"0.56771636",
"0.5677067",
"0.5675803",
"0.56587225",
"0.56463605",
"0.5640109",
"0.5634183",
"0.56268525",
"0.56201"
] |
0.0
|
-1
|
In order to allow systems to iterate through all of the data contained within the GeoData object this method provides a list of all of the IDs which have associated values stored.
|
Enumeration getIds();
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"Collection<?> idValues();",
"public Map<String, Object> getIds() {\n return ids;\n }",
"public Set<String> getDataObjectIds() {\n\t\treturn dataObjectIds;\n\t}",
"public List<DataNodeId> getDataNodeIds();",
"public java.util.List<java.lang.String> getGeneIds() {\n return geneIds;\n }",
"public java.util.List<java.lang.String> getGeneIds() {\n return geneIds;\n }",
"public List getAllIds();",
"public Map<Integer, ArrayList<LatLng>> shapeIdList () {\r\n Map<Integer, ArrayList<LatLng>> newList = new HashMap<>();\r\n Cursor getData = getReadableDatabase().rawQuery(\"select shape_id from shapes\", null);\r\n getData.moveToFirst();\r\n while (getData.moveToNext()) {\r\n newList.put(getData.getInt(0), null);\r\n }\r\n return newList;\r\n }",
"public static ImmutableSet<Integer> getIds(){\n\t\t\treturn m_namesMap.rightSet();\n\t\t}",
"java.util.List<java.lang.Long> getIdsList();",
"Map getIDPEXDataMap();",
"public String[] getIDs() {\n return impl.getIDs();\n }",
"Set<II> getIds();",
"public List<Integer> getRegionIds() {\r\n\t\tList<Integer> regionIds = new ArrayList<>();\r\n\t\tfor (int x = southWestX >> 6; x < (northEastX >> 6) + 1; x++) {\r\n\t\t\tfor (int y = southWestY >> 6; y < (northEastY >> 6) + 1; y++) {\r\n\t\t\t\tint id = y | x << 8;\r\n\t\t\t\tregionIds.add(id);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn regionIds;\r\n\t}",
"public List<K> getSavedIds() {\n if (dbObjects.length > 0 && dbObjects[0] instanceof JacksonDBObject) {\n throw new UnsupportedOperationException(\n \"Generated _id retrieval not supported when using stream serialization\");\n }\n\n List<K> ids = new ArrayList<K>();\n for (DBObject dbObject : dbObjects) {\n ids.add(jacksonDBCollection.convertFromDbId(dbObject.get(\"_id\")));\n }\n\n return ids;\n }",
"public static LocationId getLocationIds()\n {\n LocationId locnIds = new LocationId();\n IoTGateway.getGlobalStates().forEach(\n (locn,sv)->{\n locnIds.addId(locn);\n }\n );\n return locnIds;\n }",
"public java.util.List<String> getIds() {\n return ids;\n }",
"public Collection<Object> values()\n {\n return data.values();\n }",
"public java.util.List<java.lang.Integer>\n getDataList() {\n return data_;\n }",
"public int[] getListOfId() {\r\n\t\tString sqlCommand = \"SELECT Barcode FROM ProductTable\";\r\n\t\tint[] idList = null;\r\n\t\tArrayList<Integer> tmpList = new ArrayList<Integer>();\r\n\t\tint counter = 0;\r\n\t\ttry (Connection conn = this.connect();\r\n\t\t\t\tStatement stmt = conn.createStatement();\r\n\t\t\t\tResultSet rs = stmt.executeQuery(sqlCommand)) {\r\n\t\t\twhile (rs.next()) {\r\n\t\t\t\ttmpList.add(rs.getInt(\"Barcode\"));\r\n\t\t\t\tcounter++;\r\n\t\t\t}\r\n\t\t\tidList = new int[counter];\r\n\t\t\tfor (int i = 0; i < counter; i++) {\r\n\t\t\t\tidList[i] = tmpList.get(i);\r\n\t\t\t}\r\n\t\t} catch (SQLException e) {\r\n\t\t\tSystem.out.println(\"getListOfId: \"+e.getMessage());\r\n\t\t\treturn new int[0]; \r\n\t\t}\r\n\t\treturn idList;\r\n\t}",
"private HashMap<String, ArrayList<String>> getInstanceIdsPerClientId(TSDBData[] tsdbData) {\n logger.trace(\"BEGIN HashMap<String,ArrayList<String>> getInstanceIdsPerClientId(TSDBData[] tsdbData)\");\n HashMap<String, ArrayList<String>> map = new HashMap<String, ArrayList<String>>();\n for (TSDBData obj : tsdbData) {\n ArrayList<String> columns = obj.getColumns();\n ArrayList<ArrayList<Object>> points = obj.getPoints();\n int clientidIndex = -1;\n int instanceidIndex = -1;\n for (int i = 0; i < columns.size(); i++) {\n if (columns.get(i).equals(\"clientId\"))\n clientidIndex = i;\n else if (columns.get(i).equals(\"instanceId\"))\n instanceidIndex = i;\n }\n for (int i = 0; i < points.size(); i++) {\n String clientId = points.get(i).get(clientidIndex).toString();\n String InstanceId = points.get(i).get(instanceidIndex).toString();\n if (!(map.containsKey(clientId))) {\n map.put(clientId, new ArrayList<String>());\n if (!(map.get(clientId).contains(InstanceId))) {\n map.get(clientId).add(InstanceId);\n }\n } else {\n if (!(map.get(clientId).contains(InstanceId))) {\n map.get(clientId).add(InstanceId);\n }\n\n }\n }\n }\n logger.trace(\"END HashMap<String,ArrayList<String>> getInstanceIdsPerClientId(TSDBData[] tsdbData)\");\n return map;\n }",
"public Collection<UniqueID> getReferenceList() {\n return ObjectGraph.getReferenceList(this.id);\n }",
"public java.util.List<java.lang.Integer>\n getDataList() {\n return java.util.Collections.unmodifiableList(data_);\n }",
"public Set<Integer> getAllIdentifier(ObjectDataOptionsEnum... options) throws PersistenceException {\n Set<Integer> allIdentifier = new ConcurrentSkipListSet<>();\n for(int key : super.getAllKeysInMap(options)) {\n allIdentifier.addAll(super.getAllIdentifiersInKey(key, options));\n }\n return (allIdentifier);\n }",
"@Transient\n @JsonProperty(\"symbols\")\n public List<Long> getSymbolsAsIds() {\n List<Long> ids = new LinkedList<>();\n symbols.stream().map(Symbol::getId).forEach(ids::add);\n return ids;\n }",
"public List<String> getHotels() {\n\t\t// FILL IN CODE\n\t\tlock.lockRead();\n\t\ttry{\n\t\t\tList<String> hotelIds = new ArrayList<>();\n\t\t\tif(hotelIds != null){\n\t\t\t\thotelIds = new ArrayList<String>(hotelMap.keySet());\n\t\t\t}\n\t\t\treturn hotelIds;\n\t\t}\n\t\tfinally{\n\t\t\tlock.unlockRead();\n\t\t}\n\t}",
"List getValues();",
"@Override\n\tpublic Object[] getIds() {\n\t\treturn null;\n\t}",
"public Collection<GlobalIdEntry> getAllEntries();",
"public HashMap<Long, String> getData() {\n\t\treturn data;\n\t}",
"ArrayList<String> getAllDatatypeIds();",
"public List<Integer> getAllUsersGID() {\n\n\t\tList<Integer> result = new ArrayList<Integer>();\n\n\t\ttry {\n\t\t\tjava.sql.PreparedStatement ps = ((org.inria.jdbc.Connection) db).prepareStatement(TCell_QEP_IDs.QEP.EP_getAllUsersGid);\n\t\t\tResultSet rs = ps.executeQuery();\n\t\t\tString query = \"SELECT IdGlobal from USER\";\n\t\t\tSystem.out.println(\"Executing query : \" + query);\t\t\t\n\n\t\t\twhile (rs.next()) {\n\t\t\t\tresult.add(rs.getInt(1));\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\t// Uncomment when the close function will be implemented\n\t\t\t// attemptToClose(ps);\n\t\t\t\n\t\t}\n\n\t\treturn result;\n\n\t}",
"Collection<LocatorIF> getItemIdentifiers();",
"public org.hl7.fhir.Identifier[] getIdentifierArray()\n {\n synchronized (monitor())\n {\n check_orphaned();\n java.util.List targetList = new java.util.ArrayList();\n get_store().find_all_element_users(IDENTIFIER$0, targetList);\n org.hl7.fhir.Identifier[] result = new org.hl7.fhir.Identifier[targetList.size()];\n targetList.toArray(result);\n return result;\n }\n }",
"public Set<Long> allInfoProductIds() {\n return new HashSet<Long>( );\n }",
"public Set<Long> allPlaceIds() {\n return new HashSet<Long>( );\n }",
"public com.google.protobuf.ProtocolStringList\n getDatasetIdsList() {\n return datasetIds_.getUnmodifiableView();\n }",
"public List<String> getListOfIds() {\n return listOfIds;\n }",
"private ArrayList<String> loadIds() {\n\n\t\tArrayList<String> idArray = new ArrayList<String>();\n\t\ttry {\n\t\t\tFileInputStream fileInputStream = context.openFileInput(SAVE_FILE);\n\t\t\tInputStreamReader inputStreamReader = new InputStreamReader(\n\t\t\t\t\tfileInputStream);\n\t\t\tType listType = new TypeToken<ArrayList<String>>() {\n\t\t\t}.getType();\n\t\t\tGsonBuilder builder = new GsonBuilder();\n\t\t\tGson gson = builder.create();\n\t\t\tArrayList<String> list = gson.fromJson(inputStreamReader, listType);\n\t\t\tidArray = list;\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn idArray;\n\t}",
"private ArrayList<String> getItemIDs() {\n\n\t\tArrayList<String> arrayList = new ArrayList<String>();\n\t\t/*\n\t\t * List of item IDs will be retrieved from MainQuery.xml\n\t\t */\n\t\ttry {\n\t\t\tconnection = DBConnectionUtil.getDBConnection();\n\t\t\tpreparedStatement = connection.prepareStatement(QueryUtil.queryByID(CommonConstants.QUERY_ID_GET_ITEM_IDS));\n\t\t\tResultSet resultSet = preparedStatement.executeQuery();\n\t\t\twhile (resultSet.next()) {\n\t\t\t\tarrayList.add(resultSet.getString(CommonConstants.COLUMN_INDEX_ONE));\n\t\t\t}\n\t\t} catch (SQLException | SAXException | IOException | ParserConfigurationException | ClassNotFoundException e) {\n\t\t\tlog.log(Level.SEVERE, e.getMessage());\n\t\t} finally {\n\t\t\t/*\n\t\t\t * Close prepared statement and database connectivity at the end of transaction\n\t\t\t */\n\t\t\ttry {\n\t\t\t\tif (preparedStatement != null) {\n\t\t\t\t\tpreparedStatement.close();\n\t\t\t\t}\n\t\t\t\tif (connection != null) {\n\t\t\t\t\tconnection.close();\n\t\t\t\t}\n\t\t\t} catch (SQLException e) {\n\t\t\t\tlog.log(Level.SEVERE, e.getMessage());\n\t\t\t}\n\t\t}\n\t\treturn arrayList;\n\t}",
"private ArrayList<String> getItemIDs() {\n\n\t\tArrayList<String> arrayList = new ArrayList<String>();\n\t\t/*\n\t\t * List of item IDs will be retrieved from MainQuery.xml\n\t\t */\n\t\ttry {\n\t\t\tconnection = DBConnectionUtil.getDBConnection();\n\t\t\tpreparedStatement = connection.prepareStatement(QueryUtil.queryByID(CommonConstants.QUERY_ID_GET_ITEM_IDS));\n\t\t\tResultSet resultSet = preparedStatement.executeQuery();\n\t\t\twhile (resultSet.next()) {\n\t\t\t\tarrayList.add(resultSet.getString(CommonConstants.COLUMN_INDEX_ONE));\n\t\t\t}\n\t\t} catch (SQLException | SAXException | IOException | ParserConfigurationException | ClassNotFoundException e) {\n\t\t\tlog.log(Level.SEVERE, e.getMessage());\n\t\t} finally {\n\t\t\t/*\n\t\t\t * Close prepared statement and database connectivity at the end of transaction\n\t\t\t */\n\t\t\ttry {\n\t\t\t\tif (preparedStatement != null) {\n\t\t\t\t\tpreparedStatement.close();\n\t\t\t\t}\n\t\t\t\tif (connection != null) {\n\t\t\t\t\tconnection.close();\n\t\t\t\t}\n\t\t\t} catch (SQLException e) {\n\t\t\t\tlog.log(Level.SEVERE, e.getMessage());\n\t\t\t}\n\t\t}\n\t\treturn arrayList;\n\t}",
"public com.google.protobuf.ProtocolStringList\n getDatasetIdsList() {\n return datasetIds_;\n }",
"public List<String> getPlotIds() {\n return Identifiable.getIds(getPlotList());\n }",
"java.util.List<java.lang.Integer> getOtherIdsList();",
"@java.lang.Override\n public java.util.List<java.lang.Long>\n getValueList() {\n return value_;\n }",
"public List<V> values()\r\n\t{\r\n\t\tList<V> values = new ArrayList<V>();\r\n\t\t\r\n\t\tfor(Entry element : data)\r\n\t\t{\r\n\t\t\tvalues.add(element.value);\r\n\t\t}\r\n\t\t\t\t\r\n\t\treturn values;\r\n\t}",
"public List<Long> values() {\n\t\treturn sample.values();\n\t}",
"public List<String> getOIDataFileIds() {\n return Identifiable.getIds(getOIDataFileList());\n }",
"HCollection values();",
"@Override\n public ArrayList<GeoDataRecordObj> getAllGeoData() {\n if(allGeoData == null) {\n this.reloadData();\n }\n return allGeoData;\n }",
"private List<Integer> determineItemIds() {\n List<Integer> ids = null;\n try {\n ids = mDatabaseAccess.itemsDAO().selectAllItemIds();\n } catch (Exception ex) {\n Log.e(TAG, \"A general failure has occurred while trying to determine all item IDs.\",\n ex);\n }\n return ids;\n }",
"public Vector<String> getIdentifiers()\n\t{\n\t\tfinal Vector<String> rets = new Vector<String>();\n\t\trets.add(identifier);\n\t\treturn rets;\n\t}",
"Set<String> getIdentifiers();",
"public String [] _truncatable_ids()\r\n {\r\n return _ids_list;\r\n }",
"public java.util.List<java.lang.Integer>\n getOtherIdsList() {\n return otherIds_;\n }",
"@java.lang.Override\n public java.util.List<java.lang.Long>\n getCellIdList() {\n return cellId_;\n }",
"public Collection values() {\n return map.values();\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}",
"public Map<String, String> getAllIdentifiants(){\n\t\tMap<String, String> allIdentifiants = new HashMap<String, String>();\n\t\ttry {\n\t\t\tallIdentifiants = utilisateurDAO.selectAllIdentifiants();\n\t\t} catch (DALException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn allIdentifiants;\n\t}",
"@Override\n public List<IMapData<Integer, String>> getHashMapData() {\n List<IMapData<Integer, String>> data = new ArrayList<>();\n\n data.add(this.getHashMapData1());\n data.add(this.getHashMapData2());\n\n return data;\n }",
"@JsonIgnore public Collection<Identifier> getFlightNumbers() {\n final Object current = myData.get(\"flightNumber\");\n if (current == null) return Collections.emptyList();\n if (current instanceof Collection) {\n return (Collection<Identifier>) current;\n }\n return Arrays.asList((Identifier) current);\n }",
"@Override\n\tpublic String[] getIds() {\n\t\treturn null;\n\t}",
"public Long[] getQueryIDs(){\n\t\treturn DataStructureUtils.toArray(ids_ranks.keySet(), Long.class);\n\t}",
"public String getIds() {\n return ids;\n }",
"public String getIds() {\n return ids;\n }",
"public ArrayList<String> getStatsIds() {\n\t\tArrayList<String> arr = new ArrayList<String>();\n\t\tNodeList nl = getStats();\n\t\tint len = nl.getLength();\n\t\tString str = \"\";\n\t\tfor (int i = 0; i < len; i++) {\n\t\t\tString id = ParserHelper.requiredAttributeGetter((Element) nl.item(i), \"id\");\n\t\t\tif (id != null) {\n\t\t\t\tarr.add(id);\n\t\t\t\tstr += (id + \"\\n\");\n\t\t\t}\n\t\t}\n\t\treturn arr;\n\t}",
"public ArrayList getAllAccountIds() {\n\t\tConnection dbAccess = DataAccess.getDbAccess();\n\t\tStatement sttmnt;\n\t\tResultSet rs;\n\t\ttry {\n\t\t\tsttmnt = dbAccess.createStatement();\n\t\t\trs = sttmnt.executeQuery(\"SELECT acc_id FROM accounts\");\n\t\t\twhile (rs.next()) {\n\t\t\t\taccountIds.add(rs.getInt(\"acc_id\"));\n\t\t\t}\n\t\t\tdbAccess.close();\n\t\t} catch (SQLException se) {\n\t\t\tse.printStackTrace();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn accountIds;\n\t}",
"public List<Object> getValues();",
"public SparseArray<TexturePackTextureRegion> getIDMapping() {\r\n\t\treturn this.mIDMapping;\r\n\t}",
"public java.util.List<java.lang.Long>\n getCellIdList() {\n return ((bitField0_ & 0x00000001) != 0) ?\n java.util.Collections.unmodifiableList(cellId_) : cellId_;\n }",
"public java.util.List<java.lang.Integer>\n getOtherIdsList() {\n return java.util.Collections.unmodifiableList(otherIds_);\n }",
"private TreeSet<Long> getIds(Connection connection) throws Exception {\n\t\tTreeSet<Long> result = new TreeSet<Long>();\n\t\tPreparedStatement ps = null;\n\t\ttry {\n\t\t\tps = connection\n\t\t\t\t\t.prepareStatement(\"select review_feedback_id from \\\"informix\\\".review_feedback\");\n\t\t\tResultSet rs = ps.executeQuery();\n\t\t\twhile (rs.next()) {\n\t\t\t\tresult.add(rs.getLong(1));\n\t\t\t}\n\t\t} finally {\n\t\t\tps.close();\n\t\t}\n\t\treturn result;\n\t}",
"public List<Identifier> getIdentifiers() {\r\n\r\n if (this.identifiers == null) {\r\n\r\n this.identifiers = new ArrayList<Identifier>();\r\n\r\n }\r\n\r\n return this.identifiers;\r\n\r\n }",
"java.util.List<it.unipr.aotlab.dmat.core.generated.MatrixPieceTripletsBytesWire.Triplet> \n getValuesList();",
"List<String> findAllIds();",
"public List<LatLng> getCoordinates() {\n return getGeometryObject();\n }",
"public int[] getAttributeObjectIDs(){\n\t\treturn _lodNodeData.getAttributeObjectIDs();\n\t}",
"private Set getFeatureIDs (FeatureType ft, Filter filter,\r\n DBAccess osa) throws Exception {\r\n \r\n StringBuffer query = new StringBuffer (\r\n \"SELECT \" + ft.getMasterTable().getIdField());\r\n AbstractSQLBuilder sqlBuilder = new GMLDBSQLBuilder (ft);\r\n \r\n if (filter != null) {\r\n query.append (sqlBuilder.filter2SQL (filter));\r\n } else {\r\n query.append (\" FROM \" + ft.getMasterTable().getTargetName());\r\n }\r\n \r\n java.sql.Connection con = osa.getConnection ();\r\n Statement stmt = con.createStatement ();\r\n ResultSet rs = stmt.executeQuery (query.toString ()); \r\n\r\n TreeSet fIDs = new TreeSet ();\r\n\r\n // extract all affected Feature-IDs (as Strings)\r\n while (rs.next()) {\r\n String fID = rs.getString (1);\r\n fIDs.add (fID);\r\n }\r\n\r\n rs.close ();\r\n stmt.close ();\r\n return fIDs;\r\n }",
"@Override\n public Iterable<Id> depthIdIterable() {\n return idDag.depthIdIterable();\n }",
"public ArrayList<String> getValue() {\n\n\t\tArrayList<String> value = new ArrayList<String>();\n\t\tfor (int row = 0; row < field.getRowCount(); row++) {\n\t\t\tString id = field.getText(row, 1);\n\t\t\tCheckBox cb = (CheckBox) field.getWidget(row, 2);\n\t\t\tif (cb.getValue()) {value.add(id);}\n\t\t}\n\t\treturn value;\n\t}",
"private List<String> getSpectrumIdsFound()\r\n\t{\r\n\t\treturn this.spectrumIdsFound;\r\n\t}",
"public ArrayList<Integer> getGroupMembersIds(int idGroupe) throws RemoteException {\r\n\t\t\t\r\n\t\t\tArrayList<Integer> list = new ArrayList<Integer>();\r\n\t\t\t\r\n\t\t String requete = \"SELECT ga_idEtudiant FROM GroupeAssoc WHERE ga_idGroupe =\" + idGroupe;\r\n\t\t \r\n\t\t System.out.println(\"requete : \" + requete);\r\n\t\t \r\n\t\t DataSet data = database.executeQuery(requete);\r\n\t\t \r\n\t\t while (data.hasMoreElements()) {\r\n\t\t \t\r\n\t\t \tlist.add(Integer.parseInt((data.getColumnValue(\"ga_idEtudiant\"))));\r\n\t\t }\r\n\t\t \r\n\t\t return list;\r\n\t\t}",
"@Override\n public Set<ReferenceIdentifier> getIdentifiers() {\n return Collections.emptySet();\n }",
"public String getIds() {\n return this.ids;\n }",
"io.dstore.values.StringValue getPersonCharacteristicIds();",
"@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 List<String> getSpectrumIdList()\r\n\t{\r\n\t\t/*\r\n\t\t * Return list of spectrum id values.\r\n\t\t */\r\n\t\treturn fetchSpectrumIds();\r\n\t}",
"@Override\n List<Value> values();",
"public abstract ArrayList<Integer> getIdList();",
"protected ArrayList<Integer> getSelectedRowKeys()\n {\n ArrayList<Integer> selectedDataList = new ArrayList<Integer>();\n \n if (m_table.getKeyColumnIndex() == -1) {\n return selectedDataList;\n }\n \n int[] rows = m_table.getSelectedIndices();\n for (int row = 0; row < rows.length; row++) {\n Object data = m_table.getModel().getValueAt(rows[row], m_table.getKeyColumnIndex());\n if (data instanceof IDColumn) {\n IDColumn dataColumn = (IDColumn)data;\n selectedDataList.add(dataColumn.getRecord_ID());\n }\n else {\n log.severe(\"For multiple selection, IDColumn should be key column for selection\");\n }\n }\n \n if (selectedDataList.size() == 0) {\n \tint row = m_table.getSelectedRow();\n \t\tif (row != -1 && m_table.getKeyColumnIndex() != -1) {\n \t\t\tObject data = m_table.getModel().getValueAt(row, m_table.getKeyColumnIndex());\n \t\t\tif (data instanceof IDColumn)\n \t\t\t\tselectedDataList.add(((IDColumn)data).getRecord_ID());\n \t\t\tif (data instanceof Integer)\n \t\t\t\tselectedDataList.add((Integer)data);\n \t\t}\n }\n \n return selectedDataList;\n }",
"@Override\n public Collection<V> values() {\n Collection<V> values = new HashSet<V>(size());\n for (LinkedList<Entry<K,V>> list : table) {\n for (Entry<K,V> entry : list) {\n if (entry != null) {\n values.add(entry.getValue());\n }\n }\n }\n return values;\n }",
"public java.util.List<java.lang.Integer>\n getStateValuesList() {\n return stateValues_;\n }",
"public ArrayList<HashMap<String, String>> getData() {\n\t\treturn this.data;\n\t}",
"@Override\r\n\tpublic Collection<Account> getAccountsHashmap() {\n\t\treturn dataMap.values();\r\n\t}",
"@Override\n public List<Integer> loadAllIds() {\n List<Integer> allCommerceItemIds = new LinkedList<>();\n try {\n allCommerceItemIds = mCommerceAccess.getAllCommerceItemsWithWifi();\n } catch (Exception ex) {\n Log.e(TAG, \"A general failure has occurred while trying to load all item IDs.\",\n ex);\n }\n return allCommerceItemIds;\n }",
"public ArrayList<String> getCourseIds() {\n ArrayList<String> courseIds = new ArrayList<>();\r\n for (int i=0; i < courses.size(); i++) \r\n courseIds.add(courses.get(i).getId());\r\n\r\n return courseIds; \r\n }",
"public java.lang.Object[] getIdsAsArray()\r\n {\r\n return (ids == null) ? null : ids.toArray();\r\n }",
"java.util.List<String>\n getPrimaryKeyNamesList();",
"java.util.List<java.lang.Integer> getStateValuesList();",
"private List<String> getAllPageIdsForUpdate()\n {\n List<String> pageIds = new ArrayList<String>();\n pageIds.add(pageId);\n for (GWikiElement depPageId : getDepObjects()) {\n pageIds.add(depPageId.getElementInfo().getId());\n }\n return pageIds;\n }"
] |
[
"0.69092995",
"0.65028197",
"0.6462982",
"0.6427615",
"0.6345989",
"0.6321608",
"0.6299977",
"0.62922925",
"0.6277267",
"0.6262702",
"0.62179846",
"0.61903995",
"0.6181215",
"0.6132173",
"0.6106961",
"0.60750467",
"0.6067522",
"0.6027023",
"0.60256183",
"0.6011107",
"0.597403",
"0.59706926",
"0.5965496",
"0.59624016",
"0.59530777",
"0.5943371",
"0.5942799",
"0.59260535",
"0.59166163",
"0.59057313",
"0.5904694",
"0.5899621",
"0.5894932",
"0.5894016",
"0.58888054",
"0.5886833",
"0.5880294",
"0.58701646",
"0.5867012",
"0.58446777",
"0.58446777",
"0.5834248",
"0.58259475",
"0.5819765",
"0.58073425",
"0.5791223",
"0.57906365",
"0.5774275",
"0.5768647",
"0.5767561",
"0.5763982",
"0.57470495",
"0.57460076",
"0.57380396",
"0.5732813",
"0.5730595",
"0.57159436",
"0.5712544",
"0.570324",
"0.5700865",
"0.5681794",
"0.5667206",
"0.5664899",
"0.56545633",
"0.56545633",
"0.56520945",
"0.56515515",
"0.56459767",
"0.5618173",
"0.56105286",
"0.56049955",
"0.56013",
"0.5600351",
"0.55781305",
"0.5573472",
"0.5572052",
"0.5557142",
"0.5546209",
"0.5544906",
"0.5541187",
"0.5540282",
"0.5529278",
"0.55183244",
"0.55146503",
"0.55139416",
"0.55113137",
"0.55109525",
"0.5509791",
"0.5505654",
"0.55007476",
"0.54984176",
"0.5497501",
"0.5496418",
"0.548482",
"0.5482898",
"0.54798144",
"0.5479697",
"0.54796576",
"0.54733866",
"0.54710644"
] |
0.55286
|
82
|
Not all posible ids will have a value stored in the GeoData object, so when a call is made to getValue with an id that is not stored a special value is returned to signify that a value for this id is missing. By default that value is set to MISSING, however this behavoir can be changed by calling this method with a new value.
|
public void setMissingValueCode(double mv);
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"@Override\n public int intValue(int numId) {\n return 0;\n }",
"boolean getValueLanguageIdNull();",
"String getValueId();",
"@Override\r\n\tpublic Integer getValue() {\n\t\treturn null;\r\n\t}",
"public Integer getValueId() {\n return valueId;\n }",
"public double getMissingValueCode();",
"@Override\n public double numValue(int numId) {\n return 0;\n }",
"double getValue(int id);",
"boolean getValueCharacteristicIdNull();",
"public Integer getValueId() {\n return this.valueId;\n }",
"public boolean getValueLanguageIdNull() {\n return valueLanguageIdNull_;\n }",
"public boolean getValueLanguageIdNull() {\n return valueLanguageIdNull_;\n }",
"@RdfProperty(\"http://www.coadunation.net/schema/rdf/1.0/base#IdValue\")\n public abstract String getValue();",
"@Override\n\tpublic Map<String, String> get(int id) {\n\t\treturn null;\n\t}",
"Optional<Point> getCoordinate(int id);",
"public boolean getValueCharacteristicIdNull() {\n return valueCharacteristicIdNull_;\n }",
"public boolean getValueCharacteristicIdNull() {\n return valueCharacteristicIdNull_;\n }",
"public interface GeoData{\r\n /**\r\n * Most geodata sets contain features for which there is no data, or the data is missing.<br>\r\n * In these cases a specific value is often used to represent these special cases.<p>\r\n * The static final value MISSING is the default value used by GeoDatas to represent\r\n * these cases.\r\n * @see #setMissingValueCode\r\n * @see #getMissingValueCode\r\n */\r\n public static final double MISSING = Double.NaN;\r\n\r\n\t\t/** \r\n\t\t * All geodata have a type - this is particularly important when\r\n\t\t * interfacing with other data sources/formats.\r\n\t\t * @see #setDataType\r\n\t\t * @see #getDataType\r\n\t\t */\r\n\t\tpublic static final int CHARACTER = 0;\r\n\t\tpublic static final int INTEGER = 1;\r\n\t\tpublic static final int FLOATING = 2;\r\n \r\n /**\r\n * All GeoData objects can have a name associated with them.<br>\r\n * Typicaly the name will match the Column heading from which the data came from.<br>\r\n * Names can be important when the GeoData is used in thematic maps as this is the\r\n * name that will be placed in the key by default.<br>\r\n * @author James Macgill JM\r\n * @return String The name associated with this GeoData.\r\n */\r\n String getName();\r\n /**\r\n * All GeoData objects can have a name associated with them.<br>\r\n * Typicaly the name will match the Column heading from which the data came from.<br>\r\n * Names can be important when the GeoData is used in thematic maps as this is the\r\n * name that will be placed in the key by default.<br>\r\n *\r\n * @author James Macgill JM\r\n * @param name_ The name to be associated with this GeoData.\r\n */\r\n void setName(String name_);\r\n \r\n \r\n /**\r\n * looks up and matches a value to the specifed feature id.<br>\r\n * Used for example by shaders to obtain vaules for thematic mapping.<br>\r\n *\r\n * @author James Macgill JM\r\n * @param id An int specifying the feature id to retreve a value for.\r\n * @return double The value for the specified id, if no id matches the one given then the value specifed by setMissingValue should be returned.\r\n * @see #setMissingValue\r\n */\r\n double getValue(int id);\r\n \r\n /**\r\n * Looks up and retreves a string for the specifed feature id.<br>\r\n * Used for example by the ToolTip feature in Themes to provide tool tip text for each feature.\r\n *\r\n * @author James Macgill JM\r\n * @param id An int specifying the feature to retreve the text for.\r\n * @return String A piece of text for the chosen feature id. If no id matches then an empty string should be returned \" \"\r\n */\r\n String getText(int id);\r\n \r\n /**\r\n * In order to allow systems to iterate through all of the data contained within the GeoData object this\r\n * method provides a list of all of the IDs which have associated values stored.\r\n *\r\n * @author James Macgill JM\r\n * @return Enumeration An enumeration of all of the IDs which can then be iterated through.\r\n */\r\n Enumeration getIds();\r\n \r\n /**\r\n * Not all posible ids will have a value stored in the GeoData object, so when a call is made to getValue with an id that is\r\n * not stored a special value is returned to signify that a value for this id is missing.<br>\r\n * By default that value is set to MISSING, however this behavoir can be changed by calling this method with a new value.<br>\r\n * \r\n * @see #getMissingValueCode\r\n * @author James Macgill JM\r\n * @param mv A double containing the new value to represent missing data.\r\n */\r\n public void setMissingValueCode(double mv);\r\n \r\n /**\r\n * Not all posible ids will have a value stored in the GeoData object, so when a call is made to getValue with an id that is\r\n * not stored a special value is returned to signify that a value for this id is missing.<br>\r\n * A call to this method will return the current code in use to represent that situation.<br>\r\n *\r\n * @see #setMissingValueCode\r\n * @author James Macgill JM\r\n * @return double The current value representing missing data.\r\n */ \r\n public double getMissingValueCode();\r\n \r\n /**\r\n * A quick statistic relating to the values stored in the GeoData object.<br>\r\n * \r\n * @author James Macgill JM\r\n * @return double The largest value currently stored in this GeoData. The missingValueCode is not included in this test.\r\n */\r\n double getMax();\r\n \r\n /**\r\n * A quick statistic relating to the values stored in the GeoData object.<br>\r\n * \r\n * @author James Macgill JM\r\n * @return double The smallest value currently stored in this GeoData. The missingValueCode is not included in this test.\r\n */\r\n double getMin();\r\n \r\n /**\r\n * The total number of stored id/value pairs stored in this GeoData.\r\n * @author James Macgill JM\r\n * @return int The number of values stored in this GeoData.\r\n */\r\n int getSize();\r\n \r\n /**\r\n * The total number of stored values stored in this GeoData which equal the missing value code.\r\n * @author James Macgill JM\r\n * @return int The number of missing values stored in this GeoData.\r\n */\r\n int getMissingCount();\r\n\r\n\t\t/** \r\n\t\t * Gets the type of data stored in the geodata<br>\r\n\t\t * <ul><li>String - GeoData.CHARACTER</li> \r\n\t\t * <li>Integer - GeoData.INTEGER</li>\r\n\t\t * <li>Double - GeoData.FLOATING</li></ul>\r\n\t\t */\r\n\t\t int getDataType();\r\n\t\t/** \r\n\t\t * Sets the type of data stored in the geodata<br>\r\n\t\t * <ul><li>String - GeoData.character</li> \r\n\t\t * <li>Integer - GeoData.integer</li>\r\n\t\t * <li>Double - GeoData.float</li></ul>\r\n\t\t */\r\n\t\t void setDataType(int type );\r\n}",
"@Override\n\tpublic Object getValueAt(int arg0, int arg1) {\n\t\treturn null;\n\t}",
"@Override\n\tpublic Object getValueAt(int arg0, int arg1) {\n\t\treturn null;\n\t}",
"public java.lang.String getValue_id() {\n return value_id;\n }",
"@Override\n\tpublic Object getValue() {\n\t\treturn null;\n\t}",
"@Override\n\tpublic Object getById(Integer id) {\n\t\treturn null;\n\t}",
"@Override\r\n\t\t\tpublic Object getValue() {\n\t\t\t\treturn null;\r\n\t\t\t}",
"public void setVoid_Inventory_ID (int Void_Inventory_ID)\n{\nif (Void_Inventory_ID <= 0) set_Value (\"Void_Inventory_ID\", null);\n else \nset_Value (\"Void_Inventory_ID\", new Integer(Void_Inventory_ID));\n}",
"public static TypedData unknownValue() {\n return UNKNOWN_INSTANCE;\n }",
"public int getUnknownDataValueMode() {\r\n return dataBinder.getUnknownDataValueMode();\r\n }",
"private DataValue getValueForKey(String key) {\n DataValue value = valueMap.get(key);\n if (value == null) {\n return DataValue.NO_VALUE;\n } else {\n return value;\n }\n }",
"@Override\n\t\tpublic Integer getLocationID() {\n\t\t\treturn null;\n\t\t}",
"@Override\n\tpublic boolean hasMissingValue() {\n\t\treturn false;\n\t}",
"@Override\n\tpublic GenericMapInfo get(PK id) {\n\t\treturn null;\n\t}",
"public int getM_Locator_ID() \n{\nInteger ii = (Integer)get_Value(\"M_Locator_ID\");\nif (ii == null) return 0;\nreturn ii.intValue();\n}",
"io.dstore.values.IntegerValueOrBuilder getValueLanguageIdOrBuilder();",
"@Override\n\tpublic Object setPossibleValue() {\n\t\treturn null;\n\t}",
"@Override\n\tpublic double getResult(String id) {\n\t\treturn 0;\n\t}",
"@Override\r\n\t\tpublic long getValue() {\n\t\t\treturn -1;\r\n\t\t}",
"io.dstore.values.IntegerValueOrBuilder getUnitIdOrBuilder();",
"public boolean hasValue() { return false; }",
"@Override\n\tpublic PointVO getPoint(String id) throws Exception {\n\t\treturn null;\n\t}",
"public double getValue(long id) {\n return getValue(\"\" + id);\n }",
"public void setM_Inventory_ID (int M_Inventory_ID)\n{\nif (M_Inventory_ID <= 0) set_Value (\"M_Inventory_ID\", null);\n else \nset_Value (\"M_Inventory_ID\", new Integer(M_Inventory_ID));\n}",
"io.dstore.values.IntegerValue getValueLanguageId();",
"default boolean hasValue() {\n\t\t\treturn getValue() != null;\n\t\t}",
"@Override\n\tpublic T getById(long id) {\n\t\treturn null;\n\t}",
"public boolean hasValueLanguageId() {\n return valueLanguageId_ != null;\n }",
"public void testNonExistanceID() throws Exception {\n\n // check that resolvement fails\n super.checkResolveNonExistanceID();\n\n // occurrence should be null\n assertNull(tag.getOccurrence());\n\n }",
"private Integer getId() { return this.id; }",
"@Override\n\tpublic StockDataRecord get(int id) throws SQLException,\n\t\t\tBusinessObjectException {\n\t\treturn null;\n\t}",
"@Override\n public Object getValue(String key) {\n return null;\n }",
"public Integer getIdLocacion();",
"@Nullable\n public byte[] getValue(MDSKey id) {\n Row row = table.get(id.getKey());\n return row.isEmpty() ? null : row.get(COLUMN);\n }",
"public GeoObject getGeoObject(String _uid)\n {\n return null;\n }",
"@Override\n\tpublic Object getValueAt(int rowIndex, int columnIndex) {\n\t\treturn null;\n\t}",
"String getEmptyId();",
"@Override\n\tpublic Object selectById(Object id) {\n\t\treturn null;\n\t}",
"@Override\n\tpublic Field get(Integer entityID) {\n\t\treturn null;\n\t}",
"@NotNull\n public String getId() {\n return myId;\n }",
"long getNoId();",
"public Object lookup(String id) {\n return null;\n }",
"@Override\n\tpublic Object getEntityId() {\n\t\treturn null;\n\t}",
"@Override\n\tpublic Long getId() {\n\t\treturn null;\n\t}",
"@Override\n\tpublic Long getId() {\n\t\treturn null;\n\t}",
"private static Double getDefaultNoDataValue() {\n\n try {\n final double dNoDataValue = Double.parseDouble(SextanteGUI.getSettingParameterValue(SextanteGeneralSettings.DEFAULT_NO_DATA_VALUE));\n return dNoDataValue;\n }\n catch (final Exception e) {\n return new Double(-99999d);\n }\n\n }",
"@Override\n\tpublic int getField(int id) {\n\t\treturn 0;\n\t}",
"@Override\n\tpublic int getField(int id) {\n\t\treturn 0;\n\t}",
"@Override\n\tpublic int getField(int id) {\n\t\treturn 0;\n\t}",
"public M csolIdNull(){if(this.get(\"csolIdNot\")==null)this.put(\"csolIdNot\", \"\");this.put(\"csolId\", null);return this;}",
"@Override\n public int getField(int id) {\n return 0;\n }",
"public Value get(int valueID) throws DatabaseException\n\t{\n\t\tPreparedStatement stmt = null;\n\t\tResultSet rs = null;\n\t\tValue value = new Value();\n\t\ttry\n\t\t{\n\t\t\tString sql = \"SELECT * FROM \\\"values\\\" WHERE valueID = \" + Integer.toString(valueID);\n\t\t\tstmt = db.getConnection().prepareStatement(sql);\n\t\t\trs = stmt.executeQuery();\n\t\t\twhile(rs.next())\n\t\t\t{\n\t\t\t\tvalue.setValueID(rs.getInt(1));\n\t\t\t\tvalue.setRecordID(rs.getInt(2));\n\t\t\t\tvalue.setFieldID(rs.getInt(3));\n\t\t\t\tvalue.setBatchID(rs.getInt(4));\n\t\t\t\tvalue.setProjectID(rs.getInt(5));\n\t\t\t\tvalue.setData(rs.getString(6));\n\t\t\t}\n\t\t}\n\t\tcatch(SQLException e)\n\t\t{\n\t\t\tthrow new DatabaseException();\n\t\t}\n\t\treturn value;\n\t}",
"@Override\n\tpublic double getId()\n\t{\n\t\treturn id;\n\t}",
"@Override\n\tpublic Integer getId() {\n\t\treturn null;\n\t}",
"@Override\r\n\tpublic Long getId() {\n\t\treturn null;\r\n\t}",
"@Override\n public Revue getById(int id) {\n return null;\n }",
"io.dstore.values.IntegerValue getUnitId();",
"public void testFinditemByIdWithInvalidValues() throws Exception {\n\t\ttry {\r\n\t\t\titemService.findItem(-1);\r\n\t\t\tfail(\"Object with unknonw id should not be found\");\r\n\t\t} catch (ItemNotFoundException e) {\r\n\t\t}\r\n\r\n\t\t// Finds an object with an empty identifier\r\n\t\ttry {\r\n\t\t\titemService.findItem(Long.parseLong(\"0\"));\r\n\t\t\tfail(\"Object with empty id should not be found\");\r\n\t\t} catch (ItemNotFoundException e) {\r\n\t\t}\r\n\r\n\t}",
"public int getVoid_Inventory_ID() \n{\nInteger ii = (Integer)get_Value(\"Void_Inventory_ID\");\nif (ii == null) return 0;\nreturn ii.intValue();\n}",
"@NotNull\n T getValue();",
"@Override\n public boolean equals(Object object) {\n if (!(object instanceof NutritionValue)) {\n return false;\n }\n NutritionValue other = (NutritionValue) object;\n if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {\n return false;\n }\n return true;\n }",
"public Fruit(int id,GpsPoint GpsLocation,int value , Map map)\n\t{\n\t\tthis._id=id;\n\t\tthis._GPS=GpsLocation;\n\t\tthis._value=value;\n\t\t_GPSConvert = new Point3D(GpsLocation.getLon(),GpsLocation.getLat(),GpsLocation.getAlt());\n\t\tthis._PixelLocation = new Pixel(_GPSConvert, map);\n\t\tEatenTime = 0 ;\n\t}",
"public boolean hasValueLanguageId() {\n return valueLanguageIdBuilder_ != null || valueLanguageId_ != null;\n }",
"public JsonElement getResult(Integer id) {\n JsonElement data = resultsMap.get(id);\n if (data != null) {\n resultsMap.remove(id);\n }\n\n return data;\n }",
"@Override\n\tpublic String getValue() {\n\t\treturn null;\n\t}",
"@Override\n\tpublic String getValue() {\n\t\treturn null;\n\t}",
"@Override\n\tpublic String getValue() {\n\t\treturn null;\n\t}",
"protected IExpressionValue possibleVal()throws TableFunctionMalformedException,\r\n\t\t\t\t\t\t\t\t\t\t\t\t SomeStateUndeclaredException {\r\n\r\n\t\tthis.getName();\r\n\t\t\r\n\t\t// Use a list to store already known states or identifiers to evaluate already known values... \r\n//\t\tIExpressionValue ret = new SimpleProbabilityValue(Float.NaN);\r\n\t\tif (this.currentHeader != null) {\r\n\t\t\t// check if this is not a user-defined variable first;\r\n\t\t\tIExpressionValue userDefinedVariableValue = this.currentHeader.getUserDefinedVariable(noCaseChangeValue);\r\n\t\t\tif (userDefinedVariableValue != null) {\r\n\t\t\t\treturn userDefinedVariableValue;\r\n\t\t\t}\r\n\t\t\t// check if this is not another state of current node\r\n\t\t\tfor (TempTableProbabilityCell cell : this.currentHeader.getCellList()) {\r\n\t\t\t\t if (cell.getPossibleValue().getName().equalsIgnoreCase(value) ) {\r\n\t\t\t\t\t // Debug.println(\"\\n => Variable value found: \" + cell.getPossibleValue().getName());\r\n\t\t\t\t\t return cell.getProbability();\r\n\t\t\t\t\t \r\n\t\t\t\t }\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\t// if null, it means it was called before an assignment\r\n\t\t\tthrow new SomeStateUndeclaredException(getNode().toString());\r\n\t\t}\r\n\t\t\r\n\r\n\r\n\t\t// Debug.println(\"An undeclared possible value or a \\\"varsetname\\\" was used : \" + value);\r\n//\t\treturn ret;\r\n\t\treturn null;\r\n\t}",
"int getPokedexIdValue();",
"int getPokedexIdValue();",
"@Override\r\n\tpublic Object getCellEditorValue() {\n\t\treturn null;\r\n\t}",
"@Override\n\t\tpublic Carrera get(int id) {\n\t\t\t\treturn null;\n\t\t}",
"@Override\r\n\tpublic String getValue() {\n\t\treturn null;\r\n\t}",
"@Override\r\n\tpublic String getValue() {\n\t\treturn null;\r\n\t}",
"@Override\r\n\tpublic String getValue() {\n\t\treturn null;\r\n\t}",
"public int getIdFromValue(T value, int roundingFlag) throws IllegalArgumentException {\n if (isNullObjectForm(value))\n return nullId();\n\n int id = getIdFromValueImpl(value, roundingFlag);\n if (id == -1) {\n throw new IllegalArgumentException(\"Value : \" + value + \" not exists\");\n }\n return id;\n }",
"Persistent getResolved(Map id) {\n return resolved.get(id);\n }",
"public abstract Value getValue();",
"com.google.protobuf.Int64ValueOrBuilder getFromIdOrBuilder();",
"com.google.protobuf.Int64Value getFromId();",
"boolean hasValueLanguageId();",
"int getAptitudeId();",
"@Override\n public Optional<ScheduledInterview> get(long id) {\n if (data.containsKey(id)) {\n return Optional.of(data.get(id));\n }\n return Optional.empty();\n }",
"@Updated(version=Version.TEIID_8_12_4)\n String getDefaultValue(Object elementID) throws Exception;"
] |
[
"0.5800275",
"0.576958",
"0.5707962",
"0.5652982",
"0.55976737",
"0.55221826",
"0.55095017",
"0.5466593",
"0.5425186",
"0.5418258",
"0.53892684",
"0.53387225",
"0.52999365",
"0.5281467",
"0.5278302",
"0.52733535",
"0.52534884",
"0.52396643",
"0.523531",
"0.523531",
"0.52296394",
"0.52160245",
"0.5166336",
"0.5158105",
"0.51468307",
"0.51457155",
"0.51350605",
"0.51082975",
"0.5059788",
"0.50429904",
"0.50162244",
"0.5012128",
"0.50101495",
"0.50000054",
"0.4999237",
"0.49988604",
"0.49931845",
"0.4983639",
"0.49662745",
"0.49594238",
"0.49467248",
"0.49446383",
"0.49401695",
"0.49312878",
"0.4928896",
"0.4913521",
"0.48988548",
"0.48983297",
"0.48828852",
"0.48758844",
"0.4874862",
"0.4872263",
"0.48541698",
"0.48532292",
"0.4841462",
"0.48347306",
"0.48286188",
"0.4826925",
"0.4813057",
"0.48117125",
"0.4810224",
"0.4810224",
"0.4804366",
"0.4800592",
"0.4800592",
"0.4800592",
"0.47952294",
"0.47950092",
"0.4794804",
"0.4793196",
"0.4791984",
"0.47905996",
"0.47901314",
"0.47898614",
"0.47866896",
"0.4786021",
"0.47757927",
"0.47726536",
"0.47715023",
"0.47704297",
"0.47635418",
"0.47622332",
"0.47622332",
"0.47622332",
"0.47612092",
"0.47521186",
"0.47521186",
"0.47511324",
"0.47447488",
"0.47426495",
"0.47426495",
"0.47426495",
"0.47421375",
"0.4739012",
"0.4737757",
"0.47334415",
"0.47317097",
"0.4731234",
"0.4723642",
"0.4721099",
"0.47139508"
] |
0.0
|
-1
|
Not all posible ids will have a value stored in the GeoData object, so when a call is made to getValue with an id that is not stored a special value is returned to signify that a value for this id is missing. A call to this method will return the current code in use to represent that situation.
|
public double getMissingValueCode();
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"String getValueId();",
"public Integer getValueId() {\n return valueId;\n }",
"@java.lang.Override\n public long getCodeId() {\n return codeId_;\n }",
"@java.lang.Override\n public long getCodeId() {\n return codeId_;\n }",
"@java.lang.Override\n public long getCodeId() {\n return codeId_;\n }",
"int getCodeValue();",
"@java.lang.Override\n public long getCodeId() {\n return codeId_;\n }",
"@java.lang.Override\n public long getCodeId() {\n return codeId_;\n }",
"@java.lang.Override\n public long getCodeId() {\n return codeId_;\n }",
"Integer getCode();",
"public java.lang.String getValue_id() {\n return value_id;\n }",
"long getCodeId();",
"long getCodeId();",
"long getCodeId();",
"public Integer getValueId() {\n return this.valueId;\n }",
"public Integer getCodeid() {\n return codeid;\n }",
"@Override\r\n\tpublic Serializable getValue() {\n\t\treturn this.code;\r\n}",
"com.google.protobuf.Int32Value getCode();",
"@Override\r\n\tpublic Integer getValue() {\n\t\treturn null;\r\n\t}",
"public Long getCode() {\n return code;\n }",
"public Long getCode() {\n return code;\n }",
"public int getM_Locator_ID() \n{\nInteger ii = (Integer)get_Value(\"M_Locator_ID\");\nif (ii == null) return 0;\nreturn ii.intValue();\n}",
"public int getCode()\n {\n return myCode;\n }",
"io.dstore.values.IntegerValue getValueLanguageId();",
"@Override\r\n\t\tpublic long getValue() {\n\t\t\treturn -1;\r\n\t\t}",
"public int value() {\n return code;\n }",
"@Override\n public String getCode() {\n return null;\n }",
"@Override\n public int intValue(int numId) {\n return 0;\n }",
"public int getCode();",
"public abstract int getValue();",
"public abstract int getValue();",
"public abstract int getValue();",
"boolean getValueLanguageIdNull();",
"@Override\n\tpublic DataDictionaryValueEntity queryDataDictoryValueByCode(\n\t\t\tString termsCode, String valueCode) {\n\t\treturn null;\n\t}",
"@Override\r\n\tpublic Code get(int id) {\n\t\treturn this.getHibernateTemplate().get(Code.class, id);\r\n\t}",
"GameCode getGameCode(Long gameId);",
"io.dstore.values.IntegerValueOrBuilder getValueLanguageIdOrBuilder();",
"public Integer getId()\r\n/* */ {\r\n/* 114 */ return this.id;\r\n/* */ }",
"public int getCode () {\n return code;\n }",
"@Override\r\n\tpublic PostalCodeValue getCode() {\r\n\t\treturn new PostalCodeValue(code.getCode());\r\n\t}",
"public int getCode()\n {\n return code;\n }",
"public Integer getValue();",
"Integer getValue();",
"Integer getValue();",
"public int getCode() {\r\n return code;\r\n }",
"public int getCode() {\r\n return code;\r\n }",
"private DataValue getValueForKey(String key) {\n DataValue value = valueMap.get(key);\n if (value == null) {\n return DataValue.NO_VALUE;\n } else {\n return value;\n }\n }",
"Code getCode();",
"public String getCurrentCellid() {\n String cellidString = null;\n if (this.mTelephonyManager != null) {\n CellLocation mCellLocation = this.mTelephonyManager.getCellLocation();\n if (mCellLocation != null) {\n int type;\n if (mCellLocation instanceof CdmaCellLocation) {\n type = 1;\n Log.e(MessageUtil.TAG, \"getCurrentCellid type type = PHONE_TYPE_CDMA\");\n } else if (mCellLocation instanceof GsmCellLocation) {\n type = 2;\n Log.e(MessageUtil.TAG, \"getCurrentCellid type type = PHONE_TYPE_GSM\");\n } else {\n type = 0;\n }\n int cellid;\n switch (type) {\n case 1:\n Log.e(MessageUtil.TAG, \"getCurrentCellid type is PHONE_TYPE_CDMA\");\n CdmaCellLocation cdmaCellLocation = (CdmaCellLocation) mCellLocation;\n if (cdmaCellLocation != null) {\n int systemid = cdmaCellLocation.getSystemId();\n int networkid = cdmaCellLocation.getNetworkId();\n cellid = cdmaCellLocation.getBaseStationId();\n if (systemid >= 0 && networkid >= 0 && cellid >= 0) {\n cellidString = Integer.toString(systemid) + Integer.toString(networkid) + Integer.toString(cellid);\n Log.e(MessageUtil.TAG, \"getCurrentCellid PHONE_TYPE_CDMA cellidString = \" + cellidString);\n break;\n }\n return null;\n }\n break;\n case 2:\n Log.e(MessageUtil.TAG, \"getCurrentCellid type is PHONE_TYPE_GSM\");\n GsmCellLocation gsmCellLocation = (GsmCellLocation) mCellLocation;\n if (gsmCellLocation != null) {\n String plmn = this.mTelephonyManager.getNetworkOperator();\n cellid = gsmCellLocation.getCid();\n if (plmn != null && cellid >= 0) {\n cellidString = plmn + Integer.toString(cellid);\n Log.e(MessageUtil.TAG, \"getCurrentCellid PHONE_TYPE_GSM cellidString = \" + cellidString);\n break;\n }\n return null;\n }\n break;\n default:\n Log.e(MessageUtil.TAG, \"getCurrentCellid type is error\");\n break;\n }\n }\n return null;\n }\n Log.e(MessageUtil.TAG, \"getCurrentCellid mTelephonyManager == null\");\n return cellidString;\n }",
"public long getCode() {\n return code;\n }",
"public long getCode () {\r\n\t\treturn code;\r\n\t}",
"public abstract long getValue();",
"public abstract long getValue();",
"public String getIdCode() {\n return idCode;\n }",
"public int getCode() {\n return code;\n }",
"public int getCode() {\n return code;\n }",
"public int getCode() {\n return code;\n }",
"public int getCode() {\n return code;\n }",
"public int getCode() {\n return code;\n }",
"@Generated(value = \"com.sun.tools.xjc.Driver\", date = \"2021-08-07T09:44:49+02:00\", comments = \"JAXB RI v2.3.0\")\n public long getGeoCodeId() {\n return geoCodeId;\n }",
"int getMapID();",
"int getMapID();",
"int getMapID();",
"int getMapID();",
"int getMapID();",
"int getMapID();",
"int getMapID();",
"int getMapID();",
"int getMapID();",
"int getMapID();",
"int getMapID();",
"int getMapID();",
"int getMapID();",
"public int getValue();",
"public int getValue();",
"public int getC_Conversion_UOM_ID() \n{\nInteger ii = (Integer)get_Value(\"C_Conversion_UOM_ID\");\nif (ii == null) return 0;\nreturn ii.intValue();\n}",
"public static java.lang.String getRegion(java.lang.String id) { throw new RuntimeException(\"Stub!\"); }",
"int getStoreID(Vector<Integer> storeIDs, Vector<String> storeCodes, String cellValue);",
"public Integer getIdLocacion();",
"public int getId() {\n/* 2402 */ throw new RuntimeException(\"Stub!\");\n/* */ }",
"public int getCode() {\n return code_;\n }",
"public int getCode() {\n return code_;\n }",
"public String getCodeId() {\r\n\t\treturn codeId;\r\n\t}",
"private Integer getId() { return this.id; }",
"public int getVoid_Inventory_ID() \n{\nInteger ii = (Integer)get_Value(\"Void_Inventory_ID\");\nif (ii == null) return 0;\nreturn ii.intValue();\n}",
"public int getC_UOM_ID() \n{\nInteger ii = (Integer)get_Value(\"C_UOM_ID\");\nif (ii == null) return 0;\nreturn ii.intValue();\n}",
"public String getLocationCode() {\n\t\treturn locationCode.get(this.unitID.substring(0, 2));\n\t}",
"public int getCode() {\n\t\treturn this.code;\n\t}",
"public int getUnknownDataValueMode() {\r\n return dataBinder.getUnknownDataValueMode();\r\n }",
"int getCode();",
"int getCode();",
"int getCode();",
"@Override\n\tpublic String getGlCode(final String glCodeId, final Connection connection)\n\t{\n\t\tString glCode = \"null\";\n\t\ttry {\n\t\t\tfinal String query = \"select glcode from chartofaccounts where id= ?\";\n\t\t\tif (LOGGER.isInfoEnabled())\n\t\t\t\tLOGGER.info(\" query \" + query);\n\t\t\tQuery pst = persistenceService.getSession().createSQLQuery(query);\n\t\t\tpst.setString(0, glCodeId);\n\t\t\tList<Object[]> rset = pst.list();\n\t\t\tfor (final Object[] element : rset) {\n\t\t\t\tglCode = element[0].toString();\n\t\t\t\tif (LOGGER.isInfoEnabled())\n\t\t\t\t\tLOGGER.info(\" glCode \" + glCode);\n\t\t\t}\n\t\t\tif (rset == null || rset.size() == 0)\n\t\t\t\tthrow new NullPointerException(\"id not found\");\n\t\t} catch (final HibernateException e) {\n\t\t\tLOGGER.error(\" id not found \" + e.toString(), e);\n\t\t\tthrow new HibernateException(e.toString());\n\t\t}\n\t\treturn glCode;\n\t}",
"@RdfProperty(\"http://www.coadunation.net/schema/rdf/1.0/base#IdValue\")\n public abstract String getValue();",
"io.dstore.values.IntegerValueOrBuilder getValueCharacteristicIdOrBuilder();",
"public int getCode() {\n return code_;\n }",
"public int getCode() {\n return code_;\n }",
"public abstract Object getValue();",
"public abstract Object getValue();",
"public abstract Object getValue();"
] |
[
"0.62848586",
"0.5889217",
"0.5876777",
"0.5876777",
"0.5876777",
"0.58745545",
"0.5843371",
"0.5843371",
"0.5843371",
"0.5833687",
"0.5772872",
"0.57491094",
"0.57491094",
"0.57491094",
"0.57364345",
"0.5730354",
"0.56587213",
"0.56290257",
"0.5623419",
"0.5585037",
"0.5585037",
"0.55641514",
"0.5558693",
"0.55477476",
"0.553858",
"0.55241644",
"0.55176336",
"0.5467423",
"0.54514915",
"0.5438267",
"0.5438267",
"0.5438267",
"0.543641",
"0.5435541",
"0.54325074",
"0.54177725",
"0.54020685",
"0.5391996",
"0.5364696",
"0.53240144",
"0.5317123",
"0.53169763",
"0.5306262",
"0.5306262",
"0.53049445",
"0.53049445",
"0.5296191",
"0.5282376",
"0.5281914",
"0.52701163",
"0.526958",
"0.52603984",
"0.52603984",
"0.5256455",
"0.5253772",
"0.5253772",
"0.5253772",
"0.5253772",
"0.5253772",
"0.52485687",
"0.52292234",
"0.52292234",
"0.52292234",
"0.52292234",
"0.52292234",
"0.52292234",
"0.52292234",
"0.52292234",
"0.52292234",
"0.52292234",
"0.52292234",
"0.52292234",
"0.52292234",
"0.5228169",
"0.5228169",
"0.5204637",
"0.5201732",
"0.5193548",
"0.51925397",
"0.5189294",
"0.51782656",
"0.51782656",
"0.51748604",
"0.51748323",
"0.5171109",
"0.51697356",
"0.51631635",
"0.5159326",
"0.51517624",
"0.514737",
"0.514737",
"0.514737",
"0.5146795",
"0.51376295",
"0.51320654",
"0.5131711",
"0.5131711",
"0.51308906",
"0.51308906",
"0.51308906"
] |
0.6389085
|
0
|
A quick statistic relating to the values stored in the GeoData object.
|
double getMax();
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public interface GeoData{\r\n /**\r\n * Most geodata sets contain features for which there is no data, or the data is missing.<br>\r\n * In these cases a specific value is often used to represent these special cases.<p>\r\n * The static final value MISSING is the default value used by GeoDatas to represent\r\n * these cases.\r\n * @see #setMissingValueCode\r\n * @see #getMissingValueCode\r\n */\r\n public static final double MISSING = Double.NaN;\r\n\r\n\t\t/** \r\n\t\t * All geodata have a type - this is particularly important when\r\n\t\t * interfacing with other data sources/formats.\r\n\t\t * @see #setDataType\r\n\t\t * @see #getDataType\r\n\t\t */\r\n\t\tpublic static final int CHARACTER = 0;\r\n\t\tpublic static final int INTEGER = 1;\r\n\t\tpublic static final int FLOATING = 2;\r\n \r\n /**\r\n * All GeoData objects can have a name associated with them.<br>\r\n * Typicaly the name will match the Column heading from which the data came from.<br>\r\n * Names can be important when the GeoData is used in thematic maps as this is the\r\n * name that will be placed in the key by default.<br>\r\n * @author James Macgill JM\r\n * @return String The name associated with this GeoData.\r\n */\r\n String getName();\r\n /**\r\n * All GeoData objects can have a name associated with them.<br>\r\n * Typicaly the name will match the Column heading from which the data came from.<br>\r\n * Names can be important when the GeoData is used in thematic maps as this is the\r\n * name that will be placed in the key by default.<br>\r\n *\r\n * @author James Macgill JM\r\n * @param name_ The name to be associated with this GeoData.\r\n */\r\n void setName(String name_);\r\n \r\n \r\n /**\r\n * looks up and matches a value to the specifed feature id.<br>\r\n * Used for example by shaders to obtain vaules for thematic mapping.<br>\r\n *\r\n * @author James Macgill JM\r\n * @param id An int specifying the feature id to retreve a value for.\r\n * @return double The value for the specified id, if no id matches the one given then the value specifed by setMissingValue should be returned.\r\n * @see #setMissingValue\r\n */\r\n double getValue(int id);\r\n \r\n /**\r\n * Looks up and retreves a string for the specifed feature id.<br>\r\n * Used for example by the ToolTip feature in Themes to provide tool tip text for each feature.\r\n *\r\n * @author James Macgill JM\r\n * @param id An int specifying the feature to retreve the text for.\r\n * @return String A piece of text for the chosen feature id. If no id matches then an empty string should be returned \" \"\r\n */\r\n String getText(int id);\r\n \r\n /**\r\n * In order to allow systems to iterate through all of the data contained within the GeoData object this\r\n * method provides a list of all of the IDs which have associated values stored.\r\n *\r\n * @author James Macgill JM\r\n * @return Enumeration An enumeration of all of the IDs which can then be iterated through.\r\n */\r\n Enumeration getIds();\r\n \r\n /**\r\n * Not all posible ids will have a value stored in the GeoData object, so when a call is made to getValue with an id that is\r\n * not stored a special value is returned to signify that a value for this id is missing.<br>\r\n * By default that value is set to MISSING, however this behavoir can be changed by calling this method with a new value.<br>\r\n * \r\n * @see #getMissingValueCode\r\n * @author James Macgill JM\r\n * @param mv A double containing the new value to represent missing data.\r\n */\r\n public void setMissingValueCode(double mv);\r\n \r\n /**\r\n * Not all posible ids will have a value stored in the GeoData object, so when a call is made to getValue with an id that is\r\n * not stored a special value is returned to signify that a value for this id is missing.<br>\r\n * A call to this method will return the current code in use to represent that situation.<br>\r\n *\r\n * @see #setMissingValueCode\r\n * @author James Macgill JM\r\n * @return double The current value representing missing data.\r\n */ \r\n public double getMissingValueCode();\r\n \r\n /**\r\n * A quick statistic relating to the values stored in the GeoData object.<br>\r\n * \r\n * @author James Macgill JM\r\n * @return double The largest value currently stored in this GeoData. The missingValueCode is not included in this test.\r\n */\r\n double getMax();\r\n \r\n /**\r\n * A quick statistic relating to the values stored in the GeoData object.<br>\r\n * \r\n * @author James Macgill JM\r\n * @return double The smallest value currently stored in this GeoData. The missingValueCode is not included in this test.\r\n */\r\n double getMin();\r\n \r\n /**\r\n * The total number of stored id/value pairs stored in this GeoData.\r\n * @author James Macgill JM\r\n * @return int The number of values stored in this GeoData.\r\n */\r\n int getSize();\r\n \r\n /**\r\n * The total number of stored values stored in this GeoData which equal the missing value code.\r\n * @author James Macgill JM\r\n * @return int The number of missing values stored in this GeoData.\r\n */\r\n int getMissingCount();\r\n\r\n\t\t/** \r\n\t\t * Gets the type of data stored in the geodata<br>\r\n\t\t * <ul><li>String - GeoData.CHARACTER</li> \r\n\t\t * <li>Integer - GeoData.INTEGER</li>\r\n\t\t * <li>Double - GeoData.FLOATING</li></ul>\r\n\t\t */\r\n\t\t int getDataType();\r\n\t\t/** \r\n\t\t * Sets the type of data stored in the geodata<br>\r\n\t\t * <ul><li>String - GeoData.character</li> \r\n\t\t * <li>Integer - GeoData.integer</li>\r\n\t\t * <li>Double - GeoData.float</li></ul>\r\n\t\t */\r\n\t\t void setDataType(int type );\r\n}",
"Map<String, Object> getStats();",
"public interface GeocodeWsStatisticsMBean {\n\n long getTotalGoodRequests();\n\n long getTotalBadRequests();\n\n long getTotalServedFromCache();\n\n long getTotalServedFromDatabase();\n\n long getTotalPoliticalHits();\n\n long getTotalEezHits();\n\n long getTotalNoResults();\n\n long getWithing5KmHits();\n\n double getAverageResultSize();\n\n void resetStats();\n}",
"public List<Number> getStatistics() {\n return statistics;\n }",
"Stats<Double> stats();",
"boolean hasStatistics();",
"protected abstract String getStatistics();",
"void statistics();",
"public String getStatistics() {\n return \"Bounds = (\" + x1 + \", \" + y1 + \"), (\" + x2 + \", \" + y2 + \")\\n\" +\n \"Number of Nodes = \" + numNodes + \"\\n\";\n }",
"int getMetricValuesCount();",
"public String getStatistics() {\r\n \tString statistics;\r\n \tstatistics=\"Anzahl aller User: \"+ numberOfUsers() + \"\\n\"\r\n \t\t\t+ \"Anzahl aller Hotels: \" + numberOfHotels() + \"\\n\"\r\n \t\t\t+ \"Hotel mit der besten durchschnittlichen Bewertung: \" + bestHotel().getName() + \"\\n\";\r\n \treturn statistics;\r\n }",
"public java.util.Map<String, FieldStats> getStats() {\n if (stats == null) {\n stats = new com.amazonaws.internal.SdkInternalMap<String, FieldStats>();\n }\n return stats;\n }",
"public String stats() { \r\n String stats; \r\n stats = getWins() + \" wins, \" + getLosses() + \" losses, \" \r\n + getSaves() + \" saves, \" + getEra() + \" ERA\"; \r\n return stats;\r\n }",
"public Stats2D statistics() {\n Stats2D stats = new Stats2D(data.values);\n stats.run();\n return stats;\n }",
"private int infoCount() {\n return data.size();\n }",
"public long getNumDefinedData();",
"public double geoMean() {\n\t\tint product = 1;\n\t\tfor (Animal a : animals) {\n\t\t\tproduct *= a.getSize();\n\t\t}\n\t\treturn Math.pow(product, 1.0 / animals.size());\n\t}",
"Map<String, Double> getStatus();",
"public int getValueCount() {\n return value_.size();\n }",
"private final Map<String, String> memoryStats() {\n HashMap<String, String> map = new HashMap<String, String>();\r\n map.put(\"tableIndexChunkSize\", (!RAMIndex) ? \"0\" : Integer.toString(index.row().objectsize));\r\n map.put(\"tableIndexCount\", (!RAMIndex) ? \"0\" : Integer.toString(index.size()));\r\n map.put(\"tableIndexMem\", (!RAMIndex) ? \"0\" : Integer.toString((int) (index.row().objectsize * index.size() * kelondroRowCollection.growfactor)));\r\n return map;\r\n }",
"int getDataCount();",
"int getDataCount();",
"int getDataCount();",
"int getDataCount();",
"int getDataCount();",
"public int getPlaceGeoData() {\n return mPlaceGeoData;\n }",
"public int getValueCount() {\n return value_.size();\n }",
"public List<StatsObject> getData() {\n\t\tList<StatsObject> stats = new ArrayList<StatsObject>(data.values());\n\t\treturn stats;\n\n\t}",
"int getFeatureCount();",
"public double regionValue(){\n return counter.regionValue();\n }",
"public java.util.Map<java.lang.String, java.lang.Double> ois()\n\t{\n\t\treturn _ois;\n\t}",
"public int getDataCount() {\n return data_.size();\n }",
"public double[] getHitGeoCoord();",
"public String getPointsData() {\n\t\t\tStringBuilder pointsString = new StringBuilder(\"[\");\n\n\t\t\ttry {\n\t\t\t\tCursor pointsCursor = dbHandler\n\t\t\t\t\t\t.getEveryLatLong(Main.logged_user);\n\n\t\t\t\tif (pointsCursor != null) {\n\n\t\t\t\t\tif (pointsCursor.moveToFirst()) {\n\t\t\t\t\t\twhile (!pointsCursor.isAfterLast()) {\n\t\t\t\t\t\t\tpointsString.append(String.format(GOOGLE_MAP_POINT,\n\t\t\t\t\t\t\t\t\tpointsCursor.getDouble(LATITUDE),\n\t\t\t\t\t\t\t\t\tpointsCursor.getDouble(LONGITUDE)));\n\n\t\t\t\t\t\t\tpointsCursor.moveToNext();\n\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tpointsCursor.close();\n\t\t\t\t}\n\t\t\t} catch (Exception ex) {\n\t\t\t\tLog.e(LOG_TAB, ex.getMessage());\n\t\t\t\tpointsString.append(\"ERROR_\");\n\t\t\t}\n\n\t\t\tif(pointsString.length() > GOOGLE_MAP_POINT.length())\n\t\t\t\treturn pointsString.substring(0, pointsString.length() - 1) + \"]\";\n\t\t\telse\n\t\t\t\treturn \"NODATA\";\n\t\t}",
"public void statistics(){\n // calculate N\n for (int k=0 ; k<K ; ++k){\n N[k] = 0.0;\n for (int n=0 ; n<X.getN() ; ++n){\n SuperVoxel sv =X.get(n);\n N[k] = N[k] + sv.getVoxels().length*r.getEntry(n, k);\n }\n N[k] = N[k] + .000001;\n }\n\n \n // calculate xBar\n for (int k=0 ; k<K ; ++k){\n xBar[k].set(0.0);\n for (int n=0 ; n<X.getN() ; ++n){\n SuperVoxel sv = X.get(n);\n double rnk = r.getEntry(n, k);\n RealVector x = sv.getCenter().mapMultiply(rnk*sv.getVoxels().length);\n xBar[k] = xBar[k].add(x);\n }\n xBar[k].mapDivideToSelf(N[k]);\n } \n \n // calculate the S\n for (int k=0 ; k<K ; ++k){\n for (int row=0 ; row<X.getD() ; ++row){\n for (int col=0 ; col<X.getD() ; ++col){\n S[k].setEntry(row, col, 0.0);\n }\n }\n for (int n=0 ; n<X.getN() ; ++n){\n SuperVoxel sv = X.get(n);\n for (RealVector vox : sv.getVoxels()){\n RealVector del = vox.subtract(xBar[k]); \n S[k] = S[k].add(del.outerProduct(del).scalarMultiply(r.getEntry(n, k))); \n }\n }\n S[k] = S[k].scalarMultiply(1.0/N[k]);\n }\n }",
"public int total_maps() {\r\n\t\tcheck( 1 );\r\n\r\n\t\treturn total_maps;\r\n\t}",
"public HashMap<String, Double> getStats() {\n return playerStats; // stub\n }",
"public double getPopulation () { return n.getPopulation(); }",
"int getValuesCount();",
"@Override\n public int size() {\n int count = 0;\n for (Counter c : map.values())\n count += c.value();\n return count;\n }",
"int getStatsCount();",
"int getStatsCount();",
"int getStatsCount();",
"private static void reportStatistics() {\n SmartDashboard.putNumber(\"Speed value\", speed);\n SmartDashboard.putNumber(\"Desired RPM\", kVelocitySetpoint);\n SmartDashboard.putNumber(\"Error\", error);\n SmartDashboard.putNumber(\"ErrorSum\", errorSum);\n SmartDashboard.putNumber(\"Flywheel Velocity (Master)\", -flywheelMaster.getSelectedSensorVelocity());\n\n if(d >= kMinThreePoint && d <= kMaxThreePoint) { //If we are in the range for a 3-point shot\n threePointDistanceEntry.setBoolean(true); //Alert operator\n } else { //If we are not in the range for a 3-point shot\n threePointDistanceEntry.setBoolean(false); //Alert operator\n }\n\n if(d >= kMinViableRange && d <= kMaxViableRange) { //If we are in the viable range for any power port shot\n viableDistanceEntry.setBoolean(true); //Alert operator\n } else { //If we cannot make a shot into the power port\n viableDistanceEntry.setBoolean(false); //Alert operator\n }\n }",
"Integer getDataLgth();",
"@Dump(compound = true)\n public BwGeo getGeo() {\n return geo;\n }",
"public int getDataCount() {\n return data_.size();\n }",
"public int getDataCount() {\n return data_.size();\n }",
"public int getDataCount() {\n return data_.size();\n }",
"public int getDataCount() {\n return data_.size();\n }",
"public int getDataCount() {\n return data_.size();\n }",
"public String getLogisticsDistance() {\n return logisticsDistance;\n }",
"public int getStatsCount() {\n return stats_.size();\n }",
"@Override\n\t@Transactional(propagation = Propagation.REQUIRED)\n\tpublic String stats(QualityQuery data) throws Exception {\n\t\treturn metaDataFetchService.stats(data);\n\t}",
"@Override\r\n\tpublic double getStoredGazeScore() {\n\t\treturn this.gazeScore;\r\n\t}",
"public HashMap<String, String> getAIStatistics() {\n HashMap<String, String> stats = new HashMap<String, String>();\n HashMap<String, Long> objStats = new HashMap<String, Long>();\n Iterator<AIObject> iter = aiObjects.values().iterator();\n while (iter.hasNext()) {\n AIObject obj = iter.next();\n String className = obj.getClass().getSimpleName();\n if (objStats.containsKey(className)) {\n Long count = objStats.get(className);\n count++;\n objStats.put(className, count);\n } else {\n Long count = new Long(1);\n objStats.put(className, count);\n }\n }\n for (String k : objStats.keySet()) {\n stats.put(k, Long.toString(objStats.get(k)));\n }\n \n return stats;\n }",
"public int getPointsHealthy()\n {\n return pointsHealthy;\n }",
"int getStatMetadataCount();",
"public void stats() {\n\t\tSystem.out.println(\"Hash Table Stats\");\n\t\tSystem.out.println(\"=================\");\n\t\tSystem.out.println(\"Number of Entries: \" + numEntries);\n\t\tSystem.out.println(\"Number of Buckets: \" + myBuckets.size());\n\t\tSystem.out.println(\"Histogram of Bucket Sizes: \" + histogram());\n\t\tSystem.out.printf(\"Fill Percentage: %.5f%%\\n\", fillPercent());\n\t\tSystem.out.printf(\"Average Non-Empty Bucket: %.7f\\n\\n\", avgNonEmpty());\t\t\n\t}",
"int getFeatureValue();",
"@Override\n public Map<String, Float> getBasicNutrients() {\n return basicNutrients;\n }",
"public Map<String, Integer> getDataMap() {\n\t\tMap<String, Integer> dataMap = new HashMap<>();\n\t\tdataMap.putAll(temperature.getDataMap());\n\t\tdataMap.putAll(wind.getDataMap());\n\t\tdataMap.putAll(precipitation.getDataMap());\n\t\tdataMap.putAll(condition.getDataMap());\n\t\tdataMap.putAll(hazard.getDataMap());\n\t\tdataMap.putAll(wave.getDataMap());\n\t\t\n\t\treturn dataMap;\n\t}",
"public int getDataCount() {\n return data_.size();\n }",
"public int getDataCount() {\n return data_.size();\n }",
"public abstract Double getDataValue();",
"Map<String, Number> toStatsMap() {\n long s = successes.get();\n long r = responseTimes.get();\n long avg = s <= 0 ? -1 : r / s;\n\n Map<String, Number> stats = new HashMap<String, Number>();\n stats.put(\"successes\", (int) s);\n stats.put(\"averageResponseTime\", avg);\n stats.put(\"httpFailures\", httpFailures.get());\n stats.put(\"readTimeouts\", readTimeouts.get());\n stats.put(\"connectTimeouts\", connectTimeouts.get());\n stats.put(\"socketErrors\", socketErrors.get());\n stats.put(\"emptyResults\", emptyResults.get());\n return stats;\n }",
"public String summaryStats() {\n\t\treturn new StringBuilder()\n\t\t\t\t.append(\"Documents: \"+countCorpusDocuments()+\", \")\n\t\t\t\t.append(\"Terms: \"+countCorpusTerms()+\", \")\n\t\t\t\t.append(\"Unique terms: \"+countUniqueTerms()).toString();\n\t}",
"private static void displayStat() {\n Collection<Zone> zones = Universe.getInstance().getCarte().getCarte().values();\r\n System.out.println(\"Nb de personnes créées : \" + Universe.getInstance().getCarte().getPopulation().size());\r\n\r\n\r\n System.out.println(\"Nb de personnes créées en mer : \" + getPopulationByTile(Zone.Tile.SEA));\r\n System.out.println(\"Nb de personnes créées en plaine : \" + getPopulationByTile(Zone.Tile.EARTH));\r\n System.out.println(\"Nb de personnes créées en foret : \" + getPopulationByTile(Zone.Tile.FOREST));\r\n System.out.println(\"Nb de personnes créées en ville : \" + getPopulationByTile(Zone.Tile.TOWN));\r\n\r\n System.out.println(\"---------------\");\r\n\r\n System.out.println(\"Surface mer : \" + getSurfaceByTile(zones, Zone.Tile.SEA));\r\n System.out.println(\"Surface plaine : \" + getSurfaceByTile(zones, Zone.Tile.EARTH));\r\n System.out.println(\"Surface foret : \" + getSurfaceByTile(zones, Zone.Tile.FOREST));\r\n System.out.println(\"Surface ville : \" + getSurfaceByTile(zones, Zone.Tile.TOWN));\r\n\r\n System.out.println(\"---------------\");\r\n\r\n System.out.println(\"Densité mer : \" + new Double(getPopulationByTile(Zone.Tile.SEA) / getSurfaceByTile(zones, Zone.Tile.SEA)));\r\n System.out.println(\"Densité plaine : \" + new Double(getPopulationByTile(Zone.Tile.EARTH)) / new Double(getSurfaceByTile(zones, Zone.Tile.EARTH)));\r\n System.out.println(\"Densité foret : \" + new Double(getPopulationByTile(Zone.Tile.FOREST)) / new Double(getSurfaceByTile(zones, Zone.Tile.FOREST)));\r\n System.out.println(\"Densité ville : \" + new Double(getPopulationByTile(Zone.Tile.TOWN)) / new Double(getSurfaceByTile(zones, Zone.Tile.TOWN)));\r\n\r\n System.out.println(\"---------------\");\r\n System.out.println(\"Surface mer deserte : \" +zones.stream().filter(z-> z.getTile().equals(Zone.Tile.SEA) && CollectionUtils.isEmpty(z.getHabitants())).collect(Collectors.toList()).size());\r\n System.out.println(\"Surface plaine deserte : \" +zones.stream().filter(z-> z.getTile().equals(Zone.Tile.EARTH) && CollectionUtils.isEmpty(z.getHabitants())).collect(Collectors.toList()).size());\r\n System.out.println(\"Surface foret deserte: \" +zones.stream().filter(z-> z.getTile().equals(Zone.Tile.FOREST) && CollectionUtils.isEmpty(z.getHabitants())).collect(Collectors.toList()).size());\r\n System.out.println(\"Surface ville deserte: \" +zones.stream().filter(z-> z.getTile().equals(Zone.Tile.TOWN) && CollectionUtils.isEmpty(z.getHabitants())).collect(Collectors.toList()).size());\r\n System.out.println(\"---------------\");\r\n\r\n System.out.println(\"Surface mer habitée : \" +zones.stream().filter(z-> z.getTile().equals(Zone.Tile.SEA) && CollectionUtils.isNotEmpty(z.getHabitants())).collect(Collectors.toList()).size());\r\n System.out.println(\"Surface plaine habitée : \" +zones.stream().filter(z-> z.getTile().equals(Zone.Tile.EARTH) && CollectionUtils.isNotEmpty(z.getHabitants())).collect(Collectors.toList()).size());\r\n System.out.println(\"Surface foret habitée: \" +zones.stream().filter(z-> z.getTile().equals(Zone.Tile.FOREST) && CollectionUtils.isNotEmpty(z.getHabitants())).collect(Collectors.toList()).size());\r\n System.out.println(\"Surface ville habitée: \" +zones.stream().filter(z-> z.getTile().equals(Zone.Tile.TOWN) && CollectionUtils.isNotEmpty(z.getHabitants())).collect(Collectors.toList()).size());\r\n }",
"int getPointsCount();",
"@Override\r\n\tpublic int dataCount(Map<String, Object> map) {\n\t\treturn 0;\r\n\t}",
"private void getPoints()\n\t{\n\t\ttotalEntered = statsCollector.getTotalEnteredPoints();\n\t\taverageWait = statsCollector.getAverageWaitPoints();\n\t\tmaxWait = statsCollector.getMaxWaitPoints();\n\t\ttimeAlive = statsCollector.getTimeAlivePoints();\n\t}",
"String getSensorDataPoint();",
"int getStateValuesCount();",
"int getLocationsCount();",
"public void logDictionaryStatistics() {\n LOGGER.info(\"uriToIdDictionary: \" + uriToIdDictionary.size());\n LOGGER.info(\"uris: \" + uris.size());\n LOGGER.info(\"superClassDictionary: \" + superClassDictionary.size());\n LOGGER.info(\"subClassOfDictionary: \" + subClassOfDictionary.size());\n LOGGER.info(\"typeDictionary: \" + typeDictionary.size());\n LOGGER.info(\"instanceDictionary: \" + instanceDictionary.size());\n LOGGER.info(\"disjointWithDictionary: \" + disjointWithDictionary.size());\n }",
"private double computeInfoGain(Instances data)\n throws Exception {\n\n double infoGain = computeEntropy(data);\n Instances[] splitData = m_localModel.split(data);\n for (int j = 0; j < m_localModel.numSubsets(); j++) {\n if (splitData[j].numInstances() > 0) {\n infoGain -= ((double) splitData[j].numInstances() /\n (double) data.numInstances()) *\n computeEntropy(splitData[j]);\n }\n }\n return infoGain;\n }",
"public String getStatistics() throws IOException{\n initiateWordCount();\n getHamStatistics(); \n getSpamStatistics();\n return printStatistics(); \n }",
"public interface GeoInterface {\n\t// infinity value\n\tstatic final double INF = Double.MAX_VALUE;\n\t// small number (less than this is consider as zero)\n\tstatic final double SMALL_NUM = 0.0001;\n\t\t\n\t// perimeter of the maximum area this application covers (map area)\n\t// grid/space dimensions\t\t //# Dataset\t\t\t\t\t//# Query \t\n\tfinal static double MIN_X = 52.0; // MinX: 52.99205499607079 // Min X: 375.7452259303738\n\tfinal static double MIN_Y = -21.0; // MinY: -20.08557496216634 // Min Y: 16.319751123918174\n\tfinal static double MAX_X = 717.0; // MaxX: 716.4193496072005 // Max X: 576.9230902330686\n\tfinal static double MAX_Y = 396.0; // MaxY: 395.5344310979076 // Max Y: 234.80924053063617\n\t\n\t// Earth radius (average) in meters\n\tstatic final int EARTH_RADIUS = 6371000;\n\t\n\t// pi\n\tstatic final double PI = Math.PI;\n}",
"public int getPoints()\n {\n return (10000 - this.points);\n }",
"private Double calculateTotalFitness() {\n double totalFitnessScore = 0;\n\n IgniteCache<Long, Chromosome> cache = ignite.cache(GAGridConstants.POPULATION_CACHE);\n\n SqlFieldsQuery sql = new SqlFieldsQuery(\"select SUM(FITNESSSCORE) from Chromosome\");\n\n // Iterate over the result set.\n try (QueryCursor<List<?>> cursor = cache.query(sql)) {\n for (List<?> row : cursor)\n totalFitnessScore = (Double)row.get(0);\n }\n\n return totalFitnessScore;\n }",
"java.util.List<org.tensorflow.proto.profiler.XStat> \n getStatsList();",
"public double getAStat() {\n\t\treturn aStatM;\n\t}",
"int getGeoTargetConstantsCount();",
"public Integer sizeOfMap() {\n\t\tMap<String, String> simpleMap = createSimpleMap(\"Key\", \"Value\");\n numberOfEntries = 10;\n\t\treturn simpleMap.size();\n\t}",
"public Stats getStats() {\n if (this.stats == null) {\n this.stats = (Stats) JavaScriptObject.createObject();\n }\n return this.stats;\n }",
"int getInfoCount();",
"int getInfoCount();",
"int getInfoCount();",
"public String stats()\n\t{\n\t\tString algo = null;//set up algo return null if error\n\t\tswitch (sortingAlgorithm) {\n\t\tcase SelectionSort:\n\t\t\talgo = \"SelectionSort\";\n\t\t\tbreak;\n\t\tcase InsertionSort:\n\t\t\talgo = \"InsertionSort\";\n\t\t\tbreak;\n\t\tcase MergeSort:\n\t\t\talgo = \"MergeSort\";\n\t\t\tbreak;\n\t\tcase QuickSort:\n\t\t\talgo = \"QuickSort\";\n\t\t\tbreak;\n\t\t}\n\t\treturn algo + \"\\t\" + points.length + \"\\t\" + scanTime; \n\t}",
"public int getInfoCount() {\n return info_.size();\n }",
"public List<Double> getData() {\n return data;\n }",
"void dumpStats() {\n long wallTimeNanos = totalStopwatch.elapsed(TimeUnit.NANOSECONDS);\n long dbtime = 0;\n for (String name : methodCalls.keySet()) {\n long calls = methodCalls.get(name);\n long time = methodTotalTime.get(name);\n dbtime += time;\n long average = time / calls;\n double proportion = (time + 0.0) / (wallTimeNanos + 0.0);\n log.info(name + \" c:\" + calls + \" r:\" + time + \" a:\" + average + \" p:\" + String.format(\"%.2f\", proportion));\n }\n double dbproportion = (dbtime + 0.0) / (wallTimeNanos + 0.0);\n double hitrate = (hit + 0.0) / (hit + miss + 0.0);\n log.info(\"Cache size:\" + utxoCache.size() + \" hit:\" + hit + \" miss:\" + miss + \" rate:\"\n + String.format(\"%.2f\", hitrate));\n bloom.printStat();\n log.info(\"hasTxOut call:\" + hasCall + \" True:\" + hasTrue + \" False:\" + hasFalse);\n log.info(\"Wall:\" + totalStopwatch + \" percent:\" + String.format(\"%.2f\", dbproportion));\n String stats = db.getProperty(\"leveldb.stats\");\n System.out.println(stats);\n\n }",
"public Integer getStat() {\r\n return stat;\r\n }",
"public double getAllocatedValue()\r\n\t{\r\n\t\tint numberOfAllocatedRecords = 0;\r\n\t\tfor(int i = 0; i < _actuallyAllocatedTuples.size(); ++i)\r\n\t\t\tnumberOfAllocatedRecords += _actuallyAllocatedTuples.get(i);\r\n\t\t\r\n\t\treturn numberOfAllocatedRecords * this.getValue();\r\n\t}",
"public void testStatistics(){\n Profile profile = new Profile(\"id1\");\n GeoLocation uni_loc = new GeoLocation(0.0, 0.0);\n ArrayList<Trial> trials = new ArrayList<>();\n\n for (int i=1; i<101; i++){\n TrialIntCount trial = new TrialIntCount(\"\"+i, uni_loc, profile, 0);\n if (i<40 && i%2==0){\n trial.setCount(i);\n\n trials.add(trial);\n } else if (i>= 40 && i<80 && i%3==0){\n trial.setCount(i);\n\n trials.add(trial);\n } else if ( i >= 80 && i%5==0) {\n trial.setCount(i);\n TrialIntCount trial2 = new TrialIntCount(\"1\"+i, uni_loc, profile, 0);\n trial2.setCount(i);\n\n trials.add(trial);\n trials.add(trial2);\n }\n }\n\n this.exp = new Experiment(\"foo\");\n this.exp.addTrials(trials);\n\n assertEquals(\"removeDupes does not work\", 37, this.exp.removeDupes().length);\n assertEquals(\"frequencies does not work\", 15, exp.frequencies().length);\n assertEquals(\"median does not work\", \"46.5\", exp.getMedian());\n assertEquals(\"Q1 does not work\", \"23.00\", exp.getQ1());\n assertEquals(\"Q3 does not work\", \"76.50\", exp.getQ3());\n assertEquals(\"std does not work\", \"30.39\", exp.getStd());\n assertEquals(\"mean does not work\", \"49.05\", exp.getMean());\n\n }",
"public double getOblateness() {\n return oblateness;\n }",
"public int getStat() {\n return statUse.getNumerator();\n }",
"double getValue();",
"double getValue();",
"double getValue();",
"java.util.Map<java.lang.Long, org.tensorflow.proto.profiler.XStatMetadata>\n getStatMetadataMap();"
] |
[
"0.6189141",
"0.617789",
"0.5876402",
"0.5844644",
"0.5824578",
"0.5820447",
"0.5783202",
"0.5775424",
"0.574471",
"0.5700324",
"0.5651897",
"0.556801",
"0.5567175",
"0.5555531",
"0.55264294",
"0.5482506",
"0.5457636",
"0.5451798",
"0.54389673",
"0.54233974",
"0.54070836",
"0.54070836",
"0.54070836",
"0.54070836",
"0.54070836",
"0.53985643",
"0.53958946",
"0.5379627",
"0.5377487",
"0.5375884",
"0.53722507",
"0.5364279",
"0.5361028",
"0.53554535",
"0.53540915",
"0.5341402",
"0.53334004",
"0.533139",
"0.5325658",
"0.53170574",
"0.5315314",
"0.5315314",
"0.5315314",
"0.5308829",
"0.5302026",
"0.5299979",
"0.52902424",
"0.52902424",
"0.52902424",
"0.52902424",
"0.52902424",
"0.5285628",
"0.52815646",
"0.5274749",
"0.52683264",
"0.5253773",
"0.52437806",
"0.523996",
"0.5218894",
"0.5216329",
"0.5211888",
"0.51988316",
"0.51969945",
"0.51969945",
"0.51869076",
"0.51808983",
"0.51793045",
"0.51762915",
"0.51732886",
"0.5170932",
"0.5164771",
"0.5153939",
"0.5151703",
"0.51391006",
"0.5134853",
"0.5129818",
"0.5123597",
"0.5122847",
"0.51121384",
"0.51119",
"0.5111131",
"0.5104031",
"0.51031417",
"0.5098353",
"0.50959",
"0.5091648",
"0.5091648",
"0.5091648",
"0.5090374",
"0.50866836",
"0.50847244",
"0.50845015",
"0.5079998",
"0.5076157",
"0.5073771",
"0.50701374",
"0.50683856",
"0.50679046",
"0.50679046",
"0.50679046",
"0.5067715"
] |
0.0
|
-1
|
A quick statistic relating to the values stored in the GeoData object.
|
double getMin();
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public interface GeoData{\r\n /**\r\n * Most geodata sets contain features for which there is no data, or the data is missing.<br>\r\n * In these cases a specific value is often used to represent these special cases.<p>\r\n * The static final value MISSING is the default value used by GeoDatas to represent\r\n * these cases.\r\n * @see #setMissingValueCode\r\n * @see #getMissingValueCode\r\n */\r\n public static final double MISSING = Double.NaN;\r\n\r\n\t\t/** \r\n\t\t * All geodata have a type - this is particularly important when\r\n\t\t * interfacing with other data sources/formats.\r\n\t\t * @see #setDataType\r\n\t\t * @see #getDataType\r\n\t\t */\r\n\t\tpublic static final int CHARACTER = 0;\r\n\t\tpublic static final int INTEGER = 1;\r\n\t\tpublic static final int FLOATING = 2;\r\n \r\n /**\r\n * All GeoData objects can have a name associated with them.<br>\r\n * Typicaly the name will match the Column heading from which the data came from.<br>\r\n * Names can be important when the GeoData is used in thematic maps as this is the\r\n * name that will be placed in the key by default.<br>\r\n * @author James Macgill JM\r\n * @return String The name associated with this GeoData.\r\n */\r\n String getName();\r\n /**\r\n * All GeoData objects can have a name associated with them.<br>\r\n * Typicaly the name will match the Column heading from which the data came from.<br>\r\n * Names can be important when the GeoData is used in thematic maps as this is the\r\n * name that will be placed in the key by default.<br>\r\n *\r\n * @author James Macgill JM\r\n * @param name_ The name to be associated with this GeoData.\r\n */\r\n void setName(String name_);\r\n \r\n \r\n /**\r\n * looks up and matches a value to the specifed feature id.<br>\r\n * Used for example by shaders to obtain vaules for thematic mapping.<br>\r\n *\r\n * @author James Macgill JM\r\n * @param id An int specifying the feature id to retreve a value for.\r\n * @return double The value for the specified id, if no id matches the one given then the value specifed by setMissingValue should be returned.\r\n * @see #setMissingValue\r\n */\r\n double getValue(int id);\r\n \r\n /**\r\n * Looks up and retreves a string for the specifed feature id.<br>\r\n * Used for example by the ToolTip feature in Themes to provide tool tip text for each feature.\r\n *\r\n * @author James Macgill JM\r\n * @param id An int specifying the feature to retreve the text for.\r\n * @return String A piece of text for the chosen feature id. If no id matches then an empty string should be returned \" \"\r\n */\r\n String getText(int id);\r\n \r\n /**\r\n * In order to allow systems to iterate through all of the data contained within the GeoData object this\r\n * method provides a list of all of the IDs which have associated values stored.\r\n *\r\n * @author James Macgill JM\r\n * @return Enumeration An enumeration of all of the IDs which can then be iterated through.\r\n */\r\n Enumeration getIds();\r\n \r\n /**\r\n * Not all posible ids will have a value stored in the GeoData object, so when a call is made to getValue with an id that is\r\n * not stored a special value is returned to signify that a value for this id is missing.<br>\r\n * By default that value is set to MISSING, however this behavoir can be changed by calling this method with a new value.<br>\r\n * \r\n * @see #getMissingValueCode\r\n * @author James Macgill JM\r\n * @param mv A double containing the new value to represent missing data.\r\n */\r\n public void setMissingValueCode(double mv);\r\n \r\n /**\r\n * Not all posible ids will have a value stored in the GeoData object, so when a call is made to getValue with an id that is\r\n * not stored a special value is returned to signify that a value for this id is missing.<br>\r\n * A call to this method will return the current code in use to represent that situation.<br>\r\n *\r\n * @see #setMissingValueCode\r\n * @author James Macgill JM\r\n * @return double The current value representing missing data.\r\n */ \r\n public double getMissingValueCode();\r\n \r\n /**\r\n * A quick statistic relating to the values stored in the GeoData object.<br>\r\n * \r\n * @author James Macgill JM\r\n * @return double The largest value currently stored in this GeoData. The missingValueCode is not included in this test.\r\n */\r\n double getMax();\r\n \r\n /**\r\n * A quick statistic relating to the values stored in the GeoData object.<br>\r\n * \r\n * @author James Macgill JM\r\n * @return double The smallest value currently stored in this GeoData. The missingValueCode is not included in this test.\r\n */\r\n double getMin();\r\n \r\n /**\r\n * The total number of stored id/value pairs stored in this GeoData.\r\n * @author James Macgill JM\r\n * @return int The number of values stored in this GeoData.\r\n */\r\n int getSize();\r\n \r\n /**\r\n * The total number of stored values stored in this GeoData which equal the missing value code.\r\n * @author James Macgill JM\r\n * @return int The number of missing values stored in this GeoData.\r\n */\r\n int getMissingCount();\r\n\r\n\t\t/** \r\n\t\t * Gets the type of data stored in the geodata<br>\r\n\t\t * <ul><li>String - GeoData.CHARACTER</li> \r\n\t\t * <li>Integer - GeoData.INTEGER</li>\r\n\t\t * <li>Double - GeoData.FLOATING</li></ul>\r\n\t\t */\r\n\t\t int getDataType();\r\n\t\t/** \r\n\t\t * Sets the type of data stored in the geodata<br>\r\n\t\t * <ul><li>String - GeoData.character</li> \r\n\t\t * <li>Integer - GeoData.integer</li>\r\n\t\t * <li>Double - GeoData.float</li></ul>\r\n\t\t */\r\n\t\t void setDataType(int type );\r\n}",
"Map<String, Object> getStats();",
"public interface GeocodeWsStatisticsMBean {\n\n long getTotalGoodRequests();\n\n long getTotalBadRequests();\n\n long getTotalServedFromCache();\n\n long getTotalServedFromDatabase();\n\n long getTotalPoliticalHits();\n\n long getTotalEezHits();\n\n long getTotalNoResults();\n\n long getWithing5KmHits();\n\n double getAverageResultSize();\n\n void resetStats();\n}",
"public List<Number> getStatistics() {\n return statistics;\n }",
"Stats<Double> stats();",
"boolean hasStatistics();",
"protected abstract String getStatistics();",
"void statistics();",
"public String getStatistics() {\n return \"Bounds = (\" + x1 + \", \" + y1 + \"), (\" + x2 + \", \" + y2 + \")\\n\" +\n \"Number of Nodes = \" + numNodes + \"\\n\";\n }",
"int getMetricValuesCount();",
"public String getStatistics() {\r\n \tString statistics;\r\n \tstatistics=\"Anzahl aller User: \"+ numberOfUsers() + \"\\n\"\r\n \t\t\t+ \"Anzahl aller Hotels: \" + numberOfHotels() + \"\\n\"\r\n \t\t\t+ \"Hotel mit der besten durchschnittlichen Bewertung: \" + bestHotel().getName() + \"\\n\";\r\n \treturn statistics;\r\n }",
"public java.util.Map<String, FieldStats> getStats() {\n if (stats == null) {\n stats = new com.amazonaws.internal.SdkInternalMap<String, FieldStats>();\n }\n return stats;\n }",
"public String stats() { \r\n String stats; \r\n stats = getWins() + \" wins, \" + getLosses() + \" losses, \" \r\n + getSaves() + \" saves, \" + getEra() + \" ERA\"; \r\n return stats;\r\n }",
"public Stats2D statistics() {\n Stats2D stats = new Stats2D(data.values);\n stats.run();\n return stats;\n }",
"private int infoCount() {\n return data.size();\n }",
"public long getNumDefinedData();",
"public double geoMean() {\n\t\tint product = 1;\n\t\tfor (Animal a : animals) {\n\t\t\tproduct *= a.getSize();\n\t\t}\n\t\treturn Math.pow(product, 1.0 / animals.size());\n\t}",
"Map<String, Double> getStatus();",
"public int getValueCount() {\n return value_.size();\n }",
"private final Map<String, String> memoryStats() {\n HashMap<String, String> map = new HashMap<String, String>();\r\n map.put(\"tableIndexChunkSize\", (!RAMIndex) ? \"0\" : Integer.toString(index.row().objectsize));\r\n map.put(\"tableIndexCount\", (!RAMIndex) ? \"0\" : Integer.toString(index.size()));\r\n map.put(\"tableIndexMem\", (!RAMIndex) ? \"0\" : Integer.toString((int) (index.row().objectsize * index.size() * kelondroRowCollection.growfactor)));\r\n return map;\r\n }",
"int getDataCount();",
"int getDataCount();",
"int getDataCount();",
"int getDataCount();",
"int getDataCount();",
"public int getPlaceGeoData() {\n return mPlaceGeoData;\n }",
"public int getValueCount() {\n return value_.size();\n }",
"public List<StatsObject> getData() {\n\t\tList<StatsObject> stats = new ArrayList<StatsObject>(data.values());\n\t\treturn stats;\n\n\t}",
"int getFeatureCount();",
"public double regionValue(){\n return counter.regionValue();\n }",
"public java.util.Map<java.lang.String, java.lang.Double> ois()\n\t{\n\t\treturn _ois;\n\t}",
"public int getDataCount() {\n return data_.size();\n }",
"public double[] getHitGeoCoord();",
"public void statistics(){\n // calculate N\n for (int k=0 ; k<K ; ++k){\n N[k] = 0.0;\n for (int n=0 ; n<X.getN() ; ++n){\n SuperVoxel sv =X.get(n);\n N[k] = N[k] + sv.getVoxels().length*r.getEntry(n, k);\n }\n N[k] = N[k] + .000001;\n }\n\n \n // calculate xBar\n for (int k=0 ; k<K ; ++k){\n xBar[k].set(0.0);\n for (int n=0 ; n<X.getN() ; ++n){\n SuperVoxel sv = X.get(n);\n double rnk = r.getEntry(n, k);\n RealVector x = sv.getCenter().mapMultiply(rnk*sv.getVoxels().length);\n xBar[k] = xBar[k].add(x);\n }\n xBar[k].mapDivideToSelf(N[k]);\n } \n \n // calculate the S\n for (int k=0 ; k<K ; ++k){\n for (int row=0 ; row<X.getD() ; ++row){\n for (int col=0 ; col<X.getD() ; ++col){\n S[k].setEntry(row, col, 0.0);\n }\n }\n for (int n=0 ; n<X.getN() ; ++n){\n SuperVoxel sv = X.get(n);\n for (RealVector vox : sv.getVoxels()){\n RealVector del = vox.subtract(xBar[k]); \n S[k] = S[k].add(del.outerProduct(del).scalarMultiply(r.getEntry(n, k))); \n }\n }\n S[k] = S[k].scalarMultiply(1.0/N[k]);\n }\n }",
"public String getPointsData() {\n\t\t\tStringBuilder pointsString = new StringBuilder(\"[\");\n\n\t\t\ttry {\n\t\t\t\tCursor pointsCursor = dbHandler\n\t\t\t\t\t\t.getEveryLatLong(Main.logged_user);\n\n\t\t\t\tif (pointsCursor != null) {\n\n\t\t\t\t\tif (pointsCursor.moveToFirst()) {\n\t\t\t\t\t\twhile (!pointsCursor.isAfterLast()) {\n\t\t\t\t\t\t\tpointsString.append(String.format(GOOGLE_MAP_POINT,\n\t\t\t\t\t\t\t\t\tpointsCursor.getDouble(LATITUDE),\n\t\t\t\t\t\t\t\t\tpointsCursor.getDouble(LONGITUDE)));\n\n\t\t\t\t\t\t\tpointsCursor.moveToNext();\n\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tpointsCursor.close();\n\t\t\t\t}\n\t\t\t} catch (Exception ex) {\n\t\t\t\tLog.e(LOG_TAB, ex.getMessage());\n\t\t\t\tpointsString.append(\"ERROR_\");\n\t\t\t}\n\n\t\t\tif(pointsString.length() > GOOGLE_MAP_POINT.length())\n\t\t\t\treturn pointsString.substring(0, pointsString.length() - 1) + \"]\";\n\t\t\telse\n\t\t\t\treturn \"NODATA\";\n\t\t}",
"public int total_maps() {\r\n\t\tcheck( 1 );\r\n\r\n\t\treturn total_maps;\r\n\t}",
"public HashMap<String, Double> getStats() {\n return playerStats; // stub\n }",
"public double getPopulation () { return n.getPopulation(); }",
"int getValuesCount();",
"@Override\n public int size() {\n int count = 0;\n for (Counter c : map.values())\n count += c.value();\n return count;\n }",
"int getStatsCount();",
"int getStatsCount();",
"int getStatsCount();",
"private static void reportStatistics() {\n SmartDashboard.putNumber(\"Speed value\", speed);\n SmartDashboard.putNumber(\"Desired RPM\", kVelocitySetpoint);\n SmartDashboard.putNumber(\"Error\", error);\n SmartDashboard.putNumber(\"ErrorSum\", errorSum);\n SmartDashboard.putNumber(\"Flywheel Velocity (Master)\", -flywheelMaster.getSelectedSensorVelocity());\n\n if(d >= kMinThreePoint && d <= kMaxThreePoint) { //If we are in the range for a 3-point shot\n threePointDistanceEntry.setBoolean(true); //Alert operator\n } else { //If we are not in the range for a 3-point shot\n threePointDistanceEntry.setBoolean(false); //Alert operator\n }\n\n if(d >= kMinViableRange && d <= kMaxViableRange) { //If we are in the viable range for any power port shot\n viableDistanceEntry.setBoolean(true); //Alert operator\n } else { //If we cannot make a shot into the power port\n viableDistanceEntry.setBoolean(false); //Alert operator\n }\n }",
"Integer getDataLgth();",
"@Dump(compound = true)\n public BwGeo getGeo() {\n return geo;\n }",
"public int getDataCount() {\n return data_.size();\n }",
"public int getDataCount() {\n return data_.size();\n }",
"public int getDataCount() {\n return data_.size();\n }",
"public int getDataCount() {\n return data_.size();\n }",
"public int getDataCount() {\n return data_.size();\n }",
"public String getLogisticsDistance() {\n return logisticsDistance;\n }",
"public int getStatsCount() {\n return stats_.size();\n }",
"@Override\n\t@Transactional(propagation = Propagation.REQUIRED)\n\tpublic String stats(QualityQuery data) throws Exception {\n\t\treturn metaDataFetchService.stats(data);\n\t}",
"@Override\r\n\tpublic double getStoredGazeScore() {\n\t\treturn this.gazeScore;\r\n\t}",
"public HashMap<String, String> getAIStatistics() {\n HashMap<String, String> stats = new HashMap<String, String>();\n HashMap<String, Long> objStats = new HashMap<String, Long>();\n Iterator<AIObject> iter = aiObjects.values().iterator();\n while (iter.hasNext()) {\n AIObject obj = iter.next();\n String className = obj.getClass().getSimpleName();\n if (objStats.containsKey(className)) {\n Long count = objStats.get(className);\n count++;\n objStats.put(className, count);\n } else {\n Long count = new Long(1);\n objStats.put(className, count);\n }\n }\n for (String k : objStats.keySet()) {\n stats.put(k, Long.toString(objStats.get(k)));\n }\n \n return stats;\n }",
"public int getPointsHealthy()\n {\n return pointsHealthy;\n }",
"int getStatMetadataCount();",
"public void stats() {\n\t\tSystem.out.println(\"Hash Table Stats\");\n\t\tSystem.out.println(\"=================\");\n\t\tSystem.out.println(\"Number of Entries: \" + numEntries);\n\t\tSystem.out.println(\"Number of Buckets: \" + myBuckets.size());\n\t\tSystem.out.println(\"Histogram of Bucket Sizes: \" + histogram());\n\t\tSystem.out.printf(\"Fill Percentage: %.5f%%\\n\", fillPercent());\n\t\tSystem.out.printf(\"Average Non-Empty Bucket: %.7f\\n\\n\", avgNonEmpty());\t\t\n\t}",
"int getFeatureValue();",
"@Override\n public Map<String, Float> getBasicNutrients() {\n return basicNutrients;\n }",
"public Map<String, Integer> getDataMap() {\n\t\tMap<String, Integer> dataMap = new HashMap<>();\n\t\tdataMap.putAll(temperature.getDataMap());\n\t\tdataMap.putAll(wind.getDataMap());\n\t\tdataMap.putAll(precipitation.getDataMap());\n\t\tdataMap.putAll(condition.getDataMap());\n\t\tdataMap.putAll(hazard.getDataMap());\n\t\tdataMap.putAll(wave.getDataMap());\n\t\t\n\t\treturn dataMap;\n\t}",
"public int getDataCount() {\n return data_.size();\n }",
"public int getDataCount() {\n return data_.size();\n }",
"public abstract Double getDataValue();",
"Map<String, Number> toStatsMap() {\n long s = successes.get();\n long r = responseTimes.get();\n long avg = s <= 0 ? -1 : r / s;\n\n Map<String, Number> stats = new HashMap<String, Number>();\n stats.put(\"successes\", (int) s);\n stats.put(\"averageResponseTime\", avg);\n stats.put(\"httpFailures\", httpFailures.get());\n stats.put(\"readTimeouts\", readTimeouts.get());\n stats.put(\"connectTimeouts\", connectTimeouts.get());\n stats.put(\"socketErrors\", socketErrors.get());\n stats.put(\"emptyResults\", emptyResults.get());\n return stats;\n }",
"public String summaryStats() {\n\t\treturn new StringBuilder()\n\t\t\t\t.append(\"Documents: \"+countCorpusDocuments()+\", \")\n\t\t\t\t.append(\"Terms: \"+countCorpusTerms()+\", \")\n\t\t\t\t.append(\"Unique terms: \"+countUniqueTerms()).toString();\n\t}",
"private static void displayStat() {\n Collection<Zone> zones = Universe.getInstance().getCarte().getCarte().values();\r\n System.out.println(\"Nb de personnes créées : \" + Universe.getInstance().getCarte().getPopulation().size());\r\n\r\n\r\n System.out.println(\"Nb de personnes créées en mer : \" + getPopulationByTile(Zone.Tile.SEA));\r\n System.out.println(\"Nb de personnes créées en plaine : \" + getPopulationByTile(Zone.Tile.EARTH));\r\n System.out.println(\"Nb de personnes créées en foret : \" + getPopulationByTile(Zone.Tile.FOREST));\r\n System.out.println(\"Nb de personnes créées en ville : \" + getPopulationByTile(Zone.Tile.TOWN));\r\n\r\n System.out.println(\"---------------\");\r\n\r\n System.out.println(\"Surface mer : \" + getSurfaceByTile(zones, Zone.Tile.SEA));\r\n System.out.println(\"Surface plaine : \" + getSurfaceByTile(zones, Zone.Tile.EARTH));\r\n System.out.println(\"Surface foret : \" + getSurfaceByTile(zones, Zone.Tile.FOREST));\r\n System.out.println(\"Surface ville : \" + getSurfaceByTile(zones, Zone.Tile.TOWN));\r\n\r\n System.out.println(\"---------------\");\r\n\r\n System.out.println(\"Densité mer : \" + new Double(getPopulationByTile(Zone.Tile.SEA) / getSurfaceByTile(zones, Zone.Tile.SEA)));\r\n System.out.println(\"Densité plaine : \" + new Double(getPopulationByTile(Zone.Tile.EARTH)) / new Double(getSurfaceByTile(zones, Zone.Tile.EARTH)));\r\n System.out.println(\"Densité foret : \" + new Double(getPopulationByTile(Zone.Tile.FOREST)) / new Double(getSurfaceByTile(zones, Zone.Tile.FOREST)));\r\n System.out.println(\"Densité ville : \" + new Double(getPopulationByTile(Zone.Tile.TOWN)) / new Double(getSurfaceByTile(zones, Zone.Tile.TOWN)));\r\n\r\n System.out.println(\"---------------\");\r\n System.out.println(\"Surface mer deserte : \" +zones.stream().filter(z-> z.getTile().equals(Zone.Tile.SEA) && CollectionUtils.isEmpty(z.getHabitants())).collect(Collectors.toList()).size());\r\n System.out.println(\"Surface plaine deserte : \" +zones.stream().filter(z-> z.getTile().equals(Zone.Tile.EARTH) && CollectionUtils.isEmpty(z.getHabitants())).collect(Collectors.toList()).size());\r\n System.out.println(\"Surface foret deserte: \" +zones.stream().filter(z-> z.getTile().equals(Zone.Tile.FOREST) && CollectionUtils.isEmpty(z.getHabitants())).collect(Collectors.toList()).size());\r\n System.out.println(\"Surface ville deserte: \" +zones.stream().filter(z-> z.getTile().equals(Zone.Tile.TOWN) && CollectionUtils.isEmpty(z.getHabitants())).collect(Collectors.toList()).size());\r\n System.out.println(\"---------------\");\r\n\r\n System.out.println(\"Surface mer habitée : \" +zones.stream().filter(z-> z.getTile().equals(Zone.Tile.SEA) && CollectionUtils.isNotEmpty(z.getHabitants())).collect(Collectors.toList()).size());\r\n System.out.println(\"Surface plaine habitée : \" +zones.stream().filter(z-> z.getTile().equals(Zone.Tile.EARTH) && CollectionUtils.isNotEmpty(z.getHabitants())).collect(Collectors.toList()).size());\r\n System.out.println(\"Surface foret habitée: \" +zones.stream().filter(z-> z.getTile().equals(Zone.Tile.FOREST) && CollectionUtils.isNotEmpty(z.getHabitants())).collect(Collectors.toList()).size());\r\n System.out.println(\"Surface ville habitée: \" +zones.stream().filter(z-> z.getTile().equals(Zone.Tile.TOWN) && CollectionUtils.isNotEmpty(z.getHabitants())).collect(Collectors.toList()).size());\r\n }",
"int getPointsCount();",
"@Override\r\n\tpublic int dataCount(Map<String, Object> map) {\n\t\treturn 0;\r\n\t}",
"private void getPoints()\n\t{\n\t\ttotalEntered = statsCollector.getTotalEnteredPoints();\n\t\taverageWait = statsCollector.getAverageWaitPoints();\n\t\tmaxWait = statsCollector.getMaxWaitPoints();\n\t\ttimeAlive = statsCollector.getTimeAlivePoints();\n\t}",
"String getSensorDataPoint();",
"int getStateValuesCount();",
"int getLocationsCount();",
"public void logDictionaryStatistics() {\n LOGGER.info(\"uriToIdDictionary: \" + uriToIdDictionary.size());\n LOGGER.info(\"uris: \" + uris.size());\n LOGGER.info(\"superClassDictionary: \" + superClassDictionary.size());\n LOGGER.info(\"subClassOfDictionary: \" + subClassOfDictionary.size());\n LOGGER.info(\"typeDictionary: \" + typeDictionary.size());\n LOGGER.info(\"instanceDictionary: \" + instanceDictionary.size());\n LOGGER.info(\"disjointWithDictionary: \" + disjointWithDictionary.size());\n }",
"private double computeInfoGain(Instances data)\n throws Exception {\n\n double infoGain = computeEntropy(data);\n Instances[] splitData = m_localModel.split(data);\n for (int j = 0; j < m_localModel.numSubsets(); j++) {\n if (splitData[j].numInstances() > 0) {\n infoGain -= ((double) splitData[j].numInstances() /\n (double) data.numInstances()) *\n computeEntropy(splitData[j]);\n }\n }\n return infoGain;\n }",
"public String getStatistics() throws IOException{\n initiateWordCount();\n getHamStatistics(); \n getSpamStatistics();\n return printStatistics(); \n }",
"public interface GeoInterface {\n\t// infinity value\n\tstatic final double INF = Double.MAX_VALUE;\n\t// small number (less than this is consider as zero)\n\tstatic final double SMALL_NUM = 0.0001;\n\t\t\n\t// perimeter of the maximum area this application covers (map area)\n\t// grid/space dimensions\t\t //# Dataset\t\t\t\t\t//# Query \t\n\tfinal static double MIN_X = 52.0; // MinX: 52.99205499607079 // Min X: 375.7452259303738\n\tfinal static double MIN_Y = -21.0; // MinY: -20.08557496216634 // Min Y: 16.319751123918174\n\tfinal static double MAX_X = 717.0; // MaxX: 716.4193496072005 // Max X: 576.9230902330686\n\tfinal static double MAX_Y = 396.0; // MaxY: 395.5344310979076 // Max Y: 234.80924053063617\n\t\n\t// Earth radius (average) in meters\n\tstatic final int EARTH_RADIUS = 6371000;\n\t\n\t// pi\n\tstatic final double PI = Math.PI;\n}",
"public int getPoints()\n {\n return (10000 - this.points);\n }",
"private Double calculateTotalFitness() {\n double totalFitnessScore = 0;\n\n IgniteCache<Long, Chromosome> cache = ignite.cache(GAGridConstants.POPULATION_CACHE);\n\n SqlFieldsQuery sql = new SqlFieldsQuery(\"select SUM(FITNESSSCORE) from Chromosome\");\n\n // Iterate over the result set.\n try (QueryCursor<List<?>> cursor = cache.query(sql)) {\n for (List<?> row : cursor)\n totalFitnessScore = (Double)row.get(0);\n }\n\n return totalFitnessScore;\n }",
"java.util.List<org.tensorflow.proto.profiler.XStat> \n getStatsList();",
"public double getAStat() {\n\t\treturn aStatM;\n\t}",
"int getGeoTargetConstantsCount();",
"public Integer sizeOfMap() {\n\t\tMap<String, String> simpleMap = createSimpleMap(\"Key\", \"Value\");\n numberOfEntries = 10;\n\t\treturn simpleMap.size();\n\t}",
"public Stats getStats() {\n if (this.stats == null) {\n this.stats = (Stats) JavaScriptObject.createObject();\n }\n return this.stats;\n }",
"int getInfoCount();",
"int getInfoCount();",
"int getInfoCount();",
"public String stats()\n\t{\n\t\tString algo = null;//set up algo return null if error\n\t\tswitch (sortingAlgorithm) {\n\t\tcase SelectionSort:\n\t\t\talgo = \"SelectionSort\";\n\t\t\tbreak;\n\t\tcase InsertionSort:\n\t\t\talgo = \"InsertionSort\";\n\t\t\tbreak;\n\t\tcase MergeSort:\n\t\t\talgo = \"MergeSort\";\n\t\t\tbreak;\n\t\tcase QuickSort:\n\t\t\talgo = \"QuickSort\";\n\t\t\tbreak;\n\t\t}\n\t\treturn algo + \"\\t\" + points.length + \"\\t\" + scanTime; \n\t}",
"public int getInfoCount() {\n return info_.size();\n }",
"void dumpStats() {\n long wallTimeNanos = totalStopwatch.elapsed(TimeUnit.NANOSECONDS);\n long dbtime = 0;\n for (String name : methodCalls.keySet()) {\n long calls = methodCalls.get(name);\n long time = methodTotalTime.get(name);\n dbtime += time;\n long average = time / calls;\n double proportion = (time + 0.0) / (wallTimeNanos + 0.0);\n log.info(name + \" c:\" + calls + \" r:\" + time + \" a:\" + average + \" p:\" + String.format(\"%.2f\", proportion));\n }\n double dbproportion = (dbtime + 0.0) / (wallTimeNanos + 0.0);\n double hitrate = (hit + 0.0) / (hit + miss + 0.0);\n log.info(\"Cache size:\" + utxoCache.size() + \" hit:\" + hit + \" miss:\" + miss + \" rate:\"\n + String.format(\"%.2f\", hitrate));\n bloom.printStat();\n log.info(\"hasTxOut call:\" + hasCall + \" True:\" + hasTrue + \" False:\" + hasFalse);\n log.info(\"Wall:\" + totalStopwatch + \" percent:\" + String.format(\"%.2f\", dbproportion));\n String stats = db.getProperty(\"leveldb.stats\");\n System.out.println(stats);\n\n }",
"public List<Double> getData() {\n return data;\n }",
"public Integer getStat() {\r\n return stat;\r\n }",
"public double getAllocatedValue()\r\n\t{\r\n\t\tint numberOfAllocatedRecords = 0;\r\n\t\tfor(int i = 0; i < _actuallyAllocatedTuples.size(); ++i)\r\n\t\t\tnumberOfAllocatedRecords += _actuallyAllocatedTuples.get(i);\r\n\t\t\r\n\t\treturn numberOfAllocatedRecords * this.getValue();\r\n\t}",
"public void testStatistics(){\n Profile profile = new Profile(\"id1\");\n GeoLocation uni_loc = new GeoLocation(0.0, 0.0);\n ArrayList<Trial> trials = new ArrayList<>();\n\n for (int i=1; i<101; i++){\n TrialIntCount trial = new TrialIntCount(\"\"+i, uni_loc, profile, 0);\n if (i<40 && i%2==0){\n trial.setCount(i);\n\n trials.add(trial);\n } else if (i>= 40 && i<80 && i%3==0){\n trial.setCount(i);\n\n trials.add(trial);\n } else if ( i >= 80 && i%5==0) {\n trial.setCount(i);\n TrialIntCount trial2 = new TrialIntCount(\"1\"+i, uni_loc, profile, 0);\n trial2.setCount(i);\n\n trials.add(trial);\n trials.add(trial2);\n }\n }\n\n this.exp = new Experiment(\"foo\");\n this.exp.addTrials(trials);\n\n assertEquals(\"removeDupes does not work\", 37, this.exp.removeDupes().length);\n assertEquals(\"frequencies does not work\", 15, exp.frequencies().length);\n assertEquals(\"median does not work\", \"46.5\", exp.getMedian());\n assertEquals(\"Q1 does not work\", \"23.00\", exp.getQ1());\n assertEquals(\"Q3 does not work\", \"76.50\", exp.getQ3());\n assertEquals(\"std does not work\", \"30.39\", exp.getStd());\n assertEquals(\"mean does not work\", \"49.05\", exp.getMean());\n\n }",
"public double getOblateness() {\n return oblateness;\n }",
"public int getStat() {\n return statUse.getNumerator();\n }",
"double getValue();",
"double getValue();",
"double getValue();",
"java.util.Map<java.lang.Long, org.tensorflow.proto.profiler.XStatMetadata>\n getStatMetadataMap();"
] |
[
"0.618802",
"0.6178157",
"0.58758193",
"0.5845057",
"0.5825189",
"0.5820847",
"0.57837474",
"0.5775629",
"0.57447237",
"0.57016987",
"0.5651863",
"0.55685264",
"0.55676293",
"0.5555589",
"0.5526791",
"0.5483547",
"0.54577714",
"0.5452705",
"0.5440667",
"0.5423935",
"0.5407677",
"0.5407677",
"0.5407677",
"0.5407677",
"0.5407677",
"0.5397806",
"0.53976256",
"0.5379763",
"0.5377283",
"0.5376855",
"0.53721833",
"0.5364646",
"0.5359755",
"0.53548324",
"0.53546786",
"0.53418875",
"0.5333444",
"0.5331909",
"0.5327265",
"0.53180224",
"0.53158224",
"0.53158224",
"0.53158224",
"0.53099054",
"0.53032243",
"0.5299121",
"0.5290635",
"0.5290635",
"0.5290635",
"0.5290635",
"0.5290635",
"0.52860624",
"0.5281973",
"0.5275076",
"0.5268533",
"0.5253913",
"0.52444315",
"0.52406126",
"0.52194023",
"0.52168554",
"0.52123594",
"0.5199031",
"0.5197409",
"0.5197409",
"0.5188007",
"0.518138",
"0.51797575",
"0.5176661",
"0.5173452",
"0.5171618",
"0.51651466",
"0.5154118",
"0.515308",
"0.51386756",
"0.51352835",
"0.51304114",
"0.51240045",
"0.5121775",
"0.5112668",
"0.51121193",
"0.5111418",
"0.5104827",
"0.51034474",
"0.5098705",
"0.50960165",
"0.50920254",
"0.50920254",
"0.50920254",
"0.50905055",
"0.50868374",
"0.5084852",
"0.50848085",
"0.5081104",
"0.5077463",
"0.50736946",
"0.50702125",
"0.5069313",
"0.5069177",
"0.5069177",
"0.5069177",
"0.5068053"
] |
0.0
|
-1
|
The total number of stored id/value pairs stored in this GeoData.
|
int getSize();
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public int getValueCount() {\n return value_.size();\n }",
"public int getValueCount() {\n return value_.size();\n }",
"public int getDataCount() {\n return data_.size();\n }",
"public int getDataCount() {\n return data_.size();\n }",
"public int getDataCount() {\n return data_.size();\n }",
"public int getDataCount() {\n return data_.size();\n }",
"public int getDataCount() {\n return data_.size();\n }",
"public int getDataCount() {\n return data_.size();\n }",
"public int getDataCount() {\n return data_.size();\n }",
"public int getDataCount() {\n return data_.size();\n }",
"@Override\n public int size() {\n int count = 0;\n for (Counter c : map.values())\n count += c.value();\n return count;\n }",
"public Integer sizeOfMap() {\n\t\tMap<String, String> simpleMap = createSimpleMap(\"Key\", \"Value\");\n numberOfEntries = 10;\n\t\treturn simpleMap.size();\n\t}",
"public int dataCount() {\n return this.root.dataCount();\n }",
"public int size() {\n\t\treturn this.articleIdToReferenceIdMap.size();\r\n\t}",
"public int getValuesSize() {\n return values.size();\n }",
"public int size() {\n int size = 0;\n for (Collection<V> value : map.values()) {\n size += value.size();\n }\n return size;\n }",
"public int size() {\n return map.size();\n }",
"int getValuesCount();",
"public int size() {\n\t\treturn map.size();\n\t}",
"public int size() {\n return this.values.length;\n }",
"public int getStateValuesCount() {\n return stateValues_.size();\n }",
"public final synchronized int size() {\n\t\treturn map.size();\n\t}",
"private int infoCount() {\n return data.size();\n }",
"public int size() {\n return data.size();\n }",
"public int size() {\n return map.size();\n }",
"public int size() {\n return values.size();\n }",
"public int getStateValuesCount() {\n return stateValues_.size();\n }",
"public int\tsize() {\n\t\treturn map.size();\n\t}",
"public int size() {\r\n return theData.size();\r\n }",
"public int size() {\r\n return this.map.size();\r\n }",
"@Override\n\tpublic int size() {\n\t\treturn map.size();\n\t}",
"public int size()\n\t{\n\t\treturn _data.size();\n\t}",
"public Map<String, Integer> getNumData(){\n\t\treturn numCache;\n\t}",
"public int size()\r\n\t{\r\n\t\treturn data.size();\r\n\t}",
"public int size()\n\t{\n\t\tint size = 0;\n\t\tfor(List<Registry.Entry> li : this.reg.values())\n\t\t\tsize += li.size();\n\t\treturn size;\n\t}",
"public int getCount() {\n\t\t\treturn data.size();\n\t\t}",
"public int getDataCount() {\n if (dataBuilder_ == null) {\n return data_.size();\n } else {\n return dataBuilder_.getCount();\n }\n }",
"public int getDataCount() {\n if (dataBuilder_ == null) {\n return data_.size();\n } else {\n return dataBuilder_.getCount();\n }\n }",
"public int getNumElements() {\n return theMap.size();\n }",
"public long getNumDefinedData();",
"public int getCountOfData (){\n return getData() == null ? 0 : getData().size();\n }",
"@Override\r\n public int size() {\r\n return map.size();\r\n }",
"@Override\n public int size() {\n return map.size();\n }",
"int getDataCount();",
"int getDataCount();",
"int getDataCount();",
"int getDataCount();",
"int getDataCount();",
"public int getSize(){\n return this.node.getValues().size();\n }",
"public int size() {\n int size = 0;\n\n Collection<CacheableObject> values = new HashSet<CacheableObject>();\n synchronized(theLock) {\n values.addAll(valueMap.values());\n }\n\n for (CacheableObject cObj : values) {\n if (! this.isExpired(cObj)) {\n size++;\n }\n }\n\n return size;\n }",
"@Override\n public int getSize() {\n return map.size();\n }",
"@Override\n\tpublic int size() \n\t{\n\t\treturn this.map.size();\n\t}",
"@Override\n\tpublic int numValues() {\n\t\t// TODO Auto-generated method stub\n\t\treturn 0;\n\t}",
"public int total_maps() {\r\n\t\tcheck( 1 );\r\n\r\n\t\treturn total_maps;\r\n\t}",
"@Override\n\tpublic int getSize() {\n\t\treturn datas.size();\n\t}",
"public int sizeOfValueArray()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().count_elements(VALUE$0);\n }\n }",
"public int getCellIdCount() {\n return cellId_.size();\n }",
"int getStateValuesCount();",
"@Override\r\n\tpublic int size() {\r\n\r\n\t\treturn data.size();\r\n\t}",
"public int size() {\r\n\t\treturn values.length;\r\n\t}",
"public int getCount() {\n\t\treturn data.size();\r\n\t}",
"public Integer size() { return this.entries.length(); }",
"public int getVertexCount() {\n return map.keySet().size();\n }",
"public int getInfoCount() {\n return info_.size();\n }",
"public int countPoolMaps(){\n\n\t\treturn poolMaps.size();\n\t}",
"public int getKeyCount() {\n return associationCountMap.size();\n }",
"@Override\n\tpublic int size() {\n\t\tint tamano = 0;\n\t\tint i = 0;\n\t\tIterator it = tabla.iterator();\n\t\twhile (it.hasNext()) {\n\t\t\tit.next();\n\t\t\ttamano += tabla.get(i).keySet().size();\n\t\t\ti++;\n\t\t}\n\t\treturn tamano;\n\t}",
"public int getCellIdCount() {\n return cellId_.size();\n }",
"int size() {\n return data.size();\r\n }",
"public int size() {\n\t\treturn data.length;\n\t}",
"public int getDatasetIdsCount() {\n return datasetIds_.size();\n }",
"public int size() {\n\t\treturn numEntries;\n\t}",
"@Override\n\tpublic int getSize() {\n\t\treturn numberOfEntries;\n\t}",
"public static int totalSize_entries_id() {\n return (176 / 8);\n }",
"@Override\r\n\tpublic int getTotal() {\n\t\treturn mapper.count();\r\n\t}",
"@Override\n public int getNInt() {\n return this.values.length;\n }",
"public int sizeOfIdentifierArray()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().count_elements(IDENTIFIER$0);\n }\n }",
"public int getFieldCount()\n {\n return this.fieldMap.size();\n }",
"public int size ()\n {\n return this.entryMap.size ();\n }",
"public int getDatasetIdsCount() {\n return datasetIds_.size();\n }",
"public int size()\n\t{\n\t\treturn data.length;\n\t}",
"public int getSeenInfoCount() {\n return seenInfo_.size();\n }",
"@Override\n\tpublic int getDataCount() {\n\t\treturn list_fr.size();\n\t}",
"@Override\r\n\tpublic int getCollectionTotalCount() {\n\t\treturn data != null ? data.recordCount : 0;\r\n\t}",
"public int size() {\n return data.length;\n }",
"public int mapCount(){\r\n\t\treturn this.mapCount;\r\n\t}",
"public int getEntryCount() {\n return mem.getChar(34);\n }",
"public int getRequestedValuesCount() {\n return requestedValues_.size();\n }",
"public int dataSize() {\n\t\treturn data.size();\n\t}",
"public int getRequestedValuesCount() {\n return requestedValues_.size();\n }",
"public int size() {\n\t\treturn count;\n\t}",
"public int size() {\n\t\treturn count;\n\t}",
"public int size() {\n\t\treturn count;\n\t}",
"@Override\n public int size() {\n return this.size; // Returns value in size field\n }",
"public int size(){\n\t\treturn hashTableSize;\n\t}",
"public int getEntryCount() {\n return entry_.size();\n }",
"public synchronized int size() {\n return\n this.oPreprocessingParams.size() +\n this.oFeatureExtractionParams.size() +\n this.oClassificationParams.size();\n }",
"public int size() {\n if (hasKeys) {\n return keys.size();\n } else {\n return objects.size();\n }\n }",
"public int getNrOfAssociations() {\n int size = 0;\n for (PriorityCollection associations : memory.values()) {\n size += associations.size();\n }\n return size;\n }",
"public int getTypeDataCount() {\n\t\t\treturn this.TypeRegistrationDatas.size();\n\t\t}",
"public int size() {\n return pointSet.size();\n }"
] |
[
"0.7402797",
"0.73793364",
"0.72882736",
"0.72882736",
"0.72882736",
"0.72882736",
"0.72882736",
"0.72764766",
"0.72764766",
"0.7254566",
"0.7159262",
"0.70804507",
"0.70044476",
"0.6966972",
"0.6963076",
"0.6950522",
"0.6941721",
"0.692792",
"0.6890099",
"0.68787533",
"0.6876917",
"0.6870192",
"0.6862494",
"0.68523103",
"0.6850187",
"0.6848056",
"0.68387735",
"0.68171364",
"0.680892",
"0.68019885",
"0.67477244",
"0.6746098",
"0.67264515",
"0.6723343",
"0.67134947",
"0.6685744",
"0.66758674",
"0.66758674",
"0.6665566",
"0.6650098",
"0.66411996",
"0.66404706",
"0.6614291",
"0.6594404",
"0.6594404",
"0.6594404",
"0.6594404",
"0.6594404",
"0.6582222",
"0.6568108",
"0.65651655",
"0.65614104",
"0.65497",
"0.6547143",
"0.6544615",
"0.6535873",
"0.6532509",
"0.6529573",
"0.65238935",
"0.65219104",
"0.65174353",
"0.6506017",
"0.65021116",
"0.6501779",
"0.6500191",
"0.64975256",
"0.64907765",
"0.6487635",
"0.648226",
"0.6469021",
"0.6463886",
"0.64488244",
"0.6448348",
"0.64474124",
"0.6446687",
"0.6444142",
"0.64440966",
"0.64301455",
"0.6421936",
"0.6417677",
"0.6415435",
"0.6414694",
"0.64080465",
"0.64070827",
"0.6402713",
"0.6401841",
"0.6400668",
"0.6398037",
"0.63965553",
"0.6395882",
"0.638826",
"0.638826",
"0.638826",
"0.6385064",
"0.638418",
"0.6381339",
"0.63771236",
"0.63685894",
"0.6366361",
"0.6359438",
"0.6354166"
] |
0.0
|
-1
|
The total number of stored values stored in this GeoData which equal the missing value code.
|
int getMissingCount();
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public int getValueCount() {\n return value_.size();\n }",
"public int getValueCount() {\n return value_.size();\n }",
"public long getMissingCount() {\n return nullCount + nanCount + infinityCount;\n }",
"@Override\n\tpublic int numValues() {\n\t\t// TODO Auto-generated method stub\n\t\treturn 0;\n\t}",
"@Override\n public int size() {\n int count = 0;\n for (Counter c : map.values())\n count += c.value();\n return count;\n }",
"public long getNonMissingCount() {\n return nonMissingCount;\n }",
"public int size() {\n return values.size();\n }",
"@Override\r\n protected long getN() {\r\n boolean handleOutOfMemoryError = false;\r\n long n = 0;\r\n Grids_GridDouble g = getGrid();\r\n int nrows = g.getChunkNRows(ChunkID, handleOutOfMemoryError);\r\n int ncols = g.getChunkNCols(ChunkID, handleOutOfMemoryError);\r\n double noDataValue = g.getNoDataValue(false);\r\n for (int row = 0; row < nrows; row++) {\r\n for (int col = 0; col < ncols; col++) {\r\n double value = getCell(row, col);\r\n if (Double.isNaN(value) && Double.isFinite(value)) {\r\n if (value != noDataValue) {\r\n n++;\r\n }\r\n }\r\n }\r\n }\r\n return n;\r\n }",
"public int sizeOfValueArray()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().count_elements(VALUE$0);\n }\n }",
"public int getRemainingValues(){\n\t\tint total = 0;\n\t\tfor(Row r : rows){\n\t\t\ttotal += (size - r.getNumSetValues());\n\t\t}\n\t\treturn total;\n\t}",
"int getValuesCount();",
"public int size() {\n return this.values.length;\n }",
"public int getValuesSize() {\n return values.size();\n }",
"public int getStateValuesCount() {\n return stateValues_.size();\n }",
"public int getDataCount() {\n return data_.size();\n }",
"public int getDataCount() {\n return data_.size();\n }",
"public int getDataCount() {\n return data_.size();\n }",
"public int getDataCount() {\n return data_.size();\n }",
"public int getDataCount() {\n return data_.size();\n }",
"public int getDataCount() {\n return data_.size();\n }",
"public int getStateValuesCount() {\n return stateValues_.size();\n }",
"public int size() {\n int size = 0;\n for (Collection<V> value : map.values()) {\n size += value.size();\n }\n return size;\n }",
"public int getDataCount() {\n return data_.size();\n }",
"public int getDataCount() {\n return data_.size();\n }",
"public int getCountOfData (){\n return getData() == null ? 0 : getData().size();\n }",
"int getStateValuesCount();",
"@Override\n public long getNonNullCount() {\n return nonMissingCount + nanCount + infinityCount;\n }",
"@Override\n\tpublic int size() {\n\t\tint nr = 0;\n\t\tfor (int i = 0; i < nrb; i++) {\n\t\t\t// pentru fiecare bucket numar in lista asociata acestuia numarul de\n\t\t\t// elemente pe care le detine si le insumez\n\t\t\tfor (int j = 0; j < b.get(i).getEntries().size(); j++) {\n\t\t\t\tnr++;\n\t\t\t}\n\t\t}\n\t\treturn nr;// numaru total de elemente\n\t}",
"public int size() {\r\n\t\treturn values.length;\r\n\t}",
"@Override\n\tpublic int getNumberOfValues() {\n\t\treturn MIN_BUCKET_SIZES.size();\n\t}",
"public int size()\n\t{\n\t\tint size = 0;\n\t\tfor(List<Registry.Entry> li : this.reg.values())\n\t\t\tsize += li.size();\n\t\treturn size;\n\t}",
"int getMetricValuesCount();",
"public int getNumPossibleValues()\n {\n return -1;\n }",
"public long getNumDefinedData();",
"@Override\n public int getNInt() {\n return this.values.length;\n }",
"public int size() {\n\t\treturn map.size();\n\t}",
"public int size() {\n return map.size();\n }",
"public int size() {\r\n return theData.size();\r\n }",
"public int total_maps() {\r\n\t\tcheck( 1 );\r\n\r\n\t\treturn total_maps;\r\n\t}",
"public int size() {\n return data.size();\n }",
"public final synchronized int size() {\n\t\treturn map.size();\n\t}",
"@Override\n\tpublic int size() {\n\t\treturn map.size();\n\t}",
"public int size() {\n return mValues.isEmpty() ? 0 : mBounds[mValues.size() - 1];\n }",
"public int size()\r\n\t{\r\n\t\treturn data.size();\r\n\t}",
"public int size()\n\t{\n\t\treturn _data.size();\n\t}",
"public int size() {\n return map.size();\n }",
"public int size() {\r\n return this.map.size();\r\n }",
"public int dataCount() {\n return this.root.dataCount();\n }",
"public int sizeOfRealmCodeArray()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().count_elements(REALMCODE$0);\n }\n }",
"public int getRequestedValuesCount() {\n return requestedValues_.size();\n }",
"public int getRequestedValuesCount() {\n return requestedValues_.size();\n }",
"public Integer sizeOfMap() {\n\t\tMap<String, String> simpleMap = createSimpleMap(\"Key\", \"Value\");\n numberOfEntries = 10;\n\t\treturn simpleMap.size();\n\t}",
"@Override\r\n\tpublic int size() {\r\n\r\n\t\treturn data.size();\r\n\t}",
"public int size()\n\t{\n\t\tverifyParseState();\n\t\t\n\t\treturn values.size();\n\t}",
"int getDataCount();",
"int getDataCount();",
"int getDataCount();",
"int getDataCount();",
"int getDataCount();",
"public int\tsize() {\n\t\treturn map.size();\n\t}",
"public int length()\n\t{\n\t\tint total_length=0;\n\t\tfor(int iterator=0; iterator<data.length;iterator++)\n\t\t{\n\t\t\tif(data[iterator]!=0)\n\t\t\t{\n\t\t\t\ttotal_length++;\n\t\t\t}\n\t\t}\n\t\treturn total_length;\n\t}",
"public int getRowCount() {\r\n return pvValues.length;\r\n }",
"public int getNumElements() {\n return theMap.size();\n }",
"@Override\r\n public int size() {\r\n return map.size();\r\n }",
"@Override\n public int size() {\n return map.size();\n }",
"@Override\n\tpublic int size() \n\t{\n\t\treturn this.map.size();\n\t}",
"@Override\n\tpublic int size() {\n\t\tint tamano = 0;\n\t\tint i = 0;\n\t\tIterator it = tabla.iterator();\n\t\twhile (it.hasNext()) {\n\t\t\tit.next();\n\t\t\ttamano += tabla.get(i).keySet().size();\n\t\t\ti++;\n\t\t}\n\t\treturn tamano;\n\t}",
"public int size(){\r\n return cjtMap.size();\r\n }",
"private int infoCount() {\n return data.size();\n }",
"public int getDataCount() {\n if (dataBuilder_ == null) {\n return data_.size();\n } else {\n return dataBuilder_.getCount();\n }\n }",
"public int getDataCount() {\n if (dataBuilder_ == null) {\n return data_.size();\n } else {\n return dataBuilder_.getCount();\n }\n }",
"public int sizeOfSourceDataArray()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n return get_store().count_elements(SOURCEDATA$0);\r\n }\r\n }",
"public final int numberOfResponseValues()\n\t{\n\t\treturn m_responseValues != null ? m_responseValues.size() : 0;\n\t}",
"@Override\n\tpublic int getNumberOfPoints()\n\t{\n\t\treturn afXValues.length;\n\t}",
"public int size()\r\n/* 106: */ {\r\n/* 107:194 */ assert (checkRep());\r\n/* 108:195 */ return this.map.keySet().size();\r\n/* 109: */ }",
"public int getSize(){\n return this.node.getValues().size();\n }",
"public int sizeOfMappingFieldsArray()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().count_elements(MAPPINGFIELDS$28);\n }\n }",
"public static int numElements() {\n return values().length;\n }",
"@Override\n\tpublic int getDataCount() {\n\t\treturn list_fr.size();\n\t}",
"@java.lang.Override\n public com.google.protobuf.UInt64Value getPointsCount() {\n return pointsCount_ == null ? com.google.protobuf.UInt64Value.getDefaultInstance() : pointsCount_;\n }",
"public int size() {\n int size = 0;\n\n Collection<CacheableObject> values = new HashSet<CacheableObject>();\n synchronized(theLock) {\n values.addAll(valueMap.values());\n }\n\n for (CacheableObject cObj : values) {\n if (! this.isExpired(cObj)) {\n size++;\n }\n }\n\n return size;\n }",
"public int countEmptyCells() {\n int result = 0;\n for (int[] row : field)\n for (int cell : row)\n if (cell == EMPTY_MARK)\n result++;\n return result;\n }",
"@Override\n\tpublic int size() {\n\t\tint s = valCount; // saves value of current node\n\t\tfor (int i = 0; i < childCount; ++i) { // then checks all children\n\t\t\ts += children[i].size();\n\t\t}\n\t\treturn s;\n\t}",
"@Override\r\n\tpublic int getRowCount() {\n\t\t\r\n\t\treturn variableData.size();\r\n\t}",
"public int sizeOfFeatureArray()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n return get_store().count_elements(FEATURE$14);\r\n }\r\n }",
"public int sizeOfDataChckArray()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().count_elements(DATACHCK$14);\n }\n }",
"public static int size() {\n\t\treturn anisLookup.size();\n\t}",
"public int getFieldCount()\n {\n return this.fieldMap.size();\n }",
"public int GetNMissing();",
"int size() {\n return data.size();\r\n }",
"@Override\n\tpublic int numClasses() {\n\t\treturn attributes[classIndex].numValues();\n\t}",
"public int getMissCountNotFound() {\n return missCountNotFound;\n }",
"public int size() {\n\t\treturn data.length;\n\t}",
"public int total() {\n int summation = 0;\n for ( int value : map.values() ) {\n summation += value;\n }\n return summation;\n }",
"public int size ()\n {\n return this.entryMap.size ();\n }",
"public int sizeOfErrorArray()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n return get_store().count_elements(ERROR$0);\r\n }\r\n }",
"public int getCount() {\n\t\t\treturn data.size();\n\t\t}",
"public long getNanCount() {\n return nanCount;\n }",
"final public int getValueCount(int value) {\r\n \treturn this.values[value];\r\n }",
"public long getCount() {\n long count = 0L;\n \n for (GTSEncoder encoder: chunks) {\n if (null != encoder) {\n count += encoder.getCount();\n }\n }\n \n return count;\n }"
] |
[
"0.72976613",
"0.7271109",
"0.6986253",
"0.69480234",
"0.69277567",
"0.69080883",
"0.6750242",
"0.6740785",
"0.6673481",
"0.6661056",
"0.661491",
"0.6613729",
"0.6568739",
"0.65244263",
"0.65229154",
"0.65229154",
"0.65229154",
"0.65229154",
"0.65229154",
"0.6507481",
"0.65008855",
"0.6500214",
"0.64902574",
"0.64902574",
"0.6472789",
"0.6420287",
"0.64106095",
"0.640953",
"0.64015037",
"0.6369667",
"0.6368314",
"0.6351664",
"0.63485396",
"0.6345146",
"0.63447326",
"0.63176686",
"0.6316385",
"0.6295144",
"0.6285401",
"0.6274572",
"0.62485445",
"0.62478477",
"0.6247497",
"0.6226797",
"0.62255466",
"0.6210558",
"0.6195791",
"0.6188492",
"0.6163719",
"0.61618406",
"0.61615413",
"0.6156024",
"0.61492735",
"0.61467725",
"0.61446005",
"0.61446005",
"0.61446005",
"0.61446005",
"0.61446005",
"0.61431026",
"0.6140654",
"0.6132411",
"0.6131615",
"0.6113477",
"0.6110639",
"0.6097574",
"0.6085597",
"0.60806006",
"0.60645914",
"0.6060607",
"0.6060607",
"0.60528755",
"0.6047651",
"0.60417783",
"0.60253894",
"0.60193187",
"0.5994561",
"0.59899145",
"0.5987732",
"0.598534",
"0.5975731",
"0.5970504",
"0.5967806",
"0.59610623",
"0.59458846",
"0.59385747",
"0.5934743",
"0.59292316",
"0.59287345",
"0.5928368",
"0.59177166",
"0.5917422",
"0.5908469",
"0.59048927",
"0.5900364",
"0.5899963",
"0.58954155",
"0.5880931",
"0.5880828",
"0.5874602"
] |
0.6929411
|
4
|
Gets the type of data stored in the geodata String GeoData.CHARACTER Integer GeoData.INTEGER Double GeoData.FLOATING
|
int getDataType();
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"java.lang.String getDataType();",
"public String getDataType() {\n\t\t\t\t\n\t\t//for contributed grid, need to find the units from the ESRIShapefile object\n\t\tfor (LayerPanel layerPanel : ((MapApp)map.getApp()).layerManager.getLayerPanels()) {\n\t\t\tif (layerPanel.layer instanceof ESRIShapefile && ((ESRIShapefile)layerPanel.layer).equals(this)) {\n\t\t\t\tESRIShapefile esf = (ESRIShapefile)(layerPanel.layer);\n\t\t\t\treturn esf.getGridDataType();\n\t\t\t}\n\t\t}\n\t\t\n\t\tString units = getUnits();\n\t\tif ( name.equals(GridDialog.GEOID) ) {\n\t\t\treturn \"Geoid Height\";\n\t\t}\n\t\telse if ( units.equals(\"m\") ){\n\t\t\treturn \"Elevation\";\n\t\t}else if ( units.equals(\"mgal\") ) {\n\t\t\treturn \"Gravity Anomaly\";\n\t\t}else if ( units.equals(\"percent\") ) {\n\t\t\treturn \"Percent\";\n\t\t}else if ( units.equals(\"mY\") ) {\n\t\t\treturn \"Age\";\n\t\t}else if ( units.equals(\"%\") ) {\n\t\t\treturn \"Percentage\";\n\t\t}else if ( units.equals(\"mm/a\") ) {\n\t\t\treturn \"Rate\";\n\t\t}\n\n\t\treturn \"\";\n\t}",
"public Map<Integer, String> getGeometryType() throws SQLException {\n return retrieveExpected(createNativeGeometryTypeStatement(), STRING);\n }",
"public String getDataType()\n {\n String v = (String)this.getFieldValue(FLD_dataType);\n return StringTools.trim(v);\n }",
"public String getDataType() \n {\n System.out.println(dataType.getValue().toString());\n return dataType.getValue().toString(); \n }",
"public String getDataType() ;",
"public String getType() {\n return getGeometryType();\n }",
"public String getDataType() {\r\n return dataType;\r\n }",
"public String getDataType() {\n return dataType;\n }",
"public String getDatatype()\n {\n return mDatatype;\n }",
"public String datatype() {\n\t\treturn datatype;\n\t}",
"protected String getDataType()\n {\n return dataType;\n }",
"int getDataTypeValue();",
"public int getDataType();",
"@Override\n public String getDataType() {\n return getPrimitiveType().name();\n }",
"public Class getDataType() {\n return datatype;\n }",
"@Override\n\tpublic int getDataType()\n\t{\n\t\treturn dataType;\n\t}",
"public int getDataTypeValue() {\n return dataType_;\n }",
"@Override\n\tpublic DataType getDataType() {\n\t\tif (dataType == null) {\n\t\t\tdataType = getDataType(getProgram());\n\t\t}\n\t\treturn dataType;\n\t}",
"public CellDataTypeEnum getDataType() {\n return dataType;\n }",
"public GeoJsonType getType() {\n return this.type;\n }",
"public final DATATYPE getDataType(){\n\t\t\n\t\treturn wDataType;\n\t}",
"public int getDataTypeValue() {\n return dataType_;\n }",
"DType getType();",
"public int getDataType()\n {\n return dtype;\n }",
"private String getPostgresTypeForAccessDataType(DataType type) {\n\t\tif (type.equals(DataType.BOOLEAN))\n\t\t\treturn \"bool\";\n\t\tif (type.equals(DataType.BINARY))\n\t\t\treturn \"int2\";\n\t\tif (type.equals(DataType.BYTE))\n\t\t\treturn \"int2\";\n\t\tif (type.equals(DataType.COMPLEX_TYPE))\n\t\t\treturn \"bit\";\n\t\tif (type.equals(DataType.DOUBLE))\n\t\t\treturn \"double precision\";\n\t\tif (type.equals(DataType.FLOAT))\n\t\t\treturn \"float4\";\n\t\tif (type.equals(DataType.GUID))\n\t\t\treturn \"character varying(255)\";\n\t\tif (type.equals(DataType.INT))\n\t\t\treturn \"int4\";\n\t\tif (type.equals(DataType.LONG))\n\t\t\treturn \"int8\";\n\t\tif (type.equals(DataType.MEMO))\n\t\t\treturn \"text\";\n\t\tif (type.equals(DataType.MONEY))\n\t\t\treturn \"numeric\";\n\t\tif (type.equals(DataType.NUMERIC))\n\t\t\treturn \"decimal(20,4)\";\n\t\tif (type.equals(DataType.OLE))\n\t\t\treturn \"bytea\";\n\t\t//\n\t\t// Note that we can't tell if its really a DATE, TIME or TIMESTAMP. So\n\t\t// users will\n\t\t// have to use the schema editor to change it as appropriate.\n\t\t//\n\t\tif (type.equals(DataType.SHORT_DATE_TIME))\n\t\t\treturn \"timestamp\";\n\t\tif (type.equals(DataType.TEXT))\n\t\t\treturn \"character varying(255)\";\n\t\treturn \"text\";\n\t}",
"public static String getGeometryType(int featureType) {\r\n String tag = null;\r\n switch (featureType) {\r\n\r\n case EsriShapefile.POINT : // 1\r\n case EsriShapefile.POINTZ : // 11\r\n tag = Geometry.TYPE_POINT;\r\n\r\n break;\r\n\r\n case EsriShapefile.POLYLINE : // 3\r\n case EsriShapefile.POLYLINEZ : // 13\r\n tag = Geometry.TYPE_LINESTRING;\r\n\r\n break;\r\n\r\n case EsriShapefile.POLYGON : // 5\r\n case EsriShapefile.POLYGONZ : // 15\r\n tag = Geometry.TYPE_POLYGON;\r\n\r\n break;\r\n\r\n default :\r\n tag = null;\r\n\r\n break;\r\n }\r\n\r\n return tag;\r\n }",
"@RestrictTo(RestrictTo.Scope.LIBRARY)\n @DataType\n public int getDataType() {\n return mBundle.getInt(DATA_TYPE_FIELD, -1);\n }",
"public com.zzsong.netty.protobuff.two.ProtoData.MyDataInfo.DataType getDataType() {\n @SuppressWarnings(\"deprecation\")\n com.zzsong.netty.protobuff.two.ProtoData.MyDataInfo.DataType result = com.zzsong.netty.protobuff.two.ProtoData.MyDataInfo.DataType.valueOf(dataType_);\n return result == null ? com.zzsong.netty.protobuff.two.ProtoData.MyDataInfo.DataType.UNRECOGNIZED : result;\n }",
"public interface GeoData{\r\n /**\r\n * Most geodata sets contain features for which there is no data, or the data is missing.<br>\r\n * In these cases a specific value is often used to represent these special cases.<p>\r\n * The static final value MISSING is the default value used by GeoDatas to represent\r\n * these cases.\r\n * @see #setMissingValueCode\r\n * @see #getMissingValueCode\r\n */\r\n public static final double MISSING = Double.NaN;\r\n\r\n\t\t/** \r\n\t\t * All geodata have a type - this is particularly important when\r\n\t\t * interfacing with other data sources/formats.\r\n\t\t * @see #setDataType\r\n\t\t * @see #getDataType\r\n\t\t */\r\n\t\tpublic static final int CHARACTER = 0;\r\n\t\tpublic static final int INTEGER = 1;\r\n\t\tpublic static final int FLOATING = 2;\r\n \r\n /**\r\n * All GeoData objects can have a name associated with them.<br>\r\n * Typicaly the name will match the Column heading from which the data came from.<br>\r\n * Names can be important when the GeoData is used in thematic maps as this is the\r\n * name that will be placed in the key by default.<br>\r\n * @author James Macgill JM\r\n * @return String The name associated with this GeoData.\r\n */\r\n String getName();\r\n /**\r\n * All GeoData objects can have a name associated with them.<br>\r\n * Typicaly the name will match the Column heading from which the data came from.<br>\r\n * Names can be important when the GeoData is used in thematic maps as this is the\r\n * name that will be placed in the key by default.<br>\r\n *\r\n * @author James Macgill JM\r\n * @param name_ The name to be associated with this GeoData.\r\n */\r\n void setName(String name_);\r\n \r\n \r\n /**\r\n * looks up and matches a value to the specifed feature id.<br>\r\n * Used for example by shaders to obtain vaules for thematic mapping.<br>\r\n *\r\n * @author James Macgill JM\r\n * @param id An int specifying the feature id to retreve a value for.\r\n * @return double The value for the specified id, if no id matches the one given then the value specifed by setMissingValue should be returned.\r\n * @see #setMissingValue\r\n */\r\n double getValue(int id);\r\n \r\n /**\r\n * Looks up and retreves a string for the specifed feature id.<br>\r\n * Used for example by the ToolTip feature in Themes to provide tool tip text for each feature.\r\n *\r\n * @author James Macgill JM\r\n * @param id An int specifying the feature to retreve the text for.\r\n * @return String A piece of text for the chosen feature id. If no id matches then an empty string should be returned \" \"\r\n */\r\n String getText(int id);\r\n \r\n /**\r\n * In order to allow systems to iterate through all of the data contained within the GeoData object this\r\n * method provides a list of all of the IDs which have associated values stored.\r\n *\r\n * @author James Macgill JM\r\n * @return Enumeration An enumeration of all of the IDs which can then be iterated through.\r\n */\r\n Enumeration getIds();\r\n \r\n /**\r\n * Not all posible ids will have a value stored in the GeoData object, so when a call is made to getValue with an id that is\r\n * not stored a special value is returned to signify that a value for this id is missing.<br>\r\n * By default that value is set to MISSING, however this behavoir can be changed by calling this method with a new value.<br>\r\n * \r\n * @see #getMissingValueCode\r\n * @author James Macgill JM\r\n * @param mv A double containing the new value to represent missing data.\r\n */\r\n public void setMissingValueCode(double mv);\r\n \r\n /**\r\n * Not all posible ids will have a value stored in the GeoData object, so when a call is made to getValue with an id that is\r\n * not stored a special value is returned to signify that a value for this id is missing.<br>\r\n * A call to this method will return the current code in use to represent that situation.<br>\r\n *\r\n * @see #setMissingValueCode\r\n * @author James Macgill JM\r\n * @return double The current value representing missing data.\r\n */ \r\n public double getMissingValueCode();\r\n \r\n /**\r\n * A quick statistic relating to the values stored in the GeoData object.<br>\r\n * \r\n * @author James Macgill JM\r\n * @return double The largest value currently stored in this GeoData. The missingValueCode is not included in this test.\r\n */\r\n double getMax();\r\n \r\n /**\r\n * A quick statistic relating to the values stored in the GeoData object.<br>\r\n * \r\n * @author James Macgill JM\r\n * @return double The smallest value currently stored in this GeoData. The missingValueCode is not included in this test.\r\n */\r\n double getMin();\r\n \r\n /**\r\n * The total number of stored id/value pairs stored in this GeoData.\r\n * @author James Macgill JM\r\n * @return int The number of values stored in this GeoData.\r\n */\r\n int getSize();\r\n \r\n /**\r\n * The total number of stored values stored in this GeoData which equal the missing value code.\r\n * @author James Macgill JM\r\n * @return int The number of missing values stored in this GeoData.\r\n */\r\n int getMissingCount();\r\n\r\n\t\t/** \r\n\t\t * Gets the type of data stored in the geodata<br>\r\n\t\t * <ul><li>String - GeoData.CHARACTER</li> \r\n\t\t * <li>Integer - GeoData.INTEGER</li>\r\n\t\t * <li>Double - GeoData.FLOATING</li></ul>\r\n\t\t */\r\n\t\t int getDataType();\r\n\t\t/** \r\n\t\t * Sets the type of data stored in the geodata<br>\r\n\t\t * <ul><li>String - GeoData.character</li> \r\n\t\t * <li>Integer - GeoData.integer</li>\r\n\t\t * <li>Double - GeoData.float</li></ul>\r\n\t\t */\r\n\t\t void setDataType(int type );\r\n}",
"public DataType getDataType() {\r\n\t\treturn dataType;\r\n\t}",
"public com.zzsong.netty.protobuff.two.ProtoData.MyDataInfo.DataType getDataType() {\n @SuppressWarnings(\"deprecation\")\n com.zzsong.netty.protobuff.two.ProtoData.MyDataInfo.DataType result = com.zzsong.netty.protobuff.two.ProtoData.MyDataInfo.DataType.valueOf(dataType_);\n return result == null ? com.zzsong.netty.protobuff.two.ProtoData.MyDataInfo.DataType.UNRECOGNIZED : result;\n }",
"com.google.protobuf.ByteString getDataTypeBytes();",
"public DataType getDataType() {\n return this.dataType;\n }",
"CharacterStringDataType getStringTypeOption();",
"public String getType() {\n\t\treturn gfType;\n\t}",
"private DataTypes getDataType(String token){\n token = token.trim();\n if (token.endsWith(\"]\"))\n return DataTypes.List;\n else if (token.endsWith(\"}\"))\n return DataTypes.Map;\n else if (token.startsWith(\"\\\"\"))\n return DataTypes.String;\n else if (token.toLowerCase().equals(\"null\"))\n return DataTypes.Null;\n else {\n if (token.toLowerCase().equals(\"true\") || token.toLowerCase().equals(\"false\"))\n return DataTypes.Boolean;\n else {\n if (token.contains(\".\"))\n return DataTypes.Float;\n else\n return DataTypes.Integer;\n }\n }\n }",
"com.google.cloud.datacatalog.FieldType getType();",
"FeatureType getType();",
"java.lang.String getType();",
"java.lang.String getType();",
"java.lang.String getType();",
"java.lang.String getType();",
"java.lang.String getType();",
"java.lang.String getType();",
"java.lang.String getType();",
"java.lang.String getType();",
"java.lang.String getType();",
"java.lang.String getType();",
"java.lang.String getType();",
"java.lang.String getType();",
"java.lang.String getType();",
"public String getData_type_desc() {\n return data_type_desc;\n }",
"public String getTypeString() {\r\n return Prediction.getTypeString(type);\r\n }",
"public DataType getType() {\n return type;\n }",
"@Override\n protected String getRuntimeType(int type, String typeName, int precision) {\n if (\"geometry\".equalsIgnoreCase(typeName)) { //$NON-NLS-1$\n return TypeFacility.RUNTIME_NAMES.GEOMETRY;\n }\n if (\"geography\".equalsIgnoreCase(typeName)) { //$NON-NLS-1$\n return TypeFacility.RUNTIME_NAMES.GEOGRAPHY;\n }\n if (\"json\".equalsIgnoreCase(typeName) || \"jsonb\".equalsIgnoreCase(typeName)) { //$NON-NLS-1$ //$NON-NLS-2$\n return TypeFacility.RUNTIME_NAMES.JSON;\n }\n if (PostgreSQLExecutionFactory.UUID_TYPE.equalsIgnoreCase(typeName)) {\n return TypeFacility.RUNTIME_NAMES.STRING;\n }\n return super.getRuntimeType(type, typeName, precision);\n }",
"public static String getCQLDataType(Schema.Type dataType) throws TimeSeriesException {\r\n\t\tswitch(dataType) {\r\n\t\t\tcase DOUBLE: \r\n\t\t\t\treturn \"double\";\r\n\t\t\tcase BOOLEAN: \r\n\t\t\t\treturn \"boolean\";\r\n\t\t\tcase FLOAT: \r\n\t\t\t\treturn \"float\";\r\n\t\t\tcase INT: \r\n\t\t\t\treturn \"int\";\r\n\t\t\tcase LONG: \r\n\t\t\t\treturn \"bigint\";\t\t\t\t\r\n\t\t\tcase STRING: \r\n\t\t\t\treturn \"varchar\";\r\n\t\t\tcase BYTES: \r\n\t\t\t\treturn \"blob\";\r\n\t\t\tdefault: \r\n\t\t\t\tthrow new TimeSeriesException(\"Requested data type is currently not supported \" + dataType);\r\n\t\t}\r\n\t}",
"public abstract MetricDataType getType();",
"String getTypeAsString();",
"private static String getColumnType(String columnValue) {\n\t\ttry {\r\n\t\t\tInteger.parseInt(columnValue);\r\n\t\t\treturn \"INTEGER\";\r\n\t\t} catch (Throwable error) {}\r\n\t\t// then, try to parse it as a float\r\n\t\ttry {\r\n\t\t\tDouble.parseDouble(columnValue);\r\n\t\t\treturn \"REAL\";\r\n\t\t} catch (Throwable error) {}\r\n\t\t// otherwise, it's a text column\r\n\t\treturn \"TEXT\";\r\n\t}",
"public Class dataType() {\n return this.dataType;\n }",
"public StrColumn getType() {\n return (StrColumn) (isText ? textFields.computeIfAbsent(\"type\", StrColumn::new) :\n getBinaryColumn(\"type\"));\n }",
"String getType();",
"String getType();",
"String getType();",
"String getType();",
"String getType();",
"String getType();",
"String getType();",
"String getType();",
"String getType();",
"String getType();",
"String getType();",
"String getType();",
"String getType();",
"String getType();",
"String getType();",
"String getType();",
"String getType();",
"String getType();",
"String getType();",
"String getType();",
"String getType();",
"String getType();",
"String getType();",
"String getType();",
"String getType();",
"public String getPrimitiveType() {\r\n return type;\r\n }",
"public short get_dataType() {\n return (short)getUIntBEElement(offsetBits_dataType(), 8);\n }",
"private TsPrimitiveType readOneValue() {\n switch (dataType) {\n case BOOLEAN:\n return new TsBoolean(valueDecoder.readBoolean(valueInputStream));\n case INT32:\n return new TsInt(valueDecoder.readInt(valueInputStream));\n case INT64:\n return new TsLong(valueDecoder.readLong(valueInputStream));\n case FLOAT:\n return new TsFloat(valueDecoder.readFloat(valueInputStream));\n case DOUBLE:\n return new TsDouble(valueDecoder.readDouble(valueInputStream));\n case TEXT:\n return new TsBinary(valueDecoder.readBinary(valueInputStream));\n default:\n break;\n }\n throw new UnSupportedDataTypeException(\"Unsupported data type :\" + dataType);\n }",
"public String getType() {\n\t\tCharacter tempType = (char)type;\n\t\treturn tempType.toString();\n\t}",
"Integer getDataStrt();",
"public DataBufferType getType()\r\n {\r\n return type;\r\n }",
"public static String getGeometryType(EsriShapefile.EsriFeature feature,\r\n int numParts) {\r\n String tag = null;\r\n if (numParts == 0) {\r\n return tag;\r\n }\r\n if ((feature instanceof EsriShapefile.EsriPoint)\r\n || (feature instanceof EsriShapefile.EsriPointZ)) {\r\n if (numParts == 1) {\r\n tag = Geometry.TYPE_POINT;\r\n } else {\r\n tag = Geometry.TYPE_MULTIPOINT;\r\n }\r\n } else if ((feature instanceof EsriShapefile.EsriPolyline)\r\n || (feature instanceof EsriShapefile.EsriPolylineZ)) {\r\n if (numParts == 1) {\r\n tag = Geometry.TYPE_LINESTRING;\r\n } else {\r\n tag = Geometry.TYPE_MULTILINESTRING;\r\n }\r\n } else if ((feature instanceof EsriShapefile.EsriPolygon)\r\n || (feature instanceof EsriShapefile.EsriPolygonZ)) {\r\n if (numParts == 1) {\r\n tag = Geometry.TYPE_POLYGON;\r\n } else {\r\n tag = Geometry.TYPE_MULTIPOLYGON;\r\n }\r\n }\r\n\r\n return tag;\r\n }",
"protected abstract DTDataTypes52 getDataType(C column);",
"DataType getBase_DataType();",
"public String getrType() {\n return rType;\n }",
"public static String getJavaDatatype(Object object){\n\t\treturn object.getClass().toString().split(\" \")[1]; \n\t}",
"String type();",
"String type();"
] |
[
"0.7158191",
"0.7133301",
"0.7031324",
"0.68896174",
"0.6643037",
"0.66194403",
"0.65592456",
"0.65205693",
"0.65079665",
"0.64946574",
"0.6368145",
"0.63200426",
"0.63168544",
"0.628527",
"0.6182194",
"0.61266756",
"0.6124032",
"0.605681",
"0.6045273",
"0.6018928",
"0.5992839",
"0.5978053",
"0.59697884",
"0.5955214",
"0.58985376",
"0.5858876",
"0.585814",
"0.5842696",
"0.58397716",
"0.58320975",
"0.58089453",
"0.57903147",
"0.5763338",
"0.57365227",
"0.5712883",
"0.5702051",
"0.568595",
"0.5680469",
"0.5662669",
"0.56335527",
"0.56335527",
"0.56335527",
"0.56335527",
"0.56335527",
"0.56335527",
"0.56335527",
"0.56335527",
"0.56335527",
"0.56335527",
"0.56335527",
"0.56335527",
"0.56335527",
"0.5628698",
"0.5626612",
"0.56194544",
"0.5585081",
"0.5577801",
"0.55462384",
"0.5532",
"0.552915",
"0.55181956",
"0.5517702",
"0.55128634",
"0.55128634",
"0.55128634",
"0.55128634",
"0.55128634",
"0.55128634",
"0.55128634",
"0.55128634",
"0.55128634",
"0.55128634",
"0.55128634",
"0.55128634",
"0.55128634",
"0.55128634",
"0.55128634",
"0.55128634",
"0.55128634",
"0.55128634",
"0.55128634",
"0.55128634",
"0.55128634",
"0.55128634",
"0.55128634",
"0.55128634",
"0.55128634",
"0.55088806",
"0.55078614",
"0.5495645",
"0.54693645",
"0.54626936",
"0.5419081",
"0.5416387",
"0.541062",
"0.5409856",
"0.5395067",
"0.5394839",
"0.53885853",
"0.53885853"
] |
0.64661455
|
10
|
Sets the type of data stored in the geodata String GeoData.character Integer GeoData.integer Double GeoData.float
|
void setDataType(int type );
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public void setDataType(String dataType) {\r\n this.dataType = dataType;\r\n }",
"public void setDataType(String dataType) {\n this.dataType = dataType;\n }",
"public void setType(String t) {\n\t\tgfType = t;\n\t}",
"public void setDataType(DataType dataType) {\n this.dataType = dataType;\n }",
"public void setDataType(DataType dataType) {\r\n\t\tthis.dataType = dataType;\r\n\t}",
"public void setType(String string) {\n\t\tthis.type = string;\n\t\t\n\t}",
"public void setDataType(String v)\n {\n this.setFieldValue(FLD_dataType, StringTools.trim(v));\n }",
"public void setDataType(CellDataTypeEnum dataType) {\n this.dataType = dataType;\n }",
"private void setGeometry() {\n GeometryDescriptor geomDesc = featureSource.getSchema().getGeometryDescriptor();\n geometryAttributeName = geomDesc.getLocalName();\n\n Class<?> clazz = geomDesc.getType().getBinding();\n\n if (Polygon.class.isAssignableFrom(clazz) || MultiPolygon.class.isAssignableFrom(clazz)) {\n geometryType = GeomType.POLYGON;\n\n } else if (LineString.class.isAssignableFrom(clazz)\n || MultiLineString.class.isAssignableFrom(clazz)) {\n\n geometryType = GeomType.LINE;\n\n } else {\n geometryType = GeomType.POINT;\n }\n}",
"public void changeDataType(int type) throws IOException, NumberFormatException {\r\n saveDataType(type);\r\n loadDataType();\r\n }",
"void setType(java.lang.String type);",
"public void setDataType(int atype)\n {\n dtype = atype;\n }",
"@Override\n\tpublic void setDataType(Class<?> dataType) {\n\t\t\n\t}",
"public void setType (String typ) {\n type = typ;\n }",
"public void setDataType(String dataType) {\n this.dataType = dataType == null ? null : dataType.trim();\n }",
"public void setData_type_desc(String data_type_desc) {\n this.data_type_desc = data_type_desc;\n }",
"public void setType(String t) {\n\ttype = t;\n }",
"public void setType(String type);",
"public void setType(String type);",
"public void setType(String type);",
"public void setType(String t) {\n\t\tthis.type = t;\n\t}",
"java.lang.String getDataType();",
"private void setType(String type) {\n mType = type;\n }",
"public void setField(String fieldName, String value, Class type) {\n Field field;\n try {\n field = this.getClass().getField(fieldName);\n } catch (NoSuchFieldException e) {\n log.error(String.format(\"Data record does not have field - %s. Error: %s\", fieldName, e.getMessage()));\n return;\n }\n\n final String typeString = type.toString();\n\n if (typeString.equals(Double.class.toString())) {\n setDouble(field, value);\n } else if (typeString.equals(String.class.toString())) {\n setString(field, value);\n }\n }",
"public interface GeoData{\r\n /**\r\n * Most geodata sets contain features for which there is no data, or the data is missing.<br>\r\n * In these cases a specific value is often used to represent these special cases.<p>\r\n * The static final value MISSING is the default value used by GeoDatas to represent\r\n * these cases.\r\n * @see #setMissingValueCode\r\n * @see #getMissingValueCode\r\n */\r\n public static final double MISSING = Double.NaN;\r\n\r\n\t\t/** \r\n\t\t * All geodata have a type - this is particularly important when\r\n\t\t * interfacing with other data sources/formats.\r\n\t\t * @see #setDataType\r\n\t\t * @see #getDataType\r\n\t\t */\r\n\t\tpublic static final int CHARACTER = 0;\r\n\t\tpublic static final int INTEGER = 1;\r\n\t\tpublic static final int FLOATING = 2;\r\n \r\n /**\r\n * All GeoData objects can have a name associated with them.<br>\r\n * Typicaly the name will match the Column heading from which the data came from.<br>\r\n * Names can be important when the GeoData is used in thematic maps as this is the\r\n * name that will be placed in the key by default.<br>\r\n * @author James Macgill JM\r\n * @return String The name associated with this GeoData.\r\n */\r\n String getName();\r\n /**\r\n * All GeoData objects can have a name associated with them.<br>\r\n * Typicaly the name will match the Column heading from which the data came from.<br>\r\n * Names can be important when the GeoData is used in thematic maps as this is the\r\n * name that will be placed in the key by default.<br>\r\n *\r\n * @author James Macgill JM\r\n * @param name_ The name to be associated with this GeoData.\r\n */\r\n void setName(String name_);\r\n \r\n \r\n /**\r\n * looks up and matches a value to the specifed feature id.<br>\r\n * Used for example by shaders to obtain vaules for thematic mapping.<br>\r\n *\r\n * @author James Macgill JM\r\n * @param id An int specifying the feature id to retreve a value for.\r\n * @return double The value for the specified id, if no id matches the one given then the value specifed by setMissingValue should be returned.\r\n * @see #setMissingValue\r\n */\r\n double getValue(int id);\r\n \r\n /**\r\n * Looks up and retreves a string for the specifed feature id.<br>\r\n * Used for example by the ToolTip feature in Themes to provide tool tip text for each feature.\r\n *\r\n * @author James Macgill JM\r\n * @param id An int specifying the feature to retreve the text for.\r\n * @return String A piece of text for the chosen feature id. If no id matches then an empty string should be returned \" \"\r\n */\r\n String getText(int id);\r\n \r\n /**\r\n * In order to allow systems to iterate through all of the data contained within the GeoData object this\r\n * method provides a list of all of the IDs which have associated values stored.\r\n *\r\n * @author James Macgill JM\r\n * @return Enumeration An enumeration of all of the IDs which can then be iterated through.\r\n */\r\n Enumeration getIds();\r\n \r\n /**\r\n * Not all posible ids will have a value stored in the GeoData object, so when a call is made to getValue with an id that is\r\n * not stored a special value is returned to signify that a value for this id is missing.<br>\r\n * By default that value is set to MISSING, however this behavoir can be changed by calling this method with a new value.<br>\r\n * \r\n * @see #getMissingValueCode\r\n * @author James Macgill JM\r\n * @param mv A double containing the new value to represent missing data.\r\n */\r\n public void setMissingValueCode(double mv);\r\n \r\n /**\r\n * Not all posible ids will have a value stored in the GeoData object, so when a call is made to getValue with an id that is\r\n * not stored a special value is returned to signify that a value for this id is missing.<br>\r\n * A call to this method will return the current code in use to represent that situation.<br>\r\n *\r\n * @see #setMissingValueCode\r\n * @author James Macgill JM\r\n * @return double The current value representing missing data.\r\n */ \r\n public double getMissingValueCode();\r\n \r\n /**\r\n * A quick statistic relating to the values stored in the GeoData object.<br>\r\n * \r\n * @author James Macgill JM\r\n * @return double The largest value currently stored in this GeoData. The missingValueCode is not included in this test.\r\n */\r\n double getMax();\r\n \r\n /**\r\n * A quick statistic relating to the values stored in the GeoData object.<br>\r\n * \r\n * @author James Macgill JM\r\n * @return double The smallest value currently stored in this GeoData. The missingValueCode is not included in this test.\r\n */\r\n double getMin();\r\n \r\n /**\r\n * The total number of stored id/value pairs stored in this GeoData.\r\n * @author James Macgill JM\r\n * @return int The number of values stored in this GeoData.\r\n */\r\n int getSize();\r\n \r\n /**\r\n * The total number of stored values stored in this GeoData which equal the missing value code.\r\n * @author James Macgill JM\r\n * @return int The number of missing values stored in this GeoData.\r\n */\r\n int getMissingCount();\r\n\r\n\t\t/** \r\n\t\t * Gets the type of data stored in the geodata<br>\r\n\t\t * <ul><li>String - GeoData.CHARACTER</li> \r\n\t\t * <li>Integer - GeoData.INTEGER</li>\r\n\t\t * <li>Double - GeoData.FLOATING</li></ul>\r\n\t\t */\r\n\t\t int getDataType();\r\n\t\t/** \r\n\t\t * Sets the type of data stored in the geodata<br>\r\n\t\t * <ul><li>String - GeoData.character</li> \r\n\t\t * <li>Integer - GeoData.integer</li>\r\n\t\t * <li>Double - GeoData.float</li></ul>\r\n\t\t */\r\n\t\t void setDataType(int type );\r\n}",
"public void setType(String value) {\n this.type = value;\n }",
"public void setType(String type) {\n m_Type = type;\n }",
"public void setDataType(byte dataType) {\r\n\t\tthis.dataType = dataType;\t\t\r\n\t}",
"@Override\n\tpublic void setType(String type) {\n\t}",
"public void setDataType(Class newclass) {\n datatype=newclass;\n }",
"@JsonProperty(\"data_type\")\n public void setDataType(Term dataType) {\n this.dataType = dataType;\n }",
"public void setData_type_id(int data_type_id) {\n this.data_type_id = data_type_id;\n }",
"public void setType(String inType)\n {\n\ttype = inType;\n }",
"public final void setType(String type){\n\t\tthis.type = type;\t\n\t}",
"public String getDataType() {\r\n return dataType;\r\n }",
"public void setDataType(final Class<? extends AttributeDescription> dataType);",
"public void setType(String aType) {\n iType = aType;\n }",
"public final native void setType(String type) /*-{\n this.setType(type);\n }-*/;",
"public void setType(String type)\r\n {\r\n this.mType = type;\r\n }",
"public String getDataType() {\n return dataType;\n }",
"public void setType(String type){\n \tthis.type = type;\n }",
"public String getType() {\n return getGeometryType();\n }",
"public void setType(String newtype)\n {\n type = newtype;\n }",
"public void setType(String type) {\n\t\tif (Input.isTypeValid(furniture.toLowerCase(), type.toLowerCase())) {\n\t\t\tLocateRequest.type = type; // makes sure that type is valid\n\t\t} else {\n\t\t\t// error message that type is not valid\n\t\t\tSystem.err.print(\"The furniture type provided is not valid\");\n\t\t}\n\t}",
"public SeriesInstance setType( String theString) {\n\t\tmyType = new StringDt(theString); \n\t\treturn this; \n\t}",
"public void setFieldType(String str)\n {\n if (str == null || str.trim().length() == 0)\n throw new IllegalArgumentException(\n \"type must not be null or empty\");\n\n // Threshold\n if (m_strFieldType.equalsIgnoreCase(str))\n return;\n\n if (!isValidFieldType(str))\n throw new IllegalArgumentException(\n \"Invalid field type specified for search field\");\n\n if (str.length() > FIELDTYPE_LENGTH)\n throw new IllegalArgumentException(\n \"field type must not exceed \" + FIELDTYPE_LENGTH +\n \"characters\");\n\n setDirty();\n m_strFieldType = str;\n }",
"public void setType(String type) \n {\n this.type = type;\n }",
"public void set_type(String t)\n {\n type =t;\n }",
"protected void setType(String newType) {\n\t\ttype = newType;\n\t}",
"public void setDataFormatTypes(String dataFormatTypes) {\n this.dataFormatTypes = dataFormatTypes;\n }",
"public void setType(char type) {\n this.type = type;\n }",
"public void setType(char type) {\n this.type = type;\n }",
"public void setType(String type) {\r\n this.type = type.trim();\r\n }",
"public void setType (String type) {\n this.type = type;\n }",
"public void setType (String type) {\n this.type = type;\n }",
"public void setType (String type) {\n this.type = type;\n }",
"public void setType( String type )\n {\n this.type = type;\n }",
"@JsProperty(name = \"type\")\n public native void setType(String value);",
"public void m7908c(String type) {\n this.f6690c = type;\n }",
"public void setType(String type) {\n this.type = type;\n }",
"protected String getDataType()\n {\n return dataType;\n }",
"public void setType(String type){\n this.type = type;\n }",
"public String getDataType() ;",
"public void setType(String type) {\n\t this.mType = type;\n\t}",
"private void setTypeLatitude(String latitude, String longitude) {\n type = WeatherConsts.TYPE_LATITUDE;\n param1 = latitude;\n param2 = longitude;\n }",
"public void setType(String newValue);",
"public void setType(String newValue);",
"public void setType (String type) { n.setAttribute(ATTNAMECOMMONPREFIX + ATTNAMESUFFIX_TYPE , type); }",
"void setType(String type) {\n this.type = type;\n }",
"public void setType(String type) {\r\n this.type = type;\r\n }",
"public void setType(String type) {\n this.type = type;\n }",
"public void setType(String type) {\n this.type = type;\n }",
"@Override\n public void setType(String type) {\n this.type = type;\n }",
"public void setType(String type){\r\n if(type == null){\r\n throw new IllegalArgumentException(\"Type can not be null\");\r\n }\r\n this.type = type;\r\n }",
"public GeoJsonType getType() {\n return this.type;\n }",
"public void setType(java.lang.String newType) {\n\ttype = newType;\n}",
"public void setType(String name){\n\t\ttype = name;\n\t}",
"final public void setType(String type)\n {\n setProperty(TYPE_KEY, (type));\n }",
"public void setType( String type ) {\n this.type = type;\n }",
"public void setType(String type) {\r\n this.type = type;\r\n }",
"public void setType(String type) {\r\n this.type = type;\r\n }",
"public void setType(String type) {\r\n this.type = type;\r\n }",
"public void setType(String type) {\r\n this.type = type;\r\n }",
"public void setType(Object type)\r\n {\r\n\tthis.type = type;\r\n }",
"private CData convert(EValueType type, String str) {\n switch (type)\n {\n case DOUBLE_64:\n return new CData(type, Double.valueOf(str));\n case FLOAT_32:\n return new CData(type, Float.valueOf(str));\n case INT_16:\n return new CData(type, Short.valueOf(str));\n case INT_32:\n return new CData(type, Integer.valueOf(str));\n case INT_64:\n return new CData(type, Long.valueOf(str));\n case INT_8:\n return new CData(type, str.charAt(0));\n case UINT_64:\n return new CData(type, Long.valueOf(str));\n case UINT_32:\n return new CData(type, Long.valueOf(str));\n case UINT_16:\n return new CData(type, Character.valueOf(str.charAt(0)));\n case UINT_8:\n return new CData(type, str.charAt(0));\n case VOID:\n default:\n return CData.VOID;\n }\n }",
"public void setType(String type){\n\t\tthis.type = type;\n\t}",
"public void setType(String newVal) {\n if ((newVal != null && this.type != null && (newVal.compareTo(this.type) == 0)) || \n (newVal == null && this.type == null && type_is_initialized)) {\n return; \n } \n this.type = newVal; \n\n type_is_modified = true; \n type_is_initialized = true; \n }",
"public void setType(String type) {\r\n this.type = type;\r\n }",
"public final void setType(String type) {\n this.type = type;\n }",
"public void setType(String type) {\n this.type = type;\n }",
"public void setType(String type) {\n this.type = type;\n }",
"public void setType(String val) {\n type = val;\n }",
"public void loadDataType() throws IOException, NumberFormatException {\r\n InputStream flux;\r\n flux = new FileInputStream(\"././ressources/datatype.txt\");\r\n BufferedReader buff;\r\n InputStreamReader inputStreamReader = new InputStreamReader(flux);\r\n buff = new BufferedReader(inputStreamReader);\r\n String line;\r\n line = buff.readLine();\r\n int type = Integer.parseInt(line);\r\n leftShoe.getSerialReader().setDataType(type);\r\n rightShoe.getSerialReader().setDataType(type);\r\n buff.close();\r\n inputStreamReader.close();\r\n flux.close();\r\n }",
"public void setType(String type) {\r\n\t\tthis.type=type;\r\n\t}",
"public void setType(String type) {\r\r\n\t\tthis.type = type;\r\r\n\t}",
"public void setType(String type)\n\t{\n\t\tthis.type = type;\n\t}",
"public void setLocationType(String locationType);",
"protected void setType(String requiredType){\r\n type = requiredType;\r\n }",
"public void setType(String type) {\n this.type = type;\n }",
"public void setType(String type) {\n this.type = type;\n }"
] |
[
"0.6424494",
"0.6390863",
"0.6369914",
"0.63006824",
"0.6192137",
"0.6183594",
"0.6158458",
"0.6154374",
"0.61171204",
"0.60758245",
"0.6043769",
"0.60432655",
"0.60154456",
"0.6014479",
"0.59837586",
"0.5970371",
"0.5932251",
"0.5917933",
"0.5917933",
"0.5917933",
"0.58744895",
"0.58178055",
"0.57993746",
"0.5792028",
"0.57853216",
"0.5778495",
"0.5778278",
"0.5774094",
"0.5753865",
"0.5730388",
"0.5721822",
"0.5719064",
"0.57063687",
"0.57039106",
"0.569241",
"0.567101",
"0.5668351",
"0.5650333",
"0.56493205",
"0.56466484",
"0.5627896",
"0.562118",
"0.56039125",
"0.56022704",
"0.56009364",
"0.55970293",
"0.5596439",
"0.559145",
"0.5579835",
"0.5567653",
"0.5566606",
"0.5566606",
"0.55609566",
"0.55587906",
"0.55587906",
"0.55587906",
"0.5553078",
"0.55500257",
"0.554998",
"0.5548048",
"0.5545857",
"0.55291873",
"0.5526144",
"0.55246115",
"0.5519267",
"0.5516447",
"0.5516447",
"0.5515236",
"0.5502268",
"0.5500863",
"0.54999524",
"0.54999524",
"0.5490884",
"0.5490474",
"0.54871213",
"0.5484675",
"0.54757595",
"0.5466449",
"0.5461511",
"0.5455371",
"0.5455371",
"0.5455371",
"0.5455371",
"0.5449762",
"0.5444751",
"0.5442149",
"0.54390264",
"0.54230297",
"0.54207385",
"0.5416293",
"0.5416293",
"0.5407078",
"0.5403544",
"0.5401321",
"0.53988194",
"0.53908",
"0.5389326",
"0.5387295",
"0.5379961",
"0.5379961"
] |
0.67675316
|
0
|
Creates a blank team
|
public Team() {
this(null);
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"void create(Team team);",
"Team createTeam();",
"public static void createNewLeague()\n\t{\n\t\t//put code to get input from end-user here.\n\t\t//generateFixtures(leagueName, teamAmount, homeAndAway, winPoints, drawPoints, lossPoints, teamNames);\n\t}",
"public void newTeam(Team team);",
"public void createTeam(final Map<String, String> dataTable) {\n team.processInformation(dataTable);\n WebDriverHelper.waitUntil(inputTeamName);\n WebDriverHelper.setElement(inputTeamName, team.getName());\n WebDriverHelper.clickElement(dropDownTeamType);\n selectDropDownOptionByName(team.getType());\n WebDriverHelper.setElement(inputTeamDescription, team.getDescription());\n WebDriverHelper.clickElement(btnContinue);\n WebDriverHelper.waitUntil(btnThisLater);\n WebDriverHelper.clickElement(btnThisLater);\n }",
"public Team() {\r\n id = \"\";\r\n abbreviation = \"\";\r\n name = \"\";\r\n conference = \"\";\r\n division = \"\";\r\n address = null;\r\n }",
"public static ProjectTeam createSampleProjectTeam() {\n ProjectTeam team = new ProjectTeam();\n team.setProjectName(\"Rule the Galaxy\");\n team.addMember(new ProjectMember(\n \"Emperor Palpatine\", \"lead\", \"[email protected]\"));\n team.addMember(new ProjectMember(\n \"Lord Darth Vader\", \"Jedi-Killer\", \"[email protected]\"));\n team.addMember(new ProjectMember(\n \"Grand Moff Tarkin\", \"Planet-Killer\", \"[email protected]\"));\n team.addMember(new ProjectMember(\n \"Admiral Motti\", \"Death Star operations\", \"[email protected]\"));\n return team;\n }",
"public void createTeam(ActionEvent actionEvent) throws IOException, SQLException {\n if (validCreateInput()) {\n user = DatabaseManager.createTeam(user, teamNameCreateField.getText(), abbrevationCreateField.getText(), chooseCityBoxCreate.getValue().toString(),\n chooseAgeGroupCreate.getValue(), chooseLeagueBoxCreate.getValue().toString(), chooseLeagueTeamBoxCreate.getValue().toString(), createTeamLogoFile);\n\n createPaneClose(actionEvent);\n displayMessage(messagePane, \"Team created\", false);\n }\n }",
"String createTeam(String userName, String teamName, Set<String> members) throws RemoteException, InterruptedException;",
"public Team create(TeamDTO teamForm);",
"@Test\r\n\tpublic void saveTeam() {\r\n\t\t// TODO: JUnit - Populate test inputs for operation: saveTeam \r\n\t\tTeam team = new wsdm.domain.Team();\r\n\t\tservice.saveTeam(team);\r\n\t}",
"public Team(String name) {\n this.name = name;\n }",
"public static void addTeam(TeamForm tf) {\n Team team;\n\n long id = tf.id;\n\n if (!isTeam(id)) {\n team = new Team(tf.teamName, tf.location, tf.teamType, tf.skillLevel, tf.roster, tf.description, tf.imageUrl);\n team.save();\n }\n else {\n team = getTeam(id);\n team.setTeamName(tf.teamName);\n team.setLocation(tf.location);\n team.setTeamType(tf.teamType);\n team.setSkillLevel(tf.skillLevel);\n team.setRoster(tf.roster);\n team.setDescription(tf.description);\n team.setImageUrl(tf.imageUrl);\n team.setWins(tf.wins);\n team.setLosses(tf.losses);\n team.setPointsFor(tf.pointsFor);\n team.setPointsAgainst(tf.pointsAgainst);\n team.save();\n }\n }",
"public Team(String name) {\n\t\tthis(name, Color.BLACK);\n\t}",
"public Team(String name) {\r\n this.name = name;\r\n team = new ArrayList<Hero>();\r\n }",
"TeamMember(String _name, String _title) {\r\n this.name = _name;\r\n this.title = _title;\r\n }",
"private void createLeague(){ \r\n FantasyUser maxUser = new FantasyUser();\r\n maxUser.setEmail(\"[email protected]\");\r\n maxUser.setPassword(\"password\");\r\n fUserBean.create(maxUser);\r\n \r\n FantasyUser adrianUser = new FantasyUser();\r\n adrianUser.setEmail(\"[email protected]\");\r\n adrianUser.setPassword(\"password\");\r\n fUserBean.create(adrianUser);\r\n \r\n FantasyUser ashayUser = new FantasyUser();\r\n ashayUser.setEmail(\"[email protected]\");\r\n ashayUser.setPassword(\"password\");\r\n fUserBean.create(ashayUser);\r\n \r\n FantasyUser jessUser = new FantasyUser();\r\n jessUser.setEmail(\"[email protected]\");\r\n jessUser.setPassword(\"password\");\r\n fUserBean.create(jessUser);\r\n \r\n //create league\r\n FantasyLeague league = new FantasyLeague();\r\n league.setDraftStarted(false);\r\n league.setFinishedDraft(false);\r\n league.setLeagueName(\"Mongeese Only\");\r\n league.setLeagueOwner(maxUser);\r\n flBean.create(league);\r\n \r\n //create teams\r\n FantasyTeam maxTeam = new FantasyTeam();\r\n maxTeam.setTeamName(\"Max's Team\");\r\n maxTeam.setTeamOwner(maxUser);\r\n maxTeam.setLeague(league);\r\n ftBean.create(maxTeam);\r\n \r\n FantasyTeam ashayTeam = new FantasyTeam();\r\n ashayTeam.setTeamName(\"Ashay's Team\");\r\n ashayTeam.setTeamOwner(ashayUser);\r\n ashayTeam.setLeague(league);\r\n ftBean.create(ashayTeam);\r\n \r\n FantasyTeam jessTeam = new FantasyTeam();\r\n jessTeam.setTeamName(\"Jess's team\");\r\n jessTeam.setTeamOwner(jessUser);\r\n jessTeam.setLeague(league);\r\n ftBean.create(jessTeam);\r\n \r\n FantasyTeam adrianTeam = new FantasyTeam();\r\n adrianTeam.setTeamName(\"Team Greasy Pizza\");\r\n adrianTeam.setTeamOwner(adrianUser);\r\n adrianTeam.setLeague(league); \r\n ftBean.create(adrianTeam);\r\n }",
"@Test\n @Transactional\n public void createTeamWithExistingId() throws Exception {\n int databaseSizeBeforeCreate = teamRepository.findAll().size();\n\n // Create the Team with an existing ID\n team.setId(1L);\n TeamDTO teamDTO = teamMapper.toDto(team);\n\n // An entity with an existing ID cannot be created, so this API call\n // must fail\n restTeamMockMvc\n .perform(post(\"/api/teams\").contentType(TestUtil.APPLICATION_JSON_UTF8)\n .content(TestUtil.convertObjectToJsonBytes(teamDTO)))\n .andExpect(status().isBadRequest());\n\n // Validate the Team in the database\n List<Team> teamList = teamRepository.findAll();\n assertThat(teamList).hasSize(databaseSizeBeforeCreate);\n }",
"@RequestMapping(value = \"/team/{league}\", method = POST, consumes = MEDIA_JSON)\n @ResponseStatus(CREATED)\n public LobbyTeam createTeamAndEnter(@AuthenticationPrincipal UserSimpleDetails user,\n @PathVariable(\"league\") LobbyLeagueEnum league)\n throws TeamFullException, TeamNotFoundException {\n log.info(\"user {} creates team\", user.getIdentity());\n LobbyTeam team = lobbyService.createTeam(user.getProfileId(), league);\n return lobbyService.enterIntoTeam(user.getProfileId(), team.getId().toString());\n }",
"public static Team createEntity(EntityManager em) {\n Team team = new Team().name(DEFAULT_NAME).description(DEFAULT_DESCRIPTION)\n .level(DEFAULT_LEVEL).totalMember(DEFAULT_TOTAL_MEMBER)\n .extraGroupName(DEFAULT_EXTRA_GROUP_NAME)\n .extraGroupDescription(DEFAULT_EXTRA_GROUP_DESCRIPTION)\n .extraGroupTotalMember(DEFAULT_EXTRA_GROUP_TOTAL_MEMBER);\n return team;\n }",
"public void createNewTeam(ActionEvent actionEvent) throws IOException {\n createTeamPane.setDisable(false);\n createTeamPane.setVisible(true);\n darkPane.setDisable(false);\n darkPane.setVisible(true);\n\n teamNameCreateField.setText(\"\");\n abbrevationCreateField.setText(\"\");\n chooseCityBoxCreate.getSelectionModel().clearSelection();\n chooseLeagueBoxCreate.getSelectionModel().clearSelection();\n chooseAgeGroupCreate.getSelectionModel().clearSelection();\n chooseLeagueTeamBoxCreate.getSelectionModel().clearSelection();\n\n chooseLeagueBoxCreate.setDisable(true);\n chooseLeagueTeamBoxCreate.setDisable(true);\n }",
"@ApiOperation(\"Creates a Team\")\n @PostMapping(\"/API/v1/team\")\n public ResponseEntity<TeamAPI> createTeam(@RequestParam String nombreEquipo){\n TeamString salida = teamService.crearTeam(nombreEquipo, false);\n\n if(salida.getSalida().equals(\"OK\")){\n return new ResponseEntity<>(salida.getTeam().toTeamAPI(), HttpStatus.OK);\n }\n else {\n return new ResponseEntity(salida.getSalida(), HttpStatus.NOT_FOUND);\n }\n\n }",
"public Team getTeam() {\n Team team = new Team();\n team.setTeamName(this.getTeamNameDataLabel().getText());\n team.setCaptain(this.getCaptainDataLabel().getText());\n if (this.getCoachDataLabel().equals(\"\")) {\n team.setCoach(null);\n } else {\n team.setCoach(this.getCoachDataLabel().getText());\n }\n if (this.getAchievementsDataLabel().equals(\"\")) {\n team.setAchievements(null);\n } else {\n team.setAchievements(this.getAchievementsDataLabel().getText());\n }\n return team;\n }",
"public void insertTeam(Team t) {\n\t\tEntityManager em = emfactory.createEntityManager();\n\t\tem.getTransaction().begin();\n\t\tem.persist(t);\n\t\tem.getTransaction().commit();\n\t\tem.close();\n\t}",
"public Team insert(League league, String teamName) {\n StandingDB sdb = new StandingDB();\n TeamDB tdb = new TeamDB();\n String teamID = generateTeamID();\n \n Standing standing = new Standing(teamID);\n \n Team team = new Team(teamID, teamName);\n team.setLeagueID(league);\n \n tdb.insert(team);\n sdb.insert(standing);\n return team;\n }",
"public Builder clearTeam() {\n bitField0_ = (bitField0_ & ~0x00000004);\n team_ = 0;\n onChanged();\n return this;\n }",
"@WebMethod public Team addTeam(String name) throws TeamAlreadyExists;",
"@Test\n public void createUnassignedGame() throws Exception {\n final GameResource resource = TestUtils.newGameResource();\n resource.setStartsAt(\"2014-03-21T16:00:00.000\");\n\n mockMvc.perform(post(BASE_REQUEST_URL).with(superadmin)\n .header(AUTH_HEADER_NAME, createTokenForUser())\n .contentType(contentType)\n .content(TestUtils.convertObjectToJson(resource)))\n .andExpect(status().isCreated())\n .andExpect(content().contentType(contentType))\n .andExpect(jsonPath(\"$.site\", is(resource.getSite())))\n .andExpect(jsonPath(\"$.startsAt\", is(resource.getStartsAt())));\n }",
"@Test\r\n\tpublic void testCreateMatchToMatchLeaguePlayGame() {\n\t\tassertTrue(\"New match to match league play game not created\", false);\r\n\t\tassertTrue(false);\r\n\t}",
"public TeamCoach(){\n }",
"void addMyTeam(Team team) throws HasTeamAlreadyException;",
"public team(int teamID, String teamName, String mascot, int games, int wins, int loses) throws SQLException {\n\t\tthis.teamID = teamID;\n\t\tthis.teamName = teamName;\n\t\tthis.mascot = mascot;\n\t\tthis.games = games;\n\t\tthis.wins = wins;\n\t\tthis.loses = loses;\n\t\tconn = DriverManager.getConnection(DB_URL);\n\t\tStatement stmt = conn.createStatement();\n\t\t \n\t\t stmt.executeUpdate(\"INSERT INTO Team VALUES (\" +\n\t this.teamID + \", '\" +\n\t this.teamName + \"', '\" + \n\t this.mascot + \"', \" +\n\t this.games + \", \" +\n\t this.wins + \", \" +\n\t this.loses +\n\t \")\");\n\t\t \n\t\t conn.close();\n\t stmt.close();\n\t}",
"public TeamStudent() {\r\n\t\t// Default constructor\r\n\t}",
"public FightTeam team();",
"void resetMyTeam();",
"public TeamObject(String name) {\n\t\tthis();\t\t//call the first constructor to build the lock buttons\n\t\tteamName = name;\n\t}",
"public void createTeamMemberEntity(String fName, String lname, String gamertag, int age,\n String gender, String position, String mainChampion) {\n LOGGER.fine(\"Creating TeamMember object\");\n\n TeamMember player = new TeamMember();\n player.setfName(fName);\n player.setlName(lname);\n player.setGamertag(gamertag);\n player.setAge(age);\n Gender genderEnum = Gender.valueOf(gender);\n player.setGender(genderEnum);\n Position positionEnum = Position.valueOf(position);\n player.setPosition(positionEnum);\n player.setMainChampion(mainChampion);\n\n LOGGER.fine(\"Persisting TeamMember object to DB\");\n this.entityManager.persist(player);\n\n }",
"@SuppressWarnings(\"unchecked\")\n\tprivate void sendFakeTeam(Player player) {\n\t\tPacketContainer packet = new PacketContainer(PacketType.Play.Server.SCOREBOARD_TEAM);\n\t\tpacket.getStrings().write(0, FakeTeamName);\n\t\tpacket.getIntegers().write(1, 0); // Set create mode\n\t\tpacket.getStrings().write(5, \"never\"); // Push type\n\t\t\n\t\tCollection<String> names = packet.getSpecificModifier(Collection.class).read(0);\n\t\tnames.add(player.getName());\n\t\t\n\t\ttry {\n\t\t\tProtocolLibrary.getProtocolManager().sendServerPacket(player, packet);\n\t\t} catch (InvocationTargetException e) {\n\t\t\t// Should never happen unless packet changes\n\t\t\tthrow new AssertionError(e);\n\t\t}\n\t}",
"private void createPlayers() {\n\t\t//Randomize roles\n\t\tArrayList<AdventurerEnum> randomisedRoles = getRandomisedRoles();\n\t\tfor(int i=0; i<numPlayers; i++) \n\t\t\tcreateOnePlayer(randomisedRoles.get(i), i+1);\n\t}",
"@Override\n\tpublic int countTeam() {\n\t\treturn 0;\n\t}",
"@Test\r\n\tpublic void deleteTeam() {\r\n\t\t// TODO: JUnit - Populate test inputs for operation: deleteTeam \r\n\t\tTeam team_1 = new wsdm.domain.Team();\r\n\t\tservice.deleteTeam(team_1);\r\n\t}",
"public NetworkGame(String team){\n super();\n this.team = team;\n }",
"public TAlgmntSalesTeam createTAlgmntSalesTeam(final TAlgmntSalesTeam tAlgmntSalesTeam) {\n\t\tLOGGER.info(\"=========== Create TAlgmntSalesTeam ===========\");\n\t\treturn genericDAO.store(tAlgmntSalesTeam);\n\t}",
"void resetMyTeam(Team team);",
"@Override\n\tpublic int getTeam() {\n\t\treturn 0;\n\t}",
"public FragmentTeam() {\n // Required empty public constructor\n }",
"public void insertTeam(Team team) {\n\t\ttry {\n\t\t\tStatement statement = null;\n\t\t\tconnection = connector.getConnection();\n\t\t\tstatement = connection.createStatement();\n\t\t\tjava.sql.Date tDate = new java.sql.Date(team.getDateFoundation().getTime());\n\t\t\tString insertTeam_sql = \"INSERT INTO \" + team_table + \" (id, name, coach, city, dateFoundation)\"\n\t\t\t\t\t+ \"VALUES (NULL, '\" + team.getName() + \"' , '\" + team.getCoach() + \"' , '\" + team.getCity()\n\t\t\t\t\t+ \"' , '\" + tDate + \"')\";\n\t\t\tstatement.executeUpdate(insertTeam_sql);\n\t\t} catch (SQLException e) {\n\t\t\tif (e.getErrorCode() == MYSQL_DUPLICATE_PK) {\n\t\t\t\tAlert alert = new Alert(AlertType.ERROR);\n\t\t\t\talert.setTitle(\"Error\");\n\t\t\t\talert.setHeaderText(\"Duplicity Error\");\n\t\t\t\talert.setContentText(\"This team is already in our database\");\n\t\t\t\talert.showAndWait();\n\t\t\t} else {\n\t\t\t\tSystem.out.println(e.getMessage());\n\t\t\t}\n\t\t}\n\t}",
"private void initDefaultTeams() {\n // Loop through the list of user groups and register\n // them as teams.\n for (UserGroup userGroup : UserGroup.values()) {\n // Register the new Team.\n Team team = scoreboard.registerNewTeam(userGroup.getTeamName());\n team.setCanSeeFriendlyInvisibles(true);\n\n // If the prefix does not exist, skip the part below.\n if (userGroup.getUserGroupPrefix().isEmpty()) continue;\n\n // Add the prefix.\n team.setPrefix(userGroup.getUserGroupPrefix());\n }\n }",
"public Team(String name, List<Player> players) {\n this.name = name;\n this.players = players;\n }",
"@Override\r\n\tpublic String getTeam() {\n\t\treturn null;\r\n\t}",
"public Builder setTeam(int value) {\n bitField0_ |= 0x00000004;\n team_ = value;\n onChanged();\n return this;\n }",
"public void addTeam(Team team) {\n int maxTotalTeamsCurrentlyAllowed = getTotalPlayersInLeague();\n\n // If a team has been created\n if(getTeams().size() != 0) {\n\n float greatestPlayerCount;\n // if the number of players on the largest team is not equal to zero\n if((greatestPlayerCount = (float) getTeamWithMostPlayers().getPlayerCount()) != 0) {\n\n // Get the sum of all the players in the league\n float totalLeaguePlayers = (float) getTotalPlayersInLeague();\n\n // divide the total players in league by number of players in largest team, rounded down\n float totalTeamsAllowedFloat = totalLeaguePlayers / greatestPlayerCount;\n\n // cast into double for Math.floor method\n double totalTeamsAllowedDouble = (double) totalTeamsAllowedFloat;\n\n // cast into integer for comparison\n maxTotalTeamsCurrentlyAllowed = (int) Math.floor(totalTeamsAllowedDouble);\n }\n\n }\n\n // If we're requesting to make more teams than the current max allowed, throw exception\n if (getTeams().size() < maxTotalTeamsCurrentlyAllowed) {\n teams.add(team);\n } else {\n throw new IndexOutOfBoundsException(\"Not enough players for a new team\");\n }\n\n }",
"public Team( TeamColor color,Map map)\n\t{\n\t\tthis.nbCharacter = DEFAULT_NB_CHARACTER;\n\t\tthis.listCharacter = new Character[this.nbCharacter];\n\t\tthis.colorTeam = color;\t\n\t\tfor(int nbCharacterCreated =0; nbCharacterCreated<this.nbCharacter;nbCharacterCreated++)\n\t\t{\n\t\t\tthis.listCharacter[nbCharacterCreated] = new Character(this,map,nbCharacterCreated+1);\n\t\t}\n\t\tthis.actionPointLeft = DEFAULT_ACTION_POINT;\n\t}",
"@Override\r\n\tpublic ResultMessage addTeam(TeamPO oneTeam) {\n\t\treturn teams.addTeam(oneTeam) ;\r\n\t}",
"public void createPlayers() {\n\t\t\n\t\twhite = new Player(Color.WHITE);\n\t\twhite.initilizePieces();\n\t\tcurrentTurn = white;\n\t\t\n\t\tblack = new Player(Color.BLACK);\n\t\tblack.initilizePieces();\n\t}",
"@Test\r\n\tpublic void saveTeamTeamplayerses() {\r\n\t\t// TODO: JUnit - Populate test inputs for operation: saveTeamTeamplayerses \r\n\t\tInteger teamId_7 = 0;\r\n\t\tTeamplayers related_teamplayerses = new wsdm.domain.Teamplayers();\r\n\t\tTeam response = null;\r\n\t\tresponse = service.saveTeamTeamplayerses(teamId_7, related_teamplayerses);\r\n\t\t// TODO: JUnit - Add assertions to test outputs of operation: saveTeamTeamplayerses\r\n\t}",
"@Test\n\tpublic void TEAM3_CONTROLLER_UT10() {\n\t\t// PRECONDITIONS\n\t\tCourseStub.initializeCourses();\n\t\t\n\t\tString campus = \"Biscayne\";\n\t\tString term = \"Spring 2014\";\n\t\t\n\t\tClassDetailsStub dat1345 = new ClassDetailsStub(TEST_CONFIG.SatOnly);\n\t\t\n\t\tCourseStub.registerCourse(campus, term, dat1345);\n\t\t\n\t\tScheduleOptionsStub s = new ScheduleOptionsStub();\n\t\ts.setM(\"0\");\n\t\ts.setT(\"0\");\n\t\ts.setW(\"0\");\n\t\ts.setTh(\"0\");\n\t\ts.setF(\"0\");\n\t\ts.setS(\"0\");\n\t\ts.setSu(\"0\");\n\t\ts.setCampus(campus);\n\t\ts.setTerm(term);\n\t\t\n\t\tScheduleMakerController smc = new ScheduleMakerController();\n\t\t\n\t\t// INPUT\n\t\tCollection<ScheduleStub> schedulesReturned = smc.createSchedule(s);\n\t\t\n\t\t// EXPECTED OUTPUT\n\t\tassertEquals(0, schedulesReturned.size());\n\t}",
"public Team(String name, Color color) {\n\t\tthis.teamName = name;\n\t\tthis.color = color;\n\t}",
"public FootballGame(String team1,String team2,LocalDate matchDate,int teamOneScore,int teamTwoScore){\n this.team1=team1;\n this.team2=team2;\n this.matchDate=matchDate;\n this.teamOneScore=teamOneScore;\n this.teamTwoScore=teamTwoScore;\n\n }",
"public void createNewGame() {\n\t\tfor(int n = 0; n < 8; n++){\n\t\t\tfor(int j = 0; j < 8; j++){\n\t\t\t\tif ( n % 2 == j % BLACK_PAWN ) {\n\t\t\t\t\tif (n < 3)\n\t\t\t\t\t\tarr[n][j] = RED_PAWN;\n\t\t\t\t\telse if (n > 4)\n\t\t\t\t\t\tarr[n][j] = BLACK_PAWN;\n\t\t\t\t\telse\n\t\t\t\t\t\tarr[n][j] = EMPTY;\n\t\t } \n\t\t\t\telse\n\t\t\t\t\tarr[n][j] = EMPTY;\n\t\t\t}\n\t\t}\n\t}",
"@Override\n\tpublic void insertProjectTeam(ProjectTeamBean bean) {\n\t\t\n\t}",
"@Override\n\tpublic void insertProjectTeam(ProjectTeamBean projectTeamBean) {\n\t\t\n\t}",
"public void createTeams()\n {\n ArrayList<Student> teamCreator = new ArrayList<Student>();\n Integer[] teamSize = getTeamSizeArray();// Calculate all the sizes\n for (int i =0 ; i < teamSize.length ; i ++)\n {\n teamCreator = femaleHardConstraintApplicator(teamCreator, teamSize[i]);//Initial 4/ 3/ 2 students added to the ArrayList\n if(!Constraint.femaleHardConstraintCheck(teamCreator)) // Hard Constraint Check\n {\n System.out.println(\"Sorry! A team cannot be formed currently as a hard constraint is not met.\\n\" +\n \"Hard Constraint : Maximum of one woman per team cannot be met currently\");\n break;\n }\n teamCreator = dislikedMembersRemover(teamCreator);\n for (int x = 0; x < Constraint.allSoftConstraints.size(); x++) // bubble sort outer loop\n {\n for (int y = 0; y < Constraint.allSoftConstraints.size() - x - 1; y++) {\n if (Constraint.allSoftConstraints.get(y).getWeightAge() > (Constraint.allSoftConstraints.get(y + 1).getWeightAge())) {\n Constraint temp = Constraint.allSoftConstraints.get(y);\n Constraint.allSoftConstraints.set(y, Constraint.allSoftConstraints.get(y + 1));\n Constraint.allSoftConstraints.set(y + 1, temp);\n }\n }\n }\n\n for(Constraint c: Constraint.allSoftConstraints){\n switch (Integer.parseInt(c.getConstraintId().substring(11,12))) {\n case 1:\n teamCreator = uniquePersonalityConstraintApplicator(teamCreator);\n break;\n case 2:\n teamCreator = requiredPersonalityApplicator(teamCreator);\n break;\n case 3:\n teamCreator = experienceSoftConstraintApplicator(teamCreator);\n break;\n default:\n break;\n }\n }\n\n teamCreator = teamAverageGPAConstraintApplicator(teamCreator);\n if(!Constraint.averageGPAHardConstraintCheck(teamCreator))\n {\n System.out.println(\"Sorry! A team cannot be formed currently as a hard constraint is not met.\\n\" +\n \"Hard Constraint : Average team GPA should be less than 3.5.\");\n break;\n }\n teamCreator = teamMemberGPAConstraintApplicator(teamCreator);\n if(!Constraint.twoMembersWith3GPAHardConstraintCheck(teamCreator) && !Constraint.averageGPAHardConstraintCheck(teamCreator))\n {\n System.out.println(\"Sorry! A team cannot be formed currently as a hard constraint is not met.\\n\" +\n \"Hard Constraint : Two Members needed with GPA 3 or Above.\");\n break;\n }\n Team team = setProjectForTeam(teamCreator);\n System.out.println(Constraint.ANSI_BLUE + \"\\nCongratulations! A team has been formed!!\\n\" +Constraint.ANSI_RESET +\n \"The team ID is \\t\\t\\t: \" + team.getTeamID() +\n \"\\nThe Project Assigned\\t: \" + team.getProjectAssigned().getProjectTitle() +\n \"\\n\");\n System.out.print(\"The Students IDs of students in this team are: \\n\\n\");\n for (Student student : teamCreator)\n {\n System.out.print(student.getId() + \"\\t\\tName: \" + student.getFirstName() + \"\\t\\t\\t\\tGender : \" + student.getGender() + \"\\n\");\n }\n Team.allTeams.add(team);\n for (Student student : teamCreator)\n {\n for(Student student1 : Student.allStudents){\n if(student.getId().compareTo(student1.getId()) ==0){\n student.setAssignedTeam(team);\n student1.setAssignedTeam(team);\n }\n }\n }\n teamCreator.clear();\n team = null;\n\n int choice = 0;\n System.out.println(\"\\nDo you want to attempt to create another team ?\\n\" +\n \"1.Yes\\n\" +\n \"2.No \\n\");\n choice = InputTools.intChecker(1,2);\n if (choice == 2)\n {\n break;\n }\n }\n System.out.println(\"Exited\");\n }",
"public void createTurn() {\n Turn turn = new Turn(this.getOnlinePlayers());\n this.setCurrentTurn(turn);\n }",
"public TeamBuildTool(String name) {\n team = new Team(name);\n run();\n }",
"@Test\n @Transactional\n public void updateNonExistingTeam() throws Exception {\n int databaseSizeBeforeUpdate = teamRepository.findAll().size();\n\n // Create the Team\n TeamDTO teamDTO = teamMapper.toDto(team);\n\n // If the entity doesn't have an ID, it will be created instead of just\n // being updated\n restTeamMockMvc\n .perform(put(\"/api/teams\").contentType(TestUtil.APPLICATION_JSON_UTF8)\n .content(TestUtil.convertObjectToJsonBytes(teamDTO)))\n .andExpect(status().isCreated());\n\n // Validate the Team in the database\n List<Team> teamList = teamRepository.findAll();\n assertThat(teamList).hasSize(databaseSizeBeforeUpdate + 1);\n }",
"public void setTeamName(String name) {\n\t\tteamName = name;\n\t}",
"@Override\n\tpublic int countProjectTeam() {\n\t\treturn 0;\n\t}",
"@Override\r\n\t@Transactional(propagation=Propagation.REQUIRED)\r\n\tpublic void add(Team team) {\n\t\tentityManager.createQuery(\"insert into Team(id, name) values (team.id, team.name)\");\r\n\t}",
"@Test(groups = { \"android\", \"ios\", \"web\", \"BVT03\" })\n\tpublic void P0Pass_3_testSignUpAsATeacher_SportsTeam() throws Exception {\n\t\tSystem.out.println(\"P0Pass_1_testSignUpAsATeacher_BoysScout\");\n\t\tString sEmail = \"test_SportsTeam\" + getTimeStamp().replaceAll(\"-\", \"_\") + \"@test.com\";\n\t\tSystem.out.println(sEmail);\n\t\tLandingPage.getLandingPage(browser).clickOnCreateAccount().clickOnCreateNewClassGroup().clickOnSportsTeamGroup()\n\t\t.enterFirstName(\"test\").enterLastName(\"Sports Team\")\n\t\t.enterEmailId(sEmail).enterPassword(\"bloomz999\")\n\t\t.clickOnSignUpButton().thenVerifyCreateButtonShouldBeDisplayed().thenVerifyProfileName(\"test Sports Team\")\n\t\t.thenVerifyWelcomeScreenTroop(\"Create a Sports Team\").clickOnSettingButton().clickOnAccountSettingsButton()\n\t\t.clickOnDeleteAccountButton().selectReasonForDeleteButton().selectReasonAsOthersButton()\n\t\t.enterPassword().clickDeletePermanentButton().clickOnYesButton().thenVerifyConfirmMessage().clickOnOkButton()\n\t\t.thenVerifySignInAndCreateButtonsShouldBeDisplayed();\n\t}",
"public void createNewPlayer()\n\t{\n\t\t// Set up all badges.\n\t\tm_badges = new byte[42];\n\t\tfor(int i = 0; i < m_badges.length; i++)\n\t\t\tm_badges[i] = 0;\n\t\tm_isMuted = false;\n\t}",
"public ActiveGamePostDTO createActiveGame(Long gameSetupId, String pt) {\n //Checkers\n //Check that the player is the host\n if (!gameSetUpService.getGameSetupById(gameSetupId).getHostName().equals(playerService.getPlayerByToken(pt).getUsername()))\n throw new UnauthorizedException(\"Player is not host and therefore not allowed to start the game\");\n GameSetUpEntity gameSetUpEntity =gameSetUpService.getGameSetupById(gameSetupId);\n //Check that enough players are in the lobby to start the game.\n if (gameSetUpEntity.getPlayerTokens().size()+gameSetUpEntity.getNumberOfDevils()+gameSetUpEntity.getNumberOfAngles()\n >2 && gameSetUpEntity.getPlayerTokens().size()+gameSetUpEntity.getNumberOfDevils()+gameSetUpEntity.getNumberOfAngles()<8) {\n //game initialization\n GameEntity game = new GameEntity();\n addHumanPlayers(game, gameSetUpEntity.getPlayerTokens(), pt);\n BotCreator botCreator=new BotCreator();\n botCreator.addBots(game, gameSetUpEntity.getNumberOfDevils().intValue(), gameSetUpEntity.getNumberOfAngles().intValue());\n addCards(game);\n furtherInitialize(game);\n game.getHandlerForLeavingPlayers().loadPlayersIntoHandler(game.getPlayers());\n //Save and flush\n GameEntity activeGame= gameRepository.saveAndFlush(game);\n gameSetUpService.getGameSetupById(gameSetupId).setActiveGameId(activeGame.getId());\n //Create the activeGamePostDTO\n return createActiveGamePostDTO(activeGame);\n }\n else throw new ConflictException(\"Not enough or too many players to start game!\");\n }",
"@Test\n\tpublic void TEAM3_CONTROLLER_UT13() {\n\t\t// PRECONDITIONS\n\t\tCourseStub.initializeCourses();\n\t\t\n\t\tString campus = \"All\";\n\t\tString term = \"Spring 2015\";\n\t\t\n\t\tClassDetailsStub dat1345 = new ClassDetailsStub(TEST_CONFIG.SatOnly);\n\t\t\n\t\tScheduleOptionsStub s = new ScheduleOptionsStub();\n\t\ts.setCampus(campus);\n\t\ts.setTerm(term);\n\t\ts.setCourse4(dat1345.getCourse());\n\t\t\n\t\tScheduleMakerController smc = new ScheduleMakerController();\n\t\t\n\t\t// INPUT\n\t\tCollection<ScheduleStub> schedulesReturned = smc.createSchedule(s);\n\t\t\n\t\t// EXPECTED OUTPUT\n\t\tassertEquals(0, schedulesReturned.size());\n\t}",
"private void addTeam(String teamName, String prefix, String suffix) {\n String trimmedTeamName = trimString(teamName);\n\n // If the team already exists, skip adding it.\n if (teamExist(trimmedTeamName)) return;\n\n // Register the new team\n Team team = scoreboard.registerNewTeam(trimmedTeamName);\n\n // Set the prefix.\n if (prefix != null && !prefix.isEmpty()) {\n team.setPrefix(prefix);\n }\n\n // Set ths suffix.\n if (suffix != null && !suffix.isEmpty()) {\n team.setSuffix(suffix);\n }\n }",
"@Test\n public void testAddPlayer() {\n System.out.println(\"addPlayer\");\n Player player = new Player(\"New Player\");\n Team team = new Team();\n team.addPlayer(player);\n assertEquals(player, team.getPlayers().get(0));\n }",
"PlayerGroup createPlayerGroup();",
"public interface CreateTeamPresenter {\n void createTeam(User user, String name, String token);\n}",
"public void createProject(String name) {\n Project project = new Project(name);\n Leader leader = new Leader(this, project);\n project.addLeader(leader);\n }",
"public HockeyTeamTest()\n {\n }",
"LectureProject createLectureProject();",
"@Test\n @Transactional\n public void getNonExistingTeam() throws Exception {\n // Get the team\n restTeamMockMvc.perform(get(\"/api/teams/{id}\", Long.MAX_VALUE))\n .andExpect(status().isNotFound());\n }",
"void createPlayer(Player player);",
"private void save() {\n Saver.saveTeam(team);\n }",
"Team getMyTeam();",
"private void createPlayers() {\n\tGlobal.camera_player1 = new Camera(new OrthographicCamera());\n\tGlobal.camera_player2 = new Camera(new OrthographicCamera());\n\tGlobal.camera_ui = new OrthographicCamera();\n\tGlobal.player1 = new Plane(Global.player1_respawn.x,\n\t\tGlobal.player1_respawn.y, 0, new Planetype(PlaneTypes.F35),\n\t\tEntityType.PLAYER1);\n\tGlobal.player2 = new Plane(Global.player2_respawn.x,\n\t\tGlobal.player2_respawn.y, 0, new Planetype(PlaneTypes.F35),\n\t\tEntityType.PLAYER2);\n }",
"@Test\n\tpublic void TEAM3_CONTROLLER_UT17() {\n\t\t// PRECONDITIONS\n\t\tCourseStub.initializeCourses();\n\t\t\n\t\tString term = \"Spring 2015\";\n\t\t\n\t\tClassDetailsStub mac1266 = new ClassDetailsStub(TEST_CONFIG.TueThu);\n\t\tCourseStub.registerCourse(\"All\", term, mac1266);\n\t\t\n\t\tScheduleOptionsStub s = new ScheduleOptionsStub();\n\t\ts.setCampus(\"All\");\n\t\ts.setTerm(term);\n\t\ts.setCourse1(\"\");\n\t\ts.setCourse2(\"\");\n\t\ts.setCourse3(\"\");\n\t\ts.setCourse4(\"\");\n\t\ts.setCourse5(\"\");\n\t\ts.setCourse6(\"\");\n\t\t\n\t\tScheduleMakerController smc = new ScheduleMakerController();\n\t\t\n\t\t// INPUT\n\t\tCollection<ScheduleStub> schedulesReturned = smc.createSchedule(s);\n\t\t\n\t\t// EXPECTED OUTPUT\n\t\tassertEquals(0, schedulesReturned.size());\n\t}",
"public CreateProject() {\n\t\tsuper();\n\t}",
"public SoccerPlayer(String name, String position, TeamDB team){\n\n// Random num = new Random();\n// int randInt1;\n// int randInt2;\n// int randInt3;\n// int randInt4;\n//\n// randInt1 = num.nextInt(10); //fix for height and weight.\n// randInt2 = num.nextInt(190);\n// randInt3 = num.nextInt(300);\n// randInt4 = num.nextInt(10);\n\n playerName = name;\n playerPosition = position;\n playerTeam = new TeamDB(\"\");\n// playerUniform = randInt1;\n// playerHeight = randInt2;\n// playerWeight = randInt3;\n// playerGoals = randInt4;\n }",
"@Test\r\n\tpublic void saveTeamTswacct() {\r\n\t\t// TODO: JUnit - Populate test inputs for operation: saveTeamTswacct \r\n\t\tInteger teamId_3 = 0;\r\n\t\tTswacct related_tswacct = new wsdm.domain.Tswacct();\r\n\t\tTeam response = null;\r\n\t\tresponse = service.saveTeamTswacct(teamId_3, related_tswacct);\r\n\t\t// TODO: JUnit - Add assertions to test outputs of operation: saveTeamTswacct\r\n\t}",
"protected abstract void gatherTeam();",
"@Test\n\tpublic void testCreate() throws Exception {\n\n\t\tSimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd hh:mm:ss\");\n\t\tDate startDate = new Date();\n\t\tCalendar calendar = new GregorianCalendar();\n\t\tcalendar.setTime(startDate);\n\t\tcalendar.add(Calendar.MONTH, 2);\n\t\t//\"name\":\"mizehau\",\"introduction\":\"dkelwfjw\",\"validityStartTime\":\"2015-12-08 15:06:21\",\"validityEndTime\":\"2015-12-10 \n\n\t\t//15:06:24\",\"cycle\":\"12\",\"industry\":\"1202\",\"area\":\"2897\",\"remuneration\":\"1200\",\"taskId\":\"TVRRME9UVTFPRE0zT0RBeU1EQXdNRFkyTVRnMU9EQTU=\"\n\t\tProject a = new Project();\n\t\tDate endDate = calendar.getTime();\n\t\tString name = \"mizehau\";\n\t\tString introduction = \"dkelwfjw\";\n\t\tString industry = \"1202\";\n\t\tString area = \"test闫伟旗创建项目\";\n\t\t//String document = \"test闫伟旗创建项目\";\n\t\tint cycle = 12;\n\t\tString taskId = \"TVRRME9UVTFPRE0zT0RBeU1EQXdNRFkyTVRnMU9EQTU=\";\n\t\tdouble remuneration = 1200;\n\t\tTimestamp validityStartTime = Timestamp.valueOf(sdf.format(startDate));\n\t\tTimestamp validityEndTime = Timestamp.valueOf(sdf.format(endDate));\n\t\ta.setArea(area);\n\t\ta.setName(name);\n\t\ta.setIntroduction(introduction);\n\t\ta.setValidityStartTime(validityStartTime);\n\t\ta.setValidityEndTime(validityEndTime);\n\t\ta.setCycle(cycle);\n\t\ta.setIndustry(industry);\n\t\ta.setRemuneration(remuneration);\n\t\ta.setDocument(taskId);\n\t\tProject p = projectService.create(a);\n\t\tSystem.out.println(p);\n\t}",
"void createNewGame(Player player);",
"public Arena() \r\n {\r\n setVenueName(\"\");\r\n setCity(\"\");\r\n setState(\"\");\r\n setMaxCapacity(0);\r\n setYearOpened(0);\r\n team = new Tenant();\r\n }",
"@PostMapping(\"/createNewGameRoom\")\n @ResponseStatus(HttpStatus.CREATED)\n public Game generateNewGameRoom() {\n String entrycode = service.generateEntryCode();\n currentGame.setEntrycode(entrycode);\n currentGame = gameDao.add(currentGame);\n return currentGame;\n }",
"@Test\n void invalidCREATED() {\n // when not started, nothing can be done.\n getGame().move(getPlayer(), Direction.EAST);\n assertThat(getGame().isInProgress()).isFalse();\n verifyNoMoreInteractions(observer);\n }",
"@PostMapping(path=\"/add/{id}/team\")\n public @ResponseBody Object assignTeamMember(@PathVariable long id, @RequestParam Team team){\n TeamMember tm = teamMemberRepository.getOne(id);\n tm.setTeam(team); // Retrieving the list of team members and adding new team member\n return teamMemberRepository.saveAndFlush(tm);\n }",
"@Test\n\tpublic void TEAM3_CONTROLLER_UT18() {\n\t\t// PRECONDITIONS\n\t\tCourseStub.initializeCourses();\n\t\t\n\t\tString term = \"Spring 2015\";\n\t\t\n\t\tClassDetailsStub mac1266 = new ClassDetailsStub(TEST_CONFIG.TueThu),\n\t\t\t\t dat1345 = new ClassDetailsStub(TEST_CONFIG.SatOnly);\n\t\tCourseStub.registerCourse(\"Biscayne\", term, mac1266);\n\t\tCourseStub.registerCourse(\"University\", term, dat1345);\n\t\t\n\t\tScheduleOptionsStub s = new ScheduleOptionsStub();\n\t\ts.setCampus(\"All\");\n\t\ts.setTerm(term);\n\t\ts.setCourse1(\"\");\n\t\ts.setCourse2(\"\");\n\t\ts.setCourse3(\"\");\n\t\ts.setCourse4(\"\");\n\t\ts.setCourse5(dat1345.getCourse());\n\t\ts.setCourse6(mac1266.getCourse());\n\t\t\n\t\tScheduleMakerController smc = new ScheduleMakerController();\n\t\t\n\t\t// INPUT\n\t\tCollection<ScheduleStub> schedulesReturned = smc.createSchedule(s);\n\t\t\n\t\t// EXPECTED OUTPUT\n\t\tassertNotEquals(0, schedulesReturned.size());\n\t}",
"public static void createBoard() \n\t{\n\t\tfor (int i = 0; i < tictactoeBoard.length; i++) \n\t\t{\n\t\t\ttictactoeBoard[i] = '-';\n\t\t}\n\t}",
"public static void createGame(Player admin, String name, String baseName, boolean createWorlds) {\n\t\t\n\t\tWorldSet worldSet = new WorldSet(baseName, createWorlds);\n\t\t\n\t\t// create new game\n\t\tGame game = new Game(admin, name, worldSet, createWorlds);\n\t\tgames.add(game);\n\t\t\n\t\tPreGame preGame = new PreGame(admin.getUniqueId(), name);\n\t\tpreGames.remove(preGame);\n\t\t\n\t\tadmin.sendMessage(AQUA + \"A game has been successfully created with the name of \" + WHITE + name + AQUA + \n\t\t\t\t\". The admin of the game is \" + WHITE + admin.getName() + AQUA + \".\");\n\t\t\n\t}",
"@Test\n void createUserReturnsNull() {\n Address address = new Address(\"Earth\", \"Belgium\", \"City\", \"Street\", 0);\n User user = new User(\"Mira\", \"Vogelsang\", \"0412345678\", \"maarten@maarten\", \"pass\", address);\n\n assertNull(controller.createUser(user));\n }"
] |
[
"0.7923078",
"0.7878826",
"0.6980763",
"0.69702923",
"0.6909981",
"0.69037527",
"0.6873015",
"0.6698313",
"0.657886",
"0.6574964",
"0.6525671",
"0.6513037",
"0.6445183",
"0.6419433",
"0.63427323",
"0.63180625",
"0.63083535",
"0.6290294",
"0.6279189",
"0.6234055",
"0.62101054",
"0.6195342",
"0.6179655",
"0.6166166",
"0.60221064",
"0.59909856",
"0.59737223",
"0.5958959",
"0.5950646",
"0.58882844",
"0.58795166",
"0.58271617",
"0.5810625",
"0.58057153",
"0.57626545",
"0.5754618",
"0.57248044",
"0.5715646",
"0.5709068",
"0.5665308",
"0.5636394",
"0.5619268",
"0.5607916",
"0.5583539",
"0.55687076",
"0.55491686",
"0.55403787",
"0.55287606",
"0.55267316",
"0.5505553",
"0.54729867",
"0.5472847",
"0.54630035",
"0.5462165",
"0.546098",
"0.54530245",
"0.5442059",
"0.54347706",
"0.5432671",
"0.54303485",
"0.54106146",
"0.54039246",
"0.5395867",
"0.5390904",
"0.53783023",
"0.5372503",
"0.53595847",
"0.5359348",
"0.53515714",
"0.53398675",
"0.53383666",
"0.53351784",
"0.53280306",
"0.53255165",
"0.53251046",
"0.5312705",
"0.5309119",
"0.5306128",
"0.529745",
"0.5288806",
"0.5288248",
"0.5282163",
"0.5281567",
"0.5276659",
"0.5276642",
"0.5271142",
"0.52670574",
"0.5262801",
"0.52554804",
"0.5247827",
"0.52366114",
"0.52323943",
"0.522964",
"0.52270573",
"0.5220014",
"0.52176446",
"0.5217442",
"0.52157044",
"0.5209922",
"0.5209474"
] |
0.6871555
|
7
|
Creates a team with a name, and a default color
|
public Team(String name) {
this(name, Color.BLACK);
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public Team(String name, Color color) {\n\t\tthis.teamName = name;\n\t\tthis.color = color;\n\t}",
"void create(Team team);",
"Team createTeam();",
"public Team(String name) {\n this.name = name;\n }",
"public static ProjectTeam createSampleProjectTeam() {\n ProjectTeam team = new ProjectTeam();\n team.setProjectName(\"Rule the Galaxy\");\n team.addMember(new ProjectMember(\n \"Emperor Palpatine\", \"lead\", \"[email protected]\"));\n team.addMember(new ProjectMember(\n \"Lord Darth Vader\", \"Jedi-Killer\", \"[email protected]\"));\n team.addMember(new ProjectMember(\n \"Grand Moff Tarkin\", \"Planet-Killer\", \"[email protected]\"));\n team.addMember(new ProjectMember(\n \"Admiral Motti\", \"Death Star operations\", \"[email protected]\"));\n return team;\n }",
"public void newTeam(Team team);",
"TeamMember(String _name, String _title) {\r\n this.name = _name;\r\n this.title = _title;\r\n }",
"public Team(String name) {\r\n this.name = name;\r\n team = new ArrayList<Hero>();\r\n }",
"public void createTeam(final Map<String, String> dataTable) {\n team.processInformation(dataTable);\n WebDriverHelper.waitUntil(inputTeamName);\n WebDriverHelper.setElement(inputTeamName, team.getName());\n WebDriverHelper.clickElement(dropDownTeamType);\n selectDropDownOptionByName(team.getType());\n WebDriverHelper.setElement(inputTeamDescription, team.getDescription());\n WebDriverHelper.clickElement(btnContinue);\n WebDriverHelper.waitUntil(btnThisLater);\n WebDriverHelper.clickElement(btnThisLater);\n }",
"public TeamObject(String name) {\n\t\tthis();\t\t//call the first constructor to build the lock buttons\n\t\tteamName = name;\n\t}",
"public Team( TeamColor color,Map map)\n\t{\n\t\tthis.nbCharacter = DEFAULT_NB_CHARACTER;\n\t\tthis.listCharacter = new Character[this.nbCharacter];\n\t\tthis.colorTeam = color;\t\n\t\tfor(int nbCharacterCreated =0; nbCharacterCreated<this.nbCharacter;nbCharacterCreated++)\n\t\t{\n\t\t\tthis.listCharacter[nbCharacterCreated] = new Character(this,map,nbCharacterCreated+1);\n\t\t}\n\t\tthis.actionPointLeft = DEFAULT_ACTION_POINT;\n\t}",
"public void createTeam(ActionEvent actionEvent) throws IOException, SQLException {\n if (validCreateInput()) {\n user = DatabaseManager.createTeam(user, teamNameCreateField.getText(), abbrevationCreateField.getText(), chooseCityBoxCreate.getValue().toString(),\n chooseAgeGroupCreate.getValue(), chooseLeagueBoxCreate.getValue().toString(), chooseLeagueTeamBoxCreate.getValue().toString(), createTeamLogoFile);\n\n createPaneClose(actionEvent);\n displayMessage(messagePane, \"Team created\", false);\n }\n }",
"public static void createNewLeague()\n\t{\n\t\t//put code to get input from end-user here.\n\t\t//generateFixtures(leagueName, teamAmount, homeAndAway, winPoints, drawPoints, lossPoints, teamNames);\n\t}",
"String createTeam(String userName, String teamName, Set<String> members) throws RemoteException, InterruptedException;",
"public void setTeamName(String name) {\n\t\tteamName = name;\n\t}",
"public static Team createEntity(EntityManager em) {\n Team team = new Team().name(DEFAULT_NAME).description(DEFAULT_DESCRIPTION)\n .level(DEFAULT_LEVEL).totalMember(DEFAULT_TOTAL_MEMBER)\n .extraGroupName(DEFAULT_EXTRA_GROUP_NAME)\n .extraGroupDescription(DEFAULT_EXTRA_GROUP_DESCRIPTION)\n .extraGroupTotalMember(DEFAULT_EXTRA_GROUP_TOTAL_MEMBER);\n return team;\n }",
"@WebMethod public Team addTeam(String name) throws TeamAlreadyExists;",
"public Team getTeam() {\n Team team = new Team();\n team.setTeamName(this.getTeamNameDataLabel().getText());\n team.setCaptain(this.getCaptainDataLabel().getText());\n if (this.getCoachDataLabel().equals(\"\")) {\n team.setCoach(null);\n } else {\n team.setCoach(this.getCoachDataLabel().getText());\n }\n if (this.getAchievementsDataLabel().equals(\"\")) {\n team.setAchievements(null);\n } else {\n team.setAchievements(this.getAchievementsDataLabel().getText());\n }\n return team;\n }",
"public void createNewTeam(ActionEvent actionEvent) throws IOException {\n createTeamPane.setDisable(false);\n createTeamPane.setVisible(true);\n darkPane.setDisable(false);\n darkPane.setVisible(true);\n\n teamNameCreateField.setText(\"\");\n abbrevationCreateField.setText(\"\");\n chooseCityBoxCreate.getSelectionModel().clearSelection();\n chooseLeagueBoxCreate.getSelectionModel().clearSelection();\n chooseAgeGroupCreate.getSelectionModel().clearSelection();\n chooseLeagueTeamBoxCreate.getSelectionModel().clearSelection();\n\n chooseLeagueBoxCreate.setDisable(true);\n chooseLeagueTeamBoxCreate.setDisable(true);\n }",
"public Team(String name, List<Player> players) {\n this.name = name;\n this.players = players;\n }",
"public void createPlayer() {\n ColorPicker colorPicker = new ColorPicker();\n\n for (Player player : players) {\n if (player.getColor() == color(0, 0, 0) || (player.hasName() == false)) {\n pickColor(player, colorPicker);\n return;\n }\n }\n\n // if (ENABLE_SOUND) {\n // sfx.moveToGame();\n // }\n\n state = GameState.PLAY_GAME;\n\n // Spawn players\n int index = 0;\n for (int i=players.size()-1; i>=0; i--) {\n String dir = directions.get(index); // Need to add players in reverse so that when they respawn, they move in the right direction\n players.get(i).setSpawn(spawns.get(dir)).setDirection(dir);\n index++;\n }\n\n // Update game state only if all players have name and color\n}",
"public Team() {\r\n id = \"\";\r\n abbreviation = \"\";\r\n name = \"\";\r\n conference = \"\";\r\n division = \"\";\r\n address = null;\r\n }",
"@RequestMapping(value = \"/team/{league}\", method = POST, consumes = MEDIA_JSON)\n @ResponseStatus(CREATED)\n public LobbyTeam createTeamAndEnter(@AuthenticationPrincipal UserSimpleDetails user,\n @PathVariable(\"league\") LobbyLeagueEnum league)\n throws TeamFullException, TeamNotFoundException {\n log.info(\"user {} creates team\", user.getIdentity());\n LobbyTeam team = lobbyService.createTeam(user.getProfileId(), league);\n return lobbyService.enterIntoTeam(user.getProfileId(), team.getId().toString());\n }",
"public static void addTeam(TeamForm tf) {\n Team team;\n\n long id = tf.id;\n\n if (!isTeam(id)) {\n team = new Team(tf.teamName, tf.location, tf.teamType, tf.skillLevel, tf.roster, tf.description, tf.imageUrl);\n team.save();\n }\n else {\n team = getTeam(id);\n team.setTeamName(tf.teamName);\n team.setLocation(tf.location);\n team.setTeamType(tf.teamType);\n team.setSkillLevel(tf.skillLevel);\n team.setRoster(tf.roster);\n team.setDescription(tf.description);\n team.setImageUrl(tf.imageUrl);\n team.setWins(tf.wins);\n team.setLosses(tf.losses);\n team.setPointsFor(tf.pointsFor);\n team.setPointsAgainst(tf.pointsAgainst);\n team.save();\n }\n }",
"public Team() {\n\t\tthis(null);\n\t}",
"public void createPlayers() {\n\t\t\n\t\twhite = new Player(Color.WHITE);\n\t\twhite.initilizePieces();\n\t\tcurrentTurn = white;\n\t\t\n\t\tblack = new Player(Color.BLACK);\n\t\tblack.initilizePieces();\n\t}",
"public team(int teamID, String teamName, String mascot, int games, int wins, int loses) throws SQLException {\n\t\tthis.teamID = teamID;\n\t\tthis.teamName = teamName;\n\t\tthis.mascot = mascot;\n\t\tthis.games = games;\n\t\tthis.wins = wins;\n\t\tthis.loses = loses;\n\t\tconn = DriverManager.getConnection(DB_URL);\n\t\tStatement stmt = conn.createStatement();\n\t\t \n\t\t stmt.executeUpdate(\"INSERT INTO Team VALUES (\" +\n\t this.teamID + \", '\" +\n\t this.teamName + \"', '\" + \n\t this.mascot + \"', \" +\n\t this.games + \", \" +\n\t this.wins + \", \" +\n\t this.loses +\n\t \")\");\n\t\t \n\t\t conn.close();\n\t stmt.close();\n\t}",
"public Fruit(String color, String name) {\r\n\t\tthis.color = color;\r\n\t\tthis.name = name;\r\n\t}",
"public TeamBuildTool(String name) {\n team = new Team(name);\n run();\n }",
"public Team(int nb, TeamColor color,Map map)\n\t{\n\t\tthis.nbCharacter = nb;\n\t\tthis.listCharacter = new Character[this.nbCharacter];\n\t\tthis.colorTeam = color;\n\t\tfor(int nbCharacterCreated =0; nbCharacterCreated<this.nbCharacter;nbCharacterCreated++)\n\t\t{\n\t\t\tthis.listCharacter[nbCharacterCreated] = new Character(this, map,nbCharacterCreated+1);\n\t\t}\n\t\tthis.actionPointLeft = DEFAULT_ACTION_POINT;\n\t}",
"private void createLeague(){ \r\n FantasyUser maxUser = new FantasyUser();\r\n maxUser.setEmail(\"[email protected]\");\r\n maxUser.setPassword(\"password\");\r\n fUserBean.create(maxUser);\r\n \r\n FantasyUser adrianUser = new FantasyUser();\r\n adrianUser.setEmail(\"[email protected]\");\r\n adrianUser.setPassword(\"password\");\r\n fUserBean.create(adrianUser);\r\n \r\n FantasyUser ashayUser = new FantasyUser();\r\n ashayUser.setEmail(\"[email protected]\");\r\n ashayUser.setPassword(\"password\");\r\n fUserBean.create(ashayUser);\r\n \r\n FantasyUser jessUser = new FantasyUser();\r\n jessUser.setEmail(\"[email protected]\");\r\n jessUser.setPassword(\"password\");\r\n fUserBean.create(jessUser);\r\n \r\n //create league\r\n FantasyLeague league = new FantasyLeague();\r\n league.setDraftStarted(false);\r\n league.setFinishedDraft(false);\r\n league.setLeagueName(\"Mongeese Only\");\r\n league.setLeagueOwner(maxUser);\r\n flBean.create(league);\r\n \r\n //create teams\r\n FantasyTeam maxTeam = new FantasyTeam();\r\n maxTeam.setTeamName(\"Max's Team\");\r\n maxTeam.setTeamOwner(maxUser);\r\n maxTeam.setLeague(league);\r\n ftBean.create(maxTeam);\r\n \r\n FantasyTeam ashayTeam = new FantasyTeam();\r\n ashayTeam.setTeamName(\"Ashay's Team\");\r\n ashayTeam.setTeamOwner(ashayUser);\r\n ashayTeam.setLeague(league);\r\n ftBean.create(ashayTeam);\r\n \r\n FantasyTeam jessTeam = new FantasyTeam();\r\n jessTeam.setTeamName(\"Jess's team\");\r\n jessTeam.setTeamOwner(jessUser);\r\n jessTeam.setLeague(league);\r\n ftBean.create(jessTeam);\r\n \r\n FantasyTeam adrianTeam = new FantasyTeam();\r\n adrianTeam.setTeamName(\"Team Greasy Pizza\");\r\n adrianTeam.setTeamOwner(adrianUser);\r\n adrianTeam.setLeague(league); \r\n ftBean.create(adrianTeam);\r\n }",
"private void addTeam(String teamName, String prefix, String suffix) {\n String trimmedTeamName = trimString(teamName);\n\n // If the team already exists, skip adding it.\n if (teamExist(trimmedTeamName)) return;\n\n // Register the new team\n Team team = scoreboard.registerNewTeam(trimmedTeamName);\n\n // Set the prefix.\n if (prefix != null && !prefix.isEmpty()) {\n team.setPrefix(prefix);\n }\n\n // Set ths suffix.\n if (suffix != null && !suffix.isEmpty()) {\n team.setSuffix(suffix);\n }\n }",
"public FightTeam team();",
"public Player(String nickname, String color) {\n //Creating objects\n this.nickname = nickname;\n this.resources = new Assets();\n this.strengths = new Strengths();\n this.leaderCards = new ArrayList<>();\n this.familyMembers = new ArrayList<>();\n this.pickDiscounts = new HashMap<>();\n this.diceOverride = new HashMap<>();\n this.defaultHarvestBonus = new Assets();\n this.defaultProductionBonus = new Assets();\n this.color = color;\n this.cards = new HashMap<>();\n DEFAULT_TOWERS_COLORS.forEach(towerColor -> this.pickDiscounts.put(towerColor, new Assets()));\n pickDiscounts.put(BLACK_COLOR, new Assets());\n getLog().log(Level.INFO, \"New empty player %s created.\", nickname);\n }",
"public Team create(TeamDTO teamForm);",
"@ApiOperation(\"Creates a Team\")\n @PostMapping(\"/API/v1/team\")\n public ResponseEntity<TeamAPI> createTeam(@RequestParam String nombreEquipo){\n TeamString salida = teamService.crearTeam(nombreEquipo, false);\n\n if(salida.getSalida().equals(\"OK\")){\n return new ResponseEntity<>(salida.getTeam().toTeamAPI(), HttpStatus.OK);\n }\n else {\n return new ResponseEntity(salida.getSalida(), HttpStatus.NOT_FOUND);\n }\n\n }",
"public static JDialog createTeamDialog(final ChampionSelectGUI t) {\n\t\tfinal JPanel contentPanel = new JPanel();\n\t\tJLabel request = new JLabel(\"Please select your team\");\n\t\tcontentPanel.add(request);\n\t\trequest.setAlignmentX(Component.CENTER_ALIGNMENT);\n\t\tfinal Choice input = new Choice();\n\t\tinput.add(\"---Select Team---\");\n\t\tinput.add(\"Blue\");\n\t\tinput.add(\"Red\");\n\t\tcontentPanel.add(input);\n\t\tJButton ok = new JButton(\"ok\");\n\t\tcontentPanel.add(ok);\n\t\tok.setSize(200, 150);\n\t\tok.setAlignmentX(Component.CENTER_ALIGNMENT);\n\t\tfinal JDialog d = new JDialog(t, \"Team\", true);\n\t\td.setContentPane(contentPanel);\n\t\td.setDefaultCloseOperation(JDialog.DO_NOTHING_ON_CLOSE);\n\t\td.setSize(400, 100);\n\t\td.setLocationRelativeTo(t);\n\t\td.setLayout(new BoxLayout(contentPanel, BoxLayout.Y_AXIS));\n\t\td.addWindowListener(new WindowListener() {\n\t\t\tpublic void windowClosing(WindowEvent e) {\n\t\t\t\tint ret = JOptionPane.showConfirmDialog(contentPanel, \"Are you sure you want to exit?\", \"Choose an option\", JOptionPane.YES_NO_OPTION);\n\t\t\t\tif (ret == 0) {\n\t\t\t\t\tSystem.exit(0);\n\t\t\t\t}\n\t\t\t}\n\t\t\tpublic void windowOpened(WindowEvent e) {}\n\t\t\tpublic void windowClosed(WindowEvent e) {}\n\t\t\tpublic void windowIconified(WindowEvent e) { }\n\t\t\tpublic void windowDeiconified(WindowEvent e) { }\n\t\t\tpublic void windowActivated(WindowEvent e) { }\n\t\t\tpublic void windowDeactivated(WindowEvent e) { }\n\t\t});\n\t\tok.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tif (input.getSelectedItem().equals(\"---Select Team---\")) {\n\t\t\t\t\tJOptionPane.showMessageDialog(contentPanel, \"Please select a Team.\", \"Message\", JOptionPane.ERROR_MESSAGE);\n\t\t\t\t} else {\n\t\t\t\t\tif (input.getSelectedItem().equals(\"Blue\")) {\n\t\t\t\t\t\tt.teamArr[0] = true;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tt.teamArr[0] = false;\n\t\t\t\t\t}\n\t\t\t\t\td.setVisible(false);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\treturn d;\n\t}",
"public NetworkGame(String team){\n super();\n this.team = team;\n }",
"Team findByName(String name);",
"public PlayerClass(int color, String name){\n\t\tthis.color=color;\n\t\tthis.name=name;\n\t\tpawns = new PawnClass[4];\n\t\tdiceTossed = false;\n\t}",
"public void setTeamName(String teamName) {\r\n this.teamName = teamName;\r\n }",
"public Color getColor()\n {\n return mTeam.getColor();\n }",
"private void createGame(String name){\n\n }",
"public Player(String name) {\r\n\t\tthis.name=name;\r\n\t\tinitializeGameboard();\r\n\t\tlastRedNumber=2; \r\n\t\tlastYellowNumber=2;\r\n\t\tlastGreenNumber=12;\r\n\t\tlastBlueNumber=12;\r\n\t\tnegativePoints=0;\r\n\t}",
"public RandomOpponent(String name) {\n this.name = name;\n }",
"public Team insert(League league, String teamName) {\n StandingDB sdb = new StandingDB();\n TeamDB tdb = new TeamDB();\n String teamID = generateTeamID();\n \n Standing standing = new Standing(teamID);\n \n Team team = new Team(teamID, teamName);\n team.setLeagueID(league);\n \n tdb.insert(team);\n sdb.insert(standing);\n return team;\n }",
"public void createTeamMemberEntity(String fName, String lname, String gamertag, int age,\n String gender, String position, String mainChampion) {\n LOGGER.fine(\"Creating TeamMember object\");\n\n TeamMember player = new TeamMember();\n player.setfName(fName);\n player.setlName(lname);\n player.setGamertag(gamertag);\n player.setAge(age);\n Gender genderEnum = Gender.valueOf(gender);\n player.setGender(genderEnum);\n Position positionEnum = Position.valueOf(position);\n player.setPosition(positionEnum);\n player.setMainChampion(mainChampion);\n\n LOGGER.fine(\"Persisting TeamMember object to DB\");\n this.entityManager.persist(player);\n\n }",
"public Builder setTeam(int value) {\n bitField0_ |= 0x00000004;\n team_ = value;\n onChanged();\n return this;\n }",
"void addMyTeam(Team team) throws HasTeamAlreadyException;",
"public Player(String name, int score, Color color) {\r\n this.name = name;\r\n this.score = score;\r\n Random randX = new Random(Game.BOARD_X);\r\n Random randY = new Random(Game.BOARD_Y);\r\n this.car = new Car(new Position(randX.nextInt(), randY.nextInt()), 0, color);\r\n }",
"public Seagull(String name){\n this.name = name;\n this.color = SWT.COLOR_DARK_BLUE;\n }",
"private void setTeamInfo_Blue1() {\n blueTeamNumber1.setText(fixNumTeam(blueTeamNumber1.getText(), \"Blue 1\"));\n\n blueTeamNumber1.setBackground(Color.WHITE);\n\n FieldAndRobots.getInstance().setTeamNumber(FieldAndRobots.BLUE, FieldAndRobots.ONE,\n Integer.parseInt(blueTeamNumber1.getText()));\n FieldAndRobots.getInstance().actOnRobot(FieldAndRobots.BLUE,\n FieldAndRobots.ONE, FieldAndRobots.SpecialState.ZERO_BATTERY);\n\n if (!Main.isSimpleMode()) {\n PLC_Sender.getInstance().updatePLC_TeamNum(true);\n }\n }",
"public SoccerPlayer(String name, String position, TeamDB team){\n\n// Random num = new Random();\n// int randInt1;\n// int randInt2;\n// int randInt3;\n// int randInt4;\n//\n// randInt1 = num.nextInt(10); //fix for height and weight.\n// randInt2 = num.nextInt(190);\n// randInt3 = num.nextInt(300);\n// randInt4 = num.nextInt(10);\n\n playerName = name;\n playerPosition = position;\n playerTeam = new TeamDB(\"\");\n// playerUniform = randInt1;\n// playerHeight = randInt2;\n// playerWeight = randInt3;\n// playerGoals = randInt4;\n }",
"public ColourTest(String name)\n\t{\n\t\tsuper(name);\n\t}",
"static Player createNewPlayer(String className, Color color) throws IllegalArgumentException {\n switch (className) {\n case \"PlayerKI\":\n return new PlayerKI(color);\n case \"PlayerKI2\":\n return new PlayerKI2(color);\n case \"PlayerKI3\":\n return new PlayerKI3(color);\n case \"PlayerKI4\":\n return new PlayerKI4(color);\n case \"PlayerHuman\":\n return new PlayerPhysical(color);\n default:\n throw new IllegalArgumentException(\"createNewPlayer in Player.java doesn't know how to handle this!\");\n }\n }",
"public void createProject(String name) {\n Project project = new Project(name);\n Leader leader = new Leader(this, project);\n project.addLeader(leader);\n }",
"private void setTeamInfo_Red1() {\n redTeamNumber1.setText(fixNumTeam(redTeamNumber1.getText(), \"Red 1\"));\n\n redTeamNumber1.setBackground(Color.WHITE);\n\n FieldAndRobots.getInstance().setTeamNumber(FieldAndRobots.RED,\n FieldAndRobots.ONE, Integer.parseInt(redTeamNumber1.getText()));\n FieldAndRobots.getInstance().actOnRobot(FieldAndRobots.RED,\n FieldAndRobots.ONE, FieldAndRobots.SpecialState.ZERO_BATTERY);\n\n if (!Main.isSimpleMode()) {\n PLC_Sender.getInstance().updatePLC_TeamNum(true);\n }\n }",
"PlayerBean create(String name);",
"public Team(String teamName, int manSpriteId, int kingSpriteId, int forward) {\n mTeamName = teamName;\n Pieces = new ArrayList<Piece>();\n mManSpriteId = manSpriteId;\n mKingSpriteId = kingSpriteId;\n mForward = forward;\n }",
"public Room(String name, String password) {\r\n this.name = name;\r\n this.password = password;\r\n capacity = DEFAULT_CAPACITY;\r\n\r\n teamBlue = new Team(TeamColour.BLUE);\r\n teamRed = new Team(TeamColour.RED);\r\n }",
"private Team getTeam(String teamName) {\n return scoreboard.getTeam(trimString(teamName));\n }",
"private void setTeamInfo_Blue3() {\n blueTeamNumber3.setText(fixNumTeam(blueTeamNumber3.getText(), \"Blue 3\"));\n\n blueTeamNumber3.setBackground(Color.WHITE);\n\n FieldAndRobots.getInstance().setTeamNumber(FieldAndRobots.BLUE, FieldAndRobots.THREE,\n Integer.parseInt(blueTeamNumber3.getText()));\n FieldAndRobots.getInstance().actOnRobot(FieldAndRobots.BLUE,\n FieldAndRobots.THREE, FieldAndRobots.SpecialState.ZERO_BATTERY);\n\n if (!Main.isSimpleMode()) {\n PLC_Sender.getInstance().updatePLC_TeamNum(true);\n }\n }",
"private void setTeamInfo_Red3() {\n redTeamNumber3.setText(fixNumTeam(redTeamNumber3.getText(), \"Red 3\"));\n\n redTeamNumber3.setBackground(Color.WHITE);\n\n FieldAndRobots.getInstance().setTeamNumber(FieldAndRobots.RED, FieldAndRobots.THREE,\n Integer.parseInt(redTeamNumber3.getText()));\n FieldAndRobots.getInstance().actOnRobot(FieldAndRobots.RED,\n FieldAndRobots.THREE, FieldAndRobots.SpecialState.ZERO_BATTERY);\n\n if (!Main.isSimpleMode()) {\n PLC_Sender.getInstance().updatePLC_TeamNum(true);\n }\n }",
"public static void setBlue() {\r\n playerTeam.setColor(blue);\r\n updateMessage(\"Seu time agora é azul\");\r\n }",
"public Team(String name, int rank, int score) {\n this.name = name;\n this.rank = rank;\n this.score = score;\n }",
"private void initDefaultTeams() {\n // Loop through the list of user groups and register\n // them as teams.\n for (UserGroup userGroup : UserGroup.values()) {\n // Register the new Team.\n Team team = scoreboard.registerNewTeam(userGroup.getTeamName());\n team.setCanSeeFriendlyInvisibles(true);\n\n // If the prefix does not exist, skip the part below.\n if (userGroup.getUserGroupPrefix().isEmpty()) continue;\n\n // Add the prefix.\n team.setPrefix(userGroup.getUserGroupPrefix());\n }\n }",
"Fruit(String name){\n this.name = name;\n this.color = null;\n }",
"public Team(String dName, int dTeamNumber, int dRookieYear) {\n\t\tthis.name = dName;\n\t\tthis.teamNumber = dTeamNumber;\n\t\tthis.members = new ArrayList<>();\n\t\tthis.rookieYear = dRookieYear;\n\t}",
"public Creator(String score_name) {\n this.score_name = score_name;\n\n this.bukkitScoreboard = Bukkit.getScoreboardManager().getNewScoreboard();\n this.obj = this.bukkitScoreboard.registerNewObjective(randomString(), \"dummy\", \"test\");\n\n this.obj.setDisplaySlot(DisplaySlot.SIDEBAR);\n this.obj.setDisplayName(color(score_name));\n }",
"@Given(\"^I navigate to team page \\\"([^\\\"]*)\\\"$\")\n public void navigate_to_teamPage(String nameTeam){\n addNewTeam = mainPage.clickNewTeam();\n teamPage = addNewTeam.createTeam(nameTeam);\n }",
"Team getMyTeam();",
"@Test\r\n\tpublic void saveTeam() {\r\n\t\t// TODO: JUnit - Populate test inputs for operation: saveTeam \r\n\t\tTeam team = new wsdm.domain.Team();\r\n\t\tservice.saveTeam(team);\r\n\t}",
"public FootballGame(String team1,String team2,LocalDate matchDate,int teamOneScore,int teamTwoScore){\n this.team1=team1;\n this.team2=team2;\n this.matchDate=matchDate;\n this.teamOneScore=teamOneScore;\n this.teamTwoScore=teamTwoScore;\n\n }",
"public Team getTeamByName(String name) {\n\t\tTeam t = null;\n\t\ttry {\n\t\t\tPreparedStatement statement = null;\n\t\t\tResultSet rs = null;\n\t\t\tString teamRecords_sql = \"SELECT * FROM \" + team_table + \" WHERE name='\" + name + \"'\";\n\t\t\tconnection = connector.getConnection();\n\t\t\tstatement = connection.prepareStatement(teamRecords_sql);\n\t\t\trs = statement.executeQuery();\n\t\t\tList<Player> players = new ArrayList<Player>();\n\t\t\tif (rs.next()) {\n\t\t\t\tplayers = formatPlayers(getPlayersByTeamId(rs.getInt(1)));\n\t\t\t\tt = new Team(players, rs.getString(2), rs.getString(3), rs.getString(4), rs.getDate(5));\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\t\treturn t;\n\t}",
"@Override\n\tpublic String toString() {\n\t\treturn teamName;\n\t}",
"public static void saveTeamNames() {\r\n\t\tMain.team1 = Main.teamOne.name;\r\n\t\tMain.team2 = Main.teamTwo.name;\r\n\t}",
"public Fruit()\n {\n setColor(Color.GREEN);\n }",
"public Player createPlayer(String name, Player.Token token, int playerNum) {\n switch (token) {\n case MissScarlett:\n return new Player(name, token, Parser.playersStartPositions.get(0), playerNum);\n case ProfessorPlum:\n return new Player(name, token, Parser.playersStartPositions.get(1), playerNum);\n case MrsWhite:\n return new Player(name, token, Parser.playersStartPositions.get(2), playerNum);\n case MrsPeacock:\n return new Player(name, token, Parser.playersStartPositions.get(3), playerNum);\n case MrGreen:\n return new Player(name, token, Parser.playersStartPositions.get(4), playerNum);\n case ColonelMustard:\n return new Player(name, token, Parser.playersStartPositions.get(5), playerNum);\n default:\n throw new IllegalArgumentException(\"Player selection was abnormally exited\");\n }\n }",
"FONT createFONT();",
"private void createPlayers() {\n\t\t//Randomize roles\n\t\tArrayList<AdventurerEnum> randomisedRoles = getRandomisedRoles();\n\t\tfor(int i=0; i<numPlayers; i++) \n\t\t\tcreateOnePlayer(randomisedRoles.get(i), i+1);\n\t}",
"public Location spawn(teamName team, Match m) {\r\n\t\tif (team == teamName.ALLIES && m.getState().equals(gameState.PREGAME)){\r\n\t\t\treturn alliesSpawn;\r\n\t\t} else if (team == teamName.AXIS && m.getState().equals(gameState.PREGAME)){\r\n\t\t\treturn axisSpawn;\r\n\t\t} else if (team == teamName.SPECTATOR){\r\n\t\t\treturn mainSpawn;\r\n\t\t} else if (team == teamName.ALONE){\r\n\t\t\treturn randomSpawn(m);\r\n\t\t} else {\r\n\t\t\treturn randomSpawn(team, m);\r\n\t\t}\r\n\t}",
"@Override\n public void initPlayer( int dim, int team ) {\n this.team = team;\n this.board = new BoardGraph(dim);\n int bDim = dim*2;\n // i is the row, p is the column\n for(int i = 0; i < bDim +1; i++){\n for( int p = 0; p< bDim+1; p++){\n // if row is even and column is odd, blue dot is put (team 2)\n if(i%2 == 0 && p%2 != 0) {\n board.makeNode(new Coordinate(i,p),2);\n }\n // if row is odd and column is even, red dot is put (team 1)\n else if (i%2 != 0 && p%2 == 0){\n board.makeNode(new Coordinate(i,p), 1);\n }\n }\n }\n\n }",
"public Player(@NotNull String name, String region) {\n this.name = name;\n Cell cell = new Cell(\"\",0,0, Color.BLUE,new RoundRectangle2D.Float());\n cells.add(cell);\n if (log.isInfoEnabled()) {\n log.info(toString() + \" created\");\n }\n\n }",
"public void setName(String name){\n\t\tthis.tournamentName = name;\n\t}",
"public Player(String name)\n { \n if (name == \"\")\n {\n setName(\"Anonymous\");\n }\n else\n {\n setName(name);\n }\n }",
"public static void addColor(){ \r\n \r\n welcome.add(black);\r\n black.setAlignmentX(Component.CENTER_ALIGNMENT);\r\n black.setBorder(BorderFactory.createEmptyBorder(10,10,10,10));\r\n \r\n welcome.add(red);\r\n red.setAlignmentX(Component.CENTER_ALIGNMENT);\r\n red.setBorder(BorderFactory.createEmptyBorder(10,10,10,10)); //adding some buttons, formatting them, and aligning them\r\n \r\n welcome.add(yellow);\r\n yellow.setAlignmentX(Component.CENTER_ALIGNMENT);\r\n yellow.setBorder(BorderFactory.createEmptyBorder(10,10,10,10));\r\n \r\n welcome.add(green);\r\n green.setAlignmentX(Component.CENTER_ALIGNMENT);\r\n green.setBorder(BorderFactory.createEmptyBorder(10,10,10,10));\r\n }",
"private void setTeamInfo_Red2() {\n redTeamNumber2.setText(fixNumTeam(redTeamNumber2.getText(), \"Red 2\"));\n\n redTeamNumber2.setBackground(Color.WHITE);\n\n FieldAndRobots.getInstance().setTeamNumber(FieldAndRobots.RED, FieldAndRobots.TWO,\n Integer.parseInt(redTeamNumber2.getText()));\n FieldAndRobots.getInstance().actOnRobot(FieldAndRobots.RED,\n FieldAndRobots.TWO, FieldAndRobots.SpecialState.ZERO_BATTERY);\n\n if (!Main.isSimpleMode()) {\n PLC_Sender.getInstance().updatePLC_TeamNum(true);\n }\n }",
"public String getTeamName() {\r\n return teamName;\r\n }",
"public Player(String name, String color, int id) {\n\t\tsuper();\n\t\tthis.name = name;\n\t\tthis.color = color;\n\t\tthis.id = id;\n\t}",
"void createPlayer(Player player);",
"public TeamCoach(){\n }",
"public Task(String name, String color){\n this.name = name;\n this.color = color;\n }",
"public static void createGame(Player admin, String name, String baseName, boolean createWorlds) {\n\t\t\n\t\tWorldSet worldSet = new WorldSet(baseName, createWorlds);\n\t\t\n\t\t// create new game\n\t\tGame game = new Game(admin, name, worldSet, createWorlds);\n\t\tgames.add(game);\n\t\t\n\t\tPreGame preGame = new PreGame(admin.getUniqueId(), name);\n\t\tpreGames.remove(preGame);\n\t\t\n\t\tadmin.sendMessage(AQUA + \"A game has been successfully created with the name of \" + WHITE + name + AQUA + \n\t\t\t\t\". The admin of the game is \" + WHITE + admin.getName() + AQUA + \".\");\n\t\t\n\t}",
"@Override\n\tpublic LightTank create(Enum<?> model, Enum<?> color) {\n\t\treturn new LightTank(GameContext.getGameContext(), model, color);\n\t}",
"public static TeamSheet newInstance(String clubname, int crestid) {\n TeamSheet fragment = new TeamSheet();\n Bundle args = new Bundle();\n args.putString(TEAM_NAME_FC,clubname);\n args.putInt(CLUB_CREST_ID,crestid);\n fragment.setArguments(args);\n return fragment;\n }",
"private void setTeamInfo_Blue2() {\n blueTeamNumber2.setText(fixNumTeam(blueTeamNumber2.getText(), \"Blue 2\"));\n\n blueTeamNumber2.setBackground(Color.WHITE);\n\n FieldAndRobots.getInstance().setTeamNumber(FieldAndRobots.BLUE, FieldAndRobots.TWO,\n Integer.parseInt(blueTeamNumber2.getText()));\n FieldAndRobots.getInstance().actOnRobot(FieldAndRobots.BLUE,\n FieldAndRobots.TWO, FieldAndRobots.SpecialState.ZERO_BATTERY);\n\n if (!Main.isSimpleMode()) {\n PLC_Sender.getInstance().updatePLC_TeamNum(true);\n }\n }",
"public void setTeamName(String teamName) {\n\t\tthis.teamName = teamName;\n\t}",
"private static void displayUserTeam() {\n\t\tif (game.getCurrentRound()==1) {\n\t\t\tfor (int i = 0; i<11; i++) {\n\t\t\t\tplayerNameArray[i].setText(\"Name\");\n\t\t\t\timageArray[i].setIcon(MainGui.getShirt(\"noTeam\"));\n\t\t\t\tbuttonArray[i].setText(\"+\");\n\t\t\t}\n\t\t}\n\t}",
"public String createFamily(String name);",
"public void createNewGame() {\n\t\tfor(int n = 0; n < 8; n++){\n\t\t\tfor(int j = 0; j < 8; j++){\n\t\t\t\tif ( n % 2 == j % BLACK_PAWN ) {\n\t\t\t\t\tif (n < 3)\n\t\t\t\t\t\tarr[n][j] = RED_PAWN;\n\t\t\t\t\telse if (n > 4)\n\t\t\t\t\t\tarr[n][j] = BLACK_PAWN;\n\t\t\t\t\telse\n\t\t\t\t\t\tarr[n][j] = EMPTY;\n\t\t } \n\t\t\t\telse\n\t\t\t\t\tarr[n][j] = EMPTY;\n\t\t\t}\n\t\t}\n\t}"
] |
[
"0.7490625",
"0.72642773",
"0.7058986",
"0.6984186",
"0.66727364",
"0.65721",
"0.65710586",
"0.6554844",
"0.6213525",
"0.61685824",
"0.61628",
"0.60962343",
"0.60522485",
"0.604511",
"0.5983157",
"0.59569687",
"0.5897576",
"0.5870346",
"0.58448833",
"0.57439303",
"0.5691362",
"0.56844634",
"0.5637366",
"0.5634765",
"0.5606805",
"0.5590914",
"0.5587911",
"0.55771524",
"0.5575161",
"0.5565918",
"0.5553957",
"0.55320233",
"0.55160433",
"0.5511066",
"0.55108184",
"0.5500041",
"0.54579383",
"0.545023",
"0.54481447",
"0.5443876",
"0.54436463",
"0.5434754",
"0.54194504",
"0.53970563",
"0.5394233",
"0.5388287",
"0.53630394",
"0.53566694",
"0.5354405",
"0.5353698",
"0.5345383",
"0.5338411",
"0.5332552",
"0.5320224",
"0.531468",
"0.53068525",
"0.5286128",
"0.52500165",
"0.52406025",
"0.52387744",
"0.52259845",
"0.52193725",
"0.5211961",
"0.5186928",
"0.5185125",
"0.5178457",
"0.5177717",
"0.5171884",
"0.5164498",
"0.5151749",
"0.51334167",
"0.51307094",
"0.5128798",
"0.5108221",
"0.510276",
"0.50961953",
"0.50918937",
"0.5088721",
"0.5086965",
"0.5082592",
"0.50768197",
"0.50753576",
"0.50645626",
"0.50587493",
"0.50560164",
"0.5054936",
"0.50509894",
"0.50453365",
"0.50424635",
"0.5041192",
"0.50391686",
"0.503005",
"0.5026014",
"0.5025485",
"0.5018482",
"0.49995923",
"0.4998116",
"0.49919903",
"0.4991674",
"0.49898228"
] |
0.7365262
|
1
|
Creates a team with a name and color
|
public Team(String name, Color color) {
this.teamName = name;
this.color = color;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"void create(Team team);",
"Team createTeam();",
"public Team(String name) {\n\t\tthis(name, Color.BLACK);\n\t}",
"public Team(String name) {\n this.name = name;\n }",
"public void newTeam(Team team);",
"public static ProjectTeam createSampleProjectTeam() {\n ProjectTeam team = new ProjectTeam();\n team.setProjectName(\"Rule the Galaxy\");\n team.addMember(new ProjectMember(\n \"Emperor Palpatine\", \"lead\", \"[email protected]\"));\n team.addMember(new ProjectMember(\n \"Lord Darth Vader\", \"Jedi-Killer\", \"[email protected]\"));\n team.addMember(new ProjectMember(\n \"Grand Moff Tarkin\", \"Planet-Killer\", \"[email protected]\"));\n team.addMember(new ProjectMember(\n \"Admiral Motti\", \"Death Star operations\", \"[email protected]\"));\n return team;\n }",
"public void createTeam(ActionEvent actionEvent) throws IOException, SQLException {\n if (validCreateInput()) {\n user = DatabaseManager.createTeam(user, teamNameCreateField.getText(), abbrevationCreateField.getText(), chooseCityBoxCreate.getValue().toString(),\n chooseAgeGroupCreate.getValue(), chooseLeagueBoxCreate.getValue().toString(), chooseLeagueTeamBoxCreate.getValue().toString(), createTeamLogoFile);\n\n createPaneClose(actionEvent);\n displayMessage(messagePane, \"Team created\", false);\n }\n }",
"TeamMember(String _name, String _title) {\r\n this.name = _name;\r\n this.title = _title;\r\n }",
"public void createTeam(final Map<String, String> dataTable) {\n team.processInformation(dataTable);\n WebDriverHelper.waitUntil(inputTeamName);\n WebDriverHelper.setElement(inputTeamName, team.getName());\n WebDriverHelper.clickElement(dropDownTeamType);\n selectDropDownOptionByName(team.getType());\n WebDriverHelper.setElement(inputTeamDescription, team.getDescription());\n WebDriverHelper.clickElement(btnContinue);\n WebDriverHelper.waitUntil(btnThisLater);\n WebDriverHelper.clickElement(btnThisLater);\n }",
"public Team(String name) {\r\n this.name = name;\r\n team = new ArrayList<Hero>();\r\n }",
"String createTeam(String userName, String teamName, Set<String> members) throws RemoteException, InterruptedException;",
"public Team( TeamColor color,Map map)\n\t{\n\t\tthis.nbCharacter = DEFAULT_NB_CHARACTER;\n\t\tthis.listCharacter = new Character[this.nbCharacter];\n\t\tthis.colorTeam = color;\t\n\t\tfor(int nbCharacterCreated =0; nbCharacterCreated<this.nbCharacter;nbCharacterCreated++)\n\t\t{\n\t\t\tthis.listCharacter[nbCharacterCreated] = new Character(this,map,nbCharacterCreated+1);\n\t\t}\n\t\tthis.actionPointLeft = DEFAULT_ACTION_POINT;\n\t}",
"public static void createNewLeague()\n\t{\n\t\t//put code to get input from end-user here.\n\t\t//generateFixtures(leagueName, teamAmount, homeAndAway, winPoints, drawPoints, lossPoints, teamNames);\n\t}",
"public static void addTeam(TeamForm tf) {\n Team team;\n\n long id = tf.id;\n\n if (!isTeam(id)) {\n team = new Team(tf.teamName, tf.location, tf.teamType, tf.skillLevel, tf.roster, tf.description, tf.imageUrl);\n team.save();\n }\n else {\n team = getTeam(id);\n team.setTeamName(tf.teamName);\n team.setLocation(tf.location);\n team.setTeamType(tf.teamType);\n team.setSkillLevel(tf.skillLevel);\n team.setRoster(tf.roster);\n team.setDescription(tf.description);\n team.setImageUrl(tf.imageUrl);\n team.setWins(tf.wins);\n team.setLosses(tf.losses);\n team.setPointsFor(tf.pointsFor);\n team.setPointsAgainst(tf.pointsAgainst);\n team.save();\n }\n }",
"@WebMethod public Team addTeam(String name) throws TeamAlreadyExists;",
"public static Team createEntity(EntityManager em) {\n Team team = new Team().name(DEFAULT_NAME).description(DEFAULT_DESCRIPTION)\n .level(DEFAULT_LEVEL).totalMember(DEFAULT_TOTAL_MEMBER)\n .extraGroupName(DEFAULT_EXTRA_GROUP_NAME)\n .extraGroupDescription(DEFAULT_EXTRA_GROUP_DESCRIPTION)\n .extraGroupTotalMember(DEFAULT_EXTRA_GROUP_TOTAL_MEMBER);\n return team;\n }",
"public void createNewTeam(ActionEvent actionEvent) throws IOException {\n createTeamPane.setDisable(false);\n createTeamPane.setVisible(true);\n darkPane.setDisable(false);\n darkPane.setVisible(true);\n\n teamNameCreateField.setText(\"\");\n abbrevationCreateField.setText(\"\");\n chooseCityBoxCreate.getSelectionModel().clearSelection();\n chooseLeagueBoxCreate.getSelectionModel().clearSelection();\n chooseAgeGroupCreate.getSelectionModel().clearSelection();\n chooseLeagueTeamBoxCreate.getSelectionModel().clearSelection();\n\n chooseLeagueBoxCreate.setDisable(true);\n chooseLeagueTeamBoxCreate.setDisable(true);\n }",
"@RequestMapping(value = \"/team/{league}\", method = POST, consumes = MEDIA_JSON)\n @ResponseStatus(CREATED)\n public LobbyTeam createTeamAndEnter(@AuthenticationPrincipal UserSimpleDetails user,\n @PathVariable(\"league\") LobbyLeagueEnum league)\n throws TeamFullException, TeamNotFoundException {\n log.info(\"user {} creates team\", user.getIdentity());\n LobbyTeam team = lobbyService.createTeam(user.getProfileId(), league);\n return lobbyService.enterIntoTeam(user.getProfileId(), team.getId().toString());\n }",
"public Team create(TeamDTO teamForm);",
"private void createLeague(){ \r\n FantasyUser maxUser = new FantasyUser();\r\n maxUser.setEmail(\"[email protected]\");\r\n maxUser.setPassword(\"password\");\r\n fUserBean.create(maxUser);\r\n \r\n FantasyUser adrianUser = new FantasyUser();\r\n adrianUser.setEmail(\"[email protected]\");\r\n adrianUser.setPassword(\"password\");\r\n fUserBean.create(adrianUser);\r\n \r\n FantasyUser ashayUser = new FantasyUser();\r\n ashayUser.setEmail(\"[email protected]\");\r\n ashayUser.setPassword(\"password\");\r\n fUserBean.create(ashayUser);\r\n \r\n FantasyUser jessUser = new FantasyUser();\r\n jessUser.setEmail(\"[email protected]\");\r\n jessUser.setPassword(\"password\");\r\n fUserBean.create(jessUser);\r\n \r\n //create league\r\n FantasyLeague league = new FantasyLeague();\r\n league.setDraftStarted(false);\r\n league.setFinishedDraft(false);\r\n league.setLeagueName(\"Mongeese Only\");\r\n league.setLeagueOwner(maxUser);\r\n flBean.create(league);\r\n \r\n //create teams\r\n FantasyTeam maxTeam = new FantasyTeam();\r\n maxTeam.setTeamName(\"Max's Team\");\r\n maxTeam.setTeamOwner(maxUser);\r\n maxTeam.setLeague(league);\r\n ftBean.create(maxTeam);\r\n \r\n FantasyTeam ashayTeam = new FantasyTeam();\r\n ashayTeam.setTeamName(\"Ashay's Team\");\r\n ashayTeam.setTeamOwner(ashayUser);\r\n ashayTeam.setLeague(league);\r\n ftBean.create(ashayTeam);\r\n \r\n FantasyTeam jessTeam = new FantasyTeam();\r\n jessTeam.setTeamName(\"Jess's team\");\r\n jessTeam.setTeamOwner(jessUser);\r\n jessTeam.setLeague(league);\r\n ftBean.create(jessTeam);\r\n \r\n FantasyTeam adrianTeam = new FantasyTeam();\r\n adrianTeam.setTeamName(\"Team Greasy Pizza\");\r\n adrianTeam.setTeamOwner(adrianUser);\r\n adrianTeam.setLeague(league); \r\n ftBean.create(adrianTeam);\r\n }",
"public TeamObject(String name) {\n\t\tthis();\t\t//call the first constructor to build the lock buttons\n\t\tteamName = name;\n\t}",
"public void createPlayer() {\n ColorPicker colorPicker = new ColorPicker();\n\n for (Player player : players) {\n if (player.getColor() == color(0, 0, 0) || (player.hasName() == false)) {\n pickColor(player, colorPicker);\n return;\n }\n }\n\n // if (ENABLE_SOUND) {\n // sfx.moveToGame();\n // }\n\n state = GameState.PLAY_GAME;\n\n // Spawn players\n int index = 0;\n for (int i=players.size()-1; i>=0; i--) {\n String dir = directions.get(index); // Need to add players in reverse so that when they respawn, they move in the right direction\n players.get(i).setSpawn(spawns.get(dir)).setDirection(dir);\n index++;\n }\n\n // Update game state only if all players have name and color\n}",
"public void createTeamMemberEntity(String fName, String lname, String gamertag, int age,\n String gender, String position, String mainChampion) {\n LOGGER.fine(\"Creating TeamMember object\");\n\n TeamMember player = new TeamMember();\n player.setfName(fName);\n player.setlName(lname);\n player.setGamertag(gamertag);\n player.setAge(age);\n Gender genderEnum = Gender.valueOf(gender);\n player.setGender(genderEnum);\n Position positionEnum = Position.valueOf(position);\n player.setPosition(positionEnum);\n player.setMainChampion(mainChampion);\n\n LOGGER.fine(\"Persisting TeamMember object to DB\");\n this.entityManager.persist(player);\n\n }",
"public void setTeamName(String name) {\n\t\tteamName = name;\n\t}",
"public team(int teamID, String teamName, String mascot, int games, int wins, int loses) throws SQLException {\n\t\tthis.teamID = teamID;\n\t\tthis.teamName = teamName;\n\t\tthis.mascot = mascot;\n\t\tthis.games = games;\n\t\tthis.wins = wins;\n\t\tthis.loses = loses;\n\t\tconn = DriverManager.getConnection(DB_URL);\n\t\tStatement stmt = conn.createStatement();\n\t\t \n\t\t stmt.executeUpdate(\"INSERT INTO Team VALUES (\" +\n\t this.teamID + \", '\" +\n\t this.teamName + \"', '\" + \n\t this.mascot + \"', \" +\n\t this.games + \", \" +\n\t this.wins + \", \" +\n\t this.loses +\n\t \")\");\n\t\t \n\t\t conn.close();\n\t stmt.close();\n\t}",
"public Team(int nb, TeamColor color,Map map)\n\t{\n\t\tthis.nbCharacter = nb;\n\t\tthis.listCharacter = new Character[this.nbCharacter];\n\t\tthis.colorTeam = color;\n\t\tfor(int nbCharacterCreated =0; nbCharacterCreated<this.nbCharacter;nbCharacterCreated++)\n\t\t{\n\t\t\tthis.listCharacter[nbCharacterCreated] = new Character(this, map,nbCharacterCreated+1);\n\t\t}\n\t\tthis.actionPointLeft = DEFAULT_ACTION_POINT;\n\t}",
"public Team(String name, List<Player> players) {\n this.name = name;\n this.players = players;\n }",
"public Team getTeam() {\n Team team = new Team();\n team.setTeamName(this.getTeamNameDataLabel().getText());\n team.setCaptain(this.getCaptainDataLabel().getText());\n if (this.getCoachDataLabel().equals(\"\")) {\n team.setCoach(null);\n } else {\n team.setCoach(this.getCoachDataLabel().getText());\n }\n if (this.getAchievementsDataLabel().equals(\"\")) {\n team.setAchievements(null);\n } else {\n team.setAchievements(this.getAchievementsDataLabel().getText());\n }\n return team;\n }",
"@ApiOperation(\"Creates a Team\")\n @PostMapping(\"/API/v1/team\")\n public ResponseEntity<TeamAPI> createTeam(@RequestParam String nombreEquipo){\n TeamString salida = teamService.crearTeam(nombreEquipo, false);\n\n if(salida.getSalida().equals(\"OK\")){\n return new ResponseEntity<>(salida.getTeam().toTeamAPI(), HttpStatus.OK);\n }\n else {\n return new ResponseEntity(salida.getSalida(), HttpStatus.NOT_FOUND);\n }\n\n }",
"public void createPlayers() {\n\t\t\n\t\twhite = new Player(Color.WHITE);\n\t\twhite.initilizePieces();\n\t\tcurrentTurn = white;\n\t\t\n\t\tblack = new Player(Color.BLACK);\n\t\tblack.initilizePieces();\n\t}",
"void addMyTeam(Team team) throws HasTeamAlreadyException;",
"private void addTeam(String teamName, String prefix, String suffix) {\n String trimmedTeamName = trimString(teamName);\n\n // If the team already exists, skip adding it.\n if (teamExist(trimmedTeamName)) return;\n\n // Register the new team\n Team team = scoreboard.registerNewTeam(trimmedTeamName);\n\n // Set the prefix.\n if (prefix != null && !prefix.isEmpty()) {\n team.setPrefix(prefix);\n }\n\n // Set ths suffix.\n if (suffix != null && !suffix.isEmpty()) {\n team.setSuffix(suffix);\n }\n }",
"public Team insert(League league, String teamName) {\n StandingDB sdb = new StandingDB();\n TeamDB tdb = new TeamDB();\n String teamID = generateTeamID();\n \n Standing standing = new Standing(teamID);\n \n Team team = new Team(teamID, teamName);\n team.setLeagueID(league);\n \n tdb.insert(team);\n sdb.insert(standing);\n return team;\n }",
"public Fruit(String color, String name) {\r\n\t\tthis.color = color;\r\n\t\tthis.name = name;\r\n\t}",
"public Team() {\r\n id = \"\";\r\n abbreviation = \"\";\r\n name = \"\";\r\n conference = \"\";\r\n division = \"\";\r\n address = null;\r\n }",
"@Test\r\n\tpublic void saveTeam() {\r\n\t\t// TODO: JUnit - Populate test inputs for operation: saveTeam \r\n\t\tTeam team = new wsdm.domain.Team();\r\n\t\tservice.saveTeam(team);\r\n\t}",
"private void createGame(String name){\n\n }",
"public FightTeam team();",
"public PlayerClass(int color, String name){\n\t\tthis.color=color;\n\t\tthis.name=name;\n\t\tpawns = new PawnClass[4];\n\t\tdiceTossed = false;\n\t}",
"public TeamBuildTool(String name) {\n team = new Team(name);\n run();\n }",
"PlayerBean create(String name);",
"Team findByName(String name);",
"private void createPlayers() {\n\t\t//Randomize roles\n\t\tArrayList<AdventurerEnum> randomisedRoles = getRandomisedRoles();\n\t\tfor(int i=0; i<numPlayers; i++) \n\t\t\tcreateOnePlayer(randomisedRoles.get(i), i+1);\n\t}",
"static Player createNewPlayer(String className, Color color) throws IllegalArgumentException {\n switch (className) {\n case \"PlayerKI\":\n return new PlayerKI(color);\n case \"PlayerKI2\":\n return new PlayerKI2(color);\n case \"PlayerKI3\":\n return new PlayerKI3(color);\n case \"PlayerKI4\":\n return new PlayerKI4(color);\n case \"PlayerHuman\":\n return new PlayerPhysical(color);\n default:\n throw new IllegalArgumentException(\"createNewPlayer in Player.java doesn't know how to handle this!\");\n }\n }",
"public Player(String nickname, String color) {\n //Creating objects\n this.nickname = nickname;\n this.resources = new Assets();\n this.strengths = new Strengths();\n this.leaderCards = new ArrayList<>();\n this.familyMembers = new ArrayList<>();\n this.pickDiscounts = new HashMap<>();\n this.diceOverride = new HashMap<>();\n this.defaultHarvestBonus = new Assets();\n this.defaultProductionBonus = new Assets();\n this.color = color;\n this.cards = new HashMap<>();\n DEFAULT_TOWERS_COLORS.forEach(towerColor -> this.pickDiscounts.put(towerColor, new Assets()));\n pickDiscounts.put(BLACK_COLOR, new Assets());\n getLog().log(Level.INFO, \"New empty player %s created.\", nickname);\n }",
"public void insertTeam(Team t) {\n\t\tEntityManager em = emfactory.createEntityManager();\n\t\tem.getTransaction().begin();\n\t\tem.persist(t);\n\t\tem.getTransaction().commit();\n\t\tem.close();\n\t}",
"public NetworkGame(String team){\n super();\n this.team = team;\n }",
"public static JDialog createTeamDialog(final ChampionSelectGUI t) {\n\t\tfinal JPanel contentPanel = new JPanel();\n\t\tJLabel request = new JLabel(\"Please select your team\");\n\t\tcontentPanel.add(request);\n\t\trequest.setAlignmentX(Component.CENTER_ALIGNMENT);\n\t\tfinal Choice input = new Choice();\n\t\tinput.add(\"---Select Team---\");\n\t\tinput.add(\"Blue\");\n\t\tinput.add(\"Red\");\n\t\tcontentPanel.add(input);\n\t\tJButton ok = new JButton(\"ok\");\n\t\tcontentPanel.add(ok);\n\t\tok.setSize(200, 150);\n\t\tok.setAlignmentX(Component.CENTER_ALIGNMENT);\n\t\tfinal JDialog d = new JDialog(t, \"Team\", true);\n\t\td.setContentPane(contentPanel);\n\t\td.setDefaultCloseOperation(JDialog.DO_NOTHING_ON_CLOSE);\n\t\td.setSize(400, 100);\n\t\td.setLocationRelativeTo(t);\n\t\td.setLayout(new BoxLayout(contentPanel, BoxLayout.Y_AXIS));\n\t\td.addWindowListener(new WindowListener() {\n\t\t\tpublic void windowClosing(WindowEvent e) {\n\t\t\t\tint ret = JOptionPane.showConfirmDialog(contentPanel, \"Are you sure you want to exit?\", \"Choose an option\", JOptionPane.YES_NO_OPTION);\n\t\t\t\tif (ret == 0) {\n\t\t\t\t\tSystem.exit(0);\n\t\t\t\t}\n\t\t\t}\n\t\t\tpublic void windowOpened(WindowEvent e) {}\n\t\t\tpublic void windowClosed(WindowEvent e) {}\n\t\t\tpublic void windowIconified(WindowEvent e) { }\n\t\t\tpublic void windowDeiconified(WindowEvent e) { }\n\t\t\tpublic void windowActivated(WindowEvent e) { }\n\t\t\tpublic void windowDeactivated(WindowEvent e) { }\n\t\t});\n\t\tok.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tif (input.getSelectedItem().equals(\"---Select Team---\")) {\n\t\t\t\t\tJOptionPane.showMessageDialog(contentPanel, \"Please select a Team.\", \"Message\", JOptionPane.ERROR_MESSAGE);\n\t\t\t\t} else {\n\t\t\t\t\tif (input.getSelectedItem().equals(\"Blue\")) {\n\t\t\t\t\t\tt.teamArr[0] = true;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tt.teamArr[0] = false;\n\t\t\t\t\t}\n\t\t\t\t\td.setVisible(false);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\treturn d;\n\t}",
"public SoccerPlayer(String name, String position, TeamDB team){\n\n// Random num = new Random();\n// int randInt1;\n// int randInt2;\n// int randInt3;\n// int randInt4;\n//\n// randInt1 = num.nextInt(10); //fix for height and weight.\n// randInt2 = num.nextInt(190);\n// randInt3 = num.nextInt(300);\n// randInt4 = num.nextInt(10);\n\n playerName = name;\n playerPosition = position;\n playerTeam = new TeamDB(\"\");\n// playerUniform = randInt1;\n// playerHeight = randInt2;\n// playerWeight = randInt3;\n// playerGoals = randInt4;\n }",
"public void createProject(String name) {\n Project project = new Project(name);\n Leader leader = new Leader(this, project);\n project.addLeader(leader);\n }",
"public void cmdAddTeam(User teller, String teamCode) {\n Team team = tournamentService.findTeam(teamCode);\n if (team != null) {\n command.tell(teller, \"A team with name {0} already exists.\", teamCode);\n return;\n }\n try {\n team = tournamentService.createTeam(teamCode);\n } catch (InvalidNameException e) {\n replyError(teller, e);\n return;\n }\n tournamentService.flush();\n command.tell(teller, \"Done. Team {0} has now been created.\", team.getTeamCode());\n command.tell(teller, \"To set the team name, use: \\\"set-team {0} name New York Giants\\\"\", team.getTeamCode());\n cmdShowTeam(teller, team);\n }",
"@Override\n\tpublic LightTank create(Enum<?> model, Enum<?> color) {\n\t\treturn new LightTank(GameContext.getGameContext(), model, color);\n\t}",
"public Color getColor()\n {\n return mTeam.getColor();\n }",
"public Team(String teamName, int manSpriteId, int kingSpriteId, int forward) {\n mTeamName = teamName;\n Pieces = new ArrayList<Piece>();\n mManSpriteId = manSpriteId;\n mKingSpriteId = kingSpriteId;\n mForward = forward;\n }",
"public Player(String name, int score, Color color) {\r\n this.name = name;\r\n this.score = score;\r\n Random randX = new Random(Game.BOARD_X);\r\n Random randY = new Random(Game.BOARD_Y);\r\n this.car = new Car(new Position(randX.nextInt(), randY.nextInt()), 0, color);\r\n }",
"void createPlayer(Player player);",
"public void setTeamName(String teamName) {\r\n this.teamName = teamName;\r\n }",
"public Builder setTeam(int value) {\n bitField0_ |= 0x00000004;\n team_ = value;\n onChanged();\n return this;\n }",
"public Team() {\n\t\tthis(null);\n\t}",
"public static void createGame(Player admin, String name, String baseName, boolean createWorlds) {\n\t\t\n\t\tWorldSet worldSet = new WorldSet(baseName, createWorlds);\n\t\t\n\t\t// create new game\n\t\tGame game = new Game(admin, name, worldSet, createWorlds);\n\t\tgames.add(game);\n\t\t\n\t\tPreGame preGame = new PreGame(admin.getUniqueId(), name);\n\t\tpreGames.remove(preGame);\n\t\t\n\t\tadmin.sendMessage(AQUA + \"A game has been successfully created with the name of \" + WHITE + name + AQUA + \n\t\t\t\t\". The admin of the game is \" + WHITE + admin.getName() + AQUA + \".\");\n\t\t\n\t}",
"@Given(\"^I navigate to team page \\\"([^\\\"]*)\\\"$\")\n public void navigate_to_teamPage(String nameTeam){\n addNewTeam = mainPage.clickNewTeam();\n teamPage = addNewTeam.createTeam(nameTeam);\n }",
"public Room(String name, String password) {\r\n this.name = name;\r\n this.password = password;\r\n capacity = DEFAULT_CAPACITY;\r\n\r\n teamBlue = new Team(TeamColour.BLUE);\r\n teamRed = new Team(TeamColour.RED);\r\n }",
"public Team(String dName, int dTeamNumber, int dRookieYear) {\n\t\tthis.name = dName;\n\t\tthis.teamNumber = dTeamNumber;\n\t\tthis.members = new ArrayList<>();\n\t\tthis.rookieYear = dRookieYear;\n\t}",
"private void setTeamInfo_Blue1() {\n blueTeamNumber1.setText(fixNumTeam(blueTeamNumber1.getText(), \"Blue 1\"));\n\n blueTeamNumber1.setBackground(Color.WHITE);\n\n FieldAndRobots.getInstance().setTeamNumber(FieldAndRobots.BLUE, FieldAndRobots.ONE,\n Integer.parseInt(blueTeamNumber1.getText()));\n FieldAndRobots.getInstance().actOnRobot(FieldAndRobots.BLUE,\n FieldAndRobots.ONE, FieldAndRobots.SpecialState.ZERO_BATTERY);\n\n if (!Main.isSimpleMode()) {\n PLC_Sender.getInstance().updatePLC_TeamNum(true);\n }\n }",
"public FootballGame(String team1,String team2,LocalDate matchDate,int teamOneScore,int teamTwoScore){\n this.team1=team1;\n this.team2=team2;\n this.matchDate=matchDate;\n this.teamOneScore=teamOneScore;\n this.teamTwoScore=teamTwoScore;\n\n }",
"Strobo createStrobo();",
"private void setTeamInfo_Red1() {\n redTeamNumber1.setText(fixNumTeam(redTeamNumber1.getText(), \"Red 1\"));\n\n redTeamNumber1.setBackground(Color.WHITE);\n\n FieldAndRobots.getInstance().setTeamNumber(FieldAndRobots.RED,\n FieldAndRobots.ONE, Integer.parseInt(redTeamNumber1.getText()));\n FieldAndRobots.getInstance().actOnRobot(FieldAndRobots.RED,\n FieldAndRobots.ONE, FieldAndRobots.SpecialState.ZERO_BATTERY);\n\n if (!Main.isSimpleMode()) {\n PLC_Sender.getInstance().updatePLC_TeamNum(true);\n }\n }",
"public RandomOpponent(String name) {\n this.name = name;\n }",
"public Seagull(String name){\n this.name = name;\n this.color = SWT.COLOR_DARK_BLUE;\n }",
"private void handleCreateOperation(String args[]) {\n if (args.length < 4) {\n String requiredArgs = \"<name> <color>\";\n Messages.badNumberOfArgsMessage(args.length, CREATE_OPERATION, requiredArgs);\n System.exit(1);\n }\n\n // set arguments from command line to variables\n String name = args[2];\n String colorString = args[3];\n // convert string to color\n Color colorEnum = null;\n try {\n colorEnum = Color.parseColor(colorString);\n } catch (IllegalArgumentException e) {\n Messages.printAllColors();\n System.exit(1);\n }\n\n // everything is ok, create new brick\n BrickDto brickDto = new BrickDto(name, colorEnum, \"\");\n\n Client client = ClientBuilder.newBuilder().build();\n WebTarget webTarget = client.target(\"http://localhost:8080/pa165/rest/bricks/\");\n webTarget.register(auth);\n Response response = webTarget.request(MediaType.APPLICATION_JSON).post(Entity.entity(brickDto, MediaType.APPLICATION_JSON_TYPE));\n\n // print out some response\n // successful response code is 201 == CREATED\n if (response.getStatus() == Response.Status.CREATED.getStatusCode()) {\n System.out.println(\"Brick with name '\" + name + \"' and color '\" + colorString + \"' was created\");\n } else {\n System.out.println(\"Error on server, server returned \" + response.getStatus());\n }\n }",
"public Task(String name, String color){\n this.name = name;\n this.color = color;\n }",
"private void setTeamInfo_Red3() {\n redTeamNumber3.setText(fixNumTeam(redTeamNumber3.getText(), \"Red 3\"));\n\n redTeamNumber3.setBackground(Color.WHITE);\n\n FieldAndRobots.getInstance().setTeamNumber(FieldAndRobots.RED, FieldAndRobots.THREE,\n Integer.parseInt(redTeamNumber3.getText()));\n FieldAndRobots.getInstance().actOnRobot(FieldAndRobots.RED,\n FieldAndRobots.THREE, FieldAndRobots.SpecialState.ZERO_BATTERY);\n\n if (!Main.isSimpleMode()) {\n PLC_Sender.getInstance().updatePLC_TeamNum(true);\n }\n }",
"private void setTeamInfo_Blue3() {\n blueTeamNumber3.setText(fixNumTeam(blueTeamNumber3.getText(), \"Blue 3\"));\n\n blueTeamNumber3.setBackground(Color.WHITE);\n\n FieldAndRobots.getInstance().setTeamNumber(FieldAndRobots.BLUE, FieldAndRobots.THREE,\n Integer.parseInt(blueTeamNumber3.getText()));\n FieldAndRobots.getInstance().actOnRobot(FieldAndRobots.BLUE,\n FieldAndRobots.THREE, FieldAndRobots.SpecialState.ZERO_BATTERY);\n\n if (!Main.isSimpleMode()) {\n PLC_Sender.getInstance().updatePLC_TeamNum(true);\n }\n }",
"public ColourTest(String name)\n\t{\n\t\tsuper(name);\n\t}",
"@Test\n @Transactional\n public void createTeamWithExistingId() throws Exception {\n int databaseSizeBeforeCreate = teamRepository.findAll().size();\n\n // Create the Team with an existing ID\n team.setId(1L);\n TeamDTO teamDTO = teamMapper.toDto(team);\n\n // An entity with an existing ID cannot be created, so this API call\n // must fail\n restTeamMockMvc\n .perform(post(\"/api/teams\").contentType(TestUtil.APPLICATION_JSON_UTF8)\n .content(TestUtil.convertObjectToJsonBytes(teamDTO)))\n .andExpect(status().isBadRequest());\n\n // Validate the Team in the database\n List<Team> teamList = teamRepository.findAll();\n assertThat(teamList).hasSize(databaseSizeBeforeCreate);\n }",
"public interface CreateTeamPresenter {\n void createTeam(User user, String name, String token);\n}",
"public PlayerFighter create(GamePlayer player);",
"public String createFamily(String name);",
"public Player(String name, String color, int id) {\n\t\tsuper();\n\t\tthis.name = name;\n\t\tthis.color = color;\n\t\tthis.id = id;\n\t}",
"private void createOnePlayer(AdventurerEnum role, int i) {\n\t\tString playerName;\n\t\tplayerName = getPlayerName(i);\n\t\t\n\t\tPlayers.getInstance().addPlayer(playerName, role);\n\t}",
"public Location spawn(teamName team, Match m) {\r\n\t\tif (team == teamName.ALLIES && m.getState().equals(gameState.PREGAME)){\r\n\t\t\treturn alliesSpawn;\r\n\t\t} else if (team == teamName.AXIS && m.getState().equals(gameState.PREGAME)){\r\n\t\t\treturn axisSpawn;\r\n\t\t} else if (team == teamName.SPECTATOR){\r\n\t\t\treturn mainSpawn;\r\n\t\t} else if (team == teamName.ALONE){\r\n\t\t\treturn randomSpawn(m);\r\n\t\t} else {\r\n\t\t\treturn randomSpawn(team, m);\r\n\t\t}\r\n\t}",
"public void addTeamInGridPane(ArrayList<Team> listTeams) {\r\n menuTeams.viewTeams.removeAll();\r\n Font font = new Font(\"Book Antiqua\", 5, 20);\r\n menuTeams.viewTeams.setLayout(new GridLayout(8, 5));\r\n menuTeams.viewTeams.setOpaque(false);\r\n for (int i = 0; i < controller.getTeams().size(); i++) {\r\n JButton button = new JButton(controller.getTeams().get(i).getImageTeam());\r\n button.setText(controller.getTeams().get(i).getName());\r\n button.addActionListener(this);\r\n button.setVisible(true);\r\n button.setFont(font);\r\n button.setBackground(Color.black);\r\n button.setForeground(Color.white);\r\n menuTeams.viewTeams.add(button);\r\n }\r\n }",
"PlayerGroup createPlayerGroup();",
"public static TeamSheet newInstance(String clubname, int crestid) {\n TeamSheet fragment = new TeamSheet();\n Bundle args = new Bundle();\n args.putString(TEAM_NAME_FC,clubname);\n args.putInt(CLUB_CREST_ID,crestid);\n fragment.setArguments(args);\n return fragment;\n }",
"public Player(String name) {\r\n\t\tthis.name=name;\r\n\t\tinitializeGameboard();\r\n\t\tlastRedNumber=2; \r\n\t\tlastYellowNumber=2;\r\n\t\tlastGreenNumber=12;\r\n\t\tlastBlueNumber=12;\r\n\t\tnegativePoints=0;\r\n\t}",
"public Team(String name, int rank, int score) {\n this.name = name;\n this.rank = rank;\n this.score = score;\n }",
"public void createNewGame() {\n\t\tfor(int n = 0; n < 8; n++){\n\t\t\tfor(int j = 0; j < 8; j++){\n\t\t\t\tif ( n % 2 == j % BLACK_PAWN ) {\n\t\t\t\t\tif (n < 3)\n\t\t\t\t\t\tarr[n][j] = RED_PAWN;\n\t\t\t\t\telse if (n > 4)\n\t\t\t\t\t\tarr[n][j] = BLACK_PAWN;\n\t\t\t\t\telse\n\t\t\t\t\t\tarr[n][j] = EMPTY;\n\t\t } \n\t\t\t\telse\n\t\t\t\t\tarr[n][j] = EMPTY;\n\t\t\t}\n\t\t}\n\t}",
"private void testBoardCreation() {\n for (int r = 0; r < Constants.BOARD_GRID_ROWS; r++) {\n for (int c = 0; c < Constants.BOARD_GRID_COLUMNS; c++) {\n Vector2 tokenLocation = this.mBoardLevel.getCenterOfLocation(r, c);\n Image tokenImage = new Image(this.mResources.getToken(PlayerType.RED));\n tokenImage.setPosition(tokenLocation.x, tokenLocation.y);\n this.mStage.addActor(tokenImage);\n }\n }\n }",
"void create(SportActivity activity);",
"public static void saveTeamNames() {\r\n\t\tMain.team1 = Main.teamOne.name;\r\n\t\tMain.team2 = Main.teamTwo.name;\r\n\t}",
"@Override\r\n\tpublic Card createCard(Color color, Value label) {\r\n\t\tCard newCard = new Card(color, label);\r\n\t\treturn newCard;\r\n\t}",
"public static void main(String[] args) {\n Sport Football = new Sport(\"Football\"); //Creating instance of Sport class (Creating football sport)\n Football RM = new Football(\"RealMadrid\"); //Creating instance of Football class (Creating football team)\n Football Monaco = new Football(\"Monaco\");//Creating instance of Football class (Creating football team)\n Football Barca = new Football(\"Barca\");//Creating instance of Football class (Creating football team)\n Football Liverpool = new Football(\"Liverpool\");//Creating instance of Football class (Creating football team)\n\n League<Football> footballLeague = new League<>(\"Football\"); //Creating arraylist with objects from Football class (Creating league)\n footballLeague.addTeamToLeague(RM); //adding team to league\n footballLeague.addTeamToLeague(Monaco);\n footballLeague.addTeamToLeague(Barca);\n footballLeague.addTeamToLeague(Liverpool);\n footballLeague.displayLeague(); //display all teams from football league\n\n System.out.println();\n\n Sport Hockey = new Sport(\"Hockey\"); //The same for hockey\n Hockey CB =new Hockey(\"Chicago Bulls\");\n Hockey CSKA =new Hockey(\"CSKA\");\n Hockey Sparta =new Hockey(\"Sparta\");\n Hockey RB =new Hockey(\"Red Bull\");\n Hockey GK =new Hockey(\"German Knights\");\n League<Hockey> hockeyLeague = new League<>(\"Hockey\");\n hockeyLeague.addTeamToLeague(CB);\n hockeyLeague.addTeamToLeague(CSKA);\n hockeyLeague.addTeamToLeague(Sparta);\n hockeyLeague.addTeamToLeague(RB);\n hockeyLeague.addTeamToLeague(GK);\n hockeyLeague.displayLeague();\n }",
"public static void setBlue() {\r\n playerTeam.setColor(blue);\r\n updateMessage(\"Seu time agora é azul\");\r\n }",
"public ExCubeGameTeamList(List<Player> redPlayers, List<Player> bluePlayers, int roomNumber) {\n\t\t_redPlayers = redPlayers;\n\t\t_bluePlayers = bluePlayers;\n\t\t_roomNumber = roomNumber - 1;\n\t}",
"Team getMyTeam();",
"public Player createPlayer(String name, Player.Token token, int playerNum) {\n switch (token) {\n case MissScarlett:\n return new Player(name, token, Parser.playersStartPositions.get(0), playerNum);\n case ProfessorPlum:\n return new Player(name, token, Parser.playersStartPositions.get(1), playerNum);\n case MrsWhite:\n return new Player(name, token, Parser.playersStartPositions.get(2), playerNum);\n case MrsPeacock:\n return new Player(name, token, Parser.playersStartPositions.get(3), playerNum);\n case MrGreen:\n return new Player(name, token, Parser.playersStartPositions.get(4), playerNum);\n case ColonelMustard:\n return new Player(name, token, Parser.playersStartPositions.get(5), playerNum);\n default:\n throw new IllegalArgumentException(\"Player selection was abnormally exited\");\n }\n }",
"public static Player create(final int classId, final int raceId, final int sex, final String accountName, final String name, final int hairStyle, final int hairColor, final int face) {\n // Create a new L2Player with an account name\n final Player player = new Player(IdFactory.getInstance().getNextId(), accountName);\n\n player.setName(name);\n player.setTitle(\"\");\n player.getAppearanceComponent().setHairStyle(hairStyle);\n player.getAppearanceComponent().setHairColor(hairColor);\n player.getAppearanceComponent().setFace(face);\n player.getPlayerTemplateComponent().setPlayerRace(PlayerRace.values()[raceId]);\n player.getPlayerTemplateComponent().setPlayerSex(PlayerSex.values()[sex]);\n player.setCreateTime(System.currentTimeMillis());\n\n // Add the player in the characters table of the database\n if (!CharacterDAO.getInstance().insert(player))\n return null;\n\n final double hp = PCParameterUtils.getLevelParameter(1, PCParameterUtils.getClassDataInfoFor(classId).getHp());\n final double mp = PCParameterUtils.getLevelParameter(1, PCParameterUtils.getClassDataInfoFor(classId).getMp());\n final double cp = PCParameterUtils.getLevelParameter(1, PCParameterUtils.getClassDataInfoFor(classId).getCp());\n\n if (!CharacterDAO.getInstance().insertSub(player.getObjectId(), classId, hp, mp, cp, hp, mp, cp))\n return null;\n return player;\n }",
"private void setTeamInfo_Red2() {\n redTeamNumber2.setText(fixNumTeam(redTeamNumber2.getText(), \"Red 2\"));\n\n redTeamNumber2.setBackground(Color.WHITE);\n\n FieldAndRobots.getInstance().setTeamNumber(FieldAndRobots.RED, FieldAndRobots.TWO,\n Integer.parseInt(redTeamNumber2.getText()));\n FieldAndRobots.getInstance().actOnRobot(FieldAndRobots.RED,\n FieldAndRobots.TWO, FieldAndRobots.SpecialState.ZERO_BATTERY);\n\n if (!Main.isSimpleMode()) {\n PLC_Sender.getInstance().updatePLC_TeamNum(true);\n }\n }",
"public Player(String name, Position pos, int direction, Color color) {\r\n this.name = name;\r\n this.score = 0;\r\n this.car = new Car(pos, direction, color);\r\n }",
"public User(String username, int colour){\n this.userName = username;\n this.colour = colour;\n }"
] |
[
"0.7591166",
"0.7242474",
"0.69612455",
"0.6785018",
"0.6616401",
"0.6581198",
"0.6478893",
"0.64241004",
"0.64240766",
"0.6407426",
"0.63108456",
"0.6298865",
"0.61317444",
"0.5996048",
"0.59915",
"0.59426117",
"0.5928294",
"0.59228975",
"0.59163004",
"0.5897742",
"0.58839583",
"0.58511883",
"0.57773095",
"0.57374084",
"0.56511736",
"0.56297624",
"0.56277454",
"0.5608947",
"0.56023914",
"0.55838114",
"0.5550042",
"0.5525564",
"0.5523027",
"0.55026543",
"0.5480198",
"0.54796106",
"0.54424435",
"0.5441363",
"0.54032993",
"0.5369083",
"0.53627557",
"0.5350362",
"0.53479666",
"0.53388363",
"0.5335026",
"0.5331771",
"0.5298723",
"0.52812856",
"0.5280343",
"0.5277032",
"0.52742785",
"0.5263235",
"0.52523255",
"0.52417415",
"0.5237603",
"0.52349436",
"0.52115244",
"0.5191683",
"0.51781684",
"0.5172552",
"0.5164121",
"0.5164095",
"0.5152077",
"0.5150896",
"0.5142936",
"0.51396334",
"0.513796",
"0.5133177",
"0.5126419",
"0.51243514",
"0.512218",
"0.5108021",
"0.508772",
"0.5082404",
"0.50776047",
"0.5076041",
"0.5074307",
"0.5070804",
"0.50562394",
"0.50560355",
"0.5041457",
"0.50385314",
"0.5038424",
"0.50341904",
"0.50251573",
"0.5016083",
"0.501247",
"0.50108486",
"0.50067806",
"0.4992262",
"0.49920517",
"0.4987787",
"0.49861968",
"0.49735954",
"0.4961311",
"0.4956816",
"0.4951458",
"0.49386",
"0.4938292",
"0.49366623"
] |
0.7495077
|
1
|
Gets the team's name
|
public String getTeamName() {
return teamName;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public String getName() {\r\n\t\treturn \"[\" + teamNo + \"] \" + name;\r\n\t}",
"public String getTeamName() {\r\n return teamName;\r\n }",
"@Override\n\tpublic String toString() {\n\t\treturn teamName;\n\t}",
"public String getProjectTeamName(){\n return \"The name of the project of this researcher is \"+\n name_of_project_team +\n \"\\n*******\\n\";\n }",
"java.lang.String getGameName();",
"java.lang.String getGameName();",
"public String getName(){\n\t\treturn this.tournamentName;\n\t}",
"public String getAwayName(String team) {\n\n return getGameInfo(team, \"away_team_name\");\n }",
"public String getTeamId() {\r\n\t\treturn teamName;\r\n\t}",
"public String getTeamNameById(int id) {\n\t\tString t = \"\";\n\t\tPreparedStatement statement = null;\n\t\tResultSet rs = null;\n\t\tString teamByIdRecords_sql = \"SELECT name FROM \" + team_table + \" WHERE id='\" + id + \"'\";\n\t\tconnection = connector.getConnection();\n\t\ttry {\n\t\t\tstatement = connection.prepareStatement(teamByIdRecords_sql);\n\t\t\trs = statement.executeQuery();\n\t\t\tif (rs.next()) {\n\t\t\t\tt = rs.getString(1);\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\t\treturn t;\n\t}",
"@Override\r\n\tpublic String getTeam() {\n\t\treturn team;\r\n\t}",
"@Override\n public String getTeam(){\n return this.team;\n }",
"public String getHomeName(String team) {\n\n return getGameInfo(team, \"home_team_name\");\n }",
"public String getTeam() {\n return team;\n }",
"String getName() {\n return getStringStat(playerName);\n }",
"String getPlayerName();",
"String getWonTeam() {\r\n return this.teamName;\r\n }",
"private Team getTeam(String teamName) {\n return scoreboard.getTeam(trimString(teamName));\n }",
"public String getDisplayName ( ) {\n\t\treturn handleOptional ( ).map ( Player :: getDisplayName ).orElse ( name );\n\t}",
"public String[] getTeamNames()\r\n\t{\r\n\t\t\r\n\t\tString[] names = new String[NUM_TEAMS];\r\n\t\t\r\n\t\tfor(int i = 0; i < teams.size(); i++)\r\n\t\t{\r\n\t\t\tnames[i] = teams.get(i).getName();\t\r\n\t\t}\r\n\r\n\t\treturn names;\r\n\t}",
"public String getTeam() {\n\t\treturn team;\n\t}",
"public String getTeam() {\r\n\t\treturn Team;\r\n\t}",
"@Override\r\n\tpublic String toString() {\r\n\t\treturn \"[\" + teamNo + \"] \" + name;\r\n\t}",
"public String getPlayerName() {\n return props.getProperty(\"name\");\n }",
"public String getName()\r\n\t{\r\n\t\treturn this.playerName;\r\n\t}",
"public String getHomeTeam(){\n\t\treturn _homeTeam.getTeamName();\n\t}",
"public String getName(){\n\t\treturn players.get(0).getName();\n\t}",
"public java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"public static String getNameOne() {\n\tString name;\n\tname = playerOneName.getText();\n\treturn name;\n\n }",
"public static String getName()\n {\n read_if_needed_();\n \n return _get_name;\n }",
"public String getName(){\r\n\t\treturn playerName;\r\n\t}",
"public String getPlayerName() {\n\t\tString name = super.getPlayerName();\n\t\treturn name;\n\t}",
"String getName(){\n\t\treturn playerName;\n\t}",
"public String getName(Player p) {\n\t\treturn name;\n\t}",
"public String getTeam(int id){\r\n\t\treturn teamList.get(id);\r\n\t}",
"public String getName() {\n return name.get();\n }",
"public String getHomeTeam();",
"@NonNull\n String getName();",
"public String getName() {\r\n\t\treturn name.get();\r\n\t}",
"public void setTeamName(String name) {\n\t\tteamName = name;\n\t}",
"String getName() ;",
"public static String getName() {\n return name;\n }",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();"
] |
[
"0.84061635",
"0.81925493",
"0.7717628",
"0.763882",
"0.7595244",
"0.7595244",
"0.74175906",
"0.73594075",
"0.73283607",
"0.7296518",
"0.7270186",
"0.72448367",
"0.72308874",
"0.72107154",
"0.72044116",
"0.7160812",
"0.71530926",
"0.71231693",
"0.7089302",
"0.70527935",
"0.70269436",
"0.70149255",
"0.69294906",
"0.69248265",
"0.69246954",
"0.6894066",
"0.68881667",
"0.68677306",
"0.68664414",
"0.68664414",
"0.68664414",
"0.68664414",
"0.68664414",
"0.68664414",
"0.68664414",
"0.68664414",
"0.68664414",
"0.68664414",
"0.68664414",
"0.68664414",
"0.68664414",
"0.68664414",
"0.68664414",
"0.68664414",
"0.68664414",
"0.68664414",
"0.68664414",
"0.68664414",
"0.68664414",
"0.68664414",
"0.68664414",
"0.68664414",
"0.68664414",
"0.68664414",
"0.68664414",
"0.68664414",
"0.68664414",
"0.68664414",
"0.68664414",
"0.68664414",
"0.68664414",
"0.68664414",
"0.68664414",
"0.68664414",
"0.68664414",
"0.68664414",
"0.68664414",
"0.68664414",
"0.68664414",
"0.68664414",
"0.68664414",
"0.68664414",
"0.68664414",
"0.68664414",
"0.68664414",
"0.68664414",
"0.68664414",
"0.68664414",
"0.68664414",
"0.68664414",
"0.68625104",
"0.68466944",
"0.68271786",
"0.6817564",
"0.6815474",
"0.68123263",
"0.6797891",
"0.6783063",
"0.67643017",
"0.6738353",
"0.6717717",
"0.67099243",
"0.67076594",
"0.6704076",
"0.668189",
"0.668189",
"0.668189",
"0.668189",
"0.668189"
] |
0.7935125
|
3
|
Sets the team's name
|
public void setTeamName(String teamName) {
this.teamName = teamName;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public void setTeamName(String name) {\n\t\tteamName = name;\n\t}",
"public void setName(String name){\n\t\tthis.tournamentName = name;\n\t}",
"public void setTeamName(String teamName) {\r\n this.teamName = teamName;\r\n }",
"public void setName(String name)\r\n\t{\r\n\t\tthis.playerName = name;\r\n\t}",
"public Team(String name) {\n this.name = name;\n }",
"private void setName(String nameIn){\r\n\t\tplayerName = nameIn;\r\n\t}",
"public void setName(String name)\n {\n playersName = name;\n }",
"void setName(String name) {\n setStringStat(name, playerName);\n }",
"public void setName(String n) {\r\n name = n;\r\n }",
"public void setName (String n) {\n name = n;\n }",
"public void setName(String newname)\n {\n name = newname;\n \n }",
"public final void setName(String name) {_name = name;}",
"void setName(String name_);",
"public void setName(String name) {\n _name = name;\n }",
"public void setName (String n){\n\t\tname = n;\n\t}",
"public void setName(final String name);",
"public void setName(String name){\r\n gotUserName = true;\r\n this.name = name;\r\n }",
"public void setName(String name){\n \t\tthis.name = name;\n \t}",
"public void setName( final String name )\r\n {\r\n this.name = name;\r\n }",
"public void setName(String name) {\r\n this.name = name;\r\n }",
"public void setName(String name) {\r\n this.name = name;\r\n }",
"public void setName(String name) {\r\n this.name = name;\r\n }",
"public void setName(String name){\r\n\t\tthis.name = name;\r\n\t}",
"public void setName(String name){\r\n\t\tthis.name = name;\r\n\t}",
"public void setName(String name){\r\n\t\tthis.name = name;\r\n\t}",
"public void setName(String name) {\n \tthis.name = name;\n }",
"public void setName(String name) {\n \tthis.name = name;\n }",
"public void setName( String name )\n {\n this.name = name;\n }",
"public void setName( String name )\n {\n this.name = name;\n }",
"public void setName(String name) {\r\n\t\t_name = name;\r\n\t}",
"public void setName(String name)\n \t{\n \t\tthis.name = name;\n \t}",
"public void setName(String newname){\n name = newname; \n }",
"public void setName(String n) {\n this.name = n;\n }",
"public void setName(String name)\r\n {\r\n this.name = name;\r\n }",
"public void setName(String name)\r\n {\r\n this.name = name;\r\n }",
"public void setName(String name)\r\n {\r\n this.name = name;\r\n }",
"public void setName(String name)\r\n {\r\n this.name = name;\r\n }",
"public void setName(final String name) {\n this.name = name;\n }",
"public void setName(final String name) {\n this.name = name;\n }",
"public void setName(String name)\r\n\t{\t\t\r\n\t\tthis.name = name;\r\n\t}",
"public void setName(String name) \n {\n this.name = name;\n }",
"public void setName(String name)\n {\n this.name = name;\n }",
"public void setName(String name)\n {\n this.name = name;\n }",
"public void setName(String name)\n {\n this.name = name;\n }",
"public void setName(String name)\n {\n this.name = name;\n }",
"public void setName(String name)\n {\n this.name = name;\n }",
"public void setName(String name)\n {\n this.name = name;\n }",
"public void setName(String name)\n {\n this.name = name;\n }",
"public void setName(String name)\n {\n this.name = name;\n }",
"public void setName(String name)\n {\n this.name = name;\n }",
"public void setName(String name)\n {\n this.name = name;\n }",
"public static void setName(String n){\n\t\tname = n;\n\t}",
"public void setName(String name){\r\n this.name = name;\r\n }",
"public void setName(String name){\r\n this.name = name;\r\n }",
"public void setName(String name){\r\n this.name = name;\r\n }",
"public void setName(String name) {\n this.name = name;\n }",
"public void setName(String name) {\r\n this.name = name;\r\n }",
"public void setName(String name) {\r\n this.name = name;\r\n }",
"public void setName(String name) {\r\n this.name = name;\r\n }",
"public void setName(String name) {\r\n this.name = name;\r\n }",
"public void setName(String name) {\r\n this.name = name;\r\n }",
"public void setName(String name) {\r\n this.name = name;\r\n }",
"public void setName(String name) {\r\n this.name = name;\r\n }",
"public void setName(String name) {\r\n this.name = name;\r\n }",
"public void setName(String name) {\r\n this.name = name;\r\n }",
"public void setName(String name) {\r\n this.name = name;\r\n }",
"public void setName(String name) {\r\n this.name = name;\r\n }",
"public void setName(String name) {\r\n this.name = name;\r\n }",
"public void setName(String name) {\r\n this.name = name;\r\n }",
"public void setName(String name) {\r\n this.name = name;\r\n }",
"public void setName(String name) {\r\n this.name = name;\r\n }",
"public void setName(String name) {\r\n this.name = name;\r\n }",
"public void setName(String name) {\r\n this.name = name;\r\n }",
"public void setName(String name) {\r\n this.name = name;\r\n }",
"public void setName(String name) {\r\n this.name = name;\r\n }",
"public void setName(String name)\n {\n fName = name;\n }",
"public void setName (String name) {\n this.name = name;\n }",
"public void setName(String val) {\n name = val;\n }",
"public String getTeamName() {\r\n return teamName;\r\n }",
"public void setName( String name ) {\n this.name = name;\n }",
"public void setName (String name) {\n this.name = name;\n }",
"public void setName (String name) {\n this.name = name;\n }",
"public void setName (String name) {\n this.name = name;\n }",
"public void setName(String nameIn) {\n name = nameIn;\n }",
"public void setName(final String name) {\n this.name = name;\n }",
"public void setName(final String name) {\n this.name = name;\n }",
"public void setName(final String name) {\n this.name = name;\n }",
"public void setName(final String name) {\n this.name = name;\n }",
"public void setName(String s) {\n this.name = s;\n }",
"public void setName(String name) {\n \t\tthis.name = name;\n \t}",
"public void setName(String name) {\r\r\n\t\tthis.name = name;\r\r\n\t}",
"public void setName(String name){\n this.name = name;\n }",
"public void setName(String name){\n this.name = name;\n }",
"public void setName(String name){\n this.name = name;\n }",
"public void setName(String name){\n this.name = name;\n }",
"public void setName(String name){\n this.name = name;\n }",
"public void setName(String name){\n this.name = name;\n }",
"public void setName(String name){\n this.name = name;\n }",
"public void setName (String name) {\r\n\t\tthis.name = name;\r\n\t}",
"public void setName(String new_name){\n this.name=new_name;\n }"
] |
[
"0.80779296",
"0.79355365",
"0.78349257",
"0.75922453",
"0.75531214",
"0.75011456",
"0.74731946",
"0.7363628",
"0.7208016",
"0.7189511",
"0.7169494",
"0.71648324",
"0.71079713",
"0.7099635",
"0.7096363",
"0.70870733",
"0.7072908",
"0.7051283",
"0.70421433",
"0.7041438",
"0.7041438",
"0.7041438",
"0.7040871",
"0.7040871",
"0.7040871",
"0.703843",
"0.703843",
"0.70364827",
"0.70364827",
"0.7036278",
"0.7035232",
"0.702676",
"0.70251316",
"0.7023831",
"0.7023831",
"0.7023831",
"0.7023831",
"0.70230925",
"0.70230925",
"0.7020356",
"0.7018749",
"0.7018723",
"0.7018723",
"0.7018723",
"0.7018723",
"0.7018723",
"0.7018723",
"0.7018723",
"0.7018723",
"0.7018723",
"0.7018723",
"0.7018145",
"0.7015254",
"0.7015254",
"0.7015254",
"0.7010309",
"0.700959",
"0.700959",
"0.700959",
"0.700959",
"0.700959",
"0.700959",
"0.700959",
"0.700959",
"0.700959",
"0.700959",
"0.700959",
"0.700959",
"0.700959",
"0.700959",
"0.700959",
"0.700959",
"0.700959",
"0.700959",
"0.700959",
"0.70065373",
"0.6999082",
"0.69968176",
"0.6996411",
"0.69960827",
"0.69955325",
"0.69955325",
"0.69955325",
"0.69946945",
"0.6994142",
"0.6994142",
"0.6994142",
"0.6994142",
"0.6993",
"0.6990922",
"0.6990269",
"0.6988026",
"0.6988026",
"0.6988026",
"0.6988026",
"0.6988026",
"0.6988026",
"0.6988026",
"0.69868094",
"0.6986437"
] |
0.7349116
|
8
|
Gets the team's color
|
public Color getColor() {
return color;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public Color getColor()\n {\n return mTeam.getColor();\n }",
"public GameColor getColor();",
"Color getColor();",
"Color getColor();",
"Color getColor();",
"Color getColor();",
"Color getColor();",
"public static Color getColor() {\n return myColor;\n }",
"public String getColor()\n {\n return this.color;\n }",
"public String getColor()\n {\n return color;\n }",
"public String getColor()\n {\n return color;\n }",
"String getColour();",
"@Override\n\tpublic Color getColor() {\n\t\treturn playerColor;\n\t}",
"public String getColor() {\r\n return color;\r\n }",
"public String getColour(int teamid) {\n\t\tif(colours.containsKey(teamid)) {\n\t\t\treturn colours.get(teamid).toString();\n\t\t} else {\n\t\t\treturn Colours.RED.toString();\n\t\t}\n\t}",
"public Color getColor() {\n \t\treturn color;\n \t}",
"public Color getColor() {\n return color;\r\n }",
"public String getColor() {\n return color;\n }",
"public String getColor() {\n return color;\n }",
"public String getColor() {\n return color;\n }",
"public String getColor() {\n return color;\n }",
"public String getColor() {\n return color;\n }",
"public String getColor() {\n return color;\n }",
"public String getColor() {\n return color;\n }",
"public String getColor() {\n return color;\n }",
"public ColorRoom getColor() {\n return color;\n }",
"public int getColor() {\n return color;\n }",
"public String getColor() {\n return this.color;\n }",
"public String getColor(){\n\t\treturn color;\n\t}",
"public String obtenColor() {\r\n return color;\r\n }",
"public int getColor() {\n \t\treturn color;\n \t}",
"public Color getColor() {\n return color;\n }",
"public Color getColor() \n\t{\n\t\treturn color;\n\t}",
"public int getColor(){\r\n\t\treturn color;\r\n\t}",
"public int getColor(){\n\t\treturn color;\n\t}",
"public int getColor(){\n\t\treturn color;\n\t}",
"public Color getColor() {\r\n return this.BoardColor;\r\n }",
"public Color getColor()\n {\n return color;\n }",
"public Color getColor()\n {\n return color;\n }",
"public Color getColor()\n {\n return color;\n }",
"public Color getColor()\n {\n return color;\n }",
"public String getColor() {\r\n\t\treturn color;\r\n\t}",
"String getColor();",
"public String getColor() { \n return color; \n }",
"public int getColor() {\n return this.color;\n }",
"public String getColor() {\n\t\treturn color;\n\t}",
"public String getColor() {\n\t\treturn color;\n\t}",
"public Color getColor() {\n return this.color;\n }",
"public Color getColor() { return color.get(); }",
"public Color getColor() {\n return this.color;\n }",
"public Color getColor() {\n return this.color;\n }",
"public Color getColor() {\n return this.color;\n }",
"public String getColor(){\r\n return color;\r\n }",
"public Color getColor() {\r\n return this.color;\r\n }",
"public Color getColor() {\n return internalGroup.getColor();\n }",
"public String getColor(){\n return this._color;\n }",
"public Color getColor();",
"public Color getColor();",
"public Color getColor();",
"public Color getColor() {\r\n return color;\r\n }",
"public Color getColor() {\r\n return color;\r\n }",
"public Color getColor() {\r\n return color;\r\n }",
"public Color getColor() {\n return color;\n }",
"public Color getColor() {\n return color;\n }",
"public Color getColor() {\n return color;\n }",
"public Color getColor() {\n return color;\n }",
"public Color getColor() {\n return color;\n }",
"public Color getColor() {\n return color;\n }",
"private Color getPlayerColor(int player){\n\t\tColor pColor;\n\t\tswitch (this.groups[player]){ // adjust color based on what group of balls they're hitting\n\t\t\tcase Ball.TYPE_RED: pColor = new Color(200, 7, 23); break;\n\t\t\tcase Ball.TYPE_BLUE: pColor = new Color(10, 7, 200); break;\n\t\t\tcase 3: pColor = new Color(230, 210, 0); break; // color/type for winner (TODO: enum for player group?)\n\t\t\tdefault: pColor = Color.black; break;\n\t\t}\n\t\t// change color based on if they're allowed to place/hit the ball at the moment\n\t\tpColor = (this.turn==player && !this.table.moving) ? pColor : new Color(pColor.getRed(), pColor.getGreen(), pColor.getBlue(), (int)(0.4*255)); \n\t\treturn pColor;\n\t}",
"public Color getColor()\r\n\t{\r\n\t\treturn _g2.getColor();\r\n\t}",
"@Override\n public String getColor() {\n return this.color.name();\n }",
"java.awt.Color getColor();",
"public final Color getColor() {\n return color;\n }",
"protected final Color getColor() {\n\t\treturn tile.getColor();\n\t}",
"public int getTurnColor() {\n return turnColor;\n }",
"public Color getColor() {\n\t\treturn this.color;\n\t}",
"public Color getColor()\n { \n return color;\n }",
"public Color getColor() {\n\treturn color;\n }",
"public RMColor getColor()\n {\n return getStyle().getColor();\n }",
"public Color getColor() { return color; }",
"public Color getColor() {\r\n\t\treturn color;\r\n\t}",
"public Color getColor() {\r\n\t\treturn color;\r\n\t}",
"public Color getColor() {\n return Color.YELLOW;\n }",
"int getContactColor();",
"public Integer getColor() {\n\t\treturn color;\n\t}",
"public String getColor(){\n return this.color;\n }",
"public RGBColor getColor(){\r\n return this._color;\r\n }",
"public String getColor() {\n return colorID;\n }",
"public IsColor getColor() {\n\t\treturn ColorBuilder.parse(getColorAsString());\n\t}",
"public Color getColor(){\n return color;\n }",
"public final Color getColor() {\r\n return color;\r\n }",
"public PlayerColor playerColor() {\n return color;\n }",
"public int getColor() {\n\t\treturn getMappedColor(color);\n\t}",
"String getColour(int winningNumber);",
"public Color getColor() {\n\t\treturn _color;\n\t}",
"public Color getColor() {\n return this.color;\n }",
"public int getColor();"
] |
[
"0.86473626",
"0.7929981",
"0.7570635",
"0.7570635",
"0.7570635",
"0.7570635",
"0.7570635",
"0.73489624",
"0.7347872",
"0.7346726",
"0.7346726",
"0.7339389",
"0.73253334",
"0.73174196",
"0.73117155",
"0.7304594",
"0.7303564",
"0.7303374",
"0.7303374",
"0.7303374",
"0.7303374",
"0.7303374",
"0.7303374",
"0.7303374",
"0.7303374",
"0.7302248",
"0.7301206",
"0.7300347",
"0.7296326",
"0.7287879",
"0.72760063",
"0.7256981",
"0.7255846",
"0.72527224",
"0.72520137",
"0.72520137",
"0.7247133",
"0.72406286",
"0.7236344",
"0.7236344",
"0.7236344",
"0.7236294",
"0.72340465",
"0.7231219",
"0.72300947",
"0.72261447",
"0.72261447",
"0.72218144",
"0.72203225",
"0.72134465",
"0.72134465",
"0.72134465",
"0.7210486",
"0.7203121",
"0.7201587",
"0.7200915",
"0.7197344",
"0.7197344",
"0.7197344",
"0.719711",
"0.719711",
"0.719711",
"0.7195824",
"0.7195824",
"0.7195824",
"0.7195824",
"0.7195824",
"0.7195824",
"0.7194401",
"0.71927583",
"0.7190662",
"0.7179182",
"0.71650666",
"0.7162098",
"0.71615946",
"0.7160382",
"0.71597886",
"0.71350795",
"0.71257234",
"0.7119077",
"0.7118409",
"0.7118409",
"0.71134746",
"0.7112164",
"0.70935947",
"0.7086787",
"0.70842636",
"0.7083436",
"0.7081186",
"0.7080079",
"0.7078232",
"0.7078048",
"0.70658547",
"0.7060946",
"0.70443994",
"0.70377684",
"0.70356566"
] |
0.7094949
|
87
|
Sets the team's color
|
public void setColor(Color color) {
this.color = color;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public static void setBlue() {\r\n playerTeam.setColor(blue);\r\n updateMessage(\"Seu time agora é azul\");\r\n }",
"void setColor(){\n this.objectColour = new Color(rValue,gValue,bValue,timeToLive).brighter();\n }",
"public void setColor(Color color);",
"public Color getColor()\n {\n return mTeam.getColor();\n }",
"public void setColor()\n {\n if(eyeL != null) // only if it's painted already...\n {\n eyeL.changeColor(\"yellow\");\n eyeR.changeColor(\"yellow\");\n nose.changeColor(\"green\");\n mouthM.changeColor(\"red\");\n mouthL.changeColor(\"red\");\n mouthR.changeColor(\"red\");\n }\n }",
"public void setColour(int teamid) {\n\t\tColours teamcolour = colour.get(index);\n\t\tindex++;\n\t\tindex %= 5;\n\t\tcolours.put(teamid, teamcolour);\n\t}",
"public void setColor(int color);",
"public void setColor(int color);",
"public void setColor(Color newColor) ;",
"public void setColor(Color c);",
"public void setColor(Color clr){\n color = clr;\n }",
"public void setColor(Color c) { color.set(c); }",
"public void setColor(Color color) {\n this.color = color;\n }",
"public void setColor(int r, int g, int b);",
"void setColor(int r, int g, int b);",
"private void setTeamInfo_Red1() {\n redTeamNumber1.setText(fixNumTeam(redTeamNumber1.getText(), \"Red 1\"));\n\n redTeamNumber1.setBackground(Color.WHITE);\n\n FieldAndRobots.getInstance().setTeamNumber(FieldAndRobots.RED,\n FieldAndRobots.ONE, Integer.parseInt(redTeamNumber1.getText()));\n FieldAndRobots.getInstance().actOnRobot(FieldAndRobots.RED,\n FieldAndRobots.ONE, FieldAndRobots.SpecialState.ZERO_BATTERY);\n\n if (!Main.isSimpleMode()) {\n PLC_Sender.getInstance().updatePLC_TeamNum(true);\n }\n }",
"public void setColor()\n {\n if(wall != null) // only if it's painted already...\n {\n wall.changeColor(\"yellow\");\n window.changeColor(\"black\");\n roof.changeColor(\"red\");\n sun.changeColor(\"yellow\");\n }\n }",
"public void setColor(int value);",
"private void setTeamInfo_Red3() {\n redTeamNumber3.setText(fixNumTeam(redTeamNumber3.getText(), \"Red 3\"));\n\n redTeamNumber3.setBackground(Color.WHITE);\n\n FieldAndRobots.getInstance().setTeamNumber(FieldAndRobots.RED, FieldAndRobots.THREE,\n Integer.parseInt(redTeamNumber3.getText()));\n FieldAndRobots.getInstance().actOnRobot(FieldAndRobots.RED,\n FieldAndRobots.THREE, FieldAndRobots.SpecialState.ZERO_BATTERY);\n\n if (!Main.isSimpleMode()) {\n PLC_Sender.getInstance().updatePLC_TeamNum(true);\n }\n }",
"public void setColor()\n {\n if (wall != null) // only if it's painted already...\n {\n wall.changeColor(\"red\");\n window.changeColor(\"black\");\n roof.changeColor(\"green\");\n sun.changeColor(\"yellow\");\n }\n }",
"public void setColor(Color color) {\n this.color = color;\r\n }",
"public Team(String name, Color color) {\n\t\tthis.teamName = name;\n\t\tthis.color = color;\n\t}",
"public void setColor()\n {\n if(wall != null) // only if it's painted already...\n {\n wall.changeColor(\"red\");\n window.changeColor(\"black\");\n roof.changeColor(\"green\");\n sun.changeColor(\"yellow\");\n }\n }",
"public void setColor(float r, float g, float b, float a);",
"public void setColor(int gnum, Color col);",
"private void setColor() {\n cell.setStroke(Color.GRAY);\n\n if (alive) {\n cell.setFill(aliveColor);\n } else {\n cell.setFill(deadColor);\n }\n }",
"@Override\n public void setCommunityColor(String strCommunity, String strColor, TimeFrame tf){\n icommunityColors.setCommunityColor(strCommunity, strColor, tf);\n }",
"public void setColor(int red, int green, int blue){\r\n this.red = red;\r\n this.green = green;\r\n this.blue = blue;\r\n }",
"public void setColor(int color){\n this.color = color;\n }",
"public void setColour(Colour colour);",
"private void setTeamInfo_Red2() {\n redTeamNumber2.setText(fixNumTeam(redTeamNumber2.getText(), \"Red 2\"));\n\n redTeamNumber2.setBackground(Color.WHITE);\n\n FieldAndRobots.getInstance().setTeamNumber(FieldAndRobots.RED, FieldAndRobots.TWO,\n Integer.parseInt(redTeamNumber2.getText()));\n FieldAndRobots.getInstance().actOnRobot(FieldAndRobots.RED,\n FieldAndRobots.TWO, FieldAndRobots.SpecialState.ZERO_BATTERY);\n\n if (!Main.isSimpleMode()) {\n PLC_Sender.getInstance().updatePLC_TeamNum(true);\n }\n }",
"public void setColor(String c);",
"public void setColor(Color c) {\n color = c;\n }",
"public void setColor(Color choice) {\n circleColor = choice;\n\n }",
"public void setColor(Color color) {\n this.color = color;\n }",
"void setColor(Vector color);",
"public void setColor(Color that){\r\n \t//set this to that\r\n this.theColor = that;\r\n if(this.theColor.getRed() == 255 && this.theColor.getGreen() == 0 && this.theColor.getBlue() == 0){\r\n this.theColor = Color.red;\r\n }\r\n if(this.theColor.getRed() == 0 && this.theColor.getGreen() == 0 && this.theColor.getBlue() == 255){\r\n this.theColor = Color.black;\r\n }\r\n if(this.theColor.getRed() == 0 && this.theColor.getGreen() == 255 && this.theColor.getBlue() == 0){\r\n this.theColor = Color.green;\r\n }\r\n }",
"public void setColor(final Color theColor) {\n myColor = theColor;\n }",
"public void setTurn(String color){\n this.colorsTurn = color;\n }",
"private void setTeamInfo_Blue1() {\n blueTeamNumber1.setText(fixNumTeam(blueTeamNumber1.getText(), \"Blue 1\"));\n\n blueTeamNumber1.setBackground(Color.WHITE);\n\n FieldAndRobots.getInstance().setTeamNumber(FieldAndRobots.BLUE, FieldAndRobots.ONE,\n Integer.parseInt(blueTeamNumber1.getText()));\n FieldAndRobots.getInstance().actOnRobot(FieldAndRobots.BLUE,\n FieldAndRobots.ONE, FieldAndRobots.SpecialState.ZERO_BATTERY);\n\n if (!Main.isSimpleMode()) {\n PLC_Sender.getInstance().updatePLC_TeamNum(true);\n }\n }",
"void setTileColor(int a_player)\n {\n if (a_player == 0)\n {\n this.tileColor = \"BLACK\";\n }\n else if (a_player == 1)\n {\n this.tileColor = \"RED\";\n }\n else\n {\n this.tileColor = null;\n }\n }",
"public void setColor(Color color) {\r\n changeColor(color);\r\n oldSwatch.setForeground(currentColor);\r\n newSwatch.setForeground(currentColor);\r\n colorCanvas.setColor(currentColor);\r\n repaint();\r\n }",
"public void setColor(int color) {\n this.color = color;\n }",
"public void setColor( GraphColor newVal ) {\n color = newVal;\n }",
"public void setColor(String color){\n this.color = color;\n }",
"@Override\n public void setColor(Color color) {\n this.color = color;\n }",
"public void setColor(int color){\r\n\t\tthis.color=color;\r\n\t}",
"void setColor(ChatColor color);",
"public void setFillColor(Color color);",
"public void setColor(Color c) {\n this.color = c;\n }",
"public abstract void setColor(Color color);",
"public abstract void setColor(Color color);",
"public void setRrColor(Color value) {\n rrColor = value;\n }",
"private void setTeamInfo_Blue3() {\n blueTeamNumber3.setText(fixNumTeam(blueTeamNumber3.getText(), \"Blue 3\"));\n\n blueTeamNumber3.setBackground(Color.WHITE);\n\n FieldAndRobots.getInstance().setTeamNumber(FieldAndRobots.BLUE, FieldAndRobots.THREE,\n Integer.parseInt(blueTeamNumber3.getText()));\n FieldAndRobots.getInstance().actOnRobot(FieldAndRobots.BLUE,\n FieldAndRobots.THREE, FieldAndRobots.SpecialState.ZERO_BATTERY);\n\n if (!Main.isSimpleMode()) {\n PLC_Sender.getInstance().updatePLC_TeamNum(true);\n }\n }",
"public void setColor(int color) {\n/* 77 */ this.color = color;\n/* 78 */ this.paint.setColor(this.color);\n/* */ }",
"public void setColor(String c)\n { \n color = c;\n draw();\n }",
"public void setColor(Color newColor) {\n\tcolor = newColor;\n }",
"public void setColor(Color another)\r\n {\r\n currentColor = another;\r\n }",
"void setColor(final java.awt.Color color);",
"@Override\r\n public void setColor(Llama.Color color) {\r\n this.color = color;\r\n }",
"public void setColor(Color color) \n\t{\n\t\tthis.color = color;\n\t}",
"public void setColor(String color) {\r\n this.color = color;\r\n }",
"public void setColor(int color){\n\t\tthis.color = color;\n\t}",
"void setRed(int red){\n \n this.red = red;\n }",
"public void setColor(Color color_) {\r\n\t\tcolor = color_;\r\n\t}",
"public void setColor(Color boardColor) {\r\n this.BoardColor = boardColor;\r\n }",
"protected void setColor(Color color) {\r\n\t\tthis.color = color;\r\n\t}",
"public void applyColor() {\n\t\tSystem.out.println(\"Yellow\");\n\n\t}",
"public void setColor(int color) {\r\n\t\tthis.color = color;\r\n\t}",
"public void setBlueRedNumbers(String[][] teams) {\n blueTeamNumber1.setText(teams[0][0]);\n blueTeamNumber2.setText(teams[0][1]);\n blueTeamNumber3.setText(teams[0][2]);\n\n redTeamNumber1.setText(teams[1][0]);\n redTeamNumber2.setText(teams[1][1]);\n redTeamNumber3.setText(teams[1][2]);\n\n setTeamInfo_Red1();\n setTeamInfo_Red2();\n setTeamInfo_Red3();\n\n setTeamInfo_Blue1();\n setTeamInfo_Blue2();\n setTeamInfo_Blue3();\n }",
"public void setTurnColor(int turnColor) {\n this.turnColor = turnColor;\n }",
"public void setCarColor(){\n\t\tthis.carColor = \"white\";\n\t}",
"public void changeColor(){\r\n if(color == 1)\r\n color = 2;\r\n else\r\n color = 1;\r\n }",
"public void setColor(RGBColor color){\r\n this._color = new RGBColor(color);\r\n }",
"@Override\n\tpublic void setColour(float r, float g, float b) {\n\n\t}",
"public void setColor(String color) {\n if (color.equals(\"blanc\") ||\r\n color.equals(\"blue\")) {\r\n this.color = color;\r\n } else {\r\n System.err.println(\"bad color\");\r\n }\r\n }",
"void setStatusColour(Color colour);",
"@NoProxy\n @NoWrap\n public void setColor(final String val) {\n color = val;\n }",
"@Override\n\tpublic Color getColor() {\n\t\treturn playerColor;\n\t}",
"void setCor(Color cor);",
"public void setDataColor(Color c)\r\n/* 48: */ {\r\n/* 49: 36 */ this.ballColor = c;repaint();\r\n/* 50: */ }",
"public void setColor(String color) {\r\n this.color = color;\r\n }",
"public void setColor(Color c)\n\t{\n\t\tthis.color = c;\n\t}",
"public void setColor(Graphics2D g){\r\n if(color.equals(\"yellow\") || color.equals(\"Yellow\"))\r\n g.setColor(Color.yellow);\r\n if(color.equals(\"red\") || color.equals(\"Red\"))\r\n g.setColor(Color.red);\r\n if(color.equals(\"blue\") || color.equals(\"Blue\"))\r\n g.setColor(Color.blue);\r\n \r\n }",
"void setColor(@ColorInt int color);",
"public void setColor(String color) {\n this.color=color; //el this se coloca a la propiedad de la clase \n // para diferenciarla del parametro\n }",
"public void setColor(String color) {\n this.color = color;\n }",
"public void setColor(String color) {\n this.color = color;\n }",
"public void setColor(String color) {\n this.color = color;\n }",
"public void setColor(String color) {\n this.color = color;\n }",
"public void setColor(String color) {\n this.color = color;\n }",
"public void setColor(String color) {\n this.color = color;\n }",
"public void toggle() {\n if (currentPlayer.equals(\"red\")) {\n currentColor = BLUE_COLOUR;\n currentPlayer = \"blue\";\n } else {\n currentColor = RED_COLOUR;\n currentPlayer = \"red\";\n }\n //change color of grid\n changeColor();\n }",
"public void chooseColor() {\r\n\t\t// TODO Auto-generated method stub\r\n\t\t\r\n\t}",
"@Override // Override GameObject setColor\n @Deprecated // Deprecated so developer does not accidentally use\n public void setColor(int color) {\n }",
"public void setColor(Color newColor)\n {\n this.color = newColor;\n conditionallyRepaint();\n }",
"private void setTeamInfo_Blue2() {\n blueTeamNumber2.setText(fixNumTeam(blueTeamNumber2.getText(), \"Blue 2\"));\n\n blueTeamNumber2.setBackground(Color.WHITE);\n\n FieldAndRobots.getInstance().setTeamNumber(FieldAndRobots.BLUE, FieldAndRobots.TWO,\n Integer.parseInt(blueTeamNumber2.getText()));\n FieldAndRobots.getInstance().actOnRobot(FieldAndRobots.BLUE,\n FieldAndRobots.TWO, FieldAndRobots.SpecialState.ZERO_BATTERY);\n\n if (!Main.isSimpleMode()) {\n PLC_Sender.getInstance().updatePLC_TeamNum(true);\n }\n }",
"public void setTurn(PieceColor color) {\n \tturn = color;\n }",
"public void setColor(Color color) {\n\t\t_color = color;\n\t\tnotifyObs(this);\n\t}"
] |
[
"0.765805",
"0.7237587",
"0.71818566",
"0.7135025",
"0.7132911",
"0.71324325",
"0.7056756",
"0.7056756",
"0.7028583",
"0.7000041",
"0.69747406",
"0.6968311",
"0.6935176",
"0.69312215",
"0.68851405",
"0.6825809",
"0.6800597",
"0.6794039",
"0.6793964",
"0.6767296",
"0.6759309",
"0.6758403",
"0.6735011",
"0.67342865",
"0.6729418",
"0.67208904",
"0.6715315",
"0.6680984",
"0.6679465",
"0.66270596",
"0.66131604",
"0.6598738",
"0.6584148",
"0.6576961",
"0.65761536",
"0.6569301",
"0.65464133",
"0.65398127",
"0.6520247",
"0.6516972",
"0.6515273",
"0.649044",
"0.6482749",
"0.6468442",
"0.64593023",
"0.64464426",
"0.64410084",
"0.64367145",
"0.64355135",
"0.64270276",
"0.64148545",
"0.64148545",
"0.6408052",
"0.6391241",
"0.6387086",
"0.6386452",
"0.6384024",
"0.63814986",
"0.6379793",
"0.6376737",
"0.6372859",
"0.63499594",
"0.6347276",
"0.6336025",
"0.63292783",
"0.63266945",
"0.6307739",
"0.63070214",
"0.629573",
"0.6291695",
"0.6291397",
"0.62913686",
"0.6284777",
"0.6280259",
"0.62766814",
"0.62747073",
"0.6270226",
"0.62668616",
"0.6249383",
"0.62362176",
"0.6232759",
"0.62326914",
"0.6219494",
"0.6207989",
"0.6197355",
"0.6185958",
"0.61840266",
"0.61840266",
"0.61840266",
"0.61840266",
"0.61840266",
"0.61840266",
"0.61716104",
"0.61640424",
"0.6163354",
"0.6160432",
"0.6153713",
"0.6148824",
"0.6141535"
] |
0.6267019
|
78
|
Overrides the Object toString method. This is primarily used for the JComboBox
|
@Override
public String toString() {
return teamName;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"@Override String toString();",
"@Override\r\n String toString();",
"@Override public String toString();",
"@Override\r\n\t\tpublic String toString() {\n\t\t\treturn super.toString();\r\n\t\t}",
"@Override\r\n public String toString() {\r\n return super.toString();\r\n }",
"@Override\r\n public String toString() {\r\n return super.toString();\r\n }",
"@Override\r\n public String toString() {\n return super.toString();\r\n }",
"@Override\r\n public String toString() {\n return super.toString();\r\n }",
"@Override\n\t\tpublic String toString() {\n\t\t\treturn super.toString();\n\t\t}",
"@Override\r\n\tpublic String toString() {\n\t\treturn super.toString();\r\n\t}",
"@Override\r\n\tpublic String toString() {\n\t\treturn super.toString();\r\n\t}",
"@Override\r\n\tpublic String toString() {\n\t\treturn super.toString();\r\n\t}",
"@Override\r\n\tpublic String toString() {\n\t\treturn super.toString();\r\n\t}",
"@Override\r\n\tpublic String toString() {\n\t\treturn super.toString();\r\n\t}",
"@Override\r\n\tpublic String toString() {\n\t\treturn super.toString();\r\n\t}",
"@Override\r\n public String toString();",
"@Override\n String toString();",
"@Override\n String toString();",
"@Override\r\n\tpublic String toString();",
"@Override\n\tpublic String toString() {\n\t\treturn super.toString();\n\t}",
"@Override\n\tpublic String toString() {\n\t\treturn super.toString();\n\t}",
"@Override\n\tpublic String toString() {\n\t\treturn super.toString();\n\t}",
"@Override\n\tpublic String toString() {\n\t\treturn super.toString();\n\t}",
"@Override\n\tpublic String toString() {\n\t\treturn super.toString();\n\t}",
"@Override\n\tpublic String toString() {\n\t\treturn super.toString();\n\t}",
"@Override\n\tpublic String toString() {\n\t\treturn super.toString();\n\t}",
"@Override\n\tpublic String toString() {\n\t\treturn super.toString();\n\t}",
"@Override\n\tpublic String toString() {\n\t\treturn super.toString();\n\t}",
"@Override\n\tpublic String toString() {\n\t\treturn super.toString();\n\t}",
"@Override\n\tpublic String toString() {\n\t\treturn super.toString();\n\t}",
"@Override\n\tpublic String toString() {\n\t\treturn super.toString();\n\t}",
"@Override\n\tpublic String toString() {\n\t\treturn super.toString();\n\t}",
"@Override\n\tpublic String toString() {\n\t\treturn super.toString();\n\t}",
"@Override\n\tpublic String toString() {\n\t\treturn super.toString();\n\t}",
"@Override\n\tpublic String toString() {\n\t\treturn super.toString();\n\t}",
"@Override\n\tpublic String toString() {\n\t\treturn super.toString();\n\t}",
"@Override\n\tpublic String toString() {\n\t\treturn super.toString();\n\t}",
"@Override\n\tpublic String toString() {\n\t\treturn super.toString();\n\t}",
"@Override\n public synchronized String toString() {\n return super.toString();\n }",
"@Override\n public String toString() {\n return super.toString();\n }",
"@Override\n public String toString() {\n return super.toString();\n }",
"@Override\n public String toString() {\n return super.toString();\n }",
"@Override\n public String toString() {\n return super.toString();\n }",
"public String toString() {\n \t\treturn super.toString();\n \t}",
"@Override\n public String toString () {\n return super.toString();\n }",
"public String toString() {\t\t\t\t\t\r\n\t\treturn super.toString();\r\n\t}",
"public String toString() {\r\n\t\t\r\n\t\treturn super.toString();\r\n\t\t\r\n\t}",
"@Override\n\tString toString();",
"@Override\n public String toString();",
"@Override\n public String toString();",
"@Override\n\tpublic String toString();",
"@Override\n public String toString() {\n return new Gson().toJson(this);\n }",
"public String toString() {\n return super.toString();\n }",
"public String toString() {\n\t\treturn super.toString();\n\t}",
"public String toString() {\n\t\treturn super.toString();\n\t}",
"@Override\r\n public String toString() {\r\n return JsonSerializer.SerializeObject(this);\r\n }",
"@Override\n\tpublic abstract String toString();",
"@Override\n public abstract String toString();",
"@Override\n public abstract String toString();",
"@Override\n public abstract String toString();",
"@Override\n public abstract String toString();",
"@Override\n public abstract String toString();",
"@Override\n public abstract String toString();",
"@Override\n public abstract String toString();",
"@Override\npublic String toString() {\n\treturn super.toString();\n}",
"@Override\n\tpublic abstract String toString ();",
"@Override\n public String toString() {\n return new JSONSerializer().serialize(this);\n }",
"public String toString()\n {\n return super.toString();\n }",
"public String toString()\n {\n return super.toString();\n }",
"@Override\n public String toString() {\n return JsonSerializer.SerializeObject(this);\n }",
"@Override\n public String toString() {\n return JsonSerializer.SerializeObject(this);\n }",
"@Override\n public String toString() {\n return JsonSerializer.SerializeObject(this);\n }",
"@Override\n String toString();",
"@Override\n public String toString() {\n return toString(false, true, true, null);\n }",
"@Override\n public String toString() {\n return (super.toString());\n\n }",
"@Override\n public String toString(){\n return toString(false);\n }",
"@Override\n\tpublic String toString(){\n\n\t}",
"@Override\n public String toString()\n {\n return Arrays.toString(this.toArray());\n }",
"@Override\n\tpublic String toString() {\n\t\treturn toText();\n\t}",
"@Override\r\npublic String toString() {\n\treturn super.toString();\r\n}",
"@Override\r\n\tpublic String toString() {\n\t\treturn \"\";\r\n\t}",
"@Override\n public String toString() {\n return value();\n }",
"public String toString() ;",
"@Override\n public String toString(){\n return this.getValue();\n }",
"@Override\n public String toString() {\n // TODO: Using Serializer\n return Serializer.toByteArray(this).toString();\n }",
"@Override\n public String toString() {\n return super.toString(); //To change body of generated methods, choose Tools | Templates.\n }",
"@Override\r\n public String toString() {\r\n return com.butterfill.opb.util.OpbToStringHelper.toString(this);\r\n }",
"@Override\n public String toString() {\n return gson.toJson(this);\n }",
"@Override\r\n\tpublic String toString() {\r\n\t\treturn name + \": \" + super.toString();\r\n\t}",
"@Override\n\tpublic String toString() {\n\t\treturn \"\";\n\t}",
"public String superToString() {\n\t\treturn super.toString();\n\t}",
"@Override\n public String toString() {\n return string;\n }",
"@Override\n public String toString() {\n return (this.str);\n }",
"@Override\n public abstract String toString();",
"@Override\n\tpublic String toString() {\n\t\treturn toStringBuilder(new StringBuilder()).toString();\n\t}",
"public String toString() {\n\t\treturn super.toString();\n\t\t// This gives stack overflows:\n\t\t// return ToStringBuilder.reflectionToString(this);\n\t}",
"@Override\n public String toString() {\n return this.name();\n }",
"@Override\n public String toString()\n {\n return this.toLsString();\n }",
"@Override\n public final String toString() {\n return asString(0, 4);\n }",
"@Override\n public String toString() {\n return \"[\" + this.name + \"]\";\n }",
"@Override\r\n\tpublic String toString() {\n\t\treturn JSONObject.toJSONString(this);\r\n\t}"
] |
[
"0.77866435",
"0.76728666",
"0.7672776",
"0.7617908",
"0.76068556",
"0.76068556",
"0.75958216",
"0.755719",
"0.7555202",
"0.75482666",
"0.75482666",
"0.75482666",
"0.75482666",
"0.75482666",
"0.75482666",
"0.75424814",
"0.7515147",
"0.7515147",
"0.7498968",
"0.74916035",
"0.74916035",
"0.74916035",
"0.74916035",
"0.74916035",
"0.74916035",
"0.74916035",
"0.74916035",
"0.74916035",
"0.74916035",
"0.74916035",
"0.74916035",
"0.74916035",
"0.74916035",
"0.74916035",
"0.74916035",
"0.74916035",
"0.74916035",
"0.74916035",
"0.7484494",
"0.7477977",
"0.7477977",
"0.7477977",
"0.7477977",
"0.7443007",
"0.7437243",
"0.7429271",
"0.7428266",
"0.74067235",
"0.73482907",
"0.73482907",
"0.73472023",
"0.73077065",
"0.7291361",
"0.7287493",
"0.7287493",
"0.7244942",
"0.72251225",
"0.720878",
"0.720878",
"0.720878",
"0.720878",
"0.720878",
"0.720878",
"0.720878",
"0.7205468",
"0.7194981",
"0.71855074",
"0.71769065",
"0.71769065",
"0.7155765",
"0.7155765",
"0.7155765",
"0.71488506",
"0.7136501",
"0.7127554",
"0.7122404",
"0.7108007",
"0.7103107",
"0.7096387",
"0.7076465",
"0.70562476",
"0.7038991",
"0.70194304",
"0.7009551",
"0.70084816",
"0.70046866",
"0.6993764",
"0.6993269",
"0.6961152",
"0.6952449",
"0.6950709",
"0.6950274",
"0.69465935",
"0.69463784",
"0.6926213",
"0.6913479",
"0.6895588",
"0.6882437",
"0.68778884",
"0.6870042",
"0.686406"
] |
0.0
|
-1
|
Calls the Object class's toString() method
|
public String superToString() {
return super.toString();
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public String toString() ;",
"public String toString();",
"public String toString();",
"public String toString();",
"public String toString();",
"public String toString();",
"public String toString();",
"public String toString();",
"public String toString();",
"public String toString();",
"public String toString();",
"public String toString();",
"public String toString();",
"public String toString();",
"public String toString();",
"public String toString();",
"public String toString();",
"public String toString();",
"public String toString();",
"public String toString();",
"public String toString();",
"public String toString();",
"public String toString();",
"@Override\r\n String toString();",
"@Override\r\n\tpublic String toString();",
"public String toString() {\n\t}",
"public String toString();",
"@Override\r\n public String toString();",
"public String toString(Object o) { return Objects.toString(o,null); }",
"@Override public String toString();",
"@Override\n String toString();",
"@Override\n String toString();",
"@Override\n\tString toString();",
"@Override\n\tpublic String toString();",
"@Override\n public String toString();",
"@Override\n public String toString();",
"@Override\n\tpublic abstract String toString();",
"public abstract String toString();",
"public abstract String toString();",
"public abstract String toString();",
"public abstract String toString();",
"public abstract String toString();",
"public abstract String toString();",
"public abstract String toString();",
"public abstract String toString();",
"public abstract String toString();",
"public abstract String toString();",
"public abstract String toString();",
"public abstract String toString();",
"public abstract String toString();",
"public abstract String toString();",
"public abstract String toString();",
"public abstract String toString();",
"public String toString() {\n\t\treturn super.toString();\n\t\t// This gives stack overflows:\n\t\t// return ToStringBuilder.reflectionToString(this);\n\t}",
"@Override\n public abstract String toString();",
"@Override\n public abstract String toString();",
"@Override\n public abstract String toString();",
"@Override\n public abstract String toString();",
"@Override\n public abstract String toString();",
"@Override\n public abstract String toString();",
"@Override\n public abstract String toString();",
"@Override\n\tpublic abstract String toString ();",
"public String toString() {\n return ToStringBuilder.reflectionToString(this);\n }",
"public String toString(){\r\n\t\tString superString = super.toString();\r\n\t\tStringBuilder builder = new StringBuilder();\r\n\t\t//Add the object to the string\r\n\t\tbuilder.append(\". \");\r\n\t\tif (this.error != null) {\r\n\t\t\tbuilder.append(error.toString());\r\n\t\t\tbuilder.append(\". \");\r\n\t\t}\r\n\t\tbuilder.append(\"Object: \");\r\n\t\tbuilder.append(object.toString());\r\n\t\tif (this.recordRoute)\r\n\t\t\tbuilder.append(\", [RECORD_ROUTE]\");\r\n\t\tif (this.reRouting) \r\n\t\t\tbuilder.append(\", [RE-ROUTING]\");\r\n\t\t//Add the masks to the string\r\n\t\tif (this.mask != null) {\r\n\t\t\tbuilder.append(\", label set: \");\r\n\t\t\tbuilder.append(mask.toString());\r\n\t\t}\r\n\t\treturn superString.concat(builder.toString());\r\n\t}",
"@Override\n String toString();",
"@Override String toString();",
"abstract public String toString();",
"public String toString() { return stringify(this, true); }",
"@Override\n\tpublic String toString() {\n\t\treturn \"Object [name = \" + name.get() + \", typ = \" + typ.get() + \"]\";\n\t}",
"@Override\n public String toString() {\n return stringBuilder.toString() + OBJECT_SUFFIX;\n }",
"@Override\n public abstract String toString();",
"@Override()\n public String toString()\n {\n final StringBuilder buffer = new StringBuilder();\n toString(buffer);\n return buffer.toString();\n }",
"public String toString() {\r\n\t\t\r\n\t\treturn super.toString();\r\n\t\t\r\n\t}",
"@Override\n public String toString(){\n return toString(false);\n }",
"String toString();",
"String toString();",
"String toString();",
"String toString();",
"String toString();",
"String toString();",
"String toString();",
"String toString();",
"String toString();",
"String toString();",
"String toString();",
"String toString();",
"String toString();",
"String toString();",
"String toString();",
"String toString();",
"String toString();",
"String toString();",
"String toString();",
"String toString();",
"String toString();",
"String toString();",
"String toString();",
"String toString();",
"String toString();",
"String toString();",
"String toString();"
] |
[
"0.7998202",
"0.7823721",
"0.7823721",
"0.7823721",
"0.7823721",
"0.7823721",
"0.7823721",
"0.7823721",
"0.7823721",
"0.7823721",
"0.7823721",
"0.7823721",
"0.7823721",
"0.7823721",
"0.7823721",
"0.7823721",
"0.7823721",
"0.7823721",
"0.7823721",
"0.7823721",
"0.7823721",
"0.7823721",
"0.7823721",
"0.78015524",
"0.7796384",
"0.77848536",
"0.77836716",
"0.77727056",
"0.77695847",
"0.7768968",
"0.775385",
"0.775385",
"0.77479374",
"0.7727663",
"0.76903677",
"0.76903677",
"0.7673737",
"0.76691157",
"0.76691157",
"0.76691157",
"0.76691157",
"0.76691157",
"0.76691157",
"0.76691157",
"0.76691157",
"0.76691157",
"0.76691157",
"0.76691157",
"0.76691157",
"0.76691157",
"0.76691157",
"0.76691157",
"0.76691157",
"0.7657403",
"0.76350975",
"0.76350975",
"0.76350975",
"0.76350975",
"0.76350975",
"0.76350975",
"0.76350975",
"0.7632591",
"0.7585021",
"0.756647",
"0.75619376",
"0.75449175",
"0.7515806",
"0.7513212",
"0.75027585",
"0.74976546",
"0.7455407",
"0.7395581",
"0.7373507",
"0.7371337",
"0.737013",
"0.737013",
"0.737013",
"0.737013",
"0.737013",
"0.737013",
"0.737013",
"0.737013",
"0.737013",
"0.737013",
"0.737013",
"0.737013",
"0.737013",
"0.737013",
"0.737013",
"0.737013",
"0.737013",
"0.737013",
"0.737013",
"0.737013",
"0.737013",
"0.737013",
"0.737013",
"0.737013",
"0.737013",
"0.737013",
"0.737013"
] |
0.0
|
-1
|
TODO Autogenerated method stub
|
@Override
public void run(ImageProcessor ip) {
}
|
{
"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
|
private final Logger logger = Logger.getLogger(this.getClass());
|
@Test
public void run() throws InterruptedException {
/* Player player = new Player(3);
player.start();
logger.debug("Called player.start");
Thread.sleep(2000);
player.skip();
logger.debug("Called player.skip");
Thread.sleep(2000);
player.skip();
logger.debug("Called player.skip");
Thread.sleep(2000);
player.previous();
logger.debug("Called player.previous");
Thread.sleep(2000);
player.stop();
logger.debug("Called player.stop"); */
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"@Override\n protected Logger getLogger() {\n return LOGGER;\n }",
"public Logger getLogger() {\n\treturn _logger;\n }",
"private Logger getLogger() {\n return LoggingUtils.getLogger();\n }",
"public Logger getLogger()\n/* */ {\n/* 77 */ if (this.logger == null) {\n/* 78 */ this.logger = Hierarchy.getDefaultHierarchy().getLoggerFor(this.name);\n/* */ }\n/* 80 */ return this.logger;\n/* */ }",
"@Override\n public MagicLogger getLogger() {\n return logger;\n }",
"protected Logger getLogger() {\n return LoggerFactory.getLogger(getClass());\n }",
"public Logger getLogger() {\n return logger;\n }",
"public Logger getLogger(){\n\t\treturn logger;\n\t}",
"public Logger getLogger()\n {\n return this.logger;\n }",
"@Override\n\tprotected Logger getLogger() {\n\t\treturn HMetis.logger;\n\t}",
"public static Logger logger() {\n return logger;\n }",
"protected static Logger log() {\n return LogSingleton.INSTANCE.value;\n }",
"public Logger getLogger() {\n return logger;\n }",
"public Logger getLogger() {\t\t\n\t\treturn logger = LoggerFactory.getLogger(getClazz());\n\t}",
"public Logger (){}",
"private Logger() {\n\n }",
"private Logger(){ }",
"public Logger getLogger()\n\t{\n\t\treturn logger;\n\t}",
"public static Logger get() {\n\t\treturn LoggerFactory.getLogger(WALKER.getCallerClass());\n\t}",
"protected Logger getLogger() {\n return (logger);\n }",
"public BaseLogger getLogger() {\r\n\t\treturn logger;\r\n\t}",
"private Logger getLogger() {\n return LoggerFactory.getLogger(ApplicationManager.class);\n }",
"private Logger(){\n\n }",
"protected Log getLogger() {\n return LOGGER;\n }",
"private ExtentLogger() {}",
"private static Logger getLogger() {\n return LogDomains.getLogger(ClassLoaderUtil.class, LogDomains.UTIL_LOGGER);\n }",
"protected abstract Logger getLogger();",
"@Override\r\n\tpublic Logger getLogger() {\r\n\t\t\r\n\t\treturn LogFileGenerator.getLogger();\r\n\t\t\r\n\t}",
"public final Logger getLogger() {\r\n return this.logger;\r\n }",
"protected Logger getLogger() {\n if (logger == null) {\n logger = Logger.getLogger(getClass().getName());\n }\n return logger;\n }",
"public Logger log() {\n return LOG;\n }",
"public MyLogger () {}",
"@Override\n public void logs() {\n \n }",
"@Override\n\tprotected PublicationControlLogger getLogger() {\n\t\treturn logger;\n\t}",
"public MCBLogger getLogger() {\n return logger;\n }",
"private Log() {\r\n\t}",
"public Logger getLog () {\n return log;\n }",
"public Logger logger()\n\t{\n\t\tif (logger == null)\n\t\t{\n\t\t\tlogger = new Logger(PluginRegionBlacklist.this.getClass().getCanonicalName(), null)\n\t\t\t{\n\t\t\t\tpublic void log(LogRecord logRecord)\n\t\t\t\t{\n\n\t\t\t\t\tlogRecord.setMessage(loggerPrefix + logRecord.getMessage());\n\t\t\t\t\tsuper.log(logRecord);\n\t\t\t\t}\n\t\t\t};\n\t\t\tlogger.setParent(getLogger());\n\t\t}\n\t\treturn logger;\n\t}",
"private static Logger getLogger() {\n if (logger == null) {\n try {\n new transactionLogging();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n return logger;\n }",
"protected Log getLog()\n/* */ {\n/* 59 */ return log;\n/* */ }",
"private synchronized ILogger getLogger()\n {\n if( _logger == null )\n _logger = ClearLogFactory.getLogger( ClearLogFactory.PERSIST_LOG,\n this.getClass() );\n return _logger;\n }",
"public Log(Logger logger) {\n this.logger = logger;\n }",
"protected abstract ILogger getLogger();",
"@Override\n\tpublic void initLogger() {\n\t\t\n\t}",
"public static Logger getLogger()\n {\n if (logger == null)\n {\n Log.logger = LogManager.getLogger(BAG_DESC);\n }\n return logger;\n }",
"private LoggerSingleton() {\n\n }",
"public Logger getPhotoLogger(){\r\n\treturn logger;\r\n\t}",
"public LogKitLogger(String name)\n/* */ {\n/* 64 */ this.name = name;\n/* 65 */ this.logger = getLogger();\n/* */ }",
"public RevisorLogger getLogger();",
"private Log() {\n }",
"public Logger getLogger() {\n //depending on the subclass, we'll get a particular logger.\n Logger logger = createLogger();\n\n //could do other operations on the logger here\n return logger;\n }",
"private static final Logger getLog4JLogger(final Log l) {\r\n return ((org.apache.commons.logging.impl.Log4JLogger) l).getLogger();\r\n }",
"private final Log getLog() {\r\n return this.log;\r\n }",
"@Override\n public void log()\n {\n }",
"private synchronized ILogger _getAuditLogger()\n {\n if( auditlogger == null )\n auditlogger = ClearLogFactory.getLogger( ClearLogFactory.AUDIT_LOG,\n this.getClass() );\n return auditlogger;\n }",
"public static Log getLogger() {\r\n Log l = null;\r\n if (isRunning()) {\r\n l = getInstance().getLog();\r\n }\r\n return l;\r\n }",
"@Override\n public LogWriter getLogWriter() {\n return logWriter;\n }",
"public Log log() {\n return _log;\n }",
"public static BackupLogger getLogger() {\n\t\tif (BackupLogger.logger == null) BackupLogger.logger = new BackupLogger();\n\t\treturn BackupLogger.logger;\n\t}",
"private final AbstractC33303b getLogger() {\n AbstractC32572g gVar = this.logger$delegate;\n AbstractC32607k kVar = $$delegatedProperties[2];\n return (AbstractC33303b) gVar.mo102348b();\n }",
"protected String logInstanceName() {\n\t\treturn getClass().getName();\n\t}",
"public static Logger getLogger() {\r\n\t\tif (log == null) {\r\n\t\t\tinitLogs();\r\n\t\t}\r\n\t\treturn log;\r\n\t}",
"private static Log getLog() {\n if (log == null) {\n log = new SystemStreamLog();\n }\n\n return log;\n }",
"public MyLogs() {\n }",
"protected NbaLogger getLogger() {\n\t\tif (logger == null) {\n\t\t\ttry {\n\t\t\t\tlogger = NbaLogFactory.getLogger(this.getClass());\n\t\t\t} catch (Exception e) {\n\t\t\t\tNbaBootLogger.log(this.getClass().getName() + \" could not get a logger from the factory.\");\n\t\t\t\te.printStackTrace(System.out);\n\t\t\t}\n\t\t}\n\t\treturn logger;\n\t}",
"Logger getLog(Class clazz);",
"protected AbstractLogger() {\n \n }",
"public MyLoggingFacade(Logger logger) {\n this.logger = logger;\n }",
"private synchronized ILogger _getAlertLogger()\n {\n if( alertlogger == null )\n alertlogger = ClearLogFactory.getLogger( ClearLogFactory.ALERT_LOG,\n this.getClass() );\n return alertlogger;\n }",
"abstract public LoggingService getLoggingService();",
"public final Logger getLog() {\n return this.log;\n }",
"private Log()\n {\n //Hides implicit constructor.\n }",
"public static Log getLoggerBase() {\r\n Log l = null;\r\n if (isRunning()) {\r\n l = getInstance().getLogBase();\r\n }\r\n return l;\r\n }",
"private JavaUtilLogHandlers() { }",
"public String getLoggerName() {\n return \"test\";\n }",
"protected Logger getLogger(final Class<?> klaz) {\n\t\treturn MavenLoggerFactory.getLogger(klaz, getLog());\n\t}",
"@Override\n public Logger getLog(Class clazz) {\n return new Slf4jLogger(LoggerFactory.getLogger(clazz));\n }",
"public LoggerProxy(org.jboss.logging.Logger logger)\n/* */ {\n/* 23 */ this.logger = logger;\n/* */ }",
"private Log getLog() {\n if (controller != null) {\n log = controller.getLog();\n } \n return log ;\n }",
"protected static Logger initLogger() {\n \n \n File logFile = new File(\"workshop2_slf4j.log\");\n logFile.delete();\n return LoggerFactory.getLogger(Slf4j.class.getName());\n }",
"public static Logger getInstance() {\n if (logger == null)\n logger = Logger.getLogger(Logger.GLOBAL_LOGGER_NAME);\n return logger;\n }",
"public SegaLogger getLog(){\r\n\t\treturn log;\r\n\t}",
"@Produces\n public Logger logger(InjectionPoint injectionPoint) {\n return Logger.getLogger(\n injectionPoint.getMember().getDeclaringClass().getName());\n }",
"public String getLoggerName()\n\t{\n\t\treturn this.loggerName;\n\t}",
"abstract void initiateLog();",
"private final Log getLogBase() {\r\n return this.logBase;\r\n }",
"@Override\r\n\tpublic Log getLog() {\n\t\treturn log;\r\n\t}",
"RootMessageLogger getRootMessageLogger();",
"private LogUtil() {\r\n /* no-op */\r\n }",
"public LogService getLog() {\n\treturn log;\n }",
"void initializeLogging();",
"@Nonnull\n ScriptLogger getLogger();",
"public String getName() {\n return _loggerName;\n }",
"public void setLogger(Logger logger)\n {\n this.logger = logger;\n }",
"protected static NbaLogger getLogger() {\n\t\tif (logger == null) {\n\t\t\ttry {\n\t\t\t\tlogger = NbaLogFactory.getLogger(NbaCyberPrintRequests.class.getName());\n\t\t\t} catch (Exception e) {\n\t\t\t\tNbaBootLogger.log(\"NbaCyberPrintRequests could not get a logger from the factory.\");\n\t\t\t\te.printStackTrace(System.out);\n\t\t\t}\n\t\t}\n\t\treturn logger;\n\t}",
"public interface Logger\n{\n /**\n * Returns the name of the object.\n *\n * @return name of the Logger class\n */\n public String getName();\n\n /**\n * Rerturns the time of the object.\n *\n * @return time of the Logger object\n */\n public double getTime();\n}",
"public static Logger getInstance(){\n if (shareInstance == null) {\n shareInstance = new Logger();\n }\n return shareInstance;\n }",
"public ModularConfiguration(Logger logger) {\n this.logger = logger;\n }",
"Object createLogger(String name);",
"IFileLogger log();",
"private static void _logInfo ()\n {\n System.err.println (\"Logging is enabled using \" + log.getClass ().getName ());\n }"
] |
[
"0.7692025",
"0.75768375",
"0.7568827",
"0.7555943",
"0.75519454",
"0.7541186",
"0.74538857",
"0.7436452",
"0.74185663",
"0.74121857",
"0.74008405",
"0.7375905",
"0.73448235",
"0.7303857",
"0.729659",
"0.72564477",
"0.7255693",
"0.72537327",
"0.72333604",
"0.72313005",
"0.72193176",
"0.72123396",
"0.7188349",
"0.71876675",
"0.71640265",
"0.7162527",
"0.71569985",
"0.7134162",
"0.71291876",
"0.71164966",
"0.71032864",
"0.7092515",
"0.7068336",
"0.7064155",
"0.7018268",
"0.697945",
"0.69625145",
"0.69588727",
"0.6958412",
"0.69428194",
"0.6924741",
"0.6894422",
"0.6893108",
"0.6867562",
"0.68589514",
"0.6826418",
"0.6814456",
"0.6776063",
"0.67455053",
"0.67379546",
"0.67069304",
"0.6696223",
"0.66441554",
"0.66347575",
"0.6617331",
"0.66173214",
"0.66029966",
"0.6576798",
"0.6562301",
"0.6562008",
"0.65398574",
"0.653879",
"0.6535089",
"0.65226394",
"0.6519988",
"0.6508196",
"0.65021247",
"0.64989054",
"0.6494173",
"0.6492158",
"0.64857227",
"0.6467854",
"0.64614636",
"0.6459819",
"0.6435205",
"0.6432503",
"0.6431749",
"0.6424229",
"0.6409898",
"0.64089894",
"0.6402531",
"0.6395109",
"0.63930196",
"0.63714635",
"0.63699204",
"0.6369532",
"0.6363808",
"0.63387096",
"0.63378924",
"0.6326614",
"0.6320309",
"0.6302626",
"0.63009745",
"0.6266609",
"0.62663335",
"0.6247408",
"0.6239609",
"0.6232303",
"0.6219856",
"0.6219484",
"0.6215252"
] |
0.0
|
-1
|
quadrant Method specifications as in textbook Chapter 4 Exercise 19 Calculates what quadrant a certain point is in. The book says to return a point on an axis as 0, but thats too easy so I created a self check which requires the user to input non zero values for x and y, code can be cound in main.
|
public static int quadrant(double x, double y) {
int quadrant = 0; // variable quadrant is initialized
if (x > 0 && y > 0){ // code for quadrant 1
quadrant = 1;
} else if (x < 0 && y < 0){ //code for quadrant 3
quadrant = 3;
} else if (x < 0 && y > 0){ //code for quadrant 2
quadrant = 2;
} else { // defaulted to quadrant 4
quadrant = 4;
}
return quadrant;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"private QuadTree<Point> quadrant(double x, double y) {\n int quad = quadrant(x, y, _nodeOrigin[0], _nodeOrigin[1]);\n switch (quad) {\n case 1:\n return _northEast;\n case 2:\n return _northWest;\n case 3:\n return _southWest;\n default:\n return _southEast;\n }\n }",
"public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tdouble xa;\n\t\tdouble ya;\n\t\tSystem.out.println(\"Input x and y coordinates of vertex A\");\n\t\txa = sc.nextDouble();\n\t\tya = sc.nextDouble();\n\t\tdouble xb;\n\t\tdouble yb;\n\t\tSystem.out.println(\"Input x and y coordinates of vertex B\");\n\t\txb = sc.nextDouble();\n\t\tyb = sc.nextDouble();\n\t\tdouble xc;\n\t\tdouble yc;\n\t\tSystem.out.println(\"Input x and y coordinates of vertex C\");\n\t\txc = sc.nextDouble();\n\t\tyc = sc.nextDouble();\n\t\tdouble xd;\n\t\tdouble yd;\n\t\tSystem.out.println(\"Input x and y coordinates of point D\");\n\t\txd = sc.nextDouble();\n\t\tyd = sc.nextDouble();\n\t\tdouble s1 = (xa - xd) * (yb - ya) - (xb - xa) * (ya - yd);\n\t\tdouble s2 = (xb - xd) * (yc - yb) - (xc - xb) * (yb - yd);\n\t\tdouble s3 = (xc - xd) * (ya - yc) - (xa - xc) * (yc - yd);\n\t\tif ((s1 <= 0 && s2 <= 0 && s3 <= 0) || (s1 > 0 && s2 > 0 && s3 > 0)) {\n\t\t\tSystem.out.println(\"Point lies inside the triangle\");\n\t\t} else {\n\t\t\tSystem.out.println(\"Point doesn`t lie inside the triangle\");\n\t\t}\n\t}",
"private QuadTree<Point> quadrant(Point p) {\n int quad = quadrant(x(p), y(p), _nodeOrigin[0], _nodeOrigin[1]);\n switch (quad) {\n case 1:\n return _northEast;\n case 2:\n return _northWest;\n case 3:\n return _southWest;\n default:\n return _southEast;\n }\n }",
"private boolean inOneQuadrant(double x, double y,\n double llx, double lly,\n double urx, double ury) {\n boolean horCond = llx < x == urx < x;\n boolean verCond = lly < y == ury < y;\n return horCond && verCond;\n }",
"public Quadrato (double ax, double ay, double bx, double by, double cx, double cy, double dx, double dy) {\n\t\tsuper(ax, ay, bx, by, cx, cy, dx, dy);\n\t\tif (!this.verificaValidita()) {\n\t\t\tthis.valido = false;\n\t\tfor (int i = 0 ; i < 4 ; i++) { \n\t\t\tthis.vertici[i].impostaX(Double.NaN);\n\t\t\tthis.vertici[i].impostaY(Double.NaN);\n\t\t\t}\n\t\t}\n\t}",
"private boolean setCoords(double x1, double y1, double x2, double y2, double x3, double y3, double x4, double y4) {\r\n // Ensure all x co-ordinates are in the first quadrant\r\n if(x1 < 0 || x2 < 0 || x3 < 0 || x4 < 0) {\r\n throw new IllegalArgumentException(\"Error: Non-negative numbers for the X co-ordinates only\");\r\n } else if(y1 < 0 || y2 < 0 || y3 < 0 || y4 < 0) {\r\n throw new IllegalArgumentException(\"Error: Non-negative numbers for the Y co-ordinates only\");\r\n } else if(x1 > 20 || x2 > 20 || x3 > 20 || x4 > 20) {\r\n throw new IllegalArgumentException(\"Error: X co-ordinate values cannot be greater than 20\");\r\n } else {\r\n \treturn(true);\r\n }\r\n }",
"public static void main(String[] args) {\n\t\tint a, b, c;\r\n\t\tSystem.out.println(\"Quadratic equation \\tax^2+bx+c=0\");\r\n\t\tSystem.out.println();\r\n\t\tScanner input = new Scanner(System.in);\r\n\t\tSystem.out.print(\"Enter the value of a: \");\r\n\t\ta = input.nextInt();\r\n\t\tSystem.out.print(\"Enter the value of b: \");\r\n\t\tb = input.nextInt();\r\n\t\tSystem.out.print(\"Enter the value of c: \");\r\n\t\tc = input.nextInt();\r\n\t\tif(b<0 && c<0) {\r\n\t\t\tSystem.out.printf(\"Equation = %dx^2 %dx %d\", a, b, c);\r\n\t\t}else if(c<0) {\r\n\t\t\tSystem.out.printf(\"Equation = %dx^2 + %dx %d\", a, b, c);\r\n\t\t}else if(b<0) {\r\n\t\t\tSystem.out.printf(\"Equation = %dx^2 %dx + %d\", a, b, c);\r\n\t\t}else {\r\n\t\t\tSystem.out.printf(\"Equation = %dx^2 + %dx + %d\", a, b, c);\r\n\t\t}\r\n\t\r\n\t\tSystem.out.println();\r\n\t\tSystem.out.println(\"\\nQr = b^2 - 4ac\");\r\n\t\tint x;\r\n\t\tx = (int) (Math.pow(b, 2) - 4*a*c);\r\n\t\tSystem.out.printf(\"Qr = %d\", x);\r\n\t\tSystem.out.print(\"\\n\\nRoots of the equqtion are: \");\r\n\t\tif(x<0) {\r\n\t\t\tSystem.out.println(\"Imaginary/complex\");\r\n\t\t}else if(x==0) {\r\n\t\t\tSystem.out.println(\"Real and equal\");\r\n\t\t}else {\r\n\t\t\tSystem.out.println(\"Real and distinct\");\r\n\t\t}\r\n\t\t\r\n\t\r\n\t}",
"public int getQuadrante(int x, int y){\n if(x>=0 && x<=2){\n if(y>=0 && y<=2)\n return 1;\n if(y>=3 && y<=5)\n return 2;\n if(y>=6 && y<=8)\n return 3;\n }\n\n if(x>=3 && x<=5){\n if(y>=0 && y<=2)\n return 4;\n if(y>=3 && y<=5)\n return 5;\n if(y>=6 && y<=8)\n return 6;\n }\n\n if(x>=6 && x<=8){\n if(y>=0 && y<=2)\n return 7;\n if(y>=3 && y<=5)\n return 8;\n if(y>=6 && y<=8)\n return 9;\n }\n return -1;\n }",
"public static void main (String[] args) {\n\t\tdouble x1 = 0, y1 = 0, x2 = 0, y2 = 0, perimeter = 0, hypotenuse = 0, \n\t\t\t\tside1 = 0, side2 = 0;// Declare all the variables as double and assigning an initial value to them\n\t\t// Declare Scanner input, so that user will be able to assign their own values to x1, x2, y1, and y2\n\t\tScanner inputScanner = new Scanner (System.in);\n\t\tSystem.out.println(\"Enter an integer for x1\");\n\t\tx1 = inputScanner.nextInt();\n\t\tSystem.out.println(\"Enter an integer for y1\");\n\t\ty1 = inputScanner.nextInt();\n\t\tSystem.out.println(\"Enter an integer for x2\");\n\t\tx2 = inputScanner.nextInt();\n\t\tSystem.out.println(\"Enter an integer for y2\");\n\t\ty2 = inputScanner.nextInt(); \n\t\tside1 = x2 - x1;// this statement states that side1 will be equal to the difference of x2 - x1\n\t\tside2 = y2 - y1;// this statement states that side2 will be equal to the difference of y2 - y1\n\t\t// This will compute a value \n\t\thypotenuse = Math.sqrt(Math.pow(side1, 2.0) + Math.pow(side2, 2.0));\n\t\tperimeter = side1 + side2 + hypotenuse; \n\t\t// This statement will output a value for the hypotenuse; then using this to find the perimeter \n\t\tSystem.out.println(\"The perimeter of the right angle triangle with sides\" + Double.toString(side1) + \",\"\n\t\t\t\t+ Double.toString(side2) + \"and hypotenuse\" + Double.toString(hypotenuse) + \"is\" + Double.toString(perimeter));\n\t\t/* The above statement will convert the values of side1, side2, hypotenuse and perimeter from double to string; then it will present\n\t\t * the the value of the hypotenuse and perimeter of the right angle triangle\n\t\t */\n\t\tinputScanner.close(); \t\t\t\n\t}",
"public boolean isValidSqr(int x, int y)\r\n {\r\n return (x >= 0) && (x < xLength) && (y >= 0) && (y < yLength);\r\n }",
"public static void main(String[] args){\n\t\tdouble rint, rext, x, y;\n\t\tScanner sc = new Scanner(System.in);\n\t\t\n\t\tdo{\n\t\t\tSystem.out.print(\"Rayon intérieur : \");\n\t\t\trint = sc.nextDouble();\n\t\t\tSystem.out.print(\"Rayon extérieur : \");\n\t\t\trext = sc.nextDouble();\n\t\t}while(rint>rext); //Si rint <= rext on continue sinon redemander les valeurs\n\t\t\n\t\t/* Abscisse et ordonnée du point à tester */\n\t\tSystem.out.print(\"Abscisse du point : \");\n\t\tx = sc.nextDouble();\n\t\tSystem.out.print(\"Ordonnée du point : \");\n\t\ty = sc.nextDouble();\n\n\t\t/* Calcul pour savoir si le point est dans la couronne */\n\t\tif((Math.hypot(x, y) >= rint) && (Math.hypot(x, y) <= rext)){ //Le point est dans la couronne\n\t\t\tSystem.out.println(\"Le point est dans la couronne !\");\n\t\t} else { // Le point n'est pas dans la couronne\n\t\t\tSystem.out.println(\"Raté le point n'est pas dans la couronne !\");\n\t\t}\n\t}",
"static double sqrt(double number) {\n\t\tdouble answer = number / 2;\r\n\t\tif (number < 0) {\r\n\t\t\tthrow new IllegalArgumentException(\"no negative square roots\"); \r\n=======\n\tpublic static double sqrt(int number) { //gonna be honest here: idk??\r\n\t\tint div = number*number;\r\n\t\tif(number < 0) {\r\n\t\t\tthrow new IllegalArgumentException(\"no square roots of negative numbers\");\r\n>>>>>>> branch 'master' of https://github.com/henryhoover/APCS4Fall.git\n\t\t}\r\n\t\twhile (((answer * answer) - number) >= .005 || ((answer * answer) - number) <= -.005) {\r\n\t\t\tanswer = 0.5 * (number / answer + answer);\r\n\t\t}\r\n\t\treturn round2(answer);\r\n\t}\r\n\t\r\n\tpublic static String quadForm(int a, int b, int c) { //need round2 so uhhhhh\r\n\t\tif(b == 0) {\r\n\t\t\tSystem.out.println(round2(c));\r\n\t\t}\r\n\r\n\t\tif(discriminant(a, b, c) == 0) {\r\n\t\t\treturn(\"Roots: \" + round2((b * -1) / (2 *a)));\t\r\n\t\t}\r\n\t\t\r\n\t\tif(discriminant(a, b, c) > 0) {\r\n\t\t\treturn(\"Roots: \" + round2(b * -1) + (sqrt(b * b - (4 * a * c))));\r\n\t\t}\r\n\t\t\r\n\t\treturn(\"no real roots\");\r\n\t}\r\n}",
"public static void main(String[] args) {\n Scanner input = new Scanner(System.in);\n \n // Prompt the user to enter the coordinates of a point\n System.out.print(\"Enter a point with two coordinates: \");\n float x = input.nextFloat(), y = input.nextFloat();\n \n // Declare the constants for the width and height of the rectangle\n final float WIDTH_OF_RECTANGLE = 10;\n final float HEIGHT_OF_RECTANGLE = 5;\n \n // Compute the distance from the center to the end of the +x-axis of the shape\n float xToCenterDistance = WIDTH_OF_RECTANGLE / 2;\n \n // Compute the distance from the center to the end of the +y-axis of the shape\n float yToCenterDistance = HEIGHT_OF_RECTANGLE / 2;\n \n // Declare a boolean variable and assign with a boolean expression of \n // if point is within rectangle\n boolean isWithinRectangle = \n (x > -xToCenterDistance && x < xToCenterDistance) &&\n (y > -yToCenterDistance && y < yToCenterDistance);\n \n // Display the result of if the point is in the rectangle\n System.out.println(\"Point (\" + x + \", \" + y + \") is \" +\n (isWithinRectangle ? \"\" : \"not \") + \"in the rectangle\");\n }",
"private boolean isValid(int x,int y){\n\t\treturn x > -1 && y > -1 && x < width && y<height;\n\t }",
"protected boolean isSingle(int x, int y){\n \tint a[] = {x - 1 , x + 1 , x , x};\n \tint b[] = {y , y , y - 1 , y + 1};\n\n for (int i = 0 ; i < 4 ; i++){\n if (!validatePoint(a[i], b[i]))\n continue;\n int xx = a[i];\n \t\tint yy = b[i];\n \t\tif (!GoPoint.isEnemy(getPoint(x, y), getPoint(xx, yy))) return false;\n \t}\n \treturn true;\n }",
"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 void isItATriangle(){\n Scanner firstSide = new Scanner(System.in);\n System.out.println(\"Please put in your first side length: \");\n int side1 = firstSide.nextInt();\n\n Scanner secondSide = new Scanner(System.in);\n System.out.println(\"Please put in your second side length: \");\n int side2 = secondSide.nextInt();\n\n Scanner thirdSide = new Scanner(System.in);\n System.out.println(\"Please put in your third side length: \");\n int side3 = thirdSide.nextInt();\n\n System.out.println(\"\\nNow calculating to see if you have a Triangle...\");\n System.out.println(\"Your first side value: \" + side1 + \"\\nYour second side value: \" + side2 + \"\\nYour third side value: \" + side3 + \"\\n\");\n\n //*****************************************************************\n /*\n *This is seeing is the sides are going to be enough for a Triangle\n *using Triangle Inequality Theorem\n */\n if(side1 + side2 > side3){\n if(side1 + side3 > side2){\n if(side2 + side3 > side1){\n System.out.println(\"Yes! This is a Triangle!\");\n\n if ((side1 == side2) && (side2 == side3) && (side3 == side1)){\n System.out.println(\"Oh hey! Your Triangle is an Equilaterall Triangle!\");\n }else{\n System.out.print(\"\");\n }\n\n if (((side1 == side2) && (side2 != side3)) || ((side2 == side3) && (side3 != side1)) || ((side3 == side1) && (side3 != side2))){\n System.out.println(\"Wow! Your triangle is Isosoleces!\");\n }else{\n System.out.print(\"\");\n }\n\n }else{\n System.out.println(\"No, Not a Triangle\");\n }\n }else{\n System.out.println(\"No, Not a Triangle\");\n }\n }else{\n System.out.println(\"No, Not a Triangle.\");\n return;\n }\n\n //checking to see if equilaterall\n\n }",
"public static Quad quad (double ym, double y0, double yp) {\r\n\t\r\n\t\tdouble a, b, c, dx, dis, XE, YE, Z1, Z2;\r\n\t\tint NZ;\r\n\t\tNZ = 0;\r\n\t\tXE = 0;\r\n\t\tYE = 0;\r\n\t\tZ1 = 0;\r\n\t\tZ2 = 0;\r\n\t\ta = .5 * (ym + yp) - y0;\r\n\t\tb = .5 * (yp - ym);\r\n\t\tc = y0;\r\n\t\tXE = (0.0 - b) / (a * 2.0); // 'x coord of symmetry line\r\n\t\tYE = (a * XE + b) * XE + c; // 'extreme value for y in interval\r\n\t\tdis = b * b - 4.0 * a * c; // 'discriminant\r\n\t\t//more nested if's\r\n\t\t\tif ( dis > 0.000000 ) { //'there are zeros\r\n\t\t\tdx = (0.5 * Math.sqrt(dis)) / (Math.abs(a));\r\n\t\t\tZ1 = XE - dx;\r\n\t\t\tZ2 = XE + dx;\r\n\t\t\tif (Math.abs(Z1) <= 1) {\r\n\t\t\t\tNZ = NZ + 1 ; // 'This zero is in interval\r\n\t\t\t}\r\n\t\t\tif (Math.abs(Z2) <= 1) {\r\n\t\t\t\tNZ = NZ + 1 ; //'This zero is in interval\r\n\t\t\t}\r\n\t\t\tif (Z1 < -1) {\r\n\t\t\t\tZ1 = Z2;\r\n\t\t\t}\r\n\t\t}\r\n\t\tQuad returnQuad = new Quad();\r\n\t\treturnQuad.setXe(XE);\r\n\t\treturnQuad.setYe(YE);\r\n\t\treturnQuad.setZ1(Z1);\r\n\t\treturnQuad.setZ2(Z2);\r\n\t\treturnQuad.setNz(NZ);\r\n\r\n\t\treturn returnQuad;\r\n\t}",
"public static void main(String args[]) {\n\t\t\n\t\t//declare the variables of equation ax*x + b*x + c = 0 \n\t\tdouble a,b,c;\n\t\t\n\t\t//define scanner variable x as\n\t\tScanner scan = new Scanner(System.in);\n\t\t\n\t\t//initiate the value to command line input\n\t\tSystem.out.println (\"give value of x^2 coefficient\");\n\t\t\n\t\t//now add input to variable a \n\t\ta = scan.nextDouble();\n\n //initiate the value to command line input\n\t\tSystem.out.println (\"give value of x coefficient\");\n\t\t\n\t\t//now add input to variable a \n\t\tb = scan.nextDouble();\n\n //initiate the value to command line input\n\t\tSystem.out.println (\"give value of contant\");\n\t\t\n\t\t//now add input to variable a \n\t\tc = scan.nextDouble();\n \n //declare discriminant of the equation as b^2 - 4*a*c\n double d = Math.pow(b, 2.0) - 4.0*a*c;\n \n //apply the rules for quadratic equations\n //if d =0.0 then roots are equal\n if (d == 0.0) {\n \t\n \t//the root in these situation is -b/2a\n \tSystem.out.println(\"the equation has \"+(-1.0*b/(2.0*a)) + \" as only real root\");\n }\n else if (d >=0.0) {\n \t\n \t//the root in this situation is (-b +- d^0.5)/2a\n \t//the first root is x1\n \tdouble x1 = (-1.0*b + Math.pow(d, 0.5))/(2.0*a);\n \t\n \t//the second root is x2\n \tdouble x2 = (-1.0*b - Math.pow(d, 0.5))/(2.0*a);\n \tSystem.out.println(\"the equation has \"+(x1) + \" and \"+(x2) +\" as two real roots\");\n }\n else {\n \t\n \t//the root in this situation are complex (-b +- d^0.5i)/2a\n \t//the real part of root is r\n \tdouble real = (-1.0*b)/(2.0*a);\n \t\n \t//the complex part of root is c\n \tdouble com = (Math.pow(-1.0*d, 0.5))/(2.0*a);\n \tSystem.out.println(\"the equation has \"+(real) + \"+\"+(com) +\"i and \"+real+\"-\"+com+\"i as two complex root\" );\n }\n\t}",
"public Quadrat(Point a, Point b, Point c, Point d){\r\n\t\tsuper(a,b,c,d);\r\n\t}",
"public static void main(String[] args) {\n\n short angle1 = 0;\n short angle2 = 180;\n short angle3 = 0;\n\n int sumOfAngles = angle1 + angle2 + angle3;\n\n boolean validTriangle = sumOfAngles == 180;\n\n if (validTriangle){\n System.out.println(\"the shape is a triangle\");\n }\n if(!validTriangle){\n System.out.println(\"the shape is not valid\");\n }\n\n\n\n\n\n }",
"public boolean legalOrNot(int x,int y) {\n\t\tif((x == 14 && y ==2) || (x== 2 && y == 14)) {\n\t\t\treturn true;\n\t\t}else if((x-y) == 1 || (x-y) == -1 ) {\n\t\t\treturn true;\n\t\t}else {\n\t\t\treturn false;\n\t\t}\n\t}",
"boolean testCoords(Tester t) {\n return t.checkExpect(this.p3.xCoord(), 50) && t.checkExpect(this.p4.yCoord(), 600);\n }",
"public void verificaCoordenada() {\r\n\t\tif (X < 0) {\r\n\t\t\tX = Const.TAMANHO - 1;\r\n\t\t} else {\r\n\t\t\tX = X % Const.TAMANHO;\r\n\t\t}\r\n\r\n\t\tif (Y < 0) {\r\n\t\t\tY = Const.TAMANHO - 1;\r\n\t\t} else {\r\n\t\t\tY = Y % Const.TAMANHO;\r\n\t\t}\r\n\t}",
"@Test\n public void test() {\n Assert.assertEquals(11, beautifulQuadruples(1, 2, 3, 8));\n }",
"public static void main(String[] args) throws NumberFormatException, IOException {\n\t\tBufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n\t\tint x = Integer.parseInt(in.readLine()), y = Integer.parseInt(in.readLine());\n\t\tcurrentNum = x+1;\n\t\tspiral = new int[(int)Math.ceil(Math.sqrt(y-x))][(int)Math.ceil(Math.sqrt(y-x))];\n\t\tint start = (int)Math.ceil(spiral.length/2.0)-1;\n\t\tif(x==y) {\n\t\t\tSystem.out.println(x);\n\t\t\tSystem.exit(0);\n\t\t}else if(x+1==y) {\n\t\t\tSystem.out.println(x);\n\t\t\tSystem.out.println(y);\n\t\t\tSystem.exit(0);\n\t\t}\n\t\tspiral[start][start] = x;\n\t\tcurrentX = start;\n\t\tcurrentY = start;\n\t\twhile(currentNum<=y) {\n\t\t\tif(direction==0) {\n\t\t\t\tif(down()) {\n\t\t\t\t\tdirection++;\n\t\t\t\t\tcurrentNum++;\n\t\t\t\t\tcurrentY++;\n\t\t\t\t}else {\n\t\t\t\t\tdirection=3;\n\t\t\t\t}\n\t\t\t}else if(direction==1) {\n\t\t\t\tif(right()) {\n\t\t\t\t\tdirection++;\n\t\t\t\t\tcurrentNum++;\n\t\t\t\t\tcurrentX++;\n\t\t\t\t}else {\n\t\t\t\t\tdirection--;\n\t\t\t\t}\n\t\t\t}else if(direction==2) {\n\t\t\t\tif(up()) {\n\t\t\t\t\tdirection++;\n\t\t\t\t\tcurrentNum++;\n\t\t\t\t\tcurrentY--;\n\t\t\t\t}else {\n\t\t\t\t\tdirection--;\n\t\t\t\t}\n\t\t\t}else {\n\t\t\t\tif(left()) {\n\t\t\t\t\tdirection = 0;\n\t\t\t\t\tcurrentNum++;\n\t\t\t\t\tcurrentX--;\n\t\t\t\t}else {\n\t\t\t\t\tdirection--;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tfor(int i = 0; i < spiral.length; i++) {\n\t\t\tfor(int j = 0; j < spiral[i].length; j++) {\n\t\t\t\tSystem.out.print(spiral[j][i]!=0 ? spiral[j][i]+\" \" : \" \");\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\t\tSystem.out.println();\n\t}",
"public static void main(String[] args) {\n\t\tint x, y;\r\n\t\tx = 10;\r\n\t\ty = -10;\r\n\t\tif(x > 0 && y > 0) {\r\n\t\t\tSystem.out.println(\"both numbers are positive\");\r\n\t\t}else if(x > 0 || y > 0 ) {\r\n\t\t\tSystem.out.println(\"atleast one number is positive\");\r\n\t\t}else {\r\n\t\t\tSystem.out.println(\"both numbers are negative\");\r\n\t\t}\r\n\t}",
"public boolean isInsideQuadrant(float x, float y) {\n double distanceFromCenter = Math.sqrt((x * x) + (y * y));\n\n // If this coord pair is outside the max radius, it isn't inside the quadrant\n if (distanceFromCenter > radius) {\n return false;\n }\n\n // Find the radians to the given coord pair and determine if it is between the max and min radians\n double radians = Math.atan(y / x);\n\n // If in quadrant 2 or 3\n if (x < 0) {\n radians += Math.PI;\n } else if (x > 0 && y < 0) {\n radians += 2 * Math.PI;\n }\n\n if (mMinRads < radians && radians < mMaxRads) {\n return true;\n } else {\n return false;\n }\n }",
"public static void main(String[] args) {\n\t\tScanner input = new Scanner (System.in);\n\t\tSystem.out.println(\"Enter a point with two coordinates:\");\n\t\tdouble x = input.nextDouble();\n\t\tdouble y = input.nextDouble();\n\t\t\n\t\tdouble d1=Math.pow((Math.pow(x, 2)), 0.5);\n\t\tdouble d2=Math.pow((Math.pow(y, 2)), 0.5);\n\t\t\n\t\tif (d1 <=10/2 && d2 <=5.0/2) {\n\t\t\tSystem.out.print(\"point(\" + x+ \",\" + y+\") is in the circle\");\n\t\t}\n\t\telse {\n\t\t\tSystem.out.print(\"point(\" + x+ \",\" + y+\") is not in the circle\");\n\t\t}\n\n\t}",
"public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\r\n\t\tfloat a, b, c;\r\n\t\tSystem.out.println(\"Fill a, b, c: \");\r\n\t\ta = sc.nextFloat();\r\n\t\tb = sc.nextFloat();\r\n\t\tc = sc.nextFloat();\r\n\t\tfloat delta = (float) (Math.pow(b, 2) - 4 * a * c);\r\n\t\tif (delta < 0) {\r\n\t\t\tSystem.out.println(\"The equation has no solution!\");\r\n\t\t} else {\r\n\t\t\tif (delta == 0) {\r\n\t\t\t\tfloat x = -b / 2 * a;\r\n\t\t\t\tSystem.out.println(\"Solution x = \" + x);\r\n\t\t\t} else {\r\n\t\t\t\tdouble x1 = (-b - Math.sqrt(delta)) / 2 * a;\r\n\t\t\t\tdouble x2 = (-b + Math.sqrt(delta)) / 2 * a;\r\n\t\t\t\tSystem.out.println(\"Solution X1 = \" + x1);\r\n\t\t\t\tSystem.out.println(\"Solution X2 = \" + x2);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}",
"static Boolean pointInPgm(int x, int y) {\n return (x >= 0 ) && (y >= 0) && (x <= pgmInf.width) && (y <= pgmInf.height);\n }",
"public static void main(String[] args) {\n double angel1 = 30;\n double angel2 = 50;\n double angel3= 60;\n\n short sumOfAngels = (short)(angel1 + angel2 + angel3);\n\n boolean validTriangle = sumOfAngels == 180;\n if (sumOfAngels==180){\n System.out.println(\"The shape is a triangle.\");\n }\n if (sumOfAngels!=180){\n System.out.println(\"The shape is not a valid triangle.\");\n }\n\n\n\n\n\n\n\n\n\n\n }",
"public static void main(String[] args) {\n\t\t\n\t\tScanner sc = new Scanner(System.in);\n\t\t//(20,10)(30,18)\n\t\tint x1=0,y1=10,x2,y2,i=0;\n\t\t\n\t\t/*System.out.print(\"Enter the X1 : \");\n\t\tx1 = sc.nextInt();\n\t\tSystem.out.print(\"Enter the Y1 : \");\n\t\ty1 = sc.nextInt();*/\n\t\t\n\t\t\n\t\t/*System.out.print(\"Enter the X2 : \");\n\t\tx2 = sc.nextInt();\n\t\tSystem.out.print(\"Enter the Y2 : \");\n\t\ty2 = sc.nextInt();\n\t\tint dellY, dellX;\n\t\tdellX =x2 - x1;\n\t\tdellY=y2 -y1;\n\t\tint dInitial, dNew, dellD;\n\t\tdInitial = 2*dellY - dellX;\n\t\tdNew = dInitial;\n\t\tdellD = 2*(dellY - dellX);\n\t\t\n//\t\tint a,b;\n\t\tSystem.out.println(\"Dell Of X : \"+dellX);\n\t\tSystem.out.println(\"Dell Of Y : \"+dellY);\n\t\tSystem.out.println(\"D initial : \"+dInitial);\n\t\tSystem.out.println(\"D new value : \"+dNew);\n\t\t*/\n\t\t\n\t\t\n\t\tint R = 1- 10;\n\t\tint pK =R;\n\t\tint pK1 =R;\n\t\t\n\t\tSystem.out.println(\"(index ) ( P_k ) ( P_k1 ) (X_k+1 ) ( Y_k+1 ) ( X , Y ) \");\n\t\tSystem.out.println();\n\t\t\n\t\tSystem.out.println(\" \"+i+\" \"+pK+\" \"+pK1+\" \"+2*x1+\" \"+2*y1+\" (\"+x1+\",\"+y1+\")\");\n\t\t//x++;\n\t\twhile(!(x1>=y1)) {\n\t\t\ti++;\n\t\t\t\n\t\t\t\n\t\t\tif(pK<0) {\n\t\t\t\tx1++;\n\t\t\t\tpK1 =pK + 2*x1 + 1;\n\t\t\t\t//System.out.println(\"pK1= \"+pK+\" + \"+2*x1+\"+\"+1);\n\t\t\t\tSystem.out.println(\" \"+i+\" \"+pK+\" \"+\"pK1= \"+pK+\" + \"+2*x1+\"+\"+1+\"=\"+pK1+\" \"+2*x1+\" \"+2*y1+\" (\"+x1+\",\"+y1+\")\");\n\t\t\t\t\n\t\t\t}\n\t\t\telse {\n\t\t\t\t\n\t\t\t\t\n\t\t\t\ty1--;\n\t\t\t\tx1++;\n\t\t\t\tpK1 = pK + 2*x1 + 1 - 2*y1;\n\t\t\t\t//System.out.println(\"pK1= \"+pK+\" + \"+2*x1+\"+\"+1+\"-\"+2*y1);\n\t\t\t\tSystem.out.println(\" \"+i+\" \"+pK+\" \"+\"pK1= \"+pK+\" + \"+2*x1+\"+\"+1+\"=\"+pK1+\" \"+2*x1+\" \"+2*y1+\" (\"+x1+\",\"+y1+\")\");\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t\tpK = pK1;\n\t\t\t\n\t\t\t\n\t\t}\n\n\t}",
"private static double g(double x, double y) {\n double eps = 1e-6;\n if (Math.abs(x + 1) < eps)\n return -y;\n if (Math.abs(x - 1) < eps)\n return y;\n if (Math.abs(y + 1) < eps)\n return -x;\n if (Math.abs(y - 1) < eps)\n return x;\n return 0;\n }",
"public boolean isValid (int x, int y)\n {\n\tif ((x < 1 || x > 3) || (y < 1 || y > 3))\n\t return false;\n\telse if (x == 1 && y == 1 && a != ' ')\n\t return false;\n\telse if (x == 2 && y == 1 && b != ' ')\n\t return false;\n\telse if (x == 3 && y == 1 && c != ' ')\n\t return false;\n\telse if (x == 1 && y == 2 && d != ' ')\n\t return false;\n\telse if (x == 2 && y == 2 && e != ' ')\n\t return false;\n\telse if (x == 3 && y == 2 && f != ' ')\n\t return false;\n\telse if (x == 1 && y == 3 && g != ' ')\n\t return false;\n\telse if (x == 2 && y == 3 && h != ' ')\n\t return false;\n\telse if (x == 3 && y == 3 && i != ' ')\n\t return false;\n\telse\n\t return true;\n }",
"public static void main (String[] args) throws java.lang.Exception\n\t{\n\t\tScanner sa=new Scanner(System.in);\n\t\tSystem.out.println(\"Enter the vertices 1:\");\n\t\tint x1=sa.nextInt();\n\t\tint y1=sa.nextInt();\n\t\tSystem.out.println(\"Enter the vertices 2:\");\n\t\tint x2=sa.nextInt();\n\t\tint y2=sa.nextInt();\n\t\tSystem.out.println(\"Enter the vertices 1 for second rectangle:\");\n\t\tint a1=sa.nextInt();\n\t\tint b1=sa.nextInt();\n\t\tSystem.out.println(\"Enter the vertices 2 for second rectangle:\");\n\t\tint a2=sa.nextInt();\n\t\tint b2=sa.nextInt();\n\t\tif((x1>=a1)&&(y1>=b1)||(a2<=x2)&&(b2<=y2))\n\t\t\tSystem.out.println(\"true\");\n\t\telse if((x1<=a1)&&(y1<=b1)||(a2>=x2)&&(b2>=y2))\n\t\t\tSystem.out.println(\"true\");\n\t\telse \n\t\t\tSystem.out.println(\"false\");\n\t}",
"public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n int side1 = scanner.nextInt();\n int side2 = scanner.nextInt();\n int side3 = scanner.nextInt();\n boolean isTriangle = (side1 + side2 > side3) && (side1 + side3 > side2) && (side2 + side3 > side1);\n if (isTriangle) {\n System.out.println(\"YES\");\n } else {\n System.out.println(\"NO\");\n }\n }",
"public static void main(String[] args) {\r\n\t\t// TODO Auto-generated method stub\r\n\t\tint n=17;\r\n\t\tint x = (int) Math.sqrt(n);\r\n\t\t//System.out.println(x);\r\n if (x * x == n) {\r\n System.out.println(x);\r\n \r\n }\r\n x=x+1;\r\n int y = x;\r\n \r\n while (x * y - n > 2) {\r\n y=y-1;\r\n while (x*y<n) x++;\t//Ameya's solution.\r\n //x = (n + y - 1) / y;\r\n //ex:n=42,x=7,y=7, y-1 because if n#y=0, ex:42(7*6) , then we don't want to increment x\r\n }\r\n System.out.println(x+\",\"+y);\r\n \r\n \r\n\r\n\t}",
"public static void main(String[] args) {\n \n Scanner readObject = new Scanner(System.in);\n double X1, X2, Y1, Y2;\n \n System.out.print(\"Enter Point X1\"); //prompt the user to enter Coordinate X1\n X1 = readObject.nextDouble(); // \n System.out.print(\"Enter Point X2 \"); //prompt the user to enter Coordinate X2\n X2 = readObject.nextDouble();\n System.out.print(\"Enter Point Y1 \");\n Y1 = readObject.nextDouble(); // prompt the user to enter Coordinate Y1\n System.out.print(\"Enter Point Y2 \");\n Y2 = readObject.nextDouble(); // prompt the user to enter Coordinate Y2\n double DistanceBetweenPointX = X2 -X1 ; // Determine the distance between point X\n double DistanceBetweenPointY = Y2-Y1; // Determine the distance between point Y\n double Slope = (DistanceBetweenPointY / DistanceBetweenPointX);\n System.out.println(\" Point A on a coordinate plane is (\" + X1 + \",\" + Y1 + \"). Point B on a coordinate plane is (\" + X2 + \",\" + Y2 + \").\");\n System.out.println( \"The distance between point A and B is (\" + DistanceBetweenPointX + \", \" + DistanceBetweenPointY+ \").\");\n System.out.println(\"The slope of the line is (\" + Slope + \").\");\n \n \n }",
"@Test\n public void whenQuadraticFunctionThenQuadraticResults() {\n FunctionMethod functionMethod = new FunctionMethod();\n List<Double> result = functionMethod.diapason(1, 3, x -> x * x - x - 2);\n List<Double> expected = Arrays.asList(-2D, 0D);\n assertThat(result, is(expected));\n }",
"public static void main(String[] args) {\n\t\t\n\t\tScanner input=new Scanner(System.in);\n\t\tdouble a;\n\t\tSystem.out.print(\"b=:\");\n\t\ta=input.nextDouble();\n\t\tdouble b;\n\t\tSystem.out.print(\"b=:\");\n\t\tb=input.nextDouble();\n\t\tdouble c;\n\t\tSystem.out.print(\"c=:\");\n\t\tc=input.nextDouble();\n\t double deta=b*b-4*a*c;\n\t\tif(deta>0) {\n\t\t\tdouble x1=(-b+Math.sqrt(deta))/(2*a);\n\t\t\tdouble x2=(-b-Math.sqrt(deta))/(2*a);\n\t\t\tSystem.out.println(\"x1=\"+x1+\" \"+\"x2=\"+x2);\n\t\t}\n\t\telse if(deta==0)\n\t\t\tSystem.out.println(\"x=\"+(-b/(2*a)));\n\t\telse\n\t\t\tSystem.out.println(\"ÎÞʵÊý¸ù\");\n\t\t\n\t\t\n\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\tQuadrilateral qu = new Quadrilateral(\"122:10:22.15761,30:33:53.48025-122:10:18.39148,30:33:33.11945-122:17:18.08089,30:32:55.71872-122:17:14.29433,30:32:35.36090\");\n//\t\tPoint po = new Point(\"31:16:32,121:45:39\");\n\t\tPoint po = new Point(\"122:10:22.15761,30:33:53.48025\");\n\t\tSystem.out.println(po.lon);\n\t\tLatLng point = new LatLng(30.56486,122.17282);\n\t\tSystem.out.println(qu.isContainsPoint(point));\n\t}",
"public boolean calcQuadrantBounds(int quadrant, BoundsUserSpace b) {\n return calcQuadrantBounds(quadrant, this, b);\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 hasValidPoint() {\n return mPoint.x != 0 || mPoint.y != 0;\n }",
"public static boolean isASolution(int x, int y)\r\n {\r\n if (x == STOP_ROW && y == STOP_COL)\r\n return true;\r\n return false;\r\n }",
"public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\r\n\t\tint x = sc.nextInt();\r\n\t\tint y = sc.nextInt();\r\n\t\twhile (x != 0 && y > 0) {\r\n\t\t\tif (x > 0 && y > 0) {\r\n\t\t\t\tSystem.out.println(\"Primeiro\");\r\n\t\t\t} \r\n\t\t\telse if (x < 0 && y > 0) {\r\n\t\t\t\tSystem.out.println(\"Segundo\");\r\n\t\t\t}\r\n\t\t\telse if (x < 0 && y < 0) {\r\n\t\t\t\tSystem.out.println(\"Terceiro\");\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tSystem.out.println(\"Quarto\");\r\n\t\t\t}\r\n\t\t\tx = sc.nextInt();\r\n\t\t\ty = sc.nextInt();\r\n\t\t}\r\n\t\t\r\n\t\tsc.close();\r\n\r\n\t}",
"public Point()\n {\n x = -100 + (int) (Math.random() * ((100 - (-100)) + 1)); \n y = -100 + (int) (Math.random() * ((100 - (-100)) + 1));\n //x = (int) (Math.random()); \n //y =(int) (Math.random());\n pointArr[0] = 1;\n pointArr[1] = x;\n pointArr[2] = y;\n //If the point is on the line, is it accepted? I counted it as accepted for now\n if(y >= 3*x){\n desiredOut = 1;\n }\n else\n {\n desiredOut = 0;\n }\n }",
"@Override\n public boolean isLocationEmpty(int x, int y)\n {\n return isLocationEmpty(null, x, y);\n }",
"boolean checked(int x, int y);",
"public int testBoundsQuadrants(BoundsUserSpace boundsCheck) {\n return testBoundsQuadrants(this, boundsCheck);\n }",
"@Test\n public void testcalPerimeterRectangle3() {\n double ex = -8;\n \n startPoint.setX(1);\n startPoint.setY(1);\n endPoint.setX(3);\n endPoint.setY(3);\n \n double ac = rec.calPerimeterRectangle(startPoint, endPoint);\n assertNotEquals(ex, ac, 0);\n }",
"public static void main(String[] args) {\n\t\tScanner input = new Scanner(System.in);\r\n System.out.println(\"Enter a, b, c: \");\r\n int a = input.nextInt(), b = input.nextInt(), c = input.nextInt();\r\n\r\n // 创建对象+调用构造方法\r\n QuadraticEquation qe = new QuadraticEquation(a, b, c);\r\n\r\n // 获取判别式结果\r\n double judge = qe.getDiscriminant();\r\n\r\n if (judge > 1){\r\n System.out.printf(\"%.3f %.3f\\n\", qe.getRoot1(), qe.getRoot2());\r\n } else if (judge < 0.0001 && judge > -0.0001){\r\n System.out.printf(\"%.3f\\n\", qe.getRoot1());\r\n } else {\r\n System.out.printf(\"The equation has no roots\");\r\n }\r\n }",
"@Test\n public void testcalPerimeterRectangle4() {\n double ex = 8;\n \n startPoint.setX(-1);\n startPoint.setY(-1);\n endPoint.setX(3);\n endPoint.setY(3);\n \n double ac = rec.calPerimeterRectangle(startPoint, endPoint);\n assertNotEquals(ex, ac, 0);\n }",
"public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n double a = scanner.nextDouble();\n double b = scanner.nextDouble();\n double c = scanner.nextDouble();\n\n double determinant = b * b - 4 * a * c;\n\n double root1;\n double root2;\n\n\n\n // two real and distinct roots\n root1 = (-b + Math.sqrt(determinant)) / (2 * a);\n root2 = (-b - Math.sqrt(determinant)) / (2 * a);\n\n if (root2 < root1) {\n System.out.println(root2 + \" \" + root1);\n } else {\n System.out.println(root1 + \" \" + root2);\n }\n\n\n\n }",
"public static void main (String [] args) {\n //default main class\n\n // set variables - input\n int x = 3;\n int y = 4;\n\n// if x is equal to or greater than 4 do this\nif (x >= 4) {\nint newx = x-1; \n if (newx >= 4) { // inner if statement after doing first calculation\n System.out.println(\"x is at least 4\");\n System.out.println(\"x = \" + newx + \" y = \" + y);\n } else {\n System.out.println(\"x is less than 4\");\n System.out.println(\"x = \" + newx + \" y = \" + y);\n }\n}\n\n\n// if x is less than 4 do this\nif (x < 4) {\nint newx = x+1;\n if (newx >= 4) { // inner if statement after doing first calculation\n System.out.println(\"x is at least 4\");\n System.out.println(\"x = \" + newx + \" y = \" + y);\n } else {\n System.out.println(\"x is less than 4\");\n System.out.println(\"x = \" + newx + \" y = \" + y);\n }\n\n } \n\n}",
"public static void main(String[] args) {\n\t\tdouble x1,x2,y1,y2;\n\t\tint sqaureRoot;\n\t\tx1=5;\n\t\tx2=6;\n\t\ty1=8;\n\t\ty2=3;\n\t\tsqaureRoot=(int)((x1+x2)*(x1+x2))+(int)((y1+y2)*(y1+y2));\n\t\tSystem.out.println(sqaureRoot);\n\t}",
"@Test\n\tvoid testCheckCoordinates4() {\n\t\tassertFalse(DataChecker.checkCoordinate(-100));\n\t}",
"public static void main(String[] args) {\n int input = 0;\n int armLength;\n int solution = 0;\n\n // get the puzzle input\n System.out.print(\"Please provide the puzzle input: \");\n input = new Scanner(System.in).nextInt();\n\n /// PART 1\n // figure out which spiral input is on to calculate distance on one axis\n armLength = SpiralUtils.lengthOfSprialArm(input);\n solution = (armLength - 1) / 2;\n\n // find the midpoints of the spiral the input is on\n List<Integer> midpoints = SpiralUtils.midpointsOfSprialArm(armLength);\n\n // calculate the smallest distance from any midpoint to our input for other access\n solution += SpiralUtils.smallestDistanceFromMidpoints(input, midpoints);\n\n System.out.println(\"The solution to part 1 is: \" + solution);\n\n /// PART 2\n // this part is less elegant, as I'm just going to create the spiral instead of run calculations\n System.out.println(\"The solution to part 2 is: \" + SpiralUtils.spiralUntilAtLeast(input));\n }",
"public Point evaluate(double x, double y, double z) {\n\t\t// x=(-(yn(y-y0)+zn(z-z0))+xn*x0)/xn\n\t\tif (x != x) {\n\t\t\tx = (-(normal.y * (y - origin.y) + normal.z * (z - origin.z)) + normal.x\n\t\t\t\t\t* origin.x)\n\t\t\t\t\t/ normal.x;\n\t\t\treturn new Point(x, y, z);\n\t\t} else if (y != y) {\n\t\t\ty = (-(normal.x * (x - origin.x) + normal.z * (z - origin.z)) + normal.y\n\t\t\t\t\t* origin.y)\n\t\t\t\t\t/ normal.y;\n\t\t\treturn new Point(x, y, z);\n\t\t} else if (z != z) {\n\t\t\tz = (-(normal.y * (y - origin.y) + normal.x * (x - origin.x)) + normal.z\n\t\t\t\t\t* origin.z)\n\t\t\t\t\t/ normal.z;\n\t\t\treturn new Point(x, y, z);\n\t\t}\n\t\treturn null;\n\t}",
"private void printSquareAroundPoint(int x, int y)\n {\n // System.out.println();\n }",
"public static void main(String[] args) {\n\t\tScanner p1 = new Scanner(System.in);\n\t\tSystem.out.println(\"a의 값을 입력하시오.\");\n\t\tdouble a = p1.nextDouble();\n\t\tSystem.out.println(\"b의 값을 입력하시오.\");\n\t\tdouble b = p1.nextDouble();\n\t\tSystem.out.println(\"c의 값을 입력하시오.\");\n\t\tdouble c = p1.nextDouble();\n\t\t\n\t\tdouble determinant;\n\t\tdouble x1, x2;\n\t\t\n\t\tSystem.out.println(\"a=\" + a + \" b=\" + b + \" c=\" + c);\n\t\tdeterminant = b*b - 4.0*a*c;\n\t\tx1 = (-b + Math.sqrt(determinant))/(2.0*a);\n\t\tx2 = (-b - Math.sqrt(determinant))/(2.0*a);\n\t\t\n\t\tif (a == 0) \n\t\t{\n\t\t\tSystem.out.println(\"오류: 이차항의 계수가 0이므로, 이차방정식을 풀 수 없습니다.\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif (determinant < 0)\n\t\t\t{ \n\t\t\t\tSystem.out.println(\"오류: 실근이 존재하지 않으므로, 이차방정식을 풀 수 없습니다.\");\n\t\t\t\t\n\t\t\t}else \n\t\t\t{ \n\t\t\t\tSystem.out.println(\"The solution is either \" + x1 + \" or \" + x2);\n\t\t\t}\n\t\t}\n\t}",
"@Test\n public void testcalAreaRectangle3() {\n double ex = -4;\n \n startPoint.setX(1);\n startPoint.setY(1);\n endPoint.setX(3);\n endPoint.setY(3);\n \n double ac = rec.calAreaRectangle(startPoint, endPoint);\n assertNotEquals(ex, ac, 0);\n }",
"public boolean valid(int x, int y) {\n return board[x][y] == 0;\n }",
"public static void main(String[] args) {\n\t\tint x;\n\t\tint x1;\n\t\tint x2;\n\t\tint disc;\n\t\tSystem.out.println(\"Resolvons Ax2 + Bx + C = 0\");\n\t\tScanner sc = new Scanner(System.in);\n\t\tSystem.out.print(\"Donnez A : \");\n\t\tint A = sc.nextInt();\n\t\tSystem.out.print(\"Donnez B : \");\n\t\tint B = sc.nextInt();\n\t\tSystem.out.print(\"Donnez C : \");\n\t\tint C = sc.nextInt();\n\t\tdisc = (B*B)-4*A*C;\n\t\tif(A==0 && B==0 && C==0) {\n\t\t\tSystem.out.println(\"tout reel est solution\");\n\t\t}\n\t\telse if(A==0 && B==0) {\n\t\t\tSystem.out.println(\"Pas de solution\");\n\t\t}\n\t\telse if(A==0) {\n\t\t\tx=-C/B;\n\t\t\tSystem.out.println(\"la solution est :\"+x);\n\t\t}\n\t\telse if (disc<0) {\n\t\t\tSystem.out.println(\"Pas de solution le discriminant est negatif\");\n\t\t}\n\t\telse {\n\t\t\tx1=(-B + (int)Math.sqrt(disc))/(2*A);\n\t\t\tx2=(-B - (int)Math.sqrt(disc))/(2*A);\n\t\t\t\n\t\t\tSystem.out.println(\"Les solutions sont : x1 = \"+x1+ \" et x2 = \"+x2);\n\n\t\t\t\n\t\t}\n\t}",
"public boolean areValidCoordinates(int x, int y) {\n return (x >= 0 && x < WIDTH && y >= 0 && y < HEIGHT);\n }",
"public static void solveQuadraticEquation() {\n }",
"public static void main(String[] args) {\n Scanner scan = new Scanner(System.in);\n scan.useLocale(Locale.ENGLISH);\n System.out.print(\"Enter A: \");\n double A = scan.nextDouble();\n System.out.print(\"Enter B: \");\n double B = scan.nextDouble();\n System.out.print(\"Enter x: \");\n double x = scan.nextDouble();\n System.out.print(\"Enter y: \");\n double y = scan.nextDouble();\n System.out.print(\"Enter z: \");\n double z = scan.nextDouble();\n\n double minSize = Math.min(A,B);\n double maxSize = Math.max(A,B);\n double minBrick = Math.min(Math.min(x,y),z);\n double midBrick = Math.min(Math.max(x,y),z);\n\n if (A*B>=minBrick*midBrick) {\n if (minSize>=minBrick || maxSize>=midBrick) {\n System.out.println(\"True\");\n }\n } else {\n System.out.println(\"False\");\n }\n }",
"public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint x1 = sc.nextInt();\n\t\tint y1 = sc.nextInt();\n\t\tint x2 = sc.nextInt();\n\t\tint y2 = sc.nextInt();\n\t\tint x3 = sc.nextInt();\n\t\tint y3 = sc.nextInt();\n\t\tint resultX = 0;\n\t\tint resultY = 0;\n\t\tif (x1 == x2) {\n\t\t\tresultX = x3;\n\t\t} else if (x1 == x3) {\n\t\t\tresultX = x2;\n\t\t} else {\n\t\t\tresultX = x1;\n\t\t}\n\t\tif (y1 == y2) {\n\n\t\t\tresultY = y3;\n\t\t} else if (y1 == y3) {\n\n\t\t\tresultY = y2;\n\t\t} else {\n\t\t\tresultY = y1;\n\t\t}\n\t\tSystem.out.println(resultX+\" \"+resultY);\n\t}",
"public static void main(String[] args) {\n\r\n\t\tboolean a = (y > 1) && (5 != 4) || (x > -4);\r\n\t\tint b = +x++ + ++x - -x-- - --x;\r\n\t\tdouble c = -2;\r\n\t\tc = c * z;\r\n\t\tint d = x | 5;\r\n\t\tboolean e = ((x == y) || (x < z * y));\r\n\t\tint f = y << y;\r\n\t\tboolean g = !((x >> 666 < y) & (z++ == x));\r\n\r\n\t\tSystem.out.println(a);\r\n\t\tSystem.out.println(b);\r\n\t\tSystem.out.println(c);\r\n\t\tSystem.out.println(d);\r\n\t\tSystem.out.println(e);\r\n\t\tSystem.out.println(f);\r\n\t\tSystem.out.println(g);\r\n\t}",
"public static void quadrDescriber () { //I can probably make this easier by making the method accept variables\r\n\t\tboolean done = false;\r\n\t\tScanner scanner = new Scanner(System.in);\r\n\t\twhile (done == false) {\r\n\t\t\tSystem.out.println(\"Welcome to the Quadratic Describer\");\r\n\t\t\tSystem.out.println(\"Provide values for the scanners a, b, and c\");\r\n\t\t\t//scanners get the integers, and apparently can be separated by spaces like \"1 0 0\" for 1 0 and 0\r\n\t\t\tdouble a = scanner.nextInt();\r\n\t\t\tSystem.out.println(\"a: \"+a);\r\n\t\t\tdouble b = scanner.nextInt();\r\n\t\t\tSystem.out.println(\"b: \"+b);\r\n\t\t\tdouble c = scanner.nextInt();\r\n\t\t\tSystem.out.println(\"c: \"+c);\r\n\t\t\tSystem.out.println(\"Description of the graph of: \");\r\n\t\t\tSystem.out.println(a+\" x^2 + \"+ b +\" x + \"+c); //prints out the standard form quadratic using the inputs for a b and c\r\n\t\t\tif (a<0) System.out.println(\"Opens : Down\"); //checks if a value is negative\r\n\t\t\telse System.out.println(\"Opens : Up\");\r\n\t\t\tSystem.out.println(\"Axis of Symmetry : \"+axisOfSymmetry(a,b,c));\r\n\t\t\tSystem.out.println(\"Vertex : \" + vertex(a,b,c));\r\n\t\t\tSystem.out.println(\"x-intercept(s) : \"+xIntercepts(a,b,c));\r\n\t\t\tSystem.out.println(\"y-intercept : \"+yIntercept(a,b,c));\r\n\t\t\tSystem.out.println(\"\");\r\n\t\t\tSystem.out.println(\"Do you want to keep going? (type \\\"quit\\\" to end)\");\r\n\t\t\tSystem.out.print(scanner.next());\r\n\t\t\tif (scanner.next() == \"quit\") done = true;\r\n\t\t\t//I was able to close the loop but I don't know how to get rid of the \"quit\" printed out at the end.\r\n\t\t}\r\n\t\tscanner.close();\r\n}",
"@Override\r\n\tpublic boolean sadrziTocku(int X, int Y) {\r\n\r\n\t\treturn (Math.pow(X - x, 2) / Math.pow(horizontalniRadijus, 2)\r\n\t\t\t\t+ Math.pow(Y - y, 2) / Math.pow(vertikalniRadijus, 2) <= 1.0);\r\n\r\n\t}",
"public static void main (String [] args)\r\n\r\n{\n\t\tTriangleorNot ck= new TriangleorNot();\r\n\t\t\r\n\t\tck.CheckTriangle(0, 0, 0);\r\n}",
"public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tQueue<Point> que = new LinkedList<>();\n\t\tn = sc.nextInt();\n\t\tm = sc.nextInt();\n\t\tint result=0;\n\t\tboolean b = true;\n\t\tint [][] arr = new int[m][n];\n\t\tfor(int i=0;i<m;i++) {\n\t\t\tfor(int j=0;j<n;j++) {\n\t\t\t\tarr[i][j] = sc.nextInt();\n\t\t\t\tif(arr[i][j]==1) {\n\t\t\t\t\tque.add(new Point(i,j,0));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\twhile(!que.isEmpty()) {\n\t\t\tPoint temp = que.poll();\n\t\t\tfor(int i=0;i<4;i++) {\n\t\t\t\tint r = temp.x+dirs[i][0];\n\t\t\t\tint c = temp.y+dirs[i][1];\n\t\t\t\tif(isin(r,c) && arr[r][c]==0) {\n\t\t\t\t\tarr[r][c] = 1;\n\t\t\t\t\tque.add(new Point(r,c,temp.cnt+1));\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(que.isEmpty()) {\n\t\t\t\tresult = temp.cnt;\n\t\t\t}\n\t\t}\n\t\tfor(int i=0;i<m;i++) {\n\t\t\tfor(int j=0;j<n;j++) {\n\t\t\t\tif(arr[i][j]==0) {\n\t\t\t\t\tb = false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif(b) {\n\t\t\tSystem.out.println(result);\n\t\t}\n\t\telse {\n\t\t\tSystem.out.println(-1);\n\t\t}\n\t}",
"public boolean validMove(int x, int y){\n if(!super.validMove(x, y)){\n return false;\n }\n if(((Math.abs(x - this.x()) == 2) && (Math.abs(y - this.y()) == 1))\n || ((Math.abs(x - this.x()) == 1) && (Math.abs(y - this.y()) == 2))){\n return true;\n }else{\n return false;\n }\n }",
"private static void dfs(int x, int y) {\n arr[x][y] = 1;\n area++;\n \n for(int i=0; i<4; i++) {\n int nx = x + dx[i];\n int ny = y + dy[i];\n \n if(0 <= nx && nx < m && 0 <= ny && ny < n) {\n if(arr[nx][ny] == 0)\n dfs(nx, ny);\n }\n }\n\t\t\n\t}",
"static boolean clockwise(PointDouble p, PointDouble q, PointDouble r) {\n return !notClockwise(p, q, r);\n }",
"public boolean isEmpty(int forX , int forY , int dir)\n {\n boolean ans = true;\n if(dir==-1)\n {\n forX *= (-1);\n forY *= (-1);\n }\n\n for(int i=0;i<tanks.size();i++)\n {\n if(tanks.get(i)!=this)\n {\n int thisX = this.getLocX() + forX;\n int thisY = this.getLocY() + forY;\n int otherX = tanks.get(i).getLocX();\n int otherY = tanks.get(i).getLocY();\n if( ( (thisX-otherX)*(thisX-otherX) + (thisY-otherY)*(thisY-otherY) ) <= (56)*(56) )\n {\n ans = false;\n break;\n }\n }\n }\n return ans;\n }",
"private static int CoordinateFilled(int y, int x) {\r\n\t\tint retVal = y*9+x;\r\n\t\treturn retVal;\r\n\t}",
"public static void main(String[] args) {\n double numA;\n double numB;\n double numC;\n double delta;\n\n Scanner sc = new Scanner(System.in);\n System.out.print(\"Enter number a: \");\n numA = sc.nextDouble();\n System.out.print(\"Enter number b: \");\n numB = sc.nextDouble();\n System.out.print(\"Enter number c: \");\n numC = sc.nextDouble();\n delta = Math.pow(numB,2) - (4*numA*numC);\n\n if (numA == 0){\n if (numB == 0){\n if (numC == 0){\n System.out.println(\"Equation countless solutions\");\n }else {\n System.out.println(\"Equation has no solution\");;\n }\n }else {\n System.out.println(\"Equation has 1 solution x = \" + (-numB/numA));\n }\n }else {\n if (delta < 0){\n System.out.println(\"Equation has no solution\");\n }else if (delta == 0){\n System.out.println(\"Equation has 1 solution x = \" + (-numB/(2*numA)));\n }else {\n System.out.println(\"Equation has 2 solutions x1 = \" + (-numB+Math.sqrt(delta))/(2*numA));\n System.out.println(\"Equation has 2 solutions x2 = \" + (-numB-Math.sqrt(delta))/(2*numA));\n }\n }\n }",
"public boolean checkDrawCondition(int x,int y)\n {\n boolean draw=true;\n JButton [][]board=view.getGameBoard();\n for(int i=0;i<dim && draw;i++)\n {\n for(int j=0;j<dim && draw;j++)\n {\n if(board[i][j].getText().toString().equals(\"\"))\n {\n draw=false;\n }\n }\n }\n halt=true;\n return draw;\n\n }",
"public boolean isValid() {\n boolean isvalid = true;\n\n if (java.lang.Double.isInfinite(x) || java.lang.Double.isNaN(x) || java.lang.Double.isInfinite(y) || java.lang.Double.isNaN(y) || java.lang.Double.isInfinite(width) || java.lang.Double.isNaN(width) || java.lang.Double.isInfinite(height)\n || java.lang.Double.isNaN(height)) {\n isvalid = false;\n }\n\n return isvalid;\n }",
"public static void main(String[] args)\n {\n Scanner scan = new Scanner(System.in);\n \n System.out.println(\"Enter a side length for your cube:\");\n double s = scan.nextDouble();\n \n if (s > 0)\n {\n double volume = Math.pow(s, 3);\n System.out.println(\"Volume:\" + volume);\n }\n \n else\n System.out.println(\"Invalid entry\");\n \n \n /** Objective #2: Write an application to determine the number of solutuions to a quadratic equation, \n * The program accepts a, b and c from a user, and tells the user how many solutions, if any, exist\n * \n * Precodition: The user enters numbers, and not a special characters or letters\n * Postcondition: If there are two solutions, the program outputs \"two solutions.\" If there is \n * one solution, the program outputs \"one solution\" and if there are\n * no solutions, the program outputs \"no solution\"\n */\n \n System.out.println(\"Enter a:\");\n double a = scan.nextDouble();\n \n System.out.println(\"Enter b:\");\n double b = scan.nextDouble();\n \n System.out.println(\"Enter c:\");\n double c = scan.nextDouble();\n \n double discriminant = b*b - 4*a*c;\n if (discriminant <= 0)\n System.out.println(\"No real solutions.\");\n else if (discriminant == 0)\n System.out.println(\"One solution.\");\n else\n System.out.println(\"Two solutions.\");\n \n \n \n \n }",
"public boolean checkDiagonal() {\r\n\t\tif (p1[0] + p1[4] + p1[8] == 15)\r\n\t\t\treturn true;\r\n\t\telse if (p1[2] + p1[4] + p1[6] == 15)\r\n\t\t\treturn true;\r\n\t\telse if (p2[0] + p2[4] + p2[8] == 15)\r\n\t\t\treturn true;\r\n\t\telse if (p2[2] + p2[4] + p2[6] == 15)\r\n\t\t\treturn true;\r\n\t\treturn false;\r\n\t}",
"public void quadTest()\n\t{\n\t\tint index = 0, lim = 3;\n\t\tboolean quads = false;\n\t\t\n\t\twhile (index<=lim && (!quads))\n\t\t{\n\t\t\tif ((intRep[index] == intRep[index+1]) &&\n\t\t\t\t(intRep[index] == intRep[index+2]) &&\n\t\t\t\t(intRep[index] == intRep[index+3]) )\n\t\t\t{\n\t\t\t\tquads = true;\n\t\t\t\thandScore = 70000;\n\t\t\t\thandScore += 100 * intRep[index];\n\t\t\t}\n\t\t\telse index++;\n\t\t}\n\t}",
"private boolean tryBorder(int x, int y){\n\n\t\treturn y == this.dimension - 1 || x == this.dimension - 1;\n\t}",
"static boolean isSafe(int x, int y, int sol[][]) {\n return (x >= 0 && x < N && y >= 0 &&\n y < N && sol[x][y] == -1);\n }",
"public static void main(String[] args) {\n\t\tSystem.out.println((0+15)/2);\r\n\t\tSystem.out.println(2.0e-6*10000000000.1);\r\n\t\tSystem.out.println(true&&false||true&&true);\r\n\t\t\r\n\t\t//1.1.2\r\n\t\tSystem.out.println((1+2.236)/2);\r\n\t\tSystem.out.println(1+2+3+4.0);\r\n\t\tSystem.out.println(4.1>=4);\r\n\t\tSystem.out.println(1+2+\"3\");\r\n\t\t\r\n\t\t//1.1.3\r\n//\t\tSystem.out.println(\"Please enter three nums\");\r\n\t\tScanner scanner=new Scanner(System.in);\r\n//\t\tint num=scanner.nextInt();\r\n//\t\tint num2=scanner.nextInt();\r\n//\t\tint num3=scanner.nextInt();\r\n//\t\r\n//\t\tif(num==num2&&num==num3) {\r\n//\t\t\tSystem.out.println(\"Eqaul:\");\r\n//\t\t}else {\r\n//\t\t\tSystem.out.println(\"Not equal:\");\r\n//\t\t}\r\n//\r\n//\t\t\t\r\n//\t\t//1.1.4\r\n//\t\t//a. then 语法错误\r\n//\t\t//b. ok\r\n//\t\t//c. ok\r\n//\t\t//d. ok\r\n//\r\n//\t\t\r\n//\t\t//1.1.5\r\n//\t\tint x=scanner.nextInt();\r\n//\t\tint y=scanner.nextInt();\r\n//\t\tif(x<1.0 && y<1.0 && x>0 && y>0) {\r\n//\t\t\tSystem.out.println(\"true\");\r\n//\t\t}\r\n//\t\telse {\r\n//\t\t\tSystem.out.println(\"false\");\r\n//\t\t}\r\n//\t\t\r\n\t\t\r\n\t\t//1.1.6\r\n//\t\tint f=0;\r\n//\t\tint g=1;\r\n//\t\tfor(int i=0;i<=15;i++) {\r\n//\t\t\tSystem.out.print(f+\"\\t\");\r\n//\t\t\tf=f+g;\r\n//\t\t\tg=f-g;\r\n//\t\t}\r\n\t\t\r\n\t\t//1.1.7\r\n//\t\tdouble t=9.0;\r\n//\t\twhile(Math.abs(t-9.0/t)> .001) {\r\n//\t\t\tt=(9.0/t+t)/2.0;\r\n//\t\t}\r\n//\t\tSystem.out.printf(\"%.5f\\n\", t);\r\n//\t\t\r\n//\t\t\r\n//\t\tint sum=0;\r\n//\t\tfor(int i=1;i<1000;i++)\r\n//\t\t\tfor(int j=0;j<i;j++)\r\n//\t\t\t\tsum++;\r\n//\t\tSystem.out.println(sum);\r\n//\t\r\n//\t\t\r\n//\t\tint sum2=0;\r\n//\t\tfor(int i=1;i<1000;i*=2)\r\n//\t\t\tfor(int j=0;j<1000;j++)\r\n//\t\t\t\tsum2++;\r\n//\t\tSystem.out.println(sum2);\r\n\t\r\n\t\t//1.1.8\r\n//\t\tSystem.out.println('b');\r\n//\t\tSystem.out.println('b'+'c');\r\n//\t\tSystem.out.println((char)('a'+4));\r\n\t\t\r\n\t\t//1.1.9\r\n//\t\tSystem.out.println(\"Please enter one num and return with a binary code\");\r\n//\t\tint N=scanner.nextInt();\r\n//\t\tString string=\"\";\r\n//\t\tfor(int n=N;n>0;n/=2) {\r\n//\t\t\tstring=(n%2)+string;\r\n//\t\t}\r\n//\t\tSystem.out.println(string);\r\n\t\t\r\n\t\t//1.1.10\r\n\t\t//int[] a=new int[10];\r\n\t\t\r\n\t\t//1.1.11\r\n//\t\tboolean[][] arrays= {{true,true,true},\r\n//\t\t\t\t{false,false,false},\r\n//\t\t\t\t{true,false,true},\r\n//\t\t};\r\n//\t\t\r\n//\t\tfor(int i=0;i<arrays.length;i++)\r\n//\t\t\tfor(int j=0;j<arrays.length;j++) {\r\n//\t\t\t\tif(arrays[i][j]) {\r\n//\t\t\t\t\tSystem.out.print(\"*\"+\"\\t\");\r\n//\t\t\t\t}\r\n//\t\t\t\telse {\r\n//\t\t\t\t\tSystem.out.print(\"^\"+\"\\t\");\r\n//\t\t\t\t}\r\n//\t\t\t}\r\n\t\t//1.1.12\r\n//\t\tint[] a=new int[10];\r\n//\t\tfor(int i=0;i<10;i++)\r\n//\t\t\ta[i]=9-i;\r\n//\t\tfor(int i=0;i<10;i++)\r\n//\t\t\ta[i]=a[a[i]];\r\n//\t\tfor(int i=0;i<10;i++)\r\n//\t\t\tSystem.out.println(i);\r\n\r\n\t\r\n\t\t\r\n\t\t\r\n\t}",
"public static void main(String[] args) {\n\t\t\n\t\tSystem.out.println(\"Digite o primeiro numero: \");\n\t\tScanner s = new Scanner(System.in);\n\t\tint num1 = s.nextInt();\n\t\tSystem.out.println(\"Digite o segundo numero: \");\n\t\tint num2 = s.nextInt();\n\t\tSystem.out.println(\"Digite o segundo numero: \");\n\t\tint num3 = s.nextInt();\n\t\t\n\t\tnum1 = num1 * num1;\n\t\tnum2 = num2 * num2;\n\t\tnum3 = num3 * num3;\n\t\t\n\t\tdouble soma = num1 + num2 + num3;\n\t\ts.close();\n\t\tSystem.out.println(\"A soma de calculo de cada quadrado é: \" + soma);\n\t\t\n\t}",
"public static void main(String[] args) {\n\n Quadrilateral myShape = new Rectangle(7,6);\n\n System.out.println(\"myShape.getArea() = \" + myShape.getArea());\n System.out.println(\"myShape.getPerimeter() = \" + myShape.getPerimeter());\n\n\n\n\n// System.out.println(\"~~~~~~~~~~~~~~~~~~~~\");\n//\n// Rectangle box1 = new Rectangle(5, 4);\n// System.out.println(box1.getPerimeter());\n// System.out.println(box1.getArea());\n//\n// System.out.println(\"~~~~~~~~~~~~~~~~~~~~\");\n//\n// Rectangle box2 = new Square(5);\n// System.out.println(box2.getPerimeter());\n// System.out.println(box2.getArea());\n//\n// System.out.println(\"~~~~~~~~~~~~~~~~~~~~\");\n//\n// Rectangle box3 = new Rectangle(6, 9);\n// System.out.println(box3.getPerimeter());\n// System.out.println(box3.getArea());\n//\n// System.out.println(\"~~~~~~~~~~~~~~~~~~~~\");\n//\n// Rectangle box4 = new Square(8);\n// System.out.println(box4.getPerimeter());\n// System.out.println(box4.getArea());\n\n }",
"private boolean isValidCoordinate(int x, int y) {\n return x >= 0 && x < gameState.mapSize\n && y >= 0 && y < gameState.mapSize;\n }",
"@Test\r\n\t@Order(3)\r\n\tvoid testXnegative() {\r\n\t\trobot.setX(-100);\r\n\t\tassertNotEquals(-100, robot.getX() < 0 ,\"X coord test failed\\nREASON: Values less than 0 not allowed!\");\r\n\t}",
"private double eculidean(double x, double x1, double y, double y1) {\n\t\treturn Math.sqrt(Math.pow((x - x1), 2) + Math.pow((y - y1), 2));\n\t}",
"public static void main(String[] args) {\n\t\tSystem.out.println(\"ange triangelns sidor\");\r\n\r\n\t\tScanner in = new Scanner(System.in);\r\n\r\n\t\tdouble x = in.nextInt();\r\n\t\tdouble y = in.nextInt();\r\n\t\t//double z = in.nextInt();\r\n\t\tdouble alfa = in.nextInt();\r\n\t\t//double theta = in.nextInt();\r\n\t\t//double yeeta = in.nextInt();\r\n\t\t\r\n\r\n\t\tSystem.out.println();\r\n\r\n\t\tSystem.out.println();\r\n\r\n\t\tSystem.out.println();\r\n\r\n\t\tSystem.out.println();\r\n\r\n\t}",
"@Test\n public void testZeroPuncturePoint(){\n assertTrue(\n \"Test [x = 0.0]: zero value puncture point\",\n Double.isNaN(systemFunctions.calculate(0))\n );\n }",
"@Test\n public void testZeroPuncturePoint(){\n assertTrue(\n \"Test [x = 0.0]: zero value puncture point\",\n Double.isNaN(systemFunctions.calculate(0))\n );\n }",
"public boolean isEmpty() {\r\n return (Double.isNaN(x) && Double.isNaN(y));\r\n }",
"public Point enterZeroPoint(){\n\t\tSystem.out.println(\"Enter coordinat of figure start point\");\n\t\tPoint p = new Point();\n\t\tthis.in = new Scanner(System.in);\n\t\tString temp = in.nextLine();\n\t\tString[] data = temp.trim().split(\" \");\n\t\tp.setPoint(Integer.parseInt(data[0]), Integer.parseInt(data[1]));\n\t\treturn p;\n\t}",
"public boolean contains(int x, int y) {\n\t\tfloat[][] pos = getScreenPosition();\n\t\t\n\t\t// See http://mathworld.wolfram.com/TriangleInterior.html for mathematical explanation\n\t\tfloat v0_x = pos[0][0];\n\t\tfloat v0_y = pos[0][1];\n\t\tfloat v1_x = pos[1][0] - v0_x;\n\t\tfloat v1_y = pos[1][1] - v0_y;\n\t\tfloat v2_x = pos[2][0] - v0_x;\n\t\tfloat v2_y = pos[2][1] - v0_y;\n\t\t\n\t\tfloat denominator = determinant(v1_x, v1_y, v2_x, v2_y);\n\t\t\n\t\tfloat a = (determinant(x, y, v2_x, v2_y) - determinant(v0_x, v0_y, v2_x, v2_y)) / denominator;\n\t\tfloat b = - (determinant(x, y, v1_x, v1_y) - determinant(v0_x, v0_y, v1_x, v1_y)) / denominator;\n\t\t\n\t\tif (a > 0 && b > 0 && a + b < 1)\n\t\t\treturn true;\n\t\telse\n\t\t\treturn false;\n\t}",
"@Test\n public void testcalAreaRectangle4() {\n double ex = 4;\n \n startPoint.setX(-1);\n startPoint.setY(1);\n endPoint.setX(3);\n endPoint.setY(3);\n \n double ac = rec.calAreaRectangle(startPoint, endPoint);\n assertNotEquals(ex, ac, 0);\n }"
] |
[
"0.66398513",
"0.6219524",
"0.61894506",
"0.6079798",
"0.59658664",
"0.5886561",
"0.57320803",
"0.566896",
"0.56424373",
"0.56344956",
"0.5618516",
"0.5550516",
"0.5534944",
"0.55231696",
"0.54646957",
"0.5448102",
"0.5438543",
"0.5395924",
"0.5334208",
"0.5322046",
"0.5261427",
"0.5256801",
"0.52567554",
"0.5250486",
"0.52449584",
"0.5244935",
"0.52421844",
"0.52322626",
"0.5224665",
"0.5195656",
"0.5195644",
"0.51949966",
"0.5191532",
"0.51796055",
"0.51775235",
"0.515478",
"0.51527876",
"0.51426136",
"0.5137289",
"0.513636",
"0.51154953",
"0.51050776",
"0.50859386",
"0.508339",
"0.508176",
"0.5078422",
"0.50749934",
"0.5064577",
"0.50519377",
"0.5042326",
"0.50361323",
"0.5029098",
"0.502541",
"0.5017892",
"0.5005108",
"0.49989006",
"0.49971277",
"0.4996332",
"0.49960655",
"0.49867094",
"0.4985153",
"0.4967496",
"0.49652117",
"0.49591944",
"0.49560976",
"0.4951365",
"0.49441752",
"0.4943327",
"0.4941993",
"0.49366766",
"0.49335665",
"0.49189687",
"0.49121034",
"0.49116442",
"0.48984796",
"0.48933566",
"0.4891379",
"0.48912588",
"0.48868793",
"0.48831952",
"0.48797217",
"0.48796517",
"0.48787883",
"0.48778418",
"0.48736888",
"0.48735952",
"0.48730347",
"0.4871858",
"0.48668337",
"0.48630884",
"0.48594403",
"0.48565233",
"0.48538834",
"0.48460728",
"0.48376542",
"0.48376542",
"0.48369807",
"0.48362452",
"0.4834785",
"0.48332196"
] |
0.724272
|
0
|
singleTax Use current year 1040 tax instructions ( 1040 form ( Input: taxable income (Line 43 of 1040 form) Returns: the proper tax for single filing status (Line 44 of 1040 form) To determine tax: Use Tax Table or Tax Computation as appropriate. Round tax to nearest penny. Return 0 if taxable income is negative
|
public static double singleTax(double income) {
//all values and calculations based off of 1040 form.
double tax; //initializing tax, will be returned in the end.
if (income < 0){ //determine whether income is negative.
tax = 0;
} else if (income > 0 && income <= 9275){
tax = income * 0.1; //decimal is the tax rate for associated income
} else if (income > 9275 && income <= 37650){
tax = income * 0.15;
} else if (income > 37650 && income <= 91150){
tax = income * 0.25;
} else if (income > 91150 && income <= 190150){
tax = income * 0.28 - 6963.25; //incorperates reimbursment at higher incomes
} else if (income > 190150 && income <= 413350){
tax = income * 0.33 - 16470.75;
} else if (income > 413350 && income <= 415050){
tax = income * 0.35 - 24737.75;
} else {
tax = income * 0.396 - 43830.05;
}
tax = Math.round(tax * 100.0)/100.0; //rounds tax to nearest cent.
return tax; //returns tax as value to main
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public double taxPaying() {\r\n double tax;\r\n if (profit == true) {\r\n tax = revenue / 10.00;\r\n }\r\n\r\n else\r\n tax = revenue / 2.00;\r\n return tax;\r\n }",
"public double calculateTax(double amount){\n return (amount*TAX_4_1000)/1000;\n }",
"double taxReturn() {\n\t\tdouble ddv = 0;\n\t\tif (d == 'A') {\n\t\t\tddv = 18;\n\t\t} else if (d == 'B') {\n\t\t\tddv = 5;\n\t\t}\n\t\t\n\t\tif (ddv = 0) {\n\t\t\treturn 0;\n\t\t}\n\t\t\n\t\tdouble percent = price / 100.0;\n\t\tdouble tax = ddv * percent;\n\t\treturn tax / 100.0 * 15.0;\n\t}",
"private final void taxCalculations(){\n\r\n hraDeduction = totalHRA - 0.1*basicIncome;\r\n ltaDeduction = totalLTA - 0.7*totalLTA;\r\n\r\n //exemptions\r\n fundsExemption = fundsIncome - 150000; //upto 1.5 lakhs are exempted under IT Regulation 80C\r\n\r\n grossIncome = basicIncome + totalHRA + totalLTA + totalSpecialAl + fundsIncome ;\r\n\r\n totalDeduction = hraDeduction + ltaDeduction;\r\n\r\n totalTaxableIncome = grossIncome - (totalDeduction + fundsExemption);\r\n\r\n taxLiability = 0.05 * (totalTaxableIncome - 250000) + 0.2*(totalTaxableIncome - 500000);\r\n\r\n taxToPay = (cessPercent*taxLiability)/100 + taxLiability;\r\n }",
"public float calculateTax(String state, Integer flatRate);",
"double getTax();",
"public double calcTax() {\n\t\treturn 0.2 * calcGrossWage() ;\n\t}",
"static double tax( double salary ){\n\n return salary*10/100;\n\n }",
"public abstract double calculateTax();",
"@Override\n\tpublic double getTax() {\n\t\treturn 0.04;\n\t}",
"public int getTax(){\n int tax=0;\n if(this.salary<this.LOWER_LIMIT){\n tax=this.taxableSalary/100*10;\n }else if(this.salary<this.UPPER_LIMIT){\n tax=this.taxableSalary/100*22;\n }else{\n tax=this.UPPER_LIMIT/100*22 + (this.taxableSalary-this.UPPER_LIMIT)/100*40;\n }\n return tax;\n }",
"double applyTax(double price);",
"abstract protected BigDecimal getBasicTaxRate();",
"public double getTax() {\r\n\r\n return getSubtotal() * 0.06;\r\n\r\n }",
"public int calculateTax() {\n int premium = calculateCost();\n return (int) Math.round(premium * vehicle.getType().getTax(surety.getSuretyType()));\n }",
"double getTaxAmount();",
"public double calculateTax() {\n taxSubtotal = (saleAmount * SALESTAXRATE);\n\n return taxSubtotal;\n }",
"@Override\t\n\tpublic double getTax() {\n\t\treturn 0;\n\t}",
"public Double getTax();",
"BigDecimal getTax();",
"public double useTax() {\n \n return super.useTax() + getValue()\n * PER_AXLE_TAX_RATE * getAxles();\n }",
"public Double calculateTax(Employee employee) {\n\n Double tax = 0.0;\n\n if ( employee != null ) {\n\n Double salary = employee.getSalary();\n if ( salary > 0 ) {\n\n if ( salary < 500000 ) {\n\n tax = salary * 0.05;\n } else if ( salary > 500000 && salary < 1000000 ) {\n\n tax = salary * 0.1;\n } else {\n\n tax = salary * 0.2;\n }\n }\n }\n\n return tax;\n }",
"public double taxCharged (){\n return discountedPrice() * taxRate;\n }",
"@Override\n public double calcTaxes() {\n return getCost() * 0.07;\n }",
"public int totalTax()\n {\n double tax = taxRate / 100;\n return (int)Math.round(totalCost() * tax);\n }",
"public double payTax(double[] taxPayers) {\n\n double taxToBePaid = 0.0;\n\n // Add every amount in a single variable\n for (int i = 0; i < taxPayers.length; i++) {\n taxToBePaid += taxPayers[i];\n }\n\n // check if the sum of every tax payer which bracket tax they fall into\n if (taxToBePaid < 15000) {\n return taxToBePaid * 0;\n } else if (taxToBePaid >= 15000 && taxToBePaid < 20000) {\n return taxToBePaid * 0.1;\n } else if (taxToBePaid >= 20000 && taxToBePaid < 30000) {\n return taxToBePaid * 0.2;\n } else {\n return taxToBePaid * 0.3;\n }\n\n }",
"public void setTax(Double tax);",
"public double getTaxRate() {\r\n\t\treturn .07;\r\n\t}",
"public double getTax() {\n return tax_;\n }",
"public double roundedTax(double tax) {\n\t\tdouble totalTax = ((double)Math.round(tax*10*2))/20;\n\t\treturn totalTax;\n\t}",
"public double getTax() {\n return tax_;\n }",
"@Override\n\tpublic double calculateTax(double sal, double inv) {\n\t\tdouble tax;\n\t\tdouble taxIncom = sal-inv;\n\t\tif(taxIncom<500000) {\n\t\t\ttax = taxIncom*0.10;\n\t\t}else if(taxIncom<2000000){\n\t\t\ttax = 500000*0.10;\n\t\t\ttax += (taxIncom-500000)*0.20;\n\t\t}else{\n\t\t\ttax = 500000*0.10;\n\t\t\ttax += 1500000*0.20;\n\t\t\ttax += (taxIncom-2000000)*0.30;\n\t\t}\n\t\t\n\t\treturn tax;\n\t}",
"public BigDecimal getTax() {\n return tax;\n }",
"public double taxCalc(int income1, int income2, int income3, int income4, int income5) {\n int[] arr = {income1, income2, income3, income4, income5};\n double taxTotal = 0.0;\n for (int i = 0; i < arr.length; i++) {\n taxTotal += (double) (arr[i] * 7 / 100);\n }\n return taxTotal;\n }",
"public double getTax(){\n\n return this.tax;\n }",
"@Override\n protected void chooseTax(){\n // Lets impose a tax rate that is inversely proportional to the number of subordinates I have:\n // That is, the more subordinates I have, the lower the tax rate.\n if(myTerritory.getSubordinates().isEmpty()){\n tax = 0;\n }\n else tax = 0.5;\n\n // Of course, if there are tax rates higher than .5, the system will set it to zero, so you should check on that\n }",
"@Test\n\tpublic void test75000() {\n\n\tdouble tax = Main.calcTax(75_000.);\n\tassertEquals(1000., tax, .01);\n\t}",
"public double calculateTax(double planFee, double overageCost) {\n double tax = (planFee + overageCost) * 0.15;\n return tax;\n }",
"@Override\r\n\tpublic double getTaxValue() {\n\t\treturn 0;\r\n\t}",
"public double taxRate () {\n return taxRate;\n }",
"public static double calculateTax(double price) {\r\n\tfinal double TAX = 0.05;\r\n\tdouble taxAmount = price*TAX;\r\n\treturn taxAmount;\r\n\t}",
"public static double calculateTaxes (double yearlyIncome, double bracket1Dollars, double bracket1Rate, double bracket2Dollars, double bracket2Rate, double bracket3Dollars, double bracket3Rate) {\n\t\t\n\t\tdouble taxBetweenBracket1AndBracket2 = 0;\n\t\tdouble taxBetweenBracket2AndBracket3 = 0;\n\t\tdouble taxBetweenBracket3AndRestOfIncome = 0;\n\n\t\tif (yearlyIncome >= bracket1Dollars) {\n\t\t\t// Tax for the first tax bracket\n\t\t\ttaxBetweenBracket1AndBracket2 = (bracket2Dollars - bracket1Dollars) * (bracket1Rate / 100);\n\n\t\t}\n\n\t\tif (yearlyIncome >= bracket2Dollars) {\n\t\t\t// Tax for the second tax bracket\n\t\t\ttaxBetweenBracket2AndBracket3 = (bracket3Dollars - bracket2Dollars) * (bracket2Rate / 100);\n\n\t\t}\n\t\tif (yearlyIncome >= bracket3Dollars) {\n\t\t\t// Tax for the rest of the income\n\t\t\ttaxBetweenBracket3AndRestOfIncome = (yearlyIncome - bracket3Dollars) * (bracket3Rate / 100);\n\n\t\t} \n\n\n\t\t// Total taxed amount based on the specifed income\n\t\tdouble tax = taxBetweenBracket1AndBracket2 + taxBetweenBracket2AndBracket3 + taxBetweenBracket3AndRestOfIncome;\n\n\t\t//System.out.println(tax);\n\t\treturn tax;\n\t}",
"public BigDecimal getPriceStdWTax();",
"public abstract double getTaxValue(String country);",
"@Override\r\n\tpublic double calculateTaxes(int year) {\n\t\tdouble taxe1 = 2.0; // public double section1 = minimum;\r\n\t\tdouble taxe2 = 4.0;\r\n\t\tdouble taxe3 = 10.0;\r\n\t\tdouble taxe4 = 25.0;\r\n\t\tdouble totalSalary = monthSalary * 14; // 14 son pagas en año\r\n\r\n\t\tif (totalSalary <= 12600) {\r\n\t\t\ttotalSalary = (totalSalary * (100 - taxe1));\r\n\r\n\t\t} else if (totalSalary <= 15000) {\r\n\t\t\ttotalSalary = (totalSalary * (100 - taxe2));\r\n\r\n\t\t} else if (totalSalary <= 21000) {\r\n\t\t\ttotalSalary = (totalSalary * (100 - taxe3));\r\n\r\n\t\t} else if (totalSalary > 21000) {\r\n\t\t\ttotalSalary = (totalSalary * (100 - taxe4));\r\n\r\n\t\t} else\r\n\t\t\ttotalSalary = -1;\r\n\r\n\t\treturn totalSalary;\r\n\t}",
"@Test\n\tpublic void test82000() {\n\n\tdouble tax = Main.calcTax(82_000.);\n\tassertEquals(1_210., tax, .01);\n\n\t}",
"public abstract void calcuteTax(Transfer aTransfer);",
"@Test\n\tpublic void testTaxForSlabA() throws SalaryOutOfRangeException {\n\t\tassertEquals(\"nill\", 0, salary.calTax(150000), 0.02);\n\t}",
"public Tax getTax() {\n if (tax == null) {\n tax = new Tax();\n }\n return tax;\n }",
"public int getLocationTax(){\r\n taxlist.add(new Tax(this.estValue,this.PPR,this.yearsowned,this.locationCategory));\r\n count++;\r\n return taxlist.get(count-1).LocationTax();\r\n }",
"public BigDecimal getLBR_TaxAmt();",
"public double getTaxRate() {\n return taxRate;\n }",
"private static double priceWithInterest(double price_tax, double dwnpymnt, double interest, int year) {\n \tdouble pwi = price_tax - dwnpymnt;\n \t\n \tif(year > 0) {\n \t\tpwi = pwi * (1 + (interest / 100));\n \t}\n \t\n \treturn pwi;\n }",
"public BigDecimal getLBR_ICMSST_TaxAdded();",
"public double getMarketValueTaxRate(){\r\n taxlist.add(new Tax(this.estValue,this.PPR,this.yearsowned,this.locationCategory));\r\n count++;\r\n return taxlist.get(count-1).MarketValueTax();\r\n }",
"@Test\n\tpublic void test250000() {\n\n\tdouble tax = Main.calcTax(250_000.);\n\tassertEquals(7750., tax, .01);\n\n\t}",
"public BigDecimal getLBR_TaxDeferralAmt();",
"public BigDecimal getLBR_ICMSST_TaxRate();",
"public BigDecimal getLBR_ICMSST_TaxAmt();",
"public void tpsTax() {\n TextView tpsView = findViewById(R.id.checkoutPage_TPStaxValue);\n tpsTaxTotal = beforeTaxTotal * 0.05;\n tpsView.setText(String.format(\"$%.2f\", tpsTaxTotal));\n }",
"@Override\r\n\tpublic double taxAmount(long itemSold, double price) {\n\t\treturn 100.230;\r\n\t}",
"@ApiModelProperty(value = \"Total amount of TAX paid(or should be paid)\")\n @JsonProperty(\"tax\")\n public String getTax() {\n return tax;\n }",
"public BigDecimal getLBR_TaxBaseAmt();",
"@Test\n\tpublic void test70000() {\n\n\tdouble tax = Main.calcTax(70_000.);\n\tassertEquals(900., tax, .01);\n\n\t}",
"public double getTaxAmount() {\n return taxAmount;\n }",
"public BigDecimal getTaxAmtPriceStd();",
"public BigDecimal getLBR_TaxRate();",
"@Test\n\tpublic void test110000() {\n\n\tdouble tax = Main.calcTax(110_000.);\n\tassertEquals(2_150., tax, .01);\n\n\t}",
"public BigDecimal getLBR_TaxDeferralRate();",
"public BigDecimal getLBR_ICMSST_TaxBaseAmt();",
"public void tvqTax() {\n TextView tvqView = findViewById(R.id.checkoutPage_TVQtaxValue);\n tvqTaxTotal = beforeTaxTotal * 0.09975;\n tvqView.setText(String.format(\"$%.2f\", tvqTaxTotal));\n }",
"public BigDecimal getLBR_TaxBase();",
"public BigDecimal getPriceLimitWTax();",
"public BigDecimal getTaxRate() {\n return taxRate;\n }",
"public static double calculate(SalariedIndividual individual) {\n int costPerDay = individual.getCostPerDay();\n\n // from that individual object we get the no of days worked in a month - y\n int noOfDays = individual.getNoOfDays();\n\n // salaryWithoutTaxDeducted = x * y\n int salaryWithoutTaxDeducted = costPerDay * noOfDays;\n\n // salaryWithTaxDeducted = salaryWithoutTaxDeducted - 0.1 * salaryWithoutTaxDeducted\n double salaryWithTaxDeducted = salaryWithoutTaxDeducted - (0.1 * salaryWithoutTaxDeducted);\n\n // return salaryWithTaxDeducted\n return salaryWithTaxDeducted;\n }",
"public BigDecimal getLBR_TaxReliefAmt();",
"public double getTaxes(){\n\t\treturn this.getExciseTax() + this.getFlightSegmentTax() + this.get911SecurityFee() + this.getPassengerFacilityFee();\n\t}",
"public BigDecimal getIncludedTax()\r\n\t{\r\n\t\treturn m_includedTax;\r\n\t}",
"public BigDecimal getLBR_ICMSST_TaxBase();",
"double defaultTaxOnProduct(){\n\t\treturn 12.5;\n\t}",
"public BigDecimal getPriceListWTax();",
"public BigDecimal getTaxAmt() {\n\t\treturn taxAmt;\n\t}",
"public static double calculateTotalAmountWithTax(DetailRow[] rows) {\r\n\r\n\t\tint maxDecimals = 0;\r\n\t\t\r\n\t\tdouble result = 0.0;\r\n\t\tfor (int i=0; i<rows.length; i++) {\r\n\t\t\tresult += rows[i].getLineTotalWithTax();\r\n\t\t\tmaxDecimals = Math.max(maxDecimals, rows[i].getRoundingDecimals());\r\n\t\t}\r\n\r\n\t\tlong integervalue = Math.round(result * Math.pow(10, maxDecimals));\r\n\t\tresult = (double)integervalue/Math.pow(10, maxDecimals);\r\n\r\n\t\t\r\n\t\treturn result;\r\n\t\t\r\n\t}",
"public void setTax(BigDecimal tax) {\n this.tax = tax;\n }",
"public BigDecimal getLBR_TaxBaseOwnOperation();",
"public void setTaxPercentage(double newTax) {\n tax = newTax;\n }",
"@Test\n\tpublic void testTaxForSlabC() throws SalaryOutOfRangeException {\n\t\tassertEquals(60000.2, salary.calTax(300001), 0.02);\n\t}",
"@Test\n\tpublic void testTaxForSlabD() throws SalaryOutOfRangeException {\n\t\tassertEquals(295951.35, salary.calTax(986504.5), 0.02);\n\t}",
"public MMDecimal getTaxAmount() {\r\n return this.taxAmount;\r\n }",
"@Test\n public void testGetTotalTax() {\n double expResult = 4.0;\n double result = receipt.getTotalTax();\n assertEquals(expResult, result, 0.0);\n }",
"public static Tax[] getTaxes() {\n Tax[] taxes = new Tax[DeclarationFiller.getDeclaration().size()];\n int count = 0;\n if (taxes != null ) {\n for (Map.Entry<String, Integer> incomePoint : DeclarationFiller.getDeclaration().entrySet()) {\n String taxName = \"Tax of \" + incomePoint.getKey();\n int incomValue = incomePoint.getValue();\n taxes[count] = new Tax(count+1001 ,taxName, incomValue, 0.18);\n count++;\n }\n }\n return taxes;\n }",
"public boolean isLBR_ICMSST_IsTaxIncluded();",
"public BigDecimal getLBR_TaxRateCredit();",
"private Vehicle calculationTaxes(Vehicle vehicle) {\n double exchangeRateCurrencyOfContract = serviceForCurrencyExchangeRate.getCurrencyExchangeRateNBU(vehicle.getCurrencyOfContract().name());\n double exchangeRateEUR = serviceForCurrencyExchangeRate.getCurrencyExchangeRateNBU(\"EUR\");\n\n // Calculation Impost\n vehicle.setImpostBasis(serviceForNumber.roundingNumber(\n vehicle.getPriceInCurrency() * exchangeRateCurrencyOfContract,\n 2));\n determinationImpostRate(vehicle);\n vehicle.setImpost(serviceForNumber.roundingNumber(\n vehicle.getImpostBasis() * vehicle.getImpostRate() / 100,\n 2));\n\n // Calculation Excise\n vehicle.setExciseBasis(vehicle.getCapacity());\n determinationExciseRate(vehicle);\n vehicle.setExcise(serviceForNumber.roundingNumber(\n vehicle.getExciseBasis() * vehicle.getExciseRate() * exchangeRateEUR,\n 2));\n\n // Calculation VAT\n vehicle.setVATBasis(serviceForNumber.roundingNumber(\n vehicle.getImpostBasis() + vehicle.getImpost() + vehicle.getExcise(),\n 2));\n determinationVATRate(vehicle);\n vehicle.setVAT(serviceForNumber.roundingNumber(\n vehicle.getVATBasis() * vehicle.getVATRate() / 100,\n 2));\n\n return vehicle;\n }",
"public static void setTaxRate(double taxRateIn) {\n taxRate = taxRateIn;\n }",
"public BigDecimal getLBR_TaxAmtCredit();",
"public double getTaxValue() {\n\t\treturn TaxCalculatorUtil.getTaxValue(getConfiguredPrice(),getPromotionValue(), getCouponDiscountValue(), getTaxRate(), getTaxationType());\n\t}",
"public double getTaxes() {\n return getArea() * TAX_RATE_PER_M2;\n }",
"public double getTaxa() {\n\t\treturn taxa;\n\t}",
"@ApiModelProperty(value = \"Amount of tax expressed in the given currency\")\n\n @Valid\n\n public Money getTaxAmount() {\n return taxAmount;\n }"
] |
[
"0.7080377",
"0.7077584",
"0.6816037",
"0.6784472",
"0.6742573",
"0.67075545",
"0.6694451",
"0.6644856",
"0.66263735",
"0.66104627",
"0.6606332",
"0.6604429",
"0.6502707",
"0.648714",
"0.6474421",
"0.6453979",
"0.6435485",
"0.64229244",
"0.63911885",
"0.63849396",
"0.6337733",
"0.6312363",
"0.6272313",
"0.6261452",
"0.6249323",
"0.61517096",
"0.6141505",
"0.61297363",
"0.61229074",
"0.6106457",
"0.60962504",
"0.60607195",
"0.60314304",
"0.6022756",
"0.6006985",
"0.59960866",
"0.59893626",
"0.59877664",
"0.5985935",
"0.5973305",
"0.5903899",
"0.58878857",
"0.58670175",
"0.5865821",
"0.58261186",
"0.58096623",
"0.57798505",
"0.5769233",
"0.57411015",
"0.5737926",
"0.57351494",
"0.5726694",
"0.57263124",
"0.57260203",
"0.5720725",
"0.57189214",
"0.5702289",
"0.5691343",
"0.5690499",
"0.5689521",
"0.56890327",
"0.5688221",
"0.5687685",
"0.5682278",
"0.5673165",
"0.56685376",
"0.56552047",
"0.5641274",
"0.56377417",
"0.5624921",
"0.5621496",
"0.5617738",
"0.56164986",
"0.5615448",
"0.56124055",
"0.56075233",
"0.5604822",
"0.5600873",
"0.55867475",
"0.55753744",
"0.55715567",
"0.5567755",
"0.55677015",
"0.55612963",
"0.55594164",
"0.55506474",
"0.55371135",
"0.5535407",
"0.55353796",
"0.5508796",
"0.55064744",
"0.55054843",
"0.5499314",
"0.5486537",
"0.546931",
"0.5467231",
"0.5467138",
"0.544874",
"0.54368466",
"0.54282176"
] |
0.80162495
|
0
|
secondsAfterMidnight Input: String that represents time of day Returns: integer number of seconds after midnight (return 1 if String is not valid time of day) General time of day format HH:MM:SS Examples: Input StringReturn Value "12:34:09AM"2049 "12:00:00PM" 43200 (common noon) "12:00:02am"2 (AM/PM case insensitive) "3:03:03Pm" 54183 (two digit MM and SS required) "7:11:03A"1 "7:11:3AM"1 "7:91:73PM"1 "23:45:12"1 (do not allow 24 hour clock format)
|
public static int secondsAfterMidnight(String t) {
int seconds; //initializing seconds, will be returned to main.
t.toLowerCase(); //setting all input to lowercase so it is easier to handle.
if (t.length() == 10){ //if input is 10 characters
// if statement below checks whether each character is appropriate before continuing.
if((t.startsWith("0") || t.startsWith("1"))&& Character.isDigit(t.charAt(1))&&
t.charAt(2) == ':' && Character.isDigit(t.charAt(3))&& Character.isDigit(t.charAt(4))&&
t.charAt(5) == ':' && Character.isDigit(t.charAt(6))&& Character.isDigit(t.charAt(7))&&
(t.endsWith("am") || t.endsWith("pm"))){
// Characters converted to numeric values and hours, minutes, and seconds are
// calculated below.
int hours = Character.getNumericValue(t.charAt(0))*10
+ Character.getNumericValue(t.charAt(1));
//if hours is equal to 12 such as 12:35, switched to 0:35, for easier calc.
if(hours == 12){
hours = 0;
}
int minutes = Character.getNumericValue(t.charAt(3))*10
+ Character.getNumericValue(t.charAt(4));
seconds = Character.getNumericValue(t.charAt(6))*10
+ Character.getNumericValue(t.charAt(7));
if(minutes < 60 && seconds < 60){//checks whether minute and second input is below 60.
if(t.endsWith("pm")){ //adding 43200 (12 hours in seconds) if time is pm.
seconds = hours*3600 + minutes*60 + seconds + 43200;
}else{
seconds = hours*3600 + minutes*60 + seconds;
}
}else{
seconds = -1; //if proper input is not given, seconds set to -1.
}
} else {
seconds = -1; //improper input leads to seconds set to -1.
}
//below is for input that has 9 characters, such as 9:12:23am, instead of 09:12:23am. The code below
// is very similar to to code for 10 characters above.
}else if (t.length() == 9){
if(Character.isDigit(t.charAt(0))&& t.charAt(1) == ':' && Character.isDigit(t.charAt(2))
&& Character.isDigit(t.charAt(3))&& t.charAt(4) == ':' && Character.isDigit(t.charAt(5))
&& Character.isDigit(t.charAt(6))&&(t.endsWith("am") || t.endsWith("pm"))){
int hours = Character.getNumericValue(t.charAt(0));
int minutes = Character.getNumericValue(t.charAt(2))*10
+ Character.getNumericValue(t.charAt(3));
seconds = Character.getNumericValue(t.charAt(5))*10
+ Character.getNumericValue(t.charAt(6));
if(minutes < 60 && seconds < 60){
if(t.endsWith("pm")){
seconds = hours*3600 + minutes*60 + seconds + 43200;
}else{
seconds = hours*3600 + minutes*60 + seconds;
}
}else{
seconds = -1;
}
} else {
seconds = -1;
}
}else{ // if input has neither 10 or 9 characters, input not proper.
seconds = -1;
}
return seconds; //seconds is returned to main.
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public static String minChangeDayHourMinS(String time) {\n long mss;\n if (!\"\".equals(time) && time != null) {\n mss = Integer.parseInt(time) * 60;\n } else {\n return \"\";\n }\n String DateTimes = null;\n long days = mss / (60 * 60 * 24);\n long hours = (mss % (60 * 60 * 24)) / (60 * 60);\n long minutes = (mss % (60 * 60)) / 60;\n long seconds = mss % 60;\n// Logger.d(\"minChangeDayHourMinS days:\" + days);\n// Logger.d(\"minChangeDayHourMinS hours:\" + hours);\n// Logger.d(\"minChangeDayHourMinS minutes:\" + minutes);\n// Logger.d(\"minChangeDayHourMinS seconds:\" + seconds);\n\n if (days > 0) {\n DateTimes = days + \"天\" + hours + \"小时\" + minutes + \"分钟\"\n + seconds + \"秒\";\n } else if (hours > 0) {\n DateTimes = hours + \"小时\" + minutes + \"分钟\"\n + seconds + \"秒\";\n } else if (minutes > 0) {\n DateTimes = minutes + \"分钟\"\n + seconds + \"秒\";\n } else {\n DateTimes = seconds + \"秒\";\n }\n // Log.d(\"minChangeDayHourMinS DateTimes:\" + DateTimes);\n\n return DateTimes;\n }",
"static String timeConversion(String s) {\n /*\n * Write your code here.\n */\n String res = \"\";\n String hrs = s.substring(0, 2);\n String min = s.substring(3, 5);\n String sec = s.substring(6, 8);\n String ampm = s.substring(8);\n int hr = Integer.parseInt(hrs);\n if((ampm.equalsIgnoreCase(\"PM\")) && (hr != 12)) {\n hr += 12;\n if(hr >= 24) {\n hr = 24 - hr;\n }\n }\n else if(ampm.equalsIgnoreCase(\"AM\")) {\n if(hr == 12) {\n hr = 0;\n }\n }\n if(hr < 10) {\n res = res + \"0\" + Integer.toString(hr);\n }\n else {\n res += Integer.toString(hr);\n }\n res = res +\":\" +min +\":\" + sec;\n return res;\n }",
"static String timeConversion1(String s) {\n String[] timeSplit = s.split(\":\");\n String hours = timeSplit[0];\n String minutes = timeSplit[1];\n String seconds = timeSplit[2].substring(0, 2);\n String ampm = timeSplit[2].substring(2);\n\n int hour = Integer.parseInt(hours);\n\n int differential = 0;\n if (\"PM\".equals(ampm) && hour != 12) {\n differential = 12;\n }\n\n\n hour += differential;\n hour = hour % 24;\n\n hours = String.format(\"%02d\", hour);\n\n return hours + \":\" + minutes + \":\" + seconds;\n\n }",
"public static String timeConversion(String s) {\n // Write your code here\n String end = s.substring(2, s.length() - 2);\n String ans = s.substring(0, s.length() - 2);\n if (s.charAt(8) == 'A') {\n return s.startsWith(\"12\") ? \"00\" + end : ans;\n }\n\n return s.startsWith(\"12\") ? ans : (Integer.parseInt(s.substring(0, 2)) + 12) + end;\n }",
"static String timeConversion(String s) {\n\n\t\tStringBuilder sb = new StringBuilder();\n\t\tboolean isAm = s.contains(\"AM\");\n\t\t\n\t\ts = s.replace(\"AM\", \"\");\n\t\ts = s.replace(\"PM\", \"\");\n\t\t\n\t\tString str[] = s.split(\":\");\n\t\tint time = Integer.parseInt(str[0]);\n\t\t\n\t\t\n\t\tif(time < 12 && !isAm) {\n\t\t\ttime = time + 12;\n\t\t\tsb.append(time).append(\":\");\n\t\t}else if(time == 12 && isAm) {\n\t\t\tsb.append(\"00:\");\n\t\t}else {\n\t\t\tif (time < 10) sb.append(\"0\").append(time).append(\":\");\n\t\t\telse sb.append(time).append(\":\");\n\t\t}\n\n\t\tsb.append(str[1]).append(\":\").append(str[2]);\n\t\treturn sb.toString();\n\t}",
"private long calculateTime(LocalDate date, long secondsSinceMidnight) {\n GregorianCalendar gregorianCalendar = new GregorianCalendar(timeZone);\n gregorianCalendar.setTimeInMillis(0);\n gregorianCalendar.set(date.getYear(), date.getMonthValue() - 1, date.getDayOfMonth());\n gregorianCalendar.add(java.util.Calendar.SECOND, (int)secondsSinceMidnight);\n\n return gregorianCalendar.getTimeInMillis();\n }",
"static String timeConversion(String s) {\n /*\n * Write your code here.\n */\n String conversion = \"\";\n String time = s.substring(s.length()-2,s.length());\n String hour = s.substring(0,2);\n if(time.equals(\"AM\")){\n if(Integer.parseInt(hour)==12){\n conversion = \"00\"+s.substring(2,s.length()-2);\n }\n else{\n conversion = s.substring(0,s.length()-2);\n }\n }else{\n if(Integer.parseInt(hour)==12){\n conversion = \"12\"+s.substring(2,s.length()-2);\n }\n else{\n conversion = (Integer.parseInt(hour)+12) + s.substring(2,s.length()-2);\n }\n }\n\n return conversion;\n }",
"public static double parse_time(String s) {\n double tm = -1;\n String patternStr = \"[:]\";\n String [] fields2 = s.split(patternStr);\n if (fields2.length >= 3) {\n tm = parse_double(fields2[2]) + 60 * parse_double(fields2[1]) + 3600 * parse_double(fields2[0]); // hrs:min:sec\n } else if (fields2.length == 2) {\n tm = parse_double(fields2[1]) + 60 * parse_double(fields2[0]); // min:sec\n } else if (fields2.length == 1){\n tm = parse_double(fields2[0]); //getColumn(_sec, head[TM_CLK]);\n }\n return tm;\n }",
"private int parseTime(String timeString){\n\n if(timeString != null) {\n String[] parseTime = timeString.split(\":|\\\\s\");\n String intTime = parseTime[0] + parseTime[1];\n int time = Integer.parseInt((intTime));\n if (time != 1200 && parseTime[2].equals(\"PM\")) {\n time += 1200;\n } else if (time == 1200 && parseTime[2].equals(\"AM\")) {\n time = 0;\n }\n return time;\n\n } else {\n return 0;\n }\n }",
"static String timeConversion(String s) {\n String[] timeSplit = s.split(\":\");\n String hours = timeSplit[0];\n String minutes = timeSplit[1];\n String seconds = timeSplit[2].substring(0, 2);\n String ampm = timeSplit[2].substring(2, 4);\n\n String newHours;\n if (ampm.equals(\"AM\")) {\n newHours = hours.equals(\"12\") ? \"00\" : hours;\n\n } else {\n newHours = hours.equals(\"12\") ? hours : String.valueOf(Integer.parseInt(hours) + 12);\n }\n\n return newHours + \":\" + minutes + \":\" + seconds;\n\n }",
"public static String getTime(int second) {\n if (second < 10) {\n return \"00:00:0\" + second;\n }\n if (second < 60) {\n return \"00:00:\" + second;\n }\n if (second < 3600) {\n int minute = second / 60;\n second = second - minute * 60;\n if (minute < 10) {\n if (second < 10) {\n return \"00:\" + \"0\" + minute + \":0\" + second;\n }\n return \"00:\" + \"0\" + minute + \":\" + second;\n }\n if (second < 10) {\n return \"00:\" + minute + \":0\" + second;\n }\n return \"00:\" + minute + \":\" + second;\n }\n int hour = second / 3600;\n int minute = (second - hour * 3600) / 60;\n second = second - hour * 3600 - minute * 60;\n if (hour < 10) {\n if (minute < 10) {\n if (second < 10) {\n return \"0\" + hour + \":0\" + minute + \":0\" + second;\n }\n return \"0\" + hour + \":0\" + minute + \":\" + second;\n }\n if (second < 10) {\n return \"0\" + hour + \":\" + minute + \":0\" + second;\n }\n return \"0\" + hour + \":\" + minute + \":\" + second;\n }\n if (minute < 10) {\n if (second < 10) {\n return hour + \":0\" + minute + \":0\" + second;\n }\n return hour + \":0\" + minute + \":\" + second;\n }\n if (second < 10) {\n return hour + \":\" + minute + \":0\" + second;\n }\n return hour + \":\" + minute + \":\" + second;\n }",
"static String timeConversion(String s) {\n if(s.indexOf('P') >= 0 && s.substring(0, 2).equals(\"12\")){\n }\n else if(s.indexOf('P') >= 0){\n Integer n = Integer.parseInt(s.substring(0, 2));\n s = removeHour(s);\n n += 12;\n String hour = Integer.toString(n);\n s = hour + s;\n }\n else if (s.indexOf('A') >= 0 && s.substring(0, 2).equals(\"12\")){\n s = \"00\" + s.substring(2);\n }\n return removeHourFormat(s);\n }",
"public static TimeOfTheDay getMatchingTimeOfTheDay(Calendar now){\n Calendar compareTime = Calendar.getInstance();\n compareTime.set(Calendar.YEAR, now.get(Calendar.YEAR));\n compareTime.set(Calendar.MONTH, now.get(Calendar.MONTH));\n compareTime.set(Calendar.DAY_OF_MONTH, now.get(Calendar.DAY_OF_MONTH));\n compareTime.set(Calendar.HOUR_OF_DAY, END_OF_NIGHT);\n compareTime.set(Calendar.MINUTE, 0);\n compareTime.set(Calendar.SECOND, 0);\n compareTime.set(Calendar.MILLISECOND, 0);\n\n // Is it night?\n if (now.before(compareTime)){\n return NIGHT;\n }\n\n // Then it might be Morning?\n compareTime.set(Calendar.HOUR_OF_DAY, END_OF_MORNING);\n if (now.before(compareTime)){\n return MORNING;\n }\n\n // Then it is midday?\n compareTime.set(Calendar.HOUR_OF_DAY, END_OF_MIDDAY);\n if (now.before(compareTime)){\n return MIDDAY;\n }\n\n //Then it is afternoon?\n compareTime.set(Calendar.HOUR_OF_DAY, END_OF_AFTERNOON);\n if (now.before(compareTime)){\n return AFTERNOON;\n }\n\n // Then it is evening?\n compareTime.set(Calendar.HOUR_OF_DAY, END_OF_EVENING);\n if (now.before(compareTime)){\n return EVENING;\n }\n\n //In this case it is really late!\n return NIGHT;\n }",
"static String timeConversion(String s) {\n String[] sTime = s.split(\":\");\n\n int x = 0;\n\n // if PM and hours >12, add additional 12 to hours\n // for AM and hour = 12, set hour to 00\n if(sTime[sTime.length - 1].contains(\"PM\") && !sTime[0].equals(\"12\"))\n x = 12;\n\n String val1 = \"\";\n if(x == 12)\n val1 = (Integer.parseInt(sTime[0]) + x) + \"\";\n else {\n if(sTime[0].equals(\"12\") && sTime[sTime.length - 1].contains(\"AM\"))\n val1 = \"00\";\n else\n val1 = sTime[0];\n }\n\n // merge the string and return the result\n String result = val1 + \":\" + sTime[1] + \":\" + sTime[2].substring(0,2);\n return result;\n }",
"private static int stringToHour(String stringDay) {\r\n\t\tswitch (stringDay) {\r\n\t\tcase \"6am\":\r\n\t\t\treturn 0;\r\n\t\tcase \"7am\":\r\n\t\t\treturn 1;\r\n\t\tcase \"8am\":\r\n\t\t\treturn 2;\r\n\t\tcase \"9am\":\r\n\t\t\treturn 3;\r\n\t\tcase \"10am\":\r\n\t\t\treturn 4;\r\n\t\tcase \"11am\":\r\n\t\t\treturn 5;\r\n\t\tcase \"12pm\":\r\n\t\t\treturn 6;\r\n\t\tcase \"1pm\":\r\n\t\t\treturn 7;\r\n\t\tcase \"2pm\":\r\n\t\t\treturn 8;\r\n\t\tcase \"3pm\":\r\n\t\t\treturn 9;\r\n\t\tcase \"4pm\":\r\n\t\t\treturn 10;\r\n\t\tcase \"5pm\":\r\n\t\t\treturn 11;\r\n\t\tcase \"6pm\":\r\n\t\t\treturn 12;\r\n\t\tcase \"7pm\":\r\n\t\t\treturn 13;\r\n\t\tcase \"8pm\":\r\n\t\t\treturn 14;\r\n\t\tdefault:\r\n\t\t\treturn -1;\r\n\t\t}// end switch\r\n\t}",
"private int getSecondsFromTimeString(String text) {\n int timeInSeconds = -1;\n if ( text != null && !\"\".equals(text) ) {\n int ipos = text.indexOf(\"Date:\");\n String txtDate = (ipos >= 0 ? text.substring(ipos+5).trim() : text.trim());\n ipos = text.lastIndexOf(\":\");\n if ( ipos > 0 ) {\n int endPos = ipos + 3;\n ipos = text.lastIndexOf(\":\",ipos-1);\n if ( ipos > 0 ) {\n int startPos = ipos - 2;\n if ( startPos >= 0 && endPos > startPos ) {\n text = text.substring(startPos, endPos);\n String[] values = text.split(\":\");\n if ( values.length > 2 ) {\n int hours = Integer.valueOf(values[0]);\n int minutes = Integer.valueOf(values[1]);\n int seconds = Integer.valueOf(values[2]);\n timeInSeconds = (hours * 3600) + (minutes * 60) + seconds;\n }\n }\n }\n }\n }\n return timeInSeconds;\n }",
"private static String convertTime(String timeString) {\n try {\n int timeIn24hRepresentation = Integer.parseInt(timeString);\n int hours = timeIn24hRepresentation / 100;\n int minutes = timeIn24hRepresentation % 100;\n boolean isOutOfBounds = hours < 0 || hours > 24 || minutes < 0 || minutes > 60;\n boolean cannotConvertToTime = timeString.length() != 4;\n\n if (isOutOfBounds || cannotConvertToTime) {\n return timeString;\n } else {\n return convertTimeToStringRepresentation(hours, minutes);\n }\n } catch (NumberFormatException e) {\n return timeString;\n }\n }",
"private String doValidTimeCheck(String pDateTime) {\n String aDateTime = pDateTime;\n\n if (pDateTime.length() > 0) {\n String aTime = pDateTime.substring(8);\n if (aTime.matches(\"240000\")) {\n aDateTime = pDateTime.substring(0,8) + \"235900\";\n }\n }\n return aDateTime;\n }",
"static String timeConversion(String s) throws ParseException {\n SimpleDateFormat to = new SimpleDateFormat(\"HH:mm:ss\");\n SimpleDateFormat from = new SimpleDateFormat(\"hh:mm:ssa\");\n Date parse = from.parse(s);\n return to.format(parse);\n\n }",
"public static String parseTime(final int timeInSec)\n {\n String output = \"\";\n final int weeks = timeInSec / (86400 * 7);\n int remainder = timeInSec % (86400 * 7);\n final int days = remainder / 86400;\n remainder = timeInSec % 86400;\n final int hours = remainder / 3600;\n remainder = timeInSec % 3600;\n final int minutes = remainder / 60;\n final int seconds = remainder % 60;\n\n if (weeks != 0)\n {\n output += weeks + \" weeks \";\n }\n\n if (days != 0)\n {\n output += (days < 10 ? days > 0 ? \"0\" : \"\" : \"\") + days + \" days \";\n }\n\n if (hours != 0)\n {\n output += (hours < 10 ? hours > 0 ? \"0\" : \"\" : \"\") + hours + \" h \";\n }\n\n if (minutes != 0)\n {\n output += (minutes < 10 ? minutes > 0 ? \"0\" : \"\" : \"\") + minutes + \" min \";\n }\n\n output += (seconds < 10 ? seconds > 0 ? \"0\" : \"\" : \"\") + seconds + \" sec\";\n\n return output;\n }",
"public static long TimeInformationToSeconds(String info){\n\t\tif(info.indexOf(':') > 0){\n\t\t\tString[] data = info.split(\":\");\n\t\t\tlong hours = Long.parseLong(data[0]);\n\t\t\tlong minutes = Long.parseLong(data[1]);\n\t\t\tlong seconds = Long.parseLong(data[2].split(\"[.]\")[0]);\n\t\t\tlong milliseconds = Long.parseLong(data[2].split(\"[.]\")[1]);\n\t\t\treturn (hours * 3600000) + (minutes * 60000) + (seconds * 1000) + milliseconds;\n\t\t}else{\n\t\t\n\t\t/*\n\t\tSystem.out.println(info.substring(0, info.indexOf(\"day\")));\n\t\tSystem.out.println(info.substring(0, info.indexOf(\"day\")));\n\t\tSystem.out.println(info.substring(info.indexOf(\" \"), info.indexOf(\":\")));\n\t\tSystem.out.println(info.substring(info.indexOf(':'), info.lastIndexOf(':')));\n\t\tSystem.out.println(info.substring(info.lastIndexOf(':'), info.indexOf('.')));\n\t\tSystem.out.println(info.substring(info.indexOf('.')));\n/*\t\tlong days = Long.parseLong(info.substring(0, info.indexOf(\"day\")));\n\t\tlong hours = Long.parseLong(info.substring(info.indexOf(\" \"), info.indexOf(\":\")));\n\t\tlong minutes = Long.parseLong(info.substring(info.indexOf(':'), info.lastIndexOf(':')));\n\t\tlong seconds = Long.parseLong(info.substring(info.lastIndexOf(':'), info.indexOf('.')));\n\t\tlong milliseconds = Long.parseLong(info.substring(info.indexOf('.')));\n\t*/\t\n\t\t}\n\t\treturn 1;//(days * 86400000) + (hours * 3600000) + (minutes * 60000) + (seconds * 1000) + milliseconds;\n\t}",
"public static void main(String[] args) {\n\t\tString s = \"12:45:54PM\";\r\n\t\tString temp=\":\";\r\n\t\tString Result=\"\";\r\n\t\t\r\n\t\tif(s.charAt(8)=='P' || s.charAt(8)=='p')\r\n\t\t {\r\n\t\t\tString s1[] = s.split(\":\");\r\n\t int Hour = Integer.parseInt(s1[0]);\r\n\t String Actual_Hour = \"\";\r\n\t if(Hour == 12)\r\n\t {\r\n\t \tActual_Hour = \"12\";\r\n\t }\r\n\t else\r\n\t {\r\n\t \tint data = 12 + Hour;\r\n\t \tActual_Hour = String.valueOf(data);\r\n\t }\r\n\t \r\n\t \r\n\t Result = Actual_Hour +temp+s1[1]+temp+s1[2].substring(0, 2);\r\n\t\t }\r\n\t\t else\r\n\t\t {\r\n\t\t \tString s1[] = s.split(\":\");\r\n\t\t \tint Hour = Integer.parseInt(s1[0]);\r\n\t\t String Actual_Hour = \"\";\r\n\t\t if(Hour == 12)\r\n\t\t {\r\n\t\t \tActual_Hour = \"00\";\r\n\t\t \tResult = Actual_Hour +temp+s1[1]+temp+s1[2].substring(0, 2); \r\n\t\t }\r\n\t\t else {\r\n\t\t \tString s2[] = s.split(\"AM\");\r\n\t\t\t for(int i=0; i<s2.length; i++)\r\n\t\t\t {\r\n\t\t\t \tResult = s2[i];\r\n\t\t\t }\t\r\n\t\t }\r\n\t\t \t\r\n\t\t }\r\n\t\t\r\n\t\t\t\tSystem.out.println(Result);\r\n}",
"public String getNextTimeFromDayTime(int day,String time){\n \t\tString res = \"00:00:00\";\n //\t\tif(existDayTime(day,time)){\n //\t\t\t// SELECT time FROM time WHERE day = 0 AND ID = 1+(SELECT ID FROM time WHERE day= 0 AND time ='16:00:00')\n //\t\t\tSQLiteDatabase db= this.getReadableDatabase();\n //\t\t\tCursor c = db.rawQuery(\"SELECT time FROM time \" +\n //\t\t\t\t\t\t\t\t \"WHERE day = \"+day+\" \" +\n //\t\t\t\t\t\t\t\t \"AND ID = 1+(SELECT ID \" +\n //\t\t\t\t\t\t\t\t \t\t\t \"FROM time \" +\n //\t\t\t\t\t\t\t\t \t\t\t \"WHERE day=\"+day+\" \" +\n //\t\t\t\t\t\t\t\t \t\t\t \"AND time ='\"+time+\"')\",null);\n //\t\t\tif(c != null){\n //\t\t\t\tc.moveToFirst();\n //\t\t\t\tres = c.getString(0);\n //\t\t\t}\n //\t\t\tdb.close();\n //\t\t\treturn res;\n //\t\t} else {\n \t\t\t// TODO: else Pfad klappt immer, if nicht notwendig!\n \t\t\t// SELECT time FROM time WHERE day = 1 AND time(time) > time('18:00:00')\n \t\t\tLog.v(\"test\",\"DB-Zeit \"+time);\n \t\t\tLog.v(\"test\",\"Tag \"+String.valueOf(day));\n \t\t\tSQLiteDatabase db = this.getReadableDatabase();\n \t\t\tCursor c = db.rawQuery(\"SELECT time FROM time \" +\n \t\t\t\t\t\t\t\t \"WHERE day = \"+day+\" \" +\n \t\t\t\t\t\t\t\t \"AND time(time) > time('\"+time+\"')\",null);\n \t\t\tif(c != null){\n \t\t\t\tc.moveToFirst();\n \t\t\t\tres = c.getString(0);\n\t\t\t} else {\n\t\t\t\t// TODO: als Test, wenn Zeit fr heute nicht mehr vorhanden, nimm nchsten Tag\n\t\t\t\tres = getFirstTimeFromDay((1+day)%7);\n \t\t\t}\n \t\t\t//db.close();\n \t\t\tLog.v(\"test\",String.valueOf(res));\n \t\t\treturn res;\n //\t\t}\n \t}",
"public static String parseTime(String sTime) {\n\t\treturn sTime.substring(4, 6);\n\t}",
"public static int convertTimetoSec(String hour, String minute, String seconds)\n\t{\n\t\tint h, m, s;\n\t\tint timeinsec = 1000;\n\n\t\th = Integer.parseInt(hour);\n\t\tm = Integer.parseInt(minute);\n\t\ts = Integer.parseInt(seconds);\n\n\t\ttimeinsec = 3600*h + 60*m + s;\n\n\t\treturn timeinsec;\t\n\t}",
"public static Calendar extractTime(int time){\n Calendar c = Calendar.getInstance();\n String d = time+\"\";\n if(d.length() == 3)\n d = \"0\"+d;\n int hour = Integer.parseInt(d.substring(0, 2));\n int min = Integer.parseInt(d.substring(2, 4));\n c.set(Calendar.HOUR_OF_DAY,hour);\n c.set(Calendar.MINUTE,min);\n return c;\n }",
"public ClockTime(String s, String subtype) {\n super(Property.CLOCKTIME_PROPERTY,subtype);\n\n\n Date value = null;\n\n try {\n StringTokenizer tokens = new StringTokenizer(s, \":\");\n if (tokens.countTokens() == 1) {\n if (s.startsWith(\"24\")) {\n s = \"00\" + s.substring(2);\n }\n if (s.startsWith(\"00\")) {\n s = s.substring(2);\n if (s == null || s.equals(\"\"))\n s = \"00\";\n if (!s.equals(\"00\") && Integer.parseInt(s) >= 60) {\n calValue = null;\n return;\n //throw new Exception(\"Invalid clocktime: \" + s);\n }\n try {\n value = dfMedium.get().parse(\"00:\" + s + \":00\");\n }\n catch (Exception e) {\n calValue = null;\n return;\n }\n calValue = Calendar.getInstance();\n calValue.setTime(value);\n normalize();\n return;\n }\n if (s.length() > 0 && s.charAt(0) == '0')\n s = s.substring(1);\n int h = Integer.parseInt(s);\n if (h >= 0 && h <= 9)\n s = \"0\" + s + \":00:00\";\n else if (h < 24)\n s = s + \":00:00\";\n else if (h >= 100 && h <= 959) {\n int hh = Integer.parseInt(s.substring(0, 1));\n int mm = Integer.parseInt(s.substring(1, 3));\n if (mm >= 60) {\n calValue = null;\n return;\n //throw new Exception(\"Invalid clocktime: \" + s);\n }\n s = \"0\" + hh + \":\" + mm + \":00\";\n }\n else if (h >= 1000 && h <= 2359) {\n int hh = Integer.parseInt(s.substring(0, 2));\n int mm = Integer.parseInt(s.substring(2, 4));\n if (hh >= 24) {\n calValue = null;\n return;\n //throw new Exception(\"Invalid clocktime: \" + s);\n }\n if (mm >= 60) {\n calValue = null;\n return;\n //throw new Exception(\"Invalid clocktime: \" + s);\n }\n s = hh + \":\" + mm + \":00\";\n }\n else {\n calValue = null;\n return;\n //throw new Exception(\"Invalid clocktime: \" + s);\n }\n }\n else\n if (tokens.countTokens() == 2) {\n s += \":00\";\n }\n try {\n value = dfMedium.get().parse(s);\n calValue = Calendar.getInstance();\n calValue.setTime(value);\n normalize();\n if (getSubType(\"showseconds\") != null && getSubType(\"showseconds\").equalsIgnoreCase(\"false\")) {\n \tsetShortFormat(true);\n }\n }\n catch (Exception e) {\n //throw new Exception(e);\n calValue = null;\n }\n } catch (Throwable e1) {\n calValue = null;\n }\n }",
"private static int convertTimeToSecs(String time){\n if (time == null) return 0;\n String hours = time.substring(0, 2);\n String mins = time.substring(3,5);\n return Integer.parseInt(hours)*3600 + Integer.parseInt(mins)*60;\n }",
"public String parseTime(String time) {\n Date date = null;\n try {\n SimpleDateFormat simpleDateFormat = new SimpleDateFormat(\"yyyy-MM-dd HH:mm\", Locale.getDefault());\n String todaysDate = new SimpleDateFormat(\"yyyy-MM-dd\", Locale.getDefault()).format(new Date());\n date = simpleDateFormat.parse(todaysDate + \" \" + time.split(\" \")[0]);\n\n SimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\", Locale.getDefault());\n sdf.setTimeZone(TimeZone.getTimeZone(\"UTC\"));\n return sdf.format(date);\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n return null;\n }",
"public static int solution(String S) {\n S = \"Tue 00:00-03:00\\nTue 20:00-24:00\\nSun 10:00-20:00\\nFri 05:00-10:00\\nFri 16:30-23:50\\nSat 10:00-24:00\\nSun 01:00-04:00\\nSat 02:00-06:00\\nTue 03:30-18:15\\nTue 19:00-20:00\\nWed 04:25-15:14\\nWed 15:14-22:40\\nThu 00:00-23:59\\nMon 05:00-13:00\\nMon 15:00-21:00\";\n\n String lines[] = S.split(\"\\\\n\");\n\n List<Meeting> meetings = new ArrayList<>();\n for(String eachLine: lines){\n String cleanedMeeting = eachLine.replaceAll(\"\\\"\", \"\");\n System.out.println(cleanedMeeting+\"\\n\");\n\n Integer day = 0;\n String[] meetingParts = cleanedMeeting.split(\" \");\n String strDay = meetingParts[0];\n switch (strDay){\n case \"Mon\":\n day = 1;\n break;\n case \"Tue\":\n day = 2;\n break;\n case \"Wed\":\n day = 3;\n break;\n case \"Thu\":\n day = 4;\n break;\n case \"Fri\":\n day = 5;\n break;\n case \"Sat\":\n day = 6;\n break;\n case \"Sun\":\n day = 7;\n break;\n default:\n break;\n }\n\n Meeting meeting = new Meeting(day, meetingParts[1].split(\"-\")[0], meetingParts[1].split(\"-\")[1]);\n meetings.add(meeting);\n }\n\n Collections.sort(meetings);\n\n return calculateLongerSleepingTime(meetings);\n }",
"public static String getDurationString(long minutes, long seconds) {\n if(minutes>=0 && (seconds >=0 && seconds<=59)){\n// minutes = hours/60;\n// seconds = hours/3600;\n long hours = minutes / 60;\n long remainingMinutes = minutes % 60;\n\n return hours + \" h \" + remainingMinutes + \"m \" + seconds + \"s\";\n }\n else\n\n {\n return \"invalid value\";\n }\n }",
"private static int getMinutes(String time) {\n\t\treturn (Character.getNumericValue(time.charAt(3)) * 10) + Character.getNumericValue(time.charAt(4));\n\t}",
"public static String TimeFormate() {\n\t\tString time;\n\t\tSimpleDateFormat dateFormat1 = new SimpleDateFormat();\n\t dateFormat1.setTimeZone(TimeZone.getTimeZone(\"US/Eastern\"));\n\t Calendar cal = Calendar.getInstance();\n\t cal.add(Calendar.MINUTE, 3);\n String n=dateFormat1.format(cal.getTime());\n //n=\"03/09/20 8:30 AM\";\n System.out.println(\"Full Date = \" +n);\n int colonindex=n.indexOf(\":\");\n //System.out.println(\": placed= \" +colonindex);\n //String tt =n.substring(colonindex, n.length());\n //System.out.println(\"tt= \" +tt);\n String tt1 =n.substring(colonindex-2,colonindex-1);\n System.out.println(\"tt1= \" +tt1);\n if(tt1.equals(\"1\")) {\n \t time=n.substring(colonindex-2, n.length());\n \t System.out.println(\"Time with two digits in hours= \" +time);\n }\n else {\n \t time=n.substring(colonindex-1, n.length());\n \t System.out.println(\"Time with one digit in hours= \" +time);\n }\n return time;\n\t}",
"public static String getHHMM()\r\n/* 74: */ {\r\n/* 75: 94 */ String nowTime = \"\";\r\n/* 76: 95 */ Date now = new Date();\r\n/* 77: 96 */ SimpleDateFormat formatter = new SimpleDateFormat(\"HH:mm\");\r\n/* 78: 97 */ nowTime = formatter.format(now);\r\n/* 79: 98 */ return nowTime;\r\n/* 80: */ }",
"private String secsToTime(int secs) {\n String min = secs / 60 + \"\";\n String sec = secs % 60 + \"\";\n if(sec.length() == 1) {\n sec = \"0\" + sec;\n }\n\n return min + \":\" + sec;\n }",
"public String manipulateTimeForScore(String mins, String secs) {\n\n\t\tint min = -1;\n\t\tint sec = -1;\n\t\tif (mins != null && mins.trim().length() > 0) {\n\t\t\ttry {\n\t\t\t\tmin = Integer.parseInt(mins);\n\t\t\t} catch (Exception e) {\n\t\t\t\t \n\t\t\t}\n\t\t}\n\t\tif (secs != null && secs.trim().length() > 0) {\n\t\t\ttry {\n\t\t\t\tsec = Integer.parseInt(secs);\n\t\t\t} catch (Exception e) {\n\t\t\t\t \n\t\t\t}\n\t\t}\n\t\tString result = \"\";\n\t\tif (min != -1 && sec != -1) {\n\t\t\tif (min < 10) {\n\t\t\t\tresult = \"0\" + min + \":\";\n\t\t\t} else {\n\t\t\t\tresult = min + \":\";\n\t\t\t}\n\n\t\t\tif (sec < 10) {\n\t\t\t\tresult = result + \"0\" + sec;\n\t\t\t} else {\n\t\t\t\tresult = result + sec;\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}",
"public static boolean dayOrNight(Context context) {\n SimpleDateFormat format = new SimpleDateFormat(\"HH\");\n String nowTime = format.format(new Date());\n int timeVal = Integer.valueOf(nowTime);\n\n ContentResolver cv = context.getContentResolver();\n String strTimeFormat = android.provider.Settings.System.getString(cv, android.provider.Settings.System.TIME_12_24);\n if (strTimeFormat != null && strTimeFormat.equals(\"24\")) {\n Logger.getLogger().i(\"24\");\n\n if(timeVal >= 18) {\n return false;\n } else {\n return true;\n }\n } else {\n Calendar c = Calendar.getInstance();\n int amPm = c.get(Calendar.AM_PM);\n\n Logger.getLogger().i(\"amPm \" + amPm);\n switch(amPm){\n case Calendar.AM:\n if(timeVal < 6) { //午夜\n return false;\n }\n return true;\n case Calendar.PM:\n if(timeVal >= 6) { //晚上\n return false;\n } else {\n return true;\n }\n }\n }\n\n return true;\n }",
"@Override\n\tpublic String convertTime(String aTime) {\n\n\t\tif (aTime == null)\n\t\t\tthrow new IllegalArgumentException(NO_TIME);\n\n\t\tString[] times = aTime.split(\":\", 3);\n\n\t\tif (times.length != 3)\n\t\t\tthrow new IllegalArgumentException(INVALID_TIME);\n\n\t\tint hours, minutes, seconds = 0;\n\n\t\ttry {\n\t\t\thours = Integer.parseInt(times[0]);\n\t\t\tminutes = Integer.parseInt(times[1]);\n\t\t\tseconds = Integer.parseInt(times[2]);\n\t\t} catch (NumberFormatException e) {\n\t\t\tthrow new IllegalArgumentException(NUMERIC_TIME);\n\t\t}\n\n\t\tif (hours < 0 || hours > 24)\n\t\t\tthrow new IllegalArgumentException(\"Invalid value of Hour\");\n\t\tif (minutes < 0 || minutes > 59)\n\t\t\tthrow new IllegalArgumentException(\"Invalid value of Minutes\");\n\t\tif (seconds < 0 || seconds > 59)\n\t\t\tthrow new IllegalArgumentException(\"Invalid value of Seconds\");\n\n\t\tString line1 = (seconds % 2 == 0) ? \"Y\" : \"O\";\n\t\tString line2 = rowString(hours / 5, 4, \"R\").replace('0', 'O');\n\t\tString line3 = rowString(hours % 5, 4, \"R\").replace('0', 'O');\n\t\tString line4 = rowString(minutes / 5, 11, \"Y\").replaceAll(\"YYY\", \"YYR\").replace('0', 'O');\n\t\tString line5 = rowString(minutes % 5, 4, \"Y\").replace('0', 'O');\n\n\t\tString cTime = String.join(NEW_LINE, Arrays.asList(line1, line2, line3, line4, line5));\n\n\t\tSystem.out.println(cTime);\n\n\t\treturn cTime;\n\t}",
"public String getTime() {\n boolean pastNoon = hour >= 12;\n if(pastNoon && hour == 12) {\n return hour + \"pm\";\n }\n else if(pastNoon) {\n return (hour - 12) + \"pm\";\n }\n else if(hour == 0) {\n return \"12am\";\n }\n else {\n return hour + \"am\";\n }\n }",
"protected static int getSecond(String dateTime) {\n return Integer.parseInt(dateTime.substring(11, 13));\n }",
"public String convertDateToTime(String date){\n Date test = null;\n if(date !=null) {\n try {\n test = sdf.parse(date);\n } catch (ParseException e) {\n System.out.println(\"Parse not working: \" + e);\n }\n calendar.setTime(test);\n return String.format(\"%02d:%02d\",\n calendar.get(Calendar.HOUR_OF_DAY),\n calendar.get(Calendar.MINUTE)\n );\n }\n return \"n\";\n }",
"public void convertEndCivilianTimeToMilitaryTime(String endHour, String endMinute, String endAmOrPm) {\n String timeFormat = endHour + \" \" + endMinute + \" \" + endAmOrPm;\n DateFormat df = new SimpleDateFormat(\"hh mm aa\");\n String[] newTime = new String[3];\n newTime[0] = \"0\";\n newTime[1] = \"0\";\n\n Date date = null;\n try {\n date = df.parse(timeFormat);\n } catch (Exception e) {\n //pass\n\n }\n\n try {\n String time[] = date.toString().split(\" \");\n newTime = time[3].split(\":\");\n } catch (Exception e) {\n //pass\n }\n endMilitaryHour = Integer.parseInt(newTime[0]);\n endMilitaryMinute = Integer.parseInt(newTime[1]);\n this.endAmOrPm = endAmOrPm;\n\n }",
"public static int getMinutesSinceMidnight(Date date){\n long timeNow = date.getTime();\n long days = TimeUnit.MILLISECONDS.toDays(timeNow);\n long millisToday = (timeNow - TimeUnit.DAYS.toMillis(days)); //GMT:This number of milliseconds after 12:00 today\n int minutesToday = (int )TimeUnit.MILLISECONDS.toMinutes(millisToday); //GMT\n minutesToday += (60*5) + 30; //GMT+05:30 minutesToday\n minutesToday = minutesToday % (24*60);\n return minutesToday;\n }",
"private static Long parseTimeStrictly(String s) throws IllegalArgumentException\n {\n String nanos_s;\n\n long hour;\n long minute;\n long second;\n long a_nanos = 0;\n\n String formatError = \"Timestamp format must be hh:mm:ss[.fffffffff]\";\n String zeros = \"000000000\";\n\n if (s == null)\n throw new java.lang.IllegalArgumentException(formatError);\n s = s.trim();\n\n // Parse the time\n int firstColon = s.indexOf(':');\n int secondColon = s.indexOf(':', firstColon+1);\n\n // Convert the time; default missing nanos\n if (firstColon > 0 && secondColon > 0 && secondColon < s.length() - 1)\n {\n int period = s.indexOf('.', secondColon+1);\n hour = Integer.parseInt(s.substring(0, firstColon));\n if (hour < 0 || hour >= 24)\n throw new IllegalArgumentException(\"Hour out of bounds.\");\n\n minute = Integer.parseInt(s.substring(firstColon + 1, secondColon));\n if (minute < 0 || minute >= 60)\n throw new IllegalArgumentException(\"Minute out of bounds.\");\n\n if (period > 0 && period < s.length() - 1)\n {\n second = Integer.parseInt(s.substring(secondColon + 1, period));\n if (second < 0 || second >= 60)\n throw new IllegalArgumentException(\"Second out of bounds.\");\n\n nanos_s = s.substring(period + 1);\n if (nanos_s.length() > 9)\n throw new IllegalArgumentException(formatError);\n if (!Character.isDigit(nanos_s.charAt(0)))\n throw new IllegalArgumentException(formatError);\n nanos_s = nanos_s + zeros.substring(0, 9 - nanos_s.length());\n a_nanos = Integer.parseInt(nanos_s);\n }\n else if (period > 0)\n throw new IllegalArgumentException(formatError);\n else\n {\n second = Integer.parseInt(s.substring(secondColon + 1));\n if (second < 0 || second >= 60)\n throw new IllegalArgumentException(\"Second out of bounds.\");\n }\n }\n else\n throw new IllegalArgumentException(formatError);\n\n long rawTime = 0;\n rawTime += TimeUnit.HOURS.toNanos(hour);\n rawTime += TimeUnit.MINUTES.toNanos(minute);\n rawTime += TimeUnit.SECONDS.toNanos(second);\n rawTime += a_nanos;\n return rawTime;\n }",
"public static long parseTimeString(String datePattern)\n\t{\n\t\tint index = findIndexOfNonDigit(datePattern);\n\t\tif (index == -1)\n\t\t{\n\t\t\tthrow new IllegalStateException(\"Incorrect time format given: \" + datePattern);\n\t\t}\n\t\ttry\n\t\t{\n\t\t\tint val = Integer.parseInt(datePattern.substring(0, index));\n\t\t\tfinal String type = datePattern.substring(index);\n\t\t\tCalendar cal = Calendar.getInstance();\n\t\t\tswitch (type.toLowerCase())\n\t\t\t{\n\t\t\t\tcase \"sec\":\n\t\t\t\tcase \"secs\":\n\t\t\t\t{\n\t\t\t\t\tcal.add(Calendar.SECOND, val);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase \"min\":\n\t\t\t\tcase \"mins\":\n\t\t\t\t{\n\t\t\t\t\tcal.add(Calendar.MINUTE, val);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase \"hour\":\n\t\t\t\tcase \"hours\":\n\t\t\t\t{\n\t\t\t\t\tcal.add(Calendar.HOUR, val);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase \"day\":\n\t\t\t\tcase \"days\":\n\t\t\t\t{\n\t\t\t\t\tcal.add(Calendar.DAY_OF_MONTH, val);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase \"week\":\n\t\t\t\tcase \"weeks\":\n\t\t\t\t{\n\t\t\t\t\tcal.add(Calendar.WEEK_OF_MONTH, val);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase \"month\":\n\t\t\t\tcase \"months\":\n\t\t\t\t{\n\t\t\t\t\tcal.add(Calendar.MONTH, val);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase \"year\":\n\t\t\t\tcase \"years\":\n\t\t\t\t{\n\t\t\t\t\tcal.add(Calendar.YEAR, val);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tdefault:\n\t\t\t\t{\n\t\t\t\t\tthrow new IllegalStateException(\"Incorrect format: \" + type + \" !!\");\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn cal.getTimeInMillis() - System.currentTimeMillis();\n\t\t}\n\t\tcatch (Exception e)\n\t\t{\n\t\t\tthrow new IllegalStateException(\"Incorrect time format given: \" + datePattern + \" val: \" + datePattern.substring(0, index));\n\t\t}\n\t}",
"private String getMinutesInTime(int time) {\n String hour = String.valueOf(time / 60);\n String minutes = String.valueOf(time % 60);\n\n if(minutes.length() < 2) {\n minutes = \"0\" + minutes;\n }\n\n return hour + \":\" + minutes;\n\n }",
"private String getTimeDifference(long actualTime) {\n\t\tlong seconds = actualTime % (1000 * 60);\n\t\tlong minutes = actualTime / (1000 * 60);\n\n\t\tString result = null;\n\n\t\tif (minutes < 10) {\n\t\t\tresult = \"0\" + minutes + \":\";\n\t\t} else {\n\t\t\tresult = minutes + \":\";\n\t\t}\n\n\t\tif (seconds < 10) {\n\t\t\tresult += \"0\" + seconds;\n\t\t} else {\n\t\t\tString sec = seconds + \"\";\n\t\t\tresult += sec.substring(0, 2);\n\t\t}\n\n\t\treturn result;\n\t}",
"private static int getHours(String time) {\n\t\treturn (Character.getNumericValue(time.charAt(0)) * 10) + Character.getNumericValue(time.charAt(1));\n\t}",
"private static long convertTimeToSeconds(String time) {\n\n\t\tString[] timeArray = time.split(\":\");\n\t\tint hours = Integer.parseInt(timeArray[0]);\n\t\tint minutes = Integer.parseInt(timeArray[1]);\n\t\tint seconds = Integer.parseInt(timeArray[2]);\n\n\t\treturn (hours * 3600) + (minutes * 60) + seconds;\n\t}",
"static String getTime(int time) {\r\n\t\tint hours = time / 60;\r\n\t\tint minutes = time % 60;\r\n\r\n\t\tString ampm;\r\n\t\tif (time >= 720) ampm = \"PM\";\r\n\t\telse ampm = \"AM\";\r\n\r\n\t\treturn (String.format(\"%d:%02d%s\", hours, minutes, ampm));\r\n\t}",
"public static String longToHHMM(long longTime)\r\n/* 150: */ {\r\n/* 151:219 */ SimpleDateFormat formatter = new SimpleDateFormat(\"HH:mm\");\r\n/* 152:220 */ Date strtodate = new Date(longTime);\r\n/* 153:221 */ return formatter.format(strtodate);\r\n/* 154: */ }",
"public static void main(String[] args) {\n System.out.println(solution(\"02:03:55\",\"00:14:15\",\n new String[] {\"01:20:15-01:45:14\", \n \"00:40:31-01:00:00\",\n \"00:25:50-00:48:29\",\n \"01:30:59-01:53:29\", \n \"01:37:44-02:02:30\"}));\n \n // \"01:00:00\"\n System.out.println(solution(\"99:59:59\", \"25:00:00\",\n new String[] {\"69:59:59-89:59:59\",\n \"01:00:00-21:00:00\",\n \"79:59:59-99:59:59\",\n \"11:00:00-31:00:00\"}));\n \n // \"00:00:00\"\n System.out.println(solution(\"50:00:00\", \"50:00:00\",\n new String[] {\"15:36:51-38:21:49\",\n \"10:14:18-15:36:51\",\n \"38:21:49-42:51:45\"}));\n \n }",
"public final flipsParser.fixedTime_return fixedTime() throws RecognitionException {\n flipsParser.fixedTime_return retval = new flipsParser.fixedTime_return();\n retval.start = input.LT(1);\n\n CommonTree root_0 = null;\n\n Token string_literal328=null;\n Token string_literal329=null;\n Token string_literal330=null;\n Token string_literal331=null;\n Token string_literal333=null;\n Token string_literal334=null;\n Token string_literal335=null;\n Token string_literal336=null;\n flipsParser.integerValuePositive_return hr = null;\n\n flipsParser.timeFormat_return timeFormat327 = null;\n\n flipsParser.timeFormat_return timeFormat332 = null;\n\n flipsParser.timeFormat_return timeFormat337 = null;\n\n\n CommonTree string_literal328_tree=null;\n CommonTree string_literal329_tree=null;\n CommonTree string_literal330_tree=null;\n CommonTree string_literal331_tree=null;\n CommonTree string_literal333_tree=null;\n CommonTree string_literal334_tree=null;\n CommonTree string_literal335_tree=null;\n CommonTree string_literal336_tree=null;\n RewriteRuleTokenStream stream_230=new RewriteRuleTokenStream(adaptor,\"token 230\");\n RewriteRuleTokenStream stream_227=new RewriteRuleTokenStream(adaptor,\"token 227\");\n RewriteRuleTokenStream stream_228=new RewriteRuleTokenStream(adaptor,\"token 228\");\n RewriteRuleTokenStream stream_229=new RewriteRuleTokenStream(adaptor,\"token 229\");\n RewriteRuleSubtreeStream stream_timeFormat=new RewriteRuleSubtreeStream(adaptor,\"rule timeFormat\");\n RewriteRuleSubtreeStream stream_integerValuePositive=new RewriteRuleSubtreeStream(adaptor,\"rule integerValuePositive\");\n try {\n // flips.g:508:2: ( timeFormat ( 'am' | 'a.m.' ) -> ^( TIME timeFormat AM ) | hr= integerValuePositive ( 'am' | 'a.m.' ) -> ^( TIME ^( HOUR $hr) AM ) | timeFormat ( 'pm' | 'p.m.' ) -> ^( TIME timeFormat PM ) | hr= integerValuePositive ( 'pm' | 'p.m.' ) -> ^( TIME ^( HOUR $hr) PM ) | timeFormat -> ^( TIME timeFormat HOUR24 ) )\n int alt134=5;\n alt134 = dfa134.predict(input);\n switch (alt134) {\n case 1 :\n // flips.g:508:4: timeFormat ( 'am' | 'a.m.' )\n {\n pushFollow(FOLLOW_timeFormat_in_fixedTime2742);\n timeFormat327=timeFormat();\n\n state._fsp--;\n\n stream_timeFormat.add(timeFormat327.getTree());\n // flips.g:508:15: ( 'am' | 'a.m.' )\n int alt130=2;\n int LA130_0 = input.LA(1);\n\n if ( (LA130_0==227) ) {\n alt130=1;\n }\n else if ( (LA130_0==228) ) {\n alt130=2;\n }\n else {\n NoViableAltException nvae =\n new NoViableAltException(\"\", 130, 0, input);\n\n throw nvae;\n }\n switch (alt130) {\n case 1 :\n // flips.g:508:16: 'am'\n {\n string_literal328=(Token)match(input,227,FOLLOW_227_in_fixedTime2745); \n stream_227.add(string_literal328);\n\n\n }\n break;\n case 2 :\n // flips.g:508:21: 'a.m.'\n {\n string_literal329=(Token)match(input,228,FOLLOW_228_in_fixedTime2747); \n stream_228.add(string_literal329);\n\n\n }\n break;\n\n }\n\n\n\n // AST REWRITE\n // elements: timeFormat\n // token labels: \n // rule labels: retval\n // token list labels: \n // rule list labels: \n // wildcard labels: \n retval.tree = root_0;\n RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,\"rule retval\",retval!=null?retval.tree:null);\n\n root_0 = (CommonTree)adaptor.nil();\n // 509:2: -> ^( TIME timeFormat AM )\n {\n // flips.g:509:5: ^( TIME timeFormat AM )\n {\n CommonTree root_1 = (CommonTree)adaptor.nil();\n root_1 = (CommonTree)adaptor.becomeRoot((CommonTree)adaptor.create(TIME, \"TIME\"), root_1);\n\n adaptor.addChild(root_1, stream_timeFormat.nextTree());\n adaptor.addChild(root_1, (CommonTree)adaptor.create(AM, \"AM\"));\n\n adaptor.addChild(root_0, root_1);\n }\n\n }\n\n retval.tree = root_0;\n }\n break;\n case 2 :\n // flips.g:510:4: hr= integerValuePositive ( 'am' | 'a.m.' )\n {\n pushFollow(FOLLOW_integerValuePositive_in_fixedTime2766);\n hr=integerValuePositive();\n\n state._fsp--;\n\n stream_integerValuePositive.add(hr.getTree());\n // flips.g:510:28: ( 'am' | 'a.m.' )\n int alt131=2;\n int LA131_0 = input.LA(1);\n\n if ( (LA131_0==227) ) {\n alt131=1;\n }\n else if ( (LA131_0==228) ) {\n alt131=2;\n }\n else {\n NoViableAltException nvae =\n new NoViableAltException(\"\", 131, 0, input);\n\n throw nvae;\n }\n switch (alt131) {\n case 1 :\n // flips.g:510:29: 'am'\n {\n string_literal330=(Token)match(input,227,FOLLOW_227_in_fixedTime2769); \n stream_227.add(string_literal330);\n\n\n }\n break;\n case 2 :\n // flips.g:510:34: 'a.m.'\n {\n string_literal331=(Token)match(input,228,FOLLOW_228_in_fixedTime2771); \n stream_228.add(string_literal331);\n\n\n }\n break;\n\n }\n\n\n\n // AST REWRITE\n // elements: hr\n // token labels: \n // rule labels: hr, retval\n // token list labels: \n // rule list labels: \n // wildcard labels: \n retval.tree = root_0;\n RewriteRuleSubtreeStream stream_hr=new RewriteRuleSubtreeStream(adaptor,\"rule hr\",hr!=null?hr.tree:null);\n RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,\"rule retval\",retval!=null?retval.tree:null);\n\n root_0 = (CommonTree)adaptor.nil();\n // 511:2: -> ^( TIME ^( HOUR $hr) AM )\n {\n // flips.g:511:5: ^( TIME ^( HOUR $hr) AM )\n {\n CommonTree root_1 = (CommonTree)adaptor.nil();\n root_1 = (CommonTree)adaptor.becomeRoot((CommonTree)adaptor.create(TIME, \"TIME\"), root_1);\n\n // flips.g:511:12: ^( HOUR $hr)\n {\n CommonTree root_2 = (CommonTree)adaptor.nil();\n root_2 = (CommonTree)adaptor.becomeRoot((CommonTree)adaptor.create(HOUR, \"HOUR\"), root_2);\n\n adaptor.addChild(root_2, stream_hr.nextTree());\n\n adaptor.addChild(root_1, root_2);\n }\n adaptor.addChild(root_1, (CommonTree)adaptor.create(AM, \"AM\"));\n\n adaptor.addChild(root_0, root_1);\n }\n\n }\n\n retval.tree = root_0;\n }\n break;\n case 3 :\n // flips.g:512:4: timeFormat ( 'pm' | 'p.m.' )\n {\n pushFollow(FOLLOW_timeFormat_in_fixedTime2793);\n timeFormat332=timeFormat();\n\n state._fsp--;\n\n stream_timeFormat.add(timeFormat332.getTree());\n // flips.g:512:15: ( 'pm' | 'p.m.' )\n int alt132=2;\n int LA132_0 = input.LA(1);\n\n if ( (LA132_0==229) ) {\n alt132=1;\n }\n else if ( (LA132_0==230) ) {\n alt132=2;\n }\n else {\n NoViableAltException nvae =\n new NoViableAltException(\"\", 132, 0, input);\n\n throw nvae;\n }\n switch (alt132) {\n case 1 :\n // flips.g:512:16: 'pm'\n {\n string_literal333=(Token)match(input,229,FOLLOW_229_in_fixedTime2796); \n stream_229.add(string_literal333);\n\n\n }\n break;\n case 2 :\n // flips.g:512:21: 'p.m.'\n {\n string_literal334=(Token)match(input,230,FOLLOW_230_in_fixedTime2798); \n stream_230.add(string_literal334);\n\n\n }\n break;\n\n }\n\n\n\n // AST REWRITE\n // elements: timeFormat\n // token labels: \n // rule labels: retval\n // token list labels: \n // rule list labels: \n // wildcard labels: \n retval.tree = root_0;\n RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,\"rule retval\",retval!=null?retval.tree:null);\n\n root_0 = (CommonTree)adaptor.nil();\n // 513:2: -> ^( TIME timeFormat PM )\n {\n // flips.g:513:5: ^( TIME timeFormat PM )\n {\n CommonTree root_1 = (CommonTree)adaptor.nil();\n root_1 = (CommonTree)adaptor.becomeRoot((CommonTree)adaptor.create(TIME, \"TIME\"), root_1);\n\n adaptor.addChild(root_1, stream_timeFormat.nextTree());\n adaptor.addChild(root_1, (CommonTree)adaptor.create(PM, \"PM\"));\n\n adaptor.addChild(root_0, root_1);\n }\n\n }\n\n retval.tree = root_0;\n }\n break;\n case 4 :\n // flips.g:514:4: hr= integerValuePositive ( 'pm' | 'p.m.' )\n {\n pushFollow(FOLLOW_integerValuePositive_in_fixedTime2817);\n hr=integerValuePositive();\n\n state._fsp--;\n\n stream_integerValuePositive.add(hr.getTree());\n // flips.g:514:28: ( 'pm' | 'p.m.' )\n int alt133=2;\n int LA133_0 = input.LA(1);\n\n if ( (LA133_0==229) ) {\n alt133=1;\n }\n else if ( (LA133_0==230) ) {\n alt133=2;\n }\n else {\n NoViableAltException nvae =\n new NoViableAltException(\"\", 133, 0, input);\n\n throw nvae;\n }\n switch (alt133) {\n case 1 :\n // flips.g:514:29: 'pm'\n {\n string_literal335=(Token)match(input,229,FOLLOW_229_in_fixedTime2820); \n stream_229.add(string_literal335);\n\n\n }\n break;\n case 2 :\n // flips.g:514:34: 'p.m.'\n {\n string_literal336=(Token)match(input,230,FOLLOW_230_in_fixedTime2822); \n stream_230.add(string_literal336);\n\n\n }\n break;\n\n }\n\n\n\n // AST REWRITE\n // elements: hr\n // token labels: \n // rule labels: hr, retval\n // token list labels: \n // rule list labels: \n // wildcard labels: \n retval.tree = root_0;\n RewriteRuleSubtreeStream stream_hr=new RewriteRuleSubtreeStream(adaptor,\"rule hr\",hr!=null?hr.tree:null);\n RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,\"rule retval\",retval!=null?retval.tree:null);\n\n root_0 = (CommonTree)adaptor.nil();\n // 515:2: -> ^( TIME ^( HOUR $hr) PM )\n {\n // flips.g:515:5: ^( TIME ^( HOUR $hr) PM )\n {\n CommonTree root_1 = (CommonTree)adaptor.nil();\n root_1 = (CommonTree)adaptor.becomeRoot((CommonTree)adaptor.create(TIME, \"TIME\"), root_1);\n\n // flips.g:515:12: ^( HOUR $hr)\n {\n CommonTree root_2 = (CommonTree)adaptor.nil();\n root_2 = (CommonTree)adaptor.becomeRoot((CommonTree)adaptor.create(HOUR, \"HOUR\"), root_2);\n\n adaptor.addChild(root_2, stream_hr.nextTree());\n\n adaptor.addChild(root_1, root_2);\n }\n adaptor.addChild(root_1, (CommonTree)adaptor.create(PM, \"PM\"));\n\n adaptor.addChild(root_0, root_1);\n }\n\n }\n\n retval.tree = root_0;\n }\n break;\n case 5 :\n // flips.g:516:4: timeFormat\n {\n pushFollow(FOLLOW_timeFormat_in_fixedTime2844);\n timeFormat337=timeFormat();\n\n state._fsp--;\n\n stream_timeFormat.add(timeFormat337.getTree());\n\n\n // AST REWRITE\n // elements: timeFormat\n // token labels: \n // rule labels: retval\n // token list labels: \n // rule list labels: \n // wildcard labels: \n retval.tree = root_0;\n RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,\"rule retval\",retval!=null?retval.tree:null);\n\n root_0 = (CommonTree)adaptor.nil();\n // 517:2: -> ^( TIME timeFormat HOUR24 )\n {\n // flips.g:517:5: ^( TIME timeFormat HOUR24 )\n {\n CommonTree root_1 = (CommonTree)adaptor.nil();\n root_1 = (CommonTree)adaptor.becomeRoot((CommonTree)adaptor.create(TIME, \"TIME\"), root_1);\n\n adaptor.addChild(root_1, stream_timeFormat.nextTree());\n adaptor.addChild(root_1, (CommonTree)adaptor.create(HOUR24, \"HOUR24\"));\n\n adaptor.addChild(root_0, root_1);\n }\n\n }\n\n retval.tree = root_0;\n }\n break;\n\n }\n retval.stop = input.LT(-1);\n\n retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);\n adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n \tretval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);\n\n }\n finally {\n }\n return retval;\n }",
"public String getTime(){\n String mt=\"\";\n String hr=\"\";\n if(minute<10){\n mt=0+(String.valueOf(minute));\n }\n\n else{\n mt=String.valueOf(minute);\n }\n\n if(hour<10){\n hr=0+(String.valueOf(hour));\n }\n else{\n hr=String.valueOf(hour);\n }\n //return hour:minute\n return (hr+\":\"+mt);\n }",
"public String secondsToMinutes(int seconds){\n int minutes = 0;\n while(seconds >= 60){\n seconds -= 60;\n minutes++;\n }\n String sec;\n if(seconds < 10){\n sec = \"0\" + seconds;\n }else{\n sec = seconds + \"\";\n }\n String time = minutes + \":\" + sec;\n return time;\n }",
"public static long calculateBySecondsCompareNow(long timeday) {\n\t\tSimpleDateFormat formatter = new SimpleDateFormat(\"yyyyMMddHHmmss\");\n\t\tParsePosition pos = new ParsePosition(0);\n\t\tDate dt1 = formatter.parse(String.valueOf(timeday), pos);\n\t\tDate date = new Date();\n\t\treturn dt1.getTime() - date.getTime();\n\t\t\n\t}",
"public static String getHHMM(String time)\r\n\t{\r\n\t\tString finalTime = \"00/00 AM/PM\";\r\n\t\tString hh = time.substring(0, 2);\r\n\t\tString mm = time.substring(3, 5);\r\n\r\n\t\tint newHH = Integer.parseInt(hh);\r\n\t\tint newMM = Integer.parseInt(mm);\r\n\r\n\t\tnewMM = newMM % 60;\r\n\r\n\t\tif (newHH == 0)\r\n\t\t{\r\n\t\t\tfinalTime = \"12:\" + newMM + \" PM\";\r\n\t\t} else\r\n\t\t{\r\n\r\n\t\t\tif (newHH > 12)\r\n\t\t\t{\r\n\t\t\t\tnewHH = newHH % 12;\r\n\t\t\t\tfinalTime = newHH + \":\" + newMM + \" PM\";\r\n\t\t\t} else\r\n\t\t\t\tfinalTime = newHH + \":\" + newMM + \" AM\";\r\n\t\t}\r\n\r\n\t\tString HH = finalTime.substring(0, finalTime.indexOf(\":\"));\r\n\t\tString MM = finalTime.substring(finalTime.indexOf(\":\") + 1, finalTime\r\n\t\t\t\t.indexOf(\" \"));\r\n\t\tString AMPM = finalTime.substring(finalTime.indexOf(\" \"), finalTime\r\n\t\t\t\t.length());\r\n\r\n\t\tif (MM.length() == 1)\r\n\t\t\tMM = \"0\" + MM;\r\n\r\n\t\tfinalTime = HH + \":\" + MM /*+ \" \" */+ AMPM;\r\n\r\n\t\treturn (finalTime);\r\n\t}",
"@Test\n\tpublic void test() throws InterruptedException {\n\t\tString firstTime = Time.main();\n\t\tString[] splitFirst = firstTime.split(\":\");\n\t\tThread.sleep(5000);\n\t\tString secondTime = Time.main();\n\t\tString[] splitSecond = secondTime.split(\":\");\n\t\t\n\t\t\n\t\tif(Integer.parseInt(splitFirst[2])>=55) //if first time was >= 55 seconds\n\t\t{\n\t\t\tassertEquals(Integer.parseInt(splitSecond[2]),(Integer.parseInt(splitFirst[2])+5)%60); //seconds should increase by 5 mod 60\n\n\t\t\tif(Integer.parseInt(splitFirst[1])==59) //if first time was 59 minutes\n\t\t\t{ \n\t\t\t\tassertTrue(splitFirst[1].equals(\"00\")); //reset to zero minutes\n\t\t\t\t\n\t\t\t\tif(Integer.parseInt(splitFirst[0])==23) //if first time was 23 hours\n\t\t\t\t\tassertTrue(splitFirst[0].equals(\"00\")); //reset to zero hours\n\t\t\t\telse //if first time is not 23 hours\n\t\t\t\t\tassertEquals(Integer.parseInt(splitFirst[0])+1, Integer.parseInt(splitSecond[0])); //hours should increase by 1\n\t\t\t}\n\t\t\telse //if first time was not 59 minutes\n\t\t\t{\n\t\t\t\tassertEquals(Integer.parseInt(splitFirst[1])+1, Integer.parseInt(splitSecond[1])); //minutes should increase by 1\n\t\t\t\tassertTrue(splitFirst[0].equals(splitSecond[0])); //hours should not change\n\t\t\t}\n\t\t}\n\t\telse //if first time was <= 55 seconds\n\t\t{\n\t\t\tassertEquals(Integer.parseInt(splitSecond[2]),(Integer.parseInt(splitFirst[2])+5)); //seconds should increase by 5\n\t\t\tassertTrue(splitFirst[1].equals(splitSecond[1])); //minutes should not change\n\t\t\tassertTrue(splitFirst[0].equals(splitSecond[0])); //hours should not change\n\t\t\t\n\t\t}\n\t\t\n\t}",
"public String getTimeString() {\n int hour = date.get(Calendar.HOUR);\n int minute = date.get(Calendar.MINUTE);\n\n String AM_PM = \"PM\";\n if (date.get(Calendar.AM_PM) == Calendar.AM) AM_PM = \"AM\";\n\n String hour_fixed = String.valueOf(hour);\n if (hour == 0) hour_fixed = \"12\";\n\n String minute_fixed = String.valueOf(minute);\n while (minute_fixed.length() < 2) {\n minute_fixed = \"0\" + minute_fixed;\n }\n\n return hour_fixed + \":\" + minute_fixed + ' ' + AM_PM;\n }",
"private static int computeTime(String time) {\n\t\tint ret = 0;\n\t\tint multiply = 1;\n\t\tint decimals = 1;\n\t\tfor (int i = time.length() - 1; i >= 0; --i) {\n\t\t\tif (time.charAt(i) == ':') {\n\t\t\t\tmultiply *= 60;\n\t\t\t\tdecimals = 1;\n\t\t\t} else {\n\t\t\t\tret += (time.charAt(i) - '0') * multiply * decimals;\n\t\t\t\tdecimals *= 10;\n\t\t\t}\n\t\t}\n\t\treturn ret;\n\t}",
"public String parseTimeToTimeDate(String time) {\n Date date = null;\n try {\n SimpleDateFormat simpleDateFormat = new SimpleDateFormat(\"yyyy-MM-dd HH:mm\", Locale.getDefault());\n String todaysDate = new SimpleDateFormat(\"yyyy-MM-dd\", Locale.getDefault()).format(new Date());\n date = simpleDateFormat.parse(todaysDate + \" \" + time);\n\n SimpleDateFormat sdf = new SimpleDateFormat(\"HH:mm dd,MMM\", Locale.getDefault());\n //sdf.setTimeZone(TimeZone.getTimeZone(\"UTC\"));\n return sdf.format(date);\n\n } catch (ParseException e) {\n e.printStackTrace();\n }\n return null;\n }",
"void milestone4(int inputSeconds){\n int days = inputSeconds / 86400;\n int seconds = inputSeconds % 86400;\n int hours = seconds / 3600;\n seconds = seconds % 3600;\n int minutes = seconds / 60;\n seconds = seconds % 60;\n\n System.out.println(\"Day/s: \" + days);\n System.out.println(\"Hour/s: \" + hours);\n System.out.println(\"Minute/s: \" + minutes);\n System.out.println(\"Second/s: \" + seconds);\n }",
"public Date getMidDay(TimeZone tz, int hr, int min, int sec)\n\t{\n\t\tCalendar cal = Calendar.getInstance(tz, Locale.US);\n\t\tcal.set(this.year, this.month-1, this.day, hr, min, sec);\n\t\tcal.set(Calendar.MILLISECOND, 0);\n\t\treturn cal.getTime();\n\t}",
"private static int validTimeLength(String timeString) {\n\t\tif (TextUtils.isEmpty(timeString)) { return 0; }\n\t\t\n\t\tint time;\n\t\ttry {\n\t\t\ttime = Integer.parseInt(timeString);\n\t\t\tif (time > MAX_TIME_VALUE) { time = MAX_TIME_VALUE; }\n\t\t} catch (Exception e) { // Don't care which exception it is.\n\t\t\ttime = MAX_TIME_VALUE;\n\t\t}\n\t\treturn time;\n\t}",
"public static int parseTimeForDB(Calendar c){\n return Integer.parseInt(c.get(Calendar.HOUR_OF_DAY) + \"\"\n + (c.get(Calendar.MINUTE) < 10 ? 0 + \"\" + c.get(Calendar.MINUTE) : c.get(Calendar.MINUTE)));\n }",
"public static String convert_minutes_to_hours(String minutess) {\n int hours = Integer.parseInt(minutess) / 60; //since both are ints, you get an int\n int minutes = Integer.parseInt(minutess) % 60;\n System.out.printf(\"%d:%02d\", hours, minutes);\n return hours + \":\" + minutes;\n }",
"public static int getHourOfTime(long time){\n \t//time-=59999;\n \tint retHour=0;\n \tlong edittime=time;\n \twhile (edittime>=60*60*1000){\n \t\tedittime=edittime-60*60*1000;\n \t\tretHour++;\n \t}\n \tretHour = retHour % 12;\n \tif (retHour==0){ retHour=12; }\n \treturn retHour;\n }",
"public static long dateToTime(String s) {\n\t\tSimpleDateFormat simpledateformat = new SimpleDateFormat(\"yyyyMMddHHmmss\");\n\t\tlong l;\n\t\ttry {\n\t\t\tl = simpledateformat.parse(s).getTime();\n\t\t} catch (ParseException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\tl = System.currentTimeMillis();\n\t\t}\n\n\t\treturn l;\n\n\t}",
"private String formatTime(int seconds){\n return String.format(\"%02d:%02d\", seconds / 60, seconds % 60);\n }",
"public String getCurrentTimeHourMinSec() {\n\t\t\t\t// DateFormat dateFormat = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\n\t\t\t\t// need to change after the date format is decided\n\t\t\t\tDateFormat dateFormat = new SimpleDateFormat(\"HH:mm:ss\");\n\t\t\t\tDate date = new Date();\n\t\t\t\treturn dateFormat.format(date);\n\t\t\t}",
"private String findMaximumValidTime1(int a, int b, int c, int d) {\n int[] arr = {a,b,c,d};\n int maxHr = -1;\n int hr_i = 0, hr_j = 0;\n\n //Find maximum HR\n for(int i=0; i < arr.length; i++){\n for(int j=i+1; j < arr.length; j++){\n int value1 = arr[i] * 10 + arr[j];\n int value2 = arr[j] * 10 + arr[i];\n if(value1 < 24 && value2 < 24){\n if(value1 > value2 && value1 > maxHr) {\n maxHr = value1;\n hr_i = i;\n hr_j = j;\n }else if(value2 > value1 && value2 > maxHr){\n maxHr = value2;\n hr_i = i;\n hr_j = j;\n }\n }else if(value1 < 24 && value2 > 24 && value1 > maxHr){\n maxHr = value1;\n hr_i = i;\n hr_j = j;\n }else if(value2 < 24 && value1 > 24 && value2 > maxHr){\n maxHr = value2;\n hr_i = i;\n hr_j = j;\n }\n\n }\n }\n System.out.println(maxHr);\n\n //Find maximum MM\n int[] mArr = new int[2]; //minutes array\n int k=0;\n for(int i=0; i < arr.length; i++){\n if(i != hr_i && i != hr_j){\n mArr[k++] = arr[i];\n }\n }\n\n System.out.println(Arrays.toString(mArr));\n int maxMin = -1;\n int val1 = mArr[0] * 10 + mArr[1];\n int val2 = mArr[1] * 10 + mArr[0];\n\n if(val1 < 60 && val2 < 60){\n maxMin = Math.max(val1,val2);\n }else if(val1 < 60 && val2 > 60) {\n maxMin = val1;\n }else if(val2 < 60 && val1 > 60){\n maxMin = val2;\n }\n System.out.println(maxMin);\n\n //Create answer\n StringBuilder sb = new StringBuilder();\n if(maxHr == -1 || maxMin == -1){\n return \"Not Possible\";\n }\n\n if(Integer.toString(maxHr).length() < 2){ //HR\n sb.append(\"0\"+maxHr+\":\");\n }else {\n sb.append(maxHr+\":\");\n }\n\n if(Integer.toString(maxMin).length() < 2){ //MM\n sb.append(\"0\"+maxMin);\n }else {\n sb.append(maxMin);\n }\n\n return sb.toString();\n }",
"private static String subtractTime(String curtime, String string) {\r\n\r\n\t\tString ff = \"\";\r\n\t\t\r\n\t\tint m2 = Integer.parseInt(curtime.substring(0,2));\r\n\t\tint m1 = Integer.parseInt(string.substring(0,2));\r\n\t\t\r\n\t\tint s2 = Integer.parseInt(curtime.substring(3,5));\r\n\t\tint s1 = Integer.parseInt(string.substring(3,5));\r\n\t\t\r\n\t\tif(s2<s1) {\r\n\t\t\tff = ((m2-m1)<0?Math.abs(m2-m1+59):m2-m1-1)+\":\"+Math.abs(s2-s1+60);\r\n\t\t}\r\n\t\telse {\r\n\t\t\tff = ((m2-m1)<0?Math.abs(m2-m1+60):m2-m1)+\":\"+(s2-s1);\r\n\t\t}\r\n\t\treturn ff;\r\n\t}",
"public final void mRULE_TWELVEHRSTIME() throws RecognitionException {\n try {\n int _type = RULE_TWELVEHRSTIME;\n int _channel = DEFAULT_TOKEN_CHANNEL;\n // InternalDSL.g:16739:20: ( '0' .. '1' '0' .. '9' ':' '0' .. '5' '0' .. '9' ( ':' '0' .. '6' '0' .. '9' ( '.' '0' .. '9' '0' .. '9' '0' .. '9' )? )? ( 'am' | 'pm' ) )\n // InternalDSL.g:16739:22: '0' .. '1' '0' .. '9' ':' '0' .. '5' '0' .. '9' ( ':' '0' .. '6' '0' .. '9' ( '.' '0' .. '9' '0' .. '9' '0' .. '9' )? )? ( 'am' | 'pm' )\n {\n matchRange('0','1'); \n matchRange('0','9'); \n match(':'); \n matchRange('0','5'); \n matchRange('0','9'); \n // InternalDSL.g:16739:62: ( ':' '0' .. '6' '0' .. '9' ( '.' '0' .. '9' '0' .. '9' '0' .. '9' )? )?\n int alt30=2;\n int LA30_0 = input.LA(1);\n\n if ( (LA30_0==':') ) {\n alt30=1;\n }\n switch (alt30) {\n case 1 :\n // InternalDSL.g:16739:63: ':' '0' .. '6' '0' .. '9' ( '.' '0' .. '9' '0' .. '9' '0' .. '9' )?\n {\n match(':'); \n matchRange('0','6'); \n matchRange('0','9'); \n // InternalDSL.g:16739:85: ( '.' '0' .. '9' '0' .. '9' '0' .. '9' )?\n int alt29=2;\n int LA29_0 = input.LA(1);\n\n if ( (LA29_0=='.') ) {\n alt29=1;\n }\n switch (alt29) {\n case 1 :\n // InternalDSL.g:16739:86: '.' '0' .. '9' '0' .. '9' '0' .. '9'\n {\n match('.'); \n matchRange('0','9'); \n matchRange('0','9'); \n matchRange('0','9'); \n\n }\n break;\n\n }\n\n\n }\n break;\n\n }\n\n // InternalDSL.g:16739:121: ( 'am' | 'pm' )\n int alt31=2;\n int LA31_0 = input.LA(1);\n\n if ( (LA31_0=='a') ) {\n alt31=1;\n }\n else if ( (LA31_0=='p') ) {\n alt31=2;\n }\n else {\n NoViableAltException nvae =\n new NoViableAltException(\"\", 31, 0, input);\n\n throw nvae;\n }\n switch (alt31) {\n case 1 :\n // InternalDSL.g:16739:122: 'am'\n {\n match(\"am\"); \n\n\n }\n break;\n case 2 :\n // InternalDSL.g:16739:127: 'pm'\n {\n match(\"pm\"); \n\n\n }\n break;\n\n }\n\n\n }\n\n state.type = _type;\n state.channel = _channel;\n }\n finally {\n }\n }",
"public static Date convert_string_time_into_original_time(String hhmmaa) {\n SimpleDateFormat dateFormat = new SimpleDateFormat(\"HH:mm aa\");\n Date convertedDate = new Date();\n try {\n convertedDate = dateFormat.parse(hhmmaa);\n } catch (ParseException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n return convertedDate;\n }",
"public static String getCurrentDateAtMidnight() throws Exception{\n\t\t \t SimpleDateFormat formatter1 = new SimpleDateFormat (\"yyyy-MM-dd 00:00:00\"); \t \n\t\t \t java.util.Date date = new Date(); \t \t \n\t\t \treturn formatter1.format(date);\n\t\t \t}",
"public static int secondsDifference(String start, String end) {\n int difference; //difference is initialized,and will be returned at the end.\n //firstsec is the amount of seconds past midnight in the start time, and\n //secondsec is the amount of seconds past midnight in the end time. In order to\n //calculate this, secondsAfterMidnight() method was called for start and end.\n int firstsec = secondsAfterMidnight(start); \n int secondsec = secondsAfterMidnight(end);\n //If start or end returns -1 through secondsAfterMidnight(), then the input was \n //not proper, so difference is set to -99999.\n if (firstsec == -1 || secondsec == -1){\n difference = -99999;\n }else { //if both inputs are proper, then proceed to calculating difference.\n difference = secondsec - firstsec;\n }\n return difference; //difference is returned to main. \n }",
"public static String getNowTimeHHMM() {\n\t\tSimpleDateFormat timeFormat = new SimpleDateFormat(\"HH:mm\");\n\t\treturn timeFormat.format(new Date());\n\t}",
"public static String tenthsToStringShort(int time) {\r\n\t\t// If we have negative time, just return zero\r\n\t\tif ( time < 0 ) {\r\n\t\t\treturn \"0:00\";\r\n\t\t}\r\n\t\t\r\n\t\tint sec = (time / 10) % 60;\r\n\t\tint min = (time / 10) / 60;\r\n\t\treturn String.format(\"%d:%02d\", min, sec);\r\n\t}",
"public static boolean getTime(){\r\n String choice = \"a\";\r\n boolean day = true, repeat = true;\r\n sc.nextLine();\r\n do{\r\n System.out.println(\"Please select day or night by typing in either \\\"Day\\\" or \\\"Night\\\"\");\r\n choice = sc.nextLine();\r\n choice = choice.trim();\r\n if(choice.equalsIgnoreCase(\"day\")){\r\n day = true;\r\n repeat = false;\r\n }\r\n else if(choice.equalsIgnoreCase(\"night\")){\r\n day = false;\r\n repeat = false;\r\n }\r\n else{\r\n System.out.println(\"Error: Incorrect input\");\r\n repeat = true;\r\n }\r\n }while(repeat);\r\n return day;\r\n }",
"public String selectendMinutes(String object, String data) {\n\t\tlogger.debug(\"Entering End minutes\");\n\t\ttry {\n\n\t\t\tString allObjs[] = object.split(Constants.DATA_SPLIT);\n\t\t\tobject = allObjs[0];\n\t\t\tString hr = allObjs[1];\n\t\t\tString endFinalMin = \"\";\n\t\t\tint num = 0;\n\t\t\tDate date = new Date();\n\t\t\tSimpleDateFormat timeFormat = new SimpleDateFormat(\"mm\");\n\t\t\ttimeFormat.setTimeZone(TimeZone.getTimeZone(\"US/Central\"));\n\t\t\tString Min = timeFormat.format(date.getTime());\n\t\t\tlogger.debug(timeFormat);\n\t\t\tlogger.debug(Min);\n\t\t\tint Minutes = Integer.parseInt(Min);\n\t\t\tlogger.debug(\"Minutes=\" + Minutes);\n\t\t\tif ((Minutes % 5) == 0) {\n\t\t\t\tint endMint = Minutes + 10;\n\t\t\t\tif (endMint == 60) {\n\t\t\t\t\tdata = String.valueOf(endMint);\n\t\t\t\t\tdata = \":\" + data;\n\t\t\t\t\tselectStartorDueHours(hr, data);\n\t\t\t\t\tendFinalMin = Constants.VALUE_DOUBLE_ZERO;\n\t\t\t\t\tselectList(object, endFinalMin);\n\t\t\t\t\treturn Constants.KEYWORD_PASS + \" End Minutes has been Entered.. \";\n\n\t\t\t\t}\n\t\t\t\tif (endMint > 60) {\n\t\t\t\t\tdata = String.valueOf(endMint);\n\t\t\t\t\tdata = \":\" + data;\n\t\t\t\t\tselectStartorDueHours(hr, data);\n\t\t\t\t\tendFinalMin = Constants.VALUE_05;\n\t\t\t\t\tselectList(object, endFinalMin);\n\t\t\t\t\treturn Constants.KEYWORD_PASS + \" End Minutes has been Entered.. \";\n\n\t\t\t\t}\n\t\t\t\tString FinalEndMint = String.valueOf(endMint);\n\t\t\t\tFinalEndMint = \":\" + FinalEndMint;\n\t\t\t\tselectList(object, FinalEndMint);\n\t\t\t\treturn Constants.KEYWORD_PASS + \" End Minutes has been Entered.. \";\n\t\t\t} else {\n\t\t\t\tint unitdigit = Minutes % 10;\n\t\t\t\tlogger.debug(\"Unitdigit=\" + unitdigit);\n\t\t\t\tnum = Minutes - unitdigit;\n\t\t\t\tlogger.debug(\"num=\" + num);\n\t\t\t\tif (unitdigit > 0 && unitdigit < 4) {\n\t\t\t\t\tnum = num + 10;\n\t\t\t\t\tif (num >= 60) {\n\t\t\t\t\t\tdata = String.valueOf(num);\n\t\t\t\t\t\tdata = \":\" + data;\n\t\t\t\t\t\tselectStartorDueHours(hr, data);\n\t\t\t\t\t\tendFinalMin = Constants.VALUE_DOUBLE_ZERO;\n\t\t\t\t\t\tselectList(object, endFinalMin);\n\t\t\t\t\t\treturn Constants.KEYWORD_PASS + \" End Minutes has been Entered.. \";\n\n\t\t\t\t\t}\n\t\t\t\t\tString num5 = String.valueOf(num);\n\t\t\t\t\tnum5 = \":\" + num5;\n\t\t\t\t\tselectList(object, num5);\n\t\t\t\t\treturn Constants.KEYWORD_PASS + \" End Minutes has been Entered.. \";\n\n\t\t\t\t} else if (unitdigit == 4) {\n\t\t\t\t\tnum = num + 15;\n\t\t\t\t\tif (num >= 60) {\n\t\t\t\t\t\tdata = String.valueOf(num);\n\t\t\t\t\t\tdata = \":\" + data;\n\t\t\t\t\t\tselectStartorDueHours(hr, data);\n\t\t\t\t\t\tendFinalMin = Constants.VALUE_05;\n\t\t\t\t\t\tselectList(object, endFinalMin);\n\t\t\t\t\t\treturn Constants.KEYWORD_PASS + \" End Minutes has been Entered.. \";\n\n\t\t\t\t\t}\n\t\t\t\t\tdata = String.valueOf(num);\n\t\t\t\t\tdata = \":\" + data;\n\t\t\t\t\t// selectStartorDueHours(hr, data);\n\t\t\t\t\tselectList(object, data);\n\t\t\t\t\treturn Constants.KEYWORD_PASS + \" End Minutes has been Entered.. \";\n\t\t\t\t} else if (unitdigit > 5 && unitdigit < 9) {\n\t\t\t\t\tnum = num + 15;\n\t\t\t\t\tif (num >= 60) {\n\t\t\t\t\t\tdata = String.valueOf(num);\n\t\t\t\t\t\tdata = \":\" + data;\n\t\t\t\t\t\tselectStartorDueHours(hr, data);\n\t\t\t\t\t\tendFinalMin = Constants.VALUE_05;\n\t\t\t\t\t\tselectList(object, endFinalMin);\n\t\t\t\t\t\treturn Constants.KEYWORD_PASS + \" End Minutes has been Entered.. \";\n\n\t\t\t\t\t}\n\t\t\t\t\tString num6 = String.valueOf(num);\n\t\t\t\t\tnum6 = \":\" + num6;\n\t\t\t\t\tselectList(object, num6);\n\t\t\t\t\treturn Constants.KEYWORD_PASS + \" End Minutes has been Entered.. \";\n\n\t\t\t\t} else if (unitdigit == 9) {\n\t\t\t\t\tnum = num + 20;\n\t\t\t\t\tif (num >= 60) {\n\t\t\t\t\t\tdata = String.valueOf(num);\n\t\t\t\t\t\tdata = \":\" + data;\n\t\t\t\t\t\tselectStartorDueHours(hr, data);\n\t\t\t\t\t\tnum = num - 60;\n\t\t\t\t\t\tString num7 = Constants.VALUE_0 + num;\n\t\t\t\t\t\tString num12 = String.valueOf(num7);\n\t\t\t\t\t\tselectList(object, num12);\n\t\t\t\t\t\treturn Constants.KEYWORD_PASS + \" End Minutes has been Entered.. \";\n\t\t\t\t\t} else if (num < 60) {\n\t\t\t\t\t\tString num8 = String.valueOf(num);\n\t\t\t\t\t\tnum8 = \":\" + num8;\n\t\t\t\t\t\tselectList(object, num8);\n\t\t\t\t\t\treturn Constants.KEYWORD_PASS + \" End Minutes has been Entered.. \";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t} catch (Exception e) {\n\n\t\t\treturn Constants.KEYWORD_FAIL + e.getMessage();\n\t\t}\n\t\treturn Constants.KEYWORD_PASS + \"---End Minutes has been Entered..\";\n\t}",
"public String getElapsedTimeHoursMinutesSecondsString(int milisec) {\n\t\t int time = milisec/1000;\n\t\t String seconds = Integer.toString((int)(time % 60)); \n\t\t String minutes = Integer.toString((int)((time % 3600) / 60)); \n\t\t String hours = Integer.toString((int)(time / 3600)); \n\t\t for (int i = 0; i < 2; i++) { \n\t\t if (seconds.length() < 2) { \n\t\t seconds = \"0\" + seconds; \n\t\t } \n\t\t if (minutes.length() < 2) { \n\t\t minutes = \"0\" + minutes; \n\t\t } \n\t\t if (hours.length() < 2) { \n\t\t hours = \"0\" + hours; \n\t\t } \n\t\t }\n\t\t String timeString = hours + \":\" + minutes + \":\" + seconds; \n\t\t return timeString;\n\t }",
"private void updateTime() \r\n\t {\r\n\t\t \r\n\t\t \tif(Hours.getValue() < 12)\r\n\t\t \t{\r\n\t\t \t\tdisplayString = Hours.getDisplayValue() + \":\" + Minutes.getDisplayValue() + \":\" + Seconds.getDisplayValue() + \" am\";\r\n\t\t System.out.println(displayString);\r\n\t\t \t}\r\n\t\t \t\r\n\t\t \telse if (Hours.getValue() > 12 && Hours.getValue() < 24 )\r\n\t\t \t{\r\n\t\t \t\tdisplayString = Hours.getDisplayValue() + \":\" + Minutes.getDisplayValue() + \":\" + Seconds.getDisplayValue() + \" pm\";\r\n\t\t System.out.println(displayString);\r\n\t\t \t}\r\n\t }",
"public int parseTimeForMinute(String time)\n\t{\n\t\ttry {\n\t\t\tDate date = new SimpleDateFormat(\"hh:mma\", Locale.ENGLISH).parse(time);\n\t\t\t\n\t\t\t@SuppressWarnings(\"deprecation\")\n\t\t\tint minute = date.getMinutes();\n\t\t\treturn minute;\n\t\t} catch (ParseException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn -1;\t\n\t}",
"public int parseTimeForHour(String time)\n\t{\n\t\ttry {\n\t\t\tDate date = new SimpleDateFormat(\"hh:mma\", Locale.ENGLISH).parse(time);\n\t\t\t\n\t\t\t@SuppressWarnings(\"deprecation\")\n\t\t\tint hour = date.getHours();\n\t\t\treturn hour;\n\t\t} catch (ParseException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn -1;\n\t}",
"public static String transformTime(int seconds) {\n if (seconds < 0)\n throw new IllegalArgumentException(\"Time must not be negative\");\n\n // Figure out the playtime in a human readable format\n final int secondsInMinute = 60;\n final int secondsInHour = 60 * secondsInMinute;\n final int secondsInDay = 24 * secondsInHour;\n final int secondsInWeek = 7 * secondsInDay;\n\n final int weeks = seconds / secondsInWeek;\n\n final int daySeconds = seconds % secondsInWeek;\n final int days = daySeconds / secondsInDay;\n\n final int hourSeconds = daySeconds % secondsInDay;\n final int hours = hourSeconds / secondsInHour;\n\n final int minuteSeconds = hourSeconds % secondsInHour;\n final int minutes = minuteSeconds / secondsInMinute;\n\n final int remainingSeconds = minuteSeconds % secondsInMinute;\n\n // Make some strings\n String weekString;\n String dayString;\n String hourString;\n String minuteString;\n String secondString;\n\n // Use correct grammar, and don't use it if it's zero\n if (weeks == 1)\n weekString = weeks + \" week\";\n else if (weeks == 0)\n weekString = \"\";\n else\n weekString = weeks + \" weeks\";\n\n if (days == 1)\n dayString = days + \" day\";\n else if (days == 0)\n dayString = \"\";\n else\n dayString = days + \" days\";\n\n if (hours == 1)\n hourString = hours + \" hour\";\n else if (hours == 0)\n hourString = \"\";\n else\n hourString = hours + \" hours\";\n\n if (minutes == 1)\n minuteString = minutes + \" minute\";\n else if (minutes == 0)\n minuteString = \"\";\n else\n minuteString = minutes + \" minutes\";\n\n if (remainingSeconds == 1)\n secondString = remainingSeconds + \" second\";\n else if (remainingSeconds == 0)\n secondString = \"\";\n else\n secondString = remainingSeconds + \" seconds\";\n\n ArrayList<String> results = new ArrayList<>();\n results.add(weekString);\n results.add(dayString);\n results.add(hourString);\n results.add(minuteString);\n results.add(secondString);\n\n for (int x = results.size() - 1; x >= 0; x--) {\n if (results.get(x).equals(\"\")) {\n results.remove(x);\n }\n }\n\n if (results.size() == 0)\n return \"0 seconds\";\n\n String finalResult = \"\";\n for (int x = 0; x < results.size(); x++) {\n if (x == results.size() - 1) {\n if (x == 0)\n finalResult = results.get(x);\n else\n finalResult = finalResult + \", \" + results.get(x);\n } else {\n if (x == 0)\n finalResult = results.get(x);\n else\n finalResult = finalResult + \", \" + results.get(x);\n }\n }\n\n return finalResult;\n }",
"public static void main(String[] args) {\n long hrs;\n long sec;\n Scanner userInput = new Scanner(System.in);\n System.out.println(\"enter hours\");\n hrs=userInput.nextInt();\n sec=hrs*60*60;\n System.out.println(\"sec\"+sec);\n\n}",
"public static String getYYYYMMDDHHMMSS()\r\n/* 56: */ {\r\n/* 57: 68 */ String nowTime = \"\";\r\n/* 58: 69 */ Date now = new Date();\r\n/* 59: 70 */ SimpleDateFormat formatter = new SimpleDateFormat(\"yyyyMMddHHmmss\");\r\n/* 60: 71 */ nowTime = formatter.format(now);\r\n/* 61: 72 */ return nowTime;\r\n/* 62: */ }",
"private String extractHourMinute(String dateTime)\n {\n String[] aux = dateTime.split(\"T\");\n String[] auxTime = aux[1].split(\":\");\n\n return auxTime[0] + \":\" + auxTime[1];\n }",
"public void decreaseSecond(){\n this.Decrease(); //Call decrease method from super class\r\n if(this.toString().equals(\"23:59:59 PM\")) //If hours, minutes, and seconds reahc their max value\r\n decreaseDay(); //Call decreaseDay method\r\n }",
"public static Calendar getTimeFromString(String timeStr) {\r\n\t\tDateFormat format = new SimpleDateFormat(\"hh:mm\");\r\n\t\tCalendar c = new GregorianCalendar();\r\n\t\t\r\n\t\tDate date;\r\n\t\ttry {\r\n\t\t\tdate = (Date)format.parse(timeStr.substring(0, timeStr.length()-1));\r\n\t\t\tc.setTime(date);\r\n\t\t\t\r\n\t\t\tif (timeStr.charAt(timeStr.length()-1) == 'p')\r\n\t\t\t\tc.set(Calendar.HOUR_OF_DAY, c.get(Calendar.HOUR) + 12);\r\n\t\t\telse\r\n\t\t\t\tc.set(Calendar.HOUR_OF_DAY, c.get(Calendar.HOUR));\r\n\t\t\t\r\n\t\t\tCalendar now = Calendar.getInstance();\r\n\t\t\t\r\n\t\t\tc.set(Calendar.DATE, now.get(Calendar.DATE));\r\n\t\t\tc.set(Calendar.MONTH, now.get(Calendar.MONTH));\r\n\t\t\tc.set(Calendar.YEAR, now.get(Calendar.YEAR));\r\n\t\t\t\r\n\t\t\treturn c;\r\n\t\t} catch (ParseException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\t\r\n\t}",
"public static String getTimeString(long hour, long minute, long second)\n\t{\n\t\tString hourString = null;\n\t\tString minuteString = null;\n\t\tString secondString = null;\n\t\t\n\t\tif (hour < 10)\n\t\t{\n\t\t\thourString = \"0\" + hour;\n\t\t}\n\t\telse\n\t\t{\n\t\t\thourString = \"\" + hour;\n\t\t}\n\t\t\n\t\tif (minute < 10)\n\t\t{\n\t\t\tminuteString = \"0\" + minute;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tminuteString = \"\" + minute;\n\t\t}\n\t\t\n\t\tif (second < 10)\n\t\t{\n\t\t\tsecondString = \"0\" + second;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tsecondString = \"\" + second;\n\t\t}\n\t\t\n\t\treturn hourString + \":\" + minuteString + \":\" + secondString;\n\t}",
"public String FormatTime(int hour, int minute) {\n\n String time;\n time = \"\";\n String formattedMinute;\n\n if (minute / 10 == 0) {\n formattedMinute = \"0\" + minute;\n } else {\n formattedMinute = \"\" + minute;\n }\n\n\n if (hour == 0) {\n time = \"12\" + \":\" + formattedMinute + \" AM\";\n } else if (hour < 12) {\n time = hour + \":\" + formattedMinute + \" AM\";\n } else if (hour == 12) {\n time = \"12\" + \":\" + formattedMinute + \" PM\";\n } else {\n int temp = hour - 12;\n time = temp + \":\" + formattedMinute + \" PM\";\n }\n\n\n return time;\n }",
"public static long toTime(String sHora) throws Exception {\n\n if (sHora.indexOf(\"-\") > -1) {\n sHora = sHora.replace(\"-\", \"\");\n }\n\n final SimpleDateFormat simpleDate = new SimpleDateFormat(CalendarParams.FORMATDATEENGFULL, getLocale(CalendarParams.LOCALE_EN));\n final SimpleDateFormat simpleDateAux = new SimpleDateFormat(CalendarParams.FORMATDATEEN, getLocale(CalendarParams.LOCALE_EN));\n\n final StringBuffer dateGerada = new StringBuffer();\n try {\n dateGerada.append(simpleDateAux.format(new Date()));\n dateGerada.append(' ');\n\n dateGerada.append(sHora);\n\n if (sHora.length() == 5) {\n dateGerada.append(\":00\");\n }\n\n return simpleDate.parse(dateGerada.toString()).getTime();\n } catch (ParseException e) {\n throw new Exception(\"Erro ao Converter Time\", e);\n }\n }",
"public static double getAttHour(String time1, String time2)\r\n/* 178: */ throws ParseException\r\n/* 179: */ {\r\n/* 180:258 */ double hour = 0.0D;\r\n/* 181:259 */ DateFormat fulDate = new SimpleDateFormat(\"HH:mm\");\r\n/* 182:260 */ long t12 = fulDate.parse(\"12:00\").getTime();\r\n/* 183:261 */ long t13 = fulDate.parse(\"13:00\").getTime();\r\n/* 184:262 */ long t1 = fulDate.parse(time1).getTime();\r\n/* 185:263 */ long PERHOUR = 3600000L;\r\n/* 186:264 */ if (time2 == null)\r\n/* 187: */ {\r\n/* 188:265 */ if (t12 - t1 > 0L) {\r\n/* 189:266 */ hour = (t12 - t1) / PERHOUR;\r\n/* 190: */ }\r\n/* 191: */ }\r\n/* 192: */ else\r\n/* 193: */ {\r\n/* 194:269 */ long t2 = fulDate.parse(time2).getTime();\r\n/* 195:270 */ if ((t1 <= t12) && (t2 >= t12) && (t2 <= t13)) {\r\n/* 196:271 */ hour = (t12 - t1) / PERHOUR;\r\n/* 197:272 */ } else if ((t1 <= t12) && (t2 >= t13)) {\r\n/* 198:273 */ hour = (t2 - t1) / PERHOUR - 1.0D;\r\n/* 199:274 */ } else if ((t1 >= t12) && (t1 <= t13) && (t2 >= t12) && (t2 <= t13)) {\r\n/* 200:275 */ hour = 0.0D;\r\n/* 201:276 */ } else if ((t1 >= t12) && (t1 <= t13) && (t2 >= t13)) {\r\n/* 202:277 */ hour = (t2 - t13) / PERHOUR;\r\n/* 203: */ } else {\r\n/* 204:279 */ hour = (t2 - t1) / PERHOUR;\r\n/* 205: */ }\r\n/* 206: */ }\r\n/* 207:282 */ DecimalFormat df = new DecimalFormat(\"#.0\");\r\n/* 208:283 */ return Double.parseDouble(df.format(hour));\r\n/* 209: */ }",
"public String selectStartMinutes(String object, String data) {\n\t\tlogger.debug(\"Entering start Minutes\");\n\t\ttry {\n\n\t\t\tString allObjs[] = object.split(Constants.DATA_SPLIT);\n\t\t\tobject = allObjs[0];\n\t\t\tString hr = allObjs[1];\n\t\t\tString FinalNum = \"\";\n\t\t\tint num = 0;\n\t\t\tDate date = new Date();\n\t\t\tSimpleDateFormat timeFormat = new SimpleDateFormat(\"mm\");\n\t\t\ttimeFormat.setTimeZone(TimeZone.getTimeZone(\"US/Central\"));\n\t\t\tString Min = timeFormat.format(date.getTime());\n\t\t\tlogger.debug(Min);\n\t\t\tint Minutes = Integer.parseInt(Min);\n\t\t\tlogger.debug(\"Minutes=\" + Minutes);\n\t\t\tif ((Minutes % 5) == 0) {\n\t\t\t\tnum = Minutes + 5;\n\t\t\t\tif (num == 5) {\n\t\t\t\t\tString num3 = Constants.VALUE_0 + num;\n\t\t\t\t\tselectList(object, num3);\n\t\t\t\t\tlogger.debug(\"when num==5:--\" + num3);\n\t\t\t\t\treturn Constants.KEYWORD_PASS + \" Start Minutes has been Entered.. \";\n\n\t\t\t\t}\n\t\t\t\tif (num >= 60) {\n\t\t\t\t\tdata = String.valueOf(num);\n\t\t\t\t\tdata = \":\" + data;\n\t\t\t\t\tselectStartorDueHours(hr, data);\n\t\t\t\t\tif (!(data.equals(Constants.VALUE_12))) {\n\t\t\t\t\t\tFinalNum = Constants.VALUE_DOUBLE_ZERO;\n\t\t\t\t\t\tselectList(object, FinalNum);\n\t\t\t\t\t\treturn Constants.KEYWORD_PASS + \" Start Minutes has been Entered.. \";\n\t\t\t\t\t}\n\n\t\t\t\t\treturn Constants.KEYWORD_PASS + \" Start Minutes has been Entered.. \";\n\t\t\t\t}\n\t\t\t\tFinalNum = String.valueOf(num);\n\t\t\t\tFinalNum = \":\" + FinalNum;\n\t\t\t\tselectList(object, FinalNum);\n\t\t\t\treturn Constants.KEYWORD_PASS + \" Start Minutes has been Entered.. \";\n\t\t\t} else {\n\t\t\t\tint unitdigit = Minutes % 10;\n\t\t\t\tlogger.debug(\"Unitdigit=\" + unitdigit);\n\t\t\t\tnum = Minutes - unitdigit;\n\t\t\t\tlogger.debug(\"num=\" + num);\n\t\t\t\tif (unitdigit > 0 && unitdigit < 4) {\n\t\t\t\t\tnum = num + 5;\n\t\t\t\t\tif (num == 5) {\n\t\t\t\t\t\tString num3 = Constants.VALUE_0 + num;\n\t\t\t\t\t\tselectList(object, String.valueOf(num3));\n\t\t\t\t\t\tlogger.debug(\"when num==5:--\" + num3);\n\t\t\t\t\t\treturn Constants.KEYWORD_PASS + \" Start Minutes has been Entered.. \";\n\t\t\t\t\t} else {\n\t\t\t\t\t\tString num3 = \":\" + num;\n\t\t\t\t\t\tselectList(object, String.valueOf(num3));\n\t\t\t\t\t\treturn Constants.KEYWORD_PASS + \" Start Minutes has been Entered.. \";\n\t\t\t\t\t}\n\t\t\t\t} else if (unitdigit == 4) {\n\t\t\t\t\tnum = num + 10;\n\t\t\t\t\tif (num >= 60) {\n\t\t\t\t\t\tdata = String.valueOf(num);\n\t\t\t\t\t\tdata = \":\" + data;\n\t\t\t\t\t\tselectStartorDueHours(hr, data);\n\t\t\t\t\t\tFinalNum = Constants.VALUE_DOUBLE_ZERO;\n\t\t\t\t\t\tselectList(object, FinalNum);\n\t\t\t\t\t\treturn Constants.KEYWORD_PASS + \" Start Minutes has been Entered.. \";\n\t\t\t\t\t}\n\t\t\t\t\tdata = String.valueOf(num);\n\t\t\t\t\tdata = \":\" + data;\n\t\t\t\t\tselectStartorDueHours(hr, data);\n\t\t\t\t\tString num8 = \":\" + num;\n\t\t\t\t\tselectList(object, String.valueOf(num8));\n\t\t\t\t\treturn Constants.KEYWORD_PASS + \" Start Minutes has been Entered.. \";\n\t\t\t\t} else if (unitdigit > 5 && unitdigit < 9) {\n\t\t\t\t\tnum = num + 10;\n\t\t\t\t\tif (num >= 60) {\n\t\t\t\t\t\tdata = String.valueOf(num);\n\t\t\t\t\t\tdata = \":\" + data;\n\t\t\t\t\t\tselectStartorDueHours(hr, data);\n\t\t\t\t\t\tFinalNum = Constants.VALUE_DOUBLE_ZERO;\n\t\t\t\t\t\tselectList(object, FinalNum);\n\t\t\t\t\t\treturn Constants.KEYWORD_PASS + \" Start Minutes has been Entered.. \";\n\t\t\t\t\t}\n\t\t\t\t} else if (unitdigit == 9) {\n\t\t\t\t\tnum = num + 15;\n\t\t\t\t\tif (num >= 60) {\n\t\t\t\t\t\tdata = String.valueOf(num);\n\t\t\t\t\t\tdata = \":\" + data;\n\t\t\t\t\t\tselectStartorDueHours(hr, data);\n\t\t\t\t\t\tnum = num - 60;\n\t\t\t\t\t\tif (num == 5) {\n\t\t\t\t\t\t\tString num3 = Constants.VALUE_0 + num;\n\t\t\t\t\t\t\tselectList(object, num3);\n\t\t\t\t\t\t\treturn Constants.KEYWORD_PASS + \" Start Minutes has been Entered.. \";\n\n\t\t\t\t\t\t}\n\t\t\t\t\t\tString num4 = String.valueOf(num);\n\t\t\t\t\t\tnum4 = \":\" + num4;\n\t\t\t\t\t\tselectList(object, num4);\n\t\t\t\t\t\treturn Constants.KEYWORD_PASS + \" Start Minutes has been Entered.. \";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tFinalNum = String.valueOf(num);\n\t\t\t\tFinalNum = \":\" + FinalNum;\n\t\t\t\tselectList(object, FinalNum);\n\t\t\t\treturn Constants.KEYWORD_PASS + \" Start Minutes has been Entered.. \";\n\t\t\t}\n\t\t} catch (Exception e) {\n\n\t\t\treturn Constants.KEYWORD_FAIL + e.getMessage();\n\t\t}\n\t}",
"public String convertCalendarDateTimeHourMinSecToMillisecondsAsString(String stringDate) throws ParseException {\n\t\t\t\tDateFormat formatter = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\n\t\t\t\tDate date = formatter.parse(stringDate);\n\t\t\t\tlong mills = date.getTime();\n\t\t\t\treturn String.valueOf(mills);\n\t\t\t}",
"public static String[] validateHours(String hours) {\n\tString[] hourString=new String[2];\r\n\tStringTokenizer st=new StringTokenizer(hours,\"-\");\r\n\ttry{\r\n\t\thourString[0]=st.nextToken();\r\n\t\thourString[1]=st.nextToken();\r\n\t}\r\n\tcatch(Exception e){\r\n\t\tSystem.out.println(\"Hours are not proper:\");\r\n\t\thourString[0]=null;\r\n\t\treturn hourString;\r\n\t}\r\n\tboolean validHour=validInteger(hourString[0]);\r\n\tif(!validHour || hourString[0].length()!=4){\r\n\t\tSystem.out.println(\"Invalid Start Time\");\r\n\t\thourString[0]=null;\r\n\t\treturn hourString;\r\n\t}\r\n\tvalidHour=validInteger(hourString[1]);\r\n\tif(!validHour || hourString[1].length()!=4){\r\n\t\tSystem.out.println(\"Invalid End Time Time\");\r\n\t\thourString[0]=null;\r\n\t\treturn hourString;\r\n\t}\r\n\tString time=hourString[0].substring(0, 2)+\":\"+hourString[0].substring(2, 4);\r\n\thourString[0]=time;\r\n\tSystem.out.println(\"Start Time : \"+time);\r\n\ttime=null;\r\n\ttime=hourString[1].substring(0, 2)+\":\"+hourString[1].substring(2, 4);\r\n\thourString[1]=time;\r\n\treturn hourString;\r\n}",
"public static LocalTime time1(double maxMinutes)\n\t{\n\t\t//declare variables\n\t\tString str;\n\t\tlong newMaxMinutes;\n\t\t\n\t\t//create new scanner object\n\t\tScanner keyboard = new Scanner(System.in);\n\t\t\n\t\tSystem.out.print(\"Please enter your time of departure as hh:mm AM or PM: \");\n\t\tstr = keyboard.nextLine(); //gets user input\n\t\tString t = str.toString(); //converts user input\n\t\tDateTimeFormatter x = DateTimeFormatter.ofPattern(\"hh:mm a\"); //provides format for user input\n\t\tLocalTime time1 = LocalTime.parse(t, x); //parses converted input and format\n\t\tnewMaxMinutes = Math.round(maxMinutes); //converts maxMinutes to long with Math.round function\n\t\tLocalTime arrive = time1.plusMinutes(newMaxMinutes); //adds minutes of maxMinutes to time1 using time class\n\t\t\n\t\treturn arrive;\n\t\t\n\t}",
"private static Date parseTimestampWithSeconds(String timestring) throws ParseException{\r\n boolean containsT = timestring.contains(\"T\");\r\n boolean containsSpace = timestring.contains(\" \");\r\n if(!containsT && containsSpace){\r\n try {\r\n Date date = formatSecs.parse(timestring);\r\n return date;\r\n } catch (ParseException e) {\r\n throw new ParseException(e.getMessage(), 0);\r\n }\r\n }\r\n else if(containsT && !containsSpace){\r\n try {\r\n Date date = formatSecsWT.parse(timestring);\r\n return date;\r\n } catch (ParseException e) {\r\n throw new ParseException(e.getMessage(), 0);\r\n }\r\n }\r\n else{\r\n throw new ParseException(\"Unsupported pattern!\", 0);\r\n }\r\n }",
"public static String toHHmmFromScheduleTime(ScheduleTime scheduleTime) {\n if (null != scheduleTime) {\n return toHHmm(scheduleTime.getStartTime());\n }\n return \"\";\n }"
] |
[
"0.60182196",
"0.5966318",
"0.59530705",
"0.5796412",
"0.57909256",
"0.57785404",
"0.5679145",
"0.5644399",
"0.5627994",
"0.56199574",
"0.5614542",
"0.549614",
"0.5490301",
"0.54032767",
"0.53760636",
"0.536063",
"0.53455836",
"0.5344091",
"0.53347844",
"0.5288512",
"0.5264515",
"0.52609897",
"0.52404267",
"0.5193703",
"0.51864654",
"0.5153678",
"0.50841063",
"0.50644135",
"0.49886978",
"0.4973958",
"0.49737206",
"0.49700263",
"0.4969447",
"0.49638984",
"0.49605888",
"0.49513197",
"0.49509835",
"0.49499372",
"0.49462223",
"0.49442464",
"0.49433836",
"0.4941157",
"0.49263355",
"0.4923111",
"0.4916223",
"0.48964486",
"0.48874462",
"0.4883579",
"0.48774883",
"0.48179546",
"0.4817345",
"0.48164284",
"0.4815553",
"0.4807675",
"0.47999394",
"0.47837996",
"0.47826257",
"0.4779137",
"0.477655",
"0.47657505",
"0.47588268",
"0.47583416",
"0.47494686",
"0.47456577",
"0.47401872",
"0.47349417",
"0.47200134",
"0.47171405",
"0.47167692",
"0.4707261",
"0.47029346",
"0.4700806",
"0.46994781",
"0.4695973",
"0.4693017",
"0.46918845",
"0.46887457",
"0.468721",
"0.4677937",
"0.46725932",
"0.46634364",
"0.46573532",
"0.4655794",
"0.46457678",
"0.46400914",
"0.4638354",
"0.46253318",
"0.46238393",
"0.46117318",
"0.46054253",
"0.4584911",
"0.45820868",
"0.45820245",
"0.45625696",
"0.456182",
"0.45505708",
"0.45469278",
"0.45453095",
"0.45447657",
"0.45444366"
] |
0.81961715
|
0
|
secondsDifference Input: two time of day Strings Returns: integer number of seconds difference between time of day inputs (Returns 99999 if either time of day inputs invalid) General time of day format HH:MM:SS Examples: start end Return Value "12:34:09AM""12:00:00PM" 41151 "3:03:03PM""12:00:02am"54181 "6:34:52PM""6:34:52PM"0 "3:03:03PM" "7:91:73PM"99999 "Nice""Day"99999
|
public static int secondsDifference(String start, String end) {
int difference; //difference is initialized,and will be returned at the end.
//firstsec is the amount of seconds past midnight in the start time, and
//secondsec is the amount of seconds past midnight in the end time. In order to
//calculate this, secondsAfterMidnight() method was called for start and end.
int firstsec = secondsAfterMidnight(start);
int secondsec = secondsAfterMidnight(end);
//If start or end returns -1 through secondsAfterMidnight(), then the input was
//not proper, so difference is set to -99999.
if (firstsec == -1 || secondsec == -1){
difference = -99999;
}else { //if both inputs are proper, then proceed to calculating difference.
difference = secondsec - firstsec;
}
return difference; //difference is returned to main.
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public long dayDiffCalculator(String a, String b){\n\n long dateDiff = 0;\n\n Date d1 = null;\n Date d2 = null;\n\n try{\n d1 = sdf.parse(a);\n d2 = sdf.parse(b);\n\n long diff = d2.getTime() - d1.getTime();\n\n long diffSeconds = diff / 1000 % 60;\n long diffMinutes = diff / (60 * 1000) % 60;\n long diffHours = diff / (60 * 60 * 1000) % 24;\n long diffDays = diff / (24 * 60 * 60 * 1000);\n\n dateDiff = diffDays;\n\n } catch (Exception e){}\n\n return dateDiff;\n }",
"private String getTimeDifference(long actualTime) {\n\t\tlong seconds = actualTime % (1000 * 60);\n\t\tlong minutes = actualTime / (1000 * 60);\n\n\t\tString result = null;\n\n\t\tif (minutes < 10) {\n\t\t\tresult = \"0\" + minutes + \":\";\n\t\t} else {\n\t\t\tresult = minutes + \":\";\n\t\t}\n\n\t\tif (seconds < 10) {\n\t\t\tresult += \"0\" + seconds;\n\t\t} else {\n\t\t\tString sec = seconds + \"\";\n\t\t\tresult += sec.substring(0, 2);\n\t\t}\n\n\t\treturn result;\n\t}",
"public static int secondsAfterMidnight(String t) {\n int seconds; //initializing seconds, will be returned to main.\n t.toLowerCase(); //setting all input to lowercase so it is easier to handle.\n if (t.length() == 10){ //if input is 10 characters\n // if statement below checks whether each character is appropriate before continuing.\n if((t.startsWith(\"0\") || t.startsWith(\"1\"))&& Character.isDigit(t.charAt(1))&& \n t.charAt(2) == ':' && Character.isDigit(t.charAt(3))&& Character.isDigit(t.charAt(4))&&\n t.charAt(5) == ':' && Character.isDigit(t.charAt(6))&& Character.isDigit(t.charAt(7))&&\n (t.endsWith(\"am\") || t.endsWith(\"pm\"))){\n // Characters converted to numeric values and hours, minutes, and seconds are\n // calculated below.\n int hours = Character.getNumericValue(t.charAt(0))*10 \n + Character.getNumericValue(t.charAt(1));\n //if hours is equal to 12 such as 12:35, switched to 0:35, for easier calc.\n if(hours == 12){ \n hours = 0;\n }\n int minutes = Character.getNumericValue(t.charAt(3))*10 \n + Character.getNumericValue(t.charAt(4));\n seconds = Character.getNumericValue(t.charAt(6))*10 \n + Character.getNumericValue(t.charAt(7)); \n if(minutes < 60 && seconds < 60){//checks whether minute and second input is below 60.\n if(t.endsWith(\"pm\")){ //adding 43200 (12 hours in seconds) if time is pm.\n seconds = hours*3600 + minutes*60 + seconds + 43200;\n }else{\n seconds = hours*3600 + minutes*60 + seconds; \n }\n }else{\n seconds = -1; //if proper input is not given, seconds set to -1.\n }\n } else {\n seconds = -1; //improper input leads to seconds set to -1.\n }\n //below is for input that has 9 characters, such as 9:12:23am, instead of 09:12:23am. The code below\n // is very similar to to code for 10 characters above. \n }else if (t.length() == 9){\n if(Character.isDigit(t.charAt(0))&& t.charAt(1) == ':' && Character.isDigit(t.charAt(2))\n && Character.isDigit(t.charAt(3))&& t.charAt(4) == ':' && Character.isDigit(t.charAt(5))\n && Character.isDigit(t.charAt(6))&&(t.endsWith(\"am\") || t.endsWith(\"pm\"))){\n int hours = Character.getNumericValue(t.charAt(0));\n int minutes = Character.getNumericValue(t.charAt(2))*10 \n + Character.getNumericValue(t.charAt(3));\n seconds = Character.getNumericValue(t.charAt(5))*10 \n + Character.getNumericValue(t.charAt(6)); \n if(minutes < 60 && seconds < 60){\n if(t.endsWith(\"pm\")){\n seconds = hours*3600 + minutes*60 + seconds + 43200;\n }else{\n seconds = hours*3600 + minutes*60 + seconds; \n }\n }else{\n seconds = -1;\n }\n } else {\n seconds = -1;\n }\n }else{ // if input has neither 10 or 9 characters, input not proper.\n seconds = -1;\n }\n return seconds; //seconds is returned to main.\n}",
"public static String getDurationString(long minutes, long seconds) {\n if(minutes>=0 && (seconds >=0 && seconds<=59)){\n// minutes = hours/60;\n// seconds = hours/3600;\n long hours = minutes / 60;\n long remainingMinutes = minutes % 60;\n\n return hours + \" h \" + remainingMinutes + \"m \" + seconds + \"s\";\n }\n else\n\n {\n return \"invalid value\";\n }\n }",
"public static String calcualte_timeDifference(String datetobeFormatted) {\n\n int days = 0,hours = 0,minutes = 0,seconds = 0,weeks=0;\n try {\n Calendar c = Calendar.getInstance();\n SimpleDateFormat df_current = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\n String formattedDate = df_current.format(c.getTime());\n Date date_current = df_current.parse(formattedDate);\n\n SimpleDateFormat df = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\n Date date = df.parse(datetobeFormatted);\n\n\n DateTime dt1 = new DateTime(date);\n DateTime dt2 = new DateTime(date_current);\n\n days = Days.daysBetween(dt1, dt2).getDays();\n hours = Hours.hoursBetween(dt1, dt2).getHours() % 24;\n minutes = Minutes.minutesBetween(dt1, dt2).getMinutes() % 60;\n seconds = Seconds.secondsBetween(dt1, dt2).getSeconds() % 60;\n weeks = Weeks.weeksBetween(dt1, dt2).getWeeks();\n\n\n Log.i(\"Date \",datetobeFormatted);\n Log.i(\"Days \",(Days.daysBetween(dt1, dt2).getDays() + \" days, \"));\n //Log.i(\"Days \",Hours.hoursBetween(dt1, dt2).getHours() % 24 + \" hours, \");\n //Log.i(\"Days \",Minutes.minutesBetween(dt1, dt2).getMinutes() % 60 + \" minutes, \");\n\n\n\n } catch (ParseException e) {\n e.printStackTrace();\n }\n if(weeks>1)\n {\n return weeks+\"w\";\n }else\n {\n return days+\"d\";\n }\n /* else if(hours>1 && days<1)\n {\n return hours+\"h\";\n }\n else if(minutes>1 && hours<1)\n {\n return minutes+\"m\";\n }else\n {\n return seconds+\"s\";\n }*/\n }",
"private int getSecondsFromTimeString(String text) {\n int timeInSeconds = -1;\n if ( text != null && !\"\".equals(text) ) {\n int ipos = text.indexOf(\"Date:\");\n String txtDate = (ipos >= 0 ? text.substring(ipos+5).trim() : text.trim());\n ipos = text.lastIndexOf(\":\");\n if ( ipos > 0 ) {\n int endPos = ipos + 3;\n ipos = text.lastIndexOf(\":\",ipos-1);\n if ( ipos > 0 ) {\n int startPos = ipos - 2;\n if ( startPos >= 0 && endPos > startPos ) {\n text = text.substring(startPos, endPos);\n String[] values = text.split(\":\");\n if ( values.length > 2 ) {\n int hours = Integer.valueOf(values[0]);\n int minutes = Integer.valueOf(values[1]);\n int seconds = Integer.valueOf(values[2]);\n timeInSeconds = (hours * 3600) + (minutes * 60) + seconds;\n }\n }\n }\n }\n }\n return timeInSeconds;\n }",
"public void calculateHours(String time1, String time2) {\n Date date1, date2;\n int days, hours, min;\n SimpleDateFormat simpleDateFormat = new SimpleDateFormat(\"hh:mm aa\", Locale.US);\n try {\n date1 = simpleDateFormat.parse(time1);\n date2 = simpleDateFormat.parse(time2);\n\n long difference = date2.getTime() - date1.getTime();\n days = (int) (difference / (1000 * 60 * 60 * 24));\n hours = (int) ((difference - (1000 * 60 * 60 * 24 * days)) / (1000 * 60 * 60));\n min = (int) (difference - (1000 * 60 * 60 * 24 * days) - (1000 * 60 * 60 * hours)) / (1000 * 60);\n hours = (hours < 0 ? -hours : hours);\n SessionHour = hours;\n SessionMinit = min;\n Log.i(\"======= Hours\", \" :: \" + hours + \":\" + min);\n\n if (SessionMinit > 0) {\n if (SessionMinit < 10) {\n SessionDuration = SessionHour + \":\" + \"0\" + SessionMinit + \" hrs\";\n } else {\n SessionDuration = SessionHour + \":\" + SessionMinit + \" hrs\";\n }\n } else {\n SessionDuration = SessionHour + \":\" + \"00\" + \" hrs\";\n }\n } catch (ParseException e) {\n e.printStackTrace();\n }\n }",
"public static int compareTime(String time1, String time2)\r\n/* 83: */ {\r\n/* 84:110 */ String[] timeArr1 = (String[])null;\r\n/* 85:111 */ String[] timeArr2 = (String[])null;\r\n/* 86:112 */ timeArr1 = time1.split(\":\");\r\n/* 87:113 */ timeArr2 = time2.split(\":\");\r\n/* 88:114 */ int minute1 = Integer.valueOf(timeArr1[0]).intValue() * 60 + \r\n/* 89:115 */ Integer.valueOf(timeArr1[1]).intValue();\r\n/* 90:116 */ int minute2 = Integer.valueOf(timeArr2[0]).intValue() * 60 + \r\n/* 91:117 */ Integer.valueOf(timeArr2[1]).intValue();\r\n/* 92:118 */ return minute1 - minute2;\r\n/* 93: */ }",
"public String fnTimeDiffference(long startTime, long endTime) {\r\n\r\n\t\t//Finding the difference in milliseconds\r\n\t\tlong delta = endTime - startTime;\r\n\r\n\t\t//Finding number of days\r\n\t\tint days = (int) delta / (24 * 3600 * 1000);\r\n\r\n\t\t//Finding the remainder\r\n\t\tdelta = (int) delta % (24 * 3600 * 1000);\r\n\r\n\t\t//Finding number of hrs\r\n\t\tint hrs = (int) delta / (3600 * 1000);\r\n\r\n\t\t//Finding the remainder\r\n\t\tdelta = (int) delta % (3600 * 1000);\r\n\r\n\t\t//Finding number of minutes\r\n\t\tint min = (int) delta / (60 * 1000);\r\n\r\n\t\t//Finding the remainder\r\n\t\tdelta = (int) delta % (60 * 1000);\r\n\r\n\t\t//Finding number of seconds\r\n\t\tint sec = (int) delta / 1000;\r\n\r\n\t\t//Concatenting to get time difference in the form day:hr:min:sec \r\n\t\t//String strTimeDifference = days + \":\" + hrs + \":\" + min + \":\" + sec;\r\n\t\tString strTimeDifference = days + \"d \" + hrs + \"h \" + min + \"m \" + sec + \"s\";\r\n\t\treturn strTimeDifference;\r\n\t}",
"private static String subtractTime(String curtime, String string) {\r\n\r\n\t\tString ff = \"\";\r\n\t\t\r\n\t\tint m2 = Integer.parseInt(curtime.substring(0,2));\r\n\t\tint m1 = Integer.parseInt(string.substring(0,2));\r\n\t\t\r\n\t\tint s2 = Integer.parseInt(curtime.substring(3,5));\r\n\t\tint s1 = Integer.parseInt(string.substring(3,5));\r\n\t\t\r\n\t\tif(s2<s1) {\r\n\t\t\tff = ((m2-m1)<0?Math.abs(m2-m1+59):m2-m1-1)+\":\"+Math.abs(s2-s1+60);\r\n\t\t}\r\n\t\telse {\r\n\t\t\tff = ((m2-m1)<0?Math.abs(m2-m1+60):m2-m1)+\":\"+(s2-s1);\r\n\t\t}\r\n\t\treturn ff;\r\n\t}",
"private long getTimeDifference(Time timeValue1, Time timeValue2){\n return (timeValue2.getTime()-timeValue1.getTime())/1000;\n }",
"public static int getQuot(String time1, String time2)\r\n/* 164: */ throws ParseException\r\n/* 165: */ {\r\n/* 166:239 */ SimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd\");\r\n/* 167:240 */ Calendar cal = Calendar.getInstance();\r\n/* 168:241 */ cal.setTime(sdf.parse(time1));\r\n/* 169:242 */ long start = cal.getTimeInMillis();\r\n/* 170:243 */ cal.setTime(sdf.parse(time2));\r\n/* 171:244 */ long end = cal.getTimeInMillis();\r\n/* 172:245 */ long between_days = (end - start) / 86400000L;\r\n/* 173: */ \r\n/* 174:247 */ return Integer.parseInt(String.valueOf(between_days));\r\n/* 175: */ }",
"protected EditorLanguage timeDiff(String varStart, String varEnd)\n\t{\n\t\treturn text('(').text(varEnd).text(\" - \").text(varStart).text(\") / 1000.0\");\n\t}",
"public static double convertHoursMinutesAndSecondsStringToDouble(String hoursMinutesAndSeconds) {\n double result = -1;\n\n hoursMinutesAndSeconds = replaceUnwantedCharsWithSpace(hoursMinutesAndSeconds);\n\n String hmsParts[] = hoursMinutesAndSeconds.split(\" \");\n if (hmsParts.length == 3) {\n double h = convertPartToLong(hmsParts[0]);\n double m = convertPartToLong(hmsParts[1]);\n double s = convertPartToLong(hmsParts[2]);\n\n result = h + (m / 60) + (s / 3600);\n }\n\n return result;\n }",
"public int getDifferenceInDate(String sPreviousDate, String sCurrentDate) {\n Calendar calPrevious = null;\n Calendar calCurrent = null;\n String[] arrTempDate = null;\n long longPreviousDate = 0;\n long longCurrentTime = 0;\n int timeDelay = 0;\n try {\n if (sPreviousDate.contains(\":\") && sCurrentDate.contains(\":\")) {\n arrTempDate = sPreviousDate.split(\":\");\n calPrevious = Calendar.getInstance();\n calPrevious.set(Integer.parseInt(arrTempDate[0]), (Integer.parseInt(arrTempDate[1]) - 1),\n Integer.parseInt(arrTempDate[2]), Integer.parseInt(arrTempDate[3]), Integer.parseInt(arrTempDate[4]));\n arrTempDate = sCurrentDate.split(\":\");\n\n calCurrent = Calendar.getInstance();\n calCurrent.set(Integer.parseInt(arrTempDate[0]), (Integer.parseInt(arrTempDate[1]) - 1),\n Integer.parseInt(arrTempDate[2]), Integer.parseInt(arrTempDate[3]), Integer.parseInt(arrTempDate[4]));\n longPreviousDate = Long.parseLong(new SimpleDateFormat(\"yyyyMMddHHmm\").format(calPrevious.getTime()));\n longCurrentTime = Long.parseLong(new SimpleDateFormat(\"yyyyMMddHHmm\").format(calCurrent.getTime()));\n ///println(\"Previous Time In Int= \"+longPreviousDate);\n //println(\"Current Time In Int= \"+longCurrentTime);\n if (longCurrentTime > longPreviousDate) {\n while (true) {\n timeDelay++;\n calCurrent.add(Calendar.MINUTE, -1);\n longCurrentTime = Long.parseLong(new SimpleDateFormat(\"yyyyMMddHHmm\").format(calCurrent.getTime()));\n //println(\"Previous Time In Int= \"+longPreviousDate);\n //println(\"Current Time In Int= \"+longCurrentTime);\n if (longCurrentTime < longPreviousDate) {\n break;\n }\n }\n }\n }\n } catch (Exception e) {\n println(\"getDifferenceInDate : Exception : \" + e.toString());\n } finally {\n return timeDelay;\n }\n }",
"public static int convertTimetoSec(String hour, String minute, String seconds)\n\t{\n\t\tint h, m, s;\n\t\tint timeinsec = 1000;\n\n\t\th = Integer.parseInt(hour);\n\t\tm = Integer.parseInt(minute);\n\t\ts = Integer.parseInt(seconds);\n\n\t\ttimeinsec = 3600*h + 60*m + s;\n\n\t\treturn timeinsec;\t\n\t}",
"private int compareTimes(String time1, String time2) {\n \n String[] timeOneSplit = time1.trim().split(\":\");\n String[] timeTwoSplit = time2.trim().split(\":\");\n \n \n if (timeOneSplit.length == 2 && timeTwoSplit.length == 2) {\n \n String[] minutesAmPmSplitOne = new String[2];\n minutesAmPmSplitOne[1] = timeOneSplit[1].trim().substring(0, timeOneSplit[1].length() - 2);\n minutesAmPmSplitOne[1] = timeOneSplit[1].trim().substring(timeOneSplit[1].length() - 2, timeOneSplit[1].length());\n\n String[] minutesAmPmSplitTwo = new String[2];\n minutesAmPmSplitTwo[1] = timeTwoSplit[1].trim().substring(0, timeTwoSplit[1].length() - 2);\n minutesAmPmSplitTwo[1] = timeTwoSplit[1].trim().substring(timeTwoSplit[1].length() - 2, timeTwoSplit[1].length());\n \n int hourOne = Integer.parseInt(timeOneSplit[0]);\n int hourTwo = Integer.parseInt(timeTwoSplit[0]);\n \n //increment hours depending on am or pm\n if (minutesAmPmSplitOne[1].trim().equalsIgnoreCase(\"pm\")) {\n hourOne += 12;\n }\n if (minutesAmPmSplitTwo[1].trim().equalsIgnoreCase(\"pm\")) {\n hourTwo += 12;\n }\n \n if (hourOne < hourTwo) {\n \n return -1;\n }\n else if (hourOne > hourTwo) {\n \n return 1;\n }\n else {\n \n int minutesOne = Integer.parseInt(minutesAmPmSplitOne[0]);\n int minutesTwo = Integer.parseInt(minutesAmPmSplitTwo[0]);\n \n if (minutesOne < minutesTwo) {\n \n return -1;\n }\n else if (minutesOne > minutesTwo) {\n \n return 1;\n }\n else {\n \n return 0;\n }\n }\n }\n //time1 exists, time 2 doesn't, time 1 comes first!\n else if (timeOneSplit.length == 2 && timeTwoSplit.length != 2) {\n return -1;\n }\n else {\n return 1;\n }\n }",
"public static int[] getElapsedTime(Date first, Date second) {\n if (first.compareTo(second) == 1 ) {\n return null;\n }\n int difDays = 0;\n int difHours = 0;\n int difMinutes = 0;\n\n Calendar c = Calendar.getInstance();\n c.setTime(first);\n int h1 = c.get(Calendar.HOUR_OF_DAY);\n int m1 = c.get(Calendar.MINUTE);\n\n c.setTime(second);\n int h2 = c.get(Calendar.HOUR_OF_DAY);\n int m2 = c.get(Calendar.MINUTE);\n\n if (sameDay(first, second)) {\n difHours = h2 - h1;\n } else {\n difDays = getNumberOfDays(first, second)-1;\n if (h1 >= h2) {\n difDays--;\n difHours = (24 - h1) + h2;\n } else {\n difHours = h2 - h1;\n }\n }\n\n if (m1 >= m2) {\n difHours--;\n difMinutes = (60 - m1) + m2;\n } else {\n difMinutes = m2 - m1;\n }\n\n int[] result = new int[3];\n result[0] = difDays;\n result[1] = difHours;\n result[2] = difMinutes;\n return result;\n }",
"public static long TimeInformationToSeconds(String info){\n\t\tif(info.indexOf(':') > 0){\n\t\t\tString[] data = info.split(\":\");\n\t\t\tlong hours = Long.parseLong(data[0]);\n\t\t\tlong minutes = Long.parseLong(data[1]);\n\t\t\tlong seconds = Long.parseLong(data[2].split(\"[.]\")[0]);\n\t\t\tlong milliseconds = Long.parseLong(data[2].split(\"[.]\")[1]);\n\t\t\treturn (hours * 3600000) + (minutes * 60000) + (seconds * 1000) + milliseconds;\n\t\t}else{\n\t\t\n\t\t/*\n\t\tSystem.out.println(info.substring(0, info.indexOf(\"day\")));\n\t\tSystem.out.println(info.substring(0, info.indexOf(\"day\")));\n\t\tSystem.out.println(info.substring(info.indexOf(\" \"), info.indexOf(\":\")));\n\t\tSystem.out.println(info.substring(info.indexOf(':'), info.lastIndexOf(':')));\n\t\tSystem.out.println(info.substring(info.lastIndexOf(':'), info.indexOf('.')));\n\t\tSystem.out.println(info.substring(info.indexOf('.')));\n/*\t\tlong days = Long.parseLong(info.substring(0, info.indexOf(\"day\")));\n\t\tlong hours = Long.parseLong(info.substring(info.indexOf(\" \"), info.indexOf(\":\")));\n\t\tlong minutes = Long.parseLong(info.substring(info.indexOf(':'), info.lastIndexOf(':')));\n\t\tlong seconds = Long.parseLong(info.substring(info.lastIndexOf(':'), info.indexOf('.')));\n\t\tlong milliseconds = Long.parseLong(info.substring(info.indexOf('.')));\n\t*/\t\n\t\t}\n\t\treturn 1;//(days * 86400000) + (hours * 3600000) + (minutes * 60000) + (seconds * 1000) + milliseconds;\n\t}",
"public static String trackDurationConverter(int secondsInput)\r\n {\r\n String result;\r\n if(secondsInput > 0)\r\n {\r\n String tmpSec = \"\"; \r\n int tmpMin = 0;\r\n\r\n String seconds = Integer.toString(secondsInput % 60);\r\n String minutes = Integer.toString((secondsInput/60) % 60);\r\n String hours = Integer.toString((secondsInput/60) / 60);\r\n\r\n seconds = Integer.parseInt(seconds) < 9 ? \"0\"+seconds : seconds;\r\n minutes = Integer.parseInt(minutes) < 9 ? \"0\"+minutes : minutes;\r\n hours = Integer.parseInt(hours) < 9 ? \"0\"+hours : hours;\r\n\r\n if(Integer.parseInt(seconds) <= 30)\r\n {\r\n tmpSec = \"30\";\r\n tmpMin = Integer.parseInt(minutes);\r\n }\r\n else\r\n {\r\n tmpSec = \"00\";\r\n tmpMin = Integer.parseInt(minutes) + 1;\r\n }\r\n String tmpResult = tmpMin < 9 ? \"0\"+Integer.toString(tmpMin) : Integer.toString(tmpMin);\r\n String typeOfTime = tmpResult.equals(\"00\") ? \" sec\" : \" min\";\r\n\r\n result = \"circa \" + tmpResult + \":\" + tmpSec + typeOfTime;\r\n return result;\r\n }\r\n else\r\n {\r\n return result = \"-1\";\r\n }\r\n }",
"public static long calculateBySecondsCompareNow(long timeday) {\n\t\tSimpleDateFormat formatter = new SimpleDateFormat(\"yyyyMMddHHmmss\");\n\t\tParsePosition pos = new ParsePosition(0);\n\t\tDate dt1 = formatter.parse(String.valueOf(timeday), pos);\n\t\tDate date = new Date();\n\t\treturn dt1.getTime() - date.getTime();\n\t\t\n\t}",
"public static float diffDate(String timeStart, String timeStop) throws Exception {\n SimpleDateFormat sdf = new SimpleDateFormat(DATE_FORMAT, Locale.ENGLISH);\n Date firstDate = sdf.parse(timeStart);\n Date secondDate = sdf.parse(timeStop);\n long diffInMilliSeconds = Math.abs(secondDate.getTime() - firstDate.getTime());\n return TimeUnit.MINUTES.convert(diffInMilliSeconds, TimeUnit.MILLISECONDS) / 60f;\n }",
"private Duration getDurationFromTimeView() {\n String text = timeView.getText().toString();\n String[] values = text.split(\":\");\n\n int hours = Integer.parseInt(values[0]);\n int minutes = Integer.parseInt(values[1]);\n int seconds = Integer.parseInt(values[2]);\n\n return Utils.hoursMinutesSecondsToDuration(hours, minutes, seconds);\n }",
"static String timeCount_2(List<String> Arr){\n int timeHH = 0;\n int timeMI = 0;\n int timeSS = 0;\n \n int timeSum_second = 0;\n \n String r_hh = \"\";\n String r_mi = \"\";\n String r_ss = \"\";\n\n for(int i = 0; i < Arr.size(); i++ ){\n \n if (Pattern.matches(\"\\\\d{2}:\\\\d{2}:\\\\d{2}\", Arr.get(i))){\n \n String[] s = Arr.get(i).split(\":\");\n int hh = Integer.parseInt(s[0]);\n int mi = Integer.parseInt(s[1]);\n int ss = Integer.parseInt(s[2]);\n\n timeSum_second += hh*60*60 + mi*60 + ss;\n \n }\n else{\n continue;\n }\n }\n \n timeHH = timeSum_second/60/60;\n timeMI = (timeSum_second%(60*60))/60;\n timeSS = timeSum_second%60;\n \n if (timeHH < 10){\n r_hh = \"0\" + timeHH;\n }\n else{\n r_hh = Integer.toString(timeHH);\n }\n \n if (timeMI < 10){\n r_mi = \"0\" + timeMI;\n }\n else{\n r_mi = Integer.toString(timeMI);\n }\n \n if (timeSS < 10){\n r_ss = \"0\" + timeSS;\n }\n else{\n r_ss = Integer.toString(timeSS);\n }\n \n String result = r_hh + \":\" + r_mi + \":\" + r_ss;\n \n return result;\n }",
"public String duration(){\n long duration =beginTime.getTime()-endTime.getTime();\n long diffMinutes = duration / (60 * 1000) % 60;\n long diffHours = duration / (60 * 60 * 1000);\n if(diffHours ==0)\n return -1*diffMinutes + \" minutes\";\n else\n return \" \"+-1*diffHours+\":\"+ -1*diffMinutes +\"min\";\n }",
"public static double getAttHour(String time1, String time2)\r\n/* 178: */ throws ParseException\r\n/* 179: */ {\r\n/* 180:258 */ double hour = 0.0D;\r\n/* 181:259 */ DateFormat fulDate = new SimpleDateFormat(\"HH:mm\");\r\n/* 182:260 */ long t12 = fulDate.parse(\"12:00\").getTime();\r\n/* 183:261 */ long t13 = fulDate.parse(\"13:00\").getTime();\r\n/* 184:262 */ long t1 = fulDate.parse(time1).getTime();\r\n/* 185:263 */ long PERHOUR = 3600000L;\r\n/* 186:264 */ if (time2 == null)\r\n/* 187: */ {\r\n/* 188:265 */ if (t12 - t1 > 0L) {\r\n/* 189:266 */ hour = (t12 - t1) / PERHOUR;\r\n/* 190: */ }\r\n/* 191: */ }\r\n/* 192: */ else\r\n/* 193: */ {\r\n/* 194:269 */ long t2 = fulDate.parse(time2).getTime();\r\n/* 195:270 */ if ((t1 <= t12) && (t2 >= t12) && (t2 <= t13)) {\r\n/* 196:271 */ hour = (t12 - t1) / PERHOUR;\r\n/* 197:272 */ } else if ((t1 <= t12) && (t2 >= t13)) {\r\n/* 198:273 */ hour = (t2 - t1) / PERHOUR - 1.0D;\r\n/* 199:274 */ } else if ((t1 >= t12) && (t1 <= t13) && (t2 >= t12) && (t2 <= t13)) {\r\n/* 200:275 */ hour = 0.0D;\r\n/* 201:276 */ } else if ((t1 >= t12) && (t1 <= t13) && (t2 >= t13)) {\r\n/* 202:277 */ hour = (t2 - t13) / PERHOUR;\r\n/* 203: */ } else {\r\n/* 204:279 */ hour = (t2 - t1) / PERHOUR;\r\n/* 205: */ }\r\n/* 206: */ }\r\n/* 207:282 */ DecimalFormat df = new DecimalFormat(\"#.0\");\r\n/* 208:283 */ return Double.parseDouble(df.format(hour));\r\n/* 209: */ }",
"public long getDifference(Date startDate, Date endDate){\n\n //milliseconds\n long different = endDate.getTime() - startDate.getTime();\n\n System.out.println(\"startDate : \" + startDate);\n System.out.println(\"endDate : \"+ endDate);\n System.out.println(\"different : \" + different);\n\n long secondsInMilli = 1000;\n long minutesInMilli = secondsInMilli * 60;\n long hoursInMilli = minutesInMilli * 60;\n long daysInMilli = hoursInMilli * 24;\n\n long elapsedDays = different / daysInMilli;\n different = different % daysInMilli;\n\n long elapsedHours = different / hoursInMilli;\n different = different % hoursInMilli;\n\n long elapsedMinutes = different / minutesInMilli;\n different = different % minutesInMilli;\n\n long elapsedSeconds = different / secondsInMilli;\n\n System.out.printf(\n \"%d days, %d hours, %d minutes, %d seconds%n\",\n elapsedDays,\n elapsedHours, elapsedMinutes, elapsedSeconds);\n\n return elapsedMinutes;\n }",
"static String timeCount_1(List<String> Arr){\n int timeHH = 0;\n int timeMI = 0;\n int timeSS = 0;\n \n String r_hh = \"\";\n String r_mi = \"\";\n String r_ss = \"\";\n\n for(int i = 0; i < Arr.size(); i++ ){\n \n if (Pattern.matches(\"\\\\d{2}:\\\\d{2}:\\\\d{2}\", Arr.get(i))){\n \n String[] s = Arr.get(i).split(\":\");\n int hh = Integer.parseInt(s[0]);\n int mi = Integer.parseInt(s[1]);\n int ss = Integer.parseInt(s[2]);\n \n timeHH += hh;\n timeMI += mi;\n timeSS += ss;\n \n }\n else{\n continue;\n }\n }\n \n timeMI += timeSS / 60;\n timeSS %= 60;\n \n timeHH += timeMI / 60;\n timeMI %= 60; \n\n \n if (timeHH < 10){\n r_hh = \"0\" + timeHH;\n }\n else{\n r_hh = Integer.toString(timeHH);\n }\n \n if (timeMI < 10){\n r_mi = \"0\" + timeMI;\n }\n else{\n r_mi = Integer.toString(timeMI);\n }\n \n if (timeSS < 10){\n r_ss = \"0\" + timeSS;\n }\n else{\n r_ss = Integer.toString(timeSS);\n }\n \n \n \n String result = r_hh + \":\" + r_mi + \":\" + r_ss;\n //String result = timeHH + \":\" + timeMI + \":\" + timeSS;\n \n return result;\n }",
"static int calculateTimeDelta(TimeInterval interval_1, TimeInterval interval_2) {\n TimeInterval earlier;\n TimeInterval later;\n if (interval_1.getStartTime().before(interval_2.getStartTime())) {\n earlier = interval_1;\n later = interval_2;\n } else {\n earlier = interval_2;\n later = interval_1;\n }\n\n return (int) (later.getStartTime().getTime() - earlier.getStopTime().getTime());\n }",
"private String secondsToMinutesAndSeconds(double seconds) {\n\t\tint numberOfminutes = (int) (seconds / 60);\n\t\tint numberOfSeconds = (int) (seconds % 60);\n\t\tif (numberOfSeconds < 10) {\n\t\t\treturn numberOfminutes + \":0\" + numberOfSeconds;\n\t\t} else {\n\t\t\treturn numberOfminutes + \":\" + numberOfSeconds;\n\t\t}\n\t}",
"private static int convertTimeToSecs(String time){\n if (time == null) return 0;\n String hours = time.substring(0, 2);\n String mins = time.substring(3,5);\n return Integer.parseInt(hours)*3600 + Integer.parseInt(mins)*60;\n }",
"private static long convertTimeToSeconds(String time) {\n\n\t\tString[] timeArray = time.split(\":\");\n\t\tint hours = Integer.parseInt(timeArray[0]);\n\t\tint minutes = Integer.parseInt(timeArray[1]);\n\t\tint seconds = Integer.parseInt(timeArray[2]);\n\n\t\treturn (hours * 3600) + (minutes * 60) + seconds;\n\t}",
"static String timeConversion1(String s) {\n String[] timeSplit = s.split(\":\");\n String hours = timeSplit[0];\n String minutes = timeSplit[1];\n String seconds = timeSplit[2].substring(0, 2);\n String ampm = timeSplit[2].substring(2);\n\n int hour = Integer.parseInt(hours);\n\n int differential = 0;\n if (\"PM\".equals(ampm) && hour != 12) {\n differential = 12;\n }\n\n\n hour += differential;\n hour = hour % 24;\n\n hours = String.format(\"%02d\", hour);\n\n return hours + \":\" + minutes + \":\" + seconds;\n\n }",
"public static String getDurationString(long seconds) {\n long hours = seconds / 3600;\n long minutes = (seconds % 3600) / 60;\n long secs = seconds % 60;\n if (hours > 0) {\n return twoDigitString(hours) + \":\" + twoDigitString(minutes) + \":\" + twoDigitString(secs);\n }\n return twoDigitString(minutes) + \":\" + twoDigitString(secs);\n }",
"public String durationInMinutesAndSeconds( ){\n\t\t\n\t\tString time = \"\";\n\t\t\n\t\tint duration = totalTime();\n\n\t\tint minutes = 0;\n\n\t\tint seconds = 0;\n\n\t\tminutes = (int) (duration/60);\n\n\t\tseconds = (int) (duration- (minutes*60));\n\n\t\ttime = minutes + \":\" + seconds +\"\";\n\t\treturn time;\n\t\t\n\t}",
"public String conversionToDuration(String startTime, String endTime) {\n\t\tboolean is24hr;\n\t\n\t\t\n\t\tis24hr=DateFormat.is24HourFormat(PlayUpActivity.context);\n\t\tString[] months = new DateFormatSymbols(Locale.getDefault()).getShortMonths();\n\t\tString result = \"\";\n//\t\tString[] months = { resource.getString(R.string.jan),\n//\t\t\t\tresource.getString(R.string.feb),\n//\t\t\t\tresource.getString(R.string.mar),\n//\t\t\t\tresource.getString(R.string.apr),\n//\t\t\t\tresource.getString(R.string.may),\n//\t\t\t\tresource.getString(R.string.jun),\n//\t\t\t\tresource.getString(R.string.jul),\n//\t\t\t\tresource.getString(R.string.aug),\n//\t\t\t\tresource.getString(R.string.sep),\n//\t\t\t\tresource.getString(R.string.oct),\n//\t\t\t\tresource.getString(R.string.nov),\n//\t\t\t\tresource.getString(R.string.dec),\n//\t\t\t\t\n//\t\t};\n\t\tString[] dat_time_format, time_details = null;\n\t\tint startYear = 0, startMonth = 0, startDate = 0, endYear = 0, endMonth = 0, endDate = 0;\n\t\tString startHour = null, startMinute = null, endHour = null, endMinute = null;\n\n\t\t// If startTime is not empty string it will be converted into local time\n\t\t// and will be parsed\n\t\tif ((startTime != null) && (!startTime.equals(\"\"))) {\n\t\t\tstartTime = gmtToLocal(startTime);\n\t\t\n\t\t\tdat_time_format = startTime.split(\"T\");\n\t\t\t\n\t\t\t\n\t\t\t/**\n\t\t\t * Date:18/07/2012\n\t\t\t * Sprint:20\n\t\t\t * */\n\t\t\t// split date into yyyy/mm/dd format yyyy-mm-ddThh:mm:ssZ\n\t\t\tif(dat_time_format!=null && dat_time_format[0]!=null)\n\t\t\t\ttime_details = dat_time_format[0].split(\"-\");\n\t\t\t\n\t\t\tif(time_details!=null && time_details[0]!=null && (!time_details[0].equalsIgnoreCase(\"\"))){\n\t\t\t\tstartYear = Integer.parseInt(time_details[0]);\n\t\t\t}\n\t\t\tif(time_details!=null && time_details[1]!=null && (!time_details[1].equalsIgnoreCase(\"\"))){\n\t\t\t\tstartMonth = Integer.parseInt(time_details[1]);\n\t\t\t}\n\t\t\tif(time_details!=null && time_details[2]!=null && (!time_details[2].equalsIgnoreCase(\"\"))){\n\t\t\t\tstartDate = Integer.parseInt(time_details[2]);\n\t\t\t}\n\t\t\t\n\t\t\t/**\n\t\t\t * Date:18/07/2012\n\t\t\t * Sprint:20\n\t\t\t * */\n\t\t\t time_details = null;\n\t\t\t// split time into hh/mm/ss format\n\t\t\tif(dat_time_format!=null && dat_time_format[1]!=null)\n\t\t\t\ttime_details = dat_time_format[1].split(\":\");\n\t\t\t\n\t\t\tif(time_details!=null && time_details[0]!=null && (!time_details[0].equalsIgnoreCase(\"\"))){\n\t\t\t\tstartHour = time_details[0];\n\t\t\t}\n\t\t\tif(time_details!=null && time_details[1]!=null && (!time_details[1].equalsIgnoreCase(\"\"))){\n\t\t\t\tstartMinute = time_details[1];\n\t\t\t}\n\t\t\t\n\t\t}\n\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t// If endTime is not empty string it will be converted into local time\n\t\t// and will be parsed\n\t\tif ((endTime != null) && (!endTime.equals(\"\"))) {\n\t\t\tendTime = gmtToLocal(endTime);\n\t\t\t\n\t\t\t// split end time into two parts date and time\n\t\t\tdat_time_format = endTime.split(\"T\");\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t/**\n\t\t\t * Date:18/07/2012\n\t\t\t * Sprint:20\n\t\t\t * */\n\t\t\ttime_details=null;\n\t\t\t// split date into yyyy/mm/dd format\n\t\t\tif(dat_time_format!=null && dat_time_format[0]!=null)\n\t\t\t\ttime_details = dat_time_format[0].split(\"-\");\n\t\t\t\n\t\t\t\n\t\t\tif(time_details!=null && time_details[0]!=null && (!time_details[0].equalsIgnoreCase(\"\"))){\n\t\t\t\tendYear = Integer.parseInt(time_details[0]);\n\t\t\t}\n\t\t\tif(time_details!=null && time_details[1]!=null && (!time_details[1].equalsIgnoreCase(\"\"))){\n\t\t\t\tendMonth = Integer.parseInt(time_details[1]);\n\t\t\t}\n\t\t\tif(time_details!=null && time_details[2]!=null && (!time_details[2].equalsIgnoreCase(\"\"))){\n\t\t\t\tendDate = Integer.parseInt(time_details[2]);\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t/**\n\t\t\t * Date:18/07/2012\n\t\t\t * Sprint:20\n\t\t\t * */\n\t\t\t\n\t\t\ttime_details = null;\n\t\t\t// split time into hh/mm/ss format\n\t\t\tif(dat_time_format!=null && dat_time_format[1]!=null)\n\t\t\t\ttime_details = dat_time_format[1].split(\":\");\n\t\t\n\t\t\tif(time_details!=null && time_details[0]!=null && (!time_details[0].equalsIgnoreCase(\"\"))){\n\t\t\t\tendHour = time_details[0];\n\t\t\t}\n\t\t\tif(time_details!=null && time_details[1]!=null && (!time_details[1].equalsIgnoreCase(\"\"))){\n\t\t\t\tendMinute = time_details[1];\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\n\t\t\t\n\n\t\t\t\n\t\t\t\n\n\t\t}\n\n\t\tif (((startTime == null) || (startTime.equals(\"\")))\n\t\t\t\t&& ((endTime == null) || (endTime.equals(\"\")))) {\n\t\t\t// If startTime and endTime are empty empty string will be returned\n\t\t\tresult = \"\";\n\t\t} else if ((startTime == null) || (startTime.equals(\"\"))) {\n\t\t\t// If startTime is empty and end time is not empty end time will be\n\t\t\t// returned\n//\t\t\tresult = (endDate > 9 ? endDate : (\"0\" + endDate)) + \" \"\n//\t\t\t\t\t+ months[endMonth - 1] + \" \" + \n//\t\t\t\t\t( is24hr ? (endHour + \":\" + endMinute) : covertTo12hrFormat( endHour, endMinute, true) )+\n//\t\t\t\t\t\" - \"+\" \";\n\t\t\t\n\t\t\t\n\t\t\tresult = (endDate > 9 ? endDate : (\"0\" + endDate)) + \" \"\n\t\t\t+ months[endMonth - 1] + \" - \" + (endDate > 9 ? endDate : (\"0\" + endDate)) + \" \"\n\t\t\t+ months[endMonth - 1];\n\t\t\t\n\t\t} else if ((endTime == null) || (endTime.equals(\"\"))) {\n\t\t\t// If endTime is empty and startTime is not empty start time will be\n\t\t\t// returned\n//\t\t\tresult = (startDate > 9 ? startDate : (\"0\" + startDate)) + \" \"\n//\t\t\t\t\t+ months[startMonth - 1] + \" \" +\n//\t\t\t\t\t( is24hr ? (startHour + \":\" + startMinute) : covertTo12hrFormat( startHour, startMinute, true) )\n//\t\t\t\t\t+ \" - \"+\" \";\n\t\t\tresult = (startDate > 9 ? startDate : (\"0\" + startDate)) + \" \"\n\t\t\t+ months[startMonth - 1] + \" - \" +(startDate > 9 ? startDate : (\"0\" + startDate)) + \" \"\n\t\t\t+ months[startMonth - 1];\n\t\t\t\n\t\t} else if ( startTime.equalsIgnoreCase( endTime ) ) {\n\t\t\tresult = (startDate > 9 ? startDate : (\"0\" + startDate)) + \" \"\n\t\t\t\t\t+ months[startMonth - 1] \n\t\t\t\t\t+ \" - \"+(startDate > 9 ? startDate : (\"0\" + startDate)) + \" \"\n\t\t\t\t\t+ months[startMonth - 1]; \n\t\t\t\t\t\n\t\t} else {\n\t\t\t// If endTime and startTime are not empty then appropriate string\n\t\t\t// will be returned\n\t\t\tif (startYear == endYear) {\n\t\t\t\t\n\t\t\t\tif (startMonth == endMonth) {\n\t\t\t\t\t\n\t\t\t\t\tif (startDate == endDate) {\n\t\t\t\t\t\n\t\t\t\t\t\t// Converting same date,month and year\n\t\t\t\t\t\t// \"08 JAN 08:30 - 12:45 \"\n//\t\t\t\t\t\tboolean showMeridiem;\n//\t\t\t\t\t\tif(( Integer.parseInt(startHour)<12 && Integer.parseInt(endHour) <12 )||( Integer.parseInt(startHour)>=12 && Integer.parseInt(endHour) >= 12 ))\n//\t\t\t\t\t\t\tshowMeridiem=false;\n//\t\t\t\t\t\telse\n//\t\t\t\t\t\t\tshowMeridiem=true;\n\t\t\t\t\t\t\n//\t\t\t\t\t\tresult = (startDate > 9 ? startDate : (\"0\" + startDate))\n//\t\t\t\t\t\t\t\t+ \" \"\n//\t\t\t\t\t\t\t\t+ months[startMonth - 1]\n//\t\t\t\t\t\t\t\t+ \" \"\n//\t\t\t\t\t\t\t\t+( is24hr ? (startHour + \":\" + startMinute) : covertTo12hrFormat( startHour, startMinute , showMeridiem ) )\n//\t\t\t\t\t\t\t\t+ \" - \"\n//\t\t\t\t\t\t\t\t+ ( is24hr ? (endHour + \":\" + endMinute) : covertTo12hrFormat( endHour, endMinute, true) );\n\t\t\t\t\t\t\n\t\t\t\t\t\tresult = (startDate > 9 ? startDate : (\"0\" + startDate)) + \" \"\n\t\t\t\t\t\t\t\t+ months[startMonth - 1] + \n\t\t\t\t\t\t\t\t \" - \" + (startDate > 9 ? startDate : (\"0\" + startDate)) + \" \"\n\t\t\t\t\t\t\t\t\t+ months[startMonth - 1]; \n\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\t// Converting same month, year but different dates\n\t\t\t\t\t\t// \"08 - 12 JAN\"\n\t\t\t\t\t\tresult = (startDate > 9 ? startDate : (\"0\" + startDate))\n\t\t\t\t\t\t\t\t+ \" \"+months[startMonth - 1]+\" - \"\n\t\t\t\t\t\t\t\t+ (endDate > 9 ? endDate : (\"0\" + endDate))\n\t\t\t\t\t\t\t\t+ \" \" + months[startMonth - 1];\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t// Converting different months but same year\n\t\t\t\t\t// \"08 JAN - 27 JUN\"\n\t\t\t\t\tresult = (startDate > 9 ? startDate : (\"0\" + startDate))\n\t\t\t\t\t\t\t+ \" \" + months[startMonth - 1] + \" - \"\n\t\t\t\t\t\t\t+ (endDate > 9 ? endDate : (\"0\" + endDate)) + \" \"\n\t\t\t\t\t\t\t+ months[endMonth - 1];\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// Converting different years,months and dates\n\t\t\t\t// \"JAN 2012 - JUN 2014\"\n\t\t\t\tresult = months[startMonth - 1] + \" \" + startYear + \" - \"\n\t\t\t\t\t\t+ months[endMonth - 1] + \" \" + endYear;\n\t\t\t}\n\t\t}\n\n\t\treturn result;\n\t}",
"long endSleep (String begin){\n\t\tendSleepTime = new SimpleDateFormat(\"HH:mm\").format(new Date());\n\t\tSimpleDateFormat sdf = new SimpleDateFormat(\"HH:mm\");\n\t\ttry {\n\t\t\tDate d1 = sdf.parse(begin);\n\t\t\tDate d2 = sdf.parse(endSleepTime);\n\t\t long totalSleepTime = ((d2.getTime() - d1.getTime())); \n\t\t return totalSleepTime;\n\t\t} catch (ParseException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn totalSleepTime;\n\t}",
"public static String getWorkTimeSecondsInFormattedString(long seconds) {\r\n int totalMinutos = (int) (seconds/60);\r\n int totalHoras = totalMinutos / 60;\r\n int restoMinutos = totalMinutos % 60;\r\n int restoSegundos = (int) (seconds % 60);\r\n\r\n return (totalHoras + \":\" + restoMinutos + \":\" + restoSegundos);\r\n\r\n }",
"public static void main(String[] args) {\n \n Scanner sc = new Scanner (System.in);\n int D = Integer.parseInt(sc.nextLine());\n //Input duration from user\n \n int t = 1200;\n //Current time\n \n int c = 0;\n //Counter variable that will note the number of times an arithmetic series is created in the time\n \n //loop that will check for an arithmetic series in the digit of the t (time) variable\n for (int i=0; i <D; i++){\n \n int l = String.valueOf(D).length();\n //This determines the length of the current number\n int L2 = 0;\n int L1 = 0; \n int L3 = 0;\n int L4 = 0; \n \n if (l == 3) {\n L3 = Character.getNumericValue((String.valueOf(D)).charAt(1)); \n L2 = Character.getNumericValue((String.valueOf(D)).charAt(2));\n L1 = Character.getNumericValue((String.valueOf(D)).charAt(3));\n \n if ((L3-L2)==(L2-L1))\n c++;\n }\n else if (l == 4) { \n L4 = Character.getNumericValue((String.valueOf(D)).charAt(1)); \n L3 = Character.getNumericValue((String.valueOf(D)).charAt(2)); \n L2 = Character.getNumericValue((String.valueOf(D)).charAt(3));\n L1 = Character.getNumericValue((String.valueOf(D)).charAt(4));\n \n if ((L4-L3)==(L3-L2)&&(L3-L2)==(L2-L1))\n c++; \n }\n \n //Exit conditions for the D variables\n \n //Determines the last two digits of the time in order to determine if it is time to change the hour\n // (if the last digits are 59)\n \n if (D == 1259)\n D = 100;\n else if ((L2 == 5) && (L1 == 9)) \n D+=41;\n else\n D++;\n \n }\n \n \n }",
"public static String transformTime(int seconds) {\n if (seconds < 0)\n throw new IllegalArgumentException(\"Time must not be negative\");\n\n // Figure out the playtime in a human readable format\n final int secondsInMinute = 60;\n final int secondsInHour = 60 * secondsInMinute;\n final int secondsInDay = 24 * secondsInHour;\n final int secondsInWeek = 7 * secondsInDay;\n\n final int weeks = seconds / secondsInWeek;\n\n final int daySeconds = seconds % secondsInWeek;\n final int days = daySeconds / secondsInDay;\n\n final int hourSeconds = daySeconds % secondsInDay;\n final int hours = hourSeconds / secondsInHour;\n\n final int minuteSeconds = hourSeconds % secondsInHour;\n final int minutes = minuteSeconds / secondsInMinute;\n\n final int remainingSeconds = minuteSeconds % secondsInMinute;\n\n // Make some strings\n String weekString;\n String dayString;\n String hourString;\n String minuteString;\n String secondString;\n\n // Use correct grammar, and don't use it if it's zero\n if (weeks == 1)\n weekString = weeks + \" week\";\n else if (weeks == 0)\n weekString = \"\";\n else\n weekString = weeks + \" weeks\";\n\n if (days == 1)\n dayString = days + \" day\";\n else if (days == 0)\n dayString = \"\";\n else\n dayString = days + \" days\";\n\n if (hours == 1)\n hourString = hours + \" hour\";\n else if (hours == 0)\n hourString = \"\";\n else\n hourString = hours + \" hours\";\n\n if (minutes == 1)\n minuteString = minutes + \" minute\";\n else if (minutes == 0)\n minuteString = \"\";\n else\n minuteString = minutes + \" minutes\";\n\n if (remainingSeconds == 1)\n secondString = remainingSeconds + \" second\";\n else if (remainingSeconds == 0)\n secondString = \"\";\n else\n secondString = remainingSeconds + \" seconds\";\n\n ArrayList<String> results = new ArrayList<>();\n results.add(weekString);\n results.add(dayString);\n results.add(hourString);\n results.add(minuteString);\n results.add(secondString);\n\n for (int x = results.size() - 1; x >= 0; x--) {\n if (results.get(x).equals(\"\")) {\n results.remove(x);\n }\n }\n\n if (results.size() == 0)\n return \"0 seconds\";\n\n String finalResult = \"\";\n for (int x = 0; x < results.size(); x++) {\n if (x == results.size() - 1) {\n if (x == 0)\n finalResult = results.get(x);\n else\n finalResult = finalResult + \", \" + results.get(x);\n } else {\n if (x == 0)\n finalResult = results.get(x);\n else\n finalResult = finalResult + \", \" + results.get(x);\n }\n }\n\n return finalResult;\n }",
"public String twoDatesBetweenTime(Date oldtime)\n {\n int day = 0;\n int hh = 0;\n int mm = 0;\n int ss =0;\n SimpleDateFormat dateFormat = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\n Date oldDate = oldtime;\n Date cDate = new Date();\n Long timeDiff = cDate.getTime() - oldDate.getTime();\n day = (int) TimeUnit.MILLISECONDS.toDays(timeDiff);\n hh = (int) (TimeUnit.MILLISECONDS.toHours(timeDiff) - TimeUnit.DAYS.toHours(day));\n mm = (int) (TimeUnit.MILLISECONDS.toMinutes(timeDiff) - TimeUnit.HOURS.toMinutes(TimeUnit.MILLISECONDS.toHours(timeDiff)));\n ss = (int) (TimeUnit.MILLISECONDS.toSeconds(timeDiff)- TimeUnit.MINUTES.toSeconds(TimeUnit.MILLISECONDS.toMinutes(timeDiff)));\n DecimalFormat formatter = new DecimalFormat(\"00\");\n String hhf = formatter.format(hh);\n String mmf = formatter.format(mm);\n String ssf = formatter.format(ss);\n return hhf+\":\"+mmf+\":\"+ssf;\n }",
"public long printDifferenceDay(Date startDate, Date endDate){\n\n //milliseconds\n long different = endDate.getTime() - startDate.getTime();\n\n long secondsInMilli = 1000;\n long minutesInMilli = secondsInMilli * 60;\n long hoursInMilli = minutesInMilli * 60;\n long daysInMilli = hoursInMilli * 24;\n\n double elapsedDays = (double) Math.ceil((different / daysInMilli) + 0.5);\n different = different % daysInMilli;\n\n long elapsedHours = different / hoursInMilli;\n different = different % hoursInMilli;\n\n long elapsedMinutes = different / minutesInMilli;\n different = different % minutesInMilli;\n\n long elapsedSeconds = different / secondsInMilli;\n\n return (long) elapsedDays;\n //System.out.printf(\"%d days, %d hours, %d minutes, %d seconds%n\",elapsedDays,elapsedHours, elapsedMinutes, elapsedSeconds);\n\n }",
"public void decreaseSecond(){\n this.Decrease(); //Call decrease method from super class\r\n if(this.toString().equals(\"23:59:59 PM\")) //If hours, minutes, and seconds reahc their max value\r\n decreaseDay(); //Call decreaseDay method\r\n }",
"public String manipulateTimeForScore(String mins, String secs) {\n\n\t\tint min = -1;\n\t\tint sec = -1;\n\t\tif (mins != null && mins.trim().length() > 0) {\n\t\t\ttry {\n\t\t\t\tmin = Integer.parseInt(mins);\n\t\t\t} catch (Exception e) {\n\t\t\t\t \n\t\t\t}\n\t\t}\n\t\tif (secs != null && secs.trim().length() > 0) {\n\t\t\ttry {\n\t\t\t\tsec = Integer.parseInt(secs);\n\t\t\t} catch (Exception e) {\n\t\t\t\t \n\t\t\t}\n\t\t}\n\t\tString result = \"\";\n\t\tif (min != -1 && sec != -1) {\n\t\t\tif (min < 10) {\n\t\t\t\tresult = \"0\" + min + \":\";\n\t\t\t} else {\n\t\t\t\tresult = min + \":\";\n\t\t\t}\n\n\t\t\tif (sec < 10) {\n\t\t\t\tresult = result + \"0\" + sec;\n\t\t\t} else {\n\t\t\t\tresult = result + sec;\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}",
"public static long daysDifference(String newDate, String oldDate) throws ParseException {\n SimpleDateFormat simpleDateFormat =\n new SimpleDateFormat(\"yyyy-MM-dd hh:mm:ss\");\n\n Date dOld = simpleDateFormat.parse(oldDate);\n Date dNew = simpleDateFormat.parse(newDate);\n long different = dNew.getTime() - dOld.getTime();\n return TimeUnit.DAYS.convert(different, TimeUnit.MILLISECONDS);\n }",
"public static long dateDiff(String dateString1, String dateString2) throws TestingException, ParseException {\n\n\t\tdateString1 = dateString1.replaceAll(\"T\", \" \");\n\t\tdateString2 = dateString2.replaceAll(\"T\", \" \");\n\t\tSimpleDateFormat format = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\n\n\t\tdateString1 = formatDateTime(dateString1, \"yyyy-MM-dd HH:mm:ss\");\n\t\tdateString2 = formatDateTime(dateString2, \"yyyy-MM-dd HH:mm:ss\");\n\n\t\tDate date1 = format.parse(dateString1);\n\t\tDate date2 = format.parse(dateString2);\n\n\t\tlong ret = date2.getTime() - date1.getTime();\n\t\treturn ret / 1000;\n\t}",
"void milestone4(int inputSeconds){\n int days = inputSeconds / 86400;\n int seconds = inputSeconds % 86400;\n int hours = seconds / 3600;\n seconds = seconds % 3600;\n int minutes = seconds / 60;\n seconds = seconds % 60;\n\n System.out.println(\"Day/s: \" + days);\n System.out.println(\"Hour/s: \" + hours);\n System.out.println(\"Minute/s: \" + minutes);\n System.out.println(\"Second/s: \" + seconds);\n }",
"public static long deltaSeconds(Date d1, Date d2) {\n Arguments.Ensure.NotNull(d1, d2);\n long difference = d2.getTime() - d1.getTime();\n return difference / 1000;\n }",
"private static String timeConversion(long totalSeconds) {\n\n final int MINUTES_IN_AN_HOUR = 60;\n final int SECONDS_IN_A_MINUTE = 60;\n\n long seconds = totalSeconds % SECONDS_IN_A_MINUTE;\n long totalMinutes = totalSeconds / SECONDS_IN_A_MINUTE;\n long minutes = totalMinutes % MINUTES_IN_AN_HOUR;\n long hours = totalMinutes / MINUTES_IN_AN_HOUR;\n\n StringBuilder time = new StringBuilder();\n time.append(totalSeconds < 0 ? \"-\" : \"\");\n time.append(hours < 10 ? \"0\" : \"\");\n time.append(Math.abs(hours) + \":\");\n time.append(minutes < 10 ? \"0\" : \"\");\n time.append(Math.abs(minutes) + \":\");\n time.append(seconds < 10 ? \"0\" : \"\");\n time.append(Math.abs(seconds));\n\n return time.toString();\n }",
"public static int getDiffMinutes(String startDate, String endDate) {\n long diff = 0;\n try {\n SimpleDateFormat parser = new SimpleDateFormat(\"HH:mm\");\n long start = parser.parse(startDate).getTime();\n long end = parser.parse(endDate).getTime();\n\n if (startDate.compareTo(endDate) <= 0) { // eg. 09:00 <= 09:10\n diff = end - start;\n } else { // eg. 21:00 ~ 01:00, we should change 01:00 to 25:00\n diff = end + 24 * 60 * 60 * 1000 - start;\n }\n } catch (ParseException e) {\n e.printStackTrace();\n } finally {\n return (int) (diff / (60 * 1000));\n }\n }",
"public static void main(String[] args) {\n String ttime = getDurationString(200,45);\n System.out.println(ttime);\n ttime = getDurationString(400);\n System.out.println(ttime);\n }",
"public static void main(String[] args) {\n\t\tint total_sec,hr,min,sec;\r\n\t\tScanner s=new Scanner(System.in);\r\n\t\tSystem.out.println(\"Enter total seconds:\");\r\n\t\ttotal_sec=s.nextInt();\r\n\t\thr=total_sec/3600;\r\n\t\tmin=(total_sec-(hr*3600))/60;\r\n\t\tsec=total_sec-((hr*3600)+(min*60));\r\n\t\tSystem.out.println(\"H:M:S format is:\");\r\n\t\tSystem.out.println(hr+\":\"+min+\":\"+sec);\r\n\r\n\t}",
"public static String calculateArrivalTime(String arrivalTime){ \n\t\tlog.info(\"currentTime: {}, arrivalTime: {}\", CURRENT_TIME, arrivalTime);\n\t\t\n\t\t//create two arrays of Strings that contain the hour, minutes, and seconds in each index\n\t\tString[]currentTimeSplit = CURRENT_TIME.split(\":\");\n\t\tString[]arrivalTimeSplit = arrivalTime.split(\":\");\n\t\n\t\tint[]estimation = new int[currentTimeSplit.length];\n\t\t//TODO: add some exception handling somewhere\n\t\tfor (int i = currentTimeSplit.length - 1; i >= 0; i--){ \n\t\t\t//convert the Strings into integers and find the difference between them\n\t\t\tint cur = Integer.parseInt(currentTimeSplit[i]);\n\t\t\tint arr = Integer.parseInt(arrivalTimeSplit[i]);\n\t\t\t\n\t\t\tif (i == 0 && cur > arr){\n\t\t\t\tarr += 24;\n\t\t\t}\n\t\t\tint dif = arr - cur;\n\t\t\t//if this results in a negative number, we need to \"borrow\" from the next index\n\t\t\tif (dif < 0){\n\t\t\t\tint next = Integer.parseInt(arrivalTimeSplit[i - 1]) - 1;\n\t\t\t\tarrivalTimeSplit[i - 1] = next+\"\";\n\t\t\t\tdif = 60 + dif;\n\t\t\t}\n\t\t\testimation[i] = dif;\n\t\t}\n\t\t\n\t\tString theTime = \"\";\n\t\tif (estimation[0] > 0){ //if arrival time is over an hour\n\t\t\ttheTime = \"\";\n\t\t} else { //otherwise, format a String from the minutes and seconds\n\t\t\tint minutes = estimation[1];\n\t\t\tif (minutes > 30){\n\t\t\t\ttheTime = \"\"; //ignore anything above 30 minutes\n\t\t\t} else if (minutes < 1){\n\t\t\t\ttheTime = \"now\";\n\t\t\t} else if (minutes < 2){\n\t\t\t\ttheTime = \"under 2 minutes\";\n\t\t\t}\n\t\t\telse {\n\t\t\t\ttheTime += minutes + \" minutes\";\n\t\t\t}\n\t\t}\n\t\treturn theTime;\n\t}",
"public static void printDifference(Date startDate, Date endDate) {\n\n //milliseconds\n long different = endDate.getTime() - startDate.getTime();\n\n System.out.println(\"startDate : \" + startDate);\n System.out.println(\"endDate : \" + endDate);\n System.out.println(\"different : \" + different);\n\n long secondsInMilli = 1000;\n long minutesInMilli = secondsInMilli * 60;\n long hoursInMilli = minutesInMilli * 60;\n long daysInMilli = hoursInMilli * 24;\n\n long elapsedDays = different / daysInMilli;\n different = different % daysInMilli;\n\n long elapsedHours = different / hoursInMilli;\n different = different % hoursInMilli;\n\n long elapsedMinutes = different / minutesInMilli;\n different = different % minutesInMilli;\n\n long elapsedSeconds = different / secondsInMilli;\n\n System.out.printf(\n \"%d days, %d hours, %d minutes, %d seconds%n\",\n elapsedDays,\n elapsedHours, elapsedMinutes, elapsedSeconds);\n\n }",
"public static double getDifferenceHours(long currTime, long prevTime) {\n\n\n //TODO: Fix rounding errors associated with seconds and subsequent calculations\n long x = currTime - prevTime;\n Log.d(\"getDifferenceHours\", \"currTime: \" + currTime);\n Log.d(\"getDifferenceHours\", \"prevTime: \" + prevTime);\n\n Log.d(\"getDifferenceHours\", \"diff: \" + Long.toString(x));\n double y = x / 1000;\n Log.d(\"getDifferenceHours\", \"y: \" + y);\n double z = y / 60;\n Log.d(\"getDifferenceHours\", \"z: \" + z);\n double c = z / 60;\n Log.d(\"getDifferenceHours\", \"c: \" + c);\n return c;\n }",
"private String formatTime(int seconds){\n return String.format(\"%02d:%02d\", seconds / 60, seconds % 60);\n }",
"static String timeConversion(String s) {\n /*\n * Write your code here.\n */\n String res = \"\";\n String hrs = s.substring(0, 2);\n String min = s.substring(3, 5);\n String sec = s.substring(6, 8);\n String ampm = s.substring(8);\n int hr = Integer.parseInt(hrs);\n if((ampm.equalsIgnoreCase(\"PM\")) && (hr != 12)) {\n hr += 12;\n if(hr >= 24) {\n hr = 24 - hr;\n }\n }\n else if(ampm.equalsIgnoreCase(\"AM\")) {\n if(hr == 12) {\n hr = 0;\n }\n }\n if(hr < 10) {\n res = res + \"0\" + Integer.toString(hr);\n }\n else {\n res += Integer.toString(hr);\n }\n res = res +\":\" +min +\":\" + sec;\n return res;\n }",
"public static void main(String[] args) {\n System.out.println(solution(\"02:03:55\",\"00:14:15\",\n new String[] {\"01:20:15-01:45:14\", \n \"00:40:31-01:00:00\",\n \"00:25:50-00:48:29\",\n \"01:30:59-01:53:29\", \n \"01:37:44-02:02:30\"}));\n \n // \"01:00:00\"\n System.out.println(solution(\"99:59:59\", \"25:00:00\",\n new String[] {\"69:59:59-89:59:59\",\n \"01:00:00-21:00:00\",\n \"79:59:59-99:59:59\",\n \"11:00:00-31:00:00\"}));\n \n // \"00:00:00\"\n System.out.println(solution(\"50:00:00\", \"50:00:00\",\n new String[] {\"15:36:51-38:21:49\",\n \"10:14:18-15:36:51\",\n \"38:21:49-42:51:45\"}));\n \n }",
"public int compareHours(String hora1, String hora2) {\n \tString[] strph1=hora1.split(\":\");\n \tString[] strph2=hora2.split(\":\");\n \tInteger[] ph1= new Integer[3];\n \tInteger[] ph2= new Integer[3];\n\n \tfor(int i=0;i<strph1.length;i++) {\n \t\tph1[i]=Integer.parseInt(strph1[i]);\n \t}\n \tfor(int i=0;i<strph2.length;i++) {\n \t\tph2[i]=Integer.parseInt(strph2[i]);\n \t}\n\n \tif(ph1[0]>ph2[0]) {\n \t\treturn 1;\n \t}\n \telse if(ph1[0]<ph2[0]) {\n \t\treturn -1;\n \t}\n \telse{//si las horas son iguales\n \t\tif(ph1[1]>ph2[1]) {\n \t\t\treturn 1; \n \t\t}\n \t\telse if(ph1[1]<ph2[1]) {\n \t\t\treturn -1;\n \t\t}\n \t\telse{//si los minutos son iguales\n \t\t\tif(ph1[2]>ph2[2]) {\n \t\t\t\treturn 1;\n \t\t\t}\n \t\t\telse if(ph1[1]<ph2[1]) {\n \t\t\t\treturn -1;\n \t\t\t}\n \t\t\telse {\n \t\t\t\treturn 0;\n \t\t\t}\n \t\t}\n \t}\n\n }",
"public static String dateDiff(Date date1, Date date2) {\n long lower = Math.min(date1.getTime(), date2.getTime());\n long upper = Math.max(date1.getTime(), date2.getTime());\n long diff = upper - lower;\n\n long days = diff / (24 * 60 * 60 * 1000);\n long hours = diff / (60 * 60 * 1000) % 24;\n long minutes = diff / (60 * 1000) % 60;\n long seconds = diff / 1000 % 60;\n\n return String.format(\"%02d:%02d:%02d:%02d\", days, hours, minutes, seconds);\n\t}",
"EDataType getSeconds();",
"@Test\n\tpublic void test() throws InterruptedException {\n\t\tString firstTime = Time.main();\n\t\tString[] splitFirst = firstTime.split(\":\");\n\t\tThread.sleep(5000);\n\t\tString secondTime = Time.main();\n\t\tString[] splitSecond = secondTime.split(\":\");\n\t\t\n\t\t\n\t\tif(Integer.parseInt(splitFirst[2])>=55) //if first time was >= 55 seconds\n\t\t{\n\t\t\tassertEquals(Integer.parseInt(splitSecond[2]),(Integer.parseInt(splitFirst[2])+5)%60); //seconds should increase by 5 mod 60\n\n\t\t\tif(Integer.parseInt(splitFirst[1])==59) //if first time was 59 minutes\n\t\t\t{ \n\t\t\t\tassertTrue(splitFirst[1].equals(\"00\")); //reset to zero minutes\n\t\t\t\t\n\t\t\t\tif(Integer.parseInt(splitFirst[0])==23) //if first time was 23 hours\n\t\t\t\t\tassertTrue(splitFirst[0].equals(\"00\")); //reset to zero hours\n\t\t\t\telse //if first time is not 23 hours\n\t\t\t\t\tassertEquals(Integer.parseInt(splitFirst[0])+1, Integer.parseInt(splitSecond[0])); //hours should increase by 1\n\t\t\t}\n\t\t\telse //if first time was not 59 minutes\n\t\t\t{\n\t\t\t\tassertEquals(Integer.parseInt(splitFirst[1])+1, Integer.parseInt(splitSecond[1])); //minutes should increase by 1\n\t\t\t\tassertTrue(splitFirst[0].equals(splitSecond[0])); //hours should not change\n\t\t\t}\n\t\t}\n\t\telse //if first time was <= 55 seconds\n\t\t{\n\t\t\tassertEquals(Integer.parseInt(splitSecond[2]),(Integer.parseInt(splitFirst[2])+5)); //seconds should increase by 5\n\t\t\tassertTrue(splitFirst[1].equals(splitSecond[1])); //minutes should not change\n\t\t\tassertTrue(splitFirst[0].equals(splitSecond[0])); //hours should not change\n\t\t\t\n\t\t}\n\t\t\n\t}",
"public Duration parseDuration(String inputString){\r\n Duration duration = null;\r\n int day;\r\n int hr;\r\n int min;\r\n Pattern patternDuration = Pattern.compile(durationPatternString);\r\n Matcher matcherDuration = patternDuration.matcher(inputString);\r\n String dayMatch;\r\n while (matcherDuration.find()){\r\n dayMatch = matcherDuration.group(1);\r\n if (dayMatch == null|| dayMatch.isEmpty())\r\n day =0;\r\n else\r\n day = Integer.parseInt(dayMatch);\r\n\r\n hr = Integer.parseInt(matcherDuration.group(2));\r\n min = Integer.parseInt(matcherDuration.group(3));\r\n duration = Duration.ofSeconds(day*24*60*60 + hr*60*60 + min*60);\r\n }\r\n return duration;\r\n }",
"public String getElapsedTimeHoursMinutesSecondsString(int milisec) {\n\t\t int time = milisec/1000;\n\t\t String seconds = Integer.toString((int)(time % 60)); \n\t\t String minutes = Integer.toString((int)((time % 3600) / 60)); \n\t\t String hours = Integer.toString((int)(time / 3600)); \n\t\t for (int i = 0; i < 2; i++) { \n\t\t if (seconds.length() < 2) { \n\t\t seconds = \"0\" + seconds; \n\t\t } \n\t\t if (minutes.length() < 2) { \n\t\t minutes = \"0\" + minutes; \n\t\t } \n\t\t if (hours.length() < 2) { \n\t\t hours = \"0\" + hours; \n\t\t } \n\t\t }\n\t\t String timeString = hours + \":\" + minutes + \":\" + seconds; \n\t\t return timeString;\n\t }",
"public static String minChangeDayHourMinS(String time) {\n long mss;\n if (!\"\".equals(time) && time != null) {\n mss = Integer.parseInt(time) * 60;\n } else {\n return \"\";\n }\n String DateTimes = null;\n long days = mss / (60 * 60 * 24);\n long hours = (mss % (60 * 60 * 24)) / (60 * 60);\n long minutes = (mss % (60 * 60)) / 60;\n long seconds = mss % 60;\n// Logger.d(\"minChangeDayHourMinS days:\" + days);\n// Logger.d(\"minChangeDayHourMinS hours:\" + hours);\n// Logger.d(\"minChangeDayHourMinS minutes:\" + minutes);\n// Logger.d(\"minChangeDayHourMinS seconds:\" + seconds);\n\n if (days > 0) {\n DateTimes = days + \"天\" + hours + \"小时\" + minutes + \"分钟\"\n + seconds + \"秒\";\n } else if (hours > 0) {\n DateTimes = hours + \"小时\" + minutes + \"分钟\"\n + seconds + \"秒\";\n } else if (minutes > 0) {\n DateTimes = minutes + \"分钟\"\n + seconds + \"秒\";\n } else {\n DateTimes = seconds + \"秒\";\n }\n // Log.d(\"minChangeDayHourMinS DateTimes:\" + DateTimes);\n\n return DateTimes;\n }",
"private static long timeDiff(final Date startDate, final Date endDate, final TimeUnit timeUnit) {\n if (startDate == null) {\n throw new NullPointerException(\"start\");\n }\n\n if (endDate == null) {\n throw new NullPointerException(\"end\");\n }\n\n return timeUnit.convert(endDate.getTime() - startDate.getTime(), TimeUnit.MILLISECONDS);\n }",
"public static long getDateDiffer(Calendar cal1, Calendar cal2){\n long millis1 = cal1.getTimeInMillis();\n long millis2 = cal2.getTimeInMillis();\n\n // Calculate difference in milliseconds\n long diff = millis2 - millis1;\n\n // Calculate difference in seconds\n long diffSeconds = diff / 1000;\n\n // Calculate difference in minutes\n long diffMinutes = diff / (60 * 1000);\n\n // Calculate difference in hours\n long diffHours = diff / (60 * 60 * 1000);\n\n // Calculate difference in days\n long diffDays = diff / (24 * 60 * 60 * 1000);\n\n System.out.println(\"In milliseconds: \" + diff + \" milliseconds.\");\n System.out.println(\"In seconds: \" + diffSeconds + \" seconds.\");\n System.out.println(\"In minutes: \" + diffMinutes + \" minutes.\");\n System.out.println(\"In hours: \" + diffHours + \" hours.\");\n System.out.println(\"In days: \" + diffDays + \" days.\");\n\n return diffDays;\n }",
"public static void main(String[] args) {\n\t\tString start_date = \"10-01-2018 01:10:20\"; \r\n\r\n\t\tString end_date = \"10-06-2020 06:30:50\"; \r\n\r\n\tfindDifference(start_date, end_date);\r\n\r\n\t}",
"private static String getPrettyTimeDiffInMinutes(Calendar c1, Calendar c2) {\n\t\tif (c1.getTimeZone() == null || c2.getTimeZone() == null \n\t\t\t\t|| c1.getTimeZone().getRawOffset() != c2.getTimeZone().getRawOffset()) {\n\t\t\treturn \"N.A.\";\n\t\t}\n\t\telse {\n\t\t\t//Log.d(TAG, \"c2: \" + c2 + \", c1: \" + c1);\n\t\t\tlong diff = c2.getTimeInMillis() - c1.getTimeInMillis();\n\t\t\t\n\t\t\tif (diff / Utils.DAY_SCALE != 0) {\n\t\t\t\treturn \"many days ago\";\n\t\t\t}\n\t\t\telse if (diff / Utils.HOUR_SCALE != 0) {\n\t\t\t\treturn \"many hours ago\";\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn (diff / Utils.MINUTE_SCALE) + \" min(s) ago\";\n\t\t\t}\n\t\t}\n\t}",
"private String getTimestampDifference(){\r\n Log.d(TAG, \"getTimestampDifference: getting timestamp difference.\");\r\n\r\n String difference = \"\";\r\n Calendar c = Calendar.getInstance();\r\n SimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd'T'HH:mm:ss'Z'\", Locale.UK);\r\n sdf.setTimeZone(TimeZone.getTimeZone(\"Asia/Dubai\"));//google 'android list of timezones'\r\n Date today = c.getTime();\r\n sdf.format(today);\r\n Date timestamp;\r\n\r\n final String photoTimestamp = mJobPhoto.getDate_created();\r\n try{\r\n timestamp = sdf.parse(photoTimestamp);\r\n difference = String.valueOf(Math.round(((today.getTime() - timestamp.getTime()) / 1000 / 60 / 60 / 24 )));\r\n }catch (ParseException e){\r\n Log.e(TAG, \"getTimestampDifference: ParseException: \" + e.getMessage() );\r\n difference = \"0\";\r\n }\r\n return difference;\r\n }",
"public static long secondsBetween(final Date start, final Date end) {\n return Dates.timeDiff(start, end, TimeUnit.SECONDS);\n }",
"public int compareTimes(String rhsTime, String lhsTime) {\n Date rhsDate = parseDate_stringToTime(rhsTime);\n Date lhsDate = parseDate_stringToTime(lhsTime);\n\n if (rhsDate.getHours() == lhsDate.getHours()) {\n if (rhsDate.getMinutes() == lhsDate.getMinutes()) {\n return 0;\n } else return rhsDate.getMinutes() - lhsDate.getMinutes();\n } else {\n return rhsDate.getHours() - lhsDate.getHours();\n }\n }",
"@Test\n public void testFormatSeconds() {\n String seconds = TimeValuesHelper.formatSecondsToString(5);\n Assert.assertEquals(\"05\", seconds);\n }",
"public static String[] validateHours(String hours) {\n\tString[] hourString=new String[2];\r\n\tStringTokenizer st=new StringTokenizer(hours,\"-\");\r\n\ttry{\r\n\t\thourString[0]=st.nextToken();\r\n\t\thourString[1]=st.nextToken();\r\n\t}\r\n\tcatch(Exception e){\r\n\t\tSystem.out.println(\"Hours are not proper:\");\r\n\t\thourString[0]=null;\r\n\t\treturn hourString;\r\n\t}\r\n\tboolean validHour=validInteger(hourString[0]);\r\n\tif(!validHour || hourString[0].length()!=4){\r\n\t\tSystem.out.println(\"Invalid Start Time\");\r\n\t\thourString[0]=null;\r\n\t\treturn hourString;\r\n\t}\r\n\tvalidHour=validInteger(hourString[1]);\r\n\tif(!validHour || hourString[1].length()!=4){\r\n\t\tSystem.out.println(\"Invalid End Time Time\");\r\n\t\thourString[0]=null;\r\n\t\treturn hourString;\r\n\t}\r\n\tString time=hourString[0].substring(0, 2)+\":\"+hourString[0].substring(2, 4);\r\n\thourString[0]=time;\r\n\tSystem.out.println(\"Start Time : \"+time);\r\n\ttime=null;\r\n\ttime=hourString[1].substring(0, 2)+\":\"+hourString[1].substring(2, 4);\r\n\thourString[1]=time;\r\n\treturn hourString;\r\n}",
"public abstract long toSeconds(long duration);",
"int SumtheDifference(String a) {\n int s = 0, r = 0, i = 0;\n while (i < a.length()) {\n char c = a.charAt(i++);\n int t = c - '0';\n if (c == '-')\n s = 1;\n else if (t > 0) {\n r += (s ^ t % 2) == 1 ? -t : t;\n s = 0;\n } else if (c != ' ')\n s = 0;\n }\n return r;\n }",
"public static long getSecond(int[] timeArray)\n\t{\n\t\treturn timeArray[0] * 24 * 60 * 60 + timeArray[1] * 60 * 60 + timeArray[2] * 60 + timeArray[3];\n\t}",
"public static int shiftedDiff(String first, String second){\n\n LOG.info(\"Running shiftedDiff() method\");\n\n if(first.length() != second.length()){\n return -1;\n }\n\n if(first.equals(second)){\n LOG.info(\"Strings are equals\");\n return 0;\n }\n\n for(int i = 0; i<first.length();i++){\n first = first.substring(first.length()-1)+first.substring(0,first.length()-1);\n if(first.equals(second)){\n return i+1;\n }\n }\n return -1;\n }",
"public static double parse_time(String s) {\n double tm = -1;\n String patternStr = \"[:]\";\n String [] fields2 = s.split(patternStr);\n if (fields2.length >= 3) {\n tm = parse_double(fields2[2]) + 60 * parse_double(fields2[1]) + 3600 * parse_double(fields2[0]); // hrs:min:sec\n } else if (fields2.length == 2) {\n tm = parse_double(fields2[1]) + 60 * parse_double(fields2[0]); // min:sec\n } else if (fields2.length == 1){\n tm = parse_double(fields2[0]); //getColumn(_sec, head[TM_CLK]);\n }\n return tm;\n }",
"public void substraiTempo(Tempo tempo2) {\n\t\tint tempo1EmSec = this.horas*3600 + this.minutos*60 + this.segundos;\n\t\tint tempo2EmSec = tempo2.horas*3600 + tempo2.minutos*60 + tempo2.segundos; \n\t\tint resultado = (tempo1EmSec>tempo2EmSec)? tempo1EmSec - tempo2EmSec : tempo2EmSec - tempo1EmSec;\n\t\t\n\t\tif(resultado != 0) { //Verificando se os tempos não são iguais\n\t\t\t//Atribuindo o resultado da substração dos tempos em horas, minutos e segundos.\n\t\t\tthis.horas = resultado / 3600;\n\t\t\tint aux = resultado % 3600;\n\t\t\tthis.minutos = aux / 60;\n\t\t\tthis.segundos = aux % 60;\n\t\t}\n\t}",
"public static String getTime(int second) {\n if (second < 10) {\n return \"00:00:0\" + second;\n }\n if (second < 60) {\n return \"00:00:\" + second;\n }\n if (second < 3600) {\n int minute = second / 60;\n second = second - minute * 60;\n if (minute < 10) {\n if (second < 10) {\n return \"00:\" + \"0\" + minute + \":0\" + second;\n }\n return \"00:\" + \"0\" + minute + \":\" + second;\n }\n if (second < 10) {\n return \"00:\" + minute + \":0\" + second;\n }\n return \"00:\" + minute + \":\" + second;\n }\n int hour = second / 3600;\n int minute = (second - hour * 3600) / 60;\n second = second - hour * 3600 - minute * 60;\n if (hour < 10) {\n if (minute < 10) {\n if (second < 10) {\n return \"0\" + hour + \":0\" + minute + \":0\" + second;\n }\n return \"0\" + hour + \":0\" + minute + \":\" + second;\n }\n if (second < 10) {\n return \"0\" + hour + \":\" + minute + \":0\" + second;\n }\n return \"0\" + hour + \":\" + minute + \":\" + second;\n }\n if (minute < 10) {\n if (second < 10) {\n return hour + \":0\" + minute + \":0\" + second;\n }\n return hour + \":0\" + minute + \":\" + second;\n }\n if (second < 10) {\n return hour + \":\" + minute + \":0\" + second;\n }\n return hour + \":\" + minute + \":\" + second;\n }",
"public static void main(String[] args) {\n\t\t\n\t\tScanner input=new Scanner(System.in);\n\t\t\n\t\tint sec=input.nextInt();\n\t\tint hour=sec/3600;\n\t\tint minutes=(sec-(3600*hour))/60;\n\t\tint seconds=sec-(3600*hour)-(60*minutes);\n\t\t\n\t\tSystem.out.println(hour+\":\"+minutes+\":\"+seconds);\n\t\n\t\n\t}",
"public static int getWorkingHrs(int DayHr , int workHrs){\n\tworkHrs=DayHr+workHrs;\n\treturn workHrs;\n}",
"private String findMaximumValidTime1(int a, int b, int c, int d) {\n int[] arr = {a,b,c,d};\n int maxHr = -1;\n int hr_i = 0, hr_j = 0;\n\n //Find maximum HR\n for(int i=0; i < arr.length; i++){\n for(int j=i+1; j < arr.length; j++){\n int value1 = arr[i] * 10 + arr[j];\n int value2 = arr[j] * 10 + arr[i];\n if(value1 < 24 && value2 < 24){\n if(value1 > value2 && value1 > maxHr) {\n maxHr = value1;\n hr_i = i;\n hr_j = j;\n }else if(value2 > value1 && value2 > maxHr){\n maxHr = value2;\n hr_i = i;\n hr_j = j;\n }\n }else if(value1 < 24 && value2 > 24 && value1 > maxHr){\n maxHr = value1;\n hr_i = i;\n hr_j = j;\n }else if(value2 < 24 && value1 > 24 && value2 > maxHr){\n maxHr = value2;\n hr_i = i;\n hr_j = j;\n }\n\n }\n }\n System.out.println(maxHr);\n\n //Find maximum MM\n int[] mArr = new int[2]; //minutes array\n int k=0;\n for(int i=0; i < arr.length; i++){\n if(i != hr_i && i != hr_j){\n mArr[k++] = arr[i];\n }\n }\n\n System.out.println(Arrays.toString(mArr));\n int maxMin = -1;\n int val1 = mArr[0] * 10 + mArr[1];\n int val2 = mArr[1] * 10 + mArr[0];\n\n if(val1 < 60 && val2 < 60){\n maxMin = Math.max(val1,val2);\n }else if(val1 < 60 && val2 > 60) {\n maxMin = val1;\n }else if(val2 < 60 && val1 > 60){\n maxMin = val2;\n }\n System.out.println(maxMin);\n\n //Create answer\n StringBuilder sb = new StringBuilder();\n if(maxHr == -1 || maxMin == -1){\n return \"Not Possible\";\n }\n\n if(Integer.toString(maxHr).length() < 2){ //HR\n sb.append(\"0\"+maxHr+\":\");\n }else {\n sb.append(maxHr+\":\");\n }\n\n if(Integer.toString(maxMin).length() < 2){ //MM\n sb.append(\"0\"+maxMin);\n }else {\n sb.append(maxMin);\n }\n\n return sb.toString();\n }",
"public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tSystem.out.println(\"Enter seconds= \");\n\t\tint seconds = sc.nextInt();\n\n\t\tint hr = seconds / 60;\n\t\tint min = seconds % 60;\n\t\thr = hr / 60;\n\t\tint se = hr % 60;\n\n\t\tSystem.out.println(hr + \" :\" + min + \":\" + se);\n\n\t}",
"public static int convertTimeHoursToSeconds(int hours) {\n\t\t\t\tint SECONDS_IN_A_MINUTE = 60;\n\t\t\t\tint MINUTES_IN_AN_HOUR = 60;\n\t\t\t\treturn hours * MINUTES_IN_AN_HOUR * SECONDS_IN_A_MINUTE;\n\t\t\t}",
"private static int computeTime(String time) {\n\t\tint ret = 0;\n\t\tint multiply = 1;\n\t\tint decimals = 1;\n\t\tfor (int i = time.length() - 1; i >= 0; --i) {\n\t\t\tif (time.charAt(i) == ':') {\n\t\t\t\tmultiply *= 60;\n\t\t\t\tdecimals = 1;\n\t\t\t} else {\n\t\t\t\tret += (time.charAt(i) - '0') * multiply * decimals;\n\t\t\t\tdecimals *= 10;\n\t\t\t}\n\t\t}\n\t\treturn ret;\n\t}",
"static long getSecondsPart(Duration d) {\n long u = d.getSeconds() % 60;\n\n return u;\n }",
"public static void main(String[] args) {\n\t\tint seconds = 3910 ; // 1 hour 5 minutes and 10 seconds \r\n\t\t\r\n\t\tint minutes , hours ; \r\n\t\t\r\n\t\tminutes = seconds / 60 ; \r\n\t\tSystem.out.println(\" The minutes is : \" + minutes );\r\n\t\t\r\n\t\t// how many seconds remaining after getting minutes part \r\n\t\t\r\n\t\tint remainingSecondsAfterMinute = seconds % 60 ; \r\n\t\tSystem.out.println(\" The remianing seconds after minute is : \" + remainingSecondsAfterMinute );\r\n\t\t\r\n\t\t// we can use minute as below \r\n\t\t// hours = minutes / 60 ; \r\n\t\t// or we can use seconds directly\r\n\t\thours = seconds / 3600 ; \r\n\t\t\r\n\t\t\r\n\t\tSystem.out.println(\" Hours is \" + hours);\r\n\t\t\r\n\t\t// Task : convert the seconds to real life example of \r\n\t\t// 3910 seconds is 1 hour 5 minute and 10 seconds \r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t}",
"protected double difftime(double t2, double t1) {\n\t\treturn t2 - t1;\n\t}",
"private static double timeInSec(long endTime, long startTime) {\n\t\tlong duration = (endTime - startTime);\n\t\tif (duration > 0) {\n\t\t\tdouble dm = (duration/1000000.0); //Milliseconds\n\t\t\tdouble d = dm/1000.0; //seconds\n\t\t\treturn d ;\n\t\t}\n\t\treturn 0.0 ;\n\t}",
"private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {\n \r\n if((\"Leave\".equals(workingType)))\r\n {\r\n \r\n performleaveoperation();\r\n \r\n \r\n }\r\n else{\r\n try\r\n {\r\n \r\n java.util.Date dateFromDateChooser1 =new Date();\r\n System.out.println(\"dateFromDateChooser1=\"+dateFromDateChooser1);\r\n //dateString = String.format(\"%1$td-%1$tm-%1$tY\", dateFromDateChooser1); \r\ndateString = String.format(\"%1$tY-%1$tm-%1$td\", dateFromDateChooser1); \r\n//dateString=dateFromDateChooser1;\r\nDateFormat dff=DateFormat.getDateInstance();\r\nString converdate=dff.format(dateFromDateChooser1);\r\n\r\n//String timeconv=dateFromDateChooser1.getHours()\r\n\r\nSystem.out.println(\"converdate=\"+converdate);\r\n\r\nSystem.out.println(\"dateFromDateChooser1=\"+dateFromDateChooser1);\r\n\r\nSystem.out.println(\"dateString=\"+dateString);\r\n \r\n date1=dateString;\r\n \r\n System.out.println(\"date1=\"+date1);\r\n String time1=(jTextField2.getText());\r\n System.out.println(\"time1=\"+time1);\r\n String date2=dateString ;\r\n \r\n System.out.println(\"date2=\"+date2);\r\n \r\n String time2=jTextField3.getText();\r\n System.out.println(\"time2=\"+time2);\r\n \r\n \r\n\r\n long diffenceinTime=calculateDifference(time1, time2);\r\n System.out.println(\"diffenceinTime=\"+diffenceinTime);\r\n //shortcut sout+tab \r\n \r\n if(diffenceinTime <0)\r\n {\r\n \r\n System.out.println(\"u have entered invalid date\");\r\n JOptionPane.showMessageDialog(this, \" Please enter valid time\"); \r\n jTextField3.setText(\"\");\r\n return;\r\n\r\n \r\n \r\n }\r\n \r\n \r\n \r\n String format=(\"dd-mm-yyyy HH:mm:ss\");\r\n SimpleDateFormat sdf=new SimpleDateFormat(format);\r\n \r\n String spacedd=Integer.toString(32);\r\n System.out.println(\"spacedd=\"+spacedd);\r\n \r\n String inputdate1=date1+\"\\t\"+time1;\r\n \r\n System.out.println(\"inputdate1=\"+inputdate1);\r\n String inputdate2=date2+\"\\t\"+time2;\r\n System.out.println(\"inputdate2=\"+inputdate2);\r\n \r\n \r\n java.util.Date inputDateDb1=constructDate(date1, time1);\r\n System.out.println(\"inputDateDb=\"+inputDateDb1); \r\n java.util.Date inputdatedb2=constructDate(date2, time2);\r\n System.out.println(\"inputDateDb=\"+inputdatedb2);\r\n \r\n \r\n // Time t=new Time(WIDTH, WIDTH, WIDTH)\r\n \r\n \r\n \r\n long diff=inputdatedb2.getTime()-inputDateDb1.getTime();\r\n double diffinhours=diff/((double)1000*60*60);\r\n \r\n System.out.println(diffinhours);\r\n System.out.println(\"Hours=\"+(int)diffinhours);\r\n System.out.println(\"Minutes=\"+(diffinhours-(int)diffinhours)*60);\r\n \r\n \r\n// catch(Exception e)\r\n// {\r\n// e.printStackTrace();\r\n// }\r\n// \r\n jTextField4.setText(String.valueOf((int)diffinhours));\r\n \r\n \r\n String s=jTextField4.getText();\r\n overtime=Integer.parseInt(s);\r\n if( overtime >6)\r\n {\r\n c= overtime-6 ;\r\n System.out.println(\"overtime\"+c);\r\n overtime2=String.valueOf(c);\r\n \r\n jTextField5.setText(overtime2);\r\n // jPanel5.setVisible(false);\r\n jLabel15.setEnabled(false);\r\n jTextField12.setEditable(false);\r\n }\r\n \r\n if(overtime==6)\r\n {\r\n jTextField5.setText(\"0\");\r\n //jPanel5.setVisible(false);\r\n jLabel15.setEnabled(false);\r\n jTextField12.setEditable(false);\r\n \r\n }\r\n if(overtime<6)\r\n {\r\n jTextField5.setText(\"0\");\r\n //jPanel5.setVisible(true);\r\n jLabel15.setEnabled(true);\r\n jTextField12.setEditable(true);\r\n// if( jTextField12.getText().equals(\"\"))\r\n// {\r\n// System.out.println(\"ramiz displaying pane\");\r\n// JOptionPane.showMessageDialog(this, \"please enter reason\"); \r\n// // jPanel5.setVisible(true);\r\n// \r\n// }\r\n \r\n System.out.println(\"displaying panel........line 623\");\r\n \r\n // jPanel5.setVisible(true);\r\n\r\n }\r\n \r\n////// String ch=String.valueOf(jComboBox1.getSelectedItem());\r\n////// System.out.println(\"ch\"+ch);\r\n s=String.valueOf(jComboBox2.getSelectedItem());\r\n \r\n String c=jTextField13.getText();\r\n if(c.equalsIgnoreCase(\"Maneger\")&& !(s.equals(\"Leave\")))\r\n \r\n {\r\n// pa\r\n// String h=jTextField4.getText();\r\n \r\n// int c= 66*Integer.parseInt(h);\r\n \r\n System.out.println(\"overtime2=\"+overtime2);\r\n if(overtime2==null)\r\n {\r\n jTextField5.setText(\"0\");\r\n payment=66*overtime;\r\n jTextField6.setText(String.valueOf(payment));\r\n \r\n }\r\n else\r\n {\r\n overtime3= Integer.parseInt(overtime2);\r\n \r\n System.out.println(\"overtime2=\"+overtime3);\r\n \r\n payment=66*overtime;\r\n // payovertime=66*overtime3;\r\n // tot=payment+payovertime;\r\n jTextField6.setText(String.valueOf(payment));\r\n \r\n System.out.println(\"Total Payment in days=\"+payment);\r\n }\r\n jTextField6.setText(String.valueOf(payment));\r\n \r\n }\r\n \r\n if(c.equalsIgnoreCase(\"cook\")&& !(s.equals(\"Leave\")))\r\n \r\n {\r\n// pa\r\n// String h=jTextField4.getText();\r\n \r\n// int c= 66*Integer.parseInt(h);\r\n \r\n System.out.println(\"overtime2=\"+overtime2);\r\n if(overtime2==null)\r\n {\r\n jTextField5.setText(\"0\");\r\n payment=55*overtime;\r\n \r\n }\r\n else\r\n {\r\n overtime3= Integer.parseInt(overtime2);\r\n \r\n System.out.println(\"overtime2=\"+overtime3);\r\n \r\n payment=66*overtime;\r\n // payovertime=66*overtime3;\r\n // tot=payment+payovertime;\r\n System.out.println(\"Total Payment in days=\"+payment);\r\n }\r\n jTextField6.setText(String.valueOf(payment));\r\n \r\n }\r\nif(c.equalsIgnoreCase(\"Weater\")&& !(s.equals(\"Leave\")))\r\n \r\n {\r\n// pa\r\n// String h=jTextField4.getText();\r\n \r\n// int c= 66*Integer.parseInt(h);\r\n \r\n System.out.println(\"overtime2=\"+overtime2);\r\n if(overtime2==null)\r\n {\r\n jTextField5.setText(\"0\");\r\n payment=44*overtime;\r\n \r\n }\r\n else\r\n {\r\n overtime3= Integer.parseInt(overtime2);\r\n \r\n System.out.println(\"overtime2=\"+overtime3);\r\n \r\n payment=66*overtime;\r\n // payovertime=66*overtime3;\r\n // tot=payment+payovertime;\r\n System.out.println(\"Total Payment in days=\"+payment);\r\n }\r\n jTextField6.setText(String.valueOf(payment));\r\n \r\n }\r\nif(c.equalsIgnoreCase(\"Helper\")&& !(s.equals(\"Leave\")))\r\n \r\n {\r\n// pa\r\n// String h=jTextField4.getText();\r\n \r\n// int c= 66*Integer.parseInt(h);\r\n \r\n System.out.println(\"overtime2=\"+overtime2);\r\n if(overtime2==null)\r\n {\r\n jTextField5.setText(\"0\");\r\n payment=38*overtime;\r\n \r\n }\r\n else\r\n {\r\n overtime3= Integer.parseInt(overtime2);\r\n \r\n System.out.println(\"overtime2=\"+overtime3);\r\n \r\n payment=66*overtime;\r\n // payovertime=66*overtime3;\r\n // tot=payment+payovertime;\r\n System.out.println(\"Total Payment in days=\"+payment);\r\n }\r\n jTextField6.setText(String.valueOf(payment));\r\n \r\n }\r\n \r\n// if(c.equals(\"Maneger\")&& !(s.equals(\"Leave\")))\r\n// \r\n// {\r\n//// pa\r\n//// String h=jTextField4.getText();\r\n// \r\n//// int c= 66*Integer.parseInt(h);\r\n// \r\n// System.out.println(\"overtime2=\"+overtime2);\r\n// if(overtime2==null)\r\n// {\r\n// jTextField5.setText(\"0\");\r\n// payment=66*overtime;\r\n// \r\n// }\r\n// else\r\n// {\r\n// overtime3= Integer.parseInt(overtime2);\r\n// \r\n// System.out.println(\"overtime2=\"+overtime3);\r\n// \r\n// payment=66*overtime;\r\n// // payovertime=66*overtime3;\r\n// // tot=payment+payovertime;\r\n// System.out.println(\"Total Payment in days=\"+payment);\r\n// }\r\n// jTextField6.setText(String.valueOf(payment));\r\n// \r\n// }\r\n } catch(Exception e)\r\n {\r\n e.printStackTrace();\r\n }\r\n \r\n \r\n \r\n }\r\n \r\n }",
"public static String hoursMinutesSeconds(double t) {\n int hours = (int) t/3600;\n int rem = (int) t - hours*3600;\n int mins = rem / 60;\n int secs = rem - mins*60;\n //return String.format(\"%2d:%02d:%02d\", hours, mins, secs);\n return String.format(\"%d:%02d:%02d\", hours, mins, secs);\n }",
"public static int computeDifference(int numOne, int numTwo) {\n\n\n int dif = Math.abs(numOne - numTwo);\n\n switch (dif) {\n\n case 24:\n return 23;\n case 23:\n return 22;\n case 22:\n return 21;\n case 21:\n return 20;\n case 20:\n return 19;\n case 19:\n return 18;\n case 18:\n return 17;\n case 17:\n return 16;\n case 16:\n return 15;\n case 15:\n return 14;\n case 14:\n return 13;\n case 13:\n return 12;\n case 12:\n return 11;\n case 11:\n return 10;\n case 10:\n return 9;\n case 9:\n return 8;\n case 8:\n return 7;\n case 7:\n return 6;\n case 6:\n return 5;\n case 5:\n return 4;\n case 4:\n return 3;\n case 3:\n return 2;\n case 2:\n return 1;\n default:\n return 0;\n }\n }",
"static String timeConversion(String s) {\n String[] timeSplit = s.split(\":\");\n String hours = timeSplit[0];\n String minutes = timeSplit[1];\n String seconds = timeSplit[2].substring(0, 2);\n String ampm = timeSplit[2].substring(2, 4);\n\n String newHours;\n if (ampm.equals(\"AM\")) {\n newHours = hours.equals(\"12\") ? \"00\" : hours;\n\n } else {\n newHours = hours.equals(\"12\") ? hours : String.valueOf(Integer.parseInt(hours) + 12);\n }\n\n return newHours + \":\" + minutes + \":\" + seconds;\n\n }",
"private String secsToTime(int secs) {\n String min = secs / 60 + \"\";\n String sec = secs % 60 + \"\";\n if(sec.length() == 1) {\n sec = \"0\" + sec;\n }\n\n return min + \":\" + sec;\n }",
"public String timeToFormat(int newSecondsTotal){\n String out = \"\";\n int minutes = newSecondsTotal/60;\n int seconds = newSecondsTotal-(minutes*60);\n out = minutes+\":\"+seconds;\n return out;\n }",
"private String calculateTimeInterval(long startTime, long endTime){\n\t\tTimeSpanItem ti = TimeSpanItem.creatTimeItem(startTime, endTime);\n\t\tint intervalHour=ti.getHour();\n\t\tint intervalMin=ti.getMinute();\n\t\tString hourString=\"\";\n\t\tif(intervalHour>=1){\n\t\t\tif(intervalHour==1){\n\t\t\t\thourString=intervalHour+mContext.getString(R.string.daily_info_time_hour);\n\t\t\t}\n\t\t\telse{\n\t\t\t\thourString=intervalHour+mContext.getString(R.string.daily_info_time_hours);\n\t\t\t}\n\t\t}\n\t\t\n\t\tString minString=\"\";\n if(intervalMin < 1){\n intervalMin = 1;\n }\n\t\tminString=intervalMin+mContext.getString(R.string.daily_info_time_minute);\n\t\tString timeString=hourString+\" \"+minString;\n\n\t\treturn timeString;\n\t}",
"public static int CalcularDiferenciaDiasFechas(Date fecha1, Date fecha2){\n Calendar cal1 = Calendar.getInstance();\r\n Calendar cal2 = Calendar.getInstance();\r\n cal1.setTime(fecha1);\r\n cal2.setTime(fecha2);\r\n // conseguir la representacion de la fecha en milisegundos\r\n long milis1 = cal1.getTimeInMillis();\r\n long milis2 = cal2.getTimeInMillis();\r\n // calcular la diferencia en milisengundos\r\n long diff = milis2 - milis1;\r\n // calcular la diferencia en horas\r\n Long diffHours = diff / (24 * 60 * 60 * 1000);\r\n return diffHours.intValue();\r\n }",
"public double getWaitTime(Flight flight2) {\n Calendar date1 = createNewCalendar(arrivalDateTime);\n Calendar date2 = createNewCalendar(flight2.getDepartureDateTime());\n // get the difference in time in milliseconds\n double timeDifference = date2.getTimeInMillis() - date1.getTimeInMillis();\n // convert to hours\n return timeDifference / (1000 * 60 * 60);\n }"
] |
[
"0.65252537",
"0.62559664",
"0.6249057",
"0.6232178",
"0.62288773",
"0.61888766",
"0.61700493",
"0.6111941",
"0.60853785",
"0.60269713",
"0.6008384",
"0.59769094",
"0.5971002",
"0.59500265",
"0.5926573",
"0.58950436",
"0.5889798",
"0.5873575",
"0.58291626",
"0.57934755",
"0.579315",
"0.578926",
"0.5747409",
"0.573951",
"0.5712493",
"0.5693799",
"0.56736803",
"0.5661107",
"0.5645166",
"0.5633324",
"0.56311524",
"0.56272155",
"0.5537079",
"0.55233663",
"0.5508456",
"0.5502621",
"0.54709363",
"0.5440448",
"0.5439035",
"0.5415597",
"0.5413498",
"0.54017735",
"0.53874326",
"0.53828925",
"0.53589034",
"0.53411263",
"0.53196776",
"0.53110063",
"0.5299326",
"0.5296331",
"0.5293144",
"0.5284012",
"0.5252276",
"0.5246834",
"0.5243077",
"0.5237729",
"0.52181864",
"0.5207917",
"0.52069837",
"0.5202539",
"0.51937634",
"0.5187476",
"0.51810414",
"0.51797354",
"0.51697403",
"0.5169133",
"0.51421225",
"0.5140008",
"0.51329195",
"0.5132227",
"0.513015",
"0.51285565",
"0.51275104",
"0.51222396",
"0.5120492",
"0.51194006",
"0.511263",
"0.5110349",
"0.51100194",
"0.5094977",
"0.50882244",
"0.50814927",
"0.50787115",
"0.5069593",
"0.50694776",
"0.5062312",
"0.5051482",
"0.50481737",
"0.50457156",
"0.50401884",
"0.50256944",
"0.5009266",
"0.49949458",
"0.4988031",
"0.49877766",
"0.49683157",
"0.4966779",
"0.49655956",
"0.49644446",
"0.49543256"
] |
0.74308014
|
0
|
TODO Autogenerated method stub
|
public static void main(String[] args) {
DataWsImpleService factory=new DataWsImpleService();
DataWs dataws= factory.getDataWsImplePort();
/* System.out.println("ok1");
//添加请求的客户端对象
Client client= ClientProxy.getClient(dataws);
//添加输出拦截器
System.out.println("ok1");
List<Interceptor<? extends Message>> OutInterceptors =client.getOutInterceptors();
OutInterceptors.add(new LoggingOutInterceptor());
System.out.println("ok1");
//添加输入拦截器
List<Interceptor<? extends Message>> InInterceptors =client.getInInterceptors();
InInterceptors.add(new LoggingInInterceptor());
*/
// System.out.println("ok2");
dataws.getStudentbyId(1);
System.out.println("succeed");
}
|
{
"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
|
////////////////////////////////////////////////////////////// constructor Creates a new NearAction
|
public NearAction(String name, int direction) {
this(name, direction, 1, false);
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public NearAction(String name, int direction, int magnitude) {\r\n this(name, direction, magnitude, false);\r\n }",
"public NearAction(String name, Icon icon, int direction, int magnitude) {\r\n this(name, icon, direction, magnitude, false);\r\n }",
"public NearAction(String name, int direction, boolean localize) {\r\n this(name, direction, 1, localize);\r\n }",
"public NearAction(String name, Icon icon, int direction) {\r\n this(name, icon, direction, 1, false);\r\n }",
"public NearAction(String name, int direction, int magnitude, boolean localize) {\r\n super(localize ? Localizer.localize(\"GefBase\", name) : name);\r\n this.direction = direction;\r\n this.magnitude = magnitude;\r\n }",
"public NearAction(String name, Icon icon, int direction, int magnitude, boolean localize) {\r\n super(localize ? Localizer.localize(\"GefBase\", name) : name, icon);\r\n this.direction = direction;\r\n this.magnitude = magnitude;\r\n }",
"public NearAction(String name, Icon icon, int direction, boolean localize) {\r\n this(name, icon, direction, 1, localize);\r\n }",
"public AETinteractions() {\r\n\t}",
"public SearchContestsManagerAction() {\r\n }",
"public GetIndividualsFullAction() {\n super();\n }",
"public MemberAction() {\n\t\tsuper();\n\t}",
"SendAction createSendAction();",
"public BattleWeaponsSegmentAction() {\n }",
"public CreateIndividualPreAction() {\n }",
"protected void init_actions()\r\n {\r\n action_obj = new CUP$CircuitCup$actions(this);\r\n }",
"public UpcomingContestsManagerAction() {\r\n }",
"Action createAction();",
"Action createAction();",
"Action createAction();",
"protected PMBaseAction() {\r\n super();\r\n }",
"protected void init_actions()\n {\n action_obj = new CUP$PCLParser$actions(this);\n }",
"public VisitAction() {\n }",
"protected void init_actions()\n {\n action_obj = new CUP$CoolParser$actions(this);\n }",
"protected void init_actions()\n {\n action_obj = new CUP$CoolParser$actions(this);\n }",
"public Location() {\n\t}",
"public ScheduledActionAction() {\n\n }",
"public ActionManager() {\n\t\tsuper();\n\t}",
"protected void init_actions()\r\n {\r\n action_obj = new CUP$Parser$actions(this);\r\n }",
"protected void init_actions()\n {\n action_obj = new CUP$Parser$actions(this);\n }",
"protected void init_actions()\n {\n action_obj = new CUP$Parser$actions(this);\n }",
"protected void init_actions()\n {\n action_obj = new CUP$Parser$actions(this);\n }",
"protected void init_actions()\n {\n action_obj = new CUP$Parser$actions(this);\n }",
"protected void init_actions()\n {\n action_obj = new CUP$Parser$actions(this);\n }",
"protected void init_actions()\r\n {\r\n action_obj = new CUP$parser$actions(this);\r\n }",
"public Location() {\n }",
"public ExecuteAction()\n {\n this(null);\n }",
"public InitiateAttackNonCreatureAction() {\n super(new CreatureAttacksNonCreatureRule());\n }",
"public Location() {\r\n \r\n }",
"protected void init_actions()\n {\n action_obj = new CUP$parser$actions(this);\n }",
"protected void init_actions()\n {\n action_obj = new CUP$parser$actions(this);\n }",
"protected void init_actions()\n {\n action_obj = new CUP$parser$actions(this);\n }",
"protected void init_actions()\n {\n action_obj = new CUP$parser$actions(this);\n }",
"protected void init_actions()\n {\n action_obj = new CUP$parser$actions(this);\n }",
"protected void init_actions()\n {\n action_obj = new CUP$parser$actions(this);\n }",
"protected void init_actions()\n {\n action_obj = new CUP$parser$actions(this);\n }",
"protected void init_actions()\n {\n action_obj = new CUP$parser$actions(this);\n }",
"protected void init_actions()\n {\n action_obj = new CUP$parser$actions(this);\n }",
"protected void init_actions()\n {\n action_obj = new CUP$parser$actions(this);\n }",
"protected void init_actions()\n {\n action_obj = new CUP$parser$actions(this);\n }",
"protected void init_actions()\n {\n action_obj = new CUP$parser$actions(this);\n }",
"protected void init_actions()\n {\n action_obj = new CUP$parser$actions(this);\n }",
"protected void init_actions()\n {\n action_obj = new CUP$parser$actions(this);\n }",
"protected void init_actions()\n {\n action_obj = new CUP$parser$actions(this);\n }",
"protected void init_actions()\n {\n action_obj = new CUP$Asintactico$actions(this);\n }",
"public Action(GameManager gameManager){\n this.gameManager = gameManager;\n }",
"protected void init_actions()\r\n {\r\n action_obj = new CUP$MJParser$actions(this);\r\n }",
"public ConfigAction()\n {\n this(null, null, true);\n }",
"protected void init_actions()\r\n {\r\n action_obj = new CUP$LuaGrammarCup$actions(this);\r\n }",
"public JRibbonAction()\n\t{\n\t\tsuper();\n\t}",
"ForwardMinAction createForwardMinAction();",
"public GetMarkerSetMembershipAction() {\n }",
"public PlaceAndMoveAction(Game game, ModelPlayer player, Direction direction) {\n this.direction = direction;\n this.player = player;\n }",
"public TboFlightSearchRequest() {\n}",
"public ClientNaiveAgent() {\n // the default ip is the localhost\n ar = new ClientActionRobotJava(\"127.0.0.1\");\n tp = new TrajectoryPlanner();\n randomGenerator = new Random();\n }",
"private ActionPackage() {}",
"public GetMotorPositionCommand ()\r\n {\r\n }",
"protected void init_actions()\n {\n action_obj = new CUP$XPathParser$actions(this);\n }",
"protected void init_actions() {\r\n action_obj = new CUP$SintacticoH$actions(this);\r\n }",
"protected void init_actions()\n {\n action_obj = new CUP$Sintactico$actions(this);\n }",
"public SaveConstitutionInformationAction() {\n }",
"protected void init_actions()\n {\n action_obj = new CUP$include$actions(this);\n }",
"protected void init_actions()\n {\n action_obj = new CUP$analisis_sintactico_re$actions(this);\n }",
"public XpeDccWfActionROVORowImpl() {\n }",
"protected void init_actions()\r\n {\r\n action_obj = new CUP$SintaxAnalysis$actions(this);\r\n }",
"protected void init_actions()\n {\n action_obj = new CUP$CompParser$actions(this);\n }",
"protected void init_actions()\n {\n action_obj = new CUP$Grm$actions();\n }",
"protected void init_actions()\n {\n action_obj = new CUP$FractalParser$actions(this);\n }",
"protected void init_actions()\r\n {\r\n action_obj = new CUP$AnalizadorSintactico$actions(this);\r\n }",
"public ASLocation()\n\t{\n\t\tsuper() ;\n\t\tprepare() ;\n\t}",
"public Follow() {\n\t\tev3 = new Robot();\n\t\tfind = new FindColor(ev3.NAMEFILE);\n\t}",
"public Hit() {\n }",
"protected void init_actions()\n {\n action_obj = new CUP$A4Parser$actions(this);\n }",
"protected void init_actions()\n {\n action_obj = new CUP$A4Parser$actions(this);\n }",
"private Action(){\r\n\t\tthis(-1);\r\n\t}",
"public DirectionController() {\n }",
"private AliasAction() {\n\n\t}",
"public RepeaterActionDefinition() {\n }",
"public NormalRoom(String description, Action... action) {\n\t\tsuper(description, action);\n\t}",
"public MMCAgent() {\n\n\t}",
"public Entity(Room room, int xPos, int yPos, String name, String description, Direction facing) {\r\n\t\tthis.ID = getNewID();\r\n\r\n\t\tthis.actions = new ArrayList<>();\r\n\r\n\t\tthis.room = room;\r\n\t\tthis.xPos = xPos;\r\n\t\tthis.yPos = yPos;\r\n\r\n\t\tthis.name = name;\r\n\t\tthis.description = description;\r\n\r\n\t\tthis.facing = (facing == null) ? Direction.NORTH : facing;\r\n\r\n\t\tthis.actions.add(new Action() {\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic String name() {\r\n\t\t\t\treturn \"Inspect\";\r\n\t\t\t}\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void perform(Object caller) {\r\n\t\t\t\tif (!(caller instanceof MainWindow)) {\r\n\t\t\t\t\tutil.Logging.logEvent(\"Entity\", util.Logging.Levels.WARNING,\r\n\t\t\t\t\t\t\t\"Entity action 'Inspect' expected MainWindow argument, got \" + caller.getClass().getName()\r\n\t\t\t\t\t\t\t\t\t+ \" argument.\");\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tMainWindow mw = (MainWindow) caller;\r\n\r\n\t\t\t\tString friendlyName = name;\r\n\r\n\t\t\t\tif (!isPlayer()) {\r\n\t\t\t\t\tfriendlyName = java.lang.Character.toUpperCase(friendlyName.charAt(0)) + friendlyName.substring(1);\r\n\r\n\t\t\t\t\tfor (int i = 1; i < friendlyName.length(); ++i) {\r\n\t\t\t\t\t\tif (java.lang.Character.isUpperCase(friendlyName.charAt(i))) {\r\n\t\t\t\t\t\t\tfriendlyName = friendlyName.substring(0, i) + \" \" + friendlyName.substring(i);\r\n\t\t\t\t\t\t\t++i;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tmw.addGameChat(friendlyName + \": \" + description + \"\\n\");\r\n\t\t\t}\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic boolean isClientAction() {\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t});\r\n\t}",
"public ActorNPC() {\r\n }",
"private PSAAClientActionFactory()\n {\n }",
"public Origin(int north, int south, int east, int west){\n this.north = north;\n this.south = south;\n this.east = east;\n this.west = west;\n }",
"public Mover(){\n \t\n }",
"protected Action makeAcceptAction() {\n\t\tAction myAction;\n\t\tmyAction = new Accept(getAgentID(),\n\t\t\t\t((ActionWithBid) opponentAction).getBid());\n\t\treturn myAction;\n\t}",
"public Interaction() {\n }",
"public MyLocation() {}",
"public void testConstructorWithNamespace() {\n CutSubsystemAction cutSubsystemAction = new CutSubsystemAction(subsystem, clipboard);\n assertNotNull(\"Instance of CutSubsystemAction should be created.\", cutSubsystemAction);\n }",
"public CommandMAN() {\n super();\n }",
"public Challenger() {\r\n\t\tname = \"TBD\";\r\n\t\trank = -1;\r\n\t}"
] |
[
"0.6943622",
"0.6467439",
"0.6439669",
"0.63288534",
"0.62589985",
"0.6150077",
"0.5995462",
"0.5807783",
"0.57914716",
"0.5788717",
"0.5657526",
"0.55941176",
"0.5587642",
"0.5581686",
"0.5579516",
"0.55710423",
"0.55695623",
"0.55695623",
"0.55695623",
"0.5540912",
"0.5522059",
"0.5507129",
"0.547306",
"0.547306",
"0.5472636",
"0.5450775",
"0.54506755",
"0.54405475",
"0.54006827",
"0.54006827",
"0.54006827",
"0.54006827",
"0.54006827",
"0.5395545",
"0.53903145",
"0.535086",
"0.5348656",
"0.5345932",
"0.5341965",
"0.5341965",
"0.5341965",
"0.5341965",
"0.5341965",
"0.5341965",
"0.5341965",
"0.5341965",
"0.5341965",
"0.5341965",
"0.5341965",
"0.5341965",
"0.5341965",
"0.5341965",
"0.5341965",
"0.53329194",
"0.53328156",
"0.5307745",
"0.5296535",
"0.529194",
"0.5287013",
"0.52848184",
"0.5282819",
"0.5259252",
"0.524779",
"0.52430594",
"0.5240665",
"0.5237466",
"0.52334654",
"0.5217934",
"0.5215483",
"0.5214003",
"0.52058905",
"0.52043724",
"0.5201753",
"0.5200715",
"0.5187466",
"0.5187152",
"0.5175891",
"0.5169791",
"0.5161884",
"0.51606196",
"0.5158418",
"0.51508933",
"0.51508933",
"0.5129115",
"0.5126522",
"0.511245",
"0.5112374",
"0.51113987",
"0.5108465",
"0.50979614",
"0.5094721",
"0.50913805",
"0.5090273",
"0.5076382",
"0.50708777",
"0.50680476",
"0.50641495",
"0.5063608",
"0.50507045",
"0.5048613"
] |
0.7100962
|
0
|
Creates a new NearAction
|
public NearAction(String name, int direction, int magnitude) {
this(name, direction, magnitude, false);
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public NearAction(String name, int direction) {\r\n this(name, direction, 1, false);\r\n }",
"public NearAction(String name, int direction, boolean localize) {\r\n this(name, direction, 1, localize);\r\n }",
"Action createAction();",
"Action createAction();",
"Action createAction();",
"public NearAction(String name, Icon icon, int direction, int magnitude) {\r\n this(name, icon, direction, magnitude, false);\r\n }",
"public NearAction(String name, Icon icon, int direction) {\r\n this(name, icon, direction, 1, false);\r\n }",
"SendAction createSendAction();",
"public NearAction(String name, int direction, int magnitude, boolean localize) {\r\n super(localize ? Localizer.localize(\"GefBase\", name) : name);\r\n this.direction = direction;\r\n this.magnitude = magnitude;\r\n }",
"public NearAction(String name, Icon icon, int direction, int magnitude, boolean localize) {\r\n super(localize ? Localizer.localize(\"GefBase\", name) : name, icon);\r\n this.direction = direction;\r\n this.magnitude = magnitude;\r\n }",
"public NearAction(String name, Icon icon, int direction, boolean localize) {\r\n this(name, icon, direction, 1, localize);\r\n }",
"protected Action makeAcceptAction() {\n\t\tAction myAction;\n\t\tmyAction = new Accept(getAgentID(),\n\t\t\t\t((ActionWithBid) opponentAction).getBid());\n\t\treturn myAction;\n\t}",
"public void createAction() {\n }",
"ForwardMinAction createForwardMinAction();",
"NoAction createNoAction();",
"ActionDefinition createActionDefinition();",
"ActionBlock createActionBlock();",
"public static Action push() {\n return new Action() {\n @Override\n protected void perform(ActiveActor a) {\n if(a.getGrid().isValid(a.getLocation().getAdjacentLocation(a.getDirection()))) {\n Actor b = a.getGrid().get(a.getLocation().getAdjacentLocation(a.getDirection()));\n if(b instanceof Movable && b instanceof DestructibleActor) {\n DestructibleActor c = (DestructibleActor) b;\n c.setDirection(a.getDirection());\n if(c.canMove()) {\n c.move();\n a.move();\n a.energy = a.energy - getCost();\n }\n\n }\n }\n }\n\n @Override\n public int getCost() {\n return 10;\n }\n\n @Override\n public boolean isExclusive() {\n return true;\n }\n\n @Override\n public Object getData() {\n return null;\n }\n\n @Override\n public String toString() {\n return \"Push()\";\n }\n };\n }",
"public static Action spawn(final Class<?> e) {\n return new Action() {\n @Override\n protected void perform(ActiveActor a) {\n if(a.isFacingValidLocation() && a.getFacing() == null) {\n if(a.energy >= getCost()) {\n try {\n Actor b = (Actor) e.newInstance();\n b.putSelfInGrid(a.getGrid(), a.getLocation().getAdjacentLocation(a.getDirection()));\n } catch(InstantiationException r) {\n r.printStackTrace();\n } catch(IllegalAccessException r) {\n r.printStackTrace();\n }\n a.energy = a.energy - 400;\n }\n }\n }\n\n @Override\n public int getCost() {\n return 400;\n }\n\n @Override\n public boolean isExclusive() {\n return true;\n }\n\n @Override\n public Object getData() {\n return e;\n }\n\n @Override\n public String toString() {\n return \"Spawn(\" + (e != null ? e.toString() : \"null\") + \")\";\n }\n };\n }",
"public Agent createNewAgent() throws MaceException{\r\n\t\tAgent agent = new Agent(\"n\" + maxAgentId, Agent.AGENT_BUYER);\r\n\t\taddAgent(agent);\r\n\t\tmaxAgentId++;\r\n\t\treturn agent;\r\n\t}",
"public CreateIndividualPreAction() {\n }",
"Builder addPotentialAction(Action value);",
"public GetIndividualsFullAction() {\n super();\n }",
"ActionNew()\n {\n super(\"New\");\n this.setShortcut(UtilGUI.createKeyStroke('N', true));\n }",
"public NewAction() {\n\t\tsuper(\"New...\", null);\n\t\tputValue(ACCELERATOR_KEY, KeyStroke.getKeyStroke(KeyEvent.VK_N, MAIN_MENU_MASK));\n\t}",
"public NewNetworkAction(IWorkbenchWindow window) {\r\n\t\t// this.window = window;\r\n\t\tsetId(ID);\r\n\t\tsetText(\"&New\");\r\n\t\tsetToolTipText(\"Opens dialog to get network configuration file\");\r\n\t\tActionContainer.add(ID, this);\r\n\t}",
"public String actionCreateNew() {\r\n \t\tsetBook(new Book());\r\n \t\treturn \"new\";\r\n \t}",
"protected IAction createAction(IEvent event, String label, String assign)\n\t\t\tthrows RodinDBException {\n\t\tIAction action = event.createChild(IAction.ELEMENT_TYPE, null, null);\n\t\taction.setLabel(label, null);\n\t\taction.setAssignmentString(assign, null);\n\t\treturn action;\n\t}",
"public Action newAction(Object data) throws Exception;",
"public PlaceAndMoveAction(Game game, ModelPlayer player, Direction direction) {\n this.direction = direction;\n this.player = player;\n }",
"public Command createInstance() {\n\t\t\n\t\tif(name == \"Direction\")\n\t\t\treturn new Direction();\n\t\t\n\t\tif(name == \"Gear\")\n\t\t\treturn new Gear();\n\t\t\n\t\tif(name == \"Pause\")\n\t\t\treturn new Pause();\n\t\t\n\t\treturn null;\n\t\t\n\t}",
"private Action initializeAction(final String classname) {\n\t\tAction action = null;\n\t\tif (classname != null && !\"\".equals(classname)) {\n\t\t\tClass<?> clazz = null;\n\t\t\ttry {\n\t\t\t\tclazz = Class.forName(classname);\n\t\t\t\taction = (Action) clazz.newInstance();\n\t\t\t} catch (InstantiationException e) {\n\t\t\t\tlog.error(\"Cannot instantiate action class: \" + classname);\n\t\t\t} catch (IllegalAccessException e) {\n\t\t\t\tlog.error(\"Not privileged to access action instance: \"\n\t\t\t\t\t\t+ classname);\n\t\t\t} catch (Throwable e) {\n\t\t\t\tlog.error(\"Cannot load action class: \" + classname);\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\tif (action == null) {\n\t\t\t// Instantiate a mock action such that menu item can\n\t\t\t// be displayed.\n\t\t\taction = new DummyAction();\n\t\t\tlog.warn(\"Instantiated mock action class.\");\n\t\t}\n\t\treturn action;\n\t}",
"ForwardAction createForwardAction();",
"Builder addPotentialAction(Action.Builder value);",
"public Action newAction(String command) {\n\t\tif (command == null)\n\t\t\tthrow new IllegalArgumentException(\n\t\t\t\t\t\"No legal command string passed!\");\n\t\tif (super.containsKey(command))\n\t\t\tthrow new IllegalArgumentException(\n\t\t\t\t\t\"Allready kontains a mapping for that key!\");\n\t\tAction action = new ActionForward();\n\t\taction.putValue(Action.ACTION_COMMAND_KEY, command);\n\t\tsuper.put(command, action);\n\t\tactionList.add(action);\n\t\treturn action;\n\t}",
"public SearchContestsManagerAction() {\r\n }",
"ActionType createActionType();",
"TurnAction createTurnAction();",
"public static Action place(final Class<?> e) {\n return new Action() {\n @Override\n protected void perform(ActiveActor a) {\n if(a.isFacingValidLocation()) {\n if(!a.isFacing(Actor.class)) {\n if(a.isHolding(e)) {\n try {\n ((Placeable) e.newInstance()).place(a.getGrid(), a.getLocation().getAdjacentLocation(a.getDirection()));\n a.removeItem(e);\n } catch(InstantiationException e) {\n e.printStackTrace();\n } catch(IllegalAccessException e) {\n e.printStackTrace();\n }\n }\n\n }\n\n }\n }\n\n @Override\n public int getCost() {\n return 0;\n }\n\n @Override\n public boolean isExclusive() {\n return true;\n }\n\n @Override\n public Object getData() {\n return e;\n }\n\n @Override\n public String toString() {\n return \"Place(\" + (e != null ? e.toString() : \"null\") + \")\";\n }\n };\n }",
"public MemberAction() {\n\t\tsuper();\n\t}",
"DomainAction createDomainAction();",
"public InitiateAttackNonCreatureAction() {\n super(new CreatureAttacksNonCreatureRule());\n }",
"public Action newAction(Object key) {\n\t\tif (key == null)\n\t\t\tthrow new IllegalArgumentException(\"No legal key passed!\");\n\t\tif (super.containsKey(key))\n\t\t\tthrow new IllegalArgumentException(\n\t\t\t\t\t\"Allready kontains a mapping for that key!\");\n\t\tAction action = new ActionForward();\n\t\tsuper.put(key, action);\n\t\tactionList.add(action);\n\t\treturn action;\n\t}",
"@Override\n\tpublic void createAction(Model m) {\n\t\t\n\t}",
"public VisitAction() {\n }",
"public AETinteractions() {\r\n\t}",
"protected abstract Intent createOne();",
"@Override\n\tpublic Location newInstance() {\n\t\treturn new Location(this.X,this.Y,0);\n\t}",
"@Override\n\tpublic void newAction() {\n\t\t\n\t}",
"protected void createLocationRequest() {\n\t\tmLocationRequest = new LocationRequest();\n\t\tmLocationRequest.setInterval(UPDATE_INTERVAL);\n\t\tmLocationRequest.setFastestInterval(FATEST_INTERVAL);\n\t\tmLocationRequest.setPriority(LocationRequest.PRIORITY_HIGH_ACCURACY);\n\t\tmLocationRequest.setSmallestDisplacement(DISPLACEMENT);\n\t}",
"Builder addPotentialAction(String value);",
"@Override\n protected Action[] createActions() {\n return new Action[0];\n }",
"protected void createLocationRequest() {\n System.out.println(\"In CREATE LOCATION REQUEST\");\n mLocationRequest = new LocationRequest();\n mLocationRequest.setInterval(60 * 1000);\n mLocationRequest.setFastestInterval(5 * 1000);\n mLocationRequest.setPriority(LocationRequest.PRIORITY_HIGH_ACCURACY);\n //mLocationRequest.setSmallestDisplacement(Utils.DISPLACEMENT);\n }",
"private PSAAClientActionFactory()\n {\n }",
"private AliasAction() {\n\n\t}",
"CustomAction(String actionType, String color, double startX, double startY){\n action.put(\"Object\", actionType);\n JSONObject attributes = new JSONObject();\n attributes.put(\"color\", color);\n attributes.put(\"startX\", startX);\n attributes.put(\"startY\", startY);\n action.put(\"Action\", attributes);\n }",
"protected void pushAction(iNamedObject node)\n\t{\n\t}",
"public UpcomingContestsManagerAction() {\r\n }",
"public GetMarkerSetMembershipAction() {\n }",
"public void action() throws Exception {\n // Cop move to another place\n move();\n\n // Search for agents nearby\n ArrayList<Position> occupiedNeighbor = this.getPosition().getOccupiedNeighborhood();\n ArrayList<Agent> arrestList = new ArrayList<>();\n for (Position neighbor : occupiedNeighbor) {\n Person person = neighbor.getOccupiedPerson();\n String className = person.getClass().getName();\n // if this is a agent and is active\n if (className.equals(Person.AGENT)) {\n if (((Agent) person).isActive()) {\n arrestList.add((Agent) person);\n }\n }\n }\n\n // If there at least one agent nearby\n if (0 != arrestList.size()) {\n // Randomly pick active agent to jail\n Random random = new Random();\n int maxIndex = arrestList.size();\n int randomIndex = random.nextInt(maxIndex);\n Agent arrestAgent = arrestList.get(randomIndex);\n int jailTerm = random.nextInt(getPersonEnvironment().getMaxJailTerm());\n arrestAgent.beArrested(jailTerm, this);\n }\n }",
"protected void createLocationRequest() {\n mLocationRequest = new LocationRequest();\n int UPDATE_INTERVAL = 1000 * 60 * 5;\n mLocationRequest.setInterval(UPDATE_INTERVAL);\n int FASTEST_INTERVAL = 5000;\n mLocationRequest.setFastestInterval(FASTEST_INTERVAL);\n mLocationRequest.setPriority(LocationRequest.PRIORITY_HIGH_ACCURACY);\n int DISPLACEMENT = 20;\n mLocationRequest.setSmallestDisplacement(DISPLACEMENT); // 20 meters\n }",
"public Button(String command, String name)\n {\n //command that will activate the infrared remote on the pi when this is sent to the command line\n this.command = \"irsend SEND_ONCE \" + name + \" KEY_\" + command.toUpperCase(); \n }",
"protected void init_actions()\r\n {\r\n action_obj = new CUP$CircuitCup$actions(this);\r\n }",
"public NamedAction createNamedAction(String name) {\n NamedActionImpl action = new NamedActionImpl();\n action.setName(name);\n return action;\n }",
"protected abstract void createTriggerOrAction();",
"public NormalRoom(String description, Action... action) {\n\t\tsuper(description, action);\n\t}",
"public NewTunnelAction() {\r\n putValue(Action.NAME, \"New Tunnel\");\r\n putValue(Action.SMALL_ICON,\r\n new ResourceIcon(ActiveTunnelsSessionPanel.class,\r\n \"add.png\"));\r\n putValue(Action.SHORT_DESCRIPTION, \"New Tunnel\");\r\n putValue(Action.LONG_DESCRIPTION,\r\n \"Create a new secure tunnel\");\r\n putValue(Action.MNEMONIC_KEY, new Integer('n'));\r\n //Cerlane (ALT to CTRL)\r\n putValue(Action.ACCELERATOR_KEY,\r\n KeyStroke.getKeyStroke(KeyEvent.VK_T, Keyboard_Modifier));\r\n putValue(Action.ACTION_COMMAND_KEY, \"new-tunnel-command\");\r\n putValue(StandardAction.ON_MENUBAR, new Boolean(true));\r\n putValue(StandardAction.MENU_NAME, \"Tunnel\");\r\n putValue(StandardAction.MENU_ITEM_GROUP, new Integer(50));\r\n putValue(StandardAction.MENU_ITEM_WEIGHT, new Integer(10));\r\n putValue(StandardAction.ON_TOOLBAR, new Boolean(true));\r\n putValue(StandardAction.TOOLBAR_GROUP, new Integer(5));\r\n putValue(StandardAction.TOOLBAR_WEIGHT, new Integer(5));\r\n putValue(StandardAction.HIDE_TOOLBAR_TEXT, new Boolean(false));\r\n putValue(StandardAction.ON_CONTEXT_MENU, new Boolean(true));\r\n putValue(StandardAction.CONTEXT_MENU_GROUP, new Integer(5));\r\n putValue(StandardAction.CONTEXT_MENU_WEIGHT, new Integer(5));\r\n //Cerlane (ALT to CTRL)\r\n putValue(Action.ACCELERATOR_KEY,\r\n KeyStroke.getKeyStroke(KeyEvent.VK_N, Keyboard_Modifier));\r\n }",
"protected void init_actions()\n {\n action_obj = new CUP$PCLParser$actions(this);\n }",
"public BattleWeaponsSegmentAction() {\n }",
"protected void init_actions()\n {\n action_obj = new CUP$Grm$actions();\n }",
"CustomAction(String actionType, String message) {\n action.put(\"Object\", actionType);\n JSONObject attributes = new JSONObject();\n attributes.put(\"message\", message);\n action.put(\"Action\", attributes);\n }",
"protected void init_actions()\n {\n action_obj = new CUP$CoolParser$actions(this);\n }",
"protected void init_actions()\n {\n action_obj = new CUP$CoolParser$actions(this);\n }",
"public static BucketbotTask createTaskMOVE(Circle c) {\r\n\t\tBucketbotTask t = new BucketbotTask();\r\n\t\tt.taskType = TaskType.MOVE;\r\n\t\tt.destination = c;\r\n\t\treturn t;\r\n\t}",
"MoveActionController createMoveActionController();",
"protected PMBaseAction() {\r\n super();\r\n }",
"public Place goNorth();",
"protected void init_actions()\r\n {\r\n action_obj = new CUP$Parser$actions(this);\r\n }",
"public Action(String name) {\n this.name = name;\n }",
"public ExecuteAction()\n {\n this(null);\n }",
"protected void init_actions()\r\n {\r\n action_obj = new CUP$parser$actions(this);\r\n }",
"public static Action buildShip(int id, char type) {\n\t\treturn new Action(id, type);\n\t}",
"Oracion createOracion();",
"protected void init_actions()\n {\n action_obj = new CUP$Parser$actions(this);\n }",
"protected void init_actions()\n {\n action_obj = new CUP$Parser$actions(this);\n }",
"protected void init_actions()\n {\n action_obj = new CUP$Parser$actions(this);\n }",
"protected void init_actions()\n {\n action_obj = new CUP$Parser$actions(this);\n }",
"protected void init_actions()\n {\n action_obj = new CUP$Parser$actions(this);\n }",
"public void createFriend(ActionEvent actionEvent) {\n Friend f = new Friend(getName.getText(),getPhone.getText());\n listFriends.getItems().add(f);\n getName.clear();\n getPhone.clear();\n }",
"public void createLocationRequest(){\n locationRequest = new LocationRequest();\n locationRequest.setInterval(1000);\n locationRequest.setFastestInterval(500);\n locationRequest.setPriority(LocationRequest.PRIORITY_HIGH_ACCURACY);\n }",
"public ScheduledActionAction() {\n\n }",
"public ElementAction(String label) {\r\n\t\tthis(label, true);\r\n\t}",
"protected void init_actions()\n {\n action_obj = new CUP$parser$actions(this);\n }",
"protected void init_actions()\n {\n action_obj = new CUP$parser$actions(this);\n }",
"protected void init_actions()\n {\n action_obj = new CUP$parser$actions(this);\n }",
"protected void init_actions()\n {\n action_obj = new CUP$parser$actions(this);\n }",
"protected void init_actions()\n {\n action_obj = new CUP$parser$actions(this);\n }",
"protected void init_actions()\n {\n action_obj = new CUP$parser$actions(this);\n }",
"protected void init_actions()\n {\n action_obj = new CUP$parser$actions(this);\n }",
"protected void init_actions()\n {\n action_obj = new CUP$parser$actions(this);\n }"
] |
[
"0.67906517",
"0.6129316",
"0.6085668",
"0.6085668",
"0.6085668",
"0.60802734",
"0.60486925",
"0.5966385",
"0.5815725",
"0.5695938",
"0.5693334",
"0.5376089",
"0.53672296",
"0.527376",
"0.52572304",
"0.5240696",
"0.5210045",
"0.51803356",
"0.5179967",
"0.5153246",
"0.5138728",
"0.51373243",
"0.5135538",
"0.50741774",
"0.5045289",
"0.49932677",
"0.49925372",
"0.49901903",
"0.49828088",
"0.4973183",
"0.49699923",
"0.49353915",
"0.4927623",
"0.49263388",
"0.4922202",
"0.48882684",
"0.48724607",
"0.4848348",
"0.48288974",
"0.48078147",
"0.47887132",
"0.47810453",
"0.47762403",
"0.47731912",
"0.47719216",
"0.4763119",
"0.47615534",
"0.47590506",
"0.47566912",
"0.4755984",
"0.47477093",
"0.47269744",
"0.47239125",
"0.47224662",
"0.47152907",
"0.47147548",
"0.47140974",
"0.47072875",
"0.47054154",
"0.46991804",
"0.469895",
"0.46987176",
"0.4695933",
"0.46860513",
"0.46704093",
"0.46694043",
"0.46669757",
"0.46568853",
"0.46560007",
"0.46426898",
"0.46293563",
"0.4619209",
"0.4619209",
"0.46174112",
"0.46154416",
"0.46135107",
"0.46126878",
"0.46030328",
"0.46025032",
"0.46007404",
"0.45954913",
"0.45952007",
"0.45827928",
"0.45755062",
"0.45755062",
"0.45755062",
"0.45755062",
"0.45755062",
"0.4565811",
"0.4564256",
"0.45585993",
"0.45565352",
"0.4554595",
"0.4554595",
"0.4554595",
"0.4554595",
"0.4554595",
"0.4554595",
"0.4554595",
"0.4554595"
] |
0.6518271
|
1
|
Creates a new NearAction
|
public NearAction(String name, Icon icon, int direction) {
this(name, icon, direction, 1, false);
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public NearAction(String name, int direction) {\r\n this(name, direction, 1, false);\r\n }",
"public NearAction(String name, int direction, int magnitude) {\r\n this(name, direction, magnitude, false);\r\n }",
"public NearAction(String name, int direction, boolean localize) {\r\n this(name, direction, 1, localize);\r\n }",
"Action createAction();",
"Action createAction();",
"Action createAction();",
"public NearAction(String name, Icon icon, int direction, int magnitude) {\r\n this(name, icon, direction, magnitude, false);\r\n }",
"SendAction createSendAction();",
"public NearAction(String name, int direction, int magnitude, boolean localize) {\r\n super(localize ? Localizer.localize(\"GefBase\", name) : name);\r\n this.direction = direction;\r\n this.magnitude = magnitude;\r\n }",
"public NearAction(String name, Icon icon, int direction, int magnitude, boolean localize) {\r\n super(localize ? Localizer.localize(\"GefBase\", name) : name, icon);\r\n this.direction = direction;\r\n this.magnitude = magnitude;\r\n }",
"public NearAction(String name, Icon icon, int direction, boolean localize) {\r\n this(name, icon, direction, 1, localize);\r\n }",
"protected Action makeAcceptAction() {\n\t\tAction myAction;\n\t\tmyAction = new Accept(getAgentID(),\n\t\t\t\t((ActionWithBid) opponentAction).getBid());\n\t\treturn myAction;\n\t}",
"public void createAction() {\n }",
"ForwardMinAction createForwardMinAction();",
"NoAction createNoAction();",
"ActionDefinition createActionDefinition();",
"ActionBlock createActionBlock();",
"public static Action push() {\n return new Action() {\n @Override\n protected void perform(ActiveActor a) {\n if(a.getGrid().isValid(a.getLocation().getAdjacentLocation(a.getDirection()))) {\n Actor b = a.getGrid().get(a.getLocation().getAdjacentLocation(a.getDirection()));\n if(b instanceof Movable && b instanceof DestructibleActor) {\n DestructibleActor c = (DestructibleActor) b;\n c.setDirection(a.getDirection());\n if(c.canMove()) {\n c.move();\n a.move();\n a.energy = a.energy - getCost();\n }\n\n }\n }\n }\n\n @Override\n public int getCost() {\n return 10;\n }\n\n @Override\n public boolean isExclusive() {\n return true;\n }\n\n @Override\n public Object getData() {\n return null;\n }\n\n @Override\n public String toString() {\n return \"Push()\";\n }\n };\n }",
"public static Action spawn(final Class<?> e) {\n return new Action() {\n @Override\n protected void perform(ActiveActor a) {\n if(a.isFacingValidLocation() && a.getFacing() == null) {\n if(a.energy >= getCost()) {\n try {\n Actor b = (Actor) e.newInstance();\n b.putSelfInGrid(a.getGrid(), a.getLocation().getAdjacentLocation(a.getDirection()));\n } catch(InstantiationException r) {\n r.printStackTrace();\n } catch(IllegalAccessException r) {\n r.printStackTrace();\n }\n a.energy = a.energy - 400;\n }\n }\n }\n\n @Override\n public int getCost() {\n return 400;\n }\n\n @Override\n public boolean isExclusive() {\n return true;\n }\n\n @Override\n public Object getData() {\n return e;\n }\n\n @Override\n public String toString() {\n return \"Spawn(\" + (e != null ? e.toString() : \"null\") + \")\";\n }\n };\n }",
"public Agent createNewAgent() throws MaceException{\r\n\t\tAgent agent = new Agent(\"n\" + maxAgentId, Agent.AGENT_BUYER);\r\n\t\taddAgent(agent);\r\n\t\tmaxAgentId++;\r\n\t\treturn agent;\r\n\t}",
"public CreateIndividualPreAction() {\n }",
"Builder addPotentialAction(Action value);",
"public GetIndividualsFullAction() {\n super();\n }",
"ActionNew()\n {\n super(\"New\");\n this.setShortcut(UtilGUI.createKeyStroke('N', true));\n }",
"public NewAction() {\n\t\tsuper(\"New...\", null);\n\t\tputValue(ACCELERATOR_KEY, KeyStroke.getKeyStroke(KeyEvent.VK_N, MAIN_MENU_MASK));\n\t}",
"public NewNetworkAction(IWorkbenchWindow window) {\r\n\t\t// this.window = window;\r\n\t\tsetId(ID);\r\n\t\tsetText(\"&New\");\r\n\t\tsetToolTipText(\"Opens dialog to get network configuration file\");\r\n\t\tActionContainer.add(ID, this);\r\n\t}",
"public String actionCreateNew() {\r\n \t\tsetBook(new Book());\r\n \t\treturn \"new\";\r\n \t}",
"protected IAction createAction(IEvent event, String label, String assign)\n\t\t\tthrows RodinDBException {\n\t\tIAction action = event.createChild(IAction.ELEMENT_TYPE, null, null);\n\t\taction.setLabel(label, null);\n\t\taction.setAssignmentString(assign, null);\n\t\treturn action;\n\t}",
"public Action newAction(Object data) throws Exception;",
"public PlaceAndMoveAction(Game game, ModelPlayer player, Direction direction) {\n this.direction = direction;\n this.player = player;\n }",
"public Command createInstance() {\n\t\t\n\t\tif(name == \"Direction\")\n\t\t\treturn new Direction();\n\t\t\n\t\tif(name == \"Gear\")\n\t\t\treturn new Gear();\n\t\t\n\t\tif(name == \"Pause\")\n\t\t\treturn new Pause();\n\t\t\n\t\treturn null;\n\t\t\n\t}",
"private Action initializeAction(final String classname) {\n\t\tAction action = null;\n\t\tif (classname != null && !\"\".equals(classname)) {\n\t\t\tClass<?> clazz = null;\n\t\t\ttry {\n\t\t\t\tclazz = Class.forName(classname);\n\t\t\t\taction = (Action) clazz.newInstance();\n\t\t\t} catch (InstantiationException e) {\n\t\t\t\tlog.error(\"Cannot instantiate action class: \" + classname);\n\t\t\t} catch (IllegalAccessException e) {\n\t\t\t\tlog.error(\"Not privileged to access action instance: \"\n\t\t\t\t\t\t+ classname);\n\t\t\t} catch (Throwable e) {\n\t\t\t\tlog.error(\"Cannot load action class: \" + classname);\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\tif (action == null) {\n\t\t\t// Instantiate a mock action such that menu item can\n\t\t\t// be displayed.\n\t\t\taction = new DummyAction();\n\t\t\tlog.warn(\"Instantiated mock action class.\");\n\t\t}\n\t\treturn action;\n\t}",
"ForwardAction createForwardAction();",
"Builder addPotentialAction(Action.Builder value);",
"public Action newAction(String command) {\n\t\tif (command == null)\n\t\t\tthrow new IllegalArgumentException(\n\t\t\t\t\t\"No legal command string passed!\");\n\t\tif (super.containsKey(command))\n\t\t\tthrow new IllegalArgumentException(\n\t\t\t\t\t\"Allready kontains a mapping for that key!\");\n\t\tAction action = new ActionForward();\n\t\taction.putValue(Action.ACTION_COMMAND_KEY, command);\n\t\tsuper.put(command, action);\n\t\tactionList.add(action);\n\t\treturn action;\n\t}",
"public SearchContestsManagerAction() {\r\n }",
"ActionType createActionType();",
"TurnAction createTurnAction();",
"public static Action place(final Class<?> e) {\n return new Action() {\n @Override\n protected void perform(ActiveActor a) {\n if(a.isFacingValidLocation()) {\n if(!a.isFacing(Actor.class)) {\n if(a.isHolding(e)) {\n try {\n ((Placeable) e.newInstance()).place(a.getGrid(), a.getLocation().getAdjacentLocation(a.getDirection()));\n a.removeItem(e);\n } catch(InstantiationException e) {\n e.printStackTrace();\n } catch(IllegalAccessException e) {\n e.printStackTrace();\n }\n }\n\n }\n\n }\n }\n\n @Override\n public int getCost() {\n return 0;\n }\n\n @Override\n public boolean isExclusive() {\n return true;\n }\n\n @Override\n public Object getData() {\n return e;\n }\n\n @Override\n public String toString() {\n return \"Place(\" + (e != null ? e.toString() : \"null\") + \")\";\n }\n };\n }",
"public MemberAction() {\n\t\tsuper();\n\t}",
"DomainAction createDomainAction();",
"public InitiateAttackNonCreatureAction() {\n super(new CreatureAttacksNonCreatureRule());\n }",
"public Action newAction(Object key) {\n\t\tif (key == null)\n\t\t\tthrow new IllegalArgumentException(\"No legal key passed!\");\n\t\tif (super.containsKey(key))\n\t\t\tthrow new IllegalArgumentException(\n\t\t\t\t\t\"Allready kontains a mapping for that key!\");\n\t\tAction action = new ActionForward();\n\t\tsuper.put(key, action);\n\t\tactionList.add(action);\n\t\treturn action;\n\t}",
"@Override\n\tpublic void createAction(Model m) {\n\t\t\n\t}",
"public VisitAction() {\n }",
"public AETinteractions() {\r\n\t}",
"protected abstract Intent createOne();",
"@Override\n\tpublic Location newInstance() {\n\t\treturn new Location(this.X,this.Y,0);\n\t}",
"@Override\n\tpublic void newAction() {\n\t\t\n\t}",
"protected void createLocationRequest() {\n\t\tmLocationRequest = new LocationRequest();\n\t\tmLocationRequest.setInterval(UPDATE_INTERVAL);\n\t\tmLocationRequest.setFastestInterval(FATEST_INTERVAL);\n\t\tmLocationRequest.setPriority(LocationRequest.PRIORITY_HIGH_ACCURACY);\n\t\tmLocationRequest.setSmallestDisplacement(DISPLACEMENT);\n\t}",
"Builder addPotentialAction(String value);",
"@Override\n protected Action[] createActions() {\n return new Action[0];\n }",
"protected void createLocationRequest() {\n System.out.println(\"In CREATE LOCATION REQUEST\");\n mLocationRequest = new LocationRequest();\n mLocationRequest.setInterval(60 * 1000);\n mLocationRequest.setFastestInterval(5 * 1000);\n mLocationRequest.setPriority(LocationRequest.PRIORITY_HIGH_ACCURACY);\n //mLocationRequest.setSmallestDisplacement(Utils.DISPLACEMENT);\n }",
"private PSAAClientActionFactory()\n {\n }",
"private AliasAction() {\n\n\t}",
"CustomAction(String actionType, String color, double startX, double startY){\n action.put(\"Object\", actionType);\n JSONObject attributes = new JSONObject();\n attributes.put(\"color\", color);\n attributes.put(\"startX\", startX);\n attributes.put(\"startY\", startY);\n action.put(\"Action\", attributes);\n }",
"protected void pushAction(iNamedObject node)\n\t{\n\t}",
"public UpcomingContestsManagerAction() {\r\n }",
"public GetMarkerSetMembershipAction() {\n }",
"public void action() throws Exception {\n // Cop move to another place\n move();\n\n // Search for agents nearby\n ArrayList<Position> occupiedNeighbor = this.getPosition().getOccupiedNeighborhood();\n ArrayList<Agent> arrestList = new ArrayList<>();\n for (Position neighbor : occupiedNeighbor) {\n Person person = neighbor.getOccupiedPerson();\n String className = person.getClass().getName();\n // if this is a agent and is active\n if (className.equals(Person.AGENT)) {\n if (((Agent) person).isActive()) {\n arrestList.add((Agent) person);\n }\n }\n }\n\n // If there at least one agent nearby\n if (0 != arrestList.size()) {\n // Randomly pick active agent to jail\n Random random = new Random();\n int maxIndex = arrestList.size();\n int randomIndex = random.nextInt(maxIndex);\n Agent arrestAgent = arrestList.get(randomIndex);\n int jailTerm = random.nextInt(getPersonEnvironment().getMaxJailTerm());\n arrestAgent.beArrested(jailTerm, this);\n }\n }",
"protected void createLocationRequest() {\n mLocationRequest = new LocationRequest();\n int UPDATE_INTERVAL = 1000 * 60 * 5;\n mLocationRequest.setInterval(UPDATE_INTERVAL);\n int FASTEST_INTERVAL = 5000;\n mLocationRequest.setFastestInterval(FASTEST_INTERVAL);\n mLocationRequest.setPriority(LocationRequest.PRIORITY_HIGH_ACCURACY);\n int DISPLACEMENT = 20;\n mLocationRequest.setSmallestDisplacement(DISPLACEMENT); // 20 meters\n }",
"public Button(String command, String name)\n {\n //command that will activate the infrared remote on the pi when this is sent to the command line\n this.command = \"irsend SEND_ONCE \" + name + \" KEY_\" + command.toUpperCase(); \n }",
"protected void init_actions()\r\n {\r\n action_obj = new CUP$CircuitCup$actions(this);\r\n }",
"public NamedAction createNamedAction(String name) {\n NamedActionImpl action = new NamedActionImpl();\n action.setName(name);\n return action;\n }",
"protected abstract void createTriggerOrAction();",
"public NormalRoom(String description, Action... action) {\n\t\tsuper(description, action);\n\t}",
"public NewTunnelAction() {\r\n putValue(Action.NAME, \"New Tunnel\");\r\n putValue(Action.SMALL_ICON,\r\n new ResourceIcon(ActiveTunnelsSessionPanel.class,\r\n \"add.png\"));\r\n putValue(Action.SHORT_DESCRIPTION, \"New Tunnel\");\r\n putValue(Action.LONG_DESCRIPTION,\r\n \"Create a new secure tunnel\");\r\n putValue(Action.MNEMONIC_KEY, new Integer('n'));\r\n //Cerlane (ALT to CTRL)\r\n putValue(Action.ACCELERATOR_KEY,\r\n KeyStroke.getKeyStroke(KeyEvent.VK_T, Keyboard_Modifier));\r\n putValue(Action.ACTION_COMMAND_KEY, \"new-tunnel-command\");\r\n putValue(StandardAction.ON_MENUBAR, new Boolean(true));\r\n putValue(StandardAction.MENU_NAME, \"Tunnel\");\r\n putValue(StandardAction.MENU_ITEM_GROUP, new Integer(50));\r\n putValue(StandardAction.MENU_ITEM_WEIGHT, new Integer(10));\r\n putValue(StandardAction.ON_TOOLBAR, new Boolean(true));\r\n putValue(StandardAction.TOOLBAR_GROUP, new Integer(5));\r\n putValue(StandardAction.TOOLBAR_WEIGHT, new Integer(5));\r\n putValue(StandardAction.HIDE_TOOLBAR_TEXT, new Boolean(false));\r\n putValue(StandardAction.ON_CONTEXT_MENU, new Boolean(true));\r\n putValue(StandardAction.CONTEXT_MENU_GROUP, new Integer(5));\r\n putValue(StandardAction.CONTEXT_MENU_WEIGHT, new Integer(5));\r\n //Cerlane (ALT to CTRL)\r\n putValue(Action.ACCELERATOR_KEY,\r\n KeyStroke.getKeyStroke(KeyEvent.VK_N, Keyboard_Modifier));\r\n }",
"protected void init_actions()\n {\n action_obj = new CUP$PCLParser$actions(this);\n }",
"public BattleWeaponsSegmentAction() {\n }",
"protected void init_actions()\n {\n action_obj = new CUP$Grm$actions();\n }",
"CustomAction(String actionType, String message) {\n action.put(\"Object\", actionType);\n JSONObject attributes = new JSONObject();\n attributes.put(\"message\", message);\n action.put(\"Action\", attributes);\n }",
"protected void init_actions()\n {\n action_obj = new CUP$CoolParser$actions(this);\n }",
"protected void init_actions()\n {\n action_obj = new CUP$CoolParser$actions(this);\n }",
"public static BucketbotTask createTaskMOVE(Circle c) {\r\n\t\tBucketbotTask t = new BucketbotTask();\r\n\t\tt.taskType = TaskType.MOVE;\r\n\t\tt.destination = c;\r\n\t\treturn t;\r\n\t}",
"MoveActionController createMoveActionController();",
"protected PMBaseAction() {\r\n super();\r\n }",
"public Place goNorth();",
"protected void init_actions()\r\n {\r\n action_obj = new CUP$Parser$actions(this);\r\n }",
"public Action(String name) {\n this.name = name;\n }",
"public ExecuteAction()\n {\n this(null);\n }",
"protected void init_actions()\r\n {\r\n action_obj = new CUP$parser$actions(this);\r\n }",
"public static Action buildShip(int id, char type) {\n\t\treturn new Action(id, type);\n\t}",
"Oracion createOracion();",
"protected void init_actions()\n {\n action_obj = new CUP$Parser$actions(this);\n }",
"protected void init_actions()\n {\n action_obj = new CUP$Parser$actions(this);\n }",
"protected void init_actions()\n {\n action_obj = new CUP$Parser$actions(this);\n }",
"protected void init_actions()\n {\n action_obj = new CUP$Parser$actions(this);\n }",
"protected void init_actions()\n {\n action_obj = new CUP$Parser$actions(this);\n }",
"public void createFriend(ActionEvent actionEvent) {\n Friend f = new Friend(getName.getText(),getPhone.getText());\n listFriends.getItems().add(f);\n getName.clear();\n getPhone.clear();\n }",
"public void createLocationRequest(){\n locationRequest = new LocationRequest();\n locationRequest.setInterval(1000);\n locationRequest.setFastestInterval(500);\n locationRequest.setPriority(LocationRequest.PRIORITY_HIGH_ACCURACY);\n }",
"public ScheduledActionAction() {\n\n }",
"public ElementAction(String label) {\r\n\t\tthis(label, true);\r\n\t}",
"protected void init_actions()\n {\n action_obj = new CUP$parser$actions(this);\n }",
"protected void init_actions()\n {\n action_obj = new CUP$parser$actions(this);\n }",
"protected void init_actions()\n {\n action_obj = new CUP$parser$actions(this);\n }",
"protected void init_actions()\n {\n action_obj = new CUP$parser$actions(this);\n }",
"protected void init_actions()\n {\n action_obj = new CUP$parser$actions(this);\n }",
"protected void init_actions()\n {\n action_obj = new CUP$parser$actions(this);\n }",
"protected void init_actions()\n {\n action_obj = new CUP$parser$actions(this);\n }",
"protected void init_actions()\n {\n action_obj = new CUP$parser$actions(this);\n }"
] |
[
"0.67906517",
"0.6518271",
"0.6129316",
"0.6085668",
"0.6085668",
"0.6085668",
"0.60802734",
"0.5966385",
"0.5815725",
"0.5695938",
"0.5693334",
"0.5376089",
"0.53672296",
"0.527376",
"0.52572304",
"0.5240696",
"0.5210045",
"0.51803356",
"0.5179967",
"0.5153246",
"0.5138728",
"0.51373243",
"0.5135538",
"0.50741774",
"0.5045289",
"0.49932677",
"0.49925372",
"0.49901903",
"0.49828088",
"0.4973183",
"0.49699923",
"0.49353915",
"0.4927623",
"0.49263388",
"0.4922202",
"0.48882684",
"0.48724607",
"0.4848348",
"0.48288974",
"0.48078147",
"0.47887132",
"0.47810453",
"0.47762403",
"0.47731912",
"0.47719216",
"0.4763119",
"0.47615534",
"0.47590506",
"0.47566912",
"0.4755984",
"0.47477093",
"0.47269744",
"0.47239125",
"0.47224662",
"0.47152907",
"0.47147548",
"0.47140974",
"0.47072875",
"0.47054154",
"0.46991804",
"0.469895",
"0.46987176",
"0.4695933",
"0.46860513",
"0.46704093",
"0.46694043",
"0.46669757",
"0.46568853",
"0.46560007",
"0.46426898",
"0.46293563",
"0.4619209",
"0.4619209",
"0.46174112",
"0.46154416",
"0.46135107",
"0.46126878",
"0.46030328",
"0.46025032",
"0.46007404",
"0.45954913",
"0.45952007",
"0.45827928",
"0.45755062",
"0.45755062",
"0.45755062",
"0.45755062",
"0.45755062",
"0.4565811",
"0.4564256",
"0.45585993",
"0.45565352",
"0.4554595",
"0.4554595",
"0.4554595",
"0.4554595",
"0.4554595",
"0.4554595",
"0.4554595",
"0.4554595"
] |
0.60486925
|
7
|
Creates a new NearAction
|
public NearAction(String name, Icon icon, int direction, int magnitude) {
this(name, icon, direction, magnitude, false);
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public NearAction(String name, int direction) {\r\n this(name, direction, 1, false);\r\n }",
"public NearAction(String name, int direction, int magnitude) {\r\n this(name, direction, magnitude, false);\r\n }",
"public NearAction(String name, int direction, boolean localize) {\r\n this(name, direction, 1, localize);\r\n }",
"Action createAction();",
"Action createAction();",
"Action createAction();",
"public NearAction(String name, Icon icon, int direction) {\r\n this(name, icon, direction, 1, false);\r\n }",
"SendAction createSendAction();",
"public NearAction(String name, int direction, int magnitude, boolean localize) {\r\n super(localize ? Localizer.localize(\"GefBase\", name) : name);\r\n this.direction = direction;\r\n this.magnitude = magnitude;\r\n }",
"public NearAction(String name, Icon icon, int direction, int magnitude, boolean localize) {\r\n super(localize ? Localizer.localize(\"GefBase\", name) : name, icon);\r\n this.direction = direction;\r\n this.magnitude = magnitude;\r\n }",
"public NearAction(String name, Icon icon, int direction, boolean localize) {\r\n this(name, icon, direction, 1, localize);\r\n }",
"protected Action makeAcceptAction() {\n\t\tAction myAction;\n\t\tmyAction = new Accept(getAgentID(),\n\t\t\t\t((ActionWithBid) opponentAction).getBid());\n\t\treturn myAction;\n\t}",
"public void createAction() {\n }",
"ForwardMinAction createForwardMinAction();",
"NoAction createNoAction();",
"ActionDefinition createActionDefinition();",
"ActionBlock createActionBlock();",
"public static Action push() {\n return new Action() {\n @Override\n protected void perform(ActiveActor a) {\n if(a.getGrid().isValid(a.getLocation().getAdjacentLocation(a.getDirection()))) {\n Actor b = a.getGrid().get(a.getLocation().getAdjacentLocation(a.getDirection()));\n if(b instanceof Movable && b instanceof DestructibleActor) {\n DestructibleActor c = (DestructibleActor) b;\n c.setDirection(a.getDirection());\n if(c.canMove()) {\n c.move();\n a.move();\n a.energy = a.energy - getCost();\n }\n\n }\n }\n }\n\n @Override\n public int getCost() {\n return 10;\n }\n\n @Override\n public boolean isExclusive() {\n return true;\n }\n\n @Override\n public Object getData() {\n return null;\n }\n\n @Override\n public String toString() {\n return \"Push()\";\n }\n };\n }",
"public static Action spawn(final Class<?> e) {\n return new Action() {\n @Override\n protected void perform(ActiveActor a) {\n if(a.isFacingValidLocation() && a.getFacing() == null) {\n if(a.energy >= getCost()) {\n try {\n Actor b = (Actor) e.newInstance();\n b.putSelfInGrid(a.getGrid(), a.getLocation().getAdjacentLocation(a.getDirection()));\n } catch(InstantiationException r) {\n r.printStackTrace();\n } catch(IllegalAccessException r) {\n r.printStackTrace();\n }\n a.energy = a.energy - 400;\n }\n }\n }\n\n @Override\n public int getCost() {\n return 400;\n }\n\n @Override\n public boolean isExclusive() {\n return true;\n }\n\n @Override\n public Object getData() {\n return e;\n }\n\n @Override\n public String toString() {\n return \"Spawn(\" + (e != null ? e.toString() : \"null\") + \")\";\n }\n };\n }",
"public Agent createNewAgent() throws MaceException{\r\n\t\tAgent agent = new Agent(\"n\" + maxAgentId, Agent.AGENT_BUYER);\r\n\t\taddAgent(agent);\r\n\t\tmaxAgentId++;\r\n\t\treturn agent;\r\n\t}",
"public CreateIndividualPreAction() {\n }",
"Builder addPotentialAction(Action value);",
"public GetIndividualsFullAction() {\n super();\n }",
"ActionNew()\n {\n super(\"New\");\n this.setShortcut(UtilGUI.createKeyStroke('N', true));\n }",
"public NewAction() {\n\t\tsuper(\"New...\", null);\n\t\tputValue(ACCELERATOR_KEY, KeyStroke.getKeyStroke(KeyEvent.VK_N, MAIN_MENU_MASK));\n\t}",
"public NewNetworkAction(IWorkbenchWindow window) {\r\n\t\t// this.window = window;\r\n\t\tsetId(ID);\r\n\t\tsetText(\"&New\");\r\n\t\tsetToolTipText(\"Opens dialog to get network configuration file\");\r\n\t\tActionContainer.add(ID, this);\r\n\t}",
"public String actionCreateNew() {\r\n \t\tsetBook(new Book());\r\n \t\treturn \"new\";\r\n \t}",
"protected IAction createAction(IEvent event, String label, String assign)\n\t\t\tthrows RodinDBException {\n\t\tIAction action = event.createChild(IAction.ELEMENT_TYPE, null, null);\n\t\taction.setLabel(label, null);\n\t\taction.setAssignmentString(assign, null);\n\t\treturn action;\n\t}",
"public Action newAction(Object data) throws Exception;",
"public PlaceAndMoveAction(Game game, ModelPlayer player, Direction direction) {\n this.direction = direction;\n this.player = player;\n }",
"public Command createInstance() {\n\t\t\n\t\tif(name == \"Direction\")\n\t\t\treturn new Direction();\n\t\t\n\t\tif(name == \"Gear\")\n\t\t\treturn new Gear();\n\t\t\n\t\tif(name == \"Pause\")\n\t\t\treturn new Pause();\n\t\t\n\t\treturn null;\n\t\t\n\t}",
"private Action initializeAction(final String classname) {\n\t\tAction action = null;\n\t\tif (classname != null && !\"\".equals(classname)) {\n\t\t\tClass<?> clazz = null;\n\t\t\ttry {\n\t\t\t\tclazz = Class.forName(classname);\n\t\t\t\taction = (Action) clazz.newInstance();\n\t\t\t} catch (InstantiationException e) {\n\t\t\t\tlog.error(\"Cannot instantiate action class: \" + classname);\n\t\t\t} catch (IllegalAccessException e) {\n\t\t\t\tlog.error(\"Not privileged to access action instance: \"\n\t\t\t\t\t\t+ classname);\n\t\t\t} catch (Throwable e) {\n\t\t\t\tlog.error(\"Cannot load action class: \" + classname);\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\tif (action == null) {\n\t\t\t// Instantiate a mock action such that menu item can\n\t\t\t// be displayed.\n\t\t\taction = new DummyAction();\n\t\t\tlog.warn(\"Instantiated mock action class.\");\n\t\t}\n\t\treturn action;\n\t}",
"ForwardAction createForwardAction();",
"Builder addPotentialAction(Action.Builder value);",
"public Action newAction(String command) {\n\t\tif (command == null)\n\t\t\tthrow new IllegalArgumentException(\n\t\t\t\t\t\"No legal command string passed!\");\n\t\tif (super.containsKey(command))\n\t\t\tthrow new IllegalArgumentException(\n\t\t\t\t\t\"Allready kontains a mapping for that key!\");\n\t\tAction action = new ActionForward();\n\t\taction.putValue(Action.ACTION_COMMAND_KEY, command);\n\t\tsuper.put(command, action);\n\t\tactionList.add(action);\n\t\treturn action;\n\t}",
"public SearchContestsManagerAction() {\r\n }",
"ActionType createActionType();",
"TurnAction createTurnAction();",
"public static Action place(final Class<?> e) {\n return new Action() {\n @Override\n protected void perform(ActiveActor a) {\n if(a.isFacingValidLocation()) {\n if(!a.isFacing(Actor.class)) {\n if(a.isHolding(e)) {\n try {\n ((Placeable) e.newInstance()).place(a.getGrid(), a.getLocation().getAdjacentLocation(a.getDirection()));\n a.removeItem(e);\n } catch(InstantiationException e) {\n e.printStackTrace();\n } catch(IllegalAccessException e) {\n e.printStackTrace();\n }\n }\n\n }\n\n }\n }\n\n @Override\n public int getCost() {\n return 0;\n }\n\n @Override\n public boolean isExclusive() {\n return true;\n }\n\n @Override\n public Object getData() {\n return e;\n }\n\n @Override\n public String toString() {\n return \"Place(\" + (e != null ? e.toString() : \"null\") + \")\";\n }\n };\n }",
"public MemberAction() {\n\t\tsuper();\n\t}",
"DomainAction createDomainAction();",
"public InitiateAttackNonCreatureAction() {\n super(new CreatureAttacksNonCreatureRule());\n }",
"public Action newAction(Object key) {\n\t\tif (key == null)\n\t\t\tthrow new IllegalArgumentException(\"No legal key passed!\");\n\t\tif (super.containsKey(key))\n\t\t\tthrow new IllegalArgumentException(\n\t\t\t\t\t\"Allready kontains a mapping for that key!\");\n\t\tAction action = new ActionForward();\n\t\tsuper.put(key, action);\n\t\tactionList.add(action);\n\t\treturn action;\n\t}",
"@Override\n\tpublic void createAction(Model m) {\n\t\t\n\t}",
"public VisitAction() {\n }",
"public AETinteractions() {\r\n\t}",
"protected abstract Intent createOne();",
"@Override\n\tpublic Location newInstance() {\n\t\treturn new Location(this.X,this.Y,0);\n\t}",
"@Override\n\tpublic void newAction() {\n\t\t\n\t}",
"protected void createLocationRequest() {\n\t\tmLocationRequest = new LocationRequest();\n\t\tmLocationRequest.setInterval(UPDATE_INTERVAL);\n\t\tmLocationRequest.setFastestInterval(FATEST_INTERVAL);\n\t\tmLocationRequest.setPriority(LocationRequest.PRIORITY_HIGH_ACCURACY);\n\t\tmLocationRequest.setSmallestDisplacement(DISPLACEMENT);\n\t}",
"Builder addPotentialAction(String value);",
"@Override\n protected Action[] createActions() {\n return new Action[0];\n }",
"protected void createLocationRequest() {\n System.out.println(\"In CREATE LOCATION REQUEST\");\n mLocationRequest = new LocationRequest();\n mLocationRequest.setInterval(60 * 1000);\n mLocationRequest.setFastestInterval(5 * 1000);\n mLocationRequest.setPriority(LocationRequest.PRIORITY_HIGH_ACCURACY);\n //mLocationRequest.setSmallestDisplacement(Utils.DISPLACEMENT);\n }",
"private PSAAClientActionFactory()\n {\n }",
"private AliasAction() {\n\n\t}",
"CustomAction(String actionType, String color, double startX, double startY){\n action.put(\"Object\", actionType);\n JSONObject attributes = new JSONObject();\n attributes.put(\"color\", color);\n attributes.put(\"startX\", startX);\n attributes.put(\"startY\", startY);\n action.put(\"Action\", attributes);\n }",
"protected void pushAction(iNamedObject node)\n\t{\n\t}",
"public UpcomingContestsManagerAction() {\r\n }",
"public GetMarkerSetMembershipAction() {\n }",
"public void action() throws Exception {\n // Cop move to another place\n move();\n\n // Search for agents nearby\n ArrayList<Position> occupiedNeighbor = this.getPosition().getOccupiedNeighborhood();\n ArrayList<Agent> arrestList = new ArrayList<>();\n for (Position neighbor : occupiedNeighbor) {\n Person person = neighbor.getOccupiedPerson();\n String className = person.getClass().getName();\n // if this is a agent and is active\n if (className.equals(Person.AGENT)) {\n if (((Agent) person).isActive()) {\n arrestList.add((Agent) person);\n }\n }\n }\n\n // If there at least one agent nearby\n if (0 != arrestList.size()) {\n // Randomly pick active agent to jail\n Random random = new Random();\n int maxIndex = arrestList.size();\n int randomIndex = random.nextInt(maxIndex);\n Agent arrestAgent = arrestList.get(randomIndex);\n int jailTerm = random.nextInt(getPersonEnvironment().getMaxJailTerm());\n arrestAgent.beArrested(jailTerm, this);\n }\n }",
"protected void createLocationRequest() {\n mLocationRequest = new LocationRequest();\n int UPDATE_INTERVAL = 1000 * 60 * 5;\n mLocationRequest.setInterval(UPDATE_INTERVAL);\n int FASTEST_INTERVAL = 5000;\n mLocationRequest.setFastestInterval(FASTEST_INTERVAL);\n mLocationRequest.setPriority(LocationRequest.PRIORITY_HIGH_ACCURACY);\n int DISPLACEMENT = 20;\n mLocationRequest.setSmallestDisplacement(DISPLACEMENT); // 20 meters\n }",
"public Button(String command, String name)\n {\n //command that will activate the infrared remote on the pi when this is sent to the command line\n this.command = \"irsend SEND_ONCE \" + name + \" KEY_\" + command.toUpperCase(); \n }",
"protected void init_actions()\r\n {\r\n action_obj = new CUP$CircuitCup$actions(this);\r\n }",
"public NamedAction createNamedAction(String name) {\n NamedActionImpl action = new NamedActionImpl();\n action.setName(name);\n return action;\n }",
"protected abstract void createTriggerOrAction();",
"public NormalRoom(String description, Action... action) {\n\t\tsuper(description, action);\n\t}",
"public NewTunnelAction() {\r\n putValue(Action.NAME, \"New Tunnel\");\r\n putValue(Action.SMALL_ICON,\r\n new ResourceIcon(ActiveTunnelsSessionPanel.class,\r\n \"add.png\"));\r\n putValue(Action.SHORT_DESCRIPTION, \"New Tunnel\");\r\n putValue(Action.LONG_DESCRIPTION,\r\n \"Create a new secure tunnel\");\r\n putValue(Action.MNEMONIC_KEY, new Integer('n'));\r\n //Cerlane (ALT to CTRL)\r\n putValue(Action.ACCELERATOR_KEY,\r\n KeyStroke.getKeyStroke(KeyEvent.VK_T, Keyboard_Modifier));\r\n putValue(Action.ACTION_COMMAND_KEY, \"new-tunnel-command\");\r\n putValue(StandardAction.ON_MENUBAR, new Boolean(true));\r\n putValue(StandardAction.MENU_NAME, \"Tunnel\");\r\n putValue(StandardAction.MENU_ITEM_GROUP, new Integer(50));\r\n putValue(StandardAction.MENU_ITEM_WEIGHT, new Integer(10));\r\n putValue(StandardAction.ON_TOOLBAR, new Boolean(true));\r\n putValue(StandardAction.TOOLBAR_GROUP, new Integer(5));\r\n putValue(StandardAction.TOOLBAR_WEIGHT, new Integer(5));\r\n putValue(StandardAction.HIDE_TOOLBAR_TEXT, new Boolean(false));\r\n putValue(StandardAction.ON_CONTEXT_MENU, new Boolean(true));\r\n putValue(StandardAction.CONTEXT_MENU_GROUP, new Integer(5));\r\n putValue(StandardAction.CONTEXT_MENU_WEIGHT, new Integer(5));\r\n //Cerlane (ALT to CTRL)\r\n putValue(Action.ACCELERATOR_KEY,\r\n KeyStroke.getKeyStroke(KeyEvent.VK_N, Keyboard_Modifier));\r\n }",
"protected void init_actions()\n {\n action_obj = new CUP$PCLParser$actions(this);\n }",
"public BattleWeaponsSegmentAction() {\n }",
"protected void init_actions()\n {\n action_obj = new CUP$Grm$actions();\n }",
"CustomAction(String actionType, String message) {\n action.put(\"Object\", actionType);\n JSONObject attributes = new JSONObject();\n attributes.put(\"message\", message);\n action.put(\"Action\", attributes);\n }",
"protected void init_actions()\n {\n action_obj = new CUP$CoolParser$actions(this);\n }",
"protected void init_actions()\n {\n action_obj = new CUP$CoolParser$actions(this);\n }",
"public static BucketbotTask createTaskMOVE(Circle c) {\r\n\t\tBucketbotTask t = new BucketbotTask();\r\n\t\tt.taskType = TaskType.MOVE;\r\n\t\tt.destination = c;\r\n\t\treturn t;\r\n\t}",
"MoveActionController createMoveActionController();",
"protected PMBaseAction() {\r\n super();\r\n }",
"public Place goNorth();",
"protected void init_actions()\r\n {\r\n action_obj = new CUP$Parser$actions(this);\r\n }",
"public Action(String name) {\n this.name = name;\n }",
"public ExecuteAction()\n {\n this(null);\n }",
"protected void init_actions()\r\n {\r\n action_obj = new CUP$parser$actions(this);\r\n }",
"public static Action buildShip(int id, char type) {\n\t\treturn new Action(id, type);\n\t}",
"Oracion createOracion();",
"protected void init_actions()\n {\n action_obj = new CUP$Parser$actions(this);\n }",
"protected void init_actions()\n {\n action_obj = new CUP$Parser$actions(this);\n }",
"protected void init_actions()\n {\n action_obj = new CUP$Parser$actions(this);\n }",
"protected void init_actions()\n {\n action_obj = new CUP$Parser$actions(this);\n }",
"protected void init_actions()\n {\n action_obj = new CUP$Parser$actions(this);\n }",
"public void createFriend(ActionEvent actionEvent) {\n Friend f = new Friend(getName.getText(),getPhone.getText());\n listFriends.getItems().add(f);\n getName.clear();\n getPhone.clear();\n }",
"public void createLocationRequest(){\n locationRequest = new LocationRequest();\n locationRequest.setInterval(1000);\n locationRequest.setFastestInterval(500);\n locationRequest.setPriority(LocationRequest.PRIORITY_HIGH_ACCURACY);\n }",
"public ScheduledActionAction() {\n\n }",
"public ElementAction(String label) {\r\n\t\tthis(label, true);\r\n\t}",
"protected void init_actions()\n {\n action_obj = new CUP$parser$actions(this);\n }",
"protected void init_actions()\n {\n action_obj = new CUP$parser$actions(this);\n }",
"protected void init_actions()\n {\n action_obj = new CUP$parser$actions(this);\n }",
"protected void init_actions()\n {\n action_obj = new CUP$parser$actions(this);\n }",
"protected void init_actions()\n {\n action_obj = new CUP$parser$actions(this);\n }",
"protected void init_actions()\n {\n action_obj = new CUP$parser$actions(this);\n }",
"protected void init_actions()\n {\n action_obj = new CUP$parser$actions(this);\n }",
"protected void init_actions()\n {\n action_obj = new CUP$parser$actions(this);\n }"
] |
[
"0.67906517",
"0.6518271",
"0.6129316",
"0.6085668",
"0.6085668",
"0.6085668",
"0.60486925",
"0.5966385",
"0.5815725",
"0.5695938",
"0.5693334",
"0.5376089",
"0.53672296",
"0.527376",
"0.52572304",
"0.5240696",
"0.5210045",
"0.51803356",
"0.5179967",
"0.5153246",
"0.5138728",
"0.51373243",
"0.5135538",
"0.50741774",
"0.5045289",
"0.49932677",
"0.49925372",
"0.49901903",
"0.49828088",
"0.4973183",
"0.49699923",
"0.49353915",
"0.4927623",
"0.49263388",
"0.4922202",
"0.48882684",
"0.48724607",
"0.4848348",
"0.48288974",
"0.48078147",
"0.47887132",
"0.47810453",
"0.47762403",
"0.47731912",
"0.47719216",
"0.4763119",
"0.47615534",
"0.47590506",
"0.47566912",
"0.4755984",
"0.47477093",
"0.47269744",
"0.47239125",
"0.47224662",
"0.47152907",
"0.47147548",
"0.47140974",
"0.47072875",
"0.47054154",
"0.46991804",
"0.469895",
"0.46987176",
"0.4695933",
"0.46860513",
"0.46704093",
"0.46694043",
"0.46669757",
"0.46568853",
"0.46560007",
"0.46426898",
"0.46293563",
"0.4619209",
"0.4619209",
"0.46174112",
"0.46154416",
"0.46135107",
"0.46126878",
"0.46030328",
"0.46025032",
"0.46007404",
"0.45954913",
"0.45952007",
"0.45827928",
"0.45755062",
"0.45755062",
"0.45755062",
"0.45755062",
"0.45755062",
"0.4565811",
"0.4564256",
"0.45585993",
"0.45565352",
"0.4554595",
"0.4554595",
"0.4554595",
"0.4554595",
"0.4554595",
"0.4554595",
"0.4554595",
"0.4554595"
] |
0.60802734
|
6
|
Creates a new NearAction
|
public NearAction(String name, int direction, boolean localize) {
this(name, direction, 1, localize);
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public NearAction(String name, int direction) {\r\n this(name, direction, 1, false);\r\n }",
"public NearAction(String name, int direction, int magnitude) {\r\n this(name, direction, magnitude, false);\r\n }",
"Action createAction();",
"Action createAction();",
"Action createAction();",
"public NearAction(String name, Icon icon, int direction, int magnitude) {\r\n this(name, icon, direction, magnitude, false);\r\n }",
"public NearAction(String name, Icon icon, int direction) {\r\n this(name, icon, direction, 1, false);\r\n }",
"SendAction createSendAction();",
"public NearAction(String name, int direction, int magnitude, boolean localize) {\r\n super(localize ? Localizer.localize(\"GefBase\", name) : name);\r\n this.direction = direction;\r\n this.magnitude = magnitude;\r\n }",
"public NearAction(String name, Icon icon, int direction, int magnitude, boolean localize) {\r\n super(localize ? Localizer.localize(\"GefBase\", name) : name, icon);\r\n this.direction = direction;\r\n this.magnitude = magnitude;\r\n }",
"public NearAction(String name, Icon icon, int direction, boolean localize) {\r\n this(name, icon, direction, 1, localize);\r\n }",
"protected Action makeAcceptAction() {\n\t\tAction myAction;\n\t\tmyAction = new Accept(getAgentID(),\n\t\t\t\t((ActionWithBid) opponentAction).getBid());\n\t\treturn myAction;\n\t}",
"public void createAction() {\n }",
"ForwardMinAction createForwardMinAction();",
"NoAction createNoAction();",
"ActionDefinition createActionDefinition();",
"ActionBlock createActionBlock();",
"public static Action push() {\n return new Action() {\n @Override\n protected void perform(ActiveActor a) {\n if(a.getGrid().isValid(a.getLocation().getAdjacentLocation(a.getDirection()))) {\n Actor b = a.getGrid().get(a.getLocation().getAdjacentLocation(a.getDirection()));\n if(b instanceof Movable && b instanceof DestructibleActor) {\n DestructibleActor c = (DestructibleActor) b;\n c.setDirection(a.getDirection());\n if(c.canMove()) {\n c.move();\n a.move();\n a.energy = a.energy - getCost();\n }\n\n }\n }\n }\n\n @Override\n public int getCost() {\n return 10;\n }\n\n @Override\n public boolean isExclusive() {\n return true;\n }\n\n @Override\n public Object getData() {\n return null;\n }\n\n @Override\n public String toString() {\n return \"Push()\";\n }\n };\n }",
"public static Action spawn(final Class<?> e) {\n return new Action() {\n @Override\n protected void perform(ActiveActor a) {\n if(a.isFacingValidLocation() && a.getFacing() == null) {\n if(a.energy >= getCost()) {\n try {\n Actor b = (Actor) e.newInstance();\n b.putSelfInGrid(a.getGrid(), a.getLocation().getAdjacentLocation(a.getDirection()));\n } catch(InstantiationException r) {\n r.printStackTrace();\n } catch(IllegalAccessException r) {\n r.printStackTrace();\n }\n a.energy = a.energy - 400;\n }\n }\n }\n\n @Override\n public int getCost() {\n return 400;\n }\n\n @Override\n public boolean isExclusive() {\n return true;\n }\n\n @Override\n public Object getData() {\n return e;\n }\n\n @Override\n public String toString() {\n return \"Spawn(\" + (e != null ? e.toString() : \"null\") + \")\";\n }\n };\n }",
"public Agent createNewAgent() throws MaceException{\r\n\t\tAgent agent = new Agent(\"n\" + maxAgentId, Agent.AGENT_BUYER);\r\n\t\taddAgent(agent);\r\n\t\tmaxAgentId++;\r\n\t\treturn agent;\r\n\t}",
"public CreateIndividualPreAction() {\n }",
"Builder addPotentialAction(Action value);",
"public GetIndividualsFullAction() {\n super();\n }",
"ActionNew()\n {\n super(\"New\");\n this.setShortcut(UtilGUI.createKeyStroke('N', true));\n }",
"public NewAction() {\n\t\tsuper(\"New...\", null);\n\t\tputValue(ACCELERATOR_KEY, KeyStroke.getKeyStroke(KeyEvent.VK_N, MAIN_MENU_MASK));\n\t}",
"public NewNetworkAction(IWorkbenchWindow window) {\r\n\t\t// this.window = window;\r\n\t\tsetId(ID);\r\n\t\tsetText(\"&New\");\r\n\t\tsetToolTipText(\"Opens dialog to get network configuration file\");\r\n\t\tActionContainer.add(ID, this);\r\n\t}",
"public String actionCreateNew() {\r\n \t\tsetBook(new Book());\r\n \t\treturn \"new\";\r\n \t}",
"protected IAction createAction(IEvent event, String label, String assign)\n\t\t\tthrows RodinDBException {\n\t\tIAction action = event.createChild(IAction.ELEMENT_TYPE, null, null);\n\t\taction.setLabel(label, null);\n\t\taction.setAssignmentString(assign, null);\n\t\treturn action;\n\t}",
"public Action newAction(Object data) throws Exception;",
"public PlaceAndMoveAction(Game game, ModelPlayer player, Direction direction) {\n this.direction = direction;\n this.player = player;\n }",
"public Command createInstance() {\n\t\t\n\t\tif(name == \"Direction\")\n\t\t\treturn new Direction();\n\t\t\n\t\tif(name == \"Gear\")\n\t\t\treturn new Gear();\n\t\t\n\t\tif(name == \"Pause\")\n\t\t\treturn new Pause();\n\t\t\n\t\treturn null;\n\t\t\n\t}",
"private Action initializeAction(final String classname) {\n\t\tAction action = null;\n\t\tif (classname != null && !\"\".equals(classname)) {\n\t\t\tClass<?> clazz = null;\n\t\t\ttry {\n\t\t\t\tclazz = Class.forName(classname);\n\t\t\t\taction = (Action) clazz.newInstance();\n\t\t\t} catch (InstantiationException e) {\n\t\t\t\tlog.error(\"Cannot instantiate action class: \" + classname);\n\t\t\t} catch (IllegalAccessException e) {\n\t\t\t\tlog.error(\"Not privileged to access action instance: \"\n\t\t\t\t\t\t+ classname);\n\t\t\t} catch (Throwable e) {\n\t\t\t\tlog.error(\"Cannot load action class: \" + classname);\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\tif (action == null) {\n\t\t\t// Instantiate a mock action such that menu item can\n\t\t\t// be displayed.\n\t\t\taction = new DummyAction();\n\t\t\tlog.warn(\"Instantiated mock action class.\");\n\t\t}\n\t\treturn action;\n\t}",
"ForwardAction createForwardAction();",
"Builder addPotentialAction(Action.Builder value);",
"public Action newAction(String command) {\n\t\tif (command == null)\n\t\t\tthrow new IllegalArgumentException(\n\t\t\t\t\t\"No legal command string passed!\");\n\t\tif (super.containsKey(command))\n\t\t\tthrow new IllegalArgumentException(\n\t\t\t\t\t\"Allready kontains a mapping for that key!\");\n\t\tAction action = new ActionForward();\n\t\taction.putValue(Action.ACTION_COMMAND_KEY, command);\n\t\tsuper.put(command, action);\n\t\tactionList.add(action);\n\t\treturn action;\n\t}",
"public SearchContestsManagerAction() {\r\n }",
"ActionType createActionType();",
"TurnAction createTurnAction();",
"public static Action place(final Class<?> e) {\n return new Action() {\n @Override\n protected void perform(ActiveActor a) {\n if(a.isFacingValidLocation()) {\n if(!a.isFacing(Actor.class)) {\n if(a.isHolding(e)) {\n try {\n ((Placeable) e.newInstance()).place(a.getGrid(), a.getLocation().getAdjacentLocation(a.getDirection()));\n a.removeItem(e);\n } catch(InstantiationException e) {\n e.printStackTrace();\n } catch(IllegalAccessException e) {\n e.printStackTrace();\n }\n }\n\n }\n\n }\n }\n\n @Override\n public int getCost() {\n return 0;\n }\n\n @Override\n public boolean isExclusive() {\n return true;\n }\n\n @Override\n public Object getData() {\n return e;\n }\n\n @Override\n public String toString() {\n return \"Place(\" + (e != null ? e.toString() : \"null\") + \")\";\n }\n };\n }",
"public MemberAction() {\n\t\tsuper();\n\t}",
"DomainAction createDomainAction();",
"public InitiateAttackNonCreatureAction() {\n super(new CreatureAttacksNonCreatureRule());\n }",
"public Action newAction(Object key) {\n\t\tif (key == null)\n\t\t\tthrow new IllegalArgumentException(\"No legal key passed!\");\n\t\tif (super.containsKey(key))\n\t\t\tthrow new IllegalArgumentException(\n\t\t\t\t\t\"Allready kontains a mapping for that key!\");\n\t\tAction action = new ActionForward();\n\t\tsuper.put(key, action);\n\t\tactionList.add(action);\n\t\treturn action;\n\t}",
"@Override\n\tpublic void createAction(Model m) {\n\t\t\n\t}",
"public VisitAction() {\n }",
"public AETinteractions() {\r\n\t}",
"protected abstract Intent createOne();",
"@Override\n\tpublic Location newInstance() {\n\t\treturn new Location(this.X,this.Y,0);\n\t}",
"@Override\n\tpublic void newAction() {\n\t\t\n\t}",
"protected void createLocationRequest() {\n\t\tmLocationRequest = new LocationRequest();\n\t\tmLocationRequest.setInterval(UPDATE_INTERVAL);\n\t\tmLocationRequest.setFastestInterval(FATEST_INTERVAL);\n\t\tmLocationRequest.setPriority(LocationRequest.PRIORITY_HIGH_ACCURACY);\n\t\tmLocationRequest.setSmallestDisplacement(DISPLACEMENT);\n\t}",
"Builder addPotentialAction(String value);",
"@Override\n protected Action[] createActions() {\n return new Action[0];\n }",
"protected void createLocationRequest() {\n System.out.println(\"In CREATE LOCATION REQUEST\");\n mLocationRequest = new LocationRequest();\n mLocationRequest.setInterval(60 * 1000);\n mLocationRequest.setFastestInterval(5 * 1000);\n mLocationRequest.setPriority(LocationRequest.PRIORITY_HIGH_ACCURACY);\n //mLocationRequest.setSmallestDisplacement(Utils.DISPLACEMENT);\n }",
"private PSAAClientActionFactory()\n {\n }",
"private AliasAction() {\n\n\t}",
"CustomAction(String actionType, String color, double startX, double startY){\n action.put(\"Object\", actionType);\n JSONObject attributes = new JSONObject();\n attributes.put(\"color\", color);\n attributes.put(\"startX\", startX);\n attributes.put(\"startY\", startY);\n action.put(\"Action\", attributes);\n }",
"protected void pushAction(iNamedObject node)\n\t{\n\t}",
"public UpcomingContestsManagerAction() {\r\n }",
"public GetMarkerSetMembershipAction() {\n }",
"public void action() throws Exception {\n // Cop move to another place\n move();\n\n // Search for agents nearby\n ArrayList<Position> occupiedNeighbor = this.getPosition().getOccupiedNeighborhood();\n ArrayList<Agent> arrestList = new ArrayList<>();\n for (Position neighbor : occupiedNeighbor) {\n Person person = neighbor.getOccupiedPerson();\n String className = person.getClass().getName();\n // if this is a agent and is active\n if (className.equals(Person.AGENT)) {\n if (((Agent) person).isActive()) {\n arrestList.add((Agent) person);\n }\n }\n }\n\n // If there at least one agent nearby\n if (0 != arrestList.size()) {\n // Randomly pick active agent to jail\n Random random = new Random();\n int maxIndex = arrestList.size();\n int randomIndex = random.nextInt(maxIndex);\n Agent arrestAgent = arrestList.get(randomIndex);\n int jailTerm = random.nextInt(getPersonEnvironment().getMaxJailTerm());\n arrestAgent.beArrested(jailTerm, this);\n }\n }",
"protected void createLocationRequest() {\n mLocationRequest = new LocationRequest();\n int UPDATE_INTERVAL = 1000 * 60 * 5;\n mLocationRequest.setInterval(UPDATE_INTERVAL);\n int FASTEST_INTERVAL = 5000;\n mLocationRequest.setFastestInterval(FASTEST_INTERVAL);\n mLocationRequest.setPriority(LocationRequest.PRIORITY_HIGH_ACCURACY);\n int DISPLACEMENT = 20;\n mLocationRequest.setSmallestDisplacement(DISPLACEMENT); // 20 meters\n }",
"public Button(String command, String name)\n {\n //command that will activate the infrared remote on the pi when this is sent to the command line\n this.command = \"irsend SEND_ONCE \" + name + \" KEY_\" + command.toUpperCase(); \n }",
"protected void init_actions()\r\n {\r\n action_obj = new CUP$CircuitCup$actions(this);\r\n }",
"public NamedAction createNamedAction(String name) {\n NamedActionImpl action = new NamedActionImpl();\n action.setName(name);\n return action;\n }",
"protected abstract void createTriggerOrAction();",
"public NormalRoom(String description, Action... action) {\n\t\tsuper(description, action);\n\t}",
"public NewTunnelAction() {\r\n putValue(Action.NAME, \"New Tunnel\");\r\n putValue(Action.SMALL_ICON,\r\n new ResourceIcon(ActiveTunnelsSessionPanel.class,\r\n \"add.png\"));\r\n putValue(Action.SHORT_DESCRIPTION, \"New Tunnel\");\r\n putValue(Action.LONG_DESCRIPTION,\r\n \"Create a new secure tunnel\");\r\n putValue(Action.MNEMONIC_KEY, new Integer('n'));\r\n //Cerlane (ALT to CTRL)\r\n putValue(Action.ACCELERATOR_KEY,\r\n KeyStroke.getKeyStroke(KeyEvent.VK_T, Keyboard_Modifier));\r\n putValue(Action.ACTION_COMMAND_KEY, \"new-tunnel-command\");\r\n putValue(StandardAction.ON_MENUBAR, new Boolean(true));\r\n putValue(StandardAction.MENU_NAME, \"Tunnel\");\r\n putValue(StandardAction.MENU_ITEM_GROUP, new Integer(50));\r\n putValue(StandardAction.MENU_ITEM_WEIGHT, new Integer(10));\r\n putValue(StandardAction.ON_TOOLBAR, new Boolean(true));\r\n putValue(StandardAction.TOOLBAR_GROUP, new Integer(5));\r\n putValue(StandardAction.TOOLBAR_WEIGHT, new Integer(5));\r\n putValue(StandardAction.HIDE_TOOLBAR_TEXT, new Boolean(false));\r\n putValue(StandardAction.ON_CONTEXT_MENU, new Boolean(true));\r\n putValue(StandardAction.CONTEXT_MENU_GROUP, new Integer(5));\r\n putValue(StandardAction.CONTEXT_MENU_WEIGHT, new Integer(5));\r\n //Cerlane (ALT to CTRL)\r\n putValue(Action.ACCELERATOR_KEY,\r\n KeyStroke.getKeyStroke(KeyEvent.VK_N, Keyboard_Modifier));\r\n }",
"protected void init_actions()\n {\n action_obj = new CUP$PCLParser$actions(this);\n }",
"public BattleWeaponsSegmentAction() {\n }",
"protected void init_actions()\n {\n action_obj = new CUP$Grm$actions();\n }",
"CustomAction(String actionType, String message) {\n action.put(\"Object\", actionType);\n JSONObject attributes = new JSONObject();\n attributes.put(\"message\", message);\n action.put(\"Action\", attributes);\n }",
"protected void init_actions()\n {\n action_obj = new CUP$CoolParser$actions(this);\n }",
"protected void init_actions()\n {\n action_obj = new CUP$CoolParser$actions(this);\n }",
"public static BucketbotTask createTaskMOVE(Circle c) {\r\n\t\tBucketbotTask t = new BucketbotTask();\r\n\t\tt.taskType = TaskType.MOVE;\r\n\t\tt.destination = c;\r\n\t\treturn t;\r\n\t}",
"MoveActionController createMoveActionController();",
"protected PMBaseAction() {\r\n super();\r\n }",
"public Place goNorth();",
"protected void init_actions()\r\n {\r\n action_obj = new CUP$Parser$actions(this);\r\n }",
"public Action(String name) {\n this.name = name;\n }",
"public ExecuteAction()\n {\n this(null);\n }",
"protected void init_actions()\r\n {\r\n action_obj = new CUP$parser$actions(this);\r\n }",
"public static Action buildShip(int id, char type) {\n\t\treturn new Action(id, type);\n\t}",
"Oracion createOracion();",
"protected void init_actions()\n {\n action_obj = new CUP$Parser$actions(this);\n }",
"protected void init_actions()\n {\n action_obj = new CUP$Parser$actions(this);\n }",
"protected void init_actions()\n {\n action_obj = new CUP$Parser$actions(this);\n }",
"protected void init_actions()\n {\n action_obj = new CUP$Parser$actions(this);\n }",
"protected void init_actions()\n {\n action_obj = new CUP$Parser$actions(this);\n }",
"public void createFriend(ActionEvent actionEvent) {\n Friend f = new Friend(getName.getText(),getPhone.getText());\n listFriends.getItems().add(f);\n getName.clear();\n getPhone.clear();\n }",
"public void createLocationRequest(){\n locationRequest = new LocationRequest();\n locationRequest.setInterval(1000);\n locationRequest.setFastestInterval(500);\n locationRequest.setPriority(LocationRequest.PRIORITY_HIGH_ACCURACY);\n }",
"public ScheduledActionAction() {\n\n }",
"public ElementAction(String label) {\r\n\t\tthis(label, true);\r\n\t}",
"protected void init_actions()\n {\n action_obj = new CUP$parser$actions(this);\n }",
"protected void init_actions()\n {\n action_obj = new CUP$parser$actions(this);\n }",
"protected void init_actions()\n {\n action_obj = new CUP$parser$actions(this);\n }",
"protected void init_actions()\n {\n action_obj = new CUP$parser$actions(this);\n }",
"protected void init_actions()\n {\n action_obj = new CUP$parser$actions(this);\n }",
"protected void init_actions()\n {\n action_obj = new CUP$parser$actions(this);\n }",
"protected void init_actions()\n {\n action_obj = new CUP$parser$actions(this);\n }",
"protected void init_actions()\n {\n action_obj = new CUP$parser$actions(this);\n }"
] |
[
"0.67906517",
"0.6518271",
"0.6085668",
"0.6085668",
"0.6085668",
"0.60802734",
"0.60486925",
"0.5966385",
"0.5815725",
"0.5695938",
"0.5693334",
"0.5376089",
"0.53672296",
"0.527376",
"0.52572304",
"0.5240696",
"0.5210045",
"0.51803356",
"0.5179967",
"0.5153246",
"0.5138728",
"0.51373243",
"0.5135538",
"0.50741774",
"0.5045289",
"0.49932677",
"0.49925372",
"0.49901903",
"0.49828088",
"0.4973183",
"0.49699923",
"0.49353915",
"0.4927623",
"0.49263388",
"0.4922202",
"0.48882684",
"0.48724607",
"0.4848348",
"0.48288974",
"0.48078147",
"0.47887132",
"0.47810453",
"0.47762403",
"0.47731912",
"0.47719216",
"0.4763119",
"0.47615534",
"0.47590506",
"0.47566912",
"0.4755984",
"0.47477093",
"0.47269744",
"0.47239125",
"0.47224662",
"0.47152907",
"0.47147548",
"0.47140974",
"0.47072875",
"0.47054154",
"0.46991804",
"0.469895",
"0.46987176",
"0.4695933",
"0.46860513",
"0.46704093",
"0.46694043",
"0.46669757",
"0.46568853",
"0.46560007",
"0.46426898",
"0.46293563",
"0.4619209",
"0.4619209",
"0.46174112",
"0.46154416",
"0.46135107",
"0.46126878",
"0.46030328",
"0.46025032",
"0.46007404",
"0.45954913",
"0.45952007",
"0.45827928",
"0.45755062",
"0.45755062",
"0.45755062",
"0.45755062",
"0.45755062",
"0.4565811",
"0.4564256",
"0.45585993",
"0.45565352",
"0.4554595",
"0.4554595",
"0.4554595",
"0.4554595",
"0.4554595",
"0.4554595",
"0.4554595",
"0.4554595"
] |
0.6129316
|
2
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.